WebKit-https.git
3 years agoDrop support for <isindex>
cdumez@apple.com [Tue, 13 Sep 2016 15:02:44 +0000 (15:02 +0000)]
Drop support for <isindex>
https://bugs.webkit.org/show_bug.cgi?id=7139

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import layout test coverage from W3C web-platform-tests. We used to fail
the last check but we now pass it. Chrome also passes this last check.

* web-platform-tests/html/semantics/forms/historical-expected.txt: Added.
* web-platform-tests/html/semantics/forms/historical.html: Added.
* web-platform-tests/html/semantics/forms/w3c-import.log: Added.

Source/WebCore:

Drop support for <isindex> and <input name=isindex>. Those are no longer
in the HTML specification and Chrome / Edge have already dropped their
support. Firefox is also planning on dropping this.

Test: imported/w3c/web-platform-tests/html/semantics/forms/historical.html

* css/StyleResolver.cpp:
(WebCore::elementTypeHasAppearanceFromUAStyle):
* css/html.css:
(input, textarea, keygen, select, button, meter, progress):
(input, textarea, keygen, select, button):
(#if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS):
(input::placeholder):
(input:focus, textarea:focus, keygen:focus, select:focus):
* dom/Element.cpp:
(WebCore::Element::ieForbidsInsertHTML):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
* html/HTMLTagNames.in:
* html/parser/HTMLStackItem.h:
(WebCore::isSpecialNode):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): Deleted.
(WebCore::createCaseMap): Deleted.
* html/parser/HTMLTreeBuilder.h:
* platform/network/FormData.cpp:
(WebCore::FormData::appendKeyValuePairItems):

Source/WebInspectorUI:

Drop references to isindex.

* UserInterface/Views/DOMTreeElement.js:

Source/WebKit/mac:

Drop references to isindex.

* WebCoreSupport/WebEditorClient.mm:
(attributesForAttributedStringConversion):
* WebView/WebHTMLView.mm:
(+[WebHTMLView _excludedElementsForAttributedStringConversion]):

LayoutTests:

Drop outdated tests / checks.

* dom/html/level2/html/HTMLIsIndexElement01-expected.txt: Removed.
* dom/html/level2/html/HTMLIsIndexElement01.html: Removed.
* dom/html/level2/html/HTMLIsIndexElement01.js: Removed.
* dom/html/level2/html/HTMLIsIndexElement02-expected.txt: Removed.
* dom/html/level2/html/HTMLIsIndexElement02.html: Removed.
* dom/html/level2/html/HTMLIsIndexElement02.js: Removed.
* dom/html/level2/html/HTMLIsIndexElement03-expected.txt: Removed.
* dom/html/level2/html/HTMLIsIndexElement03.html: Removed.
* dom/html/level2/html/HTMLIsIndexElement03.js: Removed.
* fast/dom/HTMLIsIndexElement/prototype-chain-expected.txt: Removed.
* fast/dom/HTMLIsIndexElement/prototype-chain.html: Removed.
* fast/dom/HTMLIsIndexElement/script-tests/prototype-chain.js: Removed.
* fast/dom/isindex-001.html: Removed.
* fast/dom/isindex-002.html: Removed.
* fast/events/resources/tabindex-focus-blur-all-frame1.html:
* fast/events/resources/tabindex-focus-blur-all-frame2.html:
* fast/events/resources/tabindex-focus-blur-all-iframe1.html:
* fast/events/resources/tabindex-focus-blur-all-iframe2.html:
* fast/forms/isindex-name-expected.txt: Removed.
* fast/forms/isindex-name.html: Removed.
* fast/forms/isindex-placeholder-expected.html: Removed.
* fast/forms/isindex-placeholder.html: Removed.
* fast/forms/text-style-color.html: Removed.
* fast/parser/fragment-parser-expected.txt:
* fast/parser/script-tests/fragment-parser.js:
* fast/replaced/table-percent-height-text-controls-expected.txt:
* fast/replaced/table-percent-height-text-controls.html:
* html5lib/generated/run-isindex-data-expected.txt: Removed.
* html5lib/generated/run-isindex-data.html: Removed.
* html5lib/generated/run-isindex-write-expected.txt: Removed.
* html5lib/generated/run-isindex-write.html: Removed.
* html5lib/resources/isindex.dat:
* html5lib/resources/tests19.dat:
* html5lib/resources/tests2.dat:
* html5lib/resources/webkit02.dat:
* http/tests/misc/isindex-formdata-expected.txt: Removed.
* http/tests/misc/isindex-formdata.html: Removed.
* http/tests/misc/isindex-with-no-form-base-href-expected.txt: Removed.
* http/tests/misc/isindex-with-no-form-base-href.html: Removed.
* http/tests/misc/isindex-with-no-form-expected.txt: Removed.
* http/tests/misc/isindex-with-no-form.html: Removed.
* http/tests/misc/resources/isindex-with-no-form-base-href-submit.html: Removed.
* http/tests/misc/resources/isindex-with-no-form-base-href.html: Removed.
* platform/efl/fast/dom/isindex-001-expected.png: Removed.
* platform/efl/fast/dom/isindex-001-expected.txt: Removed.
* platform/efl/fast/dom/isindex-002-expected.png: Removed.
* platform/efl/fast/dom/isindex-002-expected.txt: Removed.
* platform/efl/fast/forms/text-style-color-expected.png: Removed.
* platform/efl/fast/forms/text-style-color-expected.txt: Removed.
* platform/gtk/fast/dom/isindex-001-expected.png: Removed.
* platform/gtk/fast/dom/isindex-001-expected.txt: Removed.
* platform/gtk/fast/dom/isindex-002-expected.png: Removed.
* platform/gtk/fast/dom/isindex-002-expected.txt: Removed.
* platform/gtk/fast/forms/text-style-color-expected.png: Removed.
* platform/gtk/fast/forms/text-style-color-expected.txt: Removed.
* platform/ios-simulator/fast/dom/isindex-001-expected.txt: Removed.
* platform/ios-simulator/fast/dom/isindex-002-expected.txt: Removed.
* platform/ios-simulator/fast/forms/text-style-color-expected.txt: Removed.
* platform/mac-elcapitan/fast/dom/isindex-001-expected.txt: Removed.
* platform/mac-elcapitan/fast/dom/isindex-002-expected.txt: Removed.
* platform/mac-elcapitan/fast/forms/text-style-color-expected.txt: Removed.
* platform/mac/fast/dom/isindex-001-expected.png: Removed.
* platform/mac/fast/dom/isindex-001-expected.txt: Removed.
* platform/mac/fast/dom/isindex-002-expected.png: Removed.
* platform/mac/fast/dom/isindex-002-expected.txt: Removed.
* platform/mac/fast/forms/text-style-color-expected.png: Removed.
* platform/mac/fast/forms/text-style-color-expected.txt: Removed.
* platform/win/fast/dom/isindex-001-expected.txt: Removed.
* platform/win/fast/dom/isindex-002-expected.txt: Removed.
* platform/win/fast/forms/text-style-color-expected.txt: Removed.

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

3 years agoSkip media source tests since the feature is not enabled on Windows.
pvollan@apple.com [Tue, 13 Sep 2016 11:52:15 +0000 (11:52 +0000)]
Skip media source tests since the feature is not enabled on Windows.

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years agoES6: Classes: Should be allowed to create a static method with name "arguments"
gskachkov@gmail.com [Tue, 13 Sep 2016 08:17:39 +0000 (08:17 +0000)]
ES6: Classes: Should be allowed to create a static method with name "arguments"
https://bugs.webkit.org/show_bug.cgi?id=152985

Reviewed by Keith Miller.

Source/JavaScriptCore:

Current patch covered 16.2 Forbidden Extensions - first topic
(https://tc39.github.io/ecma262/#sec-forbidden-extensions) ECMAScript Functions
should not have own properties named "caller" or "arguments".
Also added possibility to declare static methods and getters with
name 'arguments' and 'caller' for classes. i.e.:
class A { static arguments() { return 'value'; } }
A.arguments() === 'value';
To implement this patch 'caller' and 'arguments' were put to the FunctionPrototype
object. Also was changed approach to init throwTypeErrorArgumentsCalleeAndCallerGetterSetter
property from Lazy to common because it necessary to use execState during init of the accessors
properties.

* runtime/Executable.h:
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::initRestrictedProperties):
(JSC::FunctionPrototype::addFunctionProperties): Deleted.
* runtime/FunctionPrototype.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::throwTypeErrorArgumentsCalleeAndCallerGetterSetter):

JSTests:

* test262.yaml:

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/basic-strict-mode-expected.txt:
* js/class-method-and-constructor-properties-expected.txt: Removed.
* js/class-syntax-method-names-expected.txt:
* js/es6-function-properties-expected.txt: Added.
* js/es6-function-properties.html: Copied from LayoutTests/js/class-method-and-constructor-properties.html.
* js/kde/script-tests/function_arguments.js:
(f):
* js/non-strict-function-properties-expected.txt: Added.
* js/non-strict-function-properties.html: Renamed from LayoutTests/js/class-method-and-constructor-properties.html.
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/basic-strict-mode.js:
* js/script-tests/class-method-and-constructor-properties.js: Removed.
(shouldThrow): Deleted.
(shouldBe): Deleted.
(A): Deleted.
(B): Deleted.
(C): Deleted.
(D): Deleted.
(E.prototype.getItem): Deleted.
(E): Deleted.
(F.prototype.getElement): Deleted.
(F): Deleted.
(G.prototype.get item): Deleted.
(G): Deleted.
(H.prototype.caller): Deleted.
(H.prototype.arguments): Deleted.
(H): Deleted.
* js/script-tests/class-syntax-method-names.js:
* js/script-tests/es6-function-properties.js: Added.
(shouldThrow):
(shouldBe):
(A):
(B):
(C):
(D):
(E.prototype.getItem):
(E):
(F.prototype.getElement):
(F):
(G.prototype.get item):
(G):
(check):
(arr):
(H.prototype.caller):
(H.prototype.arguments):
(H):
(J.prototype.gen):
(J.gen):
(J):
* js/script-tests/non-strict-function-properties.js: Added.
(foo):
(boo):
(f):
(g):
(doSetCaller):
(doSetArguments):
* js/script-tests/strict-throw-type-error.js:

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

3 years ago[Win] Warning fix.
pvollan@apple.com [Tue, 13 Sep 2016 06:52:32 +0000 (06:52 +0000)]
[Win] Warning fix.
https://bugs.webkit.org/show_bug.cgi?id=161858

Reviewed by Brent Fulgham.

Use exported constants from CoreText.dll, instead of creating copies.

* PlatformAppleWin.cmake:
* platform/spi/win/CoreTextSPIWin.cpp: Removed.
* platform/spi/win/CoreTextSPIWin.h:

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

3 years agoScriptElement should use FetchOptions::mode according its crossOrigin attribute
commit-queue@webkit.org [Tue, 13 Sep 2016 06:46:15 +0000 (06:46 +0000)]
ScriptElement should use FetchOptions::mode according its crossOrigin attribute
https://bugs.webkit.org/show_bug.cgi?id=161686

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-12
Reviewed by Darin Adler.

Source/WebCore:

Setting ScriptElement fetch mode according its crossOrigin attribute.
Removing LoadableClassicScriptchecking of CORS since this is now done at ResourceLoader/CachedResource level.

Updating CachedResourceLoader to ensure that a resource that matches an on-going resource load but with different fetch mode/origin,
always gets its loading started if the resource state is not Cached.

Tests: fast/dom/script-crossorigin-loads-fail-origin.html
       http/tests/security/cross-origin-cached-images-parallel.html
       http/tests/security/cross-origin-cached-images.html
       http/tests/security/cross-origin-cached-scripts-parallel.html
       http/tests/security/cross-origin-cached-scripts.html
       http/tests/security/script-crossorigin-loads-correctly-credentials.html
       http/tests/security/script-with-dataurl.html

* dom/LoadableClassicScript.cpp:
(WebCore::LoadableClassicScript::create):
(WebCore::LoadableClassicScript::notifyFinished): Checking CORS failures using the resource state.
(WebCore::LoadableClassicScript::~LoadableClassicScript): Deleted.
(WebCore::LoadableClassicScript::isLoaded): Deleted.
* dom/LoadableClassicScript.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestScriptWithCache): Using CachedResourceRequest::setAsPotentiallyCrossOrigin to set fetch mode according crossOrigin attribute.
* dom/ScriptElement.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::setBodyDataFrom):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Adding support for script resources.
(WebCore::CachedResourceLoader::requestResource): Ensuring that 'updated' resources gets actually loaded.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::setBodyDataFrom): Implementing specific data copy from another CachedScript.
* loader/cache/CachedScript.h:

LayoutTests:

Added new tests.
Updated cookie test for robustness as the order of the cookie items when more than one may not be preserved.

Moved one of the blink test to http/tests as it requires HTTP to run properly.
Updated blink test expectation as it is run from file, while it should be run from http.

Copied a similar test to http/tests/local to ensure that script load fails when served from the filesystem , CORS check failing.
The test was previously passing in WebKit as the test file was served from filesystem and was granted universal access.
The CORS checks were done through SecurityOrigin::canRequest which was testing that first.
With the patch, CORS checks are done at a lower level and do not take in to account universal access.
This aligns with Chrome and Firefox behavior.

* http/tests/local/script-crossorigin-loads-fail-origin-expected.txt: Added.
* http/tests/local/script-crossorigin-loads-fail-origin.html: Copied from LayoutTests/imported/blink/http/tests/security/script-crossorigin-loads-correctly-credentials.html.
* http/tests/cookies/resources/third-party-cookie-relaxing-iframe.html: Sorting the cookie to make the test more resistant.
* http/tests/security/cross-origin-cached-images-expected.txt: Added.
* http/tests/security/cross-origin-cached-images-parallel-expected.txt: Added.
* http/tests/security/cross-origin-cached-images-parallel.html: Renamed from LayoutTests/http/tests/security/cross-origin-cached-resource-parallel.html.
* http/tests/security/cross-origin-cached-images.html: Renamed from LayoutTests/http/tests/security/cross-origin-cached-resource.html.
* http/tests/security/cross-origin-cached-resource-parallel-expected.txt: Removed.
* http/tests/security/cross-origin-cached-scripts-expected.txt: Added.
* http/tests/security/cross-origin-cached-scripts-parallel-expected.txt: Added.
* http/tests/security/cross-origin-cached-scripts-parallel.html: Added.
* http/tests/security/cross-origin-cached-scripts.html: Added.
* http/tests/security/resources/cors-script.php: Updated according chromium script to activate CORS credentials header if requested.
* http/tests/security/resources/cross-origin-cached-resource-iframe.html:
* http/tests/security/resources/notify-loaded.js: Added.
* http/tests/security/script-crossorigin-loads-correctly-credentials-expected.txt: Renamed from LayoutTests/imported/blink/http/tests/security/script-crossorigin-loads-correctly-credentials-expected.txt.
* http/tests/security/script-crossorigin-loads-correctly-credentials.html: Renamed from LayoutTests/imported/blink/http/tests/security/script-crossorigin-loads-correctly-credentials.html.
* http/tests/security/script-with-dataurl-expected.txt: Added.
* http/tests/security/script-with-dataurl.html: Added.
* http/tests/security/script-with-failed-cors-check-fails-to-load-expected.txt:

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

3 years ago[GTK] Scrollbar too large
carlosgc@webkit.org [Tue, 13 Sep 2016 06:15:09 +0000 (06:15 +0000)]
[GTK] Scrollbar  too large
https://bugs.webkit.org/show_bug.cgi?id=161735

Reviewed by Michael Catanzaro.

We were not calculating the total scrollbar size correctly when the theme defines a minimum width/height. In
that case we need to take the extra size into account (border, margin, padding), but not adding the minimum
size. We were also adjusting the thumb position when rendering in indicator mode, but we really need to adjust
the whole rectangle. This worked in Adwaita because it uses a transparent track when in indicator mode. We are
also now taking into account the text direction when doing this adjustment for the indicator mode.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::paint):
(WebCore::ScrollbarThemeGtk::scrollbarThickness):

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

3 years ago[GTK] Crash of WebProcess on the last WebView disconnect (take two)
carlosgc@webkit.org [Tue, 13 Sep 2016 06:12:42 +0000 (06:12 +0000)]
[GTK] Crash of WebProcess on the last WebView disconnect (take two)
https://bugs.webkit.org/show_bug.cgi?id=161842

Reviewed by Michael Catanzaro.

The problem is that when PlatformDisplayX11 is destroyed, the sharing GL context is deleted and its destructor
makes a downcast of PlatformDisplay to get the native X11 display. We could simply keep a pointer to the native
X11 display in GLContextGLX, got at construction time from the PlatformDisplay, and ensure the sharing GL
context is deleted before the native X11 display is closed.

* platform/graphics/PlatformDisplay.h: Make m_sharingGLContext protected.
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::GLContextGLX): Initialize m_x11Display.
(WebCore::GLContextGLX::~GLContextGLX): Use m_x11Display and remove confusing comment about possible crash with
nviedia closed drivers.
(WebCore::GLContextGLX::defaultFrameBufferSize): Use m_x11Display.
(WebCore::GLContextGLX::makeContextCurrent): Ditto.
(WebCore::GLContextGLX::swapBuffers): Ditto.
(WebCore::GLContextGLX::swapInterval): Ditto.
(WebCore::GLContextGLX::cairoDevice): Ditto.
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::~PlatformDisplayX11): Delete the sharing GL context before closing the display.

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

3 years agoMarkedBlock should be able to use flipIfNecessary() as the "I'm not empty" trigger
fpizlo@apple.com [Tue, 13 Sep 2016 04:33:19 +0000 (04:33 +0000)]
MarkedBlock should be able to use flipIfNecessary() as the "I'm not empty" trigger
https://bugs.webkit.org/show_bug.cgi?id=161869

Reviewed by Saam Barati.

In bug 161581, I'm going to use flipIfNecessary() during marking to trigger the "I'm not
empty" hook, which will set a bit in the markingNotEmpty bitvector.

For this to work, we need to ensure that nobody else uses flipIfNecessary() during marking.
If anyone else does it but they aren't marking new objects, then this prevents
flipIfNecessary() from triggering when the first object is marked, which means we won't
always detect when a block became non-empty.

I addressed this by adding a isMarking flag, and asserting in flipIfNecessary() that the flag
isn't set. flipIfNecessaryDuringMarking() is used only on the marking path, so that code
knows that it can trigger something like noteMarked(). The only places that were using
flipIfNecessary() should have been using needsFlip() anyway.

* heap/CellContainer.h:
* heap/CellContainerInlines.h:
(JSC::CellContainer::needsFlip):
* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::beginMarking):
(JSC::Heap::endMarking):
(JSC::Heap::clearLivenessData): Deleted.
(JSC::Heap::converge): Deleted.
(JSC::Heap::resetVisitors): Deleted.
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::testAndSetMarked):
* heap/LargeAllocation.h:
(JSC::LargeAllocation::flipIfNecessaryDuringMarking):
(JSC::LargeAllocation::flipIfNecessaryConcurrently): Deleted.
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::flipIfNecessarySlow):
(JSC::MarkedBlock::flipIfNecessaryDuringMarkingSlow):
(JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow): Deleted.
* heap/MarkedBlock.h:
(JSC::MarkedBlock::flipIfNecessaryDuringMarking):
(JSC::MarkedBlock::Handle::flipIfNecessaryDuringMarking):
(JSC::MarkedBlock::flipIfNecessaryConcurrently): Deleted.
(JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently): Deleted.
* heap/MarkedSpace.h:
(JSC::MarkedSpace::isMarking):
(JSC::MarkedSpace::setIsMarking):
(JSC::MarkedSpace::largeAllocationsForThisCollectionSize): Deleted.
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
* heap/WeakBlock.cpp:
(JSC::WeakBlock::visit):

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

3 years ago[GTK] Fix lint warnings of LayoutTests/platform/gtk/TestExpectations
commit-queue@webkit.org [Tue, 13 Sep 2016 04:32:06 +0000 (04:32 +0000)]
[GTK] Fix lint warnings of LayoutTests/platform/gtk/TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=161890

Unreviewed test gardening.

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-09-12

* platform/gtk/TestExpectations: Removed deleted test cases
js/regress/nested-function-parsing.html, js/regress/new-array-buffer-dead.html
and js/regress/method-on-number.html.
Skip imported/w3c/web-platform-tests/media-source/

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

3 years agoSpeed up Function.prototype.bind a bit by making it a builtin
sbarati@apple.com [Tue, 13 Sep 2016 02:57:37 +0000 (02:57 +0000)]
Speed up Function.prototype.bind a bit by making it a builtin
https://bugs.webkit.org/show_bug.cgi?id=161879

Reviewed by Filip Pizlo.

JSTests:

* microbenchmarks/function-bind-inlining.js: Added.
(assert):
(test):
(test2):
(foo):
* microbenchmarks/function-bind-no-inlining.js: Added.
(assert):
(test):
(test2):
(foo):

LayoutTests:

* js/dom/function-bind-expected.txt:

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

3 years agoFix post-landing review comments after r205787
cdumez@apple.com [Tue, 13 Sep 2016 02:12:51 +0000 (02:12 +0000)]
Fix post-landing review comments after r205787
https://bugs.webkit.org/show_bug.cgi?id=161885

Reviewed by Darin Adler.

Source/WebCore:

Leverage new StringBuilder::append(CFStringRef) overload.

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTTPRefreshInternal):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
(WebCore::buildDisplayStringForTrackBase):
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet):
(WebCore::RenderThemeIOS::mediaControlsScript):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

Source/WTF:

Add new StringBuilder::append(CFStringRef) / append(NSString*)
overloads to avoid an extra string copy when possible.

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::append):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):

Tools:

Leverage new StringBuilder::append(CFStringRef) overload.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive):

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

3 years agoURLParser: Correctly ignore spaces before relative URLs with no scheme
achristensen@apple.com [Tue, 13 Sep 2016 01:25:08 +0000 (01:25 +0000)]
URLParser: Correctly ignore spaces before relative URLs with no scheme
https://bugs.webkit.org/show_bug.cgi?id=161889

Reviewed by Daniel Bates.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoAX: Crash at WebCore::Range::compareBoundaryPoints(WebCore::Range::CompareHow, WebCor...
n_wang@apple.com [Tue, 13 Sep 2016 00:58:22 +0000 (00:58 +0000)]
AX: Crash at WebCore::Range::compareBoundaryPoints(WebCore::Range::CompareHow, WebCore::Range const&, int&) const + 23
https://bugs.webkit.org/show_bug.cgi?id=161878

Reviewed by Chris Fleizach.

Source/WebCore:

In function characterOffsetsInOrder(const CharacterOffset&, const CharacterOffset&), we are creating two
ranges based on the nodes that are associated to the passed in CharacterOffsets. When the first node is a doctype
node, the first range will be a nullptr, and dereferencing it leads to a crash. Fixed this by adding a
NULL check.

Test: accessibility/mac/doctype-node-in-text-marker-crash.html

* accessibility/AXObjectCache.cpp:
(WebCore::characterOffsetsInOrder):
(WebCore::resetNodeAndOffsetForReplacedNode):

LayoutTests:

* accessibility/mac/doctype-node-in-text-marker-crash-expected.txt: Added.
* accessibility/mac/doctype-node-in-text-marker-crash.html: Added.

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

3 years agoHashMapImpl should take into account m_deleteCount in its load factor and it should...
sbarati@apple.com [Tue, 13 Sep 2016 00:14:59 +0000 (00:14 +0000)]
HashMapImpl should take into account m_deleteCount in its load factor and it should be able to rehash the table to be smaller
https://bugs.webkit.org/show_bug.cgi?id=161640

Reviewed by Geoffrey Garen.

JSTests:

* microbenchmarks/map-rehash.js: Added.
* stress/map-delete.js: Added.
(assert):
* stress/map-rehash-2.js: Added.
(assert):
* stress/map-rehash.js: Added.
(assert):

Source/JavaScriptCore:

HashMapImpl now takes into account m_deleteCount in its load factor.
It now knows how to rehash to either decrease its capacity, stay at
the same capacity, or increase its capacity. The reason we can sometimes
stay at the same capacity is that we can reduce the load factor enough
by rehashing that growing isn't warranted. The reason for this is that
anytime we rehash, we remove all deleted sentinels from the buffer.
Therefore, staying at the same same capacity, when there are deleted entries,
can still reduce the load factor because it removes all deleted sentinels.

* runtime/HashMapImpl.h:
(JSC::HashMapBuffer::create):
(JSC::HashMapBuffer::reset):
(JSC::HashMapImpl::HashMapImpl):
(JSC::HashMapImpl::add):
(JSC::HashMapImpl::remove):
(JSC::HashMapImpl::size):
(JSC::HashMapImpl::clear):
(JSC::HashMapImpl::approximateSize):
(JSC::HashMapImpl::shouldRehashAfterAdd):
(JSC::HashMapImpl::shouldShrink):
(JSC::HashMapImpl::rehash):
(JSC::HashMapImpl::checkConsistency):
(JSC::HashMapImpl::makeAndSetNewBuffer):
(JSC::HashMapImpl::assertBufferIsEmpty):

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

3 years agoMove the pixel data of ImageFrame to a separate class named ImageBackingStore
commit-queue@webkit.org [Mon, 12 Sep 2016 23:51:57 +0000 (23:51 +0000)]
Move the pixel data of ImageFrame to a separate class named ImageBackingStore
https://bugs.webkit.org/show_bug.cgi?id=159679

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-09-12
Reviewed by Simon Fraser.

Move the pixel data manipulation part in ImageFrame into a separate class
and allocate it on demand.

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWinCairo.cmake:
* WebCore.xcodeproj/project.pbxproj:
Add ImageBackingStoreCairo.cpp and remove ImageDecoderCairo.cpp from the
WebKit projects.

* platform/graphics/Color.cpp:
(WebCore::premultipliedChannel): channel = channel * alpha / 255.
(WebCore::unpremultipliedChannel): channel = channel * 255 / alpha.
(WebCore::makePremultipliedRGBA): Un-premultiplied channels to premultiplied RGBA32.
(WebCore::makeUnPremultipliedRGBA): Premultiplied channels to un-premultiplied RGBA32.
(WebCore::colorFromPremultipliedARGB): Use makeUnPremultipliedRGBA.
(WebCore::premultipliedARGBFromColor): Use makePremultipliedRGBA.
* platform/graphics/Color.h:
(WebCore::fastMultiplyBy255): x * 255 = x * 256 - x = x << 8 - x.

* platform/graphics/ImageBackingStore.h: Added.
(WebCore::ImageBackingStore::create): Creates a new ImageBackingStore.
(WebCore::ImageBackingStore::setSize): Changes the pixels size.
(WebCore::ImageBackingStore::setFrameRect): This will always just be the entire buffer except for GIF and PNG frames.
(WebCore::ImageBackingStore::size): Returns the pixels size.
(WebCore::ImageBackingStore::frameRect): Returns the pixels frame rectangle.
(WebCore::ImageBackingStore::clear): Clears the entire image.
(WebCore::ImageBackingStore::clearRect): Clears a rectangle in the image.
(WebCore::ImageBackingStore::repeatFirstRow): Repeats the first row in a rectangle in the image.
(WebCore::ImageBackingStore::pixelAt): Returns a pointer to a pixel data.
(WebCore::ImageBackingStore::setPixel): Sets the color of a pixel in the image.
(WebCore::ImageBackingStore::blendPixel): Blend a color with a pixel in the image.
(WebCore::ImageBackingStore::inBounds): Checks if a rectangle is in the bounds of the image.
(WebCore::ImageBackingStore::isOverSize): Checks whether a size could not be allocated for an image.
(WebCore::ImageBackingStore::ImageBackingStore):

* platform/graphics/cg/NativeImageCG.cpp:
(WebCore::nativeImageHasAlpha): Implement this function. See comments in https://bugs.webkit.org/show_bug.cgi?id=158684.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::operator=): copyBitmapData() now copies the frameRect of the ImageBackingStore.
(WebCore::ImageFrame::clearPixelData): The pixels data and the pointer to these pixels are now included in the ImageBackingStore.
(WebCore::ImageFrame::zeroFillPixelData): Clearing the image pixels are now in ImageBackingStore::clear().
(WebCore::ImageFrame::zeroFillFrameRect): Clearing the image pixels are now in ImageBackingStore::clearRect().
(WebCore::ImageFrame::copyBitmapData): We either need to create a new ImageBackingStore or nullify the current one.
(WebCore::ImageFrame::setSize): ImageFrame::setSize() is supposed to be called once and to create the ImageBackingStore.
(WebCore::ImageFrame::setOriginalFrameRect): Delegate this call to ImageBackingStore::setFrameRect().
(WebCore::ImageDecoder::frameBytesAtIndex): ImageFrame::PixelData can be replaced by RGBA32.

* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::copyRowNTimes): The implementation was moved to ImageBackingStore::repeatFirstRow().
(WebCore::ImageFrame::size): Gets the size of an image from its ImageBackingStore.
(WebCore::ImageFrame::asNewNativeImage): Gets a NtaiveImagePtr from the ImageBackingStore.
(WebCore::ImageFrame::backingStore): Returns a raw pointer to the ImageBackingStore.
(WebCore::ImageFrame::hasBackingStore): Returns whether the ImageFrame has an ImageBackingStore.
(WebCore::ImageFrame::originalFrameRect): Returns the frameRect of the image from its ImageBackingStore.
(WebCore::ImageFrame::pixelAt): Delegates the call to the ImageBackingStore.
(WebCore::ImageFrame::setPixel): Delegates the call to the ImageBackingStore.
(WebCore::ImageFrame::blendPixel): Delegates the call to the ImageBackingStore.

(WebCore::ImageDecoder::setSize): setSize() now takes an IntSize.
(WebCore::ImageFrame::setOriginalFrameRect): Deleted. Moved to ImageDecoder.cpp.
(WebCore::ImageFrame::setRGBA): Deleted. Renamed to ImageFrame::setPixel().
(WebCore::ImageFrame::getAddr): Deleted. Renamed to ImageFrame::pixelAt().
(WebCore::ImageFrame::hasPixelData): Deleted. Renamed to ImageFrame::hasBackingStore().
(WebCore::ImageFrame::fixPointUnsignedMultiply): Deleted.
(WebCore::ImageFrame::divide255): Deleted. Replaced by fastDivideBy255() from Color.h.
(WebCore::ImageFrame::overRGBA): Deleted. Renamed to ImageFrame::blendPixel().
(WebCore::ImageFrame::width): Deleted.
(WebCore::ImageFrame::height): Deleted.
(WebCore::ImageDecoder::isOverSize): Deleted. Moved to ImageBackingStore::isOverSize().

* platform/image-decoders/bmp/BMPImageReader.cpp:
(WebCore::BMPImageReader::decodeBMP):
(WebCore::BMPImageReader::processInfoHeader):
(WebCore::BMPImageReader::processNonRLEData):
* platform/image-decoders/bmp/BMPImageReader.h:
(WebCore::BMPImageReader::setI):
(WebCore::BMPImageReader::setPixel):
(WebCore::BMPImageReader::fillRGBA):
(WebCore::BMPImageReader::setRGBA): Deleted.
* platform/image-decoders/cairo/ImageBackingStoreCairo.cpp: Added.
(WebCore::ImageBackingStore::image):
* platform/image-decoders/cairo/ImageDecoderCairo.cpp: Removed.
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::setSize):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::initFrameBuffer):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::parse):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::setSize):
(WebCore::ICOImageDecoder::processDirectoryEntries):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode):
(WebCore::JPEGImageDecoder::setSize):
(WebCore::setPixel):
(WebCore::JPEGImageDecoder::outputScanlines):
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::setSize):
(WebCore::PNGImageDecoder::headerAvailable):
(WebCore::setPixelRGB):
(WebCore::setPixelRGBA):
(WebCore::setPixelPremultipliedRGBA):
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::initFrameBuffer):
(WebCore::PNGImageDecoder::frameComplete):
* platform/image-decoders/png/PNGImageDecoder.h:
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode):
- Send an IntSize to ImageFrame::setSize() and ImageDecoder::setSize().
- Replace ImageFrame::PixelData by RGBA32.
- No need to call ImageFrame::setOriginalFrameRect() if this sets the
  frameRect to the entire image rectangle since this is done by default
  in ImageBackingStore::setSize().
- ImageBackingStore::image() now replaces ImageFrame::asNewNativeImage().
- ImageFrame::setPixel() now replaces ImageFrame::setRGBA().
- ImageFrame::blendPixel() now replaces ImageFrame::overRGBA().
- ImageFrame::pixelAt() now replaces ImageFrame::getAddr().

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

3 years agoHTMLButtonElement.prototype.click should be HTMLElement.prototype.click
commit-queue@webkit.org [Mon, 12 Sep 2016 23:33:58 +0000 (23:33 +0000)]
HTMLButtonElement.prototype.click should be HTMLElement.prototype.click
https://bugs.webkit.org/show_bug.cgi?id=161874

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-09-12
Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/dom/HTMLButtonElement/click.html

* html/HTMLButtonElement.idl:
Remove the unnecessary 'click' definition. It already exists in HTMLElement.
If this was needed for ObjC code generation on DOMHTMLButtonElement, then
the extra definition is no longer needed now that ObjC bindings have moved.

LayoutTests:

* fast/dom/HTMLButtonElement/click-expected.txt: Added.
* fast/dom/HTMLButtonElement/click.html: Added.

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

3 years agoMarking imported/w3c/web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1...
ryanhaddad@apple.com [Mon, 12 Sep 2016 23:14:25 +0000 (23:14 +0000)]
Marking imported/w3c/web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1.xhtml as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=161883

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoUnreviewed, fix tests for different libm environments
utatane.tea@gmail.com [Mon, 12 Sep 2016 23:11:55 +0000 (23:11 +0000)]
Unreviewed, fix tests for different libm environments
https://bugs.webkit.org/show_bug.cgi?id=161857

* stress/ftl-arithtan.js:

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

3 years ago[WTF] HashTable's rehash is not compatible to Ref<T> and ASan
utatane.tea@gmail.com [Mon, 12 Sep 2016 23:08:49 +0000 (23:08 +0000)]
[WTF] HashTable's rehash is not compatible to Ref<T> and ASan
https://bugs.webkit.org/show_bug.cgi?id=161763

Reviewed by Darin Adler.

Destructors of HashTable's empty values need to be called while ones of deleted values don't.

* wtf/HashTable.h:
(WTF::KeyTraits>::deallocateTable):
* wtf/Ref.h:

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

3 years agoURLParser: Fix relative URLs containing only fragments
achristensen@apple.com [Mon, 12 Sep 2016 23:03:09 +0000 (23:03 +0000)]
URLParser: Fix relative URLs containing only fragments
https://bugs.webkit.org/show_bug.cgi?id=161882

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoSource/WebInspectorUI:
mattbaker@apple.com [Mon, 12 Sep 2016 22:36:57 +0000 (22:36 +0000)]
Source/WebInspectorUI:
Web Inspector: Improve clarity of inspector tests by adding TestHarness.expect* functions similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>

Reviewed by Joseph Pecoraro.

Under the hood they all call TestHarness.expectThat.

* UserInterface/Test/TestHarness.js:
(TestHarness.prototype.expectFalse):
(TestHarness.prototype.expectNull):
(TestHarness.prototype.expectNotNull):
(TestHarness.prototype.expectEqual):
(TestHarness.prototype.expectNotEqual):
(TestHarness.prototype.expectShallowEqual):
(TestHarness.prototype.expectNotShallowEqual):
(TestHarness.prototype.expectEqualWithAccuracy):
(TestHarness.prototype.expectLessThan):
(TestHarness.prototype.expectLessThanOrEqual):
(TestHarness.prototype.expectGreaterThan):
(TestHarness.prototype.expectGreaterThanOrEqual):

LayoutTests:
Web Inspector: Add TestHarness assertions/expectations to provide additional semantics similar to XCTest
https://bugs.webkit.org/show_bug.cgi?id=161278
<rdar://problem/28039741>

Reviewed by Joseph Pecoraro.

Add test to verify that the TestHarness.expect* family of functions
trivially work. Since it isn't possible to verify the TestPage results
directly without introducing additional complexity, simply log baseline
"PASS" and "FAIL" results for each function.

* inspector/unit-tests/test-harness-expect-functions-expected.txt: Added.
* inspector/unit-tests/test-harness-expect-functions.html: Added.

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

3 years agoURLParser: Correctly handle relative URLs that are just a scheme and a colon
achristensen@apple.com [Mon, 12 Sep 2016 22:36:14 +0000 (22:36 +0000)]
URLParser: Correctly handle relative URLs that are just a scheme and a colon
https://bugs.webkit.org/show_bug.cgi?id=161876

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoREGRESSION (r205223): Web Inspector: Debugger popover title and code aren't horizonta...
nvasilyev@apple.com [Mon, 12 Sep 2016 22:35:20 +0000 (22:35 +0000)]
REGRESSION (r205223): Web Inspector: Debugger popover title and code aren't horizontally aligned
https://bugs.webkit.org/show_bug.cgi?id=161848
<rdar://problem/28250703>

Reviewed by Matt Baker.

* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content.function > .body):
Make left and right padding the same.

(.popover .debugger-popover-content.function > .body .CodeMirror pre):
Override left padding defined in CodeMirrorOverrides.css by `.CodeMirror pre` rule.

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

3 years agoRemove OptionalColor
dino@apple.com [Mon, 12 Sep 2016 22:16:24 +0000 (22:16 +0000)]
Remove OptionalColor
https://bugs.webkit.org/show_bug.cgi?id=161853
<rdar://problem/28252385>

Reviewed by Alex Christensen.

OptionalColor isn't used. The concept will be implemented
in a different manner.

* platform/graphics/Color.h:

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

3 years ago[JSC] Use GetArrayLength for JSArray.length even when the array type is undecided
commit-queue@webkit.org [Mon, 12 Sep 2016 22:13:37 +0000 (22:13 +0000)]
[JSC] Use GetArrayLength for JSArray.length even when the array type is undecided
https://bugs.webkit.org/show_bug.cgi?id=161671

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-09-12
Reviewed by Geoffrey Garen.

JSTests:

* stress/get-array-length-on-undecided.js: Added.

Source/JavaScriptCore:

UndecidedShape is a type with storage. When we allocate an uninitialized JSArray,
it gets a butterfly with its length.
When we were querying that length, we were generating a generic GetById with inline cache.

This patch adds the missing bits to treat Undecided like the other types with storage.

* dfg/DFGArrayMode.cpp:
(JSC::DFG::canBecomeGetArrayLength):
(JSC::DFG::ArrayMode::refine):
* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::usesButterfly):
(JSC::DFG::ArrayMode::lengthNeedsStorage):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::checkArray):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetArrayLength):

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

3 years agoAdd Intersection Observer to the features.json file.
simon.fraser@apple.com [Mon, 12 Sep 2016 22:05:54 +0000 (22:05 +0000)]
Add Intersection Observer to the features.json file.

* features.json:

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

3 years ago[DFG][FTL] Add ArithTan
utatane.tea@gmail.com [Mon, 12 Sep 2016 22:01:13 +0000 (22:01 +0000)]
[DFG][FTL] Add ArithTan
https://bugs.webkit.org/show_bug.cgi?id=161857

Reviewed by Filip Pizlo.

JSTests:

* microbenchmarks/tan.js: Added.
* stress/arith-tan-on-various-types.js: Added.
(let.validInputTypedTestCases.validInputTestCases.map):
(isIdentical):
(opaqueTanNoArgument):
(testNoArgument):
(opaqueAllTypesTan):
(testAllTypesCall):
(testTangleTypeCall):
(testConstant):
(opaqueTanForSideEffects):
(testSideEffect.let.testObject.valueOf):
(testSideEffect):
(opaqueTanForCSE):
(testCSE.let.testObject.valueOf):
(testCSE):
(opaqueTanForDCE):
(testDCE.let.testObject.valueOf):
(testDCE):
(testException.opaqueTanWithException):
(testException):
* stress/ftl-arithtan.js: Added.
(foo):

Source/JavaScriptCore:

While ArithSin and ArithCos are supported, ArithTan is not supported yet.
And we also find that Math.tan is included in MotionMark's Multiply benchmark.

This patch adds ArithTan support in DFG and FTL. And it also cleans up the
existing ArithSin, ArithCos, and ArithLog compilations by unifying them.
The microbenchmark shows the 9% perf improvement.

    tan    322.4819+-0.3766     ^    295.8700+-0.3094        ^ definitely 1.0899x faster

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithDoubleUnaryOp):
(JSC::DFG::SpeculativeJIT::compileArithCos):
(JSC::DFG::SpeculativeJIT::compileArithTan):
(JSC::DFG::SpeculativeJIT::compileArithSin):
(JSC::DFG::SpeculativeJIT::compileArithLog):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArithTan):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::doubleTan):
* ftl/FTLOutput.h:
* runtime/Intrinsic.h:
* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):

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

3 years agoWeb Inspector: Hide ["PrivateSymbol.concatSlowPath"] and other PrivateSymbols from...
commit-queue@webkit.org [Mon, 12 Sep 2016 21:46:49 +0000 (21:46 +0000)]
Web Inspector: Hide ["PrivateSymbol.concatSlowPath"] and other PrivateSymbols from memory edges
https://bugs.webkit.org/show_bug.cgi?id=156763

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-12
Reviewed by Joseph Pecoraro.

* UserInterface/Proxies/HeapSnapshotEdgeProxy.js:
(WebInspector.HeapSnapshotEdgeProxy.prototype.isPrivateSymbol):
Checks that the edge data does not begin with "PrivateSymbol".

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
Only add child nodes if they are not PrivateSymbol nodes.

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

3 years ago[Cocoa] Reduce uses of CGFonts in favor of CTFonts
mmaxfield@apple.com [Mon, 12 Sep 2016 21:44:29 +0000 (21:44 +0000)]
[Cocoa] Reduce uses of CGFonts in favor of CTFonts
https://bugs.webkit.org/show_bug.cgi?id=161809

Reviewed by Daniel Bates.

Source/WebCore:

Eventually, we want to remove the cgFont() member of PlatformFontData for both memory
savings and conceptual clarity. Because there is no performance loss from moving from
CGFontGetGlyphsForUnichars() to CTFontGetGlyphsForCharacters(), making this switch
gets us closer to reducing the uses of cgFont().

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::createAndFillGlyphPage):
* platform/graphics/GlyphPage.h:
(WebCore::GlyphData::GlyphData):
* platform/graphics/mac/GlyphPageMac.cpp:
(WebCore::shouldFillWithVerticalGlyphs):
(WebCore::GlyphPage::fill):
(WebCore::shouldUseCoreText): Deleted.

Source/WTF:

* wtf/unicode/CharacterNames.h:

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

3 years agoAX: WKWebView for macOS does not allow configuration of tabsToLinks
commit-queue@webkit.org [Mon, 12 Sep 2016 21:42:31 +0000 (21:42 +0000)]
AX: WKWebView for macOS does not allow configuration of tabsToLinks
https://bugs.webkit.org/show_bug.cgi?id=161394

Patch by DAN SAUNDERS <dasau@microsoft.com> on 2016-09-12
Reviewed by Anders Carlsson.

Source/WebKit2:

* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences encodeWithCoder:]):
(-[WKPreferences initWithCoder:]):
(-[WKPreferences tabFocusesLinks]):
(-[WKPreferences setTabFocusesLinks:]):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Coding.mm:
(TEST):

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

3 years agoRemove trailing control characters and spaces before parsing a URL
achristensen@apple.com [Mon, 12 Sep 2016 21:30:30 +0000 (21:30 +0000)]
Remove trailing control characters and spaces before parsing a URL
https://bugs.webkit.org/show_bug.cgi?id=161870

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::bufferView):
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agowindow.performance object resets script-applied properties
cdumez@apple.com [Mon, 12 Sep 2016 21:23:12 +0000 (21:23 +0000)]
window.performance object resets script-applied properties
https://bugs.webkit.org/show_bug.cgi?id=137407

Reviewed by Darin Adler.

Source/WebCore:

Make sure the window.performance wrapper stays alive for as long as the
associated frame, similarly to what we do for window.screen.

Test: fast/performance/performance-object-gc.html

* page/Performance.idl:

LayoutTests:

Add layout test coverage.

* fast/performance/performance-object-gc-expected.txt: Added.
* fast/performance/performance-object-gc.html: Added.

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

3 years agoAdd WebKit support for an option in Safari's debug menu similar to "Get Bytecode...
sbarati@apple.com [Mon, 12 Sep 2016 21:13:09 +0000 (21:13 +0000)]
Add WebKit support for an option in Safari's debug menu similar to "Get Bytecode Profile" but for the Sampling Profiler's data
https://bugs.webkit.org/show_bug.cgi?id=161785

Reviewed by Tim Horton.

Source/WebCore:

* ForwardingHeaders/runtime/SamplingProfiler.h: Added.

Source/WebKit2:

This patch follows in the steps of how we dump output for the
internal JSC bytecode profiler tool, but now also for the internal
JSC sampling profiler tool. This can be used when doing performance
analysis work analyzing the JS execution of a page.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetSamplingProfilerOutput):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getSamplingProfilerOutput):
(WebKit::WebPageProxy::invalidateStringCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getSamplingProfilerOutput):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

3 years ago[CSS Parser] Add support for the parsing of the HTML sizes attribute
hyatt@apple.com [Mon, 12 Sep 2016 21:12:41 +0000 (21:12 +0000)]
[CSS Parser] Add support for the parsing of the HTML sizes attribute
https://bugs.webkit.org/show_bug.cgi?id=161868

Reviewed by Dean Jackson.

This patch adds the parsers for the sizes attribute. This code is heavily modified
from Blink, and it really only makes use of the tokenization/parsing code. What is done
with the results involves the same original code that we used over in SourceSizeList.cpp.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/parser/SizesAttributeParser.cpp: Added.
(WebCore::SizesAttributeParser::computeLength):
(WebCore::SizesAttributeParser::SizesAttributeParser):
(WebCore::SizesAttributeParser::length):
(WebCore::SizesAttributeParser::calculateLengthInPixels):
(WebCore::SizesAttributeParser::mediaConditionMatches):
(WebCore::SizesAttributeParser::parse):
(WebCore::SizesAttributeParser::effectiveSize):
(WebCore::SizesAttributeParser::effectiveSizeDefaultValue):
* css/parser/SizesAttributeParser.h: Added.
* css/parser/SizesCalcParser.cpp: Added.
(WebCore::SizesCalcParser::SizesCalcParser):
(WebCore::SizesCalcParser::result):
(WebCore::operatorPriority):
(WebCore::SizesCalcParser::handleOperator):
(WebCore::SizesCalcParser::appendNumber):
(WebCore::SizesCalcParser::appendLength):
(WebCore::SizesCalcParser::appendOperator):
(WebCore::SizesCalcParser::calcToReversePolishNotation):
(WebCore::operateOnStack):
(WebCore::SizesCalcParser::calculate):
* css/parser/SizesCalcParser.h: Added.
(WebCore::SizesCalcValue::SizesCalcValue):
(WebCore::SizesCalcParser::isValid):

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

3 years agoFix failing mediasource-play.html and mediasource-config-change-mp4-v-bitrate.html...
jer.noble@apple.com [Mon, 12 Sep 2016 21:09:15 +0000 (21:09 +0000)]
Fix failing mediasource-play.html and mediasource-config-change-mp4-v-bitrate.html tests
https://bugs.webkit.org/show_bug.cgi?id=161819

Reviewed by Eric Carlson.

Source/WebCore:

Fixes tests: imported/w3c/web-platform-tests/media-source/mediasource-play.html
             imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html

The newest revision of the web-platform-test suite for Media Source tests new behavior
added to the MSE specification. Specifically, setting a MediaSource's duration will no
longer implicitly truncate the source's active SourceBuffer objects.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDuration): Return exception if issued by setDurationInternal.
(WebCore::MediaSource::setDurationInternal): Bring "duration change" algorithm up to spec.
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SampleMap.h:
(WebCore::PresentationOrderSampleMap::begin): Add const accessor.
(WebCore::PresentationOrderSampleMap::end): Ditto.
(WebCore::PresentationOrderSampleMap::rbegin): Ditto.
(WebCore::PresentationOrderSampleMap::rend): DItto.
(WebCore::DecodeOrderSampleMap::begin): Ditto.
(WebCore::DecodeOrderSampleMap::end): Ditto.
(WebCore::DecodeOrderSampleMap::rbegin): Ditto.
(WebCore::DecodeOrderSampleMap::rend): Ditto.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::highestPresentationTimestamp): Added convenience method.
(WebCore::SourceBuffer::removeCodedFrames): Drive-by fix; use .values() rather than
    pulling the value out of each HashMap iterator.
* Modules/mediasource/SourceBuffer.h:

LayoutTests:

* media/media-source/media-source-end-of-stream-readyState.html:
* media/media-source/media-source-end-of-stream-readyState-expected.txt:
* platform/mac/TestExpectations:

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

3 years agoMapHash should do constant folding when it has a constant argument and its legal...
sbarati@apple.com [Mon, 12 Sep 2016 21:04:25 +0000 (21:04 +0000)]
MapHash should do constant folding when it has a constant argument and its legal to hash that value
https://bugs.webkit.org/show_bug.cgi?id=161639

Reviewed by Filip Pizlo.

JSTests:

* microbenchmarks/map-constant-key.js: Added.
(assert):
(test):
(foo):

Source/JavaScriptCore:

We now constant fold the MapHash node. We're careful to not resolve
ropes from the compiler thread, and to only hash strings if they're
not too large. The microbenchmark I added runs about 12% faster with
this patch.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* runtime/HashMapImpl.h:
(JSC::wangsInt64Hash):
(JSC::jsMapHash):
(JSC::concurrentJSMapHash):

Source/WTF:

This patch adds a concurrentHash method to StringImpl. It's
probably safe to get the actual hash while being racy, however,
it's simpler and more future proof to not have to worry about
that and to just compute it on demand. Users of this API should
be aware that it's doing non-trivial work. Currently, the only
user is JSC's JIT compilers, and they only ask for hashes for small-ish
strings.

* wtf/text/StringImpl.h:
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::concurrentHash):

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

3 years agoSwitch remaining users of Document::inPageCache() to pageCacheState()
cdumez@apple.com [Mon, 12 Sep 2016 19:50:50 +0000 (19:50 +0000)]
Switch remaining users of Document::inPageCache() to pageCacheState()
https://bugs.webkit.org/show_bug.cgi?id=161865

Reviewed by Darin Adler.

Switch remaining users of Document::inPageCache() to pageCacheState() as
the former one is confusing (given that it returns true while the
pagehide event is being fired).

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::fontsNeedUpdate):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::takeDOMWindowFrom):
(WebCore::Document::topDocument):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidEnterFullScreenForElement):
(WebCore::Document::webkitWillExitFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
* dom/Document.h:
(WebCore::Document::needsStyleRecalc):
(WebCore::Document::inPageCache): Deleted.
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::clear):
(WebCore::CachedFrame::destroy):
* html/HTMLMediaElement.cpp:
(WebCore::mediaElementIsAllowedToAutoplay):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::createElementRenderer):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::addSubresourceLoader):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::decrementScrollEventListenersCount):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::setNeedsStyleRecalc):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::AnimationController::cancelAnimations):
(WebCore::AnimationController::updateAnimations):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::sendTransitionEvent):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::sendAnimationEvent):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
* rendering/RenderElement.cpp:
(WebCore::shouldRepaintForImageAnimation):
(WebCore::RenderElement::newImageAnimationFrameAvailable):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
* rendering/RenderObject.cpp:
(WebCore::printRenderTreeForLiveDocuments):
(WebCore::printLayerTreeForLiveDocuments):
* rendering/RenderView.cpp:
(WebCore::RenderView::lazyRepaintTimerFired):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
(-[WebHTMLView setNeedsLayout:]):
(-[WebHTMLView setNeedsToApplyStyles:]):

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

3 years agoEnhance Network logging
krollin@apple.com [Mon, 12 Sep 2016 18:59:32 +0000 (18:59 +0000)]
Enhance Network logging
https://bugs.webkit.org/show_bug.cgi?id=161771

Reviewed by Antti Koivisto.

Modify current logging statements to follow a consistent pattern in
order to enhance readability and parsing.

Source/WebCore:

No new tests -- there are no tests for logging.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

Source/WebKit2:

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveResponse):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
(WebKit::WebResourceLoader::didReceiveResource):

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

3 years agoJSC test timeout: ChakraCore.yaml/ChakraCore/test/Bugs/bug56026_trycatch.js.default
msaboff@apple.com [Mon, 12 Sep 2016 18:45:43 +0000 (18:45 +0000)]
JSC test timeout: ChakraCore.yaml/ChakraCore/test/Bugs/bug56026_trycatch.js.default
https://bugs.webkit.org/show_bug.cgi?id=161863

Reviewed by Saam Barati.

* ChakraCore.yaml:
Disabled Bugs/bug56026_trycatch.js.

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

3 years agoWeb Inspector: Object.shallowEqual() should return false if object prototype chains...
mattbaker@apple.com [Mon, 12 Sep 2016 18:35:40 +0000 (18:35 +0000)]
Web Inspector: Object.shallowEqual() should return false if object prototype chains differ
https://bugs.webkit.org/show_bug.cgi?id=161852

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Improve Object.shallowEqual so it won't produce false positives.

* UserInterface/Base/Utilities.js:
(value):
Object.shallowEqual should return false for non-array arguments.
Since typeof null === "object", use `instanceof` instead to avoid separate
null checks. Also use Array.shallowEqual fast path when both arguments are arrays.

LayoutTests:

* inspector/unit-tests/object-utilities-expected.txt: Added.
* inspector/unit-tests/object-utilities.html: Added.
Add test coverage for Object.shallowEqual.

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

3 years agoCrash in com.apple.WebCore: WebCore::NavigatorGamepad::gamepadFromPlatformGamepad.
beidson@apple.com [Mon, 12 Sep 2016 18:18:05 +0000 (18:18 +0000)]
Crash in com.apple.WebCore: WebCore::NavigatorGamepad::gamepadFromPlatformGamepad.
<rdar://problem/28018073> and https://bugs.webkit.org/show_bug.cgi?id=161694

Reviewed by Alex Christensen.

No new tests (Caught by existing tests in some configurations).

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::platformGamepadInputActivity): Null check.

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

3 years agoFix more URLParser quirks
achristensen@apple.com [Mon, 12 Sep 2016 18:10:24 +0000 (18:10 +0000)]
Fix more URLParser quirks
https://bugs.webkit.org/show_bug.cgi?id=161834

Reviewed by Brady Eidson.

Source/WebCore:

Added new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
Skip some tabs and newlines.  The spec says to remove them before processing the String,
but to reduce allocations I am skipping them whenever we increment an iterator.
Fix a few other quirks to be more web platform conformant.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoOptimize URLParser performance
achristensen@apple.com [Mon, 12 Sep 2016 18:06:59 +0000 (18:06 +0000)]
Optimize URLParser performance
https://bugs.webkit.org/show_bug.cgi?id=161837

Reviewed by Brady Eidson.

Source/WebCore:

No change in behavior.  Existing behavior covered by API tests and added a new API test.

* platform/URLParser.cpp:
(WebCore::isDefaultPort):
Use switch statements instead of HashMap lookups.
(WebCore::isSpecialScheme):
Use switch statements instead of repeated String comparisons.
(WebCore::URLParser::parsePort):
Reduce String allocation.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
Added a test to verify the case insensitivity of the default port checks.

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

3 years agoMarking accessibility/mac/value-change/value-change-user-info-contenteditable.html...
ryanhaddad@apple.com [Mon, 12 Sep 2016 16:52:33 +0000 (16:52 +0000)]
Marking accessibility/mac/value-change/value-change-user-info-contenteditable.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=160042

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoDFG::forAllKilledOperands() could use a faster bitvector scan in the same-inline...
fpizlo@apple.com [Mon, 12 Sep 2016 16:08:52 +0000 (16:08 +0000)]
DFG::forAllKilledOperands() could use a faster bitvector scan in the same-inline-stack fast path
https://bugs.webkit.org/show_bug.cgi?id=161849

Reviewed by Saam Barati.

Source/JavaScriptCore:

This is a fairly obvious change. This turns a loop that would query each bit individually
into a loop that will process a word at a time. I would expect a very tiny progression in
DFG compile times.

This also gave me an opportunity to test and fix the new FastBitVector functionality.

* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledOperands):

Source/WTF:

It turns out that templates make private fields weird. FastBitVectorImpl can't necessarily
touch privates in instances of different template specializations of itself. So, I added a
public method called wordView() that exposes the necessary private field.

* wtf/FastBitVector.h:
(WTF::FastBitVectorImpl::operator&):
(WTF::FastBitVectorImpl::operator|):
(WTF::FastBitVectorImpl::operator~):
(WTF::FastBitVectorImpl::forEachSetBit):
(WTF::FastBitVectorImpl::wordView):

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

3 years agoMake -webkit-transition-* and -webkit-animation-* properties be pure aliases of the...
simon.fraser@apple.com [Mon, 12 Sep 2016 15:50:17 +0000 (15:50 +0000)]
Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones
https://bugs.webkit.org/show_bug.cgi?id=160478

Reviewed by Dean Jackson.

Source/WebCore:

Remove the custom -webkit prefixed transition and animation properties, and just make
them aliases of the unprefixed ones, as we do for transforms.

-webkit-animation-trigger remains as the only prefixed-only animation property.

This is mostly code deletion.

Test: fast/css/longhand-overrides-shorthand-prefixing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperty.h:
(WebCore::prefixingVariantForPropertyId): Deleted.
* css/CSSPropertyNames.in:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::MutableStyleProperties::removeShorthandProperty):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::animationShorthandForParsing):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted.
* css/parser/CSSParser.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::makeOpaque):
(WebCore::MediaControlPanelElement::makeTransparent):

LayoutTests:

Updated results, and a new test to ensure that longhand properties override
shorthand ones, with various combinations of prefixing.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Added.
* fast/css/longhand-overrides-shorthand-prefixing.html: Added.
* fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
* fast/css/prefixed-unprefixed-variant-style-declaration.html:
* transitions/svg-transitions-expected.txt:
* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:

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

3 years agoUnreviewed build fix after r205090.
pvollan@apple.com [Mon, 12 Sep 2016 12:31:56 +0000 (12:31 +0000)]
Unreviewed build fix after r205090.

* platform/cf/MediaAccessibilitySoftLink.cpp:

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

3 years ago[css-align] Initial values are parsed as invalid for some Alignment properties
jfernandez@igalia.com [Mon, 12 Sep 2016 11:46:57 +0000 (11:46 +0000)]
[css-align] Initial values are parsed as invalid for some Alignment properties
https://bugs.webkit.org/show_bug.cgi?id=161303

Reviewed by Darin Adler.

Source/WebCore:

Due to the implementation of the new CSS Box Alignment specification,
some properties have now new values allowed, which are not valid
according to the Flexible Box Layout specification.

In r205102 we have get back the keywordID parsing, originally implemented for
the Flexbible Box Layout specification. Even though the new valued would be
parsed as invalid when they are set, the 'initial' values will be assigned
in any case.

This patch verifies that the 'initial' values depend on whether the Grid
Layout is enabled or not and verifying such values are parsed as valid.

Additionally, it gets back as well they keywordID parsing for the Content
Alignment properties (align-content and justify-content). This required to
touch a bit the StyleBuilderConverter logic, since we will have to deal with
either the complex CSSContentDistributionValue complex or the  simpler
CSSPrimitiveValue.

Test: fast/css/ensure-flexbox-compatibility-with-initial-values.html

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertContentAlignmentData): Handling a primitive value if Grid Layout is not enabled.
* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Simpler parsing of alignment properties if Grid Layout is not enabled.
(WebCore::isKeywordPropertyID): Alignment properties are defined as keyword if Grid Layout is no enabled.
(WebCore::CSSParser::parseValue): Assert Grid Layout is enabled when using the complex parsing.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::isCSSGridLayoutEnabled): Checking out the Grid Layout runtime flags.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialDefaultAlignment): Initial value will depend on whether Grid Layout is enabled or not.
(WebCore::RenderStyle::initialContentAlignment): Initial value will depend on whether Grid Layout is enabled or not.

LayoutTests:

Test to verify the "initial" values of the CSS Box Alignment properties
are parsed as valid independently of whether Grid Layout is enabled or not.

* fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: Added.
* fast/css/ensure-flexbox-compatibility-with-initial-values.html: Added.
* fast/css/resources/alignment-parsing-utils.js:
(checkSupportedValues):

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

3 years agool.start may return incorrect value for reversed lists when not explicitly set
cdumez@apple.com [Mon, 12 Sep 2016 09:28:52 +0000 (09:28 +0000)]
ol.start may return incorrect value for reversed lists when not explicitly set
https://bugs.webkit.org/show_bug.cgi?id=161713

Reviewed by Ryosuke Niwa.

Fix style nit after r205689.

* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::itemCount):
(WebCore::HTMLOListElement::itemCountAfterLayout):
* html/HTMLOListElement.h:

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

3 years agoStart using Document::pageCacheState() instead of Document::inPageCache()
cdumez@apple.com [Mon, 12 Sep 2016 09:26:19 +0000 (09:26 +0000)]
Start using Document::pageCacheState() instead of Document::inPageCache()
https://bugs.webkit.org/show_bug.cgi?id=161851

Reviewed by Ryosuke Niwa.

Start using Document::pageCacheState() instead of Document::inPageCache()
as the latter one is confusing (given that it is true when firing the
pagehide event, when the document is about to enter page cache).

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::dispatchUnloadEvents):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* page/Page.cpp:
(WebCore::incrementFrame): Deleted.
* page/Page.h:

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

3 years agoFastBitVector should have efficient and easy-to-use vector-vector operations
fpizlo@apple.com [Mon, 12 Sep 2016 04:03:36 +0000 (04:03 +0000)]
FastBitVector should have efficient and easy-to-use vector-vector operations
https://bugs.webkit.org/show_bug.cgi?id=161847

Reviewed by Saam Barati.

Source/JavaScriptCore:

Adapt existing users of FastBitVector to the new API.

* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::computeKills):
(JSC::BytecodeLivenessAnalysis::dumpResults):
* bytecode/BytecodeLivenessAnalysisInlines.h:
(JSC::operandThatIsNotAlwaysLiveIsLive):
(JSC::BytecodeLivenessPropagation<DerivedAnalysis>::stepOverInstruction):
(JSC::BytecodeLivenessPropagation<DerivedAnalysis>::runLivenessFixpoint):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::validate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::flushForTerminal):
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledOperands):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::forAllLocalsLiveInBytecode):
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::willCatchException):
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlock):
* dfg/DFGNaturalLoops.cpp:
(JSC::DFG::NaturalLoops::NaturalLoops):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::cleanMustHandleValuesIfNecessary):

Source/WTF:

FastBitVector is a bitvector representation that supports manual dynamic resizing and is
optimized for speed, not space. (BitVector supports automatic dynamic resizing and is
optimized for space, while Bitmap is sized statically and is optimized for both speed and
space.) This change greatly increases the power of FastBitVector. We will use these new
powers for changing the JSC GC to use FastBitVectors to track sets of MarkedBlocks (bug
161581) instead of using a combination of Vectors and doubly-linked lists.

This change splits FastBitVector into two parts:

- A thing that manages the storage of a bitvector: a uint32_t array and a size_t numBits.
  We call this the word view.
- A thing that takes some kind of abstract array of uint32_t's and does bitvector
  operations to it. We call this the FastBitVectorImpl.

FastBitVectorImpl and word views are immutable. The FastBitVector class is a subclass of
FastBitVectorImpl specialized on a word view that owns its words and has additional
support for mutable operations.

Doing this allows us to efficiently support things like this without any unnecessary
memory allocation or copying:

FastBitVector a, b, c; // Assume that there is code to initialize these.
a &= b | ~c;

Previously, this kind of operation would not be efficient, because "~c" would have to
create a whole new FastBitVector. But now, it just returns a FastBitVectorImpl whose
underlying word view bitnots (~) its words on the fly. Using template magic, this can get
pretty complex. For example "b | ~c" returns a FastBitVectorImpl that wraps a word view
whose implementation of WordView::word(size_t index) is something like:

uint32_t word(size_t index) { return b.m_words.word(index) | ~c.m_words.word(index); }

FastBitVectorImpl supports all of the fast bulk bitvector operations, like
forEachSetBit(), bitCount(), etc. So, when you say "a &= b | ~c", the actual
implementation is going to run these bit operations on word granularity directly over the
storage inside a, b, c.

The use of operator overloading is worth explaining a bit. Previously, FastBitVector
avoided operator overloading. For example, the &= operation was called filter(). I think
that this was a pretty good approach at the time. I tried using non-operator methods in
this FastBitVector rewrite, but I found it very odd to say things like:

a.filter(b.bitOr(c.bitNot()));

I think that it's harder to see what is going on here, then using operators, because infix
notation is always better.

* WTF.xcodeproj/project.pbxproj:
* wtf/BitVector.h:
(WTF::BitVector::findBitInWord): Deleted.
* wtf/CMakeLists.txt:
* wtf/Dominators.h:
(WTF::Dominators::NaiveDominators::NaiveDominators):
(WTF::Dominators::NaiveDominators::dominates):
(WTF::Dominators::NaiveDominators::pruneDominators):
* wtf/FastBitVector.cpp: Removed.
* wtf/FastBitVector.h:
(WTF::fastBitVectorArrayLength):
(WTF::FastBitVectorWordView::FastBitVectorWordView):
(WTF::FastBitVectorWordView::numBits):
(WTF::FastBitVectorWordView::word):
(WTF::FastBitVectorWordOwner::FastBitVectorWordOwner):
(WTF::FastBitVectorWordOwner::~FastBitVectorWordOwner):
(WTF::FastBitVectorWordOwner::view):
(WTF::FastBitVectorWordOwner::operator=):
(WTF::FastBitVectorWordOwner::setAll):
(WTF::FastBitVectorWordOwner::clearAll):
(WTF::FastBitVectorWordOwner::set):
(WTF::FastBitVectorWordOwner::numBits):
(WTF::FastBitVectorWordOwner::arrayLength):
(WTF::FastBitVectorWordOwner::resize):
(WTF::FastBitVectorWordOwner::word):
(WTF::FastBitVectorWordOwner::words):
(WTF::FastBitVectorAndWords::FastBitVectorAndWords):
(WTF::FastBitVectorAndWords::view):
(WTF::FastBitVectorAndWords::numBits):
(WTF::FastBitVectorAndWords::word):
(WTF::FastBitVectorOrWords::FastBitVectorOrWords):
(WTF::FastBitVectorOrWords::view):
(WTF::FastBitVectorOrWords::numBits):
(WTF::FastBitVectorOrWords::word):
(WTF::FastBitVectorNotWords::FastBitVectorNotWords):
(WTF::FastBitVectorNotWords::view):
(WTF::FastBitVectorNotWords::numBits):
(WTF::FastBitVectorNotWords::word):
(WTF::FastBitVectorImpl::FastBitVectorImpl):
(WTF::FastBitVectorImpl::numBits):
(WTF::FastBitVectorImpl::size):
(WTF::FastBitVectorImpl::arrayLength):
(WTF::FastBitVectorImpl::operator==):
(WTF::FastBitVectorImpl::operator!=):
(WTF::FastBitVectorImpl::at):
(WTF::FastBitVectorImpl::operator[]):
(WTF::FastBitVectorImpl::bitCount):
(WTF::FastBitVectorImpl::operator&):
(WTF::FastBitVectorImpl::operator|):
(WTF::FastBitVectorImpl::operator~):
(WTF::FastBitVectorImpl::forEachSetBit):
(WTF::FastBitVectorImpl::forEachClearBit):
(WTF::FastBitVectorImpl::forEachBit):
(WTF::FastBitVectorImpl::findBit):
(WTF::FastBitVectorImpl::findSetBit):
(WTF::FastBitVectorImpl::findClearBit):
(WTF::FastBitVectorImpl::dump):
(WTF::FastBitVectorImpl::atImpl):
(WTF::FastBitVector::FastBitVector):
(WTF::FastBitVector::operator=):
(WTF::FastBitVector::resize):
(WTF::FastBitVector::setAll):
(WTF::FastBitVector::clearAll):
(WTF::FastBitVector::setAndCheck):
(WTF::FastBitVector::operator|=):
(WTF::FastBitVector::operator&=):
(WTF::FastBitVector::at):
(WTF::FastBitVector::operator[]):
(WTF::FastBitVector::BitReference::BitReference):
(WTF::FastBitVector::BitReference::operator bool):
(WTF::FastBitVector::BitReference::operator=):
(WTF::FastBitVector::~FastBitVector): Deleted.
(WTF::FastBitVector::numBits): Deleted.
(WTF::FastBitVector::set): Deleted.
(WTF::FastBitVector::equals): Deleted.
(WTF::FastBitVector::merge): Deleted.
(WTF::FastBitVector::filter): Deleted.
(WTF::FastBitVector::exclude): Deleted.
(WTF::FastBitVector::clear): Deleted.
(WTF::FastBitVector::get): Deleted.
(WTF::FastBitVector::bitCount): Deleted.
(WTF::FastBitVector::forEachSetBit): Deleted.
(WTF::FastBitVector::arrayLength): Deleted.
* wtf/StdLibExtras.h:
(WTF::findBitInWord):

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

3 years agoWeb Inspector: Combine similar SVG files for Styles sidebar
commit-queue@webkit.org [Mon, 12 Sep 2016 03:29:04 +0000 (03:29 +0000)]
Web Inspector: Combine similar SVG files for Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=161071

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-11
Reviewed by Joseph Pecoraro.

* UserInterface/Images/StyleRule.svg: Added.
* UserInterface/Images/StyleRulePseudoElement.svg: Added.
Replaced <defs> with <symbol> give CSS some access to the referenced DOM inside <symbol>.
Since <symbol> uses Shadow DOM, applying CSS variables to the :target element and using
them inside <symbol> allows for variable styling of the content.  Using a more basic
`#foo .bar` selector would not be valid since Shadow DOM separates the stylesheet selectors.

* UserInterface/Images/gtk/StyleRule.svg: Added.
* UserInterface/Images/gtk/StyleRulePseudoElement.svg: Added.

* UserInterface/Images/StyleRuleAuthor.svg: Removed.
* UserInterface/Images/StyleRuleInherited.svg: Removed.
* UserInterface/Images/StyleRuleInspector.svg: Removed.
* UserInterface/Images/StyleRuleUser.svg: Removed.
* UserInterface/Images/StyleRuleUserAgent.svg: Removed.
* UserInterface/Images/gtk/StyleRuleAuthor.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInherited.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInspector.svg: Removed.
* UserInterface/Images/gtk/StyleRuleUser.svg: Removed.
* UserInterface/Images/gtk/StyleRuleUserAgent.svg: Removed.
Merged into StyleRule.svg by using IDs in the URL.

* UserInterface/Images/StyleRuleAuthorPseudo.svg: Removed.
* UserInterface/Images/StyleRuleInspectorPseudo.svg: Removed.
* UserInterface/Images/StyleRuleUserAgentPseudo.svg: Removed.
* UserInterface/Images/StyleRuleUserPseudo.svg: Removed.
Merged into StyleRulePseudoElement.svg by using IDs in the URL.

* UserInterface/Views/StyleRuleIcons.css:
(.author-style-rule-icon .icon):
(.author-style-rule-icon.pseudo-element-selector .icon):
(.user-style-rule-icon .icon):
(.user-style-rule-icon.pseudo-element-selector .icon):
(.user-agent-style-rule-icon .icon):
(.user-agent-style-rule-icon.pseudo-element-selector .icon):
(.inspector-style-rule-icon .icon):
(.inspector-style-rule-icon.pseudo-element-selector .icon):
(.inherited-style-rule-icon .icon):

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

3 years agoREGRESSION (r205754): Web Inspector: Cannot click on links to stylesheets in Rules...
commit-queue@webkit.org [Mon, 12 Sep 2016 00:03:02 +0000 (00:03 +0000)]
REGRESSION (r205754): Web Inspector: Cannot click on links to stylesheets in Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=161838

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-11
Reviewed by Brian Burg.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header > textarea):
(.style-declaration-section > .header > .origin):
Added z-index to the non-selector elements of the header.  Also limited the size of the
selector textarea to just the size of the displayed selector text.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
Fixed invalid enum value for propertyVisibilityMode.

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

3 years agoHTMLTrackElement.kind's invalid value default should be the metadata state
cdumez@apple.com [Sun, 11 Sep 2016 22:30:05 +0000 (22:30 +0000)]
HTMLTrackElement.kind's invalid value default should be the metadata state
https://bugs.webkit.org/show_bug.cgi?id=161840

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline existing tests now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt:

Source/WebCore:

HTMLTrackElement.kind's invalid value default should be the metadata state,
not the subtitles state:
- https://html.spec.whatwg.org/#attr-track-kind

Chrome agrees with the specification.

No new tests, rebaselined existing tests.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::setKindKeywordIgnoringASCIICase):

LayoutTests:

* media/track/track-kind-expected.txt:
* media/track/track-kind.html:
Update existing test to reflect behavior change.

* media/track/w3c/interfaces/TextTrack/kind.html:
Re-sync test from W3C as it was outdated.

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

3 years ago[CSS Parser] Add the main parser implementation
hyatt@apple.com [Sun, 11 Sep 2016 18:11:42 +0000 (18:11 +0000)]
[CSS Parser] Add the main parser implementation
https://bugs.webkit.org/show_bug.cgi?id=161813

Reviewed by Dean Jackson.

This patch adds the main CSSParserImpl that handles stylesheet and rule parsing. All parsing starts with this
class (it will eventually be invoked from the CSSParser). This patch also adds @supports parsing.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
* css/CSSKeyframeRule.h:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleCharset::StyleRuleCharset):
(WebCore::StyleRuleCharset::~StyleRuleCharset):
(WebCore::StyleRuleNamespace::StyleRuleNamespace):
(WebCore::StyleRuleNamespace::~StyleRuleNamespace):
* css/StyleRule.h:
(WebCore::StyleRuleBase::isNamespaceRule):
(isType):
(WebCore::StyleRuleBase::isKeyframesRule): Deleted.
* css/StyleSheetContents.cpp:
(WebCore::traverseSubresourcesInRules):
* css/parser/CSSParserImpl.cpp: Added.
(WebCore::CSSParserImpl::CSSParserImpl):
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseVariableValue):
(WebCore::filterProperties):
(WebCore::createStyleProperties):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::parseRule):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::parsePageSelector):
(WebCore::CSSParserImpl::parseCustomPropertySet):
(WebCore::CSSParserImpl::parseKeyframeKeyList):
(WebCore::CSSParserImpl::supportsDeclaration):
(WebCore::CSSParserImpl::parseDeclarationListForInspector):
(WebCore::CSSParserImpl::parseStyleSheetForInspector):
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeRuleList):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::consumeStringOrURI):
(WebCore::CSSParserImpl::consumeCharsetRule):
(WebCore::CSSParserImpl::consumeImportRule):
(WebCore::CSSParserImpl::consumeNamespaceRule):
(WebCore::CSSParserImpl::consumeMediaRule):
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeViewportRule):
(WebCore::CSSParserImpl::consumeFontFaceRule):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumePageRule):
(WebCore::CSSParserImpl::consumeKeyframeStyleRule):
(WebCore::observeSelectors):
(WebCore::CSSParserImpl::consumeStyleRule):
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeVariableValue):
(WebCore::CSSParserImpl::consumeDeclarationValue):
(WebCore::CSSParserImpl::consumeKeyframeKeyList):
* css/parser/CSSParserImpl.h: Added.
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePagePseudoSelector):
* css/parser/CSSParserValues.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue):
* css/parser/CSSSupportsParser.cpp: Added.
(WebCore::CSSSupportsParser::supportsCondition):
(WebCore::CSSSupportsParser::consumeCondition):
(WebCore::CSSSupportsParser::consumeNegation):
(WebCore::CSSSupportsParser::consumeConditionInParenthesis):
* css/parser/CSSSupportsParser.h: Added.
(WebCore::CSSSupportsParser::CSSSupportsParser):

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

3 years ago[EFL] Skip to test some w3c/web-platform-tests
gyuyoung.kim@webkit.org [Sun, 11 Sep 2016 14:10:54 +0000 (14:10 +0000)]
[EFL] Skip to test some w3c/web-platform-tests

Unreviewed EFL gardening.

Some tests of w3c/web-platform-tests have been flaky since r205777.

* platform/efl/TestExpectations

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

3 years agoCandidates that don't end in spaces shouldn't have spaces arbitrarily appended to...
timothy_horton@apple.com [Sun, 11 Sep 2016 07:24:17 +0000 (07:24 +0000)]
Candidates that don't end in spaces shouldn't have spaces arbitrarily appended to them
https://bugs.webkit.org/show_bug.cgi?id=161846
<rdar://problem/28245097>

Reviewed by Beth Dakin.

Tests: editing/mac/spelling/accept-candidate-without-adding-space.html,
       editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word.html

* editing/Editor.cpp:
(WebCore::Editor::handleAcceptedCandidate):
Stop appending a space just because the candidate doesn't end in a space.
There are languages where that doesn't make sense, and the platform
guarantees that candidates will always have spaces if they need them.

Also, adjust the way we compute the AcceptedCandidate document marker range.
There were two problems with the existing code: it expanded outward from
the post-insertion cursor in *both* directions, instead of just backwards,
and it used the length of the replaced text, not the length of the newly
inserted text (more of the confusion mentioned in r205765).

* editing/mac/spelling/accept-candidate-replacing-multiple-words-expected.txt:
* editing/mac/spelling/accept-candidate-replacing-multiple-words.html:
* editing/mac/spelling/accept-candidate-without-crossing-editing-boundary-expected.txt:
* editing/mac/spelling/accept-candidate-without-crossing-editing-boundary.html:
Update existing tests to put spaces at the end of accepted candidates to make them
more similar to what the OS will return to us.

* editing/mac/spelling/accept-candidate-without-adding-space-expected.txt: Added.
* editing/mac/spelling/accept-candidate-without-adding-space.html: Added.
Add a test where the accepted candidate does *not* have a space at the end,
testing that we don't add one where the candidate didn't contain one.

* editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word-expected.txt: Added.
* editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word.html: Added.
Add a test ensuring that the document marker added by accepting a candidate
doesn't overlap the next word and prevent autocorrect from working on it.

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

3 years agoparseHTMLInteger() should take a StringView in parameter
cdumez@apple.com [Sat, 10 Sep 2016 18:08:32 +0000 (18:08 +0000)]
parseHTMLInteger() should take a StringView in parameter
https://bugs.webkit.org/show_bug.cgi?id=161669

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* runtime/DateConversion.cpp:
(JSC::formatDateTime):
Explicitly construct a String from the const WCHAR* on Windows because
it is ambiguous otherwise now that there is a StringBuilder::append()
overload taking an AtomicString in.

Source/WebCore:

parseHTMLInteger() should take a StringView in parameter instead of a
const String&.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceSrcLocal):
* css/parser/CSSParserValues.h:
(WebCore::CSSParserString::toStringView):
Add toStringView() to avoid unnecessarily constructing a String for
calling StringBuilder::append().

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLInteger):
(WebCore::parseHTMLNonNegativeInteger):
(WebCore::parseHTTPRefreshInternal):
* html/parser/HTMLParserIdioms.h:
(WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
(WebCore::limitToOnlyHTMLNonNegative):
Take a StringView in parameter instead of a const String&.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::isColumnDeclaredAsBlob):
Avoid unnecessarily constructing a String to call equalLettersIgnoringASCIICase()
by leveraging the StringView constructor taking a 'const char*' in parameter.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
Add constructTextRun() overload taking an AtomicString. It was otherwise ambiguous
because both a String or a StringView could be constructed from an AtomicString.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
(WebCore::buildDisplayStringForTrackBase):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):
Explicitly construct a String from NSString / CFStringRef types as such calls are
now ambiguous.

Source/WTF:

* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
Add StringBuilder::append() overload taking an AtomicString in parameter.
It used to call StringBuilder::append(const String&) implicitly when
passing an AtomicString. However, it is now ambiguous because there
is an overload taking a StringView, and it is now possible to construct
a StringView from an AtomicString.

* wtf/text/StringView.h:
(WTF::StringView::StringView):
- Add StringView constructor taking an AtomicString in parameter for
  convenience. This avoids having to call AtomicString::string()
  explicitly at call sites.
- Add StringView constructor taking a 'const char*' in parameter for
  performance. There are several call sites that were passing a const
  char* and implicitly constructing an unnecessary String to construct
  a StringView. This became more obvious because the constructor taking
  an AtomicString in parameter made such calls ambiguous.

Tools:

Explicitly construct a String from the CFStringRef in order to call
StringBuilder::append(). This is needed now that there is an append()
overload taking an AtomicString in parameter.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive):

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

3 years agoIt is possible for Document::m_frame pointer to become stale
cdumez@apple.com [Sat, 10 Sep 2016 16:06:05 +0000 (16:06 +0000)]
It is possible for Document::m_frame pointer to become stale
https://bugs.webkit.org/show_bug.cgi?id=161812
<rdar://problem/27745023>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Document::m_frame is supposed to get cleared by Document::prepareForDestruction().
The Frame destructor calls Frame::setView(nullptr) which is supposed to call the
prepareForDestruction() on the Frame's associated document. However,
Frame::setView(nullptr) was calling prepareForDestruction() only if
Document::inPageCache() returned true. This is because, we allow Documents to
stay alive in the PageCache even though they don't have a frame.

The issue is that Document::m_inPageCache flag was set to true right before
firing the pagehide event, so technically before really entering PageCache.
Therefore, we can run into problems if a Frame gets destroyed by a pagehide
EventHandler because ~Frame() will not call Document::prepareForDestruction()
due to Document::m_inPageCache being true. After the frame is destroyed,
Document::m_frame becomes stale and any action on the document will likely
lead to crashes (such as the one in the layout test and the radar which
happens when trying to unregister event listeners from the document).

The solution adopted in this patch is to replace the m_inPageCache boolean
with a m_pageCacheState enumeration that has 3 states:
- NotInPageCache
- AboutToEnterPageCache
- InPageCache

Frame::setView() / Frame::setDocument() were then updated to call
Document::prepareForDestruction() on the associated document whenever
the document's pageCacheState is not InPageCache. This means that we
will now call Document::prepareForDestruction() when the document is
being detached from its frame while firing the pagehide event.

Note that I tried to keep this patch minimal. Therefore, I kept
the Document::inPageCache() getter for now. I plan to switch all its
calls sites to the new Document::pageCacheState() getter in a follow-up
patch so that we can finally drop the confusing Document::inPageCache().

Test: fast/history/pagehide-remove-iframe-crash.html

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::setPageCacheState):
(WebCore::Document::topDocument):
* dom/Document.h:
(WebCore::Document::pageCacheState):
(WebCore::Document::inPageCache):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::destroy):
* history/PageCache.cpp:
(WebCore::setPageCacheState):
(WebCore::PageCache::addIfCacheable):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::open):
* loader/HistoryController.cpp:
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
* page/Frame.cpp:
(WebCore::Frame::setView):

LayoutTests:

Add layout test that crashes on both Mac and iOS due to using a stale
Document::m_frame pointer.

* fast/history/pagehide-remove-iframe-crash-expected.txt: Added.
* fast/history/pagehide-remove-iframe-crash.html: Added.

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

3 years ago[EFL] Mark new media source tests to failure
gyuyoung.kim@webkit.org [Sat, 10 Sep 2016 15:06:20 +0000 (15:06 +0000)]
[EFL] Mark new media source tests to failure

Unreviewed EFL gardening.

* platform/efl/TestExpectations: New added media source tests are failing.

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

3 years agoApple.com keynote does not display media controls
wenson_hsieh@apple.com [Sat, 10 Sep 2016 08:19:10 +0000 (08:19 +0000)]
Apple.com keynote does not display media controls
https://bugs.webkit.org/show_bug.cgi?id=161833
<rdar://problem/28230123>

Reviewed by Tim Horton.

Source/WebCore:

Tweaks the main content check so that we can distinguish between main content for the purposes of determining
autoplay policy vs. main content for the purposes of showing media controls. Namely, we make the latter less
restrictive than the former in terms of the maximum aspect ratio a video can have to be considered the right
size for main content.

New unit test in TestWebKitAPI.

* html/HTMLMediaElement.cpp:
(WebCore::mediaElementSessionInfoForSession):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager):
(WebCore::MediaElementSession::isLargeEnoughForMainContent):
(WebCore::MediaElementSession::wantsToObserveViewportVisibilityForMediaControls):
(WebCore::isMainContentForPurposesOfAutoplay):
(WebCore::isElementLargeEnoughForMainContent):
(WebCore::MediaElementSession::updateIsMainContent):
(WebCore::isMainContent): Deleted.
* html/MediaElementSession.h:

Tools:

New unit test verifying that wide videos (~2 aspect ratio) still get media controls.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html: Added.

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

3 years agoWKThumbnailView should expose a mode where it can be reparented without resnapshotting
timothy_horton@apple.com [Sat, 10 Sep 2016 02:20:11 +0000 (02:20 +0000)]
WKThumbnailView should expose a mode where it can be reparented without resnapshotting
https://bugs.webkit.org/show_bug.cgi?id=161828
<rdar://problem/28229756>

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
Add such a mode. Bail from snapshot teardown when unparented if it is on.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKThumbnailView.mm: Added.
(-[SnapshotSizeObserver observeValueForKeyPath:ofObject:change:context:]):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
Add a test ensuring that this behaves correctly.

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

3 years agoURLParser: Keep track of cannot-be-a-base-url according to spec
achristensen@apple.com [Sat, 10 Sep 2016 02:06:39 +0000 (02:06 +0000)]
URLParser: Keep track of cannot-be-a-base-url according to spec
https://bugs.webkit.org/show_bug.cgi?id=161830

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

* platform/URL.cpp:
(WebCore::URL::invalidate):
* platform/URL.h:
Add a boolean required by the spec.
This will not add to sizeof(URL) because we already have some bit fields.
* platform/URLParser.cpp:
(WebCore::URLParser::parse):
(WebCore::URLParser::allValuesEqual):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoFix API tests after r205774.
achristensen@apple.com [Sat, 10 Sep 2016 01:08:23 +0000 (01:08 +0000)]
Fix API tests after r205774.
https://bugs.webkit.org/show_bug.cgi?id=161820

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
I had committed the wrong expected path in one case. The functionality is correct.

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

3 years ago[ANGLE] instantiation of variable 'gl::GLTypeToGLenum<float>::value' required here...
dino@apple.com [Sat, 10 Sep 2016 00:59:00 +0000 (00:59 +0000)]
[ANGLE] instantiation of variable 'gl::GLTypeToGLenum<float>::value' required here, but no definition is available
https://bugs.webkit.org/show_bug.cgi?id=161829
<rdar://problem/28051244>

Reviewed by Alex Christensen.

Newer versions of clang require explicit definition of some template types
if they are in another translation unit.

* src/libANGLE/Program.cpp: Add definitions for GLTypeToGLenum.

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

3 years agoUnreviewed, rolling r205759 back in with a fix.
msaboff@apple.com [Sat, 10 Sep 2016 00:49:12 +0000 (00:49 +0000)]
Unreviewed, rolling r205759 back in with a fix.

An expectation file, JSTests/ChakraCore/test/Lib/tostring.baseline-jsc,
should be named "toString.baseline-jsc".  For systems with case-insensitive
filesystems, the wrong name isn't an issue.  That rename is part of this
fix.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

3 years ago[Media Source] Import updated w3c/web-platform-tests and rebaseline
jer.noble@apple.com [Sat, 10 Sep 2016 00:47:53 +0000 (00:47 +0000)]
[Media Source] Import updated w3c/web-platform-tests and rebaseline
https://bugs.webkit.org/show_bug.cgi?id=161723

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/media-source/OWNERS: Added.
* web-platform-tests/media-source/SourceBuffer-abort-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-readyState-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-readyState.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort-readyState.html.
* web-platform-tests/media-source/SourceBuffer-abort-removed-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-removed.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort-removed.html.
* web-platform-tests/media-source/SourceBuffer-abort-updating-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-updating.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort-updating.html.
* web-platform-tests/media-source/SourceBuffer-abort.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort.html.
* web-platform-tests/media-source/URL-createObjectURL-expected.txt: Added.
* web-platform-tests/media-source/URL-createObjectURL-null-expected.txt: Added.
* web-platform-tests/media-source/URL-createObjectURL-null.html: Added.
* web-platform-tests/media-source/URL-createObjectURL-revoke-expected.txt: Added.
* web-platform-tests/media-source/URL-createObjectURL-revoke.html: Added.
* web-platform-tests/media-source/URL-createObjectURL.html: Added.
* web-platform-tests/media-source/import_tests.sh: Added.
* web-platform-tests/media-source/interfaces-expected.txt: Added.
* web-platform-tests/media-source/interfaces.html: Added.
* web-platform-tests/media-source/manifest.txt: Added.
* web-platform-tests/media-source/mediasource-activesourcebuffers-expected.txt: Added.
* web-platform-tests/media-source/mediasource-activesourcebuffers.html: Added.
* web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt.
* web-platform-tests/media-source/mediasource-addsourcebuffer-mode-expected.txt: Added.
* web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html: Added.
* web-platform-tests/media-source/mediasource-addsourcebuffer.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html.
* web-platform-tests/media-source/mediasource-append-buffer-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-append-buffer-expected.txt.
* web-platform-tests/media-source/mediasource-append-buffer.html: Added.
* web-platform-tests/media-source/mediasource-appendbuffer-quota-exceeded-expected.txt: Added.
* web-platform-tests/media-source/mediasource-appendbuffer-quota-exceeded.html: Added.
* web-platform-tests/media-source/mediasource-appendwindow-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-appendwindow-expected.txt.
* web-platform-tests/media-source/mediasource-appendwindow.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-appendwindow.html.
* web-platform-tests/media-source/mediasource-avtracks-expected.txt: Added.
* web-platform-tests/media-source/mediasource-avtracks.html: Added.
* web-platform-tests/media-source/mediasource-buffered-expected.txt: Added.
* web-platform-tests/media-source/mediasource-buffered.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-buffered.html.
* web-platform-tests/media-source/mediasource-closed-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-closed-expected.txt.
* web-platform-tests/media-source/mediasource-closed.html: Added.
* web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framerate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html.
* web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-a-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-av-audio-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-av-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-av-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html.
* web-platform-tests/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-av-video-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-v-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-v-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framerate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framerate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framerate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html.
* web-platform-tests/media-source/mediasource-config-changes.js: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-changes.js.
(resolutionFromFilename):
(appendBuffer):
(mediaSourceConfigChangeTest):
* web-platform-tests/media-source/mediasource-detach-expected.txt: Added.
* web-platform-tests/media-source/mediasource-detach.html: Added.
* web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt: Added.
* web-platform-tests/media-source/mediasource-duration-boundaryconditions.html: Added.
* web-platform-tests/media-source/mediasource-duration-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-duration-expected.txt.
* web-platform-tests/media-source/mediasource-duration.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-duration.html.
* web-platform-tests/media-source/mediasource-endofstream-expected.txt: Added.
* web-platform-tests/media-source/mediasource-endofstream-invaliderror-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-endofstream-invaliderror-expected.txt.
* web-platform-tests/media-source/mediasource-endofstream-invaliderror.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-endofstream-invaliderror.html.
* web-platform-tests/media-source/mediasource-endofstream.html: Added.
* web-platform-tests/media-source/mediasource-errors-expected.txt: Added.
* web-platform-tests/media-source/mediasource-errors.html: Added.
* web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality-expected.txt.
* web-platform-tests/media-source/mediasource-getvideoplaybackquality.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html.
* web-platform-tests/media-source/mediasource-is-type-supported-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-is-type-supported-expected.txt.
* web-platform-tests/media-source/mediasource-is-type-supported.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-is-type-supported.html.
* web-platform-tests/media-source/mediasource-liveseekable-expected.txt: Added.
* web-platform-tests/media-source/mediasource-liveseekable.html: Added.
* web-platform-tests/media-source/mediasource-multiple-attach-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-multiple-attach-expected.txt.
* web-platform-tests/media-source/mediasource-multiple-attach.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html.
* web-platform-tests/media-source/mediasource-play-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play-expected.txt.
* web-platform-tests/media-source/mediasource-play-then-seek-back-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-expected.txt.
* web-platform-tests/media-source/mediasource-play-then-seek-back.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back.html.
* web-platform-tests/media-source/mediasource-play.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play.html.
* web-platform-tests/media-source/mediasource-preload-expected.txt: Added.
* web-platform-tests/media-source/mediasource-preload.html: Added.
* web-platform-tests/media-source/mediasource-redundant-seek-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-redundant-seek-expected.txt.
* web-platform-tests/media-source/mediasource-redundant-seek.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-redundant-seek.html.
* web-platform-tests/media-source/mediasource-remove-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-remove-expected.txt.
* web-platform-tests/media-source/mediasource-remove.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-remove.html.
* web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt: Added.
* web-platform-tests/media-source/mediasource-removesourcebuffer.html: Added.
* web-platform-tests/media-source/mediasource-seek-beyond-duration-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration-expected.txt.
* web-platform-tests/media-source/mediasource-seek-beyond-duration.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html.
* web-platform-tests/media-source/mediasource-seek-during-pending-seek-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-during-pending-seek-expected.txt.
* web-platform-tests/media-source/mediasource-seek-during-pending-seek.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-during-pending-seek.html.
* web-platform-tests/media-source/mediasource-seekable-expected.txt: Added.
* web-platform-tests/media-source/mediasource-seekable.html: Added.
* web-platform-tests/media-source/mediasource-sequencemode-append-buffer-expected.txt: Added.
* web-platform-tests/media-source/mediasource-sequencemode-append-buffer.html: Added.
* web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt.
* web-platform-tests/media-source/mediasource-sourcebuffer-mode.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebuffer-mode.html.
* web-platform-tests/media-source/mediasource-sourcebuffer-trackdefaults-expected.txt: Added.
* web-platform-tests/media-source/mediasource-sourcebuffer-trackdefaults.html: Added.
* web-platform-tests/media-source/mediasource-sourcebufferlist-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebufferlist-expected.txt.
* web-platform-tests/media-source/mediasource-sourcebufferlist.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebufferlist.html.
* web-platform-tests/media-source/mediasource-timestamp-offset-expected.txt: Added.
* web-platform-tests/media-source/mediasource-timestamp-offset.html: Added.
* web-platform-tests/media-source/mediasource-trackdefault-expected.txt: Added.
* web-platform-tests/media-source/mediasource-trackdefault.html: Added.
* web-platform-tests/media-source/mediasource-trackdefaultlist-expected.txt: Added.
* web-platform-tests/media-source/mediasource-trackdefaultlist.html: Added.
* web-platform-tests/media-source/mediasource-util.js: Renamed from LayoutTests/http/tests/media/media-source/mediasource-util.js.
(EventExpectationsManager):
(EventExpectationsManager.prototype.expectEvent):
(EventExpectationsManager.prototype.waitForExpectedEvents):
(EventExpectationsManager.prototype.expectingEvents):
(EventExpectationsManager.prototype.handleWaitCallback_):
(EventExpectationsManager.prototype.getExpectations_):
(loadData_):
(onSourceOpen):
(openMediaSource_):
(MediaSourceUtil.loadTextData):
(MediaSourceUtil.loadBinaryData):
(MediaSourceUtil.fetchManifestAndData):
(MediaSourceUtil.extractSegmentData):
(MediaSourceUtil.getMediaDataForPlaybackTime):
(getFirstSupportedType):
(getSegmentInfo):
(MediaSourceUtil.getSubType):
(MediaSourceUtil.append):
(onEvent):
(onAppendDone):
(MediaSourceUtil.appendUntilEventFires):
(addExtraTestMethods.test.expectEvent):
(addExtraTestMethods.test.waitForExpectedEvents):
(addExtraTestMethods.test.waitForCurrentTimeChange):
(addExtraTestMethods.test.done):
(addExtraTestMethods):
(window.string_appeared_here):
* web-platform-tests/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/mp4/test-a-128k-44100Hz-1ch.mp4: Added.
* web-platform-tests/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/mp4/test-a-192k-44100Hz-1ch.mp4: Added.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-24fps-8kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-24fps-8kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-128k-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-256k-320x240-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-256k-320x240-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test.mp4.
* web-platform-tests/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/webm/test-a-128k-44100Hz-1ch.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-128k-44100Hz-1ch.webm.
* web-platform-tests/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/webm/test-a-192k-44100Hz-1ch.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-192k-44100Hz-1ch.webm.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-128k-320x240-24fps-8kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-24fps-8kfr.webm.
* web-platform-tests/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-128k-320x240-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-128k-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-256k-320x240-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-256k-320x240-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-vp8-vorbis-webvtt.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-vp8-vorbis-webvtt.webm.
* web-platform-tests/media-source/webm/test.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test.webm.

LayoutTests:

* http/tests/media/media-source/mediasource-append-buffer.html: Removed.
* http/tests/media/media-source/mediasource-buffered-expected.txt: Removed.
* http/tests/media/media-source/mediasource-closed.html: Removed.
* http/tests/media/media-source/mediasource-config-changes.js:
(resolutionFromFilename): Deleted.
(appendBuffer): Deleted.
(mediaSourceConfigChangeTest): Deleted.
* http/tests/media/media-source/mediasource-util.js:
(EventExpectationsManager): Deleted.
(EventExpectationsManager.prototype.expectEvent): Deleted.
(EventExpectationsManager.prototype.waitForExpectedEvents): Deleted.
(EventExpectationsManager.prototype.expectingEvents): Deleted.
(EventExpectationsManager.prototype.handleWaitCallback_): Deleted.
(EventExpectationsManager.prototype.getExpectations_): Deleted.
(loadData_): Deleted.
(onSourceOpen): Deleted.
(openMediaSource_): Deleted.
(MediaSourceUtil.loadTextData): Deleted.
(MediaSourceUtil.loadBinaryData): Deleted.
(MediaSourceUtil.fetchManifestAndData): Deleted.
(MediaSourceUtil.extractSegmentData): Deleted.
(MediaSourceUtil.getMediaDataForPlaybackTime): Deleted.
(getFirstSupportedType): Deleted.
(getSegmentInfo): Deleted.
(MediaSourceUtil.getSubType): Deleted.
(addExtraTestMethods.test.failOnEvent): Deleted.
(addExtraTestMethods.test.endOnEvent): Deleted.
(addExtraTestMethods.test.expectEvent): Deleted.
(addExtraTestMethods.test.waitForExpectedEvents): Deleted.
(addExtraTestMethods.test.waitForCurrentTimeChange): Deleted.
(addExtraTestMethods.test.done): Deleted.
(addExtraTestMethods): Deleted.
(window.string_appeared_here): Deleted.
* http/tests/media/media-source/mp4/test-a-128k-44100Hz-1ch.mp4: Removed.
* http/tests/media/media-source/mp4/test-a-192k-44100Hz-1ch.mp4: Removed.
* http/tests/media/media-source/webm/segment-info.js: Removed.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-removed-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-updating-expected.txt: Added.

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

3 years agoUnreviewed. Added myself to the list of committers.
johan_jensen@apple.com [Sat, 10 Sep 2016 00:34:04 +0000 (00:34 +0000)]
Unreviewed. Added myself to the list of committers.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoUnreviewed, rolling out r205771.
commit-queue@webkit.org [Sat, 10 Sep 2016 00:06:06 +0000 (00:06 +0000)]
Unreviewed, rolling out r205771.
https://bugs.webkit.org/show_bug.cgi?id=161823

Broke Windows build (Requested by litherum on #webkit).

Reverted changeset:

"Remove unused member of GlyphBuffer"
https://bugs.webkit.org/show_bug.cgi?id=161814
http://trac.webkit.org/changeset/205771

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

3 years agoURLParser should convert ASCII hosts to lowercase
achristensen@apple.com [Fri, 9 Sep 2016 23:39:11 +0000 (23:39 +0000)]
URLParser should convert ASCII hosts to lowercase
https://bugs.webkit.org/show_bug.cgi?id=161820

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::domainToASCII):
The fast path for domains that are already ASCII and do not need punycode encoding
should convert the domain to lowercase.
This matches behavior in URL::parse if isCanonicalHostnameLowercaseForScheme is true,
and RFC 5890.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoUnreviewed, rolling out r205759.
ryanhaddad@apple.com [Fri, 9 Sep 2016 22:44:13 +0000 (22:44 +0000)]
Unreviewed, rolling out r205759.

This change broke all JSC tests

Reverted changeset:

"Add ChakraCore tests to run-javascriptcore-tests"
https://bugs.webkit.org/show_bug.cgi?id=161808
http://trac.webkit.org/changeset/205759

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

3 years agoRevert r205770 because Ricky is already a committer.
ryanhaddad@apple.com [Fri, 9 Sep 2016 22:14:46 +0000 (22:14 +0000)]
Revert r205770 because Ricky is already a committer.

Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoRemove unused member of GlyphBuffer
mmaxfield@apple.com [Fri, 9 Sep 2016 21:54:31 +0000 (21:54 +0000)]
Remove unused member of GlyphBuffer
https://bugs.webkit.org/show_bug.cgi?id=161814

Reviewed by Simon Fraser.

This m_offsets member never actually affected anything. It just made
FontCascade::drawGlyphBuffer() slower.

No new tests because there is no behavior change.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawGlyphBuffer):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::clear):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
(WebCore::GlyphBuffer::shrink):
(WebCore::GlyphBuffer::swap):
(WebCore::GlyphBuffer::offsetAt): Deleted.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem):

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

3 years agoUnreviewed. Added myself to the list of committers.
rmondello@apple.com [Fri, 9 Sep 2016 21:44:55 +0000 (21:44 +0000)]
Unreviewed. Added myself to the list of committers.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoWASM should support if-then-else
keith_miller@apple.com [Fri, 9 Sep 2016 21:30:51 +0000 (21:30 +0000)]
WASM should support if-then-else
https://bugs.webkit.org/show_bug.cgi?id=161778

Reviewed by Michael Saboff.

This patch makes some major changes to the way that the WASM
function parser works. First, the control stack has been moved
from the parser's context to the parser itself. This simplifies
the way that the parser works and allows us to make the decoder
iterative rather than recursive. Since the control stack has been
moved to the parser, any context operation that refers to some
block now receives that block by reference.

For any if block, regardless of whether or not it is an
if-then-else or not, we will allocate both the entire control flow
diamond. This is not a major issue in the if-then case since B3
will immediately cleanup these blocks. In order to support if-then
and if-then-else we needed to be able to distinguish what the type
of the top block on the control stack is. This will be necessary
when validating the else opcode in the future. In the B3 IR
generator we decide to the type of the block strictly by the
shape.

Currently, if blocks don't handle passed and returned stack values
correctly. I plan to fix this when I add support for the block
signatures. See: https://github.com/WebAssembly/design/pull/765

* testWASM.cpp:
(runWASMTests):
* wasm/WASMB3IRGenerator.cpp:
(dumpProcedure):
(JSC::WASM::parseAndCompile):
* wasm/WASMB3IRGenerator.h:
* wasm/WASMFunctionParser.h:
(JSC::WASM::FunctionParser<Context>::parseBlock):
(JSC::WASM::FunctionParser<Context>::parseExpression):
(JSC::WASM::FunctionParser<Context>::parseUnreachableExpression):
* wasm/WASMOps.h:

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

3 years agoSource/WebCore:
achristensen@apple.com [Fri, 9 Sep 2016 21:29:47 +0000 (21:29 +0000)]
Source/WebCore:
Text replacement candidates don't always overwrite the entire original string
https://bugs.webkit.org/show_bug.cgi?id=161779
<rdar://problem/28033492>

Patch by Tim Horton <timothy_horton@apple.com> on 2016-09-09
Reviewed by Simon Fraser.

New test: editing/mac/spelling/accept-candidate-replacing-multiple-words.html.

* editing/Editor.cpp:
(WebCore::Editor::contextRangeForCandidateRequest):
Factor contextRangeForCandidateRequest out of the WebKits, into Editor.
This just expands to paragraph boundaries from the cursor.

(WebCore::Editor::selectTextCheckingResult):
Add selectTextCheckingResult, which, given a TextCheckingResult,
selects the range represented by the result's location and length, which
indicate the portion of the context string that the result refers to.
In the case of accepting a candidate, we want to select that range
so that our insertion will overwrite it.

(WebCore::Editor::handleAcceptedCandidate):
Make use of selectTextCheckingResult instead of just assuming that we want
to replace the word to the left of the insertion point.

(WebCore::Editor::stringForCandidateRequest): Deleted.
* editing/Editor.h:

* testing/Internals.cpp:
(WebCore::Internals::handleAcceptedCandidate):
* testing/Internals.h:
* testing/Internals.idl:
Internals' handleAcceptedCandidate assumed (wrongly) that the length
of a TextCheckerResult was the length of the candidate, when really it is
the length of the text that the candidate would replace. Adjust this,
and expose the replacement range to JavaScript, so we can test this.

Tools:
URLParser: Fix and optimize parsing file URLs ending with a host but no slash
https://bugs.webkit.org/show_bug.cgi?id=161815

Reviewed by Geoffrey Garen.

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agojsc.cpp should call initializeMainThread() to make sure that GC thread assertions...
fpizlo@apple.com [Fri, 9 Sep 2016 21:20:02 +0000 (21:20 +0000)]
jsc.cpp should call initializeMainThread() to make sure that GC thread assertions work
https://bugs.webkit.org/show_bug.cgi?id=161801

Reviewed by Keith Miller.

The GC has debug assertions that certain things don't happen on GC threads. Those assertions
are no-ops unless initializeGCThreads() is called, and I think the most canonical way to do
that is to call initializeMainThread().

* jsc.cpp:
(jscmain):

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

3 years agoExpose Apple Pencil data to Touch events
dino@apple.com [Fri, 9 Sep 2016 20:57:50 +0000 (20:57 +0000)]
Expose Apple Pencil data to Touch events
https://bugs.webkit.org/show_bug.cgi?id=161783
<rdar://problem/28218898>

Reviewed by Beth Dakin.

Source/WebKit2:

* Platform/spi/ios/UIKitSPI.h: Expose the new SPI. Since this is only used
on public builds, guard it against everything that is <= iOS 10.0.
* Shared/WebEvent.h: New properties.
(WebKit::WebPlatformTouchPoint::setAltitudeAngle):
(WebKit::WebPlatformTouchPoint::altitudeAngle):
(WebKit::WebPlatformTouchPoint::setAzimuthAngle):
(WebKit::WebPlatformTouchPoint::azimuthAngle):
(WebKit::WebPlatformTouchPoint::setTouchType):
(WebKit::WebPlatformTouchPoint::touchType):
(WebKit::WebPlatformTouchPoint::force): Deleted.
* Shared/WebEventConversion.cpp:
(WebKit::webPlatformTouchTypeToPlatform):
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint): More
parameters sent to parent constructor.
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::convertTouchType):
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):

Tools:

The values that IOHID expects are different from their
documentation, and from what UITouch interprets. Tweak
incoming data so it will produce the output we expect.

* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator stylusDownAtPoint:azimuthAngle:altitudeAngle:pressure:]):
(-[HIDEventGenerator stylusMoveToPoint:azimuthAngle:altitudeAngle:pressure:]):

LayoutTests:

Four new tests that check data coming out of an Apple Pencil.

* fast/events/touch/ios/pencil-data-change-does-not-give-touchmove-expected.txt: Added.
* fast/events/touch/ios/pencil-data-change-does-not-give-touchmove.html: Added.
* fast/events/touch/ios/pencil-data-change-gives-touchforcechange-expected.txt: Added.
* fast/events/touch/ios/pencil-data-change-gives-touchforcechange.html: Added.
* fast/events/touch/ios/pencil-move-provides-stylus-data-expected.txt: Added.
* fast/events/touch/ios/pencil-move-provides-stylus-data.html: Added.
* fast/events/touch/ios/pencil-touch-registered-as-pencil-expected.txt: Added.
* fast/events/touch/ios/pencil-touch-registered-as-pencil.html: Added.

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

3 years agoText replacement candidates don't always overwrite the entire original string
timothy_horton@apple.com [Fri, 9 Sep 2016 20:46:23 +0000 (20:46 +0000)]
Text replacement candidates don't always overwrite the entire original string
https://bugs.webkit.org/show_bug.cgi?id=161779
<rdar://problem/28033492>

Reviewed by Simon Fraser.

Source/WebCore:

New test: editing/mac/spelling/accept-candidate-replacing-multiple-words.html.

* editing/Editor.cpp:
(WebCore::Editor::contextRangeForCandidateRequest):
Factor contextRangeForCandidateRequest out of the WebKits, into Editor.
This just expands to paragraph boundaries from the cursor.

(WebCore::Editor::selectTextCheckingResult):
Add selectTextCheckingResult, which, given a TextCheckingResult,
selects the range represented by the result's location and length, which
indicate the portion of the context string that the result refers to.
In the case of accepting a candidate, we want to select that range
so that our insertion will overwrite it.

(WebCore::Editor::handleAcceptedCandidate):
Make use of selectTextCheckingResult instead of just assuming that we want
to replace the word to the left of the insertion point.

(WebCore::Editor::stringForCandidateRequest): Deleted.
* editing/Editor.h:

* testing/Internals.cpp:
(WebCore::Internals::handleAcceptedCandidate):
* testing/Internals.h:
* testing/Internals.idl:
Internals' handleAcceptedCandidate assumed (wrongly) that the length
of a TextCheckerResult was the length of the candidate, when really it is
the length of the text that the candidate would replace. Adjust this,
and expose the replacement range to JavaScript, so we can test this.

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::requestCandidatesForSelection):
Make use of the shared implementation of contextRangeForCandidateRequest.

Source/WebKit2:

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):
Make use of the shared implementation of contextRangeForCandidateRequest.

LayoutTests:

* editing/mac/spelling/accept-candidate-without-crossing-editing-boundary.html:
* editing/mac/spelling/accept-misspelled-candidate.html:
Adjust tests to send the correct replacement range.

* editing/mac/spelling/accept-candidate-replacing-multiple-words.html:
Add a test that ensures that we will replace the entire string for a
candidate that replaces multiple words.

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

3 years agoUnreviewed. Added myself to the list of committers.
jfbastien@apple.com [Fri, 9 Sep 2016 20:27:34 +0000 (20:27 +0000)]
Unreviewed. Added myself to the list of committers.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoRebaseline js/dom/global-constructors-attributes.html for mac-wk1 after r205755.
ryanhaddad@apple.com [Fri, 9 Sep 2016 19:57:48 +0000 (19:57 +0000)]
Rebaseline js/dom/global-constructors-attributes.html for mac-wk1  after r205755.

Unreviewed test gardening.

* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:

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

3 years agoAdd ChakraCore tests to run-javascriptcore-tests
msaboff@apple.com [Fri, 9 Sep 2016 19:15:45 +0000 (19:15 +0000)]
Add ChakraCore tests to run-javascriptcore-tests
https://bugs.webkit.org/show_bug.cgi?id=161808

Reviewed by Saam Barati.

Added ChakraCore tests to the default list of tests to run.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

3 years agoMarking tiled-drawing/scrolling/fixed/four-bars-zoomed.html as flaky on mac-wk2 debug.
ryanhaddad@apple.com [Fri, 9 Sep 2016 19:02:24 +0000 (19:02 +0000)]
Marking tiled-drawing/scrolling/fixed/four-bars-zoomed.html as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=161547

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoDisable three flakey Chakra Tests
msaboff@apple.com [Fri, 9 Sep 2016 18:49:26 +0000 (18:49 +0000)]
Disable three flakey Chakra Tests
https://bugs.webkit.org/show_bug.cgi?id=161807

Reviewed by Saam Barati.

* ChakraCore.yaml: Disabled the flakey tests
ChakraCore/test/Array/protoLookup_native.js
ChakraCore/test/LetConst/delete.js
ChakraCore/test/fieldopts/fieldhoist_sideeffect.js

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

3 years agoSoft-link GameController.framework.
beidson@apple.com [Fri, 9 Sep 2016 18:44:14 +0000 (18:44 +0000)]
Soft-link GameController.framework.
<rdar://problem/28219953> and https://bugs.webkit.org/show_bug.cgi?id=161802

Reviewed by Brian Burg.

No new tests (No change in behavior).

* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
(WebCore::GameControllerGamepadProvider::startMonitoringGamepads):

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

3 years agoRename Key to CryptoKey
jiewen_tan@apple.com [Fri, 9 Sep 2016 18:38:47 +0000 (18:38 +0000)]
Rename Key to CryptoKey
https://bugs.webkit.org/show_bug.cgi?id=161665
<rdar://problem/28083391>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

* WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

A link to the spec: https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface

* crypto/CryptoKey.idl:
Remove some unnecessary IDL attributes and reorder KeyType enum to match the spec.
* crypto/CryptoKeyType.h:

LayoutTests:

* crypto/subtle/aes-cbc-unwrap-rsa-expected.txt:
* crypto/subtle/aes-cbc-unwrap-rsa.html:
* crypto/subtle/aes-kw-key-manipulation-expected.txt:
* crypto/subtle/aes-kw-key-manipulation.html:
* crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt:
* crypto/subtle/aes-kw-wrap-unwrap-aes.html:
* crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt:
* crypto/subtle/rsa-oaep-wrap-unwrap-aes.html:
* crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt:
* crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:

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

3 years agoWeb Inspector: Command-Z doesn't work when editing CSS selectors in Styles sidebar
commit-queue@webkit.org [Fri, 9 Sep 2016 18:25:14 +0000 (18:25 +0000)]
Web Inspector: Command-Z doesn't work when editing CSS selectors in Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=159734

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-09
Reviewed by Brian Burg.

Replace the current usage of -webkit-user-select with a textarea sized exactly the same as
the selector text which holds the current value of the selector.

* UserInterface/Test.html: Add WrappedPromise.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector):
Ensure that the promise returned by changeRuleSelector is only resolved once the initiated
refresh has completed, ensuring that all matched selectors are parsed and available.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header):
(.style-declaration-section.locked > .header::before):
(.style-declaration-section.rule-disabled > .header > .icon):
(.style-declaration-section > .header > textarea):
(.style-declaration-section > .header > textarea:focus):
(.style-declaration-section > .header > textarea:focus + .selector):
(.style-declaration-section > .header > .selector):
(.style-declaration-section > .header > .selector:empty):
(.style-declaration-section > .header > .selector .matched):
(.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon): Deleted.
(.style-declaration-section > .header > .selector:empty::before): Deleted.
(.style-declaration-section > .header > .selector:focus): Deleted.
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector): Deleted.
(.style-declaration-section > .header > .selector > .matched): Deleted.
(.style-declaration-section.invalid-selector > .header > .icon): Deleted.
(.style-declaration-section.invalid-selector > .header > .selector): Deleted.
Added styling to make textarea invisible when not focused.
Also removed the .invalid-selector styles as the section now refreshed on all changes.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelectorTextKnownToMatch):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
(WebInspector.CSSStyleDeclarationSection.prototype.focusRuleSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorEditable):
(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorLocked): Deleted.
Added a hidden textarea for modifying the selector of the represented style.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorPreviousRule):
Now use new getters on CSSSTyleDeclarationSection for determining if a selector is editable.

* UserInterface/Views/Variables.css:
(:root):
Added --style-declaration-section-header-padding CSS variable.

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

3 years agoMake hasOwnProperty ALWAYS_INLINE
sbarati@apple.com [Fri, 9 Sep 2016 18:04:19 +0000 (18:04 +0000)]
Make hasOwnProperty ALWAYS_INLINE
https://bugs.webkit.org/show_bug.cgi?id=161775

Reviewed by Ryosuke Niwa.

Speedometer spends around 2.5% of its time in hasOwnProperty.
Let's reduce the overhead of calling that function by marking
it as inline. Also, it's likely that the function will call into
JSObject::getOwnPropertySlot. I added a check to see if that's
the function we're calling, if it is, we do a direct call instead
of an indirect call.

* runtime/JSObject.cpp:
(JSC::JSObject::hasOwnProperty): Deleted.
* runtime/JSObjectInlines.h:
(JSC::JSObject::hasOwnProperty):

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

3 years agoURLParser: Handle \ in path according to spec
achristensen@apple.com [Fri, 9 Sep 2016 17:56:10 +0000 (17:56 +0000)]
URLParser: Handle \ in path according to spec
https://bugs.webkit.org/show_bug.cgi?id=161805

Reviewed by Andy Estes.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoPerf test Animation/css-accelerated-animation.html failing
simon.fraser@apple.com [Fri, 9 Sep 2016 17:46:54 +0000 (17:46 +0000)]
Perf test Animation/css-accelerated-animation.html failing
https://bugs.webkit.org/show_bug.cgi?id=161795

Skip Animation/css-accelerated-animation.html since this only works as a MobileSafari
perf test.

* Skipped:

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

3 years agoTextTrackLoader should use FetchOptions::mode according its crossOrigin attribute
commit-queue@webkit.org [Fri, 9 Sep 2016 17:24:58 +0000 (17:24 +0000)]
TextTrackLoader should use FetchOptions::mode according its crossOrigin attribute
https://bugs.webkit.org/show_bug.cgi?id=161792

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-09
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/removeCue-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt:

Source/WebCore:

Covered by existing and updated tests.

Updating text track loader to use fetch mode according crossOrigin value.

Removed the check done in the case the crossOrigin value is not set.
Previously cross-origin loads were forbidden, now this is authorized.
This change allows aligning with the spec.
Also, this check could be bypassed in the case of a same-origin URL redirecting to a cross-origin one.

* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::notifyFinished): Checking resource error in lieu of doing CORS checks on its own.
(WebCore::TextTrackLoader::load): Using CachedResourceRequest::setAsPotentiallyCrossOrigin
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::loadFrom): Setting loading and status values as would be done when load is finished.
(WebCore::CachedResource::setBodyDataFrom): Default implementation is to copy the shared buffer.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Enabling resource update when mode or origin is different for TextTrack resources.

LayoutTests:

* http/tests/security/text-track-crossorigin-expected.txt:
* http/tests/security/text-track-crossorigin.html: Updating test to be more robust against timeout.
Updated test to succeed doing no-cors loading of cross-origin resources.

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

3 years agoURLParser should parse URLs with non-special schemes
achristensen@apple.com [Fri, 9 Sep 2016 17:06:24 +0000 (17:06 +0000)]
URLParser should parse URLs with non-special schemes
https://bugs.webkit.org/show_bug.cgi?id=161786

Reviewed by Andy Estes.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
There's no reason for a SchemeEndCheckForSlashes state now that we can copy iterators.
It's not in the spec and not needed.
Also, move things around a little so parsing special or non-special schemes
followed by one or two slashes works correctly.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoMarking imported/w3c/web-platform-tests/IndexedDB/keyorder.htm as flaky on mac-wk2...
ryanhaddad@apple.com [Fri, 9 Sep 2016 16:57:50 +0000 (16:57 +0000)]
Marking imported/w3c/web-platform-tests/IndexedDB/keyorder.htm as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=161742

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMarking inspector/debugger/breakpoint-columns.html as flaky on mac-wk2.
ryanhaddad@apple.com [Fri, 9 Sep 2016 16:51:23 +0000 (16:51 +0000)]
Marking inspector/debugger/breakpoint-columns.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=161774

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoHashMapImpl needs to m_buffer.clear() in its constructor
fpizlo@apple.com [Fri, 9 Sep 2016 16:50:10 +0000 (16:50 +0000)]
HashMapImpl needs to m_buffer.clear() in its constructor
https://bugs.webkit.org/show_bug.cgi?id=161796

Reviewed by Keith Miller.

This is the second time that I'm fixing a bug because AuxiliaryBarrier does not initialize
itself. That seemed like a good idea because maybe sometimes the user knows better how to
initialize it. But, it's not worth it if it's a constant source of bugs.

So, I'm fixing it for good by making AuxiliaryBarrier::AuxiliaryBarrier() initialize its
m_value.

* runtime/AuxiliaryBarrier.h:
(JSC::AuxiliaryBarrier::AuxiliaryBarrier):
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::DirectArguments):

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

3 years agoMarking fast/text/emoji-num-glyphs.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 9 Sep 2016 16:29:02 +0000 (16:29 +0000)]
Marking fast/text/emoji-num-glyphs.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=161799

Unreviewed test gardening.

* TestExpectations:

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

3 years agoRegression(r186020): Null dereference in getStartDate()
cdumez@apple.com [Fri, 9 Sep 2016 16:17:19 +0000 (16:17 +0000)]
Regression(r186020): Null dereference in getStartDate()
https://bugs.webkit.org/show_bug.cgi?id=161733

Reviewed by Eric Carlson.

Source/WebCore:

Update HTMLMediaElement::getStartDate() to return NaN if m_player is null,
instead of crashing.

Test: fast/media/getStartDate-NaN.html

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::toJS):
Add a FIXME comment as this code is using jsDateOrNull() but should
probably be using jsDate() as per:
- http://w3c.github.io/IndexedDB/#request-convert-a-key-to-a-value

* bindings/js/JSDOMBinding.cpp:
(WebCore::jsDate):
(WebCore::jsDateOrNull):
* bindings/js/JSDOMBinding.h:
- Rename jsDateOrNaN() to jsDate() as this is the default behavior. Also,
  return new Date(NaN) instead of NaN if the implementation returns NaN.
  The IDL says we should return a Date, not a number.
- Update jsDateOrNull() to only return jsNull() if the native value is
  NaN, instead of doing so for every value that is not finite. Our
  convention is to use NaN as special value to represent null in JS.

* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue):
When converting a native value (double) into a Date, rely on the fact
that the type is nullable when deciding if we should call jsDate() or
jsDateOrNull() to convert. This way, we no longe need a WebKit specific
[TreatReturnedDateAs=Null|NaN] IDL extended attribute.

* bindings/scripts/IDLAttributes.txt:
* html/HTMLInputElement.idl:
Mark valueAsDate attribute as nullable, as per the specification:
- https://html.spec.whatwg.org/#htmlinputelement

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getStartDate):
Return NaN if m_player is null instead of crashing. The reason I decided
to return NaN is because the specification [1] says to return a new Date
object representing the current timeline offset. The spec of timeline
offset [2] says that the initial timeline offset value is NaN.
[1] https://html.spec.whatwg.org/#dom-media-getstartdate
[2] https://html.spec.whatwg.org/#timeline-offset

* bindings/scripts/IDLAttributes.txt:
* html/HTMLMediaElement.idl:
Drop [TreatReturnedDateAs] attribute as it is no longer supported.

LayoutTests:

Add layout test coverage.

* fast/media/getStartDate-NaN-expected.txt: Added.
* fast/media/getStartDate-NaN.html: Added.

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

3 years agoSync web-platform-tests up to revision 6d9c836
commit-queue@webkit.org [Fri, 9 Sep 2016 15:42:13 +0000 (15:42 +0000)]
Sync web-platform-tests up to revision 6d9c836
https://bugs.webkit.org/show_bug.cgi?id=161738

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-09
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* resources/ImportExpectations:
* resources/TestRepositories:
* resources/resource-files.json:
* resources/web-platform-tests-modules.json:
* web-platform-tests/2dcontext/transformations/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/w3c-import.log.
* web-platform-tests/IndexedDB/idbindex-multientry-big-expected.txt:
* web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/w3c-import.log: Added.
* web-platform-tests/WebIDL/ecmascript-binding/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/w3c-import.log.
* web-platform-tests/WebIDL/readme.txt: Added.
* web-platform-tests/WebIDL/testable_assertions.txt: Added.
* web-platform-tests/WebIDL/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/appending-to-a-template/w3c-import.log.
* web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt:
* web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub.htm:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/common/canvas-tests.js:
(addCrossOriginYellowImage):
* web-platform-tests/common/get-host-info.sub.js:
(get_host_info):
* web-platform-tests/config.json: Added.
* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/historical.html:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/interfaces.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/DOMImplementation-hasFeature-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-hasFeature.html:
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/w3c-import.log:
* web-platform-tests/dom/nodes/Document-createElementNS-expected.txt:
* web-platform-tests/dom/nodes/Document-createElementNS.html:
* web-platform-tests/dom/nodes/Document-createElementNS.js:
* web-platform-tests/domparsing/w3c-import.log:
* web-platform-tests/fetch/api/basic/mode-same-origin.html:
* web-platform-tests/fetch/api/basic/mode-same-origin.js:
* web-platform-tests/fetch/api/basic/referrer.html:
* web-platform-tests/fetch/api/basic/referrer.js:
(runTest):
* web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:
* web-platform-tests/fetch/api/basic/request-headers.js:
(requestHeaders):
* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-worker.html:
* web-platform-tests/fetch/api/basic/scheme-blob.html:
* web-platform-tests/fetch/api/basic/scheme-blob.js:
(invalidRequestMethods.forEach):
* web-platform-tests/fetch/api/basic/w3c-import.log:
* web-platform-tests/fetch/api/cors/cors-basic.html:
* web-platform-tests/fetch/api/cors/cors-basic.js:
* web-platform-tests/fetch/api/cors/cors-cookies.html:
* web-platform-tests/fetch/api/cors/cors-cookies.js:
* web-platform-tests/fetch/api/cors/cors-no-preflight.html:
* web-platform-tests/fetch/api/cors/cors-no-preflight.js:
* web-platform-tests/fetch/api/cors/cors-origin.html:
* web-platform-tests/fetch/api/cors/cors-origin.js:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.html:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.js:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.html:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.js:
* web-platform-tests/fetch/api/cors/cors-preflight-status.html:
* web-platform-tests/fetch/api/cors/cors-preflight-status.js:
* web-platform-tests/fetch/api/cors/cors-preflight.html:
* web-platform-tests/fetch/api/cors/cors-preflight.js:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.html:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.js:
* web-platform-tests/fetch/api/cors/cors-redirect-preflight.html:
* web-platform-tests/fetch/api/cors/cors-redirect-preflight.js:
* web-platform-tests/fetch/api/cors/cors-redirect.html:
* web-platform-tests/fetch/api/cors/cors-redirect.js:
* web-platform-tests/fetch/api/cors/w3c-import.log:
* web-platform-tests/fetch/api/headers/headers-combine-expected.txt:
* web-platform-tests/fetch/api/headers/headers-combine.html:
* web-platform-tests/fetch/api/redirect/redirect-mode.html:
* web-platform-tests/fetch/api/redirect/redirect-mode.js:
* web-platform-tests/fetch/api/redirect/redirect-origin.html:
* web-platform-tests/fetch/api/redirect/redirect-origin.js:
* web-platform-tests/fetch/api/redirect/w3c-import.log:
* web-platform-tests/fetch/api/request/request-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache.html:
* web-platform-tests/fetch/api/request/request-disturbed.html:
* web-platform-tests/fetch/api/resources/get-host-info.sub.js: Removed.
* web-platform-tests/fetch/api/resources/w3c-import.log:
* web-platform-tests/fetch/api/response/response-init-001.html:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/w3c-import.log:
* web-platform-tests/html/browsers/history/the-history-interface/w3c-import.log:
* web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window-expected.txt: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/frame.html:
* web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log:
* web-platform-tests/html/browsers/origin/cross-origin-objects/win-documentdomain.sub.html:
* web-platform-tests/html/browsers/the-window-object/security-window/window-security.sub.html:
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub-expected.txt:
* web-platform-tests/html/browsers/windows/w3c-import.log:
* web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/010-expected.txt:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-isolate-expected.html:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/refresh.sub.html: Removed.
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/w3c-import.log: Added.
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/w3c-import.log.
* web-platform-tests/html/semantics/embedded-content/the-area-element/area-shape-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-area-element/area-shape.html:
* web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor.html:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change-expected.txt:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/w3c-import.log:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-expected.txt:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/w3c-import.log:
* web-platform-tests/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-pre-element/w3c-import.log:
* web-platform-tests/html/semantics/links/linktypes/alternate-css-expected.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tFoot.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-foster-parenting/template-is-a-foster-parent-element.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-foster-parenting/template-is-not-a-foster-parent-element.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-foster-parenting/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-body-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-frameset-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-head-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-html-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-body.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/template-end-tag-without-start-one.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/end-tag-table.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/appending-to-a-template/template-child-nodes.html:
* web-platform-tests/html/syntax/parsing/template/appending-to-a-template/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context.html:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-context.html:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-row-context.html:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html:
* web-platform-tests/html/syntax/parsing/template/creating-an-element-for-the-token/w3c-import.log:
* web-platform-tests/lint.whitelist:
* web-platform-tests/resource-timing/SyntheticResponse.py:
(main):
* web-platform-tests/resource-timing/resource-timing-expected.txt:
* web-platform-tests/resource-timing/resource-timing.html:
* web-platform-tests/resource-timing/resource-timing.js:
(logResourceEntry): Deleted.
(window.onload): Deleted.
* web-platform-tests/resource-timing/resources/resource_timing_test0.xml:
* web-platform-tests/resource-timing/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log.
* web-platform-tests/resource-timing/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log.
* web-platform-tests/url/interfaces-expected.txt:

LayoutTests:

* platform/wk2/TestExpectations:
* platform/wk2/imported/w3c/web-platform-tests/html/semantics/document-metadata/styling/LinkStyle-expected.txt:

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

3 years agoGardening: fixing a few JSC test failures.
mark.lam@apple.com [Fri, 9 Sep 2016 12:54:12 +0000 (12:54 +0000)]
Gardening: fixing a few JSC test failures.
https://bugs.webkit.org/show_bug.cgi?id=161760

Not reviewed.

Without this fix, the following tests will crash on a null dereference of isGCThread.
    stress/slow-path-generator-updating-current-node-dfg.js.misc-ftl-no-cjit
    stress/unshift-array-storage.js.misc-ftl-no-cjit

* wtf/MainThread.cpp:
(WTF::mayBeGCThread):

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

3 years agoASSERTION FAILED: promise.inherits(JSPromise::info())
commit-queue@webkit.org [Fri, 9 Sep 2016 09:47:55 +0000 (09:47 +0000)]
ASSERTION FAILED: promise.inherits(JSPromise::info())
https://bugs.webkit.org/show_bug.cgi?id=161632
<rdar://problem/28184743>

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-09
Reviewed by Mark Lam.

Source/JavaScriptCore:

* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::create): Returning null if promise object is not created.

Source/WebCore:

Test: fetch/fetch-worker-crash.html

* bindings/js/JSDOMPromise.h:
(WebCore::callPromiseFunction): Returning early if created promise is null.
Passing directly a DeferredWrapper to the generated code.
* bindings/scripts/CodeGeneratorJS.pm: Updated to take a DeferredWrapper.
(GenerateImplementation):
(GenerateReturnParameters):
* bindings/scripts/test/JS/JSTestObj.cpp: Rebasing expectations.
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):

LayoutTests:

* TestExpectations: Reenabling skipped tests.
* fetch/fetch-worker-crash-expected.txt: Added.
* fetch/fetch-worker-crash.html: Added.
* fetch/fetch-worker-crash.js: Added.

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