WebKit Bugzilla
Attachment 370642 Details for
Bug 198252
: [LFC][Verification] Add additional inline and block checks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198252-20190525204113.patch (text/plain), 4.66 KB, created by
zalan
on 2019-05-25 20:41:18 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-05-25 20:41:18 PDT
Size:
4.66 KB
patch
obsolete
>Subversion Revision: 245776 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b3ff1ddbe2fb8361e0a672f85964d771c91b01bd..2267d67451e7172a3fe9685352db1c442e130910 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-25 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][Verification] Add additional inline and block checks >+ https://bugs.webkit.org/show_bug.cgi?id=198252 >+ <rdar://problem/51140687> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Now we also test the geometry of the blocks with inline formatting contexts. >+ >+ * layout/Verification.cpp: >+ (WebCore::Layout::checkForMatchingTextRuns): >+ (WebCore::Layout::verifyAndOutputSubtree): >+ > 2019-05-25 Zalan Bujtas <zalan@apple.com> > > [LFC][Verification] Add areEssentiallyEqual for LayoutRect >diff --git a/Source/WebCore/layout/Verification.cpp b/Source/WebCore/layout/Verification.cpp >index 95e36097019c1fb3afa363442eed6734287da9e1..ccf46d891b5babf6934ba23a56d66e79b6f36242 100644 >--- a/Source/WebCore/layout/Verification.cpp >+++ b/Source/WebCore/layout/Verification.cpp >@@ -108,16 +108,19 @@ static bool checkForMatchingNonTextRuns(const Display::Run& inlineRun, const Web > { > return areEssentiallyEqual(inlineBox.logicalLeft(), inlineRun.logicalLeft()) > && areEssentiallyEqual(inlineBox.logicalRight(), inlineRun.logicalRight()) >- && areEssentiallyEqual(inlineBox.logicalHeight(), inlineRun.logicalHeight()); >+ && areEssentiallyEqual(inlineBox.logicalTop(), inlineRun.logicalTop()) >+ && areEssentiallyEqual(inlineBox.logicalBottom(), inlineRun.logicalBottom()); > } > >+ > static bool checkForMatchingTextRuns(const Display::Run& inlineRun, const InlineTextBox& inlineTextBox) > { > return areEssentiallyEqual(inlineTextBox.logicalLeft(), inlineRun.logicalLeft()) > && areEssentiallyEqual(inlineTextBox.logicalRight(), inlineRun.logicalRight()) >+ && areEssentiallyEqual(inlineTextBox.logicalTop(), inlineRun.logicalTop()) >+ && areEssentiallyEqual(inlineTextBox.logicalBottom(), inlineRun.logicalBottom()) > && inlineTextBox.start() == inlineRun.textContext()->start() >- && (inlineTextBox.end() + 1) == inlineRun.textContext()->end() >- && areEssentiallyEqual(inlineTextBox.logicalHeight(), inlineRun.logicalHeight()); >+ && (inlineTextBox.end() + 1) == inlineRun.textContext()->end(); > } > > static void collectFlowBoxSubtree(const InlineFlowBox& flowbox, Vector<WebCore::InlineBox*>& inlineBoxes) >@@ -275,7 +278,7 @@ static bool verifyAndOutputSubtree(TextStream& stream, const LayoutState& contex > return mismtachingGeometry; > > auto& container = downcast<Container>(layoutBox); >- auto* childBox = container.firstChild(); >+ auto* childLayoutBox = container.firstChild(); > auto* childRenderer = renderer.firstChild(); > > while (childRenderer) { >@@ -284,23 +287,27 @@ static bool verifyAndOutputSubtree(TextStream& stream, const LayoutState& contex > continue; > } > >- if (!childBox) { >+ if (!childLayoutBox) { > stream << "Trees are out of sync!"; > stream.nextLine(); > return true; > } > >- if (is<RenderBlockFlow>(*childRenderer) && childBox->establishesInlineFormattingContext()) { >+ if (is<RenderBlockFlow>(*childRenderer) && childLayoutBox->establishesInlineFormattingContext()) { > ASSERT(childRenderer->childrenInline()); >+ auto mismtachingGeometry = outputMismatchingBlockBoxInformationIfNeeded(stream, context, downcast<RenderBox>(*childRenderer), *childLayoutBox); >+ if (mismtachingGeometry) >+ return true; >+ > auto& blockFlow = downcast<RenderBlockFlow>(*childRenderer); >- auto& formattingRoot = downcast<Container>(*childBox); >+ auto& formattingRoot = downcast<Container>(*childLayoutBox); > mismtachingGeometry |= blockFlow.lineLayoutPath() == RenderBlockFlow::SimpleLinesPath ? outputMismatchingSimpleLineInformationIfNeeded(stream, context, blockFlow, formattingRoot) : outputMismatchingComplexLineInformationIfNeeded(stream, context, blockFlow, formattingRoot); > } else { >- auto mismatchingSubtreeGeometry = verifyAndOutputSubtree(stream, context, downcast<RenderBox>(*childRenderer), *childBox); >+ auto mismatchingSubtreeGeometry = verifyAndOutputSubtree(stream, context, downcast<RenderBox>(*childRenderer), *childLayoutBox); > mismtachingGeometry |= mismatchingSubtreeGeometry; > } > >- childBox = childBox->nextSibling(); >+ childLayoutBox = childLayoutBox->nextSibling(); > childRenderer = childRenderer->nextSibling(); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198252
:
370642
|
370760