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

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

Issue 2375203003: Parent stacking context of a backdrop filter should isolate itself (Closed)
Patch Set: Created 4 years, 2 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 /* 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 reasonsToComposite |= layer->potentialCompositingReasonsFromStyle() & CompositingReasonInlineTransform; 421 reasonsToComposite |= layer->potentialCompositingReasonsFromStyle() & CompositingReasonInlineTransform;
422 422
423 // If the original layer is composited, the reflection needs to be, too. 423 // If the original layer is composited, the reflection needs to be, too.
424 if (layer->reflectionInfo()) { 424 if (layer->reflectionInfo()) {
425 // FIXME: Shouldn't we call computeCompositingRequirements to handle a reflection overlapping with another layoutObject? 425 // FIXME: Shouldn't we call computeCompositingRequirements to handle a reflection overlapping with another layoutObject?
426 PaintLayer* reflectionLayer = layer->reflectionInfo()->reflectionLay er(); 426 PaintLayer* reflectionLayer = layer->reflectionInfo()->reflectionLay er();
427 CompositingReasons reflectionCompositingReason = willBeCompositedOrS quashed ? CompositingReasonReflectionOfCompositedParent : CompositingReasonNone; 427 CompositingReasons reflectionCompositingReason = willBeCompositedOrS quashed ? CompositingReasonReflectionOfCompositedParent : CompositingReasonNone;
428 reflectionLayer->setCompositingReasons(reflectionCompositingReason, CompositingReasonReflectionOfCompositedParent); 428 reflectionLayer->setCompositingReasons(reflectionCompositingReason, CompositingReasonReflectionOfCompositedParent);
429 } 429 }
430 430
431 if (willBeCompositedOrSquashed && layer->layoutObject()->style()->hasBle ndMode()) 431 if (willBeCompositedOrSquashed && (layer->layoutObject()->style()->hasBl endMode() || layer->layoutObject()->style()->hasBackdropFilter()))
pdr. 2016/09/29 21:54:49 Since webkit has the only shipping implementation
trchen 2016/09/29 22:23:33 Sure! I'm doing now.
432 currentRecursionData.m_hasUnisolatedCompositedBlendingDescendant = t rue; 432 currentRecursionData.m_hasUnisolatedCompositedBlendingDescendant = t rue;
433 433
434 // Tell the parent it has compositing descendants. 434 // Tell the parent it has compositing descendants.
435 if (willBeCompositedOrSquashed) 435 if (willBeCompositedOrSquashed)
436 currentRecursionData.m_subtreeIsCompositing = true; 436 currentRecursionData.m_subtreeIsCompositing = true;
437 437
438 // Turn overlap testing off for later layers if it's already off, or if we have an animating transform. 438 // Turn overlap testing off for later layers if it's already off, or if we have an animating transform.
439 // Note that if the layer clips its descendants, there's no reason to pr opagate the child animation to the parent layers. That's because 439 // Note that if the layer clips its descendants, there's no reason to pr opagate the child animation to the parent layers. That's because
440 // we know for sure the animation is contained inside the clipping recta ngle, which is already added to the overlap map. 440 // we know for sure the animation is contained inside the clipping recta ngle, which is already added to the overlap map.
441 bool isCompositedClippingLayer = canBeComposited && (reasonsToComposite & CompositingReasonClipsCompositingDescendants); 441 bool isCompositedClippingLayer = canBeComposited && (reasonsToComposite & CompositingReasonClipsCompositingDescendants);
442 bool isCompositedWithInlineTransform = reasonsToComposite & CompositingR easonInlineTransform; 442 bool isCompositedWithInlineTransform = reasonsToComposite & CompositingR easonInlineTransform;
443 if ((!childRecursionData.m_testingOverlap && !isCompositedClippingLayer) || layer->layoutObject()->style()->hasCurrentTransformAnimation() || isComposit edWithInlineTransform) 443 if ((!childRecursionData.m_testingOverlap && !isCompositedClippingLayer) || layer->layoutObject()->style()->hasCurrentTransformAnimation() || isComposit edWithInlineTransform)
444 currentRecursionData.m_testingOverlap = false; 444 currentRecursionData.m_testingOverlap = false;
445 445
446 if (childRecursionData.m_compositingAncestor == layer) 446 if (childRecursionData.m_compositingAncestor == layer)
447 overlapMap.finishCurrentOverlapTestingContext(); 447 overlapMap.finishCurrentOverlapTestingContext();
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 } // namespace blink 456 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698