cue.text fails for some track element cues
https://bugs.webkit.org/show_bug.cgi?id=81123

Patch by Brendan Long <b.long@cablelabs.com> on 2013-10-22
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-long-captions-file.html

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Use buffer when we don't have full lines.
(WebCore::WebVTTParser::fileFinished): Force file to finish parsing.
(WebCore::WebVTTParser::hasRequiredFileIdentifier): Simplify due to using String.
(WebCore::WebVTTParser::collectCueText): Don't automatically create cues when we run out of data.
(WebCore::WebVTTParser::collectNextLine): Use buffer.
* html/track/WebVTTParser.h: Add m_buffer and Finished state.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::notifyFinished): Call m_parser->fileFinished() when done.

LayoutTests:

* media/track/captions-webvtt/captions-long.vtt: Added.
* media/track/track-long-captions-file-expected.txt: Added.
* media/track/track-long-captions-file.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make touch adjustment work again.

The approach used was to introduce a WebPageProxy::handleSingleTap method
to send the intent of generate a click event to WebCore who will generate
fake mouse events with their positions adjusted if the touch adjustment
feature is enabled.

Reviewed by: Luciano Wolf
Prepare WebKit Buildbot master for Mavericks.
This adds the following bot configurations:
    Mavericks Release/Debug builders
    Mavericks Release/Debug WK1 Testers
    Mavericks Release/Debug WK2 Testers

Unreviewed.
        
* BuildSlaveSupport/build.webkit.org-config/config.json:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove NIXGestureEvent.deltaX and NIXGestureEvent.deltaY.

Those properties were never used inside Nix besides the lack of documentation about
what they would represent.

Reviewed by: Thiago Lacerda
             Sergio Correia
Remote Layer Tree: Support hardware accelerated filters
https://bugs.webkit.org/show_bug.cgi?id=123139

Reviewed by Anders Carlsson.

* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::ArgumentCoder<Length>::encode):
(CoreIPC::ArgumentCoder<Length>::decode):
Add simple coders for Length.

(CoreIPC::encodeFilterOperation):
(CoreIPC::decodeFilterOperation):
Serialize and deserialize FilterOperations, except for CUSTOM and VALIDATED_CUSTOM.

(CoreIPC::ArgumentCoder<Length>::encode):
(CoreIPC::ArgumentCoder<Length>::decode):
Add coders for FilterOperations that delegate to {en,de}codeFilterOperation
for each operation in the list.

* Shared/WebCoreArgumentCoders.h:
Drive-by fix indentation.
Expose the Length and FilterOperations coders.

* Shared/mac/RemoteLayerTreeTransaction.h:
Add FiltersChanged and LayerProperties::filters.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
Encode and decode our FilterOperations.

(WebKit::dumpChangedLayers):
Dump information about the layers' filters.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::commit):
Use PlatformCAFilters code to apply a FilterOperations object to our CALayer.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::setFilters):
Replace existing filters with our new set, and note that they've changed.

(PlatformCALayerRemote::copyFiltersFrom):
Not yet implemented. Not critical for this feature, either.

(PlatformCALayerRemote::filtersCanBeComposited):
For now, this is the same as the Mac version.

* WebCore.exp.in:
Export a variety of filter-related things.

* platform/graphics/ca/PlatformCAFilters.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setFilters):
* platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
(PlatformCAFilters::setFiltersOnLayer):
setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
as its argument, because it doesn't need a PlatformCALayer, and this way
we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
and not PlatformCALayers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r157774.
http://trac.webkit.org/changeset/157774
https://bugs.webkit.org/show_bug.cgi?id=123167

causes python test to fail (Requested by smfr on #webkit).

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.__init__):
(TestExpectations._add_expectations):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
(_set_up_derived_options):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
add mac-mavericks to the target_platform list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify HRTFDatabaseLoader's load map
https://bugs.webkit.org/show_bug.cgi?id=122944

Reviewed by Eric Carlson.

* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore::loaderMap): Return a reference to a NeverDestroyed HashMap that maps sample rates to loaders.
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
(WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
* platform/audio/HRTFDatabaseLoader.h: Remove the LoaderMap type definition, the private singleton of that type
and the singleton's unused getter.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore::fillWithEmptyClients adopts new empty clients before leaking their pointers
https://bugs.webkit.org/show_bug.cgi?id=122945

Reviewed by Anders Carlsson.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients): Store the static empty clients as NeverDestroyed, rather than
adopting the pointer of each heap-allocated object and then immediately leaking that pointer.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adding Mock class to test RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=122848

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-10-22
Reviewed by Eric Carlson.

The following tests can be run:

    RTCPeerConnection-createAnswer.html
    RTCPeerConnection-createOffer.html
    RTCPeerConnection-ice.html
    RTCPeerConnection-localDescription.html
    RTCPeerConnection-remoteDescription.html
    RTCPeerConnection-state.html

Tests that require a MediaStream object, by invoking getUserMedia,
are not ready to run yet.

No new tests needed.

* CMakeLists.txt:
* platform/mediastream/RTCPeerConnectionHandler.cpp:
(WebCore::createHandler):
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
* platform/mock/RTCNotifiersMock.cpp: Added.
* platform/mock/RTCNotifiersMock.h: Added.
* platform/mock/RTCPeerConnectionHandlerMock.cpp: Added.
* platform/mock/RTCPeerConnectionHandlerMock.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
* platform/mock/TimerEventBasedMock.h: Added.
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::enableMockRTCPeerConnectionHandler):
* testing/Internals.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream JSLock changes
https://bugs.webkit.org/show_bug.cgi?id=123107

Reviewed by Geoffrey Garen.

* runtime/JSLock.cpp:
(JSC::JSLock::unlock):
(JSC::JSLock::dropAllLocks): Modified to take a SpinLock, used only on iOS.
(JSC::JSLock::dropAllLocksUnconditionally): Modified to take a SpinLock, used only on iOS. Also
use pre-increment instead of post-increment when we're not using the return value of the instruction.
(JSC::JSLock::grabAllLocks): Modified to take a SpinLock, used only on iOS. Also change
places where we were using post-increment/post-decrement to use pre-increment/pre-decrement,
since we don't use the return value of such instructions.
(JSC::JSLock::DropAllLocks::DropAllLocks): Modified to support releasing all locks unconditionally.
Take a spin lock before releasing all locks on iOS. Also, use nullptr instead of 0.
(JSC::JSLock::DropAllLocks::~DropAllLocks): Take a spin lock before acquiring all locks on iOS.
* runtime/JSLock.h: Remove extraneous argument name "exec" from DropAllLocks as the data type of
the argument is sufficiently descriptive of its purpose.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename some line box functions to be just about lines
https://bugs.webkit.org/show_bug.cgi?id=123168

Reviewed by Dave Hyatt.

firstLineBoxBaseline -> firstLineBaseline
hasInlineBoxChildren -> hasLines
        
Also use hasLines in a bunch of places where firstLineBox() was used.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
        
    Also use hasRenderedText() instead of firstTextBox()

* rendering/RenderFullScreen.cpp:
        
    Fix namespace.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
add mac-mavericks to wkbuild_unittest.py.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
There should be a way to specify additional repository paths in NRWT
https://bugs.webkit.org/show_bug.cgi?id=123135

Reviewed by Alexey Proskuryakov.

Added --additional-repository-name and --additional-repository-path options to NRWT.
These options allow us to submit addtional repository information, such as of Safari's
to the new flakiness dashboard.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/base.py:
(Port.repository_paths):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change Platform::loadAudioResource signature to get a void* instead of char* to represent the memory buffer.

The data isn't a character stream, so void* makes more sense.

Reviewed by: Sergio Correia
GammaFilterOperation seems to be dead code
https://bugs.webkit.org/show_bug.cgi?id=123173

Reviewed by Simon Fraser.

* platform/graphics/filters/FilterOperation.cpp:
* platform/graphics/filters/FilterOperation.h:
Remove dead code.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
URTBF after r157803 for !ENABLE(CSS_FILTERS) platforms.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix Mavericks build; use <> for framework include.

* page/CaptionUserPreferencesMediaAF.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream more ARMv7s bits
https://bugs.webkit.org/show_bug.cgi?id=123052

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* Configurations/JavaScriptCore.xcconfig:
* Configurations/ToolExecutable.xcconfig: Enable CLANG_ENABLE_OBJC_ARC for i386 as I'm
modifying a file in JavaScriptCore/Configurations.

Source/WebCore:

* Configurations/WebCore.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's
https://bugs.webkit.org/show_bug.cgi?id=123033

Reviewed by David Hyatt.

In Blink I made this function in a bit different way. This change modifies it
to be identical, which helps a lot in the future cross-merging patches.

No new tests, covered by existing texts.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):

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