[MSE] http/tests/media/media-source/mediasource-endofstream-invaliderror.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=134413

Reviewed by Eric Carlson.

Source/WebCore:
Update MediaSource.endOfStream() to take an optional enum instead of an optional String.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::endOfStream):
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/MediaSource.idl:

LayoutTests:
Fix an inadevntant editing error in mediasource-endofstream-invaliderror.html, and fix missing
whitespace at the end of http/tests/media/media-source/mediasource-endofstream-invaliderror-expected.txt.

* http/tests/media/media-source/mediasource-endofstream-invaliderror-expected.txt:
* http/tests/media/media-source/mediasource-endofstream-invaliderror.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html is failing in some bots
https://bugs.webkit.org/show_bug.cgi?id=134769

* TestExpectations: Skipping the test.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] caption size is sometimes incorrect in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=134740

Reviewed by Jer Noble.

Captions on iOS are displayed in fullscreen with a TextTrackRepresentation object. Because
the fullscreen video presentation is controlled by code in the UI process running on the
UI thread, WebCore is notified of changes to fullscreen state asynchronously. This resulted
in the TextTrackRepresentation object being created and/or destroyed too late some of the 
time, which caused us to sometimes display captions incorrectly. Fix this by setting up and
tearing down the TextTrackRepresentation object when WebCore's 'webkitfullscreenchange'
event fires.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::enteredFullscreen): Notify text track container.
(WebCore::MediaControlsHost::exitedFullscreen): Ditto.
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediacontrols/MediaControlsHost.idl:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleFullscreenChange): Notify host of fullscreen change.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::requiresTextTrackRepresentation): Only return true when in
    fullscreen.
(WebCore::HTMLMediaElement::setVideoFullscreenLayer): Call updateTextTrackDisplay.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
    m_updateTextTrackRepresentationStyle to false.
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Move logic for creating
    TextTrackRepresentation to updateTextTrackRepresentation.
(WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize): New, split out of updateTimerFired.
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Move code to force immediate
    font size change to updateActiveCuesFontSize.
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation): New, update
    text track representation, creating first if necessary.
(WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Add an early
    return if we don't have a text track representation.
(WebCore::MediaControlTextTrackContainerElement::updateStyleForTextTrackRepresentation): Early
    return if there is nothing to be done.
(WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): Force a caption update
    if there are visible captions.
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Set m_updateTextTrackRepresentationStyle
    to true.
(WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged):  Force a 
    caption update if there are visible captions.
* html/shadow/MediaControlElements.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added css jit profiler, disabled by default.
https://bugs.webkit.org/show_bug.cgi?id=134695

Reviewed by Benjamin Poulain.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
Tell the RuleData when its compiled selector is used.
* css/RuleSet.cpp:
(WebCore::RuleData::RuleData):
Initialize the compiled selector use count to 0.
* css/RuleSet.h:
(WebCore::RuleData::~RuleData):
(WebCore::RuleData::compiledSelectorUsed):
Count and log the number of times a compiled selector is used.
* cssjit/SelectorCompiler.h:
Added option for CSS_SELECTOR_JIT_PROFILING set to 0 by default.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::execute):
Tell the SelectorData when its compiled selector is used.
* dom/SelectorQuery.h:
(WebCore::SelectorDataList::SelectorData::SelectorData):
(WebCore::SelectorDataList::SelectorData::~SelectorData):
(WebCore::SelectorDataList::SelectorData::compiledSelectorUsed):
Count and log the number of times a compiled selector is used.



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