Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutQuote.cpp

Issue 2727853002: [css-display] Support display: contents pseudo-elements.
Patch Set: Add missing nullcheck (whoops). Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutQuote.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutQuote.cpp b/third_party/WebKit/Source/core/layout/LayoutQuote.cpp
index 9322b7de3d930096a82e1ad1e52c0f722f5b0708..cc02db432560d6fd293f50633e5cbeecf1fad553 100644
--- a/third_party/WebKit/Source/core/layout/LayoutQuote.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutQuote.cpp
@@ -30,14 +30,15 @@
namespace blink {
-LayoutQuote::LayoutQuote(Document* node, QuoteType quote)
+LayoutQuote::LayoutQuote(PseudoElement& node, QuoteType quote)
: LayoutInline(nullptr),
m_type(quote),
m_depth(0),
m_next(nullptr),
m_previous(nullptr),
- m_attached(false) {
- setDocumentForAnonymous(node);
+ m_attached(false),
+ m_owningPseudo(&node) {
+ setPseudoForAnonymous(node);
}
LayoutQuote::~LayoutQuote() {
@@ -264,7 +265,8 @@ void LayoutQuote::updateText() {
fragment->setStyle(mutableStyle());
fragment->setContentString(m_text.impl());
} else {
- fragment = new LayoutTextFragment(&document(), m_text.impl());
+ fragment =
+ LayoutTextFragment::createAnonymous(*m_owningPseudo, m_text.impl());
fragment->setStyle(mutableStyle());
addChild(fragment);
}

Powered by Google App Engine
This is Rietveld 408576698