Stop using PLATFORM(MAC) in WebKit2/UIProcess except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128868

Reviewed by Anders Carlsoon.

* UIProcess/API/C/WKPage.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection): Changed
PLATFORM(MAC) to OS(DARWIN) around use of Mach-based IPC.
* UIProcess/DrawingAreaProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA)
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
* UIProcess/DrawingAreaProxy.h: Ditto.
* UIProcess/DrawingAreaProxy.messages.in: Ditto.
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::didFinishLaunchingProcess): Changed PLATFORM(MAC) to OS(DARWIN)
around use of Mach API.
* UIProcess/Launcher/ProcessLauncher.h: Ditto.
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: Changed PLATFORM(MAC) to
PLATFORM(COCOA)
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch): Changed PLATFORM(MAC)
to OS(DARWIN).
(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess): Ditto.
(WebKit::NetworkProcessProxy::didFinishLaunching): Changed PLATFORM(MAC) to PLATFORM(COCOA)
around process suppression call.
* UIProcess/Network/NetworkProcessProxy.h: Ditto.
* UIProcess/PageClient.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* UIProcess/Plugins/PluginInfoStore.cpp: Ditto.
* UIProcess/Plugins/PluginProcessManager.h: Ditto.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::PluginProcessProxy): Ditto.
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): Changed PLATFORM(MAC)
to OS(DARWIN).
(WebKit::PluginProcessProxy::didClose): Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::PluginProcessProxy::didFinishLaunching): Changed PLATFORM(MAC) to OS(DARWIN) around
use of Mach-based IPC, and to PLATFORM(COCOA) around SetQOS.
(WebKit::PluginProcessProxy::didCreateWebProcessConnection): Changed PLATFORM(MAC) to
OS(DARWIN).
* UIProcess/Plugins/PluginProcessProxy.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* UIProcess/Plugins/PluginProcessProxy.messages.in: Ditto.
* UIProcess/TextChecker.h: Ditto.
* UIProcess/WebContext.cpp: Ditto.
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::setHTTPPipeliningEnabled):
(WebKit::WebContext::httpPipeliningEnabled):
(WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
* UIProcess/WebContext.h: Ditto.
* UIProcess/WebContext.messages.in: Ditto.
* UIProcess/WebContextUserMessageCoders.h: Ditto.
(WebKit::WebContextUserMessageEncoder::encode):
(WebKit::WebContextUserMessageDecoder::decode):
* UIProcess/WebCookieManagerProxy.cpp: Ditto.
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
* UIProcess/WebCookieManagerProxy.h: Ditto.
* UIProcess/WebFormSubmissionListenerProxy.h: Ditto.
* UIProcess/WebFramePolicyListenerProxy.h: Ditto.
* UIProcess/WebInspectorProxy.h: Added !PLATFORM(IOS) around members reltated to managing
the inspector window and its view.
* UIProcess/WebPageProxy.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::recordNavigationSnapshot):
(WebKit::WebPageProxy::canShowMIMEType):
(WebKit::canCoalesce):
(WebKit::coalesce):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/WebPageProxy.messages.in: Ditto.
* UIProcess/WebProcessProxy.cpp: Ditto.
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::createWebPage):
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::didFinishLaunching):
(WebKit::WebProcessProxy::pageSuppressibilityChanged):
(WebKit::WebProcessProxy::pagePreferencesChanged):
* UIProcess/WebProcessProxy.h: Ditto.
* UIProcess/cf/WebPreferencesCF.cpp: Removed this file which was not used in any
configuration.
* UIProcess/ios/WebInspectorProxyIOS.mm: Removed functions that no longer need to be
implemented for iOS.
* WebKit2.xcodeproj/project.pbxproj: Removed reference to WebPreferencesCF.cpp.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Form controls are always painted in the active state
https://bugs.webkit.org/show_bug.cgi?id=128872
<rdar://problem/9422677>

Reviewed by Dan Bernstein.

AppKit will always paint form controls in the active state if the view doesn't have a
window. Fix this by adding a fake window whose key appearance we'll update based on the
control state. Also, rename WebCoreFlippedView to WebCoreThemeView since it stopped being
just about the flippedness a long time ago.

* platform/mac/ThemeMac.h:
* platform/mac/ThemeMac.mm:
(-[WebCoreThemeWindow hasKeyAppearance]):
Return themeWindowHasKeyAppearance.

(-[WebCoreThemeView window]):
Create a WebCoreThemeWindow object lazily and return it.

(WebCore::paintCheckbox):
(WebCore::paintRadio):
(WebCore::paintButton):
Pass the control states to ThemeMac::ensuredView.

(WebCore::ThemeMac::ensuredView):
Set themeWindowHasKeyAppearance based on the control state.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::documentViewFor):
Pass the control states to ThemeMac::ensuredView.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Setting currentTime on HTMLMediaElement with media controller should throw exception.
https://bugs.webkit.org/show_bug.cgi?id=128867.

Patch by Piotr Grad <p.grad@samsung.com> on 2014-02-15
Reviewed by Eric Carlson.

Source/WebCore:

Added implementation for setting currentTime in HTMLMediaElement. Old implementation
was left to be used internally.

Test: media/video-controller-currentTime.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:

LayoutTests:

* media/video-controller-currentTime-expected.txt: Added.
* media/video-controller-currentTime.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove 'static' specifier from free inline functions in StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=118554

Reviewed by Darin Adler.

At first 'static' does not bring any use here, secondly static free
inline functions in headers is a bad practice in general as each instance
of function defined as inline is treated as a separate function and each
instance has its own copy of static locals and string literals.

* wtf/text/StringImpl.h:
(WTF::codePointCompare):
(WTF::codePointCompare8):
(WTF::codePointCompare16):
(WTF::codePointCompare8To16):
(WTF::isSpaceOrNewline):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove double hashing from DatasetDOMStringMap::deleteItem
https://bugs.webkit.org/show_bug.cgi?id=128865

Reviewed by Benjamin Poulain.

* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::deleteItem): Removed call to hasAttribute, using the
result from removeAttribute instead.

* dom/Element.cpp:
(WebCore::Element::removeAttribute): Add a return value, false if nothing is removed,
and true if something is removed.
(WebCore::Element::removeAttributeNS): Ditto.
* dom/Element.h: Ditto.


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