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

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

Issue 1577433003: Statistics of LayoutBox rare data reasons Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 3 years, 9 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
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
index 8fbeb7903c1321cc5b881a20f898a017e4541e4c..dcb1a97569607f296b8fc1f93b07e5c84a8c05bc 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
@@ -109,6 +109,16 @@ void LayoutSVGForeignObject::layout() {
setX(elementX());
setY(elementY());
+ if (location() != LayoutPoint()) {
+ for (auto* o = firstChild(); o; o = o->nextInPreOrder(this)) {
+ if (o->isLayoutPart()) {
+ m_rareStat.addReason(ReasonLOSVGForeignBug);
+ LOG(ERROR) << "Found SVG Foreign bug";
+ break;
+ }
+ }
+ }
+
bool layoutChanged = everHadLayout() && selfNeedsLayout();
LayoutBlock::layout();
ASSERT(!needsLayout());

Powered by Google App Engine
This is Rietveld 408576698