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

Unified Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 427803002: DevTools: nits: introduce a handy asBool(bool*) and use across agents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/core/inspector/InspectorBaseAgent.h ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index 720a0330973e5034b9508b2cccbe768500ab528d..b3a99c40c161c70400d26413671e11ecb99c99ac 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -670,7 +670,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int no
matchedCSSRules = buildArrayForMatchedRuleList(matchedRules.get(), originalElement);
// Pseudo elements.
- if (!elementPseudoId && (!includePseudo || *includePseudo)) {
+ if (!elementPseudoId && asBool(includePseudo, true)) {
yurys 2014/07/29 13:48:05 Can we fix this place and get rid of defaultValue?
aandrey 2014/07/29 13:51:42 Done. Reverted.
RefPtr<TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches> > pseudoElements = TypeBuilder::Array<TypeBuilder::CSS::PseudoIdMatches>::create();
for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; pseudoId < AFTER_LAST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) {
RefPtrWillBeRawPtr<CSSRuleList> matchedRules = styleResolver.pseudoCSSRulesForElement(element, pseudoId, StyleResolver::AllCSSRules);
@@ -686,7 +686,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int no
}
// Inherited styles.
- if (!elementPseudoId && (!includeInherited || *includeInherited)) {
+ if (!elementPseudoId && asBool(includeInherited, true)) {
yurys 2014/07/29 13:48:05 ditto
RefPtr<TypeBuilder::Array<TypeBuilder::CSS::InheritedStyleEntry> > entries = TypeBuilder::Array<TypeBuilder::CSS::InheritedStyleEntry>::create();
Element* parentElement = element->parentElement();
while (parentElement) {
« no previous file with comments | « Source/core/inspector/InspectorBaseAgent.h ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698