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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp

Issue 2375043002: Fix up that no render SVG shape when change clip-path to visible after hidden. (Closed)
Patch Set: Fix up that no render SVG shape when change clip-path to visible after hidden. Created 3 years, 11 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/svg/LayoutSVGResourceContainer.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/svg/LayoutSVGResourceContainer.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
index 6bfb64b4d40e99dad8fb6f6fbf6be7633253c801..df089013fedd076323a7e0e071fa671afc638946 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
@@ -309,6 +309,21 @@ void LayoutSVGResourceContainer::markForLayoutAndParentResourceInvalidation(
if (current->isSVGResourceContainer()) {
// This will process the rest of the ancestors.
toLayoutSVGResourceContainer(current)->removeAllClientsFromCache();
+
+ LayoutSVGResourceContainer* container =
fs 2017/01/19 13:24:41 The line just above here will call markAllClientsF
+ toLayoutSVGResourceContainer(current);
+
+ if (object->style()->visibility() == EVisibility::kVisible) {
+ for (auto client : container->clients()) {
+ LayoutRect boundingBox = client->visualRect();
+ if (client->style()->visibility() == EVisibility::kVisible &&
+ !boundingBox.width() && !boundingBox.height()) {
+ client->setNeedsLayout(
+ LayoutInvalidationReason::SvgResourceInvalidated);
+ }
+ }
+ }
+
break;
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698