[CSS Regions] Crash when dispatching regionlayoutupdate
https://bugs.webkit.org/show_bug.cgi?id=102944

Patch by Andrei Bucur <abucur@adobe.com> on 2012-11-27
Reviewed by Andreas Kling.

Source/WebCore:

The event dispatch function was incorrectly assuming the RenderNamedFlowThread is valid. Because the event is asynchronous it's
possible for the flow to be in the "NULL" state (the renderer is 0) while the regionlayoutupdate event is dispatched.

Test: fast/regions/webkit-named-flow-event-crash.html

* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): Remove the ASSERT and don't dispatch the event if the flow is
    in the "NULL" state.

LayoutTests:

The test modifies the layout, forces a regionlayoutupdate event to be scheduled and then removes the content and the regions.
The event is dispatched on a named flow in the "NULL" state. Without this patch a crash occurs.

* fast/regions/webkit-named-flow-event-crash-expected.txt: Added.
* fast/regions/webkit-named-flow-event-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135828.
http://trac.webkit.org/changeset/135828
https://bugs.webkit.org/show_bug.cgi?id=103405

[Chromium] Multiple ASAN errors after a WebKit roll due to
mismatched malloc/delete (not free) resulting from
StringImpl::deref() (Requested by apavlov on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-27

* wtf/FastAllocBase.h:
* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Mark tests flaky
https://bugs.webkit.org/show_bug.cgi?id=103403

Unreviewed expectations update for EFL: Mark tests flaky based on
flakiness dashboard and testing. Also rearrange efl/TestExpectations
so all media flakes are next to each other.

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-11-27

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: stub out IDBDatabaseBackendInterface::createTransaction
https://bugs.webkit.org/show_bug.cgi?id=102730

Reviewed by Darin Fisher.

Source/WebCore:

Stub out and support passing a 64-bit transaction id
so the frontend can refer to transactions by id rather than
a proxy object or a direct pointer reference. This will ultimately
loosen ownership and lifetime of transactions from the frontend
and backend.

No new tests, this is just part of a refactor.

* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore):
(WebCore::IDBDatabaseBackendImpl::transaction):
(WebCore::IDBDatabaseBackendImpl::createTransaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::create):
(WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
* Modules/indexeddb/IDBTransactionBackendImpl.h:
(IDBTransactionBackendImpl):
(WebCore::IDBTransactionBackendImpl::id):

Source/WebKit/chromium:

Add support for new createTransaction() method in both sides
of the WebKit API.

* public/WebIDBDatabase.h:
(WebIDBDatabase):
(WebKit::WebIDBDatabase::createTransaction):
* src/IDBDatabaseBackendProxy.cpp:
(WebKit):
(WebKit::IDBDatabaseBackendProxy::createTransaction):
* src/IDBDatabaseBackendProxy.h:
(IDBDatabaseBackendProxy):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::createTransaction):
(WebKit):
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix the build with new Qt5 hash
https://bugs.webkit.org/show_bug.cgi?id=103406

Reviewed by Csaba Osztrogonác.

Remove references to deprecated QApplication::GuiServer which
has been removed, and use QStyleFactory::create instead of
instantiating a QWindowsStyle directly since it is about to
become an internal class.

* DumpRenderTree/qt/DumpRenderTreeMain.cpp:
(main):
* QtTestBrowser/qttestbrowser.cpp:
(LauncherApplication::LauncherApplication):
* WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
(WTR::InjectedBundle::platformInitialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Graphics layer edges are sometimes very pixelated
https://bugs.webkit.org/show_bug.cgi?id=103302

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-11-27
Reviewed by Kenneth Rohde Christiansen.

The call setEnableEdgeDistanceAntialiasing(true) was lost in the refactoring of
http://trac.webkit.org/changeset/135401.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::paintToCurrentGLContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert test fast/backgrounds/background-opaque-images-over-color.html to a ref test
https://bugs.webkit.org/show_bug.cgi?id=103275

Reviewed by Simon Fraser

Removing existing baselines, and adding an -expecte.html to make
fast/backgrounds/background-opaque-images-over-color.html a ref test

* fast/backgrounds/background-opaque-images-over-color-expected.html: Added.
* fast/backgrounds/background-opaque-images-over-color-expected.txt: Removed.
* fast/backgrounds/background-opaque-images-over-color.html:
* platform/chromium-mac/fast/backgrounds/background-opaque-images-over-color-expected.png: Removed.
* platform/chromium-win/fast/backgrounds/background-opaque-images-over-color-expected.png: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WebLocalizedString for validation type badinput
https://bugs.webkit.org/show_bug.cgi?id=103381

Reviewed by Kent Tamura.

Source/Platform:

Adding WebLocalizedString enums for validation type badinput text.

* chromium/public/WebLocalizedString.h:

Source/WebKit/chromium:

* src/LocalizedStrings.cpp:
(WebCore::validationMessageBadInputForNumberText): Using the newly added WebLocalizedString enum.
(WebCore::validationMessageBadInputForDateTimeText): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correcting baseline for fast/backgrounds/background-opaque-images-over-color.html
https://bugs.webkit.org/show_bug.cgi?id=103275

Unreviewed

Fixing small error in ref test baseline.

* fast/backgrounds/background-opaque-images-over-color-expected.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove V8StringResource::m_string
https://bugs.webkit.org/show_bug.cgi?id=103367

Reviewed by Adam Barth.

This patch cleans up V8StringResource and removes V8StringResource::m_string.
This patch won't change performance. (This patch just adds one redundant IsString()
check and one IsInt32() check.) I confirmed no performance regression in micro benchmarks
(https://bugs.webkit.org/attachment.cgi?id=176178).

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
(WebCore::v8NonStringValueToWebCoreString):
* bindings/v8/V8StringResource.cpp:
(WebCore::int32ToWebCoreStringFast):
(WebCore::String):
(WebCore::AtomicString):
(WebCore):
* bindings/v8/V8StringResource.h:
(WebCore::V8StringResource::V8StringResource):
(WebCore::V8StringResource::prepareBase):
(WebCore::V8StringResource::toString):
(V8StringResource):
(WebCore::::prepare):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135862 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Verify if GStreamer was previously initialized
https://bugs.webkit.org/show_bug.cgi?id=103151

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2012-11-27
Reviewed by Philippe Normand.

Source/WebCore:

This patch calls gst_is_initialized() before calling gst_init_check()
in order to verify if GStreamer has not been initialized before.

This is useful particularly for WebKit1 so the applications could
initialize GStreamer before.

As the API call was added in GStreamer v0.10.31, the patch fences the
call only in that version of GStreamer or above.

No new tests, existing media tests cover this change.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):

Tools:

This patch adds the gst_init() in GtkLauncher, so we can add the
GStreamer options in the command line through
gst_init_get_option_group().

This approach is not valid for MiniBrowser because it uses WebKit2,
where the GStreamer backend lives in the web process, which is
different from the UI process.

* GNUmakefile.am:
* GtkLauncher/main.c:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][Qt][WK2] Tiles not always painted
https://bugs.webkit.org/show_bug.cgi?id=103271

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-11-27
Reviewed by Kenneth Rohde Christiansen.

The problem turned up because visible content was synchromized before the new fixed
layout size had been applied in the web process.

* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::didChangeViewportSize):
(WebKit::PageViewportController::didChangeViewportAttributes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip a new failing test to paint the bots green.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't throw an exception if user gesture is required for load
https://bugs.webkit.org/show_bug.cgi?id=103318

Patch by Min Qin <qinmin@chromium.org> on 2012-11-27
Reviewed by Eric Carlson.

Source/WebCore:

There is no need to throw an exception if media load requires user gesture.
Since chrome does not render the poster and media control after an exception is thrown, throwing an exception may break a lot of sites on android.
Change a current test to match the new behavior: media/video-load-require-user-gesture.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::load):

LayoutTests:

Check that exception is not thrown and metadata is not loaded if media load requires user gesture.

* media/video-load-require-user-gesture-expected.txt:
* media/video-load-require-user-gesture.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Adapt to the change of BlackBerry::Platform::FilterStream::notifyHeadersReceived
https://bugs.webkit.org/show_bug.cgi?id=103425

Reviewed by Yong Li.

A const has been added for HeaderList parameter of BlackBerry::Platform::FilterStream::notifyHeadersReceived.
The patch is adapting to this change.

No functionalities changed no new tests.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyHeadersReceived):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::RSSFilterStream::notifyHeadersReceived):
* platform/network/blackberry/rss/RSSFilterStream.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Make test resilient to different event ordering
https://bugs.webkit.org/show_bug.cgi?id=103344

Reviewed by Tony Chang.

This test was failing in multi-process chromium because the blocked
event can arrive before the versionchange event.

* storage/indexeddb/pending-version-change-on-exit.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for r135866.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::load):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening: updated TestExpectations for crashes in
media/video-duration-known-after-eos.html
https://bugs.webkit.org/show_bug.cgi?id=103183

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix world-reuse test for mac build
https://bugs.webkit.org/show_bug.cgi?id=103385

Patch by Dan Carney <dcarney@google.com> on 2012-11-27
Reviewed by Jochen Eisinger.

Mac and chrome builds have different expectations for where
an isolated world is executed.

* http/tests/security/isolatedWorld/world-reuse.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add callbacks to the FrameLoaderClient when a resource is requested
https://bugs.webkit.org/show_bug.cgi?id=92761

Patch by Marja Hölttä <marja@chromium.org> on 2012-11-27
Reviewed by Adam Barth.

In Chromium, when an extension script cancels a network
request (which happens out of process), we'd like to
notify content scripts running on the current page about
which elements failed to load because the requests were
cancelled (as opposed to e.g. the network request just
didn't work). Since the resource request itself does not
carry any information what DOM element is was made for,
currently a content script has to search the DOM tree and
guess which requests will be cancelled by its counter
part. By adding these callbacks, the embedder can make
this connection explictly.

Source/WebCore:

Test: platform/chromium/fast/loader/resource-request-callbacks.html

* loader/FrameLoaderClient.h:
(WebCore):
(WebCore::FrameLoaderClient::dispatchWillRequestResource):
(FrameLoaderClient):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebCachedURLRequest.h: Added.
(WebKit):
(WebCachedURLRequest):
(WebKit::WebCachedURLRequest::~WebCachedURLRequest):
* public/WebFrameClient.h:
(WebKit):
(WebFrameClient):
(WebKit::WebFrameClient::willRequestResource):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchWillRequestResource):
(WebKit):
* src/FrameLoaderClientImpl.h:
(FrameLoaderClientImpl):
* src/WebCachedURLRequest.cpp: Added.
(WebKit):
(WebKit::WebCachedURLRequest::reset):
(WebKit::WebCachedURLRequest::urlRequest):
(WebKit::WebCachedURLRequest::charset):
(WebKit::WebCachedURLRequest::forPreload):
(WebKit::WebCachedURLRequest::initiatorName):
(WebKit::WebCachedURLRequest::initiatorElement):
(WebKit::WebCachedURLRequest::WebCachedURLRequest):

Tools:

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::dumpResourceRequestCallbacks):
(DRTTestRunner::reset):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
(DRTTestRunner::setShouldDumpResourceRequestCallbacks):
(DRTTestRunner::shouldDumpResourceRequestCallbacks):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::shouldDumpResourceRequestCallbacks):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::willRequestResource):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

LayoutTests:

* platform/chromium/fast/loader/resource-request-callbacks-expected.txt: Added.
* platform/chromium/fast/loader/resource-request-callbacks.html: Added.

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