summaryrefslogtreecommitdiffstats
path: root/webkit/port/bindings
diff options
context:
space:
mode:
authorager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 06:03:07 +0000
committerager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 06:03:07 +0000
commit6f5fa554915482b3735c2486b5b4d36da48c1680 (patch)
tree6a85b8647a79d744084fc941229c49ae3e240873 /webkit/port/bindings
parent404bd8475209d386f8e0eefd62e05c388765032d (diff)
downloadchromium_src-6f5fa554915482b3735c2486b5b4d36da48c1680.zip
chromium_src-6f5fa554915482b3735c2486b5b4d36da48c1680.tar.gz
chromium_src-6f5fa554915482b3735c2486b5b4d36da48c1680.tar.bz2
Wrappers for inline style declarations disappeared on GC. Fix the
issue by adding the style declaration wrappers to the object groups of the elements they belong to. Review URL: http://codereview.chromium.org/100204 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings')
-rw-r--r--webkit/port/bindings/v8/v8_proxy.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp
index 07da396..9180dc9 100644
--- a/webkit/port/bindings/v8/v8_proxy.cpp
+++ b/webkit/port/bindings/v8/v8_proxy.cpp
@@ -456,10 +456,23 @@ ACTIVE_DOM_OBJECT_TYPES(MAKE_CASE)
Vector<v8::Persistent<v8::Value> > group;
group.reserveCapacity(next_key_index - i);
for (; i < next_key_index; ++i) {
+ Node* node = grouper[i].second;
v8::Persistent<v8::Value> wrapper =
- getDOMNodeMap().get(grouper[i].second);
+ getDOMNodeMap().get(node);
if (!wrapper.IsEmpty())
group.append(wrapper);
+ // If the node is styled and there is a wrapper for the inline
+ // style declaration, we need to keep that style declaration
+ // wrapper alive as well, so we add it to the object group.
+ if (node->isStyledElement()) {
+ StyledElement* element = reinterpret_cast<StyledElement*>(node);
+ CSSStyleDeclaration* style = element->inlineStyleDecl();
+ if (style != NULL) {
+ wrapper = getDOMObjectMap().get(style);
+ if (!wrapper.IsEmpty())
+ group.append(wrapper);
+ }
+ }
}
if (group.size() > 1)