summaryrefslogtreecommitdiff
path: root/Source/WebCore/inspector/InspectorStyleSheet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/inspector/InspectorStyleSheet.cpp')
-rw-r--r--Source/WebCore/inspector/InspectorStyleSheet.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/Source/WebCore/inspector/InspectorStyleSheet.cpp b/Source/WebCore/inspector/InspectorStyleSheet.cpp
index cc3ccf8e6..5b94de6c1 100644
--- a/Source/WebCore/inspector/InspectorStyleSheet.cpp
+++ b/Source/WebCore/inspector/InspectorStyleSheet.cpp
@@ -497,8 +497,6 @@ PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::styleWithProperties() con
RefPtr<Array<TypeBuilder::CSS::ShorthandEntry> > shorthandEntries = Array<TypeBuilder::CSS::ShorthandEntry>::create();
HashMap<String, RefPtr<TypeBuilder::CSS::CSSProperty> > propertyNameToPreviousActiveProperty;
HashSet<String> foundShorthands;
- String previousPriority;
- String previousStatus;
for (Vector<InspectorStyleProperty>::iterator it = properties.begin(), itEnd = properties.end(); it != itEnd; ++it) {
const CSSPropertySourceData& propertyEntry = it->sourceData;
@@ -534,20 +532,11 @@ PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::styleWithProperties() con
String canonicalPropertyName = propertyId ? getPropertyNameString(propertyId) : name;
HashMap<String, RefPtr<TypeBuilder::CSS::CSSProperty> >::iterator activeIt = propertyNameToPreviousActiveProperty.find(canonicalPropertyName);
if (activeIt != propertyNameToPreviousActiveProperty.end()) {
- if (propertyEntry.parsedOk) {
- bool successPriority = activeIt->value->getString(TypeBuilder::CSS::CSSProperty::Priority, &previousPriority);
- bool successStatus = activeIt->value->getString(TypeBuilder::CSS::CSSProperty::Status, &previousStatus);
- if (successStatus && previousStatus != "inactive") {
- if (propertyEntry.important || !successPriority) // Priority not set == "not important".
- shouldInactivate = true;
- else if (status == TypeBuilder::CSS::CSSProperty::Status::Active) {
- // Inactivate a non-important property following the same-named important property.
- status = TypeBuilder::CSS::CSSProperty::Status::Inactive;
- }
- }
- } else {
+ if (propertyEntry.parsedOk)
+ shouldInactivate = true;
+ else {
bool previousParsedOk;
- bool success = activeIt->value->getBoolean(TypeBuilder::CSS::CSSProperty::ParsedOk, &previousParsedOk);
+ bool success = activeIt->second->getBoolean(TypeBuilder::CSS::CSSProperty::ParsedOk, &previousParsedOk);
if (success && !previousParsedOk)
shouldInactivate = true;
}
@@ -555,7 +544,7 @@ PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::styleWithProperties() con
propertyNameToPreviousActiveProperty.set(canonicalPropertyName, property);
if (shouldInactivate) {
- activeIt->value->setStatus(TypeBuilder::CSS::CSSProperty::Status::Inactive);
+ activeIt->second->setStatus(TypeBuilder::CSS::CSSProperty::Status::Inactive);
propertyNameToPreviousActiveProperty.set(canonicalPropertyName, property);
}
} else {
@@ -1068,7 +1057,7 @@ PassRefPtr<InspectorStyle> InspectorStyleSheet::inspectorStyleForId(const Inspec
RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(id, style, this);
return inspectorStyle.release();
}
- return it->value;
+ return it->second;
}
void InspectorStyleSheet::rememberInspectorStyle(RefPtr<InspectorStyle> inspectorStyle)