WebKit-https.git
5 years agoAdd module loader "resolve" hook for local file system to test the loader in JSC...
utatane.tea@gmail.com [Thu, 27 Aug 2015 23:48:13 +0000 (23:48 +0000)]
Add module loader "resolve" hook for local file system to test the loader in JSC shell
https://bugs.webkit.org/show_bug.cgi?id=148543

Reviewed by Filip Pizlo.

Add the module loader "resolve" hook to the JSC shell.
It takes the module name and the referrer module key and resolves the name to the unique module key.

resolve(ModuleName moduleName, ModuleKey referrer) -> Promise<ModuleKey>

In the JSC shell, since we load the module from the local file system, we treat an absolute file path
as a module key. So, in this patch, we implement the "resolve" hook that resolves the module name to
the absolute file path.

This local file system "resolve" functionality makes JSC shell easy to test the module loader.

* jsc.cpp:
(GlobalObject::finishCreation):
(GlobalObject::moduleLoaderFetch):
(pathSeparator):
(extractDirectoryName):
(currentWorkingDirectory):
(resolvePath):
(GlobalObject::moduleLoaderResolve):
(functionDrainMicrotasks):
* runtime/JSInternalPromiseDeferred.cpp:
(JSC::JSInternalPromiseDeferred::resolve):
(JSC::JSInternalPromiseDeferred::reject):
* runtime/JSInternalPromiseDeferred.h:
* tests/stress/pathname-resolve.js: Added.
(shouldBe):
(shouldThrow):

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

5 years agoUnreviewed, fix some FIXMEs and add some new ones, based on things we've learned...
fpizlo@apple.com [Thu, 27 Aug 2015 23:41:59 +0000 (23:41 +0000)]
Unreviewed, fix some FIXMEs and add some new ones, based on things we've learned from some
recent OSR exit work.

* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGMayExit.cpp:
* dfg/DFGMayExit.h:

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

5 years agoRemove Mac slaves 188/189 after being replaced with 400/401.
lforschler@apple.com [Thu, 27 Aug 2015 23:39:46 +0000 (23:39 +0000)]
Remove Mac slaves 188/189 after being replaced with 400/401.

Unreviewed.

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

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

5 years ago[ES6] Add TypedArray.prototype functionality.
commit-queue@webkit.org [Thu, 27 Aug 2015 22:57:07 +0000 (22:57 +0000)]
[ES6] Add TypedArray.prototype functionality.
https://bugs.webkit.org/show_bug.cgi?id=148035

Patch by Keith Miller <keith_miller@apple.com> on 2015-08-27
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch should add most of the functionality for
the prototype properties of TypedArray objects in ES6.
There are a few exceptions to this, which will be added
in upcoming patches:

1) First we do not use the species constructor for some
of the TypedArray prototype functions (namely: map, filter,
slice, and subarray). That will need to be added when
species constructors are finished.

2) TypedArrays still have a length, byteOffset, byteLength,
and buffer are still attached to the TypedArray instance (in
the spec they are on the TypedArray.prototype instance object)
since the JIT currently assumes those properties are fixed.

3) The TypedArray.constructor property is not added yet
as it should point to the TypedArray instance object,
which will be added in a future patch.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/TypedArray.prototype.js: Added.
(every):
(find):
(findIndex):
(forEach):
(some):
(sort.min):
(sort.merge):
(sort.mergeSort):
(sort):
(reduce):
(reduceRight):
(map):
(filter):
(toLocaleString):
* runtime/ArrayPrototype.cpp:
* runtime/ArrayPrototype.h:
* runtime/CommonIdentifiers.h:
* runtime/JSGenericTypedArrayView.h:
(JSC::sortFloat):
(JSC::JSGenericTypedArrayView::toAdaptorNativeFromValue):
(JSC::JSGenericTypedArrayView::setRangeToValue):
(JSC::JSGenericTypedArrayView::sort):
* runtime/JSGenericTypedArrayViewInlines.h:
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h: Added.
(JSC::argumentClampedIndexFromStartOrEnd):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncEntries):
(JSC::genericTypedArrayViewProtoFuncCopyWithin):
(JSC::genericTypedArrayViewProtoFuncFill):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncKeys):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewProtoGetterFuncLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteOffset):
(JSC::genericTypedArrayViewProtoFuncReverse):
(JSC::genericTypedArrayViewPrivateFuncSort):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewProtoFuncSubarray):
(JSC::typedArrayViewProtoFuncValues):
* runtime/JSGenericTypedArrayViewPrototypeInlines.h:
(JSC::JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation):
(JSC::genericTypedArrayViewProtoFuncSet): Deleted.
(JSC::genericTypedArrayViewProtoFuncSubarray): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSObject.h:
* runtime/JSTypedArrayPrototypes.cpp:
* runtime/JSTypedArrayPrototypes.h:
* runtime/JSTypedArrayViewPrototype.cpp: Added.
(JSC::typedArrayViewPrivateFuncLength):
(JSC::typedArrayViewPrivateFuncSort):
(JSC::typedArrayViewProtoFuncSet):
(JSC::typedArrayViewProtoFuncEntries):
(JSC::typedArrayViewProtoFuncCopyWithin):
(JSC::typedArrayViewProtoFuncFill):
(JSC::typedArrayViewProtoFuncLastIndexOf):
(JSC::typedArrayViewProtoFuncIndexOf):
(JSC::typedArrayViewProtoFuncJoin):
(JSC::typedArrayViewProtoFuncKeys):
(JSC::typedArrayViewProtoGetterFuncLength):
(JSC::typedArrayViewProtoGetterFuncByteLength):
(JSC::typedArrayViewProtoGetterFuncByteOffset):
(JSC::typedArrayViewProtoFuncReverse):
(JSC::typedArrayViewProtoFuncSubarray):
(JSC::typedArrayViewProtoFuncSlice):
(JSC::typedArrayViewProtoFuncValues):
(JSC::JSTypedArrayViewPrototype::JSTypedArrayViewPrototype):
(JSC::JSTypedArrayViewPrototype::finishCreation):
(JSC::JSTypedArrayViewPrototype::create):
(JSC::JSTypedArrayViewPrototype::createStructure):
* runtime/JSTypedArrayViewPrototype.h: Copied from Source/JavaScriptCore/runtime/JSTypedArrayPrototypes.cpp.

LayoutTests:

Added tests for the TypedArray.prototype functions.
All the tests use the typedarray-test-helper-function.js
to run the test on each TypedArray.

* fast/canvas/webgl/type-conversion-test-expected.txt:
* js/script-tests/typedarray-copyWithin.js: Added.
* js/script-tests/typedarray-every.js: Added.
(isBigEnough):
(isBigEnoughAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-fill.js: Added.
* js/script-tests/typedarray-filter.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-find.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-findIndex.js: Added.
(keepEven):
(keepEvenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-forEach.js: Added.
(.checkCorrect.let.list):
(.checkCorrect):
(createChecker):
(foo):
(changeArray):
(isBigEnoughAndException):
* js/script-tests/typedarray-indexOf.js: Added.
(keepEven):
* js/script-tests/typedarray-lastIndexOf.js: Added.
* js/script-tests/typedarray-map.js: Added.
(even):
(evenAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-reduce.js: Added.
(createArray):
(sum):
(createArrayAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-reduceRight.js: Added.
(createArray):
(sum):
(createArrayAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-slice.js: Added.
* js/script-tests/typedarray-some.js: Added.
(isBigEnough):
(isBigEnoughAndChange):
(isBigEnoughAndException):
* js/script-tests/typedarray-sort.js: Added.
(sortBackwards):
(compareException):
* js/script-tests/typedarray-test-helper-functions.js: Added.
(forEachTypedArray):
(isSameFunctionForEachTypedArrayPrototype.eq):
(isSameFunctionForEachTypedArrayPrototype):
(hasSameValues):
(.foo):
(testPrototypeFunctionHelper):
(testPrototypeFunctionOnSigned):
(testPrototypeFunctionOnFloat):
(testPrototypeFunction):
* js/typedarray-copyWithin-expected.txt: Added.
* js/typedarray-copyWithin.html: Added.
* js/typedarray-every-expected.txt: Added.
* js/typedarray-every.html: Added.
* js/typedarray-fill-expected.txt: Added.
* js/typedarray-fill.html: Added.
* js/typedarray-filter-expected.txt: Added.
* js/typedarray-filter.html: Added.
* js/typedarray-find-expected.txt: Added.
* js/typedarray-find.html: Added.
* js/typedarray-findIndex-expected.txt: Added.
* js/typedarray-findIndex.html: Added.
* js/typedarray-forEach-expected.txt: Added.
* js/typedarray-forEach.html: Added.
* js/typedarray-indexOf-expected.txt: Added.
* js/typedarray-indexOf.html: Added.
* js/typedarray-lastIndexOf-expected.txt: Added.
* js/typedarray-lastIndexOf.html: Added.
* js/typedarray-map-expected.txt: Added.
* js/typedarray-map.html: Added.
* js/typedarray-reduce-expected.txt: Added.
* js/typedarray-reduce.html: Added.
* js/typedarray-reduceRight-expected.txt: Added.
* js/typedarray-reduceRight.html: Added.
* js/typedarray-slice-expected.txt: Added.
* js/typedarray-slice.html: Added.
* js/typedarray-some-expected.txt: Added.
* js/typedarray-some.html: Added.
* js/typedarray-sort-expected.txt: Added.
* js/typedarray-sort.html: Added.

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

5 years agoA WebIDL callback interface is allowed to have constants
cdumez@apple.com [Thu, 27 Aug 2015 22:35:46 +0000 (22:35 +0000)]
A WebIDL callback interface is allowed to have constants
https://bugs.webkit.org/show_bug.cgi?id=148449

Reviewed by Geoffrey Garen.

Our JS bindings generator is now able to:
1. Handle IDL constants [1] on a callback interfaces [2] and generate
   a DOMConstructorObject subclass with static properties for
   these constants [3].
2. Generate a property on the global object for callback interfaces
   that have constants and do not have the [NoInterfaceObject] IDL
   extended attribute [4].

This is a pre-requirement for Bug 148415 as NodeFilter [5] has constants
and should be a callback interface. Once NodeFilter is ported to be
a callback interface, the JS still needs to be able to access
window.NodeFilter.SHOW_ALL for e.g.

[1] https://heycam.github.io/webidl/#dfn-constant
[2] https://heycam.github.io/webidl/#dfn-callback-interface
[3] https://heycam.github.io/webidl/#NoInterfaceObject
[4] https://heycam.github.io/webidl/#es-interfaces
[5] https://dom.spec.whatwg.org/#interface-nodefilter

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(GenerateConstructorHelperMethods):
(ConstructorHasProperties): Deleted.
* bindings/scripts/preprocess-idls.pl:
(getInterfaceExtendedAttributesFromIDL):
(interfaceHasConstantAttribute):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallbackConstructor::create):
(WebCore::JSTestCallbackConstructor::createStructure):
(WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
(WebCore::JSTestCallbackConstructor::finishCreation):
(WebCore::JSTestCallback::getConstructor):
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/TestCallback.idl:

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

5 years agoRange.compareBoundaryPoints() should throw a NotSupportedError for invalid compareHow...
cdumez@apple.com [Thu, 27 Aug 2015 22:33:40 +0000 (22:33 +0000)]
Range.compareBoundaryPoints() should throw a NotSupportedError for invalid compareHow values
https://bugs.webkit.org/show_bug.cgi?id=148483

Reviewed by Geoffrey Garen.

Source/WebCore:

Range.compareBoundaryPoints() should throw a NotSupportedError for
invalid compareHow values:
https://dom.spec.whatwg.org/#dom-range-compareboundarypoints (step 1)

Firefox and Chrome conform to the specification already.

Previously, WebKit would not throw and simply cast the value to our
internal CompareHow enum type. This patch aligns WebKit's behavior with
the DOM specificaiton and other browsers.

W3C test suite:
http://w3c-test.org/dom/ranges/Range-compareBoundaryPoints.html

Test: fast/dom/Range/compareBoundaryPoints-compareHow-exception.html

* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
Drop CompareHow special casing from bindings generator as we now use
unsigned short instead in the IDL.

* dom/Range.cpp:
(WebCore::Range::compareBoundaryPointsForBindings):
* dom/Range.h:
* dom/Range.idl:
Use "unsigned short" type instead of WebCore's CompareHow for the
parameter, as per the specification. On implementation side, we
now validate the compareHow value before casting it to a CompareHow
enum type. If the value is not value, we throw and abort early.

LayoutTests:

Add new layout test to confirm that Range.compareBoundaryPoints() throws
when passed in invalid compareHow values.

* fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt: Added.
* fast/dom/Range/compareBoundaryPoints-compareHow-exception.html: Added.

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

5 years agoPage does not update when <link> media attribute changes to no longer apply to page
joepeck@webkit.org [Thu, 27 Aug 2015 22:12:12 +0000 (22:12 +0000)]
Page does not update when <link> media attribute changes to no longer apply to page
https://bugs.webkit.org/show_bug.cgi?id=148392

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/css/link-media-attr.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseAttribute):
When the media attribute changes, recalculate styles if the link is not disabled.

LayoutTests:

* fast/css/link-media-attr-expected.txt: Added.
* fast/css/link-media-attr.html: Added.
Add a test to verify that styles change after a link's media attribute changes.

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

5 years agoDocument window.NodeFilter properties
cdumez@apple.com [Thu, 27 Aug 2015 21:42:29 +0000 (21:42 +0000)]
Document window.NodeFilter properties
https://bugs.webkit.org/show_bug.cgi?id=148531

Reviewed by Geoffrey Garen.

Document window.NodeFilter properties to detect changes to them. This
is in preparation of Bug 148415 as this will help detect unwanted
changes to the interface when making NodeFilter a callback interface.

* fast/dom/node-filter-interface-expected.txt: Added.
* fast/dom/node-filter-interface.html: Added.

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

5 years agoSimple line layout: Text jumps sometimes on naughty strings page
zalan@apple.com [Thu, 27 Aug 2015 21:39:20 +0000 (21:39 +0000)]
Simple line layout: Text jumps sometimes on naughty strings page
https://bugs.webkit.org/show_bug.cgi?id=148399
rdar://problem/22212568

Reviewed by Antti Koivisto.

The x position we set for tab characters during painting should
be the same as if it was set by the inline box tree painting.

Inline box tree computes the distance from the rootbox for each line
and sets this value as the xPos for the TextRun.
Currently simple line layout does not support cases where a line
would have an offset, so this value is always 0.

Source/WebCore:

Test: fast/text/whitespace/simple-line-layout-tab-position.html

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):

LayoutTests:

* fast/text/whitespace/simple-line-layout-tab-position-expected.html: Added.
* fast/text/whitespace/simple-line-layout-tab-position.html: Added.

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

5 years agoAdd two bots to the Mac Yosemite queue.
lforschler@apple.com [Thu, 27 Aug 2015 21:38:53 +0000 (21:38 +0000)]
Add two bots to the Mac Yosemite queue.
This is to eventually replace bots188/189, which will be removed after 400/401 are vetted.

Unreviewed.

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

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

5 years agoIsolate Source directories in CMake build
achristensen@apple.com [Thu, 27 Aug 2015 21:36:49 +0000 (21:36 +0000)]
Isolate Source directories in CMake build
https://bugs.webkit.org/show_bug.cgi?id=148389

Reviewed by Brent Fulgham.

.:

* CMakeLists.txt:
* Source/cmake/WebKitCommon.cmake:
Move package finding to WebKitCommon.

Source/JavaScriptCore:

* PlatformWin.cmake:
Include ../include/private to find WTF headers in internal build.
Don't use a script to generate forwarding headers.
* shell/PlatformWin.cmake:
Copy inspector scripts to the forwarding headers directory to be used by WebCore.

Source/WebCore:

* CMakeLists.txt:
Use the forwarding header copy of the inspector scripts to avoid requiring JavaScriptCore directory to exist.
* PlatformAppleWin.cmake:
Add AVFoundation sources to build.
* PlatformEFL.cmake:
Moved WebKitVersion.h generating from CMakeLists.txt because it is now only used in WebCore by EFL.
* PlatformWin.cmake:
Include ../include/private to find forwarding headers in internal build.

Source/WebKit:

* PlatformWin.cmake:
Moved WebKitVersion.h generation from WebCore because the scripts required for it are in WebKit.

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

5 years ago[Win CMake] Fix incremental build after r188673
achristensen@apple.com [Thu, 27 Aug 2015 21:31:43 +0000 (21:31 +0000)]
[Win CMake] Fix incremental build after r188673
https://bugs.webkit.org/show_bug.cgi?id=148539

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* PlatformWin.cmake:
Use xcopy as a build step instead of file(COPY ...) to copy updated headers.

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:
Use xcopy as a build step instead of file(COPY ...) to copy updated headers.

Tools:

* TestWebKitAPI/PlatformWin.cmake:
Copy forwarding headers from WebCore before building in case that was not yet done.
It used to be done when running CMake, but now it's a build step.

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

5 years agoInclude ES6 Generators and Proxy object status to feature status page.
jond@apple.com [Thu, 27 Aug 2015 21:26:24 +0000 (21:26 +0000)]
Include ES6 Generators and Proxy object status to feature status page.
https://bugs.webkit.org/show_bug.cgi?id=148095

Reviewed by Timothy Hatcher.

* features.json:

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

5 years agoFactor out Lookup invocation
timothy_horton@apple.com [Thu, 27 Aug 2015 21:24:27 +0000 (21:24 +0000)]
Factor out Lookup invocation
https://bugs.webkit.org/show_bug.cgi?id=148509

Reviewed by Anders Carlsson.

There's a ton of duplicated code in legacy and modern WebKit to talk to
Lookup. And, it's pretty messy. As a first step to making it less messy,
make it so we only have it in one place instead of four (or two).

* editing/DictionaryPopupInfo.h:
Move DictionaryPopupInfo into WebCore. This was duplicated
in both legacy and modern WebKit.

* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::DictionaryLookup::rangeForSelection):
(WebCore::DictionaryLookup::rangeAtHitTestResult):
(WebCore::DictionaryLookup::stringForPDFSelection):
(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::hidePopup):
(WebCore::DictionaryLookup::animationControllerForPopup):
(WebCore::rangeForDictionaryLookupForSelection): Deleted.
(WebCore::rangeForDictionaryLookupAtHitTestResult): Deleted.
(WebCore::dictionaryLookupForPDFSelection): Deleted.
Move DictionaryLookup stuff into a class for better names.

Move showPopup, hidePopup, and animationControllerForPopup here.
showPopup and animationControllerForPopup both bottleneck through
a single function, where previously we duplicated all of the code
for both of them, and in both legacy and modern WebKit.

showPopup and animationControllerForPopup take a block that they *may*
call if we have support for overriding Lookup's indicator with TextIndicator,
because the installation process is different per WebKit.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::selectClosestWordFromHitTestResultBasedOnLookup):
* testing/Internals.cpp:
(WebCore::Internals::rangeForDictionaryLookupAtLocation):
Adjust to the new naming.

* Shared/DictionaryPopupInfo.cpp: Removed.
* Shared/DictionaryPopupInfo.h: Removed.
Moved to WebCore.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DictionaryPopupInfo>::encode):
(IPC::ArgumentCoder<DictionaryPopupInfo>::decode):
Add encode/decoders for DictionaryPopupInfo now that it's in WebCore.

* Shared/WebCoreArgumentCoders.h:
* Shared/WebHitTestResult.h:
* Shared/mac/ArgumentCodersMac.h:
* UIProcess/API/mac/WKView.mm:
(+[WKView hideWordDefinitionWindow]):
(-[WKView _dismissContentRelativeChildWindows]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformDictionaryLookup):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
(WebKit::PDFPlugin::lookupTextAtLocation):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
(WebKit::WebPage::lookupTextAtLocation):
Adjust to new names and move stuff to WebCore.

* WebKit.xcodeproj/project.pbxproj:

* WebView/DictionaryPopupInfo.h: Removed.
Move to WebCore.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _lookUpInDictionaryFromMenu:]):
DictionaryPopupInfo keeps a TextIndicatorData, not a TextIndicator.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
(dictionaryPopupInfoForRange):
(-[WebImmediateActionController _animationControllerForText]):
* WebView/WebView.mm:
(-[WebView _prepareForDictionaryLookup]):
(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
(-[WebView _setTextIndicator:withLifetime:]):
(-[WebView _showDictionaryLookupPopup:]):
* WebView/WebViewInternal.h:
Move a bunch of code to WebCore.
Factor some that has to stay out into _prepareForDictionaryLookup.

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

5 years agoAdd IndexedDB to the feature status page.
jond@apple.com [Thu, 27 Aug 2015 21:23:49 +0000 (21:23 +0000)]
Add IndexedDB to the feature status page.
https://bugs.webkit.org/show_bug.cgi?id=148094

Reviewed by Timothy Hatcher.

* features.json:

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

5 years agoREGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
andersca@apple.com [Thu, 27 Aug 2015 21:02:39 +0000 (21:02 +0000)]
REGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
https://bugs.webkit.org/show_bug.cgi?id=148497
<rdar://problem/22459541>

Reviewed by Andy Estes.

Source/WebCore:

Don't return early if iterations is 0.

* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):

LayoutTests:

* TestExpectations:

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

5 years agoUnreviewed, add a comment to describe something I learned about a confusingly-named...
fpizlo@apple.com [Thu, 27 Aug 2015 19:58:50 +0000 (19:58 +0000)]
Unreviewed, add a comment to describe something I learned about a confusingly-named function.

* dfg/DFGUseKind.h:
(JSC::DFG::isCell):

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

5 years agoREGRESSION(r184779): Possible read-after-free in JavaScriptCore/dfg/DFGClobberize.h
basile_clement@apple.com [Thu, 27 Aug 2015 19:40:09 +0000 (19:40 +0000)]
REGRESSION(r184779): Possible read-after-free in JavaScriptCore/dfg/DFGClobberize.h
https://bugs.webkit.org/show_bug.cgi?id=148411

Reviewed by Geoffrey Garen and Filip Pizlo.

Source/JavaScriptCore:

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

LayoutTests:

* js/regress-148411-expected.txt: Added.
* js/regress-148411.html: Added.
* js/script-tests/regress-148411.js: Added.
(foo):

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

5 years agoAX: Remove accessibility/mac/change-notification-on-scroll.html test
commit-queue@webkit.org [Thu, 27 Aug 2015 19:36:02 +0000 (19:36 +0000)]
AX: Remove accessibility/mac/change-notification-on-scroll.html test
https://bugs.webkit.org/show_bug.cgi?id=148534

Patch by Nan Wang <n_wang@apple.com> on 2015-08-27
Reviewed by Chris Fleizach.

Removed the test since AXValueChange notifications are not being sent
when scrollable regions inside the WebView are scrolled.

* accessibility/mac/change-notification-on-scroll-expected.txt: Removed.
* accessibility/mac/change-notification-on-scroll.html: Removed.
* platform/mac/TestExpectations:

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

5 years agoAX: Fix accessibility/select-element-at-index.html test
commit-queue@webkit.org [Thu, 27 Aug 2015 19:21:29 +0000 (19:21 +0000)]
AX: Fix accessibility/select-element-at-index.html test
https://bugs.webkit.org/show_bug.cgi?id=148516

Patch by Nan Wang <n_wang@apple.com> on 2015-08-27
Reviewed by Chris Fleizach.

Tools:

Implemented setSelectedChildAtIndex and removeSelectionAtIndex for mac.

* DumpRenderTree/AccessibilityUIElement.cpp:
(setSelectedChildCallback):
(setSelectedChildAtIndexCallback):
(removeSelectionAtIndexCallback):
(elementAtPointCallback):
(sentenceAtOffsetCallback):
(stringForSelectionCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::setSelectedChild):
(AccessibilityUIElement::setSelectedChildAtIndex):
(AccessibilityUIElement::removeSelectionAtIndex):
(AccessibilityUIElement::accessibilityValue):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::wordAtOffset):
(WTR::AccessibilityUIElement::lineAtOffset):
(WTR::AccessibilityUIElement::sentenceAtOffset):
(WTR::AccessibilityUIElement::isSelectable):
(WTR::AccessibilityUIElement::isMultiSelectable):
(WTR::AccessibilityUIElement::setSelectedChild):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex):
(WTR::AccessibilityUIElement::removeSelectionAtIndex):
(WTR::AccessibilityUIElement::selectedChildrenCount):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::isExpanded):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedChild):
(WTR::AccessibilityUIElement::setSelectedChildAtIndex):
(WTR::AccessibilityUIElement::removeSelectionAtIndex):
(WTR::AccessibilityUIElement::accessibilityValue):

LayoutTests:

* accessibility/select-element-at-index.html:
* platform/mac/TestExpectations:
* platform/mac/accessibility/select-element-at-index-expected.txt: Added.

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

5 years agoDecode redirected data URLs in web process
antti@apple.com [Thu, 27 Aug 2015 19:10:29 +0000 (19:10 +0000)]
Decode redirected data URLs in web process
https://bugs.webkit.org/show_bug.cgi?id=148386

Reviewed by Zalan Bujtas.

Redirected data URLs still end up to networking layer for decoding. Handle them locally as well.

Covered by existing tests.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::~ResourceLoader):
(WebCore::ResourceLoader::finishNetworkLoad):

    Factor to a function.

(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::willSendRequestInternal):

    When receiving redirect to a data URL end the network load and decode it locally.

(WebCore::ResourceLoader::willSendRequest):
* loader/ResourceLoader.h:

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

5 years ago[Win] Skip new High DPI test (Windows doesn't quite support this)
bfulgham@apple.com [Thu, 27 Aug 2015 18:45:30 +0000 (18:45 +0000)]
[Win] Skip new High DPI test (Windows doesn't quite support this)
Also skip an event test that started failing after r188793.

* platform/win/TestExpectations:

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

5 years agoREGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky.
ap@apple.com [Thu, 27 Aug 2015 18:35:49 +0000 (18:35 +0000)]
REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=148533

* TestExpectations: Marking is as such.

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

5 years ago[Win] Mark some test failures.
bfulgham@apple.com [Thu, 27 Aug 2015 18:32:53 +0000 (18:32 +0000)]
[Win] Mark some test failures.

* platform/win/TestExpectations: Mark some test failures. Images are black instead
of showing the correct output.

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

5 years ago[Win] Test gardening.
bfulgham@apple.com [Thu, 27 Aug 2015 18:26:07 +0000 (18:26 +0000)]
[Win] Test gardening.

Remove failure case for recent progression.

* platform/win/sputnik/Conformance/11_Expressions/11.5_Multiplicative_Operators/11.5.3_Percent: Removed.
* platform/win/sputnik/Conformance/11_Expressions/11.5_Multiplicative_Operators/11.5.3_Percent/S11.5.3_A4_T6-expected.txt: Removed.

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

5 years ago[Cocoa] Generic font families do not consult with the user's preferred language
mmaxfield@apple.com [Thu, 27 Aug 2015 18:09:20 +0000 (18:09 +0000)]
[Cocoa] Generic font families do not consult with the user's preferred language
https://bugs.webkit.org/show_bug.cgi?id=148499
<rdar://problem/22407296>

Reviewed by Antti Koivisto.

Source/WebCore:

When WebKit encounters markup like lang="zh" style="font-family: sans-serif;"
we currently always use Simplified Chinese fonts. However, the user may
have specifically selected Traditional Chinese in their user preferences.
In this absence of other signals, we should consult with the user
preferences when determining which font to pick.

Tests: fast/text/international/generic-font-family-language-simplified.html
       fast/text/international/generic-font-family-language-traditional.html

* platform/Language.cpp:
(WebCore::observerMap):
(WebCore::overrideUserPreferredLanguages):
* platform/graphics/FontGenericFamilies.cpp:
(WebCore::computeUserPrefersSimplified):
(WebCore::cachedUserPrefersSimplified):
(WebCore::languageChanged):
(WebCore::genericFontFamilyForScript):
(WebCore::FontGenericFamilies::FontGenericFamilies):
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::scriptNameToCode):

LayoutTests:

Mock the user's font preferences.

* fast/text/international/font-fallback-to-common-script.html:
* fast/text/international/generic-font-family-language-simplified-expected.html: Added.
* fast/text/international/generic-font-family-language-simplified.html: Added.
* fast/text/international/generic-font-family-language-traditional-expected.html: Added.
* fast/text/international/generic-font-family-language-traditional.html: Added.
* fast/text/international/lang-sensitive-fonts-xml.xhtml:
* fast/text/international/lang-sensitive-fonts.html:
* fast/text/international/locale-sensitive-fonts.html:

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

5 years agoUpdate Grid Layout to use fewer magic -1s
mmaxfield@apple.com [Thu, 27 Aug 2015 18:03:43 +0000 (18:03 +0000)]
Update Grid Layout to use fewer magic -1s
https://bugs.webkit.org/show_bug.cgi?id=148505

Reviewed by Javier Fernandez.

After r188873, there were still some -1s left in Grid Layout code. This patch cleans them
up after consulting with Javier Fernandez.

No new tests because there is no behavior change.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

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

5 years agoBuild fix after r188982
achristensen@apple.com [Thu, 27 Aug 2015 17:51:42 +0000 (17:51 +0000)]
Build fix after r188982

* MiniBrowser/win/CMakeLists.txt:
The directory structure changed in the move.

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

5 years agoWeb Inspector: FrontendChannel should know its own connection type
bburg@apple.com [Thu, 27 Aug 2015 17:42:45 +0000 (17:42 +0000)]
Web Inspector: FrontendChannel should know its own connection type
https://bugs.webkit.org/show_bug.cgi?id=148482

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/InspectorFrontendChannel.h: Add connectionType().
* inspector/remote/RemoteInspectorDebuggableConnection.h:

Source/WebCore:

To prepare for multiple attached frontends, the frontend connection should
be able to report its type rather than explicitly setting connection type
via a getter.

No behavior change, no new tests.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::hasLocalFrontend): Ask the channel what it is.
(WebCore::InspectorController::hasRemoteFrontend): Ask the channel what it is.
(WebCore::InspectorController::connectFrontend): Use hasRemoteFrotend().
(WebCore::InspectorController::disconnectFrontend): Use hasRemoteFrontend().
(WebCore::InspectorController::InspectorController): Deleted.
* inspector/InspectorController.h: Initialize a few members here.
(WebCore::InspectorController::hasFrontend): Deleted, it was unused.
(WebCore::InspectorController::setHasRemoteFrontend): Deleted.
* inspector/WorkerInspectorController.cpp:
* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::disconnect):
* testing/Internals.cpp: Add connectionType().

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h: add connectionType().

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.h: add connectionType().

Source/WebKit2:

* WebProcess/WebPage/WebInspector.h: add connectionType().

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

5 years agoDefine legacy main thread calling functions for iOS as well
andersca@apple.com [Thu, 27 Aug 2015 17:40:56 +0000 (17:40 +0000)]
Define legacy main thread calling functions for iOS as well
https://bugs.webkit.org/show_bug.cgi?id=148530

Reviewed by Tim Horton.

* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:

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

5 years agoWeb Inspector: Standardize on CSSStyleSheet.Type enum and move more protocol enum...
commit-queue@webkit.org [Thu, 27 Aug 2015 17:37:22 +0000 (17:37 +0000)]
Web Inspector: Standardize on CSSStyleSheet.Type enum and move more protocol enum conversion to the manager
https://bugs.webkit.org/show_bug.cgi?id=148515

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-08-27
Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.protocolStyleSheetOriginToEnum):
(WebInspector.CSSStyleManager.protocolMediaSourceToEnum):
Protocol enum to frontend enum conversion.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
(WebInspector.DOMNodeStyles.prototype._collectStylesInCascadeOrder):
Use the manager to convert from a protocol payload enum to frontend num for css types.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.get editable):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection.prototype.update.createSelectorItem):
(WebInspector.VisualStyleSelectorSection.prototype.update.uniqueOrderedRules.set return):
(WebInspector.VisualStyleSelectorSection.prototype.update.uniqueOrderedRules):
(WebInspector.VisualStyleSelectorSection.prototype.update):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem):
Update enum use.

LayoutTests:

* inspector/css/matched-style-properties.html:
* inspector/css/pseudo-element-matches.html:
* inspector/css/selector-dynamic-specificity.html:
* inspector/css/selector-specificity.html:
* inspector/css/stylesheet-with-mutations.html:

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

5 years agoMedia Session: MediaSession constructor 'kind' argument optional
eric.carlson@apple.com [Thu, 27 Aug 2015 17:33:48 +0000 (17:33 +0000)]
Media Session: MediaSession constructor 'kind' argument optional
https://bugs.webkit.org/show_bug.cgi?id=148527

Reviewed by Jer Noble.

Source/WebCore:

No new tests, updated media/session/session-creation.html.

* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::parseKind): Treat null kind "content".
(WebCore::MediaSession::MediaSession): Delete Document* version.
* Modules/mediasession/MediaSession.h: Make constructor private.
* Modules/mediasession/MediaSession.idl:

* WebCore.xcodeproj/project.pbxproj: Add JSMediaSessionCustom.cpp.

* bindings/js/JSMediaSessionCustom.cpp: Added.
(WebCore::constructJSMediaSession):

* dom/Document.cpp:
(WebCore::Document::defaultMediaSession): Call MediaSession::create.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::session): Compare session with document.defaultMediaSession, not
  its kind.
(WebCore::HTMLMediaElement::setSession): Update comments.

LayoutTests:

* media/session/content-interruptions.html: Restructure to make less timing dependent. Minor cleanup.
* media/session/session-creation-expected.txt:
* media/session/session-creation.html: Test default MediaSession constructor argument.

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

5 years agoSimple line layout: Use float types wherever possible to match line tree.
zalan@apple.com [Thu, 27 Aug 2015 17:23:26 +0000 (17:23 +0000)]
Simple line layout: Use float types wherever possible to match line tree.
https://bugs.webkit.org/show_bug.cgi?id=148444

Reviewed by Antti Koivisto.

To match inline tree output, we should try to match the data types as far as precision goes.

This patch also fixes the confusing mismatch between Run::baseline().x() and Run::rect().x().
They are both supposed to return the left edge of the run. However Run::rect().x() returns a rounded
LayoutUnit of the logical left, while Run::baseline().x() returns the correct logical left.
With this patch
  1. baseline position does not include logical left anymore.
  2. Run::rect().x() does not round the logical left coordinate anymore.

* rendering/RenderTreeAsText.cpp:
(WebCore::writeSimpleLine):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):
(WebCore::SimpleLineLayout::collectAbsoluteRects):
(WebCore::SimpleLineLayout::showLineLayoutForFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::linePosition):
(WebCore::SimpleLineLayout::lineSize):
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
(WebCore::SimpleLineLayout::baselinePosition): Deleted.
(WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::baselinePosition):
(WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition):

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

5 years agoAdd an expectation for another momentum scrolling test that became flaky.
ap@apple.com [Thu, 27 Aug 2015 16:59:31 +0000 (16:59 +0000)]
Add an expectation for another momentum scrolling test that became flaky.

* platform/mac-wk2/TestExpectations:

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

5 years ago[EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper...
ossy@webkit.org [Thu, 27 Aug 2015 16:33:43 +0000 (16:33 +0000)]
[EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
https://bugs.webkit.org/show_bug.cgi?id=148470

Unreviewed gardening, skip the hanging test to make the performance bot work.

* Skipped:

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

5 years agoSubpixel positioned iframe's repaint area calculation problem.
zalan@apple.com [Thu, 27 Aug 2015 15:48:33 +0000 (15:48 +0000)]
Subpixel positioned iframe's repaint area calculation problem.
https://bugs.webkit.org/show_bug.cgi?id=148422

When the repaint rect position is floored for iframes, we need
to expand the size so that it still covers the content.

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/repaint/content-inside-subpixel-positioned-iframe.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):

LayoutTests:

* fast/repaint/content-inside-subpixel-positioned-iframe-expected.txt: Added.
* fast/repaint/content-inside-subpixel-positioned-iframe.html: Copied from LayoutTests/fast/repaint/hidpi-content-inside-iframe-leaves-trails.html.
* fast/repaint/hidpi-content-inside-iframe-leaves-trails.html:

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

5 years ago[GTK] Unreviewed, install-dependencies should install geoclue2 on Fedora
mcatanzaro@igalia.com [Thu, 27 Aug 2015 15:35:12 +0000 (15:35 +0000)]
[GTK] Unreviewed, install-dependencies should install geoclue2 on Fedora

geoclue-devel is for obsolete geoclue. Install geoclue2-devel instead.

* gtk/install-dependencies:

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

5 years agoAdd some new emoji with modifiers and new sequence.
enrica@apple.com [Thu, 27 Aug 2015 15:15:40 +0000 (15:15 +0000)]
Add some new emoji with modifiers and new sequence.
https://bugs.webkit.org/show_bug.cgi?id=148202
rdar://problem/21849857

Reviewed by Sam Weinig.

Source/WebCore:

Adding support for some new emoji with modifiers and
one new emoji sequence.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):
* platform/text/CharacterProperties.h:
(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiModifier):
* platform/text/TextBreakIterator.cpp:
(WebCore::cursorMovementIterator):

LayoutTests:

Updated test to reflect the changes.

* editing/deleting/delete-emoji-expected.txt:
* editing/deleting/delete-emoji.html:

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

5 years agoInitial infrastructure of media controls testing
dino@apple.com [Thu, 27 Aug 2015 14:46:08 +0000 (14:46 +0000)]
Initial infrastructure of media controls testing
https://bugs.webkit.org/show_bug.cgi?id=148426
<rdar://problem/22417286>

Reviewed by Eric Carlson.

Source/WebCore:

Expose a JS API from Internals that allows a layout test
to ask the controls instance what it thinks it is
doing.

Test: media/controls/basic.html

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.getCurrentControlsStatus): New method. Currently
returns a simple JSON string.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): Call into
the controls instance.
* html/HTMLMediaElement.h:
* testing/Internals.cpp:
(WebCore::Internals::getCurrentMediaControlsStatusForElement): Link
between the Internals API and the HTMLMediaElement.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Very simple test that calls into the status object
of the media controls instance.

* media/controls/basic-expected.txt: Added.
* media/controls/basic.html: Added.

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

5 years agoAdd a Layout test for r188991
wenson_hsieh@apple.com [Thu, 27 Aug 2015 14:26:20 +0000 (14:26 +0000)]
Add a Layout test for r188991
https://bugs.webkit.org/show_bug.cgi?id=148507

Reviewed by Tim Horton.

Tests that stopping an animation early and closing the window does
not crash the process. This is a retrospective test added for
https://bugs.webkit.org/show_bug.cgi?id=148442, "Fix crash due to
animationDidEnd called on deallocated RemoteLayerTreeHost."

* animations/crash-on-removing-animation.html: Added.
* animations/crash-on-removing-animation-expected.txt: Added.

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

5 years agoUnreviewed. Mark WTF_WordLock.ContendedShortSection as slow too.
carlosgc@webkit.org [Thu, 27 Aug 2015 10:26:47 +0000 (10:26 +0000)]
Unreviewed. Mark WTF_WordLock.ContendedShortSection as slow too.

* Scripts/run-gtk-tests:
(TestRunner):

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

5 years ago[EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
gyuyoung.kim@webkit.org [Thu, 27 Aug 2015 09:59:37 +0000 (09:59 +0000)]
[EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
https://bugs.webkit.org/show_bug.cgi?id=148511

Reviewed by Csaba Osztrogonác.

To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.

Additionally this patch fixes style errors in RenderThemeEfl.cpp

* PlatformEfl.cmake:
* rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
(WebCore::toEdjeGroup):
(WebCore::setSourceGroupForEdjeObject):
(WebCore::RenderThemeEfl::adjustSizeConstraints):
(WebCore::isFormElementTooLargeToDisplay):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
(WebCore::RenderThemeEfl::getThemePartFromCache):
(WebCore::RenderThemeEfl::clearThemePartCache):
(WebCore::RenderThemeEfl::applyEdjeStateFromForm):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
(WebCore::RenderThemeEfl::create):
(WebCore::RenderTheme::themeForPage):
(WebCore::applyColorCallback):
(WebCore::fillColorsFromEdjeClass):
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::setThemePath):
(WebCore::RenderThemeEfl::themePath):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::applyPartDescriptionFallback):
(WebCore::RenderThemeEfl::applyPartDescription):
(WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::~RenderThemeEfl):
(WebCore::supportsFocus):
(WebCore::RenderThemeEfl::supportsFocusRing):
(WebCore::RenderThemeEfl::controlSupportsTints):
(WebCore::RenderThemeEfl::baselinePosition):
(WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformFocusRingColor):
(WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
(WebCore::RenderThemeEfl::paintSliderTrack):
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::sliderTickSize):
(WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore::RenderThemeEfl::paintSliderThumb):
(WebCore::RenderThemeEfl::adjustCheckboxStyle):
(WebCore::RenderThemeEfl::paintCheckbox):
(WebCore::RenderThemeEfl::adjustRadioStyle):
(WebCore::RenderThemeEfl::paintRadio):
(WebCore::RenderThemeEfl::adjustButtonStyle):
(WebCore::RenderThemeEfl::paintButton):
(WebCore::RenderThemeEfl::adjustMenuListStyle):
(WebCore::RenderThemeEfl::paintMenuList):
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
(WebCore::RenderThemeEfl::adjustTextFieldStyle):
(WebCore::RenderThemeEfl::paintTextField):
(WebCore::RenderThemeEfl::adjustTextAreaStyle):
(WebCore::RenderThemeEfl::paintTextArea):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
(WebCore::RenderThemeEfl::adjustSearchFieldStyle):
(WebCore::RenderThemeEfl::paintSearchField):
(WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeEfl::paintInnerSpinButton):
(WebCore::RenderThemeEfl::setDefaultFontSize):
(WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
(WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeEfl::animationDurationForProgressBar):
(WebCore::RenderThemeEfl::paintProgressBar):
(WebCore::RenderThemeEfl::mediaControlsStyleSheet):
(WebCore::RenderThemeEfl::mediaControlsScript):
* rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.

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

5 years ago[EFL] REGRESSION: userscripts tests crash
ossy@webkit.org [Thu, 27 Aug 2015 09:46:26 +0000 (09:46 +0000)]
[EFL] REGRESSION: userscripts tests crash
https://bugs.webkit.org/show_bug.cgi?id=148519

Unreviewed gardening, skip failing tests to make the bot work again.

* platform/efl/TestExpectations:

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

5 years ago[EFL] REGRESSION: fullscreen tests fail with timeout
ossy@webkit.org [Thu, 27 Aug 2015 09:41:57 +0000 (09:41 +0000)]
[EFL] REGRESSION: fullscreen tests fail with timeout
https://bugs.webkit.org/show_bug.cgi?id=148518

Unreviewed gardening, skip failing tests to make the bot work again.

* platform/efl/TestExpectations:

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

5 years agoFix GTK+ WTR crashes in initializeMainRunLoop()
carlosgc@webkit.org [Thu, 27 Aug 2015 09:37:12 +0000 (09:37 +0000)]
Fix GTK+ WTR crashes in initializeMainRunLoop()

Rubber-stamped by Žan Doberšek.

Initialize threading and main thread before
RunLoop::initializeMainRunLoop(), since the GLib implementation of
the RunLoop uses isMainThread() to decide whether to create a new
GMainContext or use the default one. Also use RunLoop::run() and
::stop() instead of gtk_main/quit.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::notifyDone):
(WTR::TestController::platformRunUntil):

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

5 years ago[EFL] REGRESSION: 50+ layout tests crash
ossy@webkit.org [Thu, 27 Aug 2015 09:16:01 +0000 (09:16 +0000)]
[EFL] REGRESSION: 50+ layout tests crash
https://bugs.webkit.org/show_bug.cgi?id=148471

Reviewed by Gyuyoung Kim.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):

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

5 years agoFix WKMutableArray creations in WKUserMediaPermissionRequest
zandobersek@gmail.com [Thu, 27 Aug 2015 07:59:43 +0000 (07:59 +0000)]
Fix WKMutableArray creations in WKUserMediaPermissionRequest
https://bugs.webkit.org/show_bug.cgi?id=148489

Reviewed by Carlos Garcia Campos.

Call WKMutableArrayCreate() to create the WKMutableArray objects.
WKMutableArrayRef type is a pointer, so calling 'WKMutableArrayRef()'
just sets a null value to the variable that is then returned and
queried for size in WebKitTestRunner's TestController, resulting
in a crash.

* UIProcess/API/C/WKUserMediaPermissionRequest.cpp:
(WKUserMediaPermissionRequestDeviceNamesVideo):
(WKUserMediaPermissionRequestDeviceNamesAudio):

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

5 years agoUnreviewed, further shorten a test that times out because it's very long
fpizlo@apple.com [Thu, 27 Aug 2015 07:23:29 +0000 (07:23 +0000)]
Unreviewed, further shorten a test that times out because it's very long
running.

I've locally run these tests on repeat for 24 hours and found no genuine
failures, like deadlocks. So, the timeouts are probably because the test
machine is slow and debug is slow. We should just run this test for fewer
iterations.

* TestWebKitAPI/Tests/WTF/Lock.cpp:
(TestWebKitAPI::TEST):

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

5 years agoNode::origin should always be set, and the dead zone due to SSA Phis can just use...
fpizlo@apple.com [Thu, 27 Aug 2015 07:16:07 +0000 (07:16 +0000)]
Node::origin should always be set, and the dead zone due to SSA Phis can just use exitOK=false
https://bugs.webkit.org/show_bug.cgi?id=148462

Reviewed by Saam Barati.

The need to label nodes that absolutely cannot exit was first observed when we introduced SSA form.
We indicated this by not setting the CodeOrigin.

But just recently (http://trac.webkit.org/changeset/188979), we added a more comprehensive "exitOK"
bit in NodeOrigin. After that change, there were two ways of indicating that you cannot exit:
!exitOK and an unset NodeOrigin. An unset NodeOrigin implied !exitOK.

Now, this change is about removing the old way so that we only use !exitOK. From now on, all nodes
must have their NodeOrigin set, and the IR validation will check this. This means that I could
remove various pieces of cruft for dealing with unset NodeOrigins, but I did have to add some new
cruft to ensure that all nodes we create have a NodeOrigin.

This change simplifies our IR by having a simpler rule about when NodeOrigin is set: it's always
set.

* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::isInBlock):
(JSC::DFG::BasicBlock::removePredecessor):
(JSC::DFG::BasicBlock::firstOriginNode): Deleted.
(JSC::DFG::BasicBlock::firstOrigin): Deleted.
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::begin):
(JSC::DFG::BasicBlock::end):
(JSC::DFG::BasicBlock::numSuccessors):
(JSC::DFG::BasicBlock::successor):
* dfg/DFGCombinedLiveness.cpp:
(JSC::DFG::liveNodesAtHead):
* dfg/DFGConstantHoistingPhase.cpp:
* dfg/DFGCriticalEdgeBreakingPhase.cpp:
(JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge):
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledOperands):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::createPreHeader):
(JSC::DFG::LoopPreHeaderCreationPhase::run):
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
(JSC::DFG::Validate::validateSSA):

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

5 years agoMarkedBlock::allocateBlock will have the wrong allocation size when (sizeof(MarkedBlo...
saambarati1@gmail.com [Thu, 27 Aug 2015 05:54:21 +0000 (05:54 +0000)]
MarkedBlock::allocateBlock will have the wrong allocation size when (sizeof(MarkedBlock) + bytes) is divisible by WTF::pageSize()
https://bugs.webkit.org/show_bug.cgi?id=148500

Reviewed by Mark Lam.

Consider the following scenario:
- On OS X, WTF::pageSize() is 4*1024 bytes.
- JSEnvironmentRecord::allocationSizeForScopeSize(6621) == 53000
- sizeof(MarkedBlock) == 248
- (248 + 53000) is a multiple of 4*1024.
- (248 + 53000)/(4*1024) == 13

We will allocate a chunk of memory of size 53248 bytes that looks like this:
0            248       256                       53248       53256
[Marked Block | 8 bytes |  payload     ......      ]  8 bytes  |
                        ^                                      ^
                   Our Environment record starts here.         ^
                                                               ^
                                                         Our last JSValue in the environment record will go from byte 53248 to 53256. But, we don't own this memory.

We need to ensure that we round up sizeof(MarkedBlock) to an
atomSize boundary. We need to do this because the first atom
inside the MarkedBlock will start at the rounded up multiple
of atomSize past MarkedBlock. If we end up with an allocation
that is perfectly aligned to the page size, then we will be short
8 bytes (in the current implementation where atomSize is 16 bytes,
and MarkedBlock is 248 bytes).

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateBlock):
* tests/stress/heap-allocator-allocates-incorrect-size-for-activation.js: Added.
(use):
(makeFunction):

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

5 years agoWeb Inspector: [Regression] [Mavericks]: Undocked Web Inspector toolbar is two differ...
nvasilyev@apple.com [Thu, 27 Aug 2015 04:40:50 +0000 (04:40 +0000)]
Web Inspector: [Regression] [Mavericks]: Undocked Web Inspector toolbar is two different colors and has extra space
https://bugs.webkit.org/show_bug.cgi?id=148510

Make body element transparent and remove extra padding above the toolbar only for OS X Mavericks.

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Views/Main.css:
(body:not(.mavericks)):
(body): Deleted.
* UserInterface/Views/Toolbar.css:
(body:not(.mavericks) .toolbar):
(body.window-inactive:not(.mavericks) .toolbar):
(body.mac-platform:not(.docked, .mavericks) .toolbar):
(.toolbar): Deleted.
(body.window-inactive .toolbar): Deleted.
(body.mac-platform:not(.docked) .toolbar): Deleted.

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

5 years ago[ThreadedCompositor] Use WTF::Condition together with WTF::Lock
commit-queue@webkit.org [Thu, 27 Aug 2015 03:32:12 +0000 (03:32 +0000)]
[ThreadedCompositor] Use WTF::Condition together with WTF::Lock
https://bugs.webkit.org/show_bug.cgi?id=148493

Patch by Emanuele Aina <emanuele.aina@collabora.com> on 2015-08-26
Reviewed by Gyuyoung Kim.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
Replace ThreadCondition::signal() calls with Condition::notifyOne().
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
Replace ThreadCondition usage with Condition.

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

5 years agowatchdog m_didFire state erroneously retained.
mark.lam@apple.com [Thu, 27 Aug 2015 02:49:52 +0000 (02:49 +0000)]
watchdog m_didFire state erroneously retained.
https://bugs.webkit.org/show_bug.cgi?id=131082

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The watchdog can fire for 2 reasons:
1. an external controlling entity (i.e. another thread) has scheduled termination
   of the script thread via watchdog::terminateSoon().
2. the allowed CPU time has expired.

For case 1, we're doing away with the m_didFire flag.  Watchdog::terminateSoon()
will set the timer deadlines and m_timeLimit to 0, and m_timerDidFire to true.
This will get the script thread to check Watchdog::didFire() and terminate
execution.

Note: the watchdog only guarantees that script execution will terminate as soon
as possible due to a time limit of 0.  Once we've exited the VM, the client of the
VM is responsible from keeping a flag to prevent new script execution.

In a race condition, if terminateSoon() is called just after execution has gotten
past the client's reentry check and the client is in the process of re-entering,
the worst that can happen is that we will schedule the watchdog timer to fire
after a period of 0.  This will terminate script execution quickly, and thereafter
the client's check should be able to prevent further entry into the VM.

The correctness (i.e. has no race condition) of this type of termination relies
on the termination state being sticky.  Once the script thread is terminated this
way, the VM will continue to terminate scripts quickly until the client sets the
time limit to a non-zero value (or clears it which sets the time limit to
noTimeLimit).

For case 2, the watchdog does not alter m_timeLimit.  If the CPU deadline has
been reached, the script thread will terminate execution and exit the VM.

If the client of the VM starts new script execution, the watchdog will allow
execution for the specified m_timeLimit.  In this case, since m_timeLimit is not
0, the script gets a fresh allowance of CPU time to execute.  Hence, terminations
due to watchdog time outs are no longer sticky.

* API/JSContextRef.cpp:
(JSContextGroupSetExecutionTimeLimit):
(JSContextGroupClearExecutionTimeLimit):
* API/tests/ExecutionTimeLimitTest.cpp:
- Add test scenarios to verify that the watchdog is automatically reset by the VM
  upon throwing the TerminatedExecutionException.

(testResetAfterTimeout):
(testExecutionTimeLimit):
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::ensureWatchdog):
* runtime/VM.h:
* runtime/VMInlines.h: Added.
(JSC::VM::shouldTriggerTermination):
* runtime/Watchdog.cpp:
(JSC::Watchdog::Watchdog):
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::terminateSoon):
(JSC::Watchdog::didFireSlow):
(JSC::Watchdog::hasTimeLimit):
(JSC::Watchdog::enteredVM):
(JSC::Watchdog::exitedVM):
(JSC::Watchdog::startTimer):
(JSC::Watchdog::stopTimer):
(JSC::Watchdog::hasStartedTimer): Deleted.
(JSC::Watchdog::fire): Deleted.
* runtime/Watchdog.h:
(JSC::Watchdog::didFire):
(JSC::Watchdog::timerDidFireAddress):

Source/WebCore:

No new tests.  The new code is covered by the JSC API tests and an existing test:
fast/workers/worker-terminate-forever.html

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):
- Always create a watchdog for the Web Worker's VM.  We need this in order to support
  Worker.terminate().
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::scheduleExecutionTermination):
(WebCore::WorkerScriptController::isTerminatingExecution):
(WebCore::WorkerScriptController::forbidExecution):
(WebCore::WorkerScriptController::isExecutionTerminating): Deleted.
* bindings/js/WorkerScriptController.h:

LayoutTests:

* fast/workers/worker-terminate-forever-expected.txt:
* fast/workers/worker-terminate-forever.html:
- Updated to check if the worker actually did terminate.

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

5 years agoWeb Inspector: Uncaught exception in CSS Completion - TypeError: undefined is not...
commit-queue@webkit.org [Thu, 27 Aug 2015 01:28:06 +0000 (01:28 +0000)]
Web Inspector: Uncaught exception in CSS Completion - TypeError: undefined is not an object (evaluating 'this._values[middleIndex].startsWith')
https://bugs.webkit.org/show_bug.cgi?id=148508

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

* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions):
Add a comment explaining that the constructor may be called with
a list of strings or a list of objects from the protocol. Add
a fast path for when this is constructed with a list of strings.

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

5 years agoUnreviewed build fix attempt on EFL
ryuan.choi@navercorp.com [Thu, 27 Aug 2015 01:10:45 +0000 (01:10 +0000)]
Unreviewed build fix attempt on EFL

* WebKitTestRunner/PlatformEfl.cmake:

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

5 years agoWeb Inspector: Rendering Frames timeline pie chart should use SVG instead of 2D canvas
mattbaker@apple.com [Thu, 27 Aug 2015 01:09:44 +0000 (01:09 +0000)]
Web Inspector: Rendering Frames timeline pie chart should use SVG instead of 2D canvas
https://bugs.webkit.org/show_bug.cgi?id=148457

Reviewed by Timothy Hatcher.

* UserInterface/Views/ChartDetailsSectionRow.css:
(.details-section > .content > .group > .row.chart > .chart-content > svg > path.hidden):
(.details-section > .content > .group > .row.chart > .chart-content > svg > path.chart-segment):
(.details-section > .content > .group > .row.chart > .chart-content > svg > path.empty-chart):
New styles for SVG chart elements.

* UserInterface/Views/ChartDetailsSectionRow.js:
(WebInspector.ChartDetailsSectionRow):
Calculate radii and create SVG chart elements.
(WebInspector.ChartDetailsSectionRow.prototype.clearItems):
Remove chart segment path elements.
(WebInspector.ChartDetailsSectionRow.prototype._needsLayout):
(WebInspector.ChartDetailsSectionRow.prototype._updateLayout.createSegmentPathData):
Helper function that creates path data for a single pie chart segment.
(WebInspector.ChartDetailsSectionRow.prototype._updateLayout):
Creates path elements as needed, and updates path data for for non-zero data points.
(WebInspector.ChartDetailsSectionRow.prototype.set innerLabel): Deleted.
(WebInspector.ChartDetailsSectionRow.prototype.set innerRadius): Deleted.
These properties are now set during construction.
(WebInspector.ChartDetailsSectionRow.prototype.updateLayout): Deleted.
Renamed to _updateLayout.

* UserInterface/Views/TimelineSidebarPanel.js:
Chart size and inner radius passed to chart constructor.

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

5 years ago[Cocoa] PerformanceTest Layout/RegionsShapes.html is failing
mmaxfield@apple.com [Thu, 27 Aug 2015 00:20:14 +0000 (00:20 +0000)]
[Cocoa] PerformanceTest Layout/RegionsShapes.html is failing
https://bugs.webkit.org/show_bug.cgi?id=148464

Reviewed by Andy Estes.

The test is failing because Core Text emits a warning message when you use CTFontCreateWithName()
and it cannot find the name you provide. However, this is exactly the situation we are creating
(by attempting to auto-activate a font if we could not otherwise find it). The fix is to simply
not use that API function in favor of using CTFontCreateWithFontDescriptor(), which does not emit
a warning message..

No new tests because there is no behavior change.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::autoActivateFont):
(WebCore::FontCache::createFontPlatformData):

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

5 years agoREGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
aestes@apple.com [Thu, 27 Aug 2015 00:04:20 +0000 (00:04 +0000)]
REGRESSION (r188987): imported/mozilla/svg/filters/feConvolveMatrix-1.svg fails
https://bugs.webkit.org/show_bug.cgi?id=148497

* TestExpectations: Marked as ImageOnlyFailure.

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

5 years agoBuild fix after r188982
achristensen@apple.com [Wed, 26 Aug 2015 23:52:22 +0000 (23:52 +0000)]
Build fix after r188982

* MiniBrowser/win/CMakeLists.txt:
Find .rc files in correct directory.

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

5 years agoWeb Inspector: Implement tracking of active stylesheets in the frontend
joepeck@webkit.org [Wed, 26 Aug 2015 23:48:49 +0000 (23:48 +0000)]
Web Inspector: Implement tracking of active stylesheets in the frontend
https://bugs.webkit.org/show_bug.cgi?id=105828

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/CSS.json:
Add new events for when a StyleSheet is added or removed.

Source/WebCore:

Tests: inspector/css/stylesheet-events-basic.html
       inspector/css/stylesheet-events-imports.html
       inspector/css/stylesheet-events-inspector-stylesheet.html

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::documentDetachedImpl):
(WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::documentDetached):
(WebCore::InspectorInstrumentation::activeStyleSheetsUpdated):
New hooks for when a document is detached or a document's style sheets are updated.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
Inform the inspector so the CSSAgent can remove document related data.

* dom/DocumentStyleSheetCollection.h:
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
Inform the inspector so the CSSAgent can push stylesheet related events.

(WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Added.
CSSStyleSheets for the inspector include non-disabled author stylesheets
even if they are empty.

* inspector/InspectorCSSAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::reset):
(WebCore::InspectorCSSAgent::documentDetached):
Handling for the new list of known document to CSSStyleSheets map.

(WebCore::InspectorCSSAgent::enable):
When the CSS domain is enabled, tell the frontend about known stylesheets.

(WebCore::InspectorCSSAgent::activeStyleSheetsUpdated):
(WebCore::InspectorCSSAgent::setActiveStyleSheetsForDocument):
Diff the old list of known stylesheets to the new list of stylesheets
for an individual document. Then send appropriate added/removed events.

(WebCore::InspectorCSSAgent::collectAllStyleSheets):
(WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
(WebCore::InspectorCSSAgent::collectStyleSheets):
Collect stylesheets recursively. A stylesheet may link to other stylesheets
through @import statements.

(WebCore::InspectorCSSAgent::getAllStyleSheets):
Use the new methods, this command should go away as it will no longer be useful.

(WebCore::InspectorCSSAgent::unbindStyleSheet):
(WebCore::InspectorCSSAgent::bindStyleSheet):
Create an InspectorStyleSheet from a CSSStyleSheet and add to the appropriate lists.
Likewise, unbinding will remove from the appropriate lists.

(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
(WebCore::InspectorCSSAgent::detectOrigin):
When creating the inspector stylesheet, which is a <style> element,
it will push a StyleSheetAdded event. In the process of binding this
new stylesheet use the m_creatingViaInspectorStyleSheet to add it to
out list of Inspector Stylesheets.

Source/WebInspectorUI:

* UserInterface/Models/CSSStyleSheet.js:
(WebInspector.CSSStyleSheet):
(WebInspector.CSSStyleSheet.prototype.get origin):
(WebInspector.CSSStyleSheet.prototype.updateInfo):
Add a new origin attribute that has been sent from the backend for a while.

* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.styleSheetAdded):
(WebInspector.CSSStyleManager.prototype.styleSheetRemoved):
Handle the new events by managing the new CSSStyleSheets.

(WebInspector.CSSStyleManager):
(WebInspector.CSSStyleManager.prototype._mainResourceDidChange):
Reset the legacy fetching flag. Fetching is only needed for legacy backends.

(WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets):
Include the new origin property in the legacy updateInfo path.

* UserInterface/Protocol/CSSObserver.js:
(WebInspector.CSSObserver.prototype.styleSheetAdded):
(WebInspector.CSSObserver.prototype.styleSheetRemoved):
Forward to the manager.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
Refresh the sidebar when stylesheets are added / removed, as that
may affect the style of the select element.

LayoutTests:

* inspector/css/resources/import-level-1.css: Added.
* inspector/css/resources/import-level-2.css: Added.
* inspector/css/resources/stylesheet-events-subframe.html: Added.
* inspector/css/stylesheet-events-basic-expected.txt: Added.
* inspector/css/stylesheet-events-basic.html: Added.
* inspector/css/stylesheet-events-imports-expected.txt: Added.
* inspector/css/stylesheet-events-imports.html: Added.
* inspector/css/stylesheet-events-inspector-stylesheet-expected.txt: Added.
* inspector/css/stylesheet-events-inspector-stylesheet.html: Added.
* inspector/css/stylesheet-events-multiple-documents-expected.txt: Added.
* inspector/css/stylesheet-events-multiple-documents.html: Added.
Tests for different ways that StyleSheets can be added / removed.

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

5 years agoAdd comment to LocaleToScriptMappingDefault.cpp
mmaxfield@apple.com [Wed, 26 Aug 2015 23:21:47 +0000 (23:21 +0000)]
Add comment to LocaleToScriptMappingDefault.cpp
<rdar://problem/22407296>

Unreviewed.

We currently map lang="zh" to USCRIPT_SIMPLIFIED_HAN, which is incorrect.
Instead, we should consult with an external source, such as the user's
language preferences.

* platform/text/LocaleToScriptMappingDefault.cpp:

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

5 years agoCorrect build after r188982.
bfulgham@apple.com [Wed, 26 Aug 2015 22:15:02 +0000 (22:15 +0000)]
Correct build after r188982.

* WebKit.vcxproj/WebKit.sln:

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

5 years agoDistinguish Web IDL callback interfaces from Web IDL callback functions
cdumez@apple.com [Wed, 26 Aug 2015 22:09:29 +0000 (22:09 +0000)]
Distinguish Web IDL callback interfaces from Web IDL callback functions
https://bugs.webkit.org/show_bug.cgi?id=148434

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add isNull() convenience method on PropertyName.

* runtime/PropertyName.h:
(JSC::PropertyName::isNull):

Source/WebCore:

Distinguish Web IDL callback interfaces [1] from Web IDL callback
functions [2].

One Web-exposed difference is that when using a callback interface,
the user can pass either a function / callable object or a non-callable
object that has a method with the same name as the callback interface
operation:
https://heycam.github.io/webidl/#es-user-objects

When using a callback function, the user needs to pass a function /
callable object:
https://heycam.github.io/webidl/#es-callback-function

This patch adds a new [Callback=FunctionOnly] IDL extended attribute to
indicate that a callback interface should be function-only (i.e. a callback
function in the latest Web IDL specification). Without this IDL extended
attribute, the callback interface will be treated as a regular callback
interface. This will be needed for Bug 148415, as NodeFilter should be
an actual callback interface.

Note that longer term, we should really drop the old-style
[Callback=FunctionOnly] extendd attribute and use actual IDL callback
functions as per the latest Web IDL specification. However, I did not
do this in this patch to minimize patch size.

This patch adds Callback=FunctionOnly] IDL extended attribute to all
our pre-existing callback interfaces so that there is no behavior
change.

       [1] https://heycam.github.io/webidl/#dfn-callback-interface
       [2] https://heycam.github.io/webidl/#idl-callback-functions

* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/mediastream/MediaStreamTrackSourcesCallback.idl:
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/RTCPeerConnectionErrorCallback.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCStatsCallback.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCallbackData.h:
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/scripts/CodeGenerator.pm:
(trim):
(IsFunctionOnlyCallbackInterface):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheckExpression):
(GenerateParametersCheck):
(GenerateCallbackImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp: Added.
(WebKit::kit):
(WebKit::core):
(WebKit::wrapTestCallbackFunction):
(webkit_dom_test_callback_function_finalize):
(webkit_dom_test_callback_function_constructor):
(webkit_dom_test_callback_function_class_init):
(webkit_dom_test_callback_function_init):
(webkit_dom_test_callback_function_callback_with_no_param):
(webkit_dom_test_callback_function_callback_with_array_param):
(webkit_dom_test_callback_function_callback_with_serialized_script_value_param):
(webkit_dom_test_callback_function_callback_with_non_bool_return_type):
(webkit_dom_test_callback_function_callback_with_string_list):
(webkit_dom_test_callback_function_callback_with_boolean):
(webkit_dom_test_callback_function_callback_requires_this_to_pass):
* bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCallbackFunctionPrivate.h: Copied from Source/WebCore/css/MediaQueryListListener.idl.
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
(WebCore::JSTestCallbackFunction::JSTestCallbackFunction):
(WebCore::JSTestCallbackFunction::~JSTestCallbackFunction):
(WebCore::JSTestCallbackFunction::callbackWithNoParam):
(WebCore::JSTestCallbackFunction::callbackWithArrayParam):
(WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallbackFunction::callbackWithStringList):
(WebCore::JSTestCallbackFunction::callbackWithBoolean):
(WebCore::JSTestCallbackFunction::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallbackFunction.h: Added.
(WebCore::JSTestCallbackFunction::create):
(WebCore::JSTestCallbackFunction::scriptExecutionContext):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::JSTestObjConstructor::finishCreation):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): Deleted.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): Deleted.
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Copied from Source/WebCore/html/VoidCallback.idl.
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Added.
(-[DOMTestCallbackFunction dealloc]):
(-[DOMTestCallbackFunction finalize]):
(-[DOMTestCallbackFunction callbackWithNoParam]):
(-[DOMTestCallbackFunction callbackWithArrayParam:]):
(-[DOMTestCallbackFunction callbackWithSerializedScriptValueParam:strArg:]):
(-[DOMTestCallbackFunction callbackWithNonBoolReturnType:]):
(-[DOMTestCallbackFunction customCallback:class6Param:]):
(-[DOMTestCallbackFunction callbackWithStringList:]):
(-[DOMTestCallbackFunction callbackWithBoolean:]):
(-[DOMTestCallbackFunction callbackRequiresThisToPass:testNodeParam:]):
(core):
(kit):
* bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Copied from Source/WebCore/html/VoidCallback.idl.
* bindings/scripts/test/TestCallbackFunction.idl: Copied from Source/WebCore/Modules/webdatabase/DatabaseCallback.idl.
* bindings/scripts/test/TestObj.idl:
* css/MediaQueryListListener.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/StringCallback.idl:
* html/VoidCallback.idl:

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

5 years agoWeb Inspector: Drop iOS 6 Legacy Remote Inspector Support
joepeck@webkit.org [Wed, 26 Aug 2015 22:07:18 +0000 (22:07 +0000)]
Web Inspector: Drop iOS 6 Legacy Remote Inspector Support
https://bugs.webkit.org/show_bug.cgi?id=148456

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector._updateReloadToolbarButton):
(WebInspector._updateDownloadToolbarButton):
(WebInspector.canArchiveMainFrame):
* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype._frameURLMapKey):
(WebInspector.CSSStyleManager.prototype._lookupStyleSheet.styleSheetsFetched):
(WebInspector.CSSStyleManager._updateResourceContent.fetchedStyleSheetContent):
(WebInspector.CSSStyleManager.prototype._clearStyleSheetsForResource): Deleted.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype.highlightSelector):
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._setBreakpoint):
* UserInterface/Controllers/JavaScriptLogViewController.js:
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager):
(WebInspector.StorageManager.prototype._addDOMStorageIfNeeded):
(WebInspector.StorageManager.prototype.domStorageWasUpdated): Deleted.
(WebInspector.StorageManager.prototype._domStorageForIdentifier): Deleted.
(WebInspector.StorageManager.prototype._extraDomainsActivated): Deleted.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
* UserInterface/Models/CSSCompletions.js:
(WebInspector.CSSCompletions):
(WebInspector.CSSCompletions.requestCSSCompletions):
* UserInterface/Models/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.addCustomCompletions): Deleted.
* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty):
(WebInspector.CSSProperty.prototype.update):
* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.get matchedSelectors): Deleted.
(WebInspector.CSSRule.prototype.get matchedSelectorText): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.parseRuleMatchArrayPayload):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.changeRule.changeText):
(WebInspector.DOMNodeStyles.prototype.changeStyleText):
(WebInspector.DOMNodeStyles.prototype._parseStylePropertyPayload):
(WebInspector.DOMNodeStyles.prototype._parseRulePayload):
(WebInspector.DOMNodeStyles.prototype.changeStyleText.attributeChanged): Deleted.
(WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent.contentDidChange): Deleted.
(WebInspector.DOMNodeStyles.prototype.changeStyleText.fetchedStyleSheetContent): Deleted.
(WebInspector.DOMNodeStyles.prototype._parseSourceRangePayload): Deleted.
(WebInspector.DOMNodeStyles.prototype._parseSelectorListPayload): Deleted.
* UserInterface/Models/DOMStorageObject.js:
* UserInterface/Models/DOMTree.js:
(WebInspector.DOMTree.prototype.requestRootDOMNode):
(WebInspector.DOMTree.prototype._requestRootDOMNode):
* UserInterface/Models/DatabaseObject.js:
(WebInspector.DatabaseObject.prototype.executeSQL.queryCallback):
(WebInspector.DatabaseObject.prototype.executeSQL):
(WebInspector.DatabaseObject):
(WebInspector.DatabaseObject.prototype.executeSQL.callback): Deleted.
* UserInterface/Models/ExecutionContext.js:
(WebInspector.ExecutionContext.supported): Deleted.
* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage): Deleted.
* UserInterface/Models/LayoutTimelineRecord.js:
(WebInspector.LayoutTimelineRecord):
(WebInspector.LayoutTimelineRecord.prototype.get width):
(WebInspector.LayoutTimelineRecord.prototype.get height):
(WebInspector.LayoutTimelineRecord.prototype.get area):
(WebInspector.LayoutTimelineRecord.prototype.get x): Deleted.
(WebInspector.LayoutTimelineRecord.prototype.get y): Deleted.
(WebInspector.LayoutTimelineRecord.prototype.get rect): Deleted.
* UserInterface/Models/ProfileNode.js:
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.associateWithScript):
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload.profileNodeFromPayload):
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
* UserInterface/Models/TextRange.js:
(WebInspector.TextRange.prototype.resolveLinesAndColumns.countNewLineCharacters): Deleted.
(WebInspector.TextRange.prototype.resolveLinesAndColumns): Deleted.
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Protocol/ConsoleObserver.js:
(WebInspector.ConsoleObserver.prototype.messageAdded): Deleted.
* UserInterface/Protocol/DOMStorageObserver.js:
(WebInspector.DOMStorageObserver.prototype.addDOMStorage): Deleted.
(WebInspector.DOMStorageObserver.prototype.updateDOMStorage): Deleted.
* UserInterface/Protocol/DatabaseObserver.js:
(WebInspector.DatabaseObserver.prototype.sqlTransactionSucceeded): Deleted.
(WebInspector.DatabaseObserver.prototype.sqlTransactionFailed): Deleted.
(WebInspector.DatabaseObserver): Deleted.
* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js: Removed.
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._deleteCallback):
(WebInspector.CookieStorageContentView):
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings): Deleted.
* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._functionTextOrLink):
(WebInspector.EventListenerSectionGroup):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._showHighlightForRecord):
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype._createExecutionContextPathComponentFromFrame):
(WebInspector.QuickConsole.prototype._frameAdded): Deleted.
(WebInspector.QuickConsole.prototype._frameRemoved): Deleted.
(WebInspector.QuickConsole.prototype._frameMainResourceChanged): Deleted.
* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode.prototype.get data):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._makeBasicBlockAnnotator):
* Versions/Inspector-iOS-6.0.json: Removed.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

5 years ago[EFL] Bump cairo version to 1.14.2
ryuan.choi@navercorp.com [Wed, 26 Aug 2015 21:59:40 +0000 (21:59 +0000)]
[EFL] Bump cairo version to 1.14.2
https://bugs.webkit.org/show_bug.cgi?id=148474

Reviewed by Csaba Osztrogonác.

* efl/jhbuild.modules:

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

5 years agoFix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
wenson_hsieh@apple.com [Wed, 26 Aug 2015 21:54:41 +0000 (21:54 +0000)]
Fix crash due to animationDidEnd called on deallocated RemoteLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=148442
<rdar://problem/21609257>

Reviewed by Tim Horton.

A PlatformCAAnimationRemote's backpointer to a deallocated RemoteLayerTreeHost is not
invalidated when its host removes its reference to it.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::layerWillBeRemoved): Invalidate a backpointer from the
    PlatformCAAnimationRemotes to the RemoteLayerTreeHost.

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

5 years agoREGRESSION: Safari navigates after a cancelled force click
bdakin@apple.com [Wed, 26 Aug 2015 21:51:12 +0000 (21:51 +0000)]
REGRESSION: Safari navigates after a cancelled force click
https://bugs.webkit.org/show_bug.cgi?id=148491
-and corresponding-
rdar://problem/22394323

Reviewed by Tim Horton.

Source/WebCore:

This regression was introduced on El Capitan because AppKit sends ‘cancel’ to
gesture recognizer BEFORE it sends the mouseUp. So the ImmediateActionStage needs
to track whether a cancel happened after updates or without any updates since they
signify different things.

Don’t perform default behaviors when the stage is ActionCancelledAfterUpdate.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):

New possible stages, and new getter for the current stage.
* page/EventHandler.h:
(WebCore::EventHandler::immediateActionStage):

Source/WebKit/mac:

Use the current stage to determine which type of cancel this is.
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]):

Source/WebKit2:

Use the current stage to determine which type of cancel this is.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::immediateActionDidCancel):

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

5 years agoFix failing tests.
andersca@apple.com [Wed, 26 Aug 2015 21:37:43 +0000 (21:37 +0000)]
Fix failing tests.

Add fallback code for the case when iterations is 0.

* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):

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

5 years agoCrash when following a Google search link to Twitter with Limit Adult Content enabled
aestes@apple.com [Wed, 26 Aug 2015 21:15:49 +0000 (21:15 +0000)]
Crash when following a Google search link to Twitter with Limit Adult Content enabled
https://bugs.webkit.org/show_bug.cgi?id=147651

Rubber-stamped by Brady Eidson.

Tools:

Taught TestRunner how to decide the navigation policy after a delay.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForNavigationAction):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setShouldDecideNavigationPolicyAfterDelay):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::shouldDecideNavigationPolicyAfterDelay):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::decidePolicyForNavigationAction):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setShouldDecideNavigationPolicyAfterDelay):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

Added a layout test.

* http/tests/contentfiltering/load-substitute-data-from-appcache-expected.txt: Added.
* http/tests/contentfiltering/load-substitute-data-from-appcache.html: Added.
* http/tests/contentfiltering/resources/appcache.html: Added.
* http/tests/contentfiltering/resources/appcache.manifest: Added.
* platform/mac-wk1/TestExpectations:

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

5 years agoUse WorkQueue::concurrentApply in FEConvolveMatrix
andersca@apple.com [Wed, 26 Aug 2015 20:44:04 +0000 (20:44 +0000)]
Use WorkQueue::concurrentApply in FEConvolveMatrix
https://bugs.webkit.org/show_bug.cgi?id=148490

Reviewed by Tim Horton.

Using WorkQueue::concurrentApply lets us simplify the code a lot, and measurements show
no difference in performance. The striding has been slightly tweaked to make more sense
(we no longer divide up the remainder across some of the iterations, instead we just process
it separately last).

* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):
(WebCore::FEConvolveMatrix::setInteriorPixelsWorker): Deleted.
* platform/graphics/filters/FEConvolveMatrix.h:

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

5 years agoFix build.
andersca@apple.com [Wed, 26 Aug 2015 20:38:42 +0000 (20:38 +0000)]
Fix build.

* wtf/WorkQueue.cpp:

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

5 years agoUpdate Windows tool install instructions.
bfulgham@apple.com [Wed, 26 Aug 2015 20:29:17 +0000 (20:29 +0000)]
Update Windows tool install instructions.

* building/tools.html:

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

5 years agoMedia Session: make MediaSessionMetadata a class
eric.carlson@apple.com [Wed, 26 Aug 2015 20:29:06 +0000 (20:29 +0000)]
Media Session: make MediaSessionMetadata a class
https://bugs.webkit.org/show_bug.cgi?id=148486

Reviewed by Jer Noble.

Source/WebCore:

No new tests, no observable changes.

* Modules/mediasession/MediaSessionMetadata.h: Make it a class.
* page/ChromeClient.h: struct MediaSessionMetadata -> class MediaSessionMetadata.

Source/WebKit2:

* Shared/WebCoreArgumentCoders.h: struct MediaSessionMetadata -> class MediaSessionMetadata.
* UIProcess/WebPageProxy.h: Ditto.

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

5 years ago[Win] Rename 'WinLauncher' to 'MiniBrowser'
bfulgham@apple.com [Wed, 26 Aug 2015 20:22:43 +0000 (20:22 +0000)]
[Win] Rename 'WinLauncher' to 'MiniBrowser'
https://bugs.webkit.org/show_bug.cgi?id=148485

Reviewed by Alex Christensen

Move the WinLauncher project and source files to a subdirectory
of MiniBrowser. Globally change WinLauncher -> MiniBrowser in the
source code and project files.

* MiniBrowser/MiniBrowser.vcxproj: Copied from WinLauncher/WinLauncher.vcxproj.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.ico: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncher.ico.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.rc: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncher.rc.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.vcxproj: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.vcxproj.filters: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCF.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherCF.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCFLite.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCommon.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserDebug.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.rc: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.vcxproj: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.vcxproj.filters: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibCommon.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibDebug.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibPostBuild.cmd: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibPreBuild.cmd: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibProduction.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibRelease.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibResource.h: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserPostBuild.cmd: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserPreBuild.cmd: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserProduction.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserRelease.props: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserResource.h: Copied from WinLauncher/WinLauncher.vcxproj/WinLauncherResource.h.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncher.ico: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncher.rc: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncher.vcxproj: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncher.vcxproj.filters: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherCF.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherCFLite.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherCommon.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherDebug.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLib.rc: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLib.vcxproj: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLib.vcxproj.filters: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibCommon.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibDebug.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibPostBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibPreBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibProduction.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibRelease.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherLibResource.h: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherPostBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherPreBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherProduction.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherRelease.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/WinLauncherResource.h: Removed.
* MiniBrowser/win: Copied from WinLauncher.
* MiniBrowser/win/Common.cpp:
* MiniBrowser/win/MiniBrowser.cpp: Copied from WinLauncher/WinLauncher.cpp.
* MiniBrowser/win/MiniBrowser.h: Copied from WinLauncher/WinLauncher.h.
* MiniBrowser/win/MiniBrowserReplace.h: Copied from WinLauncher/WinLauncherReplace.h.
* MiniBrowser/win/MiniBrowserWebHost.cpp: Copied from WinLauncher/WinLauncherWebHost.cpp.
* MiniBrowser/win/MiniBrowserWebHost.h: Copied from WinLauncher/WinLauncherWebHost.h.
* MiniBrowser/win/PageLoadTestClient.cpp:
* MiniBrowser/win/PageLoadTestClient.h:
* MiniBrowser/win/ResourceLoadDelegate.cpp:
* MiniBrowser/win/ResourceLoadDelegate.h:
* MiniBrowser/win/WinLauncher.cpp: Removed.
* MiniBrowser/win/WinLauncher.h: Removed.
* MiniBrowser/win/WinLauncher.vcxproj: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncher.ico: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncher.rc: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncher.vcxproj: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncher.vcxproj.filters: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherCF.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherCFLite.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherCommon.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherDebug.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLib.rc: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLib.vcxproj: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibCommon.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibDebug.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibProduction.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibRelease.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherLibResource.h: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherPostBuild.cmd: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherPreBuild.cmd: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherProduction.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherRelease.props: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/WinLauncherResource.h: Removed.
* MiniBrowser/win/WinLauncher.vcxproj/small.ico: Removed.
* MiniBrowser/win/WinLauncherReplace.h: Removed.
* MiniBrowser/win/WinLauncherWebHost.cpp: Removed.
* MiniBrowser/win/WinLauncherWebHost.h: Removed.
* MiniBrowser/win/WinMain.cpp:
* WinLauncher: Removed.
* WinLauncher/AccessibilityDelegate.cpp: Removed.
* WinLauncher/AccessibilityDelegate.h: Removed.
* WinLauncher/CMakeLists.txt: Removed.
* WinLauncher/Common.cpp: Removed.
* WinLauncher/DOMDefaultImpl.cpp: Removed.
* WinLauncher/DOMDefaultImpl.h: Removed.
* WinLauncher/PageLoadTestClient.cpp: Removed.
* WinLauncher/PageLoadTestClient.h: Removed.
* WinLauncher/PrintWebUIDelegate.cpp: Removed.
* WinLauncher/PrintWebUIDelegate.h: Removed.
* WinLauncher/ResourceLoadDelegate.cpp: Removed.
* WinLauncher/ResourceLoadDelegate.h: Removed.
* WinLauncher/WebDownloadDelegate.cpp: Removed.
* WinLauncher/WebDownloadDelegate.h: Removed.
* WinLauncher/WinLauncher.cpp: Removed.
* WinLauncher/WinLauncher.h: Removed.
* WinLauncher/WinLauncher.vcxproj: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.ico: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.rc: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherCF.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props: Removed.
* WinLauncher/WinLauncher.vcxproj/WinLauncherResource.h: Removed.
* WinLauncher/WinLauncher.vcxproj/small.ico: Removed.
* WinLauncher/WinLauncherReplace.h: Removed.
* WinLauncher/WinLauncherWebHost.cpp: Removed.
* WinLauncher/WinLauncherWebHost.h: Removed.
* WinLauncher/WinMain.cpp: Removed.
* WinLauncher/resource.h: Removed.
* WinLauncher/stdafx.cpp: Removed.
* WinLauncher/stdafx.h: Removed.
* win/AssembleBuildLogs/AssembleLogs.cmd:

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

5 years agoAdd and implement WorkQueue::concurrentApply
andersca@apple.com [Wed, 26 Aug 2015 19:44:10 +0000 (19:44 +0000)]
Add and implement WorkQueue::concurrentApply
https://bugs.webkit.org/show_bug.cgi?id=148488

Reviewed by Geoffrey Garen.

WorkQueue::concurrentApply is modeled after dispatch_apply, and on Cocoa it uses dispatch_apply directly.
For other ports there's a generic concurrentApply implemented using our threading primitives.

* wtf/NeverDestroyed.h:
(WTF::LazyNeverDestroyed::operator->):
* wtf/WorkQueue.cpp:
(WTF::WorkQueue::concurrentApply):
* wtf/WorkQueue.h:
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::concurrentApply):

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

5 years agoUnreviewed.
zandobersek@gmail.com [Wed, 26 Aug 2015 19:30:50 +0000 (19:30 +0000)]
Unreviewed.

Fix the crashes in GTK+'s WebKitTestRunner by setting the process pool
on the API::PageConfiguration object in webkitWebViewBaseCreate().

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

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

5 years agoNode::origin should be able to tell you if it's OK to exit
fpizlo@apple.com [Wed, 26 Aug 2015 19:24:41 +0000 (19:24 +0000)]
Node::origin should be able to tell you if it's OK to exit
https://bugs.webkit.org/show_bug.cgi?id=145204

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This is a major change to DFG IR, that makes it easier to reason about where nodes with
speculations can be soundly hoisted.

A program in DFG IR is a sequence of operations that compute the values of SSA variables,
perform effects on the heap or stack, and perform updates to the OSR exit state. Because
effects and OSR exit updates are interleaved, there are points in execution where exiting
simply won't work. For example, we may have some bytecode operation:

    [  24] op_foo loc42 // does something, and puts a value in loc42.

that gets compiled down to a sequence of DFG IR nodes like:

    a: Foo(W:Heap, R:World, bc#24) // writes heap, reads world - i.e. an observable effect.
    b: MovHint(@a, loc42, bc#24)
    c: SetLocal(Check:Int32:@a, loc42, bc#24, exit: bc#26)

Note that we can OSR exit at @a because we haven't yet performed any effects for bc#24 yet and
we have performed all effects for prior bytecode operations. That's what the origin.forExit
being set to "bc#24" guarantees. So, an OSR exit at @a would transfer execution to bc#24 and
this would not be observable. But at @b, if we try to exit to bc#24 as indicated by forExit, we
would end up causing the side effect of bc#24 to execute a second time. This would be
observable, so we cannot do it. And we cannot exit to the next instruction - bc#26 - either,
because @b is responsible for updating the OSR state to indicate that the result of @a should
be put into loc42. It's not until we get to @c that we can exit again.

This is a confusing, but useful, property of DFG IR. It's useful because it allows us to use IR
to spell out how we would have affected the bytecode state, and we use this to implement hard
things like object allocation elimination, where we use IR instructions to indicate what object
allocation and mutation operations we would have performed, and which bytecode variables would
have pointed to those objects. So long as IR allows us to describe how OSR exit state is
updated, there will be points in execution where that state is invalid - especially if the IR
to update exit state is separate from the IR to perform actual effects.

But this property is super confusing! It's difficult to explain that somehow magically, @b is a
bad place to put OSR exits, and that magically we will only have OSR exits at @a. Of course, it
all kind of makes sense - we insert OSR exit checks in phases that *know* where it's safe to
exit - but it's just too opaque. This also gets in the way of more sophisticated
transformations. For example, LICM barely works - it magically knows that loop pre-headers are
good places to exit from, but it has no way of determining if that is actually true. It would
be odd to introduce a restriction that anytime some block qualifies as a pre-header according
to our loop calculator, it must end with a terminal at which it is OK to exit. So, our choices
are to either leave LICM in a magical state and exercise extreme caution when introducing new
optimizations that hoist checks, or to do something to make the "can I exit here" property more
explicit in IR.

We have already, in a separate change, added a NodeOrigin::exitOK property, though it didn't do
anything yet. This change puts exitOK to work, and makes it an integral part of IR. The key
intuition behind this change is that if we know which nodes clobber exit state - i.e. after the
node, it's no longer possible to OSR exit until the exit state is fixed up - then we can figure
out where it's fine to exit. This change mostly adopts the already implicit rule that it's
always safe to exit right at the boundary of exit origins (in between two nodes where
origin.forExit differs), and adds a new node, called ExitOK, which is a kind of declaration
that exit state is good again. When making this change, I struggled with the question of
whether to make origin.exitOK be explicit, or something that we can compute with an analysis.
Of course if we are armed with a clobbersExitState(Node*) function, we can find the places
where it's fine to exit. But this kind of computation could get quite sophisticated if the
nodes belonging to an exit origin are lowered to a control-flow construct. It would also be
harder to see what the original intent was, if we found an error: is the bug that we shouldn't
be clobbering exit state, or that we shouldn't be exiting? This change opts to make exitOK be
an explicit property of IR, so that DFG IR validation will reject any program where exitOK is
true after a node that clobbersExitState(), or if exitOK is true after a node has exitOK set to
false - unless the latter node has a different exit origin or is an ExitOK node. It will also
reject any program where a node mayExit() with !exitOK.

It turns out that this revealed a lot of sloppiness and what almost looked like an outright
bug: the callee property of an inline closure call frame was being set up "as if" by the
callee's op_enter. If we did hoist a check per the old rule - to the boundary of exit origins -
then we would crash because the callee is unknown. It also revealed that LICM could *almost*
get hosed by having a pre-header where there are effects before the jump. I wasn't able to
construct a test case that would crash trunk, but I also couldn't quite prove why such a
program couldn't be constructed. I did fix the issue in loop pre-header creation, and the
validater does catch the issue because of its exitOK assertions.

This doesn't yet add any other safeguards to LICM - that phase still expects that pre-headers
are in place and that they were created in such a way that their terminal origins have exitOK.
It also still keeps the old way of saying "not OK to exit" - having a clear NodeOrigin. In a
later patch I'll remove that and use !exitOK everywhere. Note that I did consider using clear
NodeOrigins to signify that it's not OK to exit, but that would make DFGForAllKills a lot more
expensive - it would have to sometimes search to find nearby forExit origins if the current
node doesn't have it set - and that's a critical phase for DFG compilation performance.
Requiring that forExit is usually set to *something* and that properly shadows the original
bytecode is cheap and easy, so it seemed like a good trade-off.

This change has no performance effect. Its only effect is that it makes the compiler easier to
understand by turning a previously magical concept into an explicit one.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractHeap.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::setDirect):
(JSC::DFG::ByteCodeParser::currentNodeOrigin):
(JSC::DFG::ByteCodeParser::branchData):
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp: Added.
(JSC::DFG::clobbersExitState):
* dfg/DFGClobbersExitState.h: Added.
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::convertStringAddUse):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
(JSC::DFG::FixupPhase::fixupGetAndSetLocalsInBlock):
(JSC::DFG::FixupPhase::fixupChecksInBlock):
* dfg/DFGFlushFormat.h:
(JSC::DFG::useKindFor):
(JSC::DFG::uncheckedUseKindFor):
(JSC::DFG::typeFilterFor):
* dfg/DFGGraph.cpp:
(JSC::DFG::printWhiteSpace):
(JSC::DFG::Graph::dumpCodeOrigin):
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::addSpeculationMode):
* dfg/DFGInsertionSet.cpp:
(JSC::DFG::InsertionSet::insertSlow):
(JSC::DFG::InsertionSet::execute):
* dfg/DFGLoopPreHeaderCreationPhase.cpp:
(JSC::DFG::LoopPreHeaderCreationPhase::run):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
(WTF::printInternal):
* dfg/DFGMayExit.h:
* dfg/DFGMovHintRemovalPhase.cpp:
* dfg/DFGNodeOrigin.cpp: Added.
(JSC::DFG::NodeOrigin::dump):
* dfg/DFGNodeOrigin.h:
(JSC::DFG::NodeOrigin::NodeOrigin):
(JSC::DFG::NodeOrigin::isSet):
(JSC::DFG::NodeOrigin::withSemantic):
(JSC::DFG::NodeOrigin::withExitOK):
(JSC::DFG::NodeOrigin::withInvalidExit):
(JSC::DFG::NodeOrigin::takeValidExit):
(JSC::DFG::NodeOrigin::forInsertingAfter):
(JSC::DFG::NodeOrigin::operator==):
(JSC::DFG::NodeOrigin::operator!=):
* dfg/DFGNodeType.h:
* dfg/DFGOSREntrypointCreationPhase.cpp:
(JSC::DFG::OSREntrypointCreationPhase::run):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::OSRExit):
(JSC::DFG::OSRExit::setPatchableCodeOffset):
* dfg/DFGOSRExitBase.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPhantomInsertionPhase.cpp:
* dfg/DFGPhase.cpp:
(JSC::DFG::Phase::validate):
(JSC::DFG::Phase::beginPhase):
(JSC::DFG::Phase::endPhase):
* dfg/DFGPhase.h:
(JSC::DFG::Phase::vm):
(JSC::DFG::Phase::codeBlock):
(JSC::DFG::Phase::profiledBlock):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::emitInvalidationPoint):
(JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileUpsilon):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):

Source/WTF:

* wtf/Insertion.h:
(WTF::executeInsertions): Add a useful assertion. This come into play because JSC will use UINT_MAX as "invalid index", and that ought to trigger this assertion.

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

5 years ago[JSC] StructureTransitionTable should eagerly deallocate single-transition WeakImpls.
akling@apple.com [Wed, 26 Aug 2015 19:21:19 +0000 (19:21 +0000)]
[JSC] StructureTransitionTable should eagerly deallocate single-transition WeakImpls.
<https://webkit.org/b/148478>

Reviewed by Geoffrey Garen.

Use a WeakHandleOwner to eagerly deallocate StructureTransitionTable's Weak pointers
when it's using the single-transition optimization and the Structure it transitioned
to has been GC'd.

This prevents Structures from keeping WeakBlocks alive longer than necessary when
they've been transitioned away from but are still in use themselves.

* runtime/Structure.cpp:
(JSC::singleSlotTransitionWeakOwner):
(JSC::StructureTransitionTable::singleTransition):
(JSC::StructureTransitionTable::setSingleTransition):
(JSC::StructureTransitionTable::add):
* runtime/StructureTransitionTable.h:
(JSC::StructureTransitionTable::singleTransition): Deleted.
(JSC::StructureTransitionTable::setSingleTransition): Deleted.

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

5 years ago[Curl] Deadlock when downloading.
peavo@outlook.com [Wed, 26 Aug 2015 19:01:44 +0000 (19:01 +0000)]
[Curl] Deadlock when downloading.
https://bugs.webkit.org/show_bug.cgi?id=148438

Reviewed by Alex Christensen.

A thread should not try locking when it already has got the lock,
this will create a deadlock.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::startThreadIfNeeded):
(WebCore::CurlDownloadManager::stopThread):
(WebCore::CurlDownloadManager::stopThreadIfIdle):
(WebCore::CurlDownload::~CurlDownload):
(WebCore::CurlDownload::moveFileToDestination):
(WebCore::CurlDownload::didFail):
* platform/network/curl/CurlDownload.h:
(WebCore::CurlDownloadManager::getMultiHandle):
(WebCore::CurlDownloadManager::runThread):
(WebCore::CurlDownloadManager::setRunThread):

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

5 years agoWeb Inspector: REGRESSION(r188965): BackendDispatcher loses request ids when called...
bburg@apple.com [Wed, 26 Aug 2015 18:53:36 +0000 (18:53 +0000)]
Web Inspector: REGRESSION(r188965): BackendDispatcher loses request ids when called re-entrantly
https://bugs.webkit.org/show_bug.cgi?id=148480

Reviewed by Joseph Pecoraro.

I added an assertion that m_currentRequestId is Nullopt when dispatch() is called, but this should
not hold if dispatching a backend command while debugger is paused. I will remove the assertion
and add proper scoping for all dispatch() branches.

No new tests, this wrong assert caused inspector/dom-debugger/node-removed.html to crash reliably.

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::dispatch): Cover each exit with an appropriate TemporaryChange scope.

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

5 years ago[Win] Build does not generate debug info.
peavo@outlook.com [Wed, 26 Aug 2015 18:50:06 +0000 (18:50 +0000)]
[Win] Build does not generate debug info.
https://bugs.webkit.org/show_bug.cgi?id=148431

Reviewed by Alex Christensen.

Generate debug info for Windows builds.

* Source/cmake/OptionsWin.cmake:

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

5 years ago[GTK] Disable ACCELERATED_2D_CANVAS by default
mcatanzaro@igalia.com [Wed, 26 Aug 2015 18:46:04 +0000 (18:46 +0000)]
[GTK] Disable ACCELERATED_2D_CANVAS by default
https://bugs.webkit.org/show_bug.cgi?id=148473

Reviewed by Martin Robinson.

Currently ACCELERATED_2D_CANVAS is enabled by default on most systems (which have CairoGL)
but not on Debian (which does not). We've known this was problematic for a while, since it
means we have two different sets of distro-dependent bugs, but never decided whether that
outweighed the benefits of CarioGL or not. I'm making the call now: it's more important to
have the same bugs everywhere. We can turn this on again for other distros when we're ready
to turn it on for Debian.

Also, properly fail the build if ENABLE_ACCELERATED_2D_CANVAS is enabled but CairoGL is not
available.

* Source/cmake/OptionsGTK.cmake:

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

5 years agoRemove the unused *Executable::unlinkCalls() and CodeBlock::unlinkCalls()
commit-queue@webkit.org [Wed, 26 Aug 2015 18:34:38 +0000 (18:34 +0000)]
Remove the unused *Executable::unlinkCalls() and CodeBlock::unlinkCalls()
https://bugs.webkit.org/show_bug.cgi?id=148469

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-08-26
Reviewed by Geoffrey Garen.

We use CodeBlock::unlinkIncomingCalls() to unlink calls.
(...)Executable::unlinkCalls() and CodeBlock::unlinkCalls() are no longer used.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::unlinkCalls): Deleted.
* bytecode/CodeBlock.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::unlinkCalls): Deleted.
(JSC::ProgramExecutable::unlinkCalls): Deleted.
(JSC::FunctionExecutable::unlinkCalls): Deleted.
* runtime/Executable.h:
(JSC::ScriptExecutable::unlinkCalls): Deleted.

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

5 years agoLayout Test platform/mac/fast/events/content-inset-hit-testing-in-frame.html is flaky
timothy_horton@apple.com [Wed, 26 Aug 2015 18:18:14 +0000 (18:18 +0000)]
Layout Test platform/mac/fast/events/content-inset-hit-testing-in-frame.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148409

Reviewed by Beth Dakin.

* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView setContentInsets:]):
Explicitly force our NSScrollView to lay out after updating
content insets. We depend on this happening synchronously (specifically,
we need our frame/bounds change callbacks to fire), because the layout
which will happen subsequently needs up-to-date information in order to
correctly a) enable scrollbars and then b) update the scroll position.

* platform/mac/fast/events/resources/iframe-to-hit-test.html:
Adjust the test so that it logs something useful if it fails
instead of complaining about not being run in WKTR/DRT.

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

5 years ago[Win] Simplify menu handling code in WinLauncher
bfulgham@apple.com [Wed, 26 Aug 2015 17:33:49 +0000 (17:33 +0000)]
[Win] Simplify menu handling code in WinLauncher
https://bugs.webkit.org/show_bug.cgi?id=148461

Reviewed by Zalan Bujtas.

Revise 'ToggleMenuItem' to return a boolean value indicating if
it handled the message. Revise WndProc to use this to decide if it
should pass the message on to the default handler, rather than
duplicating the logic in both places.

* WinLauncher/Common.cpp:
(ToggleMenuItem): Return true if the menu item message was handled.
(WndProc): If 'ToggleMenuItem' did not handle the message, pass
the message tothe default handler.

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

5 years ago[Cairo] Accelerated canvas should fall back to non-accelerated canvas on creation...
commit-queue@webkit.org [Wed, 26 Aug 2015 16:44:43 +0000 (16:44 +0000)]
[Cairo] Accelerated canvas should fall back to non-accelerated canvas on creation failure
https://bugs.webkit.org/show_bug.cgi?id=148476

Patch by Jinyoung Hur <hur.ims@navercorp.com> on 2015-08-26
Reviewed by Brent Fulgham.

Cairo-gl backed surface might fail to be created with large dimensions, e.g., 50x32000, depending on
the gl implementations. In case of Mac port, ImageBufferCG falls back to a software surface when it fails to create
IOSurface, an accelerated surface. Though the unaccelerated surface could be slower, it would be better
to create a working surface than nothing.

Because the max dimensions of gl texture might vary among the OpenGL implementations, below test can't guarantee
the verification of behavior difference depending on the running platform.

Test: fast/canvas/canvas-large-dimensions.html

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer):

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

5 years agoWeb Inspector: Command-Enter should evaluate selected JS in Debugger/Sources
nvasilyev@apple.com [Wed, 26 Aug 2015 16:06:21 +0000 (16:06 +0000)]
Web Inspector: Command-Enter should evaluate selected JS in Debugger/Sources
https://bugs.webkit.org/show_bug.cgi?id=148368

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Evaluate selected text in the console only for JS and HTML resources. HTML resources
should be allowed because they can have commented out (inside <!-- -->) and
inline (onclick="") JavaScript.

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

5 years agoUnreviewed, rolling out r188960.
commit-queue@webkit.org [Wed, 26 Aug 2015 15:53:00 +0000 (15:53 +0000)]
Unreviewed, rolling out r188960.
https://bugs.webkit.org/show_bug.cgi?id=148479

Broke all the tests (Requested by ap on #webkit).

Reverted changeset:

"Add some new emoji with modifiers and new sequence."
https://bugs.webkit.org/show_bug.cgi?id=148202
http://trac.webkit.org/changeset/188960

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

5 years agoWeb Inspector: no need to allocate protocolErrors array for every dispatched backend...
bburg@apple.com [Wed, 26 Aug 2015 14:34:38 +0000 (14:34 +0000)]
Web Inspector: no need to allocate protocolErrors array for every dispatched backend command
https://bugs.webkit.org/show_bug.cgi?id=146466

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Clean up some of the backend dispatcher code, with a focus on eliminating useless allocations
of objects in the common case when no protocol errors happen. This is done by saving the
current id of each request as it is being processed by the backend dispatcher, and tagging any
subsequent errors with that id. This also means we don't have to thread the requestId except
in the async command code path.

This patch also lifts some common code shared between all generated backend command
implementatations into the per-domain dispatch method instead. This reduces generated code size.

To be consistent, this patch standardizes on calling the id of a backend message its 'requestId'.
Requests can be handled synchronously or asynchronously (triggered via the 'async' property).

No new tests, covered by existing protocol tests.

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::CallbackBase::CallbackBase): Split the two code paths for reporting
success and failure.

(Inspector::BackendDispatcher::CallbackBase::sendFailure):
(Inspector::BackendDispatcher::CallbackBase::sendSuccess): Renamed from sendIfActive.
(Inspector::BackendDispatcher::dispatch): Reset counters and current requestId before dispatching.
No need to manually thread the requestId to all reportProtocolError calls.

(Inspector::BackendDispatcher::hasProtocolErrors): Added.
(Inspector::BackendDispatcher::sendResponse):
(Inspector::BackendDispatcher::sendPendingErrors): Send any saved protocol errors to the frontend.
Always send a 'data' member with all of the errors, even if there's just one. We might want to add
more information about errors later.

(Inspector::BackendDispatcher::reportProtocolError): Enqueue a protocol error to be sent later.
(Inspector::BackendDispatcher::getPropertyValue): Remove useless type parameters and nuke most of
the type conversion methods. Use std::function types instead of function pointer types.

(Inspector::castToInteger): Added.
(Inspector::castToNumber): Added.
(Inspector::BackendDispatcher::getInteger):
(Inspector::BackendDispatcher::getDouble):
(Inspector::BackendDispatcher::getString):
(Inspector::BackendDispatcher::getBoolean):
(Inspector::BackendDispatcher::getObject):
(Inspector::BackendDispatcher::getArray):
(Inspector::BackendDispatcher::getValue):
(Inspector::getPropertyValue): Deleted.
(Inspector::AsMethodBridges::asInteger): Deleted.
(Inspector::AsMethodBridges::asDouble): Deleted.
(Inspector::AsMethodBridges::asString): Deleted.
(Inspector::AsMethodBridges::asBoolean): Deleted.
(Inspector::AsMethodBridges::asObject): Deleted.
(Inspector::AsMethodBridges::asArray): Deleted.
(Inspector::AsMethodBridges::asValue): Deleted.
* inspector/InspectorBackendDispatcher.h:
* inspector/scripts/codegen/cpp_generator_templates.py: Extract 'params' object in domain dispatch method.
Omit requestIds where possible. Convert dispatch tables to use NeverDestroyed. Check the protocol error count
to decide whether to abort the dispatch or not, rather than allocating our own errors array.

* inspector/scripts/codegen/cpp_generator_templates.py:
(void):
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py: Revert to passing RefPtr<InspectorObject>
since parameters are now being passed rather than the message object. Some commands do not require parameters.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator.generate_output):
(CppBackendDispatcherImplementationGenerator._generate_small_dispatcher_switch_implementation_for_domain):
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
* inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py:
(ObjCBackendDispatcherHeaderGenerator._generate_objc_handler_declaration_for_command):
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
(ObjCConfigurationImplementationGenerator._generate_handler_implementation_for_command):
(ObjCConfigurationImplementationGenerator._generate_success_block_for_command):
* inspector/scripts/codegen/objc_generator_templates.py:

Rebaseline some protocol generator tests.
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

Source/WebInspectorUI:

* UserInterface/TestStub.html: Fix a typo, this property exists on ProtocolTest.

LayoutTests:

* inspector/protocol/backend-dispatcher-argument-errors-expected.txt:
* inspector/protocol/backend-dispatcher-argument-errors.html:
Stringify the 'data' member before dumping, since it now contains JSON. Rebaseline it.

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

5 years agoWeb Inspector: Rendering Frames legend item checkbox colors are too light
mattbaker@apple.com [Wed, 26 Aug 2015 10:24:30 +0000 (10:24 +0000)]
Web Inspector: Rendering Frames legend item checkbox colors are too light
https://bugs.webkit.org/show_bug.cgi?id=148465

Reviewed by Timothy Hatcher.

* UserInterface/Views/ChartDetailsSectionRow.js:
(WebInspector.ChartDetailsSectionRow.prototype._addCheckboxColorFilter):
Gamma primitive should use an "exponent" attribute instead of "value".
Increased gamma exponent to 1.4.

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

5 years agoWeb Inspector: Make DOM node attribute changes highlighting less obnoxious
nvasilyev@apple.com [Wed, 26 Aug 2015 10:22:22 +0000 (10:22 +0000)]
Web Inspector: Make DOM node attribute changes highlighting less obnoxious
https://bugs.webkit.org/show_bug.cgi?id=148050

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeOutline.css:
(@keyframes node-state-changed): Change color to a light green.
(.node-state-changed): Add a slight ease-in for the animation function.

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

5 years agoWeb Inspector: Add Refresh button to Cookie Content View
commit-queue@webkit.org [Wed, 26 Aug 2015 10:18:46 +0000 (10:18 +0000)]
Web Inspector: Add Refresh button to Cookie Content View
https://bugs.webkit.org/show_bug.cgi?id=148468

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

* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView):
(WebInspector.CookieStorageContentView.prototype.get navigationItems):
(WebInspector.CookieStorageContentView.prototype._refreshButtonClicked):

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

5 years ago[GStreamer] "method" property for the webkitwebsrc element
philn@webkit.org [Wed, 26 Aug 2015 09:51:11 +0000 (09:51 +0000)]
[GStreamer] "method" property for the webkitwebsrc element
https://bugs.webkit.org/show_bug.cgi?id=148433

Reviewed by Carlos Garcia Campos.

This new property is sometimes used by the GStreamer uridownloader
when time synchronization is required for DASH. The same property
was added to the souphttpsrc element.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStart):

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

5 years agoAdd some new emoji with modifiers and new sequence.
enrica@apple.com [Wed, 26 Aug 2015 09:26:14 +0000 (09:26 +0000)]
Add some new emoji with modifiers and new sequence.
https://bugs.webkit.org/show_bug.cgi?id=148202
rdar://problem/21849857

Reviewed by Sam Weinig.

Source/WebCore:

Adding support for some new emoji with modifiers and
one new emoji sequence.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):
* platform/text/CharacterProperties.h:
(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiModifier):
* platform/text/TextBreakIterator.cpp:
(WebCore::cursorMovementIterator):

LayoutTests:

Updated test to reflect the changes.

* editing/deleting/delete-emoji-expected.txt:
* editing/deleting/delete-emoji.html:

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

5 years agoRemove unused code after r188948
ossy@webkit.org [Wed, 26 Aug 2015 08:38:24 +0000 (08:38 +0000)]
Remove unused code after r188948
https://bugs.webkit.org/show_bug.cgi?id=148467

Reviewed by Gyuyoung Kim.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::platformPreferences): Deleted.

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

5 years ago[EFL][GTK] REGRESSION(r188828): All performance tests and almost all layout tests...
gyuyoung.kim@webkit.org [Wed, 26 Aug 2015 07:03:24 +0000 (07:03 +0000)]
[EFL][GTK] REGRESSION(r188828): All performance tests and almost all layout tests crash
https://bugs.webkit.org/show_bug.cgi?id=148377

Reviewed by Carlos Garcia Campos.

EFL and GTK don't support TestController::platformPreferences() yet which was introduced by r188828.
It caused all crashes of layout test and performance test on EFL and GTK. So this patch implements
TestController::platformPreferences() using WKPageGroupGetPreferences() which was previous thing for
EFL and GTK at the moment.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::platformWillRunTest):
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::platformPreferences):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformPreferences):

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

5 years agoAX: Enable accessibility/aria-controls.html test for mac
commit-queue@webkit.org [Wed, 26 Aug 2015 06:49:45 +0000 (06:49 +0000)]
AX: Enable accessibility/aria-controls.html test for mac
https://bugs.webkit.org/show_bug.cgi?id=148458

Patch by Nan Wang <n_wang@apple.com> on 2015-08-25
Reviewed by Chris Fleizach.

Source/WebCore:

Re-enabled accessibility/aria-controls.html test for mac.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Implemented ariaControlsElementAtIndex(unsigned index).

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::ariaControlsElementAtIndex):
(AccessibilityUIElement::disclosedRowAtIndex):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):

LayoutTests:

* accessibility/aria-controls.html:
* platform/mac/TestExpectations:
* platform/mac/accessibility/aria-controls-expected.txt: Added.

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

5 years agoWeb Inspector: message dispatch metrics should use high-resolution timing data
bburg@apple.com [Wed, 26 Aug 2015 06:29:48 +0000 (06:29 +0000)]
Web Inspector: message dispatch metrics should use high-resolution timing data
https://bugs.webkit.org/show_bug.cgi?id=135467

Reviewed by Timothy Hatcher.

Use performance.now if it's available, otherwise fallback to Date.now().
Format timestamps with fixed decimal point, and sprinkle some ES6.

* UserInterface/Base/Utilities.js:
(timestamp): Added.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
(InspectorBackendClass.prototype._dispatchEvent):
* UserInterface/Protocol/MessageDispatcher.js:
(WebInspector.dispatchNextQueuedMessageFromBackend):
(WebInspector.dispatchMessageFromBackend): Be consistent about using `this`.

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

5 years agoRemove python tests for PassRefPtr
gyuyoung.kim@webkit.org [Wed, 26 Aug 2015 05:47:59 +0000 (05:47 +0000)]
Remove python tests for PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=148463

Reviewed by Andy Estes.

As we're removing uses of PassRefPtr, we need to remove all python tests for PassRefPtr as well.

* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(PassPtrTest): Deleted.
(PassPtrTest.assert_pass_ptr_check): Deleted.
(PassPtrTest.test_pass_ref_ptr_in_function): Deleted.
(PassPtrTest.test_pass_other_type_ptr_in_function): Deleted.
(PassPtrTest.test_pass_ref_ptr_return_value): Deleted.
(PassPtrTest.test_ref_ptr_parameter_value): Deleted.
(PassPtrTest.test_ref_ptr_member_variable): Deleted.
(PassPtrTest.test_ref_ptr_member_variable.Foo): Deleted.

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

5 years agoMore test gardening of css3/line-break-language-sensitive.
mmaxfield@apple.com [Wed, 26 Aug 2015 05:17:34 +0000 (05:17 +0000)]
More test gardening of css3/line-break-language-sensitive.

Unreviewed.

* css3/line-break-language-sensitive/line-break-auto-hyphens-expected.html:
* css3/line-break-language-sensitive/line-break-auto-hyphens.html:
* css3/line-break-language-sensitive/line-break-auto-sound-marks-expected.html:
* css3/line-break-language-sensitive/line-break-auto-sound-marks.html:

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