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

Unified Diff: third_party/WebKit/Source/core/style/ContentData.cpp

Issue 1812763002: Pseudo and non pseudo elements should return correct computed content value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/style/ContentData.cpp
diff --git a/third_party/WebKit/Source/core/style/ContentData.cpp b/third_party/WebKit/Source/core/style/ContentData.cpp
index 9d2c4969124bce50ecc307f2ee1a0c25dc89ac4a..c921af1aec461027f2c704dde0d9ff9b42844b3b 100644
--- a/third_party/WebKit/Source/core/style/ContentData.cpp
+++ b/third_party/WebKit/Source/core/style/ContentData.cpp
@@ -51,6 +51,11 @@ PassOwnPtrWillBeRawPtr<ContentData> ContentData::create(QuoteType quote)
return adoptPtrWillBeNoop(new QuoteContentData(quote));
}
+PassOwnPtrWillBeRawPtr<ContentData> ContentData::create(ElementContent elementContent)
+{
+ return adoptPtrWillBeNoop(new ElementContentContentData(elementContent));
+}
+
PassOwnPtrWillBeRawPtr<ContentData> ContentData::clone() const
{
OwnPtrWillBeRawPtr<ContentData> result = cloneInternal();
@@ -108,4 +113,11 @@ LayoutObject* QuoteContentData::createLayoutObject(Document& doc, ComputedStyle&
return layoutObject;
}
+LayoutObject* ElementContentContentData::createLayoutObject(Document& doc, ComputedStyle& pseudoStyle) const
+{
+ LayoutObject* layoutObject = LayoutInline::createAnonymous(&doc);
+ layoutObject->setPseudoStyle(&pseudoStyle);
+ return layoutObject;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698