Title: [138757] trunk/Source/WebCore
Revision
138757
Author
simon.fra...@apple.com
Date
2013-01-03 15:46:01 -0800 (Thu, 03 Jan 2013)

Log Message

Body background with background-attachment:fixed stays in place during rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=67894

Reviewed by Beth Dakin.

Use FrameView::scrollOffsetForFixedPosition() to compute the location of the rect
used to position fixed backgrounds, since it takes rubber-banding into account.

No test because rubber-banding isn't testtable in layout tests.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138756 => 138757)


--- trunk/Source/WebCore/ChangeLog	2013-01-03 23:41:16 UTC (rev 138756)
+++ trunk/Source/WebCore/ChangeLog	2013-01-03 23:46:01 UTC (rev 138757)
@@ -1,3 +1,18 @@
+2013-01-03  Simon Fraser  <simon.fra...@apple.com>
+
+        Body background with background-attachment:fixed stays in place during rubber-banding
+        https://bugs.webkit.org/show_bug.cgi?id=67894
+
+        Reviewed by Beth Dakin.
+
+        Use FrameView::scrollOffsetForFixedPosition() to compute the location of the rect
+        used to position fixed backgrounds, since it takes rubber-banding into account.
+        
+        No test because rubber-banding isn't testtable in layout tests.
+
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+
 2013-01-03  Adam Klein  <ad...@chromium.org>
 
         [HTMLTemplateElement] When adopting a template element, also adopt its content into the appropriate document

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (138756 => 138757)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2013-01-03 23:41:16 UTC (rev 138756)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2013-01-03 23:46:01 UTC (rev 138757)
@@ -1223,7 +1223,10 @@
         } else
             positioningAreaSize = pixelSnappedIntSize(paintRect.size() - LayoutSize(left + right, top + bottom), paintRect.location());
     } else {
-        geometry.setDestRect(pixelSnappedIntRect(viewRect()));
+        IntRect viewportRect = pixelSnappedIntRect(viewRect());
+        if (FrameView* frameView = view()->frameView())
+            viewportRect.setLocation(IntPoint(frameView->scrollOffsetForFixedPosition()));
+        geometry.setDestRect(pixelSnappedIntRect(viewportRect));
         positioningAreaSize = geometry.destRect().size();
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to