Move HTTPRequest class to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=116192

Reviewed by Darin Adler.

Source/WebCore:

HTTPRequest is only used by the "remote inspector" feature in WebKit2,
so there's no need to have it in WebCore.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Move HTTPRequest to WebKit2 and put it in the WebKit namespace.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* UIProcess/InspectorServer/HTTPRequest.cpp: Renamed from Source/WebCore/platform/network/HTTPRequest.cpp.
* UIProcess/InspectorServer/HTTPRequest.h: Renamed from Source/WebCore/platform/network/HTTPRequest.h.
* UIProcess/InspectorServer/WebInspectorServer.cpp:
* UIProcess/InspectorServer/WebInspectorServer.h:
(WebInspectorServer):
* UIProcess/InspectorServer/WebSocketServerClient.h:
(WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest):
(WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest):
(WebKit::WebSocketServerClient::didEstablishWebSocketConnection):
* UIProcess/InspectorServer/WebSocketServerConnection.cpp:
* UIProcess/InspectorServer/WebSocketServerConnection.h:
(WebKit):
(WebSocketServerConnection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
https://bugs.webkit.org/show_bug.cgi?id=116193

Reviewed by Darin Adler

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::setThrottled):
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
    - Fixes for review comments.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix FileChooserClient design
https://bugs.webkit.org/show_bug.cgi?id=116195

Reviewed by Andreas Kling.

FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).

Fix this by making it an abstract class, and moving FileChooser into FileInputType.

* html/FileInputType.cpp:
(WebCore::FileInputType::~FileInputType):
Invalidate the file chooser.

(WebCore::FileInputType::handleDOMActivateEvent):
Apply the file chooser settings.

(WebCore::FileInputType::applyFileChooserSettings):
Recreate the file chooser with new settings.

(WebCore::FileInputType::receiveDropForDirectoryUpload):
Apply the settings.

* platform/FileChooser.cpp:
(WebCore::FileChooser::invalidate):
Set m_client to null.

(WebCore::FileChooser::chooseFiles):
Early return.

* platform/FileChooser.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r150123

* wtf/CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using the factory pattern in FileIconLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=116197

Reviewed by Andreas Kling.

Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.

* html/FileInputType.cpp:
(WebCore::FileInputType::~FileInputType):
(WebCore::FileInputType::requestIcon):
* html/FileInputType.h:
(FileInputType):
* platform/FileIconLoader.cpp:
(WebCore::FileIconLoader::invalidate):
* platform/FileIconLoader.h:
(WebCore::FileIconLoaderClient::~FileIconLoaderClient):
(FileIconLoader):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too

* platform/ios/ClipboardIOS.mm:
(WebCore::ClipboardIOS::ClipboardIOS):
(WebCore::ClipboardIOS::hasData):
(WebCore::ClipboardIOS::clearData):
(WebCore::ClipboardIOS::clearAllData):
(WebCore::ClipboardIOS::getData):
(WebCore::ClipboardIOS::setData):
(WebCore::ClipboardIOS::types):
(WebCore::ClipboardIOS::writeRange):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::getStringSelection):
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::writeImage):
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
(WebCore::Pasteboard::documentFragment):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
https://bugs.webkit.org/show_bug.cgi?id=116198
<rdar://problem/13904395>

Reviewed by Simon Fraser.

Block Objective-C exceptions in makeRGBAFromNSColor.
Remove a comment saying that they're impossible.

Convert the incoming color to the DeviceRGB colorspace to match
existing color sources. Some rare cases (attributed strings that come
from PDFKit) can have DeviceGrayscale color spaces, which would
previously throw an exception here.

* platform/graphics/mac/ColorMac.mm:
(WebCore::makeRGBAFromNSColor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid backing store for the WebFrameView's layer when the WebView is layer-backed
https://bugs.webkit.org/show_bug.cgi?id=116172

Reviewed by Tim Horton.

When the WebView is layer-backed, AppKit will create a layer with backing store for
the WebFrameView because it implements drawRect:. However, this method only paints
when there is no documentView, so this layer’s backing store is wasteful.

We can avoid allocation of this backing store by implementing -wantsUpdateLayer
and -updateLayer, and setting the view’s backgroundColor.

* WebView/WebFrameView.mm:
(-[WebFrameView wantsUpdateLayer]):
(-[WebFrameView updateLayer]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Resources from non-HTTP schemes should not be cached indefinitely
https://bugs.webkit.org/show_bug.cgi?id=113626

Reviewed by Ryosuke Niwa.

Source/WebCore:

With the exception of schemes that we know will always return the same
result for a given URL, we should not indefinitely cache non-HTTP
resources when their freshness cannot be verified.

Writing a test for this is blocked on https://webkit.org/b/116199.

The following two existing tests of memory cache behavior were
converted to HTTP tests so that they continue to function as expected:

Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
       http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime): Returned a freshness
lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
Checked whether the scheme is blob:, data:, or applewebdata:.
* platform/SchemeRegistry.h:

LayoutTests:

Convert existing memory cache tests to HTTP tests.

* fast/loader/resources/compass.jpg: Removed.
* fast/loader/resources/image1.html: Removed.
* fast/loader/resources/image2.html: Removed.
* fast/loader/willsendrequest-returns-null-for-memory-cache-load-expected.txt: Removed.
* http/tests/cache/display-image-unset-allows-cached-image-load-expected.txt: Renamed from LayoutTests/fast/loader/display-image-unset-allows-cached-image-load-expected.txt.
* http/tests/cache/display-image-unset-allows-cached-image-load.html: Renamed from LayoutTests/fast/loader/display-image-unset-allows-cached-image-load.html.
* http/tests/cache/resources/cached-image.html: Renamed from LayoutTests/fast/loader/resources/cached-image.html.
* http/tests/cache/resources/image1.html: Added.
* http/tests/cache/resources/image2.html: Added.
* http/tests/cache/willsendrequest-returns-null-for-memory-cache-load-expected.txt: Added.
* http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html: Renamed from LayoutTests/fast/loader/willsendrequest-returns-null-for-memory-cache-load.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build fix attempt after r150156.

Source/WebKit: 

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win: 

* WebKit.vcproj/WebKitExports.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build fix attempt after r150160.

Source/WebKit: 

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win: 

* WebKit.vcproj/WebKitExports.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore: Another Windows build fix attempt after r150160.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:

Source/WebKit: Revert the previous commit.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win: Revert the previous commit.

* WebKit.vcproj/WebKitExports.def.in:


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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Enable printing in plugins
        https://bugs.webkit.org/show_bug.cgi?id=116201
        <rdar://problem/12347902>

        Reviewed by Alexey Proskuryakov.

        Add the printing entitlement so that legacy printing drivers can
        customize the print panel. Update the printing rules and enable them
        for the plugins.

        * Configurations/PluginService.entitlements:
        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=116176

Reviewed by Andreas Kling.

* dom/Clipboard.cpp:
(WebCore::Clipboard::writeRange):
(WebCore::Clipboard::writePlainText):
(WebCore::Clipboard::writeURL):
Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
not make it obvious, these are here only for use by dragging code. Later we may
refactor them away entirely, but for now it's good not to compile them in on any
platform that does not support dragging.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a thinko.

We want to invalidate the file icon loader if it exists, not create it!

* html/FileInputType.cpp:
(WebCore::FileInputType::requestIcon):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] PluginInformation.cpp fails to build because of missing ENABLE(NETSCAPE_PLUGIN_API) guard
https://bugs.webkit.org/show_bug.cgi?id=116018

Rubber-stamped by Jocelyn Turcotte.

* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::getPluginModuleInformation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Unreviewed buildfix after r150161.

'Unknown' in HTTPRequest.cpp is ambiguous symbol with MSVC,
because it is also defined in MS SDK 7.1 winioctl.h.

* UIProcess/InspectorServer/HTTPRequest.cpp:
(WebKit::HTTPRequest::HTTPRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r150168.
http://trac.webkit.org/changeset/150168
https://bugs.webkit.org/show_bug.cgi?id=116214

broke the world on Mountain Lion (Requested by thorton on
#webkit).

* WebView/WebFrameView.mm:
(-[WebFrameView drawRect:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove Intel Wk2 Buildbots from Master
https://bugs.webkit.org/show_bug.cgi?id=116149

Removing Intel maintained EFL Wk2 bots except the handle for efl-linux-slave-2
since Gyuyoung Kim from Samsung plans to take over and maintain it.

Reviewed by Benjamin Poulain.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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