https://bugs.webkit.org/show_bug.cgi?id=78257
Reviewed by Andreas Kling.
Clean up the PropertySetCSSStyleDeclaration refcounting. PropertySetCSSStyleDeclaration now
forwards the ref/deref to the underlying StylePropertySet.
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107407
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-09 Antti Koivisto <antti@apple.com>
+
+ Use underlying property set to refcount PropertySetCSSStyleDeclaration
+ https://bugs.webkit.org/show_bug.cgi?id=78257
+
+ Reviewed by Andreas Kling.
+
+ Clean up the PropertySetCSSStyleDeclaration refcounting. PropertySetCSSStyleDeclaration now
+ forwards the ref/deref to the underlying StylePropertySet.
+
+ 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-10 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [TextPrompt] TAB should complete suggestions up to their common prefix in Console
__ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKN3WTF6StringEb
__ZN7WebCore16ScriptController21processingUserGestureEv
__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
-__ZN7WebCore16StylePropertySet5derefEv
+__ZN7WebCore16StylePropertySetD1Ev
__ZN7WebCore16ThreadGlobalData10staticDataE
__ZN7WebCore16ThreadGlobalDataC1Ev
__ZN7WebCore16ThreadGlobalDataD1Ev
CSSComputedStyleDeclaration::CSSComputedStyleDeclaration(PassRefPtr<Node> n, bool allowVisitedStyle, const String& pseudoElementName)
: m_node(n)
, m_allowVisitedStyle(allowVisitedStyle)
+ , m_refCount(1)
{
unsigned nameWithoutColonsStart = pseudoElementName[0] == ':' ? (pseudoElementName[1] == ':' ? 2 : 1) : 0;
m_pseudoElementSpecifier = CSSSelector::pseudoId(CSSSelector::parsePseudoType(
{
}
+void CSSComputedStyleDeclaration::ref()
+{
+ ++m_refCount;
+}
+
+void CSSComputedStyleDeclaration::deref()
+{
+ ASSERT(m_refCount);
+ if (!--m_refCount)
+ delete this;
+}
+
String CSSComputedStyleDeclaration::cssText() const
{
String result("");
class CSSComputedStyleDeclaration : public CSSStyleDeclaration {
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;
RefPtr<Node> m_node;
PseudoId m_pseudoElementSpecifier;
bool m_allowVisitedStyle;
+ unsigned m_refCount;
};
-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
typedef int ExceptionCode;
-class CSSStyleDeclaration : public RefCounted<CSSStyleDeclaration> {
- WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration);
+class CSSStyleDeclaration {
+ WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED;
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;
virtual bool cssPropertyMatches(const CSSProperty*) const = 0;
virtual CSSStyleSheet* parentStyleSheet() const { return 0; }
-
+
#ifndef NDEBUG
void showStyle();
#endif
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;
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;
virtual PassRefPtr<StylePropertySet> copy() const OVERRIDE;
virtual PassRefPtr<StylePropertySet> makeMutable() OVERRIDE;
- RefPtr<StylePropertySet> m_propertySet;
+ StylePropertySet* m_propertySet;
};
namespace {
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
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();
}
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;
}
class PropertySetCSSStyleDeclaration;
class StyledElement;
-class StylePropertySet : public WTF::RefCountedBase {
+class StylePropertySet : public RefCounted<StylePropertySet> {
public:
~StylePropertySet();
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]; }
StyledElement* element;
} m_parent;
- mutable RefPtr<PropertySetCSSStyleDeclaration> m_cssStyleDeclaration;
+ mutable OwnPtr<PropertySetCSSStyleDeclaration> m_cssStyleDeclaration;
friend class PropertySetCSSStyleDeclaration;
};
Element* elem = element();
if (!elem)
return 0;
- return WebCore::computedStyle(elem);
+ return CSSComputedStyleDeclaration::create(elem);
}
Position Position::previous(PositionMoveType moveType) const
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;
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;
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;
}
if (!node)
return 0;
- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(node);
+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(node);
if (!style)
return 0;
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) {
{
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());
}
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();
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())
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)
// 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();
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);
}
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;
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;
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();
}
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
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)
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);
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()));
}
int propID = cssPropertyID(name);
- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element, true);
+ RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(m_element, true);
if (!propID || !style)
return QString();
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)
if (!webElement)
return res;
- RefPtr<WebCore::CSSComputedStyleDeclaration> computedStyleDeclaration = computedStyle(webElement, true);
+ RefPtr<WebCore::CSSComputedStyleDeclaration> computedStyleDeclaration = CSSComputedStyleDeclaration::create(webElement, true);
CSSStyleDeclaration* style = static_cast<WebCore::CSSStyleDeclaration*>(computedStyleDeclaration.get());
for (unsigned i = 0; i < style->length(); i++) {
QString name = style->item(i);
styleSheet += QString::fromLatin1(getPropertyName(property));
styleSheet += QLatin1Char(':');
- styleSheet += computedStyle(element)->getPropertyValue(property);
+ styleSheet += CSSComputedStyleDeclaration::create(element)->getPropertyValue(property);
styleSheet += QLatin1Char(';');
}
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()));