WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patch
cssstyledeclaration-refcount-4.patch (text/plain), 25.70 KB, created by
Antti Koivisto
on 2012-02-09 15:13:08 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2012-02-09 15:13:08 PST
Size:
25.70 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 107295) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,54 @@ >+2012-02-09 Antti Koivisto <antti@apple.com> >+ >+ Use underlying property set to refcount StylePropertySetCSSStyleDeclaration >+ https://bugs.webkit.org/show_bug.cgi?id=78257 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Clean up the StylePropertySetCSSStyleDeclaration refcounting. >+ Also made CSSComputedStyleDeclaration construction use the standard create() pattern. >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::CSSComputedStyleDeclaration::ref): >+ (WebCore): >+ (WebCore::CSSComputedStyleDeclaration::deref): >+ * css/CSSComputedStyleDeclaration.h: >+ (WebCore::CSSComputedStyleDeclaration::create): >+ (CSSComputedStyleDeclaration): >+ (WebCore): >+ * css/CSSStyleDeclaration.h: >+ (CSSStyleDeclaration): >+ * css/StylePropertySet.cpp: >+ (WebCore::PropertySetCSSStyleDeclaration::PropertySetCSSStyleDeclaration): >+ (WebCore): >+ (WebCore::StylePropertySet::~StylePropertySet): >+ (WebCore::StylePropertySet::ensureCSSStyleDeclaration): >+ (WebCore::PropertySetCSSStyleDeclaration::makeMutable): >+ * css/StylePropertySet.h: >+ * editing/ApplyStyleCommand.cpp: >+ (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): >+ (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): >+ (WebCore::highestEmbeddingAncestor): >+ (WebCore::ApplyStyleCommand::computedFontSize): >+ * editing/EditingStyle.cpp: >+ (WebCore::EditingStyle::init): >+ (WebCore::EditingStyle::removeStyleAddedByNode): >+ (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode): >+ (WebCore::EditingStyle::triStateOfStyle): >+ (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): >+ (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): >+ (WebCore::backgroundColorInEffect): >+ * editing/Editor.cpp: >+ (WebCore::Editor::textDirectionForSelection): >+ * inspector/InspectorCSSAgent.cpp: >+ (WebCore::InspectorCSSAgent::getComputedStyleForNode): >+ * page/DOMWindow.cpp: >+ (WebCore::DOMWindow::getComputedStyle): >+ * svg/SVGAnimateElement.cpp: >+ (WebCore::getPropertyValue): >+ * svg/animation/SMILTimeContainer.cpp: >+ (WebCore::SMILTimeContainer::baseValueFor): >+ > 2012-02-09 John Bates <jbates@google.com> > > [Chromium] Add chromium-style tracing support >Index: Source/WebCore/WebCore.exp.in >=================================================================== >--- Source/WebCore/WebCore.exp.in (revision 107295) >+++ Source/WebCore/WebCore.exp.in (working copy) >@@ -519,7 +519,7 @@ __ZN7WebCore16ScriptController18windowSc > __ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKN3WTF6StringEb > __ZN7WebCore16ScriptController21processingUserGestureEv > __ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE >-__ZN7WebCore16StylePropertySet5derefEv >+__ZN7WebCore16StylePropertySetD1Ev > __ZN7WebCore16ThreadGlobalData10staticDataE > __ZN7WebCore16ThreadGlobalDataC1Ev > __ZN7WebCore16ThreadGlobalDataD1Ev >Index: Source/WebCore/css/CSSComputedStyleDeclaration.cpp >=================================================================== >--- Source/WebCore/css/CSSComputedStyleDeclaration.cpp (revision 107295) >+++ Source/WebCore/css/CSSComputedStyleDeclaration.cpp (working copy) >@@ -989,6 +989,17 @@ CSSComputedStyleDeclaration::~CSSCompute > { > } > >+void CSSComputedStyleDeclaration::ref() >+{ >+ RefCountedBase::ref(); >+} >+ >+void CSSComputedStyleDeclaration::deref() >+{ >+ if (derefBase()) >+ delete this; >+} >+ > String CSSComputedStyleDeclaration::cssText() const > { > String result(""); >Index: Source/WebCore/css/CSSComputedStyleDeclaration.h >=================================================================== >--- Source/WebCore/css/CSSComputedStyleDeclaration.h (revision 107295) >+++ Source/WebCore/css/CSSComputedStyleDeclaration.h (working copy) >@@ -45,11 +45,17 @@ class CustomFilterParameter; > > enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; > >-class CSSComputedStyleDeclaration : public CSSStyleDeclaration { >+class CSSComputedStyleDeclaration : public CSSStyleDeclaration, private WTF::RefCountedBase { > public: >- friend PassRefPtr<CSSComputedStyleDeclaration> computedStyle(PassRefPtr<Node>, bool allowVisitedStyle, const String& pseudoElementName); >+ static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoElementName = String()) >+ { >+ return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle, pseudoElementName)); >+ } > virtual ~CSSComputedStyleDeclaration(); > >+ virtual void ref() OVERRIDE; >+ virtual void deref() OVERRIDE; >+ > PassRefPtr<CSSValue> getPropertyCSSValue(int propertyID) const; > String getPropertyValue(int propertyID) const; > bool getPropertyPriority(int propertyID) const; >@@ -106,16 +112,13 @@ private: > PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const int* properties, size_t) const; > PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const int* properties) const; > >+ friend PassRefPtr<CSSComputedStyleDeclaration> WTF::adoptRef<CSSComputedStyleDeclaration>(CSSComputedStyleDeclaration*); >+ > RefPtr<Node> m_node; > PseudoId m_pseudoElementSpecifier; > bool m_allowVisitedStyle; > }; > >-inline PassRefPtr<CSSComputedStyleDeclaration> computedStyle(PassRefPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoElementName = String()) >-{ >- return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle, pseudoElementName)); >-} >- > } // namespace WebCore > > #endif // CSSComputedStyleDeclaration_h >Index: Source/WebCore/css/CSSStyleDeclaration.h >=================================================================== >--- Source/WebCore/css/CSSStyleDeclaration.h (revision 107295) >+++ Source/WebCore/css/CSSStyleDeclaration.h (working copy) >@@ -35,11 +35,14 @@ class StyledElement; > > typedef int ExceptionCode; > >-class CSSStyleDeclaration : public RefCounted<CSSStyleDeclaration> { >+class CSSStyleDeclaration { > WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); > public: > virtual ~CSSStyleDeclaration() { } > >+ virtual void ref() = 0; >+ virtual void deref() = 0; >+ > virtual CSSRule* parentRule() const = 0; > virtual String cssText() const = 0; > virtual void setCssText(const String&, ExceptionCode&) = 0; >@@ -64,7 +67,7 @@ public: > > virtual bool cssPropertyMatches(const CSSProperty*) const = 0; > virtual CSSStyleSheet* parentStyleSheet() const { return 0; } >- >+ > #ifndef NDEBUG > void showStyle(); > #endif >Index: Source/WebCore/css/StylePropertySet.cpp >=================================================================== >--- Source/WebCore/css/StylePropertySet.cpp (revision 107295) >+++ Source/WebCore/css/StylePropertySet.cpp (working copy) >@@ -47,17 +47,15 @@ namespace WebCore { > > class PropertySetCSSStyleDeclaration : public CSSStyleDeclaration { > public: >- static PassRefPtr<PropertySetCSSStyleDeclaration> create(PassRefPtr<StylePropertySet> propertySet) >- { >- return adoptRef(new PropertySetCSSStyleDeclaration(propertySet)); >- } >+ PropertySetCSSStyleDeclaration(StylePropertySet* propertySet) : m_propertySet(propertySet) { } > > private: >- PropertySetCSSStyleDeclaration(PassRefPtr<StylePropertySet> propertySet) : m_propertySet(propertySet) { } >- >+ virtual void ref() OVERRIDE { m_propertySet->ref(); } >+ virtual void deref() OVERRIDE { m_propertySet->deref(); } >+ > virtual CSSRule* parentRule() const OVERRIDE; > virtual unsigned length() const OVERRIDE; >- virtual String item(unsigned index) const; >+ virtual String item(unsigned index) const OVERRIDE; > virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName) OVERRIDE; > virtual String getPropertyValue(const String& propertyName) OVERRIDE; > virtual String getPropertyPriority(const String& propertyName) OVERRIDE; >@@ -66,7 +64,7 @@ private: > virtual void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&) OVERRIDE; > virtual String removeProperty(const String& propertyName, ExceptionCode&) OVERRIDE; > virtual String cssText() const OVERRIDE; >- virtual void setCssText(const String&, ExceptionCode&); >+ virtual void setCssText(const String&, ExceptionCode&) OVERRIDE; > virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) OVERRIDE; > virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; > virtual void setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) OVERRIDE; >@@ -76,7 +74,7 @@ private: > virtual PassRefPtr<StylePropertySet> copy() const OVERRIDE; > virtual PassRefPtr<StylePropertySet> makeMutable() OVERRIDE; > >- RefPtr<StylePropertySet> m_propertySet; >+ StylePropertySet* m_propertySet; > }; > > namespace { >@@ -228,18 +226,7 @@ StylePropertySet::StylePropertySet(Style > > StylePropertySet::~StylePropertySet() > { >-} >- >-void StylePropertySet::deref() >-{ >- if (derefBase()) { >- delete this; >- return; >- } >- // StylePropertySet and CSSStyleDeclaration ref each other. When we have a declaration and >- // our refcount drops to one we know it is the only thing keeping us alive. >- if (m_cssStyleDeclaration && hasOneRef()) >- m_cssStyleDeclaration.clear(); >+ > } > > CSSStyleSheet* StylePropertySet::contextStyleSheet() const >@@ -1130,7 +1117,7 @@ PassRefPtr<StylePropertySet> StyleProper > CSSStyleDeclaration* StylePropertySet::ensureCSSStyleDeclaration() const > { > if (!m_cssStyleDeclaration) >- m_cssStyleDeclaration = PropertySetCSSStyleDeclaration::create(const_cast<StylePropertySet*>(this)); >+ m_cssStyleDeclaration = adoptPtr(new PropertySetCSSStyleDeclaration(const_cast<StylePropertySet*>(this))); > return m_cssStyleDeclaration.get(); > } > >@@ -1253,9 +1240,6 @@ PassRefPtr<StylePropertySet> PropertySet > > PassRefPtr<StylePropertySet> PropertySetCSSStyleDeclaration::makeMutable() > { >- ASSERT(m_propertySet->m_cssStyleDeclaration == this || (!m_propertySet->m_cssStyleDeclaration && m_propertySet->hasOneRef())); >- if (!m_propertySet->m_cssStyleDeclaration) >- m_propertySet->m_cssStyleDeclaration = this; > return m_propertySet; > } > >Index: Source/WebCore/css/StylePropertySet.h >=================================================================== >--- Source/WebCore/css/StylePropertySet.h (revision 107295) >+++ Source/WebCore/css/StylePropertySet.h (working copy) >@@ -34,7 +34,7 @@ namespace WebCore { > class PropertySetCSSStyleDeclaration; > class StyledElement; > >-class StylePropertySet : public WTF::RefCountedBase { >+class StylePropertySet : public RefCounted<StylePropertySet> { > public: > ~StylePropertySet(); > >@@ -63,8 +63,6 @@ public: > return adoptRef(new StylePropertySet(element, /*isInlineStyle*/ false)); > } > >- void deref(); >- > unsigned propertyCount() const { return m_properties.size(); } > bool isEmpty() const { return m_properties.isEmpty(); } > const CSSProperty& propertyAt(unsigned index) const { return m_properties[index]; } >@@ -169,7 +167,7 @@ private: > StyledElement* element; > } m_parent; > >- mutable RefPtr<PropertySetCSSStyleDeclaration> m_cssStyleDeclaration; >+ mutable OwnPtr<PropertySetCSSStyleDeclaration> m_cssStyleDeclaration; > > friend class PropertySetCSSStyleDeclaration; > }; >Index: Source/WebCore/dom/Position.cpp >=================================================================== >--- Source/WebCore/dom/Position.cpp (revision 107295) >+++ Source/WebCore/dom/Position.cpp (working copy) >@@ -283,7 +283,7 @@ PassRefPtr<CSSComputedStyleDeclaration> > Element* elem = element(); > if (!elem) > return 0; >- return WebCore::computedStyle(elem); >+ return CSSComputedStyleDeclaration::create(elem); > } > > Position Position::previous(PositionMoveType moveType) const >Index: Source/WebCore/editing/ApplyStyleCommand.cpp >=================================================================== >--- Source/WebCore/editing/ApplyStyleCommand.cpp (revision 107295) >+++ Source/WebCore/editing/ApplyStyleCommand.cpp (working copy) >@@ -444,7 +444,7 @@ HTMLElement* ApplyStyleCommand::splitAnc > Node* nextHighestAncestorWithUnicodeBidi = 0; > int highestAncestorUnicodeBidi = 0; > for (Node* n = node->parentNode(); n != block; n = n->parentNode()) { >- int unicodeBidi = getIdentifierValue(computedStyle(n).get(), CSSPropertyUnicodeBidi); >+ int unicodeBidi = getIdentifierValue(CSSComputedStyleDeclaration::create(n).get(), CSSPropertyUnicodeBidi); > if (unicodeBidi && unicodeBidi != CSSValueNormal) { > highestAncestorUnicodeBidi = unicodeBidi; > nextHighestAncestorWithUnicodeBidi = highestAncestorWithUnicodeBidi; >@@ -496,7 +496,7 @@ void ApplyStyleCommand::removeEmbeddingU > continue; > > StyledElement* element = static_cast<StyledElement*>(n); >- int unicodeBidi = getIdentifierValue(computedStyle(element).get(), CSSPropertyUnicodeBidi); >+ int unicodeBidi = getIdentifierValue(CSSComputedStyleDeclaration::create(element).get(), CSSPropertyUnicodeBidi); > if (!unicodeBidi || unicodeBidi == CSSValueNormal) > continue; > >@@ -522,7 +522,7 @@ void ApplyStyleCommand::removeEmbeddingU > static Node* highestEmbeddingAncestor(Node* startNode, Node* enclosingNode) > { > for (Node* n = startNode; n && n != enclosingNode; n = n->parentNode()) { >- if (n->isHTMLElement() && getIdentifierValue(computedStyle(n).get(), CSSPropertyUnicodeBidi) == CSSValueEmbed) >+ if (n->isHTMLElement() && getIdentifierValue(CSSComputedStyleDeclaration::create(n).get(), CSSPropertyUnicodeBidi) == CSSValueEmbed) > return n; > } > >@@ -1410,7 +1410,7 @@ float ApplyStyleCommand::computedFontSiz > if (!node) > return 0; > >- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(node); >+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(node); > if (!style) > return 0; > >Index: Source/WebCore/editing/EditingStyle.cpp >=================================================================== >--- Source/WebCore/editing/EditingStyle.cpp (revision 107295) >+++ Source/WebCore/editing/EditingStyle.cpp (working copy) >@@ -378,7 +378,7 @@ void EditingStyle::init(Node* node, Prop > else if (isTabSpanNode(node)) > node = node->parentNode(); > >- RefPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = computedStyle(node); >+ RefPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = CSSComputedStyleDeclaration::create(node); > m_mutableStyle = propertiesToInclude == AllProperties && computedStyleAtPosition ? computedStyleAtPosition->copy() : editingStyleFromComputedStyle(computedStyleAtPosition); > > if (propertiesToInclude == EditingPropertiesInEffect) { >@@ -558,8 +558,8 @@ void EditingStyle::removeStyleAddedByNod > { > if (!node || !node->parentNode()) > return; >- RefPtr<StylePropertySet> parentStyle = editingStyleFromComputedStyle(computedStyle(node->parentNode()), AllEditingProperties); >- RefPtr<StylePropertySet> nodeStyle = editingStyleFromComputedStyle(computedStyle(node), AllEditingProperties); >+ RefPtr<StylePropertySet> parentStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node->parentNode()), AllEditingProperties); >+ RefPtr<StylePropertySet> nodeStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node), AllEditingProperties); > nodeStyle->removeEquivalentProperties(parentStyle->ensureCSSStyleDeclaration()); > m_mutableStyle->removeEquivalentProperties(nodeStyle->ensureCSSStyleDeclaration()); > } >@@ -569,8 +569,8 @@ void EditingStyle::removeStyleConflictin > if (!node || !node->parentNode() || !m_mutableStyle) > return; > >- RefPtr<StylePropertySet> parentStyle = editingStyleFromComputedStyle(computedStyle(node->parentNode()), AllEditingProperties); >- RefPtr<StylePropertySet> nodeStyle = editingStyleFromComputedStyle(computedStyle(node), AllEditingProperties); >+ RefPtr<StylePropertySet> parentStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node->parentNode()), AllEditingProperties); >+ RefPtr<StylePropertySet> nodeStyle = editingStyleFromComputedStyle(CSSComputedStyleDeclaration::create(node), AllEditingProperties); > nodeStyle->removeEquivalentProperties(parentStyle->ensureCSSStyleDeclaration()); > > unsigned propertyCount = nodeStyle->propertyCount(); >@@ -641,7 +641,7 @@ TriState EditingStyle::triStateOfStyle(c > > TriState state = FalseTriState; > for (Node* node = selection.start().deprecatedNode(); node; node = node->traverseNextNode()) { >- RefPtr<CSSComputedStyleDeclaration> nodeStyle = computedStyle(node); >+ RefPtr<CSSComputedStyleDeclaration> nodeStyle = CSSComputedStyleDeclaration::create(node); > if (nodeStyle) { > TriState nodeState = triStateOfStyle(nodeStyle.get(), node->isTextNode() ? EditingStyle::DoNotIgnoreTextOnlyProperties : EditingStyle::IgnoreTextOnlyProperties); > if (node == selection.start().deprecatedNode()) >@@ -813,7 +813,7 @@ bool EditingStyle::extractConflictingImp > > bool EditingStyle::styleIsPresentInComputedStyleOfNode(Node* node) const > { >- return !m_mutableStyle || getPropertiesNotIn(m_mutableStyle.get(), computedStyle(node).get())->isEmpty(); >+ return !m_mutableStyle || getPropertiesNotIn(m_mutableStyle.get(), CSSComputedStyleDeclaration::create(node).get())->isEmpty(); > } > > bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const HTMLElement* element) >@@ -1061,7 +1061,7 @@ void EditingStyle::mergeStyleFromRulesFo > // The property value, if it's a percentage, may not reflect the actual computed value. > // For example: style="height: 1%; overflow: visible;" in quirksmode > // FIXME: There are others like this, see <rdar://problem/5195123> Slashdot copy/paste fidelity problem >- RefPtr<CSSComputedStyleDeclaration> computedStyleForElement = computedStyle(element); >+ RefPtr<CSSComputedStyleDeclaration> computedStyleForElement = CSSComputedStyleDeclaration::create(element); > RefPtr<StylePropertySet> fromComputedStyle = StylePropertySet::create(); > { > unsigned propertyCount = m_mutableStyle->propertyCount(); >@@ -1487,7 +1487,7 @@ bool hasTransparentBackgroundColor(Style > PassRefPtr<CSSValue> backgroundColorInEffect(Node* node) > { > for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { >- RefPtr<CSSComputedStyleDeclaration> ancestorStyle = computedStyle(ancestor); >+ RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDeclaration::create(ancestor); > if (!hasTransparentBackgroundColor(ancestorStyle.get())) > return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor); > } >Index: Source/WebCore/editing/Editor.cpp >=================================================================== >--- Source/WebCore/editing/Editor.cpp (revision 107295) >+++ Source/WebCore/editing/Editor.cpp (working copy) >@@ -521,7 +521,7 @@ WritingDirection Editor::textDirectionFo > if (!n->isStyledElement()) > continue; > >- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(n); >+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(n); > RefPtr<CSSValue> unicodeBidi = style->getPropertyCSSValue(CSSPropertyUnicodeBidi); > if (!unicodeBidi || !unicodeBidi->isPrimitiveValue()) > continue; >@@ -551,7 +551,7 @@ WritingDirection Editor::textDirectionFo > if (!node->isStyledElement()) > continue; > >- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(node); >+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(node); > RefPtr<CSSValue> unicodeBidi = style->getPropertyCSSValue(CSSPropertyUnicodeBidi); > if (!unicodeBidi || !unicodeBidi->isPrimitiveValue()) > continue; >Index: Source/WebCore/inspector/InspectorCSSAgent.cpp >=================================================================== >--- Source/WebCore/inspector/InspectorCSSAgent.cpp (revision 107295) >+++ Source/WebCore/inspector/InspectorCSSAgent.cpp (working copy) >@@ -559,7 +559,7 @@ void InspectorCSSAgent::getComputedStyle > > recalcStyleForPseudoStateIfNeeded(element, forcedPseudoClasses ? forcedPseudoClasses->get() : 0); > >- RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = computedStyle(element, true); >+ RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(element, true); > RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), computedStyleInfo, 0); > style = inspectorStyle->buildArrayForComputedStyle(); > } >Index: Source/WebCore/page/DOMWindow.cpp >=================================================================== >--- Source/WebCore/page/DOMWindow.cpp (revision 107295) >+++ Source/WebCore/page/DOMWindow.cpp (working copy) >@@ -1321,7 +1321,7 @@ PassRefPtr<CSSStyleDeclaration> DOMWindo > if (!elt) > return 0; > >- return computedStyle(elt, false, pseudoElt); >+ return CSSComputedStyleDeclaration::create(elt, false, pseudoElt); > } > > PassRefPtr<CSSRuleList> DOMWindow::getMatchedCSSRules(Element* element, const String& pseudoElement, bool authorOnly) const >Index: Source/WebCore/svg/SVGAnimateElement.cpp >=================================================================== >--- Source/WebCore/svg/SVGAnimateElement.cpp (revision 107295) >+++ Source/WebCore/svg/SVGAnimateElement.cpp (working copy) >@@ -59,7 +59,7 @@ SVGAnimateElement::~SVGAnimateElement() > static inline void getPropertyValue(SVGElement* svgParent, const QualifiedName& attributeName, String& value) > { > ASSERT(svgParent->isStyled()); >- value = computedStyle(svgParent)->getPropertyValue(cssPropertyID(attributeName.localName())); >+ value = CSSComputedStyleDeclaration::create(svgParent)->getPropertyValue(cssPropertyID(attributeName.localName())); > } > > static bool inheritsFromProperty(SVGElement* targetElement, const QualifiedName& attributeName, const String& value) >Index: Source/WebCore/svg/animation/SMILTimeContainer.cpp >=================================================================== >--- Source/WebCore/svg/animation/SMILTimeContainer.cpp (revision 107295) >+++ Source/WebCore/svg/animation/SMILTimeContainer.cpp (working copy) >@@ -221,7 +221,7 @@ String SMILTimeContainer::baseValueFor(E > ASSERT(attributeName != anyQName()); > String baseValue; > if (SVGAnimationElement::isTargetAttributeCSSProperty(targetElement, attributeName)) >- baseValue = computedStyle(targetElement)->getPropertyValue(cssPropertyID(attributeName.localName())); >+ baseValue = CSSComputedStyleDeclaration::create(targetElement)->getPropertyValue(cssPropertyID(attributeName.localName())); > else > baseValue = targetElement->getAttribute(attributeName); > m_savedBaseValues.add(key, baseValue); >Index: Source/WebKit2/WebProcess/WebPage/WebFrame.cpp >=================================================================== >--- Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (revision 107295) >+++ Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (working copy) >@@ -650,7 +650,7 @@ JSValueRef WebFrame::computedStyleInclud > if (!toJS(element)->inherits(&JSElement::s_info)) > return JSValueMakeUndefined(toRef(exec)); > >- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(static_cast<JSElement*>(toJS(element))->impl(), true); >+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(static_cast<JSElement*>(toJS(element))->impl(), true); > > JSLock lock(SilenceAssertionsOnly); > return toRef(exec, toJS(exec, globalObject, style.get())); >Index: Source/WebKit/mac/WebView/WebView.mm >=================================================================== >--- Source/WebKit/mac/WebView/WebView.mm (revision 107295) >+++ Source/WebKit/mac/WebView/WebView.mm (working copy) >@@ -6414,7 +6414,7 @@ - (JSValueRef)_computedStyleIncludingVis > return JSValueMakeUndefined(context); > JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue)); > Element* element = jsElement->impl(); >- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(element, true); >+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true); > return toRef(exec, toJS(exec, jsElement->globalObject(), style.get())); > } > >Index: Source/WebKit/qt/Api/qwebelement.cpp >=================================================================== >--- Source/WebKit/qt/Api/qwebelement.cpp (revision 107295) >+++ Source/WebKit/qt/Api/qwebelement.cpp (working copy) >@@ -882,7 +882,7 @@ QString QWebElement::styleProperty(const > > int propID = cssPropertyID(name); > >- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element, true); >+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(m_element, true); > if (!propID || !style) > return QString(); > >Index: Source/WebKit/qt/Api/qwebpage.cpp >=================================================================== >--- Source/WebKit/qt/Api/qwebpage.cpp (revision 107295) >+++ Source/WebKit/qt/Api/qwebpage.cpp (working copy) >@@ -1566,7 +1566,7 @@ static bool isClickableElement(Element* > ExceptionCode ec = 0; > return isClickable > || element->webkitMatchesSelector("a,*:link,*:visited,*[role=button],button,input,select,label", ec) >- || computedStyle(element)->getPropertyValue(cssPropertyID("cursor")) == "pointer"; >+ || CSSComputedStyleDeclaration::create(element)->getPropertyValue(cssPropertyID("cursor")) == "pointer"; > } > > static bool isValidFrameOwner(Element* element)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
webkit-ews
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 78257
:
126383
|
126402
|
126444
|
126525