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 316e7b86ffc69818cf0e122639f219710f16b36a..6e596bcea5a766dd2b22823e30ec0787e4969a61 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" |
@@ -1763,4 +1764,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()); |
skobes
2016/09/09 20:27:41
Same question re. rounding to ints.
lunalu1
2016/09/12 14:45:14
Done.
|
+ LayoutRect r = LayoutRect(IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
+ LayoutBlock* cb = containingBlock(); |
+ if (cb && hasTextBoxes()) |
+ cb->adjustChildDebugRect(r); |
+ |
+ return r; |
+} |
+ |
} // namespace blink |