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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp

Issue 1898393002: Fixed-position elements should not be clipped by ancestor fixed-position overflow clip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // 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 "core/layout/compositing/CompositingInputsUpdater.h" 5 #include "core/layout/compositing/CompositingInputsUpdater.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/layout/LayoutBlock.h" 8 #include "core/layout/LayoutBlock.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "core/layout/compositing/CompositedLayerMapping.h" 10 #include "core/layout/compositing/CompositedLayerMapping.h"
(...skipping 18 matching lines...) Expand all
29 TRACE_EVENT0("blink", "CompositingInputsUpdater::update"); 29 TRACE_EVENT0("blink", "CompositingInputsUpdater::update");
30 updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo()); 30 updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo());
31 } 31 }
32 32
33 static const PaintLayer* findParentLayerOnClippingContainerChain(const PaintLaye r* layer) 33 static const PaintLayer* findParentLayerOnClippingContainerChain(const PaintLaye r* layer)
34 { 34 {
35 LayoutObject* current = layer->layoutObject(); 35 LayoutObject* current = layer->layoutObject();
36 while (current) { 36 while (current) {
37 if (current->style()->position() == FixedPosition) { 37 if (current->style()->position() == FixedPosition) {
38 for (current = current->parent(); current && !current->canContainFix edPositionObjects(); current = current->parent()) { 38 for (current = current->parent(); current && !current->canContainFix edPositionObjects(); current = current->parent()) {
39 // All types of clips apply to fixed-position descendants of oth er fixed-position elements.
40 // Note: it's unclear whether this is what the spec says. Firefo x does not clip, but Chrome does.
41 if (current->style()->position() == FixedPosition && current->ha sClipRelatedProperty()) {
42 ASSERT(current->hasLayer());
43 return static_cast<const LayoutBoxModelObject*>(current)->la yer();
44 }
45
46 // CSS clip applies to fixed position elements even for ancestor s that are not what the 39 // CSS clip applies to fixed position elements even for ancestor s that are not what the
47 // fixed element is positioned with respect to. 40 // fixed element is positioned with respect to.
48 if (current->hasClip()) { 41 if (current->hasClip()) {
49 ASSERT(current->hasLayer()); 42 ASSERT(current->hasLayer());
50 return static_cast<const LayoutBoxModelObject*>(current)->la yer(); 43 return static_cast<const LayoutBoxModelObject*>(current)->la yer();
51 } 44 }
52 } 45 }
53 } else { 46 } else {
54 current = current->containingBlock(); 47 current = current->containingBlock();
55 } 48 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 ASSERT(!layer->childNeedsCompositingInputsUpdate()); 214 ASSERT(!layer->childNeedsCompositingInputsUpdate());
222 ASSERT(!layer->needsCompositingInputsUpdate()); 215 ASSERT(!layer->needsCompositingInputsUpdate());
223 216
224 for (PaintLayer* child = layer->firstChild(); child; child = child->nextSibl ing()) 217 for (PaintLayer* child = layer->firstChild(); child; child = child->nextSibl ing())
225 assertNeedsCompositingInputsUpdateBitsCleared(child); 218 assertNeedsCompositingInputsUpdateBitsCleared(child);
226 } 219 }
227 220
228 #endif 221 #endif
229 222
230 } // namespace blink 223 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/compositing/overflow/fixed-element-escape-fixed-overflow-clip-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698