Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2851763004: Remove LayoutObject::LayerCreationAllowedForSubtree. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index d5ec9ed5e2db5815a3b67b9de40a5650ad33cf72..ba11080d1292f01d6b4864497998fd6e55cbb228 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -328,24 +328,6 @@ void LayoutObject::AddChild(LayoutObject* new_child,
if (new_child->IsText() &&
new_child->Style()->TextTransform() == ETextTransform::kCapitalize)
ToLayoutText(new_child)->TransformText();
-
- // SVG creates layoutObjects for <g display="none">, as SVG requires children
- // of hidden <g>s to have layoutObjects - at least that's how our
- // implementation works.
- // Consider:
- // <g display="none"><foreignObject><body style="position: relative">FOO...
- // - layerTypeRequired() would return true for the <body>, creating a new
- // Layer
- // - when the document is painted, both layers are painted. The <body> layer
- // doesn't know that it's inside a "hidden SVG subtree", and thus paints,
- // even if it shouldn't.
- // To avoid the problem altogether, detect early if we're inside a hidden SVG
- // subtree and stop creating layers at all for these cases - they're not used
- // anyways.
- if (new_child->HasLayer() && !LayerCreationAllowedForSubtree())
- ToLayoutBoxModelObject(new_child)
- ->Layer()
- ->RemoveOnlyThisLayerAfterStyleChange();
}
void LayoutObject::RemoveChild(LayoutObject* old_child) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698