WebKit-https.git
15 months agoUnreviewed gardening. Update several test expectations.
carlosgc@webkit.org [Mon, 21 May 2018 08:25:27 +0000 (08:25 +0000)]
Unreviewed gardening. Update several test expectations.

* TestExpectations.json:

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

15 months agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.21.2 release.
carlosgc@webkit.org [Mon, 21 May 2018 07:58:14 +0000 (07:58 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.2 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

* gtk/NEWS: Add release notes for 2.21.2.

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

15 months agoUnreviewed, rolling out r222967.
carlosgc@webkit.org [Mon, 21 May 2018 07:14:00 +0000 (07:14 +0000)]
Unreviewed, rolling out r222967.

It's not ready yet

Reverted changeset:

"[GTK][WPE] Add API to configure and enable resource load
statistics"
https://bugs.webkit.org/show_bug.cgi?id=177943
https://trac.webkit.org/changeset/222967

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

15 months ago[GTK] MiniBrowser crashes when loading twice quickly
carlosgc@webkit.org [Mon, 21 May 2018 06:24:52 +0000 (06:24 +0000)]
[GTK] MiniBrowser crashes when loading twice quickly
https://bugs.webkit.org/show_bug.cgi?id=185763

Reviewed by Michael Catanzaro.

This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very
fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we
don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one
leaked, it will crash when scheduled if the window has already been destroyed.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewLoadProgressChanged): Stop any pending reset task when progress != 1.

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

15 months agoRevert the B3 compiler pipeline's treatment of taildup
fpizlo@apple.com [Mon, 21 May 2018 00:51:10 +0000 (00:51 +0000)]
Revert the B3 compiler pipeline's treatment of taildup
https://bugs.webkit.org/show_bug.cgi?id=185808

Reviewed by Yusuke Suzuki.

While trying to implement path specialization (bug 185060), I reorganized the B3 pass pipeline.
But then path specialization turned out to be a negative result. This reverts the pipeline to the
way it was before that work.

1.5% progression on V8Spider-CompileTime.

* b3/B3Generate.cpp:
(JSC::B3::generateToAir):

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

15 months agoUpdate CSSOM WPT tests.
emilio@crisal.io [Sun, 20 May 2018 21:41:06 +0000 (21:41 +0000)]
Update CSSOM WPT tests.
https://bugs.webkit.org/show_bug.cgi?id=185805

LayoutTests/imported/w3c:

They've been moved under the css/ directory.

This has been done with:

  ./Tools/Scripts/import-w3c-tests web-platform-tests/css/cssom
  rm -rf LayoutTests/imported/w3c/web-platform-tests/cssom
  ./Tools/Scripts/run-webkit-tests -t Debug LayoutTests/imported/w3c/web-platform-tests/css/cssom/ --reset-results

And ensuring that the same run without --reset-results also succeeded.

I manually removed entries in import-expectations.json which no longer
correspond to an upstream directory.

Reviewed by Frédéric Wang.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/cssom/CSS-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSS-expected.txt.
* web-platform-tests/css/cssom/CSS.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSS.html.
* web-platform-tests/css/cssom/CSSKeyframeRule-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSKeyframeRule-expected.txt.
* web-platform-tests/css/cssom/CSSKeyframeRule.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSKeyframeRule.html.
* web-platform-tests/css/cssom/CSSKeyframesRule-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSKeyframesRule-expected.txt.
* web-platform-tests/css/cssom/CSSKeyframesRule.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSKeyframesRule.html.
* web-platform-tests/css/cssom/CSSNamespaceRule-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSNamespaceRule-expected.txt.
* web-platform-tests/css/cssom/CSSNamespaceRule.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSNamespaceRule.html.
* web-platform-tests/css/cssom/CSSRuleList-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSRuleList-expected.txt.
* web-platform-tests/css/cssom/CSSRuleList.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSRuleList.html.
* web-platform-tests/css/cssom/CSSStyleRule-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSStyleRule-expected.txt.
* web-platform-tests/css/cssom/CSSStyleRule-set-selectorText-expected.txt: Added.
* web-platform-tests/css/cssom/CSSStyleRule-set-selectorText-namespace-expected.txt: Added.
* web-platform-tests/css/cssom/CSSStyleRule-set-selectorText-namespace.html: Added.
* web-platform-tests/css/cssom/CSSStyleRule-set-selectorText.html: Added.
* web-platform-tests/css/cssom/CSSStyleRule.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSStyleRule.html.
* web-platform-tests/css/cssom/CSSStyleSheet-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSStyleSheet-expected.txt.
* web-platform-tests/css/cssom/CSSStyleSheet.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/CSSStyleSheet.html.
* web-platform-tests/css/cssom/MediaList-expected.txt: Added.
* web-platform-tests/css/cssom/MediaList.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/MediaList.html.
* web-platform-tests/css/cssom/MediaList2-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/MediaList2-expected.txt.
* web-platform-tests/css/cssom/MediaList2.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/MediaList2.xhtml.
* web-platform-tests/css/cssom/OWNERS: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/OWNERS.
* web-platform-tests/css/cssom/StyleSheetList-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/StyleSheetList-expected.txt.
* web-platform-tests/css/cssom/StyleSheetList.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/StyleSheetList.html.
* web-platform-tests/css/cssom/computed-style-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/computed-style-001-expected.txt.
* web-platform-tests/css/cssom/computed-style-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/computed-style-001.html.
* web-platform-tests/css/cssom/computed-style-002-expected.txt: Added.
* web-platform-tests/css/cssom/computed-style-002.html: Added.
* web-platform-tests/css/cssom/computed-style-003-expected.txt: Added.
* web-platform-tests/css/cssom/computed-style-003.html: Added.
* web-platform-tests/css/cssom/computed-style-004-expected.txt: Added.
* web-platform-tests/css/cssom/computed-style-004.html: Added.
* web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Added.
* web-platform-tests/css/cssom/css-style-attr-decl-block.html: Added.
* web-platform-tests/css/cssom/css-style-attribute-modifications-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/css-style-attribute-modifications-expected.txt.
* web-platform-tests/css/cssom/css-style-attribute-modifications.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/css-style-attribute-modifications.html.
* web-platform-tests/css/cssom/css-style-declaration-modifications-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/css-style-declaration-modifications-expected.txt.
* web-platform-tests/css/cssom/css-style-declaration-modifications.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/css-style-declaration-modifications.html.
* web-platform-tests/css/cssom/css-style-reparse-expected.txt: Added.
* web-platform-tests/css/cssom/css-style-reparse.html: Added.
* web-platform-tests/css/cssom/cssimportrule-expected.txt: Added.
* web-platform-tests/css/cssom/cssimportrule.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssimportrule.html.
* web-platform-tests/css/cssom/cssom-cssText-serialize-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-cssText-serialize-expected.txt.
* web-platform-tests/css/cssom/cssom-cssText-serialize.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-cssText-serialize.html.
* web-platform-tests/css/cssom/cssom-cssstyledeclaration-set-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-cssstyledeclaration-set-expected.txt.
* web-platform-tests/css/cssom/cssom-cssstyledeclaration-set.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-cssstyledeclaration-set.html.
* web-platform-tests/css/cssom/cssom-fontfacerule-constructors-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-fontfacerule-constructors-expected.txt.
* web-platform-tests/css/cssom/cssom-fontfacerule-constructors.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-fontfacerule-constructors.html.
* web-platform-tests/css/cssom/cssom-fontfacerule-expected.txt: Added.
* web-platform-tests/css/cssom/cssom-fontfacerule.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-fontfacerule.html.
* web-platform-tests/css/cssom/cssom-ruleTypeAndOrder-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-ruleTypeAndOrder-expected.txt.
* web-platform-tests/css/cssom/cssom-ruleTypeAndOrder.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-ruleTypeAndOrder.html.
* web-platform-tests/css/cssom/cssom-setProperty-shorthand-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt.
* web-platform-tests/css/cssom/cssom-setProperty-shorthand.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssom-setProperty-shorthand.html.
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssstyledeclaration-csstext-expected.txt.
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-final-delimiter-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-final-delimiter.html: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-important-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-csstext-important.html: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-csstext.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssstyledeclaration-csstext.html.
* web-platform-tests/css/cssom/cssstyledeclaration-mutability-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssstyledeclaration-mutability-expected.txt.
* web-platform-tests/css/cssom/cssstyledeclaration-mutability.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/cssstyledeclaration-mutability.html.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-001-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-001.html: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-002-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-002.html: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-003-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-003.html: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-004-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-mutationrecord-004.html: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-setter-order-expected.txt: Added.
* web-platform-tests/css/cssom/cssstyledeclaration-setter-order.html: Added.
* web-platform-tests/css/cssom/escape-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/escape-expected.txt.
* web-platform-tests/css/cssom/escape.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/escape.html.
* web-platform-tests/css/cssom/font-shorthand-serialization-expected.txt: Added.
* web-platform-tests/css/cssom/font-shorthand-serialization.html: Added.
* web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Added.
* web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html: Added.
* web-platform-tests/css/cssom/getComputedStyle-dynamic-subdoc-expected.txt: Added.
* web-platform-tests/css/cssom/getComputedStyle-dynamic-subdoc.html: Added.
* web-platform-tests/css/cssom/getComputedStyle-pseudo-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt.
* web-platform-tests/css/cssom/getComputedStyle-pseudo.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/getComputedStyle-pseudo.html.
* web-platform-tests/css/cssom/historical-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/historical-expected.txt.
* web-platform-tests/css/cssom/historical.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/historical.html.
* web-platform-tests/css/cssom/inline-style-001-expected.txt: Added.
* web-platform-tests/css/cssom/inline-style-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/inline-style-001.html.
* web-platform-tests/css/cssom/insertRule-charset-no-index-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-charset-no-index-expected.txt.
* web-platform-tests/css/cssom/insertRule-charset-no-index.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-charset-no-index.html.
* web-platform-tests/css/cssom/insertRule-import-no-index-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-import-no-index-expected.txt.
* web-platform-tests/css/cssom/insertRule-import-no-index.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-import-no-index.html.
* web-platform-tests/css/cssom/insertRule-namespace-no-index-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-namespace-no-index-expected.txt.
* web-platform-tests/css/cssom/insertRule-namespace-no-index.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-namespace-no-index.html.
* web-platform-tests/css/cssom/insertRule-no-index-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-no-index-expected.txt.
* web-platform-tests/css/cssom/insertRule-no-index.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/insertRule-no-index.html.
* web-platform-tests/css/cssom/insertRule-syntax-error-01-expected.txt: Added.
* web-platform-tests/css/cssom/insertRule-syntax-error-01.html: Added.
* web-platform-tests/css/cssom/interfaces-expected.txt: Added.
* web-platform-tests/css/cssom/interfaces.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/interfaces.html.
* web-platform-tests/css/cssom/medialist-dynamic-001-expected.html: Added.
* web-platform-tests/css/cssom/medialist-dynamic-001.html: Added.
* web-platform-tests/css/cssom/medialist-interfaces-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-001-expected.txt.
* web-platform-tests/css/cssom/medialist-interfaces-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-001.html.
* web-platform-tests/css/cssom/medialist-interfaces-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-002-expected.txt.
* web-platform-tests/css/cssom/medialist-interfaces-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-002.html.
* web-platform-tests/css/cssom/medialist-interfaces-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-003-expected.txt.
* web-platform-tests/css/cssom/medialist-interfaces-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-003.html.
* web-platform-tests/css/cssom/medialist-interfaces-004-expected.txt: Added.
* web-platform-tests/css/cssom/medialist-interfaces-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/medialist-interfaces-004.html.
* web-platform-tests/css/cssom/overflow-serialization-expected.txt: Added.
* web-platform-tests/css/cssom/overflow-serialization.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/overflow-serialization.html.
* web-platform-tests/css/cssom/preferred-stylesheet-order-expected.txt: Added.
* web-platform-tests/css/cssom/preferred-stylesheet-order.html: Added.
* web-platform-tests/css/cssom/preferred-stylesheet-reversed-order-expected.txt: Added.
* web-platform-tests/css/cssom/preferred-stylesheet-reversed-order.html: Added.
* web-platform-tests/css/cssom/selectorSerialize-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/selectorSerialize-expected.txt.
* web-platform-tests/css/cssom/selectorSerialize.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/selectorSerialize.html.
* web-platform-tests/css/cssom/selectorText-modification-restyle-001-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/selectorText-modification-restyle-001-expected.html.
* web-platform-tests/css/cssom/selectorText-modification-restyle-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/selectorText-modification-restyle-001.html.
* web-platform-tests/css/cssom/selectorText-modification-restyle-002-expected.txt: Added.
* web-platform-tests/css/cssom/selectorText-modification-restyle-002.html: Added.
* web-platform-tests/css/cssom/serialization-CSSDeclaration-with-important-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialization-CSSDeclaration-with-important-expected.txt.
* web-platform-tests/css/cssom/serialization-CSSDeclaration-with-important.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialization-CSSDeclaration-with-important.html.
* web-platform-tests/css/cssom/serialize-namespaced-type-selectors-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialize-namespaced-type-selectors-expected.txt.
* web-platform-tests/css/cssom/serialize-namespaced-type-selectors.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialize-namespaced-type-selectors.html.
* web-platform-tests/css/cssom/serialize-values-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialize-values-expected.txt.
* web-platform-tests/css/cssom/serialize-values.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialize-values.html.
* web-platform-tests/css/cssom/serialize-variable-reference-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialize-variable-reference-expected.txt.
* web-platform-tests/css/cssom/serialize-variable-reference.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/serialize-variable-reference.html.
* web-platform-tests/css/cssom/setproperty-null-undefined-expected.txt: Added.
* web-platform-tests/css/cssom/setproperty-null-undefined.html: Added.
* web-platform-tests/css/cssom/shorthand-serialization-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/shorthand-serialization-expected.txt.
* web-platform-tests/css/cssom/shorthand-serialization.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/shorthand-serialization.html.
* web-platform-tests/css/cssom/shorthand-values-expected.txt: Added.
* web-platform-tests/css/cssom/shorthand-values.html: Added.
* web-platform-tests/css/cssom/style-sheet-interfaces-001-expected.txt: Added.
* web-platform-tests/css/cssom/style-sheet-interfaces-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/style-sheet-interfaces-001.html.
* web-platform-tests/css/cssom/style-sheet-interfaces-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/style-sheet-interfaces-002-expected.txt.
* web-platform-tests/css/cssom/style-sheet-interfaces-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/style-sheet-interfaces-002.html.
* web-platform-tests/css/cssom/stylesheet-replacedata-dynamic-expected.html: Added.
* web-platform-tests/css/cssom/stylesheet-replacedata-dynamic.html: Added.
* web-platform-tests/css/cssom/stylesheet-same-origin.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/stylesheet-same-origin.css.
* web-platform-tests/css/cssom/stylesheet-same-origin.sub-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/stylesheet-same-origin.sub-expected.txt.
* web-platform-tests/css/cssom/stylesheet-same-origin.sub.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/stylesheet-same-origin.sub.html.
* web-platform-tests/css/cssom/stylesheet-title-expected.txt: Added.
* web-platform-tests/css/cssom/stylesheet-title.html: Added.
* web-platform-tests/css/cssom/support/1x1-green.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/1x1-green.png.
* web-platform-tests/css/cssom/support/1x1-lime.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/1x1-lime.png.
* web-platform-tests/css/cssom/support/1x1-maroon.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/1x1-maroon.png.
* web-platform-tests/css/cssom/support/1x1-navy.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/1x1-navy.png.
* web-platform-tests/css/cssom/support/1x1-red.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/1x1-red.png.
* web-platform-tests/css/cssom/support/1x1-white.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/1x1-white.png.
* web-platform-tests/css/cssom/support/60x60-gg-rr.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/60x60-gg-rr.png.
* web-platform-tests/css/cssom/support/60x60-green.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/60x60-green.png.
* web-platform-tests/css/cssom/support/60x60-red.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/60x60-red.png.
* web-platform-tests/css/cssom/support/README: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/README.
* web-platform-tests/css/cssom/support/a-green.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/a-green.css.
* web-platform-tests/css/cssom/support/b-green.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/b-green.css.
* web-platform-tests/css/cssom/support/c-red.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/c-red.css.
* web-platform-tests/css/cssom/support/cat.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/cat.png.
* web-platform-tests/css/cssom/support/import-charset.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/import-charset.css.
* web-platform-tests/css/cssom/support/import-green.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/import-green.css.
* web-platform-tests/css/cssom/support/import-red.css: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/import-red.css.
* web-platform-tests/css/cssom/support/pattern-grg-rgr-grg.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/pattern-grg-rgr-grg.png.
* web-platform-tests/css/cssom/support/pattern-grg-rrg-rgg.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/pattern-grg-rrg-rgg.png.
* web-platform-tests/css/cssom/support/pattern-rgr-grg-rgr.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/pattern-rgr-grg-rgr.png.
* web-platform-tests/css/cssom/support/pattern-tr.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/pattern-tr.png.
* web-platform-tests/css/cssom/support/ruler-h-50%.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/ruler-h-50%.png.
* web-platform-tests/css/cssom/support/ruler-h-50px.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/ruler-h-50px.png.
* web-platform-tests/css/cssom/support/ruler-v-100px.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/ruler-v-100px.png.
* web-platform-tests/css/cssom/support/ruler-v-50px.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/ruler-v-50px.png.
* web-platform-tests/css/cssom/support/square-purple.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/square-purple.png.
* web-platform-tests/css/cssom/support/square-teal.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/square-teal.png.
* web-platform-tests/css/cssom/support/square-white.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/square-white.png.
* web-platform-tests/css/cssom/support/support/README: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/support/README.
* web-platform-tests/css/cssom/support/support/swatch-green.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/support/swatch-green.png.
* web-platform-tests/css/cssom/support/support/swatch-red.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/support/swatch-red.png.
* web-platform-tests/css/cssom/support/support/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/support/w3c-import.log.
* web-platform-tests/css/cssom/support/swatch-blue.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-blue.png.
* web-platform-tests/css/cssom/support/swatch-green.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-green.png.
* web-platform-tests/css/cssom/support/swatch-lime.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-lime.png.
* web-platform-tests/css/cssom/support/swatch-orange.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-orange.png.
* web-platform-tests/css/cssom/support/swatch-red.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-red.png.
* web-platform-tests/css/cssom/support/swatch-teal.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-teal.png.
* web-platform-tests/css/cssom/support/swatch-white.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-white.png.
* web-platform-tests/css/cssom/support/swatch-yellow.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/swatch-yellow.png.
* web-platform-tests/css/cssom/support/test-bl.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/test-bl.png.
* web-platform-tests/css/cssom/support/test-br.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/test-br.png.
* web-platform-tests/css/cssom/support/test-inner-half-size.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/test-inner-half-size.png.
* web-platform-tests/css/cssom/support/test-outer.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/test-outer.png.
* web-platform-tests/css/cssom/support/test-tl.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/test-tl.png.
* web-platform-tests/css/cssom/support/test-tr.png: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/test-tr.png.
* web-platform-tests/css/cssom/support/w3c-import.log: Added.
* web-platform-tests/css/cssom/support/xmlss-pi.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/support/xmlss-pi.xhtml.
* web-platform-tests/css/cssom/ttwf-cssom-doc-ext-load-count-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/ttwf-cssom-doc-ext-load-count-expected.txt.
* web-platform-tests/css/cssom/ttwf-cssom-doc-ext-load-count.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/ttwf-cssom-doc-ext-load-count.html.
* web-platform-tests/css/cssom/ttwf-cssom-doc-ext-load-tree-order-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/ttwf-cssom-doc-ext-load-tree-order-expected.txt.
* web-platform-tests/css/cssom/ttwf-cssom-doc-ext-load-tree-order.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/ttwf-cssom-doc-ext-load-tree-order.html.
* web-platform-tests/css/cssom/ttwf-cssom-document-extension-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/ttwf-cssom-document-extension-expected.txt.
* web-platform-tests/css/cssom/ttwf-cssom-document-extension.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/ttwf-cssom-document-extension.html.
* web-platform-tests/css/cssom/variable-names-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/variable-names-expected.txt.
* web-platform-tests/css/cssom/variable-names.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/cssom/variable-names.html.
* web-platform-tests/css/cssom/w3c-import.log: Added.
* web-platform-tests/cssom/GetBoundingRect-expected.txt: Removed.
* web-platform-tests/cssom/GetBoundingRect.html: Removed.
* web-platform-tests/cssom/MediaList-expected.txt: Removed.
* web-platform-tests/cssom/cssimportrule-expected.txt: Removed.
* web-platform-tests/cssom/cssom-fontfacerule-expected.txt: Removed.
* web-platform-tests/cssom/index-001-expected.txt: Removed.
* web-platform-tests/cssom/index-001.html: Removed.
* web-platform-tests/cssom/index-002-expected.txt: Removed.
* web-platform-tests/cssom/index-002.html: Removed.
* web-platform-tests/cssom/inline-style-001-expected.txt: Removed.
* web-platform-tests/cssom/interfaces-expected.txt: Removed.
* web-platform-tests/cssom/medialist-interfaces-004-expected.txt: Removed.
* web-platform-tests/cssom/overflow-serialization-expected.txt: Removed.
* web-platform-tests/cssom/style-sheet-interfaces-001-expected.txt: Removed.
* web-platform-tests/cssom/support/w3c-import.log: Removed.
* web-platform-tests/cssom/w3c-import.log: Removed.

LayoutTests:

Reviewed by Frédéric Wang.

Update CSSOM WPT tests.

* TestExpectations:

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

15 months agoFix the !ENABLE(DFG_JIT) build.
aestes@apple.com [Sun, 20 May 2018 21:11:26 +0000 (21:11 +0000)]
Fix the !ENABLE(DFG_JIT) build.

* bytecode/InstanceOfStatus.cpp:
(JSC::InstanceOfStatus::computeFor):

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

15 months ago[DFG] CheckTypeInfoFlags should say `eliminated` if it is removed in constant folding...
utatane.tea@gmail.com [Sun, 20 May 2018 10:49:20 +0000 (10:49 +0000)]
[DFG] CheckTypeInfoFlags should say `eliminated` if it is removed in constant folding phase
https://bugs.webkit.org/show_bug.cgi?id=185802

Reviewed by Saam Barati.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):

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

15 months agoImprove NowPlaying "title"
eric.carlson@apple.com [Sat, 19 May 2018 23:07:38 +0000 (23:07 +0000)]
Improve NowPlaying "title"
https://bugs.webkit.org/show_bug.cgi?id=185680
<rdar://problem/40296700>

Reviewed by Dean Jackson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and
topPrivatelyControlledDomain when possible to make the host name more readable.

* platform/PublicSuffix.h:
* platform/mac/PublicSuffixMac.mm:
(WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions.

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

15 months agoDFG should inline InstanceOf ICs
fpizlo@apple.com [Sat, 19 May 2018 22:00:21 +0000 (22:00 +0000)]
DFG should inline InstanceOf ICs
https://bugs.webkit.org/show_bug.cgi?id=185695

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

This teaches the DFG how to inline InstanceOf ICs into a MatchStructure node. This can then
be folded to a CheckStructure + JSConstant.

In the process of testing this, I found a bug where LICM was not hoisting things that
depended on ExtraOSREntryLocal because that might return SpecEmpty. I fixed that by teaching
LICM how to materialize CheckNotEmpty on demand whenever !HoistingFailed.

This is a ~5% speed-up on boyer.

~2x speed-up on the instanceof-always-hit-one, instanceof-always-hit-two, and
instanceof-sometimes-hit microbenchmarks.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::appendVariant):
(JSC::GetByIdStatus::filter):
* bytecode/GetByIdStatus.h:
(JSC::GetByIdStatus::operator bool const):
(JSC::GetByIdStatus::operator! const): Deleted.
* bytecode/GetByIdVariant.h:
(JSC::GetByIdVariant::operator bool const):
(JSC::GetByIdVariant::operator! const): Deleted.
* bytecode/ICStatusUtils.h: Added.
(JSC::appendICStatusVariant):
(JSC::filterICStatusVariants):
* bytecode/InstanceOfStatus.cpp: Added.
(JSC::InstanceOfStatus::appendVariant):
(JSC::InstanceOfStatus::computeFor):
(JSC::InstanceOfStatus::computeForStubInfo):
(JSC::InstanceOfStatus::commonPrototype const):
(JSC::InstanceOfStatus::filter):
* bytecode/InstanceOfStatus.h: Added.
(JSC::InstanceOfStatus::InstanceOfStatus):
(JSC::InstanceOfStatus::state const):
(JSC::InstanceOfStatus::isSet const):
(JSC::InstanceOfStatus::operator bool const):
(JSC::InstanceOfStatus::isSimple const):
(JSC::InstanceOfStatus::takesSlowPath const):
(JSC::InstanceOfStatus::numVariants const):
(JSC::InstanceOfStatus::variants const):
(JSC::InstanceOfStatus::at const):
(JSC::InstanceOfStatus::operator[] const):
* bytecode/InstanceOfVariant.cpp: Added.
(JSC::InstanceOfVariant::InstanceOfVariant):
(JSC::InstanceOfVariant::attemptToMerge):
(JSC::InstanceOfVariant::dump const):
(JSC::InstanceOfVariant::dumpInContext const):
* bytecode/InstanceOfVariant.h: Added.
(JSC::InstanceOfVariant::InstanceOfVariant):
(JSC::InstanceOfVariant::operator bool const):
(JSC::InstanceOfVariant::structureSet const):
(JSC::InstanceOfVariant::structureSet):
(JSC::InstanceOfVariant::conditionSet const):
(JSC::InstanceOfVariant::prototype const):
(JSC::InstanceOfVariant::isHit const):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::StructureStubInfo):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::remove):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasMatchStructureData):
(JSC::DFG::Node::matchStructureData):
* dfg/DFGNodeType.h:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileMatchStructure):
* 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::compileMatchStructure):

Source/WTF:

I found myself needing a way to represent bottom/false/true/top, so I created it.

* WTF.xcodeproj/project.pbxproj:
* wtf/BooleanLattice.h: Added.
(WTF::lubBooleanLattice):
(WTF::printInternal):
* wtf/CMakeLists.txt:

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

15 months agoFlaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies
sihui_liu@apple.com [Sat, 19 May 2018 20:57:02 +0000 (20:57 +0000)]
Flaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies
https://bugs.webkit.org/show_bug.cgi?id=185624
<rdar://problem/39111626>

Reviewed by Chris Dumez.

Modified expectation to make test more robust as cookies can be returned in different orders.

* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

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

15 months ago[JSC] JSC should have consistent InById IC
utatane.tea@gmail.com [Sat, 19 May 2018 20:21:30 +0000 (20:21 +0000)]
[JSC] JSC should have consistent InById IC
https://bugs.webkit.org/show_bug.cgi?id=185682

Reviewed by Filip Pizlo.

JSTests:

* stress/in-by-id-accessors.js: Added.
(shouldBe):
(test):
(protoGetter.__proto__.get hello):
(protoSetter.__proto__.set hello):
(i.shouldBe.test.get hello):
(i.shouldBe.test.set hello):
* stress/in-by-id-ai.js: Added.
(shouldBe):
(test):
* stress/in-by-id-custom-accessors.js: Added.
(shouldBe):
(test1):
(test2):
* stress/in-by-id-custom-values.js: Added.
(shouldBe):
(test):
* stress/in-by-id-operation.js: Added.
(shouldBe):
(test):
(selfCache):
* stress/in-by-id-proxy.js: Added.
(shouldBe):
(test):
(handler.has):

Source/JavaScriptCore:

Current our op_in IC is adhoc: It is only emitted in DFG and FTL layers,
when we found that DFG::In's parameter is constant string. We should
align this IC to the other ById ICs to clean up and remove adhoc code
in DFG and FTL.

This patch cleans up our "In" IC by aligning it to the other ById ICs.
We split op_in bytecode to op_in_by_id and op_in_by_val. op_in_by_val
is the same to the original op_in. For op_in_by_id, we use JITInByIdGenerator
to emit InById IC code. In addition, our JITInByIdGenerator and op_in_by_id
has a inline access cache for own property case, which is the same to
JITGetByIdGenerator.

And we split DFG::In to DFG::InById and DFG::InByVal. InByVal is the same
to the original In DFG node. DFG AI attempts to lower InByVal to InById
if AI figured out that the property name is a constant string. And in
InById node, we use JITInByIdGenerator code.

This patch cleans up DFG and FTL's adhoc In IC code.

In a subsequent patch, we should introduce InByIdStatus to optimize
InById in DFG and FTL. We would like to have a new InByIdStatus instead of
reusing GetByIdStatus since GetByIdStatus becomes too complicated, and
AccessCase::Types are different from them (AccessCase::InHit / InMiss).

* bytecode/AccessCase.cpp:
(JSC::AccessCase::fromStructureStubInfo):
(JSC::AccessCase::generateWithGuard):
* bytecode/BytecodeDumper.cpp:
(JSC::BytecodeDumper<Block>::printInByIdCacheStatus):
(JSC::BytecodeDumper<Block>::dumpBytecode):
* bytecode/BytecodeDumper.h:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/InlineAccess.cpp:
(JSC::InlineAccess::generateSelfInAccess):
* bytecode/InlineAccess.h:
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::deref):
(JSC::StructureStubInfo::aboutToDie):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::propagateTransitions):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::patchableJump):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitInByVal):
(JSC::BytecodeGenerator::emitInById):
(JSC::BytecodeGenerator::emitIn): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::InNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addInById):
(JSC::DFG::InRecord::InRecord): Deleted.
(JSC::DFG::JITCompiler::addIn): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToInById):
(JSC::DFG::Node::hasIdentifier):
(JSC::DFG::Node::hasArrayMode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInById):
(JSC::DFG::SpeculativeJIT::compileInByVal):
(JSC::DFG::SpeculativeJIT::compileIn): Deleted.
* 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::compileInByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileInById):
(JSC::FTL::DFG::LowerDFGToB3::compileIn): Deleted.
* jit/ICStats.h:
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):
* jit/JIT.h:
* jit/JITInlineCacheGenerator.cpp:
(JSC::JITInByIdGenerator::JITInByIdGenerator):
(JSC::JITInByIdGenerator::generateFastPath):
* jit/JITInlineCacheGenerator.h:
(JSC::JITInByIdGenerator::JITInByIdGenerator):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
* jit/Repatch.cpp:
(JSC::tryCacheInByID):
(JSC::repatchInByID):
(JSC::resetInByID):
(JSC::tryCacheIn): Deleted.
(JSC::repatchIn): Deleted.
(JSC::resetIn): Deleted.
* jit/Repatch.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* parser/NodeConstructors.h:
(JSC::InNode::InNode):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opInByVal):
(JSC::CommonSlowPaths::opIn): Deleted.

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

15 months agoUnreviewed, rolling out r231996.
commit-queue@webkit.org [Sat, 19 May 2018 15:12:29 +0000 (15:12 +0000)]
Unreviewed, rolling out r231996.
https://bugs.webkit.org/show_bug.cgi?id=185799

 Broke the GTK build (Requested by eric_carlson on #webkit).

Reverted changeset:

"Improve NowPlaying "title""
https://bugs.webkit.org/show_bug.cgi?id=185680
https://trac.webkit.org/changeset/231996

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

15 months agoImprove NowPlaying "title"
eric.carlson@apple.com [Sat, 19 May 2018 04:22:03 +0000 (04:22 +0000)]
Improve NowPlaying "title"
https://bugs.webkit.org/show_bug.cgi?id=185680
<rdar://problem/40296700>

Reviewed by Dean Jackson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaSessionTitle const): Use decodeHostName and
topPrivatelyControlledDomain when possible to make the host name more readable.

* platform/PublicSuffix.h:
* platform/mac/PublicSuffixMac.mm:
(WebCore::decodeHostName): Expose topPrivatelyControlledDomain method to .cpp functions.

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

15 months agoCannot unset transition with important
commit-queue@webkit.org [Sat, 19 May 2018 04:05:06 +0000 (04:05 +0000)]
Cannot unset transition with important
https://bugs.webkit.org/show_bug.cgi?id=177684

Patch by Rob Buis <rbuis@igalia.com> on 2018-05-18
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Import manually the updated test and result.

* web-platform-tests/cssom/cssom-setProperty-shorthand-expected.txt:
* web-platform-tests/cssom/cssom-setProperty-shorthand.html:

Source/WebCore:

Make removeProperty remove the property regardless
if it was set using !important [1].

The new behavior is consistent with Firefox, Chrome and Edge.

[1] https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty

Test: web-platform-tests/cssom/cssom-setProperty-shorthand.html

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::removePropertiesInSet):

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

15 months agoUnreviewed, rolling out r231982.
commit-queue@webkit.org [Sat, 19 May 2018 00:08:24 +0000 (00:08 +0000)]
Unreviewed, rolling out r231982.
https://bugs.webkit.org/show_bug.cgi?id=185793

Caused layout test failures (Requested by realdawei on
#webkit).

Reverted changeset:

"Complete fix for enabling modern EME by default"
https://bugs.webkit.org/show_bug.cgi?id=185770
https://trac.webkit.org/changeset/231982

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

15 months agoHandle failure to extend sandbox gracefully
eric.carlson@apple.com [Fri, 18 May 2018 23:32:36 +0000 (23:32 +0000)]
Handle failure to extend sandbox gracefully
https://bugs.webkit.org/show_bug.cgi?id=185779
<rdar://problem/40316349>

Unreviewed, fix test results.

* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
(TEST_F):

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

15 months ago[Cocoa] Add missing nullability annotations to _WKAutomationSessionDelegate
bburg@apple.com [Fri, 18 May 2018 23:17:57 +0000 (23:17 +0000)]
[Cocoa] Add missing nullability annotations to _WKAutomationSessionDelegate
https://bugs.webkit.org/show_bug.cgi?id=185791
<rdar://problem/40279891>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: If there is no dialog shown,
then the delegate methods to return the dialog text may return a nil NSString.

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

15 months agoop_in should mark if it sees out of bounds accesses
keith_miller@apple.com [Fri, 18 May 2018 23:16:09 +0000 (23:16 +0000)]
op_in should mark if it sees out of bounds accesses
https://bugs.webkit.org/show_bug.cgi?id=185792

Reviewed by Filip Pizlo.

JSTests:

* stress/has-indexed-property-array-storage-ftl.js:
(test2):
* stress/has-indexed-property-slow-put-array-storage-ftl.js:
(test2):

Source/JavaScriptCore:

This would used to cause us to OSR loop since we would always speculate
we were in bounds in HasIndexedProperty.

* bytecode/ArrayProfile.cpp:
(JSC::ArrayProfile::observeIndexedRead):
* bytecode/ArrayProfile.h:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opIn):

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

15 months agoNetworkLoadChecker should cancel its content extension retrieval task when being...
youenn@apple.com [Fri, 18 May 2018 23:02:38 +0000 (23:02 +0000)]
NetworkLoadChecker should cancel its content extension retrieval task when being destroyed
https://bugs.webkit.org/show_bug.cgi?id=185661
<rdar://problem/39985509>

Reviewed by Chris Dumez.

Source/WebKit:

Make sure that the Content Extension retrieval callback checks that NetworkLoadChecker is alive.
This allows stopping NetworkLoadChecker be ref counted.
This in turns allows NetworkResourceLoader to delete its NetworkLoadChecker when being deleted as well.
By doing so, we simplify the memory management of NetworkResourceLoader and NetworkLoadChecker.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::checkRequest):
(WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):
* NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::weakPtrFactory):
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
* NetworkProcess/PingLoad.h:

LayoutTests:

* http/tests/contentextensions/crash-xhr-expected.txt: Added.
* http/tests/contentextensions/crash-xhr.html: Added.
* http/tests/contentextensions/crash-xhr.html.json: Added.

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

15 months agoWebProcess fails to launch
pvollan@apple.com [Fri, 18 May 2018 22:28:09 +0000 (22:28 +0000)]
WebProcess fails to launch
https://bugs.webkit.org/show_bug.cgi?id=185140

Reviewed by Geoffrey Garen.

If the NSApplication runloop is not used in the WebContent process, launchServicesCheckIn() needs to be called
in order for enableSandboxStyleFileQuarantine() to succeed. Determine at runtime if launchServicesCheckIn()
should be called by checking if the NSApplication event loop is running.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeProcess):

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

15 months agoAdd missing exception check.
mark.lam@apple.com [Fri, 18 May 2018 21:46:13 +0000 (21:46 +0000)]
Add missing exception check.
https://bugs.webkit.org/show_bug.cgi?id=185786
<rdar://problem/35686560>

Reviewed by Michael Saboff.

JSTests:

* stress/regress-185786.js: Added.

Source/JavaScriptCore:

* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):

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

15 months agoComplete fix for enabling modern EME by default
jer.noble@apple.com [Fri, 18 May 2018 21:29:27 +0000 (21:29 +0000)]
Complete fix for enabling modern EME by default
https://bugs.webkit.org/show_bug.cgi?id=185770
<rdar://problem/40368220>

Reviewed by Eric Carlson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

* platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:

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

15 months agoWeb Inspector: Canvas: put `hasVisualEffect` behind an experimental setting
webkit@devinrousso.com [Fri, 18 May 2018 21:05:08 +0000 (21:05 +0000)]
Web Inspector: Canvas: put `hasVisualEffect` behind an experimental setting
https://bugs.webkit.org/show_bug.cgi?id=185758

Reviewed by Matt Baker.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Base/Setting.js:

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction.prototype.process):

* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement.prototype.onattach):

* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createExperimentalSettingsView):

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

15 months agoConvert ProcessPrivilege assertions to regular debug-only assertions
bfulgham@apple.com [Fri, 18 May 2018 20:20:35 +0000 (20:20 +0000)]
Convert ProcessPrivilege assertions to regular debug-only assertions
https://bugs.webkit.org/show_bug.cgi?id=185775
<rdar://problem/40372286>

Reviewed by Geoffrey Garen.

In Bug 184322 I added a number of RELEASE_ASSERT checks that certain
UI-only calls were not being made in the WebContent process.

Measurements have shown that these RELEASE_ASSERTs have regressed performance
by around 1% on some benchmarks, so we should convert them to normal asserts.

This patch changes the RELEASE_ASSERTs into ASSERTs.

Source/WebCore:

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage):
* platform/mac/PlatformScreenMac.mm:
(WebCore::displayID):
(WebCore::firstScreen):
(WebCore::window):
(WebCore::screen):
(WebCore::getScreenProperties):
(WebCore::screenIsMonochrome):

Source/WebKit:

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::becomeFirstResponder):
(WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
(WebKit::WebViewImpl::validateUserInterfaceItem):
(WebKit::WebViewImpl::startSpeaking):
(WebKit::WebViewImpl::stopSpeaking):
(WebKit::applicationFlagsForDrag):
(WebKit::WebViewImpl::doneWithKeyEvent):
* UIProcess/Gamepad/mac/UIGamepadProviderMac.mm:
(WebKit::UIGamepadProvider::platformWebPageProxyForGamepadInput):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::enterFullscreen):
(WebKit::PluginProcessProxy::beginModal):
(WebKit::PluginProcessProxy::endModal):
* UIProcess/mac/DisplayLink.cpp:
(WebKit::DisplayLink::DisplayLink):
(WebKit::DisplayLink::~DisplayLink):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getIsSpeaking):
(WebKit::WebPageProxy::speak):
(WebKit::WebPageProxy::stopSpeaking):
(WebKit::WebPageProxy::startDisplayLink):
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):

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

15 months agoHandle failure to extend sandbox gracefully
eric.carlson@apple.com [Fri, 18 May 2018 20:13:34 +0000 (20:13 +0000)]
Handle failure to extend sandbox gracefully
https://bugs.webkit.org/show_bug.cgi?id=185779
<rdar://problem/40316349>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::deny): Include the error string in the promise rejection.
* Modules/mediastream/UserMediaRequest.h:

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _denyNextUserMediaRequest]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Don't append
the request to m_grantedRequests if it failed.
(WebKit::UserMediaPermissionRequestManagerProxy::grantAccess): Deny request if willCreateMediaStream
fails.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::willCreateMediaStream): Don't try to extend sandbox if
we fail to allocate all necessary handles.
* UIProcess/UserMediaProcessManager.h:
(WebKit::UserMediaProcessManager::denyNextUserMediaRequest): New, for testing.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: Added.
(-[SimulateFailedSandboxMessageHandler userContentController:didReceiveScriptMessage:]):
(-[SimulateFailedSandboxUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[SimulateFailedSandboxUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureSimulateFailedSandbox::SetUp):
(MediaCaptureSimulateFailedSandbox::loadTestAndWaitForMessage):
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/disableGetUserMedia.html:

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

15 months ago"debug-safari --ios-simulator" creates lldb target to launch Mac Safari
dbates@webkit.org [Fri, 18 May 2018 19:33:35 +0000 (19:33 +0000)]
"debug-safari --ios-simulator" creates lldb target to launch Mac Safari
https://bugs.webkit.org/show_bug.cgi?id=185774

Reviewed by Andy Estes.

For now, the script debug-safari is not supported for WebKit for iOS. To
fix this we differentiate between the Apple Mac port and Apple embedded
ports.

* Scripts/webkitdirs.pm:
(safariPath): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(isAppleMacWebKit): Added.
(isAppleCocoaWebKit): Write in terms of isAppleMacWebKit() and isEmbeddedWebKit().
(launcherName): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(mobileSafariBundle): Substitute isIOSWebKit() for isAppleCocoaWebKit().
(debugSafari): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(runSafari): Ditto.
(runMiniBrowser): Ditto.
(debugMiniBrowser): Ditto.
(runWebKitTestRunner): Ditto.
(debugWebKitTestRunner): Ditto.

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

15 months ago[Web Animations] Turn Web Animations with CSS integration on for test runners
graouts@webkit.org [Fri, 18 May 2018 19:01:00 +0000 (19:01 +0000)]
[Web Animations] Turn Web Animations with CSS integration on for test runners
https://bugs.webkit.org/show_bug.cgi?id=184819
<rdar://problem/39597337>

Unreviewed. Rolling out the patch for this bug, it caused some flaky timeouts for animation suspension tests.

LayoutTests/imported/mozilla:

* css-animations/test_animation-cancel.html:
* css-animations/test_animation-computed-timing.html:
* css-animations/test_animation-currenttime.html:
* css-animations/test_animation-finish.html:
* css-animations/test_animation-finished.html:
* css-animations/test_animation-id.html:
* css-animations/test_animation-pausing.html:
* css-animations/test_animation-playstate.html:
* css-animations/test_animation-ready.html:
* css-animations/test_animation-reverse.html:
* css-animations/test_animation-starttime.html:
* css-animations/test_animations-dynamic-changes.html:
* css-animations/test_cssanimation-animationname.html:
* css-animations/test_document-get-animations.html:
* css-animations/test_effect-target.html:
* css-animations/test_element-get-animations.html:
* css-animations/test_event-dispatch.html:
* css-animations/test_event-order.html:
* css-animations/test_keyframeeffect-getkeyframes.html:
* css-animations/test_pseudoElement-get-animations.html:
* css-animations/test_setting-effect.html:
* css-transitions/test_animation-cancel.html:
* css-transitions/test_animation-computed-timing.html:
* css-transitions/test_animation-currenttime.html:
* css-transitions/test_animation-finished.html:
* css-transitions/test_animation-pausing.html:
* css-transitions/test_animation-ready.html:
* css-transitions/test_animation-starttime.html:
* css-transitions/test_csstransition-transitionproperty.html:
* css-transitions/test_document-get-animations.html:
* css-transitions/test_effect-target.html:
* css-transitions/test_element-get-animations.html:
* css-transitions/test_event-dispatch.html:
* css-transitions/test_keyframeeffect-getkeyframes.html:
* css-transitions/test_pseudoElement-get-animations.html:
* css-transitions/test_setting-effect.html:

LayoutTests/imported/w3c:

* web-platform-tests/css-timing-1/frames-timing-functions-output.html:
* web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html:

Source/WebCore:

Tests: animations/animation-internals-api-multiple-keyframes.html
       animations/animation-internals-api.html
       transitions/transition-drt-api-delay.html
       transitions/transition-drt-api.html

* dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::clearHostElement):
* page/FrameView.cpp:
(WebCore::FrameView::didDestroyRenderTree):
* page/RuntimeEnabledFeatures.h:
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):

Source/WebKit:

* Shared/WebPreferences.yaml:

Tools:

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
(shouldOverrideAndDisableWebAnimationsCSSIntegrationPreference): Deleted.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::TestOptions):
(WTR::isLegacyAnimationEngineTestPath): Deleted.
* WebKitTestRunner/TestOptions.h:

LayoutTests:

* TestExpectations:
* animations/3d/matrix-transform-type-animation.html:
* animations/3d/replace-filling-transform.html:
* animations/3d/transform-origin-vs-functions.html:
* animations/3d/transform-perspective.html:
* animations/additive-transform-animations.html:
* animations/animation-border-overflow.html:
* animations/animation-callback-timestamp.html:
* animations/animation-controller-drt-api.html:
* animations/animation-direction-alternate-reverse-expected.txt:
* animations/animation-direction-alternate-reverse.html:
* animations/animation-direction-reverse-fill-mode-hardware.html:
* animations/animation-direction-reverse-hardware-opacity.html:
* animations/animation-direction-reverse-hardware.html:
* animations/animation-direction-reverse-non-hardware.html:
* animations/animation-direction-reverse-timing-functions-hardware.html:
* animations/animation-direction-reverse-timing-functions.html:
* animations/animation-direction.html:
* animations/animation-followed-by-transition.html:
* animations/animation-hit-test-transform.html:
* animations/animation-hit-test.html:
* animations/animation-internals-api-expected.txt: Added.
* animations/animation-internals-api-multiple-keyframes-expected.txt: Added.
* animations/animation-internals-api-multiple-keyframes.html: Added.
* animations/animation-internals-api.html: Added.
* animations/animation-offscreen-to-onscreen.html:
* animations/big-rotation-expected.txt:
* animations/big-rotation.html:
* animations/change-completed-animation-transform.html:
* animations/change-keyframes.html:
* animations/combo-transform-rotate+scale.html:
* animations/cross-fade-background-image.html:
* animations/cross-fade-border-image-source.html:
* animations/cross-fade-list-style-image.html:
* animations/cross-fade-webkit-mask-box-image.html:
* animations/duplicate-keys-expected.html:
* animations/duplicate-keys.html:
* animations/duplicated-keyframes-name.html:
* animations/fill-forwards-end-state.html:
* animations/fill-mode-forwards-zero-duration-expected.txt:
* animations/fill-mode-forwards-zero-duration.html:
* animations/font-variations/font-stretch.html:
* animations/font-variations/font-style.html:
* animations/font-variations/font-variation-settings-order.html:
* animations/font-variations/font-variation-settings-unlike.html:
* animations/font-variations/font-variation-settings.html:
* animations/font-variations/font-weight.html:
* animations/generic-from-to.html:
* animations/import.html:
* animations/keyframe-multiple-timing-functions-transform.html:
* animations/keyframe-timing-functions-transform.html:
* animations/keyframe-timing-functions.html:
* animations/keyframe-timing-functions2.html:
* animations/keyframes-comma-separated.html:
* animations/keyframes-dynamic.html:
* animations/keyframes-infinite-iterations.html:
* animations/keyframes-invalid-keys.html:
* animations/keyframes-out-of-order.html:
* animations/keyframes.html:
* animations/lineheight-animation.html:
* animations/longhand-timing-function.html:
* animations/matrix-anim.html:
* animations/missing-from-to-transforms.html:
* animations/missing-from-to.html:
* animations/missing-keyframe-properties-repeating.html:
* animations/missing-keyframe-properties-timing-function.html:
* animations/missing-keyframe-properties.html:
* animations/missing-values-first-keyframe.html:
* animations/missing-values-last-keyframe.html:
* animations/multiple-animations-timing-function.html:
* animations/multiple-animations.html:
* animations/multiple-keyframes.html:
* animations/negative-delay.html:
* animations/pause-crash.html:
* animations/play-state-start-paused.html:
* animations/simultaneous-start-left.html:
* animations/simultaneous-start-transform.html:
* animations/spring-function.html:
* animations/stacking-context-unchanged-while-running.html:
* animations/timing-functions.html:
* animations/transition-and-animation-1.html:
* animations/transition-and-animation-2.html:
* animations/transition-and-animation-3.html:
* animations/unanimated-style.html:
* animations/unprefixed-keyframes.html:
* animations/width-using-ems.html:
* compositing/animation/animated-composited-inside-hidden.html:
* compositing/animation/computed-style-during-delay.html:
* compositing/animation/layer-for-filling-animation.html:
* compositing/backing/backface-visibility-flip.html:
* compositing/contents-scale/animating.html:
* compositing/layer-creation/animation-overlap-with-children.html:
* compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html:
* compositing/layer-creation/multiple-keyframes-animation-overlap.html:
* compositing/layer-creation/overlap-animation-clipping.html:
* compositing/layer-creation/overlap-animation-container.html:
* compositing/layer-creation/overlap-animation.html:
* compositing/layer-creation/scale-rotation-animation-overlap.html:
* compositing/layer-creation/translate-animation-overlap.html:
* compositing/layer-creation/translate-scale-animation-overlap.html:
* compositing/overflow/overflow-positioning.html:
* compositing/reflections/animation-inside-reflection.html:
* compositing/reflections/nested-reflection-animated.html:
* compositing/reflections/nested-reflection-transition.html:
* compositing/transitions/scale-transition-no-start.html:
* compositing/transitions/singular-scale-transition.html:
* compositing/visible-rect/animated.html:
* css3/calc/transitions-dependent.html:
* css3/calc/transitions.html:
* css3/filters/backdrop/animation.html:
* css3/filters/composited-during-animation.html:
* css3/filters/filter-animation-from-none-hw.html:
* css3/filters/filter-animation-from-none-multi-hw.html:
* css3/filters/filter-animation-from-none-multi.html:
* css3/filters/filter-animation-from-none.html:
* css3/filters/filter-animation-hw.html:
* css3/filters/filter-animation-multi-hw.html:
* css3/filters/filter-animation-multi.html:
* css3/filters/filter-animation.html:
* css3/masking/clip-path-animation.html:
* fast/animation/css-animation-resuming-when-visible-with-style-change.html:
* fast/animation/css-animation-resuming-when-visible.html:
* fast/animation/css-animation-throttling-lowPowerMode.html:
* fast/css-generated-content/pseudo-animation.html:
* fast/css-generated-content/pseudo-transition.html:
* fast/filter-image/filter-image-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html:
* imported/blink/transitions/unprefixed-transform.html:
* platform/ios/TestExpectations:
* platform/win/TestExpectations:
* transitions/background-position-transitions.html:
* transitions/background-transitions.html:
* transitions/blendmode-transitions.html:
* transitions/border-radius-transition.html:
* transitions/clip-path-path-transitions.html:
* transitions/clip-path-transitions.html:
* transitions/clip-transition.html:
* transitions/color-transition-all.html:
* transitions/color-transition-premultiplied.html:
* transitions/color-transition-rounding.html:
* transitions/cross-fade-background-image.html:
* transitions/cross-fade-border-image.html:
* transitions/cubic-bezier-overflow-color.html:
* transitions/cubic-bezier-overflow-length.html:
* transitions/cubic-bezier-overflow-shadow.html:
* transitions/cubic-bezier-overflow-svg-length.html:
* transitions/cubic-bezier-overflow-transform.html:
* transitions/default-timing-function.html:
* transitions/delay.html:
* transitions/flex-transitions.html:
* transitions/font-family-during-transition.html:
* transitions/frames-timing-function.html:
* transitions/interrupted-all-transition.html:
* transitions/longhand-vs-shorthand-initial.html:
* transitions/mask-transitions.html:
* transitions/min-max-width-height-transitions.html:
* transitions/mismatched-shadow-styles.html:
* transitions/mismatched-shadow-transitions.html:
* transitions/mixed-type.html:
* transitions/move-after-transition.html:
* transitions/multiple-background-size-transitions.html:
* transitions/multiple-background-transitions.html:
* transitions/multiple-mask-transitions.html:
* transitions/multiple-shadow-transitions.html:
* transitions/negative-delay.html:
* transitions/opacity-transition-zindex.html:
* transitions/remove-transition-style.html:
* transitions/shape-outside-transitions.html:
* transitions/shorthand-border-transitions.html:
* transitions/shorthand-transitions.html:
* transitions/steps-timing-function.html:
* transitions/svg-layout-transition.html:
* transitions/svg-text-shadow-transition.html:
* transitions/svg-transitions.html:
* transitions/text-indent-transition.html:
* transitions/transform-op-list-match.html:
* transitions/transform-op-list-no-match.html:
* transitions/transition-drt-api-delay-expected.txt: Added.
* transitions/transition-drt-api-delay.html: Added.
* transitions/transition-drt-api-expected.txt: Added.
* transitions/transition-drt-api.html: Added.
* transitions/transition-end-event-rendering.html:
* transitions/transition-hit-test-transform.html:
* transitions/transition-hit-test.html:
* transitions/transition-in-delay-phase.html:
* transitions/transition-on-element-with-content.html:
* transitions/transition-shorthand-delay.html:
* transitions/transition-timing-function.html:
* transitions/transition-to-from-auto.html:
* transitions/transition-to-from-undefined.html:
* transitions/visited-link-color.html:
* transitions/zero-duration-in-list.html:
* transitions/zero-duration-with-non-zero-delay-end.html:
* transitions/zero-duration-with-non-zero-delay-start.html:
* webanimations/css-animations.html:
* webanimations/css-transitions.html:

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

15 months agoUnreviewed, fix exception checking, part 2
utatane.tea@gmail.com [Fri, 18 May 2018 18:55:35 +0000 (18:55 +0000)]
Unreviewed, fix exception checking, part 2
https://bugs.webkit.org/show_bug.cgi?id=185350

* dfg/DFGOperations.cpp:
(JSC::DFG::putByValInternal):
* jit/JITOperations.cpp:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::putDirectAccessorWithReify):

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

15 months ago[Curl] Bug fix on suspend/resume behavior.
commit-queue@webkit.org [Fri, 18 May 2018 18:28:37 +0000 (18:28 +0000)]
[Curl] Bug fix on suspend/resume behavior.
https://bugs.webkit.org/show_bug.cgi?id=183089

The flag was not set correctly. Also wrong method was called.

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-05-18
Reviewed by Youenn Fablet.

Source/WebCore:

Enable loader tests to cover this case.

* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::cancel): Remove unnecessary cleanup. Use runXXX method.
(WebCore::CurlRequest::suspend): Added cancel check.
(WebCore::CurlRequest::resume): Ditto.
(WebCore::CurlRequest::callClient): Use runXXX method. Change to move semantics.
(WebCore::runOnMainThread): Added.
(WebCore::CurlRequest::runOnWorkerThreadIfRequired): Added.
(WebCore::CurlRequest::setupTransfer): Bug fix. Call setRequestPaused directly.
(WebCore::CurlRequest::didReceiveData): Add state flag update.
(WebCore::CurlRequest::invokeDidReceiveResponseForFile): Use runXXX to simplify.
(WebCore::CurlRequest::completeDidReceiveResponse): Ditto.
(WebCore::CurlRequest::setRequestPaused): Protect state change by mutex.
(WebCore::CurlRequest::setCallbackPaused): Ditto.
(WebCore::CurlRequest::invokeCancel): Added.
(WebCore::CurlRequest::pausedStatusChanged): Use runXXX to simplify.
(WebCore::CurlRequest::updateHandlePauseState): Accessor for m_isHandlePaused.
(WebCore::CurlRequest::isHandlePaused const): Ditto.
* platform/network/curl/CurlRequest.h: Add mutex and paused state.
(WebCore::CurlRequest::shouldBePaused const): Rename from isPaused.
(WebCore::CurlRequest::isPaused const): Deleted.

LayoutTests:

* platform/wincairo/TestExpectations: Enable loader/ tests for WinCairo.

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

15 months ago[Extra zoom mode] Clearing text fields should dispatch input events of type "deleteCo...
wenson_hsieh@apple.com [Fri, 18 May 2018 18:23:45 +0000 (18:23 +0000)]
[Extra zoom mode] Clearing text fields should dispatch input events of type "deleteContent"
https://bugs.webkit.org/show_bug.cgi?id=185769
<rdar://problem/40368261>

Reviewed by Tim Horton.

Source/WebKit:

When setting the text of the currently focused element to the empty string, just delete the text instead of
pretending to insert an empty string. This mimics deleting content using the delete key on macOS, and fires an
input event with inputType "deleteContent" instead of "insertText".

Test: fast/forms/extrazoom/delete-content-in-text-field.html

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setTextAsync):

LayoutTests:

Adds a new test to inspect the input events dispatched as a result of inserting and deleting text in a form
control. The inputTypes should be "insertText" and "deleteContent", respectively; the data values should be the
inserted string and null, respectively.

* fast/forms/extrazoom/delete-content-in-text-field-expected.txt: Added.
* fast/forms/extrazoom/delete-content-in-text-field.html: Added.

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

15 months agoRenamed "trackNetworkActivity" to "tracksResourceLoadMilestones"
krollin@apple.com [Fri, 18 May 2018 18:17:28 +0000 (18:17 +0000)]
Renamed "trackNetworkActivity" to "tracksResourceLoadMilestones"
https://bugs.webkit.org/show_bug.cgi?id=185523
<rdar://problem/40136361>

Reviewed by Geoffrey Garen.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::networkActivityTrackingEnabled):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::tracksResourceLoadMilestones const):
(WebKit::NetworkProcess::trackNetworkActivity const): Deleted.
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationTracksResourceLoadMilestones):
(WKContextConfigurationSetTracksResourceLoadMilestones):
(WKContextConfigurationTrackNetworkActivity): Deleted.
(WKContextConfigurationSetTrackNetworkActivity): Deleted.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration tracksResourceLoadMilestones]):
(-[_WKProcessPoolConfiguration setTracksResourceLoadMilestones:]):
(-[_WKProcessPoolConfiguration trackNetworkActivity]): Deleted.
(-[_WKProcessPoolConfiguration setTrackNetworkActivity:]): Deleted.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

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

15 months agoLayout Test http/wpt/service-workers/header-filtering.https.html is a flaky failure
youenn@apple.com [Fri, 18 May 2018 17:58:53 +0000 (17:58 +0000)]
Layout Test http/wpt/service-workers/header-filtering.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184469
<rdar://problem/39428226>

Unreviewed.

* platform/mac-wk2/TestExpectations: Removed flaky expectation that was added back inadvertently.

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

15 months ago[Win][MiniBrowser] Create MainWindow even in transparent mode
Hironori.Fujii@sony.com [Fri, 18 May 2018 17:36:26 +0000 (17:36 +0000)]
[Win][MiniBrowser] Create MainWindow even in transparent mode
https://bugs.webkit.org/show_bug.cgi?id=185597

Reviewed by Per Arne Vollan.

The current implementations doesn't create the MainWindow in
transparent mode. The screenshot is in Bug 58300.

There were three problems:
- Can't control the WebView. ie. going backward and forward.
- Can't quit the program.
- It makes implementation complicated.

* MiniBrowser/win/Common.cpp (resizeSubViews): Resize sub views
even in the transparent mode.
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Create the main window even in the transparent mode.

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

15 months agoAvoid keeping the frame alive when ref'ing a WindowProxy
cdumez@apple.com [Fri, 18 May 2018 17:34:19 +0000 (17:34 +0000)]
Avoid keeping the frame alive when ref'ing a WindowProxy
https://bugs.webkit.org/show_bug.cgi?id=185737
<rdar://problem/40004666>

Reviewed by Sam Weinig.

Source/WebCore:

Avoid keeping the frame alive when ref'ing a WindowProxy by making WindowProxy
manage its own refcount (instead of proxying refcounting to the Frame). As a
result, a WindowProxy can now be detached from its Frame. When detached, it
return null when asked for a JSWindowProxy.

It is important to not extend the lifetime of the Frame because we want script
to stop running when the Page gets destroyed.

* bindings/js/JSWindowProxy.cpp:
(WebCore::toJS):
(WebCore::toJSWindowProxy):
* bindings/js/JSWindowProxy.h:
(WebCore::toJSWindowProxy):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::setupModuleScriptHandlers):
(WebCore::ScriptController::jsWindowProxy):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::globalObject):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::windowScriptObject):
* bindings/js/ScriptState.cpp:
(WebCore::mainWorldExecState):
* bindings/js/WindowProxy.cpp:
(WebCore::WindowProxy::WindowProxy):
(WebCore::WindowProxy::~WindowProxy):
(WebCore::WindowProxy::detachFromFrame):
(WebCore::WindowProxy::createJSWindowProxy):
(WebCore::WindowProxy::globalObject):
(WebCore::WindowProxy::createJSWindowProxyWithInitializedScript):
(WebCore::WindowProxy::setDOMWindow):
(WebCore::WindowProxy::window const):
(WebCore::WindowProxy::ref): Deleted.
(WebCore::WindowProxy::deref): Deleted.
* bindings/js/WindowProxy.h:
(WebCore::WindowProxy::create):
(WebCore::WindowProxy::frame const):
(WebCore::WindowProxy::jsWindowProxy):
* dom/DocumentTouch.cpp:
(WebCore::DocumentTouch::createTouch):
* page/AbstractFrame.cpp:
(WebCore::AbstractFrame::AbstractFrame):
(WebCore::AbstractFrame::~AbstractFrame):
* page/AbstractFrame.h:

Source/WebKit:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):

Source/WebKitLegacy/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::getWindowNPObject):

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

15 months ago[iOS] Password fields obscure the text with rectangles instead of circles
mmaxfield@apple.com [Fri, 18 May 2018 17:31:46 +0000 (17:31 +0000)]
[iOS] Password fields obscure the text with rectangles instead of circles
https://bugs.webkit.org/show_bug.cgi?id=185760
<rdar://problem/38644697>

Reviewed by Zalan Bujtas.

Source/WebCore:

Password fields are obscured by drawing U+25CF BLACK CIRCLE. On iOS, we have custom handling
for this character. However, this custom handling is unnecessary and isn't present on macOS.
Instead, we should simply unify the password obscuring codepath between iOS and macOS.

Test: fast/text/black-circle.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::requiresCustomFallbackFont):
(WebCore::FontCache::getCustomFallbackFont):

LayoutTests:

* fast/text/black-circle-expected.html: Added.
* fast/text/black-circle.html: Added.

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

15 months agoJSC should have InstanceOf inline caching
fpizlo@apple.com [Fri, 18 May 2018 17:29:56 +0000 (17:29 +0000)]
JSC should have InstanceOf inline caching
https://bugs.webkit.org/show_bug.cgi?id=185652

Reviewed by Saam Barati.
JSTests:

* microbenchmarks/instanceof-always-hit-one.js: Added.
* microbenchmarks/instanceof-always-hit-two.js: Added.
* microbenchmarks/instanceof-dynamic.js: Added.
* microbenchmarks/instanceof-sometimes-hit.js: Added.
* stress/instanceof-dynamic-proxy-check-structure.js: Added.
* stress/instanceof-dynamic-proxy-loop.js: Added.
* stress/instanceof-dynamic-proxy.js: Added.
* stress/instanceof-hit-one-object-then-another.js: Added.
* stress/instanceof-hit-two-objects-then-another.js: Added.
* stress/instanceof-prototype-change.js: Added.
* stress/instanceof-prototype-change-to-hit.js: Added.
* stress/instanceof-prototype-change-to-null.js: Added.
* stress/instanceof-prototype-change-watchpointable.js: Added.

Source/JavaScriptCore:

This adds a polymorphic inline cache for instanceof. It caches hits and misses. It uses the
existing PolymorphicAccess IC machinery along with all of its heuristics. If we ever generate
too many cases, we emit the generic instanceof implementation instead.

All of the JIT tiers use the same InstanceOf IC. It uses the existing JITInlineCacheGenerator
abstraction.

This is a ~40% speed-up on instanceof microbenchmarks. It's a *tiny* (~1%) speed-up on
Octane/boyer. I think I can make that speed-up bigger by inlining the inline cache.

* API/tests/testapi.mm:
(testObjectiveCAPIMain):
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* b3/B3Effects.h:
(JSC::B3::Effects::forReadOnlyCall):
* bytecode/AccessCase.cpp:
(JSC::AccessCase::guardedByStructureCheck const):
(JSC::AccessCase::canReplace const):
(JSC::AccessCase::visitWeak const):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):
* bytecode/AccessCase.h:
* bytecode/InstanceOfAccessCase.cpp: Added.
(JSC::InstanceOfAccessCase::create):
(JSC::InstanceOfAccessCase::dumpImpl const):
(JSC::InstanceOfAccessCase::clone const):
(JSC::InstanceOfAccessCase::~InstanceOfAccessCase):
(JSC::InstanceOfAccessCase::InstanceOfAccessCase):
* bytecode/InstanceOfAccessCase.h: Added.
(JSC::InstanceOfAccessCase::prototype const):
* bytecode/ObjectPropertyCondition.h:
(JSC::ObjectPropertyCondition::hasPrototypeWithoutBarrier):
(JSC::ObjectPropertyCondition::hasPrototype):
* bytecode/ObjectPropertyConditionSet.cpp:
(JSC::generateConditionsForInstanceOf):
* bytecode/ObjectPropertyConditionSet.h:
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::addCases):
(JSC::PolymorphicAccess::regenerate):
(WTF::printInternal):
* bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::dumpInContext const):
(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
(JSC::PropertyCondition::validityRequiresImpurePropertyWatchpoint const):
(WTF::printInternal):
* bytecode/PropertyCondition.h:
(JSC::PropertyCondition::absenceWithoutBarrier):
(JSC::PropertyCondition::absenceOfSetEffectWithoutBarrier):
(JSC::PropertyCondition::hasPrototypeWithoutBarrier):
(JSC::PropertyCondition::hasPrototype):
(JSC::PropertyCondition::hasPrototype const):
(JSC::PropertyCondition::prototype const):
(JSC::PropertyCondition::hash const):
(JSC::PropertyCondition::operator== const):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::reset):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGInlineCacheWrapper.h:
* dfg/DFGInlineCacheWrapperInlines.h:
(JSC::DFG::InlineCacheWrapper<GeneratorType>::finalize):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addInstanceOf):
* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::usedRegisters):
(JSC::DFG::SpeculativeJIT::compileInstanceOfForCells):
(JSC::DFG::SpeculativeJIT::compileInstanceOf):
(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject): Deleted.
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileAssertNotEmpty):
(JSC::FTL::DFG::LowerDFGToB3::compilePutById):
(JSC::FTL::DFG::LowerDFGToB3::compileNumberIsInteger):
(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::getById):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):
* jit/ICStats.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):
* jit/JIT.h:
* jit/JITInlineCacheGenerator.cpp:
(JSC::JITInlineCacheGenerator::JITInlineCacheGenerator):
(JSC::JITInlineCacheGenerator::finalize):
(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITByIdGenerator::finalize):
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITInstanceOfGenerator::finalize):
* jit/JITInlineCacheGenerator.h:
(JSC::JITInlineCacheGenerator::reportSlowPathCall):
(JSC::JITInlineCacheGenerator::slowPathBegin const):
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator):
(JSC::finalizeInlineCaches):
(JSC::JITByIdGenerator::reportSlowPathCall): Deleted.
(JSC::JITByIdGenerator::slowPathBegin const): Deleted.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByValWithCachedId):
* jit/RegisterSet.cpp:
(JSC::RegisterSet::stubUnavailableRegisters):
* jit/Repatch.cpp:
(JSC::tryCacheIn):
(JSC::tryCacheInstanceOf):
(JSC::repatchInstanceOf):
(JSC::resetPatchableJump):
(JSC::resetIn):
(JSC::resetInstanceOf):
* jit/Repatch.h:
* runtime/Options.h:
* runtime/Structure.h:

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

15 months agoFix the ENABLE(EXTRA_ZOOM_MODE) build.
aestes@apple.com [Fri, 18 May 2018 17:13:08 +0000 (17:13 +0000)]
Fix the ENABLE(EXTRA_ZOOM_MODE) build.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):

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

15 months agoUnreviewed, rolling out r231935.
cdumez@apple.com [Fri, 18 May 2018 17:03:56 +0000 (17:03 +0000)]
Unreviewed, rolling out r231935.

Caused an accessibility test to fail

Reverted changeset:

"RenderLayer::scrollRectToVisible() should not propagate a
subframe's scroll to its cross-origin parent"
https://bugs.webkit.org/show_bug.cgi?id=185664
https://trac.webkit.org/changeset/231935

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

15 months ago[LFC] Implement height computation for non-replaced floating elements.
zalan@apple.com [Fri, 18 May 2018 16:32:14 +0000 (16:32 +0000)]
[LFC] Implement height computation for non-replaced floating elements.
https://bugs.webkit.org/show_bug.cgi?id=185767

Reviewed by Antti Koivisto.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeFloatingHeight const):
(WebCore::Layout::FormattingContext::computeFloatingNonReplacedHeight const):
(WebCore::Layout::FormattingContext::contentHeightForFormattingContextRoot const):
* layout/FormattingContext.h:

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

15 months agoUnreviewed, fix exception checking
utatane.tea@gmail.com [Fri, 18 May 2018 16:15:50 +0000 (16:15 +0000)]
Unreviewed, fix exception checking
https://bugs.webkit.org/show_bug.cgi?id=185350

* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::putDirectWithReify):
(JSC::CommonSlowPaths::putDirectAccessorWithReify):

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

15 months ago-Wmemset-elt-size warning in LibWebRTCSocket constructor
youenn@apple.com [Fri, 18 May 2018 16:08:09 +0000 (16:08 +0000)]
-Wmemset-elt-size warning in LibWebRTCSocket constructor
https://bugs.webkit.org/show_bug.cgi?id=185555
<rdar://problem/40217250>

Reviewed by Darin Adler.

GetOption implementation was broken in that it was not initializing properly its array of options.
This patch fixes it by using an array of optional<int> which are initialized by default.
When no value is set, we return the error code -1.
In theory, we should go to NetworkProcess to get the actual value.
Since GetOption is not used in practice, we just do this best effort implementation of storing previously set values.

* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::LibWebRTCSocket):
(WebKit::LibWebRTCSocket::GetOption):
* WebProcess/Network/webrtc/LibWebRTCSocket.h:

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

15 months agoMake all SVG shape interfaces inherit from SVGGeometryElement
krit@webkit.org [Fri, 18 May 2018 15:22:55 +0000 (15:22 +0000)]
Make all SVG shape interfaces inherit from SVGGeometryElement
https://bugs.webkit.org/show_bug.cgi?id=185600

Reviewed by Antti Koivisto.

Source/WebCore:

Make all SVG shape interfaces inherit from SVGGeometryElement
as defined by SVG2:

https://svgwg.org/svg2-draft/shapes.html#DOMInterfaces

Tests: svg/dom/SVGGeometry-circle.xhtml
       svg/dom/SVGGeometry-ellipse.xhtml
       svg/dom/SVGGeometry-line.xhtml
       svg/dom/SVGGeometry-polygon.xhtml
       svg/dom/SVGGeometry-polyline.xhtml
       svg/dom/SVGGeometry-rect.xhtml

* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::getTotalLength const): Added shape
        independent implementation for all methods defined
        by SVGGeometryElement interface. Calculations are
        based on the Path object created and referenced by
        RenderSVGShape.
(WebCore::RenderSVGShape::getPointAtLength const):
* rendering/svg/RenderSVGShape.h:
* svg/SVGCircleElement.cpp:
        Repeating pattern: Change inheritance from
        SVGGraphicsElement to SVGGeometryElement.
(WebCore::SVGCircleElement::SVGCircleElement):
* svg/SVGCircleElement.h:
* svg/SVGCircleElement.idl:
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::SVGEllipseElement):
* svg/SVGEllipseElement.h:
* svg/SVGEllipseElement.idl:
* svg/SVGGeometryElement.cpp:
(WebCore::SVGGeometryElement::getTotalLength const):
(WebCore::SVGGeometryElement::getPointAtLength const):
* svg/SVGGeometryElement.h:
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::SVGLineElement):
* svg/SVGLineElement.h:
* svg/SVGLineElement.idl:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::SVGPolyElement):
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::SVGRectElement):
* svg/SVGRectElement.h:
* svg/SVGRectElement.idl:

LayoutTests:

Update test for inheritance of SVG shape interfaces (more passes).
Add individual tests for SVGGeometryElement interfaces for each
SVG shape. There already are more detailed tests for the methods
and the SVGPathElement interface.

* svg/dom/SVGGeometry-circle-expected.txt: Added.
* svg/dom/SVGGeometry-circle.xhtml: Added.
* svg/dom/SVGGeometry-ellipse-expected.txt: Added.
* svg/dom/SVGGeometry-ellipse.xhtml: Added.
* svg/dom/SVGGeometry-line-expected.txt: Added.
* svg/dom/SVGGeometry-line.xhtml: Added.
* svg/dom/SVGGeometry-polygon-expected.txt: Added.
* svg/dom/SVGGeometry-polygon.xhtml: Added.
* svg/dom/SVGGeometry-polyline-expected.txt: Added.
* svg/dom/SVGGeometry-polyline.xhtml: Added.
* svg/dom/SVGGeometry-rect-expected.txt: Added.
* svg/dom/SVGGeometry-rect.xhtml: Added.
* svg/dom/svg2-inheritance-expected.txt:

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

15 months ago[LFC] Implement height computation for replaced elements.
zalan@apple.com [Fri, 18 May 2018 14:31:02 +0000 (14:31 +0000)]
[LFC] Implement height computation for replaced elements.
https://bugs.webkit.org/show_bug.cgi?id=185756

Reviewed by Antti Koivisto.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeHeight const):
(WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
(WebCore::Layout::FormattingContext::computeFloatingHeight const):
(WebCore::Layout::FormattingContext::computeReplacedHeight const):
(WebCore::Layout::FormattingContext::computeReplacedWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowReplacedHeight const):
* layout/FormattingContext.h:

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

15 months ago[LFC] Implement width computation for non-replaced floating elements.
zalan@apple.com [Fri, 18 May 2018 14:30:44 +0000 (14:30 +0000)]
[LFC] Implement width computation for non-replaced floating elements.
https://bugs.webkit.org/show_bug.cgi?id=185759

Reviewed by Antti Koivisto.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeFloatingWidth const):
(WebCore::Layout::FormattingContext::computeFloatingNonReplacedWidth const):
* layout/FormattingContext.h:

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

15 months agoThe test fast/images/animated-image-mp4-crash.html is failing on Windows.
pvollan@apple.com [Fri, 18 May 2018 14:15:04 +0000 (14:15 +0000)]
The test fast/images/animated-image-mp4-crash.html is failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=185765

Unreviewed test gardening.

* platform/win/TestExpectations:

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

15 months ago[modern-media-controls] AirPlaySupport should be disabled by default
graouts@webkit.org [Fri, 18 May 2018 14:08:45 +0000 (14:08 +0000)]
[modern-media-controls] AirPlaySupport should be disabled by default
https://bugs.webkit.org/show_bug.cgi?id=185658
<rdar://problem/40272213>

Reviewed by Simon Fraser.

Source/WebCore:

We now only enable AirplaySupport if the controls are visible to the user _and_ media has played.

Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html

* Modules/modern-media-controls/media/airplay-support.js:
(AirplaySupport.prototype.enable):
(AirplaySupport.prototype.controlsUserVisibilityDidChange):
(AirplaySupport.prototype._shouldBeEnabled):
(AirplaySupport):

LayoutTests:

Add a new test that checks that we create an AirplaySupport object only after media has started playing.
We also modify a couple of existing tests so they are no longer flaky, as a first pass of this patch
revealed some flakiness.

* media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play-expected.txt: Added.
* media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html: Added.
* media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt:
* media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
* media/modern-media-controls/volume-support/volume-support-click-expected.txt:
* media/modern-media-controls/volume-support/volume-support-click.html:

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

15 months agoStop softlinking QuickLook when loading from client-registered schemes
timothy_horton@apple.com [Fri, 18 May 2018 08:11:17 +0000 (08:11 +0000)]
Stop softlinking QuickLook when loading from client-registered schemes
https://bugs.webkit.org/show_bug.cgi?id=185716
<rdar://problem/40303227>

Reviewed by Dan Bernstein.

No new tests, just a performance improvement.

* dom/Document.cpp:
* platform/SchemeRegistry.cpp:
* platform/ios/QuickLook.h:
* platform/ios/QuickLook.mm:
(WebCore::isQuickLookPreviewURL):
(WebCore::QLPreviewProtocol): Deleted.
Hard-code the QuickLook preview URL scheme, instead of loading the QuickLook
framework to retrieve it. It will never change, and just in case it does,
add an ASSERT (which does load QuickLook) so that we'll find out.

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

15 months ago[Web Animations] Turn Web Animations with CSS integration on for test runners
graouts@webkit.org [Fri, 18 May 2018 08:06:57 +0000 (08:06 +0000)]
[Web Animations] Turn Web Animations with CSS integration on for test runners
https://bugs.webkit.org/show_bug.cgi?id=184819
<rdar://problem/39597337>

Reviewed by Jon Lee.

LayoutTests/imported/mozilla:

Since Web Animations with CSS integration is on by default on test runners, we no longer need
the special HTML comment to turn the flag on for select tests.

* css-animations/test_animation-cancel.html:
* css-animations/test_animation-computed-timing.html:
* css-animations/test_animation-currenttime.html:
* css-animations/test_animation-finish.html:
* css-animations/test_animation-finished.html:
* css-animations/test_animation-id.html:
* css-animations/test_animation-pausing.html:
* css-animations/test_animation-playstate.html:
* css-animations/test_animation-ready.html:
* css-animations/test_animation-reverse.html:
* css-animations/test_animation-starttime.html:
* css-animations/test_animations-dynamic-changes.html:
* css-animations/test_cssanimation-animationname.html:
* css-animations/test_document-get-animations.html:
* css-animations/test_effect-target.html:
* css-animations/test_element-get-animations.html:
* css-animations/test_event-dispatch.html:
* css-animations/test_event-order.html:
* css-animations/test_keyframeeffect-getkeyframes.html:
* css-animations/test_pseudoElement-get-animations.html:
* css-animations/test_setting-effect.html:
* css-transitions/test_animation-cancel.html:
* css-transitions/test_animation-computed-timing.html:
* css-transitions/test_animation-currenttime.html:
* css-transitions/test_animation-finished.html:
* css-transitions/test_animation-pausing.html:
* css-transitions/test_animation-ready.html:
* css-transitions/test_animation-starttime.html:
* css-transitions/test_csstransition-transitionproperty.html:
* css-transitions/test_document-get-animations.html:
* css-transitions/test_effect-target.html:
* css-transitions/test_element-get-animations.html:
* css-transitions/test_event-dispatch.html:
* css-transitions/test_keyframeeffect-getkeyframes.html:
* css-transitions/test_pseudoElement-get-animations.html:
* css-transitions/test_setting-effect.html:

LayoutTests/imported/w3c:

Since Web Animations with CSS integration is on by default on test runners, we no longer need
the special HTML comment to turn the flag on for select tests.

* web-platform-tests/css-timing-1/frames-timing-functions-output.html:
* web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html:

Source/WebCore:

We ensure we always call into both CSSAnimationController::cancelAnimations() and
AnimationTimeline::cancelDeclarativeAnimationsForElement() since we want teardown of animations
to be performed no matter which animation code path is used. What that in mind, we don't
conditionalize the CSSAnimationController-related ASSERT() in FrameView::didDestroyRenderTree().

* dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::clearHostElement):
* page/FrameView.cpp:
(WebCore::FrameView::didDestroyRenderTree):
* page/RuntimeEnabledFeatures.h:
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):

Source/WebKit:

* Shared/WebPreferences.yaml: Leave Web Animations off by default, it's up to clients
to turn it on.

Tools:

Make the test runners turn both the main Web Animations flag and the Web Animations CSS
integration flag on.

We also remove the ability to toggle the Web Animations CSS integration flag using an HTML
comment directly at the top of the file since test runners now set the flag on by default
and a dedicated directory exists for tests that need to run with this flag off.

* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(shouldOverrideAndDisableWebAnimationsCSSIntegrationPreference):
(runTest):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.cpp:
(WTR::isLegacyAnimationEngineTestPath):
(WTR::TestOptions::TestOptions):
* WebKitTestRunner/TestOptions.h:

LayoutTests:

Since Web Animations with CSS integration is on by default on test runners, we no longer need
the special HTML comment to turn the flag on for select tests.

* TestExpectations:
* animations/3d/matrix-transform-type-animation.html:
* animations/3d/replace-filling-transform.html:
* animations/3d/transform-origin-vs-functions.html:
* animations/3d/transform-perspective.html:
* animations/additive-transform-animations.html:
* animations/animation-border-overflow.html:
* animations/animation-callback-timestamp.html:
* animations/animation-controller-drt-api.html:
* animations/animation-direction-alternate-reverse-expected.txt:
* animations/animation-direction-alternate-reverse.html:
* animations/animation-direction-reverse-fill-mode-hardware.html:
* animations/animation-direction-reverse-hardware-opacity.html:
* animations/animation-direction-reverse-hardware.html:
* animations/animation-direction-reverse-non-hardware.html:
* animations/animation-direction-reverse-timing-functions-hardware.html:
* animations/animation-direction-reverse-timing-functions.html:
* animations/animation-direction.html:
* animations/animation-followed-by-transition.html:
* animations/animation-hit-test-transform.html:
* animations/animation-hit-test.html:
* animations/animation-internals-api-expected.txt: Removed.
* animations/animation-internals-api-multiple-keyframes-expected.txt: Removed.
* animations/animation-internals-api-multiple-keyframes.html: Removed.
* animations/animation-internals-api.html: Removed.
* animations/animation-offscreen-to-onscreen.html:
* animations/big-rotation-expected.txt:
* animations/big-rotation.html:
* animations/change-completed-animation-transform.html:
* animations/change-keyframes.html:
* animations/combo-transform-rotate+scale.html:
* animations/cross-fade-background-image.html:
* animations/cross-fade-border-image-source.html:
* animations/cross-fade-list-style-image.html:
* animations/cross-fade-webkit-mask-box-image.html:
* animations/duplicate-keys-expected.html:
* animations/duplicate-keys.html:
* animations/duplicated-keyframes-name.html:
* animations/fill-forwards-end-state.html:
* animations/fill-mode-forwards-zero-duration-expected.txt:
* animations/fill-mode-forwards-zero-duration.html:
* animations/font-variations/font-stretch.html:
* animations/font-variations/font-style.html:
* animations/font-variations/font-variation-settings-order.html:
* animations/font-variations/font-variation-settings-unlike.html:
* animations/font-variations/font-variation-settings.html:
* animations/font-variations/font-weight.html:
* animations/generic-from-to.html:
* animations/import.html:
* animations/keyframe-multiple-timing-functions-transform.html:
* animations/keyframe-timing-functions-transform.html:
* animations/keyframe-timing-functions.html:
* animations/keyframe-timing-functions2.html:
* animations/keyframes-comma-separated.html:
* animations/keyframes-dynamic.html:
* animations/keyframes-infinite-iterations.html:
* animations/keyframes-invalid-keys.html:
* animations/keyframes-out-of-order.html:
* animations/keyframes.html:
* animations/lineheight-animation.html:
* animations/longhand-timing-function.html:
* animations/matrix-anim.html:
* animations/missing-from-to-transforms.html:
* animations/missing-from-to.html:
* animations/missing-keyframe-properties-repeating.html:
* animations/missing-keyframe-properties-timing-function.html:
* animations/missing-keyframe-properties.html:
* animations/missing-values-first-keyframe.html:
* animations/missing-values-last-keyframe.html:
* animations/multiple-animations-timing-function.html:
* animations/multiple-animations.html:
* animations/multiple-keyframes.html:
* animations/negative-delay.html:
* animations/pause-crash.html:
* animations/play-state-start-paused.html:
* animations/simultaneous-start-left.html:
* animations/simultaneous-start-transform.html:
* animations/spring-function.html:
* animations/stacking-context-unchanged-while-running.html:
* animations/timing-functions.html:
* animations/transition-and-animation-1.html:
* animations/transition-and-animation-2.html:
* animations/transition-and-animation-3.html:
* animations/unanimated-style.html:
* animations/unprefixed-keyframes.html:
* animations/width-using-ems.html:
* compositing/animation/animated-composited-inside-hidden.html:
* compositing/animation/computed-style-during-delay.html:
* compositing/animation/layer-for-filling-animation.html:
* compositing/backing/backface-visibility-flip.html:
* compositing/contents-scale/animating.html:
* compositing/layer-creation/animation-overlap-with-children.html:
* compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html:
* compositing/layer-creation/multiple-keyframes-animation-overlap.html:
* compositing/layer-creation/overlap-animation-clipping.html:
* compositing/layer-creation/overlap-animation-container.html:
* compositing/layer-creation/overlap-animation.html:
* compositing/layer-creation/scale-rotation-animation-overlap.html:
* compositing/layer-creation/translate-animation-overlap.html:
* compositing/layer-creation/translate-scale-animation-overlap.html:
* compositing/overflow/overflow-positioning.html:
* compositing/reflections/animation-inside-reflection.html:
* compositing/reflections/nested-reflection-animated.html:
* compositing/reflections/nested-reflection-transition.html:
* compositing/transitions/scale-transition-no-start.html:
* compositing/transitions/singular-scale-transition.html:
* compositing/visible-rect/animated.html:
* css3/calc/transitions-dependent.html:
* css3/calc/transitions.html:
* css3/filters/backdrop/animation.html:
* css3/filters/composited-during-animation.html:
* css3/filters/filter-animation-from-none-hw.html:
* css3/filters/filter-animation-from-none-multi-hw.html:
* css3/filters/filter-animation-from-none-multi.html:
* css3/filters/filter-animation-from-none.html:
* css3/filters/filter-animation-hw.html:
* css3/filters/filter-animation-multi-hw.html:
* css3/filters/filter-animation-multi.html:
* css3/filters/filter-animation.html:
* css3/masking/clip-path-animation.html:
* fast/animation/css-animation-resuming-when-visible-with-style-change.html:
* fast/animation/css-animation-resuming-when-visible.html:
* fast/animation/css-animation-throttling-lowPowerMode.html:
* fast/css-generated-content/pseudo-animation.html:
* fast/css-generated-content/pseudo-transition.html:
* fast/filter-image/filter-image-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-shape-image-threshold-animation.html:
* fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html:
* imported/blink/transitions/unprefixed-transform.html:
* platform/ios/TestExpectations:
* platform/win/TestExpectations:
* transitions/background-position-transitions.html:
* transitions/background-transitions.html:
* transitions/blendmode-transitions.html:
* transitions/border-radius-transition.html:
* transitions/clip-path-path-transitions.html:
* transitions/clip-path-transitions.html:
* transitions/clip-transition.html:
* transitions/color-transition-all.html:
* transitions/color-transition-premultiplied.html:
* transitions/color-transition-rounding.html:
* transitions/cross-fade-background-image.html:
* transitions/cross-fade-border-image.html:
* transitions/cubic-bezier-overflow-color.html:
* transitions/cubic-bezier-overflow-length.html:
* transitions/cubic-bezier-overflow-shadow.html:
* transitions/cubic-bezier-overflow-svg-length.html:
* transitions/cubic-bezier-overflow-transform.html:
* transitions/default-timing-function.html:
* transitions/delay.html:
* transitions/flex-transitions.html:
* transitions/font-family-during-transition.html:
* transitions/frames-timing-function.html:
* transitions/interrupted-all-transition.html:
* transitions/longhand-vs-shorthand-initial.html:
* transitions/mask-transitions.html:
* transitions/min-max-width-height-transitions.html:
* transitions/mismatched-shadow-styles.html:
* transitions/mismatched-shadow-transitions.html:
* transitions/mixed-type.html:
* transitions/move-after-transition.html:
* transitions/multiple-background-size-transitions.html:
* transitions/multiple-background-transitions.html:
* transitions/multiple-mask-transitions.html:
* transitions/multiple-shadow-transitions.html:
* transitions/negative-delay.html:
* transitions/opacity-transition-zindex.html:
* transitions/remove-transition-style.html:
* transitions/shape-outside-transitions.html:
* transitions/shorthand-border-transitions.html:
* transitions/shorthand-transitions.html:
* transitions/steps-timing-function.html:
* transitions/svg-layout-transition.html:
* transitions/svg-text-shadow-transition.html:
* transitions/svg-transitions.html:
* transitions/text-indent-transition.html:
* transitions/transform-op-list-match.html:
* transitions/transform-op-list-no-match.html:
* transitions/transition-drt-api-delay-expected.txt: Removed.
* transitions/transition-drt-api-delay.html: Removed.
* transitions/transition-drt-api-expected.txt: Removed.
* transitions/transition-drt-api.html: Removed.
* transitions/transition-end-event-rendering.html:
* transitions/transition-hit-test-transform.html:
* transitions/transition-hit-test.html:
* transitions/transition-in-delay-phase.html:
* transitions/transition-on-element-with-content.html:
* transitions/transition-shorthand-delay.html:
* transitions/transition-timing-function.html:
* transitions/transition-to-from-auto.html:
* transitions/transition-to-from-undefined.html:
* transitions/visited-link-color.html:
* transitions/zero-duration-in-list.html:
* transitions/zero-duration-with-non-zero-delay-end.html:
* transitions/zero-duration-with-non-zero-delay-start.html:
* webanimations/css-animations.html:
* webanimations/css-transitions.html:

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

15 months ago[Curl] Remove unused SystemProxyWin.cpp
Hironori.Fujii@sony.com [Fri, 18 May 2018 07:41:04 +0000 (07:41 +0000)]
[Curl] Remove unused SystemProxyWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=185224

Reviewed by Antti Koivisto.

SystemProxyWin is not used at the moment. Remove it.

* NetworkProcess/win/SystemProxyWin.cpp: Removed.
* NetworkProcess/win/SystemProxyWin.h: Removed.
* PlatformWin.cmake: Removed SystemProxyWin.cpp.

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

15 months agoLazily create WebCore::Timer for WebCore::Image
ddkilzer@apple.com [Fri, 18 May 2018 03:29:19 +0000 (03:29 +0000)]
Lazily create WebCore::Timer for WebCore::Image
<https://webkit.org/b/185752>

Reviewed by Simon Fraser.

Not every image is an animated image, so lazily creating
m_animationStartTimer saves 64 bytes per instance of
WebCore::Image.

* platform/graphics/Image.cpp:
(WebCore::Image::Image): Remove default initializer for
m_animationStartTimer.
(WebCore::Image::startAnimationAsynchronously): Initialize
m_animationStartTimer if it's not already created.
* platform/graphics/Image.h:
(WebCore::Image::animationPending const): Update to check if
m_animationStartTimer has been set before dereferencing it.
(WebCore::Image::m_animationStartTimer): Change type to
std::unique_ptr<Timer>.

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

15 months agoWe don't throw SyntaxErrors for runtime generated regular expressions with errors
msaboff@apple.com [Fri, 18 May 2018 02:59:31 +0000 (02:59 +0000)]
We don't throw SyntaxErrors for runtime generated regular expressions with errors
https://bugs.webkit.org/show_bug.cgi?id=185755

Reviewed by Keith Miller.

JSTests:

New regression test.

* stress/regexp-with-runtime-syntax-errors.js: Added.
(testThrowsSyntaxtError):
(fromExecWithBadUnicodeEscape):
(fromTestWithBadUnicodeProperty):
(fromSplitWithBadUnicodeIdentity):
(fromMatchWithBadUnicodeBackReference):
(fromReplaceWithBadUnicodeEscape):
(fromSearchWithBadUnicodeEscape):

Source/JavaScriptCore:

Added a new helper that creates the correct exception to throw for each type of error when
compiling a RegExp.  Using that new helper, added missing checks for RegExp for the cases
where we create a new RegExp from an existing one.  Also refactored other places that we
throw SyntaxErrors after a failed RegExp compile to use the new helper.

* runtime/RegExp.h:
* runtime/RegExpConstructor.cpp:
(JSC::regExpCreate):
(JSC::constructRegExp):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
* yarr/YarrErrorCode.cpp:
(JSC::Yarr::errorToThrow):
* yarr/YarrErrorCode.h:

LayoutTests:

Updated test and results from reporting a SyntaxError to an Out of memory error.

* js/script-tests/stack-overflow-regexp.js:
(shouldThrow.recursiveCall):
(shouldThrow):
(recursiveCall):
* js/stack-overflow-regexp-expected.txt:

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

15 months agoRemove shrinkFootprint test from apitests since it's flaky
sbarati@apple.com [Fri, 18 May 2018 01:41:58 +0000 (01:41 +0000)]
Remove shrinkFootprint test from apitests since it's flaky
https://bugs.webkit.org/show_bug.cgi?id=185754

Reviewed by Mark Lam.

This test is flaky as it keeps failing on certain people's machines.
Having a test about OS footprint seems like it'll forever be doomed
to being flaky.

* API/tests/testapi.mm:
(testObjectiveCAPIMain):

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

15 months agoAX: [macOS] Expose the primary screen height through AX API
n_wang@apple.com [Fri, 18 May 2018 01:27:48 +0000 (01:27 +0000)]
AX: [macOS] Expose the primary screen height through AX API
https://bugs.webkit.org/show_bug.cgi?id=185742

Reviewed by Chris Fleizach.

Source/WebCore:

Added a new attribute to expose the primary screen size on both
WebAccessibilityObjectWrapper and WKAccessibilityWebPageObject.

Test: accessibility/mac/primary-screen-height.html

* WebCore.xcodeproj/project.pbxproj:
* accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper primaryScreenHeight]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* platform/PlatformScreen.h:
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenRectForPrimaryScreen):

Source/WebKit:

* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):

Tools:

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(attributesOfElement):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::attributesOfElement):

LayoutTests:

* accessibility/mac/primary-screen-height-expected.txt: Added.
* accessibility/mac/primary-screen-height.html: Added.

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

15 months agoRenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its...
cdumez@apple.com [Fri, 18 May 2018 00:52:28 +0000 (00:52 +0000)]
RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent
https://bugs.webkit.org/show_bug.cgi?id=185664
<rdar://problem/36185260>

Reviewed by Simon Fraser.

Source/WebCore:

RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its
cross-origin parent. There was logic in FrameLoader::scrollToFragmentWithParentBoundary()
to temporarily set the 'safeToPropagateScrollToParent' flag to false on the cross-origin
ancestor frame during the call to FrameView::scrollToFragment(). This would correctly
prevent RenderLayer::scrollRectToVisible() to propagate the scroll to the cross-origin
ancestor frame when scrollRectToVisible() is called synchronously. However,
scrollRectToVisible() can get called asynchronously in case of a dirty layout, as part
of the post layout tasks.

To address the issue, we get rid of the safeToPropagateScrollToParent flag on FrameView
and instead update FrameView::safeToPropagateScrollToParent() to do the cross-origin
check. FrameView::safeToPropagateScrollToParent() is called by RenderLayer::scrollRectToVisible()
and this is a lot more robust than relying on a flag which gets temporarily set.

Test: http/tests/navigation/fragment-navigation-cross-origin-subframe-no-scrolling-parent.html

* dom/Document.cpp:
* dom/Document.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::scrollToFragmentWithParentBoundary):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::safeToPropagateScrollToParent const):
* page/FrameView.h:

LayoutTests:

Add layout test coverage.

* http/tests/navigation/fragment-navigation-cross-origin-subframe-no-scrolling-parent-expected.txt: Added.
* http/tests/navigation/fragment-navigation-cross-origin-subframe-no-scrolling-parent.html: Added.
* http/tests/navigation/resources/clear-fragment.html: Added.

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

15 months ago[Curl] Enable HTTP/2 Multiplexing
don.olmstead@sony.com [Fri, 18 May 2018 00:04:59 +0000 (00:04 +0000)]
[Curl] Enable HTTP/2 Multiplexing
https://bugs.webkit.org/show_bug.cgi?id=185746

Reviewed by Youenn Fablet.

Covered by existing tests.

* platform/network/curl/CurlContext.cpp:
(WebCore::CurlMultiHandle::CurlMultiHandle):

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

15 months agoUse CompletionHandlers for DelayedReplies
commit-queue@webkit.org [Thu, 17 May 2018 23:58:01 +0000 (23:58 +0000)]
Use CompletionHandlers for DelayedReplies
https://bugs.webkit.org/show_bug.cgi?id=182269

Patch by Alex Christensen <achristensen@webkit.org> on 2018-05-17
Reviewed by Youenn Fablet.

DelayedReplies should be a noncopyable, non-refcountable type.  They should be
called once and only once.  This is what CompletionHandlers are for.

No change in behavior.  Just cleaner code.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
* NetworkProcess/NetworkResourceLoader.h:
* Platform/IPC/HandleMessage.h:
(IPC::callMemberFunctionImpl):
(IPC::callMemberFunction):
(IPC::handleMessageDelayed):
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::setInitializationReply):
(WebKit::PluginControllerProxy::takeInitializationReply):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::destroyPlugin):
(WebKit::WebProcessConnection::createPlugin):
(WebKit::WebProcessConnection::createPluginAsynchronously):
* PluginProcess/WebProcessConnection.h:
* Scripts/webkit/LegacyMessageReceiver-expected.cpp:
(Messages::WebPage::GetPluginProcessConnection::send):
(Messages::WebPage::TestMultipleAttributes::send):
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply): Deleted.
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::~DelayedReply): Deleted.
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::send): Deleted.
(Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply): Deleted.
(Messages::WebPage::TestMultipleAttributes::DelayedReply::~DelayedReply): Deleted.
(Messages::WebPage::TestMultipleAttributes::DelayedReply::send): Deleted.
* Scripts/webkit/LegacyMessages-expected.h:
* Scripts/webkit/MessageReceiver-expected.cpp:
(Messages::WebPage::GetPluginProcessConnection::send):
(Messages::WebPage::TestMultipleAttributes::send):
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::DelayedReply): Deleted.
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::~DelayedReply): Deleted.
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::send): Deleted.
(Messages::WebPage::TestMultipleAttributes::DelayedReply::DelayedReply): Deleted.
(Messages::WebPage::TestMultipleAttributes::DelayedReply::~DelayedReply): Deleted.
(Messages::WebPage::TestMultipleAttributes::DelayedReply::send): Deleted.
* Scripts/webkit/Messages-expected.h:
* Scripts/webkit/messages.py:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
(WebKit::NetworkProcessProxy::networkProcessCrashed):
(WebKit::NetworkProcessProxy::networkProcessFailedToLaunch):
(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::getPluginProcessConnection):
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getPluginProcessConnection):
(WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
(WebKit::PluginProcessProxy::didCreateWebProcessConnection):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Storage/StorageProcessProxy.cpp:
(WebKit::StorageProcessProxy::getStorageProcessConnection):
(WebKit::StorageProcessProxy::didClose):
(WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
* UIProcess/Storage/StorageProcessProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::ExceededDatabaseQuotaRecords::createRecord):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationActionSync):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
(WebKit::WebPageProxy::getToolbarsAreVisible):
(WebKit::WebPageProxy::getMenuBarIsVisible):
(WebKit::WebPageProxy::getStatusBarIsVisible):
(WebKit::WebPageProxy::getWindowFrame):
(WebKit::WebPageProxy::screenToRootView):
(WebKit::WebPageProxy::rootViewToScreen):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::networkProcessCrashed):
(WebKit::WebProcessPool::getNetworkProcessConnection):
(WebKit::WebProcessPool::getStorageProcessConnection):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginProcessConnection):
(WebKit::WebProcessProxy::getNetworkProcessConnection):
(WebKit::WebProcessProxy::getStorageProcessConnection):
* UIProcess/WebProcessProxy.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::syncTerminateWorker):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::computePagesForPrintingAndDrawToPDF):

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

15 months agodefaultConstructorSourceCode needs to makeSource every time it's called
sbarati@apple.com [Thu, 17 May 2018 23:20:31 +0000 (23:20 +0000)]
defaultConstructorSourceCode needs to makeSource every time it's called
https://bugs.webkit.org/show_bug.cgi?id=185753

Rubber-stamped by Mark Lam.

The bug here is multiple VMs can be running concurrently to one another
in the same process. They may each ref/deref something that isn't ThreadSafeRefCounted
if we copy a static SourceCode. instead, we create a new one each time
this function is called.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::defaultConstructorSourceCode):

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

15 months agoRemove unnecessary exit fullscreen call on application resume
commit-queue@webkit.org [Thu, 17 May 2018 23:03:50 +0000 (23:03 +0000)]
Remove unnecessary exit fullscreen call on application resume
https://bugs.webkit.org/show_bug.cgi?id=185747
rdar://problem/40345725

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-05-17
Reviewed by Jer Noble.

No new tests because no behavior change.

Auto-PiP doesn't automatically return to fullscreen on app resume,
so we don't need to keep this vestigial code for handling a corner case of that feature.
Also, this can cause an unnecessary exit fullscreen that could cause debug asserts.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):

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

15 months agoCRASH in -[WKFullScreenViewController _manager]
jer.noble@apple.com [Thu, 17 May 2018 22:20:15 +0000 (22:20 +0000)]
CRASH in -[WKFullScreenViewController _manager]
https://bugs.webkit.org/show_bug.cgi?id=185745
<rdar://problem/39195241>

Reviewed by Eric Carlson.

Protect against WKFullScreenViewController outliving WKWebView by making its
_webView property weak. Additionally, add a sanity-check RetainPtr where _webView
is referenced multiple times within a function.

* UIProcess/ios/fullscreen/WKFullScreenViewController.mm:
* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController initWithWebView:]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController close]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _isSecure]):
(-[WKFullScreenWindowController _serverTrust]):
(-[WKFullScreenWindowController _updateLocationInfo]):
(-[WKFullScreenWindowController _manager]):
(-[WKFullScreenWindowController _startToDismissFullscreenChanged:]):

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

15 months agoUnreviewed, rolling out r231912.
commit-queue@webkit.org [Thu, 17 May 2018 22:17:18 +0000 (22:17 +0000)]
Unreviewed, rolling out r231912.
https://bugs.webkit.org/show_bug.cgi?id=185750

It is prompting the user when there is no WPT changes
(Requested by bmac on #webkit).

Reverted changeset:

"Export changes to web-platform-test as part of the webkit-
patch upload workflow"
https://bugs.webkit.org/show_bug.cgi?id=184914
https://trac.webkit.org/changeset/231912

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

15 months agoFullscreen to PiP results in exit fullscreen call failure
commit-queue@webkit.org [Thu, 17 May 2018 22:16:22 +0000 (22:16 +0000)]
Fullscreen to PiP results in exit fullscreen call failure
https://bugs.webkit.org/show_bug.cgi?id=185699
rdar://problem/40310291

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-05-17
Reviewed by Eric Carlson.

No new tests because no behavior change.

Prevent multiple exit fullscreen calls when transitioning from fullscreen to picture-in-picture.

* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerViewControllerDelegate playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart:]):
Implement this to prevent AVKit from automatically initiating exit fullscreen on pip.

(VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
Set the return to fullscreen flag here, since this is where exit fullscreen happens.

(VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
Don't exit fullscreen here since it is already initiated in didStartPictureInPicture.

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

15 months agoUnreviewed, rolling out r231899.
ryanhaddad@apple.com [Thu, 17 May 2018 22:15:06 +0000 (22:15 +0000)]
Unreviewed, rolling out r231899.

Caused flakiness in two existing modern-media-controls tests.

Reverted changeset:

"[modern-media-controls] AirPlaySupport should be disabled by
default"
https://bugs.webkit.org/show_bug.cgi?id=185658
https://trac.webkit.org/changeset/231899

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

15 months agoCorrect default for StorageAccess API
bfulgham@apple.com [Thu, 17 May 2018 22:12:32 +0000 (22:12 +0000)]
Correct default for StorageAccess API
https://bugs.webkit.org/show_bug.cgi?id=185748
<rdar://problem/40220659>

Reviewed by Dean Jackson.

Flip the default state to 'true' so that the new "sticky" state
for Storage Access API and attributing user interaction for
Storage Access API use is applied by default.

* Shared/WebPreferences.yaml:

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

15 months ago[iOS] Update AirPlay route monitoring
eric.carlson@apple.com [Thu, 17 May 2018 21:48:49 +0000 (21:48 +0000)]
[iOS] Update AirPlay route monitoring
https://bugs.webkit.org/show_bug.cgi?id=185706
<rdar://problem/40230677>

Unreviewed, fix extra zoom mode build after r231913.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper dealloc]):
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]):

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

15 months agoCRASH in ImageDecoderAVFObjC::sampleAtIndex()
jer.noble@apple.com [Thu, 17 May 2018 21:02:23 +0000 (21:02 +0000)]
CRASH in ImageDecoderAVFObjC::sampleAtIndex()
https://bugs.webkit.org/show_bug.cgi?id=185734
<rdar://problem/40295094>

Reviewed by Eric Carlson.

Source/WebCore:

Test: fast/images/animated-image-mp4-crash.html

Test the correct size value before iterating over the SampleMap in presentationOrder()

* Modules/mediasource/SampleMap.h:
(WebCore::PresentationOrderSampleMap::size const):
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(WebCore::ImageDecoderAVFObjC::sampleAtIndex const):

LayoutTests:

* fast/images/animated-image-mp4-crash-expected.txt: Added.
* fast/images/animated-image-mp4-crash.html: Added.
* fast/images/resources/two-samples-with-same-pts.mp4: Added.

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

15 months agotest262/Runner.pm: expand $INC to find webkitdirs.pm
commit-queue@webkit.org [Thu, 17 May 2018 20:52:04 +0000 (20:52 +0000)]
test262/Runner.pm: expand $INC to find webkitdirs.pm
https://bugs.webkit.org/show_bug.cgi?id=185739

Patch by Valerie R Young <valerie@bocoup.com> on 2018-05-17
Reviewed by Michael Saboff.

* Scripts/test262/Runner.pm:
(getBuildPath):

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

15 months agoREGRESSION (r229831?): Layout Test http/tests/appcache/interrupted-update.html is...
youenn@apple.com [Thu, 17 May 2018 20:40:47 +0000 (20:40 +0000)]
REGRESSION (r229831?): Layout Test http/tests/appcache/interrupted-update.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184061
<rdar://problem/38975570>

Reviewed by Alexey Proskuryakov.

Test is flaky as it sometimes reload twice.
Make sure it reloads only once by not relying on localStorage.
Make sure the appcache has not enough time to finish before reloading is done.
This is done by adding more entries to the appcache.
Add a test that sets an item in local storage, reloads and verifies the item is there.

* TestExpectations:
* http/tests/appcache/interrupted-update.html:
* http/tests/appcache/resources/interrupted-update.manifest:
* http/tests/storage/setItem-and-reload-expected.txt: Added.
* http/tests/storage/setItem-and-reload.html: Added.

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

15 months ago[WPE] Implement and enable FULLSCREEN_API
clopez@igalia.com [Thu, 17 May 2018 19:30:46 +0000 (19:30 +0000)]
[WPE] Implement and enable FULLSCREEN_API
https://bugs.webkit.org/show_bug.cgi?id=185676

Reviewed by Žan Doberšek.

.:

Remove the CMake option to disable this option for WPE.
This feature gets enabled now via Source/cmake/WebKitFeatures.cmake

* Source/cmake/OptionsWPE.cmake:

Source/WebKit:

Do the initial implementation of FULLSCREEN_API for WPE and
enable the CMake option by default.

Most of the layout tests (55 of 58) are passing and the feature
seems to work fine on different websites that use it.

* UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/API/wpe/PageClientImpl.h:
* UIProcess/API/wpe/WPEView.h:
(WKWPE::View::isFullScreen):
(WKWPE::View::setFullScreen):

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewFullScreen):

LayoutTests:

Enable all the 58 fullscreen related tests.
Are all passing but 3.

* platform/wpe/TestExpectations:
* platform/wpe/fullscreen/full-screen-placeholder-expected.txt: Added. Copied baseline from WebKitGTK+ port.

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

15 months agoConvert CertificateInfo into Credential in UI Process instead of Networking Process
jiewen_tan@apple.com [Thu, 17 May 2018 19:26:52 +0000 (19:26 +0000)]
Convert CertificateInfo into Credential in UI Process instead of Networking Process
https://bugs.webkit.org/show_bug.cgi?id=185662
<rdar://problem/40275561>

Reviewed by Alex Christensen.

Source/WebKit:

Right now we convert CertificateInfo into Credential in the very last stage of client certificate authentication process
when it reaches Networking Process. This patch moves that conversion earlier in UI Process such that we don't have to
pass both Credential and CertificateInfo to Networking Process.

CertificateInfo is only used in macOS for C API specifically. WK2 includes macOS/iOS relies on NSURLCredential/WebCore::Credential
solely. WK2 has already exercised the ability of using WebCore::Credential to do client certficate authentication. This patch therefore
takes advantage of that. It converts CertficateInfo objects into Credential objects right after WebCredential is initialized, and then merge
any code paths that utilizes CertficateInfo into ones that uses WebCore::Credential.

Covered by existing tests.

* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::useCredentialForChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::tryUseCertificateInfoForChallenge): Deleted.
* Shared/Authentication/AuthenticationManager.h:
* Shared/Authentication/AuthenticationManager.messages.in:
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::useCredential):
* UIProcess/Authentication/WebCredential.cpp:
(WebKit::WebCredential::WebCredential):
(WebKit::WebCredential::certificateInfo): Deleted.
* UIProcess/Authentication/WebCredential.h:
(WebKit::WebCredential::create):
* UIProcess/Authentication/mac/WebCredentialMac.mm: Renamed from Source/WebKit/Shared/Authentication/mac/AuthenticationManager.mac.mm.
(WebKit::leafCertificate):
(WebKit::chain):
(WebKit::WebCredential::WebCredential):
* WebKit.xcodeproj/project.pbxproj:

Source/WTF:

Remove marco HAVE_SEC_IDENTITY since it is no longer useful.

* wtf/Platform.h:

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

15 months ago[Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation
wenson_hsieh@apple.com [Thu, 17 May 2018 19:20:28 +0000 (19:20 +0000)]
[Extra zoom mode] Disabled adaptations are not reset upon mainframe navigation
https://bugs.webkit.org/show_bug.cgi?id=185735
<rdar://problem/40335311>

Reviewed by Tim Horton.

Source/WebCore:

When performing mainframe navigation, we currently don't update the Page's ViewportConfiguration's disabled
adaptations. This causes disabled adaptations from the previous main document to persist. To fix this, propagate
the new document's disabled adaptations to the client when it becomes the main document in the page.

Test: fast/viewport/extrazoom/viewport-adaptations-after-navigation.html

* dom/Document.cpp:
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::processDisabledAdaptations):
(WebCore::Document::dispatchDisabledAdaptationsDidChangeForMainFrame):
* dom/Document.h:

LayoutTests:

Adds a new layout test that disables extra zoom mode adaptations, navigates to a new document, and checks that
the innerWidth and innerHeight are reset to their expected (default) values.

* fast/viewport/extrazoom/viewport-adaptations-after-navigation.html: Added.

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

15 months agoEnsure valid rects for fullsceen animation.
commit-queue@webkit.org [Thu, 17 May 2018 18:47:06 +0000 (18:47 +0000)]
Ensure valid rects for fullsceen animation.
https://bugs.webkit.org/show_bug.cgi?id=185736
rdar://problem/40320174

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-05-17
Reviewed by Jer Noble.

Protect against zero width and height since those can make for NANs in the animation transforms.

* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):

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

15 months ago[iOS] Update AirPlay route monitoring
eric.carlson@apple.com [Thu, 17 May 2018 18:44:33 +0000 (18:44 +0000)]
[iOS] Update AirPlay route monitoring
https://bugs.webkit.org/show_bug.cgi?id=185706
<rdar://problem/40230677>

Reviewed by Jer Noble.

Use an AVRouteDetector instead of an MPVolumeView and an MPAVRoutingController for AirPlay
route detection and availability monitoring.

No new tests, tested manually.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::hasWirelessPlaybackTargets): No need to update m_hasPlaybackTargets
manually, it is always updated by the session manager when route availability changes.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper dealloc]): Pull the logic from safelyTearDown inline.
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Use the AVRouteDetector.
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Ditto.  Simplify logic, there is no
need to dispatch twice.
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Don't release the route detector
completely, just disable route detection, because AVRouteDetector is a lightweight object so
it is not worth the overhead of dealloc/realloc to disable/enable route detection.
(-[WebMediaSessionHelper interruption:]): Use callOnWebThreadOrDispatchAsyncOnMainThread
instead of WebThreadRun so it works correctly in WK2 as well as in WK1.
(-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
(-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
(-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
(-[WebMediaSessionHelper applicationDidEnterBackground:]): Ditto.
(safelyTearDown): Deleted.

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

15 months agoExport changes to web-platform-test as part of the webkit-patch upload workflow
commit-queue@webkit.org [Thu, 17 May 2018 18:29:00 +0000 (18:29 +0000)]
Export changes to web-platform-test as part of the webkit-patch upload workflow
https://bugs.webkit.org/show_bug.cgi?id=184914

Patch by Brendan McLoughlin <brendan@bocoup.com> on 2018-05-17
Reviewed by Youenn Fablet.

* Scripts/webkitpy/tool/commands/upload.py:
(Upload):
(CreateBug.execute):
(WPTChangeExport):
* Scripts/webkitpy/tool/steps/__init__.py:
* Scripts/webkitpy/tool/steps/wptchangeexport.py: Added.
(WPTChangeExport):
(WPTChangeExport.options):
(WPTChangeExport.run):
* Scripts/webkitpy/w3c/common.py:
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter):
(WebPlatformTestExporter.__init__):
(WebPlatformTestExporter.username):
(WebPlatformTestExporter.token):
(WebPlatformTestExporter._github):
(WebPlatformTestExporter._wpt_fork_branch_github_url):
(WebPlatformTestExporter._wpt_fork_remote):
(WebPlatformTestExporter._wpt_fork_push_url):
(WebPlatformTestExporter._git):
(WebPlatformTestExporter._branch_name):
(WebPlatformTestExporter._public_branch_name):
(WebPlatformTestExporter.has_wpt_changes):
(WebPlatformTestExporter._create_patch):
(WebPlatformTestExporter.create_git_patch):
(WebPlatformTestExporter._prompt_for_token):
(WebPlatformTestExporter._prompt_for_username):
(WebPlatformTestExporter._ensure_username_and_token):
(WebPlatformTestExporter._validate_and_save_token):
(WebPlatformTestExporter.push_to_wpt_fork):
(WebPlatformTestExporter.make_pull_request):
(WebPlatformTestExporter.delete_local_branch):
(parse_args):
(TestExporter): Deleted.
(TestExporter.__init__): Deleted.
(TestExporter._ensure_wpt_repository): Deleted.
(TestExporter._fetch_wpt_repository): Deleted.
(TestExporter._ensure_new_branch_name): Deleted.
(TestExporter.download_and_commit_patch): Deleted.
(TestExporter.clean): Deleted.
(TestExporter.create_branch_with_patch): Deleted.
(TestExporter.push_to_wpt_fork): Deleted.
(TestExporter.make_pull_request): Deleted.
(TestExporter.create_wpt_pull_request): Deleted.
(TestExporter.delete_local_branch): Deleted.
(TestExporter.create_git_patch): Deleted.
(TestExporter.create_upload_remote_if_needed): Deleted.
(TestExporter.do_export): Deleted.
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
(TestExporterTest):
(TestExporterTest.test_export_interactive_mode):
(TestExporterTest.test_export_invalid_token):
(TestExporterTest.test_export_wrong_token):

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

15 months agoCross-Origin-Options: deny/allow-postmessage should prevent getting navigated by...
cdumez@apple.com [Thu, 17 May 2018 18:23:23 +0000 (18:23 +0000)]
Cross-Origin-Options: deny/allow-postmessage should prevent getting navigated by cross-origin scripts
https://bugs.webkit.org/show_bug.cgi?id=185681
<rdar://problem/40296313>

Reviewed by Geoffrey Garen.

Source/WebCore:

Update our canNavigate() implementation [1] to take into account the Cross-Origin-Options header.
If the window being navigated or the window trigerring the navigation have a Cross-Origin-Options
header value different than 'allow', then the attempt to navigate will be blocked.

Note that it was already not possible to navigate via setting window.location since trying to set
it would throw a SecurityError with 'Cross-Origin-Options: deny/allow-postmessage'. However, it was
possible to trigger a "targeted" navigation via <a target="foo"> or open(url, "foo").

[1] https://html.spec.whatwg.org/#allowed-to-navigate

Tests: http/wpt/cross-origin-options/navigation-from-opener-via-open-target.html
       http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target.html

* dom/Document.cpp:
(WebCore::Document::canNavigate):

LayoutTests:

Add layout test coverage.

* http/wpt/cross-origin-options/navigation-from-opener-via-open-target-expected.txt: Added.
* http/wpt/cross-origin-options/navigation-from-opener-via-open-target.html: Added.
* http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target-expected.txt: Added.
* http/wpt/cross-origin-options/navigation-from-subframe-via-anchor-target.html: Added.
* http/wpt/cross-origin-options/resources/destination.html: Added.
* http/wpt/cross-origin-options/resources/navigate-parent-via-anchor.html: Added.
* http/wpt/cross-origin-options/resources/navigation-from-subframe-frame.py: Added.
(main):
* http/wpt/cross-origin-options/resources/utils.js:

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

15 months agoStorage Access API: Allow documents that have been granted storage access to also...
bfulgham@apple.com [Thu, 17 May 2018 18:16:56 +0000 (18:16 +0000)]
Storage Access API: Allow documents that have been granted storage access to also do a popup
https://bugs.webkit.org/show_bug.cgi?id=185615
<rdar://problem/39105791>

Reviewed by Chris Dumez.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::consumeTemporaryUserGesture): Added. Clear the document's active one-time user
activity (for window opening) state.
(WebCore::Document::enableTemporaryUserGesture): Added. Establish a new active one-time user
activity (for window opening) state.
(WebCore::Document::requestStorageAccess): If the user approves Storage Access, establish a new
UserInteraction scope, then resolve the promise. Also post a task to clear the one-time user
gesture state.

LayoutTests:

* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe-pop-window-expected.txt: Added.
* http/tests/storageAccess/request-and-grant-storage-access-cross-origin-non-sandboxed-iframe-pop-window.html: Added.
* http/tests/storageAccess/resources/request-storage-access-iframe-and-pop-window.html: Added.
* http/tests/storageAccess/resources/request-storage-access-second-window.html: Added.

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

15 months ago[LFC] Introduce DisplayBox::Style
zalan@apple.com [Thu, 17 May 2018 17:54:57 +0000 (17:54 +0000)]
[LFC] Introduce DisplayBox::Style
https://bugs.webkit.org/show_bug.cgi?id=185733

Reviewed by Antti Koivisto.

This is the collection of computed style data needed to paint/hittest the display boxtree.

* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::createDisplayBox):
* layout/displaytree/DisplayBox.cpp:
(WebCore::Display::Box::Box):
(WebCore::Display::Box::Style::Style):
(WebCore::Display::Box::borderBox const):
(WebCore::Display::Box::contentBox const):
* layout/displaytree/DisplayBox.h:

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

15 months agotest262/Runner.pm: look for jsc in path if cannot call webkit-build-directory
commit-queue@webkit.org [Thu, 17 May 2018 17:07:46 +0000 (17:07 +0000)]
test262/Runner.pm: look for jsc in path if cannot call webkit-build-directory
https://bugs.webkit.org/show_bug.cgi?id=185650

Patch by Valerie R Young <valerie@bocoup.com> on 2018-05-17
Reviewed by Michael Saboff.

First, use jsc from CLI arg, then try to use webkit-build-directory,
if that doesn't work, look for jsc in the $PATH

* Scripts/test262/Runner.pm:
(processCLI):
(getBuildPath):
(runTest):

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

15 months ago Update touch event tracking type on every touch
ggaren@apple.com [Thu, 17 May 2018 16:37:46 +0000 (16:37 +0000)]
    Update touch event tracking type on every touch
        https://bugs.webkit.org/show_bug.cgi?id=184250

        Patch by Tadeu Zagallo <​tzagallo@apple.com>
        Reviewed by Geoffrey Garen.

        Fixed up some ChangeLog typos.

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

15 months ago[JSC] Use AssemblyHelpers' type checking functions as much as possible
utatane.tea@gmail.com [Thu, 17 May 2018 16:18:24 +0000 (16:18 +0000)]
[JSC] Use AssemblyHelpers' type checking functions as much as possible
https://bugs.webkit.org/show_bug.cgi?id=185730

Reviewed by Saam Barati.

Let's use AssemblyHelpers' type checking functions as much as possible. This hides the complex
bit and register operations for type tagging of JSValue. It is really useful when we would like
to tweak type tagging representation since the code is collected into AssemblyHelpers. And
the named function is more readable than some branching operations.

We also remove unnecessary branching functions in JIT / JSInterfaceJIT. Some of them are duplicate
to AssemblyHelpers' one.

We add several new type checking functions to AssemblyHelpers. Moreover, we add branchIfXXX(GPRReg)
functions even for 32bit environment. In 32bit environment, this function takes tag register. This
semantics is aligned to the existing branchIfCell / branchIfNotCell.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateWithGuard):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::speculateCellTypeWithoutTypeFiltering):
(JSC::DFG::SpeculativeJIT::speculateCellType):
(JSC::DFG::SpeculativeJIT::speculateNumber):
(JSC::DFG::SpeculativeJIT::speculateMisc):
(JSC::DFG::SpeculativeJIT::compileExtractValueFromWeakMapGet):
(JSC::DFG::SpeculativeJIT::compileCreateThis):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):
(JSC::DFG::SpeculativeJIT::compileHasIndexedProperty):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::convertAnyInt):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileAssertNotEmpty):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::branchIfInt32):
(JSC::AssemblyHelpers::branchIfNotInt32):
(JSC::AssemblyHelpers::branchIfNumber):
(JSC::AssemblyHelpers::branchIfNotNumber):
(JSC::AssemblyHelpers::branchIfBoolean):
(JSC::AssemblyHelpers::branchIfNotBoolean):
(JSC::AssemblyHelpers::branchIfEmpty):
(JSC::AssemblyHelpers::branchIfNotEmpty):
(JSC::AssemblyHelpers::branchIfUndefined):
(JSC::AssemblyHelpers::branchIfNotUndefined):
(JSC::AssemblyHelpers::branchIfNull):
(JSC::AssemblyHelpers::branchIfNotNull):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emitBinaryDoubleOp):
(JSC::JIT::emit_op_mod):
* jit/JITCall.cpp:
(JSC::JIT::compileCallEval):
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEval):
(JSC::JIT::compileOpCall):
* jit/JITInlines.h:
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::emitJumpIfBothJSCells):
(JSC::JIT::emitJumpSlowCaseIfJSCell):
(JSC::JIT::emitJumpIfNotInt):
(JSC::JIT::emitJumpSlowCaseIfNotInt):
(JSC::JIT::emitJumpSlowCaseIfNotNumber):
(JSC::JIT::emitJumpIfCellObject): Deleted.
(JSC::JIT::emitJumpIfCellNotObject): Deleted.
(JSC::JIT::emitJumpIfJSCell): Deleted.
(JSC::JIT::emitJumpIfInt): Deleted.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_profile_type):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emit_op_profile_type):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitWriteBarrier):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitContiguousLoad):
(JSC::JIT::emitArrayStorageLoad):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::emitLoadJSCell):
(JSC::JSInterfaceJIT::emitLoadInt32):
(JSC::JSInterfaceJIT::emitLoadDouble):
(JSC::JSInterfaceJIT::emitJumpIfNumber): Deleted.
(JSC::JSInterfaceJIT::emitJumpIfNotNumber): Deleted.
(JSC::JSInterfaceJIT::emitJumpIfNotType): Deleted.
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* jit/ThunkGenerators.cpp:
(JSC::virtualThunkFor):
(JSC::absThunkGenerator):
* tools/JSDollarVM.cpp:
(WTF::DOMJITNode::checkSubClassSnippet):
(WTF::DOMJITFunctionObject::checkSubClassSnippet):

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

15 months agoUnreviewed. Fix the build after my attempted build fix broke the build.
sbarati@apple.com [Thu, 17 May 2018 16:16:59 +0000 (16:16 +0000)]
Unreviewed. Fix the build after my attempted build fix broke the build.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::defaultConstructorSourceCode):
(JSC::BuiltinExecutables::createDefaultConstructor):
* builtins/BuiltinExecutables.h:

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

15 months agoTurn Modern EME API on by default and remove it as an experimental feature
jer.noble@apple.com [Thu, 17 May 2018 16:12:35 +0000 (16:12 +0000)]
Turn Modern EME API on by default and remove it as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=185693
<rdar://problem/39954396>

Reviewed by Eric Carlson.

* Shared/WebPreferences.yaml:

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

15 months ago[JSC] Remove reifyPropertyNameIfNeeded
utatane.tea@gmail.com [Thu, 17 May 2018 16:08:51 +0000 (16:08 +0000)]
[JSC] Remove reifyPropertyNameIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=185350

Reviewed by Saam Barati.

reifyPropertyNameIfNeeded is in the middle of putDirectInternal, which is super critical path.
This is a virtual call, and it is only used by JSFunction right now. Since this causes too much
cost, we should remove this from the critical path.

This patch removes this function call from the critical path. And in our slow paths, we call
helper functions which calls reifyLazyPropertyIfNeeded if the given value is a JSFunction.
While putDirect is a bit raw API, our slow paths just call it. This helper wraps this calls
and care the edge cases. The other callsites of putDirect should know the type of the given
object and the name of the property (And avoid these edge cases).

This improves SixSpeed/object-assign.es6 by ~4% on MacBook Pro. And this patch does not cause
regressions of the existing tests.

                                   baseline                  patched
Kraken:
    json-parse-financial        35.522+-0.069      ^      34.708+-0.097         ^ definitely 1.0234x faster

SixSpeed:
    object-assign.es6         145.8779+-0.2838     ^    140.1019+-0.8007        ^ definitely 1.0412x faster

* dfg/DFGOperations.cpp:
(JSC::DFG::putByValInternal):
(JSC::DFG::putByValCellInternal):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ClassInfo.h:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::putDirectWithReify):
(JSC::CommonSlowPaths::putDirectAccessorWithReify):
* runtime/JSCell.cpp:
(JSC::JSCell::reifyPropertyNameIfNeeded): Deleted.
* runtime/JSCell.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::reifyPropertyNameIfNeeded): Deleted.
* runtime/JSFunction.h:
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::putDirectInternal):

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

15 months agoUnreviewed. Try to fix windows build.
sbarati@apple.com [Thu, 17 May 2018 16:03:27 +0000 (16:03 +0000)]
Unreviewed. Try to fix windows build.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::defaultConstructorSourceCode):

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

15 months ago[modern-media-controls] AirPlaySupport should be disabled by default
commit-queue@webkit.org [Thu, 17 May 2018 15:34:38 +0000 (15:34 +0000)]
[modern-media-controls] AirPlaySupport should be disabled by default
https://bugs.webkit.org/show_bug.cgi?id=185658
<rdar://problem/40272213>

Patch by Antoine Quint <graouts@apple.com> on 2018-05-17
Reviewed by Simon Fraser.

Source/WebCore:

We now only enable AirplaySupport if the controls are visible to the user _and_ media has played.

Test: media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html

* Modules/modern-media-controls/media/airplay-support.js:
(AirplaySupport.prototype.enable):
(AirplaySupport.prototype.controlsUserVisibilityDidChange):
(AirplaySupport.prototype._shouldBeEnabled):
(AirplaySupport):

LayoutTests:

Add a new test that checks that we create an AirplaySupport object only after media has started playing.

* media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play-expected.txt: Added.
* media/modern-media-controls/airplay-support/airplay-support-disable-event-listeners-until-play.html: Added.

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

15 months agoRemove cssom-remove-shorthand-property.html test
commit-queue@webkit.org [Thu, 17 May 2018 15:27:37 +0000 (15:27 +0000)]
Remove cssom-remove-shorthand-property.html test
https://bugs.webkit.org/show_bug.cgi?id=185727

Patch by Rob Buis <rbuis@igalia.com> on 2018-05-17
Reviewed by Frédéric Wang.

Exact same test is contained in WPT:
cssom/cssom-setProperty-shorthand.html

* fast/css/cssom-remove-shorthand-property-expected.txt: Removed.
* fast/css/cssom-remove-shorthand-property.html: Removed.

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

15 months ago[LFC] Replace ASSERT_NOT_REACHED with ASSERT_NOT_IMPLEMENTED_YET where applicable.
zalan@apple.com [Thu, 17 May 2018 15:24:00 +0000 (15:24 +0000)]
[LFC] Replace ASSERT_NOT_REACHED with ASSERT_NOT_IMPLEMENTED_YET where applicable.
https://bugs.webkit.org/show_bug.cgi?id=185728

Reviewed by Antti Koivisto.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): leftover from previous patch.
(WebCore::Layout::FormattingContext::computeFloatingWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
(WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
(WebCore::Layout::FormattingContext::computeReplacedWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const):
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::styleChanged):
(WebCore::Layout::LayoutContext::formattingContext):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedWidth const):
(WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
(WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createSubTree):

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

15 months agoAdd ASSERT_NOT_IMPLEMENTED_YET() macro
zalan@apple.com [Thu, 17 May 2018 14:29:46 +0000 (14:29 +0000)]
Add ASSERT_NOT_IMPLEMENTED_YET() macro
https://bugs.webkit.org/show_bug.cgi?id=185713

Reviewed by Antti Koivisto.

To mark unimplemented code paths.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

15 months ago[LFC] Move replaced logic from Layout::Box to Layout::Replaced class
zalan@apple.com [Thu, 17 May 2018 14:11:08 +0000 (14:11 +0000)]
[LFC] Move replaced logic from Layout::Box to Layout::Replaced class
https://bugs.webkit.org/show_bug.cgi?id=185711

Reviewed by Antti Koivisto.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
(WebCore::Layout::FormattingContext::computeFloatingWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
(WebCore::Layout::FormattingContext::computeInFlowReplacedWidth const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
(WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isReplaced const): Deleted.
(WebCore::Layout::Box::hasIntrinsicWidth const): Deleted.
(WebCore::Layout::Box::hasIntrinsicHeight const): Deleted.
(WebCore::Layout::Box::hasIntrinsicRatio const): Deleted.
(WebCore::Layout::Box::intrinsicWidth const): Deleted.
(WebCore::Layout::Box::intrinsicHeight const): Deleted.
(WebCore::Layout::Box::intrinsicRatio const): Deleted.
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::replaced const):

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

15 months ago[LFC] Implement width computation for replaced out if flow elements.
zalan@apple.com [Thu, 17 May 2018 14:07:49 +0000 (14:07 +0000)]
[LFC] Implement width computation for replaced out if flow elements.
https://bugs.webkit.org/show_bug.cgi?id=185701

Reviewed by Antti Koivisto.

The used value of 'width' is determined as for inline replaced elements.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
(WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
(WebCore::Layout::FormattingContext::computeOutOfFlowReplacedWidth const):
* layout/FormattingContext.h:

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

15 months agoSafari optimized flow should be releasing viewer to prevent memory growth with subseq...
dino@apple.com [Thu, 17 May 2018 11:30:04 +0000 (11:30 +0000)]
Safari optimized flow should be releasing viewer to prevent memory growth with subsequent launches/closes
https://bugs.webkit.org/show_bug.cgi?id=185722
<rdar://problem/40247351>

Reviewed by Antoine Quint.

I made a rookie mistake in the original patch: I was holding a strong
reference to "self" in a block, which was causing a retain cycle.
Replace that with a WeakObjCPtr.

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):

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

15 months ago[GTK][WPE] Test gardening
Ms2ger@igalia.com [Thu, 17 May 2018 10:17:28 +0000 (10:17 +0000)]
[GTK][WPE] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=185718

Unreviewed test gardening.

* accessibility/gtk/spans-expected.txt: rebaseline for r231717.
* accessibility/gtk/spans-paragraphs-and-divs-expected.txt: rebaseline for r231717.
* js/script-tests/intl-numberformat-format-to-parts.js: skip (bug 185714).
* js/script-tests/intl-pluralrules.js: skip (bug 185714).
* platform/gtk/TestExpectations: skip new Intl tests (bug 185714).
* platform/gtk/editing/deleting/delete-emoji-1-expected.txt: rebaseline for r231630.
* platform/gtk/editing/deleting/delete-emoji-expected.txt: rebaseline for r231630.
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
  Removed (platform-neutral expectation file applies since r231000).
* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt:
  Removed (platform-neutral expectation file applies since r231000).

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

15 months ago[GStreamer]: Consider GstStream(Collection) as if if was not a GInitiallyUnowned
commit-queue@webkit.org [Thu, 17 May 2018 08:16:40 +0000 (08:16 +0000)]
[GStreamer]: Consider GstStream(Collection) as if if was not a GInitiallyUnowned
https://bugs.webkit.org/show_bug.cgi?id=185657

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-05-17
Reviewed by Philippe Normand.

Starting with GStreamer 1.14[1] the reference is sunk at object creation time, making it a normal
GObject in practice, in our GRefPtr template implementation we should just consider GstStream
as if it was a normal GObject and not care about its floating reference state as
the ref is never sunk by anyone before 1.14 though that floating ref is considered
as a hard reference by the GstStreamCollection (leading to assertions/)

The exact same issue happens with GstStreamCollection, so fix it at the same time.

Also do not adoptRef() on the result of gst_stream_collection_get_stream() as this function
is transfer-none.

[1] commit f119e93b47efb06ffc68c01d3e094d5346c30041 `gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent`

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstStream>):
(WTF::refGPtr<GstStreamCollection>):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

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

15 months ago[WinCairo] Unreviewed gardening after WinCairoRequirements update.
ross.kirsling@sony.com [Thu, 17 May 2018 06:54:50 +0000 (06:54 +0000)]
[WinCairo] Unreviewed gardening after WinCairoRequirements update.

* platform/wincairo/TestExpectations:
* platform/wincairo/editing/deleting/delete-emoji-1-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-2-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-3-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-4-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-5-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-6-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-7-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-8-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-9-expected.txt:
* platform/wincairo/editing/deleting/delete-emoji-expected.txt:
* platform/wincairo/editing/deleting/regional-indicators-expected.txt: Removed.
* platform/wincairo/editing/style/create-block-for-style-006-expected.png: Added.

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

15 months agoUnlinkedFunctionExecutable doesn't need a parent source override field since it's...
sbarati@apple.com [Thu, 17 May 2018 05:21:41 +0000 (05:21 +0000)]
UnlinkedFunctionExecutable doesn't need a parent source override field since it's only used for default class constructors
https://bugs.webkit.org/show_bug.cgi?id=185637

Reviewed by Keith Miller.

We had this general mechanism for overriding an UnlinkedFunctionExecutable's parent
source code. However, we were only using this for default class constructors. There
are only two types of default class constructors. This patch makes it so that
we just store this information inside of a single bit, and ask for the source
code as needed instead of holding it in a nullable field that is 24 bytes in size.

This brings UnlinkedFunctionExecutable's size down from 184 bytes to 160 bytes.
This has the consequence of making it allocated out of a 160 byte size class
instead of a 224 byte size class. This should bring down its memory footprint
by ~40%.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::defaultConstructorSourceCode):
(JSC::BuiltinExecutables::createDefaultConstructor):
(JSC::BuiltinExecutables::createExecutable):
* builtins/BuiltinExecutables.h:
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::link):
* bytecode/UnlinkedFunctionExecutable.h:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

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

15 months agoVM::shrinkFootprint should call collectNow(Sync) instead of collectSync so it also...
sbarati@apple.com [Thu, 17 May 2018 05:21:22 +0000 (05:21 +0000)]
VM::shrinkFootprint should call collectNow(Sync) instead of collectSync so it also eagerly sweeps
https://bugs.webkit.org/show_bug.cgi?id=185707

Reviewed by Mark Lam.

* runtime/VM.cpp:
(JSC::VM::shrinkFootprint):

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

15 months ago[ESNext][BigInt] Implement support for "/" operation
ticaiolima@gmail.com [Thu, 17 May 2018 04:27:28 +0000 (04:27 +0000)]
[ESNext][BigInt] Implement support for "/" operation
https://bugs.webkit.org/show_bug.cgi?id=183996

Reviewed by Yusuke Suzuki.

JSTests:

* bigIntTests.yaml:
* stress/big-int-div-jit.js: Added.
* stress/big-int-div-memory-stress.js: Added.
* stress/big-int-div-to-primitive-precedence.js: Added.
* stress/big-int-div-to-primitive.js: Added.
* stress/big-int-div-type-error.js: Added.
* stress/big-int-div-wrapped-value.js: Added.
* stress/big-int-division.js: Added.

Source/JavaScriptCore:

This patch is introducing the support for BigInt into divide
operation int LLInt and JIT layers.

* dfg/DFGOperations.cpp:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/JSBigInt.cpp:
(JSC::JSBigInt::divide):
(JSC::JSBigInt::copy):
(JSC::JSBigInt::unaryMinus):
(JSC::JSBigInt::absoluteCompare):
(JSC::JSBigInt::absoluteDivLarge):
(JSC::JSBigInt::productGreaterThan):
(JSC::JSBigInt::inplaceAdd):
(JSC::JSBigInt::inplaceSub):
(JSC::JSBigInt::inplaceRightShift):
(JSC::JSBigInt::specialLeftShift):
(JSC::JSBigInt::digit):
(JSC::JSBigInt::setDigit):
* runtime/JSBigInt.h:

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

15 months ago[WinCairo] Update WinCairoRequirements
don.olmstead@sony.com [Thu, 17 May 2018 02:54:14 +0000 (02:54 +0000)]
[WinCairo] Update WinCairoRequirements
https://bugs.webkit.org/show_bug.cgi?id=185700

Reviewed by Per Arne Vollan.

* Source/cmake/OptionsWinCairo.cmake:

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

15 months agoConstant fold CheckTypeInfoFlags on ImplementsDefaultHasInstance
sbarati@apple.com [Thu, 17 May 2018 01:49:24 +0000 (01:49 +0000)]
Constant fold CheckTypeInfoFlags on ImplementsDefaultHasInstance
https://bugs.webkit.org/show_bug.cgi?id=185670

Reviewed by Yusuke Suzuki.

JSTests:

* microbenchmarks/constant-fold-check-type-info-flags.js: Added.
* stress/dont-constant-fold-check-type-info-on-bound-function.js: Added.

Source/JavaScriptCore:

This patch makes it so that we constant fold CheckTypeInfoFlags for
ImplementsDefaultHasInstance inside of AI/constant folding. We constant
fold in three ways:
- When the incoming value is a constant, we just look at its inline type
flags. Since those flags never change after an object is created, this
is sound.
- Based on the incoming value having a finite structure set. We just iterate
all structures and ensure they have the bit set.
- Based on speculated type. To do this, I split up SpecFunction into two
subheaps where one is for functions that have the bit set, and one for
functions that don't have the bit set. The latter is currently only comprised
of JSBoundFunctions. To constant fold, we check that the incoming
value only has the SpecFunction type with ImplementsDefaultHasInstance set.

* bytecode/SpeculatedType.cpp:
(JSC::speculationFromClassInfo):
* bytecode/SpeculatedType.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* runtime/JSFunction.cpp:
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::assertTypeInfoFlagInvariants):
* runtime/JSFunction.h:
(JSC::JSFunction::assertTypeInfoFlagInvariants):
* runtime/JSFunctionInlines.h:
(JSC::JSFunction::JSFunction):

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

15 months agoWeb Inspector: create a navigation item for toggling the overlay rulers/guides
webkit@devinrousso.com [Thu, 17 May 2018 01:37:33 +0000 (01:37 +0000)]
Web Inspector: create a navigation item for toggling the overlay rulers/guides
https://bugs.webkit.org/show_bug.cgi?id=185644

Reviewed by Matt Baker.

Source/JavaScriptCore:

* inspector/protocol/OverlayTypes.json:
* inspector/protocol/Page.json:

Source/WebCore:

This patch is purely a visual change for WebInspector, and doesn't affect anything else.

* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::setShowRulers): Added.

* inspector/InspectorOverlay.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::shouldShowOverlay):
(WebCore::InspectorOverlay::update):
(WebCore::InspectorOverlay::setShowRulers): Added.
(WebCore::InspectorOverlay::drawRulers): Added.
(WebCore::InspectorOverlay::reset):

* inspector/InspectorOverlayPage.js:
(drawNodeHighlight):
(drawQuadHighlight):
(drawRulers): Added.
(_drawBounds): Added.
(reset):
(_drawRulers): Deleted.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Setting.js:
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.get navigationItems):
(WI.DOMTreeContentView.prototype.closed):
(WI.DOMTreeContentView.prototype._showRulersChanged): Added.
(WI.DOMTreeContentView.prototype._toggleShowRulers): Added.

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