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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp

Issue 2759703003: DevTools: add support for polling for coverage data in CSS agent (Closed)
Patch Set: Created 3 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: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
index d7210ff78e2e763b56439d8dbd55ea98b71068cc..542676fbf300406622d1710d6e8a16ab80e3f7dd 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
@@ -1514,10 +1514,6 @@ static bool canBind(const String& origin) {
std::unique_ptr<protocol::CSS::CSSRule>
InspectorStyleSheet::buildObjectForRuleWithoutMedia(CSSStyleRule* rule) {
- CSSStyleSheet* styleSheet = pageStyleSheet();
- if (!styleSheet)
- return nullptr;
-
std::unique_ptr<protocol::CSS::CSSRule> result =
protocol::CSS::CSSRule::create()
.setSelectorList(buildObjectForSelectorList(rule))
@@ -1535,10 +1531,6 @@ InspectorStyleSheet::buildObjectForRuleWithoutMedia(CSSStyleRule* rule) {
std::unique_ptr<protocol::CSS::RuleUsage>
InspectorStyleSheet::buildObjectForRuleUsage(CSSRule* rule, bool wasUsed) {
- CSSStyleSheet* styleSheet = pageStyleSheet();
- if (!styleSheet)
- return nullptr;
-
CSSRuleSourceData* sourceData = sourceDataForRule(rule);
if (!sourceData)
@@ -1559,10 +1551,6 @@ InspectorStyleSheet::buildObjectForRuleUsage(CSSRule* rule, bool wasUsed) {
std::unique_ptr<protocol::CSS::CSSKeyframeRule>
InspectorStyleSheet::buildObjectForKeyframeRule(CSSKeyframeRule* keyframeRule) {
- CSSStyleSheet* styleSheet = pageStyleSheet();
- if (!styleSheet)
- return nullptr;
-
std::unique_ptr<protocol::CSS::Value> keyText =
protocol::CSS::Value::create().setText(keyframeRule->keyText()).build();
CSSRuleSourceData* sourceData = sourceDataForRule(keyframeRule);
@@ -1759,7 +1747,6 @@ CSSRuleSourceData* InspectorStyleSheet::sourceDataForRule(CSSRule* rule) {
CSSRule* parsedRule = m_parsedFlatRules.at(it->value);
if (canonicalCSSText(rule) != canonicalCSSText(parsedRule))
return nullptr;
-
return m_sourceData->at(it->value).get();
}

Powered by Google App Engine
This is Rietveld 408576698