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

Unified Diff: Source/core/inspector/InspectorStyleSheet.h

Issue 198053011: DevTools: [CSS] remove StyleId and RuleId types from protocol.json (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline Created 6 years, 9 months 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: Source/core/inspector/InspectorStyleSheet.h
diff --git a/Source/core/inspector/InspectorStyleSheet.h b/Source/core/inspector/InspectorStyleSheet.h
index 80577b2cbce44cbe02955cb0c4983120eb2c8929..fb05a13471c805dfe7d7916dd8271064df1bec70 100644
--- a/Source/core/inspector/InspectorStyleSheet.h
+++ b/Source/core/inspector/InspectorStyleSheet.h
@@ -62,16 +62,6 @@ public:
{
}
- explicit InspectorCSSId(PassRefPtr<JSONObject> value)
- {
- if (!value->getString("styleSheetId", &m_styleSheetId))
- return;
-
- RefPtr<JSONValue> ordinalValue = value->get("ordinal");
- if (!ordinalValue || !ordinalValue->asNumber(&m_ordinal))
- m_styleSheetId = "";
- }
-
InspectorCSSId(const String& styleSheetId, unsigned ordinal)
: m_styleSheetId(styleSheetId)
, m_ordinal(ordinal)
@@ -83,19 +73,6 @@ public:
const String& styleSheetId() const { return m_styleSheetId; }
unsigned ordinal() const { return m_ordinal; }
- // ID type is either TypeBuilder::CSS::CSSStyleId or TypeBuilder::CSS::CSSRuleId.
- template<typename ID>
- PassRefPtr<ID> asProtocolValue() const
- {
- if (isEmpty())
- return nullptr;
-
- RefPtr<ID> result = ID::create()
- .setStyleSheetId(m_styleSheetId)
- .setOrdinal(m_ordinal);
- return result.release();
- }
-
private:
String m_styleSheetId;
unsigned m_ordinal;

Powered by Google App Engine
This is Rietveld 408576698