CTTE: ImageLoader is always owned by an Element.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Feb 2014 18:25:26 +0000 (18:25 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Feb 2014 18:25:26 +0000 (18:25 +0000)
commita443d85d60f6ce8f7b76aef32261c363acbe99de
tree1b3d6092ca060983df5fedee6d8cdbd8121d4b45
parent0cb6220ab4a05fcd2ed6e4fb87030c8e7b3073ba
CTTE: ImageLoader is always owned by an Element.
<https://webkit.org/b/128254>

- Codify this by making the constructor take Element& or better.
- Make element() return Element&.
- Marked HTMLImageLoader and SVGImageLoader final.
- Made the ImageLoader constructor protected.

Reviewed by Sam Weinig.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::HTMLImageLoader):
(WebCore::HTMLImageLoader::dispatchLoadEvent):
(WebCore::HTMLImageLoader::sourceURI):
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLImageLoader.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::imageLoader):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::startLoadingImage):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didAttachRenderers):
(WebCore::HTMLVideoElement::parseAttribute):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::renderImageResource):
(WebCore::ImageLoader::updatedHasPendingEvent):
(WebCore::ImageLoader::timerFired):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
(WebCore::ImageLoader::dispatchPendingLoadEvent):
(WebCore::ImageLoader::dispatchPendingErrorEvent):
* loader/ImageLoader.h:
(WebCore::ImageLoader::element):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::SVGImageLoader):
(WebCore::SVGImageLoader::~SVGImageLoader):
(WebCore::SVGImageLoader::dispatchLoadEvent):
(WebCore::SVGImageLoader::sourceURI):
* svg/SVGImageLoader.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLImageLoader.cpp
Source/WebCore/html/HTMLImageLoader.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/ImageLoader.h
Source/WebCore/svg/SVGImageElement.cpp
Source/WebCore/svg/SVGImageLoader.cpp
Source/WebCore/svg/SVGImageLoader.h