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

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

Issue 1490063002: Implement Paint Containment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge Created 5 years 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (hasCompositedDescendants) { 159 if (hasCompositedDescendants) {
160 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos itingReasonComboCompositedDescendants; 160 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos itingReasonComboCompositedDescendants;
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()->hasClipRelatedProperty())
170 subtreeReasons |= CompositingReasonClipsCompositingDescendants; 170 subtreeReasons |= CompositingReasonClipsCompositingDescendants;
171 171
172 if (layer->layoutObject()->style()->position() == FixedPosition) 172 if (layer->layoutObject()->style()->position() == FixedPosition)
173 subtreeReasons |= CompositingReasonPositionFixedWithCompositedDescen dants; 173 subtreeReasons |= CompositingReasonPositionFixedWithCompositedDescen dants;
174 } 174 }
175 175
176 // 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
177 // will be affected by the preserve-3d or perspective. 177 // will be affected by the preserve-3d or perspective.
178 if (has3DTransformedDescendants) 178 if (has3DTransformedDescendants)
179 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos itingReasonCombo3DDescendants; 179 subtreeReasons |= layer->potentialCompositingReasonsFromStyle() & Compos itingReasonCombo3DDescendants;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 448
449 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform(); 449 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform();
450 } 450 }
451 451
452 // 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.
453 layer->setCompositingReasons(reasonsToComposite); 453 layer->setCompositingReasons(reasonsToComposite);
454 454
455 } 455 }
456 456
457 } // namespace blink 457 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698