Title: [253262] trunk/Source/WebCore
- Revision
- 253262
- Author
- [email protected]
- Date
- 2019-12-07 14:20:13 -0800 (Sat, 07 Dec 2019)
Log Message
[LFC][IFC] Display::LineBox should adopt to InlineLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=204990
<rdar://problem/57730105>
Reviewed by Sam Weinig.
This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.
* layout/displaytree/DisplayLineBox.h:
(WebCore::Display::LineBox::logicalTopLeft const):
(WebCore::Display::LineBox::setLogicalTopLeft):
* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::logicalTopLeft const):
(WebCore::Display::Run::logicalLeft const):
(WebCore::Display::Run::logicalRight const):
(WebCore::Display::Run::logicalTop const):
(WebCore::Display::Run::logicalBottom const):
(WebCore::Display::Run::logicalWidth const):
(WebCore::Display::Run::logicalHeight const):
(WebCore::Display::Run::setLogicalWidth):
(WebCore::Display::Run::setLogicalTop):
(WebCore::Display::Run::setLogicalLeft):
(WebCore::Display::Run::moveVertically):
(WebCore::Display::Run::moveHorizontally):
(WebCore::Display::Run::expandVertically):
(WebCore::Display::Run::expandHorizontally):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::constraintsForLine):
* layout/inlineformatting/InlineFormattingContext.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253261 => 253262)
--- trunk/Source/WebCore/ChangeLog 2019-12-07 20:34:35 UTC (rev 253261)
+++ trunk/Source/WebCore/ChangeLog 2019-12-07 22:20:13 UTC (rev 253262)
@@ -1,3 +1,35 @@
+2019-12-07 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Display::LineBox should adopt to InlineLayoutUnit
+ https://bugs.webkit.org/show_bug.cgi?id=204990
+ <rdar://problem/57730105>
+
+ Reviewed by Sam Weinig.
+
+ This is in preparation for using float based types in IFC. See webkit.org/b/204986 for more info.
+
+ * layout/displaytree/DisplayLineBox.h:
+ (WebCore::Display::LineBox::logicalTopLeft const):
+ (WebCore::Display::LineBox::setLogicalTopLeft):
+ * layout/displaytree/DisplayRun.h:
+ (WebCore::Display::Run::logicalTopLeft const):
+ (WebCore::Display::Run::logicalLeft const):
+ (WebCore::Display::Run::logicalRight const):
+ (WebCore::Display::Run::logicalTop const):
+ (WebCore::Display::Run::logicalBottom const):
+ (WebCore::Display::Run::logicalWidth const):
+ (WebCore::Display::Run::logicalHeight const):
+ (WebCore::Display::Run::setLogicalWidth):
+ (WebCore::Display::Run::setLogicalTop):
+ (WebCore::Display::Run::setLogicalLeft):
+ (WebCore::Display::Run::moveVertically):
+ (WebCore::Display::Run::moveHorizontally):
+ (WebCore::Display::Run::expandVertically):
+ (WebCore::Display::Run::expandHorizontally):
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::constraintsForLine):
+ * layout/inlineformatting/InlineFormattingContext.h:
+
2019-12-07 Andres Gonzalez <[email protected]>
Implementation of additional attribute caching in the IsolatedTree.
Modified: trunk/Source/WebCore/layout/displaytree/DisplayLineBox.h (253261 => 253262)
--- trunk/Source/WebCore/layout/displaytree/DisplayLineBox.h 2019-12-07 20:34:35 UTC (rev 253261)
+++ trunk/Source/WebCore/layout/displaytree/DisplayLineBox.h 2019-12-07 22:20:13 UTC (rev 253262)
@@ -61,7 +61,7 @@
LineBox(const InlineRect&, const Baseline&, InlineLayoutUnit baselineOffset);
LineBox() = default;
- LayoutPoint logicalTopLeft() const { return m_rect.topLeft(); }
+ InlineLayoutPoint logicalTopLeft() const { return m_rect.topLeft(); }
InlineLayoutUnit logicalLeft() const { return m_rect.left(); }
InlineLayoutUnit logicalRight() const { return m_rect.right(); }
@@ -95,7 +95,7 @@
void resetBaseline();
void resetDescent() { m_baseline.setDescent(0_lu); }
- void setLogicalTopLeft(LayoutPoint logicalTopLeft) { m_rect.setTopLeft(logicalTopLeft); }
+ void setLogicalTopLeft(const InlineLayoutPoint& logicalTopLeft) { m_rect.setTopLeft(logicalTopLeft); }
void setLogicalHeight(InlineLayoutUnit logicalHeight) { m_rect.setHeight(logicalHeight); }
void setLogicalHeightIfGreater(InlineLayoutUnit);
Modified: trunk/Source/WebCore/layout/displaytree/DisplayRun.h (253261 => 253262)
--- trunk/Source/WebCore/layout/displaytree/DisplayRun.h 2019-12-07 20:34:35 UTC (rev 253261)
+++ trunk/Source/WebCore/layout/displaytree/DisplayRun.h 2019-12-07 22:20:13 UTC (rev 253262)
@@ -53,7 +53,7 @@
struct ExpansionContext {
ExpansionBehavior behavior;
- LayoutUnit horizontalExpansion;
+ InlineLayoutUnit horizontalExpansion { 0 };
};
void setExpansion(ExpansionContext expansionContext) { m_expansionContext = expansionContext; }
Optional<ExpansionContext> expansion() const { return m_expansionContext; }
@@ -77,22 +77,22 @@
const InlineRect& logicalRect() const { return m_logicalRect; }
- LayoutPoint logicalTopLeft() const { return m_logicalRect.topLeft(); }
- LayoutUnit logicalLeft() const { return m_logicalRect.left(); }
- LayoutUnit logicalRight() const { return m_logicalRect.right(); }
- LayoutUnit logicalTop() const { return m_logicalRect.top(); }
- LayoutUnit logicalBottom() const { return m_logicalRect.bottom(); }
+ InlineLayoutPoint logicalTopLeft() const { return m_logicalRect.topLeft(); }
+ InlineLayoutUnit logicalLeft() const { return m_logicalRect.left(); }
+ InlineLayoutUnit logicalRight() const { return m_logicalRect.right(); }
+ InlineLayoutUnit logicalTop() const { return m_logicalRect.top(); }
+ InlineLayoutUnit logicalBottom() const { return m_logicalRect.bottom(); }
- LayoutUnit logicalWidth() const { return m_logicalRect.width(); }
- LayoutUnit logicalHeight() const { return m_logicalRect.height(); }
+ InlineLayoutUnit logicalWidth() const { return m_logicalRect.width(); }
+ InlineLayoutUnit logicalHeight() const { return m_logicalRect.height(); }
- void setLogicalWidth(LayoutUnit width) { m_logicalRect.setWidth(width); }
- void setLogicalTop(LayoutUnit logicalTop) { m_logicalRect.setTop(logicalTop); }
- void setLogicalLeft(LayoutUnit logicalLeft) { m_logicalRect.setLeft(logicalLeft); }
- void moveVertically(LayoutUnit delta) { m_logicalRect.moveVertically(delta); }
- void moveHorizontally(LayoutUnit delta) { m_logicalRect.moveHorizontally(delta); }
- void expandVertically(LayoutUnit delta) { m_logicalRect.expandVertically(delta); }
- void expandHorizontally(LayoutUnit delta) { m_logicalRect.expandHorizontally(delta); }
+ void setLogicalWidth(InlineLayoutUnit width) { m_logicalRect.setWidth(width); }
+ void setLogicalTop(InlineLayoutUnit logicalTop) { m_logicalRect.setTop(logicalTop); }
+ void setLogicalLeft(InlineLayoutUnit logicalLeft) { m_logicalRect.setLeft(logicalLeft); }
+ void moveVertically(InlineLayoutUnit delta) { m_logicalRect.moveVertically(delta); }
+ void moveHorizontally(InlineLayoutUnit delta) { m_logicalRect.moveHorizontally(delta); }
+ void expandVertically(InlineLayoutUnit delta) { m_logicalRect.expandVertically(delta); }
+ void expandHorizontally(InlineLayoutUnit delta) { m_logicalRect.expandHorizontally(delta); }
void setTextContext(const TextContext&& textContext) { m_textContext.emplace(textContext); }
const Optional<TextContext>& textContext() const { return m_textContext; }
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (253261 => 253262)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2019-12-07 20:34:35 UTC (rev 253261)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2019-12-07 22:20:13 UTC (rev 253262)
@@ -371,7 +371,7 @@
}
}
-LineBuilder::Constraints InlineFormattingContext::constraintsForLine(const UsedHorizontalValues& usedHorizontalValues, const InlineLayoutUnit lineLogicalTop)
+LineBuilder::Constraints InlineFormattingContext::constraintsForLine(const UsedHorizontalValues& usedHorizontalValues, InlineLayoutUnit lineLogicalTop)
{
auto lineLogicalLeft = geometryForBox(root()).contentBoxLeft();
auto availableWidth = usedHorizontalValues.constraints.width;
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h (253261 => 253262)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h 2019-12-07 20:34:35 UTC (rev 253261)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h 2019-12-07 22:20:13 UTC (rev 253262)
@@ -89,7 +89,7 @@
void computeWidthAndMargin(const Box&, const UsedHorizontalValues&);
void collectInlineContentIfNeeded();
- LineBuilder::Constraints constraintsForLine(const UsedHorizontalValues&, const InlineLayoutUnit lineLogicalTop);
+ LineBuilder::Constraints constraintsForLine(const UsedHorizontalValues&, InlineLayoutUnit lineLogicalTop);
void setDisplayBoxesForLine(const LineLayoutContext::LineContent&, const UsedHorizontalValues&);
void invalidateFormattingState(const InvalidationState&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes