From 659e8c64f0d4bd50786f68e01cc77df3dd0095bf Mon Sep 17 00:00:00 2001 From: "simon.fraser@apple.com" Date: Fri, 9 May 2014 01:08:30 +0000 Subject: [PATCH] [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load https://bugs.webkit.org/show_bug.cgi?id=132719 Reviewed by Benjamin Poulain. Source/WebCore: Add a couple of functions, and sort. * WebCore.exp.in: Source/WebKit2: If we haven't received visible rects from the web process, compute the fixed position rect, but only after scale has been set. * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::viewportConfigurationChanged): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168513 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 12 ++++++++++++ Source/WebCore/WebCore.exp.in | 4 +++- Source/WebKit2/ChangeLog | 14 ++++++++++++++ Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm | 5 +++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 76cd4fa..aa8968e 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2014-05-08 Simon Fraser + + [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load + https://bugs.webkit.org/show_bug.cgi?id=132719 + + + Reviewed by Benjamin Poulain. + + Add a couple of functions, and sort. + + * WebCore.exp.in: + 2014-05-08 Jer Noble [Mac, iOS] Add source application accounting to AVURLAsset. diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in index f62fdb2..c067c53 100644 --- a/Source/WebCore/WebCore.exp.in +++ b/Source/WebCore/WebCore.exp.in @@ -717,6 +717,7 @@ __ZN7WebCore16VisitedLinkStoreD2Ev __ZN7WebCore16createFullMarkupERKNS_4NodeE __ZN7WebCore16createFullMarkupERKNS_5RangeE __ZN7WebCore16enclosingIntRectERK6CGRect +__ZN7WebCore16enclosingIntRectERKNS_10LayoutRectE __ZN7WebCore16enclosingIntRectERKNS_9FloatRectE __ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE __ZN7WebCore16isUserVisibleURLEP8NSString @@ -2297,9 +2298,9 @@ _wkCursor _wkDrawBezeledTextArea _wkDrawBezeledTextFieldCell _wkDrawCapsLockIndicator +_wkDrawCellFocusRingWithFrameAtTime _wkDrawFocusRing _wkDrawFocusRingAtTime -_wkDrawCellFocusRingWithFrameAtTime _wkDrawMediaSliderTrack _wkDrawMediaUIPart _wkDrawTextFieldCellFocusRing @@ -2716,6 +2717,7 @@ __ZNK7WebCore9FloatQuad13isRectilinearEv __ZNK7WebCore9FloatRectcv6CGRectEv __ZNK7WebCore9FloatSizecv6CGSizeEv __ZNK7WebCore9FrameView17wasScrolledByUserEv +__ZNK7WebCore9FrameView30viewportConstrainedObjectsRectEv __ZNK7WebCore9RenderBox11borderRadiiEv _webThreadShouldYield _wkExecutableWasLinkedOnOrAfterIOSVersion diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 7d8d049..76c4df4 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,17 @@ +2014-05-08 Simon Fraser + + [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load + https://bugs.webkit.org/show_bug.cgi?id=132719 + + + Reviewed by Benjamin Poulain. + + If we haven't received visible rects from the web process, compute the + fixed position rect, but only after scale has been set. + + * WebProcess/WebPage/ios/WebPageIOS.mm: + (WebKit::WebPage::viewportConfigurationChanged): + 2014-05-08 Jer Noble [Mac, iOS] Add source application accounting to AVURLAsset. diff --git a/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm index 30924b9..8fe71d8 100644 --- a/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm +++ b/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm @@ -2087,6 +2087,11 @@ void WebPage::viewportConfigurationChanged() m_drawingArea->setExposedContentRect(unobscuredContentRect); } scalePage(scale, scrollPosition); + + if (!m_hasReceivedVisibleContentRectsAfterDidCommitLoad) { + // This takes scale into account, so do after the scale change. + frameView.setCustomFixedPositionLayoutRect(enclosingIntRect(frameView.viewportConstrainedObjectsRect())); + } } void WebPage::applicationWillResignActive() -- 1.8.3.1