OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "core/dom/shadow/ElementShadow.h" | 74 #include "core/dom/shadow/ElementShadow.h" |
75 #include "core/dom/shadow/ShadowRoot.h" | 75 #include "core/dom/shadow/ShadowRoot.h" |
76 #include "core/frame/FrameView.h" | 76 #include "core/frame/FrameView.h" |
77 #include "core/frame/LocalFrame.h" | 77 #include "core/frame/LocalFrame.h" |
78 #include "core/html/HTMLIFrameElement.h" | 78 #include "core/html/HTMLIFrameElement.h" |
79 #include "core/inspector/InspectorInstrumentation.h" | 79 #include "core/inspector/InspectorInstrumentation.h" |
80 #include "core/rendering/RenderView.h" | 80 #include "core/rendering/RenderView.h" |
81 #include "core/rendering/style/KeyframeList.h" | 81 #include "core/rendering/style/KeyframeList.h" |
82 #include "core/svg/SVGDocumentExtensions.h" | 82 #include "core/svg/SVGDocumentExtensions.h" |
83 #include "core/svg/SVGElement.h" | 83 #include "core/svg/SVGElement.h" |
84 #include "core/svg/SVGFontFaceElement.h" | |
85 #include "platform/RuntimeEnabledFeatures.h" | 84 #include "platform/RuntimeEnabledFeatures.h" |
86 #include "wtf/StdLibExtras.h" | 85 #include "wtf/StdLibExtras.h" |
87 | 86 |
88 namespace { | 87 namespace { |
89 | 88 |
90 using namespace blink; | 89 using namespace blink; |
91 | 90 |
92 void setAnimationUpdateIfNeeded(StyleResolverState& state, Element& element) | 91 void setAnimationUpdateIfNeeded(StyleResolverState& state, Element& element) |
93 { | 92 { |
94 // If any changes to CSS Animations were detected, stash the update away for
application after the | 93 // If any changes to CSS Animations were detected, stash the update away for
application after the |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 { | 139 { |
141 FrameView* view = document.view(); | 140 FrameView* view = document.view(); |
142 if (view) { | 141 if (view) { |
143 m_medium = adoptPtr(new MediaQueryEvaluator(&view->frame())); | 142 m_medium = adoptPtr(new MediaQueryEvaluator(&view->frame())); |
144 m_printMediaType = equalIgnoringCase(view->mediaType(), MediaTypeNames::
print); | 143 m_printMediaType = equalIgnoringCase(view->mediaType(), MediaTypeNames::
print); |
145 } else { | 144 } else { |
146 m_medium = adoptPtr(new MediaQueryEvaluator("all")); | 145 m_medium = adoptPtr(new MediaQueryEvaluator("all")); |
147 } | 146 } |
148 | 147 |
149 initWatchedSelectorRules(CSSSelectorWatch::from(document).watchedCallbackSel
ectors()); | 148 initWatchedSelectorRules(CSSSelectorWatch::from(document).watchedCallbackSel
ectors()); |
150 | |
151 #if ENABLE(SVG_FONTS) | |
152 if (document.svgExtensions()) { | |
153 const WillBeHeapHashSet<RawPtrWillBeMember<SVGFontFaceElement> >& svgFon
tFaceElements = document.svgExtensions()->svgFontFaceElements(); | |
154 for (const auto& element : svgFontFaceElements) | |
155 addFontFaceRule(&document, document.styleEngine()->fontSelector(), e
lement->fontFaceRule()); | |
156 } | |
157 #endif | |
158 } | 149 } |
159 | 150 |
160 void StyleResolver::initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBe
Member<StyleRule> >& watchedSelectors) | 151 void StyleResolver::initWatchedSelectorRules(const WillBeHeapVector<RefPtrWillBe
Member<StyleRule> >& watchedSelectors) |
161 { | 152 { |
162 if (!watchedSelectors.size()) | 153 if (!watchedSelectors.size()) |
163 return; | 154 return; |
164 m_watchedSelectorsRules = RuleSet::create(); | 155 m_watchedSelectorsRules = RuleSet::create(); |
165 for (unsigned i = 0; i < watchedSelectors.size(); ++i) | 156 for (unsigned i = 0; i < watchedSelectors.size(); ++i) |
166 m_watchedSelectorsRules->addStyleRule(watchedSelectors[i].get(), RuleHas
NoSpecialState); | 157 m_watchedSelectorsRules->addStyleRule(watchedSelectors[i].get(), RuleHas
NoSpecialState); |
167 } | 158 } |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 visitor->trace(m_uncommonAttributeRuleSet); | 1603 visitor->trace(m_uncommonAttributeRuleSet); |
1613 visitor->trace(m_watchedSelectorsRules); | 1604 visitor->trace(m_watchedSelectorsRules); |
1614 visitor->trace(m_treeBoundaryCrossingRules); | 1605 visitor->trace(m_treeBoundaryCrossingRules); |
1615 visitor->trace(m_styleSharingLists); | 1606 visitor->trace(m_styleSharingLists); |
1616 visitor->trace(m_pendingStyleSheets); | 1607 visitor->trace(m_pendingStyleSheets); |
1617 visitor->trace(m_document); | 1608 visitor->trace(m_document); |
1618 #endif | 1609 #endif |
1619 } | 1610 } |
1620 | 1611 |
1621 } // namespace blink | 1612 } // namespace blink |
OLD | NEW |