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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // fall through | 351 // fall through |
352 case ObjectFitNone: | 352 case ObjectFitNone: |
353 finalRect.setSize(intrinsicSize); | 353 finalRect.setSize(intrinsicSize); |
354 break; | 354 break; |
355 case ObjectFitFill: | 355 case ObjectFitFill: |
356 break; | 356 break; |
357 default: | 357 default: |
358 ASSERT_NOT_REACHED(); | 358 ASSERT_NOT_REACHED(); |
359 } | 359 } |
360 | 360 |
361 LayoutUnit xOffset = minimumValueForLength(style()->objectPosition().x(), co
ntentRect.width() - finalRect.width(), view()); | 361 LayoutUnit xOffset = minimumValueForLength(style()->objectPosition().x(), co
ntentRect.width() - finalRect.width()); |
362 LayoutUnit yOffset = minimumValueForLength(style()->objectPosition().y(), co
ntentRect.height() - finalRect.height(), view()); | 362 LayoutUnit yOffset = minimumValueForLength(style()->objectPosition().y(), co
ntentRect.height() - finalRect.height()); |
363 finalRect.move(xOffset, yOffset); | 363 finalRect.move(xOffset, yOffset); |
364 | 364 |
365 return finalRect; | 365 return finalRect; |
366 } | 366 } |
367 | 367 |
368 void RenderReplaced::computeIntrinsicRatioInformation(FloatSize& intrinsicSize,
double& intrinsicRatio, bool& isPercentageIntrinsicSize) const | 368 void RenderReplaced::computeIntrinsicRatioInformation(FloatSize& intrinsicSize,
double& intrinsicRatio, bool& isPercentageIntrinsicSize) const |
369 { | 369 { |
370 // If there's an embeddedContentBox() of a remote, referenced document avail
able, this code-path should never be used. | 370 // If there's an embeddedContentBox() of a remote, referenced document avail
able, this code-path should never be used. |
371 ASSERT(!embeddedContentBox()); | 371 ASSERT(!embeddedContentBox()); |
372 isPercentageIntrinsicSize = false; | 372 isPercentageIntrinsicSize = false; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 if (style()) { | 629 if (style()) { |
630 if (v) | 630 if (v) |
631 r.inflate(style()->outlineSize()); | 631 r.inflate(style()->outlineSize()); |
632 } | 632 } |
633 computeRectForRepaint(repaintContainer, r); | 633 computeRectForRepaint(repaintContainer, r); |
634 return r; | 634 return r; |
635 } | 635 } |
636 | 636 |
637 } | 637 } |
OLD | NEW |