Changeset 72796 in webkit
- Timestamp:
- Nov 29, 2010 7:12:39 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r72791 r72796 1 2010-11-29 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Use the right focusable check to avoid multiple focus/blur events being fired from inside of the shadow DOM. 6 https://bugs.webkit.org/show_bug.cgi?id=49977 7 8 * fast/events/shadow-boundary-crossing-2.html: Added a test for multiple focus events. 9 * fast/events/shadow-boundary-crossing-2-expected.txt: Added new test expectation. 10 1 11 2010-11-29 Yael Aharon <yael.aharon@nokia.com> 2 12 -
trunk/LayoutTests/fast/events/shadow-boundary-crossing-2-expected.txt
r72783 r72796 7 7 Other events should be retargeted: PASS 8 8 After event dispatch, the event object should not reveal shadow DOM: PASS 9 Focusing same shadow DOM element repeatedly should not trigger multiple focus/blur events: PASS -
trunk/LayoutTests/fast/events/shadow-boundary-crossing-2.html
r72783 r72796 20 20 eventSender.mouseDown(); 21 21 eventSender.mouseUp(); 22 } 23 24 25 function leapForward() 26 { 27 if (!window.eventSender) 28 return; 29 30 eventSender.leapForward(1000); 22 31 } 23 32 … … 74 83 log('After event dispatch, the event object should not reveal shadow DOM', storedEvent && storedEvent.target == textInput); 75 84 textInput.parentNode.removeChild(textInput); 85 }, 86 focusEventPropagation: function() 87 { 88 var searchInput = document.body.appendChild(document.createElement('input')); 89 searchInput.setAttribute('type', 'search'); 90 var count = 0; 91 searchInput.addEventListener('focus', function(evt) 92 { 93 count++; 94 }); 95 clickOn(searchInput); 96 leapForward(); 97 clickOn(searchInput); 98 log('Focusing same shadow DOM element repeatedly should not trigger multiple focus/blur events', count == 1); 99 searchInput.parentNode.removeChild(searchInput); 76 100 } 77 101 }; -
trunk/WebCore/ChangeLog
r72795 r72796 1 2010-11-29 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Use the right focusable check to avoid multiple focus/blur events being fired from inside of the shadow DOM. 6 https://bugs.webkit.org/show_bug.cgi?id=49977 7 8 * editing/SelectionController.cpp: 9 (WebCore::SelectionController::setFocusedNodeIfNeeded): Added a FIXME to remove redundant code. 10 * page/EventHandler.cpp: 11 (WebCore::EventHandler::dispatchMouseEvent): Changed to use isMouseFocusable, which is what shadow DOM elements 12 override, and added a FIXME to convert to use shadow DOM-aware traversal instead of render tree traversal. 13 14 Test: fast/events/shadow-boundary-crossing-2.html 15 1 16 2010-11-29 Adam Roben <aroben@apple.com> 2 17 -
trunk/WebCore/editing/SelectionController.cpp
r71851 r72796 1556 1556 // Walk up the render tree to search for a node to focus. 1557 1557 // Walking up the DOM tree wouldn't work for shadow trees, like those behind the engine-based text fields. 1558 // FIXME: Combine with the same traversal code in EventHandle::dispatchMouseEvent. 1558 1559 while (renderer) { 1559 1560 // We don't want to set focus on a subframe when selecting in a parent frame, -
trunk/WebCore/page/EventHandler.cpp
r72678 r72796 1860 1860 // Walk up the render tree to search for a node to focus. 1861 1861 // Walking up the DOM tree wouldn't work for shadow trees, like those behind the engine-based text fields. 1862 // FIXME: Rework to use shadowParent. No need to traverse with the render tree. 1862 1863 while (renderer) { 1863 1864 node = renderer->node(); 1864 if (node && node->is Focusable()) {1865 if (node && node->isMouseFocusable()) { 1865 1866 // To fix <rdar://problem/4895428> Can't drag selected ToDo, we don't focus a 1866 1867 // node on mouse down if it's selected and inside a focused node. It will be
Note: See TracChangeset
for help on using the changeset viewer.