Title: [102152] trunk/Source/WebCore
- Revision
- 102152
- Author
- [email protected]
- Date
- 2011-12-06 10:19:38 -0800 (Tue, 06 Dec 2011)
Log Message
MediaList: Remove constructor that takes a CSSImportRule*.
<http://webkit.org/b/73833>
Reviewed by Antti Koivisto.
* css/MediaList.h:
* css/MediaList.cpp:
Remove MediaList(CSSImportRule*, ...) constructor.
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::CSSImportRule):
Have CSSImportRule construct its MediaList by passing the parent
style sheet, which is exactly what the old constructor accomplished.
Also assert that we're always created with a non-null parent sheet.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102151 => 102152)
--- trunk/Source/WebCore/ChangeLog 2011-12-06 17:59:49 UTC (rev 102151)
+++ trunk/Source/WebCore/ChangeLog 2011-12-06 18:19:38 UTC (rev 102152)
@@ -1,3 +1,22 @@
+2011-12-06 Andreas Kling <[email protected]>
+
+ MediaList: Remove constructor that takes a CSSImportRule*.
+ <http://webkit.org/b/73833>
+
+ Reviewed by Antti Koivisto.
+
+ * css/MediaList.h:
+ * css/MediaList.cpp:
+
+ Remove MediaList(CSSImportRule*, ...) constructor.
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::CSSImportRule):
+
+ Have CSSImportRule construct its MediaList by passing the parent
+ style sheet, which is exactly what the old constructor accomplished.
+ Also assert that we're always created with a non-null parent sheet.
+
2011-12-06 Jarred Nicholls <[email protected]>
getComputedStyle returns wrong value for margin-*
Modified: trunk/Source/WebCore/css/CSSImportRule.cpp (102151 => 102152)
--- trunk/Source/WebCore/css/CSSImportRule.cpp 2011-12-06 17:59:49 UTC (rev 102151)
+++ trunk/Source/WebCore/css/CSSImportRule.cpp 2011-12-06 18:19:38 UTC (rev 102152)
@@ -39,10 +39,11 @@
, m_cachedSheet(0)
, m_loading(false)
{
+ ASSERT(parent);
if (m_lstMedia)
m_lstMedia->setParentStyleSheet(parent);
else
- m_lstMedia = MediaList::create(this, String());
+ m_lstMedia = MediaList::create(parent, String());
}
CSSImportRule::~CSSImportRule()
Modified: trunk/Source/WebCore/css/MediaList.cpp (102151 => 102152)
--- trunk/Source/WebCore/css/MediaList.cpp 2011-12-06 17:59:49 UTC (rev 102151)
+++ trunk/Source/WebCore/css/MediaList.cpp 2011-12-06 18:19:38 UTC (rev 102152)
@@ -83,17 +83,6 @@
setMediaText("invalid", ec);
}
-MediaList::MediaList(CSSImportRule* parentRule, const String& media)
- : m_fallback(false)
- , m_parentStyleSheet(parentRule->parentStyleSheet())
- , m_lastLine(0)
-{
- ExceptionCode ec = 0;
- setMediaText(media, ec);
- if (ec)
- setMediaText("invalid", ec);
-}
-
MediaList::~MediaList()
{
deleteAllValues(m_queries);
Modified: trunk/Source/WebCore/css/MediaList.h (102151 => 102152)
--- trunk/Source/WebCore/css/MediaList.h 2011-12-06 17:59:49 UTC (rev 102151)
+++ trunk/Source/WebCore/css/MediaList.h 2011-12-06 18:19:38 UTC (rev 102152)
@@ -41,10 +41,6 @@
{
return adoptRef(new MediaList(0, false));
}
- static PassRefPtr<MediaList> create(CSSImportRule* parentRule, const String& media)
- {
- return adoptRef(new MediaList(parentRule, media));
- }
static PassRefPtr<MediaList> create(CSSStyleSheet* parentSheet, const String& media)
{
return adoptRef(new MediaList(parentSheet, media, false));
@@ -91,7 +87,6 @@
private:
MediaList(CSSStyleSheet* parentSheet, bool fallbackToDescription);
MediaList(CSSStyleSheet* parentSheet, const String& media, bool fallbackToDescription);
- MediaList(CSSImportRule* parentRule, const String& media);
void notifyChanged();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes