| 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 void HTMLImageElement::ensurePrimaryContent() | 766 void HTMLImageElement::ensurePrimaryContent() |
| 767 { | 767 { |
| 768 if (!m_useFallbackContent) | 768 if (!m_useFallbackContent) |
| 769 return; | 769 return; |
| 770 m_useFallbackContent = false; | 770 m_useFallbackContent = false; |
| 771 reattachFallbackContent(); | 771 reattachFallbackContent(); |
| 772 } | 772 } |
| 773 | 773 |
| 774 void HTMLImageElement::reattachFallbackContent() | 774 void HTMLImageElement::reattachFallbackContent() |
| 775 { | 775 { |
| 776 // This can happen inside of attach() in the middle of a recalcStyle so we n
eed to | 776 // This can happen inside of attachLayoutTree() in the middle of a recalcSty
le so we need to |
| 777 // reattach synchronously here. | 777 // reattach synchronously here. |
| 778 if (document().inStyleRecalc()) | 778 if (document().inStyleRecalc()) |
| 779 reattach(); | 779 reattach(); |
| 780 else | 780 else |
| 781 lazyReattachIfAttached(); | 781 lazyReattachIfAttached(); |
| 782 } | 782 } |
| 783 | 783 |
| 784 PassRefPtr<ComputedStyle> HTMLImageElement::customStyleForLayoutObject() | 784 PassRefPtr<ComputedStyle> HTMLImageElement::customStyleForLayoutObject() |
| 785 { | 785 { |
| 786 RefPtr<ComputedStyle> newStyle = originalStyleForLayoutObject(); | 786 RefPtr<ComputedStyle> newStyle = originalStyleForLayoutObject(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 { | 827 { |
| 828 ImageResource* image = cachedImage(); | 828 ImageResource* image = cachedImage(); |
| 829 if (!image) | 829 if (!image) |
| 830 return IntSize(); | 830 return IntSize(); |
| 831 LayoutSize lSize = image->imageSize(LayoutObject::shouldRespectImageOrientat
ion(layoutObject()), 1.0f); | 831 LayoutSize lSize = image->imageSize(LayoutObject::shouldRespectImageOrientat
ion(layoutObject()), 1.0f); |
| 832 ASSERT(lSize.fraction().isZero()); | 832 ASSERT(lSize.fraction().isZero()); |
| 833 return IntSize(lSize.width(), lSize.height()); | 833 return IntSize(lSize.width(), lSize.height()); |
| 834 } | 834 } |
| 835 | 835 |
| 836 } // namespace blink | 836 } // namespace blink |
| OLD | NEW |