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

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: removed some todos Created 5 years, 4 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 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 diff.setNeedsPaintInvalidationLayer(); 1693 diff.setNeedsPaintInvalidationLayer();
1694 } 1694 }
1695 1695
1696 // 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. 1696 // 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 (diff.filterChanged() && hasLayer()) { 1697 if (diff.filterChanged() && hasLayer()) {
1698 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer(); 1698 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
1699 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithFilters()) 1699 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithFilters())
1700 diff.setNeedsPaintInvalidationLayer(); 1700 diff.setNeedsPaintInvalidationLayer();
1701 } 1701 }
1702 1702
1703 // 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.
1704 if (diff.backdropFilterChanged() && hasLayer()) {
1705 DeprecatedPaintLayer* layer = toLayoutBoxModelObject(this)->layer();
1706 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint sWithBackdropFilters())
1707 diff.setNeedsPaintInvalidationLayer();
1708 }
1709
1703 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) { 1710 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation()) {
1704 if (style()->hasBorder() || style()->hasOutline() 1711 if (style()->hasBorder() || style()->hasOutline()
1705 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace())) 1712 || (isText() && !toLayoutText(this)->isAllCollapsibleWhitespace()))
1706 diff.setNeedsPaintInvalidationObject(); 1713 diff.setNeedsPaintInvalidationObject();
1707 } 1714 }
1708 1715
1709 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual 1716 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch ange without the actual
1710 // style changing, since it depends on whether we decide to composite these elements. When the 1717 // style changing, since it depends on whether we decide to composite these elements. When the
1711 // layer status of one of these elements changes, we need to force a layout. 1718 // layer status of one of these elements changes, we need to force a layout.
1712 if (!diff.needsFullLayout() && style() && isBoxModelObject()) { 1719 if (!diff.needsFullLayout() && style() && isBoxModelObject()) {
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 const blink::LayoutObject* root = object1; 3410 const blink::LayoutObject* root = object1;
3404 while (root->parent()) 3411 while (root->parent())
3405 root = root->parent(); 3412 root = root->parent();
3406 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3413 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3407 } else { 3414 } else {
3408 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3415 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3409 } 3416 }
3410 } 3417 }
3411 3418
3412 #endif 3419 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698