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

Unified Diff: third_party/WebKit/Source/core/style/ContentData.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
« no previous file with comments | « third_party/WebKit/Source/core/style/ContentData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ContentData.cpp
diff --git a/third_party/WebKit/Source/core/style/ContentData.cpp b/third_party/WebKit/Source/core/style/ContentData.cpp
index 13149fddd1ac13b5133b610303916c9f0255e2c8..693594ce33c375e91ada3b29e30539104556ef5f 100644
--- a/third_party/WebKit/Source/core/style/ContentData.cpp
+++ b/third_party/WebKit/Source/core/style/ContentData.cpp
@@ -22,6 +22,8 @@
#include "core/style/ContentData.h"
+#include <memory>
+#include "core/dom/PseudoElement.h"
#include "core/layout/LayoutCounter.h"
#include "core/layout/LayoutImage.h"
#include "core/layout/LayoutImageResource.h"
@@ -29,7 +31,6 @@
#include "core/layout/LayoutQuote.h"
#include "core/layout/LayoutTextFragment.h"
#include "core/style/ComputedStyle.h"
-#include <memory>
namespace blink {
@@ -68,9 +69,9 @@ DEFINE_TRACE(ContentData) {
}
LayoutObject* ImageContentData::createLayoutObject(
- Document& doc,
+ PseudoElement& pseudo,
ComputedStyle& pseudoStyle) const {
- LayoutImage* image = LayoutImage::createAnonymous(&doc);
+ LayoutImage* image = LayoutImage::createAnonymous(pseudo);
image->setPseudoStyle(&pseudoStyle);
if (m_image)
image->setImageResource(
@@ -86,25 +87,26 @@ DEFINE_TRACE(ImageContentData) {
}
LayoutObject* TextContentData::createLayoutObject(
- Document& doc,
+ PseudoElement& pseudo,
ComputedStyle& pseudoStyle) const {
- LayoutObject* layoutObject = new LayoutTextFragment(&doc, m_text.impl());
+ LayoutObject* layoutObject =
+ LayoutTextFragment::createAnonymous(pseudo, m_text.impl());
layoutObject->setPseudoStyle(&pseudoStyle);
return layoutObject;
}
LayoutObject* CounterContentData::createLayoutObject(
- Document& doc,
+ PseudoElement& pseudo,
ComputedStyle& pseudoStyle) const {
- LayoutObject* layoutObject = new LayoutCounter(&doc, *m_counter);
+ LayoutObject* layoutObject = new LayoutCounter(pseudo, *m_counter);
layoutObject->setPseudoStyle(&pseudoStyle);
return layoutObject;
}
LayoutObject* QuoteContentData::createLayoutObject(
- Document& doc,
+ PseudoElement& pseudo,
ComputedStyle& pseudoStyle) const {
- LayoutObject* layoutObject = new LayoutQuote(&doc, m_quote);
+ LayoutObject* layoutObject = new LayoutQuote(pseudo, m_quote);
layoutObject->setPseudoStyle(&pseudoStyle);
return layoutObject;
}
« no previous file with comments | « third_party/WebKit/Source/core/style/ContentData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698