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

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

Issue 1167073002: Where an ancestor has overflow style, a fixed child needs to be composited. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected results. Created 5 years, 6 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
« no previous file with comments | « LayoutTests/platform/mac/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 CompositingReasons reasonsToComposite = CompositingReasonNone; 216 CompositingReasons reasonsToComposite = CompositingReasonNone;
217 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l ayer); 217 CompositingReasons directReasons = m_compositingReasonFinder.directReasons(l ayer);
218 218
219 // Video is special. It's the only DeprecatedPaintLayer type that can both h ave 219 // Video is special. It's the only DeprecatedPaintLayer type that can both h ave
220 // DeprecatedPaintLayer children and whose children can't use its backing to render 220 // DeprecatedPaintLayer children and whose children can't use its backing to render
221 // into. These children (the controls) always need to be promoted into their 221 // into. These children (the controls) always need to be promoted into their
222 // own layers to draw on top of the accelerated video. 222 // own layers to draw on top of the accelerated video.
223 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com positingAncestor->layoutObject()->isVideo()) 223 if (currentRecursionData.m_compositingAncestor && currentRecursionData.m_com positingAncestor->layoutObject()->isVideo())
224 directReasons |= CompositingReasonVideoOverlay; 224 directReasons |= CompositingReasonVideoOverlay;
225 225
226 if (currentRecursionData.m_hasCompositedScrollingAncestor && layer->layoutOb ject()->styleRef().hasViewportConstrainedPosition())
227 directReasons |= CompositingReasonPositionFixed;
228
226 if (compositor->canBeComposited(layer)) { 229 if (compositor->canBeComposited(layer)) {
227 reasonsToComposite |= directReasons; 230 reasonsToComposite |= directReasons;
228 231
229 if (layer->isRootLayer() && compositor->rootShouldAlwaysComposite()) 232 if (layer->isRootLayer() && compositor->rootShouldAlwaysComposite())
230 reasonsToComposite |= CompositingReasonRoot; 233 reasonsToComposite |= CompositingReasonRoot;
231 234
232 if (reasonsToComposite && layer->scrollsOverflow() && !layer->needsCompo sitedScrolling()) { 235 if (reasonsToComposite && layer->scrollsOverflow() && !layer->needsCompo sitedScrolling()) {
233 // We will only set needsCompositedScrolling if we don't care about 236 // We will only set needsCompositedScrolling if we don't care about
234 // the LCD text hit, we may be able to switch to the compositor 237 // the LCD text hit, we may be able to switch to the compositor
235 // driven path if we're alread composited for other reasons and are 238 // driven path if we're alread composited for other reasons and are
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 442
440 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform(); 443 descendantHas3DTransform |= anyDescendantHas3DTransform || layer->has3DT ransform();
441 } 444 }
442 445
443 // At this point we have finished collecting all reasons to composite this l ayer. 446 // At this point we have finished collecting all reasons to composite this l ayer.
444 layer->setCompositingReasons(reasonsToComposite); 447 layer->setCompositingReasons(reasonsToComposite);
445 448
446 } 449 }
447 450
448 } // namespace blink 451 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/platform/mac/compositing/layer-creation/fixed-position-in-fixed-overflow-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698