| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 } | 150 } |
| 151 | 151 |
| 152 if (isOutOfFlowPositioned()) | 152 if (isOutOfFlowPositioned()) |
| 153 LayoutBlock::removePositionedObject(this); | 153 LayoutBlock::removePositionedObject(this); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void LayoutBox::styleWillChange(StyleDifference diff, const ComputedStyle& newSt
yle) | 156 void LayoutBox::styleWillChange(StyleDifference diff, const ComputedStyle& newSt
yle) |
| 157 { | 157 { |
| 158 const ComputedStyle* oldStyle = style(); | 158 const ComputedStyle* oldStyle = style(); |
| 159 if (oldStyle) { | 159 if (oldStyle) { |
| 160 LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
| 161 if (flowThread && flowThread != this) |
| 162 flowThread->flowThreadDescendantStyleWillChange(this, diff, newStyle
); |
| 163 |
| 160 // The background of the root element or the body element could propagat
e up to | 164 // The background of the root element or the body element could propagat
e up to |
| 161 // the canvas. Just dirty the entire canvas when our style changes subst
antially. | 165 // the canvas. Just dirty the entire canvas when our style changes subst
antially. |
| 162 if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node() | 166 if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node() |
| 163 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { | 167 && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { |
| 164 view()->setShouldDoFullPaintInvalidation(); | 168 view()->setShouldDoFullPaintInvalidation(); |
| 165 | 169 |
| 166 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFi
xedBackground()) | 170 if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFi
xedBackground()) |
| 167 view()->compositor()->setNeedsUpdateFixedBackground(); | 171 view()->compositor()->setNeedsUpdateFixedBackground(); |
| 168 } | 172 } |
| 169 | 173 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 document().view()->recalculateScrollbarOverlayStyle(); | 240 document().view()->recalculateScrollbarOverlayStyle(); |
| 237 document().view()->recalculateCustomScrollbarStyle(); | 241 document().view()->recalculateCustomScrollbarStyle(); |
| 238 } | 242 } |
| 239 updateShapeOutsideInfoAfterStyleChange(*style(), oldStyle); | 243 updateShapeOutsideInfoAfterStyleChange(*style(), oldStyle); |
| 240 updateGridPositionAfterStyleChange(oldStyle); | 244 updateGridPositionAfterStyleChange(oldStyle); |
| 241 | 245 |
| 242 if (LayoutMultiColumnSpannerPlaceholder* placeholder = this->spannerPlacehol
der()) | 246 if (LayoutMultiColumnSpannerPlaceholder* placeholder = this->spannerPlacehol
der()) |
| 243 placeholder->layoutObjectInFlowThreadStyleDidChange(oldStyle); | 247 placeholder->layoutObjectInFlowThreadStyleDidChange(oldStyle); |
| 244 | 248 |
| 245 updateSlowRepaintStatusAfterStyleChange(); | 249 updateSlowRepaintStatusAfterStyleChange(); |
| 250 |
| 251 if (oldStyle) { |
| 252 LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
| 253 if (flowThread && flowThread != this) |
| 254 flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle
); |
| 255 } |
| 246 } | 256 } |
| 247 | 257 |
| 248 void LayoutBox::updateSlowRepaintStatusAfterStyleChange() | 258 void LayoutBox::updateSlowRepaintStatusAfterStyleChange() |
| 249 { | 259 { |
| 250 if (!frameView()) | 260 if (!frameView()) |
| 251 return; | 261 return; |
| 252 | 262 |
| 253 // On low-powered/mobile devices, preventing blitting on a scroll can cause
noticeable delays | 263 // On low-powered/mobile devices, preventing blitting on a scroll can cause
noticeable delays |
| 254 // when scrolling a page with a fixed background image. As an optimization,
assuming there are | 264 // when scrolling a page with a fixed background image. As an optimization,
assuming there are |
| 255 // no fixed positoned elements on the page, we can acclerate scrolling (via
blitting) if we | 265 // no fixed positoned elements on the page, we can acclerate scrolling (via
blitting) if we |
| (...skipping 4480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4736 StyleImage* borderImage = style()->borderImage().image(); | 4746 StyleImage* borderImage = style()->borderImage().image(); |
| 4737 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4747 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
| 4738 } | 4748 } |
| 4739 | 4749 |
| 4740 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4750 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
| 4741 { | 4751 { |
| 4742 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4752 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
| 4743 } | 4753 } |
| 4744 | 4754 |
| 4745 } // namespace blink | 4755 } // namespace blink |
| OLD | NEW |