| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 RenderBoxModelObject::updateFromStyle(); | 121 RenderBoxModelObject::updateFromStyle(); |
| 122 | 122 |
| 123 RenderStyle* styleToUse = style(); | 123 RenderStyle* styleToUse = style(); |
| 124 bool isRootObject = isDocumentElement(); | 124 bool isRootObject = isDocumentElement(); |
| 125 bool isViewObject = isRenderView(); | 125 bool isViewObject = isRenderView(); |
| 126 | 126 |
| 127 // The root and the RenderView always paint their backgrounds/borders. | 127 // The root and the RenderView always paint their backgrounds/borders. |
| 128 if (isRootObject || isViewObject) | 128 if (isRootObject || isViewObject) |
| 129 setHasBoxDecorationBackground(true); | 129 setHasBoxDecorationBackground(true); |
| 130 | 130 |
| 131 bool boxHasOverflowClip = false; | 131 // TODO(esprehn): Why do we not want to set this on the RenderView? |
| 132 if (!styleToUse->isOverflowVisible() && isRenderBlock() && !isViewObject) { | 132 if (isRenderBlock() && !isViewObject) |
| 133 // If overflow has been propagated to the viewport, it has no effect her
e. | 133 setHasOverflowClip(!styleToUse->isOverflowVisible()); |
| 134 if (node() != document().viewportDefiningElement()) | |
| 135 boxHasOverflowClip = true; | |
| 136 } | |
| 137 | 134 |
| 138 setHasOverflowClip(boxHasOverflowClip); | |
| 139 setHasTransform(styleToUse->hasTransformRelatedProperty()); | 135 setHasTransform(styleToUse->hasTransformRelatedProperty()); |
| 140 } | 136 } |
| 141 | 137 |
| 142 void RenderBox::layout() | 138 void RenderBox::layout() |
| 143 { | 139 { |
| 144 ASSERT(needsLayout()); | 140 ASSERT(needsLayout()); |
| 145 | 141 |
| 146 RenderObject* child = slowFirstChild(); | 142 RenderObject* child = slowFirstChild(); |
| 147 if (!child) { | 143 if (!child) { |
| 148 clearNeedsLayout(); | 144 clearNeedsLayout(); |
| (...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2955 | 2951 |
| 2956 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 2952 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 2957 { | 2953 { |
| 2958 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 2954 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 2959 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 2955 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 2960 ASSERT(hasBackground == style.hasBackground()); | 2956 ASSERT(hasBackground == style.hasBackground()); |
| 2961 hasBorder = style.hasBorder(); | 2957 hasBorder = style.hasBorder(); |
| 2962 } | 2958 } |
| 2963 | 2959 |
| 2964 } // namespace blink | 2960 } // namespace blink |
| OLD | NEW |