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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 years agoSimplify -[_WKRemoteObjectRegistry _invokeMethod:]
andersca@apple.com [Tue, 3 Nov 2015 19:25:52 +0000 (19:25 +0000)]
Simplify -[_WKRemoteObjectRegistry _invokeMethod:]
https://bugs.webkit.org/show_bug.cgi?id=150844

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(-[_WKRemoteObjectRegistry _invokeMethod:]):
(-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:

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

3 years agoAdd Jiewen Tan (jiewen_tan@apple.com) to committer list.
jiewen_tan@apple.com [Tue, 3 Nov 2015 19:02:45 +0000 (19:02 +0000)]
Add Jiewen Tan (jiewen_tan@apple.com) to committer list.

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

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

3 years agoB3/Air should use bubble sort for their insertion sets, because it's faster than...
fpizlo@apple.com [Tue, 3 Nov 2015 18:48:45 +0000 (18:48 +0000)]
B3/Air should use bubble sort for their insertion sets, because it's faster than std::stable_sort
https://bugs.webkit.org/show_bug.cgi?id=150828

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Undo the 2% compile time regression caused by http://trac.webkit.org/changeset/191913.

* b3/B3InsertionSet.cpp:
(JSC::B3::InsertionSet::execute): Switch to bubble sort.
* b3/air/AirInsertionSet.cpp:
(JSC::B3::Air::InsertionSet::execute): Switch to bubble sort.
* dfg/DFGBlockInsertionSet.cpp:
(JSC::DFG::BlockInsertionSet::execute): Switch back to quicksort.

Source/WTF:

Add a pretty good bubble sort implementation to WTF. This implementation has three
common tricks:

- Forward and backward scans. This reduces the severity of certain kinds of bubble sort
  pathologies.

- Return if a scan finds the list to be sorted. This gives the algorithm one of its most
  attractive properties: it's super fast when the list is already sorted.

- Each scan eliminates one element from future scans. This makes the algorithm no worse
  than insertion sort.

Why do we want this? Because bubble sort is a really great stable sort for small lists,
or large lists in which only a handful of elements are out of order. Compiler insertion
sets tend to be one of those or somewhere in between: usually they are very small, and
usually they are sorted. It's rare that an element will be out of order, and when it is,
it's usually very close to where it's supposed to be.

This is a significant speed-up for B3 compile times.

* WTF.xcodeproj/project.pbxproj:
* wtf/BubbleSort.h: Added.
(WTF::bubbleSort):
* wtf/CMakeLists.txt:

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

3 years agoCTTE the responsiveness timer getter
andersca@apple.com [Tue, 3 Nov 2015 18:44:44 +0000 (18:44 +0000)]
CTTE the responsiveness timer getter
https://bugs.webkit.org/show_bug.cgi?id=150825

Reviewed by Daniel Bates.

* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessForReload):
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::handleKeyboardEvent):
(WebKit::WebPageProxy::handleGestureEvent):
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::handleTouchEvent):
(WebKit::WebPageProxy::closePage):
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::showPopupMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::stopResponsivenessTimer):
(WebKit::WebPageProxy::runModal):
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::responsivenessTimer):

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

3 years ago[Win] CMake build update.
bfulgham@apple.com [Tue, 3 Nov 2015 18:32:09 +0000 (18:32 +0000)]
[Win] CMake build update.

Rubberstamped by Tim Horton.

* Source/PlatformWin.cmake: Add internal tool to build
rules for internal use.

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

3 years agoUnreviewed, partially revert r191952.
ossy@webkit.org [Tue, 3 Nov 2015 18:30:05 +0000 (18:30 +0000)]
Unreviewed, partially revert r191952.

Removed GCC compiler workarounds (unreachable returns).

* b3/B3Type.h:
(JSC::B3::sizeofType):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isUse):
(JSC::B3::Air::Arg::isDef):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isType):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::newTmp):
(JSC::B3::Air::Code::numTmps):

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

3 years ago[Streams API] Vended promise capabilities should not need @resolve/@reject fields
youenn.fablet@crf.canon.fr [Tue, 3 Nov 2015 18:29:59 +0000 (18:29 +0000)]
[Streams API] Vended promise capabilities should not need @resolve/@reject fields
https://bugs.webkit.org/show_bug.cgi?id=150835

Reviewed by Darin Adler.

No change in behavior, covered by existing tests.

* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader): Removed @resolve/@reject fields from resolved/rejected @closedPromiseCapability.
* Modules/streams/WritableStream.js:
(initializeWritableStream): Removed @resolve/@reject fields from resolved readyPromiseCapability.
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue): Updated code to be closer to spec and removing the need to resolve an already resolved promise.

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

3 years agoReplace 0 and NULL with nullptr in WebCore/dom.
hs85.jeong@samsung.com [Tue, 3 Nov 2015 18:24:34 +0000 (18:24 +0000)]
Replace 0 and NULL with nullptr in WebCore/dom.
https://bugs.webkit.org/show_bug.cgi?id=150788

Reviewed by Darin Adler.

No new tests because there is no behavior change.

* dom/Attr.cpp:
(WebCore::Attr::Attr):
(WebCore::Attr::detachFromElementWithValue):
(WebCore::Attr::attachToElement):
* dom/Attr.h:
* dom/CheckedRadioButtons.cpp:
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::CheckedRadioButtons::checkedButtonForGroup):
(WebCore::CheckedRadioButtons::isInRequiredGroup):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::enqueueMutationRecord):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeBetween):
* dom/ContainerNode.h:
(WebCore::ContainerNode::ContainerNode):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyNodeRemovedFromDocument):
* dom/Document.h:
(WebCore::Document::wellFormed):
(WebCore::Document::scriptRunner):
(WebCore::Document::moduleLoader):
(WebCore::Document::currentScript):
(WebCore::Document::webkitFullscreenElement):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::MapEntry::MapEntry):
* dom/DocumentParser.cpp:
(WebCore::DocumentParser::detach):
(WebCore::DocumentParser::suspendScheduledTasks):
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
(WebCore::Element::shadowRoot):
(WebCore::Element::blur):
(WebCore::Element::beforePseudoElement):
(WebCore::Element::afterPseudoElement):
(WebCore::Element::setBeforePseudoElement):
* dom/Event.cpp:
(WebCore::Event::Event):
* dom/Event.h:
(WebCore::Event::legacyReturnValue):
(WebCore::Event::setLegacyReturnValue):
(WebCore::Event::clipboardData):
* dom/EventContext.cpp:
(WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):
* dom/EventDispatcher.cpp:
(WebCore::EventPath::lastContextIfExists):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
(WebCore::EventListenerIterator::EventListenerIterator):
* dom/EventListenerMap.h:
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/FocusEvent.cpp:
(WebCore::FocusEventInit::FocusEventInit):
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::enqueueEvent):
* dom/IdTargetObserverRegistry.h:
(WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
(WebCore::IdTargetObserverRegistry::notifyObservers):
* dom/IgnoreDestructiveWriteCountIncrementer.h:
(WebCore::IgnoreDestructiveWriteCountIncrementer::IgnoreDestructiveWriteCountIncrementer):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
* dom/MessageEvent.h:
* dom/MessagePort.cpp:
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::locallyEntangledPort):
(WebCore::MessagePort::disentanglePorts):
* dom/MouseEvent.cpp:
(WebCore::MouseEventInit::MouseEventInit):
(WebCore::MouseEvent::cloneFor):
* dom/MouseEvent.h:
(WebCore::MouseEvent::dataTransfer):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/MutationEvent.h:
* dom/Node.cpp:
(WebCore::Node::nodeLists):
(WebCore::Node::clearNodeLists):
(WebCore::Node::nonShadowBoundaryParentNode):
(WebCore::Node::parentOrShadowHostElement):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::removeCachedCollection):
(WebCore::NodeListsNodeData::isEmpty):
* dom/PendingScript.cpp:
(WebCore::PendingScript::releaseElementAndClear):
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::PopStateEvent):
* dom/Position.h:
(WebCore::Position::deprecatedNode):
(WebCore::Position::document):
(WebCore::Position::rootEditableElement):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::decrement):
* dom/PositionIterator.h:
(WebCore::PositionIterator::PositionIterator):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::ProcessingInstruction):
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::parseStyleSheet):
* dom/ProcessingInstruction.h:
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
(WebCore::ScriptElement::ignoresLoadRequest):
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::create):
(WebCore::ScriptedAnimationController::clearDocumentPointer):
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheKey::PresentationAttributeCacheKey):
(WebCore::StyledElement::addSubresourceAttributeURLs):
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* dom/StyledElement.h:
(WebCore::StyledElement::additionalPresentationAttributeStyle):
(WebCore::StyledElement::inlineStyle):
* dom/TemplateContentDocumentFragment.h:
* dom/TextEvent.cpp:
(WebCore::TextEvent::TextEvent):
* dom/UIEvent.cpp:
(WebCore::UIEventInit::UIEventInit):
* dom/UserTypingGestureIndicator.cpp:
(WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
(WebCore::UserTypingGestureIndicator::~UserTypingGestureIndicator):
* dom/ViewportArguments.cpp:
(WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable):
(WebCore::numericPrefix):
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::MessagePortChannel::disentangle):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
* dom/default/PlatformMessagePortChannel.h:

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

3 years agoTapping *below* some <input>s can focus them in Mobile Safari
wenson_hsieh@apple.com [Tue, 3 Nov 2015 17:15:38 +0000 (17:15 +0000)]
Tapping *below* some <input>s can focus them in Mobile Safari
https://bugs.webkit.org/show_bug.cgi?id=146244
<rdar://problem/21509310>

Reviewed by Darin Adler.

Source/WebCore:

Removes iOS-specific logic in positionForPointRespectingEditingBoundaries that was causing us to focus inputs by
tapping on the document element. We believe this logic, which causes VisiblePosition finding to recurse from a non-
editable element to an editable child, is not necessary to focus editable elements underneath non-editable elements,
since hit-testing will already have selected the contentEditable element prior to searching for a suitable
VisiblePosition. Further investigation shows that this logic was added to fix <rdar://problem/5545799>, in which the
first character in a Notes document could not be selected. However, I have not been able to reproduce this bug after
removing this logic.

As a result of this change, we can also enable a WK1 test, editing/selection/click-outside-editable-div.html, that
had also been marked as failing due to positionForPointRespectingEditingBoundaries recursing into a contentEditable
div.

Test: fast/events/ios/clicking-document-should-not-trigger-focus.html

* rendering/RenderBlock.cpp:
(WebCore::positionForPointRespectingEditingBoundaries): Deleted.

LayoutTests:

Enables a now-passing WK1 editing test (editing/selection/click-outside-editable-div.html) and also add a new
WK2 test that verifies an input node won't be focused by clicking anywhere in the document outside of the body.

* fast/events/ios/clicking-document-should-not-trigger-focus-expected.txt: Added.
* fast/events/ios/clicking-document-should-not-trigger-focus.html: Added.
* platform/ios-simulator-wk1/TestExpectations: No longer disable editing/selection/click-outside-editable-div.html.

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

3 years agoUpdate to match text-orientation spec
mmaxfield@apple.com [Tue, 3 Nov 2015 17:13:24 +0000 (17:13 +0000)]
Update to match text-orientation spec
https://bugs.webkit.org/show_bug.cgi?id=150765

Reviewed by Darin Adler.

Source/WebCore:

The CSS spec has removed the "sideways-right" value of text-orientation in favor
of "sideways." This patch makes the parser treat "sideways-right" the same as
"sideways."

Test: fast/text/orientation-sideways-right.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextOrientation):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::fontAndGlyphOrientation): Deleted.
* rendering/style/RenderStyleConstants.h:

LayoutTests:

* fast/text/orientation-sideways-right-expected.html: Added.
* fast/text/orientation-sideways-right.html: Added.

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

3 years agoFix the ENABLE(B3_JIT) build on Linux
ossy@webkit.org [Tue, 3 Nov 2015 15:50:37 +0000 (15:50 +0000)]
Fix the ENABLE(B3_JIT) build on Linux
https://bugs.webkit.org/show_bug.cgi?id=150794

Reviewed by Darin Adler.

* CMakeLists.txt:
* b3/B3HeapRange.h:
* b3/B3IndexSet.h:
(JSC::B3::IndexSet::Iterable::iterator::operator++):
* b3/B3Type.h:
(JSC::B3::sizeofType):
* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::dump):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isUse):
(JSC::B3::Air::Arg::isDef):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isType):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::newTmp):
(JSC::B3::Air::Code::numTmps):
* b3/air/AirSpecial.cpp:

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

3 years agoUnreviewed, add unittest after r191827.
ossy@webkit.org [Tue, 3 Nov 2015 15:32:32 +0000 (15:32 +0000)]
Unreviewed, add unittest after r191827.

* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

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

3 years ago[Streams API] Rework promises to use @newPromiseCapability
calvaris@igalia.com [Tue, 3 Nov 2015 14:52:04 +0000 (14:52 +0000)]
[Streams API] Rework promises to use @newPromiseCapability
https://bugs.webkit.org/show_bug.cgi?id=150627

Reviewed by Youenn Fablet.

We are removing the stream promises functions in favor of @newPromiseCapabity which basically provides the same
functionality (keeping the resolve and reject functions without external slots). Slots and variables were
renamed as *PromiseCapability to show that they no longer hold just a promise, but a promise capability.

Internal rework, no new tests needed.

* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader.this.closedPromiseCapability.resolve):
(privateInitializeReadableStreamReader.this.closedPromiseCapability.reject):
(privateInitializeReadableStreamReader):
(teeReadableStream):
(teeReadableStreamBranch2CancelFunction):
(errorReadableStream):
(closeReadableStreamReader):
(enqueueInReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(closed):
* Modules/streams/StreamInternals.js:
(createNewStreamsPromise): Deleted.
(resolveStreamsPromise): Deleted.
(rejectStreamsPromise): Deleted.
* Modules/streams/WritableStream.js:
(this.readyPromiseCapability.resolve):
(this.readyPromiseCapability.reject):
(initializeWritableStream):
(close):
(write):
(closed):
(ready):
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):
(errorWritableStream):
* bindings/js/WebCoreBuiltinNames.h:

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

3 years agoMove webkitGetUserMedia to JS Builtin
youenn.fablet@crf.canon.fr [Tue, 3 Nov 2015 13:43:56 +0000 (13:43 +0000)]
Move webkitGetUserMedia to JS Builtin
https://bugs.webkit.org/show_bug.cgi?id=149499

Reviewed by Darin Adler.

Source/WebCore:

Implemented webkitGetUserMedia as a JSBuiltin wrapper around navigator.mediaDevices.getUserMedia.

Removed cpp based version.

The js builting implementation checks for argument but does not raise exception when the request is not supported.
The error callback is called instead, in an asynchronous fashion.
The js builtin implementation does not check first that it is called on navigator, contrary to the cpp implementation.
This is done afterwards when calling navigator.MediaDevices.@getUserMedia.

Covered by existing and modified tests.

* CMakeLists.txt: Adding NavigatorUserMedia.js as built-in JS file.
* DerivedSources.make: Ditto.
* Modules/mediastream/NavigatorUserMedia.idl: Making webkitGetUserMedia JSBuiltin
* Modules/mediastream/NavigatorUserMedia.js:
(webkitGetUserMedia):
* Modules/mediastream/NavigatorUserMediaErrorCallback.h: Removed.
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl: Removed.
* Modules/mediastream/NavigatorUserMediaSuccessCallback.h: Removed.
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl: Removed.
* Modules/mediastream/UserMediaRequest.cpp:
* Modules/mediastream/UserMediaRequest.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation): Style modifications.
* bindings/js/JSNavigatorCustom.cpp: Removed.
* bindings/js/WebCoreJSBuiltins.cpp: Adding support for NavigatorUserMedia.js built-in JS file.
* bindings/js/WebCoreJSBuiltins.h: Ditto.
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
(WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):

LayoutTests:

* fast/mediastream/argument-types-expected.txt:
* fast/mediastream/getusermedia-expected.txt:
* fast/mediastream/getusermedia.html:
* fast/mediastream/script-tests/argument-types.js:
* http/tests/media/media-stream/disconnected-frame-already-expected.txt:

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

3 years ago[GStreamer] Use GstBus sync message handler and schedule tasks to the main thread...
carlosgc@webkit.org [Tue, 3 Nov 2015 10:43:52 +0000 (10:43 +0000)]
[GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
https://bugs.webkit.org/show_bug.cgi?id=150800

Reviewed by Philippe Normand.

This way we would avoid all the GScource + polling mechanism that
GST uses internally to handle messages asynchronously in the main thread.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::refGPtr<GstMessage>):
(WTF::derefGPtr<GstMessage>):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
Initialize the WeakPtr factory.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
reset the GstBus sync handler.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Make it void.
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
GstBus sync message handler and schedule the messages to the main
thread with RunLoop::main().dispatch().
(WebCore::mediaPlayerPrivateMessageCallback): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Create a WeakPtr.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
Handle the need context message that needs to be handled in the
caller thread.
(WebCore::mediaPlayerPrivateNeedContextMessageCallback): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::setPipeline): Do not
connect to sync-message signal, handleSyncMessage() will be called
to handled messages synchronously.
(WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage): Deleted.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

3 years ago[GStreamer] Cleanup the iradio properties
carlosgc@webkit.org [Tue, 3 Nov 2015 10:40:06 +0000 (10:40 +0000)]
[GStreamer] Cleanup the iradio properties
https://bugs.webkit.org/show_bug.cgi?id=148522

Reviewed by Philippe Normand.

Remove unused icecast code.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::handleResponseReceived):
(webKitWebSrcGetProperty): Deleted.
(webKitWebSrcStop): Deleted.

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

3 years agoClean up ENABLE(ES6_ARROWFUNCTION_SYNTAX) ifdefs and keep minimal set of them
utatane.tea@gmail.com [Tue, 3 Nov 2015 10:36:20 +0000 (10:36 +0000)]
Clean up ENABLE(ES6_ARROWFUNCTION_SYNTAX) ifdefs and keep minimal set of them
https://bugs.webkit.org/show_bug.cgi?id=150793

Reviewed by Darin Adler.

Fix the !ENABLE(ES6_ARROWFUNCTION_SYNTAX) build after r191875.
This patch drops many ENABLE(ES6_ARROWFUNCTION_SYNTAX) ifdefs and keep only one of them;
the ifdef in parseAssignmentExpression.
This prevents functionality of parsing arrow function syntax.

* parser/Lexer.cpp:
(JSC::Lexer<T>::lex):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner): Deleted.
* parser/Parser.h:
(JSC::Parser::isArrowFunctionParamters): Deleted.
* parser/ParserTokens.h:

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

3 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.11.1 release.
carlosgc@webkit.org [Tue, 3 Nov 2015 09:47:59 +0000 (09:47 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.1 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.11.1.

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

3 years agoUse the same cookie storage as WebCore when using NETWORK_SESSION
commit-queue@webkit.org [Tue, 3 Nov 2015 09:28:15 +0000 (09:28 +0000)]
Use the same cookie storage as WebCore when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=150833

Patch by Alex Christensen <achristensen@webkit.org> on 2015-11-03
Reviewed by Antti Koivisto.

This fixes 12 tests when using NETWORK_SESSION.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):

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

3 years agoClean up NETWORK_SESSION code after r191848
commit-queue@webkit.org [Tue, 3 Nov 2015 09:16:53 +0000 (09:16 +0000)]
Clean up NETWORK_SESSION code after r191848
https://bugs.webkit.org/show_bug.cgi?id=150829

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

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didCompleteWithError):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):

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

3 years agoUnreviewed. Fix GTK+ build after r191924.
carlosgc@webkit.org [Tue, 3 Nov 2015 07:51:57 +0000 (07:51 +0000)]
Unreviewed. Fix GTK+ build after r191924.

* UIProcess/API/gtk/WebKitWebView.cpp:

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

3 years agoinput[type=number] does not increment/decrement integers with trailing decimal characters
commit-queue@webkit.org [Tue, 3 Nov 2015 07:21:41 +0000 (07:21 +0000)]
input[type=number] does not increment/decrement integers with trailing decimal characters
https://bugs.webkit.org/show_bug.cgi?id=148867
rdar://problem/22589693

Patch by Keith Rollin <krollin@apple.com> on 2015-11-02
Reviewed by Chris Dumez.

Source/WebCore:

Support input[type=number].value attributes of the form "###." (that
is, leading digits with a decimal but no trailing digits). This form
was supported in the setting of the attribute, but not when changing
it through stepUp/Down.

Testing turned up similarly incorrect processing of -.###, so
addressed that, too.

Test: fast/forms/range/input-appearance-range-decimals.html

Updated the following tests:
- fast/forms/number/number-stepup-stepdown-from-renderer.html
- fast/forms/number/number-stepup-stepdown.html
- fast/forms/range/range-stepup-stepdown-from-renderer.html
- fast/forms/range/range-stepup-stepdown.html

* html/InputType.cpp:
(WebCore::InputType::stepUpFromRenderer):
* platform/Decimal.cpp:
(WebCore::Decimal::fromString):

LayoutTests:

New tests for input[type=number].skipUp/Down when .value ends in a
decimal point (with no additional trailing digits). Also some coverage
for input[type=range] which shares some same code.

* fast/forms/number/number-stepup-stepdown-expected.txt:
* fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/number/number-stepup-stepdown-from-renderer.html:
* fast/forms/number/number-stepup-stepdown.html:
* fast/forms/range/range-stepup-stepdown-expected.txt:
* fast/forms/range/range-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/range/range-stepup-stepdown-from-renderer.html:
* fast/forms/range/range-stepup-stepdown.html:
* fast/forms/range/input-appearance-range-decimals-expected.html: Added
* fast/forms/range/input-appearance-range-decimals.html: Added

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

3 years ago[Cocoa] Fix tests
mmaxfield@apple.com [Tue, 3 Nov 2015 06:16:26 +0000 (06:16 +0000)]
[Cocoa] Fix tests

Unreviewed.

s/Failure/ImageOnlyFailure/

* platform/mac/TestExpectations:

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

3 years agoNull dereference loading Blink layout test fast/css/background-repeat-null-y-crash...
jiewen_tan@apple.com [Tue, 3 Nov 2015 05:35:35 +0000 (05:35 +0000)]
Null dereference loading Blink layout test fast/css/background-repeat-null-y-crash.html
https://bugs.webkit.org/show_bug.cgi?id=150211
<rdar://problem/23137321>

Reviewed by Alex Christensen.

Source/WebCore:

This is a merge of Blink r188842:
https://codereview.chromium.org/846933002

By setting the backgroundRepeatY property to null it can
happen that accessing that CSS value returns a null pointer.
In that case simply bail out early.

Test: fast/css/background-repeat-null-y-crash.html

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue):

LayoutTests:

* fast/css/background-repeat-null-y-crash-expected.txt: Added.
* fast/css/background-repeat-null-y-crash.html: Added.

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

3 years agoWebInspector crashed while viewing Timeline when refreshing cnn.com while it was...
msaboff@apple.com [Tue, 3 Nov 2015 05:34:01 +0000 (05:34 +0000)]
WebInspector crashed while viewing Timeline when refreshing cnn.com while it was already loading
https://bugs.webkit.org/show_bug.cgi?id=150745

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

During OSR exit, reifyInlinedCallFrames() was using the call kind from a tail call to
find the CallLinkInfo / StubInfo to find the return PC.  Instead we need to get the call
type of the true caller, that is the function we'll be returning to.

This can be found by remembering the last call type we find while walking up the inlined
frames in InlineCallFrame::getCallerSkippingDeadFrames().

We can also return directly back to a getter or setter callsite without using a thunk.

* bytecode/InlineCallFrame.h:
(JSC::InlineCallFrame::computeCallerSkippingDeadFrames):
(JSC::InlineCallFrame::getCallerSkippingDeadFrames):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_id): Need to eliminate the stack pointer check, as it is wrong
for reified inlined frames created during OSR exit.
* jit/ThunkGenerators.cpp:
(JSC::baselineGetterReturnThunkGenerator): Deleted.
(JSC::baselineSetterReturnThunkGenerator): Deleted.
* jit/ThunkGenerators.h:

LayoutTests:

New regression tests.

* js/regress-150745-expected.txt: Added.
* js/regress-150745.html: Added.
* js/script-tests/regress-150745.js: Added.
(Test):
(Test.prototype.get sum):
(Test.prototype.doSum):
(getSum):

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

3 years ago[Mac][GTK] Disable Ninja response file support
commit-queue@webkit.org [Tue, 3 Nov 2015 05:19:45 +0000 (05:19 +0000)]
[Mac][GTK] Disable Ninja response file support
https://bugs.webkit.org/show_bug.cgi?id=150801

Patch by Philippe Normand <pnormand@igalia.com> on 2015-11-02
Reviewed by Alex Christensen.

* Source/cmake/OptionsCommon.cmake: The OSX toolchain doesn't
support response files, so instruct Ninja to not generate those.

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

3 years ago[Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
mmaxfield@apple.com [Tue, 3 Nov 2015 03:53:33 +0000 (03:53 +0000)]
[Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
https://bugs.webkit.org/show_bug.cgi?id=150766

Reviewed by Darin Adler.

Source/WebCore:

The spec has changed the initial value of text-orientation from "vertical-right"
to "mixed." This patch follows this movement, but also keeps the existing
property working (the parser will treat both values the same).

Test: fast/text/vertical-mixed.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::checkForOrientationChange):
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::FontDescription):
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::fontForCombiningCharacterSequence):
* platform/text/TextFlags.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getFontAndGlyphOrientation):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/inherited-properties-rare-text-expected.txt:
* fast/text/vertical-mixed-expected.html: Added.
* fast/text/vertical-mixed.html: Added.
* svg/css/getComputedStyle-basic-expected.txt:

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

3 years ago[Cocoa] Support WOFF2
mmaxfield@apple.com [Tue, 3 Nov 2015 03:52:16 +0000 (03:52 +0000)]
[Cocoa] Support WOFF2
https://bugs.webkit.org/show_bug.cgi?id=150830

Reviewed by Zalan Bujtas.

Source/WebCore:

On platforms which support it, WebKit only needs to recognize WOFF2.

Test: fast/text/woff2.html

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

LayoutTests:

* platform/mac/TestExpectations: Disable the test on Operating Systems which don't support WOFF2.
* fast/text/resources/ahem.woff2: Added.
* fast/text/woff2-expected.html: Added.
* fast/text/woff2.html: Added.

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

3 years agoFix CMake build after r191922.
achristensen@apple.com [Tue, 3 Nov 2015 03:23:03 +0000 (03:23 +0000)]
Fix CMake build after r191922.

* PlatformMac.cmake:

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

3 years agoTry again to fix the iOS build.
aestes@apple.com [Tue, 3 Nov 2015 02:21:10 +0000 (02:21 +0000)]
Try again to fix the iOS build.

* Shared/mac/PDFKitImports.mm:

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

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

Reviewed by Chris Fleizach.

Source/WebCore:

Added support for aria-modal attribute on dialog/alertdialog roles.
When modal dialog is displayed, all other contents will be unaccessible.

Tests: accessibility/aria-modal-multiple-dialogs.html
       accessibility/aria-modal.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::~AXObjectCache):
(WebCore::AXObjectCache::findAriaModalNodes):
(WebCore::AXObjectCache::updateCurrentAriaModalNode):
(WebCore::AXObjectCache::isNodeVisible):
(WebCore::AXObjectCache::ariaModalNode):
(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::handleAriaModalChange):
(WebCore::AXObjectCache::labelChanged):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::handleActiveDescendantChanged):
(WebCore::AXObjectCache::handleAriaExpandedChange):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::handleAriaModalChange):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
(WebCore::AXObjectCache::handleScrollbarUpdate):
(WebCore::AXObjectCache::handleAttributeChanged):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaCurrentState):
(WebCore::AccessibilityObject::isAriaModalDescendant):
(WebCore::AccessibilityObject::ignoredFromARIAModalPresence):
(WebCore::AccessibilityObject::hasTagName):
(WebCore::AccessibilityObject::defaultObjectInclusion):
* accessibility/AccessibilityObject.h:
* html/HTMLAttributeNames.in:

LayoutTests:

* accessibility/aria-modal-expected.txt: Added.
* accessibility/aria-modal-multiple-dialogs-expected.txt: Added.
* accessibility/aria-modal-multiple-dialogs.html: Added.
* accessibility/aria-modal.html: Added.

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

3 years agoWrong value recovery for DFG try/catch with a getter that throws during an IC miss
sbarati@apple.com [Tue, 3 Nov 2015 01:19:17 +0000 (01:19 +0000)]
Wrong value recovery for DFG try/catch with a getter that throws during an IC miss
https://bugs.webkit.org/show_bug.cgi?id=150760

Reviewed by Geoffrey Garen.

This is related to using PhantomLocal instead of Flush as
the liveness preservation mechanism for live catch variables.
I'm temporarily switching things back to Flush. This will be a
performance hit for try/catch in the DFG. Landing this patch,
though, will allow me to land try/catch in the FTL. It also
makes try/catch in the DFG sound. I have opened another
bug to further investigate using PhantomLocal as the
liveness preservation mechanism: https://bugs.webkit.org/show_bug.cgi?id=150824

* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlock):
* tests/stress/dfg-try-catch-wrong-value-recovery-on-ic-miss.js: Added.
(assert):
(let.oThrow.get f):
(let.o2.get f):
(foo):
(f):

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

3 years agoModern IDB: IBDObjectStore.delete() support.
beidson@apple.com [Tue, 3 Nov 2015 01:06:53 +0000 (01:06 +0000)]
Modern IDB: IBDObjectStore.delete() support.
https://bugs.webkit.org/show_bug.cgi?id=150784

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/idbobjectstore-delete-1.html
       storage/indexeddb/modern/idbobjectstore-delete-2.html
       storage/indexeddb/modern/idbobjectstore-delete-failures.html

* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::isValid):
* Modules/indexeddb/IDBKeyRangeData.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::deleteRecord):
(WebCore::IDBClient::IDBConnectionToServer::didDeleteRecord):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::get):
(WebCore::IDBClient::IDBObjectStore::deleteFunction):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::requestDeleteRecord):
(WebCore::IDBClient::IDBTransaction::deleteRecordOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteRecordOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/server/IDBBackingStore.h:

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

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

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteRecord): Deleted.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

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

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performDeleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteRecord):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

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

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

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didDeleteRecord):
(WebCore::InProcessIDBServer::deleteRecord):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* storage/indexeddb/modern/idbobjectstore-delete-1-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-delete-1.html: Added.
* storage/indexeddb/modern/idbobjectstore-delete-2-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-delete-2.html: Added.
* storage/indexeddb/modern/idbobjectstore-delete-failures-expected.txt: Added.
* storage/indexeddb/modern/idbobjectstore-delete-failures.html: Added.

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

3 years agoTry to fix the iOS build
timothy_horton@apple.com [Tue, 3 Nov 2015 00:46:01 +0000 (00:46 +0000)]
Try to fix the iOS build

* Shared/mac/PDFKitImports.h:

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

3 years agoAddress a misssed review comment in r191922
timothy_horton@apple.com [Tue, 3 Nov 2015 00:44:49 +0000 (00:44 +0000)]
Address a misssed review comment in r191922

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

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

3 years agoMarking imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked...
ryanhaddad@apple.com [Tue, 3 Nov 2015 00:37:44 +0000 (00:37 +0000)]
Marking imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-chunked-trailer.htm as flaky on mac
https://bugs.webkit.org/show_bug.cgi?id=150823

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoAdd KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePage...
andersca@apple.com [Tue, 3 Nov 2015 00:32:25 +0000 (00:32 +0000)]
Add KVO-compliant _webProcessIsResponsive property to WKWebView and _WKObservablePageState
https://bugs.webkit.org/show_bug.cgi?id=150818
rdar://problem/22372131

Reviewed by Tim Horton.

* UIProcess/API/C/mac/WKPagePrivateMac.h:
* UIProcess/API/C/mac/WKPagePrivateMac.mm:
(-[WKObservablePageState _webProcessIsResponsive]):
* UIProcess/API/Cocoa/PageLoadStateObserver.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeWebProcessIsResponsive):
(WebKit::NavigationState::didChangeWebProcessIsResponsive):
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::willChangeProcessIsResponsive):
(WebKit::PageLoadState::didChangeProcessIsResponsive):
* UIProcess/PageLoadState.h:
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::ResponsivenessTimer):
(WebKit::ResponsivenessTimer::timerFired):
(WebKit::ResponsivenessTimer::stop):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeProcessIsResponsive):
(WebKit::WebPageProxy::didChangeProcessIsResponsive):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didBecomeResponsive):
(WebKit::WebProcessProxy::willChangeIsResponsive):
(WebKit::WebProcessProxy::didChangeIsResponsive):
* UIProcess/WebProcessProxy.h:

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

3 years agoFix the iOS build again.
aestes@apple.com [Tue, 3 Nov 2015 00:25:56 +0000 (00:25 +0000)]
Fix the iOS build again.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: supportsPictureInPicture() needs to be declared even when
AVKit is disabled.

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

3 years agoPDFPlugin should take advantage of threaded scrolling
timothy_horton@apple.com [Tue, 3 Nov 2015 00:25:04 +0000 (00:25 +0000)]
PDFPlugin should take advantage of threaded scrolling
https://bugs.webkit.org/show_bug.cgi?id=150037

Reviewed by Anders Carlsson.

Duplicate PDFPlugin, creating PDFPlugin (the modern version), and
DeprecatedPDFPlugin (containing the code that used to be in PDFPlugin
prior to this patch).

The new PDFPlugin differs from the old one in a few significant ways,
and we need to keep both alive for the time being. Significant differences
include:

- PDFPlugin is no longer a ScrollableArea
- PDFPlugin no longer hosts layers owned by PDFKit; instead, it draws
  into the page tiles, allowing WebCore's threaded scrolling to do its job
- PDFPlugin now resizes itself to the size of the document
- PDFPlugin doesn't handle zooming itself, it just delegates to the page
- PDFLayerController has large and incompatible API changes
- PDFPlugin now implements more of the HUD behavior, but it's still
  painted by PDFLayerController (into a view-relative PageOverlay)

[ File list elided because it's long and useless. ]

* page/PageOverlay.cpp:
(WebCore::PageOverlay::PageOverlay):
(WebCore::PageOverlay::setNeedsDisplay):
Don't reset the overlay layer's opacity if we're not animating,
because it's possible the client wants to manage it.

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
Let the overlay itself determine whether it needes synchronous scrolling,
and let PageOverlay clients override the default.

* platform/Widget.h:
(WebCore::Widget::boundsRect):
Export a few useful things.

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

3 years agoRegression(r191673): Crash in RunLoopTimer::schedule()
cdumez@apple.com [Tue, 3 Nov 2015 00:14:36 +0000 (00:14 +0000)]
Regression(r191673): Crash in RunLoopTimer::schedule()
https://bugs.webkit.org/show_bug.cgi?id=150816
<rdar://problem/23335285>

Reviewed by Anders Carlsson.

The crash was happening when the RunLoopTimer would fire during the
call to RunLoopTimer::schedule(), which can happen because we are
calling schedule() from a background thread. In such case, the
timerFired() callback execution would cause |this| to get destroyed.

To avoid this issue, DecodingResultDispatcher is now ref-counted. The
object is ref'd while calling startTimer() so that the object cannot go
away during the execution of this method. Also, we explicitly ref the
object when starting the timer to keep the object alive until the
RunLoopTimer has fired, at which point we explicitely de-ref.

This should handle correctly the cases where the RunLoopTimer fires
during AND after the execution of startTimer().

* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
(WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
(WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):

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

3 years ago[Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
aestes@apple.com [Tue, 3 Nov 2015 00:11:19 +0000 (00:11 +0000)]
[Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
https://bugs.webkit.org/show_bug.cgi?id=150819

Reviewed by Dan Bernstein.

This tells Xcode to include these platforms in its Devices dropdown, making it possible to build in the IDE.

Source/bmalloc:

* Configurations/Base.xcconfig:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:

Source/WebInspectorUI:

* Configurations/Base.xcconfig:

Source/WebKit/mac:

* Configurations/Base.xcconfig:

Source/WebKit2:

* Configurations/Base.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:

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

3 years agoBegin work on supporting reply blocks in _WKRemoteObjectRegistry
andersca@apple.com [Tue, 3 Nov 2015 00:07:52 +0000 (00:07 +0000)]
Begin work on supporting reply blocks in _WKRemoteObjectRegistry
https://bugs.webkit.org/show_bug.cgi?id=150739

Reviewed by Tim Horton.

Source/WebKit2:

* Platform/spi/Cocoa/BlockSPI.h:
Add SPI header.

* Shared/API/Cocoa/RemoteObjectInvocation.h:
(WebKit::RemoteObjectInvocation::ReplyInfo::ReplyInfo):
(WebKit::RemoteObjectInvocation::replyInfo):
* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::RemoteObjectInvocation):
(WebKit::RemoteObjectInvocation::encode):
(WebKit::RemoteObjectInvocation::decode):
Add an optional ReplyInfo struct to RemoteObjectInvocation.

* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(generateReplyIdentifier):
Helper function to generate a reply identifier.

(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
Do some block parameter validation.

* WebKit2.xcodeproj/project.pbxproj:

Tools:

Add a test. We only test the encoding right now.

* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.h:
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:
(-[RemoteObjectRegistryPlugIn sayHello:completionHandler:]):

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

3 years ago[iOS] Another unreviewed sandbox update.
bfulgham@apple.com [Mon, 2 Nov 2015 23:53:31 +0000 (23:53 +0000)]
[iOS] Another unreviewed sandbox update.

* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Change copyright.

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

3 years ago[Win] MiniBrowser unable to use WebInspector
bfulgham@apple.com [Mon, 2 Nov 2015 23:51:52 +0000 (23:51 +0000)]
[Win] MiniBrowser unable to use WebInspector
https://bugs.webkit.org/show_bug.cgi?id=150810
<rdar://problem/23358514>

Reviewed by Timothy Hatcher.

The CMakeList rule for creating the InjectedScriptSource.min.js was improperly including
the quote characters in the text prepended to InjectedScriptSource.min.js. This caused a
parsing error in the JS file.

The solution was to switch from using "COMMAND echo" to use the more cross-platform
compatible command "COMMAND ${CMAKE_COMMAND} -E echo ...", which handles the string
escaping properly on all platforms.

* CMakeLists.txt: Switch the 'echo' command syntax to be more cross-platform.

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

3 years ago[iOS] Unreviewed sandbox update.
bfulgham@apple.com [Mon, 2 Nov 2015 23:30:20 +0000 (23:30 +0000)]
[iOS] Unreviewed sandbox update.

Correcting copyright information.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

3 years agohasOverflowClip() does not necessarily mean valid layer().
zalan@apple.com [Mon, 2 Nov 2015 23:16:51 +0000 (23:16 +0000)]
hasOverflowClip() does not necessarily mean valid layer().
https://bugs.webkit.org/show_bug.cgi?id=150814

Reviewed by Simon Fraser.

Certain RenderLayerModelObject derived classes simply return false for ::requiresLayer(), which means
that we end up not creating a layer for the overflow clipped content.

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateScrollInfoAfterLayout):
(WebCore::RenderBlock::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::scrollWidth):
(WebCore::RenderBox::scrollHeight):
(WebCore::RenderBox::scrollLeft):
(WebCore::RenderBox::scrollTop):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
(WebCore::RenderBox::includeVerticalScrollbarSize):
(WebCore::RenderBox::includeHorizontalScrollbarSize):
(WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
(WebCore::RenderBox::usesCompositedScrolling):

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

3 years agoREGRESSION (191898) idbobjectstore-*-failures.html tests fail in Release builds.
beidson@apple.com [Mon, 2 Nov 2015 23:03:29 +0000 (23:03 +0000)]
REGRESSION (191898) idbobjectstore-*-failures.html tests fail in Release builds.
https://bugs.webkit.org/show_bug.cgi?id=150815

Reviewed by NOBODY (Fix failing/flaky tests from my previous check-in)

* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
* storage/indexeddb/modern/idbobjectstore-count-failures.html:
* storage/indexeddb/modern/idbobjectstore-get-failures.html:
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:

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

3 years agoB3 should be able to compile a Patchpoint
fpizlo@apple.com [Mon, 2 Nov 2015 22:56:09 +0000 (22:56 +0000)]
B3 should be able to compile a Patchpoint
https://bugs.webkit.org/show_bug.cgi?id=150750

Reviewed by Geoffrey Garen.

This adds the glue in B3::LowerToAir that turns a B3::PatchpointValue into an Air::Patch
with a B3::PatchpointSpecial.

Along the way, I found some bugs. For starters, it became clear that I wanted to be able
to append constraints to a Stackmap, and I wanted to have more flexibility in how I
created a PatchpointValue. I also wanted more helper methods in ValueRep, since
otherwise I would have had to write a lot of boilerplate.

I discovered, and fixed, a minor goof in Air::Code dumping when there are specials.

There were a ton of indexing bugs in B3StackmapSpecial.

The spiller was broken in case the Def was not the last Arg, since it was adding things
to the insertion set both at instIndex and instIndex + 1, and the two types of additions
could occur in the wrong (i.e. the +1 case first) order with an early Def. We often have
bugs like this. In the DFG, we were paranoid about performance so we only admit out-of-
order insertions as a rare case. I think that we don't really need to be so paranoid.
So, I made the new insertion sets use a stable_sort to ensure that everything happens in
the right order. I changed DFG::BlockInsertionSet to also use stable_sort; it previously
used sort, which is slightly wrong.

This adds a new test that uses Patchpoint to implement a 32-bit add. It works!

* b3/B3InsertionSet.cpp:
(JSC::B3::InsertionSet::execute):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::appendStore):
(JSC::B3::Air::LowerToAir::moveForType):
(JSC::B3::Air::LowerToAir::append):
(JSC::B3::Air::LowerToAir::ensureSpecial):
(JSC::B3::Air::LowerToAir::tryStore):
(JSC::B3::Air::LowerToAir::tryStackSlot):
(JSC::B3::Air::LowerToAir::tryPatchpoint):
(JSC::B3::Air::LowerToAir::tryUpsilon):
* b3/B3LoweringMatcher.patterns:
* b3/B3PatchpointValue.h:
(JSC::B3::PatchpointValue::accepts): Deleted.
(JSC::B3::PatchpointValue::PatchpointValue): Deleted.
* b3/B3Stackmap.h:
(JSC::B3::Stackmap::constrain):
(JSC::B3::Stackmap::appendConstraint):
(JSC::B3::Stackmap::reps):
(JSC::B3::Stackmap::clobber):
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
(JSC::B3::StackmapSpecial::isValidImpl):
* b3/B3Value.h:
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::ValueRep):
(JSC::B3::ValueRep::reg):
(JSC::B3::ValueRep::operator bool):
(JSC::B3::ValueRep::isAny):
(JSC::B3::ValueRep::isSomeRegister):
(JSC::B3::ValueRep::isReg):
(JSC::B3::ValueRep::isGPR):
(JSC::B3::ValueRep::isFPR):
(JSC::B3::ValueRep::gpr):
(JSC::B3::ValueRep::fpr):
(JSC::B3::ValueRep::isStack):
(JSC::B3::ValueRep::offsetFromFP):
(JSC::B3::ValueRep::isStackArgument):
(JSC::B3::ValueRep::offsetFromSP):
(JSC::B3::ValueRep::isConstant):
(JSC::B3::ValueRep::value):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::dump):
* b3/air/AirInsertionSet.cpp:
(JSC::B3::Air::InsertionSet::execute):
* b3/testb3.cpp:
(JSC::B3::testComplex):
(JSC::B3::testSimplePatchpoint):
(JSC::B3::run):
* dfg/DFGBlockInsertionSet.cpp:
(JSC::DFG::BlockInsertionSet::execute):

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

3 years agoFix Mac CMake build after r191904.
achristensen@apple.com [Mon, 2 Nov 2015 22:55:40 +0000 (22:55 +0000)]
Fix Mac CMake build after r191904.

* PlatformMac.cmake:
Move SettingsMac.mm to SettingsCocoa.mm.

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

3 years agoAdd HTMLMediaElement behavior and attribute value restrictions for MediaStream
eric.carlson@apple.com [Mon, 2 Nov 2015 21:49:14 +0000 (21:49 +0000)]
Add HTMLMediaElement behavior and attribute value restrictions for MediaStream
https://bugs.webkit.org/show_bug.cgi?id=146853

Reviewed by Jer Noble.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::scheduleActiveStateChange): Do nothing if the active state hasn't changed.
(WebCore::MediaStream::activityEventTimerFired): Remove FIXME.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::stopProducingData): Add comments. Notify observers that the track ended.
(WebCore::MediaStreamTrack::trackEnded): Don't dispatch events after having been stopped.
(WebCore::MediaStreamTrack::trackMutedChanged): Ditto.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::defaultPlaybackRate): Always return 1 when using a MediaStream.
(WebCore::HTMLMediaElement::setDefaultPlaybackRate): Do nothing when using a MediaStream.
(WebCore::HTMLMediaElement::playbackRate): Always return 1 when using a MediaStream.
(WebCore::HTMLMediaElement::setPlaybackRate): Do nothing when using a MediaStream.
(WebCore::HTMLMediaElement::ended): Ask the media engine when using a MediaStream.
(WebCore::HTMLMediaElement::preload): Always return "none" when using a MediaStream.
(WebCore::HTMLMediaElement::setPreload): Do nothing when using a MediaStream.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Avoid unnecessary comparisons when the duration
  is not definite. Send ended event when MediaStream says stream has ended.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::ended): New, passthrough to engine.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Set m_ended from stream.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad): Pause the stream if necessary.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Return early if ended or already playing.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Return early if ended or already paused.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Cleanup. Try to grab a paused
  image if the stream isn't active.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateReadyState): New.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::activeStatusChanged): Call updateReadyState.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Ditto.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::trackEnabledChanged): Call updateActiveState so the state will
  be updated if necessary.

* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::stop): Don't call reset, there is no need to tear everything down.

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

3 years agoFixed the iOS build after r191904.
aestes@apple.com [Mon, 2 Nov 2015 21:27:42 +0000 (21:27 +0000)]
Fixed the iOS build after r191904.

* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::screenSize):

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

3 years agoGet rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird...
timothy_horton@apple.com [Mon, 2 Nov 2015 21:15:06 +0000 (21:15 +0000)]
Get rid of WKWebView's inner WKView (WKView being inside WKWebView leads to weird API issues)
https://bugs.webkit.org/show_bug.cgi?id=150174

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView dealloc]):
(-[WKWebView allowsLinkPreview]):
(-[WKWebView setAllowsLinkPreview:]):
(-[WKWebView acceptsFirstResponder]):
(-[WKWebView becomeFirstResponder]):
(-[WKWebView resignFirstResponder]):
(-[WKWebView viewWillStartLiveResize]):
(-[WKWebView viewDidEndLiveResize]):
(-[WKWebView isFlipped]):
(-[WKWebView intrinsicContentSize]):
(-[WKWebView prepareContentInRect:]):
(-[WKWebView setFrameSize:]):
(-[WKWebView renewGState]):
(-[WKWebView writeSelectionToPasteboard:types:]):
(-[WKWebView centerSelectionInVisibleArea:]):
(-[WKWebView validRequestorForSendType:returnType:]):
(-[WKWebView readSelectionFromPasteboard:]):
(-[WKWebView changeFont:]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView startSpeaking:]):
(-[WKWebView stopSpeaking:]):
(-[WKWebView showGuessPanel:]):
(-[WKWebView checkSpelling:]):
(-[WKWebView changeSpelling:]):
(-[WKWebView toggleContinuousSpellChecking:]):
(-[WKWebView isGrammarCheckingEnabled]):
(-[WKWebView setGrammarCheckingEnabled:]):
(-[WKWebView toggleGrammarChecking:]):
(-[WKWebView toggleAutomaticSpellingCorrection:]):
(-[WKWebView orderFrontSubstitutionsPanel:]):
(-[WKWebView toggleSmartInsertDelete:]):
(-[WKWebView isAutomaticQuoteSubstitutionEnabled]):
(-[WKWebView setAutomaticQuoteSubstitutionEnabled:]):
(-[WKWebView toggleAutomaticQuoteSubstitution:]):
(-[WKWebView isAutomaticDashSubstitutionEnabled]):
(-[WKWebView setAutomaticDashSubstitutionEnabled:]):
(-[WKWebView toggleAutomaticDashSubstitution:]):
(-[WKWebView isAutomaticLinkDetectionEnabled]):
(-[WKWebView setAutomaticLinkDetectionEnabled:]):
(-[WKWebView toggleAutomaticLinkDetection:]):
(-[WKWebView isAutomaticTextReplacementEnabled]):
(-[WKWebView setAutomaticTextReplacementEnabled:]):
(-[WKWebView toggleAutomaticTextReplacement:]):
(-[WKWebView uppercaseWord:]):
(-[WKWebView lowercaseWord:]):
(-[WKWebView capitalizeWord:]):
(-[WKWebView _wantsKeyDownForEvent:]):
(-[WKWebView scrollWheel:]):
(-[WKWebView swipeWithEvent:]):
(-[WKWebView mouseMoved:]):
(-[WKWebView mouseDown:]):
(-[WKWebView mouseUp:]):
(-[WKWebView mouseDragged:]):
(-[WKWebView mouseEntered:]):
(-[WKWebView mouseExited:]):
(-[WKWebView otherMouseDown:]):
(-[WKWebView otherMouseDragged:]):
(-[WKWebView otherMouseUp:]):
(-[WKWebView rightMouseDown:]):
(-[WKWebView rightMouseDragged:]):
(-[WKWebView rightMouseUp:]):
(-[WKWebView pressureChangeWithEvent:]):
(-[WKWebView acceptsFirstMouse:]):
(-[WKWebView shouldDelayWindowOrderingForEvent:]):
(-[WKWebView doCommandBySelector:]):
(-[WKWebView insertText:]):
(-[WKWebView insertText:replacementRange:]):
(-[WKWebView inputContext]):
(-[WKWebView performKeyEquivalent:]):
(-[WKWebView keyUp:]):
(-[WKWebView keyDown:]):
(-[WKWebView flagsChanged:]):
(-[WKWebView setMarkedText:selectedRange:replacementRange:]):
(-[WKWebView unmarkText]):
(-[WKWebView selectedRange]):
(-[WKWebView hasMarkedText]):
(-[WKWebView markedRange]):
(-[WKWebView attributedSubstringForProposedRange:actualRange:]):
(-[WKWebView characterIndexForPoint:]):
(-[WKWebView firstRectForCharacterRange:actualRange:]):
(-[WKWebView selectedRangeWithCompletionHandler:]):
(-[WKWebView markedRangeWithCompletionHandler:]):
(-[WKWebView hasMarkedTextWithCompletionHandler:]):
(-[WKWebView attributedSubstringForProposedRange:completionHandler:]):
(-[WKWebView firstRectForCharacterRange:completionHandler:]):
(-[WKWebView characterIndexForPoint:completionHandler:]):
(-[WKWebView validAttributesForMarkedText]):
(-[WKWebView draggedImage:endedAt:operation:]):
(-[WKWebView draggingEntered:]):
(-[WKWebView draggingUpdated:]):
(-[WKWebView draggingExited:]):
(-[WKWebView prepareForDragOperation:]):
(-[WKWebView performDragOperation:]):
(-[WKWebView _hitTest:dragTypes:]):
(-[WKWebView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
(-[WKWebView viewWillMoveToWindow:]):
(-[WKWebView viewDidMoveToWindow]):
(-[WKWebView drawRect:]):
(-[WKWebView isOpaque]):
(-[WKWebView mouseDownCanMoveWindow]):
(-[WKWebView viewDidHide]):
(-[WKWebView viewDidUnhide]):
(-[WKWebView viewDidChangeBackingProperties]):
(-[WKWebView _activeSpaceDidChange:]):
(-[WKWebView accessibilityFocusedUIElement]):
(-[WKWebView accessibilityIsIgnored]):
(-[WKWebView accessibilityHitTest:]):
(-[WKWebView accessibilityAttributeValue:]):
(-[WKWebView hitTest:]):
(-[WKWebView conversationIdentifier]):
(-[WKWebView quickLookWithEvent:]):
(-[WKWebView addTrackingRect:owner:userData:assumeInside:]):
(-[WKWebView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
(-[WKWebView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
(-[WKWebView removeTrackingRect:]):
(-[WKWebView _removeTrackingRects:count:]):
(-[WKWebView view:stringForToolTip:point:userData:]):
(-[WKWebView pasteboardChangedOwner:]):
(-[WKWebView pasteboard:provideDataForType:]):
(-[WKWebView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKWebView wantsUpdateLayer]):
(-[WKWebView updateLayer]):
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView allowsBackForwardNavigationGestures]):
(-[WKWebView smartMagnifyWithEvent:]):
(-[WKWebView setMagnification:centeredAtPoint:]):
(-[WKWebView setMagnification:]):
(-[WKWebView magnification]):
(-[WKWebView setAllowsMagnification:]):
(-[WKWebView allowsMagnification]):
(-[WKWebView magnifyWithEvent:]):
(-[WKWebView rotateWithEvent:]):
(-[WKWebView _web_superInputContext]):
(-[WKWebView _web_superQuickLookWithEvent:]):
(-[WKWebView _web_superSwipeWithEvent:]):
(-[WKWebView _web_superMagnifyWithEvent:]):
(-[WKWebView _web_superSmartMagnifyWithEvent:]):
(-[WKWebView _web_superRemoveTrackingRect:]):
(-[WKWebView _web_superAccessibilityAttributeValue:]):
(-[WKWebView _web_superDoCommandBySelector:]):
(-[WKWebView _web_superPerformKeyEquivalent:]):
(-[WKWebView _web_superKeyDown:]):
(-[WKWebView _web_superHitTest:]):
(-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKWebView _web_prepareForImmediateActionAnimation]):
(-[WKWebView _web_cancelImmediateActionAnimation]):
(-[WKWebView _web_completeImmediateActionAnimation]):
(-[WKWebView _web_didChangeContentSize:]):
(-[WKWebView _web_dismissContentRelativeChildWindows]):
(-[WKWebView _web_dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKWebView _web_gestureEventWasNotHandledByWebCore:]):
(-[WKWebView _setEditable:]):
(-[WKWebView _remoteObjectRegistry]):
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _setViewScale:]):
(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
(-[WKWebView _inspectorAttachmentView]):
(-[WKWebView _setInspectorAttachmentView:]):
(-[WKWebView _windowOcclusionDetectionEnabled]):
(-[WKWebView _setWindowOcclusionDetectionEnabled:]):
(-[WKWebView _setOverrideDeviceScaleFactor:]):
(-[WKWebView _overrideDeviceScaleFactor]):
(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _immediateActionAnimationControllerForHitTestResult:withType:userData:]):
(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
(-[WKWebView _setMinimumLayoutWidth:]):
(-[WKWebView resizeSubviewsWithOldSize:]): Deleted.
(-[WKWebView _ignoresNonWheelEvents]): Deleted.
(-[WKWebView _setIgnoresNonWheelEvents:]): Deleted.
(-[WKWebView _setIntrinsicContentSize:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _web_superInputContext]):
(-[WKView _web_superQuickLookWithEvent:]):
(-[WKView _web_superSwipeWithEvent:]):
(-[WKView _web_superMagnifyWithEvent:]):
(-[WKView _web_superSmartMagnifyWithEvent:]):
(-[WKView _web_superRemoveTrackingRect:]):
(-[WKView _web_superAccessibilityAttributeValue:]):
(-[WKView _web_superDoCommandBySelector:]):
(-[WKView _web_superPerformKeyEquivalent:]):
(-[WKView _web_superKeyDown:]):
(-[WKView _web_superHitTest:]):
(-[WKView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):
(-[WKView _web_prepareForImmediateActionAnimation]):
(-[WKView _web_cancelImmediateActionAnimation]):
(-[WKView _web_completeImmediateActionAnimation]):
(-[WKView _web_didChangeContentSize:]):
(-[WKView _web_dismissContentRelativeChildWindows]):
(-[WKView _web_dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView _web_gestureEventWasNotHandledByWebCore:]):
(-[WKView _superInputContext]): Deleted.
(-[WKView _superQuickLookWithEvent:]): Deleted.
(-[WKView _superSwipeWithEvent:]): Deleted.
(-[WKView _superMagnifyWithEvent:]): Deleted.
(-[WKView _superSmartMagnifyWithEvent:]): Deleted.
(-[WKView _superRemoveTrackingRect:]): Deleted.
(-[WKView _superAccessibilityAttributeValue:]): Deleted.
(-[WKView _superDoCommandBySelector:]): Deleted.
(-[WKView _superPerformKeyEquivalent:]): Deleted.
(-[WKView _superKeyDown:]): Deleted.
(-[WKView _superHitTest:]): Deleted.
(-[WKView _addFontPanelObserver]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::hitTest):
(WebKit::WebViewImpl::updateSecureInputState):
(WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
(WebKit::WebViewImpl::executeSavedCommandBySelector):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimation):
(WebKit::WebViewImpl::dismissContentRelativeChildWindowsWithAnimationFromViewOnly):
(WebKit::WebViewImpl::quickLookWithEvent):
(WebKit::WebViewImpl::prepareForImmediateActionAnimation):
(WebKit::WebViewImpl::cancelImmediateActionAnimation):
(WebKit::WebViewImpl::completeImmediateActionAnimation):
(WebKit::WebViewImpl::didChangeContentSize):
(WebKit::WebViewImpl::accessibilityAttributeValue):
(WebKit::WebViewImpl::removeTrackingRect):
(WebKit::WebViewImpl::swipeWithEvent):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
(WebKit::WebViewImpl::doCommandBySelector):
(WebKit::WebViewImpl::inputContext):
(WebKit::WebViewImpl::performKeyEquivalent):
(WebKit::WebViewImpl::keyDown):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setDragImage):
(WebKit::PageClientImpl::intrinsicContentSizeDidChange): Deleted.
(WebKit::PageClientImpl::immediateActionAnimationControllerForHitTestResult): Deleted.
Plop.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
Revert some parts of r188828 which no longer apply.

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

3 years agoRemove unused API client callback code
andersca@apple.com [Mon, 2 Nov 2015 21:13:22 +0000 (21:13 +0000)]
Remove unused API client callback code
https://bugs.webkit.org/show_bug.cgi?id=150813

Reviewed by Tim Horton.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::interactionOccurredWhileProcessUnresponsive): Deleted.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Deleted.
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::timerFired):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): Deleted.
* UIProcess/WebProcessProxy.h:

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

3 years agoSnippefy op_add for the baseline JIT.
mark.lam@apple.com [Mon, 2 Nov 2015 21:10:36 +0000 (21:10 +0000)]
Snippefy op_add for the baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=150129

Reviewed by Geoffrey Garen and Saam Barati.

Performance is neutral for both 32-bit and 64-bit on X86_64.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JIT.h:
(JSC::JIT::getOperandConstantInt):
- Move getOperandConstantInt() from the JSVALUE64 section to the common section
  because the snippet needs it.

* jit/JITAddGenerator.cpp: Added.
(JSC::JITAddGenerator::generateFastPath):
* jit/JITAddGenerator.h: Added.
(JSC::JITAddGenerator::JITAddGenerator):
(JSC::JITAddGenerator::endJumpList):
(JSC::JITAddGenerator::slowPathJumpList):
- JITAddGenerator implements an optimization for the case where 1 of the 2 operands
  is a constant int32_t.  It does not implement an optimization for the case where
  both operands are constant int32_t.  This is because:
  1. For the baseline JIT, the ASTBuilder will fold the 2 constants together.
  2. For the DFG, the AbstractInterpreter will also fold the 2 constants.

  Hence, such an optimization path (for 2 constant int32_t operands) would never
  be taken, and is why we won't implement it.

* jit/JITArithmetic.cpp:
(JSC::JIT::compileBinaryArithOp):
(JSC::JIT::compileBinaryArithOpSlowCase):
- Removed op_add cases.  These are no longer used by the op_add emitters.

(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
- Moved out from the JSVALUE64 section to the common section, and reimplemented
  using the snippet.

* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitBinaryDoubleOp):
(JSC::JIT::emit_op_add): Deleted.
(JSC::JIT::emitAdd32Constant): Deleted.
(JSC::JIT::emitSlow_op_add): Deleted.
- Remove 32-bit specific version of op_add.  The snippet serves both 32-bit
  and 64-bit implementations.

* jit/JITInlines.h:
(JSC::JIT::getOperandConstantInt):
- Move getOperandConstantInt() from the JSVALUE64 section to the common section
  because the snippet needs it.

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

3 years agoReplace iOS-only WebKitSystemInterface calls with SPI
aestes@apple.com [Mon, 2 Nov 2015 20:29:38 +0000 (20:29 +0000)]
Replace iOS-only WebKitSystemInterface calls with SPI
https://bugs.webkit.org/show_bug.cgi?id=150763

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
* css/MediaQueryEvaluator.cpp:
(WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
* html/HTMLObjectElement.cpp:
(WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
* page/NavigatorBase.cpp:
* page/Settings.h:
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
* page/ios/UserAgentIOS.mm:
(WebCore::isClassic): Added to return -[UIApplication _isClassic].
(WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
(WebCore::deviceName): Ditto for wkGetDeviceName().
(WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
* page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
(WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
* platform/PlatformScreen.h:
* platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
(WebCore::deviceClass):
(WebCore::deviceName):
(WebCore::deviceHasIPadCapability):
* platform/ios/Device.h:
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
(WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
(WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
(WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
(WebCore::mobileGestaltFloatValue): Deleted.
* platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
(iosExecutableWasLinkedOnOrAfterVersion): Deleted.
(iosDeviceClass): Deleted.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
(WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
(-[WAKWindow initWithFrame:]): Ditto.
* platform/ios/wak/WKGraphics.mm:
(WKGraphicsCreateImageFromBundleWithName): Ditto.
(WKDrawPatternBitmap): Ditto.
* platform/mac/WebCoreSystemInterface.h:
* platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
* platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
* platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
* rendering/RenderThemeIOS.mm: Included UIKitSPI.h instead of UIColorSPI.h, and removed unnecessary forward declarations for the iOS public SDK build.

Source/WebKit/ios:

* Misc/WebUIKitSupport.mm:
(linkedOnOrAfterIOS5): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(WebKitGetMinimumZoomFontSize): Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::screenSize): Used screenSize() instead of WKGetScreenSize().

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Used deviceClass() and Settings::defaultMinimumZoomFontSize() instead of WKGetDeviceClass() and WKGetMinimumZoomFontSize().
* WebView/WebView.mm:
(shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(-[WebView _updateScreenScaleFromWindow]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().

Source/WebKit2:

* Platform/ios/AccessibilityIOS.h: Added.
* Platform/ios/AccessibilityIOS.mm: Added.
(WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
* Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
* Shared/WebPreferencesStore.cpp:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
(-[WKContentView _updateForScreen:]): Ditto.
(storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
(-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
(WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
(WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().

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

3 years agoUnreviewed, rolling out r191902.
commit-queue@webkit.org [Mon, 2 Nov 2015 19:55:27 +0000 (19:55 +0000)]
Unreviewed, rolling out r191902.
https://bugs.webkit.org/show_bug.cgi?id=150811

This change broke iOS builders (Requested by ryanhaddad on
#webkit).

Reverted changeset:

"Replace iOS-only WebKitSystemInterface calls with SPI"
https://bugs.webkit.org/show_bug.cgi?id=150763
http://trac.webkit.org/changeset/191902

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

3 years agoReplace iOS-only WebKitSystemInterface calls with SPI
aestes@apple.com [Mon, 2 Nov 2015 19:09:09 +0000 (19:09 +0000)]
Replace iOS-only WebKitSystemInterface calls with SPI
https://bugs.webkit.org/show_bug.cgi?id=150763

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* config.h: Removed WEBCORE_NAVIGATOR_PLATFORM and WEBCORE_NAVIGATOR_VENDOR.
* css/MediaQueryEvaluator.cpp:
(WebCore::isRunningOnIPhoneOrIPod): Used deviceClass() instead of iosDeviceClass().
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
* html/HTMLObjectElement.cpp:
(WebCore::shouldNotPerformURLAdjustment): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
* page/NavigatorBase.cpp:
* page/Settings.h:
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::textDocumentParameters): Used screenSize() instead of wkGetScreenSize().
* page/ios/UserAgentIOS.mm:
(WebCore::isClassic): Added to return -[UIApplication _isClassic].
(WebCore::osNameForUserAgent): Upstreamed the implementation of WKGetOSNameForUserAgent() from WebKitSystemInterface.
(WebCore::deviceName): Ditto for wkGetDeviceName().
(WebCore::standardUserAgentWithApplicationName): Called deviceName() and osNameForUserAgent().
* page/mac/SettingsCocoa.mm: Renamed from Source/WebCore/page/mac/SettingsMac.mm.
(WebCore::Settings::defaultMinimumZoomFontSize): Upstreamed the implementation of WKGetMinimumZoomFontSize() from WebKitSystemInterface.
* platform/PlatformScreen.h:
* platform/ios/Device.cpp: Added functions that answer queries about the iOS device from MobileGestalt.
(WebCore::deviceClass):
(WebCore::deviceName):
(WebCore::deviceHasIPadCapability):
* platform/ios/Device.h:
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenPPIFactor): Used MGGetSInt32Answer() and MGGetFloat32Answer() instead of mobileGestaltFloatValue().
(WebCore::screenSize): Upstreamed the implementation of WKGetScreenSize() from WebKitSystemInterface.
(WebCore::availableScreenSize): Ditto for WKGetAvailableScreenSize().
(WebCore::screenScaleFactor): Ditto for WKGetScreenScaleFactor() and WKGetScaleFactorForScreen().
(WebCore::mobileGestaltFloatValue): Deleted.
* platform/ios/WebCoreSystemInterfaceIOS.h: Removed.
(iosExecutableWasLinkedOnOrAfterVersion): Deleted.
(iosDeviceClass): Deleted.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoPictureInPicture): Used supportsPictureInPicture() instead of wkIsOptimizedFullscreenSupported().
(WebCore::supportsPictureInPicture): Upstreamed the implementation of WKIsOptimizedFullscreenSupported() from WebKitSystemInterface.
* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow initWithLayer:]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
(-[WAKWindow initWithFrame:]): Ditto.
* platform/ios/wak/WKGraphics.mm:
(WKGraphicsCreateImageFromBundleWithName): Ditto.
(WKDrawPatternBitmap): Ditto.
* platform/mac/WebCoreSystemInterface.h:
* platform/spi/cocoa/DynamicLinkerSPI.h: Defined additional DYLD_IOS_VERSION macros.
* platform/spi/ios/MobileGestaltSPI.h: Defined additional MobileGestalt queries, enum MGDeviceClass, MGGetSInt32Answer, and MGGetFloat32Answer.
* platform/spi/ios/UIKitSPI.h: Copied from Source/WebCore/platform/spi/ios/UIColorSPI.h, and added SPI declarations for UIApplication and UIScreen.
* rendering/RenderThemeIOS.mm:

Source/WebKit/ios:

* Misc/WebUIKitSupport.mm:
(linkedOnOrAfterIOS5): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(WebKitGetMinimumZoomFontSize): Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::screenSize): Used screenSize() instead of WKGetScreenSize().

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Used deviceClass() and Settings::defaultMinimumZoomFontSize() instead of WKGetDeviceClass() and WKGetMinimumZoomFontSize().
* WebView/WebView.mm:
(shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(-[WebView _updateScreenScaleFromWindow]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().

Source/WebKit2:

* Platform/ios/AccessibilityIOS.h: Added.
* Platform/ios/AccessibilityIOS.mm: Added.
(WebKit::newAccessibilityRemoteToken): Upstreamed the implementation of WKAXRemoteToken() from WebKitSystemInterface.
* Shared/WebPreferencesDefinitions.h: Used Settings::defaultMinimumZoomFontSize() instead of WKGetMinimumZoomFontSize().
* Shared/WebPreferencesStore.cpp:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldAllowPictureInPictureMediaPlayback): Used dyld_get_program_sdk_version() instead of iosExecutableWasLinkedOnOrAfterVersion().
(-[WKWebView _takeViewSnapshot]): Used screenScaleFactor() instead of WKGetScreenScaleFactor().
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Used deviceClass() instead of WKGetDeviceClass().
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Used screenScaleFactor() instead of WKGetScaleFactorForScreen().
(-[WKContentView _updateForScreen:]): Ditto.
(storeAccessibilityRemoteConnectionInformation): Upstreamed the implementation of WKAXStoreRemoteConnectionInformation() from WebKitSystemInterface.
(-[WKContentView _accessibilityRegisterUIProcessTokens]): Used newAccessibilityRemoteToken() and storeAccessibilityRemoteConnectionInformation() instead of WKAXRemoteToken() and WKAXStoreRemoteConnectionInformation().
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Used screenSize() instead of WKGetScreenSize().
(WebKit::WebPageProxy::availableScreenSize): Used availableScreenSize() instead of WKGetAvailableScreenSize().
(WebKit::WebPageProxy::textAutosizingWidth): Used screenSize() instead of WKGetScreenSize().
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitializeAccessibility): Used newAccessibilityRemoteToken() instead of WKAXRemoteToken().

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

3 years agoRun sort-Xcode-project-file for the JavaScriptCore project.
bburg@apple.com [Mon, 2 Nov 2015 18:52:44 +0000 (18:52 +0000)]
Run sort-Xcode-project-file for the JavaScriptCore project.

Unreviewed. Many things were out of order following recent B3 commits.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

3 years agosvn-apply should handle unified diffs
dburkart@apple.com [Mon, 2 Nov 2015 18:46:58 +0000 (18:46 +0000)]
svn-apply should handle unified diffs
https://bugs.webkit.org/show_bug.cgi?id=150650

Reviewed by Darin Adler.

* Scripts/VCSUtils.pm:
(parseUnifiedDiffHeader):
This method parses a unified diff header, and returns a information in the
style of parseGitDiffHeader and parseSvnDiffHeader.

(parseDiffHeader):
Teach parseDiffHeader to recognize unified diff headers.

(parseDiff):
Teach parseDiff to recognize unified diffs.

* Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseUnifiedDiffHeader.pl: Added.

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

3 years agoMarking fast/text/multiple-feature-properties.html as flaky on win
ryanhaddad@apple.com [Mon, 2 Nov 2015 18:42:37 +0000 (18:42 +0000)]
Marking fast/text/multiple-feature-properties.html as flaky on win
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@191899 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3 years agostorage/indexeddb/modern/idbobjectstore-get-failures.html is flaky on mac-wk1
beidson@apple.com [Mon, 2 Nov 2015 18:39:17 +0000 (18:39 +0000)]
storage/indexeddb/modern/idbobjectstore-get-failures.html is flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=150804

Reviewed by Beth Dakin's rubberstamp.

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html:
* storage/indexeddb/modern/idbobjectstore-count-failures.html:
* storage/indexeddb/modern/idbobjectstore-get-failures.html:
* storage/indexeddb/modern/idbobjectstore-put-and-clear-failures.html:

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

3 years agoRename op_put_getter_setter to op_put_getter_setter_by_id
utatane.tea@gmail.com [Mon, 2 Nov 2015 18:32:55 +0000 (18:32 +0000)]
Rename op_put_getter_setter to op_put_getter_setter_by_id
https://bugs.webkit.org/show_bug.cgi?id=150773

Reviewed by Mark Lam.

Renaming op_put_getter_setter to op_put_getter_setter_by_id makes this op name consistent with
the other ops' names like op_put_getter_by_id etc.

And to fix build dependencies in Xcode, we added LLIntAssembly.h into Xcode project file.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitPutGetterSetter):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter): Deleted.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter): Deleted.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:

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