WebKit-https.git
4 years agoModern IDB: Implement IDBIndex get/getKey/count requests.
beidson@apple.com [Thu, 5 Nov 2015 20:23:02 +0000 (20:23 +0000)]
Modern IDB: Implement IDBIndex get/getKey/count requests.
https://bugs.webkit.org/show_bug.cgi?id=150910

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/index-get-count-basic.html
       storage/indexeddb/modern/index-get-count-failures.html

* Modules/indexeddb/IndexedDB.h:

* Modules/indexeddb/client/IDBAnyImpl.cpp:
(WebCore::IDBClient::IDBAny::IDBAny):
(WebCore::IDBClient::IDBAny::modernIDBIndex):
* Modules/indexeddb/client/IDBAnyImpl.h:
(WebCore::IDBClient::IDBAny::create):
(WebCore::IDBClient::IDBAny::createUndefined):

* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::doCount):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::doGet):
(WebCore::IDBClient::IDBIndex::getKey):
(WebCore::IDBClient::IDBIndex::doGetKey):
* Modules/indexeddb/client/IDBIndexImpl.h:
(WebCore::IDBClient::IDBIndex::info):

* Modules/indexeddb/client/IDBObjectStoreImpl.h:
(WebCore::IDBClient::IDBObjectStore::isDeleted):
(WebCore::IDBClient::IDBObjectStore::modernTransaction):

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::createCount):
(WebCore::IDBClient::IDBRequest::createGet):
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::sourceObjectStoreIdentifier):
(WebCore::IDBClient::IDBRequest::sourceIndexIdentifier):
(WebCore::IDBClient::IDBRequest::requestedIndexRecordType):
(WebCore::IDBClient::IDBRequest::setResultToUndefined):
* Modules/indexeddb/client/IDBRequestImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::requestGetValue):
(WebCore::IDBClient::IDBTransaction::requestGetKey):
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBClient::IDBTransaction::requestCount):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/client/TransactionOperation.cpp:
(WebCore::IDBClient::TransactionOperation::TransactionOperation):
* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::TransactionOperation::indexIdentifier):
(WebCore::IDBClient::TransactionOperation::indexRecordType):

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getCount):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::valueForKeyRange):
(WebCore::IDBServer::MemoryIndex::countForKeyRange):
* Modules/indexeddb/server/MemoryIndex.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::countForKeyRange):
(WebCore::IDBServer::MemoryObjectStore::indexValueForKeyRange):
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetIndexRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::performGetCount):
(WebCore::IDBServer::UniqueIDBDatabase::performGetRecord): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
(WebCore::IDBRequestData::objectStoreIdentifier):
(WebCore::IDBRequestData::indexIdentifier):
(WebCore::IDBRequestData::indexRecordType):
* Modules/indexeddb/shared/IDBRequestData.h:

LayoutTests:

* storage/indexeddb/modern/index-get-count-basic-expected.txt: Added.
* storage/indexeddb/modern/index-get-count-basic.html: Added.
* storage/indexeddb/modern/index-get-count-failures-expected.txt: Added.
* storage/indexeddb/modern/index-get-count-failures.html: Added.

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

4 years agoRebaselining fast/text/tatechuyoko.html on win
ryanhaddad@apple.com [Thu, 5 Nov 2015 19:55:27 +0000 (19:55 +0000)]
Rebaselining fast/text/tatechuyoko.html on win
https://bugs.webkit.org/show_bug.cgi?id=150935

Unreviewed test gardening.

* platform/win/fast/text/tatechuyoko-expected.txt:

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

4 years agoRename the variable to avoid conflict between the variable and the parameter.
commit-queue@webkit.org [Thu, 5 Nov 2015 19:40:01 +0000 (19:40 +0000)]
Rename the variable to avoid conflict between the variable and the parameter.
https://bugs.webkit.org/show_bug.cgi?id=150019.

Patch by Zhuo Li <zachli@apple.com> on 2015-11-05
Reviewed by Dan Bernstein.

* platform/cocoa/SearchPopupMenuCocoa.mm:
(WebCore::typeCheckedRecentSearchesRemovingRecentSearchesAddedAfterDate): Rename `date`
to `dateAdded` so that it does not have the same name as the parameter passed in.

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

4 years agoWeb Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt...
commit-queue@webkit.org [Thu, 5 Nov 2015 19:35:22 +0000 (19:35 +0000)]
Web Inspector: ⌥⌘C sometimes ends ups up opening inspector without console prompt focused
https://bugs.webkit.org/show_bug.cgi?id=150916

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

When first opening the inspector we hide the window until the document
is mostly ready / loaded. However once displaying the window WK2 would
set the initial focus, clearing what we already had and focusing the
first natural element (tabindex dictates the toolbar). Workaround this
by detecting when the document becomes visible and then focusing the
console prompt.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.handleEvent):

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

4 years agoWeb Inspector: Clean up InjectedScript uses
commit-queue@webkit.org [Thu, 5 Nov 2015 19:31:35 +0000 (19:31 +0000)]
Web Inspector: Clean up InjectedScript uses
https://bugs.webkit.org/show_bug.cgi?id=150921

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

Source/JavaScriptCore:

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::wrapCallFrames):
* inspector/InjectedScript.h:
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::initialize): Deleted.
* inspector/InjectedScriptBase.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::didCreateInjectedScript):
* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected):
* inspector/InjectedScriptModule.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::currentCallFrames):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebCore:

* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::injectIfNeeded):
(WebCore::CommandLineAPIModule::CommandLineAPIModule):
* inspector/CommandLineAPIModule.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::didCreateInjectedScript):
* inspector/WebInjectedScriptManager.h:

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

4 years agoWeb Inspector: Toolbar "Inspect Node" button not highlighting when active
commit-queue@webkit.org [Thu, 5 Nov 2015 19:27:37 +0000 (19:27 +0000)]
Web Inspector: Toolbar "Inspect Node" button not highlighting when active
https://bugs.webkit.org/show_bug.cgi?id=150938

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

* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph):
(.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph):
Copy the navigation-bar button activated styles to toolbar.

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

4 years ago[WK2] Clean up / Modernize NetworkResourceLoader
cdumez@apple.com [Thu, 5 Nov 2015 19:25:29 +0000 (19:25 +0000)]
[WK2] Clean up / Modernize NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=150922

Reviewed by Andreas Kling.

Clean up / Modernize NetworkResourceLoader.

* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):
(WebKit::NetworkResourceLoader::validateCacheEntry):
(WebKit::NetworkResourceLoader::messageSenderConnection):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader): Deleted.
(WebKit::NetworkResourceLoader::didReceiveBuffer): Deleted.
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry): Deleted.
(WebKit::NetworkResourceLoader::consumeSandboxExtensions): Deleted.
(WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/NetworkDiskCacheMonitor.h:

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

4 years agoWeb Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate...
commit-queue@webkit.org [Thu, 5 Nov 2015 19:22:42 +0000 (19:22 +0000)]
Web Inspector: Put ScriptDebugServer into InspectorEnvironment and cleanup duplicate references
https://bugs.webkit.org/show_bug.cgi?id=150869

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

Source/JavaScriptCore:

ScriptDebugServer (JSC::Debugger) is being used by more and more agents
for instrumentation into JavaScriptCore. Currently the ScriptDebugServer
is owned by DebuggerAgent subclasses that make their own ScriptDebugServer
subclass. As more agents want to use it there was added boilerplate.
Instead, put the ScriptDebugServer in the InspectorEnvironment (Controllers).
Then each agent can access it during construction through the environment.

Do the same clean up for RuntimeAgent::globalVM, which is now just a
duplication of InspectorEnvironment::vm.

* inspector/InspectorEnvironment.h:
Add scriptDebugServer().

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::scriptDebugServer):
Own the JSGlobalObjectScriptDebugServer.

* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::enable):
(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::setBreakpointsActive):
(Inspector::InspectorDebuggerAgent::isPaused):
(Inspector::InspectorDebuggerAgent::setSuppressAllPauses):
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
(Inspector::InspectorDebuggerAgent::removeBreakpoint):
(Inspector::InspectorDebuggerAgent::continueToLocation):
(Inspector::InspectorDebuggerAgent::resolveBreakpoint):
(Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::cancelPauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::resume):
(Inspector::InspectorDebuggerAgent::stepOver):
(Inspector::InspectorDebuggerAgent::stepInto):
(Inspector::InspectorDebuggerAgent::stepOut):
(Inspector::InspectorDebuggerAgent::setPauseOnExceptions):
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):
(Inspector::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::breakProgram):
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
(Inspector::setPauseOnExceptionsState):
(Inspector::InspectorRuntimeAgent::parse):
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
(Inspector::InspectorRuntimeAgent::setTypeProfilerEnabledState):
(Inspector::InspectorRuntimeAgent::getBasicBlocks):
Use VM and ScriptDebugServer passed during construction.

* inspector/agents/JSGlobalObjectDebuggerAgent.h:
* inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
(Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval):
(Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent): Deleted.
One special case needed by this subclass as a convenience to access the global object.

* inspector/agents/JSGlobalObjectRuntimeAgent.h:
* inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
(Inspector::JSGlobalObjectRuntimeAgent::globalVM): Deleted.
This virtual method is no longer needed, the base class has everything now.

Source/WebCore:

Refactoring covered by existing tests.

* WebCore.xcodeproj/project.pbxproj:
Privately export PageScriptDebuggerAgent.h due to InspectorController.h needing it.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::scriptDebugServer):
Own the PageScriptDebugServer.

* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::scriptDebugServer):
Own the WorkerScriptDebugServer.

(WebCore::WorkerInspectorController::vm):
Use the VM accessed through the worker global object.

* inspector/InspectorWebAgentBase.h:
(WebCore::InspectorAgentBase::InspectorAgentBase):
Given Web agents a m_environment convenience to access the InspectorEnvironment.

* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::timestamp):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::timestamp):
(WebCore::InspectorPageAgent::enable):
(WebCore::InspectorPageAgent::frameStartedLoading):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::InspectorTimelineAgent::timestamp):
(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::setPageScriptDebugServer): Deleted.
* inspector/InspectorTimelineAgent.h:
Use the InspectorEnvironment for VM / ScriptDebugServer.

* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::PageDebuggerAgent): Deleted.
(WebCore::PageDebuggerAgent::scriptDebugServer): Deleted.
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::globalVM): Deleted.
* inspector/PageRuntimeAgent.h:
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::globalVM): Deleted.
* inspector/WorkerRuntimeAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): Deleted.
(WebCore::WorkerDebuggerAgent::scriptDebugServer): Deleted.
Remove now unnecessary subclass code.

(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
One more special case for accessing Worker properties from the ScriptDebugServer.

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

4 years agoRegression(r192038): Safari cannot load any pages
cdumez@apple.com [Thu, 5 Nov 2015 18:30:51 +0000 (18:30 +0000)]
Regression(r192038): Safari cannot load any pages
https://bugs.webkit.org/show_bug.cgi?id=150937
<rdar://problem/23413859>

Reviewed by Alex Christensen.

Make sure we use the current "defersLoading" state instead of the
original one when constructing / initializing the NetworkLoad.

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

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

4 years agoMarking http/tests/contentextensions/async-xhr-onerror.html as flaky on mac-wk2
ryanhaddad@apple.com [Thu, 5 Nov 2015 17:19:05 +0000 (17:19 +0000)]
Marking http/tests/contentextensions/async-xhr-onerror.html as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=150577

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years ago[GLib] Avoid gint64, std::chrono::microseconds overflows in RunLoop::TimerBase
zandobersek@gmail.com [Thu, 5 Nov 2015 14:51:07 +0000 (14:51 +0000)]
[GLib] Avoid gint64, std::chrono::microseconds overflows in RunLoop::TimerBase
https://bugs.webkit.org/show_bug.cgi?id=150930

Reviewed by Carlos Garcia Campos.

In RunLoop::TimerBase::start(), avoid overflowing the std::chrono::microseconds
value in case the passed-in fire interval (in seconds) is too large (e.g. when
std::chrono::microseconds::max() is used as the desired interval). This is
achieved by using the passed-in fire interval, converted in microseconds, only
if the value of this interval is smaller than std::chrono::microseconds::max().

In RunLoop::TimerBase::updateReadyTime(), the zero-delay is still considered a
short cut, but we use G_MAXINT64 in case the sum of the current time and the
desired fire interval (now in microseconds) would overflow.

* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::TimerBase::updateReadyTime):
(WTF::RunLoop::TimerBase::start):

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

4 years ago[Streams API] Shield implementation from user mangling Promise.reject and resolve...
calvaris@igalia.com [Thu, 5 Nov 2015 14:01:13 +0000 (14:01 +0000)]
[Streams API] Shield implementation from user mangling Promise.reject and resolve methods
https://bugs.webkit.org/show_bug.cgi?id=150895

Reviewed by Youenn Fablet.

Source/JavaScriptCore:

Keep Promise.resolve and reject also as internal slots for the Promise constructor given that there is no way to
retrieve the former implementation if the user decides to replace it. This allows to safely create vended
promises even if the user changes the constructor methods.

* runtime/JSPromiseConstructor.h:
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::addOwnInternalSlots): Added to include @reject and @resolve.
(JSC::JSPromiseConstructor::create): Call addOwnInternalSlots.

Source/WebCore:

Replace all calls to @Promise.resolve and @Promise.reject with their internal slot counterparts. This way we
ensure that if the user replaces those constructor methods, our implementation still works.

Test: streams/streams-promises.html.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
(cancel):
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader):
(cancelReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(cancel):
(read):
(closed):
* Modules/streams/StreamInternals.js:
(promiseInvokeOrNoop):
(promiseInvokeOrFallbackOrNoop):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
(close):
(write):
(closed):
(ready):

LayoutTests:

* streams/streams-promises.html: Improved some style issues. Added tests about changing Promise.resolve and
reject.
* streams/streams-promises-expected.txt: Added expectations.

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

4 years agoGive ResourceUsageOverlay a stacked chart for dirty memory per category.
akling@apple.com [Thu, 5 Nov 2015 11:36:15 +0000 (11:36 +0000)]
Give ResourceUsageOverlay a stacked chart for dirty memory per category.
<https://webkit.org/b/150905>

Reviewed by Antti Koivisto.

Refactored the data gathering to operate on "memory categories", a memory category is at
the top level a VM tag, e.g the VM tag for our bmalloc allocator. It can in turn have
sub-categories, e.g one for the GC heap, which allocates all of its blocks through bmalloc
and thus end up in the same tag.

Each category also has a hard-coded color, which is used consistently in labels and charts.

Also went back to drawing everything with CGContext directly instead of GraphicsContext
since the latter is not thread safe.

* page/ResourceUsageOverlay.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(-[WebOverlayLayer drawInContext:]):
(WebCore::RingBuffer::last):
(WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
(WebCore::ResourceUsageData::ResourceUsageData):
(WebCore::showText):
(WebCore::drawGraphLabel):
(WebCore::drawCpuHistory):
(WebCore::drawGCHistory):
(WebCore::drawMemHistory):
(WebCore::drawSlice):
(WebCore::drawMemoryPie):
(WebCore::ResourceUsageOverlay::platformDraw):
(WebCore::categoryForVMTag):
(WebCore::runSamplerThread):
(WebCore::drawPlate): Deleted.
(WebCore::fontCascade): Deleted.
(WebCore::ResourceUsageOverlay::draw): Deleted.

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

4 years agoHaving page overlays causes iframe to get composited
simon.fraser@apple.com [Thu, 5 Nov 2015 09:54:13 +0000 (09:54 +0000)]
Having page overlays causes iframe to get composited
https://bugs.webkit.org/show_bug.cgi?id=150920

Reviewed by Tim Horton.

When deciding whether to enable compositing for a subframe, don't consult the
main frame's overlay count. Only do that for the main frame.

(WebCore::RenderLayerCompositor::updateCompositingLayers):

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

4 years ago[css-grid] Support positioned grid children
rego@igalia.com [Thu, 5 Nov 2015 09:30:30 +0000 (09:30 +0000)]
[css-grid] Support positioned grid children
https://bugs.webkit.org/show_bug.cgi?id=150837

Reviewed by Darin Adler.

Source/WebCore:

According to the spec positioned grid children have
a special behavior described at:
https://drafts.csswg.org/css-grid/#abspos

The idea is that for positioned children the containing block will
correspond to the padding edges of the grid container, unless the
grid placement properties are defined.
This not only affects to positioned grid items (direct children) but
also to any descendant where the containing block is the grid container.

In order to manage this special behavior, the patch is overriding
RenderBlock::layoutPositionedObject() to calculate the position and size
depending on the grid-placement properties.

RenderBox class has some changes to calculate the containing block width
and height for positioned objects (using the override value). And also
to compute their static position.

Finally, the positioned items are not taken into account in all the
different grid methods, in order that they do not interfere the layout
of the grid as stated in the spec.

Tests: fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html
       fast/css-grid-layout/absolute-positioning-grid-container-parent.html
       fast/css-grid-layout/grid-positioned-items-background.html
       fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html
       fast/css-grid-layout/grid-positioned-items-implicit-grid.html
       fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html
       fast/css-grid-layout/grid-sizing-positioned-items.html
       fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks.html
       fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html

* rendering/OrderIterator.cpp:
(WebCore::OrderIterator::next): Fix method to avoid issues if no items
are added to the iterator.
* rendering/RenderBlock.h: Mark layoutPositionedObject() as virtual.
* rendering/RenderBox.cpp: Add new maps for inline/block extra offsets.
(WebCore::RenderBox::~RenderBox): Clear the new maps.
(WebCore::RenderBox::extraInlineOffset): Extra offset that we need to
apply to positioned grid children due to the grid placement properties.
(WebCore::RenderBox::extraBlockOffset): Ditto.
(WebCore::RenderBox::setExtraInlineOffset):
(WebCore::RenderBox::setExtraBlockOffset):
(WebCore::RenderBox::clearExtraInlineAndBlockOffests):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Use the
override containing block if any.
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned): Ditto.
(WebCore::RenderBox::computePositionedLogicalWidth): Add the extra
offset if it's a positioned element.
(WebCore::RenderBox::computePositionedLogicalHeight): Ditto.
* rendering/RenderBox.h:
(WebCore::RenderBox::scrollbarLogicalWidth): Add utility method.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock): Clear grid after layout positioned
objects instead of at the end of layoutGridItems().
(WebCore::RenderGrid::placeItemsOnGrid): Ignore positioned items.
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
(WebCore::RenderGrid::layoutGridItems): Ditto.
(WebCore::RenderGrid::prepareChildForPositionedLayout): Set static
position for positioned items.
(WebCore::RenderGrid::layoutPositionedObject): Calculate position and
size for positioned children.
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild): Calculate
extra offset and breadth for positioned children.
* rendering/RenderGrid.h:
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::isNonExistentNamedLineOrArea): Make it a
public static method.
(WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle): Fix calls
to isNonExistentNamedLineOrArea().
(WebCore::resolveGridPositionFromStyle): Ditto.
* rendering/style/GridResolvedPosition.h: Make
isNonExistentNamedLineOrArea() public.

LayoutTests:

* fast/css-grid-layout/absolute-positioning-grid-container-containing-block-expected.txt: Added.
* fast/css-grid-layout/absolute-positioning-grid-container-containing-block.html: Added.
* fast/css-grid-layout/absolute-positioning-grid-container-parent-expected.txt: Added.
* fast/css-grid-layout/absolute-positioning-grid-container-parent.html: Added.
* fast/css-grid-layout/grid-positioned-items-background-expected.html: Added.
* fast/css-grid-layout/grid-positioned-items-background.html: Added.
* fast/css-grid-layout/grid-positioned-items-implicit-grid-expected.txt: Added.
* fast/css-grid-layout/grid-positioned-items-implicit-grid-line-expected.txt: Added.
* fast/css-grid-layout/grid-positioned-items-implicit-grid-line.html: Added.
* fast/css-grid-layout/grid-positioned-items-implicit-grid.html: Added.
* fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line-expected.txt: Added.
* fast/css-grid-layout/grid-positioned-items-unknown-named-grid-line.html: Added.
* fast/css-grid-layout/grid-sizing-positioned-items-expected.txt: Added.
* fast/css-grid-layout/grid-sizing-positioned-items.html: Added.
* fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks-expected.txt: Added.
* fast/css-grid-layout/positioned-grid-items-should-not-create-implicit-tracks.html: Added.
* fast/css-grid-layout/positioned-grid-items-should-not-take-up-space-expected.txt: Added.
* fast/css-grid-layout/positioned-grid-items-should-not-take-up-space.html: Added.
* fast/css-grid-layout/resources/grid.css: Added some common CSS classes.

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

4 years ago[EFL] Add try_close API to handle beforeunload event
ryuan.choi@navercorp.com [Thu, 5 Nov 2015 09:29:40 +0000 (09:29 +0000)]
[EFL] Add try_close API to handle beforeunload event
https://bugs.webkit.org/show_bug.cgi?id=150705

Reviewed by Gyuyoung Kim.

Source/WebKit2:

This patch adds ewk_view_try_close to have a chance to call confirm callback
for beforeunload event while destryoing webview.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_try_close):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(EWK2ViewTest::beforeUnloadCallback):
(EWK2ViewTest::windowCloseCallback):
(TEST_F): Added test case for ewk_view_try_close.

Tools:

* MiniBrowser/efl/main.c:
(on_window_deletion):
Call ewk_view_try_close instead of removing object directly.
(window_create): Fixed that passes wrong data.

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

4 years ago[GTK] Epiphany with Debug mode compiled WebKitGtk+ 2.10.3 hits ASSERT_ARG on willEnte...
carlosgc@webkit.org [Thu, 5 Nov 2015 07:12:45 +0000 (07:12 +0000)]
[GTK] Epiphany with Debug mode compiled WebKitGtk+ 2.10.3 hits ASSERT_ARG on willEnterAcceleratedCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=150620

Reviewed by Mario Sanchez Prada.

WillEnterAcceleratedCompositingMode message is sent when the
LayerTreeHost is created in the Web Process. This can happen while
there's still a DidUpdateBackingStoreState pending, in which case
we are receiving the new backingStoreStateID, but the current one
hasn't been updated yet.

* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
Fix the ASSERT to check the given ID is alt least the next one,
and remove the early return since it's valid to not enter AC mode
in the end after the WillEnter message.

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

4 years ago[JSC] Add B3-to-Air lowering for the shift opcodes
benjamin@webkit.org [Thu, 5 Nov 2015 05:50:02 +0000 (05:50 +0000)]
[JSC] Add B3-to-Air lowering for the shift opcodes
https://bugs.webkit.org/show_bug.cgi?id=150919

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

* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::rshift64):
(JSC::MacroAssemblerX86_64::urshift64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::shrq_CLr):
* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::shlConstant):
(JSC::B3::Const32Value::sShrConstant):
(JSC::B3::Const32Value::zShrConstant):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::shlConstant):
(JSC::B3::Const64Value::sShrConstant):
(JSC::B3::Const64Value::zShrConstant):
* b3/B3Const64Value.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::tryShl):
(JSC::B3::Air::LowerToAir::trySShr):
(JSC::B3::Air::LowerToAir::tryZShr):
* b3/B3LoweringMatcher.patterns:
* b3/B3Opcode.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::shlConstant):
(JSC::B3::Value::sShrConstant):
(JSC::B3::Value::zShrConstant):
* b3/B3Value.h:
* b3/air/AirInstInlines.h:
(JSC::B3::Air::isShiftValid):
(JSC::B3::Air::isRshift32Valid):
(JSC::B3::Air::isRshift64Valid):
(JSC::B3::Air::isUrshift32Valid):
(JSC::B3::Air::isUrshift64Valid):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testShlArgs):
(JSC::B3::testShlImms):
(JSC::B3::testShlArgImm):
(JSC::B3::testShlArgs32):
(JSC::B3::testShlImms32):
(JSC::B3::testShlArgImm32):
(JSC::B3::testSShrArgs):
(JSC::B3::testSShrImms):
(JSC::B3::testSShrArgImm):
(JSC::B3::testSShrArgs32):
(JSC::B3::testSShrImms32):
(JSC::B3::testSShrArgImm32):
(JSC::B3::testZShrArgs):
(JSC::B3::testZShrImms):
(JSC::B3::testZShrArgImm):
(JSC::B3::testZShrArgs32):
(JSC::B3::testZShrImms32):
(JSC::B3::testZShrArgImm32):
(JSC::B3::run):

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

4 years agoWeb Inspector: Load markers persist in timeline ruler after resetting recording
mattbaker@apple.com [Thu, 5 Nov 2015 04:09:25 +0000 (04:09 +0000)]
Web Inspector: Load markers persist in timeline ruler after resetting recording
https://bugs.webkit.org/show_bug.cgi?id=150918

Reviewed by Joseph Pecoraro.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype._recordingReset):
Clears ruler markers on recording reset. Adds current time marker back.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._recordingReset):
Clears ruler markers on recording reset. Adds current time marker back.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.clearMarkers):
Added method to clear markers and marker elements.

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

4 years agoWeb Inspector: Uncaught Exception opening inspector - TypeError: Attempted to assign...
mattbaker@apple.com [Thu, 5 Nov 2015 04:07:51 +0000 (04:07 +0000)]
Web Inspector: Uncaught Exception opening inspector - TypeError: Attempted to assign to readonly property.
https://bugs.webkit.org/show_bug.cgi?id=150913

Reviewed by Timothy Hatcher.

Fix invalid call to BackForwardEntry.prototype.contentView set.

* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.replaceContentView):
Replace each BackForwardEntry matching the old content view with a new entry.

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

4 years agoWeb Inspector: Uncaught exception mousing over CSS resource
nvasilyev@apple.com [Thu, 5 Nov 2015 03:21:11 +0000 (03:21 +0000)]
Web Inspector: Uncaught exception mousing over CSS resource
https://bugs.webkit.org/show_bug.cgi?id=150917

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processMarkedToken): Add missing parameter.

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

4 years agoRemove "defer" from the scripts' references in the graphics benchmark home page
commit-queue@webkit.org [Thu, 5 Nov 2015 03:16:07 +0000 (03:16 +0000)]
Remove "defer" from the scripts' references in the graphics benchmark home page
https://bugs.webkit.org/show_bug.cgi?id=150915

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-04
Reviewed by Simon Fraser.

It causes the benchmark to be very flakey.

* Animometer/runner/animometer.html:

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

4 years agoREGRESSION (r191499): 100% repro crash under _prepareForMoveToWindow:
timothy_horton@apple.com [Thu, 5 Nov 2015 00:59:48 +0000 (00:59 +0000)]
REGRESSION (r191499): 100% repro crash under _prepareForMoveToWindow:
https://bugs.webkit.org/show_bug.cgi?id=150912
<rdar://problem/23402116>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView _prepareForMoveToWindow:withCompletionHandler:]):

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

4 years agoRegression(r192038): Crash in ~SandboxExtension()
cdumez@apple.com [Thu, 5 Nov 2015 00:54:25 +0000 (00:54 +0000)]
Regression(r192038): Crash in ~SandboxExtension()
https://bugs.webkit.org/show_bug.cgi?id=150898

Reviewed by Alex Christensen.

We are seeing a couple of crashes under ~SandboxExtension() on the bots
after ~SandboxExtension(). The reason is that the SandBoxExtension is
still in use (useCount > 0) when destroyed. This happens due to a bug
in setDefersLoading() that could cause the load to get started more
than once and thus the SandboxExtension to be consumed more than once.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):

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

4 years agoNull dereference loading Blink layout test editing/execCommand/delete-hidden-crash...
jiewen_tan@apple.com [Thu, 5 Nov 2015 00:46:34 +0000 (00:46 +0000)]
Null dereference loading Blink layout test editing/execCommand/delete-hidden-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149289
<rdar://problem/22746352>

Reviewed by Enrica Casucci.

Source/WebCore:

This is a merge of Blink r176497:
https://codereview.chromium.org/340713003

It ensures the start & end positions in DeleteSelectionCommand::initializePositionData
are editable.

Test: editing/execCommand/delete-hidden-crash.html

* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializePositionData):
* editing/Editor.cpp:
(WebCore::Editor::advanceToNextMisspelling):
* editing/htmlediting.cpp:
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
These two functions don't make any sense to return VisiblePosition. Change them
to return Position instead. Since there is a viable conversion from Position to
VisiblePosition. It should not change the behavior of any other components depending
on it.
* editing/htmlediting.h:

LayoutTests:

* editing/execCommand/delete-hidden-crash-expected.txt: Added.
* editing/execCommand/delete-hidden-crash.html: Added.

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

4 years agoRuby base ending in tatechuyoko forces a line break before the tatechuyoko
mmaxfield@apple.com [Thu, 5 Nov 2015 00:26:26 +0000 (00:26 +0000)]
Ruby base ending in tatechuyoko forces a line break before the tatechuyoko
https://bugs.webkit.org/show_bug.cgi?id=150883

Reviewed by Darin Adler.

Source/WebCore:

Asking the width of a 0-length tatechuyoko should return 0.

Test: fast/text/ruby-tatechuyoko.html

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::width):

LayoutTests:

* platform/mac/fast/text/international/text-combine-image-test-expected.txt: Updated.
* platform/mac/fast/text/tatechuyoko-expected.txt: Ditto.
* fast/text/ruby-tatechuyoko-expected.html: Added.
* fast/text/ruby-tatechuyoko.html: Added.

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

4 years agoUpdating expectations for fast/forms/HTMLOptionElement_label03.html on win
ryanhaddad@apple.com [Thu, 5 Nov 2015 00:01:43 +0000 (00:01 +0000)]
Updating expectations for fast/forms/HTMLOptionElement_label03.html on win
https://bugs.webkit.org/show_bug.cgi?id=150909

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoSource/WebInspectorUI:
commit-queue@webkit.org [Wed, 4 Nov 2015 23:59:48 +0000 (23:59 +0000)]
Source/WebInspectorUI:
Web Inspector: WebInspector.Color should support #rgba and #rrggbbaa syntax
https://bugs.webkit.org/show_bug.cgi?id=150894

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

Support for hex with alpha color syntax.

* UserInterface/Models/Color.js:
(WebInspector.Color.fromString):
(WebInspector.Color.prototype.nextFormat):
(WebInspector.Color.prototype.copy):
(WebInspector.Color.prototype.toString):
(WebInspector.Color.prototype._toShortHEXAlphaString):
(WebInspector.Color.prototype._toHEXAlphaString):
Add support for new hex syntax. Address some minor issues
like case insensitivity and extra comma separate values.

* UserInterface/Views/CodeMirrorTextMarkers.js:
This prevent trailing hex characters from showing up
when cycling through color variants.

* UserInterface/Views/CodeMirrorAdditions.js:
When CodeMirror stops treating the new values as error
this will give them our hex-color styles.

LayoutTests:
Web Inspector: Support #rgba and #rrggbbaa syntax
https://bugs.webkit.org/show_bug.cgi?id=150894

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

* inspector/model/color-expected.txt: Added.
* inspector/model/color.html: Added.

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

4 years agoFix crashing and flaky UIScriptController-based tests in fast/events/ios
wenson_hsieh@apple.com [Wed, 4 Nov 2015 23:34:47 +0000 (23:34 +0000)]
Fix crashing and flaky UIScriptController-based tests in fast/events/ios
https://bugs.webkit.org/show_bug.cgi?id=150901
<rdar://problem/23261499>

Reviewed by Simon Fraser.

Tools:

Clear out zooming and keyboard-related callbacks after uiScriptComplete has been invoked. This prevents
later tests from calling into code which previous tests attached to these callbacks and causing
WebKitTestRunner to crash due to accessing a deallocated UIScriptController.

* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::platformClearAllCallbacks):
(WTR::UIScriptController::uiScriptComplete):
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::platformClearAllCallbacks):

LayoutTests:

Several changes to tests in fast/events/ios that address flaky behavior when running these tests.
Removes an unnecessary (and flaky) check for the initial innerHeight in
keyboard-should-not-trigger-resize.html, refactors unscalable-viewport-clicks-on-doubletap.html to
send successive taps like the other fast-clicking tests, and adjusts input-value-after-oninput.html
to no longer break if typing in an input autocapitalizes the first letter.

* fast/events/ios/input-value-after-oninput.html:
* fast/events/ios/keyboard-should-not-trigger-resize-expected.txt:
* fast/events/ios/keyboard-should-not-trigger-resize.html:
* fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt:
* fast/events/ios/unscalable-viewport-clicks-on-doubletap.html:

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

4 years ago[WK2] Extract networking code out of NetworkResourceLoader class to improve reusability
cdumez@apple.com [Wed, 4 Nov 2015 22:39:15 +0000 (22:39 +0000)]
[WK2] Extract networking code out of NetworkResourceLoader class to improve reusability
https://bugs.webkit.org/show_bug.cgi?id=150898

Reviewed by Alex Christensen.

Extract networking code out of NetworkResourceLoader class to improve
reusability (will be used for speculative revalidation) and simplify
the NetworkResourceLoader.

* CMakeLists.txt:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkLoad.cpp: Added.
* NetworkProcess/NetworkLoad.h: Added.
* NetworkProcess/NetworkLoadClient.h: Added.
* NetworkProcess/NetworkLoadParameters.cpp: Added.
* NetworkProcess/NetworkLoadParameters.h: Added.
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/NetworkLoadMac.mm: Added.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoLink preview doesn't work on XHTML pages with Content-Type header as
bdakin@apple.com [Wed, 4 Nov 2015 22:34:01 +0000 (22:34 +0000)]
Link preview doesn't work on XHTML pages with Content-Type header as
`application/xhtml+xml`
https://bugs.webkit.org/show_bug.cgi?id=150740
-and corresponding-
rdar://problem/23063585

Reviewed by Darin Adler.

My original fix for this bug was incorrect in the presence of non-HTML
elements that happen to have the same local name as HTML elements. Since it
seems silly to have all of this logic in the UI process to determine whether
to treat something as a link or an image, this patch fixes the bug by adding
isLink and isImage to InteractionInformationAtPosition in order to simplify
everything. The only remaining uses of clickableElementName just use it to
compare against isNull and isEmpty, so that can be a bool too.

Add isLink and isImage, and turn clickableElementName into isClickableElement
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:

Use the new isLink, isImage, and isClickableElement
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _actionForLongPress]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

Set everything correctly.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

4 years agoFix crashing fast-clicking WK2 tests on iOS
wenson_hsieh@apple.com [Wed, 4 Nov 2015 22:21:25 +0000 (22:21 +0000)]
Fix crashing fast-clicking WK2 tests on iOS
https://bugs.webkit.org/show_bug.cgi?id=150896
<rdar://problem/23344491>

Reviewed by Simon Fraser.

Source/WebKit2:

In order for the modified fast-clicking tests to pass, we can't allow hit-testing to
find the tap highlight view. See the Radar for more UIKit-specific descriptions.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showTapHighlight]):

LayoutTests:

Fix the fast-clicking tests by making them fire an exact number of times rather than
sending continuously until a minimum number of clicks are fired. This causes us to
avoid crashing during the following test when the marker events corresponding to single
taps fired after the test has completed have been handled.

* css3/touch-action/touch-action-manipulation-fast-clicks.html:
* fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html:

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

4 years agoB3 should be able to compile a Check
fpizlo@apple.com [Wed, 4 Nov 2015 22:15:00 +0000 (22:15 +0000)]
B3 should be able to compile a Check
https://bugs.webkit.org/show_bug.cgi?id=150878

Reviewed by Saam Barati.

The Check opcode in B3 is going to be our main OSR exit mechanism. It is a stackmap
value, so you can pass it any number of additional arguments, and you will get to find
out how those arguments are represented at the point that the value lands in the machine
code. Unlike a Patchpoint, a Check branches on a value, with the goal of supporting full
compare/branch fusion. The stackmap's generator runs in an out-of-line path to which
that branch is linked.

This change fills in the glue necessary to compile a Check and it includes a simple
test of this functionality. That test also happens to check that such simple code will
never use callee-saves, which I think is sensible.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::append):
(JSC::B3::Air::LowerToAir::ensureSpecial):
(JSC::B3::Air::LowerToAir::fillStackmap):
(JSC::B3::Air::LowerToAir::tryStackSlot):
(JSC::B3::Air::LowerToAir::tryPatchpoint):
(JSC::B3::Air::LowerToAir::tryCheck):
(JSC::B3::Air::LowerToAir::tryUpsilon):
* b3/B3LoweringMatcher.patterns:
* b3/testb3.cpp:
(JSC::B3::testSimplePatchpoint):
(JSC::B3::testSimpleCheck):
(JSC::B3::run):

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

4 years agoFix endless OSR exits when creating a rope that contains an object that ToPrimitive...
keith_miller@apple.com [Wed, 4 Nov 2015 21:46:10 +0000 (21:46 +0000)]
Fix endless OSR exits when creating a rope that contains an object that ToPrimitive's to a number.
https://bugs.webkit.org/show_bug.cgi?id=150583

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Before we assumed that the result of ToPrimitive on any object was a string.
This had a couple of negative effects. First, the result ToPrimitive on an
object can be overridden to be any primitive type. In fact, as of ES6, ToPrimitive,
when part of a addition expression, will type hint a number value. Second, even after
repeatedly exiting with a bad type we would continue to think that the result
of ToPrimitive would be a string so we continue to convert StrCats into MakeRope.

The fix is to make Prediction Propagation match the behavior of Fixup and move
canOptimizeStringObjectAccess to DFGGraph.

* bytecode/SpeculatedType.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion):
(JSC::DFG::FixupPhase::fixupToPrimitive):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
(JSC::DFG::FixupPhase::isStringPrototypeMethodSane): Deleted.
(JSC::DFG::FixupPhase::canOptimizeStringObjectAccess): Deleted.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::isStringPrototypeMethodSane):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
* dfg/DFGGraph.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::resultOfToPrimitive):
(JSC::DFG::resultOfToPrimitive): Deleted.

* bytecode/SpeculatedType.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::attemptToForceStringArrayModeByToStringConversion):
(JSC::DFG::FixupPhase::fixupToPrimitive):
(JSC::DFG::FixupPhase::fixupToStringOrCallStringConstructor):
(JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
(JSC::DFG::FixupPhase::isStringPrototypeMethodSane): Deleted.
(JSC::DFG::FixupPhase::canOptimizeStringObjectAccess): Deleted.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::isStringPrototypeMethodSane):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
* dfg/DFGGraph.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::resultOfToPrimitive):
(JSC::DFG::resultOfToPrimitive): Deleted.
* tests/stress/string-rope-with-custom-valueof.js: Added.
(catNumber):
(number.valueOf):
(catBool):
(bool.valueOf):
(catUndefined):
(undef.valueOf):
(catRandom):
(random.valueOf):

LayoutTests:

Created a regression test to look for OSRing in string concatenation when
valueOf returns a non-string primitive.

* js/regress/script-tests/string-rope-with-object.js: Added.
(body.f):
(body.String.prototype.valueOf):
(body.bar.valueOf):
(body):
* js/regress/string-rope-with-object-expected.txt: Added.
* js/regress/string-rope-with-object.html: Added.

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

4 years agoRebaselining LayoutTest fast/text/international/thai-baht-space.html on win
ryanhaddad@apple.com [Wed, 4 Nov 2015 21:28:14 +0000 (21:28 +0000)]
Rebaselining LayoutTest fast/text/international/thai-baht-space.html on win
https://bugs.webkit.org/show_bug.cgi?id=150865

Unreviewed test gardening.

* platform/win/fast/text/international/thai-baht-space-expected.txt:

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

4 years agoUpdate the name of a Mail class that we hardcode
timothy_horton@apple.com [Wed, 4 Nov 2015 20:50:52 +0000 (20:50 +0000)]
Update the name of a Mail class that we hardcode
https://bugs.webkit.org/show_bug.cgi?id=150879
<rdar://problem/23384627>

Reviewed by Alexey Proskuryakov.

* editing/cocoa/HTMLConverter.mm:
(_WebMessageDocumentClass):

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

4 years agoPageLoadState::will/didChangeProcessIsResponsive should call observers
andersca@apple.com [Wed, 4 Nov 2015 19:38:19 +0000 (19:38 +0000)]
PageLoadState::will/didChangeProcessIsResponsive should call observers
https://bugs.webkit.org/show_bug.cgi?id=150870

Reviewed by Dan Bernstein.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::willChangeProcessIsResponsive):
(WebKit::PageLoadState::didChangeProcessIsResponsive):

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

4 years agoSpeculative build fix. Missed the checkin for the changelog with r192029.
ryanhaddad@apple.com [Wed, 4 Nov 2015 19:21:46 +0000 (19:21 +0000)]
Speculative build fix. Missed the checkin for the changelog with r192029.

* UIProcess/API/Cocoa/WKWebView.mm:

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

4 years agogit-svn-id: https://svn.webkit.org/repository/webkit/trunk@192029 268f45cc-cd09-0410...
ryanhaddad@apple.com [Wed, 4 Nov 2015 19:03:42 +0000 (19:03 +0000)]
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 years ago[MediaStream] A RealtimeMediaSource should begin producing data automatically
eric.carlson@apple.com [Wed, 4 Nov 2015 18:55:07 +0000 (18:55 +0000)]
[MediaStream] A RealtimeMediaSource should begin producing data automatically
https://bugs.webkit.org/show_bug.cgi?id=150851
rdar://problem/23380636

A RealtimeMediaSource should be producing data unless it is muted, which is not under the
control of the application, so a local source should begin producing data as soon as it
is added to a stream. Remove "producing data" and "enabled" observer callbacks because
they don't provide anything that the "muted" callback already provides.

Reviewed by Jer Noble.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::trackProducingDataChanged): Deleted.
* Modules/mediastream/MediaStreamTrack.h:

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::didCreateStream): Tell sources to begin producing data.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Don't call stream->startProducingData,
  it isn't necessary.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setReadyState): Call characteristicsChanged
  when the readyState changes.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::trackProducingDataChanged): Deleted.
* platform/mediastream/MediaStreamPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::sourceProducingDataChanged): Deleted.
(WebCore::MediaStreamTrackPrivate::sourceEnabledChanged): Deleted.
* platform/mediastream/MediaStreamTrackPrivate.h:

* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::isProducingDataDidChange): Deleted.
(WebCore::RealtimeMediaSource::setEnabled): Deleted.
* platform/mediastream/RealtimeMediaSource.h:

* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection): !enabled() -> muted().

* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Don't call isProducingDataDidChange..

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::processNewFrame): !enabled() -> muted().

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

4 years ago[iOS] <video> elements without audio tracks should not interrupt music
jer.noble@apple.com [Wed, 4 Nov 2015 18:48:47 +0000 (18:48 +0000)]
[iOS] <video> elements without audio tracks should not interrupt music
https://bugs.webkit.org/show_bug.cgi?id=149888

Reviewed by Eric Carlson.

Source/WebCore:

Tests: TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm

Only set the AVAudioSession category to "playback" when the video element in question has an
audio track.

Add a new PlatformMediaSessionClient method called canProduceAudio(), overridden in HTMLMediaElement
and AudioContext, which is checked when updating the AudioSession category in
PlatformMediaSessionManager::updateSessionState().

* Modules/webaudio/AudioContext.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
* html/HTMLMediaElement.h:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::activeAudioSessionRequired):
(WebCore::PlatformMediaSession::setCanProduceAudio):
* platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSession::canProduceAudio):
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::canProduceAudio):
(WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged):
(WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
* platform/audio/PlatformMediaSessionManager.h:
* platform/audio/mac/MediaSessionManagerMac.cpp:
(PlatformMediaSessionManager::updateSessionState):

Tools:

Add tests to ensure that the AVAudioSession category is correctly set when playing
back media both with and without audio tracks.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ios/AudioSessionCategoryIOS.mm: Added.
(-[AudioSessionCategoryUIWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/ios/video-with-audio.html: Added.
* TestWebKitAPI/Tests/WebKit/ios/video-with-audio.mp4: Added.
* TestWebKitAPI/Tests/WebKit/ios/video-without-audio.html: Added.
* TestWebKitAPI/Tests/WebKit/ios/video-without-audio.mp4: Added.

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

4 years agoFixing test added with r192022
ryanhaddad@apple.com [Wed, 4 Nov 2015 18:40:41 +0000 (18:40 +0000)]
Fixing test added with r192022
https://bugs.webkit.org/show_bug.cgi?id=150670

Unreviewed test gardening.

* accessibility/list-item-with-pseudo-element-crash.html:

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

4 years agoiOS test results are not visible on the flakiness dashboard
ap@apple.com [Wed, 4 Nov 2015 18:12:12 +0000 (18:12 +0000)]
iOS test results are not visible on the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=150884

Reviewed by Darin Adler.

Re-generated builders.jsonp using generate_builders_json.py.

I think that this is all that's needed for basic support. There is more work needed
to display test expectations, but that's already mostly broken even for Mac.

* TestResultServer/static-dashboards/builders.jsonp:

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

4 years agoRemove bogus global internal functions for properties and prototype retrieval
calvaris@igalia.com [Wed, 4 Nov 2015 18:09:18 +0000 (18:09 +0000)]
Remove bogus global internal functions for properties and prototype retrieval
https://bugs.webkit.org/show_bug.cgi?id=150892

Reviewed by Darin Adler.

Global @getOwnPropertyNames and @getPrototypeOf point to the floor function, so it is bogus dead code.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Removed global @getOwnPropertyNames and @getPrototypeOf.

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

4 years agoAccept 8 and 4 value hex colors (#RRGGBBAA)
dino@apple.com [Wed, 4 Nov 2015 17:49:46 +0000 (17:49 +0000)]
Accept 8 and 4 value hex colors (#RRGGBBAA)
https://bugs.webkit.org/show_bug.cgi?id=150853
<rdar://problem/23380930>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Delete these tests. The have been updated in the original repository,
so we'll get the new versions soon. Meanwhile, they are covered by
other tests.

* canvas/2d.fillStyle.parse.invalid.hex4-expected.txt: Removed.
* canvas/2d.fillStyle.parse.invalid.hex4.html: Removed.
* canvas/2d.fillStyle.parse.invalid.hex8-expected.txt: Removed.
* canvas/2d.fillStyle.parse.invalid.hex8.html: Removed.
* css/css-color-3/t421-rgb-hex-parsing-f.xht:

Source/WebCore:

CSS Color Level 4 allows #RGBA and #RRGGBBAA values
for colors.

Test: fast/css/hex-colors.html

* platform/graphics/Color.cpp:
(WebCore::parseHexColorInternal): Update the color parsing for
the new syntax.

LayoutTests:

Add a new test for hex colors that covers 4 and 8 value forms.
Also update existing tests now that the syntax has changed.

For the deleted philip tests, they are now in the W3C web-latform-tests import.

* canvas/philip/tests/2d.fillStyle.parse.invalid.hex4-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex4.html: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex8-expected.txt: Removed.
* canvas/philip/tests/2d.fillStyle.parse.invalid.hex8.html: Removed.
* fast/css/hex-colors-expected.txt: Added.
* fast/css/hex-colors.html: Added.
* fast/css/invalid-hex-color-expected.txt:
* fast/css/invalid-hex-color.html:
* fast/css/invalid-predefined-color-expected.txt:
* fast/css/invalid-predefined-color.html:
* fast/css/script-tests/invalid-predefined-color.js:
* fast/dom/attribute-legacy-colors-expected.txt:
* fast/dom/script-tests/attribute-legacy-colors.js:
* svg/dom/rgb-color-parser-expected.txt:
* svg/dom/rgb-color-parser.html:

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

4 years ago[AX] WebProcess from WebKitGtk+ 2.10.0 compiled in Debug mode hits ASSERT on textUnde...
mario@webkit.org [Wed, 4 Nov 2015 14:46:19 +0000 (14:46 +0000)]
[AX] WebProcess from WebKitGtk+ 2.10.0 compiled in Debug mode hits ASSERT on textUnderElement
https://bugs.webkit.org/show_bug.cgi?id=150670

Source/WebCore:

Patch by Mario Sanchez Prada <mario@webkit.org> on 2015-11-04
Reviewed by Chris Fleizach.

Move the ASSERTs stating that the render tree is stable before using the
TextIterator to their right place, in AccessibilityRenderObject, so that
we don't crash in debug builds in cases when this condition is irrelevant.

Test: accessibility/gtk/list-item-with-pseudo-element-crash.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement): Removed ASSERTs.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Added ASSERTs, but
only before calling plainText and using the right document for the node.

LayoutTests:

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2015-11-04
Reviewed by Chris Fleizach.

* accessibility/list-item-with-pseudo-element-crash-expected.txt: Added.
* accessibility/list-item-with-pseudo-element-crash.html: Added.

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

4 years ago[Streams API] Shield streams against user replacing the Promise constructor
calvaris@igalia.com [Wed, 4 Nov 2015 11:15:51 +0000 (11:15 +0000)]
[Streams API] Shield streams against user replacing the Promise constructor
https://bugs.webkit.org/show_bug.cgi?id=150887

Reviewed by Youenn Fablet.

Source/WebCore:

With this rework, we shield the Streams implementation against the user doing something like "Promise =
function() { /* do garbage */ };".

Test: streams/streams-promises.html.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
(cancel):
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader):
(cancelReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(cancel):
(read):
(closed):
* Modules/streams/StreamInternals.js:
(promiseInvokeOrNoop):
(promiseInvokeOrFallbackOrNoop):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
(close):
(write):
(closed):
(ready):
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):

LayoutTests:

* streams/streams-promises-expected.txt: Added.
* streams/streams-promises.html: Added.

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

4 years agoSVG: hit testing region for <text> elements is incorrect
commit-queue@webkit.org [Wed, 4 Nov 2015 10:40:17 +0000 (10:40 +0000)]
SVG: hit testing region for <text> elements is incorrect
https://bugs.webkit.org/show_bug.cgi?id=150838

Patch by Antoine Quint <graouts@apple.com> on 2015-11-04
Reviewed by Dean Jackson.

Source/WebCore:

Hit testing for SVG <text> elements was using the same code as hit testing
for CSS-rendered elements. However, in SVG, text elements should only hit
test based on their character cells, not the rectangular bounds of the
element, see section 16.6 of the SVG 1.1 specification:

http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty

So we now hit test each SVGTextFragment of each SVGInlineTextBox
that is a child of an SVGRootInlineBox to correctly find whether the
provided HitTestLocation is contained within a character cell.

Tests: svg/hittest/text-dominant-baseline-hanging.svg
       svg/hittest/text-multiple-dx-values.svg
       svg/hittest/text-with-multiple-tspans.svg
       svg/hittest/text-with-text-node-and-content-elements.svg
       svg/hittest/text-with-text-node-only.svg
       svg/hittest/text-with-text-path.svg

* rendering/RootInlineBox.h:
Remove the final keyword since nodeAtPoint() may now be subclassed as
implemented in SVGRootInlineBox.

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::nodeAtPoint):
Iterate over the SVGTextFragments to look for a fragment containing the
provided HitTestLocation.

* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::nodeAtPoint):
* rendering/svg/SVGRootInlineBox.h:
Override RootInlineBox::nodeAtPoint() to delegate hit testing to the
children inline boxes.

LayoutTests:

* svg/hittest/text-dominant-baseline-hanging-expected.svg: Added.
* svg/hittest/text-dominant-baseline-hanging.svg: Added.
* svg/hittest/text-multiple-dx-values-expected.svg: Added.
* svg/hittest/text-multiple-dx-values.svg: Added.
* svg/hittest/text-with-multiple-tspans-expected.svg: Added.
* svg/hittest/text-with-multiple-tspans.svg: Added.
* svg/hittest/text-with-text-node-and-content-elements-expected.svg: Added.
* svg/hittest/text-with-text-node-and-content-elements.svg: Added.
* svg/hittest/text-with-text-node-only-expected.svg: Added.
* svg/hittest/text-with-text-node-only.svg: Added.
* svg/hittest/text-with-text-path-expected.svg: Added.
* svg/hittest/text-with-text-path.svg: Added.

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

4 years ago[GStreamer] Use RunLoop::Timer for ready state timer in MediaPlayerPrivateGStreamer
carlosgc@webkit.org [Wed, 4 Nov 2015 10:13:27 +0000 (10:13 +0000)]
[GStreamer] Use RunLoop::Timer for ready state timer in MediaPlayerPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=150836

Reviewed by Philippe Normand.

We don't really need a GThreadSafeMainLoopSource for this simple timer.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::loadingFailed):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

4 years agoUnreviewed.
calvaris@igalia.com [Wed, 4 Nov 2015 09:34:37 +0000 (09:34 +0000)]
Unreviewed.

* platform/win/TestExpectations: Marked 150867 as duplicate of 147933.

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

4 years agoAdd support for the USE_TYPO_METRICS flag on iOS
fred.wang@free.fr [Wed, 4 Nov 2015 08:50:31 +0000 (08:50 +0000)]
Add support for the USE_TYPO_METRICS flag on iOS
https://bugs.webkit.org/show_bug.cgi?id=131839

Reviewed by Darin Adler.

Make the iOS Font service use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
The code shared by iOS, OS X and AppleWin is moved into a separate OpenTypeCG module.

No new tests because this is already tested by fonts/use-typo-metrics-1.html

* PlatformAppleWin.cmake: Add OpenTypeCG files.
* PlatformMac.cmake: ditto.
* WebCore.vcxproj/WebCore.vcxproj: ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformInit): Use functions from OpenTypeCG.
(WebCore::fontHasMathTable): Deleted.
* platform/graphics/ios/FontServicesIOS.mm:
(WebCore::FontServicesIOS::FontServicesIOS): Use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.
* platform/graphics/opentype/OpenTypeCG.h: Added.
* platform/graphics/opentype/OpenTypeCG.cpp: Added.
(WebCore::OpenType::fontHasMathTable): Move this code from FontCocoa.mm.
(WebCore::OpenType::readShortFromTable): Inline function to read a 16-bit big endian integer from the OS/2 table and to cast it into a short integer.
(WebCore::OpenType::tryGetTypoMetrics): Move this code from FontCocoa.mm.
* platform/graphics/opentype/OpenTypeTypes.h: Add missing Glyph.h header needed by TableWithCoverage::getCoverageIndex.
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::Font::platformInit): Use functions from OpenTypeCG.

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

4 years agoRegression(r191652): Colloquy doesn’t render any chat content
cdumez@apple.com [Wed, 4 Nov 2015 08:10:09 +0000 (08:10 +0000)]
Regression(r191652): Colloquy doesn’t render any chat content
https://bugs.webkit.org/show_bug.cgi?id=150861
<rdar://problem/23381007>

Reviewed by Antti Koivisto.

Source/WebCore:

Do a partial revert of r191652 as this web-exposed behavior change
broke Colloquy app. This only reverts the code change, the tests
are left as is so that they don't rely of the frame ID setting the
Window name.

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute):
(WebCore::HTMLFrameElementBase::setNameAndOpenURL):

LayoutTests:

Update / rebaseline a couple of tests as this patch restores the
pre-r191652 behavior.

* fast/dom/Window/window-special-properties-expected.txt:
* fast/frames/iframe-no-name-expected.txt:
* fast/frames/iframe-no-name.html:

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

4 years ago[Cocoa] Add SPI to warm an initial web process
aestes@apple.com [Wed, 4 Nov 2015 07:59:16 +0000 (07:59 +0000)]
[Cocoa] Add SPI to warm an initial web process
https://bugs.webkit.org/show_bug.cgi?id=150886

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _warmInitialProcess]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

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

4 years agoModern IDB: Fill out IDBIndex, create MemoryIndex in backing store.
beidson@apple.com [Wed, 4 Nov 2015 07:16:30 +0000 (07:16 +0000)]
Modern IDB: Fill out IDBIndex, create MemoryIndex in backing store.
https://bugs.webkit.org/show_bug.cgi?id=150868

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/create-index-failures.html
       storage/indexeddb/modern/get-index-failures.html
       storage/indexeddb/modern/idbindex-properties-basic.html

Note: The MemoryIndex in the backing store doesn't actually do anything yet.

That's coming next.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBIndex.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::createIndex):
(WebCore::IDBClient::IDBConnectionToServer::didCreateIndex):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/client/IDBCursorWithValueImpl.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::didCreateIndexInfo):
* Modules/indexeddb/client/IDBDatabaseImpl.h:

* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::create):
(WebCore::IDBClient::IDBIndex::IDBIndex):
(WebCore::IDBClient::IDBIndex::objectStore):
(WebCore::IDBClient::IDBIndex::keyPathAny):
(WebCore::IDBClient::IDBIndex::openCursor):
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::openKeyCursor):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::getKey):
* Modules/indexeddb/client/IDBIndexImpl.h:

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::createIndex):
(WebCore::IDBClient::IDBObjectStore::index):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::createObjectStore):
(WebCore::IDBClient::IDBTransaction::createIndex):
(WebCore::IDBClient::IDBTransaction::createIndexOnServer):
(WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/legacy/LegacyIndex.h:

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::didCreateIndex):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::createIndex):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::addNewIndex):
(WebCore::IDBServer::MemoryBackingStoreTransaction::addExistingIndex):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryIndex.cpp: Added.
(WebCore::IDBServer::MemoryIndex::create):
(WebCore::IDBServer::MemoryIndex::MemoryIndex):
(WebCore::IDBServer::MemoryIndex::~MemoryIndex):
* Modules/indexeddb/server/MemoryIndex.h: Added.
(WebCore::IDBServer::MemoryIndex::info):

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::registerIndex):
(WebCore::IDBServer::MemoryObjectStore::unregisterIndex):
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::getInfoForExistingObjectStore):
(WebCore::IDBDatabaseInfo::infoForExistingObjectStore):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:

* Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::IDBIndexInfo):
(WebCore::IDBIndexInfo::isolatedCopy):
* Modules/indexeddb/shared/IDBIndexInfo.h:
(WebCore::IDBIndexInfo::identifier):
(WebCore::IDBIndexInfo::objectStoreIdentifier):

* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::createNewIndex):
(WebCore::IDBObjectStoreInfo::addExistingIndex):
(WebCore::IDBObjectStoreInfo::hasIndex):
(WebCore::IDBObjectStoreInfo::infoForExistingIndex):
(WebCore::IDBObjectStoreInfo::isolatedCopy):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::createIndexSuccess):
* Modules/indexeddb/shared/IDBResultData.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didCreateIndex):
(WebCore::InProcessIDBServer::createIndex):
* Modules/indexeddb/shared/InProcessIDBServer.h:

* bindings/js/JSIDBObjectStoreCustom.cpp:
(WebCore::JSIDBObjectStore::createIndex):

* platform/CrossThreadCopier.cpp:
(WebCore::IDBIndexInfo>::copy):
* platform/CrossThreadCopier.h:

LayoutTests:

* platform/mac-wk2/TestExpectations:
* storage/indexeddb/modern/create-index-failures-expected.txt: Added.
* storage/indexeddb/modern/create-index-failures.html: Added.
* storage/indexeddb/modern/get-index-failures-expected.txt: Added.
* storage/indexeddb/modern/get-index-failures.html: Added.
* storage/indexeddb/modern/idbindex-properties-basic-expected.txt: Added.
* storage/indexeddb/modern/idbindex-properties-basic.html: Added.

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

4 years ago[Cocoa] Adopt WKWebViewAdditions
aestes@apple.com [Wed, 4 Nov 2015 07:06:16 +0000 (07:06 +0000)]
[Cocoa] Adopt WKWebViewAdditions
https://bugs.webkit.org/show_bug.cgi?id=150885

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 4 Nov 2015 06:33:12 +0000 (06:33 +0000)]
Versioning.

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

4 years ago[Cocoa] Only query for kMGQDeviceName on iOS
aestes@apple.com [Wed, 4 Nov 2015 06:30:42 +0000 (06:30 +0000)]
[Cocoa] Only query for kMGQDeviceName on iOS
https://bugs.webkit.org/show_bug.cgi?id=150858

Reviewed by Brent Fulgham.

* platform/ios/Device.cpp:
(WebCore::deviceName): On non-iOS platorms, just return "iPhone" as the device name.

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

4 years agoUnreviewed, rolling out r191995.
commit-queue@webkit.org [Wed, 4 Nov 2015 05:45:51 +0000 (05:45 +0000)]
Unreviewed, rolling out r191995.
https://bugs.webkit.org/show_bug.cgi?id=150880

Broke iOS tests (Requested by ap on #webkit).

Reverted changeset:

"run-webkit-test should look in --root directory for
LayoutTestRelay"
https://bugs.webkit.org/show_bug.cgi?id=150859
http://trac.webkit.org/changeset/191995

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

4 years ago[JSC] Add B3-to-Air lowering for BitXor
benjamin@webkit.org [Wed, 4 Nov 2015 05:12:40 +0000 (05:12 +0000)]
[JSC] Add B3-to-Air lowering for BitXor
https://bugs.webkit.org/show_bug.cgi?id=150872

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

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::xor32):
Fix the indentation.

* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::bitXorConstant):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::bitXorConstant):
* b3/B3Const64Value.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tryXor):
* b3/B3LoweringMatcher.patterns:
* b3/B3ReduceStrength.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::bitXorConstant):
* b3/B3Value.h:
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testBitXorArgs):
(JSC::B3::testBitXorSameArg):
(JSC::B3::testBitXorImms):
(JSC::B3::testBitXorArgImm):
(JSC::B3::testBitXorImmArg):
(JSC::B3::testBitXorBitXorArgImmImm):
(JSC::B3::testBitXorImmBitXorArgImm):
(JSC::B3::testBitXorArgs32):
(JSC::B3::testBitXorSameArg32):
(JSC::B3::testBitXorImms32):
(JSC::B3::testBitXorArgImm32):
(JSC::B3::testBitXorImmArg32):
(JSC::B3::testBitXorBitXorArgImmImm32):
(JSC::B3::testBitXorImmBitXorArgImm32):
(JSC::B3::run):

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

4 years ago[WK1] Null dereference loading Blink layout test editing/input/text-input-controller...
jiewen_tan@apple.com [Wed, 4 Nov 2015 02:47:50 +0000 (02:47 +0000)]
[WK1] Null dereference loading Blink layout test editing/input/text-input-controller-no-editable-no-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149484
<rdar://problem/22811338>

Reviewed by Darin Adler.

Source/WebKit/mac:

firstRectForCharacterRange(): don't fall over in an editable-less frame.

* WebView/WebFrame.mm:
(-[WebFrame _convertToDOMRange:]):

LayoutTests:

This test is from Blink r194870:
https://codereview.chromium.org/1122593004

* editing/mac/input/text-input-controller-no-editable-no-crash-expected.txt: Added.
* editing/mac/input/text-input-controller-no-editable-no-crash.html: Added.
* platform/wk2/TestExpectations:

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

4 years agoAdd graphics benchmark to performance bot
commit-queue@webkit.org [Wed, 4 Nov 2015 01:58:34 +0000 (01:58 +0000)]
Add graphics benchmark to performance bot
https://bugs.webkit.org/show_bug.cgi?id=150450

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-03
Reviewed by Chris Dumez.

* Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan: Added.
Add a patch and a plan to set the defaults of the benchmark, run it,
collect the result and report it to the benchmark runner.

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

4 years agoWeb Inspector: REGRESSION (r191612): Storage sidebar panel tree outline is broken
mattbaker@apple.com [Wed, 4 Nov 2015 01:48:47 +0000 (01:48 +0000)]
Web Inspector: REGRESSION (r191612): Storage sidebar panel tree outline is broken
https://bugs.webkit.org/show_bug.cgi?id=150862

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
Inherit from ContentView.

* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel.prototype._addDatabase):
Fixed syntax error.
(WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase):
(WebInspector.StorageSidebarPanel.prototype._addFrameManifest):
WebInspector.TreeOutline.append doesn't exist; changed to appendChild.

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

4 years agoDuplicate validateUserInterfaceItem in WKWebView
timothy_horton@apple.com [Wed, 4 Nov 2015 01:42:17 +0000 (01:42 +0000)]
Duplicate validateUserInterfaceItem in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=150873

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView changeFont:]):
(-[WKWebView startSpeaking:]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView goBack:]):

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

4 years agoAdd op_add tests to compare behavior of JIT generated code to the LLINT's.
mark.lam@apple.com [Wed, 4 Nov 2015 01:03:06 +0000 (01:03 +0000)]
Add op_add tests to compare behavior of JIT generated code to the LLINT's.
https://bugs.webkit.org/show_bug.cgi?id=150864

Reviewed by Saam Barati.

* tests/stress/op_add.js: Added.
(o1.valueOf):
(generateScenarios):
(printScenarios):
(testCases.func):
(func):
(initializeTestCases):
(runTest):

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

4 years ago[iOS] Skip the touch tests
ap@apple.com [Wed, 4 Nov 2015 01:01:48 +0000 (01:01 +0000)]
[iOS] Skip the touch tests
https://bugs.webkit.org/show_bug.cgi?id=150863

Reviewed by Darin Adler.

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years agoRename DFG's compileAdd to compileArithAdd.
mark.lam@apple.com [Wed, 4 Nov 2015 01:00:39 +0000 (01:00 +0000)]
Rename DFG's compileAdd to compileArithAdd.
https://bugs.webkit.org/show_bug.cgi?id=150866

Reviewed by Benjamin Poulain.

The function is only supposed to generate code to do arithmetic addition on
numeric types.  Naming it compileArithAdd() is more accurate, and is consistent
with the name of the node it emits code for (i.e. ArithAdd) as well as other
compiler functions for analogous operations e.g. compileArithSub.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInstanceOf):
(JSC::DFG::SpeculativeJIT::compileArithAdd):
(JSC::DFG::SpeculativeJIT::compileAdd): Deleted.
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

4 years ago2015-11-03 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Wed, 4 Nov 2015 00:58:56 +0000 (00:58 +0000)]
2015-11-03  Geoffrey Garen  <ggaren@apple.com>

    Provide a way to turn off const in WebKit2.

    Reviewed by Sam Weinig.

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

4 years agoCreate a NetworkSession for each SessionID
achristensen@apple.com [Wed, 4 Nov 2015 00:50:27 +0000 (00:50 +0000)]
Create a NetworkSession for each SessionID
https://bugs.webkit.org/show_bug.cgi?id=150857

Reviewed by Anders Carlsson.

This patch renames SessionTracker::session to storageSession and makes a parallel
structure for NetworkSessions.  NetworkSession and NetworkStorageSession should eventually
become the same class in WebCore.  Because not everybody uses NetworkSessions yet,
we keep them separate but created, destroyed, and managed together.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::abort):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
(WebKit::NetworkDataTask::client):
(WebKit::NetworkDataTask::clearClient):
(WebKit::NetworkingDataTask::client): Deleted.
(WebKit::NetworkingDataTask::clearClient): Deleted.
(WebKit::NetworkSession::~NetworkSession): Deleted.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::configurationForType):
(WebKit::defaultNetworkSession):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::~NetworkDataTask):
(WebKit::NetworkDataTask::cancel):
(WebKit::NetworkDataTask::resume):
(WebKit::NetworkDataTask::taskIdentifier):
(WebKit::NetworkSession::create): Deleted.
(WebKit::NetworkSession::singleton): Deleted.
(WebKit::NetworkingDataTask::NetworkingDataTask): Deleted.
(WebKit::NetworkingDataTask::~NetworkingDataTask): Deleted.
(WebKit::NetworkingDataTask::suspend): Deleted.
(WebKit::NetworkingDataTask::resume): Deleted.
(WebKit::NetworkingDataTask::taskIdentifier): Deleted.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::storageSession):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::staticStorageSessionMap):
(WebKit::identifierBase):
(WebKit::SessionTracker::storageSessionMap):
(WebKit::SessionTracker::getIdentifierBase):
(WebKit::SessionTracker::storageSession):
(WebKit::staticSessionMap):
(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
(WebKit::SessionTracker::sessionMap): Deleted.
(WebKit::SessionTracker::session): Deleted.
* Shared/SessionTracker.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):

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

4 years agoWeb Inspector: Remove duplication among ScriptDebugServer subclasses
commit-queue@webkit.org [Wed, 4 Nov 2015 00:43:58 +0000 (00:43 +0000)]
Web Inspector: Remove duplication among ScriptDebugServer subclasses
https://bugs.webkit.org/show_bug.cgi?id=150860

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

Source/JavaScriptCore:

ScriptDebugServer expects a list of listeners to dispatch events to.
However each of its subclasses had their own implementation of the
list because of different handling when the first was added or when
the last was removed. Extract common code into ScriptDebugServer
which simplifies things.

Subclasses now only implement a virtual methods "attachDebugger"
and "detachDebugger" which is the unique work done when the first
listener is added or last is removed.

* inspector/JSGlobalObjectScriptDebugServer.cpp:
(Inspector::JSGlobalObjectScriptDebugServer::attachDebugger):
(Inspector::JSGlobalObjectScriptDebugServer::detachDebugger):
(Inspector::JSGlobalObjectScriptDebugServer::addListener): Deleted.
(Inspector::JSGlobalObjectScriptDebugServer::removeListener): Deleted.
* inspector/JSGlobalObjectScriptDebugServer.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
(Inspector::ScriptDebugServer::sourceParsed):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):
(Inspector::ScriptDebugServer::addListener):
(Inspector::ScriptDebugServer::removeListener):
* inspector/ScriptDebugServer.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::enable):
(Inspector::InspectorDebuggerAgent::disable):
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
(Inspector::JSGlobalObjectDebuggerAgent::startListeningScriptDebugServer): Deleted.
(Inspector::JSGlobalObjectDebuggerAgent::stopListeningScriptDebugServer): Deleted.
* inspector/agents/JSGlobalObjectDebuggerAgent.h:

* inspector/ScriptDebugListener.h:
(Inspector::ScriptDebugListener::Script::Script):
Drive-by convert Script to a struct, it has public fields and is used as such.

Source/WebCore:

Refactoring covered by existing tests.

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::attachDebugger):
(WebCore::WorkerScriptDebugServer::detachDebugger):
(WebCore::WorkerScriptDebugServer::addListener): Deleted.
(WebCore::WorkerScriptDebugServer::removeListener): Deleted.
* bindings/js/WorkerScriptDebugServer.h:
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::startListeningScriptDebugServer): Deleted.
(WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): Deleted.
* inspector/PageDebuggerAgent.h:
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::attachDebugger):
(WebCore::PageScriptDebugServer::detachDebugger):
(WebCore::PageScriptDebugServer::addListener): Deleted.
(WebCore::PageScriptDebugServer::removeListener): Deleted.
* inspector/PageScriptDebugServer.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer): Deleted.
(WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): Deleted.
* inspector/WorkerDebuggerAgent.h:

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

4 years agoB3::LowerToAir should recognize Neg (i.e. Sub($0, value))
fpizlo@apple.com [Wed, 4 Nov 2015 00:41:14 +0000 (00:41 +0000)]
B3::LowerToAir should recognize Neg (i.e. Sub($0, value))
https://bugs.webkit.org/show_bug.cgi?id=150759

Reviewed by Benjamin Poulain.

Adds various forms of Sub(0, value) and compiles them as Neg. Also fixes a bug in
StoreSubLoad. This bug was correctness-benign, so I couldn't add a test for it.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::immOrTmp):
(JSC::B3::Air::LowerToAir::appendUnOp):
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreUnOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::trySub):
(JSC::B3::Air::LowerToAir::tryStoreSubLoad):
* b3/B3LoweringMatcher.patterns:
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testAdd1Ptr):
(JSC::B3::testNeg32):
(JSC::B3::testNegPtr):
(JSC::B3::testStoreAddLoad):
(JSC::B3::testStoreAddAndLoad):
(JSC::B3::testStoreNegLoad32):
(JSC::B3::testStoreNegLoadPtr):
(JSC::B3::testAdd1Uncommuted):
(JSC::B3::run):

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

4 years agorun-webkit-test should look in --root directory for LayoutTestRelay
jmarcell@apple.com [Wed, 4 Nov 2015 00:39:29 +0000 (00:39 +0000)]
run-webkit-test should look in --root directory for LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=150859

Reviewed by Daniel Bates.

For iOS run-webkit-tests, use LayoutTestRelay specified by --root; otherwise find
LayoutTestRelay in the Mac build directory when --root is unspecified.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.relay_path):

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

4 years agoB3::Values that have effects should allow specification of custom HeapRanges
fpizlo@apple.com [Wed, 4 Nov 2015 00:28:23 +0000 (00:28 +0000)]
B3::Values that have effects should allow specification of custom HeapRanges
https://bugs.webkit.org/show_bug.cgi?id=150535

Reviewed by Benjamin Poulain.

Add a Effects field to calls and patchpoints. Add a HeapRange to MemoryValues.

In the process, I created a class for the CCall opcode, so that it has somewhere to put
the Effects field.

While doing this, I realized that we didn't have a good way of ensuring that an opcode
that requires a specific subclass was actually created with that subclass. So, I added
assertions for this.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3ArgumentRegValue.h:
* b3/B3CCallValue.cpp: Added.
* b3/B3CCallValue.h: Added.
* b3/B3CheckValue.h:
* b3/B3Const32Value.h:
* b3/B3Const64Value.h:
* b3/B3ConstDoubleValue.h:
(JSC::B3::ConstDoubleValue::ConstDoubleValue):
* b3/B3ControlValue.h:
* b3/B3Effects.h:
(JSC::B3::Effects::forCall):
(JSC::B3::Effects::mustExecute):
* b3/B3MemoryValue.h:
* b3/B3PatchpointValue.h:
* b3/B3StackSlotValue.h:
* b3/B3UpsilonValue.h:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::dumpMeta):
(JSC::B3::Value::checkOpcode):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:

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

4 years agoB3::Stackmap should be a superclass of B3::PatchpointValue and B3::CheckValue rather...
fpizlo@apple.com [Wed, 4 Nov 2015 00:13:27 +0000 (00:13 +0000)]
B3::Stackmap should be a superclass of B3::PatchpointValue and B3::CheckValue rather than being one of their members
https://bugs.webkit.org/show_bug.cgi?id=150831

Rubber stamped by Benjamin Poulain.

Previously, Stackmap was a value that PatchpointValue and CheckValue would hold as a field.
We'd have convenient ways of getting this field, like via Value::stackmap(). But this was a
bit ridiculous, since Stackmap is logically just a common supertype for Patchpointvalue and
CheckValue. This patch makes this reality by replacing Stackmap with StackmapValue. This makes
the code a lot more reasonable.

I also needed to make dumping a bit more customizable, so I changed dumpMeta() to take a
CommaPrinter&. This gives subclasses better control over whether or not to emit a comma. Also
it's now possible for subclasses of Value to customize how children are printed. StackmapValue
uses this to print the children and their reps together like:

    Int32 @2 = Patchpoint(@0:SomeRegister, @1:SomeRegister, generator = 0x1107ec010, clobbered = [], usedRegisters = [], ExitsSideways|ControlDependent|Writes:Top|Reads:Top)

This has no behavior change, it's just a big refactoring. You can see how much simpler this
makes things by looking at the testSimplePatchpoint() test.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3ArgumentRegValue.cpp:
(JSC::B3::ArgumentRegValue::~ArgumentRegValue):
(JSC::B3::ArgumentRegValue::dumpMeta):
* b3/B3ArgumentRegValue.h:
* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::generate):
* b3/B3CheckValue.cpp:
(JSC::B3::CheckValue::~CheckValue):
(JSC::B3::CheckValue::CheckValue):
(JSC::B3::CheckValue::dumpMeta): Deleted.
* b3/B3CheckValue.h:
(JSC::B3::CheckValue::accepts):
* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::notEqualConstant):
(JSC::B3::Const32Value::dumpMeta):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::notEqualConstant):
(JSC::B3::Const64Value::dumpMeta):
* b3/B3Const64Value.h:
* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::notEqualConstant):
(JSC::B3::ConstDoubleValue::dumpMeta):
* b3/B3ConstDoubleValue.h:
* b3/B3ConstrainedValue.cpp: Added.
(JSC::B3::ConstrainedValue::dump):
* b3/B3ConstrainedValue.h: Added.
(JSC::B3::ConstrainedValue::ConstrainedValue):
(JSC::B3::ConstrainedValue::operator bool):
(JSC::B3::ConstrainedValue::value):
(JSC::B3::ConstrainedValue::rep):
* b3/B3ControlValue.cpp:
(JSC::B3::ControlValue::convertToJump):
(JSC::B3::ControlValue::dumpMeta):
* b3/B3ControlValue.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tryPatchpoint):
* b3/B3MemoryValue.cpp:
(JSC::B3::MemoryValue::accessByteSize):
(JSC::B3::MemoryValue::dumpMeta):
* b3/B3MemoryValue.h:
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::generate):
* b3/B3PatchpointValue.cpp:
(JSC::B3::PatchpointValue::~PatchpointValue):
(JSC::B3::PatchpointValue::PatchpointValue):
(JSC::B3::PatchpointValue::dumpMeta): Deleted.
* b3/B3PatchpointValue.h:
(JSC::B3::PatchpointValue::accepts):
* b3/B3StackSlotValue.cpp:
(JSC::B3::StackSlotValue::~StackSlotValue):
(JSC::B3::StackSlotValue::dumpMeta):
* b3/B3StackSlotValue.h:
* b3/B3Stackmap.cpp: Removed.
* b3/B3Stackmap.h: Removed.
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::reportUsedRegisters):
(JSC::B3::StackmapSpecial::extraClobberedRegs):
(JSC::B3::StackmapSpecial::forEachArgImpl):
(JSC::B3::StackmapSpecial::isValidImpl):
(JSC::B3::StackmapSpecial::admitsStackImpl):
* b3/B3StackmapSpecial.h:
* b3/B3StackmapValue.cpp: Added.
(JSC::B3::StackmapValue::~StackmapValue):
(JSC::B3::StackmapValue::append):
(JSC::B3::StackmapValue::setConstrainedChild):
(JSC::B3::StackmapValue::setConstraint):
(JSC::B3::StackmapValue::dumpChildren):
(JSC::B3::StackmapValue::dumpMeta):
(JSC::B3::StackmapValue::StackmapValue):
* b3/B3StackmapValue.h: Added.
* b3/B3SwitchValue.cpp:
(JSC::B3::SwitchValue::appendCase):
(JSC::B3::SwitchValue::dumpMeta):
(JSC::B3::SwitchValue::SwitchValue):
* b3/B3SwitchValue.h:
* b3/B3UpsilonValue.cpp:
(JSC::B3::UpsilonValue::~UpsilonValue):
(JSC::B3::UpsilonValue::dumpMeta):
* b3/B3UpsilonValue.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::dump):
(JSC::B3::Value::dumpChildren):
(JSC::B3::Value::deepDump):
(JSC::B3::Value::performSubstitution):
(JSC::B3::Value::dumpMeta):
* b3/B3Value.h:
* b3/B3ValueInlines.h:
(JSC::B3::Value::asNumber):
(JSC::B3::Value::stackmap): Deleted.
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::kind):
(JSC::B3::ValueRep::operator==):
(JSC::B3::ValueRep::operator!=):
(JSC::B3::ValueRep::operator bool):
(JSC::B3::ValueRep::isAny):
* b3/air/AirInstInlines.h:
* b3/testb3.cpp:
(JSC::B3::testSimplePatchpoint):

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

4 years agoMarking streams/reference-implementation/writable-stream-abort.html as flaky on win
ryanhaddad@apple.com [Wed, 4 Nov 2015 00:11:26 +0000 (00:11 +0000)]
Marking streams/reference-implementation/writable-stream-abort.html as flaky on win
https://bugs.webkit.org/show_bug.cgi?id=150867

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoNull dereference loading Blink layout test scrollbars/custom-scrollbar-appearance...
jiewen_tan@apple.com [Wed, 4 Nov 2015 00:05:21 +0000 (00:05 +0000)]
Null dereference loading Blink layout test scrollbars/custom-scrollbar-appearance-property.html
https://bugs.webkit.org/show_bug.cgi?id=149312
<rdar://problem/22748910>

Reviewed by Darin Adler.

Source/WebCore:

This is a merge from Blink r167503:
https://codereview.chromium.org/173433002

Test: scrollbars/custom-scrollbar-appearance-property.html

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):

LayoutTests:

* scrollbars/custom-scrollbar-appearance-property-expected.txt: Added.
* scrollbars/custom-scrollbar-appearance-property.html: Added.

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

4 years agoCorrecting win test expectation for flaky test fast/text/multiple-feature-properties...
ryanhaddad@apple.com [Tue, 3 Nov 2015 23:52:08 +0000 (23:52 +0000)]
Correcting win test expectation for flaky test fast/text/multiple-feature-properties.html
https://bugs.webkit.org/show_bug.cgi?id=150808

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoSkipping test added with r191979 on win
ryanhaddad@apple.com [Tue, 3 Nov 2015 23:47:14 +0000 (23:47 +0000)]
Skipping test added with r191979 on win
https://bugs.webkit.org/show_bug.cgi?id=150830

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agobuild.webkit.org/dashboard should use ISO dates in Trac URLs
ap@apple.com [Tue, 3 Nov 2015 23:39:42 +0000 (23:39 +0000)]
build.webkit.org/dashboard should use ISO dates in Trac URLs
https://bugs.webkit.org/show_bug.cgi?id=150855

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
(Trac.prototype._xmlTimelineURL):

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

4 years ago[CoordinatedGraphics] invisible webview should not paint the content
ryuan.choi@navercorp.com [Tue, 3 Nov 2015 23:39:37 +0000 (23:39 +0000)]
[CoordinatedGraphics] invisible webview should not paint the content
https://bugs.webkit.org/show_bug.cgi?id=150662

Reviewed by Darin Adler.

Suspend or resume the painting instead of just initializing m_isPaintingSuspended
for invisible webview not to paint the content until visibility is changed.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):

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

4 years agoSkipping tests added with r191968 on win.
ryanhaddad@apple.com [Tue, 3 Nov 2015 23:37:12 +0000 (23:37 +0000)]
Skipping tests added with r191968 on win.
https://bugs.webkit.org/show_bug.cgi?id=149771

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoResourceUsageOverlay should show GC-owned malloc memory.
akling@apple.com [Tue, 3 Nov 2015 23:30:25 +0000 (23:30 +0000)]
ResourceUsageOverlay should show GC-owned malloc memory.
<https://webkit.org/b/150846>

Reviewed by Anders Carlsson.

Add a memory category for GC-owned malloc memory. This carves a significant chunk off of
the gigantic "bmalloc" mystery slice.

* page/ResourceUsageOverlay.h:
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::drawMemoryPie):
(WebCore::ResourceUsageOverlay::draw):
(WebCore::runSamplerThread):

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

4 years ago[JSC] Add Air lowering for BitOr and impove BitAnd
benjamin@webkit.org [Tue, 3 Nov 2015 23:24:50 +0000 (23:24 +0000)]
[JSC] Add Air lowering for BitOr and impove BitAnd
https://bugs.webkit.org/show_bug.cgi?id=150827

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

In this patch:
-B3 to Air lowering for BirOr.
-Codegen for BitOr.
-Strength reduction for BitOr and BitAnd.
-Tests for BitAnd and BitOr.
-Bug fix: Move64 with a negative value was destroying the top bits.

* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::bitAndConstant):
(JSC::B3::Const32Value::bitOrConstant):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::bitAndConstant):
(JSC::B3::Const64Value::bitOrConstant):
* b3/B3Const64Value.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::immForMove):
(JSC::B3::Air::LowerToAir::immOrTmpForMove):
(JSC::B3::Air::LowerToAir::tryOr):
(JSC::B3::Air::LowerToAir::tryConst64):
(JSC::B3::Air::LowerToAir::tryUpsilon):
(JSC::B3::Air::LowerToAir::tryIdentity):
(JSC::B3::Air::LowerToAir::tryReturn):
(JSC::B3::Air::LowerToAir::immOrTmp): Deleted.
* b3/B3LoweringMatcher.patterns:
* b3/B3ReduceStrength.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::bitAndConstant):
(JSC::B3::Value::bitOrConstant):
* b3/B3Value.h:
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testReturnConst64):
(JSC::B3::testBitAndArgs):
(JSC::B3::testBitAndSameArg):
(JSC::B3::testBitAndImms):
(JSC::B3::testBitAndArgImm):
(JSC::B3::testBitAndImmArg):
(JSC::B3::testBitAndBitAndArgImmImm):
(JSC::B3::testBitAndImmBitAndArgImm):
(JSC::B3::testBitAndArgs32):
(JSC::B3::testBitAndSameArg32):
(JSC::B3::testBitAndImms32):
(JSC::B3::testBitAndArgImm32):
(JSC::B3::testBitAndImmArg32):
(JSC::B3::testBitAndBitAndArgImmImm32):
(JSC::B3::testBitAndImmBitAndArgImm32):
(JSC::B3::testBitOrArgs):
(JSC::B3::testBitOrSameArg):
(JSC::B3::testBitOrImms):
(JSC::B3::testBitOrArgImm):
(JSC::B3::testBitOrImmArg):
(JSC::B3::testBitOrBitOrArgImmImm):
(JSC::B3::testBitOrImmBitOrArgImm):
(JSC::B3::testBitOrArgs32):
(JSC::B3::testBitOrSameArg32):
(JSC::B3::testBitOrImms32):
(JSC::B3::testBitOrArgImm32):
(JSC::B3::testBitOrImmArg32):
(JSC::B3::testBitOrBitOrArgImmImm32):
(JSC::B3::testBitOrImmBitOrArgImm32):
(JSC::B3::run):

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

4 years agoRewrite "const" as "var" for iTunes/iBooks on the Mac
sbarati@apple.com [Tue, 3 Nov 2015 23:23:23 +0000 (23:23 +0000)]
Rewrite "const" as "var" for iTunes/iBooks on the Mac
https://bugs.webkit.org/show_bug.cgi?id=150852

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

VM now has a setting indicating if we should treat
"const" variables as "var" to more closely match
JSC's previous implementation of "const" before ES6.

* parser/Parser.h:
(JSC::Parser::next):
(JSC::Parser::nextExpectIdentifier):
* runtime/VM.h:
(JSC::VM::setShouldRewriteConstAsVar):
(JSC::VM::shouldRewriteConstAsVar):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

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

4 years agoImplement support for the autocomplete attribute
jhoneycutt@apple.com [Tue, 3 Nov 2015 22:51:52 +0000 (22:51 +0000)]
Implement support for the autocomplete attribute
https://bugs.webkit.org/show_bug.cgi?id=150731
rdar://problem/21078968

LayoutTests/imported/w3c:

Reviewed by Brent Fulgham.

* web-platform-tests/html/dom/interfaces-expected.txt: Rebased.
* web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete-expected.txt:
Rebased.

Source/WebCore:

The autocomplete attribute is defined by
https://html.spec.whatwg.org/multipage/forms.html#autofill.

Reviewed by Brent Fulgham.

Test: fast/forms/autocomplete-tokens.html

* html/HTMLFormControlElement.cpp:
(WebCore::isContactToken):
Return true if this is a contact token.
(WebCore::categoryForAutofillFieldToken):
Adds all of the autofill field tokens to a map, and returns the
category for a given token.
(WebCore::maxTokensForAutofillFieldCategory):
Return the maximum number of tokens an autofill category supports.
(WebCore::HTMLFormControlElement::parseAutocompleteAttribute):
Implement the processing model defined in
https://html.spec.whatwg.org/multipage/forms.html#processing-model-3
with respect to the IDL-exposed autofill value.
(WebCore::HTMLFormControlElement::setAutocomplete):
Set the autocomplete attribute to the given string.

* html/HTMLFormControlElement.h:
Declare setAutocomplete() and autocomplete().

* html/HTMLInputElement.idl:
Remove the Reflect attribute. We now have custom processing for getting
this attribute.

* html/HTMLSelectElement.idl:
Declare the autocomplete attribute.

* html/HTMLTextAreaElement.idl:
Ditto.

LayoutTests:

Reviewed by Brent Fulgham.

* fast/forms/autocomplete-tokens-expected.txt: Added.
* fast/forms/autocomplete-tokens.html: Added.

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

4 years agoModern IDB: Land empty IDBCursor/Index IDL implementations.
beidson@apple.com [Tue, 3 Nov 2015 22:24:14 +0000 (22:24 +0000)]
Modern IDB: Land empty IDBCursor/Index IDL implementations.
https://bugs.webkit.org/show_bug.cgi?id=150839

Reviewed by Alex Christensen.

No new tests (No change in behavior).

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBIndex.h:

* Modules/indexeddb/client/IDBCursorImpl.cpp: Added.
(WebCore::IDBClient::IDBCursor::~IDBCursor):
(WebCore::IDBClient::IDBCursor::direction):
(WebCore::IDBClient::IDBCursor::key):
(WebCore::IDBClient::IDBCursor::primaryKey):
(WebCore::IDBClient::IDBCursor::value):
(WebCore::IDBClient::IDBCursor::source):
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::deleteFunction):
* Modules/indexeddb/client/IDBCursorImpl.h: Added.

* Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Added.
* Modules/indexeddb/client/IDBCursorWithValueImpl.h: Added.

* Modules/indexeddb/client/IDBIndexImpl.cpp: Added.
(WebCore::IDBClient::IDBIndex::~IDBIndex):
(WebCore::IDBClient::IDBIndex::name):
(WebCore::IDBClient::IDBIndex::objectStore):
(WebCore::IDBClient::IDBIndex::keyPathAny):
(WebCore::IDBClient::IDBIndex::keyPath):
(WebCore::IDBClient::IDBIndex::unique):
(WebCore::IDBClient::IDBIndex::multiEntry):
(WebCore::IDBClient::IDBIndex::openCursor):
(WebCore::IDBClient::IDBIndex::count):
(WebCore::IDBClient::IDBIndex::openKeyCursor):
(WebCore::IDBClient::IDBIndex::get):
(WebCore::IDBClient::IDBIndex::getKey):
* Modules/indexeddb/client/IDBIndexImpl.h: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.h.

* Modules/indexeddb/legacy/LegacyIndex.h:
(WebCore::LegacyIndex::id):

* Modules/indexeddb/shared/IDBIndexInfo.cpp: Added.
* Modules/indexeddb/shared/IDBIndexInfo.h: Added.
(WebCore::IDBIndexInfo::name):
(WebCore::IDBIndexInfo::keyPath):
(WebCore::IDBIndexInfo::unique):
(WebCore::IDBIndexInfo::multiEntry):

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

4 years agoAddressing post-review comments on r191934.
mmaxfield@apple.com [Tue, 3 Nov 2015 22:18:11 +0000 (22:18 +0000)]
Addressing post-review comments on r191934.

Unreviewed.

* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::supportsFormat):

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

4 years agoFix some inefficiencies in the baseline usage of JITAddGenerator.
mark.lam@apple.com [Tue, 3 Nov 2015 22:13:52 +0000 (22:13 +0000)]
Fix some inefficiencies in the baseline usage of JITAddGenerator.
https://bugs.webkit.org/show_bug.cgi?id=150850

Reviewed by Michael Saboff.

1. emit_op_add() was loading the operands twice.  Removed the redundant load.
2. The snippet may decide that it wants to go the slow path route all the time.
   In that case, emit_op_add will end up emitting a branch to an out of line
   slow path followed by some dead code to store the result of the fast path
   on to the stack.
   We now check if the snippet determined that there's no fast path, and just
   emit the slow path inline, and skip the dead store of the fast path result.

* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):

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

4 years agoB3::LowerToAir should do copy propagation
fpizlo@apple.com [Tue, 3 Nov 2015 22:03:48 +0000 (22:03 +0000)]
B3::LowerToAir should do copy propagation
https://bugs.webkit.org/show_bug.cgi?id=150775

Reviewed by Geoffrey Garen.

What we are trying to do is remove the unnecessary Move's and Move32's from Trunc and ZExt32.
You could think of this as an Air optimization, and indeed, Air is powerful enough that we
could write a phase that does copy propagation through Move's and Move32's. For Move32's it
would only copy-propagate if it proved that the value was already zero-extended. We could
know this by just adding a Def32 role to Air.

But this patch takes a different approach: we ensure that we don't generate such redundant
Move's and Move32's to begin with. The reason is that it's much cheaper to do analysis over
B3 than over Air. So, whenever possible, and optimization should be implemented in B3. In
this case the optimization can't quite be implemented in B3 because you cannot remove a Trunc
or ZExt32 without violating the B3 type system. So, the best place to do this optimization is
during lowering: we can use B3 for our analysis and we can use Air to express the
transformation.

Copy propagating during B3->Air lowering is natural because we are creating "SSA-like" Tmps
from the B3 Values. They are SSA-like in the sense that except the tmp for a Phi, we know
that the Tmp will be assigned once and that the assignment will dominate all uses. So, if we
see an operation like Trunc that is semantically just a Move, we can skip the Move and just
claim that the Trunc has the same Tmp as its child. We do something similar for ZExt32,
except with that one we have to analyze IR to ensure that the value will actually be zero
extended. Note that this kind of reasoning about how Tmps work in Air is only possible in the
B3->Air lowering, since at that point we know for sure which Tmps behave this way. If we
wanted to do anything like this as a later Air phase, we'd have to do more analysis to first
prove that Tmps behave in this way.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::highBitsAreZero):
(JSC::B3::Air::LowerToAir::shouldCopyPropagate):
(JSC::B3::Air::LowerToAir::tmp):
(JSC::B3::Air::LowerToAir::tryStore):
(JSC::B3::Air::LowerToAir::tryTrunc):
(JSC::B3::Air::LowerToAir::tryZExt32):
(JSC::B3::Air::LowerToAir::tryIdentity):
(JSC::B3::Air::LowerToAir::tryTruncArgumentReg): Deleted.
* b3/B3LoweringMatcher.patterns:

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

4 years agoWeb Inspector: Create View base class, refactor some core view classes
mattbaker@apple.com [Tue, 3 Nov 2015 21:56:35 +0000 (21:56 +0000)]
Web Inspector: Create View base class, refactor some core view classes
https://bugs.webkit.org/show_bug.cgi?id=149186

Reviewed by Brian Burg and Timothy Hatcher.

This patch introduces a new View base class, which encapsulates DOM element creation,
layout scheduling, and subview management. The View class constructor accepts an optional
element parameter, allowing an existing DOM element to be associated with the View object,
rather than dynamically creating a new element. View also adds a `__view` property to its
associated DOM element to facilitate debugging the Inspector UI.

For the view classes refactored in this patch, the changes are largely mechanical. Dynamically
created DOM elements and redundant element getters have been removed. needsLayout has replaced
updateLayoutIfNeeded where appropriate. updateLayout has been removed entirely for views that
performed no layout other than to cascade layouts to their children.

* UserInterface/Base/Main.js:
Moved TabBar layout updates out of TabBrowser and into Main.js.

* UserInterface/Main.html:
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
(WebInspector.ConsolePrompt.prototype.layout):
(WebInspector.ConsolePrompt.prototype.get element): Deleted.
(WebInspector.ConsolePrompt.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype.get element): Deleted.
(WebInspector.ContentBrowser.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.prototype.get element): Deleted.
(WebInspector.ContentView.prototype.updateLayout): Deleted.
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer):
(WebInspector.ContentViewContainer.prototype._showEntry):
(WebInspector.ContentViewContainer.prototype._hideEntry):
(WebInspector.ContentViewContainer.prototype.get element): Deleted.
(WebInspector.ContentViewContainer.prototype.updateLayout): Deleted.
(WebInspector.ContentViewContainer.prototype._addContentViewElement): Deleted.
(WebInspector.ContentViewContainer.prototype._removeContentViewElement): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.autoSizeColumns):
(WebInspector.DataGrid.prototype.layout):
(WebInspector.DataGrid.prototype.applyColumnWidthsMap):
(WebInspector.DataGrid): Deleted.
(WebInspector.DataGrid.prototype.updateLayout): Deleted.
(WebInspector.DataGrid.prototype.resizerDragging): Deleted.
(WebInspector.DataGrid.prototype.resizerDragEnded): Deleted.
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.set components):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
(WebInspector.LayoutTimelineView.prototype.layout):
(WebInspector.LayoutTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.insertNavigationItem):
(WebInspector.NavigationBar.prototype.removeNavigationItem):
(WebInspector.NavigationBar.prototype.get minimumWidth):
(WebInspector.NavigationBar.prototype.layout):
(WebInspector.NavigationBar.prototype._mouseDown):
(WebInspector.NavigationBar.prototype._mouseMoved):
(WebInspector.NavigationBar.prototype._mouseUp):
(WebInspector.NavigationBar.prototype._calculateMinimumWidth):
(WebInspector.NavigationBar.prototype.updateLayoutSoon.update): Deleted.
(WebInspector.NavigationBar.prototype.updateLayoutSoon): Deleted.
(WebInspector.NavigationBar.prototype.updateLayout): Deleted.
(WebInspector.NavigationBar.prototype.get element): Deleted.
* UserInterface/Views/NavigationItem.js:
(WebInspector.NavigationItem.prototype.set hidden):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
(WebInspector.NetworkTimelineView.prototype.layout):
(WebInspector.NetworkTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
(WebInspector.OverviewTimelineView.prototype.layout):
(WebInspector.OverviewTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype.layout):
(WebInspector.QuickConsole.prototype.get element): Deleted.
(WebInspector.QuickConsole.prototype.updateLayout): Deleted.
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
(WebInspector.RenderingFrameTimelineView.prototype.layout):
(WebInspector.RenderingFrameTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype.layout):
(WebInspector.ScriptTimelineView.prototype.updateLayout): Deleted.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar):
(WebInspector.TabBar.prototype.insertTabBarItem.animateTabs):
(WebInspector.TabBar.prototype.insertTabBarItem.removeStyles):
(WebInspector.TabBar.prototype.insertTabBarItem):
(WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
(WebInspector.TabBar.prototype.removeTabBarItem.removeStyles):
(WebInspector.TabBar.prototype.removeTabBarItem):
(WebInspector.TabBar.prototype.hasNormalTab):
(WebInspector.TabBar.prototype.layout):
(WebInspector.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WebInspector.TabBar.prototype._finishExpandingTabsAfterClose.):
(WebInspector.TabBar.prototype._finishExpandingTabsAfterClose):
(WebInspector.TabBar.prototype._handleClick):
(WebInspector.TabBar.prototype._handleMouseMoved):
(WebInspector.TabBar.prototype._handleMouseUp):
(WebInspector.TabBar.prototype._handleMouseLeave):
(WebInspector.TabBar.prototype._handleNewTabMouseEnter):
(WebInspector.TabBar.prototype.updateLayoutSoon.update): Deleted.
(WebInspector.TabBar.prototype.updateLayoutSoon): Deleted.
(WebInspector.TabBar.prototype.updateLayout): Deleted.
(WebInspector.TabBar.prototype.get element): Deleted.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype.get element): Deleted.
(WebInspector.TabBrowser.prototype.updateLayout): Deleted.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.filterUpdated):
(WebInspector.TimelineView.prototype.needsLayout):
(WebInspector.TimelineView.prototype.updateLayout): Deleted.
(WebInspector.TimelineView.prototype.updateLayoutIfNeeded): Deleted.
(WebInspector.TimelineView): Deleted.

* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype.set displayMode):
(WebInspector.Toolbar.prototype.set sizeMode):
(WebInspector.Toolbar.prototype.addToolbarItem):
(WebInspector.Toolbar.prototype.layout):
(WebInspector.Toolbar.prototype.customUpdateLayout): Deleted.
Renamed to layout. This eliminated a layering violation in NavigationBar,
where the function previously known as updateLayout checked for a
a `customUpdateLayout` function property, and would call it instead of its
own layout logic if found.

* UserInterface/Views/View.js: Added.
(WebInspector.View):
(WebInspector.View.prototype.get element):
(WebInspector.View.prototype.get subviews):
(WebInspector.View.prototype.addSubview):
Appends a view to the end of the subview list.
(WebInspector.View.prototype.insertSubviewBefore):
Inserts a view into subview list before another subview.
(WebInspector.View.prototype.removeSubview):
(WebInspector.View.prototype.replaceSubview):
(WebInspector.View.prototype.updateLayout):
No longer overridden by subclasses.
(WebInspector.View.prototype.updateLayoutIfNeeded):
Forces a layout if one has been scheduled, otherwise does nothing.
(WebInspector.View.prototype.needsLayout):
Schedules a layout for the view.
(WebInspector.View.prototype.layout):
Overridden by views that require special layout logic. Layouts
cascade to child views automatically.
(WebInspector.View.prototype._layoutSubtree):
Main layout entry point. Called by requestAnimationFrame via needsLayut, by
updateLayout when forcing a synchronous layout, and called recursively during
subview traversal.

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

4 years agoUnreviewed, add myself to the SVG watchlist.
said@apple.com [Tue, 3 Nov 2015 21:52:42 +0000 (21:52 +0000)]
Unreviewed, add myself to the SVG watchlist.

* Scripts/webkitpy/common/config/watchlist:

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

4 years agoFix touch event sending crash in WebKitTestRunner
wenson_hsieh@apple.com [Tue, 3 Nov 2015 21:40:20 +0000 (21:40 +0000)]
Fix touch event sending crash in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=150848
<rdar://problem/23360841>

Reviewed by Simon Fraser.

Fixes a redundant force event generated by HIDEventGenerator. See the Radar diagnosis for more details.

* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator _createIOHIDEventType:]): Deleted.

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

4 years agoWeb Inspector: Move ScriptDebugServer::Task to WorkerScriptDebugServer where it is...
commit-queue@webkit.org [Tue, 3 Nov 2015 21:37:40 +0000 (21:37 +0000)]
Web Inspector: Move ScriptDebugServer::Task to WorkerScriptDebugServer where it is actually used
https://bugs.webkit.org/show_bug.cgi?id=150847

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

Source/JavaScriptCore:

* inspector/ScriptDebugServer.h:
Remove Task from here, it isn't needed in the general case.

* parser/SourceProvider.h:
Remove unimplemented method.

Source/WebCore:

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::interruptAndRunTask):
* bindings/js/WorkerScriptDebugServer.h:
* inspector/WorkerDebuggerAgent.cpp:

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

4 years agoAX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
n_wang@apple.com [Tue, 3 Nov 2015 21:28:55 +0000 (21:28 +0000)]
AX: Add support for ARIA 1.1 attribute 'aria-modal' for dialog and alertdialog
https://bugs.webkit.org/show_bug.cgi?id=138566

Skip failing tests on windows platform.

Reviewed by Chris Fleizach.

* platform/win/TestExpectations:

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

4 years ago[Win] Unreviewed build fix after r191958.
bfulgham@apple.com [Tue, 3 Nov 2015 20:56:39 +0000 (20:56 +0000)]
[Win] Unreviewed build fix after r191958.

* MiniBrowser/win/MiniBrowser.h: Add missing include.
* MiniBrowser/win/MiniBrowserWebHost.h: Ditto.

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

4 years agoFix the build.
timothy_horton@apple.com [Tue, 3 Nov 2015 20:52:29 +0000 (20:52 +0000)]
Fix the build.

* platform/Widget.h:
(WebCore::Widget::boundsRect):
(WebCore::Widget::resize):

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

4 years agofont-variant-* properties in @font-face declarations should be honored
mmaxfield@apple.com [Tue, 3 Nov 2015 20:31:33 +0000 (20:31 +0000)]
font-variant-* properties in @font-face declarations should be honored
https://bugs.webkit.org/show_bug.cgi?id=149771

Reviewed by Simon Fraser.

Source/WebCore:

According to the CSS Fonts Level 3 spec, web authors are allowed to put
font-feature-settings / font-variant-* inside @font-face blocks. These
properties are supposed to be applied at a specific time during the
font selection algorithm.

This patch gives a FontFeatureSettings object and a FontVariantSettings
object to CSSFontFace, and moves common parsing logic from
StyleBuilderCustom to a shared location. Then, once the two properties
are parsed from the @font-face block, the relevant data structures are
passed down into the font selection algorithm. This algorithm then
consults with these values at the correct time (inside
preparePlatformFont()).

Tests: css3/font-feature-settings-font-face-rendering.html
       css3/font-variant-font-face-all.html
       css3/font-variant-font-face-override.html

* WebCore.xcodeproj/project.pbxproj: Add a header for the common
location of parsing font-variant-ligatures, font-variant-numeric,
and font-variant-east-asian.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::font): Pass the relevant data structures
into the font selection algorithm.
* css/CSSFontFace.h: Add FontFeatureSettings and FontVariantSettings
member variables.
(WebCore::CSSFontFace::insertFeature):
(WebCore::CSSFontFace::setVariantCommonLigatures):
(WebCore::CSSFontFace::setVariantDiscretionaryLigatures):
(WebCore::CSSFontFace::setVariantHistoricalLigatures):
(WebCore::CSSFontFace::setVariantContextualAlternates):
(WebCore::CSSFontFace::setVariantPosition):
(WebCore::CSSFontFace::setVariantCaps):
(WebCore::CSSFontFace::setVariantNumericFigure):
(WebCore::CSSFontFace::setVariantNumericSpacing):
(WebCore::CSSFontFace::setVariantNumericFraction):
(WebCore::CSSFontFace::setVariantNumericOrdinal):
(WebCore::CSSFontFace::setVariantNumericSlashedZero):
(WebCore::CSSFontFace::setVariantAlternates):
(WebCore::CSSFontFace::setVariantEastAsianVariant):
(WebCore::CSSFontFace::setVariantEastAsianWidth):
(WebCore::CSSFontFace::setVariantEastAsianRuby):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font): Pass the relevant data
structures into the font selection algorithm.
* css/CSSFontFaceSource.h: Ditto.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Call the shared
parsing logic to populate the FontFeatureSettings and
FontVariantSettings members.
* css/FontVariantBuilder.h: Added. Destination for shared parsing
logic.
(WebCore::applyValueFontVariantLigatures):
(WebCore::applyValueFontVariantNumeric):
(WebCore::applyValueFontVariantEastAsian):
* css/StyleBuilderCustom.h: Source for shared parsing logic.
(WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
* loader/cache/CachedFont.cpp: Pass the relevant data structures
into the font selection algorithm.
(WebCore::CachedFont::createFont):
(WebCore::CachedFont::platformDataFromCustomData):
* loader/cache/CachedFont.h: Ditto.
* loader/cache/CachedSVGFont.cpp: Ditto.
(WebCore::CachedSVGFont::createFont):
(WebCore::CachedSVGFont::platformDataFromCustomData):
* loader/cache/CachedSVGFont.h: Ditto.
* platform/graphics/FontCache.h: Ditto.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::codePath): Adjust comment.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont): Consult with the newly parsed values.
(WebCore::fontWithFamily): Pass the relevant data structures into the
font selection algorithm.
(WebCore::FontCache::systemFallbackForCharacters): Ditto.
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
* platform/graphics/mac/FontCustomPlatformData.h: Ditto.

LayoutTests:

* css3/font-variant-font-face-override-expected.html: Added
* css3/font-variant-font-face-override.html: Added
* css3/font-feature-settings-font-face-rendering-expected.html: Added.
* css3/font-feature-settings-font-face-rendering.html: Added.
* css3/font-variant-font-face-all-expected.html: Added.
* css3/font-variant-font-face-all.html: Added.

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

4 years agoWeb Inspector: Handle or Remove ParseHTML Timeline Event Records
commit-queue@webkit.org [Tue, 3 Nov 2015 20:27:35 +0000 (20:27 +0000)]
Web Inspector: Handle or Remove ParseHTML Timeline Event Records
https://bugs.webkit.org/show_bug.cgi?id=150689

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

Source/JavaScriptCore:

* inspector/protocol/Timeline.json:

Source/WebCore:

Remove ParseHTML nesting recordings. We were not using them
and for most pages their self-time is very small in comparison
to other events. We may consider adding it back later for
UI purposes but for now the frontend doesn't use the records
so lets remove it.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
(WebCore::InspectorInstrumentation::didWriteHTMLImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willWriteHTML): Deleted.
(WebCore::InspectorInstrumentation::didWriteHTML): Deleted.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willWriteHTML): Deleted.
(WebCore::InspectorTimelineAgent::didWriteHTML): Deleted.
(WebCore::toProtocol): Deleted.
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createParseHTMLData): Deleted.
* inspector/TimelineRecordFactory.h:

Source/WebInspectorUI:

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):

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

4 years agoRename InlineCallFrame:: getCallerSkippingDeadFrames to something more descriptive
msaboff@apple.com [Tue, 3 Nov 2015 20:02:02 +0000 (20:02 +0000)]
Rename InlineCallFrame:: getCallerSkippingDeadFrames to something more descriptive
https://bugs.webkit.org/show_bug.cgi?id=150832

Reviewed by Geoffrey Garen.

Renamed InlineCallFrame::getCallerSkippingDeadFrames() to getCallerSkippingTailCalls().
Did similar renaming to helper InlineCallFrame::computeCallerSkippingTailCalls() and
InlineCallFrame::getCallerInlineFrameSkippingTailCalls().

* bytecode/InlineCallFrame.h:
(JSC::InlineCallFrame::computeCallerSkippingTailCalls):
(JSC::InlineCallFrame::getCallerSkippingTailCalls):
(JSC::InlineCallFrame::getCallerInlineFrameSkippingTailCalls):
(JSC::InlineCallFrame::computeCallerSkippingDeadFrames): Deleted.
(JSC::InlineCallFrame::getCallerSkippingDeadFrames): Deleted.
(JSC::InlineCallFrame::getCallerInlineFrameSkippingDeadFrames): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::allInlineFramesAreTailCalls):
(JSC::DFG::ByteCodeParser::currentCodeOrigin):
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::isLiveInBytecode):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::forAllLocalsLiveInBytecode):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::codeOriginDescriptionOfCallSite):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::gotoNextFrame):

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

4 years agoHTMLOptionElement.text should never return the value of label
commit-queue@webkit.org [Tue, 3 Nov 2015 19:59:57 +0000 (19:59 +0000)]
HTMLOptionElement.text should never return the value of label
https://bugs.webkit.org/show_bug.cgi?id=148862
rdar://problem/22589226

Patch by Keith Rollin <krollin@apple.com> on 2015-11-03
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline tests to reflect new behavior of option.text.

* web-platform-tests/html/semantics/forms/the-option-element/option-text-label-expected.txt:

Source/WebCore:

According to the HTML spec, `option` elements should have the
following behavior:

    - the `text` property should return text contents of element
    - the `label` property should return value of label attribute if
      it exists, else return text property
    - the UI should display label property

12 years ago, in order to be compatibile with browsers of the time, we
diverged from this behavior: the text property behaved like the label
property, and the text property was used for display. This resulted in
our UI incidentally conforming to the spec, but also in the text
property *not* conforming to the spec. See <rdar://problem/3532519>
for discussion on this change.

The behavior of the browsers we were conforming to has changed. In
particular, the text property in Firefox now conforms to the spec
instead of behaving as we did. Therefore, it's less important to
retain our old behavior for the sake of compatibility. This check-in
brings us into conformance with the spec. The result is that the UI
stays the same, but the text property will return different values than
it used to if the option element has a label attribute that used to
hide it.

Updated tests:
- fast/dom/HTMLOptionElement/option-text.html:
- fast/forms/HTMLOptionElement_label01.html:
- fast/forms/HTMLOptionElement_label02.html:
- fast/forms/HTMLOptionElement_label03.html:
- fast/forms/HTMLOptionElement_label04.html:
- fast/forms/HTMLOptionElement_label05.html:
- fast/forms/HTMLOptionElement_label06.html:
- fast/forms/HTMLOptionElement_label07.html:
- fast/forms/option-value-and-label.html:

* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::stringValue):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::stringValue):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::text):
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):

LayoutTests:

Rebaseline tests to reflect new behavior of option.text. Convert some
render tests to reference tests.

* dom/xhtml/level2/html/HTMLOptionElement04-expected.txt:
* fast/dom/HTMLOptionElement/option-text-expected.txt:
* fast/dom/HTMLOptionElement/option-text.html:
* fast/forms/HTMLOptionElement_label01-expected.html: Added.
* fast/forms/HTMLOptionElement_label01.html:
* fast/forms/HTMLOptionElement_label02-expected.html: Added.
* fast/forms/HTMLOptionElement_label02.html:
* fast/forms/HTMLOptionElement_label03-expected.html: Added.
* fast/forms/HTMLOptionElement_label03.html:
* fast/forms/HTMLOptionElement_label04-expected.html: Added.
* fast/forms/HTMLOptionElement_label04.html:
* fast/forms/HTMLOptionElement_label05-expected.html: Added.
* fast/forms/HTMLOptionElement_label05.html:
* fast/forms/HTMLOptionElement_label06-expected.html: Added.
* fast/forms/HTMLOptionElement_label06.html:
* fast/forms/HTMLOptionElement_label07-expected.html: Added.
* fast/forms/HTMLOptionElement_label07.html:
* fast/forms/option-value-and-label-expected.txt:
* fast/forms/option-value-and-label.html:
* platform/efl/fast/forms/HTMLOptionElement_label01-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label02-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label03-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label03-expected.txt: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label04-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label05-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label06-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label06-expected.txt: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label07-expected.png: Removed.
* platform/efl/fast/forms/HTMLOptionElement_label07-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label01-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label02-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label03-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label03-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label04-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label05-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label06-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label06-expected.txt: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label07-expected.png: Removed.
* platform/gtk/fast/forms/HTMLOptionElement_label07-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label03-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label06-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/forms/HTMLOptionElement_label07-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label03-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label06-expected.txt: Removed.
* platform/ios-simulator/fast/forms/HTMLOptionElement_label07-expected.txt: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label01-expected.png: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label02-expected.png: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label03-expected.png: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label04-expected.png: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label05-expected.png: Removed.
* platform/mac-mavericks/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label01-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label02-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label03-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label03-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label04-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label05-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label06-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label06-expected.txt: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label07-expected.png: Removed.
* platform/mac/fast/forms/HTMLOptionElement_label07-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label01-expected.png: Removed.
* platform/win/fast/forms/HTMLOptionElement_label01-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label02-expected.png: Removed.
* platform/win/fast/forms/HTMLOptionElement_label02-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label03-expected.png: Removed.
* platform/win/fast/forms/HTMLOptionElement_label03-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label04-expected.png: Removed.
* platform/win/fast/forms/HTMLOptionElement_label04-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label05-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label06-expected.txt: Removed.
* platform/win/fast/forms/HTMLOptionElement_label07-expected.txt: Removed.

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

4 years agoResourceUsageOverlay should draw itself using WebCore::GraphicsContext.
akling@apple.com [Tue, 3 Nov 2015 19:54:12 +0000 (19:54 +0000)]
ResourceUsageOverlay should draw itself using WebCore::GraphicsContext.
<https://webkit.org/b/150841>

Reviewed by Antti Koivisto.

Use WebCore text drawing primitives instead of poking at the CGContext directly.
And stop using deprecated CoreGraphics APIs, too.

* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::drawCpuHistory):
(WebCore::drawGCHistory):

    Adjust for unflipped Y axis.

(WebCore::fontCascade):
(WebCore::showText):

    Draw using WebCore text drawing primitives.

(WebCore::ResourceUsageOverlay::draw):

    Remove CGContext calls and stop flipping the Y axis.

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