| 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 | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 // | 813 // |
| 814 // Instead of dealing with that, there's a separate check that the | 814 // Instead of dealing with that, there's a separate check that the |
| 815 // ImageResourceContent has non-null image data associated with it, which | 815 // ImageResourceContent has non-null image data associated with it, which |
| 816 // isn't folded into imageHasLoaded above. | 816 // isn't folded into imageHasLoaded above. |
| 817 if ((imageHasLoaded && imageHasImage) || imageStillLoading || imageIsDocument) | 817 if ((imageHasLoaded && imageHasImage) || imageStillLoading || imageIsDocument) |
| 818 ensurePrimaryContent(); | 818 ensurePrimaryContent(); |
| 819 else | 819 else |
| 820 ensureCollapsedOrFallbackContent(); | 820 ensureCollapsedOrFallbackContent(); |
| 821 } | 821 } |
| 822 | 822 |
| 823 const KURL& HTMLImageElement::sourceURL() const { | 823 KURL HTMLImageElement::sourceURL() const { |
| 824 return cachedImage()->response().url(); | 824 return cachedImage()->response().url(); |
| 825 } | 825 } |
| 826 | 826 |
| 827 void HTMLImageElement::didAddUserAgentShadowRoot(ShadowRoot&) { | 827 void HTMLImageElement::didAddUserAgentShadowRoot(ShadowRoot&) { |
| 828 HTMLImageFallbackHelper::createAltTextShadowTree(*this); | 828 HTMLImageFallbackHelper::createAltTextShadowTree(*this); |
| 829 } | 829 } |
| 830 | 830 |
| 831 void HTMLImageElement::ensureFallbackForGeneratedContent() { | 831 void HTMLImageElement::ensureFallbackForGeneratedContent() { |
| 832 // The special casing for generated content in createLayoutObject breaks the | 832 // The special casing for generated content in createLayoutObject breaks the |
| 833 // invariant that the layout object attached to this element will always be | 833 // invariant that the layout object attached to this element will always be |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 void HTMLImageElement::associateWith(HTMLFormElement* form) { | 921 void HTMLImageElement::associateWith(HTMLFormElement* form) { |
| 922 if (form && form->isConnected()) { | 922 if (form && form->isConnected()) { |
| 923 m_form = form; | 923 m_form = form; |
| 924 m_formWasSetByParser = true; | 924 m_formWasSetByParser = true; |
| 925 m_form->associate(*this); | 925 m_form->associate(*this); |
| 926 m_form->didAssociateByParser(); | 926 m_form->didAssociateByParser(); |
| 927 } | 927 } |
| 928 }; | 928 }; |
| 929 | 929 |
| 930 } // namespace blink | 930 } // namespace blink |
| OLD | NEW |