SVN commit 1046451 by ggarand:
make sure the considered style declaration is inline before mirroring it to
the |style| attribute.
we don't want that to apply to non-inline stylesheet rules.
BUG: 207282
M +4 -2 css/css_valueimpl.cpp
M +2 -1 xml/dom_elementimpl.cpp
M +2 -2 xml/dom_elementimpl.h
--- trunk/KDE/kdelibs/khtml/css/css_valueimpl.cpp #1046450:1046451
@@ -684,8 +684,10 @@
void CSSStyleDeclarationImpl::setChanged()
{
if (m_node) {
- if (m_node->nodeType() == Node::ELEMENT_NODE)
- static_cast<ElementImpl*>(m_node)->synchronizeStyleAttribute(cssText());
+ if (m_node->nodeType() == Node::ELEMENT_NODE && (static_cast<ElementImpl*>(m_node)->inlineStyleDecls() == this)) {
+ // FIXME: potentially costly...
+ static_cast<ElementImpl*>(m_node)->synchronizeStyleAttribute();
+ }
m_node->setChanged();
return;
}
--- trunk/KDE/kdelibs/khtml/xml/dom_elementimpl.cpp #1046450:1046451
@@ -1354,8 +1354,9 @@
document()->setFocusNode(this);
}
-void ElementImpl::synchronizeStyleAttribute(const DOMString& value)
+void ElementImpl::synchronizeStyleAttribute()
{
+ DOMString value = getInlineStyleDecls()->cssText();
attributes()->setValueWithoutElementUpdate(ATTR_STYLE, value.implementation());
}
--- trunk/KDE/kdelibs/khtml/xml/dom_elementimpl.h #1046450:1046451
@@ -345,8 +345,8 @@
//Called when mapping from id to this node in document should be added
virtual void addId (const DOMString& id);
- // Synchronize style attribute after it was changed via CSS DOM (html5)
- void synchronizeStyleAttribute(const DOMString& value);
+ // Synchronize style attribute after it was changed via CSSOM
+ void synchronizeStyleAttribute();
protected:
void createAttributeMap() const;
_______________________________________________
Khtml-cvs mailing list
Khtml-cvs@...
https://mail.kde.org/mailman/listinfo/khtml-cvs