WebKit-https.git
5 years ago[Xcode] Update some build settings as recommended by Xcode 7
mitz@apple.com [Fri, 3 Jul 2015 21:58:14 +0000 (21:58 +0000)]
[Xcode] Update some build settings as recommended by Xcode 7
https://bugs.webkit.org/show_bug.cgi?id=146597

Reviewed by Sam Weinig.

Source/bmalloc:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE, GCC_NO_COMMON_BLOCKS,
and ENABLE_STRICT_OBJC_MSGSEND. Removed GCC_MODEL_TUNING.

* bmalloc.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

Source/JavaScriptCore:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

* JavaScriptCore.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

* dfg/DFGGraph.h: Tweaked the definition of DFG_CRASH to suppress unreachable code warnings.

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj: Enabled CLANG_WARN_BOOL_CONVERSION,
CLANG_WARN_ENUM_CONVERSION, CLANG_WARN_INT_CONVERSION, ENABLE_STRICT_OBJC_MSGSEND and
GCC_NO_COMMON_BLOCKS.

* Configurations/Base.xcconfig: Updated LastUpgradeCheck.

Source/WebCore:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE,
GCC_WARN_UNDECLARED_SELECTOR, and GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

* WebCore.xcodeproj/project.pbxproj: Updated LastUpgradeCheck. Disabled -Wunreachable-code
for two bison-generated source files. Updated for rename of WebScriptObject.h.

* bindings/objc/WebScriptObject.mm:
(-[WebUndefined dealloc]): Removed unreachable code and suppressed warning about not calling
super.
* bridge/objc/WebScriptObject.h: Renamed to WebScriptObjectProtocol.h to enabled inlcuding
the other WebScriptObject.h.
* bridge/objc/WebScriptObjectProtocol.h: Renamed from WebScriptObject.h.

* bridge/objc/objc_class.mm: Updated for rename and included WebScriptObject.h because we
use selectors declared in that file.

* bridge/objc/objc_instance.mm: Ditto.
(ObjCRuntimeMethod::create): Resolved ambiguity between JSC::JSValue and the Objective-C
JSValue class.
(ObjCRuntimeMethod::createStructure): Ditto.
(ObjcInstance::invokeMethod): Ditto.
(ObjcInstance::invokeObjcMethod): Ditto.
(ObjcInstance::invokeDefaultMethod): Ditto.
(ObjcInstance::setValueOfUndefinedField): Ditto.
(ObjcInstance::getValueOfUndefinedField): Ditto.
(ObjcInstance::defaultValue): Ditto.
(ObjcInstance::stringValue): Ditto.
(ObjcInstance::numberValue): Ditto.
(ObjcInstance::booleanValue): Ditto.
(ObjcInstance::valueOf): Ditto,

* bridge/objc/objc_runtime.h: Moved definition of isFallbackMethod() from here to the
implementation.
* bridge/objc/objc_runtime.mm: Updated for rename and included WebScriptObject.h because we
use selectors declared in that file.
(JSC::Bindings::ObjcMethod::isFallbackMethod): Moved definition from the header to here.

* bridge/objc/objc_utility.mm: Updated for rename.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addScrollbarPseudoClassType): Removed unreachable code.

* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
Added declarations to the WebCoreMovieObserver interface.
(WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Suppressed
-Wundeclared-selector around invocation of a selector that is not declared anywhere.

Source/WebInspectorUI:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
GCC_NO_COMMON_BLOCKS.
* WebInspectorUI.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

Source/WebKit/mac:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE,
GCC_WARN_UNDECLARED_SELECTOR and GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

Source/WebKit2:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

* WebKit2.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

Source/WTF:

* Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE and
GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.

* WTF.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

Tools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

* DumpRenderTree/mac/Configurations/Base.xcconfig: Enabled GCC_NO_COMMON_BLOCKS,
ENABLE_STRICT_OBJC_MSGSEND, CLANG_WARN_BOOL_CONVERSION, CLANG_WARN_CONSTANT_CONVERSION,
CLANG_WARN_EMPTY_BODY, CLANG_WARN_ENUM_CONVERSION, CLANG_WARN_INT_CONVERSION,
CLANG_WARN_UNREACHABLE_CODE, GCC_WARN_ABOUT_RETURN_TYPE,
GCC_WARN_UNINITIALIZED_AUTOS, and GCC_WARN_UNDECLARED_SELECTOR.

* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController webScriptNameForSelector:]): Removed check for setDragMode:,
which was removed in r19101.

* DumpRenderTree/mac/TextInputController.m:
(-[TextInputController interpretKeyEvents:withSender:]): Suppressed -Wundeclared-selector
around used of a selector not that is not declared anywhere.

* MiniBrowser/Configurations/Base.xcconfig: Enabled GCC_NO_COMMON_BLOCKS.

* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

* TestWebKitAPI/Configurations/Base.xcconfig: Enabled GCC_NO_COMMON_BLOCKS,
ENABLE_STRICT_OBJC_MSGSEND, CLANG_WARN_BOOL_CONVERSION, CLANG_WARN_CONSTANT_CONVERSION,
CLANG_WARN_EMPTY_BODY, CLANG_WARN_ENUM_CONVERSION, CLANG_WARN_INT_CONVERSION,
CLANG_WARN_UNREACHABLE_CODE, GCC_WARN_ABOUT_RETURN_TYPE,
GCC_WARN_UNINITIALIZED_AUTOS, and GCC_WARN_UNDECLARED_SELECTOR.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Updated LastUpgradeCheck.

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

5 years agoMemory leak for a protected Element having pending events in ImageLoader.
commit-queue@webkit.org [Fri, 3 Jul 2015 21:55:24 +0000 (21:55 +0000)]
Memory leak for a protected Element having pending events in ImageLoader.
https://bugs.webkit.org/show_bug.cgi?id=146538

Patch by Kyounga Ra <kyounga@alticast.com> on 2015-07-03
Reviewed by Brady Eidson.

If ImageLoader is destroyed before an active derefElementTimer is fired, protected element's refCount never be zero..

* loader/ImageLoader.cpp:
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::updateRenderer):
(WebCore::ImageLoader::updatedHasPendingEvent):
(WebCore::ImageLoader::timerFired):
* loader/ImageLoader.h:

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

5 years agoUnreviewed, skip http/tests/xmlhttprequest/cross-origin-cookie-storage.html on Windows.
cdumez@apple.com [Fri, 3 Jul 2015 21:55:14 +0000 (21:55 +0000)]
Unreviewed, skip http/tests/xmlhttprequest/cross-origin-cookie-storage.html on Windows.

Windows' DumpRenderTree does not implement testRunner.setAlwaysAcceptCookies().

* platform/win/TestExpectations:

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

5 years agoREGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo...
dbates@webkit.org [Fri, 3 Jul 2015 20:54:15 +0000 (20:54 +0000)]
REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
https://bugs.webkit.org/show_bug.cgi?id=146515
<rdar://problem/21348421>

Reviewed by Chris Dumez.

Source/WebCore:

Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
is generated by the bindings generator script, are not ignored as per the note in section "Interface object [[Call]] method"
of the Web IDL spec, <http://www.w3.org/TR/2012/CR-WebIDL-20120419/> (19 April 2012).

Currently for an overloaded function the JavaScript bindings generator script emits code to
throw a TypeError when it cannot find a candidate function that takes the same number of
arguments as passed by a caller. Prior to the change made in bug #139179 (r178097), the
bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
generator script does not ignore them.

* bindings/scripts/CodeGeneratorJS.pm:
(LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
(GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
(GenerateOverloadedConstructorDefinition): Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
function that takes a variadic number of Blob elements.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
because we do not support overloading of functions with variadic arguments.
(WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
result for an overloaded constructors that takes a variadic number of long arguments.
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
because we do not support overloading of constructors with variadic arguments.
* bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
typo in license block text.
* bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
Also fixed typo in license block text.

LayoutTests:

Add new sub-tests to LayoutTests/fast/dom/HTMLSelectElement/{add, options-collection-add}.html,
simplify existing test code, share common code, and update expected results.

Additionally, update results for tests in LayoutTests/fast/canvas now that we ignore extra
arguments passed to a Web IDL overloaded function whose implementation is generated by the
bindings generator script.

* fast/canvas/canvas-overloads-drawImage-expected.txt:
* fast/canvas/canvas-overloads-setFillColor-expected.txt:
* fast/canvas/canvas-overloads-setShadow-expected.txt:
* fast/canvas/canvas-overloads-setStrokeColor-expected.txt:
* fast/canvas/script-tests/canvas-overloads-drawImage.js:
* fast/canvas/script-tests/canvas-overloads-setFillColor.js:
* fast/canvas/script-tests/canvas-overloads-setShadow.js:
* fast/canvas/script-tests/canvas-overloads-setStrokeColor.js:
* fast/dom/HTMLSelectElement/add-expected.txt:
* fast/dom/HTMLSelectElement/add.html:
* fast/dom/HTMLSelectElement/options-collection-add-expected.txt:
* fast/dom/HTMLSelectElement/options-collection-add.html:
* fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js: Added.
(createSelectElementWithTestData):
(deepCopy):
(createOption):
(createGroup):

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

5 years agoUnreviewed, tentative fix for flaky layout test introduced in r186256.
cdumez@apple.com [Fri, 3 Jul 2015 20:50:49 +0000 (20:50 +0000)]
Unreviewed, tentative fix for flaky layout test introduced in r186256.

* platform/mac/accessibility/selection-notification-focus-change-expected.txt:
* platform/mac/accessibility/selection-notification-focus-change.html:

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

5 years agoCrash on xLarge memory allocation using bmalloc on 32bit systems
mario@webkit.org [Fri, 3 Jul 2015 20:39:08 +0000 (20:39 +0000)]
Crash on xLarge memory allocation using bmalloc on 32bit systems
https://bugs.webkit.org/show_bug.cgi?id=146440

Reviewed by Gustavo Noronha Silva.

Disable the gcc's -ftree-sra optimization (automatically enabled
with -O1 and higher levels) for WebCore and 32bit Intel architectures,
as that causes the crash in bmalloc when allocating large amounts of
memory from the texture mapper's tiled backing store implementation.

* CMakeLists.txt: Pass -fno-free-sra to gcc on 32bit Intel architectures.

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

5 years ago[WinCairo][WebGL] Enable HLSL.
peavo@outlook.com [Fri, 3 Jul 2015 18:45:42 +0000 (18:45 +0000)]
[WinCairo][WebGL] Enable HLSL.
https://bugs.webkit.org/show_bug.cgi?id=146559

Reviewed by Alex Christensen.

High Level Shader Language needs to be enabled for WebGL to work on Windows.

* ANGLE.vcxproj/translatorCommon.props:
* ANGLE.vcxproj/translator_hlsl.vcxproj:
* ANGLE.vcxproj/translator_hlsl.vcxproj.filters:

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

5 years agoFix the !ENABLE(VIDEO) build after r186054
ossy@webkit.org [Fri, 3 Jul 2015 18:41:30 +0000 (18:41 +0000)]
Fix the !ENABLE(VIDEO) build after r186054
https://bugs.webkit.org/show_bug.cgi?id=146592

Reviewed by Eric Carlson.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

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

5 years agoRelax builtin JS restriction about try-catch
utatane.tea@gmail.com [Fri, 3 Jul 2015 17:38:20 +0000 (17:38 +0000)]
Relax builtin JS restriction about try-catch
https://bugs.webkit.org/show_bug.cgi?id=146555

Reviewed by Sam Weinig.

When retrieving the captured variables from the full activated scope,
it swapped the given vector with the stored declared variables vector.
This is because retrieving the captured variables are executed in the
last sequence of the parser, so declared variables are no longer used.
However, in builtins functions case, after retrieving the captured
variables, we check the variables by using declared variables vector.
So at that time, the declared variables vector becomes empty and it
raises assertion failures when the builtins function contains the full
activated scope. try-catch's catch scope requires the upper scope full
activated, so JS code in the builtins cannot use the try-catch.

This patch relaxes this restriction. When retrieving the captured
variables from the scope, just copy to the given vector.

* parser/Parser.h:
(JSC::Scope::getCapturedVariables):

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

5 years ago[GTK] Forcefully disable gtk-doc and gobject-introspection when crossbuilding
mrobinson@webkit.org [Fri, 3 Jul 2015 15:14:09 +0000 (15:14 +0000)]
[GTK] Forcefully disable gtk-doc and gobject-introspection when crossbuilding
https://bugs.webkit.org/show_bug.cgi?id=146590

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2015-07-03
Reviewed by Martin Robinson.

* Source/PlatformGTK.cmake: override the cached variables to
forcefully disable gtk-doc and gobject-introspection when
crosscompiling.
* Source/cmake/OptionsGTK.cmake: avoid running gtk-doc to check the
documentation syntax when cross-building.

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

5 years agoREGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
carlosgc@webkit.org [Fri, 3 Jul 2015 08:45:10 +0000 (08:45 +0000)]
REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025
https://bugs.webkit.org/show_bug.cgi?id=146545

Reviewed by Sergio Villar Senin.

In r186025 the readSync method used when traversing the cache
files was removed in favor of using parallel async reads to speed
up the traverse. The approach used doesn't work for soup, because
the IO operations are async, but run their callbacks in the
current thread. The network cache now runs up to 5 async reads in
the io work queue thread, and waits for them to finish, and those
asycn reads never finish for the soup backend because the thread
is blocked waiting for them. We need to use a different thread to
run those reads.

* NetworkProcess/cache/NetworkCacheIOChannel.h: Add
readSyncInThread private method.
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::read): When not called in the
main thread, call readSyncInThread() instead.
(WebKit::NetworkCache::IOChannel::readSyncInThread): Run the read
operation synchronously in a different thread, since the current
thread might be blocked waiting for us.

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

5 years ago[Streams API] Remove ReadableStream and Reader cancel() custom binding
youenn.fablet@crf.canon.fr [Fri, 3 Jul 2015 07:28:08 +0000 (07:28 +0000)]
[Streams API] Remove ReadableStream and Reader cancel() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146458

Reviewed by Darin Adler.

Removed stream and reader cancel custom binding.
Updated binding generator to correctly handle promise-based APIs with optional parameters.

No behavior changes.

* Modules/streams/ReadableStream.idl: Removed custom
* Modules/streams/ReadableStreamReader.idl: Ditto.
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::cancel): Deleted.
* bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::JSReadableStreamReader::cancel): Deleted.
* bindings/scripts/CodeGeneratorJS.pm: Handling of promise parameter in case of optional arguments.
(GenerateParametersCheck):
(GenerateReturnParameters): Utility function to generate return parameters (exception and promise).
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
* bindings/scripts/test/TestObj.idl:

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

5 years agoAX: Selection change as a result of focusing an element should include that
commit-queue@webkit.org [Fri, 3 Jul 2015 03:34:36 +0000 (03:34 +0000)]
AX: Selection change as a result of focusing an element should include that
information in the intent
https://bugs.webkit.org/show_bug.cgi?id=146533

Patch by Doug Russell <d_russell@apple.com> on 2015-07-02
Reviewed by Chris Fleizach.

Added focusChange flag to AXTextStateChangeIntent.
Added intent support to selection logic called by Element::updateFocusAppearance().
Added NSAccessibilityTextSelectionChangedFocus to mac notifications.

Source/WebCore:

Test: platform/mac/accessibility/selection-notification-focus-change.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postTextStateChangeNotification):
* accessibility/AXTextStateChangeIntent.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::setTextSelectionIntent):
(WebCore::AccessibilityRenderObject::setFocused):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
* dom/Element.cpp:
(WebCore::Element::updateFocusAppearance):
* dom/Element.h:
(WebCore::Element::defaultFocusTextStateChangeIntent):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::moveWithoutValidationTo):
(WebCore::FrameSelection::setSelectionByMouseIfDifferent):
(WebCore::FrameSelection::selectAll):
* editing/FrameSelection.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateFocusAppearance):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::restoreCachedSelection):
* html/HTMLTextFormControlElement.h:
* page/EventHandler.cpp:
(WebCore::setInitialKeyboardSelection):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):

LayoutTests:

* platform/mac/accessibility/selection-notification-focus-change-expected.txt: Added.
* platform/mac/accessibility/selection-notification-focus-change.html: Added.

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

5 years ago[EFL] test_ewk2_application_cache_manager has been failed since r185527
commit-queue@webkit.org [Fri, 3 Jul 2015 03:08:44 +0000 (03:08 +0000)]
[EFL] test_ewk2_application_cache_manager has been failed since r185527
https://bugs.webkit.org/show_bug.cgi?id=146016

Patch by Przemek Piorkowski <piorkowskiprzemyslaw@gmail.com> on 2015-07-02
Reviewed by Gyuyoung Kim.

In order to handle properly WebApplicationCacheManagerProxy implementation which use
.:

WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.

* Source/cmake/OptionsEfl.cmake: set ENABLE_PUBLIC_SUFFIX_LIST to ON for EFL.

Source/WebCore:

WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.

* PlatformEfl.cmake: PublicSuffixSoup.cpp added to source files.

Source/WebKit2:

WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL.
Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.

* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(TEST_F): enable ewk_application_cache_manager as it is passing now.

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

5 years agoUnreviewed, rolling out r186251.
cdumez@apple.com [Fri, 3 Jul 2015 02:40:00 +0000 (02:40 +0000)]
Unreviewed, rolling out r186251.
https://bugs.webkit.org/show_bug.cgi?id=146573

caused crashes in webaudio tests (Requested by cdumez on
#webkit).

Reverted changeset:

"Ensure media playback is stopped during page close"
https://bugs.webkit.org/show_bug.cgi?id=146554
http://trac.webkit.org/changeset/186251

Patch by Commit Queue <commit-queue@webkit.org> on 2015-07-02

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

5 years agoUnreviewed, rolling out r186247 and r186250.
cdumez@apple.com [Fri, 3 Jul 2015 02:35:08 +0000 (02:35 +0000)]
Unreviewed, rolling out r186247 and r186250.
https://bugs.webkit.org/show_bug.cgi?id=146572

Broke the build on Mavericks bots (Requested by cdumez on
#webkit).

Reverted changesets:

"Provide API to clear the HSTS cache"
https://bugs.webkit.org/show_bug.cgi?id=146565
http://trac.webkit.org/changeset/186247

"Unreviewed build fix for non-COCOA ports after r186247."
http://trac.webkit.org/changeset/186250

Patch by Commit Queue <commit-queue@webkit.org> on 2015-07-02

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

5 years agoDFG and FTL should have an OSR exit fuzzer
fpizlo@apple.com [Fri, 3 Jul 2015 01:48:01 +0000 (01:48 +0000)]
DFG and FTL should have an OSR exit fuzzer
https://bugs.webkit.org/show_bug.cgi?id=146562

Reviewed by Benjamin Poulain.

Adds a basic OSR exit fuzzer to JSC. This isn't hooked into any test harnesses yet, but I
spot-checked it on v8-earley-boyer.js and so far found no bugs. I'd like to figure out how
to harness this after I land it.

Since it's turned off by default, it should have no effect on behavior.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGOSRExitFuzz.cpp: Added.
(JSC::numberOfOSRExitFuzzChecks):
* dfg/DFGOSRExitFuzz.h: Added.
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitGetArgumentStart):
(JSC::DFG::SpeculativeJIT::emitOSRExitFuzzCheck):
(JSC::DFG::SpeculativeJIT::speculationCheck):
* dfg/DFGSpeculativeJIT.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
* jsc.cpp:
(jscmain):
* runtime/Options.h:
* runtime/TestRunnerUtils.h:

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

5 years agoEnsure media playback is stopped during page close
bfulgham@apple.com [Fri, 3 Jul 2015 01:44:40 +0000 (01:44 +0000)]
Ensure media playback is stopped during page close
https://bugs.webkit.org/show_bug.cgi?id=146554
<rdar://problem/18033944>

Reviewed by Zalan Bujtas.

Add new method to Page class to stop all media playback. It just uses the process
MediaSessionManager singleton to inform all hosted in a particular document to stop.

* Modules/webaudio/AudioContext.h:
(WebCore::WebAudio::hostingDocument): Added.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::hostingDocument): Added.
* dom/Document.cpp:
(WebCore::Document::commonTeardown): Call the new PlatformMediaSessionManager::stopAllMediaPlaybackForDocument
method on document cleanup.
* platform/audio/PlatformMediaSession.h:
Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
playback on elements that match the provided document.
* platform/audio/PlatformMediaSessionManager.h:

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

5 years agoUnreviewed build fix for non-COCOA ports after r186247.
jinwoo7.song@samsung.com [Fri, 3 Jul 2015 01:43:21 +0000 (01:43 +0000)]
Unreviewed build fix for non-COCOA ports after r186247.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData): Add PLATFORM(COCOA) guard.

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

5 years agoTapping a video in Safari causes the video to flash gray for a quick moment
dino@apple.com [Fri, 3 Jul 2015 01:27:25 +0000 (01:27 +0000)]
Tapping a video in Safari causes the video to flash gray for a quick moment
https://bugs.webkit.org/show_bug.cgi?id=146570
<rdar://problem/21325181>

Reviewed by Brent Fulgham.

On iOS, video elements should not show the tap highlight.

* css/html.css:
(video):

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

5 years ago[iOS] Add WebKitSystemInterface for iOS 8.4
dbates@webkit.org [Fri, 3 Jul 2015 00:53:10 +0000 (00:53 +0000)]
[iOS] Add WebKitSystemInterface for iOS 8.4
https://bugs.webkit.org/show_bug.cgi?id=146548

Rubber-stamped by Zalan Bujtas.

Tools:

* Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

* WebKitSystemInterfaceIOS.h:
* libWebKitSystemInterfaceIOSDevice8.4.a: Added.
* libWebKitSystemInterfaceIOSSimulator8.4.a: Added.

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

5 years agoProvide API to clear the HSTS cache
andersca@apple.com [Fri, 3 Jul 2015 00:08:18 +0000 (00:08 +0000)]
Provide API to clear the HSTS cache
https://bugs.webkit.org/show_bug.cgi?id=146565
rdar://problem/20023805

Reviewed by Tim Horton.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearHSTSCache):
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):

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

5 years agoRename "Deconstruction" to "Destructuring" throughout JSC
saambarati1@gmail.com [Thu, 2 Jul 2015 23:53:10 +0000 (23:53 +0000)]
Rename "Deconstruction" to "Destructuring" throughout JSC
https://bugs.webkit.org/show_bug.cgi?id=146100

Reviewed by Mark Lam.

Source/JavaScriptCore:

It is good to use the same naming conventions as the ES6
spec because it is the de facto way of speaking about these
language features. This also has the benefit of improving JSC's
hackability because it improves code readability for newcomers
to JSC or newcomers to this part of the code base.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeNextParameter):
(JSC::BytecodeGenerator::visibleNameForParameter):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::registerFor):
* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::tryGetBoundLocal):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):
(JSC::DestructuringAssignmentNode::emitBytecode):
(JSC::DestructuringPatternNode::~DestructuringPatternNode):
(JSC::ArrayPatternNode::collectBoundIdentifiers):
(JSC::DeconstructingAssignmentNode::emitBytecode): Deleted.
(JSC::DeconstructionPatternNode::~DeconstructionPatternNode): Deleted.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createElementList):
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createClause):
(JSC::ASTBuilder::createClauseList):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createForOfLoop):
(JSC::ASTBuilder::isBindingNode):
(JSC::ASTBuilder::isResolve):
(JSC::ASTBuilder::createDestructuringAssignment):
(JSC::ASTBuilder::createArrayPattern):
(JSC::ASTBuilder::appendArrayPatternSkipEntry):
(JSC::ASTBuilder::appendArrayPatternEntry):
(JSC::ASTBuilder::appendArrayPatternRestEntry):
(JSC::ASTBuilder::createObjectPattern):
(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::createDeconstructingAssignment): Deleted.
* parser/NodeConstructors.h:
(JSC::TryNode::TryNode):
(JSC::ParameterNode::ParameterNode):
(JSC::ForOfNode::ForOfNode):
(JSC::DestructuringPatternNode::DestructuringPatternNode):
(JSC::ArrayPatternNode::ArrayPatternNode):
(JSC::ArrayPatternNode::create):
(JSC::ObjectPatternNode::ObjectPatternNode):
(JSC::BindingNode::create):
(JSC::BindingNode::BindingNode):
(JSC::DestructuringAssignmentNode::DestructuringAssignmentNode):
(JSC::DeconstructionPatternNode::DeconstructionPatternNode): Deleted.
(JSC::DeconstructingAssignmentNode::DeconstructingAssignmentNode): Deleted.
* parser/Nodes.cpp:
(JSC::FunctionParameters::create):
* parser/Nodes.h:
(JSC::ExpressionNode::isResolveNode):
(JSC::ExpressionNode::isBracketAccessorNode):
(JSC::ExpressionNode::isDotAccessorNode):
(JSC::ExpressionNode::isDestructuringNode):
(JSC::ExpressionNode::isFuncExprNode):
(JSC::ExpressionNode::isCommaNode):
(JSC::ExpressionNode::isSimpleArray):
(JSC::ParameterNode::pattern):
(JSC::ParameterNode::nextParam):
(JSC::FunctionParameters::size):
(JSC::FunctionParameters::at):
(JSC::FunctionParameters::patterns):
(JSC::DestructuringPatternNode::isBindingNode):
(JSC::DestructuringPatternNode::emitDirectBinding):
(JSC::ArrayPatternNode::appendIndex):
(JSC::ObjectPatternNode::appendEntry):
(JSC::BindingNode::boundProperty):
(JSC::DestructuringAssignmentNode::bindings):
(JSC::ExpressionNode::isDeconstructionNode): Deleted.
(JSC::DeconstructionPatternNode::isBindingNode): Deleted.
(JSC::DeconstructionPatternNode::emitDirectBinding): Deleted.
(JSC::DeconstructingAssignmentNode::bindings): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVarDeclaration):
(JSC::Parser<LexerType>::parseWhileStatement):
(JSC::Parser<LexerType>::parseVarDeclarationList):
(JSC::Parser<LexerType>::createBindingPattern):
(JSC::Parser<LexerType>::tryParseDestructuringPatternExpression):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseDefaultValueForDestructuringPattern):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseFormalParameters):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::tryParseDeconstructionPatternExpression): Deleted.
(JSC::Parser<LexerType>::parseDeconstructionPattern): Deleted.
(JSC::Parser<LexerType>::parseDefaultValueForDeconstructionPattern): Deleted.
* parser/Parser.h:
(JSC::isEvalNode):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createPropertyList):
(JSC::SyntaxChecker::createElementList):
(JSC::SyntaxChecker::createFormalParameterList):
(JSC::SyntaxChecker::createClause):
(JSC::SyntaxChecker::createClauseList):
(JSC::SyntaxChecker::operatorStackPop):
* tests/stress/reserved-word-with-escape.js:
* tests/stress/rest-elements.js:

LayoutTests:

* js/deconstructing-parameters-should-be-locals-expected.txt: Removed.
* js/deconstructing-parameters-should-be-locals.html: Removed.
* js/destructuring-assignment-expected.txt:
* js/destructuring-parameters-should-be-locals-expected.txt: Copied from LayoutTests/js/deconstructing-parameters-should-be-locals-expected.txt.
* js/destructuring-parameters-should-be-locals.html: Copied from LayoutTests/js/deconstructing-parameters-should-be-locals.html.
* js/regress/deconstructing-parameters-overridden-by-function-expected.txt: Removed.
* js/regress/deconstructing-parameters-overridden-by-function.html: Removed.
* js/regress/destructuring-parameters-overridden-by-function-expected.txt: Copied from LayoutTests/js/regress/deconstructing-parameters-overridden-by-function-expected.txt.
* js/regress/destructuring-parameters-overridden-by-function.html: Copied from LayoutTests/js/regress/deconstructing-parameters-overridden-by-function.html.
* js/regress/script-tests/deconstructing-parameters-overridden-by-function.js: Removed.
* js/regress/script-tests/destructuring-parameters-overridden-by-function.js: Copied from LayoutTests/js/regress/script-tests/deconstructing-parameters-overridden-by-function.js.
* js/script-tests/deconstructing-parameters-should-be-locals.js: Removed.
* js/script-tests/destructuring-assignment.js:
(testDestructuredArgs):
(testDestructuredArgLength):
(testDeconstructArgs): Deleted.
(testDeconstructArgLength): Deleted.
* js/script-tests/destructuring-parameters-should-be-locals.js: Copied from LayoutTests/js/script-tests/deconstructing-parameters-should-be-locals.js.
(description.value.string_appeared_here.readDestructuredParameter):
(overwriteDestructuredParameter):
(readCapturedDestructuredParameter):
(overwriteCapturedDestructuredParameter):
(description.value.string_appeared_here.readDeconstructedParameter): Deleted.
(overwriteDeconstructedParameter): Deleted.
(readCapturedDeconstructedParameter): Deleted.
(overwriteCapturedDeconstructedParameter): Deleted.

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

5 years agoiOS WebKitLegacy should match WebKit2's viewport behavior
timothy_horton@apple.com [Thu, 2 Jul 2015 23:40:59 +0000 (23:40 +0000)]
iOS WebKitLegacy should match WebKit2's viewport behavior
https://bugs.webkit.org/show_bug.cgi?id=146564
<rdar://problem/20574017>

Reviewed by Brent Fulgham.

* WebCoreSupport/WebChromeClientIOS.mm:
(dictionaryForViewportArguments):

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

5 years agoWebKit should use 80% white background for PiP indicator
dino@apple.com [Thu, 2 Jul 2015 23:34:18 +0000 (23:34 +0000)]
WebKit should use 80% white background for PiP indicator
https://bugs.webkit.org/show_bug.cgi?id=146444
<rdar://problem/21555726>

Reviewed by Brent Fulgham.

The designers wanted 80% white, not 80% black (r186104).
I've also reverted the AirPlay background back to black.

* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-wireless-playback-status):
(audio::-webkit-media-controls-wireless-playback-status.small):
(audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):

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

5 years agoGardening: fix broken 32-bit build..
mark.lam@apple.com [Thu, 2 Jul 2015 23:32:00 +0000 (23:32 +0000)]
Gardening: fix broken 32-bit build..
https://bugs.webkit.org/show_bug.cgi?id=146416

Not reviewed.

* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SerializedScriptValue::deserialize):

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

5 years agobmalloc: Shrink the super chunk size
ggaren@apple.com [Thu, 2 Jul 2015 23:31:52 +0000 (23:31 +0000)]
bmalloc: Shrink the super chunk size
https://bugs.webkit.org/show_bug.cgi?id=146519

Reviewed by Andreas Kling.

We have lots of reports of crashing due to failed VM allocation on iOS.
(This VM limit on iOS is usually 1GB-2GB, and has been as low as 256MB.)

Shrink the super chunk size in case fragmentation is the reason for
VM allocation failure.

This has the downside that >= 2MB allocations will now be super slow,
but they are also super rare (as in never on most websites), so this
is probably an OK tradeoff.

* bmalloc/Sizes.h:

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

5 years agoCorrect *another* typo in r186238.
bfulgham@apple.com [Thu, 2 Jul 2015 22:57:03 +0000 (22:57 +0000)]
Correct *another* typo in r186238.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Fix parameter name scrolView -> scrollView.

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

5 years agoFix the build.
timothy_horton@apple.com [Thu, 2 Jul 2015 22:44:04 +0000 (22:44 +0000)]
Fix the build.

Rubber-stamped by Brady Eidson.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
Http, not HTTP, for settings generator reasons.

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

5 years agoCorrect typo in r186238.
bfulgham@apple.com [Thu, 2 Jul 2015 22:32:27 +0000 (22:32 +0000)]
Correct typo in r186238.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):

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

5 years ago[Mac] Clear current AirPlay source before setting another
eric.carlson@apple.com [Thu, 2 Jul 2015 22:31:21 +0000 (22:31 +0000)]
[Mac] Clear current AirPlay source before setting another
https://bugs.webkit.org/show_bug.cgi?id=145959

Reviewed by Brent Fulgham.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::clientStateDidChange): Don't make a client begin playing
  to the target just because it has paused.
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Always select a client that
  requrested the picker, and never consider paused clients when choosing a client to begin
  playing to the targer. Call setShouldPlayToPlaybackTarget(true) after all of the other
  clients have been told to stop playing to the target.

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

5 years agoProvide delegate SPI for clients to notify WebKit about content inset changes
bfulgham@apple.com [Thu, 2 Jul 2015 22:17:42 +0000 (22:17 +0000)]
Provide delegate SPI for clients to notify WebKit about content inset changes
https://bugs.webkit.org/show_bug.cgi?id=146482
<rdar://problem/21602741>

Reviewed by Darin Adler.

Provide a new SPI for WebKit client applications to use to inform WebKit of planned
adjustments to the edge insets of the view.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add new optional delegate method.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): If the new delegate
method exists, use the specified content insets, rather than the current state of the view.

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

5 years agoAllow the UIDelegate to customize an image preview
bdakin@apple.com [Thu, 2 Jul 2015 22:10:40 +0000 (22:10 +0000)]
Allow the UIDelegate to customize an image preview
https://bugs.webkit.org/show_bug.cgi?id=146557
-and corresponding-
rdar://problem/21657424

Reviewed by Tim Horton.

Source/WebCore:

Add WEBCORE_EXPORT to use this in WK2.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::url):

Source/WebKit2:

Add imageURL to InteractionInformationAtPosition.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:

Two new delegate methods.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Call the delegate methods at the appropriate time.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):

Include the imageURL in InteractionInformationAtPosition.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

5 years agoInstead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP...
andersca@apple.com [Thu, 2 Jul 2015 21:39:37 +0000 (21:39 +0000)]
Instead of requiring ToT UIKIt, check that UI_WEB_TOUCH_EVENT_HAS_IS_POTENTIAL_TAP is defined to 1
https://bugs.webkit.org/show_bug.cgi?id=146558

Reviewed by Beth Dakin.

* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):

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

5 years agoRemove change I accidentally committed in r186232
beidson@apple.com [Thu, 2 Jul 2015 20:47:57 +0000 (20:47 +0000)]
Remove change I accidentally committed in r186232

* UIProcess/WebsiteData/WebsiteDataStore.h:

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

5 years agoFix EWS build after r186182.
achristensen@apple.com [Thu, 2 Jul 2015 20:39:19 +0000 (20:39 +0000)]
Fix EWS build after r186182.

* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userMediaPermissionRequestManager):
Don't export a function defined in a header, or it will generate a weak external symbol.

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

5 years agoAdd preference to disable all http-equiv.
beidson@apple.com [Thu, 2 Jul 2015 20:19:36 +0000 (20:19 +0000)]
Add preference to disable all http-equiv.
<rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553

Reviewed by Sam Weinig.
Source/WebCore:

No new tests (Covered by existing test)

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setMetaRefreshEnabled:]): Still expose this SPI, but have it affect
  the "httpEquivEnabled" setting.
(-[WebPreferences metaRefreshEnabled]): Ditto.
(-[WebPreferences setHTTPEquivEnabled:]):
(-[WebPreferences httpEquivEnabled]):
* WebView/WebPreferencesPrivate.h:

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMetaRefreshEnabled): Still expose this SPI, but have it affect
  the "httpEquivEnabled" setting.
(WKPreferencesGetMetaRefreshEnabled): Ditto
(WKPreferencesSetHTTPEquivEnabled):
(WKPreferencesGetHTTPEquivEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

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

LayoutTests:

* loader/meta-refresh-disabled.html:

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

5 years ago[Streams API] Remove ReadableStreamController.enqueue() custom binding
youenn.fablet@crf.canon.fr [Thu, 2 Jul 2015 19:27:24 +0000 (19:27 +0000)]
[Streams API] Remove ReadableStreamController.enqueue() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146455

Reviewed by Darin Adler.

Made enqueue not custom. Updated error to use Default=Undefined in IDL.

No change in behavior.

* Modules/streams/ReadableStreamController.h:
(WebCore::ReadableStreamController::error): Removed unneeded variation of error.
(WebCore::ReadableStreamController::enqueue): Calling ReadableJSStream enqueue method.
* Modules/streams/ReadableStreamController.idl: Updated error with Default=Undefined and made enqueue not custom.
* bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException): Adding support for RangeError exceptions.
* bindings/js/JSReadableStreamControllerCustom.cpp:
(WebCore::constructJSReadableStreamController): Deleted.
* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::error): Updated to pass error value as parameter.
(WebCore::ReadableJSStream::enqueue): Added exception throwing through ExceptionCode.
(WebCore::ReadableJSStream::retrieveChunkSize): Ditto.
* bindings/js/ReadableJSStream.h:
* dom/ExceptionCode.h: Adding RangeError.

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

5 years agoBuild fix for Win EWS bot.
mark.lam@apple.com [Thu, 2 Jul 2015 18:44:30 +0000 (18:44 +0000)]
Build fix for Win EWS bot.
https://bugs.webkit.org/show_bug.cgi?id=146551

Not reviewed.

* tools/JSDollarVMPrototype.cpp:
(JSC::functionCrash):

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

5 years agoWKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
mark.lam@apple.com [Thu, 2 Jul 2015 18:38:22 +0000 (18:38 +0000)]
WKWebView evaluateJavaScript:completionHandler: should reuse its JSContext instance.
https://bugs.webkit.org/show_bug.cgi?id=146416

Reviewed by Anders Carlsson.

The core issue here is that we need to be able to deserialized an
API::SerializedScriptValue instance into an ObjC object graph.  We'll solve this
by introducing a API::SerializedScriptValue::deserialize() functions that does
the job.  The deserialize() function will will use a SharedJSContext to provide
the needed JSContext for doing this work.

Also updated ScriptMessageHandlerDelegate::didPostMessage() to use this new
deserialize() function.

* Shared/API/APISerializedScriptValue.h:
(API::SerializedScriptValue::deserialize):
(API::SerializedScriptValue::internalRepresentation):
- Changed to return a WebCore::SerializedScriptValue*.  This makes it friendlier
  to use in the 2 places that need it.

* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm: Added.
(API::SharedJSContext::SharedJSContext):
(API::SharedJSContext::ensureContext):
(API::SharedJSContext::releaseContext):
(API::SerializedScriptValue::deserialize):
* UIProcess/API/Cocoa/WKUserContentController.mm:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRunJavaScriptCallback):
- Removed a now unnecessary cast.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago[Content Extensions] Block synchronous XMLHTTPRequest.
beidson@apple.com [Thu, 2 Jul 2015 18:33:23 +0000 (18:33 +0000)]
[Content Extensions] Block synchronous XMLHTTPRequest.
<rdar://problem/21573006> and https://bugs.webkit.org/show_bug.cgi?id=146271

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/contentextensions/sync-xhr-blocked.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously): If content blocked, set up an error, clear
  the response, and clear the response data.

LayoutTests:

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

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

5 years agoWeb Inspector: Show suggest popover on Tab press even if it wasn't showing before
drousso@apple.com [Thu, 2 Jul 2015 17:31:57 +0000 (17:31 +0000)]
Web Inspector: Show suggest popover on Tab press even if it wasn't showing before
https://bugs.webkit.org/show_bug.cgi?id=146496

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey): Pressing tab will try to autocomplete before trying
to add an ending colon/semicolon or highlight the next section of text.

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

5 years ago<rdar://problem/21429613> [iOS] Stop making symlinks from PrivateFrameworks to Frameworks
mitz@apple.com [Thu, 2 Jul 2015 16:04:01 +0000 (16:04 +0000)]
<rdar://problem/21429613> [iOS] Stop making symlinks from PrivateFrameworks to Frameworks
https://bugs.webkit.org/show_bug.cgi?id=146542

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Removed the build phase that makes the symlink.

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj: Removed the build phase that makes the directory of
symlinks.

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

5 years ago[GTK] WebSQL doesn't work because openDatabase always fails with DOM Exception 18
carlosgc@webkit.org [Thu, 2 Jul 2015 13:00:35 +0000 (13:00 +0000)]
[GTK] WebSQL doesn't work because openDatabase always fails with DOM Exception 18
https://bugs.webkit.org/show_bug.cgi?id=146234

Reviewed by Sergio Villar Senin.

Source/WebKit2:

This is because we don't provide any quota, and 0 is used by
default, so there's never enough quota and openDatabase fails. We
should expose this in the API, but for now, we could use a default
quota of 5MB like WTR does.

* UIProcess/API/gtk/WebKitUIClient.cpp: Override
exceededDatabaseQuota and return always the default quota.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::exceededDatabaseQuota): Return the quota based on the
expected usage and current database usabe like mac does.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Add
custom UI client to implement exceededDatabaseQuota.

Tools:

Enable the WebSQL directory test that was disabled because of this bug.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextConfiguration):

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

5 years agoUnreviewed, rolling out r185704.
commit-queue@webkit.org [Thu, 2 Jul 2015 12:13:58 +0000 (12:13 +0000)]
Unreviewed, rolling out r185704.
https://bugs.webkit.org/show_bug.cgi?id=146544

Didn't fix the problem (Requested by anttik on #webkit).

Reverted changeset:

"~4% Membuster regression after WebKit r185452"
https://bugs.webkit.org/show_bug.cgi?id=146112
http://trac.webkit.org/changeset/185704

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

5 years agoiOS WebKitLegacy should match WebKit2's viewport behavior
timothy_horton@apple.com [Thu, 2 Jul 2015 07:36:19 +0000 (07:36 +0000)]
iOS WebKitLegacy should match WebKit2's viewport behavior
https://bugs.webkit.org/show_bug.cgi?id=146540
<rdar://problem/20574017>

Reviewed by Dan Bernstein.

A number of changes have been made to WebKit2's viewport behavior
to make it possible to scale "responsive" sites that misbehave (lay out
in a non-responsive way).

* History/WebHistoryItem.mm:
* History/WebHistoryItemPrivate.h:
Add the plumbing required to implement these new behaviors in WebKit1.

* WebKit.iOS.exp:

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

5 years agoSkip new web timing test on platforms without web timing.
achristensen@apple.com [Thu, 2 Jul 2015 07:27:27 +0000 (07:27 +0000)]
Skip new web timing test on platforms without web timing.

* platform/ios-sim-deprecated/Skipped:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

5 years ago[GTK] Accelerated Compositing stops working after a web process crash
carlosgc@webkit.org [Thu, 2 Jul 2015 07:08:20 +0000 (07:08 +0000)]
[GTK] Accelerated Compositing stops working after a web process crash
https://bugs.webkit.org/show_bug.cgi?id=146508

Reviewed by Martin Robinson.

The problem is that we don't send the window ID again to the new
web process.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didRelaunchProcess): Call
webkitWebViewBaseDidRelaunchWebProcess().
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess): Set the window ID to
the new drawing area.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

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

5 years agoSource/ThirdParty/ANGLE:
achristensen@apple.com [Thu, 2 Jul 2015 06:59:50 +0000 (06:59 +0000)]
Source/ThirdParty/ANGLE:
Re-enable WebGL on WinCairo
https://bugs.webkit.org/show_bug.cgi?id=146537

Reviewed by Csaba Osztrogonác.

* ANGLE.vcxproj/DirectX32.props:
* ANGLE.vcxproj/DirectX64.props:
* ANGLE.vcxproj/libGLESv2Common.props:
Update DirectX directories to use the Windows SDK instead of the June 2010 DirectX SDK.

Source/WebKit:
Re-enable WebGL on WinCairo.
https://bugs.webkit.org/show_bug.cgi?id=146537

Reviewed by Csaba Osztrogonác.

* WebKit.vcxproj/WebKit.sln:
Build the ANGLE projects on WinCairo again.

Source/WTF:
Re-enable WebGL on WinCairo
https://bugs.webkit.org/show_bug.cgi?id=146537

Reviewed by Csaba Osztrogonác.

* wtf/FeatureDefines.h:
Enable WebGL on WinCairo again.

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

5 years agoFix test from r186208 and r186216.
achristensen@apple.com [Thu, 2 Jul 2015 06:41:31 +0000 (06:41 +0000)]
Fix test from r186208 and r186216.

* http/tests/misc/webtiming-resolution-expected.txt:
* http/tests/misc/webtiming-resolution.html:
Properly and explicitly test if the time delta is close to a multiple of the expected resolution.

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

5 years agoWeb Inspector: Aggregate profile call information on the backend to drastically reduc...
commit-queue@webkit.org [Thu, 2 Jul 2015 04:46:43 +0000 (04:46 +0000)]
Web Inspector: Aggregate profile call information on the backend to drastically reduce profile sizes
https://bugs.webkit.org/show_bug.cgi?id=146536

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

Source/JavaScriptCore:

* inspector/protocol/Timeline.json:
Change a CPUProfile from sending a required "calls" param to sending a required
"callInfo" param which includes aggregated information about the calls.

Source/WebCore:

* inspector/TimelineRecordFactory.cpp:
(WebCore::buildAggregateCallInfoInspectorObject):
(WebCore::buildInspectorObject):
Replace the array of Call objects with a single aggregated call info object.

Source/WebInspectorUI:

Since we still support legacy backends, the frontend documents where
it is handling legacy backends with compatibility comments.

* UserInterface/Models/ProfileNode.js:
(WebInspector.ProfileNode):
(WebInspector.ProfileNode.prototype.get callInfo):
Handle a ProfileNode created with callInfo or calls. They are mutually exclusive.

* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
If the profile has per-call information, construct ProfileNodeCall objects, otherwise
just construct the ProfileNode with the aggregate callInfo value.

* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
When we have aggregate call information we cannot easily partition a script,
so we instead treat the entire script as one large atomic unit in the timeline.
If the timeline range has any portion of the script, show the entire script.
Users used to be able to select a portion of a script and view the relevant
functions called in just that sliver, but this doesn't appear to be a well
known feature or commonly used. In fact, given the small ranges of time it
could be confusing for users.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters):
Treat as a discrete unit.

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

5 years agoWeb Inspector: When autocompleting, pressing tab twice shouldn't insert a tab character
drousso@apple.com [Thu, 2 Jul 2015 04:30:53 +0000 (04:30 +0000)]
Web Inspector: When autocompleting, pressing tab twice shouldn't insert a tab character
https://bugs.webkit.org/show_bug.cgi?id=145885

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions): Resolves the promise as having completions.
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions): Resolves the promise as not having completions.
(WebInspector.CodeMirrorCompletionController.prototype.completeAtCurrentPositionIfNeeded): Returns a WrappedPromise that allows
callers of this function to determine if the autocomplete had any values or was instead not shown.
(WebInspector.CodeMirrorCompletionController.prototype._resolveUpdatePromise):
* UserInterface/Main.html: Added WrappedPromise class.
* UserInterface/Models/WrappedPromise.js: Added WrappedPromise object to expose resolve and reject functions.
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype._handleTabKey): Attempts to find completions for current text.  If there are none, beep.

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

5 years agoReduce resolution of performance.now
cdumez@apple.com [Thu, 2 Jul 2015 04:01:03 +0000 (04:01 +0000)]
Reduce resolution of performance.now
https://bugs.webkit.org/show_bug.cgi?id=146531

Reviewed by Simon Fraser.

Make layout test introduced in r186208.

* http/tests/misc/webtiming-resolution-expected.txt:
* http/tests/misc/webtiming-resolution.html:

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

5 years agoDFG::freezeFragile should register the frozen value's structure
fpizlo@apple.com [Thu, 2 Jul 2015 01:30:28 +0000 (01:30 +0000)]
DFG::freezeFragile should register the frozen value's structure
https://bugs.webkit.org/show_bug.cgi?id=136055
rdar://problem/21042120

Reviewed by Mark Lam and Geoffrey Garen.

This fixes weird concurrency bugs where the constant folding phase tries to convert
something to a constant but then crashes because the constant's structure wasn't
registered. The AI was registering the structure of any value it saw, but constant folding
wasn't - and that's fine so long as there ain't no concurrency.

The best fix is to just make it impossible to introduce a constant into the IR without
registering its structure. That's what this change does. This is not only a great
concurrency fix - it also makes the compiler somewhat easier to hack on because it's one
less case of structure registering that you have to remember about.

* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::setOSREntryValue): No need to register.
(JSC::DFG::AbstractValue::set): We still call register, but just to get the watchpoint state.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::freezeFragile): Register the structure.
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run): Assert that these are all registered.

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

5 years agoWeb Inspector: [Mac] InspectorFrontendHost.beep() doesn't play a sound, sandbox warnings
commit-queue@webkit.org [Thu, 2 Jul 2015 00:51:15 +0000 (00:51 +0000)]
Web Inspector: [Mac] InspectorFrontendHost.beep() doesn't play a sound, sandbox warnings
https://bugs.webkit.org/show_bug.cgi?id=146525

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

* WebProcess/com.apple.WebProcess.sb.in:
Get NSBeep working without any sandbox warnings.

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

5 years agoMake the first click on a rule section create a newline for easy property addition
drousso@apple.com [Thu, 2 Jul 2015 00:47:52 +0000 (00:47 +0000)]
Make the first click on a rule section create a newline for easy property addition
https://bugs.webkit.org/show_bug.cgi?id=146490

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey): Inserts a semicolon if the line is missing one.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseDown): If the user clicks on a property with the editor being
unfocused, the name/value containing the cursor will be highlighted.  If instead the user clicks at the end of a line, the
cursor's position is saved for mouseUp.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp): If the mouseDown cursor position was saved and is equal
to the current cursor's position (the user did not drag), add a newline after the current line and place the cursor on that line.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleTabKey.highlightNextNameOrValue): Deleted.

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

5 years agoUnreviewed, rebaseline js/dom/global-constructors-attributes.html after r186198.
cdumez@apple.com [Thu, 2 Jul 2015 00:40:04 +0000 (00:40 +0000)]
Unreviewed, rebaseline js/dom/global-constructors-attributes.html after r186198.

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

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

5 years ago[Win] REGRESSION (r185124) CACFLayer handling broken
bfulgham@apple.com [Thu, 2 Jul 2015 00:36:15 +0000 (00:36 +0000)]
[Win] REGRESSION (r185124) CACFLayer handling broken
https://bugs.webkit.org/show_bug.cgi?id=146530
<rdar://problem/21642241>

Reviewed by Tim Horton.

At some point in the past, the set of LayerChange flags
overflowed the default MSVC enum type of 'int'. This caused
Windows rendering code to not receive various update notifications.

Zalan's change moved the DebugIndicatorsChanged flag into that
overflow set, which made it obvious that something was wrong.

The fix is to tell the compiler to use a compatible base type
for the enum.

* platform/graphics/ca/GraphicsLayerCA.h: Prevent overflow.

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

5 years agoReduce resolution of performance.now.
achristensen@apple.com [Thu, 2 Jul 2015 00:29:55 +0000 (00:29 +0000)]
Reduce resolution of performance.now.
https://bugs.webkit.org/show_bug.cgi?id=146531
rdar://problem/20116796

Reviewed by Simon Fraser.

Source/WebCore:

Test: http/tests/misc/webtiming-resolution.html

* page/Performance.cpp:
(WebCore::Performance::now):
Floor the time returned by performance.now to the nearest 5 microseconds.

LayoutTests:

* http/tests/misc/webtiming-resolution-expected.txt: Added.
* http/tests/misc/webtiming-resolution.html: Added.

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

5 years agoIgnore Visual Studio warning in SegmentedVector
commit-queue@webkit.org [Thu, 2 Jul 2015 00:07:50 +0000 (00:07 +0000)]
Ignore Visual Studio warning in SegmentedVector
https://bugs.webkit.org/show_bug.cgi?id=146514

Patch by Alex Christensen <achristensen@webkit.org> on 2015-07-01
Reviewed by Andreas Kling.

* wtf/SegmentedVector.h:
(WTF::SegmentedVector::deleteAllSegments):
Use pragmas to ignore the 0 element array warning.

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

5 years ago[iOS] Build fix
bfulgham@apple.com [Thu, 2 Jul 2015 00:05:40 +0000 (00:05 +0000)]
[iOS] Build fix

Patch by Eric Carlson <eric.carlson@apple.com> on 2015-07-01
Reviewed by Brent Fulgham.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Renamed from enterOptimizedFullScreenModeRedirectingVideoToLayer.
(-[WebAVVideoLayer leavePIPMode]): Renamed from leaveOptimizedFullScreenMode.
(-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]): Deleted.
(-[WebAVVideoLayer leaveOptimizedFullScreenMode]): Deleted.

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

5 years ago[iOS] Support bold and thin italicized system fonts
mmaxfield@apple.com [Thu, 2 Jul 2015 00:02:15 +0000 (00:02 +0000)]
[iOS] Support bold and thin italicized system fonts
https://bugs.webkit.org/show_bug.cgi?id=146463
<rdar://problem/20948885>

Reviewed by Darin Adler.

Source/WebCore:

Add the italicized attribute to font descriptors.

Test: fast/text/weighted-italicized-system-font.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::createCTFontWithFamilyNameAndWeight):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::fontWithFamilySpecialCase):
(WebCore::fontWithFamily):
* platform/spi/cocoa/CoreTextSPI.h:

LayoutTests:

* fast/text/weighted-italicized-system-font-expected.html: Added.
* fast/text/weighted-italicized-system-font.html: Added.

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

5 years agoRemove code to recompute rounded window corners
andersca@apple.com [Thu, 2 Jul 2015 00:00:12 +0000 (00:00 +0000)]
Remove code to recompute rounded window corners
https://bugs.webkit.org/show_bug.cgi?id=146534

Reviewed by Simon Fraser.

This code is no longer needed since we're always layer-backed now.

* UIProcess/API/mac/WKView.mm:
(-[WKView displayIfNeeded]): Deleted.
(-[WKView _cacheWindowBottomCornerRect]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:

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

5 years agobmalloc: realloc of an XLarge range can unmap adjacent VM ranges
ggaren@apple.com [Wed, 1 Jul 2015 23:36:53 +0000 (23:36 +0000)]
bmalloc: realloc of an XLarge range can unmap adjacent VM ranges
https://bugs.webkit.org/show_bug.cgi?id=146535

Reviewed by Anders Carlsson.

This bug causes a crash when running fast/css/large-list-of-rules-crash.html
with the fix applied for https://bugs.webkit.org/show_bug.cgi?id=146519.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::reallocate): Start at object + newSize since starting
at object + oldSize means deleting the adjacent VM range.

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

5 years agoUnreviewed, rolling out r185889
mmirman@apple.com [Wed, 1 Jul 2015 23:28:51 +0000 (23:28 +0000)]
Unreviewed, rolling out r185889
https://bugs.webkit.org/show_bug.cgi?id=146528
rdar://problem/21573959

Patch breaks chromeexperiments.com

Reverted changeset:

Source/JavaScriptCore:

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/InjectedScriptSource.js:
(.):
* runtime/JSBoundSlotBaseFunction.cpp: Removed.
* runtime/JSBoundSlotBaseFunction.h: Removed.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Deleted.
(JSC::JSGlobalObject::visitChildren): Deleted.
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::boundSlotBaseFunctionStructure): Deleted.
* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):
(JSC::getBoundSlotBaseFunctionForGetterSetter): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM): Deleted.
* runtime/VM.h:

LayoutTests:

* inspector-protocol/runtime/getProperties-expected.txt:
* js/dom/native-bindings-descriptors-expected.txt: Removed.
* js/dom/native-bindings-descriptors.html: Removed.
* js/dom/script-tests/native-bindings-descriptors.js: Removed.

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

5 years agoFix ANGLE Windows build after r186169.
achristensen@apple.com [Wed, 1 Jul 2015 23:26:07 +0000 (23:26 +0000)]
Fix ANGLE Windows build after r186169.
https://bugs.webkit.org/show_bug.cgi?id=146532

Reviewed by Brent Fulgham.

Source/ThirdParty/ANGLE:

* ANGLE.vcxproj/libEGL.vcxproj:
* ANGLE.vcxproj/libEGL.vcxproj.filters:
* ANGLE.vcxproj/libGLESv2.vcxproj:
* ANGLE.vcxproj/libGLESv2.vcxproj.filters:
* ANGLE.vcxproj/libGLESv2Common.props:
* ANGLE.vcxproj/translator_common.vcxproj:
* ANGLE.vcxproj/translator_common.vcxproj.filters:
* ANGLE.vcxproj/translator_glsl.vcxproj:
* ANGLE.vcxproj/translator_glsl.vcxproj.filters:
* ANGLE.vcxproj/translator_hlsl.vcxproj:
* ANGLE.vcxproj/translator_hlsl.vcxproj.filters:
Update Windows build to build new files.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Don't compile OpenGLShims.cpp or Extensions3DOpenGL.cpp on Windows
because Windows uses OpenGLES through ANGLE, not OpenGL.
* platform/graphics/ANGLEWebKitBridge.h:
Use OpenGLESShims.h on Windows instead of OpenGLShims.h.
* platform/graphics/OpenGLESShims.h:
Added needed definitions from OpenGL to compile successfully.
* platform/graphics/win/GL/glext.h: Removed.

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

5 years agoWeb page doesn't update its loading state when web process becomes suspended if there...
commit-queue@webkit.org [Wed, 1 Jul 2015 23:17:58 +0000 (23:17 +0000)]
Web page doesn't update its loading state when web process becomes suspended if there are pending network requests (XHR).
https://bugs.webkit.org/show_bug.cgi?id=146439

When web page is loading, we hold a background activity token in NavigationState and we release the token when the page done
loading. A web page can start loading subresources (like XHR) after the page is loaded, and WebPageProxy will update its
_networkRequestsInProgress state which will notify the client there is network actvity on-going. Since we don't hold
the background activity token after page is loaded, the WebContent process could become suspended without notifying the client
and the client will lose track of the loading state.

The first thought was to hold another background activity when _networkRequestsInProgress flag is set in NavigationState.
However, this could result in side-effect that a WebContent process can stay active for too long if there is a long lasting
XHR resquest.

This patch fix this by notifying the client that network activity is stopped when WebContent process is going to be suspended.
We also cache the networkRequestsInProgress state for suspended process, so that when it becomes foreground, we can tell
the client the correct state of network activity.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-07-01
Reviewed by Dan Bernstein.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_hasNetworkRequestsOnSuspended.
(WebKit::WebPageProxy::processWillBecomeSuspended): If there is pending requests on suspend, cache the network activity state
    and notify the client.
(WebKit::WebPageProxy::processWillBecomeForground): Restore the network activity state when the process becomes foreground.
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h: Add a data member m_hasNetworkRequestsOnSuspended to cache the network activity state on process
    suspend.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didSetAssertionState):

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

5 years agoTurn off mediastreamaudiosourcenode.html test
commit-queue@webkit.org [Wed, 1 Jul 2015 23:09:48 +0000 (23:09 +0000)]
Turn off mediastreamaudiosourcenode.html test
https://bugs.webkit.org/show_bug.cgi?id=146527
<rdar://problem/21641223>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Simon Fraser.

* platform/mac/TestExpectations:

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

5 years agoDisable the experimental WebGL2 implementation
dino@apple.com [Wed, 1 Jul 2015 22:38:37 +0000 (22:38 +0000)]
Disable the experimental WebGL2 implementation
https://bugs.webkit.org/show_bug.cgi?id=146526
<rdar://problem/21641235>

Reviewed by Myles Maxfield.

Source/JavaScriptCore:

Add (and disable) an ENABLE_WEBGL2 flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Add (and disable) an ENABLE_WEBGL2 flag. Also protect
anything that is specific to WebGL2.

Covered by running the WebGL 1.0.2 conformance suite
and our LayoutTests.

* Configurations/FeatureDefines.xcconfig:
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWebGL2RenderingContextCustom.cpp:
* bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
(WebCore::toJS):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::is3dType):
* html/canvas/WebGL2RenderingContext.cpp:
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGL2RenderingContext.idl:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
* html/canvas/WebGLGetInfo.cpp:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
* html/canvas/WebGLVertexArrayObject.cpp:
* html/canvas/WebGLVertexArrayObject.h:
* html/canvas/WebGLVertexArrayObject.idl:

Source/WebKit/mac:

Add (and disable) an ENABLE_WEBGL2 flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Add (and disable) an ENABLE_WEBGL2 flag.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Add (and disable) an ENABLE_WEBGL2 flag.

* wtf/FeatureDefines.h:

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

5 years agoFix missing space.
simon.fraser@apple.com [Wed, 1 Jul 2015 22:22:58 +0000 (22:22 +0000)]
Fix missing space.

* platform/mac/TestExpectations:

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

5 years agoNever try to pass URLs to LaunchServices when they're the same domain as the current...
beidson@apple.com [Wed, 1 Jul 2015 21:54:59 +0000 (21:54 +0000)]
Never try to pass URLs to LaunchServices when they're the same domain as the current URL.
<rdar://problem/20731429> and https://bugs.webkit.org/show_bug.cgi?id=146521

Reviewed by Alex Christensen.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): Compare the proposed URL to the current URL to see if they’re in the same domain.
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

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

5 years agoRegression(183998): Disqus comments take a very long time to load
cdumez@apple.com [Wed, 1 Jul 2015 21:52:07 +0000 (21:52 +0000)]
Regression(183998): Disqus comments take a very long time to load
https://bugs.webkit.org/show_bug.cgi?id=146522
<rdar://problem/21590601>

Reviewed by Simon Fraser.

Source/WebCore:

Stop throttling requestAnimationFrame() in iframes that are not visible
due to them being zero-sized or display:none. Those are usually utility
iframes and throttling them is risky.

Se still throttle requestAnimationFrame() in iframes that would be
visible in theory but are currently not noticeable because they are
outside the viewport.

Test:
- fast/animation/request-animation-frame-throttle-subframe.html
- fast/animation/request-animation-frame-throttle-subframe-display-none.html
- fast/animation/request-animation-frame-throttle-subframe-zero-size.html

* page/FrameView.cpp:
(WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):

LayoutTests:

* fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt:
* fast/animation/request-animation-frame-throttle-subframe-display-none.html:
Update layout test as we changed behavior here. We no longer throttle display:none
iframes.

* fast/animation/request-animation-frame-throttle-subframe-zero-size-expected.txt: Added.
* fast/animation/request-animation-frame-throttle-subframe-zero-size.html: Added.
Add layout test to check that we don't throttle RaF in iframes that are zero-sized.

* fast/animation/resources/requestAnimationFrame-frame-2.html:
* fast/animation/resources/requestAnimationFrame-frame.html:
Update use of requestAnimationFrame() to be more representative of real world usage.

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

5 years agoWKWebView snapshots have the wrong scale after rotation
timothy_horton@apple.com [Wed, 1 Jul 2015 21:34:58 +0000 (21:34 +0000)]
WKWebView snapshots have the wrong scale after rotation
https://bugs.webkit.org/show_bug.cgi?id=146476
<rdar://problem/18345247>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
"Coordinate" -> "Coordinates".

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Defer any snapshotting that happens during a resize until after
the resize completes. This will ensure that (in the case of an IOSurface
snapshot) the tiles are up to date, and (in the case of a software snapshot)
that our understanding of the scale and scroll offset of the WKContentView
are up to date, so that we can correctly convert from view to content coordinates
in the UI process.

(-[WKWebView _endAnimatedResize]):
Perform the deferred snapshotting after the resize completes.

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

5 years agoFix the iOS build.
simon.fraser@apple.com [Wed, 1 Jul 2015 21:21:45 +0000 (21:21 +0000)]
Fix the iOS build.

* WebCoreSupport/WebUserMediaClient.mm:
(-[WebUserMediaPolicyListener denyOnlyThisRequest]): Remove ASSERT_NOT_REACHED,
because it caused the compiler to warn about noreturn.

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

5 years agoMark compositing/masks/compositing-clip-path-origin.html as being image-flakey.
simon.fraser@apple.com [Wed, 1 Jul 2015 20:53:39 +0000 (20:53 +0000)]
Mark compositing/masks/compositing-clip-path-origin.html as being image-flakey.

* platform/mac/TestExpectations:

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

5 years agoREGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted...
rniwa@webkit.org [Wed, 1 Jul 2015 20:31:25 +0000 (20:31 +0000)]
REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
https://bugs.webkit.org/show_bug.cgi?id=146492

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by WebKit serializing the used line-height size (e.g. 18px) in the copied content
instead of string "normal" and removeStyleFromRulesAndContext failing to strip it down when text with
a font that influences the line height got pasted. This is because the used value of line-height
property of the context and the pasted content doesn't match when the context doesn't use the same font.

Fixed the bug by not considering line-height as a list of editing properties we try to preserve. This is
fine because we don't provide editing operations to directly manipulate line-height.

Test: editing/pasteboard/cjk-line-height.html

* editing/EditingStyle.cpp:
(WebCore::editingProperties): Removed CSSPropertyLineHeight.

LayoutTests:

Added a regression test. Also reverted the bad rebaseline in r179168:
http://trac.webkit.org/changeset/179168/trunk/LayoutTests/editing/pasteboard/simplfiying-markup-should-not-strip-content-expected.txt

* editing/pasteboard/cjk-line-height-expected.txt: Added.
* editing/pasteboard/cjk-line-height.html: Added.
* editing/pasteboard/simplfiying-markup-should-not-strip-content-expected.txt:

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

5 years agoREGRESSION (r184296): View keeps scrolling upward
bfulgham@apple.com [Wed, 1 Jul 2015 19:29:33 +0000 (19:29 +0000)]
REGRESSION (r184296): View keeps scrolling upward
https://bugs.webkit.org/show_bug.cgi?id=146497
<rdar://problem/21524942>

Reviewed by Darin Adler.

Avoid improperly triggering the ScrollController wheel event handling
logic when the wheel event deltaX/deltaY are zero. On certain sites,
this caused a programmatic JavaScript scroll to be triggered unexpectedly,
scrolling the page back to some initial state.

This bug was introduced while trying to make sure scrollbars were notified
when the wheel event had come to an end. Revise that change so that we still
follow the right code path for non-stretchable regions. However, make sure
that for zero-delta wheel events we make sure to properly handle the wheel
event phase.

* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): New helper function
to reduce the complexity of the logic in handleWheelEvent.
(WebCore::ScrollAnimatorMac::handleWheelEvent): When wheel events should be forwarded
to the parent scroll view, if the event was handled or has no change in position
trigger the 'handleWheelEventPhase' logic so that scrollbars are hidden, etc.

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

5 years agoThis is a quick follow-on to http://trac.webkit.org/changeset/186132
bdakin@apple.com [Wed, 1 Jul 2015 19:11:47 +0000 (19:11 +0000)]
This is a quick follow-on to trac.webkit.org/changeset/186132

Rubber-stamped by Darin Adler.

Make this a one-liner.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

5 years agoHide the inline controls when going into PiP
dino@apple.com [Wed, 1 Jul 2015 19:08:22 +0000 (19:08 +0000)]
Hide the inline controls when going into PiP
https://bugs.webkit.org/show_bug.cgi?id=146487
<rdar://problem/19881159>

Reviewed by Eric Carlson.

When the presentation mode is PiP, toggle a class
on the container element so that we can completely
hide the control toolbar. The placard should still
remain visible.

* Modules/mediacontrols/mediaControlsiOS.css:
(video::-webkit-media-controls-panel-container.picture-in-picture): Add
a rule that hides the toolbar when PiP is active.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.showControls):
(ControllerIOS.prototype.handlePresentationModeChange): Toggle a
class. Also fix a bug I noticed where exiting from PiP was
not auto-hiding the controls until the user tapped.

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

5 years agoSource/JavaScriptCore:
commit-queue@webkit.org [Wed, 1 Jul 2015 18:44:27 +0000 (18:44 +0000)]
Source/JavaScriptCore:
Enable MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Eric Carlson.

* Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag

Source/WebCore:
Enable MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Eric Carlson.

* Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag
* Modules/mediastream/MediaStreamTrack.h:
* WebCore.xcodeproj/project.pbxproj: Changed project headers to
private headers
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::refreshCaptureDeviceList): Deleted.
* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::startProducingData):
(WebCore::AVMediaCaptureSource::stopProducingData):

Source/WebKit/mac:
Enable MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Eric Carlson.

* Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag
* WebCoreSupport/WebUserMediaClient.h: Changed signatures
* WebCoreSupport/WebUserMediaClient.mm: Changed signatures
(WebUserMediaClient::requestPermission):
(WebUserMediaClient::cancelRequest):
(-[WebUserMediaPolicyListener denyOnlyThisRequest]):
(-[WebUserMediaPolicyListener shouldClearCache]):

Source/WebKit2:
Enable MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Eric Carlson.

* Configurations/FeatureDefines.xcconfig: Add MEDIA_STREAM flag
* WebKit2.xcodeproj/project.pbxproj: Changed some project to private
declarations of headers
* WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userMediaPermissionRequestManager):

Tools:
Enabled MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Eric Carlson.

* TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

LayoutTests:
Enable MEDIA_STREAM flag
https://bugs.webkit.org/show_bug.cgi?id=145947
<rdar://problem/21365829>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-01
Reviewed by Eric Carlson.

*
platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
Added attributes to tests
*
platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
Ditto
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
Ditto

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

5 years agoREGRESSION (r185016): Intermittent crash in WebCore::TextTrackList::remove
bfulgham@apple.com [Wed, 1 Jul 2015 17:35:56 +0000 (17:35 +0000)]
REGRESSION (r185016): Intermittent crash in WebCore::TextTrackList::remove
https://bugs.webkit.org/show_bug.cgi?id=146493
<rdar://problem/21511122>

Reviewed by Eric Carlson.

The m_textTracks member is frequently null checked during other operations, but
was not checked during track removal. This needs to be corrected.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removeTextTrack): Check that m_textTracks is
not null before using it during track removal.

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

5 years agoPNG mask images are loaded with Accept:image/svg+xml
antti@apple.com [Wed, 1 Jul 2015 17:22:27 +0000 (17:22 +0000)]
PNG mask images are loaded with Accept:image/svg+xml
https://bugs.webkit.org/show_bug.cgi?id=146509
Source/WebCore:

rdar://problem/21584740

Reviewed by Simon Fraser.

For some strange reason MaskImageOperation code loads all mask images, including non-SVG ones
using CachedSVGDocument. Resulting bad accept header may cause server to reject the request.

This is far from ideal but as a quick fix we can override the accept header for mask images to
allow any image type.

Test: http/tests/misc/mask-image-accept.html

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::acceptOverride):
(WebCore::CachedResourceRequest::setAcceptOverride):
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::load):
* loader/cache/CachedSVGDocumentReference.h:
(WebCore::CachedSVGDocumentReference::loadRequested):
(WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType):
(WebCore::CachedSVGDocumentReference::document):
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):

LayoutTests:

Reviewed by Simon Fraser.

* http/tests/misc/mask-image-accept-expected.html: Added.
* http/tests/misc/mask-image-accept.html: Added.

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

5 years agoREGRESSION (185319): Reproducible crash in WebHistoryItem launching FluidApp.
beidson@apple.com [Wed, 1 Jul 2015 17:13:04 +0000 (17:13 +0000)]
REGRESSION (185319): Reproducible crash in WebHistoryItem launching FluidApp.
<rdar://problem/21598293> and https://bugs.webkit.org/show_bug.cgi?id=146494

Reviewed by Darin Adler.

* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]): Don’t reference members of a Vector
  that don’t exist.

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

5 years agoCheck shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL...
beidson@apple.com [Wed, 1 Jul 2015 16:53:20 +0000 (16:53 +0000)]
Check shouldOpenExternalURLs instead of isProcessingUserGesture before passing URL to LaunchServices.
<rdar://problem/20577859> and https://bugs.webkit.org/show_bug.cgi?id=146513

Reviewed by Darin Adler.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): The expected value of isProcessingUserGesture is lost over redirects.
  shouldOpenExternalURLs actually fits this role perfectly.

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

5 years ago[MSE] Failures on W3C media-source tests regarding MIME types
jer.noble@apple.com [Wed, 1 Jul 2015 15:54:41 +0000 (15:54 +0000)]
[MSE] Failures on W3C media-source tests regarding MIME types
https://bugs.webkit.org/show_bug.cgi?id=146499

Reviewed by Eric Carlson.

Source/WebCore:

Tests: http/tests/media/media-source/SourceBuffer-abort-readyState.html
       http/tests/media/media-source/SourceBuffer-abort-removed.html
       http/tests/media/media-source/SourceBuffer-abort-updating.html
       http/tests/media/media-source/SourceBuffer-abort.html

Multiple failures in the W3C media-source test suite due to two failures in isTypeSupported MIME type handling:
- MIME types without codec strings were being rejected.
- MIME types with codec strings which are rejected by the system are being reported as supported.

For the first, stop rejecting MIME types with non-existent codec strings. For MIME types which do have non-empty
codec strings, treat a "Maybe" response as unsupported.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::isTypeSupported):

LayoutTests:

Import four new tests from the w3c test suite <https://github.com/w3c/web-platform-tests.git>.

* http/tests/media/media-source/SourceBuffer-abort-readyState.html: Added.
* http/tests/media/media-source/SourceBuffer-abort-removed.html: Added.
* http/tests/media/media-source/SourceBuffer-abort-updating.html: Added.
* http/tests/media/media-source/SourceBuffer-abort.html: Added.
* http/tests/media/white.mp4: Added.
* http/tests/media/white.webm: Added.
* platform/mac/TestExpectations:
* platform/mac/http/tests/media/media-source/SourceBuffer-abort-expected.txt: Added.
* platform/mac/http/tests/media/media-source/SourceBuffer-abort-readyState-expected.txt: Added.
* platform/mac/http/tests/media/media-source/SourceBuffer-abort-removed-expected.txt: Added.
* platform/mac/http/tests/media/media-source/SourceBuffer-abort-updating-expected.txt: Added.
* platform/mac/http/tests/media/media-source/mediasource-is-type-supported-expected.txt: Added.

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

5 years ago[GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
mcatanzaro@igalia.com [Wed, 1 Jul 2015 15:44:39 +0000 (15:44 +0000)]
[GTK] [Wayland] Build broken with ENABLE_WAYLAND_TARGET=ON
https://bugs.webkit.org/show_bug.cgi?id=146512

Unreviewed, fix build with ENABLE_WAYLAND_TARGET=ON after r185949.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):

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

5 years ago[GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since...
mrobinson@webkit.org [Wed, 1 Jul 2015 14:51:28 +0000 (14:51 +0000)]
[GTK] REGRESSION(r183936): Test /webkit2/WebKitWebContext/spell-checker fails since r183936
https://bugs.webkit.org/show_bug.cgi?id=144828

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Instead of setting spell checking languages unconditionally when building int
developer mode, add some C API that allows setting them in WebKitTestRunner.

* PlatformGTK.cmake: Add the new C API file to the source list.
* UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:
(WKTextCheckerSetSpellCheckingLanguages): Added this function which allows settings
the spell checking languages from the C API.
* UIProcess/API/C/gtk/WKTextCheckerGtk.h: Added.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::enchantTextChecker): Remove the hack which sets the spell checking languages automatically
for development builds.

Tools:

* WebKitTestRunner/gtk/main.cpp:
(main): Use the new WKTextChecker API to set the spell checking languages
when the process is starting up.

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

5 years ago[Mac] Numerous CGColor leaks in swipe gestures
commit-queue@webkit.org [Wed, 1 Jul 2015 08:55:02 +0000 (08:55 +0000)]
[Mac] Numerous CGColor leaks in swipe gestures
https://bugs.webkit.org/show_bug.cgi?id=146501

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-07-01
Reviewed by Tim Horton.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):

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

5 years ago[Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
commit-queue@webkit.org [Wed, 1 Jul 2015 08:51:40 +0000 (08:51 +0000)]
[Mac] Confusing RetainPtr use in TiledCoreAnimationDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=146503

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-07-01
Reviewed by Tim Horton.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
Simplify adoption into a new RetainPtr.

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

5 years ago[Win] Unreviewed build fix after r186169.
achristensen@apple.com [Wed, 1 Jul 2015 06:26:23 +0000 (06:26 +0000)]
[Win] Unreviewed build fix after r186169.

Source/WebKit:

* WebKit.vcxproj/WebKit.sln:
Temporarily don't build ANGLE projects on Windows.

Source/WTF:

* wtf/FeatureDefines.h:
Temporarily disable WebGL on WinCairo. It was already temporarily disabled on AppleWin.

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 1 Jul 2015 06:23:51 +0000 (06:23 +0000)]
Versioning.

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

5 years agoUpdate ANGLE to b11e2483742db884bd0af41f78f528240577356b.
achristensen@apple.com [Wed, 1 Jul 2015 06:17:20 +0000 (06:17 +0000)]
Update ANGLE to b11e2483742db884bd0af41f78f528240577356b.
https://bugs.webkit.org/show_bug.cgi?id=145010

Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:

Huge list of source changes omitted.
ROLL DEPS!

Source/WebCore:

* CMakeLists.txt:
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::appendSymbol):
(WebCore::getStructInfo):
(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
(WebCore::getValidationResultValue): Deleted.
* platform/graphics/ANGLEWebKitBridge.h:
(WebCore::ANGLEShaderSymbol::isSampler):
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::checkVaryingsPacking):
(WebCore::GraphicsContext3D::precisionsMatch):
Update WebCore to reflect changes in ANGLE.

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

5 years ago[EFL] Unreviewed gardening.
gyuyoung.kim@webkit.org [Wed, 1 Jul 2015 06:08:23 +0000 (06:08 +0000)]
[EFL] Unreviewed gardening.

Some tests are flaky or timeout after bumping Ubuntu version from 14.04 to 15.04.
Mark the tests to flaky or timeout.

* platform/efl/TestExpectations:
* platform/efl/compositing/tiling/rotated-tiled-clamped-expected.txt: Added.

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

5 years agoUnreviewed, skip this test for now. We can unskip it when this feature is enabled.
fpizlo@apple.com [Wed, 1 Jul 2015 05:59:51 +0000 (05:59 +0000)]
Unreviewed, skip this test for now. We can unskip it when this feature is enabled.

* js/script-tests/intl.js:

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

5 years agoFrame flattening: Hit-testing an iframe could end up destroying the associated inline...
zalan@apple.com [Wed, 1 Jul 2015 04:30:52 +0000 (04:30 +0000)]
Frame flattening: Hit-testing an iframe could end up destroying the associated inline tree context.
https://bugs.webkit.org/show_bug.cgi?id=146447
rdar://problem/20613501

Reviewed by Simon Fraser.

This patch ensures that the render tree associated with the document on which
the hit-test is initiated does not get laid out, unless it was directly mutated prior to the hittest.

Hit-test requirements:
1. A clean the render tree before hit-testing gets propagated to the renderers.
Document::updateLayout() ensures it by calling both updateStyleIfNeeded() and layout() not only on the current tree, but also
on the ancestors if needed.

2. No render tree mutation while hit-testing the renderers.

When an iframe is being hit-tested, this hit-test could bubble down to the child frame's render view.
In order to ensure #1, we call Document::updateLayout() on the current (subframe) document.
If updateStyleIfNeeded() mutates the render tree, we mark it dirty for layout(). However frame flattening also
marks the parent renderer (RenderIFrame) dirty.
While calling layout() to clean the current render tree, we end up laying out the parent tree too.
Laying out the parent tree could end up destroying the inline tree context from where the
hittest just bubbled down. (InlineFlowBox -> RenderWidget -> RenderView).

This patch protects the render tree from such unintentional inline tree mutation during hittesting.
After the initial layout we set a layout disallow flag on the frame view to defer subsequent layouts.
This patch only changes behavior when frame flattening is enabled, but in future we may always want to enable this.

Source/WebCore:

Test: fast/frames/flattening/hittest-iframe-while-style-changes-crash.html

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted. -> Assertion in no longer valid.
* page/FrameView.h:
* rendering/RenderView.cpp:
(WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower):
(WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower):
(WebCore::RenderView::hitTest): Protect the render tree from subsequent layouts.

LayoutTests:

* fast/frames/flattening/hittest-iframe-while-style-changes-crash-expected.txt: Added.
* fast/frames/flattening/hittest-iframe-while-style-changes-crash.html: Added.

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

5 years agoFix CoordinatedGraphics.
simon.fraser@apple.com [Wed, 1 Jul 2015 02:39:50 +0000 (02:39 +0000)]
Fix CoordinatedGraphics.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):

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

5 years agoWeb Inspector: add " = $0" hint after selected element in main DOMTreeOutline
commit-queue@webkit.org [Wed, 1 Jul 2015 02:07:37 +0000 (02:07 +0000)]
Web Inspector: add " = $0" hint after selected element in main DOMTreeOutline
https://bugs.webkit.org/show_bug.cgi?id=145739

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

* UserInterface/Views/DOMTreeOutline.css: Adds a semi-opaque " = $0" to the selected element in the DOM tree.
(.dom-tree-outline li.selected > span::after):
(.dom-tree-outline:focus li.selected > span::after):

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

5 years agoMore Gtk/EFL fixing.
simon.fraser@apple.com [Wed, 1 Jul 2015 02:03:23 +0000 (02:03 +0000)]
More Gtk/EFL fixing.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges):

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

5 years agoImplement ECMAScript Internationalization API
commit-queue@webkit.org [Wed, 1 Jul 2015 02:01:59 +0000 (02:01 +0000)]
Implement ECMAScript Internationalization API
https://bugs.webkit.org/show_bug.cgi?id=90906

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-06-30
Reviewed by Benjamin Poulain.

.:

Begin implementing the Intl apis behind ENABLE_INTL flag.
Create the base Intl namespace object.

* Source/cmake/WebKitFeatures.cmake: add ENABLE_INTL flag

Source/JavaScriptCore:

* CMakeLists.txt: add IntlObject.cpp
* Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: add IntlObject
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: add IntlObject
* JavaScriptCore.xcodeproj/project.pbxproj: add IntlObject
* runtime/CommonIdentifiers.h: add "Intl" name
* runtime/IntlObject.cpp: Added.
(JSC::IntlObject::IntlObject):
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation):
(JSC::IntlObject::createStructure):
* runtime/IntlObject.h: Added.
* runtime/JSGlobalObject.cpp: Add global Intl
(JSC::JSGlobalObject::init):

Source/WebCore:

Test: js/intl.html

* Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag

Source/WTF:

* wtf/FeatureDefines.h: add ENABLE_INTL flag

Tools:

* Scripts/webkitperl/FeatureList.pm: add ENABLE_INTL flag

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props: add ENABLE_INTL flag
* win/tools/vsprops/FeatureDefinesCairo.props: add ENABLE_INTL flag

LayoutTests:

* TestExpectations: Skip intl until enabled
* js/intl-expected.txt: Added.
* js/intl.html: Added.
* js/script-tests/intl.js: Added.
(global):

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

5 years agoscroll-snap-points do not work very well with mechanical scroll wheel events
commit-queue@webkit.org [Wed, 1 Jul 2015 01:51:16 +0000 (01:51 +0000)]
scroll-snap-points do not work very well with mechanical scroll wheel events
https://bugs.webkit.org/show_bug.cgi?id=142501
<rdar://problem/20093511>

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2015-06-30
Reviewed by Brent Fulgham.

Source/WebCore:

Stateless scroll events generated by scrolling with a mechanical mouse wheel now trigger scroll
snapping after a fixed delay.

Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html

* platform/cocoa/ScrollController.h: Added member to track stateless scrolling.
* platform/cocoa/ScrollController.mm: Added constant for delay for stateless scroll snapping.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Triggers timer upon stateless scroll events.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Timer now handles stateless scrolling updates.
(WebCore::ScrollController::verticalScrollSnapTimerFired): See above.
(WebCore::ScrollController::beginScrollSnapAnimation): Handles stateless scroll snapping.

LayoutTests:

* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html: Added.

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