Bug 28837 - Compositing layer sizes do not take inner reflections into account
Summary: Compositing layer sizes do not take inner reflections into account
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-30 22:37 PDT by Simon Fraser (smfr)
Modified: 2009-09-01 02:59 PDT (History)
1 user (show)

See Also:


Attachments
Testcase (1.21 KB, text/html)
2009-08-30 22:37 PDT, Simon Fraser (smfr)
no flags Details
Patch, testcase, changelog (6.10 KB, patch)
2009-08-31 12:11 PDT, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-08-30 22:37:59 PDT
Created attachment 38799 [details]
Testcase

When elements inside a compositing layer are reflected, the compositing layer is not make large enough to show the entire reflection. See attached testcase.
Comment 1 Simon Fraser (smfr) 2009-08-30 22:41:16 PDT
Patch:
diff --git a/WebCore/rendering/RenderLayerCompositor.cpp b/WebCore/rendering/RenderLayerCompositor.cpp
index 517735e..5eb25cb 100644
--- a/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/WebCore/rendering/RenderLayerCompositor.cpp
@@ -291,6 +291,13 @@ IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* laye
         return boundingBoxRect;
     }
 
+    if (RenderLayer* reflection = layer->reflectionLayer()) {
+        if (!reflection->isComposited()) {
+            IntRect childUnionBounds = calculateCompositedBounds(reflection, layer);
+            unionBounds.unite(childUnionBounds);
+        }
+    }
+
     ASSERT(layer->isStackingContext() || (!layer->m_posZOrderList || layer->m_posZOrderList->size() == 0));
 
     if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
Comment 2 Simon Fraser (smfr) 2009-08-31 12:11:55 PDT
Created attachment 38828 [details]
Patch, testcase, changelog
Comment 3 mitz 2009-08-31 13:44:14 PDT
Comment on attachment 38828 [details]
Patch, testcase, changelog

> +</html>
> \ No newline at end of file

Please add a newline.
Comment 4 Simon Fraser (smfr) 2009-08-31 14:00:34 PDT
http://trac.webkit.org/changeset/47905
Comment 5 Eric Seidel (no email) 2009-09-01 02:58:16 PDT
Looks landed.
Comment 6 Eric Seidel (no email) 2009-09-01 02:59:05 PDT
/me makes comments under his breath about tools like "bugzilla-tool" being able to update and close bugs after landing. :)

bugzilla-tool land-diff 28837

in this instance. :)