WebKit-https.git
5 years agoMarking webgl/1.0.2/conformance/extensions/get-extension.html as flaky on mac-wk1
ryanhaddad@apple.com [Tue, 22 Dec 2015 18:15:02 +0000 (18:15 +0000)]
Marking webgl/1.0.2/conformance/extensions/get-extension.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152506

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

5 years ago[WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after...
cfleizach@apple.com [Tue, 22 Dec 2015 17:38:00 +0000 (17:38 +0000)]
[WK2] Looping in testcase: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
https://bugs.webkit.org/show_bug.cgi?id=152482

Reviewed by Brent Fulgham.

Tools:

vertical/horizontalScrollbar returns an accessibility element. That element can also be queried
for the same property. On WK2, the element returned will not be valid, but is still present and
that can lead to looping.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::horizontalScrollbar):
(AccessibilityUIElement::verticalScrollbar):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

5 years agoSnippefy op_negate for the baseline JIT.
mark.lam@apple.com [Tue, 22 Dec 2015 16:20:48 +0000 (16:20 +0000)]
Snippefy op_negate for the baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=152447

Reviewed by Benjamin Poulain.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emitBitBinaryOpFastPath):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_op_negate): Deleted.
(JSC::JIT::emitSlow_op_negate): Deleted.
* jit/JITNegGenerator.cpp: Added.
(JSC::JITNegGenerator::generateFastPath):
* jit/JITNegGenerator.h: Added.
(JSC::JITNegGenerator::JITNegGenerator):
(JSC::JITNegGenerator::didEmitFastPath):
(JSC::JITNegGenerator::endJumpList):
(JSC::JITNegGenerator::slowPathJumpList):

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

5 years ago[GTK] Everything broken in GTK+ 3.19
mcatanzaro@igalia.com [Tue, 22 Dec 2015 14:22:03 +0000 (14:22 +0000)]
[GTK] Everything broken in GTK+ 3.19
https://bugs.webkit.org/show_bug.cgi?id=150550

Reviewed by Carlos Garcia Campos.

Port RenderThemeGtk and ScrollbarThemeGtk to use CSS nodes. This makes it possible to render
stuff with modern GTK+.

No new tests. We already have tons of tests for this functionality, but we're running them
with GTK+ 3.16, so they cannot have detected this breakage. These fixes require unreleased
GTK+, and GTK+ rendering is currently in a state of flux; once things settle down, we can
consider upgrading the GTK+ used for our layout tests.

* platform/gtk/GRefPtrGtk.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* platform/gtk/GRefPtrGtk.h:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::orientationStyleClass):
(WebCore::applyScrollbarStyleContextClasses):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paintButton):
* rendering/RenderThemeGtk.cpp:
(WebCore::createStyleContext):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::applySliderStyleContextClasses):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::paintSpinArrowButton):
(WebCore::styleColor):

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

5 years agoUnreviewed.
calvaris@igalia.com [Tue, 22 Dec 2015 09:16:24 +0000 (09:16 +0000)]
Unreviewed.

* Scripts/webkitpy/common/config/contributors.json: Marking myself as reviewer.

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

5 years agoWebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithT...
nvasilyev@apple.com [Tue, 22 Dec 2015 06:07:23 +0000 (06:07 +0000)]
WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
https://bugs.webkit.org/show_bug.cgi?id=152471

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector._updateNewTabButtonState):
Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"

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

5 years ago[EFL] test_ewk2_context failed after r192808
hs85.jeong@samsung.com [Tue, 22 Dec 2015 05:50:58 +0000 (05:50 +0000)]
[EFL] test_ewk2_context failed after r192808
https://bugs.webkit.org/show_bug.cgi?id=151846

Reviewed by Gyuyoung Kim.

Source/WebKit2:

As we can make the single WebProcess behavior by setting the miximum number
of WebProcess to 1 after r192808, I remove the ewk_context_process_model_{set|get}
apis and add the ewk_context_web_process_count_limit_{set|get} apis and tests.

* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::setProcessCountLimit):
(EwkContext::processCountLimit):
(ewk_context_web_process_count_limit_set):
(ewk_context_web_process_count_limit_get):
(EwkContext::setProcessModel): Deleted.
(EwkContext::processModel): Deleted.
(ewk_context_process_model_set): Deleted.
(ewk_context_process_model_get): Deleted.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F): Changed the ewk_context_{web|network}_process_model tests to
ewk_context_{web|network}_process_count_limit tests.

Tools:

Used the added ewk_context_web_process_count_limit_set api
instead of the deprecated ewk_context_process_model_set.

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

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

5 years ago[WK2][EFL] Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSys...
jh718.park@samsung.com [Tue, 22 Dec 2015 03:37:07 +0000 (03:37 +0000)]
[WK2][EFL] Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
to refactor APIWebsiteDataStoreEfl
https://bugs.webkit.org/show_bug.cgi?id=152475

Reviewed by Gyuyoung Kim.

Use cacheDirectoryFileSystemRepresentation and websiteDataDirectoryFileSystemRepresentation
instead of to use efreet_cache_home_get
and efreet_data_home_get directly.
And also use EINA_PATH_SEP_S instead of "/" as directory separator,
and WebCore::pathByAppendingComponent instead of operator+.

* UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):

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

5 years agoUnreviewed, move myself to reviewer list.
mcatanzaro@igalia.com [Tue, 22 Dec 2015 02:45:39 +0000 (02:45 +0000)]
Unreviewed, move myself to reviewer list.

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

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

5 years agoWeb Inspector: Remove unused WebInspector.Object.removeAllListeners
nvasilyev@apple.com [Tue, 22 Dec 2015 01:42:08 +0000 (01:42 +0000)]
Web Inspector: Remove unused WebInspector.Object.removeAllListeners
https://bugs.webkit.org/show_bug.cgi?id=152474

Reviewed by Timothy Hatcher.

* UserInterface/Base/Object.js:
(WebInspector.Object.removeAllListeners): Deleted.
(WebInspector.Object.prototype.removeAllListeners): Deleted.

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

5 years agoAddress review feedback from Saam. I should have landed it in r194354.
fpizlo@apple.com [Mon, 21 Dec 2015 23:49:43 +0000 (23:49 +0000)]
Address review feedback from Saam.  I should have landed it in r194354.

* b3/testb3.cpp:
(JSC::B3::testStore16Arg):

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

5 years agoB3 should be able to compile Store16
fpizlo@apple.com [Mon, 21 Dec 2015 23:40:36 +0000 (23:40 +0000)]
B3 should be able to compile Store16
https://bugs.webkit.org/show_bug.cgi?id=152493

Reviewed by Saam Barati.

This adds comprehensive Store16 support to our assembler, Air, and B3->Air lowering.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::store16):
* assembler/X86Assembler.h:
(JSC::X86Assembler::movb_rm):
(JSC::X86Assembler::movw_rm):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testStorePartial8BitRegisterOnX86):
(JSC::B3::testStore16Arg):
(JSC::B3::testStore16Imm):
(JSC::B3::testTrunc):
(JSC::B3::run):

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

5 years agoUnreviewed, remove highBitsAreZero(), it's unused.
fpizlo@apple.com [Mon, 21 Dec 2015 23:32:57 +0000 (23:32 +0000)]
Unreviewed, remove highBitsAreZero(), it's unused.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::highBitsAreZero): Deleted.

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

5 years agoSkipping unsupported test on ios-simulator
ryanhaddad@apple.com [Mon, 21 Dec 2015 23:05:28 +0000 (23:05 +0000)]
Skipping unsupported test on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152491

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

5 years agoMarking inspector/debugger/break-on-exception-catch.html as a flaky timeout on mac...
ryanhaddad@apple.com [Mon, 21 Dec 2015 22:39:15 +0000 (22:39 +0000)]
Marking inspector/debugger/break-on-exception-catch.html as a flaky timeout on mac-wk2 debug
https://bugs.webkit.org/show_bug.cgi?id=152492

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 years agoUnreviewed, fix the !FTL_USES_B3 build after r194334.
ossy@webkit.org [Mon, 21 Dec 2015 21:19:58 +0000 (21:19 +0000)]
Unreviewed, fix the !FTL_USES_B3 build after r194334.

* ftl/FTLLowerDFGToLLVM.cpp: Mark forwarding unused variable.
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):

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

5 years agoUnreviewed, add myself to the committers list.
aakash_jain@apple.com [Mon, 21 Dec 2015 21:14:06 +0000 (21:14 +0000)]
Unreviewed, add myself to the committers list.

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

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

5 years agoFTL B3 should do doubleToInt32
fpizlo@apple.com [Mon, 21 Dec 2015 20:54:51 +0000 (20:54 +0000)]
FTL B3 should do doubleToInt32
https://bugs.webkit.org/show_bug.cgi?id=152484

Reviewed by Saam Barati.

We used to have a DToI32 opcode in B3 that we never implemented. This removes that opcode,
since double-to-int conversion has dramatically different semantics on different
architectures. We let FTL get the conversion instruction it wants by using a patchpoint.

* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize):
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::Output):
(JSC::FTL::Output::appendTo):
(JSC::FTL::Output::lockedStackSlot):
(JSC::FTL::Output::load):
(JSC::FTL::Output::doublePowi):
(JSC::FTL::Output::hasSensibleDoubleToInt):
(JSC::FTL::Output::doubleToInt):
(JSC::FTL::Output::doubleToUInt):
(JSC::FTL::Output::load8SignExt32):
(JSC::FTL::Output::load8ZeroExt32):
(JSC::FTL::Output::load16SignExt32):
(JSC::FTL::Output::load16ZeroExt32):
(JSC::FTL::Output::store):
(JSC::FTL::Output::store32As8):
(JSC::FTL::Output::store32As16):
(JSC::FTL::Output::branch):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::doubleLog):
(JSC::FTL::Output::signExt32To64):
(JSC::FTL::Output::zeroExt):
(JSC::FTL::Output::zeroExtPtr):
(JSC::FTL::Output::intToDouble):
(JSC::FTL::Output::unsignedToDouble):
(JSC::FTL::Output::castToInt32):
(JSC::FTL::Output::hasSensibleDoubleToInt): Deleted.
(JSC::FTL::Output::sensibleDoubleToInt): Deleted.
(JSC::FTL::Output::fpToInt32): Deleted.
(JSC::FTL::Output::fpToUInt32): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithPow):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToLLVM::compileSwitch):
(JSC::FTL::DFG::LowerDFGToLLVM::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToLLVM::sensibleDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToLLVM::convertDoubleToInt32):
* ftl/FTLOutput.h:
(JSC::FTL::Output::hasSensibleDoubleToInt):
(JSC::FTL::Output::doubleToInt):
(JSC::FTL::Output::doubleToUInt):
(JSC::FTL::Output::signExt32To64):
(JSC::FTL::Output::zeroExt):

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

5 years agoUnexpected exception assigning to this._property inside arrow function
commit-queue@webkit.org [Mon, 21 Dec 2015 20:40:04 +0000 (20:40 +0000)]
Unexpected exception assigning to this._property inside arrow function
https://bugs.webkit.org/show_bug.cgi?id=152028

Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2015-12-21
Reviewed by Saam Barati.

Source/JavaScriptCore:

The issue appeared in case if in arrow function created base-level lexical envioronment, and in this case
|this| value was loaded from wrong scope. The problem was that loading of the |this| happened too early when
compiling bytecode because the bytecode generators's scope stack wasn't in sync with runtime scope stack.
To fix issue loading of |this| was moved after initializeDefaultParameterValuesAndSetupFunctionScopeStack
in BytecodeGenerator.cpp

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* tests/stress/arrowfunction-lexical-bind-this-2.js:

LayoutTests:

Added new test cases for arrow function, to force create lexical env in body of function.

* js/arrowfunction-lexical-bind-this-expected.txt:
* js/script-tests/arrowfunction-lexical-bind-this.js:

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

5 years agoMarking inspector/debugger/command-line-api-exception-nested-catch.html as a flaky...
ryanhaddad@apple.com [Mon, 21 Dec 2015 20:26:54 +0000 (20:26 +0000)]
Marking inspector/debugger/command-line-api-exception-nested-catch.html as a flaky timeout on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152487

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

5 years agoFactor NetworkResourceLoader code for storing a cache entry into a function
antti@apple.com [Mon, 21 Dec 2015 20:01:35 +0000 (20:01 +0000)]
Factor NetworkResourceLoader code for storing a cache entry into a function
https://bugs.webkit.org/show_bug.cgi?id=152467

Reviewed by Andreas Kling.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didFinishLoading):

    Having m_cacheEntryForValidation already implies canUseCache() so remove the test from this path.
    Move storing to the end of the function so we don't delay DidFinishResourceLoad message on it.

(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

    Factor to a function.
    Remove m_response.isHTTP() test as it is covered by NetworkCache::store().
    Remove !isPrivateSession test as it is covered by NetworkResourceLoader::canUseCache().

(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:

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

5 years agoLimit cached redirect chain length
antti@apple.com [Mon, 21 Dec 2015 19:54:46 +0000 (19:54 +0000)]
Limit cached redirect chain length
https://bugs.webkit.org/show_bug.cgi?id=152477

Reviewed by Andreas Kling.

Source/WebKit2:

Networking layer prevents cycles and limits the redirect chain length so creating cache cycles is difficult.
For robustness the network cache should still limit the maximum redirect chain length.

This patch adds a limit of five redirects both when storing and retrieving cache entries.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canUseCache):
(WebKit::NetworkResourceLoader::canUseCachedRedirect):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:

LayoutTests:

* http/tests/cache/disk-cache/redirect-chain-limits-expected.txt: Added.
* http/tests/cache/disk-cache/redirect-chain-limits.html: Added.
* http/tests/cache/disk-cache/resources/redirect-chain.phpl: Added.

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

5 years agoMarking webaudio/audiocontext-state-interrupted.html as a flaky crasher on mac-wk1
ryanhaddad@apple.com [Mon, 21 Dec 2015 19:49:45 +0000 (19:49 +0000)]
Marking webaudio/audiocontext-state-interrupted.html  as a flaky crasher on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152485

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

5 years agoSkipping fast/events/can-click-element-on-page-with-active-pseudo-class-and-search...
ryanhaddad@apple.com [Mon, 21 Dec 2015 19:20:22 +0000 (19:20 +0000)]
Skipping fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152449

Unreviewed teset gardening.

* platform/ios-simulator/TestExpectations:

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

5 years agoFTL B3 should do vararg calls
fpizlo@apple.com [Mon, 21 Dec 2015 18:56:54 +0000 (18:56 +0000)]
FTL B3 should do vararg calls
https://bugs.webkit.org/show_bug.cgi?id=152468

Reviewed by Benjamin Poulain.

This adds FTL->B3 lowering of all kinds of varargs calls - forwarding or not, tail or not,
and construct or not. Like all other such lowerings, all of the code is in one place in
FTLLower.

I removed code for varargs and exception spill slots from the B3 path, since it won't need
it. The plan is to rely on B3 doing the spilling for us by using some combination of early
clobber and late use.

This adds ValueRep::emitRestore(), a helpful method for emitting code to restore any ValueRep
into any 64-bit Reg (FPR or GPR).

I wrote new tests for vararg calls, because I wasn't sure which of the existing ones we can
run. These are short-running tests, so I'm not worried about bloating our test suite.

* b3/B3ValueRep.cpp:
(JSC::B3::ValueRep::dump):
(JSC::B3::ValueRep::emitRestore):
* b3/B3ValueRep.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
* ftl/FTLState.h:
* tests/stress/varargs-no-forward.js: Added.
* tests/stress/varargs-simple.js: Added.
* tests/stress/varargs-two-level.js: Added.

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

5 years agoAdd unary operator tests to compare JIT and LLINT results.
mark.lam@apple.com [Mon, 21 Dec 2015 18:40:10 +0000 (18:40 +0000)]
Add unary operator tests to compare JIT and LLINT results.
https://bugs.webkit.org/show_bug.cgi?id=152453

Reviewed by Benjamin Poulain.

Also fixed a few things in the binary-op-test.js.

* tests/stress/op_negate.js: Added.
(o1.valueOf):
* tests/stress/op_postdec.js: Added.
(o1.valueOf):
* tests/stress/op_postinc.js: Added.
(o1.valueOf):
* tests/stress/op_predec.js: Added.
(o1.valueOf):
* tests/stress/op_preinc.js: Added.
(o1.valueOf):
* tests/stress/resources/binary-op-test.js:
(stringifyIfNeeded):
(isIdentical):
(run):
* tests/stress/resources/unary-op-test.js: Added.
(stringifyIfNeeded):
(generateBinaryTests):
(isIdentical):
(runTest):
(run):

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

5 years agoUnreviewed, rolling out r194328.
ryanhaddad@apple.com [Mon, 21 Dec 2015 18:20:58 +0000 (18:20 +0000)]
Unreviewed, rolling out r194328.

This change appears to have caused failures in JSC tests

Reverted changeset:

"[INTL] Implement String.prototype.localeCompare in ECMA-402"
https://bugs.webkit.org/show_bug.cgi?id=147607
http://trac.webkit.org/changeset/194328

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

5 years agoB3->Air lowering incorrectly copy-propagates over ZExt32's
fpizlo@apple.com [Mon, 21 Dec 2015 16:16:01 +0000 (16:16 +0000)]
B3->Air lowering incorrectly copy-propagates over ZExt32's
https://bugs.webkit.org/show_bug.cgi?id=152365

Reviewed by Benjamin Poulain.

The instruction selector thinks that Value's that return Int32's are going to always be lowered
to instructions that zero-extend the destination. But this isn't actually true. If you have an
Add32 with a destination on the stack (i.e. spilled) then it only writes 4 bytes. Then, the
filler will load 8 bytes from the stack at the point of use. So, the use of the Add32 will see
garbage in the high bits.

The fact that the spiller chose to use 8 bytes for a Tmp that gets defined by an Add32 is a
pretty sad bug, but:

- It's entirely up to the spiller to decide how many bytes to use for a Tmp, since we do not
  ascribe a type to Tmps. We could ascribe types to Tmps, but then coalescing would become
  harder. Our goal is to fix the bug while still enabling coalescing in cases like "a[i]" where
  "i" is a 32-bit integer that is computed using operations that already do zero-extension.

- More broadly, it's strange that the instruction selector decides whether a Value will be
  lowered to something that zero-extends. That's too constraining, since the most optimal
  instruction selection might involve something that doesn't zero-extend in cases of spilling, so
  the zero-extension should only happen if it's actually needed. This means that we need to
  understand which Air instructions cause zero-extensions.

- If we know which Air instructions cause zero-extensions, then we don't need the instruction
  selector to copy-propagate ZExt32's. We have copy-propagation in Air thanks to the register
  allocator.

In fact, the register allocator is exactly where all of the pieces come together. It's there that
we want to know which operations zero-extend and which don't. It also wants to know how many bits
of a Tmp each instruction reads. Armed with that information, the register allocator can emit
more optimal spill code, use less stack space for spill slots, and coalesce Move32's. As a bonus,
on X86, it replaces Move's with Move32's whenever it can. On X86, Move32 is cheaper.

This fixes a crash bug in V8/encrypt. After fixing this, I only needed two minor fixes to get
V8/encrypt to run. We're about 10% behind LLVM on steady state throughput on this test. It
appears to be mostly due to excessive spilling caused by CCall slow paths. That's fixable: we
could make CCalls on slow paths use a variant of CCallSpecial that promises not to clobber any
registers, and then have it emit spill code around the call itself. LLVM probably gets this
optimization from its live range splitting.

I tried writing a regression test. The problem is that you need garbage on the stack for this to
work, and I didn't feel like writing a flaky test. It appears that running V8/encrypt will cover
this, so we do have coverage.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::isX86):
(JSC::isX86_64):
(JSC::optimizeForARMv7IDIVSupported):
(JSC::optimizeForX86):
(JSC::optimizeForX86_64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::highBitsAreZero):
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::forEachArg):
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
* b3/B3Value.h:
* b3/air/AirAllocateStack.cpp:
(JSC::B3::Air::allocateStack):
* b3/air/AirArg.cpp:
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::pointerWidth):
(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isDef):
(JSC::B3::Air::Arg::isZDef):
(JSC::B3::Air::Arg::widthForB3Type):
(JSC::B3::Air::Arg::conservativeWidth):
(JSC::B3::Air::Arg::minimumWidth):
(JSC::B3::Air::Arg::bytes):
(JSC::B3::Air::Arg::widthForBytes):
(JSC::B3::Air::Arg::Arg):
(JSC::B3::Air::Arg::forEachTmp):
* b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::forEachArg):
* b3/air/AirEliminateDeadCode.cpp:
(JSC::B3::Air::eliminateDeadCode):
* b3/air/AirFixPartialRegisterStalls.cpp:
(JSC::B3::Air::fixPartialRegisterStalls):
* b3/air/AirInst.cpp:
(JSC::B3::Air::Inst::hasArgEffects):
* b3/air/AirInst.h:
(JSC::B3::Air::Inst::forEachTmpFast):
(JSC::B3::Air::Inst::forEachTmp):
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::forEachTmpWithExtraClobberedRegs):
* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirLiveness.h:
(JSC::B3::Air::AbstractLiveness::AbstractLiveness):
(JSC::B3::Air::AbstractLiveness::LocalCalc::execute):
* b3/air/AirOpcode.opcodes:
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/air/AirTmpWidth.cpp: Added.
(JSC::B3::Air::TmpWidth::TmpWidth):
(JSC::B3::Air::TmpWidth::~TmpWidth):
* b3/air/AirTmpWidth.h: Added.
(JSC::B3::Air::TmpWidth::width):
(JSC::B3::Air::TmpWidth::defWidth):
(JSC::B3::Air::TmpWidth::useWidth):
(JSC::B3::Air::TmpWidth::Widths::Widths):
* b3/air/AirUseCounts.h:
(JSC::B3::Air::UseCounts::UseCounts):
* b3/air/opcode_generator.rb:
* b3/testb3.cpp:
(JSC::B3::testCheckMegaCombo):
(JSC::B3::testCheckTrickyMegaCombo):
(JSC::B3::testCheckTwoMegaCombos):
(JSC::B3::run):

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

5 years agoDifferent and incorrect flags are passed to sendSync when accessibility is enabled...
mitz@apple.com [Mon, 21 Dec 2015 15:16:58 +0000 (15:16 +0000)]
Different and incorrect flags are passed to sendSync when accessibility is enabled, SpinRunLoopWhileWaitingForReply
https://bugs.webkit.org/show_bug.cgi?id=126021

Reviewed by Darin Adler.

Get rid of SpinRunLoopWhileWaitingForReply because it’s not used anymore.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply): Removed the SpinRunLoopWhileWaitingForReply branch.

* Platform/IPC/Connection.h: Removed SpinRunLoopWhileWaitingForReply.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel): Don’t check
  WebPage::synchronousMessagesShouldSpinRunLoop() and don’t specify
  SpinRunLoopWhileWaitingForReply.
(WebKit::WebChromeClient::runJavaScriptAlert): Ditto.
(WebKit::WebChromeClient::runJavaScriptConfirm): Ditto.
(WebKit::WebChromeClient::runJavaScriptPrompt): Ditto.
(WebKit::WebChromeClient::print): Ditto.
(WebKit::WebChromeClient::exceededDatabaseQuota): Ditto.
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::synchronousMessagesShouldSpinRunLoop): Deleted.
* WebProcess/WebPage/WebPage.h:

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

5 years ago[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel...
calvaris@igalia.com [Mon, 21 Dec 2015 15:15:23 +0000 (15:15 +0000)]
[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.html has a flaky test
https://bugs.webkit.org/show_bug.cgi?id=152065

Reviewed by Youenn Fablet.

https://github.com/whatwg/streams/pull/414 and https://github.com/whatwg/streams/issues/413 was closed. Changes
I did on the spec were integrated so they were brought back to the imported tests in WebKit.

* web-platform-tests/streams-api/README.txt: Updated version.
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Expectations.
* web-platform-tests/streams-api/readable-streams/cancel.js: Changed to cancel test.

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

5 years ago[INTL] Implement String.prototype.localeCompare in ECMA-402
commit-queue@webkit.org [Mon, 21 Dec 2015 10:03:36 +0000 (10:03 +0000)]
[INTL] Implement String.prototype.localeCompare in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147607

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-12-21
Reviewed by Darin Adler.

Source/JavaScriptCore:

Add localeCompare in builtin JavaScript that delegates comparing to Intl.Collator.
Keep existing native implementation for use if INTL flag is disabled.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/StringPrototype.js: Added.
(localeCompare):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

LayoutTests:

* js/script-tests/string-localeCompare.js:
* js/script-tests/string-prototype-properties.js: Update error message.
* js/string-localeCompare-expected.txt:
* js/string-prototype-properties-expected.txt: Update error message.
* js/string-localeCompare.html:

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

5 years ago[GTK] jquery.min.js violates DFSG
mcatanzaro@igalia.com [Mon, 21 Dec 2015 09:04:40 +0000 (09:04 +0000)]
[GTK] jquery.min.js violates DFSG
https://bugs.webkit.org/show_bug.cgi?id=152428

Reviewed by Joseph Pecoraro.

Stop distributing Source/WebInspectorUI/Tools. It is not needed in tarballs. This brings us
into compliance with DFSG by removing a bundled, minified copy of jQuery from our tarball.

* gtk/manifest.txt.in:

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

5 years agoDon't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying...
commit-queue@webkit.org [Mon, 21 Dec 2015 04:23:09 +0000 (04:23 +0000)]
Don't allocate a NSImage and skip unneeded call to TIFFRepresentation when copying image to clipboard.
https://bugs.webkit.org/show_bug.cgi?id=152374

Patch by Jeremy Zerfas <WebKit@JeremyZerfas.com> on 2015-12-20
Reviewed by Darin Adler.

Source/WebCore:

When copying an image to the clipboard, don't bother allocating a
NSImage and skip the unneeded call to TIFFRepresentation since the data
from the previous getTIFFRepresentation call can be used instead. This
considerably reduces the amount of memory and CPU time used for large
images/animations.

Test: fast/images/image-copy-memory-usage.html

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::write):

LayoutTests:

Added test to make sure that when copying a 50 frame 500x500 animation
(50 MB uncompressed) to the clipboard, the additional memory usage is
kept to less than 200 MB.

* fast/images/image-copy-memory-usage-expected.txt: Added.
* fast/images/image-copy-memory-usage.html: Added.
* fast/images/resources/dot-moving-in-a-circle-animation.gif: Added.

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

5 years ago[WK2][EFL] Use WebsiteDataStore instead of WebDatabaseManager which has been deleted...
jh718.park@samsung.com [Mon, 21 Dec 2015 02:54:32 +0000 (02:54 +0000)]
[WK2][EFL] Use WebsiteDataStore instead of WebDatabaseManager which has been deleted in r194295
https://bugs.webkit.org/show_bug.cgi?id=152460

Reviewed by Gyuyoung Kim.

Use WebsiteDataStore to support EFL WebDatabase API and to fix build break.

* PlatformEfl.cmake:
* UIProcess/API/APIWebsiteDataStore.cpp:
* UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseManager::EwkDatabaseManager):
(EwkDatabaseManager::getDatabaseOrigins):
* UIProcess/API/efl/ewk_database_manager_private.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):

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

5 years agoReduce PassRefPtr uses in dom - 2
gyuyoung.kim@webkit.org [Mon, 21 Dec 2015 02:10:49 +0000 (02:10 +0000)]
Reduce PassRefPtr uses in dom - 2
https://bugs.webkit.org/show_bug.cgi?id=151936

Reviewed by Darin Adler.

Change PassRefPtr with RefPtr<Foo>&&, WTF::move(), Foo*, and Foo&.

* dom/ScopedEventQueue.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::registerCallback):
* dom/ScriptedAnimationController.h:
* dom/StaticNodeList.h:
* dom/Traversal.cpp:
(WebCore::NodeIteratorBase::NodeIteratorBase):
* dom/Traversal.h:
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::TreeWalker):
(WebCore::TreeWalker::setCurrentNode):
* dom/TreeWalker.h:
(WebCore::TreeWalker::create):
* dom/UserActionElementSet.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::create):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
(WebCore::WebKitNamedFlow::getContent):
* dom/WebKitNamedFlow.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEvent::initWheelEvent):
(WebCore::WheelEvent::initWebKitWheelEvent):
* dom/WheelEvent.h:

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

5 years ago[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
mcatanzaro@igalia.com [Mon, 21 Dec 2015 01:19:41 +0000 (01:19 +0000)]
[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
https://bugs.webkit.org/show_bug.cgi?id=145542

Reviewed by Darin Adler.

Source/WebCore:

Perform DNS prefetch only when no proxy is configured.

No new tests. Test this manually with Wireshark. Run the simple-proxy example program found
in libsoup's examples directory, set that as your system HTTP proxy, and see if DNS queries
show up in Wireshark when refreshing a page sent over HTTP. They should appear only when the
proxy is not configured.

* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
(WebCore::DNSResolveQueue::isUsingProxy):
* platform/network/DNSResolveQueue.h:
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::updateIsUsingProxy):
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
* platform/network/soup/DNSSoup.cpp:
(WebCore::didResolveProxy):
(WebCore::proxyResolvedForHttpUriCallback):
(WebCore::proxyResolvedForHttpsUriCallback):
(WebCore::DNSResolveQueue::updateIsUsingProxy):
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.

Source/WTF:

Specialize GUniquePtr<char*>, using g_strfreev.

* wtf/glib/GUniquePtr.h:

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

5 years agoRemove unused setToolbarHeight
mitz@apple.com [Sun, 20 Dec 2015 21:57:01 +0000 (21:57 +0000)]
Remove unused setToolbarHeight
https://bugs.webkit.org/show_bug.cgi?id=152466

Reviewed by Darin Adler.

Source/WebCore:

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setToolbarHeight): Deleted.
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight): Deleted.

Source/WebKit/ios:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::setToolbarHeight): Deleted.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm::
(WebInspectorFrontendClient::setToolbarHeight): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::setToolbarHeight): Deleted.
* WebCoreSupport/WebInspectorClient.h:

Source/WebKit2:

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::setToolbarHeight): Deleted.
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Deleted.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::setToolbarHeight): Deleted.
* WebProcess/WebPage/WebInspectorUI.h:

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

5 years agoGerman translation update
mcatanzaro@igalia.com [Sun, 20 Dec 2015 20:08:36 +0000 (20:08 +0000)]
German translation update
https://bugs.webkit.org/show_bug.cgi?id=152228

Unreviewed.

Patch by Bernd Homuth <dev@hmt.im> on 2015-12-20

* de.po:

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

5 years agoImplement compareDouble in B3/Air
fpizlo@apple.com [Sun, 20 Dec 2015 19:53:40 +0000 (19:53 +0000)]
Implement compareDouble in B3/Air
https://bugs.webkit.org/show_bug.cgi?id=150903

Reviewed by Benjamin Poulain.

A hole in our coverage is that we don't fuse a double comparison into a branch, then we will
crash in the instruction selector. Obviously, we *really* want to fuse double comparisons,
but we can't guarantee that this will always happen.

This also removes all uses of WTF::Dominators verification, since it's extremely slow even in
a release build. This speeds up testb3 with validateGraphAtEachPhase=true by an order of
magnitude.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::moveDoubleConditionallyFloat):
(JSC::MacroAssembler::compareDouble):
(JSC::MacroAssembler::compareFloat):
(JSC::MacroAssembler::lea):
* b3/B3Dominators.h:
(JSC::B3::Dominators::Dominators):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testCompare):
(JSC::B3::testEqualDouble):
(JSC::B3::simpleFunction):
(JSC::B3::run):
* dfg/DFGDominators.h:
(JSC::DFG::Dominators::Dominators):

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

5 years agoUnreviewed, rolling out r194033 and r194267.
commit-queue@webkit.org [Sun, 20 Dec 2015 10:27:02 +0000 (10:27 +0000)]
Unreviewed, rolling out r194033 and r194267.
https://bugs.webkit.org/show_bug.cgi?id=152465

Caused crashes on Mac WK1 bots (Requested by youenn on
#webkit).

Reverted changesets:

"[Streams API] Expose ReadableStream and relatives to Worker"
https://bugs.webkit.org/show_bug.cgi?id=152066
http://trac.webkit.org/changeset/194033

"[Streams API] imported/w3c/web-platform-tests/streams-api
/readable-streams/cancel.html has a flaky test"
https://bugs.webkit.org/show_bug.cgi?id=152065
http://trac.webkit.org/changeset/194267

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

5 years ago[Mac] WebKit contains dead source code for OS X Mavericks and earlier
mitz@apple.com [Sun, 20 Dec 2015 06:27:04 +0000 (06:27 +0000)]
[Mac] WebKit contains dead source code for OS X Mavericks and earlier
https://bugs.webkit.org/show_bug.cgi?id=152462

Reviewed by Alexey Proskuryakov.

Source/bmalloc:

* Configurations/DebugRelease.xcconfig: Removed definition of MACOSX_DEPLOYMENT_TARGET for
  OS X 10.9.

Source/JavaScriptCore:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

* API/JSBase.h: Removed check against __MAC_OS_X_VERSION_MIN_REQUIRED that was always true.

Source/ThirdParty/ANGLE:

* Configurations/DebugRelease.xcconfig: Removed definitions of MACOSX_DEPLOYMENT_TARGET for
  OS X 10.8 and 10.9.

Source/WebCore:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

- Removed support for animating default buttons:

* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton): Removed m_default initialization.
(WebCore::RenderButton::styleDidChange): Removed checking for animating default button and
  starting the animation timer.
(WebCore::RenderButton::timerFired): Deleted.
* rendering/RenderButton.h: Removed m_timer and m_default member variables
* rendering/RenderTheme.h:
(WebCore::RenderTheme::defaultButtonHasAnimation): Deleted.
* rendering/RenderThemeMac.h: Deleted override.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::defaultButtonHasAnimation): Deleted.

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
* html/canvas/WebGLDrawBuffers.cpp:
* loader/DocumentLoader.cpp:
* loader/cache/CachedFont.cpp:
* loader/cocoa/DiskCacheMonitorCocoa.h:
* page/cocoa/SettingsCocoa.mm:
* platform/Scrollbar.cpp:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/graphics/cocoa/FontCascadeCocoa.mm:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/ThemeMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.h:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/ResourceRequest.h:
* platform/spi/cf/CFNetworkSPI.h:
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/cocoa/NSButtonCellSPI.h:
* platform/spi/cocoa/NSColorSPI.h:
* platform/spi/cocoa/QuartzCoreSPI.h:
* platform/spi/mac/LookupSPI.h:
* platform/spi/mac/NSFontSPI.h:
* platform/spi/mac/NSImmediateActionGestureRecognizerSPI.h:
* platform/spi/mac/NSPopoverSPI.h:
* platform/spi/mac/NSSharingServicePickerSPI.h:
* platform/spi/mac/NSSharingServiceSPI.h:
* platform/spi/mac/TUCallSPI.h:
* platform/sql/SQLiteDatabase.cpp:

Source/WebInspectorUI:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:

* Scripts/copy-user-interface-resources.pl: Removed code to delete Images/Legacy.

* UserInterface/Images/Legacy: Removed this empty directory.

Source/WebKit/mac:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKitLegacy.xcconfig:

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* WebCoreSupport/WebInspectorClient.mm:
* WebView/WebDynamicScrollBarsView.mm:
* WebView/WebHTMLView.mm:
* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
* WebView/WebView.mm:
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
* WebView/WebViewInternal.h:

Source/WebKit2:

- Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
  that became uniform across all OS X versions as a result:

* Configurations/BaseTarget.xcconfig:
* Configurations/BaseXPCService.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebKit.xcconfig:

- Removed the definition of BUNDLE_LOCALIZATION_KEY:

* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:

- Added CFBundleFollowParentLocalization set to true:

* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:

* WebKit2.xcodeproj/project.pbxproj: Removed the “Add CFBundle Localization Info.plist Key”
  script build phases from the Web Content Service targets.

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Platform/IPC/mac/ConnectionMac.mm:
* Platform/IPC/mac/ImportanceAssertion.h:
* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm:
* Platform/mac/StringUtilities.h:
* Platform/mac/StringUtilities.mm:
* Shared/API/Cocoa/WKFoundation.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
* UIProcess/mac/WebInspectorProxyMac.mm:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/com.apple.WebProcess.sb.in:
* config.h:

Source/WTF:

* Configurations/DebugRelease.xcconfig: Removed definition of MACOSX_DEPLOYMENT_TARGET for
  OS X 10.9.

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* wtf/FeatureDefines.h:
* wtf/MainThread.h:
* wtf/OSObjectPtr.h:
* wtf/Platform.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
* wtf/spi/darwin/XPCSPI.h:

Tools:

- Removed definitions of MACOSX_DEPLOYMENT_TARGET and WEBKIT_SYSTEM_INTERFACE_LIBRARY for
  OS X 10.9:

* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* LayoutTestRelay/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:

- Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was
  never getting compiled:

* DumpRenderTree/mac/TextInputController.m:
* MiniBrowser/mac/BrowserWindowController.m:
* TestWebKitAPI/Tests/mac/AttributedString.mm:
* WebKitTestRunner/mac/EventSenderProxy.mm:

WebKitLibraries:

* libWebKitSystemInterfaceMavericks.a: Removed.

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

5 years agoMake Intl headers private in Xcode
sukolsak@gmail.com [Sat, 19 Dec 2015 21:42:18 +0000 (21:42 +0000)]
Make Intl headers private in Xcode

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

5 years ago[JSC] Streamline Tmp indexing inside the register allocator
fpizlo@apple.com [Sat, 19 Dec 2015 21:04:55 +0000 (21:04 +0000)]
[JSC] Streamline Tmp indexing inside the register allocator
https://bugs.webkit.org/show_bug.cgi?id=152420

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-19
Reviewed by Filip Pizlo.

AirIteratedRegisterCoalescing has been accumulating a bit of mess over time.

When it started, every map addressed by Tmp was using Tmp hashing.
That caused massive performance problems. Everything perf sensitive was moved
to direct array addressing by the absolute Tmp index. This left the code
with half of the function using Tmp, the other half using indices.

With this patch, almost everything is moved to absolute indexing.
There are a few advantages to this:
-No more conversion churn for Floating Point registers.
-Most of the functions can now be shared between GP and FP.
-A bit of clean up since the core algorithm only deals with integers now.

This patch also changes the index type to be a template argument.
That will allow future specialization of "m_interferenceEdges" based
on the expected problem size.

Finally, the code related to the program modification (register assignment
and spilling) was moved to the wrapper "IteratedRegisterCoalescing".

The current split is:
-AbstractColoringAllocator: common core. Share as much as possible between
 GP and FP.
-ColoringAllocator: the remaining parts of the algorithm, everything that
 is specific to GP, FP.
-IteratedRegisterCoalescing: the "iterated" part of the algorithm.
 Try to allocate and modify the code as needed.

The long term plan is:
-Move selectSpill() and the coloring loop to AbstractColoringAllocator.
-Specialize m_interferenceEdges to make it faster.

* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirTmpInlines.h:
(JSC::B3::Air::AbsoluteTmpMapper<Arg::GP>::lastMachineRegisterIndex):
(JSC::B3::Air::AbsoluteTmpMapper<Arg::FP>::lastMachineRegisterIndex):

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

5 years ago[JSC] FTLB3Output generates some invalid ZExt32
commit-queue@webkit.org [Sat, 19 Dec 2015 19:01:50 +0000 (19:01 +0000)]
[JSC] FTLB3Output generates some invalid ZExt32
https://bugs.webkit.org/show_bug.cgi?id=151905

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-19
Reviewed by Filip Pizlo.

FTLLowerDFGToLLVM calls zeroExt() to int32 in some cases.
We were generating ZExt32 with Int32 as return type :(

* ftl/FTLB3Output.h:
(JSC::FTL::Output::zeroExt):

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

5 years ago[JSC] Add EqualOrUnordered to B3
commit-queue@webkit.org [Sat, 19 Dec 2015 16:52:11 +0000 (16:52 +0000)]
[JSC] Add EqualOrUnordered to B3
https://bugs.webkit.org/show_bug.cgi?id=152425

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-19
Reviewed by Mark Lam.

Add EqualOrUnordered to B3 and use it to implements
FTL::Output's NotEqualAndOrdered.

* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::equalOrUnordered):
* b3/B3ConstDoubleValue.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createGenericCompare):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3ReduceDoubleToFloat.cpp:
(JSC::B3::reduceDoubleToFloat):
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::equalOrUnordered):
(JSC::B3::Value::returnsBool):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/testb3.cpp:
(JSC::B3::testBranchEqualOrUnorderedArgs):
(JSC::B3::testBranchNotEqualAndOrderedArgs):
(JSC::B3::testBranchEqualOrUnorderedDoubleArgImm):
(JSC::B3::testBranchEqualOrUnorderedFloatArgImm):
(JSC::B3::testBranchEqualOrUnorderedDoubleImms):
(JSC::B3::testBranchEqualOrUnorderedFloatImms):
(JSC::B3::testBranchEqualOrUnorderedFloatWithUselessDoubleConversion):
(JSC::B3::run):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::doubleNotEqualAndOrdered):
(JSC::FTL::Output::doubleNotEqual): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::boolify):
* ftl/FTLOutput.h:
(JSC::FTL::Output::doubleNotEqualAndOrdered):
(JSC::FTL::Output::doubleNotEqual): Deleted.

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

5 years agoCache redirects as separate entries
antti@apple.com [Sat, 19 Dec 2015 13:26:38 +0000 (13:26 +0000)]
Cache redirects as separate entries
https://bugs.webkit.org/show_bug.cgi?id=152424

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/cache/disk-cache/disk-cache-redirect.html

* platform/network/ResourceRequestBase.h:

Source/WebKit2:

We are currently caching redirect chains. This has correctness issues and can be inefficient in cases
where multiple URLs redirect to the same destination.

After this patch we write a cache entry for each redirect individually.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::sharedWillSendRedirectedRequest):
* NetworkProcess/NetworkLoad.h:
(WebKit::NetworkLoad::currentRequest):
(WebKit::NetworkLoad::clearCurrentRequest):
* NetworkProcess/NetworkLoadClient.h:

    Add original request as a parameter for willSendRedirectedRequest.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::canUseCache):

    Factor to a function.

(WebKit::NetworkResourceLoader::isSynchronous):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):

    Factor to a function.
    Call dispatchWillSendRequestForCacheEntry for cached redirects.

(WebKit::NetworkResourceLoader::startNetworkLoad):

    Make this take request as argument instead of always loading originalRequest().

(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didFinishLoading):

    Remove redirect chain code.
    Store cache entry for current request instead of the original request.

(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):

    Write cache entry for redirect.

(WebKit::NetworkResourceLoader::continueWillSendRequest):

    If we are playing back cached redirect continue with another cache lookup.

(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

    No need to synthesize fake willSendRequest anymore.

(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):

    Route via web process willSendRequest so cached redirects looks exactly like network ones.

(WebKit::NetworkResourceLoader::messageSenderConnection):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeUseDecision):

    Ignore validation headers for cached redirects.

(WebKit::NetworkCache::makeRetrieveDecision):
(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::Cache::retrieve):
(WebKit::NetworkCache::Cache::store):

    Rename originalRequest -> request since it is not really the original request anymore in all cases.

(WebKit::NetworkCache::Cache::storeRedirect):

    Stored redirects include the network layer generated ResourceRequest instead of body data.

(WebKit::NetworkCache::Cache::update):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::Entry):

    New constructor for making redirect entries.

(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):

    Encoding support.

* NetworkProcess/cache/NetworkCacheEntry.h:
(WebKit::NetworkCache::Entry::varyingRequestHeaders):
(WebKit::NetworkCache::Entry::redirectRequest):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::~SpeculativeLoad):
(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::cachedEntryReuseFailureToDiagnosticKey):

LayoutTests:

* http/tests/cache/disk-cache/disk-cache-redirect-expected.txt: Added.
* http/tests/cache/disk-cache/disk-cache-redirect.html: Added.
* http/tests/cache/disk-cache/resources/generate-response.cgi:

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

5 years ago[JSC] B3: Add indexed addressing when lowering BitwiseCast
commit-queue@webkit.org [Sat, 19 Dec 2015 09:01:00 +0000 (09:01 +0000)]
[JSC] B3: Add indexed addressing when lowering BitwiseCast
https://bugs.webkit.org/show_bug.cgi?id=152432

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

The MacroAssembler supports it, we should use it.

* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testBitwiseCastOnDoubleInMemoryIndexed):
(JSC::B3::testBitwiseCastOnInt64InMemoryIndexed):

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

5 years agoWeb Inspector: Make it possible to debug injected scripts when the Debug UI is enabled
mattbaker@apple.com [Sat, 19 Dec 2015 06:44:50 +0000 (06:44 +0000)]
Web Inspector: Make it possible to debug injected scripts when the Debug UI is enabled
https://bugs.webkit.org/show_bug.cgi?id=152445

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
Added function to check for debug UI.

* UserInterface/Base/Object.js:
Added notification for debug UI enabled state change.

* UserInterface/Base/Utilities.js:
(isWebInspectorInternalScript):
(isWebInspectorDebugScript):
Added functions to check for internal and debug inspector scripts.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
Maintain a list of inspector debug scripts, so that the manager can
add and remove them when the debug UI is enabled/disabled.
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.reset):
Clear the list of inspector debug scripts.
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
Skip internal inspector scripts. Debug inspector scripts are tracked,
and an added event is dispatched if the debug UI is enabled.
(WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
Dispatch added/removed events for inspector debug scripts.

* UserInterface/Debug/Bootstrap.js:
(WebInspector.runBootstrapOperations):
Expose changes to the debug UI setting to the reset of the UI, by dispatching
a WebInspector.Notification.DebugUIEnabledDidChange event.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Only resolve inspector debug source locations when the debug UI is enabled.

* UserInterface/Test/Test.js:
Reimplemented debug UI check for tests. Always returns false.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addScript):
Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
(WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.

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

5 years agoMake JSString::SafeView less of a footgun.
akling@apple.com [Sat, 19 Dec 2015 02:32:46 +0000 (02:32 +0000)]
Make JSString::SafeView less of a footgun.
<https://webkit.org/b/152376>

Reviewed by Darin Adler.

Remove the "operator StringView()" convenience helper on JSString::SafeString since that
made it possible to casually turn the return value from JSString::view() into an unsafe
StringView local on the stack with this pattern:

    StringView view = someJSValue.toString(exec)->view(exec);

The JSString* returned by toString() above will go out of scope by the end of the statement
and does not stick around to protect itself from garbage collection.

It will now look like this instead:

    JSString::SafeView view = someJSValue.toString(exec)->view(exec);

To be extra clear, the following is not safe:

    StringView view = someJSValue.toString(exec)->view(exec).get();

By the end of that statement, the JSString::SafeView goes out of scope, and the JSString*
is no longer protected from GC.

I added a couple of forwarding helpers to the SafeView class, and if you need a StringView
object from it, you can call .get() just like before.

Finally I also removed the JSString::SafeView() constructor, since nobody was instantiating
empty SafeView objects anyway. This way we don't have to worry about null members.

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncJoin):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncJoin):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::decode):
(JSC::globalFuncParseInt):
(JSC::globalFuncParseFloat):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
* runtime/JSONObject.cpp:
(JSC::JSONProtoFuncParse):
* runtime/JSString.cpp:
(JSC::JSString::getPrimitiveNumber):
(JSC::JSString::toNumber):
* runtime/JSString.h:
(JSC::JSString::SafeView::is8Bit):
(JSC::JSString::SafeView::length):
(JSC::JSString::SafeView::characters8):
(JSC::JSString::SafeView::characters16):
(JSC::JSString::SafeView::operator[]):
(JSC::JSString::SafeView::SafeView):
(JSC::JSString::SafeView::get):
(JSC::JSString::SafeView::operator StringView): Deleted.
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncNormalize):

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

5 years agoTurn off "shrink-to-fit" viewport scaling in UIWebViews
simon.fraser@apple.com [Sat, 19 Dec 2015 01:40:24 +0000 (01:40 +0000)]
Turn off "shrink-to-fit" viewport scaling in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=152451
rdar://problem/23960882

Reviewed by Tim Horton.

Disable the "shrink to fit" behavior in UIWebViews. This disables it entirely,
even when the page has "shrink-to-fit=yes" in the viewport meta tag.

Not testable because we can't test actual UIWebView scaling behavior.

* WebCoreSupport/WebChromeClientIOS.mm:
(dictionaryForViewportArguments):

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

5 years ago[GTK] Mark fast/regions/overflow/overflow-region-float.html as passing
mcatanzaro@igalia.com [Sat, 19 Dec 2015 01:31:50 +0000 (01:31 +0000)]
[GTK] Mark fast/regions/overflow/overflow-region-float.html as passing

Unreviewed test gardening. This test has been passing since r191658.

* platform/gtk/TestExpectations:

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

5 years ago[WinCairo] Empty context menu item.
peavo@outlook.com [Sat, 19 Dec 2015 00:25:31 +0000 (00:25 +0000)]
[WinCairo] Empty context menu item.
https://bugs.webkit.org/show_bug.cgi?id=152423

Reviewed by Alex Christensen.

The context menu contains a submenu item with no text.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):

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

5 years agoBytecodeGenerator::pushLexicalScopeInternal and pushLexicalScope should use enums...
sbarati@apple.com [Sat, 19 Dec 2015 00:19:41 +0000 (00:19 +0000)]
BytecodeGenerator::pushLexicalScopeInternal and pushLexicalScope should use enums instead of bools
https://bugs.webkit.org/show_bug.cgi?id=152450

Reviewed by Geoffrey Garen and Joseph Pecoraro.

This makes comprehending the call sites of these functions
easier without looking up the header of the function.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::emitPrefillStackTDZVariables):
(JSC::BytecodeGenerator::pushLexicalScope):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::lastOpcodeID):
* bytecompiler/NodesCodegen.cpp:
(JSC::BlockNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):

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

5 years agoAvoid triggering clang's -Wundefined-bool-conversion
mcatanzaro@igalia.com [Sat, 19 Dec 2015 00:16:15 +0000 (00:16 +0000)]
Avoid triggering clang's -Wundefined-bool-conversion
https://bugs.webkit.org/show_bug.cgi?id=152408

Reviewed by Mark Lam.

Source/JavaScriptCore:

Add ASSERT_THIS_GC_OBJECT_LOOKS_VALID and ASSERT_THIS_GC_OBJECT_INHERITS to avoid use of
ASSERT(this) by ASSERT_GC_OBJECT_LOOKS_VALID and ASSERT_GC_OBJECT_INHERITS.

* heap/GCAssertions.h:

Source/WebCore:

Remove use of ASSERT(this).

* dom/TreeScope.cpp:
(WebCore::TreeScope::adoptIfNeeded):
* page/Frame.cpp:
(WebCore::Frame::createView):

Source/WebKit2:

Use ASSERT_THIS_GC_OBJECT_INHERITS where needed.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):
(WebKit::JSNPObject::callObject):
(WebKit::JSNPObject::callConstructor):
(WebKit::JSNPObject::deleteProperty):

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

5 years agoSkipping fast/scrolling/rtl-point-in-iframe.html on ios-simulator since it tests...
ryanhaddad@apple.com [Fri, 18 Dec 2015 23:56:23 +0000 (23:56 +0000)]
Skipping fast/scrolling/rtl-point-in-iframe.html on ios-simulator since it tests wheel events.
https://bugs.webkit.org/show_bug.cgi?id=152442

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

5 years agoRemove the 'ignoreViewportScalingConstraints' Setting, which was unused
simon.fraser@apple.com [Fri, 18 Dec 2015 23:55:30 +0000 (23:55 +0000)]
Remove the 'ignoreViewportScalingConstraints' Setting, which was unused
https://bugs.webkit.org/show_bug.cgi?id=152435

Reviewed by Tim Horton.

r177110 added a WebCore setting called ignoreViewportScalingConstraints,
but it was never used, so remove it.

* page/Settings.in:

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

5 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator
ryanhaddad@apple.com [Fri, 18 Dec 2015 23:06:00 +0000 (23:06 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152437

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

5 years agoGet rid of WebDatabaseManager, it's been replaced by WebsiteDataStore
andersca@apple.com [Fri, 18 Dec 2015 22:34:49 +0000 (22:34 +0000)]
Get rid of WebDatabaseManager, it's been replaced by WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=152318

Reviewed by Tim Horton.

Build fixes by Ossy.

* DerivedSources.make:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetDatabaseManager): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKDatabaseManager.cpp: Removed.
(WKDatabaseManagerGetTypeID): Deleted.
(WKDatabaseManagerGetOriginKey): Deleted.
(WKDatabaseManagerGetOriginQuotaKey): Deleted.
(WKDatabaseManagerGetOriginUsageKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsNameKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsCreationTimeKey): Deleted.
(WKDatabaseManagerGetDatabaseDetailsModificationTimeKey): Deleted.
(WKDatabaseManagerSetClient): Deleted.
(WKDatabaseManagerGetDatabasesByOrigin): Deleted.
(WKDatabaseManagerGetDatabaseOrigins): Deleted.
(WKDatabaseManagerDeleteDatabasesWithNameForOrigin): Deleted.
(WKDatabaseManagerDeleteDatabasesForOrigin): Deleted.
(WKDatabaseManagerDeleteAllDatabases): Deleted.
(WKDatabaseManagerSetQuotaForOrigin): Deleted.
* UIProcess/API/C/WKDatabaseManager.h: Removed.
* UIProcess/WebDatabaseManagerProxy.cpp: Removed.
(WebKit::WebDatabaseManagerProxy::supplementName): Deleted.
(WebKit::WebDatabaseManagerProxy::originKey): Deleted.
(WebKit::WebDatabaseManagerProxy::originQuotaKey): Deleted.
(WebKit::WebDatabaseManagerProxy::originUsageKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsNameKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsDisplayNameKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsCreationTimeKey): Deleted.
(WebKit::WebDatabaseManagerProxy::databaseDetailsModificationTimeKey): Deleted.
(WebKit::WebDatabaseManagerProxy::create): Deleted.
(WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy): Deleted.
(WebKit::WebDatabaseManagerProxy::~WebDatabaseManagerProxy): Deleted.
(WebKit::WebDatabaseManagerProxy::initializeClient): Deleted.
(WebKit::WebDatabaseManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebDatabaseManagerProxy::processDidClose): Deleted.
(WebKit::WebDatabaseManagerProxy::shouldTerminate): Deleted.
(WebKit::WebDatabaseManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebDatabaseManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin): Deleted.
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin): Deleted.
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins): Deleted.
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins): Deleted.
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin): Deleted.
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin): Deleted.
(WebKit::WebDatabaseManagerProxy::deleteAllDatabases): Deleted.
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin): Deleted.
(WebKit::WebDatabaseManagerProxy::didModifyOrigin): Deleted.
(WebKit::WebDatabaseManagerProxy::didModifyDatabase): Deleted.
* UIProcess/WebDatabaseManagerProxy.h: Removed.
* UIProcess/WebDatabaseManagerProxy.messages.in: Removed.
* UIProcess/WebDatabaseManagerProxyClient.cpp: Removed.
(WebKit::WebDatabaseManagerProxyClient::didModifyOrigin): Deleted.
(WebKit::WebDatabaseManagerProxyClient::didModifyDatabase): Deleted.
* UIProcess/WebDatabaseManagerProxyClient.h: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp: Removed.
(WebKit::WebDatabaseManager::supplementName): Deleted.
(WebKit::WebDatabaseManager::WebDatabaseManager): Deleted.
(WebKit::WebDatabaseManager::initialize): Deleted.
(WebKit::WebDatabaseManager::getDatabasesByOrigin): Deleted.
(WebKit::WebDatabaseManager::getDatabaseOrigins): Deleted.
(WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin): Deleted.
(WebKit::WebDatabaseManager::deleteDatabasesForOrigin): Deleted.
(WebKit::WebDatabaseManager::deleteAllDatabases): Deleted.
(WebKit::WebDatabaseManager::closeAllDatabases): Deleted.
(WebKit::WebDatabaseManager::setQuotaForOrigin): Deleted.
(WebKit::WebDatabaseManager::dispatchDidModifyOrigin): Deleted.
(WebKit::WebDatabaseManager::dispatchDidModifyDatabase): Deleted.
* WebProcess/WebCoreSupport/WebDatabaseManager.h: Removed.
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: Removed.
* WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm: Removed.
(WebKit::WebDatabaseManager::dispatchDidAddNewOrigin): Deleted.
(WebKit::WebDatabaseManager::dispatchDidDeleteDatabase): Deleted.
(WebKit::WebDatabaseManager::dispatchDidDeleteDatabaseOrigin): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processWillSuspendImminently):
(WebKit::m_webSQLiteDatabaseTracker): Deleted.

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

5 years agoReplace SpecialFastCase profiles with ResultProfiles.
mark.lam@apple.com [Fri, 18 Dec 2015 22:03:30 +0000 (22:03 +0000)]
Replace SpecialFastCase profiles with ResultProfiles.
https://bugs.webkit.org/show_bug.cgi?id=152433

Reviewed by Saam Barati.

This is in preparation for upcoming work to enhance the DFG predictions to deal
with untyped operands.

This patch also enhances some of the arithmetic slow paths (for the LLINT and
baseline JIT) to collect result profiling info.  This profiling info is not put
to use yet.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpRareCaseProfile):
(JSC::CodeBlock::dumpResultProfile):
(JSC::CodeBlock::printLocationAndOp):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::shrinkToFit):
(JSC::CodeBlock::dumpValueProfiles):
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset):
(JSC::CodeBlock::resultProfileForBytecodeOffset):
(JSC::CodeBlock::updateResultProfileForBytecodeOffset):
(JSC::CodeBlock::capabilityLevel):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::couldTakeSlowCase):
(JSC::CodeBlock::addResultProfile):
(JSC::CodeBlock::numberOfResultProfiles):
(JSC::CodeBlock::specialFastCaseProfileCountForBytecodeOffset):
(JSC::CodeBlock::couldTakeSpecialFastCase):
(JSC::CodeBlock::addSpecialFastCaseProfile): Deleted.
(JSC::CodeBlock::numberOfSpecialFastCaseProfiles): Deleted.
(JSC::CodeBlock::specialFastCaseProfile): Deleted.
(JSC::CodeBlock::specialFastCaseProfileForBytecodeOffset): Deleted.
* bytecode/ValueProfile.cpp: Added.
(WTF::printInternal):
* bytecode/ValueProfile.h:
(JSC::getRareCaseProfileBytecodeOffset):
(JSC::ResultProfile::ResultProfile):
(JSC::ResultProfile::bytecodeOffset):
(JSC::ResultProfile::specialFastPathCount):
(JSC::ResultProfile::didObserveNonInt32):
(JSC::ResultProfile::didObserveDouble):
(JSC::ResultProfile::didObserveNonNegZeroDouble):
(JSC::ResultProfile::didObserveNegZeroDouble):
(JSC::ResultProfile::didObserveNonNumber):
(JSC::ResultProfile::didObserveInt32Overflow):
(JSC::ResultProfile::setObservedNonNegZeroDouble):
(JSC::ResultProfile::setObservedNegZeroDouble):
(JSC::ResultProfile::setObservedNonNumber):
(JSC::ResultProfile::setObservedInt32Overflow):
(JSC::ResultProfile::addressOfFlags):
(JSC::ResultProfile::addressOfSpecialFastPathCount):
(JSC::ResultProfile::hasBits):
(JSC::ResultProfile::setBit):
(JSC::getResultProfileBytecodeOffset):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
* jit/JITDivGenerator.cpp:
(JSC::JITDivGenerator::generateFastPath):
* jit/JITDivGenerator.h:
(JSC::JITDivGenerator::JITDivGenerator):
* jit/JITMulGenerator.cpp:
(JSC::JITMulGenerator::generateFastPath):
* jit/JITMulGenerator.h:
(JSC::JITMulGenerator::JITMulGenerator):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):

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

5 years agoverboseDFGByteCodeParsing option should show the bytecode it is parsing.
keith_miller@apple.com [Fri, 18 Dec 2015 21:52:07 +0000 (21:52 +0000)]
verboseDFGByteCodeParsing option should show the bytecode it is parsing.
https://bugs.webkit.org/show_bug.cgi?id=152434

Reviewed by Michael Saboff.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

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

5 years agoPlace an upper bound on canvas pixel count
bfulgham@apple.com [Fri, 18 Dec 2015 21:28:54 +0000 (21:28 +0000)]
Place an upper bound on canvas pixel count
https://bugs.webkit.org/show_bug.cgi?id=151825
<rdar://problem/23324916>

Reviewed by Simon Fraser (Relanded by Brent Fulgham)

Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
we will use for this purpose to some percentage of system RAM.

* html/HTMLCanvasElement.cpp:
(WebCore::removeFromActivePixelMemory): Added helper function
(WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
to ensure ImageBuffer and graphics context state are properly cleaned up.
(WebCore::maxActivePixels): Use one quarter of the system RAM, or 2 GB (whichever is more) as
an upper bound on active pixel memory.
(WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
us to exceed the allowed active pixel count, fail.
(WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
(WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
to handle active pixel memory counts.
(WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
exceed our available pixel memory.

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

5 years ago[GTK] Unreviewed, update POTFILES.in after r194272
mcatanzaro@igalia.com [Fri, 18 Dec 2015 19:56:35 +0000 (19:56 +0000)]
[GTK] Unreviewed, update POTFILES.in after r194272

* POTFILES.in:

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

5 years ago[GTK] Unreviewed, fix GtkDoc after r193620
mcatanzaro@igalia.com [Fri, 18 Dec 2015 19:46:21 +0000 (19:46 +0000)]
[GTK] Unreviewed, fix GtkDoc after r193620

* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:

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

5 years agoFix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
commit-queue@webkit.org [Fri, 18 Dec 2015 19:37:54 +0000 (19:37 +0000)]
Fix the !ENABLE(VIDEO) build after r192953 for <picture> element introduction
https://bugs.webkit.org/show_bug.cgi?id=152431

Since r192953, HTMLSourceElement is built even if video is disabled,
since it is used by the picture element.

But build was broken with -no-video, since HTMLMediaElement usage
should be guarded by VIDEO guards, and its JS bindings were still
under a video conditional.

Patch by Olivier Blin <olivier.blin@softathome.com> on 2015-12-18
Reviewed by Alex Christensen.

No new tests, build fix only.

* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLSourceElement.idl:

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

5 years agoMarking inspector/console/messagesCleared.html as a flaky timeout on mac-wk2 debug
ryanhaddad@apple.com [Fri, 18 Dec 2015 19:11:34 +0000 (19:11 +0000)]
Marking inspector/console/messagesCleared.html as a flaky timeout on mac-wk2 debug
https://bugs.webkit.org/show_bug.cgi?id=152025

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 years agoUnreviewed, add WebKitGTK+ Bugzilla email to committers list
mcatanzaro@igalia.com [Fri, 18 Dec 2015 18:41:04 +0000 (18:41 +0000)]
Unreviewed, add WebKitGTK+ Bugzilla email to committers list

This is to make it easy to CC it on Bugzilla.

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

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

5 years agoModern IDB: Refactor when opening the backing store takes place.
beidson@apple.com [Fri, 18 Dec 2015 18:31:34 +0000 (18:31 +0000)]
Modern IDB: Refactor when opening the backing store takes place.
https://bugs.webkit.org/show_bug.cgi?id=152405

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
  from here to performCurrentOpenOperation.
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
  not open yet, kick off opening it here.
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

5 years agoWebPage::didCompleteUserMediaPermissionCheck and WebPage::didReceiveUserMediaPermissi...
mitz@apple.com [Fri, 18 Dec 2015 18:19:46 +0000 (18:19 +0000)]
WebPage::didCompleteUserMediaPermissionCheck and WebPage::didReceiveUserMediaPermissionDecision are exported
https://bugs.webkit.org/show_bug.cgi?id=152429

Reviewed by Tim Horton.

* WebProcess/WebPage/WebPage.h: Removed WK_EXPORT specifiers from these two declarations.

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

5 years agoPasteboard get messed up after running kill-old-processes
commit-queue@webkit.org [Fri, 18 Dec 2015 18:16:13 +0000 (18:16 +0000)]
Pasteboard get messed up after running kill-old-processes
https://bugs.webkit.org/show_bug.cgi?id=152426

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-12-18
Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/kill-old-processes:
(main): Do not kill pasteboard anymore.

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

5 years agoMove networking code from Shared to NetworkProcess
achristensen@apple.com [Fri, 18 Dec 2015 18:08:05 +0000 (18:08 +0000)]
Move networking code from Shared to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=152421

Reviewed by Antti Koivisto.

Since recently removing the non-NetworkProcess configurations, this code is no longer shared with the WebProcess.

* CMakeLists.txt:
* DerivedSources.make:
* NetworkProcess/CustomProtocols: Copied from Source/WebKit2/Shared/Network/CustomProtocols.
* NetworkProcess/Downloads: Copied from Source/WebKit2/Shared/Downloads.
* NetworkProcess/Downloads/Download.cpp: Copied from Source/WebKit2/Shared/Downloads/Download.cpp.
* NetworkProcess/Downloads/Download.h: Copied from Source/WebKit2/Shared/Downloads/Download.h.
* NetworkProcess/Downloads/DownloadID.h: Copied from Source/WebKit2/Shared/Downloads/DownloadID.h.
* NetworkProcess/Downloads/DownloadManager.cpp: Copied from Source/WebKit2/Shared/Downloads/DownloadManager.cpp.
* NetworkProcess/Downloads/DownloadManager.h: Copied from Source/WebKit2/Shared/Downloads/DownloadManager.h.
* NetworkProcess/NetworkProcessCreationParameters.cpp: Copied from Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp.
* NetworkProcess/NetworkProcessCreationParameters.h: Copied from Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h.
* NetworkProcess/NetworkProcessSupplement.h: Copied from Source/WebKit2/Shared/Network/NetworkProcessSupplement.h.
* NetworkProcess/NetworkResourceLoadParameters.cpp: Copied from Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp.
* NetworkProcess/NetworkResourceLoadParameters.h: Copied from Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* Shared/Downloads: Removed.
* Shared/Downloads/Download.cpp: Removed.
* Shared/Downloads/Download.h: Removed.
* Shared/Downloads/DownloadAuthenticationClient.cpp: Removed.
* Shared/Downloads/DownloadAuthenticationClient.h: Removed.
* Shared/Downloads/DownloadID.h: Removed.
* Shared/Downloads/DownloadManager.cpp: Removed.
* Shared/Downloads/DownloadManager.h: Removed.
* Shared/Downloads/cocoa: Removed.
* Shared/Downloads/cocoa/DownloadCocoa.mm: Removed.
* Shared/Downloads/efl: Removed.
* Shared/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
* Shared/Downloads/gtk: Removed.
* Shared/Downloads/gtk/DownloadSoupErrorsGtk.cpp: Removed.
* Shared/Downloads/ios: Removed.
* Shared/Downloads/ios/DownloadIOS.mm: Removed.
* Shared/Downloads/mac: Removed.
* Shared/Downloads/mac/DownloadMac.mm: Removed.
* Shared/Downloads/soup: Removed.
* Shared/Downloads/soup/DownloadSoup.cpp: Removed.
* Shared/Downloads/soup/DownloadSoupErrors.h: Removed.
* Shared/Network: Removed.
* Shared/Network/CustomProtocols: Removed.
* Shared/Network/CustomProtocols/Cocoa: Removed.
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: Removed.
* Shared/Network/CustomProtocols/CustomProtocolManager.h: Removed.
* Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Removed.
* Shared/Network/CustomProtocols/soup: Removed.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: Removed.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h: Removed.
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: Removed.
* Shared/Network/NetworkProcessCreationParameters.cpp: Removed.
* Shared/Network/NetworkProcessCreationParameters.h: Removed.
* Shared/Network/NetworkProcessSupplement.h: Removed.
* Shared/Network/NetworkResourceLoadParameters.cpp: Removed.
* Shared/Network/NetworkResourceLoadParameters.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago[GTK] Unreviewed gardening
mcatanzaro@igalia.com [Fri, 18 Dec 2015 16:34:03 +0000 (16:34 +0000)]
[GTK] Unreviewed gardening

css3/flexbox/multiline-reverse-wrap-baseline.html consistently passes for GTK since
r191623, but fails on Apple ports, so add a GTK-specific Pass expectation.

* platform/gtk/TestExpectations:

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

5 years ago[GTK] Unreviewed gardening
mcatanzaro@igalia.com [Fri, 18 Dec 2015 16:25:34 +0000 (16:25 +0000)]
[GTK] Unreviewed gardening
https://bugs.webkit.org/show_bug.cgi?id=142292

fast/images/animated-gif-body-outside-viewport.html and
fast/images/animated-gif-window-resizing.html are flaky; mark them
accordingly.

* platform/gtk/TestExpectations:

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

5 years ago[GTK] Unreviewed gardening
mcatanzaro@igalia.com [Fri, 18 Dec 2015 16:20:57 +0000 (16:20 +0000)]
[GTK] Unreviewed gardening

Remove failure expectation for fast/events/drag-and-drop-autoscroll-inner-frame.html which
has been consistently passing since r192511.

* platform/gtk/TestExpectations:

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

5 years agoLayerTreeHostGtk triggers -Wunused-private-field
mcatanzaro@igalia.com [Fri, 18 Dec 2015 15:57:49 +0000 (15:57 +0000)]
LayerTreeHostGtk triggers -Wunused-private-field
https://bugs.webkit.org/show_bug.cgi?id=152410

Reviewed by Carlos Garcia Campos.

Remove the unused member variable.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

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

5 years ago[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel...
calvaris@igalia.com [Fri, 18 Dec 2015 11:10:44 +0000 (11:10 +0000)]
[Streams API] imported/w3c/web-platform-tests/streams-api/readable-streams/cancel.html has a flaky test
https://bugs.webkit.org/show_bug.cgi?id=152065

Reviewed by Youenn Fablet.

https://github.com/whatwg/streams/pull/414 and https://github.com/whatwg/streams/issues/413 was closed. Changes
I did on the spec were integrated so they were brought back to the imported tests in WebKit.

* web-platform-tests/streams-api/README.txt: Updated version.
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Expectations.
* web-platform-tests/streams-api/readable-streams/cancel.js: Changed to cancel test.

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

5 years agoAdd types for DownloadID and TaskIdentifier
achristensen@apple.com [Fri, 18 Dec 2015 08:10:53 +0000 (08:10 +0000)]
Add types for DownloadID and TaskIdentifier
https://bugs.webkit.org/show_bug.cgi?id=152401

Reviewed by Brady Eidson.

DownloadID and TaskIdentifier used to both be just uint64_t's.
It is confusing to distinguish between them, so now they both have names.
We need a HashMap<TaskIdentifier, DownloadID> instead of a HashMap<uint64_t, uint64_t>.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::downloadRequest):
(WebKit::NetworkProcess::resumeDownload):
(WebKit::NetworkProcess::cancelDownload):
(WebKit::NetworkProcess::getNetworkProcessStatistics):
(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkDataTask::resume):
(WebKit::NetworkDataTask::taskIdentifier): Deleted.
* Shared/Downloads/Download.cpp:
(WebKit::Download::Download):
(WebKit::Download::messageSenderDestinationID):
* Shared/Downloads/Download.h:
(WebKit::Download::downloadID):
* Shared/Downloads/DownloadID.h: Added.
(WebKit::DownloadID::DownloadID):
(WebKit::DownloadID::operator==):
(WebKit::DownloadID::downloadID):
(IPC::ArgumentCoder<WebKit::DownloadID>::encode):
(IPC::ArgumentCoder<WebKit::DownloadID>::decode):
(WTF::DownloadIDHash::hash):
(WTF::DownloadIDHash::equal):
(WTF::HashTraits<WebKit::DownloadID>::emptyValue):
(WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue):
(WTF::HashTraits<WebKit::DownloadID>::isDeletedValue):
* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::DownloadManager):
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertHandleToDownload):
(WebKit::DownloadManager::resumeDownload):
(WebKit::DownloadManager::cancelDownload):
* Shared/Downloads/DownloadManager.h:
(WebKit::DownloadManager::isDownloading):
* UIProcess/API/C/WKDownload.cpp:
(WKDownloadGetID):
(WKDownloadCopyRequest):
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::downloadID):
(WebKit::DownloadProxy::request):
(WebKit::DownloadProxy::resumeData):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::createDownloadProxy):
(WebKit::DownloadProxyMap::downloadFinished):
(WebKit::DownloadProxyMap::processDidClose):
* UIProcess/Downloads/DownloadProxyMap.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::invalidatePolicyListener):
(WebKit::WebFrame::didReceivePolicyDecision):
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID):
(WebKit::WebPage::didReceivePolicyDecision):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoModern IDB: Refactor open/delete requests to exist in the same queue.
beidson@apple.com [Fri, 18 Dec 2015 07:06:11 +0000 (07:06 +0000)]
Modern IDB: Refactor open/delete requests to exist in the same queue.
https://bugs.webkit.org/show_bug.cgi?id=152397

Reviewed by Alex Christensen.

No new tests (Refactor, all existing tests continue to pass).

The order between incoming open and delete requests matters, and each request
needs to be handled individually.

This patch does the above without changing behavior on existing passing tests,
while moving many currently skipped tests closer to passing.

* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
(WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
* Modules/indexeddb/server/IDBServerOperation.h:
(WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

5 years ago[ARM] Add the missing setupArgumentsWithExecState functions after r193974
ossy@webkit.org [Fri, 18 Dec 2015 06:50:02 +0000 (06:50 +0000)]
[ARM] Add the missing setupArgumentsWithExecState functions after r193974
https://bugs.webkit.org/show_bug.cgi?id=152214

Reviewed by Mark Lam.

Relanding r194007 after r194248.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):

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

5 years ago[EFL] edje shouldn't have verbose output
ossy@webkit.org [Fri, 18 Dec 2015 05:43:00 +0000 (05:43 +0000)]
[EFL] edje shouldn't have verbose output
https://bugs.webkit.org/show_bug.cgi?id=152381

Reviewed by Gyuyoung Kim.

* platform/efl/DefaultTheme/CMakeLists.txt:

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

5 years agoWeb Inspector: Remove "local" scope type from the protocol
commit-queue@webkit.org [Fri, 18 Dec 2015 04:18:01 +0000 (04:18 +0000)]
Web Inspector: Remove "local" scope type from the protocol
https://bugs.webkit.org/show_bug.cgi?id=152409

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

Source/JavaScriptCore:

After r194251 the backend no longer sends this scope type.
So remove it from the protocol.

The concept of a Local Scope should be calculatable by the
frontend. In fact the way the backend used to do this could
easily be done by the frontend. To be done in a follow-up.

* inspector/InjectedScriptSource.js:
* inspector/JSJavaScriptCallFrame.h:
* inspector/protocol/Debugger.json:

Source/WebInspectorUI:

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):

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

5 years agoWeb Inspector: CSS warning's fake CallFrame is not creating a valid payload
commit-queue@webkit.org [Fri, 18 Dec 2015 04:14:40 +0000 (04:14 +0000)]
Web Inspector: CSS warning's fake CallFrame is not creating a valid payload
https://bugs.webkit.org/show_bug.cgi?id=152413

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

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
This attempts to create a CallFrame from a Console.CallFrame payload,
but this was missing the required functionName string parameter.

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

5 years agoFixed a typo from r194022.
mitz@apple.com [Fri, 18 Dec 2015 04:00:29 +0000 (04:00 +0000)]
Fixed a typo from r194022.

* Configurations/WebKit.xcconfig: Changed PlugInProcessShim.dylib to PluginProcessShim.dylib.

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

5 years agoUnreviewed, rolling out r194241 and r194252.
commit-queue@webkit.org [Fri, 18 Dec 2015 03:06:11 +0000 (03:06 +0000)]
Unreviewed, rolling out r194241 and r194252.
https://bugs.webkit.org/show_bug.cgi?id=152415

Caused crashes on GuardMalloc (Requested by ap on #webkit).

Reverted changesets:

"Modern IDB: Refactor open/delete requests to exist in the
same queue."
https://bugs.webkit.org/show_bug.cgi?id=152397
http://trac.webkit.org/changeset/194241

"Modern IDB: Refactor when opening the backing store takes
place."
https://bugs.webkit.org/show_bug.cgi?id=152405
http://trac.webkit.org/changeset/194252

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

5 years agoUnreviewed, rolling out r194250 and r194254.
commit-queue@webkit.org [Fri, 18 Dec 2015 02:46:47 +0000 (02:46 +0000)]
Unreviewed, rolling out r194250 and r194254.
https://bugs.webkit.org/show_bug.cgi?id=152414

broke api tests (Requested by alexchristensen on #webkit).

Reverted changesets:

"Add types for DownloadID and TaskIdentifier"
https://bugs.webkit.org/show_bug.cgi?id=152401
http://trac.webkit.org/changeset/194250

"Build fix after r194250"
http://trac.webkit.org/changeset/194254

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

5 years agoBuild fix after r194250
achristensen@apple.com [Fri, 18 Dec 2015 02:00:58 +0000 (02:00 +0000)]
Build fix after r194250

* WebKit2.xcodeproj/project.pbxproj:
Change target membership from all to WebKit.

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

5 years ago[INTL] Implement Collator Compare Functions
sukolsak@gmail.com [Fri, 18 Dec 2015 01:35:53 +0000 (01:35 +0000)]
[INTL] Implement Collator Compare Functions
https://bugs.webkit.org/show_bug.cgi?id=147604

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch implements Intl.Collator.prototype.compare() according
to the ECMAScript 2015 Internationalization API spec (ECMA-402 2nd edition.)

* runtime/IntlCollator.cpp:
(JSC::IntlCollator::~IntlCollator):
(JSC::sortLocaleData):
(JSC::searchLocaleData):
(JSC::IntlCollator::initializeCollator):
(JSC::IntlCollator::createCollator):
(JSC::IntlCollator::compareStrings):
(JSC::IntlCollator::usageString):
(JSC::IntlCollator::sensitivityString):
(JSC::IntlCollator::resolvedOptions):
(JSC::IntlCollator::setBoundCompare):
(JSC::IntlCollatorFuncCompare): Deleted.
* runtime/IntlCollator.h:
(JSC::IntlCollator::usage): Deleted.
(JSC::IntlCollator::setUsage): Deleted.
(JSC::IntlCollator::locale): Deleted.
(JSC::IntlCollator::setLocale): Deleted.
(JSC::IntlCollator::collation): Deleted.
(JSC::IntlCollator::setCollation): Deleted.
(JSC::IntlCollator::numeric): Deleted.
(JSC::IntlCollator::setNumeric): Deleted.
(JSC::IntlCollator::sensitivity): Deleted.
(JSC::IntlCollator::setSensitivity): Deleted.
(JSC::IntlCollator::ignorePunctuation): Deleted.
(JSC::IntlCollator::setIgnorePunctuation): Deleted.
* runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::sortLocaleData): Deleted.
(JSC::searchLocaleData): Deleted.
(JSC::initializeCollator): Deleted.
* runtime/IntlCollatorPrototype.cpp:
(JSC::IntlCollatorFuncCompare):
(JSC::IntlCollatorPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::defaultLocale):
(JSC::convertICULocaleToBCP47LanguageTag):
(JSC::intlStringOption):
(JSC::resolveLocale):
(JSC::supportedLocales):
* runtime/IntlObject.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::intlCollatorAvailableLocales):
(JSC::JSGlobalObject::intlDateTimeFormatAvailableLocales):
(JSC::JSGlobalObject::intlNumberFormatAvailableLocales):

Source/WTF:

* wtf/unicode/Collator.h:

LayoutTests:

* js/intl-collator-expected.txt:
* js/intl-collator.html:
* js/script-tests/intl-collator.js:
(testCollator):

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

5 years agoModern IDB: Refactor when opening the backing store takes place.
beidson@apple.com [Fri, 18 Dec 2015 01:30:12 +0000 (01:30 +0000)]
Modern IDB: Refactor when opening the backing store takes place.
https://bugs.webkit.org/show_bug.cgi?id=152405

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
  from here to performCurrentOpenOperation.
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
  not open yet, kick off opening it here.
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

5 years agoProvide a way to distinguish a nested lexical block from a function's lexical block
joepeck@webkit.org [Fri, 18 Dec 2015 01:09:13 +0000 (01:09 +0000)]
Provide a way to distinguish a nested lexical block from a function's lexical block
https://bugs.webkit.org/show_bug.cgi?id=152361

Reviewed by Saam Barati.

Source/JavaScriptCore:

* bytecompiler/BytecodeGenerator.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
Each of these are specialized scopes. They are not nested lexical scopes.

(JSC::BytecodeGenerator::pushLexicalScope):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
Include an extra parameter to mark the SymbolTable as a nested lexical or not.

* bytecompiler/NodesCodegen.cpp:
(JSC::BlockNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):
Each of these are cases of non-function nested lexical scopes.
So mark the SymbolTable as nested.

* inspector/protocol/Debugger.json:
* inspector/InjectedScriptSource.js:
Include a new scope type.

* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::scopeType):
Use the new "NestedLexical" scope type for nested, non-function,
lexical scopes. The Inspector can use this to better describe
this scope in the frontend.

* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::isNestedLexicalScope):
* debugger/DebuggerScope.h:
* runtime/JSScope.cpp:
(JSC::JSScope::isNestedLexicalScope):
* runtime/JSScope.h:
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::SymbolTable):
(JSC::SymbolTable::cloneScopePart):
* runtime/SymbolTable.h:
Access the isNestedLexicalScope bit.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
New "Block Variables" string.

* UserInterface/Models/ScopeChainNode.js:
New "Block" scope type, and update existing types.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Parse the protocol type to frontend types. Use the protocol generated enum.

LayoutTests:

* inspector/debugger/breakpoint-scope-expected.txt:
We will soon remove the backend sending a "Local" scope.
The backend was just marking the first closure scope as local.
The frontend can do this itself and do a better job of it.

* inspector/model/resources/all-scopes.js: Added.
(testAllScopes.innerScope):
(testAllScopes):
* inspector/model/resources/block-scopes.js: Added.
(testBlockScopes):
(testBlockScopes.method):
* inspector/model/resources/function-name-scopes.js: Added.
(testFunctionNameScope1):
* inspector/model/scope-chain-node-expected.txt: Added.
* inspector/model/scope-chain-node.html: Added.
Tests for ways to get all the different scope types and
specific cases of certain scope types.

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

5 years agoAdd types for DownloadID and TaskIdentifier
achristensen@apple.com [Fri, 18 Dec 2015 01:09:00 +0000 (01:09 +0000)]
Add types for DownloadID and TaskIdentifier
https://bugs.webkit.org/show_bug.cgi?id=152401

Reviewed by Brady Eidson.

DownloadID and TaskIdentifier used to both be just uint64_t's.
It is confusing to distinguish between them, so now they both have names.
We need a HashMap<TaskIdentifier, DownloadID> instead of a HashMap<uint64_t, uint64_t>.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::downloadRequest):
(WebKit::NetworkProcess::resumeDownload):
(WebKit::NetworkProcess::cancelDownload):
(WebKit::NetworkProcess::getNetworkProcessStatistics):
(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkDataTask::resume):
(WebKit::NetworkDataTask::taskIdentifier): Deleted.
* Shared/Downloads/Download.cpp:
(WebKit::Download::Download):
(WebKit::Download::messageSenderDestinationID):
* Shared/Downloads/Download.h:
(WebKit::Download::downloadID):
* Shared/Downloads/DownloadID.h: Added.
(WebKit::DownloadID::DownloadID):
(WebKit::DownloadID::operator==):
(WebKit::DownloadID::downloadID):
(IPC::ArgumentCoder<WebKit::DownloadID>::encode):
(IPC::ArgumentCoder<WebKit::DownloadID>::decode):
(WTF::DownloadIDHash::hash):
(WTF::DownloadIDHash::equal):
(WTF::HashTraits<WebKit::DownloadID>::emptyValue):
(WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue):
(WTF::HashTraits<WebKit::DownloadID>::isDeletedValue):
* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::DownloadManager):
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertHandleToDownload):
(WebKit::DownloadManager::resumeDownload):
(WebKit::DownloadManager::cancelDownload):
* Shared/Downloads/DownloadManager.h:
(WebKit::DownloadManager::isDownloading):
* UIProcess/API/C/WKDownload.cpp:
(WKDownloadGetID):
(WKDownloadCopyRequest):
* UIProcess/Downloads/DownloadProxy.h:
(WebKit::DownloadProxy::downloadID):
(WebKit::DownloadProxy::request):
(WebKit::DownloadProxy::resumeData):
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::createDownloadProxy):
(WebKit::DownloadProxyMap::downloadFinished):
(WebKit::DownloadProxyMap::processDidClose):
* UIProcess/Downloads/DownloadProxyMap.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::frameDidBecomeFrameSet):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::invalidatePolicyListener):
(WebKit::WebFrame::didReceivePolicyDecision):
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID):
(WebKit::WebPage::didReceivePolicyDecision):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoUnreviewed EFL Build Fix after r194247.
joepeck@webkit.org [Fri, 18 Dec 2015 00:48:14 +0000 (00:48 +0000)]
Unreviewed EFL Build Fix after r194247.

* interpreter/CallFrame.cpp:
(JSC::CallFrame::friendlyFunctionName):
Handle compilers that don't realize the switch handles all cases.

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

5 years ago[ES6] Add support for Symbol.hasInstance
keith_miller@apple.com [Fri, 18 Dec 2015 00:37:35 +0000 (00:37 +0000)]
[ES6] Add support for Symbol.hasInstance
https://bugs.webkit.org/show_bug.cgi?id=151839

Reviewed by Saam Barati.

Source/JavaScriptCore:

Fixed version of r193986, r193983, and r193974.

This patch adds support for Symbol.hasInstance, unfortunately in order to prevent
regressions several new bytecodes and DFG IR nodes were necessary. Before, Symbol.hasInstance
when executing an instanceof expression we would emit three bytecodes: overrides_has_instance, get_by_id,
then instanceof. As the spec has changed, we emit a more complicated set of bytecodes in addition to some
new ones. First the role of overrides_has_instance and its corresponding DFG node have changed. Now it returns
a js-boolean indicating whether the RHS of the instanceof expression (from here on called the constructor for simplicity)
needs non-default behavior for resolving the expression. i.e. The constructor has a Symbol.hasInstance that differs from the one on
Function.prototype[Symbol.hasInstance] or is a bound/C-API function. Once we get to the DFG this node is generally eliminated as
we can prove the value of Symbol.hasInstance is a constant. The second new bytecode is instanceof_custom. insntanceof_custom, just
emits a call to slow path code that computes the result.

In the DFG, there is also a new node, CheckTypeInfoFlags, which checks the type info flags are consistent with the ones provided and
OSR exits if the flags are not. Additionally, we attempt to prove that the result of CheckHasValue will be a constant and transform
it into a CheckTypeInfoFlags followed by a JSConstant.

* API/JSCallbackObject.h:
* builtins/FunctionPrototype.js:
(symbolHasInstance):
* bytecode/BytecodeBasicBlock.cpp:
(JSC::isBranch): Deleted.
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/ExitKind.cpp:
(JSC::exitKindToString):
* bytecode/ExitKind.h:
* bytecode/PreciseJumpTargets.cpp:
(JSC::getJumpTargetsForBytecodeOffset): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitOverridesHasInstance):
(JSC::BytecodeGenerator::emitInstanceOfCustom):
(JSC::BytecodeGenerator::emitCheckHasInstance): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::InstanceOfNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::hasTypeInfoOperand):
(JSC::DFG::Node::typeInfoOperand):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags):
(JSC::DFG::SpeculativeJIT::compileInstanceOfCustom):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileOverridesHasInstance):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckTypeInfoFlags):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInstanceOfCustom):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckHasInstance): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_instanceof_custom):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_check_has_instance): Deleted.
(JSC::JIT::emitSlow_op_check_has_instance): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emit_op_instanceof_custom):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_check_has_instance): Deleted.
(JSC::JIT::emitSlow_op_check_has_instance): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonIdentifiers.h:
* runtime/ExceptionHelpers.cpp:
(JSC::invalidParameterInstanceofSourceAppender):
(JSC::invalidParameterInstanceofNotFunctionSourceAppender):
(JSC::invalidParameterInstanceofhasInstanceValueNotFunctionSourceAppender):
(JSC::createInvalidInstanceofParameterErrorNotFunction):
(JSC::createInvalidInstanceofParameterErrorhasInstanceValueNotFunction):
(JSC::createInvalidInstanceofParameterError): Deleted.
* runtime/ExceptionHelpers.h:
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::addFunctionProperties):
* runtime/FunctionPrototype.h:
* runtime/JSBoundFunction.cpp:
(JSC::isBoundFunction):
(JSC::hasInstanceBoundFunction):
* runtime/JSBoundFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::functionProtoHasInstanceSymbolFunction):
* runtime/JSObject.cpp:
(JSC::JSObject::hasInstance):
(JSC::objectPrivateFuncInstanceOf):
* runtime/JSObject.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::overridesHasInstance):
* runtime/WriteBarrier.h:
(JSC::WriteBarrierBase<Unknown>::slot):
* tests/es6.yaml:
* tests/stress/instanceof-custom-hasinstancesymbol.js: Added.
(Constructor):
(value):
(instanceOf):
(body):
* tests/stress/symbol-hasInstance.js: Added.
(Constructor):
(value):
(ObjectClass.Symbol.hasInstance):
(NumberClass.Symbol.hasInstance):

LayoutTests:

Fix tests to reflect the changes to instanceof in ES6.

Added a new regression test for bound functions in instanceof
as the perfomance on bound functions should, to some degree,
reflect the performance on C-API users.

* inspector/model/remote-object-get-properties-expected.txt:
* js/Object-getOwnPropertyNames-expected.txt:
* js/exception-for-nonobject-expected.txt:
* js/exception-instanceof-expected.txt:
* js/instance-of-immediates-expected.txt:
* js/regress/instanceof-bound-expected.txt: Added.
* js/regress/instanceof-bound.html: Added.
* js/regress/script-tests/instanceof-bound.js: Added.
(Constructor):
(test):
* js/script-tests/Object-getOwnPropertyNames.js:

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

5 years agoWeb Inspector: Improve names in Debugger Call Stack section when paused
joepeck@webkit.org [Fri, 18 Dec 2015 00:20:18 +0000 (00:20 +0000)]
Web Inspector: Improve names in Debugger Call Stack section when paused
https://bugs.webkit.org/show_bug.cgi?id=152398

Reviewed by Brian Burg.

Source/JavaScriptCore:

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
Provide a better name from the underlying CallFrame.

* inspector/InjectedScriptSource.js:
(InjectedScript.CallFrameProxy):
Just call functionName, it will provide a better
than nothing function name.

* runtime/JSFunction.cpp:
(JSC::getCalculatedDisplayName):
Use emptyString().

* interpreter/CallFrame.h:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::friendlyFunctionName):
This is the third similiar implementation of this,
but all other cases use other "StackFrame" objects.
Use the expected names for program code.

Source/WebInspectorUI:

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Use a new fromPayload helper to construct the CallFrame and share code.

* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.functionNameFromPayload):
(WebInspector.CallFrame.programCodeFromPayload):
(WebInspector.CallFrame.fromDebuggerPayload):
(WebInspector.CallFrame.fromPayload):
Add a new way to construct a call frame. There are two kinds of
CallFrame payloads in the protocol:
- Debugger.CallFrame, this new path
- Console.CallFrame, the pre-existing path

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

5 years agoDisable viewport "shrink to fit" outside of multitasking mode
simon.fraser@apple.com [Fri, 18 Dec 2015 00:05:04 +0000 (00:05 +0000)]
Disable viewport "shrink to fit" outside of multitasking mode
https://bugs.webkit.org/show_bug.cgi?id=152403
rdar://problem/23818102

Reviewed by Tim Horton.

Source/WebKit2:

Plumb through a value that indicates whether the WKWebView is in split screen,
and use it to conditionally enable shrink-to-fit mode only in split screen.

* Shared/VisibleContentRectUpdateInfo.cpp: Added m_allowShrinkToFit, and sort
the member variables, and encoding order, to optimize packing, with some initializers.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::allowShrinkToFit):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm: Add _allowsViewportShrinkToFit member variable,
with getter and setter.
(-[WKWebView _updateVisibleContentRects]): Unwrap the line.
(-[WKWebView _setAllowsViewportShrinkToFit:]):
(-[WKWebView _allowsViewportShrinkToFit]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h: _allowsViewportShrinkToFit SPI.
* UIProcess/WebPageProxy.h: Pass allowShrinkToFit through.
* UIProcess/ios/WKContentView.mm: Ditto.
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects): Padd allowShrinkToFit to the web process via the VisibleContentRectUpdateInfo.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Store m_ignoreViewportScalingConstraints in a member variable since we can't
get back to the prefs later.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): This is the behavior change: call setCanIgnoreScalingConstraints()
on the viewport configuration, consulting the pref (via m_ignoreViewportScalingConstraints) and the new
visibleContentRectUpdateInfo.allowShrinkToFit().

LayoutTests:

This test no longer does shrink-to-fit, so starts with a min and initial scale of 1.

* fast/viewport/ios/width-is-device-width-overflowing-expected.txt:

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

5 years agoViewportConfiguration functions should return a bool to say if anything changed
simon.fraser@apple.com [Fri, 18 Dec 2015 00:04:58 +0000 (00:04 +0000)]
ViewportConfiguration functions should return a bool to say if anything changed
https://bugs.webkit.org/show_bug.cgi?id=152353

Reviewed by Tim Horton.

Rather than callers all checking whether setting ViewportConfiguration values
changes state, have its functions return a bool if the values change.

Source/WebCore:

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::setContentsSize):
(WebCore::ViewportConfiguration::setMinimumLayoutSize):
(WebCore::ViewportConfiguration::setViewportArguments):
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): Deleted.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameDidLayout):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):

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

5 years agoWeb Inspector: control whether to collect and dump protocol messages using a WebInspe...
bburg@apple.com [Thu, 17 Dec 2015 23:53:51 +0000 (23:53 +0000)]
Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
https://bugs.webkit.org/show_bug.cgi?id=151635

Reviewed by Joseph Pecoraro.

Follow-up fix to stop double-logging everything.

* UserInterface/Protocol/LoggingProtocolTracer.js:
(WebInspector.LoggingProtocolTracer.prototype._processEntry):

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

5 years agoWeb Inspector: Improve console.trace, make it more like console.assert and inline...
joepeck@webkit.org [Thu, 17 Dec 2015 23:37:51 +0000 (23:37 +0000)]
Web Inspector: Improve console.trace, make it more like console.assert and inline the message
https://bugs.webkit.org/show_bug.cgi?id=152352

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
New "Trace" related strings.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.expand):
Since we auto-expand Trace messages for their Call Stack, don't also
auto-expand a single inner object, which may be big and push the
actual stack trace off the screen.

(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
Behave like Assert messages and absorb a message string, and include
extra arguments gracefully.

(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
For expandable messages with simple extra arguments (console.trace with
primitives and backtrace, or console.assert with primitives and backtrace)
we were hiding the inline lossless previews and not showing them as a
bulleted list below. We can just keep the lossless previews inline in the
title, since they were only put there because they are small and lossless.

(WebInspector.ConsoleMessageView.prototype.toClipboardString):
No need to hard code "console.trace()" in the clipboard.

* UserInterface/Views/ConsoleMessageView.css:
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider):not(.inline-lossless)):
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider)): Deleted.
Don't hide the inline lossless preview in the console message title when it is inline-lossless.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.expand):
Do not allow expanding a loss-less preview.

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

5 years agoWeb Inspector: Add JSContext Script Profiling
joepeck@webkit.org [Thu, 17 Dec 2015 23:37:48 +0000 (23:37 +0000)]
Web Inspector: Add JSContext Script Profiling
https://bugs.webkit.org/show_bug.cgi?id=151899

Reviewed by Brian Burg.

Source/JavaScriptCore:

Extend JSC::Debugger to include a profiling client interface
that the Inspector can implement to be told about script execution
entry and exit points. Add new profiledCall/Evaluate/Construct
methods that are entry points that will notify the profiling
client if it exists.

By putting the profiling client on Debugger it avoids having
special code paths for a JSGlobalObject being JSContext inspected
or a JSGlobalObject in a Page being Web inspected. In either case
the JSGlobalObject can go through its debugger() which always
reaches the correct inspector instance.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
Handle new files.

* runtime/CallData.cpp:
(JSC::profiledCall):
* runtime/CallData.h:
* runtime/Completion.cpp:
(JSC::profiledEvaluate):
* runtime/Completion.h:
(JSC::profiledEvaluate):
* runtime/ConstructData.cpp:
(JSC::profiledConstruct):
* runtime/ConstructData.h:
(JSC::profiledConstruct):
Create profiled versions of interpreter entry points. If a profiler client is
available, this will automatically inform it of entry/exit. Include a reason
why this is being profiled. Currently all reasons in JavaScriptCore are enumerated
(API, Microtask) and Other is to be used by WebCore or future clients.

* debugger/ScriptProfilingScope.h: Added.
(JSC::ScriptProfilingScope::ScriptProfilingScope):
(JSC::ScriptProfilingScope::~ScriptProfilingScope):
(JSC::ScriptProfilingScope::shouldStartProfile):
(JSC::ScriptProfilingScope::shouldEndProfile):
At profiled entry points inform the profiling client if needed.

* API/JSBase.cpp:
(JSEvaluateScript):
* API/JSObjectRef.cpp:
(JSObjectCallAsFunction):
(JSObjectCallAsConstructor):
* runtime/JSJob.cpp:
(JSC::JSJobMicrotask::run):
Use the profiled functions for API and Microtask execution entry points.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::hasProfiler):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::hasProfiler):
Extend hasProfiler to also check the new Debugger script profiler.

* debugger/Debugger.cpp:
(JSC::Debugger::setProfilingClient):
(JSC::Debugger::willEvaluateScript):
(JSC::Debugger::didEvaluateScript):
* debugger/Debugger.h:
Pass through to the profiling client.

* inspector/protocol/ScriptProfiler.json: Added.
* inspector/agents/InspectorScriptProfilerAgent.cpp: Added.
(Inspector::InspectorScriptProfilerAgent::InspectorScriptProfilerAgent):
(Inspector::InspectorScriptProfilerAgent::~InspectorScriptProfilerAgent):
(Inspector::InspectorScriptProfilerAgent::didCreateFrontendAndBackend):
(Inspector::InspectorScriptProfilerAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorScriptProfilerAgent::startTracking):
(Inspector::InspectorScriptProfilerAgent::stopTracking):
(Inspector::InspectorScriptProfilerAgent::isAlreadyProfiling):
(Inspector::InspectorScriptProfilerAgent::willEvaluateScript):
(Inspector::InspectorScriptProfilerAgent::didEvaluateScript):
(Inspector::toProtocol):
(Inspector::InspectorScriptProfilerAgent::addEvent):
(Inspector::buildAggregateCallInfoInspectorObject):
(Inspector::buildInspectorObject):
(Inspector::buildProfileInspectorObject):
(Inspector::InspectorScriptProfilerAgent::trackingComplete):
* inspector/agents/InspectorScriptProfilerAgent.h: Added.
New ScriptProfiler domain to just turn on / off script profiling.
It introduces a start/update/complete event model which we want
to include in new domains.

* inspector/InspectorEnvironment.h:
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::callFunctionWithEvalEnabled):
Simplify this now that we want it to be the same for all clients.

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
Create the new agent.

* inspector/InspectorProtocolTypes.h:
(Inspector::Protocol::Array::addItem):
Allow pushing a double onto a Protocol::Array.

Source/WebCore:

Tests: inspector/script-profiler/event-type-API.html
       inspector/script-profiler/event-type-Microtask.html
       inspector/script-profiler/tracking.html

* ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Added.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
Create the new agent, even if we don't use it yet for Page inspection.

(WebCore::InspectorController::willCallInjectedScriptFunction): Deleted.
(WebCore::InspectorController::didCallInjectedScriptFunction): Deleted.
No longer needed, implementation was pushed up into InjectedScriptBase.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/InspectorReplayAgent.cpp:
(WebCore::buildInspectorObjectForSession):
Disambiguate types.

Source/WebInspectorUI:

Enable the Timeline tab for JSContext inspection. Currently only
JSContext inspection will use the ScriptProfiler domain, it will
be enabled for Page inspection in a follow-up.

First pass at the UI creates basic ScriptTimelineRecords for
ScriptProfiler events. At the end of recording, when profiles
are downloaded, it attaches profiles to the timeline records
and refreshes the Scripts timeline.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype.computeElapsedTime):
(WebInspector.TimelineManager.prototype.scriptProfilerIsTracking):
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._resourceWasAdded):
(WebInspector.TimelineManager.prototype._garbageCollected):
(WebInspector.TimelineManager.prototype._addRecord): Deleted.
* UserInterface/Main.html:
* UserInterface/Models/Instrument.js:
(WebInspector.Instrument.startLegacyTimelineAgent):
* UserInterface/Models/ScriptInstrument.js:
(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
* UserInterface/Models/ScriptTimelineRecord.js:
(WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
(WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
(WebInspector.ScriptTimelineRecord):
(WebInspector.ScriptTimelineRecord.EventType.displayName):
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.refresh):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.sourceCodeTimelinesSupported):
(WebInspector.TimelineRecording.prototype.timelineForRecordType):
(WebInspector.TimelineRecording.prototype.addRecord):
* UserInterface/Protocol/ScriptProfilerObserver.js: Copied from Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js.
(WebInspector.ScriptProfilerObserver.prototype.trackingStart):
(WebInspector.ScriptProfilerObserver.prototype.trackingUpdate):
(WebInspector.ScriptProfilerObserver.prototype.trackingComplete):
(WebInspector.ScriptProfilerObserver):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptTimelineView.prototype._scriptTimelineRecordRefreshed):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.isTabAllowed):

LayoutTests:

* inspector/script-profiler/event-type-API-expected.txt: Added.
* inspector/script-profiler/event-type-API.html: Added.
* inspector/script-profiler/event-type-Microtask-expected.txt: Added.
* inspector/script-profiler/event-type-Microtask.html: Added.
* inspector/script-profiler/tracking-expected.txt: Added.
* inspector/script-profiler/tracking.html: Added.
Tests for the new ScriptProfiler domain.

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

5 years agoModern IDB: Refactor open/delete requests to exist in the same queue.
beidson@apple.com [Thu, 17 Dec 2015 23:29:53 +0000 (23:29 +0000)]
Modern IDB: Refactor open/delete requests to exist in the same queue.
https://bugs.webkit.org/show_bug.cgi?id=152397

Reviewed by Alex Christensen.

No new tests (Refactor, all existing tests continue to pass).

The order between incoming open and delete requests matters, and each request
needs to be handled individually.

This patch does the above without changing behavior on existing passing tests,
while moving many currently skipped tests closer to passing.

* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::notifyDeleteRequestBlocked):
(WebCore::IDBServer::IDBServerOperation::notifyDidDeleteDatabase):
* Modules/indexeddb/server/IDBServerOperation.h:
(WebCore::IDBServer::IDBServerOperation::hasNotifiedDeleteRequestBlocked):

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

5 years agov3 UI shouldn't open/close pane selector by mouseenter/leave
rniwa@webkit.org [Thu, 17 Dec 2015 23:02:25 +0000 (23:02 +0000)]
v3 UI shouldn't open/close pane selector by mouseenter/leave
https://bugs.webkit.org/show_bug.cgi?id=152399

Reviewed by Andreas Kling.

Removed the code to open and close the pane selector by mouseenter and mouseleave
since multiple people have complained about the behavior.

* public/v3/pages/charts-toolbar.js:
(ChartsToolbar): Removed the event listeners.
(ChartsToolbar.prototype._addPane): Don't close the pane selector when adding a new pane
to better support the use case of adding multiple panes.
(ChartsToolbar.cssTemplate): Tweaked CSS.

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

5 years agoMarking fast/media/mq-* tests as failing on ios-simulator
ryanhaddad@apple.com [Thu, 17 Dec 2015 22:56:25 +0000 (22:56 +0000)]
Marking fast/media/mq-* tests as failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152137

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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