| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 const ComputedStyle& newStyle) { | 183 const ComputedStyle& newStyle) { |
| 184 const ComputedStyle* oldStyle = style(); | 184 const ComputedStyle* oldStyle = style(); |
| 185 if (oldStyle) { | 185 if (oldStyle) { |
| 186 LayoutFlowThread* flowThread = flowThreadContainingBlock(); | 186 LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
| 187 if (flowThread && flowThread != this) | 187 if (flowThread && flowThread != this) |
| 188 flowThread->flowThreadDescendantStyleWillChange(this, diff, newStyle); | 188 flowThread->flowThreadDescendantStyleWillChange(this, diff, newStyle); |
| 189 | 189 |
| 190 // The background of the root element or the body element could propagate up | 190 // The background of the root element or the body element could propagate up |
| 191 // to the canvas. Just dirty the entire canvas when our style changes | 191 // to the canvas. Just dirty the entire canvas when our style changes |
| 192 // substantially. | 192 // substantially. |
| 193 if ((diff.needsPaintInvalidation() || diff.needsLayout()) && node() && | 193 if ((diff.needsFullPaintInvalidation() || diff.needsLayout()) && node() && |
| 194 (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { | 194 (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) { |
| 195 view()->setShouldDoFullPaintInvalidation(); | 195 view()->setShouldDoFullPaintInvalidation(); |
| 196 | 196 |
| 197 if (oldStyle->hasEntirelyFixedBackground() != | 197 if (oldStyle->hasEntirelyFixedBackground() != |
| 198 newStyle.hasEntirelyFixedBackground()) | 198 newStyle.hasEntirelyFixedBackground()) |
| 199 view()->compositor()->setNeedsUpdateFixedBackground(); | 199 view()->compositor()->setNeedsUpdateFixedBackground(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 // When a layout hint happens and an object's position style changes, we | 202 // When a layout hint happens and an object's position style changes, we |
| 203 // have to do a layout to dirty the layout tree using the old position | 203 // have to do a layout to dirty the layout tree using the old position |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // the dimension we want to preserve. | 276 // the dimension we want to preserve. |
| 277 ScrollOffset oldOffset = scrollableArea->getScrollOffset(); | 277 ScrollOffset oldOffset = scrollableArea->getScrollOffset(); |
| 278 if (oldOffset.width() || oldOffset.height()) { | 278 if (oldOffset.width() || oldOffset.height()) { |
| 279 ScrollOffset newOffset = oldOffset.scaledBy(newStyle.effectiveZoom() / | 279 ScrollOffset newOffset = oldOffset.scaledBy(newStyle.effectiveZoom() / |
| 280 oldStyle->effectiveZoom()); | 280 oldStyle->effectiveZoom()); |
| 281 scrollableArea->setScrollOffsetUnconditionally(newOffset); | 281 scrollableArea->setScrollOffsetUnconditionally(newOffset); |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 | 284 |
| 285 // Our opaqueness might have changed without triggering layout. | 285 // Our opaqueness might have changed without triggering layout. |
| 286 if (diff.needsPaintInvalidation()) { | 286 if (diff.needsFullPaintInvalidation()) { |
| 287 LayoutObject* parentToInvalidate = parent(); | 287 LayoutObject* parentToInvalidate = parent(); |
| 288 for (unsigned i = 0; | 288 for (unsigned i = 0; |
| 289 i < backgroundObscurationTestMaxDepth && parentToInvalidate; ++i) { | 289 i < backgroundObscurationTestMaxDepth && parentToInvalidate; ++i) { |
| 290 parentToInvalidate->invalidateBackgroundObscurationStatus(); | 290 parentToInvalidate->invalidateBackgroundObscurationStatus(); |
| 291 parentToInvalidate = parentToInvalidate->parent(); | 291 parentToInvalidate = parentToInvalidate->parent(); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 if (isDocumentElement() || isBody()) { | 295 if (isDocumentElement() || isBody()) { |
| 296 document().view()->recalculateScrollbarOverlayColorTheme( | 296 document().view()->recalculateScrollbarOverlayColorTheme( |
| (...skipping 5433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5730 | 5730 |
| 5731 void LayoutBox::MutableForPainting:: | 5731 void LayoutBox::MutableForPainting:: |
| 5732 savePreviousContentBoxSizeAndLayoutOverflowRect() { | 5732 savePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5733 auto& rareData = layoutBox().ensureRareData(); | 5733 auto& rareData = layoutBox().ensureRareData(); |
| 5734 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; | 5734 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; |
| 5735 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); | 5735 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); |
| 5736 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); | 5736 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); |
| 5737 } | 5737 } |
| 5738 | 5738 |
| 5739 } // namespace blink | 5739 } // namespace blink |
| OLD | NEW |