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

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

Issue 2558793002: Don't check 'visibility' in LayoutSVGResourceMasker (Closed)
Patch Set: Adjust test Created 4 years 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/LayoutTests/svg/masking/mask-with-visibility-hidden-group-expected.html ('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/LayoutSVGResourceMasker.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
index 68e53aa320edce2fb1537b220e743badb47b7d1a..54da89b6fe19e755b59d29f9dc1d09bf2a215a01 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
@@ -85,17 +85,11 @@ sk_sp<const SkPicture> LayoutSVGResourceMasker::createContentPicture(
: ColorFilterNone;
pictureBuilder.context().setColorFilter(maskContentFilter);
- for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element());
- childElement;
- childElement = Traversal<SVGElement>::nextSibling(*childElement)) {
- LayoutObject* layoutObject = childElement->layoutObject();
- if (!layoutObject)
+ for (const SVGElement& childElement :
+ Traversal<SVGElement>::childrenOf(*element())) {
+ const LayoutObject* layoutObject = childElement.layoutObject();
+ if (!layoutObject || layoutObject->styleRef().display() == EDisplay::None)
continue;
- const ComputedStyle* style = layoutObject->style();
- if (!style || style->display() == EDisplay::None ||
- style->visibility() != EVisibility::Visible)
- continue;
-
SVGPaintContext::paintSubtree(pictureBuilder.context(), layoutObject);
}
@@ -104,15 +98,10 @@ sk_sp<const SkPicture> LayoutSVGResourceMasker::createContentPicture(
}
void LayoutSVGResourceMasker::calculateMaskContentVisualRect() {
- for (SVGElement* childElement = Traversal<SVGElement>::firstChild(*element());
- childElement;
- childElement = Traversal<SVGElement>::nextSibling(*childElement)) {
- LayoutObject* layoutObject = childElement->layoutObject();
- if (!layoutObject)
- continue;
- const ComputedStyle* style = layoutObject->style();
- if (!style || style->display() == EDisplay::None ||
- style->visibility() != EVisibility::Visible)
+ for (const SVGElement& childElement :
+ Traversal<SVGElement>::childrenOf(*element())) {
+ const LayoutObject* layoutObject = childElement.layoutObject();
+ if (!layoutObject || layoutObject->styleRef().display() == EDisplay::None)
continue;
m_maskContentBoundaries.unite(
layoutObject->localToSVGParentTransform().mapRect(
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/masking/mask-with-visibility-hidden-group-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698