[EFL] Battery status code needs refactoring to be reused in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=90760

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-09
Reviewed by Hajime Morita.

Source/WebCore:

Rename BatteryClientEfl to BatteryProviderEfl and remove dependency
on BatteryController by introducing the BatteryProviderEflClient
interface. This will allow reusing the BatteryProviderEfl class
in WebKit2.

No new tests. Already tested by batterystatus/*.

* PlatformEfl.cmake:
* platform/efl/BatteryProviderEfl.cpp: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.cpp.
(WebCore):
(WebCore::BatteryProviderEfl::BatteryProviderEfl):
(WebCore::BatteryProviderEfl::batteryStatus):
(WebCore::BatteryProviderEfl::startUpdating):
(WebCore::BatteryProviderEfl::stopUpdating):
(WebCore::BatteryProviderEfl::setBatteryStatus):
(WebCore::BatteryProviderEfl::timerFired):
(WebCore::BatteryProviderEfl::getBatteryStatus):
(WebCore::BatteryProviderEfl::setBatteryClient):
* platform/efl/BatteryProviderEfl.h: Copied from Source/WebCore/platform/efl/BatteryClientEfl.h.
(WebCore):
(BatteryProviderEfl):
(WebCore::BatteryProviderEfl::~BatteryProviderEfl):
* platform/efl/BatteryProviderEflClient.h: Added.
(WebCore):
(BatteryProviderEflClient):

Source/WebKit:

Add BatteryClientEfl to PlatformEfl.cmake.

* PlatformEfl.cmake:

Source/WebKit/efl:

Add BatteryClientEfl to WebKit, which uses BatteryProviderEfl from
WebCore internally.

* WebCoreSupport/BatteryClientEfl.cpp: Added.
(BatteryClientEfl::BatteryClientEfl):
(BatteryClientEfl::setController):
(BatteryClientEfl::startUpdating):
(BatteryClientEfl::stopUpdating):
(BatteryClientEfl::batteryControllerDestroyed):
(BatteryClientEfl::didChangeBatteryStatus):
* WebCoreSupport/BatteryClientEfl.h: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.h.
(WebCore):
(BatteryClientEfl):
(BatteryClientEfl::~BatteryClientEfl):
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Threadsafety issues in WebScriptObject
https://bugs.webkit.org/show_bug.cgi?id=90849

Reviewed by Filip Pizlo.

WebScriptObject maintains a NSMap of wrapper objects. A race condition exists
between a wrapper being retrieved from the map, and being released - if the
final release on an object is called between a call to getJSWrapper and the
subsequent retain, we may end up with a stale object reference.

We can make this safe by hoisting the removal from the map from delloc up into
release (if the retainCount is 1), and locking release against retrieval from
the map. Since release may be called from another thread, and NSMap is not
threadsafe, we'd better lock around all access to the map (this fix already
necessitates get & remove to be locked, so this just adds 'add', too).

* bindings/objc/WebScriptObject.mm:
(WebCore::createJSWrapper):
    - lock around getJSWrapper, retain.
(-[WebScriptObject _setImp:originRootObject:rootObject:]):
    - lock around addJSWrapper.
(-[WebScriptObject release]):
    - Added; removeJSWrapper for last release, lock & synchronized vs. getJSWrapper.
(-[WebScriptObject dealloc]):
    - removeJSWrapper call hoisted into release.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebSocket: Remove hixie76 protocol implementation
https://bugs.webkit.org/show_bug.cgi?id=88620

Patch by Yuta Kitamura <yutak@chromium.org> on 2012-07-10
Reviewed by Adam Barth.

Source/WebCore: 

This change removes code that implements the old hixie-76 WebSocket protocol which
isn't used anymore.

No new tests are added, because the code using the current protocol should not be
affected. Tests for hixie-76 protocol are skipped (these tests will be removed
eventually).

* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
(ThreadableWebSocketChannelClientWrapper):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::WebSocket):
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
(WebCore::WebSocket::protocol):
(WebCore::WebSocket::extensions):
(WebCore::WebSocket::binaryType):
(WebCore::WebSocket::setBinaryType):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didClose):
(WebCore::WebSocket::getFramingOverhead):
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::connect):
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::fail):
(WebCore::WebSocketChannel::didCloseSocketStream):
(WebCore::WebSocketChannel::processBuffer):
(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::enqueueTextFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::enqueueBlobFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
(WebCore::WebSocketChannel::abortOutgoingFrameQueue):
* Modules/websockets/WebSocketChannel.h:
(WebSocketChannel):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::WebSocketHandshake):
(WebCore::WebSocketHandshake::clientHandshakeMessage):
(WebCore::WebSocketHandshake::clientHandshakeRequest):
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::checkResponseHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
(WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WorkerThreadableWebSocketChannel):
(Peer):
(Bridge):

LayoutTests: 

Skip tests under hixie76 directory in all ports, because hixie-76 protocol support is
being dropped. These tests will be removed later.

* platform/chromium/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/Skipped:
* platform/wk2/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Mac] Form related layout tests cause timeout
https://bugs.webkit.org/show_bug.cgi?id=90851

Reviewed by Kent Tamura.

This patch changed to pass a valid argument to LocaleMac
constructor.

No new tests. No more timeout in tests listed in the bug.

* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::currentLocale): Changed to pass local identifier string
instead of NSLocale object.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix GTK+ build after r122175.

* platform/graphics/texmap/TextureMapperLayer.cpp: Include
CString.h when using cairo.

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