Title: [267648] trunk/Source/WebCore
- Revision
- 267648
- Author
- [email protected]
- Date
- 2020-09-26 22:56:33 -0700 (Sat, 26 Sep 2020)
Log Message
[LFC] Add <wbr> to showLayoutTree
https://bugs.webkit.org/show_bug.cgi?id=217025
Reviewed by Darin Adler.
This patch also tweaks the inline tree output (one line geometry output per line, different output format).
<div style="width: 100px;">first_line<wbr>second_line</div>
block box at (0,10) size 100x20
line at (0.00,0.00) size 100.00x10.00 baseline at (8.00)
line at (0.00,10.00) size 100.00x10.00 baseline at (8.00)
text run at (0.00,0.00) size 100.00x10.00 run(0, 10)
text run at (0.00,0.00) size 110.00x10.00 run(0, 11)
anonymous inline box (0x495583d20) length->(10) "first_line"
word break opportunity at (100,8) size 0x0 (0x4967c0680)
anonymous inline box (0x495591e00) length->(11) "second_line"
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::outputInlineRuns):
(WebCore::Layout::outputLayoutBox):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (267647 => 267648)
--- trunk/Source/WebCore/ChangeLog 2020-09-27 04:43:02 UTC (rev 267647)
+++ trunk/Source/WebCore/ChangeLog 2020-09-27 05:56:33 UTC (rev 267648)
@@ -1,3 +1,27 @@
+2020-09-26 Zalan Bujtas <[email protected]>
+
+ [LFC] Add <wbr> to showLayoutTree
+ https://bugs.webkit.org/show_bug.cgi?id=217025
+
+ Reviewed by Darin Adler.
+
+ This patch also tweaks the inline tree output (one line geometry output per line, different output format).
+
+ <div style="width: 100px;">first_line<wbr>second_line</div>
+
+ block box at (0,10) size 100x20
+ line at (0.00,0.00) size 100.00x10.00 baseline at (8.00)
+ line at (0.00,10.00) size 100.00x10.00 baseline at (8.00)
+ text run at (0.00,0.00) size 100.00x10.00 run(0, 10)
+ text run at (0.00,0.00) size 110.00x10.00 run(0, 11)
+ anonymous inline box (0x495583d20) length->(10) "first_line"
+ word break opportunity at (100,8) size 0x0 (0x4967c0680)
+ anonymous inline box (0x495591e00) length->(11) "second_line"
+
+ * layout/layouttree/LayoutTreeBuilder.cpp:
+ (WebCore::Layout::outputInlineRuns):
+ (WebCore::Layout::outputLayoutBox):
+
2020-09-26 Wenson Hsieh <[email protected]>
Remove support for setting CMYKA fill and stroke colors in 2D canvas
Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (267647 => 267648)
--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2020-09-27 04:43:02 UTC (rev 267647)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2020-09-27 05:56:33 UTC (rev 267648)
@@ -383,16 +383,14 @@
auto& inlineFormattingState = layoutState.establishedInlineFormattingState(inlineFormattingRoot);
auto& lines = inlineFormattingState.lines();
- unsigned printedCharacters = 0;
- while (++printedCharacters <= depth * 2)
- stream << " ";
- stream << " ";
+ for (auto& line : lines) {
+ size_t printedCharacters = 0;
+ while (++printedCharacters <= depth * 2)
+ stream << " ";
+ stream << " line at (" << line.logicalLeft() << "," << line.logicalTop() << ") size " << line.logicalWidth() << "x" << line.logicalHeight() << " baseline at (" << line.baseline() << ")";
+ stream.nextLine();
+ }
- stream << "lines are -> ";
- for (auto& line : lines)
- stream << "[" << line.logicalLeft() << "," << line.logicalTop() << " " << line.logicalWidth() << "x" << line.logicalHeight() << "][baseline: " << line.baseline() << "]";
- stream.nextLine();
-
for (auto& run : inlineFormattingState.lineRuns()) {
unsigned printedCharacters = 0;
while (++printedCharacters <= depth * 2)
@@ -399,9 +397,9 @@
stream << " ";
stream << " ";
if (run.text())
- stream << "inline text box";
+ stream << "text run";
else
- stream << "inline box";
+ stream << "box run";
stream << " at (" << run.logicalLeft() << "," << run.logicalTop() << ") size " << run.logicalWidth() << "x" << run.logicalHeight();
if (run.text())
stream << " run(" << run.text()->start() << ", " << run.text()->end() << ")";
@@ -453,14 +451,14 @@
stream << "anonymous inline box";
else if (layoutBox.isInlineBlockBox())
stream << "inline-block box";
- else if (layoutBox.isInlineBox())
- stream << "inline box";
+ else if (layoutBox.isLineBreakBox())
+ stream << (downcast<LineBreakBox>(layoutBox).isOptional() ? "word break opportunity" : "line break");
else if (layoutBox.isAtomicInlineLevelBox())
stream << "atomic inline level box";
else if (layoutBox.isReplacedBox())
stream << "replaced inline box";
- else if (layoutBox.isLineBreakBox())
- stream << "line break";
+ else if (layoutBox.isInlineBox())
+ stream << "inline box";
else
stream << "other inline level box";
} else if (layoutBox.isBlockLevelBox())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes