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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 // Changing this to return cDefaultWidth, will affect lots of test resul ts. Eg. some tests assume that a blank <img> tag (which implies width/height=aut o) | 381 // Changing this to return cDefaultWidth, will affect lots of test resul ts. Eg. some tests assume that a blank <img> tag (which implies width/height=aut o) |
382 // has no intrinsic size, which is wrong per CSS 2.1, but matches our be havior since a long time. | 382 // has no intrinsic size, which is wrong per CSS 2.1, but matches our be havior since a long time. |
383 } | 383 } |
384 | 384 |
385 return computeReplacedLogicalWidthRespectingMinMaxWidth(intrinsicLogicalWidt h(), shouldComputePreferred); | 385 return computeReplacedLogicalWidthRespectingMinMaxWidth(intrinsicLogicalWidt h(), shouldComputePreferred); |
386 } | 386 } |
387 | 387 |
388 LayoutUnit RenderReplaced::computeReplacedLogicalHeight() const | 388 LayoutUnit RenderReplaced::computeReplacedLogicalHeight() const |
389 { | 389 { |
390 // 10.5 Content height: the 'height' property: http://www.w3.org/TR/CSS21/vi sudet.html#propdef-height | 390 // 10.5 Content height: the 'height' property: http://www.w3.org/TR/CSS21/vi sudet.html#propdef-height |
391 if (hasReplacedLogicalHeight()) | 391 if (hasReplacedLogicalHeight()) { |
ojan
2013/04/11 03:21:46
It doesn't look like you changed anything here...a
cbiesinger
2013/04/12 01:17:52
Leftover from some debugging, I think. Reverted.
| |
392 return computeReplacedLogicalHeightRespectingMinMaxHeight(computeReplace dLogicalHeightUsing(style()->logicalHeight())); | 392 LayoutUnit height = computeReplacedLogicalHeightUsing(style()->logicalHe ight()); |
393 return computeReplacedLogicalHeightRespectingMinMaxHeight(height); | |
394 } | |
393 | 395 |
394 RenderBox* contentRenderer = embeddedContentBox(); | 396 RenderBox* contentRenderer = embeddedContentBox(); |
395 | 397 |
396 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html #inline-replaced-height | 398 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html #inline-replaced-height |
397 bool isPercentageIntrinsicSize = false; | 399 bool isPercentageIntrinsicSize = false; |
398 double intrinsicRatio = 0; | 400 double intrinsicRatio = 0; |
399 FloatSize constrainedSize; | 401 FloatSize constrainedSize; |
400 computeAspectRatioInformationForRenderBox(contentRenderer, constrainedSize, intrinsicRatio, isPercentageIntrinsicSize); | 402 computeAspectRatioInformationForRenderBox(contentRenderer, constrainedSize, intrinsicRatio, isPercentageIntrinsicSize); |
401 | 403 |
402 bool widthIsAuto = style()->logicalWidth().isAuto(); | 404 bool widthIsAuto = style()->logicalWidth().isAuto(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
573 return r; | 575 return r; |
574 } | 576 } |
575 | 577 |
576 void RenderReplaced::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | 578 void RenderReplaced::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const |
577 { | 579 { |
578 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; | 580 MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Rendering) ; |
579 RenderBox::reportMemoryUsage(memoryObjectInfo); | 581 RenderBox::reportMemoryUsage(memoryObjectInfo); |
580 } | 582 } |
581 | 583 |
582 } | 584 } |
OLD | NEW |