Title: [231017] trunk/Source/WebCore
- Revision
- 231017
- Author
- [email protected]
- Date
- 2018-04-25 13:35:39 -0700 (Wed, 25 Apr 2018)
Log Message
[LFC] Implement Layout::BlockContainer functions.
https://bugs.webkit.org/show_bug.cgi?id=184994
Reviewed by Antti Koivisto.
* layout/layouttree/LayoutBlockContainer.cpp:
(WebCore::Layout::BlockContainer::BlockContainer):
(WebCore::Layout::BlockContainer::establishesInlineFormattingContext const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231016 => 231017)
--- trunk/Source/WebCore/ChangeLog 2018-04-25 20:34:40 UTC (rev 231016)
+++ trunk/Source/WebCore/ChangeLog 2018-04-25 20:35:39 UTC (rev 231017)
@@ -1,5 +1,16 @@
2018-04-25 Zalan Bujtas <[email protected]>
+ [LFC] Implement Layout::BlockContainer functions.
+ https://bugs.webkit.org/show_bug.cgi?id=184994
+
+ Reviewed by Antti Koivisto.
+
+ * layout/layouttree/LayoutBlockContainer.cpp:
+ (WebCore::Layout::BlockContainer::BlockContainer):
+ (WebCore::Layout::BlockContainer::establishesInlineFormattingContext const):
+
+2018-04-25 Zalan Bujtas <[email protected]>
+
[LFC] Implement Layout::Container functions.
https://bugs.webkit.org/show_bug.cgi?id=184988
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp (231016 => 231017)
--- trunk/Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp 2018-04-25 20:34:40 UTC (rev 231016)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp 2018-04-25 20:35:39 UTC (rev 231017)
@@ -25,3 +25,34 @@
#include "config.h"
#include "LayoutBlockContainer.h"
+
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+
+#include "RenderStyle.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+namespace Layout {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(BlockContainer);
+
+BlockContainer::BlockContainer(RenderStyle&& style)
+ : Container(WTFMove(style))
+{
+}
+
+bool BlockContainer::establishesInlineFormattingContext() const
+{
+ // 9.4.2 Inline formatting contexts
+ // An inline formatting context is established by a block container box that contains no block-level boxes.
+ for (auto* child = firstInFlowChild(); child; child = child->nextInFlowSibling()) {
+ if (child->isBlockLevelBox())
+ return false;
+ }
+ return hasInFlowOrFloatingChild();
+}
+
+}
+}
+
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes