| Index: Source/core/dom/LayoutTreeBuilder.cpp
|
| diff --git a/Source/core/dom/LayoutTreeBuilder.cpp b/Source/core/dom/LayoutTreeBuilder.cpp
|
| index dd350812811ee8ebd7b0c38e49d254f11c2d25ab..61c925bd2a5c326f3dce7569bcc2ccb56cfc927c 100644
|
| --- a/Source/core/dom/LayoutTreeBuilder.cpp
|
| +++ b/Source/core/dom/LayoutTreeBuilder.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "core/css/resolver/StyleResolver.h"
|
| #include "core/dom/FirstLetterPseudoElement.h"
|
| #include "core/dom/Fullscreen.h"
|
| +#include "core/dom/MarkerPseudoElement.h"
|
| #include "core/dom/Node.h"
|
| #include "core/dom/PseudoElement.h"
|
| #include "core/dom/Text.h"
|
| @@ -67,6 +68,13 @@ LayoutObject* LayoutTreeBuilderForElement::nextLayoutObject() const
|
| if (m_node->isFirstLetterPseudoElement())
|
| return FirstLetterPseudoElement::firstLetterTextRenderer(*m_node);
|
|
|
| + if (m_node->isMarkerPseudoElement()) {
|
| + LayoutObject* parentLayoutObject = this->parentLayoutObject();
|
| + ASSERT(parentLayoutObject);
|
| +
|
| + return MarkerPseudoElement::firstNonMarkerChild(parentLayoutObject);
|
| + }
|
| +
|
| return LayoutTreeBuilder::nextLayoutObject();
|
| }
|
|
|
| @@ -74,8 +82,13 @@ LayoutObject* LayoutTreeBuilderForElement::parentLayoutObject() const
|
| {
|
| LayoutObject* parentLayoutObject = LayoutTreeBuilder::parentLayoutObject();
|
|
|
| + if (m_node->isMarkerPseudoElement()) {
|
| + if (LayoutObject* markerLayoutObject = MarkerPseudoElement::parentOfFirstLineBox(m_layoutObjectParent, nullptr))
|
| + return markerLayoutObject;
|
| + }
|
| +
|
| if (parentLayoutObject) {
|
| - // FIXME: Guarding this by parentLayoutObject isn't quite right as the spec for
|
| + // FIXME: Guarding this by parentRenderer isn't quite right as the spec for
|
| // top layer only talks about display: none ancestors so putting a <dialog> inside an
|
| // <optgroup> seems like it should still work even though this check will prevent it.
|
| if (m_node->isInTopLayer())
|
| @@ -105,6 +118,9 @@ bool LayoutTreeBuilderForElement::shouldCreateLayoutObject() const
|
| if (!parentLayoutObject->canHaveChildren())
|
| return false;
|
|
|
| + if (m_node->isMarkerPseudoElement())
|
| + return true;
|
| +
|
| return m_node->layoutObjectIsNeeded(style());
|
| }
|
|
|
|
|