| 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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 return true; | 1576 return true; |
| 1577 return false; | 1577 return false; |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 bool Document::needsFullRenderTreeUpdate() const | 1580 bool Document::needsFullRenderTreeUpdate() const |
| 1581 { | 1581 { |
| 1582 if (!isActive() || !view()) | 1582 if (!isActive() || !view()) |
| 1583 return false; | 1583 return false; |
| 1584 if (!m_useElementsNeedingUpdate.isEmpty()) | 1584 if (!m_useElementsNeedingUpdate.isEmpty()) |
| 1585 return true; | 1585 return true; |
| 1586 if (!m_layerUpdateSVGFilterElements.isEmpty()) | 1586 if (!m_layerUpdateSVGEffectsElements.isEmpty()) |
| 1587 return true; | 1587 return true; |
| 1588 if (needsStyleRecalc()) | 1588 if (needsStyleRecalc()) |
| 1589 return true; | 1589 return true; |
| 1590 if (needsStyleInvalidation()) | 1590 if (needsStyleInvalidation()) |
| 1591 return true; | 1591 return true; |
| 1592 // FIXME: The childNeedsDistributionRecalc bit means either self or children
, we should fix that. | 1592 // FIXME: The childNeedsDistributionRecalc bit means either self or children
, we should fix that. |
| 1593 if (childNeedsDistributionRecalc()) | 1593 if (childNeedsDistributionRecalc()) |
| 1594 return true; | 1594 return true; |
| 1595 if (DocumentAnimations::needsOutdatedAnimationPlayerUpdate(*this)) | 1595 if (DocumentAnimations::needsOutdatedAnimationPlayerUpdate(*this)) |
| 1596 return true; | 1596 return true; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2061 m_isViewSource = isViewSource; | 2061 m_isViewSource = isViewSource; |
| 2062 if (!m_isViewSource) | 2062 if (!m_isViewSource) |
| 2063 return; | 2063 return; |
| 2064 | 2064 |
| 2065 setSecurityOrigin(SecurityOrigin::createUnique()); | 2065 setSecurityOrigin(SecurityOrigin::createUnique()); |
| 2066 didUpdateSecurityOrigin(); | 2066 didUpdateSecurityOrigin(); |
| 2067 } | 2067 } |
| 2068 | 2068 |
| 2069 bool Document::dirtyElementsForLayerUpdate() | 2069 bool Document::dirtyElementsForLayerUpdate() |
| 2070 { | 2070 { |
| 2071 if (m_layerUpdateSVGFilterElements.isEmpty()) | 2071 if (m_layerUpdateSVGEffectsElements.isEmpty()) |
| 2072 return false; | 2072 return false; |
| 2073 | 2073 |
| 2074 for (WillBeHeapHashSet<RawPtrWillBeMember<Element> >::iterator it = m_layerU
pdateSVGFilterElements.begin(), end = m_layerUpdateSVGFilterElements.end(); it !
= end; ++it) | 2074 for (WillBeHeapHashSet<RawPtrWillBeMember<Element> >::iterator it = m_layerU
pdateSVGEffectsElements.begin(), end = m_layerUpdateSVGEffectsElements.end(); it
!= end; ++it) |
| 2075 (*it)->setNeedsStyleRecalc(LocalStyleChange); | 2075 (*it)->setNeedsStyleRecalc(LocalStyleChange); |
| 2076 m_layerUpdateSVGFilterElements.clear(); | 2076 m_layerUpdateSVGEffectsElements.clear(); |
| 2077 return true; | 2077 return true; |
| 2078 } | 2078 } |
| 2079 | 2079 |
| 2080 void Document::scheduleSVGFilterLayerUpdateHack(Element& element) | 2080 void Document::scheduleSVGEffectsLayerUpdateHack(Element& element) |
| 2081 { | 2081 { |
| 2082 if (element.styleChangeType() == NeedsReattachStyleChange) | 2082 if (element.styleChangeType() == NeedsReattachStyleChange) |
| 2083 return; | 2083 return; |
| 2084 element.setSVGFilterNeedsLayerUpdate(); | 2084 element.setSVGEffectsNeedLayerUpdate(); |
| 2085 m_layerUpdateSVGFilterElements.add(&element); | 2085 m_layerUpdateSVGEffectsElements.add(&element); |
| 2086 scheduleRenderTreeUpdateIfNeeded(); | 2086 scheduleRenderTreeUpdateIfNeeded(); |
| 2087 } | 2087 } |
| 2088 | 2088 |
| 2089 void Document::unscheduleSVGFilterLayerUpdateHack(Element& element) | 2089 void Document::unscheduleSVGEffectsLayerUpdateHack(Element& element) |
| 2090 { | 2090 { |
| 2091 element.clearSVGFilterNeedsLayerUpdate(); | 2091 element.clearSVGEffectsNeedLayerUpdate(); |
| 2092 m_layerUpdateSVGFilterElements.remove(&element); | 2092 m_layerUpdateSVGEffectsElements.remove(&element); |
| 2093 } | 2093 } |
| 2094 | 2094 |
| 2095 void Document::scheduleUseShadowTreeUpdate(SVGUseElement& element) | 2095 void Document::scheduleUseShadowTreeUpdate(SVGUseElement& element) |
| 2096 { | 2096 { |
| 2097 m_useElementsNeedingUpdate.add(&element); | 2097 m_useElementsNeedingUpdate.add(&element); |
| 2098 scheduleRenderTreeUpdateIfNeeded(); | 2098 scheduleRenderTreeUpdateIfNeeded(); |
| 2099 } | 2099 } |
| 2100 | 2100 |
| 2101 void Document::unscheduleUseShadowTreeUpdate(SVGUseElement& element) | 2101 void Document::unscheduleUseShadowTreeUpdate(SVGUseElement& element) |
| 2102 { | 2102 { |
| (...skipping 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5857 visitor->trace(m_parser); | 5857 visitor->trace(m_parser); |
| 5858 visitor->trace(m_contextFeatures); | 5858 visitor->trace(m_contextFeatures); |
| 5859 visitor->trace(m_styleSheetList); | 5859 visitor->trace(m_styleSheetList); |
| 5860 visitor->trace(m_mediaQueryMatcher); | 5860 visitor->trace(m_mediaQueryMatcher); |
| 5861 visitor->trace(m_scriptedAnimationController); | 5861 visitor->trace(m_scriptedAnimationController); |
| 5862 visitor->trace(m_registrationContext); | 5862 visitor->trace(m_registrationContext); |
| 5863 visitor->trace(m_customElementMicrotaskRunQueue); | 5863 visitor->trace(m_customElementMicrotaskRunQueue); |
| 5864 visitor->trace(m_elementDataCache); | 5864 visitor->trace(m_elementDataCache); |
| 5865 visitor->trace(m_associatedFormControls); | 5865 visitor->trace(m_associatedFormControls); |
| 5866 visitor->trace(m_useElementsNeedingUpdate); | 5866 visitor->trace(m_useElementsNeedingUpdate); |
| 5867 visitor->trace(m_layerUpdateSVGFilterElements); | 5867 visitor->trace(m_layerUpdateSVGEffectsElements); |
| 5868 visitor->trace(m_templateDocument); | 5868 visitor->trace(m_templateDocument); |
| 5869 visitor->trace(m_templateDocumentHost); | 5869 visitor->trace(m_templateDocumentHost); |
| 5870 visitor->trace(m_visibilityObservers); | 5870 visitor->trace(m_visibilityObservers); |
| 5871 visitor->trace(m_userActionElements); | 5871 visitor->trace(m_userActionElements); |
| 5872 visitor->trace(m_svgExtensions); | 5872 visitor->trace(m_svgExtensions); |
| 5873 visitor->trace(m_timeline); | 5873 visitor->trace(m_timeline); |
| 5874 visitor->trace(m_compositorPendingAnimations); | 5874 visitor->trace(m_compositorPendingAnimations); |
| 5875 visitor->trace(m_contextDocument); | 5875 visitor->trace(m_contextDocument); |
| 5876 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5876 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
| 5877 #endif | 5877 #endif |
| 5878 DocumentSupplementable::trace(visitor); | 5878 DocumentSupplementable::trace(visitor); |
| 5879 TreeScope::trace(visitor); | 5879 TreeScope::trace(visitor); |
| 5880 ContainerNode::trace(visitor); | 5880 ContainerNode::trace(visitor); |
| 5881 ExecutionContext::trace(visitor); | 5881 ExecutionContext::trace(visitor); |
| 5882 } | 5882 } |
| 5883 | 5883 |
| 5884 } // namespace blink | 5884 } // namespace blink |
| 5885 | 5885 |
| 5886 #ifndef NDEBUG | 5886 #ifndef NDEBUG |
| 5887 using namespace blink; | 5887 using namespace blink; |
| 5888 void showLiveDocumentInstances() | 5888 void showLiveDocumentInstances() |
| 5889 { | 5889 { |
| 5890 WeakDocumentSet& set = liveDocumentSet(); | 5890 WeakDocumentSet& set = liveDocumentSet(); |
| 5891 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5891 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5892 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5892 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 5893 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5893 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 5894 } | 5894 } |
| 5895 } | 5895 } |
| 5896 #endif | 5896 #endif |
| OLD | NEW |