Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp

Issue 2124013002: [Layout API] Use layoutViewItem() in StyleResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #include "core/dom/shadow/ElementShadow.h" 78 #include "core/dom/shadow/ElementShadow.h"
79 #include "core/dom/shadow/ShadowRoot.h" 79 #include "core/dom/shadow/ShadowRoot.h"
80 #include "core/frame/FrameView.h" 80 #include "core/frame/FrameView.h"
81 #include "core/frame/LocalFrame.h" 81 #include "core/frame/LocalFrame.h"
82 #include "core/frame/Settings.h" 82 #include "core/frame/Settings.h"
83 #include "core/frame/UseCounter.h" 83 #include "core/frame/UseCounter.h"
84 #include "core/html/HTMLIFrameElement.h" 84 #include "core/html/HTMLIFrameElement.h"
85 #include "core/html/HTMLSlotElement.h" 85 #include "core/html/HTMLSlotElement.h"
86 #include "core/inspector/InspectorInstrumentation.h" 86 #include "core/inspector/InspectorInstrumentation.h"
87 #include "core/layout/GeneratedChildren.h" 87 #include "core/layout/GeneratedChildren.h"
88 #include "core/layout/LayoutView.h" 88 #include "core/layout/api/LayoutViewItem.h"
89 #include "core/style/StyleVariableData.h" 89 #include "core/style/StyleVariableData.h"
90 #include "core/svg/SVGDocumentExtensions.h" 90 #include "core/svg/SVGDocumentExtensions.h"
91 #include "core/svg/SVGElement.h" 91 #include "core/svg/SVGElement.h"
92 #include "platform/RuntimeEnabledFeatures.h" 92 #include "platform/RuntimeEnabledFeatures.h"
93 #include "wtf/StdLibExtras.h" 93 #include "wtf/StdLibExtras.h"
94 94
95 namespace { 95 namespace {
96 96
97 using namespace blink; 97 using namespace blink;
98 98
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // This handles sheets added to the end of the stylesheet list only. In othe r cases the style resolver 266 // This handles sheets added to the end of the stylesheet list only. In othe r cases the style resolver
267 // needs to be reconstructed. To handle insertions too the rule order number s would need to be updated. 267 // needs to be reconstructed. To handle insertions too the rule order number s would need to be updated.
268 for (const auto& styleSheet : styleSheets) 268 for (const auto& styleSheet : styleSheets)
269 appendCSSStyleSheet(*styleSheet); 269 appendCSSStyleSheet(*styleSheet);
270 } 270 }
271 271
272 void StyleResolver::finishAppendAuthorStyleSheets() 272 void StyleResolver::finishAppendAuthorStyleSheets()
273 { 273 {
274 collectFeatures(); 274 collectFeatures();
275 275
276 if (document().layoutView() && document().layoutView()->style()) 276 if (!document().layoutViewItem().isNull() && document().layoutViewItem().sty le())
277 document().layoutView()->style()->font().update(document().styleEngine() .fontSelector()); 277 document().layoutViewItem().style()->font().update(document().styleEngin e().fontSelector());
278 278
279 m_viewportStyleResolver->collectViewportRules(); 279 m_viewportStyleResolver->collectViewportRules();
280 280
281 document().styleEngine().resetCSSFeatureFlags(m_features); 281 document().styleEngine().resetCSSFeatureFlags(m_features);
282 } 282 }
283 283
284 void StyleResolver::resetRuleFeatures() 284 void StyleResolver::resetRuleFeatures()
285 { 285 {
286 // Need to recreate RuleFeatureSet. 286 // Need to recreate RuleFeatureSet.
287 m_features.clear(); 287 m_features.clear();
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 visitor->trace(m_siblingRuleSet); 1743 visitor->trace(m_siblingRuleSet);
1744 visitor->trace(m_uncommonAttributeRuleSet); 1744 visitor->trace(m_uncommonAttributeRuleSet);
1745 visitor->trace(m_watchedSelectorsRules); 1745 visitor->trace(m_watchedSelectorsRules);
1746 visitor->trace(m_treeBoundaryCrossingScopes); 1746 visitor->trace(m_treeBoundaryCrossingScopes);
1747 visitor->trace(m_styleSharingLists); 1747 visitor->trace(m_styleSharingLists);
1748 visitor->trace(m_pendingStyleSheets); 1748 visitor->trace(m_pendingStyleSheets);
1749 visitor->trace(m_document); 1749 visitor->trace(m_document);
1750 } 1750 }
1751 1751
1752 } // namespace blink 1752 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698