Function names on Object.prototype should be common identifiers
https://bugs.webkit.org/show_bug.cgi?id=117614

Reviewed by Darin Adler.

Source/JavaScriptCore: 

Patch written by Sam Weinig. Make Object's prototype function names common identififers since they're used frequently.

* runtime/CommonIdentifiers.h:
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSObject.h:
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::finishCreation):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

Source/WebCore: 

Use the added common identifiers.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::updateDocument):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r150651): Web Audio doesn't work at all (silence or squawks) on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=117652

Reviewed by Eric Carlson.

r150651 disabled setting the buffer size to a large value, but in so doing, also
disabled setting the buffer size to a small value for Web Audio. Narrow the Mountain
Lion protection to just the <video> element case.

* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
https://bugs.webkit.org/show_bug.cgi?id=117647
<rdar://problem/13881024>

Source/WebCore: 

Reviewed by Darin Adler.
        
The API returns the matched ranges in the DOM order regardless of the
find direction, but the index of the first match after the user selection
should take the find direction into account.

Extended existing test in TestWebKitAPI.

* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges): Added handling of the Backwards case.
* page/Page.h: Fixed incorrect name of the enum.

Source/WebKit2: 

Reviewed by Darin Adler.
        
The API returns the matched ranges in the DOM order regardless of the
find direction, but the index of the first match after the user selection
should take the find direction into account.

Extended existing test in TestWebKitAPI.

* Shared/API/c/WKFindOptions.h: Added enum for the case where there are
no matches after the user selection in the direction of the find.

Tools: 

Reviewed by Darin Adler.
        
The test now uses content with a selection and tests both
forwards and backward find as well as the case of a find
that has no matches after the user selection.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/FindMatches.mm:
(TestWebKitAPI::didFindStringMatches):
* TestWebKitAPI/Tests/WebKit2/findRanges.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for AVFoundation-backed HTMLMediaElements in the WebVideoFullScreenController.
https://bugs.webkit.org/show_bug.cgi?id=117597

Reviewed by Eric Carlson.

Source/WebCore:

Check for media elements with AVFoundation media types and create a AVPlayerLayer
rather than a QTMovieLayer.

* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]): Take a CALayer rather than a
    QTMovieLayer. Move the code which connects the layer with it's media source into
    setMediaElement.
(-[WebVideoFullscreenController windowDidLoad]): Give the window's contentView a generic
    CALayer instaead of a QTMovieLayer.
(-[WebVideoFullscreenController setMediaElement:]): Test whether the incoming media
    element is backed by a QTMovie or an AVPlayer, and create the appropriate layer.
(-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the observer of
    AVPlayer's rate property.
(-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
    If the keyPath is "rate", call rateChanged.

Source/WebKit/mac:

Allow AVFoundation to be enabled even when the FullScreen API is disabled.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

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