Changeset 245816 in webkit
- Timestamp:
- May 28, 2019, 10:29:33 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/Verification.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r245812 r245816 1 2019-05-28 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][Verification] Add additional inline and block checks 4 https://bugs.webkit.org/show_bug.cgi?id=198252 5 <rdar://problem/51140687> 6 7 Reviewed by Antti Koivisto. 8 9 Now we also test the geometry of the blocks with inline formatting contexts. 10 11 * layout/Verification.cpp: 12 (WebCore::Layout::checkForMatchingTextRuns): 13 (WebCore::Layout::verifyAndOutputSubtree): 14 1 15 2019-05-28 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/layout/Verification.cpp
r245779 r245816 109 109 return areEssentiallyEqual(inlineBox.logicalLeft(), inlineRun.logicalLeft()) 110 110 && areEssentiallyEqual(inlineBox.logicalRight(), inlineRun.logicalRight()) 111 && areEssentiallyEqual(inlineBox.logicalHeight(), inlineRun.logicalHeight()); 112 } 111 && areEssentiallyEqual(inlineBox.logicalTop(), inlineRun.logicalTop()) 112 && areEssentiallyEqual(inlineBox.logicalBottom(), inlineRun.logicalBottom()); 113 } 114 113 115 114 116 static bool checkForMatchingTextRuns(const Display::Run& inlineRun, const InlineTextBox& inlineTextBox) … … 116 118 return areEssentiallyEqual(inlineTextBox.logicalLeft(), inlineRun.logicalLeft()) 117 119 && areEssentiallyEqual(inlineTextBox.logicalRight(), inlineRun.logicalRight()) 120 && areEssentiallyEqual(inlineTextBox.logicalTop(), inlineRun.logicalTop()) 121 && areEssentiallyEqual(inlineTextBox.logicalBottom(), inlineRun.logicalBottom()) 118 122 && inlineTextBox.start() == inlineRun.textContext()->start() 119 && (inlineTextBox.end() + 1) == inlineRun.textContext()->end() 120 && areEssentiallyEqual(inlineTextBox.logicalHeight(), inlineRun.logicalHeight()); 123 && (inlineTextBox.end() + 1) == inlineRun.textContext()->end(); 121 124 } 122 125 … … 276 279 277 280 auto& container = downcast<Container>(layoutBox); 278 auto* child Box = container.firstChild();281 auto* childLayoutBox = container.firstChild(); 279 282 auto* childRenderer = renderer.firstChild(); 280 283 … … 285 288 } 286 289 287 if (!child Box) {290 if (!childLayoutBox) { 288 291 stream << "Trees are out of sync!"; 289 292 stream.nextLine(); … … 291 294 } 292 295 293 if (is<RenderBlockFlow>(*childRenderer) && child Box->establishesInlineFormattingContext()) {296 if (is<RenderBlockFlow>(*childRenderer) && childLayoutBox->establishesInlineFormattingContext()) { 294 297 ASSERT(childRenderer->childrenInline()); 298 auto mismtachingGeometry = outputMismatchingBlockBoxInformationIfNeeded(stream, context, downcast<RenderBox>(*childRenderer), *childLayoutBox); 299 if (mismtachingGeometry) 300 return true; 301 295 302 auto& blockFlow = downcast<RenderBlockFlow>(*childRenderer); 296 auto& formattingRoot = downcast<Container>(*child Box);303 auto& formattingRoot = downcast<Container>(*childLayoutBox); 297 304 mismtachingGeometry |= blockFlow.lineLayoutPath() == RenderBlockFlow::SimpleLinesPath ? outputMismatchingSimpleLineInformationIfNeeded(stream, context, blockFlow, formattingRoot) : outputMismatchingComplexLineInformationIfNeeded(stream, context, blockFlow, formattingRoot); 298 305 } else { 299 auto mismatchingSubtreeGeometry = verifyAndOutputSubtree(stream, context, downcast<RenderBox>(*childRenderer), *child Box);306 auto mismatchingSubtreeGeometry = verifyAndOutputSubtree(stream, context, downcast<RenderBox>(*childRenderer), *childLayoutBox); 300 307 mismtachingGeometry |= mismatchingSubtreeGeometry; 301 308 } 302 309 303 child Box = childBox->nextSibling();310 childLayoutBox = childLayoutBox->nextSibling(); 304 311 childRenderer = childRenderer->nextSibling(); 305 312 }
Note:
See TracChangeset
for help on using the changeset viewer.