Title: [97605] trunk/Source/WebCore
- Revision
- 97605
- Author
- andreas.kl...@nokia.com
- Date
- 2011-10-17 04:38:55 -0700 (Mon, 17 Oct 2011)
Log Message
CSS/XSLStyleSheet: Remove insert() and remove().
https://bugs.webkit.org/show_bug.cgi?id=70226
Reviewed by Antti Koivisto.
Remove insert() and remove() from XSLStyleSheet. CSSStyleSheet retains remove()
since it's used by InspectorStyleSheet as well as SVGFontFaceElement.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::remove):
Remove range check. This method is internal to WebKit and the call sites
already take care of it.
(WebCore::CSSStyleSheet::insertRule):
(WebCore::CSSStyleSheet::deleteRule):
* css/CSSStyleSheet.h:
* xml/XSLStyleSheet.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (97604 => 97605)
--- trunk/Source/WebCore/ChangeLog 2011-10-17 11:16:30 UTC (rev 97604)
+++ trunk/Source/WebCore/ChangeLog 2011-10-17 11:38:55 UTC (rev 97605)
@@ -1,3 +1,24 @@
+2011-10-17 Andreas Kling <kl...@webkit.org>
+
+ CSS/XSLStyleSheet: Remove insert() and remove().
+ https://bugs.webkit.org/show_bug.cgi?id=70226
+
+ Reviewed by Antti Koivisto.
+
+ Remove insert() and remove() from XSLStyleSheet. CSSStyleSheet retains remove()
+ since it's used by InspectorStyleSheet as well as SVGFontFaceElement.
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::remove):
+
+ Remove range check. This method is internal to WebKit and the call sites
+ already take care of it.
+
+ (WebCore::CSSStyleSheet::insertRule):
+ (WebCore::CSSStyleSheet::deleteRule):
+ * css/CSSStyleSheet.h:
+ * xml/XSLStyleSheet.h:
+
2011-10-17 Rosen Dash <rosen.d...@motorola.com>
when CSS pseudo selectors are applied (:before and :after) the *-of-line keyboard navigation does not work
Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (97604 => 97605)
--- trunk/Source/WebCore/css/CSSStyleSheet.cpp 2011-10-17 11:16:30 UTC (rev 97604)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp 2011-10-17 11:38:55 UTC (rev 97605)
@@ -101,20 +101,8 @@
c->insertedIntoParent();
}
-void CSSStyleSheet::insert(unsigned index, PassRefPtr<CSSRule> child)
-{
- CSSRule* c = child.get();
- if (index >= length())
- m_children.append(child);
- else
- m_children.insert(index, child);
- c->insertedIntoParent();
-}
-
void CSSStyleSheet::remove(unsigned index)
{
- if (index >= length())
- return;
m_children.remove(index);
}
@@ -156,7 +144,9 @@
}
}
- insert(index, r.release());
+ CSSRule* c = r.get();
+ m_children.insert(index, r.release());
+ c->insertedIntoParent();
styleSheetChanged();
@@ -193,7 +183,7 @@
ec = 0;
item(index)->setParent(0);
- remove(index);
+ m_children.remove(index);
styleSheetChanged();
}
Modified: trunk/Source/WebCore/css/CSSStyleSheet.h (97604 => 97605)
--- trunk/Source/WebCore/css/CSSStyleSheet.h 2011-10-17 11:16:30 UTC (rev 97604)
+++ trunk/Source/WebCore/css/CSSStyleSheet.h 2011-10-17 11:38:55 UTC (rev 97605)
@@ -106,7 +106,6 @@
bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
void append(PassRefPtr<CSSRule>);
- void insert(unsigned index, PassRefPtr<CSSRule>);
void remove(unsigned index);
unsigned length() const { return m_children.size(); }
Modified: trunk/Source/WebCore/xml/XSLStyleSheet.h (97604 => 97605)
--- trunk/Source/WebCore/xml/XSLStyleSheet.h 2011-10-17 11:16:30 UTC (rev 97604)
+++ trunk/Source/WebCore/xml/XSLStyleSheet.h 2011-10-17 11:38:55 UTC (rev 97605)
@@ -107,23 +107,6 @@
c->insertedIntoParent();
}
- void insert(unsigned index, PassRefPtr<StyleBase> child)
- {
- StyleBase* c = child.get();
- if (index >= length())
- m_children.append(child);
- else
- m_children.insert(index, child);
- c->insertedIntoParent();
- }
-
- void remove(unsigned index)
- {
- if (index >= length())
- return;
- m_children.remove(index);
- }
-
XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded);
#if !USE(QXMLQUERY)
XSLStyleSheet(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes