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

Side by Side Diff: third_party/WebKit/Source/core/dom/ShadowTreeStyleSheetCollection.cpp

Issue 2390543002: Reflow comments in core/dom/. (Closed)
Patch Set: Reformat comments in core/dom/. Created 4 years, 2 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
OLDNEW
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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 11 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 12 *
11 * This library is free software; you can redistribute it and/or 13 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public 14 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either 15 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version. 16 * version 2 of the License, or (at your option) any later version.
15 * 17 *
16 * This library is distributed in the hope that it will be useful, 18 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // StyleSheetCollection is GarbageCollected<>, allocate it on the heap. 69 // StyleSheetCollection is GarbageCollected<>, allocate it on the heap.
68 StyleSheetCollection* collection = StyleSheetCollection::create(); 70 StyleSheetCollection* collection = StyleSheetCollection::create();
69 collectStyleSheets(engine, *collection); 71 collectStyleSheets(engine, *collection);
70 72
71 StyleSheetChange change; 73 StyleSheetChange change;
72 analyzeStyleSheetChange(updateMode, collection->activeAuthorStyleSheets(), 74 analyzeStyleSheetChange(updateMode, collection->activeAuthorStyleSheets(),
73 change); 75 change);
74 76
75 if (StyleResolver* styleResolver = engine.resolver()) { 77 if (StyleResolver* styleResolver = engine.resolver()) {
76 if (change.styleResolverUpdateType != Additive) { 78 if (change.styleResolverUpdateType != Additive) {
77 // We should not destroy StyleResolver when we find any stylesheet update in a shadow tree. 79 // We should not destroy StyleResolver when we find any stylesheet update
78 // In this case, we will reset rulesets created from style elements in the shadow tree. 80 // in a shadow tree. In this case, we will reset rulesets created from
81 // style elements in the shadow tree.
79 styleResolver->resetAuthorStyle(treeScope()); 82 styleResolver->resetAuthorStyle(treeScope());
80 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets); 83 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets);
81 styleResolver->lazyAppendAuthorStyleSheets( 84 styleResolver->lazyAppendAuthorStyleSheets(
82 0, collection->activeAuthorStyleSheets()); 85 0, collection->activeAuthorStyleSheets());
83 } else { 86 } else {
84 styleResolver->lazyAppendAuthorStyleSheets( 87 styleResolver->lazyAppendAuthorStyleSheets(
85 m_activeAuthorStyleSheets.size(), 88 m_activeAuthorStyleSheets.size(),
86 collection->activeAuthorStyleSheets()); 89 collection->activeAuthorStyleSheets());
87 } 90 }
88 } 91 }
89 if (change.requiresFullStyleRecalc) 92 if (change.requiresFullStyleRecalc)
90 toShadowRoot(treeScope().rootNode()) 93 toShadowRoot(treeScope().rootNode())
91 .host() 94 .host()
92 .setNeedsStyleRecalc(SubtreeStyleChange, 95 .setNeedsStyleRecalc(SubtreeStyleChange,
93 StyleChangeReasonForTracing::create( 96 StyleChangeReasonForTracing::create(
94 StyleChangeReason::ActiveStylesheetsUpdate)); 97 StyleChangeReason::ActiveStylesheetsUpdate));
95 98
96 collection->swap(*this); 99 collection->swap(*this);
97 collection->dispose(); 100 collection->dispose();
98 } 101 }
99 102
100 } // namespace blink 103 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698