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

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

Issue 2754653002: Cleanup anonymous text objects that pass the document as a node. (Closed)
Patch Set: Cleanup anonymous text objects that pass the document as a node. 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..a939e24087b96cff554e50267a97128ffd820344 100644
--- a/third_party/WebKit/Source/core/layout/LayoutQuote.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutQuote.cpp
@@ -21,6 +21,7 @@
#include "core/layout/LayoutQuote.h"
+#include "core/dom/PseudoElement.h"
#include "core/layout/LayoutTextFragment.h"
#include "core/layout/LayoutView.h"
#include "wtf/StdLibExtras.h"
@@ -30,14 +31,15 @@
namespace blink {
-LayoutQuote::LayoutQuote(Document* node, QuoteType quote)
+LayoutQuote::LayoutQuote(PseudoElement& pseudo, QuoteType quote)
: LayoutInline(nullptr),
m_type(quote),
m_depth(0),
m_next(nullptr),
m_previous(nullptr),
+ m_owningPseudo(&pseudo),
m_attached(false) {
- setDocumentForAnonymous(node);
+ setDocumentForAnonymous(&pseudo.document());
}
LayoutQuote::~LayoutQuote() {
@@ -264,7 +266,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);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutQuote.h ('k') | third_party/WebKit/Source/core/layout/LayoutText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698