[iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 May 2014 01:08:30 +0000 (01:08 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 May 2014 01:08:30 +0000 (01:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132719
<rdar://problem/16860837>

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
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

index 76cd4fa..aa8968e 100644 (file)
@@ -1,3 +1,15 @@
+2014-05-08  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
+        https://bugs.webkit.org/show_bug.cgi?id=132719
+        <rdar://problem/16860837>
+
+        Reviewed by Benjamin Poulain.
+
+        Add a couple of functions, and sort.
+
+        * WebCore.exp.in:
+
 2014-05-08  Jer Noble  <jer.noble@apple.com>
 
         [Mac, iOS] Add source application accounting to AVURLAsset.
index f62fdb2..c067c53 100644 (file)
@@ -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
index 7d8d049..76c4df4 100644 (file)
@@ -1,3 +1,17 @@
+2014-05-08  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
+        https://bugs.webkit.org/show_bug.cgi?id=132719
+        <rdar://problem/16860837>
+
+        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  <jer.noble@apple.com>
 
         [Mac, iOS] Add source application accounting to AVURLAsset.
index 30924b9..8fe71d8 100644 (file)
@@ -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()