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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1299323005: blink: Add backdrop-filter support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: one more Created 5 years, 3 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 diff.setNeedsPaintInvalidationLayer(); 1694 diff.setNeedsPaintInvalidationLayer();
1695 } 1695 }
1696 1696
1697 // If filter changed, and the layer does not paint into its own separate bac king or it paints with filters, then we need to invalidate paints. 1697 // If filter changed, and the layer does not paint into its own separate bac king or it paints with filters, then we need to invalidate paints.
1698 if (diff.filterChanged() && hasLayer()) { 1698 if (diff.filterChanged() && hasLayer()) {
1699 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer(); 1699 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
1700 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithFilters()) 1700 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithFilters())
1701 diff.setNeedsPaintInvalidationLayer(); 1701 diff.setNeedsPaintInvalidationLayer();
1702 } 1702 }
1703 1703
1704 // If backdrop filter changed, and the layer does not paint into its own sep arate backing or it paints with filters, then we need to invalidate paints.
1705 if (diff.backdropFilterChanged() && hasLayer()) {
1706 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
1707 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithBackdropFilters())
1708 diff.setNeedsPaintInvalidationLayer();
1709 }
1710
1704 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { 1711 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
1705 if (style()->hasBorder() || style()->hasOutline() 1712 if (style()->hasBorder() || style()->hasOutline()
1706 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) 1713 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace()))
1707 diff.setNeedsPaintInvalidationObject(); 1714 diff.setNeedsPaintInvalidationObject();
1708 } 1715 }
1709 1716
1710 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual 1717 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual
1711 // style changing, since it depends on whether we decide to composite these elements. When the 1718 // style changing, since it depends on whether we decide to composite these elements. When the
1712 // layer status of one of these elements changes, we need to force a layout. 1719 // layer status of one of these elements changes, we need to force a layout.
1713 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { 1720 if (!diff.needsFullLayout() && style() && isBoxModelObject()) {
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
3384 const blink::LayoutObject* root = object1; 3391 const blink::LayoutObject* root = object1;
3385 while (root->parent()) 3392 while (root->parent())
3386 root = root->parent(); 3393 root = root->parent();
3387 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3394 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3388 } else { 3395 } else {
3389 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3396 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3390 } 3397 }
3391 } 3398 }
3392 3399
3393 #endif 3400 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698