WebKit-https.git
5 years agocancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
commit-queue@webkit.org [Fri, 19 Jun 2015 17:38:24 +0000 (17:38 +0000)]
cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
https://bugs.webkit.org/show_bug.cgi?id=146140

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-06-19
Reviewed by Eric Carlson.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebCALayerHostWrapper dealloc]): Added.
(-[WebAVVideoLayer dealloc]): Deleted.

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

5 years agoAddress review feedback from Darin.
andersca@apple.com [Fri, 19 Jun 2015 17:27:06 +0000 (17:27 +0000)]
Address review feedback from Darin.

* Shared/mac/HangDetectionDisablerMac.mm:
(WebKit::clientsMayIgnoreEvents):

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

5 years ago[WinCairo] Null pointer crash in BitmapTexture::updateContents.
peavo@outlook.com [Fri, 19 Jun 2015 17:13:27 +0000 (17:13 +0000)]
[WinCairo] Null pointer crash in BitmapTexture::updateContents.
https://bugs.webkit.org/show_bug.cgi?id=146147

Reviewed by Brent Fulgham.

Added null pointer check.

* platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::updateContents):

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

5 years agoDisable SpinTracer detection while loading sync XHR
andersca@apple.com [Fri, 19 Jun 2015 17:08:28 +0000 (17:08 +0000)]
Disable SpinTracer detection while loading sync XHR
https://bugs.webkit.org/show_bug.cgi?id=146150
rdar://problem/21462023

Reviewed by Dan Bernstein.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):

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

5 years agoUpdate font and font-family keyword completions
jonlee@apple.com [Fri, 19 Jun 2015 16:58:14 +0000 (16:58 +0000)]
Update font and font-family keyword completions
https://bugs.webkit.org/show_bug.cgi?id=144558
<rdar://problem/20795292>

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSKeywordCompletions.js: Replace -webkit-system-font and
-apple-system-font with -apple-system, which is the recommended token for getting the
system font. Also add -title{1,2,3} for font, as they were missing, but already exist
in font-family.

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

5 years agoSpintracer treats the web process as hung when it's showing JavaScript dialogs in...
andersca@apple.com [Fri, 19 Jun 2015 16:53:49 +0000 (16:53 +0000)]
Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
https://bugs.webkit.org/show_bug.cgi?id=146124
rdar://problem/21449395

Reviewed by Geoffrey Garen.

Add a HangDetectionDisabler RAII object and use it for JavaScript panels.

* Shared/HangDetectionDisabler.h: Added.
(WebKit::HangDetectionDisabler::HangDetectionDisabler):
(WebKit::HangDetectionDisabler::~HangDetectionDisabler):
* Shared/mac/HangDetectionDisablerMac.mm: Added.
(WebKit::clientsMayIgnoreEvents):
(WebKit::setClientsMayIgnoreEvents):
(WebKit::HangDetectionDisabler::HangDetectionDisabler):
(WebKit::HangDetectionDisabler::~HangDetectionDisabler):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):

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

5 years agoFixed the build for platforms that don’t have SafariServices.
mitz@apple.com [Fri, 19 Jun 2015 16:05:54 +0000 (16:05 +0000)]
Fixed the build for platforms that don’t have SafariServices.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):

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

5 years agoFix the Windows build after r185721
peavo@outlook.com [Fri, 19 Jun 2015 13:31:52 +0000 (13:31 +0000)]
Fix the Windows build after r185721
https://bugs.webkit.org/show_bug.cgi?id=146146

Reviewed by Csaba Osztrogonác.

Speculative buildfix.

* DumpRenderTree/win/UIDelegate.h:
(UIDelegate::unused4): Added.
(UIDelegate::webViewShouldInterruptJavaScript): Deleted.

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

5 years agoUnreviewed. Add myself as a committer.
dpino@igalia.com [Fri, 19 Jun 2015 11:10:55 +0000 (11:10 +0000)]
Unreviewed. Add myself as a committer.

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

5 years agoRemove unnecessary svn:executable flags
ossy@webkit.org [Fri, 19 Jun 2015 09:52:57 +0000 (09:52 +0000)]
Remove unnecessary svn:executable flags
https://bugs.webkit.org/show_bug.cgi?id=146107

Reviewed by Alexey Proskuryakov.

webkit-patch landed only the changelog changes in r185744.

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

5 years agoRemove unnecessary svn:executable flags
ossy@webkit.org [Fri, 19 Jun 2015 09:43:44 +0000 (09:43 +0000)]
Remove unnecessary svn:executable flags
https://bugs.webkit.org/show_bug.cgi?id=146107

Reviewed by Alexey Proskuryakov.

.:

* ManualTests/iframe_notifications/iframe-reparenting-close-window-child.html: Removed property svn:executable.
* ManualTests/iframe_notifications/iframe-reparenting-close-window-iframe.html: Removed property svn:executable.
* ManualTests/iframe_notifications/iframe-reparenting-close-window.html: Removed property svn:executable.
* ManualTests/select-menu-list-wrongly-positioned.html: Removed property svn:executable.
* ManualTests/svg-text-float-not-removed-crash.html: Removed property svn:executable.

Source/WebCore:

* html/canvas/CanvasRenderingContext2D.cpp: Removed property svn:executable.
* mathml/MathMLMencloseElement.cpp: Removed property svn:executable.
* mathml/MathMLMencloseElement.h: Removed property svn:executable.
* platform/efl/RenderThemeEfl.cpp: Removed property svn:executable.
* rendering/mathml/RenderMathMLMenclose.cpp: Removed property svn:executable.
* rendering/mathml/RenderMathMLMenclose.h: Removed property svn:executable.

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp: Removed property svn:executable.

Tools:

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/images/favicon-green.png: Removed property svn:executable.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/images/favicon-red.png: Removed property svn:executable.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/External/daterangepicker.css: Removed property svn:executable.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/External/jquery.daterangepicker.js: Removed property svn:executable.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/External/moment.min.js: Removed property svn:executable.
* BuildSlaveSupport/build.webkit.org-config/templates/root.html: Removed property svn:executable.
* CygwinDownloader/cygwin-downloader.zip: Removed property svn:executable.
* DumpRenderTree/ForwardingHeaders/runtime/JSExportMacros.h: Removed property svn:executable.
* DumpRenderTree/win/TextInputController.cpp: Removed property svn:executable.
* DumpRenderTree/win/TextInputController.h: Removed property svn:executable.
* DumpRenderTree/win/TextInputControllerWin.cpp: Removed property svn:executable.
* Scripts/webkitpy/port/base_unittest.py: Removed property svn:executable.
* Scripts/webkitpy/port/driver.py: Removed property svn:executable.
* Scripts/webkitpy/w3c/test_parser.py: Removed property svn:executable.

Websites/perf.webkit.org:

* public/js/helper-classes.js: Removed property svn:executable.
* public/js/jquery.flot.plugins.js: Removed property svn:executable.
* public/v2/app.css: Removed property svn:executable.
* public/v2/app.js: Removed property svn:executable.
* public/v2/chart-pane.css: Removed property svn:executable.
* public/v2/data.js: Removed property svn:executable.
* public/v2/index.html: Removed property svn:executable.
* public/v2/js/d3/LICENSE: Removed property svn:executable.
* public/v2/js/d3/d3.js: Removed property svn:executable.
* public/v2/js/d3/d3.min.js: Removed property svn:executable.
* public/v2/js/ember-data.js: Removed property svn:executable.
* public/v2/js/ember.js: Removed property svn:executable.
* public/v2/js/handlebars.js: Removed property svn:executable.
* public/v2/js/jquery.min.js: Removed property svn:executable.
* public/v2/js/statistics.js: Removed property svn:executable.
* public/v2/manifest.js: Removed property svn:executable.
* public/v2/popup.js: Removed property svn:executable.

Websites/webkit.org:

* blog-files/inspector/css_as_authored.png: Removed property svn:executable.
* blog-files/inspector/css_autocomplete.png: Removed property svn:executable.
* blog-files/inspector/css_rule_diff.png: Removed property svn:executable.
* blog-files/inspector/css_unknown_properties.png: Removed property svn:executable.
* blog-files/inspector/warning_10x10.png: Removed property svn:executable.
* demos/regions/pizza-regions-manifesto-regionstyling.html: Removed property svn:executable.
* demos/regions/pizza-regions-manifesto.html: Removed property svn:executable.
* demos/regions/yellow-pizza.jpg: Removed property svn:executable.

LayoutTests:

* fast/block/float/intruding-float-not-removed-writing-mode.xhtml: Removed property svn:executable.
* fast/canvas/script-tests/canvas-image-shadow.js: Removed property svn:executable.
* fast/css-grid-layout/resources/display-grid-set-get.js: Removed property svn:executable.
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Removed property svn:executable.
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Removed property svn:executable.
* fast/css/readonly-pseudoclass-common-element.html: Removed property svn:executable.
* fast/css/readwrite-pseudoclass-editable.html: Removed property svn:executable.
* fast/dom/HTMLObjectElement/beforeload-set-text-crash.xhtml: Removed property svn:executable.
* fast/dom/resources/node-move-to-new-document-crash.svg: Removed property svn:executable.
* fast/dom/text-node-attach-crash.xhtml: Removed property svn:executable.
* fast/dynamic/crash-paint-no-documentElement-renderer.html-disabled: Removed property svn:executable.
* fast/frames/resources/subframe-load-crash.svg: Removed property svn:executable.
* fast/text/split-text-crash.xhtml: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-onchecking.manifest: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-onchecking.text: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-ondownloading-resource-404.manifest: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-ondownloading.manifest: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-ondownloading.text: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-onprogress-1.text: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-onprogress-2.text: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-onprogress-3.text: Removed property svn:executable.
* http/tests/appcache/resources/abort-cache-onprogress-4.text: Removed property svn:executable.
* http/tests/xmlhttprequest/methods-async-expected.txt: Removed property svn:executable.
* http/tests/xmlhttprequest/methods-expected.txt: Removed property svn:executable.
* http/tests/xmlhttprequest/workers/methods-async-expected.txt: Removed property svn:executable.
* http/tests/xmlhttprequest/workers/methods-expected.txt: Removed property svn:executable.
* platform/efl/mathml/presentation/menclose-notation-default-longdiv-expected.png: Removed property svn:executable.
* platform/gtk/mathml/presentation/menclose-notation-default-longdiv-expected.png: Removed property svn:executable.
* platform/mac/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.png: Removed property svn:executable.
* platform/mac/mathml/presentation/menclose-notation-default-longdiv-expected.png: Removed property svn:executable.
* platform/win/fast/canvas/fallback-content-expected.txt: Removed property svn:executable.
* platform/win/fast/dom/tabindex-clamp-expected.txt: Removed property svn:executable.
* platform/win/fast/events/ondrop-text-html-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/basic-textareas-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/basic-textareas-quirks-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/button-inner-block-reuse-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/control-clip-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/fieldset-align-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/fieldset-legend-padding-unclipped-fieldset-border-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/fieldset-with-float-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/float-before-fieldset-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/focus-selection-textarea-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/indeterminate-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-appearance-readonly-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-appearance-visibility-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-first-letter-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-readonly-dimmed-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-spaces-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-text-click-outside-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-type-text-min-width-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/input-width-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/listbox-onchange-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/menulist-option-wrap-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/menulist-separator-painting-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/negativeLineHeight-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/onselect-textarea-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/placeholder-pseudo-style-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/range/input-appearance-range-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/range/range-thumb-height-percentage-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/range/slider-padding-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/range/slider-thumb-shared-style-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/range/slider-thumb-stylability-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/range/thumbslider-no-parent-slider-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/search-cancel-button-style-sharing-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/search-display-none-cancel-button-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/search-rtl-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/search-vertical-alignment-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/select-background-none-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/select-empty-option-height-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/select-size-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/select-style-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/select-visual-hebrew-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/selectlist-minsize-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/stuff-on-my-optgroup-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textAreaLineHeight-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textarea-align-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textarea-metrics-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textarea-placeholder-pseudo-style-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textarea-scroll-height-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textarea-scrolled-type-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textarea-setinnerhtml-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textfield-overflow-by-value-update-expected.txt: Removed property svn:executable.
* platform/win/fast/forms/textfield-overflow-expected.txt: Removed property svn:executable.
* platform/win/fast/html/details-no-summary4-expected.txt: Removed property svn:executable.
* platform/win/fast/html/details-open-javascript-expected.txt: Removed property svn:executable.
* platform/win/fast/html/details-open2-expected.txt: Removed property svn:executable.
* platform/win/fast/html/details-open4-expected.txt: Removed property svn:executable.
* platform/win/fast/repaint/slider-thumb-drag-release-expected.txt: Removed property svn:executable.
* platform/win/fast/repaint/slider-thumb-float-expected.txt: Removed property svn:executable.
* platform/win/fast/replaced/table-percent-height-expected.txt: Removed property svn:executable.
* platform/win/fast/replaced/three-selects-break-expected.txt: Removed property svn:executable.
* platform/win/fast/transforms/transformed-focused-text-input-expected.txt: Removed property svn:executable.
* platform/win/inverted-colors/non-composited-expected.png: Removed property svn:executable.
* platform/win/inverted-colors/resources/gradient.png: Removed property svn:executable.
* platform/win/js/dom/constructor-length-expected.txt: Removed property svn:executable.
* platform/win/platform/win/accessibility/option-element-position-and-size-expected.txt: Removed property svn:executable.
* platform/win/tables/mozilla/bugs/bug131020-expected.png: Removed property svn:executable.
* platform/wk2/http/tests/media/video-auth-expected.txt: Removed property svn:executable.
* svg/animations/animate-beginElementAt.svg: Removed property svn:executable.
* svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml: Removed property svn:executable.
* svg/custom/assert-empty-layout-attributes.svg: Removed property svn:executable.
* svg/custom/crash-text-in-textpath.svg: Removed property svn:executable.
* svg/custom/intersection-list-crash.svg: Removed property svn:executable.
* svg/custom/resources/crash-textPath-attributes-iframe.svg: Removed property svn:executable.
* svg/custom/symbol-viewport-element-crash.svg: Removed property svn:executable.
* svg/custom/text-node-in-text-invalidated.svg: Removed property svn:executable.
* svg/dom/resources/SVGStyledElement-pendingResource-crash.svg: Removed property svn:executable.
* svg/text/font-size-null-assertion.svg: Removed property svn:executable.

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

5 years agoDisable tests on the WinCairo buildbot
ossy@webkit.org [Fri, 19 Jun 2015 08:33:29 +0000 (08:33 +0000)]
Disable tests on the WinCairo buildbot
https://bugs.webkit.org/show_bug.cgi?id=146106

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

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

5 years ago[WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
ossy@webkit.org [Fri, 19 Jun 2015 08:22:09 +0000 (08:22 +0000)]
[WK2] Fix unused-private-field warning in WebProcess/Plugins/PluginView.<h|cpp>
https://bugs.webkit.org/show_bug.cgi?id=145252

Reviewed by Tim Horton.

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView): Added the necessary ifdef guard.
* WebProcess/Plugins/PluginView.h: Added the necessary ifdef guard.
* WebProcess/WebPage/WebPage.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC to WTF.

Source/WTF:

* wtf/FeatureDefines.h: Moved the definition of ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC
here from Source/WebKit2/WebProcess/WebPage/WebPage.h

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

5 years agoWeb Inspector: Avoid getOwnPropertyNames/Symbols on very large lists
commit-queue@webkit.org [Fri, 19 Jun 2015 08:05:54 +0000 (08:05 +0000)]
Web Inspector: Avoid getOwnPropertyNames/Symbols on very large lists
https://bugs.webkit.org/show_bug.cgi?id=146141

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-19
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype._propertyDescriptors):
Avoid calling getOwnPropertyNames/Symbols on very large lists. Instead
just generate property descriptors for the first 100 indexes. Note
this would behave poorly for sparse arrays with a length > 100, but
general support for lists with more than 100 elements is poor. See:
<https://webkit.org/b/143589> Web Inspector: Better handling for large collections in Object Trees

Source/WebInspectorUI:

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
When building completions for a large array, instead of building a list of all the indices
just send a single number back to the frontend and let it generate a list for completion.
We should do even better and avoid building a lookup table here for completion of an index.

LayoutTests:

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
There were existing progressions (0 => -1).
There were existing regressions (RegExp properties moving to prototype with descriptors on the prototype).
Add a test for a very large list that would have caused out of memory / hang.

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

5 years ago[EFL] Fix the minibrowser after r185725
commit-queue@webkit.org [Fri, 19 Jun 2015 07:58:54 +0000 (07:58 +0000)]
[EFL] Fix the minibrowser after r185725
https://bugs.webkit.org/show_bug.cgi?id=146135

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-06-19
Reviewed by Gyuyoung Kim.

Removed the HAVE_ECORE_X guard in MiniBrowser because it is an unnecessary guard
for the elm_config_accel_preference_set() to set the config of acceleration preference.

* MiniBrowser/efl/main.c:
(elm_main): Deleted the HAVE_ECORE_X guard.

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

5 years agoBindings generator should generate code to catch exception and reject promises for...
youenn.fablet@crf.canon.fr [Fri, 19 Jun 2015 07:33:35 +0000 (07:33 +0000)]
Bindings generator should generate code to catch exception and reject promises for Promise-based APIs
https://bugs.webkit.org/show_bug.cgi?id=146060

Reviewed by Darin Adler.

The binding generator splits the function that binds JS to the DOM class implementation in two for functions returning promise.
The first function, called from JS, is responsible of casting this to the expected JSXXX class.
If casting fails, an exception is raised. Otherwise, it calls the second function.
After calling the second function, it checks whether an exception is raised, in which case it returns a rejected promise.
The second function is responsible of argument conversion and calling the DOM class function.

Covered by expectations and AudioContext promise still working.
A test case is added for a promise returning function taking a typed argument as input (if argument value cannot be typed, the promise is rejected).
A second test case is a promise-returning function that can raise an exception. In that case the DOMException is used as rejection value.

As can be seen from generated code, this generalized code adds a mandatory check (is there an exception?) at the end of the function.
This check is done even in cases we know there will be no exception.
This may be covered by another patch if this optimization is thought useful enough.

* bindings/js/JSDOMPromise.cpp:
(WebCore::rejectPromiseWithExceptionIfAny): Utility method for the binding code.
(WebCore::callPromiseFunction): Ditto.
* bindings/js/JSDOMPromise.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateFunctionCastedThis): Extracted from GenerateImplementationFunctionCall to reuse it in case of promise-returning functions.
(GenerateImplementationFunctionCall):
(GenerateCallbackImplementation): Deleted.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
* bindings/scripts/test/TestObj.idl:

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

5 years agoDo not store configuration parameters twice in WebProcessPool
carlosgc@webkit.org [Fri, 19 Jun 2015 05:59:43 +0000 (05:59 +0000)]
Do not store configuration parameters twice in WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=146102

Reviewed by Sam Weinig.

Since we are copying the given WebProcessPoolConfiguration and
keeping it as a member, we don't need to keep an additional copy
of its contents as extra members. This also prevents
inconsistencies between the values in the configuration and the
members when any of them are modified by WebProcessPool API.

* UIProcess/API/APIProcessPoolConfiguration.h: Return a const
reference instead of a temporary in methods returning a String.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::updateProcessSuppressionState):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setProcessModel):
(WebKit::WebProcessPool::setMaximumNumberOfProcesses):
(WebKit::WebProcessPool::networkingProcessConnection):
(WebKit::WebProcessPool::languageChanged):
(WebKit::WebProcessPool::setUsesNetworkProcess):
(WebKit::WebProcessPool::usesNetworkProcess):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::ensureSharedWebProcess):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::postMessageToInjectedBundle):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
(WebKit::WebProcessPool::setCacheModel):
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
(WebKit::WebProcessPool::requestWebContentStatistics):
(WebKit::WebProcessPool::requestNetworkingStatistics):
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToNetworkingProcess):
(WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
(WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
(WebKit::WebProcessPool::sendToOneProcess):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess):

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

5 years ago[EFL] Unreviewed, gardening on June 19th.
gyuyoung.kim@webkit.org [Fri, 19 Jun 2015 05:48:24 +0000 (05:48 +0000)]
[EFL] Unreviewed, gardening on June 19th.

Mark fast/css/named-images.html to Missing. Additionally accessibility/math-multiscript-attributes.html
and accessibility/transformed-element.html are treated as failure.

* platform/efl/TestExpectations:

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

5 years agoWeb Inspector: Rendering Frames timeline selection should snap to frame boundaries
mattbaker@apple.com [Fri, 19 Jun 2015 04:45:34 +0000 (04:45 +0000)]
Web Inspector: Rendering Frames timeline selection should snap to frame boundaries
https://bugs.webkit.org/show_bug.cgi?id=146120

Reviewed by Timothy Hatcher.

* UserInterface/Views/RenderingFrameTimelineOverview.js:
Enable snapping to frame boundaries.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection):
Updated filtering to account for ruler snapping.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.get snapInterval):
(WebInspector.TimelineRuler.prototype.set snapInterval):
(WebInspector.TimelineRuler.prototype.set selectionStartTime):
(WebInspector.TimelineRuler.prototype.set selectionEndTime):
(WebInspector.TimelineRuler.prototype._snapValue):
(WebInspector.TimelineRuler.prototype._handleMouseMove):
Added support for snapping to a specified interval.

* UserInterface/Views/TimelineSidebarPanel.js:
Removed unnecessary code.

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

5 years agoDisable UIWindow for fullscreen video for selected clients.
commit-queue@webkit.org [Fri, 19 Jun 2015 03:46:06 +0000 (03:46 +0000)]
Disable UIWindow for fullscreen video for selected clients.
https://bugs.webkit.org/show_bug.cgi?id=145852

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-06-18
Reviewed by Simon Fraser.

Disable UIWindow for fullscreen video doesn't work everywhere (rdar://problem/21315993), so just disable it when creating a UIWindow won't work.
Fix some interface hiding and layout problems that showed up in the non UIWindow code path.

* platform/RuntimeApplicationChecksIOS.h:
* platform/RuntimeApplicationChecksIOS.mm: Remove iAD bundle identifier.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Opt out of UIWindow when hosted in another process. And fix view parenting for non-window case.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Fix for AVKit exit fullscreen complaining about -needsLayout.

(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
(WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
(WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
(WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
These hide and show the view controller where we hide and show the window.

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

5 years agoExtend capability of run-benchmark script to support mobile device
commit-queue@webkit.org [Fri, 19 Jun 2015 02:32:40 +0000 (02:32 +0000)]
Extend capability of run-benchmark script to support mobile device
https://bugs.webkit.org/show_bug.cgi?id=146125

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-06-18
Reviewed by Ryosuke Niwa.

Extend capability of run-benchmark to support mobile device, and move majority of run-benchmark script code to
benchmark_runner directory, and make run-benchmark a wrapping script. Also correct a typo.

* Scripts/run-benchmark:
(main): Deleted.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__):
(BenchmarkRunner.execute):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
(BrowserDriver.prepareEnv):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver.prepareEnv):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.prepareEnv):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver.getReturnCode):
(HTTPServerDriver):
(HTTPServerDriver.setDeviceID):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Copied from Tools/Scripts/run-benchmark.
(parse_args):
(start):
(main):
* Scripts/webkitpy/benchmark_runner/utils.py:
(getPathFromProjectRoot):

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

5 years agoProvide a way for web developers to draw a Theme-specific Wireless Playback icon
dino@apple.com [Fri, 19 Jun 2015 01:13:37 +0000 (01:13 +0000)]
Provide a way for web developers to draw a Theme-specific Wireless Playback icon
https://bugs.webkit.org/show_bug.cgi?id=146123
<rdar://problem/21119287>

Reviewed by Simon Fraser.

Source/WebCore:

Implement a -webkit-named-image() CSS <image> generator that allows a site to
request artwork by name and get the platform variant. At the moment
we only support "wireless-playback" which returns a generic image everywhere
but Cocoa platforms, where we render the AirPlay icon.

In order to do this I added a ThemeCocoa to share any Theme code between
Mac and iOS.

Test: fast/css/named-icons.html

* WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.

* css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):

* css/CSSNamedImageValue.cpp: New class. Just holds a name String.
(WebCore::CSSNamedImageValue::customCSSText):
(WebCore::CSSNamedImageValue::image):
(WebCore::CSSNamedImageValue::equals):
* css/CSSNamedImageValue.h:
(WebCore::CSSNamedImageValue::create):
(WebCore::CSSNamedImageValue::isFixedSize):
(WebCore::CSSNamedImageValue::isPending):
(WebCore::CSSNamedImageValue::CSSNamedImageValue):

* css/CSSParser.cpp:
(WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
(WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
(WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
* css/CSSParser.h:

* css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.

* platform/Theme.cpp:
(WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
* platform/Theme.h: Add drawNamedImage.

* platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
(WebCore::fitContextToBox):
(WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
* platform/cocoa/ThemeCocoa.h:

* platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.

* platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.

* platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
(WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
(WebCore::NamedImageGeneratedImage::draw):
(WebCore::NamedImageGeneratedImage::drawPattern):
* platform/graphics/NamedImageGeneratedImage.h:

* platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
* platform/mac/ThemeMac.h: Ditto.

LayoutTests:

Test the new -webkit-named-image CSS generator. Only "wireless-playback"
is supported for now, and has platform-specific results for Cocoa.

* fast/css/named-images-expected.png: Added.
* fast/css/named-images.html: Added.
* platform/mac/fast/css/named-images-expected.png: Added.
* platform/mac/fast/css/named-images-expected.txt: Added.

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

5 years ago[CSS3] Add support for the word-break:keep-all CSS property
mmaxfield@apple.com [Thu, 18 Jun 2015 23:59:19 +0000 (23:59 +0000)]
[CSS3] Add support for the word-break:keep-all CSS property
https://bugs.webkit.org/show_bug.cgi?id=123782

Reviewed by Darin Adler.

Source/WebCore:

Add support for word-break:keep-all CSS property by CSS3 spec:
http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property

Test: fast/text/word-break-keep-all.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
* css/CSSValueKeywords.in:
* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
* rendering/break_lines.h:
(WebCore::nextBreakablePositionKeepingAllWords):
(WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
(WebCore::isBreakable):
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
* rendering/style/RenderStyleConstants.h:

LayoutTests:

* fast/text/word-break-keep-all.html: Added.
* platform/mac/fast/text/word-break-keep-all-expected.png: Added.
* platform/mac/fast/text/word-break-keep-all-expected.txt: Added.

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

5 years ago[DFG] Avoid OSR exit in the middle of string concatenation
utatane.tea@gmail.com [Thu, 18 Jun 2015 23:45:06 +0000 (23:45 +0000)]
[DFG] Avoid OSR exit in the middle of string concatenation
https://bugs.webkit.org/show_bug.cgi?id=145820

Reviewed by Filip Pizlo.

DFG attempt to compile ValueAdd with String type into MakeRope(left, ToString(ToPrimitive(right))).

So when right is speculated as SpecObject, ToPrimitive(SpecObject) is speculated as SpecString.
It leads ToString to become Identity with a speculated type check.

However, ToPrimitive and ToString are originated from the same bytecode. And ToPrimitive may have
an observable side effect when the given parameter is an object (calling object.{toString,valueOf}).

So when object.toString() returns a number (it is allowed in the ES spec), ToPrimitive performs
observable `object.toString()` calling. But ToString is converted into a speculated type check for
SpecString and it raises OSR exit. And we exit to the original ValueAdd's bytecode position and
it redundantly performs an observable ToPrimitive execution.

To fix this, this patch avoid fixing up for newly introduced ToString node.
Since fix up phase is not iterated repeatedly, by avoiding fixing up when generating the node,
we can avoid conversion from ToString to Check.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
* tests/stress/toprimitive-speculated-types.js: Added.
(shouldBe):
(raw):
(Counter):

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

5 years agoUpdate AVKit usage of pip
jonlee@apple.com [Thu, 18 Jun 2015 23:42:22 +0000 (23:42 +0000)]
Update AVKit usage of pip
https://bugs.webkit.org/show_bug.cgi?id=146095
<rdar://problem/21386853>

Reviewed by Eric Carlson.

Source/WebCore:

- Rename enum VideoFullscreenModeOptimized to VideoFullscreenModePictureInPicture
- Rename MediaElementSession::allowsAlternateFullscreen to allowsPictureInPicture
- Rename Settings::allowsAlternateFullscreen to allowsPictureInPictureMediaPlayback
- Update AVKit calls and AVKitSPI.h
- Rename WebVideoFullscreenInterfaceAVKit delegate functions and member variables

* html/HTMLMediaElement.cpp:
* html/HTMLVideoElement.cpp:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::allowsPictureInPicture): Renamed.
(WebCore::MediaElementSession::allowsAlternateFullscreen): Deleted.
* html/MediaElementSession.h:
* page/Settings.cpp:
* page/Settings.in:
* platform/graphics/MediaPlayerEnums.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove unused setIsOptimized.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
* platform/spi/cocoa/AVKitSPI.h: Remove unused typedef.
* platform/spi/mac/AVFoundationSPI.h:

Source/WebKit/mac:

- Rename preference key
- Rename shouldAllowAlternateFullscreen to shouldAllowPictureInPictureMediaPlayback

* WebCoreSupport/WebSystemInterface.mm:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences allowsAlternateFullscreen]): Call allowsPictureInPictureMediaPlayback.
(-[WebPreferences setAllowsAlternateFullscreen:]):
(-[WebPreferences allowsPictureInPictureMediaPlayback]): Added.
(-[WebPreferences setAllowsPictureInPictureMediaPlayback:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:

Source/WebKit2:

- Rename preference key
- Rename shouldAllowAlternateFullscreen to shouldAllowPictureInPictureMediaPlayback

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp: Remove unused preference calls.
(WKPreferencesSetAllowsAlternateFullscreen): Deleted.
(WKPreferencesGetAllowsAlternateFullscreen): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingVideoPictureInPicture]): Renamed.
(-[WKWebView _isShowingVideoOptimized]): Deleted.
(-[WKWebView _mayAutomaticallyShowVideoPictureInPicture]): Renamed.
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Deleted.
(shouldAllowPictureInPictureMediaPlayback): Renamed.
(shouldAllowAlternateFullscreen): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: Rename local variables.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoPictureInPicture): Renamed.
(WebKit::WebVideoFullscreenManagerProxy::mayAutomaticallyShowVideoOptimized): Deleted.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/ios/WebVideoFullscreenManager.mm:

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

5 years agoFix crash when entering fullscreen during exit fullscreen animation.
commit-queue@webkit.org [Thu, 18 Jun 2015 23:38:55 +0000 (23:38 +0000)]
Fix crash when entering fullscreen during exit fullscreen animation.
https://bugs.webkit.org/show_bug.cgi?id=146117

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-06-18
Reviewed by Simon Fraser.

Source/WebCore:

Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown
should not imply a fullscreen state change on video element.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread
(-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoElement):
Changing associated video element does not imply fullscreen mode change.

Source/WebKit2:

A partial teardown left the LayerHostingContext in a bad state when attempting to reuse the model and interface
objects. Instead, complete the teardown and don't reuse the objects.

* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didEnterFullscreen): WebThreadRun is a no-op in WK2. Use dispatch_async.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): Do complete teardown before entering fullscreen again.

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

5 years ago[EFL] Use SET_AND_EXPOSE_TO_BUILD instead of definitions
ryuan.choi@navercorp.com [Thu, 18 Jun 2015 23:35:24 +0000 (23:35 +0000)]
[EFL] Use SET_AND_EXPOSE_TO_BUILD instead of definitions
https://bugs.webkit.org/show_bug.cgi?id=146108

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:

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

5 years agoWeb Inspector: Add a filter for CSS properties in the Styles sidebar
commit-queue@webkit.org [Thu, 18 Jun 2015 22:24:37 +0000 (22:24 +0000)]
Web Inspector: Add a filter for CSS properties in the Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=145536

Patch by Devin Rousso <drousso@apple.com> on 2015-06-18
Reviewed by Timothy Hatcher.

* UserInterface/Base/Utilities.js: Added function to Strings that returns an array of all matching indexes of a given string.
(.value):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.findMatchingPropertiesAndSelectors): Loops through the property list and selectors of each section to find matches to the filtered text.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.findMatchingProperties): Searches through the properties list to find and highlight all matching properties.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.removeNonMatchingProperties): Removes all properties that do not match and highlights the specific matched text in matching properties.
(WebInspector.CSSStyleDeclarationTextEditor.prototype.resetFilteredProperties): Restores all properties to full visibility and removes any highlighting.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): Classes are added to selections of the text editor of that partiular selection contains text which matches the filter (see CSSStyleDetailsSidebarPanel.css for different classes).
(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties): If a filter is active, find properties matching the filter instead of all properties.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content.has-filter-bar + .filter-bar):
(.sidebar > .panel.details.css-style > .content:not(.has-filter-bar) + .filter-bar):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel): Added a filter bar to the CSS sidebar.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels): Switching panels preserves and applies filter bar text.
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange): Function called when the filter bar text changes that calls the current panel's filterDidChange function if it exists.
* UserInterface/Views/FilterBar.js: Added function and variable to check if the text in the filter bar had changed.
* UserInterface/Views/MetricsStyleDetailsPanel.js:
(WebInspector.MetricsStyleDetailsPanel.prototype.refresh): Now calls superclass refresh.
(WebInspector.MetricsStyleDetailsPanel): Added delegate variable to constructor.
* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label):
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label ~ .label):
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label.filter-matching-label):
(.sidebar > .panel.details.css-style > .content.filter-in-progress .new-rule):
(.sidebar > .panel.details.css-style > .content.filter-in-progress .style-declaration-section:not(.filter-section-non-matching) ~ .label:not(.filter-section-non-matching)):
(.sidebar > .panel.details.css-style > .content:not(.filter-in-progress) > .rules > .new-rule + .style-declaration-section):
(.sidebar > .panel.details.css-style > .content > .rules:not(.filter-non-matching) > .no-filter-results):
(.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results):
(.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel): Added delegate variable to constructor.
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Now calls superclass refresh.
(WebInspector.RulesStyleDetailsPanel.prototype.filterDidChange): Function to search through the computed styles list and highlight all matched properties and selectors of the filter bar text, turning all non matching properties slightly opaque (unless a selector for that property is a match).
(WebInspector.StyleDetailsPanel): Added delegate variable to constructor.
(WebInspector.StyleDetailsPanel.prototype.refresh): Added event dispatch for panel refresh.

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

5 years agoWeb Inspector: improve generated types for objects passed to backend commands
joepeck@webkit.org [Thu, 18 Jun 2015 22:07:15 +0000 (22:07 +0000)]
Web Inspector: improve generated types for objects passed to backend commands
https://bugs.webkit.org/show_bug.cgi?id=146091

Patch by Brian J. Burg <burg@cs.washington.edu> on 2015-06-18
Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

The main change is that objects passed in will have a type like const T& or const T*,
rather than const RefPtr<T>&&. These protocol objects are owned by the generated dispatcher
methods and only exist to pass data to backend command implementations. So, there is no
reason for callees to add a reference or take ownership of these inputs.

Some small improvements were made in the code generator to standardize how these
expressions are generated for parameters. Optional in parameters are now prefixed with
'opt_in_' to make the generated method signatures and implementations clearer.

* inspector/InspectorValues.cpp:
(Inspector::InspectorArrayBase::get): Add const qualifier.
* inspector/InspectorValues.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::setBreakpointByUrl):
(Inspector::parseLocation):
(Inspector::InspectorDebuggerAgent::setBreakpoint):
(Inspector::InspectorDebuggerAgent::continueToLocation):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::callFunctionOn):
(Inspector::InspectorRuntimeAgent::saveResult):
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/agents/InspectorRuntimeAgent.h:

* inspector/scripts/codegen/cpp_generator.py: Always generate PrimitiveType('array').
(CppGenerator.cpp_type_for_unchecked_formal_in_parameter): Alter the type signature
for an unchecked input to use pointers or references.

* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:
(CppBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):
(CppBackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
Local variables for optional parameters now have the 'opt_' prefix.

* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
Local variables for optional parameters now have the 'opt_' prefix.
Split parameterName and parameterKey into two separate template variables to avoid mixups.

* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:

Source/WebCore:

Update type signatures for backend command implementations. In a few cases, clean
up relevant helper function signatures and copy data out of parameter objects where
the code previously held onto a reference.

No new tests, no behavior changed.

* inspector/InspectorCSSAgent.cpp:
(WebCore::computePseudoClassMask):
(WebCore::InspectorCSSAgent::setStyleText):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::forcePseudoState):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::parseColor):
(WebCore::parseConfigColor):
(WebCore::parseQuad):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::setSearchingForNode):
(WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
(WebCore::InspectorDOMAgent::setInspectModeEnabled):
(WebCore::InspectorDOMAgent::highlightRect):
(WebCore::InspectorDOMAgent::highlightQuad):
(WebCore::InspectorDOMAgent::innerHighlightQuad):
(WebCore::InspectorDOMAgent::highlightNode):
(WebCore::InspectorDOMAgent::highlightFrame):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::findStorageArea):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::requestData):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorReplayAgent.cpp:
(WebCore::InspectorReplayAgent::replayToPosition):
* inspector/InspectorReplayAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
Clean up extraHTTPHeaders to copy header key/values out of the InspectorObject, rather
than retaining the protocol object indefinitely. This matches the ownership scheme used
everywhere else.

* inspector/InspectorResourceAgent.h:
* inspector/InspectorStyleSheet.h:
(WebCore::InspectorCSSId::InspectorCSSId):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::sendMessageToWorker):
* inspector/InspectorWorkerAgent.h:

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

5 years agoRemove shouldInterruptJavaScript
andersca@apple.com [Thu, 18 Jun 2015 20:59:12 +0000 (20:59 +0000)]
Remove shouldInterruptJavaScript
https://bugs.webkit.org/show_bug.cgi?id=146118

Reviewed by Antti Koivisto.

Source/WebCore:

The WebKit SPI methods for deciding whether JavaScript execution should be interrupted hasn't been used
for many releases. Furthermore, they don't make sense in the multi-process architecture since it's still possible
to interrupt execution (by closing the browser tab or window) from the UI process.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::shouldInterruptScript):
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::shouldInterruptJavaScript): Deleted.
* page/Chrome.h:
* page/ChromeClient.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::shouldInterruptJavaScript): Deleted.
* WebView/WebUIDelegatePrivate.h:

Source/WebKit/win:

* Interfaces/IWebUIDelegatePrivate.idl:
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::shouldInterruptJavaScript): Deleted.
* WebCoreSupport/WebChromeClient.h:

Source/WebKit2:

* UIProcess/API/APIUIClient.h:
(API::UIClient::shouldInterruptJavaScript): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Deleted.
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::shouldInterruptJavaScript): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldInterruptJavaScript): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

5 years agoWeb Inspector: Ability to Copy entire CSS Rule from Styles Sidebar
commit-queue@webkit.org [Thu, 18 Jun 2015 20:44:01 +0000 (20:44 +0000)]
Web Inspector: Ability to Copy entire CSS Rule from Styles Sidebar
https://bugs.webkit.org/show_bug.cgi?id=138812

Patch by Devin Rousso <drousso@apple.com> on 2015-06-18
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection): Right clicking on the header of a rule will replcae the default context menu to allow copying of the entire rule to the clipboard.
(WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent): Creates a new context menu to copy the entire CSS rule.
(WebInspector.CSSStyleDeclarationSection.prototype._generateCSSRuleString): Generates a string representing the formatted CSS rule.

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

5 years ago[CSS JIT][ARMv7] The pseudo element early exit trashes r6
benjamin@webkit.org [Thu, 18 Jun 2015 20:29:37 +0000 (20:29 +0000)]
[CSS JIT][ARMv7] The pseudo element early exit trashes r6
https://bugs.webkit.org/show_bug.cgi?id=146078

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-06-18
Reviewed by Alex Christensen.

The pseudo element early failure runs before we generate the prologue.
The reason is that we can often exit immediately on function entry, before
we even touch any memory.

On ARMv7, we don't have many spare registers so the MacroAssembler
uses r6 as a scratch register and the client code is expected to save
it.

In the early failure case, we were not pushing r6 before using the MacroAssembler
and its value could be trashed.

This patch push the macro assembler registers separately from the prologue.

For restoring the registers, a new function generateFunctionEnding() encapsulate
the pop() and ret().

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::pushMacroAssemblerRegisters):
(WebCore::SelectorCompiler::SelectorCodeGenerator::popMacroAssemblerRegisters):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

* cssjit/StackAllocator.h:
(WebCore::StackAllocator::operator=):
We have a new case for the stack allocator: some stack changes are conditional
at compile time instead of runtime. This is easy to deal with by overriding
the stack if a path is not taken at compile time.

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

5 years agoREGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
conrad_shultz@apple.com [Thu, 18 Jun 2015 19:38:15 +0000 (19:38 +0000)]
REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
https://bugs.webkit.org/show_bug.cgi?id=144399

* TestExpectations:
Revert change marking navigator-plugins-crash.html as flaky now that the underlying bug has been addressed.

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

5 years agoREGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
conrad_shultz@apple.com [Thu, 18 Jun 2015 19:32:15 +0000 (19:32 +0000)]
REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
https://bugs.webkit.org/show_bug.cgi?id=144399

Reviewed by Darin Adler.

Earlier work made the array of web-visible plug-ins dynamic, but allowed DOMPlugin (and, indirectly by extension,
DOMMimeType) to continue keeping a reference to a plug-in in terms of an index into that array. This superficially
appeared correct since DOMPlugin immutably holds onto a PluginData instance, which in turn immutably holds onto a
Page instance. PluginStrategy::getWebVisiblePluginInfo() is passed this Page, which is used to determine the contents
of the plugin array. The expectation was that keeping an index would still be safe since the Page is not changing,
but this is not strictly correct since relevant attributes of the Page and/or the available plugins may still change.

It's not entirely clear why the test failures are intermittent and occur only on certain configurations, but address
them by eliminating the incorrect storage of indexes in favor of keeping copies of the relevant plugin info itself.

* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::DOMMimeType):
Instead of storing the MIME type index, retrieve and store the MIME class info and plugin info.
(WebCore::DOMMimeType::type):
Directly access the m_mimeClassInfo member.
(WebCore::DOMMimeType::suffixes):
Ditto.
(WebCore::DOMMimeType::description):
Ditto.
(WebCore::DOMMimeType::enabledPlugin):
Directly access the m_pluginInfo member.
(WebCore::DOMMimeType::mimeClassInfo): Deleted.

* plugins/DOMMimeType.h:
Update member variables.

* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::DOMPlugin):
Instead of storing the plugin index, store the plugin info directly.
(WebCore::DOMPlugin::name):
Directly access m_pluginInfo.
(WebCore::DOMPlugin::filename):
Ditto.
(WebCore::DOMPlugin::description):
Ditto.
(WebCore::DOMPlugin::length):
Ditto.
(WebCore::DOMPlugin::item):
Access m_pluginInfo directly; find the matching plug-in based on matching PluginInfo (for which an overloaded
comparator is supplied below).
(WebCore::DOMPlugin::pluginInfo): Deleted.

* plugins/DOMPlugin.h:
Update member variables.
(WebCore::DOMPlugin::create):
Accept a PluginInfo instead of a plugin index.

* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::item):
(WebCore::DOMPluginArray::namedItem):

* plugins/PluginData.h:
(WebCore::operator==):
Added; compare PluginInfo structs on the basis of member equality.

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

5 years agoWeb Inspector: Improve a few more node preview types
joepeck@webkit.org [Thu, 18 Jun 2015 19:21:22 +0000 (19:21 +0000)]
Web Inspector: Improve a few more node preview types
https://bugs.webkit.org/show_bug.cgi?id=146048

Reviewed by Timothy Hatcher.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNodePreview):

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

5 years agoUnreviewed. Rollout r185670 as it caused some tests to be flakey.
joepeck@webkit.org [Thu, 18 Jun 2015 19:16:40 +0000 (19:16 +0000)]
Unreviewed. Rollout r185670 as it caused some tests to be flakey.

* debugger/Debugger.cpp:

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

5 years ago[Content Extensions] Log blocked loads to the WebInspector console
achristensen@apple.com [Thu, 18 Jun 2015 18:38:13 +0000 (18:38 +0000)]
[Content Extensions] Log blocked loads to the WebInspector console
https://bugs.webkit.org/show_bug.cgi?id=146089

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/ConsoleMessage.cpp:
(Inspector::messageSourceValue):
* inspector/protocol/Console.json:
* runtime/ConsoleTypes.h:
Add content blocker message source.

Source/WebCore:

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
Log which URLs are blocked and the URL of the page they are blocked from.

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
Added content blocker message source.

LayoutTests:

* http/tests/contentextensions/basic-filter-expected.txt:
* http/tests/contentextensions/character-set-basic-support-expected.txt:
* http/tests/contentextensions/domain-rules-expected.txt:
* http/tests/contentextensions/filters-with-quantifiers-combined-expected.txt:
* http/tests/contentextensions/main-resource-redirect-blocked-expected.txt:
* http/tests/contentextensions/media-filtered-expected.txt:
* http/tests/contentextensions/subresource-redirect-blocked-expected.txt:
* http/tests/contentextensions/text-track-blocked-expected.txt:
Add new logs.

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

5 years agoUnreviewed. Add Matt Daiter as a contributor.
jonlee@apple.com [Thu, 18 Jun 2015 18:34:28 +0000 (18:34 +0000)]
Unreviewed. Add Matt Daiter as a contributor.

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

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

5 years agoCrash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to...
commit-queue@webkit.org [Thu, 18 Jun 2015 18:16:55 +0000 (18:16 +0000)]
Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
https://bugs.webkit.org/show_bug.cgi?id=146093

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-18
Reviewed by Timothy Hatcher.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
The console could be null so null check its use.

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

5 years agoRefactor CheckedArithmeticOperations.cpp to use templates instead of macros.
mark.lam@apple.com [Thu, 18 Jun 2015 18:05:52 +0000 (18:05 +0000)]
Refactor CheckedArithmeticOperations.cpp to use templates instead of macros.
https://bugs.webkit.org/show_bug.cgi?id=146103

Not reviewed.

Follow up to fix some typos not caught before original patch was landed.

* TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
(TestWebKitAPI::CheckedArithmeticTester::run):
(TestWebKitAPI::AllowMixedSignednessTest::run):
(TestWebKitAPI::IgnoreMixedSignednessTest::run):

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

5 years agoMake webkitdirs::runGitUpdate() work when invoked in more than one Git checkout
dbates@webkit.org [Thu, 18 Jun 2015 18:00:11 +0000 (18:00 +0000)]
Make webkitdirs::runGitUpdate() work when invoked in more than one Git checkout
https://bugs.webkit.org/show_bug.cgi?id=146082

Reviewed by Darin Adler.

The function webkitdirs::runGitUpdate may not update the Git checkout in the current
working directory after being invoked in a different Git checkout. In particular,
calling runGitUpdate() inside a Git SVN checkout and subsequently calling it inside
a pure Git checkout g will fail to update g.

Currently webkitdirs::runGitUpdate() calls VCSUtils::isGitSVN() to determine whether
the current working directory is a Git SVN checkout. And isGitSVN() caches its result
to speed up subsequent queries. This prevents runGitUpdate() from being used to update
an arbitrary Git checkout (since isGitSVN() may return a cached result for a directory
different than the current working directory). Instead runGitUpdate() should check
whether the current working directory is a Git SVN checkout on each invocation.

* Scripts/VCSUtils.pm: Export function isGitSVNDirectory so that it can be used from webkitdirs::runGitUpdate().
(isGitSVNDirectory): Extracted logic to determine whether a directory is a Git
SVN directory from isGitSVN().
(isGitSVN): Implemented in terms of isGitSVNDirectory().
* Scripts/webkitdirs.pm:
(runGitUpdate): Modified to use isGitSVNDirectory().

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

5 years agoWeb Inspector: New Rule button doesn't reveal the newly added rule if not visible...
commit-queue@webkit.org [Thu, 18 Jun 2015 17:58:33 +0000 (17:58 +0000)]
Web Inspector: New Rule button doesn't reveal the newly added rule if not visible upon creation
https://bugs.webkit.org/show_bug.cgi?id=117600

Patch by Devin Rousso <drousso@apple.com> on 2015-06-18
Reviewed by Timothy Hatcher.

* UserInterface/Views/RulesStyleDetailsPanel.js: Made previousFocusedSection into a member variable of the RulesStyleDetailsPanel.  This way, when the nodeStyles is refreshed (when a new rule is added), the previousFocusedSection will be scrolled into view.
(WebInspector.RulesStyleDetailsPanel):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Deleted.

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

5 years agoRefactor CheckedArithmeticOperations.cpp to use templates instead of macros.
mark.lam@apple.com [Thu, 18 Jun 2015 17:58:22 +0000 (17:58 +0000)]
Refactor CheckedArithmeticOperations.cpp to use templates instead of macros.
https://bugs.webkit.org/show_bug.cgi?id=146103

Reviewed by Anders Carlsson.

Presently, the tests in CheckedArithmeticOperations.cpp are all implemented as
part of a large macro.  This makes them harder to:

1. write: no editor help with indentations, have to add trailing '\'s,
   inconvenient to add line breaks and comments.

2. read: no chroma coding / syntax highlighting.

3. debug: compile time errors are reported as being on the single line where
   the macro is used.

Refactoring the tests to use C++ templates solves all these issues.

* TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
(TestWebKitAPI::CheckedArithmeticTester::run):
(TestWebKitAPI::AllowMixedSignednessTest::run):
(TestWebKitAPI::IgnoreMixedSignednessTest::run):
(TestWebKitAPI::CoerceLiteralToUnsigned::coerce):
(TestWebKitAPI::CoerceLiteralNop::coerce):

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

5 years agoSuppress null-conversion warnings in ANGLE
ossy@webkit.org [Thu, 18 Jun 2015 17:55:08 +0000 (17:55 +0000)]
Suppress null-conversion warnings in ANGLE
https://bugs.webkit.org/show_bug.cgi?id=145125

Reviewed by Alex Christensen.

* CMakeLists.txt:

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

5 years agoUse SFSafariViewController for previews
timothy_horton@apple.com [Thu, 18 Jun 2015 17:52:35 +0000 (17:52 +0000)]
Use SFSafariViewController for previews
https://bugs.webkit.org/show_bug.cgi?id=146092

Reviewed by Darin Adler.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
* WebKit2.xcodeproj/project.pbxproj:
* Source/WebKit2/Platform/spi/ios/SafariServicesSPI.h:

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

5 years ago~4% Membuster regression after WebKit r185452
antti@apple.com [Thu, 18 Jun 2015 17:15:50 +0000 (17:15 +0000)]
~4% Membuster regression after WebKit r185452
https://bugs.webkit.org/show_bug.cgi?id=146112
rdar://problem/21406677

Reviewed by Chris Dumez.

Clear the cache write queue on critical memory pressure. There can be substantial amount of memory there and we
don't know how long writing it out will take. System is often under I/O pressure too in low memory situations.

This also makes sense for process suspension where we send simulated critical memory event.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::lowMemoryHandler):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::handleMemoryPressureNotification):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::clearWriteQueue):
* NetworkProcess/cache/NetworkCacheStorage.h:

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

5 years agoUnreviewed, rolling out r185671.
commit-queue@webkit.org [Thu, 18 Jun 2015 17:13:21 +0000 (17:13 +0000)]
Unreviewed, rolling out r185671.
https://bugs.webkit.org/show_bug.cgi?id=146114

Caused frequent flaky failures on profiler tests (Requested by
ap on #webkit).

Reverted changeset:

"Web Inspector: Improve a few more node preview types"
https://bugs.webkit.org/show_bug.cgi?id=146048
http://trac.webkit.org/changeset/185671

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

5 years agoMark mathml/very-large-stretchy-operators.html as Slow on newer OS X versions.
ap@apple.com [Thu, 18 Jun 2015 17:11:02 +0000 (17:11 +0000)]
Mark mathml/very-large-stretchy-operators.html as Slow on newer OS X versions.

* platform/mac/TestExpectations:

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

5 years ago[EFL][WK2] Use Web Browser cache model in MiniBrowser
commit-queue@webkit.org [Thu, 18 Jun 2015 15:25:40 +0000 (15:25 +0000)]
[EFL][WK2] Use Web Browser cache model in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=112273

Patch by Christophe Dumez <ch.dumez@sisa.samsung.com> on 2015-06-18
Reviewed by Laszlo Gombos.

Set cache model to EWK_CACHE_MODEL_PRIMARY_WEBBROWSER in EFL's MiniBrowser
instead of leaving the default value (EWK_CACHE_MODEL_DOCUMENT_VIEWER).
This way we have a decent cache capacity and the page cache actually works.

* MiniBrowser/efl/main.c:
(elm_main):

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

5 years agoFix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
ossy@webkit.org [Thu, 18 Jun 2015 14:13:58 +0000 (14:13 +0000)]
Fix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
https://bugs.webkit.org/show_bug.cgi?id=145921

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::WebKitNotificationProvider):

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

5 years ago[ES6] support default values in deconstruction parameter nodes
saambarati1@gmail.com [Thu, 18 Jun 2015 12:35:32 +0000 (12:35 +0000)]
[ES6] support default values in deconstruction parameter nodes
https://bugs.webkit.org/show_bug.cgi?id=142679

Reviewed by Darin Adler.

Source/JavaScriptCore:

ES6 destructuring allows destructuring properties to assign
default values. A link to the spec:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-destructuring-binding-patterns

This patch implements default values for all places where deconstruction
is allowed besides function parameters. This is because function
parameters are parsed in a separate parser arena than the function
body itself and ExpresionNode's which are default values for
deconstruction parameters will be deallocated by the time we parse the body
of the function. I have opened a bug to address this problem:
https://bugs.webkit.org/show_bug.cgi?id=145995

* bytecompiler/NodesCodegen.cpp:
(JSC::DeconstructionPatternNode::~DeconstructionPatternNode):
(JSC::assignDefaultValueIfUndefined):
(JSC::ArrayPatternNode::bindValue):
(JSC::ArrayPatternNode::emitDirectBinding):
(JSC::ArrayPatternNode::toString):
(JSC::ArrayPatternNode::collectBoundIdentifiers):
(JSC::ObjectPatternNode::bindValue):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::appendArrayPatternSkipEntry):
(JSC::ASTBuilder::appendArrayPatternEntry):
(JSC::ASTBuilder::createObjectPattern):
(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::createBindingLocation):
* parser/Nodes.h:
(JSC::ArrayPatternNode::appendIndex):
(JSC::ObjectPatternNode::appendEntry):
(JSC::ObjectPatternNode::Entry::Entry): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDeconstructionPattern):
(JSC::Parser<LexerType>::parseDefaultValueForDeconstructionPattern):
(JSC::Parser<LexerType>::parseConstDeclarationList):
* parser/Parser.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):

LayoutTests:

* js/destructuring-assignment-default-values-expected.txt: Added.
* js/destructuring-assignment-default-values.html: Added.
* js/script-tests/destructuring-assignment-default-values.js: Added.
(assert):
(test1):
(arr):
(test2):
(test3):
(test4):
(test5):
(test6):
(test7):
(test8):
(shouldThrow):

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

5 years agoRemove redundant Chromium bug keyword
gyuyoung.kim@webkit.org [Thu, 18 Jun 2015 09:22:48 +0000 (09:22 +0000)]
Remove redundant Chromium bug keyword
https://bugs.webkit.org/show_bug.cgi?id=146097

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._parse_modifiers): Remove BUGCR for TestExpectations.
(TestExpectationLine._format_line): Deleted.

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

5 years ago[Streams API] Implement ReadableStreamReader.releaseLock
calvaris@igalia.com [Thu, 18 Jun 2015 08:58:18 +0000 (08:58 +0000)]
[Streams API] Implement ReadableStreamReader.releaseLock
https://bugs.webkit.org/show_bug.cgi?id=145299

Reviewed by Darin Adler.

Source/WebCore:

Covered by rebased tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
(WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
(WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
* Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
* Modules/streams/ReadableStreamReader.h:
* Modules/streams/ReadableStreamReader.idl:
(WebCore::releaseLock): Deleted.

LayoutTests:

* streams/reference-implementation/readable-stream-expected.txt: Rebasing expectations.
* streams/reference-implementation/readable-stream-reader-expected.txt: Ditto.
* streams/reference-implementation/readable-stream-templated-expected.txt: Ditto.

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

5 years ago[EFL] test_ewk2_context has been failed since r185529
gyuyoung.kim@webkit.org [Thu, 18 Jun 2015 08:57:09 +0000 (08:57 +0000)]
[EFL] test_ewk2_context has been failed since r185529
https://bugs.webkit.org/show_bug.cgi?id=146046

Reviewed by Csaba Osztrogonác.

ewk_context_network_process_model test has been failed since r185529.
This patch modifies the test which is similar to ewk_context_network_process_model
based on multiple process model to fix the failure. Besides ewk_context_network_process_model
seems to be fixed indirectly. So we enable it again.

* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):

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

5 years ago[Streams API] Rejected start promise test does not timeout anymore
calvaris@igalia.com [Thu, 18 Jun 2015 08:35:43 +0000 (08:35 +0000)]
[Streams API] Rejected start promise test does not timeout anymore
https://bugs.webkit.org/show_bug.cgi?id=146065

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-expected.txt: Updated expectations to PASS.
* streams/reference-implementation/readable-stream.html: Removed timeout

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

5 years agoGObject and ObjC bindings generator should not generate code for promise-based APIs
youenn.fablet@crf.canon.fr [Thu, 18 Jun 2015 07:02:58 +0000 (07:02 +0000)]
GObject and ObjC bindings generator should not generate code for promise-based APIs
https://bugs.webkit.org/show_bug.cgi?id=146059

Reviewed by Darin Adler.

Covered by rebased expectations.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Disabling GObject DOM binding for functions returning promises.
* bindings/scripts/CodeGeneratorObjC.pm:
(SkipFunction): Disabling ObjC DOM binding for functions returning promises.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
(webkit_dom_test_obj_get_read_only_long_attr): Deleted.
(webkit_dom_test_obj_get_read_only_string_attr): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
(core): Deleted.

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

5 years ago[EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
ryuan.choi@navercorp.com [Thu, 18 Jun 2015 06:30:06 +0000 (06:30 +0000)]
[EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
https://bugs.webkit.org/show_bug.cgi?id=146075

Reviewed by Carlos Garcia Campos.

Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
with request of SoupGenericRequest instead of request itself.
But, request of SoupGenericRequest is nullptr in EFL port because EFL port
does not use m_initiatingPageID.

This patch updates request of SoupGenericRequest although m_initiatingPageID is null.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupRequest):

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

5 years agoClient may receive began editing callback for already focused text field
dbates@webkit.org [Thu, 18 Jun 2015 04:38:59 +0000 (04:38 +0000)]
Client may receive began editing callback for already focused text field
https://bugs.webkit.org/show_bug.cgi?id=146074
<rdar://problem/21293562>

Reviewed by Darin Adler.

Source/WebCore:

Fixes an issue where the client would be notified that began editing in a text field
for each programmatic DOM focus event dispatched at the text field regardless of
whether the field was focused. The client should only be notified that began editing
exactly once when a text field becomes focused (either programmatically or by user interaction).

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
(WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
text field becomes newly focused.
* html/TextFieldInputType.h:

Tools:

Add a unit test to ensure that a client receives exactly one began editing
callback when a text field is newly focused. In particular, dispatching
a DOM focus event at an already focused text field does not dispatch a
began editing callback to the client.

* TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing.cpp:
(TestWebKitAPI::TEST_F):

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

5 years agoSource/WebKit/win:
commit-queue@webkit.org [Thu, 18 Jun 2015 04:11:05 +0000 (04:11 +0000)]
Source/WebKit/win:
[Win]Implement layoutTestController.dispatchPendingLoadRequests.
https://bugs.webkit.org/show_bug.cgi?id=26481

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

Implement WebView::dispatchPendingLoadRequests() private API for test runner.

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::scaleWebView):
(WebView::dispatchPendingLoadRequests):
* WebView.h:

Tools:
[Win]Implement layoutTestController.dispatchPendingLoadRequests.
https://bugs.webkit.org/show_bug.cgi?id=26481

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

Implement WebView::dispatchPendingLoadRequests() private API for test runner.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::dispatchPendingLoadRequests):
(TestRunner::overridePreference):

LayoutTests:
[Win]Implement layoutTestController.dispatchPendingLoadRequests.
https://bugs.webkit.org/show_bug.cgi?id=26481

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

Implement WebView::dispatchPendingLoadRequests() private API for test runner.

* platform/win/TestExpectations:

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

5 years agoReading the list of analysis tasks is extremely slow
rniwa@webkit.org [Thu, 18 Jun 2015 04:05:50 +0000 (04:05 +0000)]
Reading the list of analysis tasks is extremely slow
https://bugs.webkit.org/show_bug.cgi?id=146086

Reviewed by Darin Adler.

The bug was caused by Ember data requesting manifest.js hundreds of times.
Fetch it ahead of time in each route instead.

* public/v2/app.js:
(App.AnalysisRoute.model):
(App.AnalysisTaskRoute.model):

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

5 years agoAlso turn off long press on link preview.
commit-queue@webkit.org [Thu, 18 Jun 2015 01:05:13 +0000 (01:05 +0000)]
Also turn off long press on link preview.
https://bugs.webkit.org/show_bug.cgi?id=146084

Also turn off long presss gesture when previewing. Turn that back on when preview is completed.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-06-17
Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):

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

5 years ago[Content Extensions] Fail to parse invalid arrays
achristensen@apple.com [Thu, 18 Jun 2015 00:51:37 +0000 (00:51 +0000)]
[Content Extensions] Fail to parse invalid arrays
https://bugs.webkit.org/show_bug.cgi?id=146079
rdar://problem/21422649

Reviewed by Benjamin Poulain.

Source/WebCore:

Covered by new and corrected API tests.

* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadTrigger):
Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
Correct and add parsing tests with invalid arrays.

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

5 years agoPosition::findParent() should take a reference
jhoneycutt@apple.com [Thu, 18 Jun 2015 00:49:54 +0000 (00:49 +0000)]
Position::findParent() should take a reference
https://bugs.webkit.org/show_bug.cgi?id=146038

Reviewed by Darin Adler.

* dom/Position.cpp:
(WebCore::Position::containerNode):
(WebCore::Position::parentAnchoredEquivalent):
Pass a reference; there is already a null check.
(WebCore::Position::previous):
Add a missing null check. Code below this expects that node is non-null.
(WebCore::Position::next):
Ditto.
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
Pass a reference.
(WebCore::Position::findParent):
Changed to take a reference.

* dom/Position.h:
Ditto.

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

5 years agoOverflow regions with scroll snap points are not reliably rubber banding
bfulgham@apple.com [Thu, 18 Jun 2015 00:32:33 +0000 (00:32 +0000)]
Overflow regions with scroll snap points are not reliably rubber banding
https://bugs.webkit.org/show_bug.cgi?id=142522
<rdar://problem/20100726>

Reviewed by Darin Adler.

Source/WebCore:

When computing the target scroll destination, update the nearest snap point index
and other bookkeeping, but keep the original gesture target if it would have taken
us beyond either limit of the scroll container.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
to support client API.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
target, and use that instead of our nearest snap point if the gesture takes us past
either extreme of the scroll container.

Source/WebKit2:

Make sure we don't block rubberbanding behavior when a scroll gesture should take us past
the end of the scroll container.

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Don't adjust
target point if we were going to scroll past the edges of the scroll container.

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

5 years agoWould like a way, in the API, to get notified about a web process crash
andersca@apple.com [Thu, 18 Jun 2015 00:22:23 +0000 (00:22 +0000)]
Would like a way, in the API, to get notified about a web process crash
https://bugs.webkit.org/show_bug.cgi?id=146085
rdar://problem/17358828

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::processDidCrash):

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

5 years agoSwipe gesture can get stuck, preventing scrolling and other gestures
timothy_horton@apple.com [Thu, 18 Jun 2015 00:03:42 +0000 (00:03 +0000)]
Swipe gesture can get stuck, preventing scrolling and other gestures
https://bugs.webkit.org/show_bug.cgi?id=146088
<rdar://problem/16056087>

Reviewed by Darin Adler.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
Ignore mouse events that come in while we're doing a swipe.
This prevents potentially problematic mouse events (especially context menus)
won't be processed during a swipe, avoiding situations that can cause
the swipe gesture to get stuck.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSEventSPI.h: Added.
Add an SPI header.

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

5 years agoMediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
mrajca@apple.com [Thu, 18 Jun 2015 00:01:10 +0000 (00:01 +0000)]
MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
https://bugs.webkit.org/show_bug.cgi?id=146028

Reviewed by Darin Adler.

* Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
* Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
(WebCore::MediaSession::skipToNextTrack):
(WebCore::MediaSession::skipToPreviousTrack):
* Modules/mediasession/MediaSession.h:
* Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
(WebCore::MediaSessionManager::skipToNextTrack):
(WebCore::MediaSessionManager::skipToPreviousTrack):
* Modules/mediasession/MediaSessionManager.h:
* dom/EventNames.h: Added the nexttrack/previoustrack event names.
* page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
(WebCore::Page::handleMediaEvent):

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

5 years agoRemove willSendEventToPlugin() from PluginController.h.
commit-queue@webkit.org [Wed, 17 Jun 2015 23:38:39 +0000 (23:38 +0000)]
Remove willSendEventToPlugin() from PluginController.h.
https://bugs.webkit.org/show_bug.cgi?id=146054

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

PluginController::willSendEventToPlugin() was introduced by http://webkit.org/b/59124.
This method had been used only for WebKit2 on Windows, and no one uses it now.
So we can remove it.

No new tests, no behavior change.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::willSendEventToPlugin): Deleted.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::willSendEventToPlugin): Deleted.
* WebProcess/Plugins/PluginView.h:

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

5 years agoUpdate ReadMe.md and Install.md per database changes
rniwa@webkit.org [Wed, 17 Jun 2015 23:23:51 +0000 (23:23 +0000)]
Update ReadMe.md and Install.md per database changes
https://bugs.webkit.org/show_bug.cgi?id=146076

Reviewed by Darin Adler.

Updated.

* Install.md:
* ReadMe.md:

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

5 years agoAX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
cfleizach@apple.com [Wed, 17 Jun 2015 23:20:27 +0000 (23:20 +0000)]
AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
https://bugs.webkit.org/show_bug.cgi?id=146066

Reviewed by Darin Adler.

Source/WebCore:

Allow the region role to identify as a landmark type.

Updated test: platform/ios-simulator/accessibility/landmark-types.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):

LayoutTests:

* platform/ios-simulator/accessibility/landmark-type-expected.txt:
* platform/ios-simulator/accessibility/landmark-type.html:

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

5 years agoUnreviewed. Added myself as a committer.
mrajca@apple.com [Wed, 17 Jun 2015 23:02:07 +0000 (23:02 +0000)]
Unreviewed. Added myself as a committer.

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

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

5 years agoRepro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestu...
timothy_horton@apple.com [Wed, 17 Jun 2015 22:47:56 +0000 (22:47 +0000)]
Repro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestureDidEnd
https://bugs.webkit.org/show_bug.cgi?id=146083
<rdar://problem/20974232>

Reviewed by Darin Adler.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
It is possible to get didSameDocumentNavigationForMainFrame *before*
endSwipeGesture, while the user is still interactively swiping. We
cannot remove the snapshot in this case, nor should we start the active
load monitoring timer; all of these things should happen only after the
swipe is completed and we've performed the navigation.

This was particularly bad (a crash instead of just a disappearing snapshot)
because removing the snapshot also causes m_webPageProxyForBackForwardListForCurrentSwipe
to be nulled out, but then it is dereferenced during endSwipeGesture.

Make sure that we never call removeSwipeSnapshotIfReady unless we were actually
waiting to remove the swipe snapshot (because the gesture had completed).
Most callers already did ensure this, but these two did not.

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

5 years agoWeb Inspector: Improve Full Screen support for Web Inspector windows
commit-queue@webkit.org [Wed, 17 Jun 2015 21:38:24 +0000 (21:38 +0000)]
Web Inspector: Improve Full Screen support for Web Inspector windows
https://bugs.webkit.org/show_bug.cgi?id=146036

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-17
Reviewed by Timothy Hatcher.

* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::windowFullScreenDidChange):
When entering / leaving full screen update attach availability to
potentially show / hide the frontend's docking buttons.

(WebKit::WebInspectorProxy::createInspectorWindow):
Allow a Web Inspector window to be a full screen auxillary window,
so that if the application with a WebView opens a detached inspector
window it can be shown on the same desktop as the full screen app.
Also, reduce the minimum window size requirements for full screen tiling.

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

5 years agoWeb Inspector: Improve a few more node preview types
commit-queue@webkit.org [Wed, 17 Jun 2015 21:34:22 +0000 (21:34 +0000)]
Web Inspector: Improve a few more node preview types
https://bugs.webkit.org/show_bug.cgi?id=146048

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-17
Reviewed by Timothy Hatcher.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNodePreview):

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

5 years agoWeb Inspector: Do not show JavaScriptCore builtins in inspector
commit-queue@webkit.org [Wed, 17 Jun 2015 21:34:06 +0000 (21:34 +0000)]
Web Inspector: Do not show JavaScriptCore builtins in inspector
https://bugs.webkit.org/show_bug.cgi?id=146049

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-17
Reviewed by Timothy Hatcher.

* debugger/Debugger.cpp:

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

5 years agoWeb Inspector: Show/Hide sidebar buttons have inconsistent highlighted state
commit-queue@webkit.org [Wed, 17 Jun 2015 21:33:32 +0000 (21:33 +0000)]
Web Inspector: Show/Hide sidebar buttons have inconsistent highlighted state
https://bugs.webkit.org/show_bug.cgi?id=145073

Patch by Diego Pino Garcia <dpino@igalia.com> on 2015-06-17
Reviewed by Joseph Pecoraro.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):

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

5 years ago<rdar://problem/19034131> Cleaned up the WebDownload.h framework header.
mitz@apple.com [Wed, 17 Jun 2015 21:32:14 +0000 (21:32 +0000)]
<rdar://problem/19034131> Cleaned up the WebDownload.h framework header.

Reviewed by Anders Carlsson.

* Misc/WebDownload.h: Changed to use USE_APPLE_INTERNAL_SDK instead of __has_include.
* postprocess-headers.sh: Define USE_APPLE_INTERNAL_SDK when postprocessing framework
headers.

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

5 years agoIncrease the popup dismissal time from 100ms to 500ms
rniwa@webkit.org [Wed, 17 Jun 2015 21:27:35 +0000 (21:27 +0000)]
Increase the popup dismissal time from 100ms to 500ms
https://bugs.webkit.org/show_bug.cgi?id=146077

Rubber-stamped by Andreas Kling.

* public/v2/popup.js:
(App.PopupView.scheduleHiding):

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

5 years agoREGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
simon.fraser@apple.com [Wed, 17 Jun 2015 21:08:44 +0000 (21:08 +0000)]
REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
https://bugs.webkit.org/show_bug.cgi?id=146073
rdar://problem/21022203

Reviewed by Tim Horton.

Source/WebCore:

Text controls (text inputs and textareas) need backing store even when empty, because
they need to be able to paint a caret.

Test: compositing/backing/form-controls-backing.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):

LayoutTests:

Dump layers for composited text inputs and textareas.

* compositing/backing/form-controls-backing-expected.txt: Added.
* compositing/backing/form-controls-backing.html: Added.

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

5 years agoSelection cache produces invalid result when ancestor has float element.
zalan@apple.com [Wed, 17 Jun 2015 21:06:58 +0000 (21:06 +0000)]
Selection cache produces invalid result when ancestor has float element.
https://bugs.webkit.org/show_bug.cgi?id=146042
rdar://problem/20604592

Reviewed by Ryosuke Niwa.

Selection cache already takes floats into account, however it's not enough to check current
block against floats. Any of the ancestor's float starting from the selection root block
can impact the selection offsets.

Source/WebCore:

Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html

* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):

LayoutTests:

* fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float-expected.txt: Added.
* fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html: Added.

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

5 years agoExport VCSUtils::gitTreeDirectory()
dbates@webkit.org [Wed, 17 Jun 2015 20:41:03 +0000 (20:41 +0000)]
Export VCSUtils::gitTreeDirectory()
<rdar://problem/21248901>

Rubber-stamped by Alexey Proskuryakov.

* Scripts/VCSUtils.pm:

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

5 years agoSegmentedVector should waste less memory.
akling@apple.com [Wed, 17 Jun 2015 20:27:22 +0000 (20:27 +0000)]
SegmentedVector should waste less memory.
<https://webkit.org/b/146069>

Reviewed by Anders Carlsson.

We were wasting sizeof(Vector) on every segment in SegmentVector.
The segments were using inline capacity, and would never go beyond it,
so all the size/capacity/out-of-line-buffer metadata was useless.

Change the internal representation to Vector<T[SegmentSize]> instead.
This saves 16 bytes per segment, so lower SegmentSize -> bigger savings!

* wtf/SegmentedVector.h:
(WTF::SegmentedVectorIterator::operator*):
(WTF::SegmentedVectorIterator::operator->):
(WTF::SegmentedVectorIterator::operator++):
(WTF::SegmentedVectorIterator::operator==):
(WTF::SegmentedVectorIterator::operator!=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(WTF::SegmentedVector::at):
(WTF::SegmentedVector::append):
(WTF::SegmentedVector::removeLast):
(WTF::SegmentedVector::grow):
(WTF::SegmentedVector::begin):
(WTF::SegmentedVector::end):
(WTF::SegmentedVector::deleteAllSegments):
(WTF::SegmentedVector::ensureSegmentsFor):
(WTF::SegmentedVector::ensureSegment):
(WTF::SegmentedVector::allocateSegment):
(WTF::SegmentedVectorIterator::operator=): Deleted.
(WTF::SegmentedVector::SegmentedVector): Deleted.

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

5 years agoAX: [ATK] Expose element tag name as an object attribute
jdiggs@igalia.com [Wed, 17 Jun 2015 20:03:13 +0000 (20:03 +0000)]
AX: [ATK] Expose element tag name as an object attribute
https://bugs.webkit.org/show_bug.cgi?id=146062

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Expose the element tag name as an object attribute with name "tag" and
value being the lowercase tag name, both being what Gecko does for ATK.

No new tests. We already have sufficient coverage for AtkObject attributes.
These tests have been updated to reflect the addition of the new attribute.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):

LayoutTests:

The following tests all include the AtkObject attributes of elements. Now that
tag name is exposed, the expectations needed to be updated to reflect the change.

* platform/gtk/accessibility/image-link-expected.txt: Updated.
* platform/gtk/accessibility/image-map2-expected.txt: Updated.
* platform/gtk/accessibility/lists-expected.txt: Updated.
* platform/gtk/accessibility/math-multiscript-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated.
* platform/gtk/accessibility/table-cells-expected.txt: Updated.
* platform/gtk/accessibility/table-detection-expected.txt: Updated.
* platform/gtk/accessibility/table-one-cell-expected.txt: Updated.
* platform/gtk/accessibility/table-sections-expected.txt: Updated.
* platform/gtk/accessibility/table-with-rules-expected.txt: Updated.
* platform/gtk/accessibility/transformed-element-expected.txt: Updated.
* platform/gtk/accessibility/xml-roles-exposed-expected.txt: Updated.

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

5 years agoSafari tabs still have shrunken content after coming out of fullscreen
timothy_horton@apple.com [Wed, 17 Jun 2015 19:23:08 +0000 (19:23 +0000)]
Safari tabs still have shrunken content after coming out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=146037
<rdar://problem/21105960>

Reviewed by Simon Fraser and Darin Adler.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayoutDidChange):
(WebKit::WebPageProxy::fixedLayoutSizeDidChange):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::setFixedLayoutSize):
Keep the UI process up-to-date when fixed layout is enabled or the size changes.
This is important because these things can change from the Web process side too,
and the UI process uses its (potentially stale) version to do some short-circuiting.
This was causing us to fail to turn off fixed layout when it was turned
on from the Web process side (by TiledCoreAnimationDrawingArea).

* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
makes heavy use of, just like the others.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ShrinkToFit.mm: Added.
(-[ShrinkToFitNavigationDelegate webView:didFinishNavigation:]):
(TEST):
Add a test that ensures that disabling scale-to-fit mode correctly updates
the page's layout.

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

5 years agoiOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
antti@apple.com [Wed, 17 Jun 2015 19:18:30 +0000 (19:18 +0000)]
iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
https://bugs.webkit.org/show_bug.cgi?id=146072
rdar://problem/21149759

Reviewed by Simon Fraser

There are some scenarios where we end up drawing without web lock due to client or system issues.
This can cause crashes.

* platform/ios/LegacyTileLayer.mm:
(-[LegacyTileLayer setNeedsDisplayInRect:]):
(-[LegacyTileLayer drawInContext:]):

    Ensure we have the web lock when called in main thread (even though we should have it already).

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

5 years ago[JSC] jsSubstring() should have a fast path for 0..baseLength "substrings."
akling@apple.com [Wed, 17 Jun 2015 18:54:13 +0000 (18:54 +0000)]
[JSC] jsSubstring() should have a fast path for 0..baseLength "substrings."
<https://webkit.org/b/146051>

Reviewed by Anders Carlsson.

If asked to make a substring that actually spans the entire base string,
have jsSubstring() just return the base instead of allocating a new JSString.

3% speed-up on Octane/regexp.

* runtime/JSString.h:
(JSC::jsSubstring):

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

5 years agoCSS scroll snap: defining snap points on axis that does not scroll does not work...
bfulgham@apple.com [Wed, 17 Jun 2015 18:32:24 +0000 (18:32 +0000)]
CSS scroll snap: defining snap points on axis that does not scroll does not work properly
https://bugs.webkit.org/show_bug.cgi?id=146043
<rdar://problem/20125511>

Reviewed by Simon Fraser.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-mismatch.html

We always seed the set of scroll snap points with the start and end of the scroll container. This is not
the right behavior if there are no scroll points defined, because we end up creating a snap for the start
and end of the container, and any scroll gesture just takes us across the entire element.

Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
only holds '0', return an empty Vector.
(WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
clear the horizontal (or vertical) snap offsets for the scroll area.

LayoutTests:

* css3/scroll-snap/scroll-snap-mismatch-expected.txt: Added.
* css3/scroll-snap/scroll-snap-mismatch.html: Added.

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

5 years agoUnreviewed, rolling out r185636.
commit-queue@webkit.org [Wed, 17 Jun 2015 17:15:01 +0000 (17:15 +0000)]
Unreviewed, rolling out r185636.
https://bugs.webkit.org/show_bug.cgi?id=146068

Caused many crashes on Windows (Requested by ap on #webkit).

Reverted changeset:

"[Win] Implement WebViewGroup to support
WebView::addxxxToGroup()."
https://bugs.webkit.org/show_bug.cgi?id=145908
http://trac.webkit.org/changeset/185636

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

5 years agoNew test inspector/console/console-table.html frequently times out in debug.
ap@apple.com [Wed, 17 Jun 2015 17:07:06 +0000 (17:07 +0000)]
New test inspector/console/console-table.html frequently times out in debug.

* TestExpectations: Added an expectation.

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

5 years agoUpdate test results after https://bugs.webkit.org/show_bug.cgi?id=145873
ap@apple.com [Wed, 17 Jun 2015 17:03:31 +0000 (17:03 +0000)]
Update test results after https://bugs.webkit.org/show_bug.cgi?id=145873

The changes appear expected, however looking at previous pixel results, we seem
to have a (much much earlier) regression, as small caps are rotated incorrectly.

* platform/mac-mavericks/fast/writing-mode/broken-ideograph-small-caps-expected.png: Copied from LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.png.
* platform/mac-mavericks/fast/writing-mode/broken-ideograph-small-caps-expected.txt: Copied from LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt.
* platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.png:
* platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt:

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

5 years ago[CSS Grid Layout] We should add performance tests for stretching logic
jfernandez@igalia.com [Wed, 17 Jun 2015 16:45:07 +0000 (16:45 +0000)]
[CSS Grid Layout] We should add performance tests for stretching logic
https://bugs.webkit.org/show_bug.cgi?id=146063

Reviewed by Sergio Villar Senin.

Added a new performance test for Grid Layout to ensure there are no
regressions in the stretching alignment logic.

* Layout/fixed-grid-lots-of-stretched-data.html: Added.

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

5 years ago[Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
mitz@apple.com [Wed, 17 Jun 2015 16:18:04 +0000 (16:18 +0000)]
[Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
https://bugs.webkit.org/show_bug.cgi?id=145957

Reviewed by Darin Adler.

Source/WebKit2:

* UIProcess/API/Cocoa/WKUIDelegate.h: Added -webViewDidClose: to the protocol.
* UIProcess/Cocoa/UIDelegate.h: Added a webViewDidClose boolean to the delegate methods struct.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Initialize the webViewDidClose boolean.
(WebKit::UIDelegate::UIClient::close): Changed to call the new delegate method. Left behind
code that calls the old private method if it’s implemented.

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:
(-[OpenAndCloseWindowUIDelegate webViewDidClose:]): Renamed from -_webViewClose:.

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

5 years ago[CSS Grid Layout] Performance tests are using the old syntax
jfernandez@igalia.com [Wed, 17 Jun 2015 16:13:49 +0000 (16:13 +0000)]
[CSS Grid Layout] Performance tests are using the old syntax
https://bugs.webkit.org/show_bug.cgi?id=146061

Reviewed by Sergio Villar Senin.

Adapted tests to the new grid tracks definition syntax.

* Layout/auto-grid-lots-of-data.html:
* Layout/fixed-grid-lots-of-data.html:

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

5 years ago[GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before...
carlosgc@webkit.org [Wed, 17 Jun 2015 15:32:38 +0000 (15:32 +0000)]
[GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before the web process is launched
https://bugs.webkit.org/show_bug.cgi?id=146053

Reviewed by Martin Robinson.

The cache is disabled in WebProcess::platformSetCacheModel() when
the cache model is CacheModelDocumentViewer, but it's enabled
again by WebProcess::setMemoryCacheDisabled() when
memoryCacheDisabled creation parameter is processed. We need to
make sure the cache model and memoryCacheDisabled parameters are consistent.

* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Initialize
memoryCacheDisabled parameter to true if memory cache was
explicitly disabled or cache model is CacheModelDocumentViewer.

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

5 years ago[WK2] valueForKey() shouldn't copy the defaults map
zandobersek@gmail.com [Wed, 17 Jun 2015 15:21:19 +0000 (15:21 +0000)]
[WK2] valueForKey() shouldn't copy the defaults map
https://bugs.webkit.org/show_bug.cgi?id=146050

Reviewed by Sam Weinig.

* Shared/WebPreferencesStore.cpp:
(WebKit::valueForKey): Avoid copying the defaults HashMap by binding the return value to a reference.

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

5 years agoAX: input role="spinbutton" gets skipped in voiceover
cfleizach@apple.com [Wed, 17 Jun 2015 14:13:30 +0000 (14:13 +0000)]
AX: input role="spinbutton" gets skipped in voiceover
https://bugs.webkit.org/show_bug.cgi?id=145514

Reviewed by Mario Sanchez Prada.

SpinButton role was added, but left out of iOS.
To prevent this from happening again, explicitly list every role in the switch statement that
determines accessible visibility.

Test: platform/ios-simulator/accessibility/spinbutton.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper isAccessibilityElement]):

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

5 years ago[Streams API] ReadableJSStream should handle promises returned by JS source pull...
youenn.fablet@crf.canon.fr [Wed, 17 Jun 2015 07:45:51 +0000 (07:45 +0000)]
[Streams API] ReadableJSStream should handle promises returned by JS source pull callback
https://bugs.webkit.org/show_bug.cgi?id=145965

Reviewed by Darin Adler.

Source/WebCore:

Implemented asynchronous pulling.
In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
Storing whether to pull automatically when the current pull is finished.

Covered by rebased tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::pull): stores whether to pull again.
(WebCore::ReadableStream::finishPulling): called when pulling finishes.
* Modules/streams/ReadableStream.h:
* bindings/js/ReadableJSStream.cpp:
(WebCore::createPullResultFulfilledFunction): The promise resolve callback.
(WebCore::ReadableJSStream::doPull): Handling of promise.
* bindings/js/ReadableJSStream.h:

LayoutTests:

Rebasing tests and removing timeout: 50 for test that is passing..

* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream.html:

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

5 years ago32-bit build fix after r185640.
achristensen@apple.com [Wed, 17 Jun 2015 07:07:42 +0000 (07:07 +0000)]
32-bit build fix after r185640.

* dfg/DFGIntegerRangeOptimizationPhase.cpp:
Explicitly cast clamped int64_t to an int.

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 17 Jun 2015 06:56:59 +0000 (06:56 +0000)]
Versioning.

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

5 years agoWebProcess crashes after too many redirect error when there's an active NPAPI plugin
carlosgc@webkit.org [Wed, 17 Jun 2015 06:03:27 +0000 (06:03 +0000)]
WebProcess crashes after too many redirect error when there's an active NPAPI plugin
https://bugs.webkit.org/show_bug.cgi?id=146019

Reviewed by Darin Adler.

This happens with the GTK+ port after a navigation action ends up
in an infinite redirection and the ResourceHandle fails with too
many redirections error. I should actually happen after any error
is reported by the ResourceHnalder before the load is
committed. But tt only happens if there's an active NPAPI
plugin. The problem is that FrameLoader::receivedMainResourceError()
is called recursively because DocumentLoader::stopLoading() ends up
calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
again. DocumentLoader::stopLoading() checks if the document is
still loading, which can happen if the main resource is loading,
if there's any subresource loading or if there's a plugin
loading. So, in case of being loading, those cases are handled
individually to cancel the main resource, or set an error in the
document loader and cancel subresources and plugins, except for
this case of plugins, that mainReceivedError is called instead of
setting cancelled error on the document loader.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoading): If the document is still
loading because there are active plugins, set the cancelled error
on the document instead of calling mainReceivedError again.

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