WebKit Bugzilla
Attachment 372761 Details for
Bug 199157
: [LFC][IFC] Inline runs should be relative to the line's top/left initially
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199157-20190624080543.patch (text/plain), 4.23 KB, created by
zalan
on 2019-06-24 08:05:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-24 08:05:43 PDT
Size:
4.23 KB
patch
obsolete
>Subversion Revision: 246718 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5fc0c232180b7c2f0e3a8836f9ec519278682f84..c1f1a84641d8041dc9d346acaa3ee7cf8323929b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-06-24 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][IFC] Inline runs should be relative to the line's top/left initially >+ https://bugs.webkit.org/show_bug.cgi?id=199157 >+ <rdar://problem/52053415> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Let's construct the runs relative to the line's top/left and convert them relative to the formatting root's border box top/left >+ when the line is being closed. When the line moves (floats etc) we don't have to move each runs individually. >+ >+ * layout/inlineformatting/InlineLine.cpp: >+ (WebCore::Layout::Line::close): >+ (WebCore::Layout::Line::moveLogicalLeft): >+ (WebCore::Layout::Line::appendInlineContainerStart): >+ (WebCore::Layout::Line::appendTextContent): >+ (WebCore::Layout::Line::appendNonReplacedInlineBox): >+ (WebCore::Layout::Line::appendHardLineBreak): >+ > 2019-06-22 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style. >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.cpp b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >index b128c8d50c45337a94e32ffdeaa362e2ed734896..0c3f952fbe9ce527f6d5d90519fccfa03f5ec755 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >@@ -134,6 +134,9 @@ std::unique_ptr<Line::Content> Line::close() > break; > } > run->logicalRect.setTop(logicalTop); >+ // Convert runs from relative to the line top/left to the formatting root's border box top/left. >+ run->logicalRect.moveVertically(this->logicalTop()); >+ run->logicalRect.moveHorizontally(this->logicalLeft()); > } > } > m_content->setLogicalRect({ logicalTop(), logicalLeft(), contentLogicalWidth(), logicalHeight() }); >@@ -161,8 +164,6 @@ void Line::moveLogicalLeft(LayoutUnit delta) > // Shrink the line and move the items. > m_logicalTopLeft.move(delta, 0); > m_lineLogicalWidth -= delta; >- for (auto& run : m_content->runs()) >- run->logicalRect.moveHorizontally(delta); > } > > void Line::moveLogicalRight(LayoutUnit delta) >@@ -205,7 +206,7 @@ void Line::appendNonBreakableSpace(const InlineItem& inlineItem, const Display:: > void Line::appendInlineContainerStart(const InlineItem& inlineItem, LayoutUnit logicalWidth) > { > auto logicalRect = Display::Rect { }; >- logicalRect.setLeft(contentLogicalRight()); >+ logicalRect.setLeft(contentLogicalWidth()); > logicalRect.setWidth(logicalWidth); > > if (!m_skipVerticalAligment) { >@@ -253,7 +254,7 @@ void Line::appendTextContent(const InlineTextItem& inlineItem, LayoutUnit logica > auto canBeExtended = !isCompletelyCollapsed && !inlineItem.isCollapsed(); > > auto logicalRect = Display::Rect { }; >- logicalRect.setLeft(contentLogicalRight()); >+ logicalRect.setLeft(contentLogicalWidth()); > logicalRect.setWidth(logicalWidth); > if (!m_skipVerticalAligment) { > auto runHeight = inlineItemContentHeight(inlineItem); >@@ -276,7 +277,7 @@ void Line::appendNonReplacedInlineBox(const InlineItem& inlineItem, LayoutUnit l > auto horizontalMargin = displayBox.horizontalMargin(); > auto logicalRect = Display::Rect { }; > >- logicalRect.setLeft(contentLogicalRight() + horizontalMargin.start); >+ logicalRect.setLeft(contentLogicalWidth() + horizontalMargin.start); > logicalRect.setWidth(logicalWidth); > if (!m_skipVerticalAligment) { > adjustBaselineAndLineHeight(inlineItem, displayBox.marginBoxHeight()); >@@ -297,7 +298,7 @@ void Line::appendReplacedInlineBox(const InlineItem& inlineItem, LayoutUnit logi > void Line::appendHardLineBreak(const InlineItem& inlineItem) > { > auto logicalRect = Display::Rect { }; >- logicalRect.setLeft(contentLogicalRight()); >+ logicalRect.setLeft(contentLogicalWidth()); > logicalRect.setWidth({ }); > if (!m_skipVerticalAligment) { > adjustBaselineAndLineHeight(inlineItem, { });
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 199157
: 372761