Changeset 228062 in webkit
- Timestamp:
- Feb 4, 2018 6:19:01 PM (6 years ago)
- Location:
- branches/safari-605-branch
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/LayoutTests/ChangeLog
r228058 r228062 1 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r227974. rdar://problem/37145538 4 5 2018-02-01 Dean Jackson <dino@apple.com> 6 7 REGRESSION (r219342): Scaled HTML widget is not responding to a clicks outside the body 8 https://bugs.webkit.org/show_bug.cgi?id=182394 9 <rdar://problem/34840816> 10 11 Reviewed by Simon Fraser. 12 13 Add a test for a scaled down page. 14 15 * fast/dom/elementFromPoint-scaled-scrolled-expected.txt: 16 * fast/dom/elementFromPoint-scaled-scrolled.html: 17 1 18 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 19 -
branches/safari-605-branch/LayoutTests/fast/dom/elementFromPoint-scaled-scrolled-expected.txt
r219342 r228062 15 15 PASS document.elementFromPoint(-85, 15) is null 16 16 PASS document.elementFromPoint(215, 315) is b2 17 PASS document.elementFromPoint(525, 425) is b2 17 18 PASS successfullyParsed is true 18 19 -
branches/safari-605-branch/LayoutTests/fast/dom/elementFromPoint-scaled-scrolled.html
r219342 r228062 53 53 shouldBe("document.elementFromPoint(215, 315)", "b2"); 54 54 55 window.scrollTo(0, 0); 56 if (window.internals) 57 window.internals.setPageScaleFactor(0.5, 0, 0); 58 // b2 is now technically outside the 800x600 scaled viewport rect, 59 // but should still be found. 60 61 shouldBe("document.elementFromPoint(525, 425)", "b2"); 62 55 63 finishJSTest(); 56 64 } -
branches/safari-605-branch/Source/WebCore/ChangeLog
r228061 r228062 1 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r227974. rdar://problem/37145538 4 5 2018-02-01 Dean Jackson <dino@apple.com> 6 7 REGRESSION (r219342): Scaled HTML widget is not responding to a clicks outside the body 8 https://bugs.webkit.org/show_bug.cgi?id=182394 9 <rdar://problem/34840816> 10 11 Reviewed by Simon Fraser. 12 13 If a scale < 1 is applied to the page, then the visual viewport will be bigger 14 than the layout viewport. Our hit testing code would then ignore any hits 15 that were outside the layout viewport. 16 17 The fix is to only apply a hit testing clip if the page is scaling up, not down. 18 19 Update the existing fast/dom/elementFromPoint-scaled-scrolled.html test. 20 21 * page/FrameView.cpp: 22 (WebCore::FrameView::layoutViewportToAbsoluteRect const): Deleted. This helper is 23 no longer used, and it would have probably been more confusing to have it accept 24 a flag to ignore the scale if it is less than 1. 25 * page/FrameView.h: 26 * rendering/RenderLayer.cpp: 27 (WebCore::RenderLayer::hitTest): No need to take the layout rect, remove the origin, 28 and pass it to a helper that added the origin back. The only thing the helper was 29 doing for us was applying a scale factor, which we only want to do if it was 30 scaling up. 31 1 32 2018-02-04 Jason Marcell <jmarcell@apple.com> 2 33 -
branches/safari-605-branch/Source/WebCore/page/FrameView.cpp
r227654 r228062 4525 4525 } 4526 4526 4527 FloatRect FrameView::layoutViewportToAbsoluteRect(FloatRect rect) const4528 {4529 ASSERT(frame().settings().visualViewportEnabled());4530 rect.moveBy(layoutViewportRect().location());4531 rect.scale(frame().frameScaleFactor());4532 return rect;4533 }4534 4535 4527 FloatPoint FrameView::layoutViewportToAbsolutePoint(FloatPoint p) const 4536 4528 { -
branches/safari-605-branch/Source/WebCore/page/FrameView.h
r226491 r228062 474 474 WEBCORE_EXPORT FloatPoint clientToDocumentPoint(FloatPoint) const; 475 475 476 FloatRect layoutViewportToAbsoluteRect(FloatRect) const;477 476 FloatPoint layoutViewportToAbsolutePoint(FloatPoint) const; 478 477 -
branches/safari-605-branch/Source/WebCore/rendering/RenderLayer.cpp
r226491 r228062 4934 4934 if (renderer().settings().visualViewportEnabled()) { 4935 4935 auto& frameView = renderer().view().frameView(); 4936 LayoutRect layoutViewportBounds({ }, frameView.layoutViewportRect().size()); 4937 LayoutRect absoluteLayoutViewportRect = LayoutRect(frameView.layoutViewportToAbsoluteRect(layoutViewportBounds)); 4936 LayoutRect absoluteLayoutViewportRect = frameView.layoutViewportRect(); 4937 auto scaleFactor = frameView.frame().frameScaleFactor(); 4938 if (scaleFactor > 1) 4939 absoluteLayoutViewportRect.scale(scaleFactor); 4938 4940 hitTestArea.intersect(absoluteLayoutViewportRect); 4939 4941 } else
Note: See TracChangeset
for help on using the changeset viewer.