WebKit-https.git
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

5 years ago[Win] Prevent flashing/strobing repaints on certain hardware
bfulgham@apple.com [Thu, 17 Dec 2015 22:26:15 +0000 (22:26 +0000)]
[Win] Prevent flashing/strobing repaints on certain hardware
https://bugs.webkit.org/show_bug.cgi?id=152394
<rdar://problem/23875302>

Reviewed by Simon Fraser.

This patch reverts a change I made in r192166, where I always set the
m_viewNeedsUpdate flag to true when a 'flushContext' call was made. Instead,
we should go back to letting the view decide when it needs to paint.

* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::flushContext): Don't just claim that
the view needs to be updated any time we are asked to flush.

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

5 years agoPopover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
rniwa@webkit.org [Thu, 17 Dec 2015 22:19:52 +0000 (22:19 +0000)]
Popover for analysis tasks shows up at the left edge of annotation bars in the v3 UI
https://bugs.webkit.org/show_bug.cgi?id=152389

Reviewed by Darin Adler.

Compute the x coordinate of the popover from the center of each annotation bar.

Also adjust the x coordinate to keep the popover within the charts.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._renderChartContent):

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

5 years agoDashboard charts should have uniform widths on v3 UI
rniwa@webkit.org [Thu, 17 Dec 2015 22:13:45 +0000 (22:13 +0000)]
Dashboard charts should have uniform widths on v3 UI
https://bugs.webkit.org/show_bug.cgi?id=152395

Reviewed by Chris Dumez.

Fix the bug by applying table-layout: fixed on the dashboard table.

* public/v3/pages/dashboard-page.js:
(DashboardPage.prototype.render): Added header-column as a class name to explicitly set the header column with.
(DashboardPage.cssTemplate): Adjusted CSS accordingly.

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

5 years ago[WinCairo][MediaFoundation] Release Direct3D swap chain object earlier.
peavo@outlook.com [Thu, 17 Dec 2015 20:57:20 +0000 (20:57 +0000)]
[WinCairo][MediaFoundation] Release Direct3D swap chain object earlier.
https://bugs.webkit.org/show_bug.cgi?id=152392

Reviewed by Alex Christensen.

Since we don't use the swap chain object to render the video to a window,
but render frames to Cairo bitmaps, we can let go of the swap chain object
earlier than we currently do.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::clearDesiredSampleTime):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):

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

5 years agorun-webkit-tests shouldn't start multiple iOS simulators while only running one test
commit-queue@webkit.org [Thu, 17 Dec 2015 20:28:50 +0000 (20:28 +0000)]
run-webkit-tests shouldn't start multiple iOS simulators while only running one test
https://bugs.webkit.org/show_bug.cgi?id=152157
<rdar://problem/23851817>

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

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.get_worker_count): Calculate required number of workers.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._get_test_inputs): Common method to calculate test_inputs.
(Manager._update_worker_count): Calculate and update required number of workers.

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

5 years agoSkipping http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with...
ryanhaddad@apple.com [Thu, 17 Dec 2015 20:21:19 +0000 (20:21 +0000)]
Skipping http/tests/contentdispositionattachmentsandbox/referer-header-stripped-with-meta-referer-* tests on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152390

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

5 years agoUnreviewed, rolling out r194201.
commit-queue@webkit.org [Thu, 17 Dec 2015 19:52:25 +0000 (19:52 +0000)]
Unreviewed, rolling out r194201.
https://bugs.webkit.org/show_bug.cgi?id=152391

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

Reverted changeset:

"Reduce PassRefPtr uses in dom - 2"
https://bugs.webkit.org/show_bug.cgi?id=151936
http://trac.webkit.org/changeset/194201

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

5 years agoData detector yellow highlight location is vertically mirrored in WebKit1
timothy_horton@apple.com [Thu, 17 Dec 2015 19:42:04 +0000 (19:42 +0000)]
Data detector yellow highlight location is vertically mirrored in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=152216
<rdar://problem/23848003>

Reviewed by Darin Adler.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
Match the conversion we do at every other WK1 TextIndicator construction.

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

5 years agoClosing a pane on v3 UI always closes the last pane
rniwa@webkit.org [Thu, 17 Dec 2015 18:33:09 +0000 (18:33 +0000)]
Closing a pane on v3 UI always closes the last pane
https://bugs.webkit.org/show_bug.cgi?id=152388

Reviewed by Chris Dumez.

The bug was caused by closePane being called without arguments. (The first argument to bind is "this" value.)
Fixed it by passing in "this" pane object to the first argument.

* public/v3/pages/chart-pane.js:
(ChartPane):

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

5 years agoFix unused parameter handling in WebGLRenderingContextBase.cp
ossy@webkit.org [Thu, 17 Dec 2015 17:58:11 +0000 (17:58 +0000)]
Fix unused parameter handling in WebGLRenderingContextBase.cp
https://bugs.webkit.org/show_bug.cgi?id=152387

Reviewed by Alex Christensen.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::activeTexture):
(WebCore::WebGLRenderingContextBase::attachShader):
(WebCore::WebGLRenderingContextBase::bindAttribLocation):
(WebCore::WebGLRenderingContextBase::bindBuffer):
(WebCore::WebGLRenderingContextBase::bindFramebuffer):
(WebCore::WebGLRenderingContextBase::bindRenderbuffer):
(WebCore::WebGLRenderingContextBase::bindTexture):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::createShader):
(WebCore::WebGLRenderingContextBase::detachShader):
(WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
(WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
(WebCore::WebGLRenderingContextBase::getActiveAttrib):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getAttachedShaders):
(WebCore::WebGLRenderingContextBase::getBufferParameter):
(WebCore::WebGLRenderingContextBase::getProgramParameter):
(WebCore::WebGLRenderingContextBase::getProgramInfoLog):
(WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
(WebCore::WebGLRenderingContextBase::getShaderParameter):
(WebCore::WebGLRenderingContextBase::getShaderInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
(WebCore::WebGLRenderingContextBase::getShaderSource):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::getUniform):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
(WebCore::WebGLRenderingContextBase::getVertexAttrib):
(WebCore::WebGLRenderingContextBase::linkProgram):
(WebCore::WebGLRenderingContextBase::shaderSource):
(WebCore::WebGLRenderingContextBase::uniform1f):
(WebCore::WebGLRenderingContextBase::uniform1fv):
(WebCore::WebGLRenderingContextBase::uniform1i):
(WebCore::WebGLRenderingContextBase::uniform1iv):
(WebCore::WebGLRenderingContextBase::uniform2f):
(WebCore::WebGLRenderingContextBase::uniform2fv):
(WebCore::WebGLRenderingContextBase::uniform2i):
(WebCore::WebGLRenderingContextBase::uniform2iv):
(WebCore::WebGLRenderingContextBase::uniform3f):
(WebCore::WebGLRenderingContextBase::uniform3fv):
(WebCore::WebGLRenderingContextBase::uniform3i):
(WebCore::WebGLRenderingContextBase::uniform3iv):
(WebCore::WebGLRenderingContextBase::uniform4f):
(WebCore::WebGLRenderingContextBase::uniform4fv):
(WebCore::WebGLRenderingContextBase::uniform4i):
(WebCore::WebGLRenderingContextBase::uniform4iv):
(WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
(WebCore::WebGLRenderingContextBase::useProgram):
(WebCore::WebGLRenderingContextBase::validateProgram):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):

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

5 years ago[GTK] Unreviewed gardening
commit-queue@webkit.org [Thu, 17 Dec 2015 13:25:08 +0000 (13:25 +0000)]
[GTK] Unreviewed gardening

Remove failure expectations for tests that have been passing after
r185157, r186191, r189670, r191658 and r191727.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2015-12-17

* platform/gtk/TestExpectations:

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

5 years agoRemove temporary flakiness expectations for WPT tests introduced for bug 152257
youenn.fablet@crf.canon.fr [Thu, 17 Dec 2015 11:02:22 +0000 (11:02 +0000)]
Remove temporary flakiness expectations for WPT tests introduced for bug 152257
https://bugs.webkit.org/show_bug.cgi?id=152377

Unreviewed.

LayoutTests/imported/w3c:

* web-platform-tests/dom/interfaces-expected.txt: Rebased according latest testharness.js.
* web-platform-tests/html/dom/interfaces-expected.txt: Ditto.

LayoutTests:

* TestExpectations: removing some flakiness expectations.

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

5 years ago[ES6] Handle new_generator_func / new_generator_func_exp in DFG / FTL
utatane.tea@gmail.com [Thu, 17 Dec 2015 10:33:08 +0000 (10:33 +0000)]
[ES6] Handle new_generator_func / new_generator_func_exp in DFG / FTL
https://bugs.webkit.org/show_bug.cgi?id=152227

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch introduces new_generator_func / new_generator_func_exp into DFG and FTL.
We add a new DFG Node, NewGeneratorFunction. It will construct a function with GeneratorFunction's structure.
The structure of GeneratorFunction is different from one of Function because GeneratorFunction has the different __proto__.

Instead of extending NewFunction / PhantomNewFunction, we just added new DFG nodes, NewGeneratorFunction and PhantomNewGeneratorFunction.
This is because NewGeneratorFunction will generate an object that has different class info from JSFunction (And if JSGeneratorFunction is extended, its size will become different from JSFunction).
So, rather than extending NewFunction with generator flag, just adding new DFG nodes seems cleaner.

Object allocation sinking phase will change NewGeneratorFunction to PhantomNewGeneratorFunction and defer or eliminate its actual materialization.
It is completely the same to NewFunction and PhantomNewFunction.
And when OSR exit occurs, we need to execute deferred NewGeneratorFunction since Baseline JIT does not consider it.
So in FTL operation, we should create JSGeneratorFunction if we see PhantomNewGeneratorFunction materialization.

* 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/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantomNewFunction):
(JSC::DFG::Node::convertToPhantomNewGeneratorFunction):
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::isFunctionAllocation):
(JSC::DFG::Node::isPhantomFunctionAllocation):
(JSC::DFG::Node::isPhantomAllocation):
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunction):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateCPS):
(JSC::DFG::Validate::validateSSA):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewFunction):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):
* tests/stress/generator-function-create-optimized.js: Added.
(shouldBe):
(g):
(test.return.gen):
(test):
(test2.gen):
(test2):
* tests/stress/generator-function-declaration-sinking-no-double-allocate.js: Added.
(shouldBe):
(GeneratorFunctionPrototype):
(call):
(f):
(sink):
* tests/stress/generator-function-declaration-sinking-osrexit.js: Added.
(shouldBe):
(GeneratorFunctionPrototype):
(g):
(f):
(sink):
* tests/stress/generator-function-declaration-sinking-put.js: Added.
(shouldBe):
(GeneratorFunctionPrototype):
(g):
(f):
(sink):
* tests/stress/generator-function-expression-sinking-no-double-allocate.js: Added.
(shouldBe):
(GeneratorFunctionPrototype):
(call):
(f):
(sink):
* tests/stress/generator-function-expression-sinking-osrexit.js: Added.
(shouldBe):
(GeneratorFunctionPrototype):
(g):
(sink):
* tests/stress/generator-function-expression-sinking-put.js: Added.
(shouldBe):
(GeneratorFunctionPrototype):
(g):
(sink):

LayoutTests:

Make the test taking longer time.

* js/regress/script-tests/generator-function-create.js:
(test):

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

5 years agoWeb Inspector: REGRESSION (r193913): Popover covers completion suggestions
mattbaker@apple.com [Thu, 17 Dec 2015 08:15:53 +0000 (08:15 +0000)]
Web Inspector: REGRESSION (r193913): Popover covers completion suggestions
https://bugs.webkit.org/show_bug.cgi?id=152369

Reviewed by Timothy Hatcher.

* UserInterface/Views/Variables.css:
(:root):
Swap popover and tooltip z-index ordering.

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

5 years agoMake SessionID use intHash
commit-queue@webkit.org [Thu, 17 Dec 2015 07:49:45 +0000 (07:49 +0000)]
Make SessionID use intHash
https://bugs.webkit.org/show_bug.cgi?id=152356

Patch by Alex Christensen <achristensen@webkit.org> on 2015-12-16
Reviewed by Darin Adler.

* page/SessionID.h:
(WTF::SessionIDHash::hash):
(WTF::SessionIDHash::equal):
(WTF::HashTraits<WebCore::SessionID>::emptyValue):
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
Use intHash instead of just casting a uint64_t to an unsigned.
This reduces hash collisions in HashTables that are usually quite small so it isn't much of a problem.
Also, needsDestruction hasn't been in HashTraits since r156507.

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

5 years agoProgress towards implementing downloads with NetworkSession
achristensen@apple.com [Thu, 17 Dec 2015 07:07:36 +0000 (07:07 +0000)]
Progress towards implementing downloads with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=152371

Reviewed by Darin Adler.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::downloadRequest):
(WebKit::NetworkProcess::resumeDownload):
(WebKit::NetworkProcess::cancelDownload):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Authentication/AuthenticationManager.h:
* Shared/Downloads/Download.cpp:
(WebKit::Download::Download):
(WebKit::Download::didReceiveAuthenticationChallenge):
* Shared/Downloads/Download.h:
* Shared/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertHandleToDownload):
(WebKit::DownloadManager::resumeDownload):
(WebKit::DownloadManager::cancelDownload):
(WebKit::DownloadManager::downloadFinished):
(WebKit::DownloadManager::didCreateDownload):
* Shared/Downloads/DownloadManager.h:
* Shared/Downloads/cocoa: Added.
* Shared/Downloads/cocoa/DownloadCocoa.mm: Added.
(WebKit::Download::start):
(WebKit::Download::resume):
(WebKit::Download::cancel):
(WebKit::Download::platformInvalidate):
* Shared/Downloads/ios/DownloadIOS.mm:
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::resume):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resumeDownload):
* UIProcess/WebProcessPool.h:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoFix the debug region overlays for RTL documents
simon.fraser@apple.com [Thu, 17 Dec 2015 06:56:55 +0000 (06:56 +0000)]
Fix the debug region overlays for RTL documents
https://bugs.webkit.org/show_bug.cgi?id=152372

Reviewed by Darin Adler.

Fix document overlays to use document coordinates when painting, which requires
translating the CTM, and counter-translating the dirtyRect by the scroll origin.
This is only non-zero for RTL documents.

While doing this, I noticed that the scroll origin was misplaced by the scrollbar
width when using overlay scrollbars. Fix by using occupiedWidth/Height() in
ScrollView::updateScrollbars(). I was not able to make a test for this change.

* page/FrameView.cpp:
(WebCore::FrameView::adjustViewSize):
* page/PageOverlay.cpp:
(WebCore::PageOverlay::drawRect):
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):

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

5 years ago[iOS] Block loading external stylesheets in the Content-Disposition: attachment sandbox
aestes@apple.com [Thu, 17 Dec 2015 05:53:40 +0000 (05:53 +0000)]
[iOS] Block loading external stylesheets in the Content-Disposition: attachment sandbox
https://bugs.webkit.org/show_bug.cgi?id=152375
<rdar://problem/22020902>

Reviewed by Darin Adler.

Source/WebCore:

Tests: http/tests/contentdispositionattachmentsandbox/at-import-stylesheets-disabled.html
       http/tests/contentdispositionattachmentsandbox/external-stylesheets-disabled.html
       http/tests/contentdispositionattachmentsandbox/xml-stylesheet-processing-instructions-disabled.html

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest): Moved handling of CachedResource::MainResource to canRequestInContentDispositionAttachmentSandbox().
(WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox): In addition to handling CachedResource::MainResource,
added handling for CachedResource::CSSStyleSheet. Added a FIXME asking whether we should handle other types of resources, too.
* loader/cache/CachedResourceLoader.h:

LayoutTests:

* http/tests/contentdispositionattachmentsandbox/at-import-stylesheets-disabled-expected.txt: Added.
* http/tests/contentdispositionattachmentsandbox/at-import-stylesheets-disabled.html: Added.
* http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled-expected.txt:
* http/tests/contentdispositionattachmentsandbox/external-stylesheets-disabled-expected.txt: Added.
* http/tests/contentdispositionattachmentsandbox/external-stylesheets-disabled.html: Added.
* http/tests/contentdispositionattachmentsandbox/resources/at-import-stylesheets-frame.php: Added.
* http/tests/contentdispositionattachmentsandbox/resources/external-stylesheets-frame.php: Added.
* http/tests/contentdispositionattachmentsandbox/resources/xml-stylesheet-processing-instructions-frame.php: Added.
* http/tests/contentdispositionattachmentsandbox/xml-stylesheet-processing-instructions-disabled-expected.txt: Added.
* http/tests/contentdispositionattachmentsandbox/xml-stylesheet-processing-instructions-disabled.html: Added.

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

5 years agoARM64 MacroAssembler improperly reuses data temp register in test32() and test8(...
msaboff@apple.com [Thu, 17 Dec 2015 05:02:49 +0000 (05:02 +0000)]
ARM64 MacroAssembler improperly reuses data temp register in test32() and test8() calls
https://bugs.webkit.org/show_bug.cgi?id=152370

Reviewed by Benjamin Poulain.

Changed the test8/32(Address, Register) flavors to use the memoryTempRegister for loading the value
att Address so that it doesn't collide with the subsequent use of dataTempRegister by the
test32(Register, Register) function.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::test32):
(JSC::MacroAssemblerARM64::test8):

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

5 years agoPerf Dashboard v3 UI doesn't show recent data points on v2 UI
rniwa@webkit.org [Thu, 17 Dec 2015 04:26:32 +0000 (04:26 +0000)]
Perf Dashboard v3 UI doesn't show recent data points on v2 UI
https://bugs.webkit.org/show_bug.cgi?id=152368

Reviewed by Chris Dumez.

The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):

!clusterEndTime && useCache && +data['lastModified'] < self._lastModified

Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.

* public/api/measurement-set.php:
(MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
* tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
of the last modified date depends on when tests run, we can't assert it to be a certain value.

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

5 years agoViewportConfiguration functions should return a bool to say if anything changed
simon.fraser@apple.com [Thu, 17 Dec 2015 03:48:34 +0000 (03:48 +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@194206 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoREGRESSION (r191299): Zoom gestures are enabled even if allowsMagnification=NO
timothy_horton@apple.com [Thu, 17 Dec 2015 03:04:11 +0000 (03:04 +0000)]
REGRESSION (r191299): Zoom gestures are enabled even if allowsMagnification=NO
https://bugs.webkit.org/show_bug.cgi?id=152373
<rdar://problem/23931998>

Reviewed by Simon Fraser.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
Don't pass the event on to ViewGestureController if we shouldn't handle it,
just like we would have done in magnifyWithEvent before.

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

5 years agoGive kernel VM some hints about non-live memory-cached resources.
akling@apple.com [Thu, 17 Dec 2015 02:55:02 +0000 (02:55 +0000)]
Give kernel VM some hints about non-live memory-cached resources.
<https://webkit.org/b/152362>

Reviewed by Geoffrey Garen.

Source/WebCore:

When a file-backed CachedResource has no live clients left, and is only being kept alive
because it's cached in the MemoryCache, give the OS a hint that we probably won't need
that memory very soon.

Normally this doesn't do anything, but in case the system comes under memory pressure,
the kernel can prioritize eviction of such clean-but-unneeded pages, which prevents us
from throwing other processes under the bus too soon.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::deleteIfPossible):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::hintMemoryNotNeededSoon):
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::hintMemoryNotNeededSoon):

Source/WTF:

Add an API to OSAllocator for hinting to the OS that a range of memory
is not expected to be used anytime soon.

* wtf/OSAllocator.h:
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::hintMemoryNotNeededSoon):
* wtf/OSAllocatorWin.cpp:
(WTF::OSAllocator::hintMemoryNotNeededSoon):
* wtf/Platform.h:

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

5 years agoReduce PassRefPtr uses in dom - 2
gyuyoung.kim@webkit.org [Thu, 17 Dec 2015 02:13:00 +0000 (02:13 +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@194201 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agorun-webkit-tests fails to delete Simulator device during cleanup
commit-queue@webkit.org [Thu, 17 Dec 2015 01:16:49 +0000 (01:16 +0000)]
run-webkit-tests fails to delete Simulator device during cleanup
https://bugs.webkit.org/show_bug.cgi?id=152363

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

* Scripts/webkitpy/xcode/simulator.py:
(Simulator.delete_device): Ensure that device is Shutdown before deleting it.

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

5 years agov3 UI should show and link the build number on charts page
rniwa@webkit.org [Thu, 17 Dec 2015 00:37:50 +0000 (00:37 +0000)]
v3 UI should show and link the build number on charts page
https://bugs.webkit.org/show_bug.cgi?id=152359

Reviewed by Chris Dumez.

Show the hyperlinked build number in the v3 UI.

* public/v3/models/builder.js:
(Builder): Renamed _buildURL to _buildUrlTemplate.
(Builder.prototype.urlForBuild): Added.
* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView):
(ChartPaneStatusView.prototype.render): Added the code to render hyperlinked build number when one is available.
(ChartPaneStatusView.prototype.computeChartStatusLabels): Store currentPoint's measurement object as _buildInfo
if the current point is set by an indicator (not by a selection).

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

5 years agoREGRESSION (r194125): Crashes in touchesEndedWithEvent on occasion when interacting...
timothy_horton@apple.com [Thu, 17 Dec 2015 00:13:27 +0000 (00:13 +0000)]
REGRESSION (r194125): Crashes in touchesEndedWithEvent on occasion when interacting with the page
https://bugs.webkit.org/show_bug.cgi?id=152366
<rdar://problem/23929672>

Reviewed by Beth Dakin.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::touchesEndedWithEvent):
(WebKit::WebViewImpl::touchesCancelledWithEvent):
NSTouch identifiers aren't pointer-comparable. We need to use isEqual to
compare them and find the ones to remove.

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

5 years agoFTL B3 should support switches
fpizlo@apple.com [Wed, 16 Dec 2015 23:59:13 +0000 (23:59 +0000)]
FTL B3 should support switches
https://bugs.webkit.org/show_bug.cgi?id=152360

Reviewed by Geoffrey Garen.

I implemented this because I was hoping it would less us run V8/crypto, but instead it just led
me to file a fun bug: https://bugs.webkit.org/show_bug.cgi?id=152365.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::check):
(JSC::FTL::Output::switchInstruction):
(JSC::FTL::Output::ret):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::ftlUnreachable):
(JSC::FTL::DFG::LowerDFGToLLVM::crash):

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

5 years agoSimplify isOverlayScrollbar() logic
simon.fraser@apple.com [Wed, 16 Dec 2015 23:41:05 +0000 (23:41 +0000)]
Simplify isOverlayScrollbar() logic
https://bugs.webkit.org/show_bug.cgi?id=152357

Reviewed by Beth Dakin.

Replace code that checks for isOverlayScrollbar() explicitly with calls to new
occupiedWidth()/occupiedHeight() functions on Scrollbar, which do the overlay
scrollbar check internally.

Add ScrollableArea::scrollbarIntrusion() which returns an IntSize with the occupiedWidth
and occupiedHeight of any scrollbars, and use it in a few places.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
(WebCore::ScrollView::calculateOverhangAreasForPainting):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollbarIntrusion):
(WebCore::ScrollableArea::visibleContentRectInternal):
* platform/ScrollableArea.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::occupiedWidth):
(WebCore::Scrollbar::occupiedHeight):
* platform/Scrollbar.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::visibleContentRectInternal):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::verticalScrollbarWidth):

Source/WebKit2:

* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::updateScrollbars):
(WebKit::PDFPlugin::maximumScrollPosition):

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

5 years agoFix internal Windows build
achristensen@apple.com [Wed, 16 Dec 2015 23:36:49 +0000 (23:36 +0000)]
Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=152364
Source/JavaScriptCore:

Reviewed by Tim Horton.

* JavaScriptCore.vcxproj/JavaScriptCore.proj:

Source/WebCore:

rdar://problem/23928759

Reviewed by Tim Horton.

* WebCore.vcxproj/WebCore.proj:

Source/WebKit:

rdar://problem/23928759

Reviewed by Tim Horton.

* WebKit.vcxproj/WebKit.proj:

Source/WTF:

rdar://problem/23928759

Reviewed by Tim Horton.

* WTF.vcxproj/WTF.proj:

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

5 years agoImprove JSObject::put performance
fpizlo@apple.com [Wed, 16 Dec 2015 22:39:13 +0000 (22:39 +0000)]
Improve JSObject::put performance
https://bugs.webkit.org/show_bug.cgi?id=152347

Reviewed by Geoffrey Garen.

This adds a new benchmark called dynbench, which just uses the C++ API to create, modify, and
query objects. This also adds some optimizations to make the JSObject::put code faster by making
it inlinable in places that really need the performance, like JITOperations and LLIntSlowPaths.
Inlining it is optional because the put() method is large. If you want it inlined, call
putInline(). There's a putInline() variant of both JSObject::put() and JSValue::put().

This is up to a 20% improvement for JSObject::put calls that get inlined all the way (like from
JITOperations and the new benchmark) and it's also a speed-up, albeit a smaller one, for
JSObject::put calls that don't get inlined (i.e. those from the DOM and the JSC C++ library code).
Specific speed-ups are as follows. Note that "dynamic context" means that we told PutPropertySlot
that we're not a static put_by_id, which turns off some type inference.

Get By Id: 2% faster
Put By Id Replace: 23% faster
Put By Id Transition + object allocation: 11% faster
Get By Id w/ dynamic context: 5% faster
Put By Id Replace w/ dynamic context: 25% faster
Put By Id Transition + object allocation w/ dynamic context: 10% faster

* JavaScriptCore.xcodeproj/project.pbxproj:
* dynbench.cpp: Added.
(JSC::benchmarkImpl):
(main):
* jit/CallFrameShuffler32_64.cpp:
* jit/CallFrameShuffler64.cpp:
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ClassInfo.h:
(JSC::ClassInfo::hasStaticProperties):
* runtime/ConsoleClient.cpp:
* runtime/CustomGetterSetter.h:
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
(JSC::addErrorInfoAndGetBytecodeOffset): Deleted.
* runtime/GetterSetter.h:
(JSC::asGetterSetter):
* runtime/JSCInlines.h:
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::put):
(JSC::JSValue::putInternal):
(JSC::JSValue::putByIndex):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::putByIndex):
* runtime/JSObject.h:
(JSC::JSObject::getVectorLength):
(JSC::JSObject::inlineGetOwnPropertySlot):
(JSC::JSObject::get):
(JSC::JSObject::putDirectInternal):

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

5 years agoModern IDB: Refactor UniqueIDBDatabase in preparation for consolidation open and...
beidson@apple.com [Wed, 16 Dec 2015 21:52:11 +0000 (21:52 +0000)]
Modern IDB: Refactor UniqueIDBDatabase in preparation for consolidation open and delete requests.
https://bugs.webkit.org/show_bug.cgi?id=152355

Reviewed by Alex Christensen.

No new tests (Refactor, existing tests pass).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

5 years agov3 dashboard doesn't stretch charts to fill the screen
rniwa@webkit.org [Wed, 16 Dec 2015 21:50:09 +0000 (21:50 +0000)]
v3 dashboard doesn't stretch charts to fill the screen
https://bugs.webkit.org/show_bug.cgi?id=152354

Reviewed by Chris Dumez.

The bug was caused by a workaround to avoid canvas stretching table cell too much.

Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
so that it does not contribute to the intrinsic/natural width of the cell.

* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
(TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
the canvas does not resize with it.
* public/v3/pages/dashboard-page.js:
(DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.

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

5 years agoModern IDB: Have IDBServerOperations know whether they represent an open or delete...
beidson@apple.com [Wed, 16 Dec 2015 20:29:09 +0000 (20:29 +0000)]
Modern IDB: Have IDBServerOperations know whether they represent an open or delete request.
https://bugs.webkit.org/show_bug.cgi?id=152351

Reviewed by NOBODY (OOPS!).

No new tests (Refactor, existing tests pass).

* Modules/indexeddb/IndexedDB.h:

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBClient::IDBOpenDBRequest::createOpenRequest):
(WebCore::IDBClient::IDBOpenDBRequest::IDBOpenDBRequest):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.h:
(WebCore::IDBClient::IDBRequest::requestType):

* Modules/indexeddb/server/IDBServerOperation.cpp:
(WebCore::IDBServer::IDBServerOperation::isOpenRequest):
(WebCore::IDBServer::IDBServerOperation::isDeleteRequest):
* Modules/indexeddb/server/IDBServerOperation.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::isOpenRequest):
(WebCore::IDBRequestData::isDeleteRequest):

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

5 years agoBuild fix when using NETWORK_SESSION after r193972.
achristensen@apple.com [Wed, 16 Dec 2015 20:06:00 +0000 (20:06 +0000)]
Build fix when using NETWORK_SESSION after r193972.

Rubber-stamped by Joseph Pecoraro.

Renamed NetworkSessionDelegate to WKNetworkSessionDelegate to conform to the
newly-enforced style rule in check-for-inappropriate-objc-class-names.

* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(toNSURLSessionAuthChallengeDisposition):
(-[WKNetworkSessionDelegate initWithNetworkSession:]):
(WebKit::NetworkSession::NetworkSession):
(-[NetworkSessionDelegate initWithNetworkSession:]): Deleted.

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

5 years agoAdding timout expectation to one more wpt test that I missed in the last commit.
ryanhaddad@apple.com [Wed, 16 Dec 2015 19:49:52 +0000 (19:49 +0000)]
Adding timout expectation to one more wpt test that I missed in the last commit.
https://bugs.webkit.org/show_bug.cgi?id=152335

Unreviewed test gardening.

* TestExpectations:

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

5 years agoAdding timeout to wpt TestExpectations due to WK/WPT testharness.js issues.
ryanhaddad@apple.com [Wed, 16 Dec 2015 19:25:47 +0000 (19:25 +0000)]
Adding timeout to wpt TestExpectations due to WK/WPT testharness.js issues.
https://bugs.webkit.org/show_bug.cgi?id=152335

Unreviewed test gadening.

* TestExpectations:

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

5 years agoWork around a bug in LLVM by flipping the unification order
fpizlo@apple.com [Wed, 16 Dec 2015 19:10:55 +0000 (19:10 +0000)]
Work around a bug in LLVM by flipping the unification order
https://bugs.webkit.org/show_bug.cgi?id=152341
rdar://problem/23920749

Reviewed by Mark Lam.

* dfg/DFGUnificationPhase.cpp:
(JSC::DFG::UnificationPhase::run):

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 16 Dec 2015 19:02:42 +0000 (19:02 +0000)]
Versioning.

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

5 years agoRe-baseline pageoverlay/overlay* tests for mac-wk1
ryanhaddad@apple.com [Wed, 16 Dec 2015 19:02:09 +0000 (19:02 +0000)]
Re-baseline pageoverlay/overlay* tests for mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=152338

Unreviewed test gardening.

* platform/mac-wk1/pageoverlay/overlay-large-document-expected.txt:
* platform/mac-wk1/pageoverlay/overlay-large-document-scrolled-expected.txt:
* platform/mac-wk1/pageoverlay/overlay-small-frame-mouse-events-expected.txt:

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

5 years agoBuild fix after r194156.
achristensen@apple.com [Wed, 16 Dec 2015 18:52:04 +0000 (18:52 +0000)]
Build fix after r194156.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):

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

5 years agoModern IDB: Combine handling open requests, delete requests, and transactions into...
beidson@apple.com [Wed, 16 Dec 2015 18:43:54 +0000 (18:43 +0000)]
Modern IDB: Combine handling open requests, delete requests, and transactions into one timer.
https://bugs.webkit.org/show_bug.cgi?id=152344

Reviewed by Alex Christensen.

No new tests (Refactor, existing tests pass).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
(WebCore::IDBServer::UniqueIDBDatabase::invokeDeleteOrRunTransactionTimer): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

5 years agoBuild fix after r194156.
achristensen@apple.com [Wed, 16 Dec 2015 18:38:26 +0000 (18:38 +0000)]
Build fix after r194156.

* platform/network/cf/ResourceHandleCFNet.cpp:
* platform/network/mac/ResourceHandleMac.mm:
Include definition of _TimingDataOptionsEnableW3CNavigationTiming

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

5 years agoAdd "explicit operator bool" to ScratchRegisterAllocator::PreservedState
sbarati@apple.com [Wed, 16 Dec 2015 18:36:20 +0000 (18:36 +0000)]
Add "explicit operator bool" to ScratchRegisterAllocator::PreservedState
https://bugs.webkit.org/show_bug.cgi?id=152337

Reviewed by Mark Lam.

If we have a default constructor, we should also have a way
to tell if a PreservedState is invalid.

* jit/ScratchRegisterAllocator.cpp:
(JSC::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
(JSC::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
* jit/ScratchRegisterAllocator.h:
(JSC::ScratchRegisterAllocator::PreservedState::PreservedState):
(JSC::ScratchRegisterAllocator::PreservedState::operator bool):

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

5 years ago[mac-wk2] fast/events force click tests crashing
timothy_horton@apple.com [Wed, 16 Dec 2015 18:32:22 +0000 (18:32 +0000)]
[mac-wk2] fast/events force click tests crashing
https://bugs.webkit.org/show_bug.cgi?id=152339

Reviewed by Beth Dakin.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]):
Set the NSEvent's _type member in addition to overriding -type,
because there are assertions in touch event handling code that depend on it.

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

5 years agoImplement Web Timing when using NETWORK_SESSION
achristensen@apple.com [Wed, 16 Dec 2015 18:25:00 +0000 (18:25 +0000)]
Implement Web Timing when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=152285

Reviewed by Darin Adler.

Source/WebCore:

Covered by existing tests.

* WebCore.xcodeproj/project.pbxproj:
* platform/network/ResourceHandle.h:
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::encode):
Moved setCollectsTimingData from ResourceHandle to ResourceLoadTiming.h to be shared
with WebKit2 when using NETWORK_SESSION, which does not use ResourceHandle.
Also moved getConnectionTimingData to copyTimingData in ResourceLoadTiming for the same reason.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
Use the proper definition of _TimingDataOptionsEnableW3CNavigationTiming.
* platform/network/cocoa/ResourceLoadTiming.mm: Added.
(WebCore::timingValue):
(WebCore::copyTimingData):
Moved from getConnectionTimingData, and use objectForKey instead of valueForKey,
and check to see if there is no object in the dictionary with the given key.
This should never happen with the current CFNetwork implementation, but it's good to check dictionaries.
(WebCore::setCollectsTimingData):
Use _collectTimingDataWithOptions, which should be a slight performance improvement on Mavericks
because we are not collecting unused timing data. Hooray!
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::getConnectionTimingData):
(WebCore::ResourceHandle::setCollectsTimingData): Deleted.
* platform/spi/cf/CFNetworkSPI.h:
* platform/spi/cocoa/NSURLConnectionSPI.h:
Moved definitions of SPI to proper SPI headers.

Source/WebKit2:

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSession::NetworkSession):
Use functions moved to ResourceLoadTiming.h.  setCollectsTimingData is for Mavericks, _timingDataOptions is post-Mavericks.

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

5 years agoLegacy style scrollbars do not change color when you mouse over them if you
bdakin@apple.com [Wed, 16 Dec 2015 18:08:57 +0000 (18:08 +0000)]
Legacy style scrollbars do not change color when you mouse over them if you
are scrolled
https://bugs.webkit.org/show_bug.cgi?id=152319
-and corresponding-
rdar://problem/23317668

Reviewed by Darin Adler.

The scrollbar’s frameRect is in window coordinates, so we need to compare a
point in window coordinates when we test this.

The call to convertFromContainingWindow does not return a point in view
coordinates, so we should not call the variable viewPoint. We do still need
to call it for subframes. convertFromContainingWindow doesn’t do anything for
the root ScrollView (for Mac WK2 at least).
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollbarAtPoint):

HitTestLocation is in contents coordinates. It needs to be converted to
window coordinates
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):

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

5 years agoMark additional wpt tests as flaky due to WK/WPT testharness.js
youenn.fablet@crf.canon.fr [Wed, 16 Dec 2015 18:04:37 +0000 (18:04 +0000)]
Mark additional wpt tests as flaky due to WK/WPT testharness.js
https://bugs.webkit.org/show_bug.cgi?id=152335

Unreviewed.

LayoutTests/imported/w3c:

Rebasing according WPT testharness.js current version.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/XMLHttpRequest/responsetype-expected.txt:
* web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

LayoutTests:

* TestExpectations: marking some more tests as flaky.

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

5 years ago[JSC] fix error message for eval/arguments CoverInitializedName in strict code
commit-queue@webkit.org [Wed, 16 Dec 2015 17:49:14 +0000 (17:49 +0000)]
[JSC] fix error message for eval/arguments CoverInitializedName in strict code
https://bugs.webkit.org/show_bug.cgi?id=152304

Patch by Caitlin Potter <caitp@igalia.com> on 2015-12-16
Reviewed by Darin Adler.

Because the error was originally classified as indicating a Pattern, the
error in AssignmentPattern parsing causes the reported message to revert to
the original Expression error message, which in this case is incorrect.

This change modifies the implementation of the strict code
error slightly, and reclassifies the error to prevent the message revert,
which improves the clarity of the message overall.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseAssignmentElement):
(JSC::Parser<LexerType>::parseDestructuringPattern):
* parser/Parser.h:
(JSC::Parser::ExpressionErrorClassifier::reclassifyExpressionError):
(JSC::Parser::reclassifyExpressionError):
* tests/stress/destructuring-assignment-syntax.js:

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

5 years agoREGRESSION: Web Inspector: console.dir(...) should force allowing object expansion
commit-queue@webkit.org [Wed, 16 Dec 2015 17:46:02 +0000 (17:46 +0000)]
REGRESSION: Web Inspector: console.dir(...) should force allowing object expansion
https://bugs.webkit.org/show_bug.cgi?id=152328

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

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameter):
Propogate the force parameter down.

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

5 years agoWeb Inspector: Improve copy of console messages with multiple arguments - console...
commit-queue@webkit.org [Wed, 16 Dec 2015 17:44:10 +0000 (17:44 +0000)]
Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2)
https://bugs.webkit.org/show_bug.cgi?id=152330

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

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.toClipboardString):
Copy the inner text of the extra arguments list as well, for
console messages with multiple objects. Rearrange the sections
that, if there is a stack trace it comes at the end after
multiple arguments. If there is no stack trace, include the
location info next to the top line, before multiple arguments.

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

5 years agoWeb Inspector: Improve copy of console message containing Array and Map output
commit-queue@webkit.org [Wed, 16 Dec 2015 17:42:11 +0000 (17:42 +0000)]
Web Inspector: Improve copy of console message containing Array and Map output
https://bugs.webkit.org/show_bug.cgi?id=152329

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

Introduce a real space in the content instead of style specific
margins so the existing copy/paste mechanism (innerText)
will have spaces between index/key and value.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name): Deleted.
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
(WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeArrayIndexTreeElement):
* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted.
* UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
(WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment):
(WebInspector.ObjectTreeMapEntryTreeElement):
* UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
(WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreeSetIndexTreeElement):

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

5 years agoWeb Inspector: Typing object literal in the console causes a parse error
commit-queue@webkit.org [Wed, 16 Dec 2015 17:40:15 +0000 (17:40 +0000)]
Web Inspector: Typing object literal in the console causes a parse error
https://bugs.webkit.org/show_bug.cgi?id=141737

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

Source/WebInspectorUI:

Provide a convenience in console evaluations for JSON object like input.
If the console input starts with '{' and ends with '}' wrap the input
in parenthesis to force evaluation as an expression.

For example, input "{a:1}" would be convenience wrapped to "({a:1})"
and produce the expected object. This helps avoid the unusual treatment
of "{a:1}" as program containing a labeled statement, which is often
not what the user expects. And in more realistic cases, like "{a:1, b:2}",
produce a SyntaxError.

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Detect and convenience wrap the given expression.

LayoutTests:

* inspector/controller/runtime-controller-expected.txt: Added.
* inspector/controller/runtime-controller.html: Added.

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

5 years agoUncaught Exception View has undefined exception URL
commit-queue@webkit.org [Wed, 16 Dec 2015 17:38:17 +0000 (17:38 +0000)]
Uncaught Exception View has undefined exception URL
https://bugs.webkit.org/show_bug.cgi?id=152327

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-12-16
Reviewed by Darin Adler.

* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleUncaughtException):
Use ErrorEvent's filename property, not url which is undefined.

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