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

Unified Diff: Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 717933002: Clean up after getPropertyCSSValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase / fix debug compile? Created 6 years, 1 month 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/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/RGBColor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/PropertySetCSSStyleDeclaration.cpp
diff --git a/Source/core/css/PropertySetCSSStyleDeclaration.cpp b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
index 3a3f4aa1e30b96e1d2adbdcb77509ec974a1170c..364da1d5518edf66e49beb5f2dda0bde7ba35256 100644
--- a/Source/core/css/PropertySetCSSStyleDeclaration.cpp
+++ b/Source/core/css/PropertySetCSSStyleDeclaration.cpp
@@ -172,14 +172,6 @@ void AbstractPropertySetCSSStyleDeclaration::setCSSText(const String& text, Exce
mutationScope.enqueueMutationRecord();
}
-PassRefPtrWillBeRawPtr<CSSValue> AbstractPropertySetCSSStyleDeclaration::getPropertyCSSValue(const String& propertyName)
-{
- CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (!propertyID)
- return nullptr;
- return cloneAndCacheForCSSOM(propertySet().getPropertyCSSValue(propertyID).get());
-}
-
String AbstractPropertySetCSSStyleDeclaration::getPropertyValue(const String &propertyName)
{
CSSPropertyID propertyID = cssPropertyID(propertyName);
@@ -270,22 +262,6 @@ void AbstractPropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID p
mutationScope.enqueueMutationRecord();
}
-CSSValue* AbstractPropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM(CSSValue* internalValue)
-{
- if (!internalValue)
- return 0;
-
- // The map is here to maintain the object identity of the CSSValues over multiple invocations.
- // FIXME: It is likely that the identity is not important for web compatibility and this code should be removed.
- if (!m_cssomCSSValueClones)
- m_cssomCSSValueClones = adoptPtrWillBeNoop(new WillBeHeapHashMap<RawPtrWillBeMember<CSSValue>, RefPtrWillBeMember<CSSValue> >);
-
- RefPtrWillBeMember<CSSValue>& clonedValue = m_cssomCSSValueClones->add(internalValue, RefPtrWillBeMember<CSSValue>()).storedValue->value;
- if (!clonedValue)
- clonedValue = internalValue->cloneForCSSOM();
- return clonedValue.get();
-}
-
StyleSheetContents* AbstractPropertySetCSSStyleDeclaration::contextStyleSheet() const
{
CSSStyleSheet* cssStyleSheet = parentStyleSheet();
@@ -304,9 +280,6 @@ bool AbstractPropertySetCSSStyleDeclaration::cssPropertyMatches(CSSPropertyID pr
void AbstractPropertySetCSSStyleDeclaration::trace(Visitor* visitor)
{
-#if ENABLE(OILPAN)
- visitor->trace(m_cssomCSSValueClones);
-#endif
CSSStyleDeclaration::trace(visitor);
}
@@ -351,9 +324,6 @@ void StyleRuleCSSStyleDeclaration::willMutate()
void StyleRuleCSSStyleDeclaration::didMutate(MutationType type)
{
- if (type == PropertyChanged)
- m_cssomCSSValueClones.clear();
-
// Style sheet mutation needs to be signaled even if the change failed. willMutateRules/didMutateRules must pair.
if (m_parentRule && m_parentRule->parentStyleSheet())
m_parentRule->parentStyleSheet()->didMutateRules();
@@ -391,8 +361,6 @@ void InlineCSSStyleDeclaration::didMutate(MutationType type)
if (type == NoChanges)
return;
- m_cssomCSSValueClones.clear();
-
if (!m_parentElement)
return;
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.h ('k') | Source/core/css/RGBColor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698