Changeset 285782 in webkit
- Timestamp:
- Nov 13, 2021, 3:04:43 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
layout/integration/LayoutIntegrationBoxTree.cpp (modified) (1 diff)
-
layout/integration/LayoutIntegrationBoxTree.h (modified) (1 diff)
-
layout/integration/LayoutIntegrationLineLayout.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r285780 r285782 1 2021-11-13 Alan Bujtas <zalan@apple.com> 2 3 [LFC][Integration] Bring showRenderTree for IFC integration back 4 https://bugs.webkit.org/show_bug.cgi?id=233000 5 6 Reviewed by Antti Koivisto. 7 8 Currently showRenderTree comes back blank for IFC content. 9 10 * layout/integration/LayoutIntegrationBoxTree.cpp: 11 (WebCore::LayoutIntegration::showInlineContent): 12 * layout/integration/LayoutIntegrationBoxTree.h: 13 * layout/integration/LayoutIntegrationLineLayout.cpp: 14 (WebCore::LayoutIntegration::LineLayout::outputLineTree const): 15 1 16 2021-11-13 Alan Bujtas <zalan@apple.com> 2 17 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
r284107 r285782 249 249 } 250 250 251 } 252 } 253 254 #endif 255 256 251 #if ENABLE(TREE_DEBUGGING) 252 void showInlineContent(TextStream& stream, const InlineContent& inlineContent, size_t depth) 253 { 254 auto& lines = inlineContent.lines; 255 auto& boxes = inlineContent.boxes; 256 257 for (size_t lineIndex = 0; lineIndex < lines.size(); ++lineIndex) { 258 auto addSpacing = [&] { 259 size_t printedCharacters = 0; 260 stream << "-------- --"; 261 while (++printedCharacters <= depth * 2) 262 stream << " "; 263 264 }; 265 addSpacing(); 266 auto& line = lines[lineIndex]; 267 stream << "line at (" << line.lineBoxLeft() << "," << line.lineBoxTop() << ") size (" << line.lineBoxRight() - line.lineBoxLeft() << "x" << line.lineBoxBottom() - line.lineBoxTop() << ") baseline (" << line.baseline() << ") enclosing top (" << line.enclosingContentTop() << ") bottom (" << line.enclosingContentBottom() << ")"; 268 stream.nextLine(); 269 270 addSpacing(); 271 stream << " Inline level boxes:"; 272 stream.nextLine(); 273 274 auto outputInlineLevelBox = [&](const auto& inlineLevelBox) { 275 addSpacing(); 276 stream << " "; 277 auto logicalRect = inlineLevelBox.logicalRect(); 278 auto& layoutBox = inlineLevelBox.layoutBox(); 279 if (layoutBox.isAtomicInlineLevelBox()) 280 stream << "Atomic inline level box"; 281 else if (layoutBox.isLineBreakBox()) 282 stream << "Line break box"; 283 else if (layoutBox.isInlineBox()) 284 stream << "Inline box"; 285 else 286 stream << "Generic inline level box"; 287 stream 288 << " at (" << logicalRect.left() << "," << logicalRect.top() << ")" 289 << " size (" << logicalRect.width() << "x" << logicalRect.height() << ")"; 290 stream.nextLine(); 291 }; 292 for (auto& box : boxes) { 293 if (box.lineIndex() != lineIndex) 294 continue; 295 if (!box.layoutBox().isInlineLevelBox()) 296 continue; 297 outputInlineLevelBox(box); 298 } 299 300 addSpacing(); 301 stream << " Runs:"; 302 stream.nextLine(); 303 for (auto& box : boxes) { 304 if (box.lineIndex() != lineIndex) 305 continue; 306 addSpacing(); 307 stream << " "; 308 if (box.text()) 309 stream << "text box"; 310 else 311 stream << "box box"; 312 stream << " at (" << box.logicalLeft() << "," << box.logicalTop() << ") size " << box.logicalWidth() << "x" << box.logicalHeight(); 313 if (box.text()) 314 stream << " box(" << box.text()->start() << ", " << box.text()->end() << ")"; 315 stream.nextLine(); 316 } 317 318 } 319 } 320 #endif 321 322 } 323 } 324 325 #endif 326 327 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.h
r284107 r285782 78 78 }; 79 79 80 #if ENABLE(TREE_DEBUGGING) 81 void showInlineContent(TextStream&, const InlineContent&, size_t depth); 82 #endif 80 83 } 81 84 } -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r285162 r285782 635 635 void LineLayout::outputLineTree(WTF::TextStream& stream, size_t depth) const 636 636 { 637 showInline TreeAndRuns(stream, m_layoutState, rootLayoutBox(), depth);637 showInlineContent(stream, *m_inlineContent, depth); 638 638 } 639 639 #endif
Note:
See TracChangeset
for help on using the changeset viewer.