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

Unified Diff: sky/engine/core/rendering/style/RenderStyle.cpp

Issue 709213002: Remove ContentData. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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: sky/engine/core/rendering/style/RenderStyle.cpp
diff --git a/sky/engine/core/rendering/style/RenderStyle.cpp b/sky/engine/core/rendering/style/RenderStyle.cpp
index b43167aa92e8c16212aba11670206c3aab67f25f..6faf8c9e8b7475b1ba43a314a6bb526d6ff48deb 100644
--- a/sky/engine/core/rendering/style/RenderStyle.cpp
+++ b/sky/engine/core/rendering/style/RenderStyle.cpp
@@ -27,7 +27,6 @@
#include "core/css/resolver/StyleResolver.h"
#include "core/rendering/RenderTheme.h"
#include "core/rendering/style/AppliedTextDecoration.h"
-#include "core/rendering/style/ContentData.h"
#include "core/rendering/style/DataEquivalency.h"
#include "core/rendering/style/QuotesData.h"
#include "core/rendering/style/ShadowList.h"
@@ -147,7 +146,6 @@ StyleRecalcChange RenderStyle::stylePropagationDiff(const RenderStyle* oldStyle,
return NoChange;
if (oldStyle->display() != newStyle->display()
- || !oldStyle->contentDataEquivalent(newStyle)
|| oldStyle->justifyItems() != newStyle->justifyItems()
|| oldStyle->alignItems() != newStyle->alignItems())
return Reattach;
@@ -562,61 +560,6 @@ void RenderStyle::clearCursorList()
rareInheritedData.access()->cursorData = nullptr;
}
-void RenderStyle::clearContent()
-{
- if (rareNonInheritedData->m_content)
- rareNonInheritedData.access()->m_content = nullptr;
-}
-
-void RenderStyle::appendContent(PassOwnPtr<ContentData> contentData)
-{
- OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content;
- ContentData* lastContent = content.get();
- while (lastContent && lastContent->next())
- lastContent = lastContent->next();
-
- if (lastContent)
- lastContent->setNext(contentData);
- else
- content = contentData;
-}
-
-void RenderStyle::setContent(PassRefPtr<StyleImage> image, bool add)
-{
- if (!image)
- return;
-
- if (add) {
- appendContent(ContentData::create(image));
- return;
- }
-
- rareNonInheritedData.access()->m_content = ContentData::create(image);
-}
-
-void RenderStyle::setContent(const String& string, bool add)
-{
- OwnPtr<ContentData>& content = rareNonInheritedData.access()->m_content;
- if (add) {
- ContentData* lastContent = content.get();
- while (lastContent && lastContent->next())
- lastContent = lastContent->next();
-
- if (lastContent) {
- // We attempt to merge with the last ContentData if possible.
- if (lastContent->isText()) {
- TextContentData* textContent = toTextContentData(lastContent);
- textContent->setText(textContent->text() + string);
- } else
- lastContent->setNext(ContentData::create(string));
-
- return;
- }
- }
-
- content = ContentData::create(string);
-}
-
WebBlendMode RenderStyle::blendMode() const
{
if (RuntimeEnabledFeatures::cssCompositingEnabled())
« no previous file with comments | « sky/engine/core/rendering/style/RenderStyle.h ('k') | sky/engine/core/rendering/style/StyleRareNonInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698