Use OwnPtr in RenderThemeWin and ScrollbarThemeWin
https://bugs.webkit.org/show_bug.cgi?id=117978

Reviewed by Brent Fulgham.

Use OwnPtr to avoid manual deletion of objects.

* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece):
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebKit2] [Gtk] WebKitResponsePolicyDecision URI response property incorrect
https://bugs.webkit.org/show_bug.cgi?id=119258

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-30
Reviewed by Martin Robinson.

Corrected the installed URI response property from PROP_REQUEST to
PROP_RESPONSE and type from WEBKIT_TYPE_URI_REQUEST to
WEBKIT_TYPE_URI_RESPONSE.

* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
(webkit_response_policy_decision_class_init):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pass column as 4th argument to WorkerGlobalScope.onerror and Window.onerror handlers
https://bugs.webkit.org/show_bug.cgi?id=119251

Reviewed by Geoffrey Garen.

Source/WebCore:

As per the latest specification, the WorkerGlobalScope.onerror and Window.onerror event
handlers should be given the column as fourth argument:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#onerroreventhandler

The column argument is already supported by IE10 and Blink.

No new tests, covered by existing tests.

* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
(WebCore::ErrorEvent::create):
(WebCore::ErrorEvent::colno):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::sanitizeScriptError):
(WebCore::ScriptExecutionContext::reportException):
(WebCore::ScriptExecutionContext::dispatchErrorEvent):
* dom/ScriptExecutionContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):

LayoutTests:

Update several tests to make use of the new column argument passed to
WorkerGlobalScope.onerror and Window.onerror handlers.

* fast/events/window-onerror1-expected.txt:
* fast/events/window-onerror1.html:
* fast/events/window-onerror11-expected.txt:
* fast/events/window-onerror11.html:
* fast/events/window-onerror12-expected.txt:
* fast/events/window-onerror12.html:
* fast/events/window-onerror13.html:
* fast/events/window-onerror14.html:
* fast/events/window-onerror16.html:
* fast/events/window-onerror2-expected.txt:
* fast/events/window-onerror2.html:
* fast/events/window-onerror4-expected.txt:
* fast/events/window-onerror4.html:
* fast/events/window-onerror5-expected.txt:
* fast/events/window-onerror5.html:
* fast/events/window-onerror6-expected.txt:
* fast/events/window-onerror6.html:
* fast/events/window-onerror7-expected.txt:
* fast/events/window-onerror7.html:
* fast/events/window-onerror8-expected.txt:
* fast/events/window-onerror8.html:
* fast/events/window-onerror9-expected.txt:
* fast/events/window-onerror9.html:
* fast/workers/resources/worker-script-error-handled.js:
(onerror):
* fast/workers/worker-script-error-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Move the implementation of WebEditorClient::checkTextOfParagraph to WebEditorClient.cpp
https://bugs.webkit.org/show_bug.cgi?id=119034

Reviewed by Anders Carlsson.

The Mac and EFL ports use the same implementation of
WebEditorClient::checkTextOfParagraph and GTK will use the same
implementation too. So rather than duplicating the same code in
platform specific files, move the implementation to platform agnostic
WebProcess/WebCoreSupport/WebEditorClient.cpp.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::checkTextOfParagraph):
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0
https://bugs.webkit.org/show_bug.cgi?id=119269
<rdar://problem/14582393>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processIdentifier):
Return 0 if the page is closed instead of requiring isValid().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move WindowsExtras.h from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=118125

Reviewed by Anders Carlsson.

Move it to WTF to be able to use the functions in WTF too.

Source/WebCore:

* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformWheelEvent.h:
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
* platform/win/MIMETypeRegistryWin.cpp:
* platform/win/PasteboardWin.cpp:
* platform/win/PopupMenuWin.cpp:
* platform/win/RunLoopWin.cpp:
* platform/win/SharedTimerWin.cpp:
* platform/win/WindowMessageListener.h:
* plugins/win/PluginDatabaseWin.cpp:

Source/WTF:

* wtf/WindowsExtras.h: Renamed from Source/WebCore/platform/win/WindowsExtras.h.
(WTF::getRegistryValue):
(WTF::getWindowPointer):
(WTF::setWindowPointer):
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused Download*.cpp files
https://bugs.webkit.org/show_bug.cgi?id=119248

Reviewed by Anders Carlsson.

* Shared/Downloads/cfnet/DownloadCFNet.cpp: Removed.
* Shared/Downloads/curl/DownloadCurl.cpp: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Remove dependency on CoreFoundation from DownloadBundle
https://bugs.webkit.org/show_bug.cgi?id=119247

Reviewed by Anders Carlsson.

* platform/network/cf/DownloadBundle.h:
* platform/network/curl/DownloadBundle.h:
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::magicNumber):
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Null deref under PluginView::handlesPageScaleFactor()
https://bugs.webkit.org/show_bug.cgi?id=119231
<rdar://problem/14440207>

Reviewed by Darin Adler.

Null-check the PluginView in the caller as well.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handlesPageScaleGesture):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Null deref under WebPage::scaledSnapshotWithOptions
https://bugs.webkit.org/show_bug.cgi?id=119243
<rdar://problem/14502050>

Reviewed by Darin Adler.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):
WebFrame::coreFrame() can be null (if the Frame is already torn down),
so we should check it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate
https://bugs.webkit.org/show_bug.cgi?id=119270
<rdar://problem/13368226>

Reviewed by Darin Adler.

Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while
they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this
since we don't know the plug-in or connection.

Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in
destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector).

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::Connection):
(CoreIPC::Connection::sendSyncMessage):
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::inSendSync):
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::destroy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, add my new email to contributors.json.

* Scripts/webkitpy/common/config/contributors.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compile fix for WebGL on 32-bit Windows.
https://bugs.webkit.org/show_bug.cgi?id=119235

Reviewed by Darin Adler.

* platform/graphics/GLContext.cpp:
Created GLNativeWindowType typedef.
(WebCore::GLContext::createContextForWindow):
* platform/graphics/GLContext.h:
Replaced uint64_t with GLNativeWindowType.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
https://bugs.webkit.org/show_bug.cgi?id=119275

Reviewed by Simon Fraser.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::paintContentsForSnapshot):
* page/FrameView.h:
Fix typo.

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):
Fix typo.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inactive style sheets should not trigger style recalc when loaded.
<http://webkit.org/b/119236>
<rdar://problem/14588132>

Reviewed by Antti Koivisto.

Style sheets that are either alternate sheets or are excluded by their media query should not trigger
a full style recalc when they finish loading, since the end result will not be observably different.

The sheets are still inspectable through document.styleSheets.

Changed enums from Blocking/NonBlocking to ActiveSheet/InactiveSheet to clarify what's going on.

* html/HTMLLinkElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::startLoadingDynamicSheet):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):

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