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

Unified Diff: Source/core/css/CSSStyleSheet.cpp

Issue 63883004: Make second argument to CSSStyleSheet.insertRule() optional again (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 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
« no previous file with comments | « Source/core/css/CSSStyleSheet.h ('k') | Source/core/css/CSSStyleSheet.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSStyleSheet.cpp
diff --git a/Source/core/css/CSSStyleSheet.cpp b/Source/core/css/CSSStyleSheet.cpp
index 971b21f8b3f038adbe1a394c5125c4f6fae70019..d8b3bef962f1598041c26f6a8822865f0af39c5a 100644
--- a/Source/core/css/CSSStyleSheet.cpp
+++ b/Source/core/css/CSSStyleSheet.cpp
@@ -35,6 +35,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/Node.h"
+#include "core/frame/UseCounter.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/text/StringBuilder.h"
@@ -320,6 +321,12 @@ unsigned CSSStyleSheet::insertRule(const String& ruleString, unsigned index, Exc
return index;
}
+unsigned CSSStyleSheet::insertRule(const String& rule, ExceptionState& exceptionState)
+{
+ UseCounter::countDeprecation(activeExecutionContext(), UseCounter::CSSStyleSheetInsertRuleOptionalArg);
+ return insertRule(rule, 0, exceptionState);
+}
+
void CSSStyleSheet::deleteRule(unsigned index, ExceptionState& exceptionState)
{
ASSERT(m_childRuleCSSOMWrappers.isEmpty() || m_childRuleCSSOMWrappers.size() == m_contents->ruleCount());
« no previous file with comments | « Source/core/css/CSSStyleSheet.h ('k') | Source/core/css/CSSStyleSheet.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698