WebKit Bugzilla
Attachment 357440 Details for
Bug 192756
: [LFC][BFC][MarginCollapsing] BlockFormattingState should cache the maximum positive and negative margin values for margin collapsing.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192756-20181217080539.patch (text/plain), 2.54 KB, created by
zalan
on 2018-12-17 08:05:42 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-12-17 08:05:42 PST
Size:
2.54 KB
patch
obsolete
>Subversion Revision: 239264 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 05949be24b6755555509935ddeb5f9f31f963327..35b18d76f2c2a1bb7cf6c5600b67299d9dfcd9ad 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-12-17 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC][MarginCollapsing] BlockFormattingState should cache the maximum positive and negative margin values for margin collapsing. >+ https://bugs.webkit.org/show_bug.cgi?id=192756 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ https://www.w3.org/TR/CSS22/box.html#collapsing-margins >+ >+ "When two or more margins collapse, the resulting margin width is the maximum of the collapsing margins' widths. >+ In the case of negative margins, the maximum of the absolute values of the negative adjoining margins is deducted >+ from the maximum of the positive adjoining margins. If there are no positive margins, the maximum of the absolute >+ values of the adjoining margins is deducted from zero." >+ >+ * layout/blockformatting/BlockFormattingState.h: >+ (WebCore::Layout::BlockFormattingState::setPositiveAndNegativeVerticalMargin): >+ (WebCore::Layout::BlockFormattingState::positiveAndNegativeVerticalMargin const): >+ > 2018-12-15 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Null pointer dereference in JSC::WriteBarrierBase() >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingState.h b/Source/WebCore/layout/blockformatting/BlockFormattingState.h >index bb9669390ff9a2876fe714dc8544b01df6deaa84..87058d04d541c3163446afd84d28d2bce10c5af6 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingState.h >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingState.h >@@ -28,6 +28,7 @@ > #if ENABLE(LAYOUT_FORMATTING_CONTEXT) > > #include "FormattingState.h" >+#include "MarginTypes.h" > #include <wtf/IsoMalloc.h> > > namespace WebCore { >@@ -42,6 +43,12 @@ public: > virtual ~BlockFormattingState(); > > std::unique_ptr<FormattingContext> createFormattingContext(const Box& formattingContextRoot) override; >+ >+ void setPositiveAndNegativeVerticalMargin(const Box& layoutBox, PositiveAndNegativeVerticalMargin verticalMargin) { m_positiveAndNegativeVerticalMargin.set(&layoutBox, verticalMargin); } >+ PositiveAndNegativeVerticalMargin positiveAndNegativeVerticalMargin(const Box& layoutBox) const { return m_positiveAndNegativeVerticalMargin.get(&layoutBox); } >+ >+private: >+ HashMap<const Box*, PositiveAndNegativeVerticalMargin> m_positiveAndNegativeVerticalMargin; > }; > > }
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
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192756
: 357440