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

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: moved ranges sorting so it also works for CSS ranges 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 ce69dadf739a77a20b97698f422c880f2e68eb6b..0d51bec7b22f34a1110f65883e8b20fad7173df1 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