Index: Source/core/dom/RenderTreeBuilder.cpp |
diff --git a/Source/core/dom/RenderTreeBuilder.cpp b/Source/core/dom/RenderTreeBuilder.cpp |
index 7572603e73763b11ab81fd4bb3a7ae75ca1aa8b9..3c62d9c8f2ee4badc0bac4eb3384c37f6eb22d41 100644 |
--- a/Source/core/dom/RenderTreeBuilder.cpp |
+++ b/Source/core/dom/RenderTreeBuilder.cpp |
@@ -29,8 +29,10 @@ |
#include "core/HTMLNames.h" |
#include "core/SVGNames.h" |
#include "core/css/resolver/StyleResolver.h" |
+#include "core/dom/FirstLetterPseudoElement.h" |
#include "core/dom/Fullscreen.h" |
#include "core/dom/Node.h" |
+#include "core/dom/PseudoElement.h" |
#include "core/dom/Text.h" |
#include "core/rendering/RenderFullScreen.h" |
#include "core/rendering/RenderObject.h" |
@@ -54,6 +56,9 @@ RenderObject* RenderTreeBuilder::nextRenderer() const |
if (m_renderingParent->needsAttach()) |
Julien - ping for review
2014/10/09 18:24:48
You're checking m_renderingParent->needsAttach() f
dsinclair
2014/10/09 21:14:22
Are you saying this is an existing issue, or due t
Julien - ping for review
2014/10/10 14:47:07
I was confused by the logic actually and we have t
dsinclair
2014/10/10 18:06:53
Acknowledged.
|
return 0; |
+ if (element && element->isFirstLetterPseudoElement()) |
+ return FirstLetterPseudoElement::firstLetterTextRenderer(*element); |
Julien - ping for review
2014/10/09 18:24:48
If we keep the code in parentRenderer(), there is
dsinclair
2014/10/09 21:14:22
In what cases is there a top layer? Is this someth
Julien - ping for review
2014/10/10 14:47:07
top layer is a DOM Element API so it won't happen
dsinclair
2014/10/10 18:06:52
Code removed from parentRenderer().
|
+ |
return NodeRenderingTraversal::nextSiblingRenderer(m_node); |
} |
@@ -63,6 +68,11 @@ RenderObject* RenderTreeBuilder::parentRenderer() const |
Element* element = m_node->isElementNode() ? toElement(m_node) : 0; |
+ if (element && element->isFirstLetterPseudoElement()) { |
+ RenderObject* nextRenderer = FirstLetterPseudoElement::firstLetterTextRenderer(*element); |
+ return nextRenderer ? nextRenderer->parent() : nullptr; |
+ } |
+ |
if (element && m_renderingParent->renderer()) { |
// FIXME: Guarding this by m_renderingParent->renderer() isn't quite right as the spec for |
// top layer only talks about display: none ancestors so putting a <dialog> inside an |