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

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

Issue 1413363003: Always composite position: fixed elements with composited descendants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 if (layer->shouldIsolateCompositedDescendants()) { 162 if (layer->shouldIsolateCompositedDescendants()) {
163 ASSERT(layer->stackingNode()->isStackingContext()); 163 ASSERT(layer->stackingNode()->isStackingContext());
164 subtreeReasons |= CompositingReasonIsolateCompositedDescendants; 164 subtreeReasons |= CompositingReasonIsolateCompositedDescendants;
165 } 165 }
166 166
167 // FIXME: This should move into CompositingReasonFinder::potentialCompos itingReasonsFromStyle, but 167 // FIXME: This should move into CompositingReasonFinder::potentialCompos itingReasonsFromStyle, but
168 // theres a poor interaction with LayoutTextControlSingleLine, which set s this hasOverflowClip directly. 168 // theres a poor interaction with LayoutTextControlSingleLine, which set s this hasOverflowClip directly.
169 if (layer->layoutObject()->hasClipOrOverflowClip()) 169 if (layer->layoutObject()->hasClipOrOverflowClip())
170 subtreeReasons |= CompositingReasonClipsCompositingDescendants; 170 subtreeReasons |= CompositingReasonClipsCompositingDescendants;
171
172 if (layer->layoutObject()->style()->position() == FixedPosition)
173 subtreeReasons |= CompositingReasonPositionFixedWithCompositedDescen dants;
171 } 174 }
172 175
173 // A layer with preserve-3d or perspective only needs to be composited if th ere are descendant layers that 176 // A layer with preserve-3d or perspective only needs to be composited if th ere are descendant layers that
174 // will be affected by the preserve-3d or perspective. 177 // will be affected by the preserve-3d or perspective.
175 if (has3DTransformedDescendants) 178 if (has3DTransformedDescendants)
176 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos itingReasonCombo3DDescendants; 179 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos itingReasonCombo3DDescendants;
177 180
178 return subtreeReasons; 181 return subtreeReasons;
179 } 182 }
180 183
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 448
446 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform(); 449 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform();
447 } 450 }
448 451
449 // At this point we have finished collecting all reasons to composite this l ayer. 452 // At this point we have finished collecting all reasons to composite this l ayer.
450 layer->setCompositingReasons(reasonsToComposite); 453 layer->setCompositingReasons(reasonsToComposite);
451 454
452 } 455 }
453 456
454 } // namespace blink 457 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698