| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 return nullptr; | 638 return nullptr; |
| 639 } | 639 } |
| 640 | 640 |
| 641 if (cachedImage()->errorOccurred()) { | 641 if (cachedImage()->errorOccurred()) { |
| 642 *status = UndecodableSourceImageStatus; | 642 *status = UndecodableSourceImageStatus; |
| 643 return nullptr; | 643 return nullptr; |
| 644 } | 644 } |
| 645 | 645 |
| 646 RefPtr<Image> sourceImage; | 646 RefPtr<Image> sourceImage; |
| 647 if (cachedImage()->getImage()->isSVGImage()) { | 647 if (cachedImage()->getImage()->isSVGImage()) { |
| 648 UseCounter::count(document(), UseCounter::SVGInCanvas2D); |
| 648 SVGImage* svgImage = toSVGImage(cachedImage()->getImage()); | 649 SVGImage* svgImage = toSVGImage(cachedImage()->getImage()); |
| 649 IntSize imageSize = | 650 IntSize imageSize = |
| 650 roundedIntSize(svgImage->concreteObjectSize(defaultObjectSize)); | 651 roundedIntSize(svgImage->concreteObjectSize(defaultObjectSize)); |
| 651 sourceImage = SVGImageForContainer::create( | 652 sourceImage = SVGImageForContainer::create( |
| 652 svgImage, imageSize, 1, document().completeURL(imageSourceURL())); | 653 svgImage, imageSize, 1, document().completeURL(imageSourceURL())); |
| 653 } else { | 654 } else { |
| 654 sourceImage = cachedImage()->getImage(); | 655 sourceImage = cachedImage()->getImage(); |
| 655 } | 656 } |
| 656 | 657 |
| 657 *status = NormalSourceImageStatus; | 658 *status = NormalSourceImageStatus; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 void HTMLImageElement::associateWith(HTMLFormElement* form) { | 920 void HTMLImageElement::associateWith(HTMLFormElement* form) { |
| 920 if (form && form->isConnected()) { | 921 if (form && form->isConnected()) { |
| 921 m_form = form; | 922 m_form = form; |
| 922 m_formWasSetByParser = true; | 923 m_formWasSetByParser = true; |
| 923 m_form->associate(*this); | 924 m_form->associate(*this); |
| 924 m_form->didAssociateByParser(); | 925 m_form->didAssociateByParser(); |
| 925 } | 926 } |
| 926 }; | 927 }; |
| 927 | 928 |
| 928 } // namespace blink | 929 } // namespace blink |
| OLD | NEW |