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 5bd5b139755c9bdb9217a6ca2657afaba9555318..8671f19420db735a3f779d7e24587679c09c897a 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" |
@@ -1773,4 +1774,18 @@ void LayoutText::invalidateDisplayItemClients(PaintInvalidationReason invalidati |
} |
} |
+// TODO(lunalu): 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 rect = |
+ LayoutRect(IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
+ LayoutBlock* block = containingBlock(); |
+ if (block && hasTextBoxes()) |
+ block->adjustChildDebugRect(rect); |
+ |
+ return rect; |
+} |
+ |
} // namespace blink |