[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
antonm at chromium.org
antonm at chromium.org
Wed Dec 22 18:45:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 58ca85ac91f4c5e71e68186e9513e63551bd6835
Author: antonm at chromium.org <antonm at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 17 14:39:13 2010 +0000
2010-12-17 Anton Muhin <antonm at chromium.org>
Reviewed by Yury Semikhatsky.
[v8] The last portion of CSS GC work: fixing fast/dom/StyleSheet/gc-stylesheet-wrapper.html
https://bugs.webkit.org/show_bug.cgi?id=51121
Properly group style elements of HTML links, style elements and processing instructions.
* bindings/v8/V8GCController.cpp:
(WebCore::NodeGrouperVisitor::visitDOMWrapper):
(WebCore::NodeGrouperVisitor::addDOMObjectToGroup):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fee0299..75d8de1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-17 Anton Muhin <antonm at chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ [v8] The last portion of CSS GC work: fixing fast/dom/StyleSheet/gc-stylesheet-wrapper.html
+ https://bugs.webkit.org/show_bug.cgi?id=51121
+
+ Properly group style elements of HTML links, style elements and processing instructions.
+
+ * bindings/v8/V8GCController.cpp:
+ (WebCore::NodeGrouperVisitor::visitDOMWrapper):
+ (WebCore::NodeGrouperVisitor::addDOMObjectToGroup):
+
2010-12-17 Pavel Podivilov <podivilov at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/bindings/v8/V8GCController.cpp b/WebCore/bindings/v8/V8GCController.cpp
index 596fc79..c8d3dd3 100644
--- a/WebCore/bindings/v8/V8GCController.cpp
+++ b/WebCore/bindings/v8/V8GCController.cpp
@@ -50,7 +50,10 @@
#include "V8CSSStyleRule.h"
#include "V8CSSStyleSheet.h"
#include "V8DOMMap.h"
+#include "V8HTMLLinkElement.h"
+#include "V8HTMLStyleElement.h"
#include "V8MessagePort.h"
+#include "V8ProcessingInstruction.h"
#include "V8Proxy.h"
#include "V8StyleSheetList.h"
#include "WrapperTypeInfo.h"
@@ -329,19 +332,29 @@ public:
// 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) {
- wrapper = store->domObjectMap().get(style);
- if (!wrapper.IsEmpty())
- m_grouper.append(GrouperItem(groupId, wrapper));
- }
+ addDOMObjectToGroup(store, groupId, element->inlineStyleDecl());
}
if (node->isDocumentNode()) {
Document* document = reinterpret_cast<Document*>(node);
- wrapper = store->domObjectMap().get(document->styleSheets());
- if (!wrapper.IsEmpty())
- m_grouper.append(GrouperItem(groupId, wrapper));
+ addDOMObjectToGroup(store, groupId, document->styleSheets());
+ }
+
+ WrapperTypeInfo* typeInfo = V8DOMWrapper::domWrapperType(wrapper);
+
+ if (V8HTMLLinkElement::info.equals(typeInfo)) {
+ HTMLLinkElement* htmlLinkElement = static_cast<HTMLLinkElement*>(node);
+ addDOMObjectToGroup(store, groupId, htmlLinkElement->sheet());
+ }
+
+ if (V8HTMLStyleElement::info.equals(typeInfo)) {
+ HTMLStyleElement* htmlStyleElement = static_cast<HTMLStyleElement*>(node);
+ addDOMObjectToGroup(store, groupId, htmlStyleElement->sheet());
+ }
+
+ if (V8ProcessingInstruction::info.equals(typeInfo)) {
+ ProcessingInstruction* processingInstruction = static_cast<ProcessingInstruction*>(node);
+ addDOMObjectToGroup(store, groupId, processingInstruction->sheet());
}
}
@@ -352,6 +365,15 @@ public:
private:
GrouperList m_grouper;
+
+ void addDOMObjectToGroup(DOMDataStore* store, uintptr_t groupId, void* object)
+ {
+ if (!object)
+ return;
+ v8::Persistent<v8::Object> wrapper = store->domObjectMap().get(object);
+ if (!wrapper.IsEmpty())
+ m_grouper.append(GrouperItem(groupId, wrapper));
+ }
};
class DOMObjectGrouperVisitor : public DOMWrapperMap<void>::Visitor {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list