Changeset 74260 in webkit
- Timestamp:
- Dec 17, 2010 6:39:13 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r74259 r74260 1 2010-12-17 Anton Muhin <antonm@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 [v8] The last portion of CSS GC work: fixing fast/dom/StyleSheet/gc-stylesheet-wrapper.html 6 https://bugs.webkit.org/show_bug.cgi?id=51121 7 8 Properly group style elements of HTML links, style elements and processing instructions. 9 10 * bindings/v8/V8GCController.cpp: 11 (WebCore::NodeGrouperVisitor::visitDOMWrapper): 12 (WebCore::NodeGrouperVisitor::addDOMObjectToGroup): 13 1 14 2010-12-17 Pavel Podivilov <podivilov@chromium.org> 2 15 -
trunk/WebCore/bindings/v8/V8GCController.cpp
r74106 r74260 51 51 #include "V8CSSStyleSheet.h" 52 52 #include "V8DOMMap.h" 53 #include "V8HTMLLinkElement.h" 54 #include "V8HTMLStyleElement.h" 53 55 #include "V8MessagePort.h" 56 #include "V8ProcessingInstruction.h" 54 57 #include "V8Proxy.h" 55 58 #include "V8StyleSheetList.h" … … 330 333 if (node->isStyledElement()) { 331 334 StyledElement* element = reinterpret_cast<StyledElement*>(node); 332 CSSStyleDeclaration* style = element->inlineStyleDecl(); 333 if (style) { 334 wrapper = store->domObjectMap().get(style); 335 if (!wrapper.IsEmpty()) 336 m_grouper.append(GrouperItem(groupId, wrapper)); 337 } 335 addDOMObjectToGroup(store, groupId, element->inlineStyleDecl()); 338 336 } 339 337 340 338 if (node->isDocumentNode()) { 341 339 Document* document = reinterpret_cast<Document*>(node); 342 wrapper = store->domObjectMap().get(document->styleSheets()); 343 if (!wrapper.IsEmpty()) 344 m_grouper.append(GrouperItem(groupId, wrapper)); 340 addDOMObjectToGroup(store, groupId, document->styleSheets()); 341 } 342 343 WrapperTypeInfo* typeInfo = V8DOMWrapper::domWrapperType(wrapper); 344 345 if (V8HTMLLinkElement::info.equals(typeInfo)) { 346 HTMLLinkElement* htmlLinkElement = static_cast<HTMLLinkElement*>(node); 347 addDOMObjectToGroup(store, groupId, htmlLinkElement->sheet()); 348 } 349 350 if (V8HTMLStyleElement::info.equals(typeInfo)) { 351 HTMLStyleElement* htmlStyleElement = static_cast<HTMLStyleElement*>(node); 352 addDOMObjectToGroup(store, groupId, htmlStyleElement->sheet()); 353 } 354 355 if (V8ProcessingInstruction::info.equals(typeInfo)) { 356 ProcessingInstruction* processingInstruction = static_cast<ProcessingInstruction*>(node); 357 addDOMObjectToGroup(store, groupId, processingInstruction->sheet()); 345 358 } 346 359 } … … 353 366 private: 354 367 GrouperList m_grouper; 368 369 void addDOMObjectToGroup(DOMDataStore* store, uintptr_t groupId, void* object) 370 { 371 if (!object) 372 return; 373 v8::Persistent<v8::Object> wrapper = store->domObjectMap().get(object); 374 if (!wrapper.IsEmpty()) 375 m_grouper.append(GrouperItem(groupId, wrapper)); 376 } 355 377 }; 356 378
Note: See TracChangeset
for help on using the changeset viewer.