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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 StyleResolver::StyleResolver(Document& document) | 143 StyleResolver::StyleResolver(Document& document) |
144 : m_document(document) | 144 : m_document(document) |
145 , m_viewportStyleResolver(ViewportStyleResolver::create(&document)) | 145 , m_viewportStyleResolver(ViewportStyleResolver::create(&document)) |
146 , m_needCollectFeatures(false) | 146 , m_needCollectFeatures(false) |
147 , m_printMediaType(false) | 147 , m_printMediaType(false) |
148 , m_styleSharingDepth(0) | 148 , m_styleSharingDepth(0) |
149 , m_accessCount(0) | 149 , m_accessCount(0) |
150 { | 150 { |
151 FrameView* view = document.view(); | 151 FrameView* view = document.view(); |
152 if (view) { | 152 if (view) { |
153 m_medium = adoptPtr(new MediaQueryEvaluator(&view->frame())); | 153 m_medium = adoptPtrWillBeNoop(new MediaQueryEvaluator(&view->frame())); |
154 m_printMediaType = equalIgnoringCase(view->mediaType(), MediaTypeNames::
print); | 154 m_printMediaType = equalIgnoringCase(view->mediaType(), MediaTypeNames::
print); |
155 } else { | 155 } else { |
156 m_medium = adoptPtr(new MediaQueryEvaluator("all")); | 156 m_medium = adoptPtrWillBeNoop(new MediaQueryEvaluator("all")); |
157 } | 157 } |
158 | 158 |
159 initWatchedSelectorRules(); | 159 initWatchedSelectorRules(); |
160 } | 160 } |
161 | 161 |
162 StyleResolver::~StyleResolver() | 162 StyleResolver::~StyleResolver() |
163 { | 163 { |
164 } | 164 } |
165 | 165 |
166 void StyleResolver::dispose() | 166 void StyleResolver::dispose() |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression()
) != m_viewportDependentMediaQueryResults[i]->result()) | 1541 if (m_medium->eval(m_viewportDependentMediaQueryResults[i]->expression()
) != m_viewportDependentMediaQueryResults[i]->result()) |
1542 return true; | 1542 return true; |
1543 } | 1543 } |
1544 return false; | 1544 return false; |
1545 } | 1545 } |
1546 | 1546 |
1547 DEFINE_TRACE(StyleResolver) | 1547 DEFINE_TRACE(StyleResolver) |
1548 { | 1548 { |
1549 #if ENABLE(OILPAN) | 1549 #if ENABLE(OILPAN) |
1550 visitor->trace(m_matchedPropertiesCache); | 1550 visitor->trace(m_matchedPropertiesCache); |
| 1551 visitor->trace(m_medium); |
1551 visitor->trace(m_viewportDependentMediaQueryResults); | 1552 visitor->trace(m_viewportDependentMediaQueryResults); |
1552 visitor->trace(m_selectorFilter); | 1553 visitor->trace(m_selectorFilter); |
1553 visitor->trace(m_viewportStyleResolver); | 1554 visitor->trace(m_viewportStyleResolver); |
1554 visitor->trace(m_features); | 1555 visitor->trace(m_features); |
1555 visitor->trace(m_siblingRuleSet); | 1556 visitor->trace(m_siblingRuleSet); |
1556 visitor->trace(m_uncommonAttributeRuleSet); | 1557 visitor->trace(m_uncommonAttributeRuleSet); |
1557 visitor->trace(m_watchedSelectorsRules); | 1558 visitor->trace(m_watchedSelectorsRules); |
1558 visitor->trace(m_treeBoundaryCrossingScopes); | 1559 visitor->trace(m_treeBoundaryCrossingScopes); |
1559 visitor->trace(m_styleSharingLists); | 1560 visitor->trace(m_styleSharingLists); |
1560 visitor->trace(m_pendingStyleSheets); | 1561 visitor->trace(m_pendingStyleSheets); |
1561 visitor->trace(m_document); | 1562 visitor->trace(m_document); |
1562 #endif | 1563 #endif |
1563 } | 1564 } |
1564 | 1565 |
1565 } // namespace blink | 1566 } // namespace blink |
OLD | NEW |