[Webkit-unassigned] [Bug 108556] Constrain layers for fixed position elements to the viewport
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 31 17:40:31 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=108556
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simon.fraser at apple.com
--- Comment #1 from Simon Fraser (smfr) <simon.fraser at apple.com> 2013-01-31 17:42:33 PST ---
Something like this (but it needs to check if the layer really is fixed):
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index 75fded054ca231b778640df24bfc4eab1f8f54d3..6953fd62ec30313f1e271441ac1a036032c66614 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -407,6 +407,11 @@ void RenderLayerBacking::updateCompositedBounds()
// Start by clipping to the document's bounds.
LayoutRect clippingBounds = view->unscaledDocumentRect();
+
+ if (renderer()->style()->position() == FixedPosition) {
+ LayoutRect viewportRect = view->frameView()->viewportConstrainedVisibleContentRect();
+ clippingBounds.intersect(viewportRect);
+ }
if (m_owningLayer != rootLayer)
clippingBounds.intersect(m_owningLayer->backgroundClipRect(RenderLayer::ClipRectsContext(rootLayer, 0, AbsoluteClipRects)).rect()); // FIXME: Incorrect for CSS regions.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list