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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Codereview update Created 4 years, 3 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/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index da3fde64b5a3b77d28a69630a205921412b9b108..fbb60160ccaf4a9a3917083d453dfcc172417607 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -31,6 +31,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
#include "core/layout/LayoutBlock.h"
+#include "core/layout/LayoutTableCell.h"
#include "core/layout/LayoutTextCombine.h"
#include "core/layout/LayoutView.h"
#include "core/layout/api/LineLayoutBox.h"
@@ -1786,4 +1787,17 @@ void LayoutText::invalidateDisplayItemClients(PaintInvalidationReason invalidati
}
}
+// FIXME: Would be better to dump the bounding box x and y rather than the
+// first run's x and y, but that would involve updating many test results.
+LayoutRect LayoutText::debugRect() const
+{
+ IntRect linesBox = enclosingIntRect(linesBoundingBox());
+ LayoutRect r = LayoutRect(IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height()));
+ LayoutBlock* cb = containingBlock();
+ if (cb && hasTextBoxes())
+ cb->adjustForTableCells(r);
+
+ return r;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698