WebKit2 View Gestures (Swipe): Update rubberBandsAt{Left,Right} when WebKit swipe is enabled
https://bugs.webkit.org/show_bug.cgi?id=127855
<rdar://problem/15933878>

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView setAllowsBackForwardNavigationGestures:]):
Enable implicit control of rubberbanding when using WebKit2's swipe implementation.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::sendWheelEvent):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::setShouldUseImplicitRubberBandControl):
(WebKit::WebPageProxy::shouldUseImplicitRubberBandControl):
Rename away from "legacy" name, since we're using it on purpose now.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::expectsLegacyImplicitRubberBandControl):
(WebKit::WebPageProxy::platformInitialize):
Since NSVersionOfLinkTimeLibrary doesn't work for applications that
don't link directly against the library (like Safari), let's explicitly
check if Safari is expecting the legacy behavior, otherwise using
the linked version of WebKit2, but using the new behavior if we can't
determine the linked version of WebKit2 and are not Safari.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
Enable swipe in MiniBrowser for testing purposes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
clip-path swaps bottom radii for the inset shape
https://bugs.webkit.org/show_bug.cgi?id=127859

Reviewed by Dirk Schulze.

Source/WebCore:

The bottom right and bottom left radii were passed in the wrong order,
causing the wrong corner to be clipped in the resultant rendering.

Test: css3/masking/clip-path-inset-corners.html

* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path): Change the parameter order to be
correct.

LayoutTests:

Test that all the inset radii are applied to the correct corners.

* css3/masking/clip-path-inset-corners-expected.html: Added.
* css3/masking/clip-path-inset-corners.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Fully implement IDBKeyData encoding/decoding
https://bugs.webkit.org/show_bug.cgi?id=127863

Rubberstamped by Alexey Proskuryakov.

Source/WebCore:

* platform/KeyedCoding.h:

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):

* WebCore.exp.in:

Source/WebKit2:

Handle invalid buffers, and pass IDBKeyData decoding along:
* DatabaseProcess/IndexedDB/IDBSerialization.cpp:
(WebKit::deserializeIDBKeyPath):
(WebKit::serializeIDBKeyData):
(WebKit::deserializeIDBKeyData):
* DatabaseProcess/IndexedDB/IDBSerialization.h:

Implement decodeBool and decodeDouble:
* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::decodeBool):
(WebKit::KeyedDecoder::decodeDouble):
* Shared/cf/KeyedDecoder.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE][Mac] In SourceBufferPrivateAVFObjC, only include those headers actually necessary to compile.
https://bugs.webkit.org/show_bug.cgi?id=127846

Reviewed by Darin Adler.

To work around a compile issue, only include those paths containing classes and typedefs
which are used within SourceBufferPrivateAVFObjC, rather than all of AVFoundation.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update clip-path tests to use new shape syntax
https://bugs.webkit.org/show_bug.cgi?id=127862

Reviewed by Dirk Schulze.

Update the tests to reflect the new shape syntax. The inset tests are
copied from the rectangle tests that will be removed when the old
syntax is removed.

* css3/masking/clip-path-inset-expected.txt: Added.
* css3/masking/clip-path-inset.html: Added.
* svg/clip-path/clip-path-shape-circle-1.svg:
* svg/clip-path/clip-path-shape-circle-2.svg:
* svg/clip-path/clip-path-shape-ellipse-1.svg:
* svg/clip-path/clip-path-shape-ellipse-2.svg:
* svg/clip-path/clip-path-shape-rounded-inset-1-expected.svg: Added.
* svg/clip-path/clip-path-shape-rounded-inset-1.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-circle-1.svg.
* svg/clip-path/clip-path-shape-rounded-inset-2-expected.svg: Added.
* svg/clip-path/clip-path-shape-rounded-inset-2.svg: Copied from LayoutTests/svg/clip-path/clip-path-shape-circle-1.svg.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CaptionUserPreferences should not be on the PageGroup if they are not really per-PageGroup (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=127666

Reviewed by Eric Carlson.

This patch:
- Makes CaptionUserPreferences a singleton (temporary) that is accessed
  via Page.
- Simplifies overriding system preferences by requiring that a Document be
  be passed so the correct Settings object can be obtained (and not just a 
  random one).
- Stops using UserStyleSheets for captions style injection, and instead
  adds a new style sheet to the DocumentStyleSheetCollection.
- Move caption style sheet creation into its own file - CaptionStyleSheetMediaAF.h/cpp

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* WebCore.exp.in:
Update exports.

* css/DocumentRuleSets.cpp:
* css/InspectorCSSOMWrappers.cpp:
* dom/Document.cpp:
* dom/DocumentStyleSheetCollection.cpp:
* dom/DocumentStyleSheetCollection.h:
Switch from using the user style sheet mechanism, which is meant for, you guessed it, users,
to an explicit caption style sheet.

* Modules/mediacontrols/MediaControlsHost.cpp:
* html/HTMLMediaElement.cpp:
* html/shadow/MediaControlElements.cpp:
Get the CaptionUserPreferences via the Page.

* page/CaptionStyleSheetMediaAF.cpp: Added.
* page/CaptionStyleSheetMediaAF.h: Added.
Move caption style sheet creation here. If the global style changes, the sheet is invalidated
and this is called again.

* page/CaptionUserPreferences.cpp:
* page/CaptionUserPreferences.h:
- Removes unused m_havePreferences member.
- Change userPrefersFoo() functions to take a Document&. Use it to check its Settings.
- Remove setUserPrefersFoo() functions and just set the Settings directly.
- Move all the testing only pieces together.
        
* page/CaptionUserPreferencesMediaAF.cpp:
* page/CaptionUserPreferencesMediaAF.h:
- Extract caption style sheet creation into CaptionStyleSheetMediaAF.h/cpp
- Stop waiting for an interested party, and just register for appearance change
  notifications right away. Media elements are common enough that this should not
  make a difference.

* page/Page.cpp:
(WebCore::Page::updateStyleForAllPagesForCaptionPreferencesChanged):
Add helper to call captionPreferencesChanged() on all the Pages.

(WebCore::Page::captionPreferences):
Add accessor for the CaptionUserPreferences. Currently this returns a singleton, but I plan
to extract the singleton aspects of it into another class, and leave the per-Page parts here.

* page/Page.h:
* page/PageGroup.cpp:
* page/PageGroup.h:
Remove CaptionUserPreferences from here.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setShouldDisplayTrackKind):
(WebCore::InternalSettings::shouldDisplayTrackKind):
Override the settings for the page directly.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::Internals):
(WebCore::Internals::captionsStyleSheetOverride):
(WebCore::Internals::setCaptionsStyleSheetOverride):
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride):
(WebCore::Internals::setCaptionDisplayMode):
Get the CaptionUserPreferences via the Page.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* UIProcess/API/C/WKPage.cpp:
(WKPageLoadURL):
Don't use the resource request constructor that takes a String.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Mac Build fix after r163046.

Forward define AVSampleLayerDisplayLayer and its methods.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Deadlock hitting breakpoint while inspecting JSContext
https://bugs.webkit.org/show_bug.cgi?id=127864

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-01-29
Reviewed by Geoffrey Garen.

Temporarily drop the lock while we run the nested runloop.

* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::runEventLoopWhilePaused):

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

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:



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