Clear failed image loads when an <img> is adopted into a different document
https://bugs.webkit.org/show_bug.cgi?id=104409

Reviewed by Nate Chapin.

Source/WebCore:

This avoids an assertion failure setImageWithoutConsideringPendingLoadEvent().

Test: loader/image-loader-adoptNode-assert.html

* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Use new helper.
(WebCore::ImageLoader::updateFromElementIgnoringPreviousError): ditto
(WebCore::ImageLoader::elementDidMoveToNewDocument): ditto
(WebCore::ImageLoader::clearFailedLoadURL): Added a helper method to self-document the code.
(WebCore):
* loader/ImageLoader.h:
(ImageLoader):

LayoutTests:

* loader/image-loader-adoptNode-assert-expected.txt: Added.
* loader/image-loader-adoptNode-assert.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Microdata: Fix build failure after r137003
https://bugs.webkit.org/show_bug.cgi?id=106023

Reviewed by Ryosuke Niwa.

Set HTMLCollection::namedPropertyGetter as named property getter for
HTMLPropertiesCollection in GenerateImplementationNamedPropertyGetter.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementationNamedPropertyGetter):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::V8HTMLCollection::namedPropertyGetter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138725 268f45cc-cd09-0410-ab3c-d52691b4dbfc