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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 240253007: Don't always repaint on zIndex change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 if (!hasLayer()) 1866 if (!hasLayer())
1867 diff = StyleDifferenceLayout; // FIXME: Do this for now since Si mplifiedLayout cannot handle updating floating objects lists. 1867 diff = StyleDifferenceLayout; // FIXME: Do this for now since Si mplifiedLayout cannot handle updating floating objects lists.
1868 else if (diff < StyleDifferenceLayoutPositionedMovementOnly) 1868 else if (diff < StyleDifferenceLayoutPositionedMovementOnly)
1869 diff = StyleDifferenceSimplifiedLayout; 1869 diff = StyleDifferenceSimplifiedLayout;
1870 else if (diff < StyleDifferenceSimplifiedLayout) 1870 else if (diff < StyleDifferenceSimplifiedLayout)
1871 diff = StyleDifferenceSimplifiedLayoutAndPositionedMovement; 1871 diff = StyleDifferenceSimplifiedLayoutAndPositionedMovement;
1872 } else if (diff < StyleDifferenceRecompositeLayer) 1872 } else if (diff < StyleDifferenceRecompositeLayer)
1873 diff = StyleDifferenceRecompositeLayer; 1873 diff = StyleDifferenceRecompositeLayer;
1874 } 1874 }
1875 1875
1876 // If opacity or filters changed, and the layer does not paint into its own separate backing, then we need to repaint (also 1876 // If opacity or zIndex changed, and the layer does not paint into its own s eparate backing, then we need to repaint (also
1877 // ignoring text nodes) 1877 // ignoring text nodes)
1878 if (contextSensitiveProperties & ContextSensitivePropertyOpacity && diff <= StyleDifferenceRepaintLayer) { 1878 if ((contextSensitiveProperties & (ContextSensitivePropertyOpacity | Context SensitivePropertyZIndex)) && diff <= StyleDifferenceRepaintLayer) {
1879 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer( )->hasDirectReasonsForCompositing())) 1879 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer( )->hasDirectReasonsForCompositing()))
1880 diff = StyleDifferenceRepaintLayer; 1880 diff = StyleDifferenceRepaintLayer;
1881 else if (diff < StyleDifferenceRecompositeLayer) 1881 else if (diff < StyleDifferenceRecompositeLayer)
1882 diff = StyleDifferenceRecompositeLayer; 1882 diff = StyleDifferenceRecompositeLayer;
1883 } 1883 }
1884 1884
1885 // If filter changed, and the layer does not paint into its own separate bac king or it paints with filters, then we need to repaint.
1885 if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLaye r() && diff <= StyleDifferenceRepaintLayer) { 1886 if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLaye r() && diff <= StyleDifferenceRepaintLayer) {
1886 RenderLayer* layer = toRenderLayerModelObject(this)->layer(); 1887 RenderLayer* layer = toRenderLayerModelObject(this)->layer();
1887 if (!layer->hasDirectReasonsForCompositing() || layer->paintsWithFilters ()) 1888 if (!layer->hasDirectReasonsForCompositing() || layer->paintsWithFilters ())
1888 diff = StyleDifferenceRepaintLayer; 1889 diff = StyleDifferenceRepaintLayer;
1889 else if (diff < StyleDifferenceRecompositeLayer) 1890 else if (diff < StyleDifferenceRecompositeLayer)
1890 diff = StyleDifferenceRecompositeLayer; 1891 diff = StyleDifferenceRecompositeLayer;
1891 } 1892 }
1892 1893
1893 if ((contextSensitiveProperties & ContextSensitivePropertyTextOrColor) && di ff < StyleDifferenceRepaint 1894 if ((contextSensitiveProperties & ContextSensitivePropertyTextOrColor) && di ff < StyleDifferenceRepaint
1894 && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor()) 1895 && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor())
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
3387 { 3388 {
3388 if (object1) { 3389 if (object1) {
3389 const WebCore::RenderObject* root = object1; 3390 const WebCore::RenderObject* root = object1;
3390 while (root->parent()) 3391 while (root->parent())
3391 root = root->parent(); 3392 root = root->parent();
3392 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3393 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3393 } 3394 }
3394 } 3395 }
3395 3396
3396 #endif 3397 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698