Move number and geometry classes into the API namespace
https://bugs.webkit.org/show_bug.cgi?id=125549

Reviewed by Geoffrey Garen.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeBool:forKey:]):
(-[WKRemoteObjectEncoder encodeInt64:forKey:]):
(-[WKRemoteObjectEncoder encodeDouble:forKey:]):
(-[WKRemoteObjectDecoder decodeBoolForKey:]):
(-[WKRemoteObjectDecoder decodeInt64ForKey:]):
(-[WKRemoteObjectDecoder decodeDoubleForKey:]):
* Shared/API/c/WKGeometry.cpp:
(WKSizeGetTypeID):
(WKPointGetTypeID):
(WKRectGetTypeID):
(WKPointCreate):
(WKSizeCreate):
(WKRectCreate):
* Shared/API/c/WKNumber.cpp:
(WKBooleanGetTypeID):
(WKBooleanCreate):
(WKDoubleGetTypeID):
(WKDoubleCreate):
(WKUInt64GetTypeID):
(WKUInt64Create):
* Shared/API/c/WKSharedAPICast.h:
* Shared/APIGeometry.cpp:
(API::Point::encode):
(API::Point::decode):
(API::Size::encode):
(API::Size::decode):
(API::Rect::encode):
(API::Rect::decode):
* Shared/APIGeometry.h:
(API::Size::create):
(API::Size::Size):
(API::Point::create):
(API::Point::Point):
(API::Rect::create):
(API::Rect::Rect):
* Shared/APINumber.h:
(API::Number::create):
(API::Number::decode):
(API::Number::Number):
* Shared/APIObject.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::getPluginModuleInformation):
(WebKit::createPluginInformationDictionary):
* Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
(WebKit::getPlatformPluginModuleInformation):
* Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::clearNotifications):
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):
* UIProcess/StatisticsRequest.cpp:
(WebKit::addToDictionaryFromHashMap):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindStringMatches):
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::createNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::trackedRepaintRects):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correct a preprocessor guard from a mis-merged patch

In r160367, I mismerged a patch from Gustavo Noronha. This commit
fixes the merge and thus fixes the CMake build.

* html/HTMLMediaElement.idl: Move the preprocessor guard to the correct property.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Horizontal rubber-banding without a horizontal scrollbar is distracting
https://bugs.webkit.org/show_bug.cgi?id=125550

Reviewed by Simon Fraser.

Setting the ScrollElasticity to ScrollElasticityAutomatic will make sure we only 
rubber-band horizontally when there is a horizontal scrollbar.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Share accessibility/aria-hidden-negates-no-visibility.html expectation with other ports
https://bugs.webkit.org/show_bug.cgi?id=125495

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-12-10
Reviewed by Chris Fleizach.

Expectation of accessibility/aria-hidden-negates-no-visibility.html is the same for EFL and GTK.

* accessibility/aria-hidden-negates-no-visibility-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/aria-hidden-negates-no-visibility-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a HashMap constructor that takes an initializer list
https://bugs.webkit.org/show_bug.cgi?id=125551

Reviewed by Dan Bernstein.

Source/WTF:

* wtf/HashMap.h:
(WTF::HashMap::HashMap):

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL build fix attempt

Source/WebKit2:

* CMakeLists.txt: Added APIGeometry.cpp to source lists.

Tools:

* TestWebKitAPI/CMakeLists.txt: Added ${WEBKIT2_DIR}/Platform/CoreIPC to include lists.
* WebKitTestRunner/CMakeLists.txt: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
All observable PageLoadState properties should change in an atomic fashion, with properly nested change notifications
https://bugs.webkit.org/show_bug.cgi?id=125431

Reviewed by Anders Carlsson.

Made PageLoadState maintain two copies of its state data members, one representing the
committed state and one possibly containing uncommitted changes. When changes are committed,
change notifications are sent and the uncommitted state is copied into the committed state.
Changes can be committed explicitly at any time, but are also committed when the last
outstanding transaction ends. Transactions are RAII objects vended by the PageLoadState.
Mutating the PageLoadState requires holding a Transaction, which is enforced by making all
the mutating member functions take a Transaction::Token. Passing a Token also marks the
PageLoadState as possibly having uncommitted changes.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
Added PageLoadStateObserver::{will,did}ChangeActiveURL overrides that call
-{will,did}ChangeValueForKey:.

* UIProcess/PageLoadState.cpp:
Moved constant from the middle of the file to the beginning and reworded comment.
(WebKit::PageLoadState::PageLoadState): Added initializers for new member variables, removed
initialization of members that are not part of Data, which initializes them in its
constructor.
(WebKit::PageLoadState::endTransaction): Added. Calles when a Transaction is destructed.
Decrements the outstanding transaction count, and if it is zero, commits changes.
(WebKit::PageLoadState::commitChanges): Added. Checks for differences in observable
properties between the committed state and the uncommitted state, then makes appropriate
willChange Observer callbacks, then copies the uncommitted state into the committed state,
then makes appropriate didChange Observer callbacks in reverse order. Also added active URL
to the set of observable properties.
(WebKit::PageLoadState::reset): Changed to take a transaction token, act on
m_uncommittedState, and not make observer callbacks.
(WebKit::PageLoadState::isLoading): Changed to access m_committedState.
(WebKit::PageLoadState::activeURL): Changed to call a static function factored out of this.
(WebKit::PageLoadState::estimatedProgress): Ditto.
(WebKit::PageLoadState::pendingAPIRequestURL): Changed to access m_committedState.
(WebKit::PageLoadState::setPendingAPIRequestURL): Changed to take a transaction token, act
on m_uncommittedState, and not make observer callbacks.
(WebKit::PageLoadState::clearPendingAPIRequestURL): Ditto.
(WebKit::PageLoadState::didStartProvisionalLoad): Ditto.
(WebKit::PageLoadState::didReceiveServerRedirectForProvisionalLoad): Ditto.
(WebKit::PageLoadState::didFailProvisionalLoad): Ditto.
(WebKit::PageLoadState::didCommitLoad): Ditto.
(WebKit::PageLoadState::didFinishLoad): Ditto.
(WebKit::PageLoadState::didFailLoad): Ditto.
(WebKit::PageLoadState::didSameDocumentNavigation): Ditto.
(WebKit::PageLoadState::setUnreachableURL): Ditto.
(WebKit::PageLoadState::title): Changed to access m_committedState.
(WebKit::PageLoadState::setTitle): Changed to take a transaction token, act on
m_uncommittedState, and not make observer callbacks.
(WebKit::PageLoadState::didStartProgress): Ditto.
(WebKit::PageLoadState::didChangeProgress): Ditto.
(WebKit::PageLoadState::didFinishProgress): Ditto.
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::Transaction::Transaction): Added. Calls
PageLoadState::beginTransaction.
(WebKit::PageLoadState::Transaction::~Transaction): Added. Calls
PageLoadState::endTransaction.
(WebKit::PageLoadState::Transaction::Token::Token): Added. Sets m_mayHaveUncommittedChanges.
(WebKit::PageLoadState::transaction): Added. Returns a Transaction for this PageLoadState.
(WebKit::PageLoadState::provisionalURL): Changed to access m_committedState.
(WebKit::PageLoadState::url): Ditto.
(WebKit::PageLoadState::unreachableURL): Ditto.
(WebKit::PageLoadState::beginTransaction): Added. Increments the outstanding transaction
count.
(WebKit::PageLoadState::Data::Data): Added. Moved internal state members into this struct
and made its constructor initialize state and estimatedProgress.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadURL): Changed to create a PageLoadState::Transaction and pass it
along.
(WebKit::WebPageProxy::loadURLRequest): Ditto.
(WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
(WebKit::WebPageProxy::reload): Ditto.
(WebKit::WebPageProxy::goForward): Ditto.
(WebKit::WebPageProxy::goBack): Ditto.
(WebKit::WebPageProxy::goToBackForwardItem): Ditto.
(WebKit::WebPageProxy::receivedPolicyDecision): Ditto.
(WebKit::WebPageProxy::didStartProgress): Ditto. Also added a call to
PageLoadState::commitChanges before calling the client, so that the client sees the updated
state.
(WebKit::WebPageProxy::didChangeProgress): Ditto.
(WebKit::WebPageProxy::didFinishProgress): Ditto.
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Ditto.
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Ditto.
(WebKit::WebPageProxy::didCommitLoadForFrame): Ditto.
(WebKit::WebPageProxy::didFinishLoadForFrame): Ditto.
(WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
(WebKit::WebPageProxy::didReceiveTitleForFrame): Ditto.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Changed to create a
PageLoadState::Transaction and pass it along.
(WebKit::WebPageProxy::processDidCrash): Ditto. This addressed a FIXME about the client not
seeing the state prior to the crash, because now the changes cuased by reset() aren’t
committed until after the client callback.

* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to create a
PageLoadState::Transaction and pass it along.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify CSE's treatment of NodeRelevantToOSR
https://bugs.webkit.org/show_bug.cgi?id=125538

Reviewed by Oliver Hunt.
        
Make the NodeRelevantToOSR thing obvious: if there is any MovHint on a node then the
node is relevant to OSR.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::run):
(JSC::DFG::CSEPhase::performNodeCSE):
(JSC::DFG::CSEPhase::performBlockCSE):



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