| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 bool had3DTransform = has3DTransform(); | 177 bool had3DTransform = has3DTransform(); |
| 178 | 178 |
| 179 bool hadTransform = m_transform; | 179 bool hadTransform = m_transform; |
| 180 if (localHasTransform != hadTransform) { | 180 if (localHasTransform != hadTransform) { |
| 181 if (localHasTransform) | 181 if (localHasTransform) |
| 182 m_transform = adoptPtr(new TransformationMatrix); | 182 m_transform = adoptPtr(new TransformationMatrix); |
| 183 else | 183 else |
| 184 m_transform.clear(); | 184 m_transform.clear(); |
| 185 | 185 |
| 186 // Layers with transforms act as clip rects roots, so clear the cached c
lip rects here. | 186 // Layers with transforms act as clip rects roots, so clear the cached c
lip rects here. |
| 187 layer()->clipper().clearClipRectsIncludingDescendants(); | 187 if (layer()) |
| 188 } else if (localHasTransform) { | 188 layer()->clipper().clearClipRectsIncludingDescendants(); |
| 189 } else if (localHasTransform && layer()) { |
| 189 layer()->clipper().clearClipRectsIncludingDescendants(AbsoluteClipRects)
; | 190 layer()->clipper().clearClipRectsIncludingDescendants(AbsoluteClipRects)
; |
| 190 } | 191 } |
| 191 | 192 |
| 192 updateTransformationMatrix(); | 193 updateTransformationMatrix(); |
| 193 | 194 |
| 194 if (had3DTransform != has3DTransform()) | 195 if (layer() && had3DTransform != has3DTransform()) |
| 195 layer()->dirty3DTransformedDescendantStatus(); | 196 layer()->dirty3DTransformedDescendantStatus(); |
| 196 } | 197 } |
| 197 | 198 |
| 198 // TODO(ojan): Inline this into styleDidChange, | 199 // TODO(ojan): Inline this into styleDidChange, |
| 199 void RenderBox::updateFromStyle() | 200 void RenderBox::updateFromStyle() |
| 200 { | 201 { |
| 201 RenderStyle* styleToUse = style(); | 202 RenderStyle* styleToUse = style(); |
| 202 | 203 |
| 203 setHasBoxDecorationBackground(hasBackground() || styleToUse->hasBorder() ||
styleToUse->boxShadow()); | 204 setHasBoxDecorationBackground(hasBackground() || styleToUse->hasBorder() ||
styleToUse->boxShadow()); |
| 204 setInline(styleToUse->isDisplayInlineType()); | 205 setInline(styleToUse->isDisplayInlineType()); |
| (...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3074 | 3075 |
| 3075 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3076 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3076 { | 3077 { |
| 3077 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3078 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3078 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3079 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3079 ASSERT(hasBackground == style.hasBackground()); | 3080 ASSERT(hasBackground == style.hasBackground()); |
| 3080 hasBorder = style.hasBorder(); | 3081 hasBorder = style.hasBorder(); |
| 3081 } | 3082 } |
| 3082 | 3083 |
| 3083 } // namespace blink | 3084 } // namespace blink |
| OLD | NEW |