REGRESSION(r138222): WebDocumentLoaderMac-related leaks seen on Leaks bot
https://bugs.webkit.org/show_bug.cgi?id=106137

Reviewed by Brady Eidson.

Tested manually by comparing before and after leaks output for WK1-mac.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::receivedError): Call dispatchDidFailLoading() if
    a SubstituteData load fails or is cancelled. Without this call, load counts
    are not balanced on WebDocumentLoaderMac and it is retained forever.
(WebCore::MainResourceLoader::didFinishLoading):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert fast/css/positioned-overflow-scroll.html to a check-layout.js test
https://bugs.webkit.org/show_bug.cgi?id=106585

Reviewed by Tony Chang.

This is in preparation for adding more cases to this test.

* fast/css/positioned-overflow-scroll-expected.txt: Added.
* fast/css/positioned-overflow-scroll.html:
* platform/chromium-android/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-android/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/chromium-linux/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-mac-lion/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-mac/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-win/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/efl/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/efl/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/gtk/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/gtk/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/mac/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/mac/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/qt/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/qt/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* resources/check-layout.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r137939): Heap-use-after-free in WebCore::accumulateDocumentEventTargetRects
https://bugs.webkit.org/show_bug.cgi?id=106454

Reviewed by James Robinson.

Source/WebCore:

Correctly removing child Documents from their parent's tracked touch handler maps when detaching and
when their last touch event handler is removed.

Test: fast/events/touch/nested-document-with-touch-handler-detached-crash.html

* dom/Document.cpp:
(WebCore::Document::detach):
(WebCore::Document::didRemoveEventTargetNode):

LayoutTests:

* fast/events/touch/nested-document-with-touch-handler-detached-crash.html: Added.
* fast/events/touch/nested-document-with-touch-handler-detached-crash-expected.txt: Added.


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