| 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 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock()
; | 1993 RenderBlock* block = toRenderBlock(parent())->createAnonymousBlock()
; |
| 1994 RenderObjectChildList* childlist = parent()->virtualChildren(); | 1994 RenderObjectChildList* childlist = parent()->virtualChildren(); |
| 1995 childlist->insertChildNode(parent(), block, this); | 1995 childlist->insertChildNode(parent(), block, this); |
| 1996 block->children()->appendChildNode(block, childlist->removeChildNode
(parent(), this)); | 1996 block->children()->appendChildNode(block, childlist->removeChildNode
(parent(), this)); |
| 1997 } | 1997 } |
| 1998 } | 1998 } |
| 1999 } | 1999 } |
| 2000 | 2000 |
| 2001 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign
ed contextSensitiveProperties) const | 2001 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign
ed contextSensitiveProperties) const |
| 2002 { | 2002 { |
| 2003 // FIXME: The calls to hasDirectReasonsForCompositing are using state that m
ay not be up to date. | |
| 2004 DisableCompositingQueryAsserts disabler; | |
| 2005 | |
| 2006 if (contextSensitiveProperties & ContextSensitivePropertyTransform && isSVG(
)) | 2003 if (contextSensitiveProperties & ContextSensitivePropertyTransform && isSVG(
)) |
| 2007 diff.setNeedsFullLayout(); | 2004 diff.setNeedsFullLayout(); |
| 2008 | 2005 |
| 2009 // If transform changed, and the layer does not paint into its own separate
backing, then we need to repaint. | 2006 // If transform changed, and the layer does not paint into its own separate
backing, then we need to repaint. |
| 2010 if (contextSensitiveProperties & ContextSensitivePropertyTransform) { | 2007 if (contextSensitiveProperties & ContextSensitivePropertyTransform) { |
| 2011 // Text nodes share style with their parents but transforms don't apply
to them, | 2008 // Text nodes share style with their parents but transforms don't apply
to them, |
| 2012 // hence the !isText() check. | 2009 // hence the !isText() check. |
| 2013 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasDirectReasonsForCompositing())) | 2010 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->styleDeterminedCompositingReasons())) |
| 2014 diff.setNeedsRepaintLayer(); | 2011 diff.setNeedsRepaintLayer(); |
| 2015 else | 2012 else |
| 2016 diff.setNeedsRecompositeLayer(); | 2013 diff.setNeedsRecompositeLayer(); |
| 2017 } | 2014 } |
| 2018 | 2015 |
| 2019 // If opacity or zIndex changed, and the layer does not paint into its own s
eparate backing, then we need to repaint (also | 2016 // If opacity or zIndex changed, and the layer does not paint into its own s
eparate backing, then we need to repaint (also |
| 2020 // ignoring text nodes) | 2017 // ignoring text nodes) |
| 2021 if (contextSensitiveProperties & (ContextSensitivePropertyOpacity | ContextS
ensitivePropertyZIndex)) { | 2018 if (contextSensitiveProperties & (ContextSensitivePropertyOpacity | ContextS
ensitivePropertyZIndex)) { |
| 2022 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasDirectReasonsForCompositing())) | 2019 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->styleDeterminedCompositingReasons())) |
| 2023 diff.setNeedsRepaintLayer(); | 2020 diff.setNeedsRepaintLayer(); |
| 2024 else | 2021 else |
| 2025 diff.setNeedsRecompositeLayer(); | 2022 diff.setNeedsRecompositeLayer(); |
| 2026 } | 2023 } |
| 2027 | 2024 |
| 2028 // 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. | 2025 // 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. |
| 2029 if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLaye
r()) { | 2026 if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLaye
r()) { |
| 2030 RenderLayer* layer = toRenderLayerModelObject(this)->layer(); | 2027 RenderLayer* layer = toRenderLayerModelObject(this)->layer(); |
| 2031 if (!layer->hasDirectReasonsForCompositing() || layer->paintsWithFilters
()) | 2028 if (!layer->styleDeterminedCompositingReasons() || layer->paintsWithFilt
ers()) |
| 2032 diff.setNeedsRepaintLayer(); | 2029 diff.setNeedsRepaintLayer(); |
| 2033 else | 2030 else |
| 2034 diff.setNeedsRecompositeLayer(); | 2031 diff.setNeedsRecompositeLayer(); |
| 2035 } | 2032 } |
| 2036 | 2033 |
| 2037 if ((contextSensitiveProperties & ContextSensitivePropertyTextOrColor) && !d
iff.needsRepaint() | 2034 if ((contextSensitiveProperties & ContextSensitivePropertyTextOrColor) && !d
iff.needsRepaint() |
| 2038 && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor()) | 2035 && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor()) |
| 2039 diff.setNeedsRepaintObject(); | 2036 diff.setNeedsRepaintObject(); |
| 2040 | 2037 |
| 2041 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch
ange without the actual | 2038 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch
ange without the actual |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3557 { | 3554 { |
| 3558 if (object1) { | 3555 if (object1) { |
| 3559 const WebCore::RenderObject* root = object1; | 3556 const WebCore::RenderObject* root = object1; |
| 3560 while (root->parent()) | 3557 while (root->parent()) |
| 3561 root = root->parent(); | 3558 root = root->parent(); |
| 3562 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3559 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3563 } | 3560 } |
| 3564 } | 3561 } |
| 3565 | 3562 |
| 3566 #endif | 3563 #endif |
| OLD | NEW |