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

Side by Side Diff: sky/engine/core/rendering/compositing/CompositingInputsUpdater.cpp

Issue 686633002: First pass at removing position:fixed. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/RenderView.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/compositing/CompositingInputsUpdater.h" 6 #include "core/rendering/compositing/CompositingInputsUpdater.h"
7 7
8 #include "core/rendering/RenderBlock.h" 8 #include "core/rendering/RenderBlock.h"
9 #include "core/rendering/RenderLayer.h" 9 #include "core/rendering/RenderLayer.h"
10 #include "core/rendering/compositing/CompositedLayerMapping.h" 10 #include "core/rendering/compositing/CompositedLayerMapping.h"
(...skipping 15 matching lines...) Expand all
26 void CompositingInputsUpdater::update() 26 void CompositingInputsUpdater::update()
27 { 27 {
28 TRACE_EVENT0("blink", "CompositingInputsUpdater::update"); 28 TRACE_EVENT0("blink", "CompositingInputsUpdater::update");
29 updateRecursive(m_rootRenderLayer, DoNotForceUpdate, AncestorInfo()); 29 updateRecursive(m_rootRenderLayer, DoNotForceUpdate, AncestorInfo());
30 } 30 }
31 31
32 static const RenderLayer* findParentLayerOnClippingContainerChain(const RenderLa yer* layer) 32 static const RenderLayer* findParentLayerOnClippingContainerChain(const RenderLa yer* layer)
33 { 33 {
34 RenderObject* current = layer->renderer(); 34 RenderObject* current = layer->renderer();
35 while (current) { 35 while (current) {
36 if (current->style()->position() == FixedPosition) { 36 current = current->containingBlock();
37 for (current = current->parent(); current && !current->canContainFix edPositionObjects(); current = current->parent()) {
38 // CSS clip applies to fixed position elements even for ancestor s that are not what the
39 // fixed element is positioned with respect to.
40 if (current->hasClip()) {
41 ASSERT(current->hasLayer());
42 return static_cast<const RenderLayerModelObject*>(current)-> layer();
43 }
44 }
45 } else {
46 current = current->containingBlock();
47 }
48 37
49 if (current->hasLayer()) 38 if (current->hasLayer())
50 return static_cast<const RenderLayerModelObject*>(current)->layer(); 39 return static_cast<const RenderLayerModelObject*>(current)->layer();
51 // Having clip or overflow clip forces the RenderObject to become a laye r. 40 // Having clip or overflow clip forces the RenderObject to become a laye r.
52 ASSERT(!current->hasClipOrOverflowClip()); 41 ASSERT(!current->hasClipOrOverflowClip());
53 } 42 }
54 ASSERT_NOT_REACHED(); 43 ASSERT_NOT_REACHED();
55 return 0; 44 return 0;
56 } 45 }
57 46
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 ASSERT(!layer->childNeedsCompositingInputsUpdate()); 172 ASSERT(!layer->childNeedsCompositingInputsUpdate());
184 ASSERT(!layer->needsCompositingInputsUpdate()); 173 ASSERT(!layer->needsCompositingInputsUpdate());
185 174
186 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib ling()) 175 for (RenderLayer* child = layer->firstChild(); child; child = child->nextSib ling())
187 assertNeedsCompositingInputsUpdateBitsCleared(child); 176 assertNeedsCompositingInputsUpdateBitsCleared(child);
188 } 177 }
189 178
190 #endif 179 #endif
191 180
192 } // namespace blink 181 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderView.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698