Title: [170690] trunk/Source/WebCore
Revision
170690
Author
simon.fra...@apple.com
Date
2014-07-01 19:43:32 -0700 (Tue, 01 Jul 2014)

Log Message

Improve behavior of position:sticky on zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=134535
<rdar://problem/12898829>

Reviewed by Dean Jackson.

Despite r138036, position:sticky still had incorrect behavior in zoomed pages.

Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
since all the other math happens in unscaled coordinates.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (170689 => 170690)


--- trunk/Source/WebCore/ChangeLog	2014-07-02 02:24:44 UTC (rev 170689)
+++ trunk/Source/WebCore/ChangeLog	2014-07-02 02:43:32 UTC (rev 170690)
@@ -1,3 +1,19 @@
+2014-07-01  Simon Fraser  <simon.fra...@apple.com>
+
+        Improve behavior of position:sticky on zoomed pages
+        https://bugs.webkit.org/show_bug.cgi?id=134535
+        <rdar://problem/12898829>
+
+        Reviewed by Dean Jackson.
+
+        Despite r138036, position:sticky still had incorrect behavior in zoomed pages.
+        
+        Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
+        since all the other math happens in unscaled coordinates.
+
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
+
 2014-07-01  Alex Christensen  <achristen...@webkit.org>
 
         [WebGL] Fix PVRTC extension.

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (170689 => 170690)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2014-07-02 02:24:44 UTC (rev 170689)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2014-07-02 02:43:32 UTC (rev 170690)
@@ -451,10 +451,7 @@
         return constrainingRect;
     }
     
-    LayoutRect viewportRect = view().frameView().viewportConstrainedVisibleContentRect();
-    float scale = frame().frameScaleFactor();
-    viewportRect.scale(1 / scale);
-    return viewportRect;
+    return view().frameView().viewportConstrainedVisibleContentRect();
 }
 
 LayoutSize RenderBoxModelObject::stickyPositionOffset() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to