| 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 if (objectFit != ObjectFitScaleDown || | 597 if (objectFit != ObjectFitScaleDown || |
| 598 finalRect.width() <= intrinsicSize.width()) | 598 finalRect.width() <= intrinsicSize.width()) |
| 599 break; | 599 break; |
| 600 // fall through | 600 // fall through |
| 601 case ObjectFitNone: | 601 case ObjectFitNone: |
| 602 finalRect.setSize(intrinsicSize); | 602 finalRect.setSize(intrinsicSize); |
| 603 break; | 603 break; |
| 604 case ObjectFitFill: | 604 case ObjectFitFill: |
| 605 break; | 605 break; |
| 606 default: | 606 default: |
| 607 ASSERT_NOT_REACHED(); | 607 NOTREACHED(); |
| 608 } | 608 } |
| 609 | 609 |
| 610 LayoutUnit xOffset = minimumValueForLength( | 610 LayoutUnit xOffset = minimumValueForLength( |
| 611 style()->objectPosition().x(), contentRect.width() - finalRect.width()); | 611 style()->objectPosition().x(), contentRect.width() - finalRect.width()); |
| 612 LayoutUnit yOffset = minimumValueForLength( | 612 LayoutUnit yOffset = minimumValueForLength( |
| 613 style()->objectPosition().y(), contentRect.height() - finalRect.height()); | 613 style()->objectPosition().y(), contentRect.height() - finalRect.height()); |
| 614 finalRect.move(xOffset, yOffset); | 614 finalRect.move(xOffset, yOffset); |
| 615 | 615 |
| 616 return finalRect; | 616 return finalRect; |
| 617 } | 617 } |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone); | 927 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone); |
| 928 } | 928 } |
| 929 | 929 |
| 930 void LayoutReplaced::IntrinsicSizingInfo::transpose() { | 930 void LayoutReplaced::IntrinsicSizingInfo::transpose() { |
| 931 size = size.transposedSize(); | 931 size = size.transposedSize(); |
| 932 aspectRatio = aspectRatio.transposedSize(); | 932 aspectRatio = aspectRatio.transposedSize(); |
| 933 std::swap(hasWidth, hasHeight); | 933 std::swap(hasWidth, hasHeight); |
| 934 } | 934 } |
| 935 | 935 |
| 936 } // namespace blink | 936 } // namespace blink |
| OLD | NEW |