createHTMLDocument() should not create a title element if the title argument is left out
https://bugs.webkit.org/show_bug.cgi?id=96694

Reviewed by Darin Adler.

In case the argument is not passed to createHTMLDocument we use a null string and check
for that before creating a title element.

Source/WebCore:

Test: fast/dom/DOMImplementation/createHTMLDocument-optional-title.html

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createHTMLDocument):
* dom/DOMImplementation.idl:

LayoutTests:

* fast/dom/DOMImplementation/createHTMLDocument-optional-title-expected.txt: Added.
* fast/dom/DOMImplementation/createHTMLDocument-optional-title.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Prevent window.close() from closing pages that are not opened by JS
https://bugs.webkit.org/show_bug.cgi?id=98190

Reviewed by Antonio Gomes.

RIM PR# 217812.
Only pages opened by JS can be closed by JS.

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::closeWindowSoon):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add some more flaky tests.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
isMainThread() should only be called by NoEventDispatchAssertion in debug builds
https://bugs.webkit.org/show_bug.cgi?id=98191

This fixes a performance regression and matches the original code from
before the refactor in http://trac.webkit.org/changeset/130077.

* dom/ContainerNode.h:
(WebCore::NoEventDispatchAssertion::NoEventDispatchAssertion):
(WebCore::NoEventDispatchAssertion::~NoEventDispatchAssertion):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to simplify IPC message dispatching logic in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=98097

Reviewed by Sam Weinig.

Move the Connection::MessageReceiver class to its own header file. Add a MessageReceiverMap helper class
that will be used for dispatching messages based on message class (and eventually destination ID).

Convert AuthenticationManager and WebGeolocationManager over to this new mechanism.

* CMakeLists.txt:
* GNUmakefile.list.am:
Add new files.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::dispatchMessage):
Check with the message receiver map first before calling Connection::Client::didReceiveMessage.

* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::addMessageReceiver):
Call through to the message receiver map.

* Platform/CoreIPC/MessageID.h:
(CoreIPC::MessageID::messageClass):
Rename MessageClassReserved to MessageClassInvalid.

(MessageID):
* Platform/CoreIPC/MessageReceiver.h:
Move MessageReceiver from Connection.h to its own file.

* Platform/CoreIPC/MessageReceiverMap.cpp:
New helper class.

(CoreIPC::MessageReceiverMap::addMessageReceiver):
Add the receiver to the map of receivers.

(CoreIPC::MessageReceiverMap::dispatchMessage):
Check if we have any registered receivers for this message class.

* Platform/CoreIPC/MessageReceiverMap.h:
New file.

* Target.pri:
Add new files.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::AuthenticationManager):
* WebProcess/Authentication/AuthenticationManager.h:
(AuthenticationManager):
Register the authentication manager as a message receiver.

* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::WebGeolocationManager):
* WebProcess/Geolocation/WebGeolocationManager.h:
(WebGeolocationManager):
Register the geolocation manager as a message receiver.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):
Remove checks for authentication manager and geolocation manager messages.

* win/WebKit2.vcproj:
Add new files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow LayerTreeHost subclasses to return a custom GraphicsLayerFactory
https://bugs.webkit.org/show_bug.cgi?id=98179

Reviewed by Andreas Kling.

Implement ChromeClient::graphicsLayerFactory and have it call the DrawingArea's graphicsLayerFactory which
for DrawingAreaImpl then calls down to the layer tree host. Make LayerTreeCoordinator implement GraphicsLayerFactory and
make it create CoordinatedGraphicsLayers.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::graphicsLayerFactory):
(WebKit):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::createGraphicsLayer):
(WebKit):
(WebKit::LayerTreeCoordinator::graphicsLayerFactory):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
* WebProcess/WebPage/DrawingArea.h:
(WebCore):
(WebKit::DrawingArea::graphicsLayerFactory):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::graphicsLayerFactory):
(WebKit):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(WebCore):
(WebKit::LayerTreeHost::graphicsLayerFactory):
(LayerTreeHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip a failing test.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the last bits of MSYS support from webkitperl.
https://bugs.webkit.org/show_bug.cgi?id=98195

Patch by Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> on 2012-10-02
Reviewed by Eric Seidel.

No ports currently need MinGW/MSYS support, so remove the last
hackish bits related to it from our Perl code.

* Scripts/commit-log-editor:
(createCommitMessage):
* Scripts/old-run-webkit-tests:
* Scripts/webkitdirs.pm:
(isAnyWindows):
(isWindows):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip one more failing test.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Block freeing thread should sleep indefinitely when there's no work to do
https://bugs.webkit.org/show_bug.cgi?id=98084

Reviewed by Geoffrey Garen.

Currently the block freeing thread wakes up once a second to check if there are any blocks 
for it to release back to the OS. This is wasteful. We should change it to sleep when it 
realizes there are no more blocks to free. Any thread that returns a block to the BlockAllocator 
should then notify the block freeing thread that there is more work to do now.

* heap/BlockAllocator.cpp:
(JSC::BlockAllocator::BlockAllocator):
(JSC::BlockAllocator::blockFreeingThreadMain):
* heap/BlockAllocator.h:
(BlockAllocator):
(JSC::BlockAllocator::deallocate):


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