Changeset 202470 in webkit
- Timestamp:
- Jun 25, 2016 9:34:23 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202466 r202470 1 2016-06-25 Benjamin Poulain <bpoulain@apple.com> 2 3 The active state of elements can break when focus changes 4 https://bugs.webkit.org/show_bug.cgi?id=159112 5 6 Reviewed by Antti Koivisto. 7 8 * fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus-expected.txt: Added. 9 * fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus.html: Added. 10 * fast/css/pseudo-active-with-programmatic-focus-expected.txt: Added. 11 * fast/css/pseudo-active-with-programmatic-focus.html: Added. 12 1 13 2016-06-24 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r202447 r202470 1436 1436 fast/css/object-fit/object-fit-input-image.html [ ImageOnlyFailure ] 1437 1437 fast/css/outline-auto-empty-rects.html [ Failure ] 1438 fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus.html [ Failure ] 1439 fast/css/pseudo-active-with-programmatic-focus.html [ Failure ] 1438 1440 fast/css/pseudo-first-line-border-width.html [ Failure ] 1439 1441 fast/css/read-only-read-write-input-basics.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r202466 r202470 1 2016-06-25 Benjamin Poulain <bpoulain@apple.com> 2 3 The active state of elements can break when focus changes 4 https://bugs.webkit.org/show_bug.cgi?id=159112 5 6 Reviewed by Antti Koivisto. 7 8 The pseudo class :active was behaving weirdly when used 9 with label elements with an associated form element. 10 The form element would get the :active state on the first click 11 then no longer get the state until the focus changes. 12 13 What was happenning is setFocusedElement() was clearing active 14 for some unknown reason. When you really do that on an active element, 15 you end up in an inconsistent state where no invalidation works. 16 17 The two tests illustrates 2 ways this breaks. 18 19 The test "pseudo-active-on-labeled-element-not-canceled-by-focus" clicks 20 several time on a lable element. The first time, the input element gets 21 the focus. The second time, it already has the focus, setFocusedElement() 22 clears :active before finding the focusable element and end up clearing 23 the active state on a target in the active chain. 24 25 The test "pseudo-active-with-programmatic-focus.html" shows how to invalidate 26 arbitrary elements using JavaScript. This can cause severely broken active 27 chains where invalidation never cleans some ancestors. 28 29 Tests: fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus.html 30 fast/css/pseudo-active-with-programmatic-focus.html 31 32 * dom/Document.cpp: 33 (WebCore::Document::setFocusedElement): Deleted. 34 35 * page/EventHandler.cpp: 36 (WebCore::EventHandler::handleMouseDoubleClickEvent): 37 This is WebKit1 specific. The double click event was dispatching 38 the mouseUp and Click with after doing an Active hit test. 39 This causes us to have :active state in and after mouseUp in WebKit1. 40 1 41 2016-06-24 Jer Noble <jer.noble@apple.com> 2 42 -
trunk/Source/WebCore/dom/Document.cpp
r202399 r202470 3778 3778 // Remove focus from the existing focus node (if any) 3779 3779 if (oldFocusedElement) { 3780 if (oldFocusedElement->active())3781 oldFocusedElement->setActive(false);3782 3783 3780 oldFocusedElement->setFocus(false); 3784 3781 setFocusNavigationStartingNode(nullptr); -
trunk/Source/WebCore/page/EventHandler.cpp
r202242 r202470 1753 1753 setLastKnownMousePosition(platformMouseEvent); 1754 1754 1755 HitTestRequest request(HitTestRequest:: Active | HitTestRequest::DisallowUserAgentShadowContent);1755 HitTestRequest request(HitTestRequest::Release | HitTestRequest::DisallowUserAgentShadowContent); 1756 1756 MouseEventWithHitTestResults mouseEvent = prepareMouseEvent(request, platformMouseEvent); 1757 1757 Frame* subframe = subframeForHitTestResult(mouseEvent);
Note: See TracChangeset
for help on using the changeset viewer.