| OLD | NEW |
| 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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1819 // FIXME: when transforms are taken into account for overflow, we will n
eed to do a layout. | 1819 // FIXME: when transforms are taken into account for overflow, we will n
eed to do a layout. |
| 1820 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasDirectReasonsForCompositing())) { | 1820 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasDirectReasonsForCompositing())) { |
| 1821 // We need to set at least SimplifiedLayout, but if PositionedMoveme
ntOnly is already set | 1821 // We need to set at least SimplifiedLayout, but if PositionedMoveme
ntOnly is already set |
| 1822 // then we actually need SimplifiedLayoutAndPositionedMovement. | 1822 // then we actually need SimplifiedLayoutAndPositionedMovement. |
| 1823 if (!hasLayer()) | 1823 if (!hasLayer()) |
| 1824 diff = StyleDifferenceLayout; // FIXME: Do this for now since Si
mplifiedLayout cannot handle updating floating objects lists. | 1824 diff = StyleDifferenceLayout; // FIXME: Do this for now since Si
mplifiedLayout cannot handle updating floating objects lists. |
| 1825 else if (diff < StyleDifferenceLayoutPositionedMovementOnly) | 1825 else if (diff < StyleDifferenceLayoutPositionedMovementOnly) |
| 1826 diff = StyleDifferenceSimplifiedLayout; | 1826 diff = StyleDifferenceSimplifiedLayout; |
| 1827 else if (diff < StyleDifferenceSimplifiedLayout) | 1827 else if (diff < StyleDifferenceSimplifiedLayout) |
| 1828 diff = StyleDifferenceSimplifiedLayoutAndPositionedMovement; | 1828 diff = StyleDifferenceSimplifiedLayoutAndPositionedMovement; |
| 1829 } else if (diff < StyleDifferenceRecompositeLayer) | 1829 } else if (diff < StyleDifferenceRecompositeLayer) { |
| 1830 diff = StyleDifferenceRecompositeLayer; | 1830 if (diff <= StyleDifferenceRecompositeLayer && (contextSensitiveProp
erties & ContextSensitivePropertyTransform3D)) |
| 1831 diff = StyleDifferenceMinRecompositeLayer; |
| 1832 } |
| 1833 |
| 1831 } | 1834 } |
| 1832 | 1835 |
| 1833 // If opacity or filters changed, and the layer does not paint into its own
separate backing, then we need to repaint (also | 1836 // If opacity or filters changed, and the layer does not paint into its own
separate backing, then we need to repaint (also |
| 1834 // ignoring text nodes) | 1837 // ignoring text nodes) |
| 1835 if (contextSensitiveProperties & ContextSensitivePropertyOpacity && diff <=
StyleDifferenceRepaintLayer) { | 1838 if (contextSensitiveProperties & ContextSensitivePropertyOpacity && diff <=
StyleDifferenceRepaintLayer) { |
| 1836 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasDirectReasonsForCompositing())) | 1839 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasDirectReasonsForCompositing())) |
| 1837 diff = StyleDifferenceRepaintLayer; | 1840 diff = StyleDifferenceRepaintLayer; |
| 1838 else if (diff < StyleDifferenceRecompositeLayer) | 1841 else if (diff < StyleDifferenceRecompositeLayer) |
| 1839 diff = StyleDifferenceRecompositeLayer; | 1842 diff = StyleDifferenceMinRecompositeLayer; |
| 1840 } | 1843 } |
| 1841 | 1844 |
| 1842 if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLaye
r() && diff <= StyleDifferenceRepaintLayer) { | 1845 if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLaye
r() && diff <= StyleDifferenceRepaintLayer) { |
| 1843 RenderLayer* layer = toRenderLayerModelObject(this)->layer(); | 1846 RenderLayer* layer = toRenderLayerModelObject(this)->layer(); |
| 1844 if (!layer->hasDirectReasonsForCompositing() || layer->paintsWithFilters
()) | 1847 if (!layer->hasDirectReasonsForCompositing() || layer->paintsWithFilters
()) |
| 1845 diff = StyleDifferenceRepaintLayer; | 1848 diff = StyleDifferenceRepaintLayer; |
| 1846 else if (diff < StyleDifferenceRecompositeLayer) | 1849 else if (diff < StyleDifferenceRecompositeLayer) |
| 1847 diff = StyleDifferenceRecompositeLayer; | 1850 diff = StyleDifferenceRecompositeLayer; |
| 1848 } | 1851 } |
| 1849 | 1852 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1959 if (updatedDiff == StyleDifferenceLayout) | 1962 if (updatedDiff == StyleDifferenceLayout) |
| 1960 setNeedsLayoutAndPrefWidthsRecalc(); | 1963 setNeedsLayoutAndPrefWidthsRecalc(); |
| 1961 else if (updatedDiff == StyleDifferenceLayoutPositionedMovementOnly) | 1964 else if (updatedDiff == StyleDifferenceLayoutPositionedMovementOnly) |
| 1962 setNeedsPositionedMovementLayout(); | 1965 setNeedsPositionedMovementLayout(); |
| 1963 else if (updatedDiff == StyleDifferenceSimplifiedLayoutAndPositionedMove
ment) { | 1966 else if (updatedDiff == StyleDifferenceSimplifiedLayoutAndPositionedMove
ment) { |
| 1964 setNeedsPositionedMovementLayout(); | 1967 setNeedsPositionedMovementLayout(); |
| 1965 setNeedsSimplifiedNormalFlowLayout(); | 1968 setNeedsSimplifiedNormalFlowLayout(); |
| 1966 } else if (updatedDiff == StyleDifferenceSimplifiedLayout) | 1969 } else if (updatedDiff == StyleDifferenceSimplifiedLayout) |
| 1967 setNeedsSimplifiedNormalFlowLayout(); | 1970 setNeedsSimplifiedNormalFlowLayout(); |
| 1968 } | 1971 } |
| 1972 if (updatedDiff > StyleDifferenceMinRecompositeLayer) { |
| 1973 TRACE_EVENT0("webkit", "setCompleteCompositing"); |
| 1974 // trigger complete compositing |
| 1975 document().setFastCompositing(false); |
| 1976 } |
| 1969 | 1977 |
| 1970 if (updatedDiff == StyleDifferenceRepaintLayer || shouldRepaintForStyleDiffe
rence(updatedDiff)) { | 1978 if (updatedDiff == StyleDifferenceRepaintLayer || shouldRepaintForStyleDiffe
rence(updatedDiff)) { |
| 1971 // Do a repaint with the new style now, e.g., for example if we go from | 1979 // Do a repaint with the new style now, e.g., for example if we go from |
| 1972 // not having an outline to having an outline. | 1980 // not having an outline to having an outline. |
| 1973 repaint(); | 1981 repaint(); |
| 1974 } | 1982 } |
| 1975 } | 1983 } |
| 1976 | 1984 |
| 1977 static inline bool rendererHasBackground(const RenderObject* renderer) | 1985 static inline bool rendererHasBackground(const RenderObject* renderer) |
| 1978 { | 1986 { |
| (...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3352 { | 3360 { |
| 3353 if (object1) { | 3361 if (object1) { |
| 3354 const WebCore::RenderObject* root = object1; | 3362 const WebCore::RenderObject* root = object1; |
| 3355 while (root->parent()) | 3363 while (root->parent()) |
| 3356 root = root->parent(); | 3364 root = root->parent(); |
| 3357 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3365 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3358 } | 3366 } |
| 3359 } | 3367 } |
| 3360 | 3368 |
| 3361 #endif | 3369 #endif |
| OLD | NEW |