Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 , m_writeRecursionDepth(0) | 472 , m_writeRecursionDepth(0) |
| 473 , m_taskRunner(MainThreadTaskRunner::create(this)) | 473 , m_taskRunner(MainThreadTaskRunner::create(this)) |
| 474 , m_registrationContext(initializer.registrationContext(this)) | 474 , m_registrationContext(initializer.registrationContext(this)) |
| 475 , m_elementDataCacheClearTimer(this, &Document::elementDataCacheClearTimerFi red) | 475 , m_elementDataCacheClearTimer(this, &Document::elementDataCacheClearTimerFi red) |
| 476 #ifndef NDEBUG | 476 #ifndef NDEBUG |
| 477 , m_didDispatchViewportPropertiesChanged(false) | 477 , m_didDispatchViewportPropertiesChanged(false) |
| 478 #endif | 478 #endif |
| 479 , m_animationClock(AnimationClock::create()) | 479 , m_animationClock(AnimationClock::create()) |
| 480 , m_timeline(DocumentTimeline::create(this)) | 480 , m_timeline(DocumentTimeline::create(this)) |
| 481 , m_transitionTimeline(TransitionTimeline::create(this)) | 481 , m_transitionTimeline(TransitionTimeline::create(this)) |
| 482 , m_templateDocumentHost(0) | 482 , m_templateDocumentHost(nullptr) |
| 483 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired) | 483 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired) |
| 484 , m_hasViewportUnits(false) | 484 , m_hasViewportUnits(false) |
| 485 , m_styleRecalcElementCounter(0) | 485 , m_styleRecalcElementCounter(0) |
| 486 { | 486 { |
| 487 setClient(this); | 487 setClient(this); |
| 488 ScriptWrappable::init(this); | 488 ScriptWrappable::init(this); |
| 489 | 489 |
| 490 if (m_frame) { | 490 if (m_frame) { |
| 491 ASSERT(m_frame->page()); | 491 ASSERT(m_frame->page()); |
| 492 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); | 492 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 527 ASSERT(!renderView()); | 527 ASSERT(!renderView()); |
| 528 ASSERT(m_ranges.isEmpty()); | 528 ASSERT(m_ranges.isEmpty()); |
| 529 ASSERT(!parentTreeScope()); | 529 ASSERT(!parentTreeScope()); |
| 530 #if !ENABLE(OILPAN) | 530 #if !ENABLE(OILPAN) |
| 531 ASSERT(!hasGuardRefCount()); | 531 ASSERT(!hasGuardRefCount()); |
| 532 // With Oilpan, either the document outlives the visibility observers | 532 // With Oilpan, either the document outlives the visibility observers |
| 533 // or the visibility observers and the document die in the same GC round. | 533 // or the visibility observers and the document die in the same GC round. |
| 534 // When they die in the same GC round, the list of visibility observers | 534 // When they die in the same GC round, the list of visibility observers |
| 535 // will not be empty on Document destruction. | 535 // will not be empty on Document destruction. |
| 536 ASSERT(m_visibilityObservers.isEmpty()); | 536 ASSERT(m_visibilityObservers.isEmpty()); |
| 537 #endif | |
| 538 | 537 |
| 539 if (m_templateDocument) | 538 if (m_templateDocument) |
| 540 m_templateDocument->m_templateDocumentHost = 0; // balanced in ensureTem plateDocument(). | 539 m_templateDocument->m_templateDocumentHost = nullptr; // balanced in ens ureTemplateDocument(). |
| 540 #endif | |
| 541 | 541 |
| 542 m_scriptRunner.clear(); | 542 m_scriptRunner.clear(); |
| 543 | 543 |
| 544 #if !ENABLE(OILPAN) | |
| 544 removeAllEventListenersRecursively(); | 545 removeAllEventListenersRecursively(); |
|
haraken
2014/05/06 04:20:16
Removing this line is great, but we'll still need
Mads Ager (chromium)
2014/05/06 08:26:00
Yeah, we need to figure out how to deal with Inspe
| |
| 546 #endif | |
| 545 | 547 |
| 546 // Currently we believe that Document can never outlive the parser. | 548 // Currently we believe that Document can never outlive the parser. |
| 547 // Although the Document may be replaced synchronously, DocumentParsers | 549 // Although the Document may be replaced synchronously, DocumentParsers |
| 548 // generally keep at least one reference to an Element which would in turn | 550 // generally keep at least one reference to an Element which would in turn |
| 549 // has a reference to the Document. If you hit this ASSERT, then that | 551 // has a reference to the Document. If you hit this ASSERT, then that |
| 550 // assumption is wrong. DocumentParser::detach() should ensure that even | 552 // assumption is wrong. DocumentParser::detach() should ensure that even |
| 551 // if the DocumentParser outlives the Document it won't cause badness. | 553 // if the DocumentParser outlives the Document it won't cause badness. |
| 552 ASSERT(!m_parser || m_parser->refCount() == 1); | 554 ASSERT(!m_parser || m_parser->refCount() == 1); |
| 553 detachParser(); | 555 detachParser(); |
| 554 | 556 |
| 555 if (this == topDocument()) | 557 if (this == topDocument()) |
| 556 clearAXObjectCache(); | 558 clearAXObjectCache(); |
| 557 | 559 |
| 558 #if !ENABLE(OILPAN) | 560 #if !ENABLE(OILPAN) |
| 559 if (m_styleSheetList) | 561 if (m_styleSheetList) |
| 560 m_styleSheetList->detachFromDocument(); | 562 m_styleSheetList->detachFromDocument(); |
| 561 #endif | 563 #endif |
| 562 | 564 |
| 563 if (m_importsController) { | 565 if (m_importsController) { |
| 564 m_importsController->wasDetachedFrom(*this); | 566 m_importsController->wasDetachedFrom(*this); |
| 565 m_importsController = 0; | 567 m_importsController = 0; |
| 566 } | 568 } |
| 567 | 569 |
| 568 m_timeline->detachFromDocument(); | 570 m_timeline->detachFromDocument(); |
| 569 m_transitionTimeline->detachFromDocument(); | 571 m_transitionTimeline->detachFromDocument(); |
| 570 | 572 |
| 573 #if !ENABLE(OILPAN) | |
| 571 // We need to destroy CSSFontSelector before destroying m_fetcher. | 574 // We need to destroy CSSFontSelector before destroying m_fetcher. |
| 572 if (m_styleEngine) | 575 if (m_styleEngine) |
| 573 m_styleEngine->detachFromDocument(); | 576 m_styleEngine->detachFromDocument(); |
| 574 | 577 |
| 575 #if !ENABLE(OILPAN) | |
| 576 if (m_elemSheet) | 578 if (m_elemSheet) |
| 577 m_elemSheet->clearOwnerNode(); | 579 m_elemSheet->clearOwnerNode(); |
| 578 #endif | 580 #endif |
| 579 | 581 |
| 580 // It's possible for multiple Documents to end up referencing the same Resou rceFetcher (e.g., SVGImages | 582 // It's possible for multiple Documents to end up referencing the same Resou rceFetcher (e.g., SVGImages |
| 581 // load the initial empty document and the SVGDocument with the same Documen tLoader). | 583 // load the initial empty document and the SVGDocument with the same Documen tLoader). |
| 582 if (m_fetcher->document() == this) | 584 if (m_fetcher->document() == this) |
| 583 m_fetcher->setDocument(0); | 585 m_fetcher->setDocument(0); |
| 584 m_fetcher.clear(); | 586 m_fetcher.clear(); |
| 585 | 587 |
| 586 // We must call clearRareData() here since a Document class inherits TreeSco pe | 588 // We must call clearRareData() here since a Document class inherits TreeSco pe |
| 587 // as well as Node. See a comment on TreeScope.h for the reason. | 589 // as well as Node. See a comment on TreeScope.h for the reason. |
| 588 if (hasRareData()) | 590 if (hasRareData()) |
| 589 clearRareData(); | 591 clearRareData(); |
| 590 | 592 |
| 591 ASSERT(!m_listsInvalidatedAtDocument.size()); | 593 ASSERT(!m_listsInvalidatedAtDocument.size()); |
| 592 | 594 |
| 593 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListCounts); i++) | 595 for (unsigned i = 0; i < WTF_ARRAY_LENGTH(m_nodeListCounts); i++) |
| 594 ASSERT(!m_nodeListCounts[i]); | 596 ASSERT(!m_nodeListCounts[i]); |
| 595 | 597 |
| 596 setClient(0); | 598 setClient(0); |
| 597 | 599 |
| 598 InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter); | 600 InspectorCounters::decrementCounter(InspectorCounters::DocumentCounter); |
| 599 } | 601 } |
| 600 | 602 |
| 601 void Document::dispose() | 603 void Document::dispose() |
|
haraken
2014/05/06 04:20:16
Just to confirm: In oilpan, Document::dispose() is
Mads Ager (chromium)
2014/05/06 08:26:00
With Oilpan, dispose is called at the point where
| |
| 602 { | 604 { |
| 605 #if !ENABLE(OILPAN) | |
| 603 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); | 606 ASSERT_WITH_SECURITY_IMPLICATION(!m_deletionHasBegun); |
| 607 | |
| 604 // We must make sure not to be retaining any of our children through | 608 // We must make sure not to be retaining any of our children through |
| 605 // these extra pointers or we will create a reference cycle. | 609 // these extra pointers or we will create a reference cycle. |
| 606 m_docType = nullptr; | 610 m_docType = nullptr; |
| 607 m_focusedElement = nullptr; | 611 m_focusedElement = nullptr; |
| 608 m_hoverNode = nullptr; | 612 m_hoverNode = nullptr; |
| 609 m_activeHoverElement = nullptr; | 613 m_activeHoverElement = nullptr; |
| 610 m_titleElement = nullptr; | 614 m_titleElement = nullptr; |
| 611 m_documentElement = nullptr; | 615 m_documentElement = nullptr; |
| 612 m_contextFeatures = ContextFeatures::defaultSwitch(); | 616 m_contextFeatures = ContextFeatures::defaultSwitch(); |
|
haraken
2014/05/06 04:20:16
I'm curious why you can remove this before moving
Mads Ager (chromium)
2014/05/06 08:26:00
m_contextFeatures *is* on the heap and is traced,
| |
| 613 m_userActionElements.documentDidRemoveLastRef(); | 617 m_userActionElements.documentDidRemoveLastRef(); |
| 614 m_associatedFormControls.clear(); | 618 m_associatedFormControls.clear(); |
| 615 | 619 |
| 616 detachParser(); | 620 detachParser(); |
|
haraken
2014/05/06 04:20:16
Ditto. I'm curious why you can remove this before
Mads Ager (chromium)
2014/05/06 08:26:00
You are right. I was using the fact that detachPar
| |
| 617 | 621 |
| 618 m_registrationContext.clear(); | 622 m_registrationContext.clear(); |
|
haraken
2014/05/06 04:20:16
Ditto. I'm curious why you can remove this before
Mads Ager (chromium)
2014/05/06 08:26:00
Let me restore it. Looking at it now I'm not entir
| |
| 619 | 623 |
| 620 if (m_importsController) { | 624 if (m_importsController) { |
| 621 m_importsController->wasDetachedFrom(*this); | 625 m_importsController->wasDetachedFrom(*this); |
|
haraken
2014/05/06 04:20:16
I guess we still need this to call HTMLImportsCont
Mads Ager (chromium)
2014/05/06 08:26:00
Restored as well.
| |
| 622 m_importsController = 0; | 626 m_importsController = 0; |
| 623 } | 627 } |
| 624 | 628 |
| 625 // removeDetachedChildren() doesn't always unregister IDs, | 629 // removeDetachedChildren() doesn't always unregister IDs, |
| 626 // so tear down scope information upfront to avoid having stale references i n the map. | 630 // so tear down scope information upfront to avoid having stale references i n the map. |
| 627 destroyTreeScopeData(); | 631 destroyTreeScopeData(); |
|
haraken
2014/05/06 04:20:16
As far as I read the comment in line 629 and 630,
Mads Ager (chromium)
2014/05/06 08:26:00
We are not calling removeDetachedChildren. The chi
| |
| 632 | |
| 628 removeDetachedChildren(); | 633 removeDetachedChildren(); |
| 634 #endif | |
| 635 | |
| 629 // removeDetachedChildren() can access FormController. | 636 // removeDetachedChildren() can access FormController. |
| 630 m_formController.clear(); | 637 m_formController.clear(); |
| 631 | 638 |
| 639 #if !ENABLE(OILPAN) | |
| 632 m_markers->clear(); | 640 m_markers->clear(); |
|
haraken
2014/05/06 04:20:16
Just to confirm: There is no problem in calling m_
Mads Ager (chromium)
2014/05/06 08:26:00
That's right. As long as the Document stays alive
| |
| 633 | 641 |
| 634 m_cssCanvasElements.clear(); | 642 m_cssCanvasElements.clear(); |
| 643 #endif | |
| 635 | 644 |
| 636 // FIXME: consider using ActiveDOMObject. | 645 // FIXME: consider using ActiveDOMObject. |
| 637 if (m_scriptedAnimationController) | 646 if (m_scriptedAnimationController) |
| 638 m_scriptedAnimationController->clearDocumentPointer(); | 647 m_scriptedAnimationController->clearDocumentPointer(); |
| 639 m_scriptedAnimationController.clear(); | 648 m_scriptedAnimationController.clear(); |
| 640 | 649 |
| 641 if (svgExtensions()) | 650 if (svgExtensions()) |
| 642 accessSVGExtensions().pauseAnimations(); | 651 accessSVGExtensions().pauseAnimations(); |
| 643 | 652 |
| 653 #if !ENABLE(OILPAN) | |
| 644 m_lifecycle.advanceTo(DocumentLifecycle::Disposed); | 654 m_lifecycle.advanceTo(DocumentLifecycle::Disposed); |
|
haraken
2014/05/06 04:20:16
- I wonder why you need to remove this line.
- If
Mads Ager (chromium)
2014/05/06 08:26:00
I removed this because we have collapsed Stopped a
| |
| 655 #endif | |
| 656 | |
| 645 lifecycleNotifier().notifyDocumentWasDisposed(); | 657 lifecycleNotifier().notifyDocumentWasDisposed(); |
| 646 } | 658 } |
| 647 | 659 |
| 648 SelectorQueryCache& Document::selectorQueryCache() | 660 SelectorQueryCache& Document::selectorQueryCache() |
| 649 { | 661 { |
| 650 if (!m_selectorQueryCache) | 662 if (!m_selectorQueryCache) |
| 651 m_selectorQueryCache = adoptPtr(new SelectorQueryCache()); | 663 m_selectorQueryCache = adoptPtr(new SelectorQueryCache()); |
| 652 return *m_selectorQueryCache; | 664 return *m_selectorQueryCache; |
| 653 } | 665 } |
| 654 | 666 |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1355 | 1367 |
| 1356 void Document::setTitle(const String& title) | 1368 void Document::setTitle(const String& title) |
| 1357 { | 1369 { |
| 1358 // Title set by JavaScript -- overrides any title elements. | 1370 // Title set by JavaScript -- overrides any title elements. |
| 1359 m_titleSetExplicitly = true; | 1371 m_titleSetExplicitly = true; |
| 1360 if (!isHTMLDocument() && !isXHTMLDocument()) | 1372 if (!isHTMLDocument() && !isXHTMLDocument()) |
| 1361 m_titleElement = nullptr; | 1373 m_titleElement = nullptr; |
| 1362 else if (!m_titleElement) { | 1374 else if (!m_titleElement) { |
| 1363 if (HTMLElement* headElement = head()) { | 1375 if (HTMLElement* headElement = head()) { |
| 1364 m_titleElement = HTMLTitleElement::create(*this); | 1376 m_titleElement = HTMLTitleElement::create(*this); |
| 1365 headElement->appendChild(m_titleElement); | 1377 headElement->appendChild(m_titleElement.get()); |
| 1366 } | 1378 } |
| 1367 } | 1379 } |
| 1368 | 1380 |
| 1369 if (isHTMLTitleElement(m_titleElement)) | 1381 if (isHTMLTitleElement(m_titleElement)) |
| 1370 toHTMLTitleElement(m_titleElement)->setText(title); | 1382 toHTMLTitleElement(m_titleElement)->setText(title); |
| 1371 else | 1383 else |
| 1372 updateTitle(title); | 1384 updateTitle(title); |
| 1373 } | 1385 } |
| 1374 | 1386 |
| 1375 void Document::setTitleElement(const String& title, Element* titleElement) | 1387 void Document::setTitleElement(const String& title, Element* titleElement) |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2216 // possible to re-attach. Eventually Document::detach() should be renamed, | 2228 // possible to re-attach. Eventually Document::detach() should be renamed, |
| 2217 // or this setting of the frame to 0 could be made explicit in each of the | 2229 // or this setting of the frame to 0 could be made explicit in each of the |
| 2218 // callers of Document::detach(). | 2230 // callers of Document::detach(). |
| 2219 m_frame = 0; | 2231 m_frame = 0; |
| 2220 | 2232 |
| 2221 if (m_mediaQueryMatcher) | 2233 if (m_mediaQueryMatcher) |
| 2222 m_mediaQueryMatcher->documentDestroyed(); | 2234 m_mediaQueryMatcher->documentDestroyed(); |
| 2223 | 2235 |
| 2224 lifecycleNotifier().notifyDocumentWasDetached(); | 2236 lifecycleNotifier().notifyDocumentWasDetached(); |
| 2225 m_lifecycle.advanceTo(DocumentLifecycle::Stopped); | 2237 m_lifecycle.advanceTo(DocumentLifecycle::Stopped); |
| 2238 #if ENABLE(OILPAN) | |
| 2239 dispose(); | |
|
haraken
2014/05/06 04:20:16
Just help me understand (very fundamental question
Mads Ager (chromium)
2014/05/06 08:26:00
When you detach the document it cannot be attached
| |
| 2240 #endif | |
| 2226 } | 2241 } |
| 2227 | 2242 |
| 2228 void Document::prepareForDestruction() | 2243 void Document::prepareForDestruction() |
| 2229 { | 2244 { |
| 2230 m_markers->prepareForDestruction(); | 2245 m_markers->prepareForDestruction(); |
| 2231 disconnectDescendantFrames(); | 2246 disconnectDescendantFrames(); |
| 2232 | 2247 |
| 2233 // The process of disconnecting descendant frames could have already detache d us. | 2248 // The process of disconnecting descendant frames could have already detache d us. |
| 2234 if (!isActive()) | 2249 if (!isActive()) |
| 2235 return; | 2250 return; |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3518 if (newFocusedElement && (newFocusedElement->document() != this)) | 3533 if (newFocusedElement && (newFocusedElement->document() != this)) |
| 3519 return true; | 3534 return true; |
| 3520 | 3535 |
| 3521 if (NodeChildRemovalTracker::isBeingRemoved(newFocusedElement.get())) | 3536 if (NodeChildRemovalTracker::isBeingRemoved(newFocusedElement.get())) |
| 3522 return true; | 3537 return true; |
| 3523 | 3538 |
| 3524 if (m_focusedElement == newFocusedElement) | 3539 if (m_focusedElement == newFocusedElement) |
| 3525 return true; | 3540 return true; |
| 3526 | 3541 |
| 3527 bool focusChangeBlocked = false; | 3542 bool focusChangeBlocked = false; |
| 3528 RefPtr<Element> oldFocusedElement = m_focusedElement; | 3543 RefPtrWillBeRawPtr<Element> oldFocusedElement = m_focusedElement; |
| 3529 m_focusedElement = nullptr; | 3544 m_focusedElement = nullptr; |
| 3530 | 3545 |
| 3531 // Remove focus from the existing focus node (if any) | 3546 // Remove focus from the existing focus node (if any) |
| 3532 if (oldFocusedElement) { | 3547 if (oldFocusedElement) { |
| 3533 ASSERT(!oldFocusedElement->inDetach()); | 3548 ASSERT(!oldFocusedElement->inDetach()); |
| 3534 | 3549 |
| 3535 if (oldFocusedElement->active()) | 3550 if (oldFocusedElement->active()) |
| 3536 oldFocusedElement->setActive(false); | 3551 oldFocusedElement->setActive(false); |
| 3537 | 3552 |
| 3538 oldFocusedElement->setFocus(false); | 3553 oldFocusedElement->setFocus(false); |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4871 is2d = true; | 4886 is2d = true; |
| 4872 context2d = toCanvasRenderingContext2D(context); | 4887 context2d = toCanvasRenderingContext2D(context); |
| 4873 } else if (context->is3d()) { | 4888 } else if (context->is3d()) { |
| 4874 is3d = true; | 4889 is3d = true; |
| 4875 context3d = toWebGLRenderingContext(context); | 4890 context3d = toWebGLRenderingContext(context); |
| 4876 } | 4891 } |
| 4877 } | 4892 } |
| 4878 | 4893 |
| 4879 HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) | 4894 HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) |
| 4880 { | 4895 { |
| 4881 RefPtr<HTMLCanvasElement>& element = m_cssCanvasElements.add(name, nullptr). storedValue->value; | 4896 RefPtrWillBeMember<HTMLCanvasElement>& element = m_cssCanvasElements.add(nam e, nullptr).storedValue->value; |
|
haraken
2014/05/06 04:20:16
I forgot the previous discussion, but what was the
Mads Ager (chromium)
2014/05/06 08:26:00
This one is safe. The only way the add/new pattern
| |
| 4882 if (!element) { | 4897 if (!element) { |
| 4883 element = HTMLCanvasElement::create(*this); | 4898 element = HTMLCanvasElement::create(*this); |
| 4884 element->setAccelerationDisabled(true); | 4899 element->setAccelerationDisabled(true); |
| 4885 } | 4900 } |
| 4886 return *element; | 4901 return *element; |
| 4887 } | 4902 } |
| 4888 | 4903 |
| 4889 void Document::initDNSPrefetch() | 4904 void Document::initDNSPrefetch() |
| 4890 { | 4905 { |
| 4891 Settings* settings = this->settings(); | 4906 Settings* settings = this->settings(); |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5656 if (!visitor->isAlive(it->key)) | 5671 if (!visitor->isAlive(it->key)) |
| 5657 deadNodes.append(it->key); | 5672 deadNodes.append(it->key); |
| 5658 } | 5673 } |
| 5659 for (unsigned i = 0; i < deadNodes.size(); ++i) | 5674 for (unsigned i = 0; i < deadNodes.size(); ++i) |
| 5660 didClearTouchEventHandlers(deadNodes[i]); | 5675 didClearTouchEventHandlers(deadNodes[i]); |
| 5661 } | 5676 } |
| 5662 } | 5677 } |
| 5663 | 5678 |
| 5664 void Document::trace(Visitor* visitor) | 5679 void Document::trace(Visitor* visitor) |
| 5665 { | 5680 { |
| 5681 visitor->trace(m_docType); | |
| 5682 visitor->trace(m_autofocusElement); | |
| 5683 visitor->trace(m_focusedElement); | |
| 5684 visitor->trace(m_hoverNode); | |
| 5685 visitor->trace(m_activeHoverElement); | |
| 5686 visitor->trace(m_documentElement); | |
| 5687 visitor->trace(m_titleElement); | |
| 5688 visitor->trace(m_currentScriptStack); | |
| 5689 visitor->trace(m_transformSourceDocument); | |
| 5690 visitor->trace(m_cssCanvasElements); | |
| 5691 visitor->trace(m_topLayerElements); | |
| 5692 visitor->trace(m_mediaQueryMatcher); | |
|
haraken
2014/05/06 04:20:16
You're tracing m_mediaQueryMatcher twice :)
Mads Ager (chromium)
2014/05/06 08:26:00
I REALLY don't want it to go away!!! ;-)
Thanks H
| |
| 5693 visitor->trace(m_elemSheet); | |
| 5694 visitor->trace(m_styleEngine); | |
| 5666 visitor->trace(m_styleSheetList); | 5695 visitor->trace(m_styleSheetList); |
| 5667 visitor->trace(m_mediaQueryMatcher); | 5696 visitor->trace(m_mediaQueryMatcher); |
| 5697 visitor->trace(m_associatedFormControls); | |
| 5698 visitor->trace(m_templateDocument); | |
| 5699 visitor->trace(m_templateDocumentHost); | |
| 5668 visitor->trace(m_visibilityObservers); | 5700 visitor->trace(m_visibilityObservers); |
| 5669 visitor->trace(m_contextFeatures); | 5701 visitor->trace(m_contextFeatures); |
| 5702 visitor->trace(m_userActionElements); | |
| 5670 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5703 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
| 5671 DocumentSupplementable::trace(visitor); | 5704 DocumentSupplementable::trace(visitor); |
| 5672 TreeScope::trace(visitor); | 5705 TreeScope::trace(visitor); |
| 5673 ContainerNode::trace(visitor); | 5706 ContainerNode::trace(visitor); |
| 5674 ExecutionContext::trace(visitor); | 5707 ExecutionContext::trace(visitor); |
| 5675 } | 5708 } |
| 5676 | 5709 |
| 5677 } // namespace WebCore | 5710 } // namespace WebCore |
| OLD | NEW |