so that we do contentBox().left() without having a fully computed contentBox() -also it makes more sense to use top/left/bottom/right in the context of layout.
Created attachment 341423 [details] Patch
Comment on attachment 341423 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341423&action=review > Source/WebCore/layout/displaytree/DisplayBox.h:114 > + LayoutUnit top() const { return m_rect.top(); } > + LayoutUnit left() const { return m_rect.left(); } > + LayoutUnit bottom() const { return m_rect.bottom(); } > + LayoutUnit right() const { return m_rect.right(); } I guess these helpers are used a lot? box.top() is not that much more compact than box.rect().top().
(In reply to Antti Koivisto from comment #2) > Comment on attachment 341423 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=341423&action=review > > > Source/WebCore/layout/displaytree/DisplayBox.h:114 > > + LayoutUnit top() const { return m_rect.top(); } > > + LayoutUnit left() const { return m_rect.left(); } > > + LayoutUnit bottom() const { return m_rect.bottom(); } > > + LayoutUnit right() const { return m_rect.right(); } > > I guess these helpers are used a lot? box.top() is not that much more > compact than box.rect().top(). They are (or will be) used a lot and from layout logic correctness's point of view displayBox.rect().top() is rather different from displayBox.top() where rect().top() assumes a computed rect() (including width() and height()) even if you only access its top value.
Comment on attachment 341423 [details] Patch Clearing flags on attachment: 341423 Committed r232250: <https://trac.webkit.org/changeset/232250>
All reviewed patches have been landed. Closing bug.
<rdar://problem/40601769>