Fix build for architectures with 4 argument registers (broken since r158681).
https://bugs.webkit.org/show_bug.cgi?id=123826

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-05
Reviewed by Michael Saboff.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
(JSC::CCallHelpers::setupArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused RenderWidget::notifyWidget().

Rubber-stamped by Anders Carlsson.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Mountain Lion Debug bot after r158689

Unreviewed.

It looks like WebGeolocationManagerProxy::stopUpdating() and WebGeolocationManagerProxy::processDidClose()
are racing in some cases, causing the assertion to fail.

That case is handled properly in the last if() branch of WebGeolocationManagerProxy::removeRequester().
This patch remove the overzealous assertion.

* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::removeRequester):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ObjCCallbackFunctionImpl's NSInvocation shouldn't retain its target or arguments
https://bugs.webkit.org/show_bug.cgi?id=123822

Reviewed by Geoffrey Garen.

Using -retainArguments on ObjCCallbackFunctionImpl's NSInvocation leads to memory leaks.
We should handle retaining/releasing the target ourselves, and we should never retain the arguments.

* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunctionImpl::~ObjCCallbackFunctionImpl):
(JSC::ObjCCallbackFunctionImpl::name):
(objCCallbackFunctionForInvocation):
(objCCallbackFunctionForMethod):
(objCCallbackFunctionForBlock):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for decoding NSStrings
https://bugs.webkit.org/show_bug.cgi?id=123829

Reviewed by Andreas Kling.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeObject):
(-[WKRemoteObjectDecoder allowsKeyedCoding]):
Always return YES.

(-[WKRemoteObjectDecoder containsValueForKey:]):
Look up the key in the current dictionary.

(-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
Try to get the WebData object and return its data + size.

(-[WKRemoteObjectDecoder requiresSecureCoding]):
Return YES.

(checkIfClassIsAllowed):
Check if the class or any of its superclasses are are allowed.

(validateClass):
Call checkIfClassIsAllowed and validate that the class conforms to NSSecureCoding.

(decodeObject):
Get the class name, verify that the class exists and is allowed.
Allocate and initialize an object using initWithCoder:.

(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
Set the allowed classes, look up the object in _currentDictionary and call decodeObject.

(-[WKRemoteObjectDecoder allowedClasses]):
Return _allowedClasses.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
Declare interfaceIdentifier as a constant.

(-[WKRemoteObjectRegistry _invokeMessageWithBody:]):
Decode the interface identifier.

* Shared/ImmutableDictionary.h:
(WebKit::ImmutableDictionary::get):
(WebKit::ImmutableDictionary::size):
(WebKit::ImmutableDictionary::map):
Make member functions const.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Full width semicolon is wrong in vertical text.
https://bugs.webkit.org/show_bug.cgi?id=123814
<rdar://problem/15312541>

Reviewed by Benjamin Poulain.

Source/WebCore: 

The full width semicolon should always be upright.
Adding it to the list of characters that should
ignore rotation.

* platform/graphics/FontGlyphs.cpp:
(WebCore::shouldIgnoreRotation):

LayoutTests: 

Extended the existing test to include the full width
semicolon.

* platform/mac/fast/text/vertical-no-sideways.html:
* platform/mac/platform/mac/fast/text/vertical-no-sideways-expected.txt:
* platform/mac-mountainlion/platform/mac/fast/text/vertical-no-sideways-expected.txt



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Factor index cache for NodeLists and HTMLCollections to a class
https://bugs.webkit.org/show_bug.cgi?id=123823

Reviewed by Ryosuke Niwa.

Implement index cache class that can used by NodeLists and HTMLCollections that currently
each have implementations of their own.
        
This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
HTMLCollection is will be transitioned later.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::length):
(WebCore::ChildNodeList::item):
        
    The client calls to cache to for indexed and size access.

(WebCore::ChildNodeList::collectionFirst):
(WebCore::ChildNodeList::collectionLast):
(WebCore::ChildNodeList::collectionTraverseForward):
(WebCore::ChildNodeList::collectionTraverseBackward):
        
    Cache calls back to these as needed to do the actual traversal.

(WebCore::ChildNodeList::invalidateCache):
* dom/ChildNodeList.h:
* dom/CollectionIndexCache.h: Added.
        
    Templated cache class itself.

(WebCore::::CollectionIndexCache):
(WebCore::::nodeCount):
(WebCore::::nodeBeforeCached):
(WebCore::::nodeAfterCached):
(WebCore::::nodeAt):
(WebCore::::invalidate):
* dom/LiveNodeList.cpp:
(WebCore::firstMatchingElement):
(WebCore::nextMatchingElement):
(WebCore::traverseMatchingElementsForward):
(WebCore::LiveNodeList::collectionFirst):
(WebCore::LiveNodeList::collectionLast):
(WebCore::LiveNodeList::collectionTraverseForward):
(WebCore::LiveNodeList::collectionTraverseBackward):
(WebCore::LiveNodeList::length):
(WebCore::LiveNodeList::item):
(WebCore::LiveNodeList::invalidateCache):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKRemoteObjectDecoder should know which interface it's decoding for
https://bugs.webkit.org/show_bug.cgi?id=123833

Reviewed by Andreas Kling.

Move the interface identifier out into the root object body dictionary and make
the encoded invocation a sibling of it. That way we can look up the interface before
creating the decoder.

Also, manage exported objects and interfaces in a separate hash map.

* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
(decodeInvocation):
(decodeObject):
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[WKRemoteObjectRegistry _handleMessageWithName:body:]):
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):

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