Changeset 267648 in webkit
- Timestamp:
- Sep 26, 2020, 10:56:33 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/layouttree/LayoutTreeBuilder.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r267645 r267648 1 2020-09-26 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Add <wbr> to showLayoutTree 4 https://bugs.webkit.org/show_bug.cgi?id=217025 5 6 Reviewed by Darin Adler. 7 8 This patch also tweaks the inline tree output (one line geometry output per line, different output format). 9 10 <div style="width: 100px;">first_line<wbr>second_line</div> 11 12 block box at (0,10) size 100x20 13 line at (0.00,0.00) size 100.00x10.00 baseline at (8.00) 14 line at (0.00,10.00) size 100.00x10.00 baseline at (8.00) 15 text run at (0.00,0.00) size 100.00x10.00 run(0, 10) 16 text run at (0.00,0.00) size 110.00x10.00 run(0, 11) 17 anonymous inline box (0x495583d20) length->(10) "first_line" 18 word break opportunity at (100,8) size 0x0 (0x4967c0680) 19 anonymous inline box (0x495591e00) length->(11) "second_line" 20 21 * layout/layouttree/LayoutTreeBuilder.cpp: 22 (WebCore::Layout::outputInlineRuns): 23 (WebCore::Layout::outputLayoutBox): 24 1 25 2020-09-26 Wenson Hsieh <wenson_hsieh@apple.com> 2 26 -
trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp
r267325 r267648 384 384 auto& lines = inlineFormattingState.lines(); 385 385 386 unsigned printedCharacters = 0; 387 while (++printedCharacters <= depth * 2) 388 stream << " "; 389 stream << " "; 390 391 stream << "lines are -> "; 392 for (auto& line : lines) 393 stream << "[" << line.logicalLeft() << "," << line.logicalTop() << " " << line.logicalWidth() << "x" << line.logicalHeight() << "][baseline: " << line.baseline() << "]"; 394 stream.nextLine(); 386 for (auto& line : lines) { 387 size_t printedCharacters = 0; 388 while (++printedCharacters <= depth * 2) 389 stream << " "; 390 stream << " line at (" << line.logicalLeft() << "," << line.logicalTop() << ") size " << line.logicalWidth() << "x" << line.logicalHeight() << " baseline at (" << line.baseline() << ")"; 391 stream.nextLine(); 392 } 395 393 396 394 for (auto& run : inlineFormattingState.lineRuns()) { … … 400 398 stream << " "; 401 399 if (run.text()) 402 stream << " inline text box";400 stream << "text run"; 403 401 else 404 stream << " inline box";402 stream << "box run"; 405 403 stream << " at (" << run.logicalLeft() << "," << run.logicalTop() << ") size " << run.logicalWidth() << "x" << run.logicalHeight(); 406 404 if (run.text()) … … 454 452 else if (layoutBox.isInlineBlockBox()) 455 453 stream << "inline-block box"; 456 else if (layoutBox.is InlineBox())457 stream << "inline box";454 else if (layoutBox.isLineBreakBox()) 455 stream << (downcast<LineBreakBox>(layoutBox).isOptional() ? "word break opportunity" : "line break"); 458 456 else if (layoutBox.isAtomicInlineLevelBox()) 459 457 stream << "atomic inline level box"; 460 458 else if (layoutBox.isReplacedBox()) 461 459 stream << "replaced inline box"; 462 else if (layoutBox.is LineBreakBox())463 stream << " line break";460 else if (layoutBox.isInlineBox()) 461 stream << "inline box"; 464 462 else 465 463 stream << "other inline level box";
Note:
See TracChangeset
for help on using the changeset viewer.