| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 138 } |
| 139 | 139 |
| 140 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyl
e) | 140 void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyl
e) |
| 141 { | 141 { |
| 142 RenderStyle* oldStyle = style(); | 142 RenderStyle* oldStyle = style(); |
| 143 if (oldStyle) { | 143 if (oldStyle) { |
| 144 // The background of the root element or the body element could propagat
e up to | 144 // The background of the root element or the body element could propagat
e up to |
| 145 // the canvas. Just dirty the entire canvas when our style changes subs
tantially. | 145 // the canvas. Just dirty the entire canvas when our style changes subs
tantially. |
| 146 if (diff >= StyleDifferenceRepaint && node() && | 146 if (diff >= StyleDifferenceRepaint && node() && |
| 147 (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { | 147 (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { |
| 148 | 148 view()->repaint(); |
| 149 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() || diff !=
StyleDifferenceLayout) | |
| 150 view()->repaint(); | |
| 151 | 149 |
| 152 if (oldStyle->hasEntirelyFixedBackground() != newStyle->hasEntirelyF
ixedBackground()) | 150 if (oldStyle->hasEntirelyFixedBackground() != newStyle->hasEntirelyF
ixedBackground()) |
| 153 view()->compositor()->rootFixedBackgroundsChanged(); | 151 view()->compositor()->rootFixedBackgroundsChanged(); |
| 154 } | 152 } |
| 155 | 153 |
| 156 // When a layout hint happens and an object's position style changes, we
have to do a layout | 154 // When a layout hint happens and an object's position style changes, we
have to do a layout |
| 157 // to dirty the render tree using the old position value now. | 155 // to dirty the render tree using the old position value now. |
| 158 if (diff == StyleDifferenceLayout && parent() && oldStyle->position() !=
newStyle->position()) { | 156 if (diff == StyleDifferenceLayout && parent() && oldStyle->position() !=
newStyle->position()) { |
| 159 markContainingBlocksForLayout(); | 157 markContainingBlocksForLayout(); |
| 160 if (oldStyle->position() == StaticPosition) | 158 if (oldStyle->position() == StaticPosition) |
| (...skipping 4531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4692 return 0; | 4690 return 0; |
| 4693 | 4691 |
| 4694 if (!layoutState && !flowThreadContainingBlock()) | 4692 if (!layoutState && !flowThreadContainingBlock()) |
| 4695 return 0; | 4693 return 0; |
| 4696 | 4694 |
| 4697 RenderBlock* containerBlock = containingBlock(); | 4695 RenderBlock* containerBlock = containingBlock(); |
| 4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4696 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4699 } | 4697 } |
| 4700 | 4698 |
| 4701 } // namespace WebCore | 4699 } // namespace WebCore |
| OLD | NEW |