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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 toRenderGrid(parent())->dirtyGrid(); | 260 toRenderGrid(parent())->dirtyGrid(); |
261 } | 261 } |
262 | 262 |
263 void RenderBox::updateFromStyle() | 263 void RenderBox::updateFromStyle() |
264 { | 264 { |
265 RenderBoxModelObject::updateFromStyle(); | 265 RenderBoxModelObject::updateFromStyle(); |
266 | 266 |
267 RenderStyle* styleToUse = style(); | 267 RenderStyle* styleToUse = style(); |
268 bool isRootObject = isDocumentElement(); | 268 bool isRootObject = isDocumentElement(); |
269 bool isViewObject = isRenderView(); | 269 bool isViewObject = isRenderView(); |
| 270 bool rootLayerScrolls = document().settings() && document().settings()->root
LayerScrolls(); |
270 | 271 |
271 // The root and the RenderView always paint their backgrounds/borders. | 272 // The root and the RenderView always paint their backgrounds/borders. |
272 if (isRootObject || isViewObject) | 273 if (isRootObject || isViewObject) |
273 setHasBoxDecorationBackground(true); | 274 setHasBoxDecorationBackground(true); |
274 | 275 |
275 setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating()); | 276 setFloating(!isOutOfFlowPositioned() && styleToUse->isFloating()); |
276 | 277 |
277 bool boxHasOverflowClip = false; | 278 bool boxHasOverflowClip = false; |
278 if (!styleToUse->isOverflowVisible() && isRenderBlock() && !isViewObject) { | 279 if (!styleToUse->isOverflowVisible() && isRenderBlock() && (rootLayerScrolls
|| !isViewObject)) { |
279 // If overflow has been propagated to the viewport, it has no effect her
e. | 280 // If overflow has been propagated to the viewport, it has no effect her
e. |
280 if (node() != document().viewportDefiningElement()) | 281 if (node() != document().viewportDefiningElement()) |
281 boxHasOverflowClip = true; | 282 boxHasOverflowClip = true; |
282 } | 283 } |
283 | 284 |
284 if (boxHasOverflowClip != hasOverflowClip()) { | 285 if (boxHasOverflowClip != hasOverflowClip()) { |
285 // FIXME: This shouldn't be required if we tracked the visual overflow | 286 // FIXME: This shouldn't be required if we tracked the visual overflow |
286 // generated by positioned children or self painting layers. crbug.com/3
45403 | 287 // generated by positioned children or self painting layers. crbug.com/3
45403 |
287 for (RenderObject* child = slowFirstChild(); child; child = child->nextS
ibling()) | 288 for (RenderObject* child = slowFirstChild(); child; child = child->nextS
ibling()) |
288 child->setMayNeedPaintInvalidation(true); | 289 child->setMayNeedPaintInvalidation(true); |
(...skipping 4118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4407 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4408 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
4408 | 4409 |
4409 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4410 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
4410 return m_rareData->m_previousBorderBoxSize; | 4411 return m_rareData->m_previousBorderBoxSize; |
4411 | 4412 |
4412 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. | 4413 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. |
4413 return previousBoundsSize; | 4414 return previousBoundsSize; |
4414 } | 4415 } |
4415 | 4416 |
4416 } // namespace blink | 4417 } // namespace blink |
OLD | NEW |