| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 return false; | 159 return false; |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool RenderReplaced::needsPreferredWidthsRecalculation() const | 162 bool RenderReplaced::needsPreferredWidthsRecalculation() const |
| 163 { | 163 { |
| 164 // If the height is a percentage and the width is auto, then the containingB
locks's height changing can cause | 164 // If the height is a percentage and the width is auto, then the containingB
locks's height changing can cause |
| 165 // this node to change it's preferred width because it maintains aspect rati
o. | 165 // this node to change it's preferred width because it maintains aspect rati
o. |
| 166 return hasRelativeLogicalHeight() && style()->logicalWidth().isAuto() && !ha
sAutoHeightOrContainingBlockWithAutoHeight(); | 166 return hasRelativeLogicalHeight() && style()->logicalWidth().isAuto() && !ha
sAutoHeightOrContainingBlockWithAutoHeight(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 static inline bool rendererHasAspectRatio(const RenderObject* renderer) | 169 static inline bool rendererHasAspectRatio(const LayoutObject* renderer) |
| 170 { | 170 { |
| 171 ASSERT(renderer); | 171 ASSERT(renderer); |
| 172 return renderer->isImage() || renderer->isCanvas() || renderer->isVideo(); | 172 return renderer->isImage() || renderer->isCanvas() || renderer->isVideo(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void RenderReplaced::computeAspectRatioInformationForRenderBox(RenderBox* conten
tRenderer, FloatSize& constrainedSize, double& intrinsicRatio) const | 175 void RenderReplaced::computeAspectRatioInformationForRenderBox(RenderBox* conten
tRenderer, FloatSize& constrainedSize, double& intrinsicRatio) const |
| 176 { | 176 { |
| 177 FloatSize intrinsicSize; | 177 FloatSize intrinsicSize; |
| 178 if (contentRenderer) { | 178 if (contentRenderer) { |
| 179 contentRenderer->computeIntrinsicRatioInformation(intrinsicSize, intrins
icRatio); | 179 contentRenderer->computeIntrinsicRatioInformation(intrinsicSize, intrins
icRatio); |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 return LayoutRect(); | 502 return LayoutRect(); |
| 503 | 503 |
| 504 // The selectionRect can project outside of the overflowRect, so take their
union | 504 // The selectionRect can project outside of the overflowRect, so take their
union |
| 505 // for paint invalidation to avoid selection painting glitches. | 505 // for paint invalidation to avoid selection painting glitches. |
| 506 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 506 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
| 507 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); | 507 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); |
| 508 return r; | 508 return r; |
| 509 } | 509 } |
| 510 | 510 |
| 511 } | 511 } |
| OLD | NEW |