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

Unified Diff: sky/engine/core/css/CSSStyleSheet.cpp

Issue 799073004: Remove dead code from StyleSheetContents and CSSStyleSheet. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/CSSStyleSheet.h ('k') | sky/engine/core/css/CSSTestHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/CSSStyleSheet.cpp
diff --git a/sky/engine/core/css/CSSStyleSheet.cpp b/sky/engine/core/css/CSSStyleSheet.cpp
index 55e964d983426ee0572f5873c6155d41e367be8d..4f9e166d555b651c12b68b04e9f76a1d24ce6e7b 100644
--- a/sky/engine/core/css/CSSStyleSheet.cpp
+++ b/sky/engine/core/css/CSSStyleSheet.cpp
@@ -43,33 +43,22 @@ static bool isAcceptableCSSStyleSheetParent(Node* parentNode)
}
#endif
-PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(PassRefPtr<StyleSheetContents> sheet, Node* ownerNode, const TextPosition& startPosition)
+PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtr<StyleSheetContents> sheet, Node* ownerNode)
{
ASSERT(sheet);
- return adoptRef(new CSSStyleSheet(sheet, ownerNode, true, startPosition));
+ return adoptRef(new CSSStyleSheet(sheet, ownerNode));
}
-PassRefPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node* ownerNode, const KURL& baseURL, const TextPosition& startPosition)
+PassRefPtr<CSSStyleSheet> CSSStyleSheet::create(Node* ownerNode, const KURL& baseURL)
{
CSSParserContext parserContext(ownerNode->document(), 0, baseURL);
- RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.string(), parserContext);
- return adoptRef(new CSSStyleSheet(sheet.release(), ownerNode, true, startPosition));
+ RefPtr<StyleSheetContents> sheet = StyleSheetContents::create(parserContext);
+ return adoptRef(new CSSStyleSheet(sheet.release(), ownerNode));
}
-CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents)
+CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents, Node* ownerNode)
: m_contents(contents)
- , m_isInlineStylesheet(false)
- , m_ownerNode(nullptr)
- , m_startPosition(TextPosition::minimumPosition())
-{
- m_contents->registerClient(this);
-}
-
-CSSStyleSheet::CSSStyleSheet(PassRefPtr<StyleSheetContents> contents, Node* ownerNode, bool isInlineStylesheet, const TextPosition& startPosition)
- : m_contents(contents)
- , m_isInlineStylesheet(isInlineStylesheet)
, m_ownerNode(ownerNode)
- , m_startPosition(startPosition)
{
ASSERT(isAcceptableCSSStyleSheetParent(ownerNode));
m_contents->registerClient(this);
@@ -102,11 +91,6 @@ void CSSStyleSheet::clearOwnerNode()
m_ownerNode = nullptr;
}
-KURL CSSStyleSheet::baseURL() const
-{
- return m_contents->baseURL();
-}
-
Document* CSSStyleSheet::ownerDocument() const
{
return ownerNode() ? &ownerNode()->document() : 0;
« no previous file with comments | « sky/engine/core/css/CSSStyleSheet.h ('k') | sky/engine/core/css/CSSTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698