WebKit Bugzilla
Attachment 340594 Details for
Bug 185733
: [LFC] Introduce DisplayBox::Style
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185733-20180517094834.patch (text/plain), 4.23 KB, created by
zalan
on 2018-05-17 09:48:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-05-17 09:48:35 PDT
Size:
4.23 KB
patch
obsolete
>Subversion Revision: 231899 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d472ea59af1b99361eb78a2c8f87ec98abcd2a21..510c8d6e00379d004ef24ade423c9981db17bc7e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-17 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Introduce DisplayBox::Style >+ https://bugs.webkit.org/show_bug.cgi?id=185733 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is the collection of computed style data needed to paint/hittest the display boxtree. >+ >+ * layout/LayoutContext.cpp: >+ (WebCore::Layout::LayoutContext::createDisplayBox): >+ * layout/displaytree/DisplayBox.cpp: >+ (WebCore::Display::Box::Box): >+ (WebCore::Display::Box::Style::Style): >+ (WebCore::Display::Box::borderBox const): >+ (WebCore::Display::Box::contentBox const): >+ * layout/displaytree/DisplayBox.h: >+ > 2018-05-17 Antoine Quint <graouts@apple.com> > > [modern-media-controls] AirPlaySupport should be disabled by default >diff --git a/Source/WebCore/layout/LayoutContext.cpp b/Source/WebCore/layout/LayoutContext.cpp >index c6b06a3aef3d78d017983b5cd4d4b915881eece1..bc0de8631d7c20da0861442b39aa618afdca73ff 100644 >--- a/Source/WebCore/layout/LayoutContext.cpp >+++ b/Source/WebCore/layout/LayoutContext.cpp >@@ -64,7 +64,7 @@ void LayoutContext::updateLayout() > > Display::Box& LayoutContext::createDisplayBox(const Box& layoutBox) > { >- std::unique_ptr<Display::Box> displayBox(new Display::Box(layoutBox.style().boxSizing())); >+ std::unique_ptr<Display::Box> displayBox(new Display::Box(layoutBox.style())); > auto* displayBoxPtr = displayBox.get(); > m_layoutToDisplayBox.add(&layoutBox, WTFMove(displayBox)); > return *displayBoxPtr; >diff --git a/Source/WebCore/layout/displaytree/DisplayBox.cpp b/Source/WebCore/layout/displaytree/DisplayBox.cpp >index 547ff7808d7a7b57afdf0afb60eb1f9281bfc568..eb97a0b31b6a9a2a34c6863a75d971c369b1d313 100644 >--- a/Source/WebCore/layout/displaytree/DisplayBox.cpp >+++ b/Source/WebCore/layout/displaytree/DisplayBox.cpp >@@ -28,6 +28,7 @@ > > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > >+#include "RenderStyle.h" > #include <wtf/IsoMallocInlines.h> > > namespace WebCore { >@@ -35,8 +36,8 @@ namespace Display { > > WTF_MAKE_ISO_ALLOCATED_IMPL(Box); > >-Box::Box(EBoxSizing boxSizing) >- : m_boxSizing(boxSizing) >+Box::Box(const RenderStyle& style) >+ : m_style(style) > { > } > >@@ -44,6 +45,12 @@ Box::~Box() > { > } > >+Box::Style::Style(const RenderStyle& style) >+ : boxSizing(style.boxSizing()) >+{ >+ >+} >+ > LayoutRect Box::marginBox() const > { > ASSERT(m_hasValidMargin); >@@ -59,7 +66,7 @@ LayoutRect Box::marginBox() const > > LayoutRect Box::borderBox() const > { >- if (m_boxSizing == BORDER_BOX) >+ if (m_style.boxSizing == BORDER_BOX) > return LayoutRect( { }, size()); > > // Width is content box. >@@ -85,7 +92,7 @@ LayoutRect Box::paddingBox() const > > LayoutRect Box::contentBox() const > { >- if (m_boxSizing == CONTENT_BOX) >+ if (m_style.boxSizing == CONTENT_BOX) > return LayoutRect(LayoutPoint(0, 0), size()); > > // Width is border box. >diff --git a/Source/WebCore/layout/displaytree/DisplayBox.h b/Source/WebCore/layout/displaytree/DisplayBox.h >index 1eb11366c081503b8f4d6dc77fc5682157265af0..83f8119e3dbafbb72dc723fa4dc13c041bfe86b7 100644 >--- a/Source/WebCore/layout/displaytree/DisplayBox.h >+++ b/Source/WebCore/layout/displaytree/DisplayBox.h >@@ -35,6 +35,8 @@ > > namespace WebCore { > >+class RenderStyle; >+ > namespace Layout { > class BlockFormattingContext; > class FormattingContext; >@@ -87,7 +89,13 @@ public: > LayoutRect contentBox() const; > > private: >- Box(EBoxSizing); >+ Box(const RenderStyle&); >+ >+ struct Style { >+ Style(const RenderStyle&); >+ >+ EBoxSizing boxSizing { CONTENT_BOX }; >+ }; > > void setRect(const LayoutRect&); > void setTopLeft(const LayoutPoint&); >@@ -125,6 +133,8 @@ private: > void setHasValidPadding(); > #endif > >+ const Style m_style; >+ > LayoutRect m_rect; > > LayoutUnit m_marginTop; >@@ -142,8 +152,6 @@ private: > LayoutUnit m_paddingBottom; > LayoutUnit m_paddingRight; > >- EBoxSizing m_boxSizing { CONTENT_BOX }; >- > #if !ASSERT_DISABLED > bool m_hasValidTop { false }; > bool m_hasValidLeft { false };
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 185733
: 340594