Changeset 247291 in webkit
- Timestamp:
- Jul 9, 2019 6:52:23 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247282 r247291 1 2019-07-09 Tim Horton <timothy_horton@apple.com> 2 3 Fixed elements appear in the middle of full page screenshots taken when scrolled 4 https://bugs.webkit.org/show_bug.cgi?id=199649 5 <rdar://problem/52476226> 6 7 Reviewed by Simon Fraser. 8 9 * page/FrameView.h: 10 Expose a getter for the layout viewport override rect. 11 1 12 2019-07-09 Alex Christensen <achristensen@webkit.org> 2 13 -
trunk/Source/WebCore/page/FrameView.h
r246488 r247291 261 261 // Used with delegated scrolling (i.e. iOS). 262 262 WEBCORE_EXPORT void setLayoutViewportOverrideRect(Optional<LayoutRect>, TriggerLayoutOrNot = TriggerLayoutOrNot::Yes); 263 Optional<LayoutRect> layoutViewportOverrideRect() const { return m_layoutViewportOverrideRect; } 263 264 264 265 WEBCORE_EXPORT void setVisualViewportOverrideRect(Optional<LayoutRect>); -
trunk/Source/WebKit/ChangeLog
r247290 r247291 1 2019-07-09 Tim Horton <timothy_horton@apple.com> 2 3 Fixed elements appear in the middle of full page screenshots taken when scrolled 4 https://bugs.webkit.org/show_bug.cgi?id=199649 5 <rdar://problem/52476226> 6 7 Reviewed by Simon Fraser. 8 9 * WebProcess/WebPage/ios/WebPageIOS.mm: 10 (WebKit::WebPage::computePagesForPrintingAndDrawToPDF): 11 Temporarily expand the layout viewport to the size of the snapshotting page, 12 so that fixed elements sit against the bounds of the page instead of 13 wherever you're currently scrolled to. 14 1 15 2019-07-09 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r247280 r247291 3691 3691 IntSize snapshotSize { FloatSize { printInfo.availablePaperWidth, printInfo.availablePaperHeight } }; 3692 3692 IntRect snapshotRect { {0, 0}, snapshotSize }; 3693 3694 auto& frameView = *m_page->mainFrame().view(); 3695 auto originalLayoutViewportOverrideRect = frameView.layoutViewportOverrideRect(); 3696 frameView.setLayoutViewportOverrideRect(LayoutRect(snapshotRect)); 3697 3693 3698 auto pdfData = pdfSnapshotAtSize(snapshotRect, snapshotSize, 0); 3699 3700 frameView.setLayoutViewportOverrideRect(originalLayoutViewportOverrideRect); 3694 3701 send(Messages::WebPageProxy::DrawToPDFCallback(IPC::DataReference(CFDataGetBytePtr(pdfData.get()), CFDataGetLength(pdfData.get())), callbackID)); 3695 3702 return;
Note: See TracChangeset
for help on using the changeset viewer.