WebKit-https.git
4 years ago[iOS] Unreviewed build fix after r182760.
achristensen@apple.com [Mon, 13 Apr 2015 23:20:18 +0000 (23:20 +0000)]
[iOS] Unreviewed build fix after r182760.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeSharedBuffer):
(IPC::decodeSharedBuffer):
Update SharedMemory function names.

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

4 years agoUnreviewed, fix Windows build. Windows doesn't take kindly to private classes that...
fpizlo@apple.com [Mon, 13 Apr 2015 22:57:18 +0000 (22:57 +0000)]
Unreviewed, fix Windows build. Windows doesn't take kindly to private classes that use FAST_ALLOCATED.

* runtime/InferredValue.h:

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

4 years agoUnreviewed, fix build. I introduced a new cell type at the same time as kling changed...
fpizlo@apple.com [Mon, 13 Apr 2015 22:33:44 +0000 (22:33 +0000)]
Unreviewed, fix build. I introduced a new cell type at the same time as kling changed how new cell types are written.

* runtime/InferredValue.h:

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

4 years agoFix compositing/geometry/fixed-transformed.html on Mavericks.
simon.fraser@apple.com [Mon, 13 Apr 2015 22:31:55 +0000 (22:31 +0000)]
Fix compositing/geometry/fixed-transformed.html on Mavericks.

To get consistent results on Mavericks, call
internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);

* compositing/geometry/fixed-transformed.html:

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

4 years agoRename SharedMemory::create overloads
andersca@apple.com [Mon, 13 Apr 2015 22:26:34 +0000 (22:26 +0000)]
Rename SharedMemory::create overloads
https://bugs.webkit.org/show_bug.cgi?id=143679

Reviewed by Beth Dakin.

Rename the SharedMemory::create overload that allocates memory to SharedMemory::allocate,
and the SharedMemory::create overload that maps in a handle to SharedMemory::map.

* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::allocate):
(WebKit::SharedMemory::map):
(WebKit::SharedMemory::create): Deleted.
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::createShareable):
(WebKit::ShareableBitmap::create):
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
* Shared/ShareableResource.h:
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::decode):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::resizeTable):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
(WebKit::WebPageProxy::setPromisedDataForImage):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::setBufferForType):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getDataSelectionForPasteboard):

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

4 years agoJSC should detect singleton functions
fpizlo@apple.com [Mon, 13 Apr 2015 22:13:12 +0000 (22:13 +0000)]
JSC should detect singleton functions
https://bugs.webkit.org/show_bug.cgi?id=143232

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

This started out as an attempt to make constructors faster by detecting when a constructor is a
singleton. The idea is that each FunctionExecutable has a VariableWatchpointSet - a watchpoint
along with an inferred value - that detects if only one JSFunction has been allocated for that
executable, and if so, what that JSFunction is. Then, inside the code for the FunctionExecutable,
if the watchpoint set has an inferred value (i.e. it's been initialized and it is still valid),
we can constant-fold GetCallee.

Unfortunately, constructors don't use GetCallee anymore, so that didn't pan out. But in the
process I realized a bunch of things:

- This allows us to completely eliminate the GetCallee/GetScope sequence that we still sometimes
  had even in code where our singleton-closure detection worked. That's because singleton-closure
  inference worked at the op_resolve_scope, and that op_resolve_scope still needed to keep alive
  the incoming scope in case we OSR exit. But by constant-folding GetCallee, that sequence
  disappears. OSR exit can rematerialize the callee or the scope by just knowing their constant
  values.

- Singleton detection should be a reusable thing. So, I got rid of VariableWatchpointSet and
  created InferredValue. InferredValue is a cell, so it can handle its own GC magic.
  FunctionExecutable uses an InferredValue to tell you about singleton JSFunctions.

- The old singleton-scope detection in op_resolve_scope is better abstracted as a SymbolTable
  detecting a singleton JSSymbolTableObject. So, SymbolTable uses an InferredValue to tell you
  about singleton JSSymbolTableObjects. It's curious that we want to have singleton detection in
  SymbolTable if we already have it in FunctionExecutable. This comes into play in two ways.
  First, it means that the DFG can realize sooner that a resolve_scope resolves to a constant
  scope. Ths saves compile times and it allows prediction propagation to benefit from the
  constant folding. Second, it means that we will detect a singleton scope even if it is
  referenced from a non-singleton scope that is nearer to us in the scope chain. This refactoring
  allows us to eliminate the function reentry watchpoint.

- This allows us to use a normal WatchpointSet, instead of a VariableWatchpointSet, for inferring
  constant values in scopes. Previously when the DFG inferred that a closure variable was
  constant, it wouldn't know which closure that variable was in and so it couldn't just load that
  value. But now we are first inferring that the function is a singleton, which means that we
  know exactly what scope it points to, and we can load the value from the scope. Using a
  WatchpointSet instead of a VariableWatchpointSet saves some memory and simplifies a bunch of
  code. This also means that now, the only user of VariableWatchpointSet is FunctionExecutable.
  I've tweaked the code of VariableWatchpointSet to reduce its power to just be what
  FunctionExecutable wants.

This also has the effect of simplifying the implementation of block scoping. Prior to this
change, block scoping would have needed to have some story for the function reentry watchpoint on
any nested symbol table. That's totally weird to think about; it's not really a function reentry
but a scope reentry. Now we don't have to think about this. Constant inference on nested scopes
will "just work": if we prove that we know the constant value of the scope then the machinery
kicks in, otherwise it doesn't.

This is a small Octane and AsmBench speed-up. AsmBench sees 1% while Octane sees sub-1%.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::valueProfileForBytecodeOffset):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::valueProfileForBytecodeOffset): Deleted.
* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::calleeConstant):
(JSC::InlineCallFrame::visitAggregate):
* bytecode/CodeOrigin.h:
(JSC::InlineCallFrame::calleeConstant): Deleted.
(JSC::InlineCallFrame::visitAggregate): Deleted.
* bytecode/Instruction.h:
* bytecode/VariableWatchpointSet.cpp: Removed.
* bytecode/VariableWatchpointSet.h: Removed.
* bytecode/VariableWatchpointSetInlines.h: Removed.
* bytecode/VariableWriteFireDetail.cpp: Added.
(JSC::VariableWriteFireDetail::dump):
(JSC::VariableWriteFireDetail::touch):
* bytecode/VariableWriteFireDetail.h: Added.
(JSC::VariableWriteFireDetail::VariableWriteFireDetail):
* bytecode/Watchpoint.h:
(JSC::WatchpointSet::stateOnJSThread):
(JSC::WatchpointSet::startWatching):
(JSC::WatchpointSet::fireAll):
(JSC::WatchpointSet::touch):
(JSC::WatchpointSet::invalidate):
(JSC::InlineWatchpointSet::stateOnJSThread):
(JSC::InlineWatchpointSet::state):
(JSC::InlineWatchpointSet::hasBeenInvalidated):
(JSC::InlineWatchpointSet::invalidate):
(JSC::InlineWatchpointSet::touch):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::getScope): Deleted.
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDesiredWatchpoints.cpp:
(JSC::DFG::InferredValueAdaptor::add):
(JSC::DFG::DesiredWatchpoints::addLazily):
(JSC::DFG::DesiredWatchpoints::reallyAdd):
(JSC::DFG::DesiredWatchpoints::areStillValid):
* dfg/DFGDesiredWatchpoints.h:
(JSC::DFG::InferredValueAdaptor::hasBeenInvalidated):
(JSC::DFG::DesiredWatchpoints::isWatched):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::tryGetConstantClosureVar):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasWatchpointSet):
(JSC::DFG::Node::watchpointSet):
(JSC::DFG::Node::hasVariableWatchpointSet): Deleted.
(JSC::DFG::Node::variableWatchpointSet): Deleted.
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunction):
(JSC::DFG::SpeculativeJIT::compileCreateActivation):
(JSC::DFG::SpeculativeJIT::compileNotifyWrite):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGVarargsForwardingPhase.cpp:
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCreateActivation):
(JSC::FTL::LowerDFGToLLVM::compileNewFunction):
(JSC::FTL::LowerDFGToLLVM::compileNotifyWrite):
* interpreter/Interpreter.cpp:
(JSC::StackFrame::friendlySourceURL):
(JSC::StackFrame::friendlyFunctionName):
* interpreter/Interpreter.h:
(JSC::StackFrame::friendlySourceURL): Deleted.
(JSC::StackFrame::friendlyFunctionName): Deleted.
* jit/JIT.cpp:
(JSC::JIT::emitNotifyWrite):
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_touch_entry): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitPutGlobalVar):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emitNotifyWrite): Deleted.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitPutGlobalVar):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emitNotifyWrite): Deleted.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL): Deleted.
* runtime/CommonSlowPaths.h:
* runtime/Executable.cpp:
(JSC::FunctionExecutable::finishCreation):
(JSC::FunctionExecutable::visitChildren):
* runtime/Executable.h:
(JSC::FunctionExecutable::singletonFunction):
* runtime/InferredValue.cpp: Added.
(JSC::InferredValue::create):
(JSC::InferredValue::destroy):
(JSC::InferredValue::createStructure):
(JSC::InferredValue::visitChildren):
(JSC::InferredValue::InferredValue):
(JSC::InferredValue::~InferredValue):
(JSC::InferredValue::notifyWriteSlow):
(JSC::InferredValue::ValueCleanup::ValueCleanup):
(JSC::InferredValue::ValueCleanup::~ValueCleanup):
(JSC::InferredValue::ValueCleanup::finalizeUnconditionally):
* runtime/InferredValue.h: Added.
(JSC::InferredValue::inferredValue):
(JSC::InferredValue::state):
(JSC::InferredValue::isStillValid):
(JSC::InferredValue::hasBeenInvalidated):
(JSC::InferredValue::add):
(JSC::InferredValue::notifyWrite):
(JSC::InferredValue::invalidate):
* runtime/JSEnvironmentRecord.cpp:
(JSC::JSEnvironmentRecord::visitChildren):
* runtime/JSEnvironmentRecord.h:
(JSC::JSEnvironmentRecord::isValid):
(JSC::JSEnvironmentRecord::finishCreation):
* runtime/JSFunction.cpp:
(JSC::JSFunction::create):
* runtime/JSFunction.h:
(JSC::JSFunction::createWithInvalidatedReallocationWatchpoint):
(JSC::JSFunction::createImpl):
(JSC::JSFunction::create): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::addGlobalVar):
(JSC::JSGlobalObject::addFunction):
* runtime/JSGlobalObject.h:
* runtime/JSLexicalEnvironment.cpp:
(JSC::JSLexicalEnvironment::symbolTablePut):
* runtime/JSScope.h:
(JSC::ResolveOp::ResolveOp):
* runtime/JSSegmentedVariableObject.h:
(JSC::JSSegmentedVariableObject::finishCreation):
* runtime/JSSymbolTableObject.h:
(JSC::JSSymbolTableObject::JSSymbolTableObject):
(JSC::JSSymbolTableObject::setSymbolTable):
(JSC::symbolTablePut):
(JSC::symbolTablePutWithAttributes):
* runtime/PutPropertySlot.h:
* runtime/SymbolTable.cpp:
(JSC::SymbolTableEntry::prepareToWatch):
(JSC::SymbolTable::SymbolTable):
(JSC::SymbolTable::finishCreation):
(JSC::SymbolTable::visitChildren):
(JSC::SymbolTableEntry::inferredValue): Deleted.
(JSC::SymbolTableEntry::notifyWriteSlow): Deleted.
(JSC::SymbolTable::WatchpointCleanup::WatchpointCleanup): Deleted.
(JSC::SymbolTable::WatchpointCleanup::~WatchpointCleanup): Deleted.
(JSC::SymbolTable::WatchpointCleanup::finalizeUnconditionally): Deleted.
* runtime/SymbolTable.h:
(JSC::SymbolTableEntry::disableWatching):
(JSC::SymbolTableEntry::watchpointSet):
(JSC::SymbolTable::singletonScope):
(JSC::SymbolTableEntry::notifyWrite): Deleted.
* runtime/TypeProfiler.cpp:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* tests/stress/infer-uninitialized-closure-var.js: Added.
(foo.f):
(foo):
* tests/stress/singleton-scope-then-overwrite.js: Added.
(foo.f):
(foo):
* tests/stress/singleton-scope-then-realloc-and-overwrite.js: Added.
(foo):
* tests/stress/singleton-scope-then-realloc.js: Added.
(foo):

LayoutTests:

Reviewed by Geoffrey Garen and Michael Saboff.

* js/regress/create-lots-of-functions-expected.txt: Added.
* js/regress/create-lots-of-functions.html: Added.
* js/regress/no-inline-constructor-expected.txt: Added.
* js/regress/no-inline-constructor.html: Added.
* js/regress/script-tests/create-lots-of-functions.js: Added.
* js/regress/script-tests/no-inline-constructor.js: Added.
* js/regress/script-tests/singleton-scope.js: Added.
* js/regress/singleton-scope-expected.txt: Added.
* js/regress/singleton-scope.html: Added.

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

4 years ago[Win] Unreviewed fix after r182757.
bfulgham@apple.com [Mon, 13 Apr 2015 21:42:16 +0000 (21:42 +0000)]
[Win] Unreviewed fix after r182757.

* platform/win/FileSystemWin.cpp:
(WebCore::renameFile): Checked in wrong version.

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

4 years ago[Win] Unreviewed fix after r182161.
bfulgham@apple.com [Mon, 13 Apr 2015 21:37:42 +0000 (21:37 +0000)]
[Win] Unreviewed fix after r182161.

The change caused Windows to lose Media UI, since the new 'getFileSize'
signature was being improperly used for a 'UInt8'-based string.

Fix was to provide implementations for the two new methods, and to make
sure RenderThemeWin was using the proper signature.

This should actually be a little more efficient, since we have the file
handle when we call this new method. Previously, a Windows 'find file' was
being done with the requested path, which was unnecessary work.

* platform/win/FileSystemWin.cpp:
(WebCore::getFileSizeFromByHandleFileInformationStructure): Added helper function.
(WebCore::getFileSize): Provide implementation.
(WebCore::renameFile):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::stringWithContentsOfFile): Use the file handle to
get the file size, rather than using the path-based size lookup (which involves
performing an unnecessary file search.

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

4 years agoShare sheets from Share menus appear outside the browser window.
beidson@apple.com [Mon, 13 Apr 2015 21:23:09 +0000 (21:23 +0000)]
Share sheets from Share menus appear outside the browser window.
<rdar://problem/20455592> and https://bugs.webkit.org/show_bug.cgi?id=143620

Reviewed by Darin Adler.

Source/WebCore:

* page/ContextMenuController.h:
(WebCore::ContextMenuController::client):

Source/WebKit/mac:

Refactor existing Sharing Service Picker code to also be used for the Share menu NSMenuItem.

* Misc/WebSharingServicePickerController.h:
(WebSharingServicePickerClient::webView):
* Misc/WebSharingServicePickerController.mm:
(WebSharingServicePickerClient::WebSharingServicePickerClient):
(WebSharingServicePickerClient::sharingServicePickerWillBeDestroyed):
(WebSharingServicePickerClient::pageForSharingServicePicker):
(WebSharingServicePickerClient::windowForSharingServicePicker):
(WebSharingServicePickerClient::screenRectForCurrentSharingServicePickerItem):
(WebSharingServicePickerClient::imageForCurrentSharingServicePickerItem):
(-[WebSharingServicePickerController initWithItems:includeEditorServices:client:style:]):
(-[WebSharingServicePickerController initWithSharingServicePicker:client:]):
(-[WebSharingServicePickerController sharingService:didShareItems:]):

* WebCoreSupport/WebContextMenuClient.h:
(WebContextMenuClient::webView): Deleted.
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::WebContextMenuClient):
(WebContextMenuClient::pageForSharingServicePicker): Deleted.
(WebContextMenuClient::windowForSharingServicePicker): Deleted.

* WebCoreSupport/WebSelectionServiceController.h:
* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::WebSelectionServiceController):
(WebSelectionServiceController::handleSelectionServiceClick):
(WebSelectionServiceController::pageForSharingServicePicker): Deleted.
(WebSelectionServiceController::windowForSharingServicePicker): Deleted.
(WebSelectionServiceController::screenRectForCurrentSharingServicePickerItem): Deleted.
(WebSelectionServiceController::imageForCurrentSharingServicePickerItem): Deleted.

* WebView/WebHTMLView.mm:
(-[WebHTMLView menuForEvent:]):
* WebView/WebViewData.h:

Source/WebKit2:

Refactor existing Sharing Service Picker code to also be used for the Share menu NSMenuItem.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::platformInitializeShareMenuItem):
* UIProcess/WebPageProxy.h:

* UIProcess/mac/WKSharingServicePickerDelegate.h: Added.
* UIProcess/mac/WKSharingServicePickerDelegate.mm: Added.
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
(-[WKSharingServicePickerDelegate menuProxy]):
(-[WKSharingServicePickerDelegate setMenuProxy:]):
(-[WKSharingServicePickerDelegate setPicker:]):
(-[WKSharingServicePickerDelegate setFiltersEditingServices:]):
(-[WKSharingServicePickerDelegate setHandlesEditingReplacement:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]): Deleted.
(-[WKSharingServicePickerDelegate menuProxy]): Deleted.
(-[WKSharingServicePickerDelegate setMenuProxy:]): Deleted.
(-[WKSharingServicePickerDelegate setPicker:]): Deleted.
(-[WKSharingServicePickerDelegate setIncludeEditorServices:]): Deleted.
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]): Deleted.
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]): Deleted.
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]): Deleted.
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Deleted.
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]): Deleted.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitializeShareMenuItem):

* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoAdd missing layout test result.
simon.fraser@apple.com [Mon, 13 Apr 2015 21:18:29 +0000 (21:18 +0000)]
Add missing layout test result.

* compositing/geometry/fixed-transformed-expected.txt: Added.

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

4 years agoRebaseline bindings tests.
akling@apple.com [Mon, 13 Apr 2015 20:53:32 +0000 (20:53 +0000)]
Rebaseline bindings tests.

* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:

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

4 years agoBegin cleaning up the shared memory interface
andersca@apple.com [Mon, 13 Apr 2015 20:26:02 +0000 (20:26 +0000)]
Begin cleaning up the shared memory interface
https://bugs.webkit.org/show_bug.cgi?id=143677

Reviewed by Andreas Kling.

Rename createFromVMBuffer to create and add a protection parameter (which is currently unused).
Also, turn SharedMemory::Protection into a proper enum class.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::tryGetShareableHandleFromCFData):
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
(WebKit::machProtection):
(WebKit::SharedMemory::createHandle):
(WebKit::SharedMemory::createFromVMBuffer): Deleted.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ShareableBitmap.h:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
(WebKit::ShareableResource::createHandle):
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::createExtension):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::sendTable):
* UIProcess/mac/WKPrintingView.mm:
(pageDidDrawToImage):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::dataSelectionForPasteboard):
(WebKit::WebPageProxy::setPromisedDataForImage):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::setBufferForType):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::drawRectToImage):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getDataSelectionForPasteboard):

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

4 years ago[iOS] Treat a 'not found' media option index as the 'off' track.
jer.noble@apple.com [Mon, 13 Apr 2015 20:16:34 +0000 (20:16 +0000)]
[iOS] Treat a 'not found' media option index as the 'off' track.
https://bugs.webkit.org/show_bug.cgi?id=143672

Reviewed by Eric Carlson.

The UIProcess will pass in UINT64_MAX for the index of the legible option to select. Treat this
as if the captionOffMenuItem() had been selected to avoid a null dereference.

* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::selectLegibleMediaOption):

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

4 years agolist-style-image with SVG image renders at incorrect size.
commit-queue@webkit.org [Mon, 13 Apr 2015 20:02:20 +0000 (20:02 +0000)]
list-style-image with SVG image renders at incorrect size.
https://bugs.webkit.org/show_bug.cgi?id=141367.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-04-13
Reviewed by Darin Adler.
Source/WebCore:

This patch imports https://codereview.chromium.org/197203003.

When using an SVG as list marker image, don't unconditionally set the
dimensions to a square with the dimensions of ascent / 2, but rather
determine a suitable size using intrinsic dimensions (and ratio).

Test: svg/as-list-image/svg-list-image-intrinsic-size-1.html

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::updateContent):

LayoutTests:

Ensure the SVG image gets the correct size when used as an image list.

* svg/as-list-image: Added.
* svg/as-list-image/svg-list-image-intrinsic-size-1-expected.html: Added.
* svg/as-list-image/svg-list-image-intrinsic-size-1.html: Added.

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

4 years agoCanvas drawImage() has a security hole when the image isn't yet fully loaded.
said@apple.com [Mon, 13 Apr 2015 19:53:14 +0000 (19:53 +0000)]
Canvas drawImage() has a security hole when the image isn't yet fully loaded.
https://bugs.webkit.org/show_bug.cgi?id=58681.

Reviewed by Darin Adler.

Source/WebCore:

There is a race condition which may happen if an image from a different
origin is drawn on a canvas before it finishes loading. The check to taint
the canvas comes before drawing it. This check returns false if the image
is not completely loaded because we check the URL of the resource response.
If after this check and before the drawing, the image finishes loading, the
canvas will not be tainted but the image will be drawn.

The fix is to move the check to taint the canvas after drawing the image.
The only problem with this solution is basically the opposite of this bug:
we will become stricter than before with images which are from a different
origin and before they finish loading. The image has not finished loading,
so we do not draw it. Before we check for tainting, the image finishes
loading. So we decide to taint the canvas even the image is not drawn.

But this should not be a security issue anymore. I personally do not know
if it is even a correctness issue or not.

Test: http/tests/canvas/canvas-tainted-after-draw-image.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):

LayoutTests:

This test confirms when we load an image from a different origin and try
drawing it on a canvas, the canvas is tainted if the image is completely
loaded and drawn. Otherwise the image is not drawn.

* http/tests/canvas/canvas-tainted-after-draw-image-expected.txt: Added.
* http/tests/canvas/canvas-tainted-after-draw-image.html: Added.
* http/tests/canvas/resources: Added.
* http/tests/canvas/resources/100x100-lime-rect.svg: Added.

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

4 years agoCannot click "Next" button on Google two-factor auth setup page
jhoneycutt@apple.com [Mon, 13 Apr 2015 19:52:11 +0000 (19:52 +0000)]
Cannot click "Next" button on Google two-factor auth setup page

<https://bugs.webkit.org/show_bug.cgi?id=143624>
<rdar://problem/19175714>

.:

Reviewed by Darin Adler.

* ManualTests/button-that-focuses-itself-on-click.html: Added.

Source/WebKit2:

This issue occurs when this site focuses the submit button. When it
receives focus, we try to assist it. While we consider ourselves to be
assisting it, we ignore further gesture inputs for that node, including
the tap gesture.

To fix this, only assist input types that we know are assistable,
including text fields, select and date elements, etc.

Reviewed by Darin Adler.

* UIProcess/ios/WKContentViewInteraction.mm:
(isAssistableInputType):
If the type is a known-assistable type, return true.
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
Call isAssistableInputType() to determine whether we should do any kind
of assistance for this node.

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

4 years agoAdd force property to MouseEvents
bdakin@apple.com [Mon, 13 Apr 2015 19:17:48 +0000 (19:17 +0000)]
Add force property to MouseEvents
https://bugs.webkit.org/show_bug.cgi?id=143569
-and corresponding-
rdar://problem/20472954

Reviewed by Darin Adler.

Source/WebCore:

This patch removes WebKitMouseForceEvent and uses a MouseEvent everywhere that it
was used. That’s possible because this patch also adds a force property to all
MouseEvents and to PlatformMouseEvent.

Remove WebKitMouseForceEvent.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:

Create MouseEvents with the appropriate force instead of WebKitMouseForceEvents.
This patch also gets rid of the PlatformMouseEvent parameter for these events.
They were re-using the cached mousedown event before, which they never should have
done. Instead, we create PlatformMouseEvents inside these functions and then use
that to make MouseEvents.
* dom/Element.cpp:
(WebCore::Element::dispatchMouseForceWillBegin):
(WebCore::Element::dispatchMouseForceChanged):
(WebCore::Element::dispatchMouseForceDown):
(WebCore::Element::dispatchMouseForceUp):
(WebCore::Element::dispatchMouseForceClick):
(WebCore::Element::dispatchMouseForceCancelled):
* dom/Element.h:

No More WebKitMouseForceEvent.
* dom/EventNames.in:

Add force to MouseEvent.
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::cloneFor):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/MouseEvent.h:
(WebCore::MouseEvent::force):
(WebCore::MouseEvent::setForce):
* dom/MouseEvent.idl:

No More WebKitMouseForceEvent.
* dom/WebKitMouseForceEvent.cpp: Removed.
* dom/WebKitMouseForceEvent.h: Removed.
* dom/WebKitMouseForceEvent.idl: Removed.

PlatformMouseEvent now takes a force parameter.
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenuAt):
* page/DragController.cpp:
(WebCore::createMouseEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):

We don’t need lastMouseDownEvent() anymore. We were using it to avoid creating new
PlatformMouseEvents for the force events, but we fix that in this patch.
(WebCore::EventHandler::lastMouseDownEvent): Deleted.
* page/EventHandler.h:

At force to PlatformMouseEvent.
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
(WebCore::PlatformMouseEvent::force):
* replay/SerializationMethods.cpp:
(JSC::EncodingTraits<PlatformMouseEvent>::encodeValue):
(JSC::EncodingTraits<PlatformMouseEvent>::decodeValue):

Source/WebKit/ios:

Send the appropriate force with this simulated click event.
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKit/mac:

PlatformMouseEvent and MouseEvent now take force parameters.
* WebView/WebFrame.mm:
(-[WebFrame _dragSourceEndedAt:operation:]):
* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Source/WebKit/win:

PlatformMouseEvent takes a force parameter.
* WebDropSource.cpp:
(generateMouseEvent):

Source/WebKit2:

In order to accommodate adding force to all PlatformMouseEvents, we have to add it
to pass a caches pressure event to NativeWebMouseEvent and add force to
WebMouseEvent.

NativeWebMouseEvent now requires a second NSEvent for the pressureEvent.
* Shared/NativeWebMouseEvent.h:

WebMouseEvent takes a force parameter.
* Shared/WebEvent.h:
(WebKit::WebMouseEvent::force):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/mac/NativeWebMouseEventMac.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/mac/WebEventFactory.h:
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):

Cache the most recent pressureEvent in _data so that it can be sent along to the
NativeWebMouseEvent constructor.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):
(-[WKView acceptsFirstMouse:]):
(-[WKView shouldDelayWindowOrderingForEvent:]):
(-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):

WebMouseEvent takes a force parameter.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showContextMenuAtPoint):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::createWebEvent):

MouseEvent and PlatformMouseEvent both take force parameters too.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToURLWithSimulatedClick):
(WebKit::WebPage::contextMenuAtPointInWindow):
(WebKit::WebPage::dragEnded):
(WebKit::WebPage::simulateMouseDown):
(WebKit::WebPage::simulateMouseUp):
(WebKit::WebPage::simulateMouseMotion):

The functions that dispatch the force events no longer take a PlatformMouseEvent
as a parameter.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange):
(WebKit::WebPage::immediateActionDidCancel):

LayoutTests:

* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoDon't segregate heap objects based on Structure immortality.
akling@apple.com [Mon, 13 Apr 2015 19:12:48 +0000 (19:12 +0000)]
Don't segregate heap objects based on Structure immortality.
<https://webkit.org/b/143638>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Put all objects that need a destructor call into the same MarkedBlock.
This reduces memory consumption in many situations, while improving locality,
since much more of the MarkedBlock space can be shared.

Instead of branching on the MarkedBlock type, we now check a bit in the
JSCell's inline type flags (StructureIsImmortal) to see whether it's safe
to access the cell's Structure during destruction or not.

Performance benchmarks look mostly neutral. Maybe a small regression on
SunSpider's date objects.

On the amazon.com landing page, this saves us 50 MarkedBlocks (3200kB) along
with a bunch of WeakBlocks that were hanging off of them. That's on the higher
end of savings we can get from this, but still a very real improvement.

Most of this patch is removing the "hasImmortalStructure" constant from JSCell
derived classes and passing that responsibility to the StructureIsImmortal flag.
StructureFlags is made public so that it's accessible from non-member functions.
I made sure to declare it everywhere and make classes final to try to make it
explicit what each class is doing to its inherited flags.

* API/JSCallbackConstructor.h:
* API/JSCallbackObject.h:
* bytecode/UnlinkedCodeBlock.h:
* debugger/DebuggerScope.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileMakeRope):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileMakeRope):
* heap/Heap.h:
(JSC::Heap::subspaceForObjectDestructor):
(JSC::Heap::allocatorForObjectWithDestructor):
(JSC::Heap::subspaceForObjectNormalDestructor): Deleted.
(JSC::Heap::subspaceForObjectsWithImmortalStructure): Deleted.
(JSC::Heap::allocatorForObjectWithNormalDestructor): Deleted.
(JSC::Heap::allocatorForObjectWithImmortalStructureDestructor): Deleted.
* heap/HeapInlines.h:
(JSC::Heap::allocateWithDestructor):
(JSC::Heap::allocateObjectOfType):
(JSC::Heap::subspaceForObjectOfType):
(JSC::Heap::allocatorForObjectOfType):
(JSC::Heap::allocateWithNormalDestructor): Deleted.
(JSC::Heap::allocateWithImmortalStructureDestructor): Deleted.
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateBlock):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::needsDestruction):
(JSC::MarkedAllocator::MarkedAllocator):
(JSC::MarkedAllocator::init):
(JSC::MarkedAllocator::destructorType): Deleted.
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::callDestructor):
(JSC::MarkedBlock::specializedSweep):
(JSC::MarkedBlock::sweep):
(JSC::MarkedBlock::sweepHelper):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::needsDestruction):
(JSC::MarkedBlock::destructorType): Deleted.
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::forEachAllocator):
(JSC::MarkedSpace::isPagedOut):
(JSC::MarkedSpace::clearNewlyAllocated):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::subspaceForObjectsWithDestructor):
(JSC::MarkedSpace::destructorAllocatorFor):
(JSC::MarkedSpace::allocateWithDestructor):
(JSC::MarkedSpace::forEachBlock):
(JSC::MarkedSpace::subspaceForObjectsWithNormalDestructor): Deleted.
(JSC::MarkedSpace::subspaceForObjectsWithImmortalStructure): Deleted.
(JSC::MarkedSpace::immortalStructureDestructorAllocatorFor): Deleted.
(JSC::MarkedSpace::normalDestructorAllocatorFor): Deleted.
(JSC::MarkedSpace::allocateWithImmortalStructureDestructor): Deleted.
(JSC::MarkedSpace::allocateWithNormalDestructor): Deleted.
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.h:
* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFramePrototype.h:
* jsc.cpp:
* runtime/ArrayBufferNeuteringWatchpoint.h:
* runtime/ArrayConstructor.h:
* runtime/ArrayIteratorPrototype.h:
* runtime/BooleanPrototype.h:
* runtime/ClonedArguments.h:
* runtime/CustomGetterSetter.h:
* runtime/DateConstructor.h:
* runtime/DatePrototype.h:
* runtime/ErrorPrototype.h:
* runtime/ExceptionHelpers.h:
* runtime/Executable.h:
* runtime/GenericArguments.h:
* runtime/GetterSetter.h:
* runtime/InternalFunction.h:
* runtime/JSAPIValueWrapper.h:
* runtime/JSArgumentsIterator.h:
* runtime/JSArray.h:
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.h:
* runtime/JSBoundFunction.h:
* runtime/JSCallee.h:
* runtime/JSCell.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::classInfo):
* runtime/JSDataViewPrototype.h:
* runtime/JSEnvironmentRecord.h:
* runtime/JSFunction.h:
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGlobalObject.h:
* runtime/JSLexicalEnvironment.h:
* runtime/JSNameScope.h:
* runtime/JSNotAnObject.h:
* runtime/JSONObject.h:
* runtime/JSObject.h:
(JSC::JSFinalObject::JSFinalObject):
* runtime/JSPromiseConstructor.h:
* runtime/JSPromiseDeferred.h:
* runtime/JSPromisePrototype.h:
* runtime/JSPromiseReaction.h:
* runtime/JSPropertyNameEnumerator.h:
* runtime/JSProxy.h:
* runtime/JSScope.h:
* runtime/JSString.h:
* runtime/JSSymbolTableObject.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::structureIsImmortal):
* runtime/MathObject.h:
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.h:
* runtime/PropertyMapHashTable.h:
* runtime/RegExp.h:
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.h:
* runtime/RegExpPrototype.h:
* runtime/ScopedArgumentsTable.h:
* runtime/SparseArrayValueMap.h:
* runtime/StrictEvalActivation.h:
* runtime/StringConstructor.h:
* runtime/StringIteratorPrototype.h:
* runtime/StringObject.h:
* runtime/StringPrototype.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
* runtime/Structure.h:
* runtime/StructureChain.h:
* runtime/StructureRareData.h:
* runtime/Symbol.h:
* runtime/SymbolPrototype.h:
* runtime/SymbolTable.h:
* runtime/WeakMapData.h:

Source/WebCore:

* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GeneratePrototypeDeclaration):
* bridge/objc/objc_runtime.h:
* bridge/runtime_array.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPObject.h:

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

4 years agojavascript: links in inline PDFs shouldn't execute JavaScript in the context of the...
timothy_horton@apple.com [Mon, 13 Apr 2015 18:38:39 +0000 (18:38 +0000)]
javascript: links in inline PDFs shouldn't execute JavaScript in the context of the host website
https://bugs.webkit.org/show_bug.cgi?id=143642
<rdar://problem/18259355>

Reviewed by Darin Adler.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
Don't follow javascript: URLs.

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

4 years agoDFG inlining of op_call_varargs should keep the callee alive in case of OSR exit.
mark.lam@apple.com [Mon, 13 Apr 2015 18:08:33 +0000 (18:08 +0000)]
DFG inlining of op_call_varargs should keep the callee alive in case of OSR exit.
https://bugs.webkit.org/show_bug.cgi?id=143407

Reviewed by Filip Pizlo.

DFG inlining of a varargs call / construct needs to keep the local
containing the callee alive with a Phantom node because the LoadVarargs
node may OSR exit.  After the OSR exit, the baseline JIT executes the
op_call_varargs with that callee in the local.

Previously, because that callee local was not explicitly kept alive,
the op_call_varargs case can OSR exit a DFG function and leave an
undefined value in that local.  As a result, the baseline observes the
side effect of an op_call_varargs on an undefined value instead of the
function it expected.

Note: this issue does not manifest with op_construct_varargs because
the inlined constructor will have an op_create_this which operates on
the incoming callee value, thereby keeping it alive.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleInlining):
* tests/stress/call-varargs-with-different-arguments-length-after-warmup.js: Added.
(foo):
(Foo):
(doTest):

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

4 years agoClear up the test content when test is done.
zalan@apple.com [Mon, 13 Apr 2015 18:04:55 +0000 (18:04 +0000)]
Clear up the test content when test is done.

Unreviewed fix.

* Layout/simple-line-layout-innertext.html:

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

4 years agoFixed position element is truncated if moved onscreen by a transform
simon.fraser@apple.com [Mon, 13 Apr 2015 17:55:07 +0000 (17:55 +0000)]
Fixed position element is truncated if moved onscreen by a transform
https://bugs.webkit.org/show_bug.cgi?id=143655
Source/WebCore:

rdar://problem/15020044

Reviewed by Darin Adler.

Our "don't do layout if transform changes" code was too aggressive.
If an element changes between having a transform and not having one, we
really need to do a layout since so much else depends on transforms. In
this particular case, we clip position:fixed elements to the viewport if
they are not transformed, and were failing to re-evaluate this when a
transform was added. Doing a layout fixes this.

Test: compositing/geometry/fixed-transformed.html

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/StyleTransformData.h:
(WebCore::StyleTransformData::hasTransform):

LayoutTests:

Reviewed by Darin Adler.

Test that moves a position:fixed element on-screen using a transform.

* compositing/geometry/fixed-transformed.html: Added.

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

4 years ago[Content Extensions] Don't unmap shared memory while using it.
achristensen@apple.com [Mon, 13 Apr 2015 17:54:22 +0000 (17:54 +0000)]
[Content Extensions] Don't unmap shared memory while using it.
https://bugs.webkit.org/show_bug.cgi?id=143625

Reviewed by Darin Adler.

* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::createExtension):
Keep the Data object alive as long as the SharedMemory that uses it.

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

4 years agojs/regress-141098.html often times out in debug builds.
ap@apple.com [Mon, 13 Apr 2015 17:50:44 +0000 (17:50 +0000)]
js/regress-141098.html often times out in debug builds.

This test is slow in debug, sometimes barely passing, and other times timing out.

* TestExpectations:

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

4 years ago[cmake] REGRESSION(182663): It broke feature dependency handling
mcatanzaro@igalia.com [Mon, 13 Apr 2015 17:42:22 +0000 (17:42 +0000)]
[cmake] REGRESSION(182663): It broke feature dependency handling
https://bugs.webkit.org/show_bug.cgi?id=143665

Reviewed by Csaba Osztrogonác.

Don't try to check the value of options before defining the options.

* Source/cmake/WebKitFeatures.cmake:

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

4 years ago[Win] Unreviewed test correction after r182635.
bfulgham@apple.com [Mon, 13 Apr 2015 17:42:03 +0000 (17:42 +0000)]
[Win] Unreviewed test correction after r182635.

Two Windows test expectation files were missing newlines at the end of the file.

* platform/win/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt:
* platform/win/fast/backgrounds/selection-background-color-of-list-style-expected.txt:

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

4 years agobuild.webkit.org/dashboard: Crash-only queues should show failure when testing fails...
ap@apple.com [Mon, 13 Apr 2015 17:28:59 +0000 (17:28 +0000)]
build.webkit.org/dashboard: Crash-only queues should show failure when testing fails to start
https://bugs.webkit.org/show_bug.cgi?id=143656

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):

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

4 years ago[Win] Unreviewed gardening after r182620. (<br> updates mostly)
zalan@apple.com [Mon, 13 Apr 2015 17:28:05 +0000 (17:28 +0000)]
[Win] Unreviewed gardening after r182620. (<br> updates mostly)

* platform/win/fast/dom/focus-contenteditable-expected.txt:
* platform/win/fast/forms/listbox-hit-test-zoomed-expected.txt:
* platform/win/fast/forms/range/slider-padding-expected.txt:
* platform/win/fast/forms/textarea-scroll-height-expected.txt:
* platform/win/fast/parser/open-comment-in-textarea-expected.txt:
* platform/win/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/win/fast/text/svg-font-face-with-kerning-expected.txt: Added.
* platform/win/http/tests/navigation/postredirect-basic-expected.txt:
* platform/win/http/tests/navigation/postredirect-goback1-expected.txt:
* platform/win/printing/single-line-must-not-be-split-into-two-pages-expected.txt:
* platform/win/svg/wicd/test-rightsizing-b-expected.txt:
* platform/win/tables/mozilla/bugs/bug1224-expected.txt:
* platform/win/tables/mozilla/bugs/bug131020-expected.txt:
* platform/win/tables/mozilla/bugs/bug131020_iframe-expected.txt:
* platform/win/tables/mozilla/bugs/bug1430-expected.txt:
* platform/win/tables/mozilla/bugs/bug16252-expected.txt:
* platform/win/tables/mozilla/bugs/bug19599-expected.txt:
* platform/win/tables/mozilla/bugs/bug20579-expected.txt:
* platform/win/tables/mozilla/bugs/bug32205-3-expected.txt:
* platform/win/tables/mozilla/bugs/bug82946-2-expected.txt:
* platform/win/tables/mozilla/bugs/bug92143-expected.txt:
* platform/win/tables/mozilla/marvin/tables_cellpadding-expected.txt:
* platform/win/tables/mozilla/marvin/tables_cellspacing-expected.txt:
* platform/win/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/win/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
* platform/win/tables/mozilla_expected_failures/other/test4-expected.txt:

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

4 years ago[Win] Incorrect parameter order in call to WebView::repaint.
peavo@outlook.com [Mon, 13 Apr 2015 16:22:14 +0000 (16:22 +0000)]
[Win] Incorrect parameter order in call to WebView::repaint.
https://bugs.webkit.org/show_bug.cgi?id=143666

Reviewed by Brent Fulgham.

The 'immediate' default parameter has been forgotten.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::invalidateRootView):
(WebChromeClient::invalidateContentsAndRootView):
(WebChromeClient::invalidateContentsForSlowScroll):

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

4 years ago[Cocoa] Localizable strings are inconsistent and need to be regenerated
darin@apple.com [Mon, 13 Apr 2015 15:41:40 +0000 (15:41 +0000)]
[Cocoa] Localizable strings are inconsistent and need to be regenerated
https://bugs.webkit.org/show_bug.cgi?id=143661
Source/WebCore:

rdar://problem/19634388

Reviewed by Dan Bernstein.

* English.lproj/Localizable.strings: Updated by running the
update-webkit-localizable-strings script.

Source/WebKit/mac:

rdar://problem/19634388

Reviewed by Dan Bernstein.

* Misc/WebLocalizableStrings.mm:
(LoadWebLocalizedStringsTimerCallback): Moved the comment, useful for programmers but
not for localization, into a C++ source code comment, and made the localizer comment
consistent with the place this localizable string is used for actual localization.
* WebCoreSupport/WebEditorClient.mm:
(undoNameForEditAction): Changed the localizer comments for Delete and Dictation
to match the ones in WebKit2; no need to specify that these are iOS only, and if we do
want to specify that, we should not be using the term PLATFORM(IOS) since there is no
reason for us to expect localizers to understand that terminology. Also added a comment
about the fact that we have two copies of all the localizable strings.

Source/WebKit2:

Reviewed by Dan Bernstein.

* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction): Also added a comment
about the fact that we have two copies of all the localizable strings.

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

4 years agoRemove needless recreation of URL in NavigationScheduler::scheduleLocationChange
darin@apple.com [Mon, 13 Apr 2015 15:40:42 +0000 (15:40 +0000)]
Remove needless recreation of URL in NavigationScheduler::scheduleLocationChange
https://bugs.webkit.org/show_bug.cgi?id=143662

Reviewed by Sam Weinig.

* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::scheduleLocationChange): Removed unnecessary code
to convert a URL to a String and then back into a URL.

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

4 years agoREGRESSION(r181134): [GTK] Test /webkit2/WebKitWebView/insecure-content is failing...
svillar@igalia.com [Mon, 13 Apr 2015 15:06:23 +0000 (15:06 +0000)]
REGRESSION(r181134): [GTK] Test /webkit2/WebKitWebView/insecure-content is failing after r181134
https://bugs.webkit.org/show_bug.cgi?id=142387

Reviewed by Carlos Garcia Campos.

Running mixed content is blocked by default since r181134. Updated
the test case to reflect the new default settings.

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(testInsecureContent):

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

4 years agoFix wrong value variable in ENABLE_NAVIGATOR_HWCONCURRENCY
gyuyoung.kim@webkit.org [Mon, 13 Apr 2015 14:46:49 +0000 (14:46 +0000)]
Fix wrong value variable in ENABLE_NAVIGATOR_HWCONCURRENCY
https://bugs.webkit.org/show_bug.cgi?id=143667

Reviewed by Csaba Osztrogonác.

ENABLE_NAVIGATOR_HWCONCURRENCY has used $registerProtocolHandlerSupport value variable
since r169017. Added $hardwareConcurrencySupport for it.

Additionally networkInfoSupport is removed because this feature was removed due to spec out.

* Scripts/webkitperl/FeatureList.pm:

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

4 years ago[cmake] Add ENABLE(ATTACHMENT_ELEMENT) to the build system
ossy@webkit.org [Mon, 13 Apr 2015 14:11:32 +0000 (14:11 +0000)]
[cmake] Add ENABLE(ATTACHMENT_ELEMENT) to the build system
https://bugs.webkit.org/show_bug.cgi?id=143664

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:

* page/efl/DragControllerEfl.cpp:
(WebCore::DragController::declareAndWriteAttachment): Added stub implementation to fix the build.
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::declareAndWriteAttachment): Added stub implementation to fix the build.

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

4 years ago[EFL] Update table/mozilla expected files after r182620
ossy@webkit.org [Mon, 13 Apr 2015 14:08:39 +0000 (14:08 +0000)]
[EFL] Update table/mozilla expected files after r182620
https://bugs.webkit.org/show_bug.cgi?id=143626

Unreviewed gardening.

* platform/efl/TestExpectations:
* platform/efl/tables/mozilla/bugs/bug106795-expected.png:
* platform/efl/tables/mozilla/bugs/bug106795-expected.txt:
* platform/efl/tables/mozilla/bugs/bug1224-expected.png:
* platform/efl/tables/mozilla/bugs/bug1224-expected.txt:
* platform/efl/tables/mozilla/bugs/bug131020-expected.png:
* platform/efl/tables/mozilla/bugs/bug131020-expected.txt:
* platform/efl/tables/mozilla/bugs/bug131020_iframe-expected.png:
* platform/efl/tables/mozilla/bugs/bug131020_iframe-expected.txt:
* platform/efl/tables/mozilla/bugs/bug1430-expected.png:
* platform/efl/tables/mozilla/bugs/bug1430-expected.txt:
* platform/efl/tables/mozilla/bugs/bug157890-expected.png:
* platform/efl/tables/mozilla/bugs/bug157890-expected.txt: Added.
* platform/efl/tables/mozilla/bugs/bug16252-expected.png:
* platform/efl/tables/mozilla/bugs/bug16252-expected.txt:
* platform/efl/tables/mozilla/bugs/bug19599-expected.png:
* platform/efl/tables/mozilla/bugs/bug19599-expected.txt:
* platform/efl/tables/mozilla/bugs/bug20579-expected.png:
* platform/efl/tables/mozilla/bugs/bug20579-expected.txt:
* platform/efl/tables/mozilla/bugs/bug32205-3-expected.png:
* platform/efl/tables/mozilla/bugs/bug32205-3-expected.txt:
* platform/efl/tables/mozilla/bugs/bug82946-2-expected.png:
* platform/efl/tables/mozilla/bugs/bug82946-2-expected.txt:
* platform/efl/tables/mozilla/bugs/bug92143-expected.png:
* platform/efl/tables/mozilla/bugs/bug92143-expected.txt:
* platform/efl/tables/mozilla/marvin/tables_cellpadding-expected.png:
* platform/efl/tables/mozilla/marvin/tables_cellpadding-expected.txt:
* platform/efl/tables/mozilla/marvin/tables_cellspacing-expected.png:
* platform/efl/tables/mozilla/marvin/tables_cellspacing-expected.txt:
* platform/efl/tables/mozilla/other/wa_table_thtd_rowspan-expected.png:
* platform/efl/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug1262-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug1262-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug56024-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug56024-expected.txt:
* platform/efl/tables/mozilla_expected_failures/other/test4-expected.png:
* platform/efl/tables/mozilla_expected_failures/other/test4-expected.txt:

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

4 years ago[Curl] Small improvements to CurlCacheEntry::parseResponseHeaders()
commit-queue@webkit.org [Mon, 13 Apr 2015 14:05:37 +0000 (14:05 +0000)]
[Curl] Small improvements to CurlCacheEntry::parseResponseHeaders()
https://bugs.webkit.org/show_bug.cgi?id=143597

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-13
Reviewed by Csaba Osztrogonác.

Most lines of code in CurlCacheEntry::parseResponseHeaders() don't need to be
executed if the response has "no-cache" or "no-store" directive, but we are
checking these conditions in the middle of the method. We can move this to the
beginning of the method for efficiency.

No new tests, no behavior change.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::parseResponseHeaders):

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

4 years ago[EFL] Unreviewed gardening, skip fast/attachment tests, there is
ossy@webkit.org [Mon, 13 Apr 2015 13:59:37 +0000 (13:59 +0000)]
[EFL] Unreviewed gardening, skip fast/attachment tests, there is
no reason to run these tests before enabling ATTACHMENT_ELEMENT.

* platform/efl/TestExpectations:

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

4 years agoUnreviewed, build fix after r182704.
svillar@igalia.com [Mon, 13 Apr 2015 13:20:09 +0000 (13:20 +0000)]
Unreviewed, build fix after r182704.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):

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

4 years agoUse std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceResponse
commit-queue@webkit.org [Mon, 13 Apr 2015 11:18:04 +0000 (11:18 +0000)]
Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=143056

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-04-13
Reviewed by Gyuyoung Kim.

No new tests, no behavior changes.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
* platform/CrossThreadCopier.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/curl/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::doPlatformCopyData):
(WebCore::ResourceResponse::doPlatformAdopt):

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

4 years ago[CSS Grid Layout] Support marking/unmarking tracks as infinitely growable
svillar@igalia.com [Mon, 13 Apr 2015 10:49:43 +0000 (10:49 +0000)]
[CSS Grid Layout] Support marking/unmarking tracks as infinitely growable
https://bugs.webkit.org/show_bug.cgi?id=141431

Reviewed by Darin Adler.

Source/WebCore:

As explained here
http://lists.w3.org/Archives/Public/www-style/2014Mar/0512.html we
sometimes need to consider that some tracks are infinitely
growable even when they are really not, in order to produce more
"natural" results.

For example the following case:
  grid-template-columns: auto auto;
  item 1 in column 1 with min-content = max-content = 10px;
  item 2 in columns 1-2 with min-content = 30, max-content = 100px;

will produce (45px, 55px) without this patch. But considering the
second column as infinitely growable the result is (10px, 90px), a
more "natural" result because column 1 just needs to be 10px to
accommodate item 1. From now on we can flag GridTracks so that
they can infinitely grow even when the growth limit is finite.

Apart from that distributeSpaceToTracks() is now unconditionally
called even though the extra space is 0. That's because it
computes the plannedSize value.

Test: fast/css-grid-layout/mark-as-infinitely-growable.html

* rendering/RenderGrid.cpp:
(WebCore::GridTrack::infiniteGrowthPotential):
(WebCore::GridTrack::infinitelyGrowable):
(WebCore::GridTrack::setInfinitelyGrowable):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): Updated with new phase.
(WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::markAsInfinitelyGrowableForTrackSizeComputationPhase):
New helper method which does the mark/unmark just for growth limits.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::sortByGridTrackGrowthPotential): Use
infiniteGrowthPotential() for sorting.
(WebCore::RenderGrid::distributeSpaceToTracks):
* rendering/RenderGrid.h:

LayoutTests:

New test that to check that tracks whose growth limit changes from
infinite to finite when evaluating "intrinsic maximums" are marked
as infinitely growable for the "max-content maximums" step.

* fast/css-grid-layout/mark-as-infinitely-growable-expected.txt: Added.
* fast/css-grid-layout/mark-as-infinitely-growable.html: Added.

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

4 years ago[EFL] Unreviewed gardening, update platform specifix expected files after r181889.
ossy@webkit.org [Mon, 13 Apr 2015 10:27:52 +0000 (10:27 +0000)]
[EFL] Unreviewed gardening, update platform specifix expected files after r181889.

* platform/efl/css3/selectors3/xhtml/css3-modsel-15c-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-15c-expected.txt:
* platform/efl/plugins/npruntime/object-from-destroyed-plugin-expected.txt:
* platform/efl/plugins/npruntime/object-from-destroyed-plugin-in-subframe-expected.txt:

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

4 years ago[EFL] Rebaseline accessibility/aria-toggle-button-with-title.html
ossy@webkit.org [Mon, 13 Apr 2015 10:21:31 +0000 (10:21 +0000)]
[EFL] Rebaseline accessibility/aria-toggle-button-with-title.html
https://bugs.webkit.org/show_bug.cgi?id=143229

Unreviewed gardening after r182012.

* platform/efl/accessibility/aria-toggle-button-with-title-expected.txt: Added.

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

4 years ago[EFL] accessibility/plugin.html fails
ossy@webkit.org [Mon, 13 Apr 2015 10:17:16 +0000 (10:17 +0000)]
[EFL] accessibility/plugin.html fails
https://bugs.webkit.org/show_bug.cgi?id=143663

Unreviewed gardening, mark accessibility/plugin.html as failing test.

* platform/efl/TestExpectations:

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

4 years agoLegacy scroll behavior on HTMLBodyElement should only apply to the first body element...
benjamin@webkit.org [Mon, 13 Apr 2015 04:42:53 +0000 (04:42 +0000)]
Legacy scroll behavior on HTMLBodyElement should only apply to the first body element of a document
https://bugs.webkit.org/show_bug.cgi?id=143651

Source/WebCore:

Reviewed by Sam Weinig.

WebKit has some very weird behaviors for the scroll methods on body. This patch
address the first bug: only the first body element should have the legacy behavior.

The relevant text in spec:
-http://dev.w3.org/csswg/cssom-view/#dom-element-scrollleft
-http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop
-http://dev.w3.org/csswg/cssom-view/#dom-element-scrollwidth
-http://dev.w3.org/csswg/cssom-view/#dom-element-scrollheight

Tests: fast/dom/Element/body-scrollHeight-basics-quirks.html
       fast/dom/Element/body-scrollLeft-basics-quirks.html
       fast/dom/Element/body-scrollTop-basics-quirks.html
       fast/dom/Element/body-scrollWidth-basics-quirks.html
       fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollLeft.html
       fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollTop.html

* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::isFirstBodyElementOfDocument):
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
(WebCore::HTMLBodyElement::scrollHeight):
(WebCore::HTMLBodyElement::scrollWidth):
* html/HTMLBodyElement.h:

LayoutTests:

Patch by Benjamin Poulain  <benjamin@webkit.org> and Diego Perini <diego.perini@gmail.com> on 2015-04-12
Reviewed by Sam Weinig.

* fast/dom/Element/body-scrollHeight-basics-quirks-expected.txt: Added.
* fast/dom/Element/body-scrollHeight-basics-quirks.html: Added.
* fast/dom/Element/body-scrollLeft-basics-quirks-expected.txt: Added.
* fast/dom/Element/body-scrollLeft-basics-quirks.html: Added.
* fast/dom/Element/body-scrollTop-basics-quirks-expected.txt: Added.
* fast/dom/Element/body-scrollTop-basics-quirks.html: Added.
* fast/dom/Element/body-scrollWidth-basics-quirks-expected.txt: Added.
* fast/dom/Element/body-scrollWidth-basics-quirks.html: Added.
Test the various behaviors.

* fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollLeft-expected.txt: Added.
* fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollLeft.html: Added.
* fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollTop-expected.txt: Added.
* fast/dom/Element/detached-body-element-does-not-scroll-main-frame-with-scrollTop.html: Added.
Those tests target specifically the bug.

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

4 years agoFix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
mcatanzaro@igalia.com [Mon, 13 Apr 2015 01:29:59 +0000 (01:29 +0000)]
Fix -Wparentheses warning with GCC 5 in SaturatedArithmetic.h
https://bugs.webkit.org/show_bug.cgi?id=143457

Reviewed by Benjamin Poulain.

Tested by WTF.SaturatedArithmeticAddition and WTF.SaturatedArithmeticSubtraction.

* wtf/SaturatedArithmetic.h:
(signedAddOverflows): Use && instead of & to avoid triggering -Wparentheses in newer
versions of GCC and Clang, and to improve the clarity of the function.
(signedSubtractOverflows): Changed correspondingly, although there was no warning here.

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

4 years ago[EFL] Enable Media Source
gyuyoung.kim@webkit.org [Mon, 13 Apr 2015 00:54:13 +0000 (00:54 +0000)]
[EFL] Enable Media Source
https://bugs.webkit.org/show_bug.cgi?id=143635

Reviewed by Csaba Osztrogonác.

.:

* Source/cmake/OptionsEfl.cmake: Add ENABLE_MEDIA_SOURCE switch.

Tools:

* Scripts/webkitperl/FeatureList.pm: Enable media source on efl port.

LayoutTests:

* platform/efl/TestExpectations: Update failing tests.

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

4 years agoFix trival typos related to the word "coordinate".
commit-queue@webkit.org [Sun, 12 Apr 2015 22:33:13 +0000 (22:33 +0000)]
Fix trival typos related to the word "coordinate".
https://bugs.webkit.org/show_bug.cgi?id=143644

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-12
Reviewed by Alexey Proskuryakov.

No new tests, no behavior change.

Source/WebCore:

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

Source/WebKit2:

* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):

LayoutTests:

* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
* css3/scroll-snap/scroll-snap-property-computed-style.js:
* platform/gtk/svg/custom/svg-curve-with-relative-cordinates-expected.png: Removed.
* platform/gtk/svg/custom/svg-curve-with-relative-cordinates-expected.txt: Removed.
* platform/ios-sim-deprecated/svg/custom/svg-curve-with-relative-cordinates-expected.txt: Removed.
* platform/ios-simulator/svg/custom/svg-curve-with-relative-cordinates-expected.txt: Removed.
* platform/mac/svg/custom/svg-curve-with-relative-cordinates-expected.png: Removed.
* platform/mac/svg/custom/svg-curve-with-relative-cordinates-expected.txt: Removed.
* platform/win/svg/custom/svg-curve-with-relative-cordinates-expected.txt: Removed.
* svg/custom/svg-curve-with-relative-cordinates.html: Removed.

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

4 years agoScrollbars in composited overflow and iframes fail to render on Mac
simon.fraser@apple.com [Sun, 12 Apr 2015 20:28:44 +0000 (20:28 +0000)]
Scrollbars in composited overflow and iframes fail to render on Mac
https://bugs.webkit.org/show_bug.cgi?id=143647
rdar://problem/20340544

Reviewed by Darin Adler.

When adding support for drawing scrollbars on the scrolling thread, we inadvertently
disabled scrollbar drawing in other composited, main-thread scrolling configurations.

Fix by having Scrollbar::supportsUpdateOnSecondaryThread() only return true if
the scrollable area is using async scrolling.

Sadly, we can't layout-test this.

* platform/Scrollbar.cpp:
(WebCore::Scrollbar::supportsUpdateOnSecondaryThread):

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

4 years agoSelects don't scroll at some aspect ratios
simon.fraser@apple.com [Sun, 12 Apr 2015 20:18:01 +0000 (20:18 +0000)]
Selects don't scroll at some aspect ratios
https://bugs.webkit.org/show_bug.cgi?id=143649
rdar://problem/19365694

Reviewed by Darin Adler.
Source/WebCore:

Fix width/height flip in RenderListBox which caused us to fail to scroll when
the list was wider than the scroll height.

We're generally confused about RenderListBox scroll offsets (webkit.org/b/143648)
but this fixes the immediate problem.

Test: fast/forms/listbox-visible-size.html

* rendering/RenderListBox.h:

LayoutTests:

* fast/forms/listbox-visible-size-expected.txt: Added.
* fast/forms/listbox-visible-size.html: Added.

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

4 years agoRemove PluginModuleInfo.cpp from WebKit2
commit-queue@webkit.org [Sun, 12 Apr 2015 20:08:00 +0000 (20:08 +0000)]
Remove PluginModuleInfo.cpp from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=143643

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-12
Reviewed by Darin Adler.

Remove PluginModuleInfo.cpp from WebKit2 because it is totally empty.

No new tests, no behavior change.

* CMakeLists.txt:
* Shared/Plugins/PluginModuleInfo.cpp: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agobuild.webkit.org/dashboard: Crash-only queues should show failure when failure limit...
ap@apple.com [Sun, 12 Apr 2015 20:04:45 +0000 (20:04 +0000)]
build.webkit.org/dashboard: Crash-only queues should show failure when failure limit is exceeded
https://bugs.webkit.org/show_bug.cgi?id=143646

Reviewed by David Kilzer.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):

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

4 years agoToo much repainting on scrolling with fixed backgrounds
simon.fraser@apple.com [Sun, 12 Apr 2015 17:30:58 +0000 (17:30 +0000)]
Too much repainting on scrolling with fixed backgrounds
https://bugs.webkit.org/show_bug.cgi?id=143637
rdar://problem/20245243

Reviewed by Darin Adler.

Source/WebCore:

FrameView::scrollContentsSlowPath() would repaint the entire viewport if there were
any slow-repaint objects (those with background-attachment: fixed) and the contents
were using compositing for scrolling.

This is wrong; we only need to issue repaint for the slow-repaint renderers,
and, if the frame is hosted in a compositing layer and not using compositing for scrolling,
repaint that hosting layer.

Tests: compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint.html
       compositing/repaint/iframes/compositing-iframe-scroll-repaint.html
       compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint.html
       platform/mac-wk2/tiled-drawing/fixed-background-scroll-repaint.html

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsSlowPath):

LayoutTests:

Tests with various configurations of iframes and compositing, which dump layer trees with
repaint rectangles.

Also tiled-scrolling test that exercises the simple case.

Put WebKit1-specific results in platform/mac-wk1, since they are very different from
WK2 and other platforms, due to WK1-specific layer hosting and repaint behaviors.

* compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint-expected.txt: Added.
* compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint.html: Added.
* compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt: Added.
* compositing/repaint/iframes/compositing-iframe-scroll-repaint.html: Added.
* compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt: Added.
* compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint.html: Added.
* compositing/repaint/iframes/resources/compositing-document.html: Added.
* compositing/repaint/iframes/resources/compositing-fixed-background-document.html: Added.
* compositing/repaint/iframes/resources/fixed-background-document.html: Added.
* platform/mac-wk1/compositing/repaint/iframes/composited-iframe-with-fixed-background-doc-repaint-expected.txt: Added.
* platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt: Added.
* platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt: Added.
* platform/mac-wk2/compositing/repaint/fixed-background-scroll-expected.txt:
* platform/mac-wk2/tiled-drawing/fixed-background-scroll-repaint-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/fixed-background-scroll-repaint.html: Added.

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

4 years ago[ES6] Implement Array.prototype.values
utatane.tea@gmail.com [Sun, 12 Apr 2015 09:50:40 +0000 (09:50 +0000)]
[ES6] Implement Array.prototype.values
https://bugs.webkit.org/show_bug.cgi?id=143633

Reviewed by Darin Adler.

Source/JavaScriptCore:

Symbol.unscopables is implemented, so we can implement Array.prototype.values
without largely breaking the web. The following script passes.

var array = [];
var values = 42;
with (array) {
    assert(values, 42);
}

* runtime/ArrayPrototype.cpp:
* tests/stress/array-iterators-next.js:
* tests/stress/map-iterators-next.js:
* tests/stress/set-iterators-next.js:
* tests/stress/values-unscopables.js: Added.
(test):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/array-iterators-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/array-iterators.js:

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

5 years agoediting/spelling/spelling-marker-description.html times out on Mac
ap@apple.com [Sun, 12 Apr 2015 05:12:40 +0000 (05:12 +0000)]
editing/spelling/spelling-marker-description.html times out on Mac
https://bugs.webkit.org/show_bug.cgi?id=143639

Reviewed by Darin Adler.

* editing/spelling/spelling-marker-description-expected.txt:
* editing/spelling/spelling-marker-description.html:
Changed the test to match reality.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
Removed expectations.

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

5 years agoUse en_US spell checker for tests on Mac instead of Multilingual
ap@apple.com [Sun, 12 Apr 2015 05:05:18 +0000 (05:05 +0000)]
Use en_US spell checker for tests on Mac instead of Multilingual
https://bugs.webkit.org/show_bug.cgi?id=143641

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
While at it, override NSUserDictionaryReplacementItems, so that user replacements
cannot affect tests.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: (WTR::InjectedBundle::platformInitialize):
Made this more like WebKit1 version.

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

5 years agoWeb Inspector: Hide Frames Timeline if the backend doesn't support it
commit-queue@webkit.org [Sun, 12 Apr 2015 02:23:26 +0000 (02:23 +0000)]
Web Inspector: Hide Frames Timeline if the backend doesn't support it
https://bugs.webkit.org/show_bug.cgi?id=142800

Patch by Matt Baker <mattbaker@apple.com> on 2015-04-11
Reviewed by Timothy Hatcher.

Fallback to showing the layout timeline if the backend doesn't support the rendering frames timeline.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.shouldShowViewForTimeline):
(WebInspector.TimelineManager.prototype._loadNewRecording):
Added iOS 8 compatibility check for RenderingFrame timeline record type.

* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
Restored fields used by Layout timeline view.

* UserInterface/Views/LayoutTimelineView.js:
Updated to be compatible with both RenderingFrame and Layout timeline views.

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

5 years ago[CMake] Miscellaneous issues in WebKitFeatures.cmake
mcatanzaro@igalia.com [Sat, 11 Apr 2015 23:52:12 +0000 (23:52 +0000)]
[CMake] Miscellaneous issues in WebKitFeatures.cmake
https://bugs.webkit.org/show_bug.cgi?id=143636

Reviewed by Martin Robinson.

Rename _WEBKIT_AVAILABLE_OPTIONS_INITIALVALUE_ variables to
_WEBKIT_AVAILABLE_OPTIONS_INITIAL_VALUE_

Rename _WEBKIT_AVAILABLE_OPTIONS_ISPUBLIC_ variables to
_WEBKIT_AVAILABLE_OPTIONS_IS_PUBLIC_

Rename _SHOULD_PRINT_POINTS to _SHOULD_PRINT_DOTS

Update USE_SYSTEM_MALLOC description to not mention TCmalloc

Fix ENABLE_TOUCH_SLIDER so that it can be used

Add a comment

* Source/cmake/WebKitFeatures.cmake:

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

5 years ago[CMake] Print sorted feature list at the very end of the configure process
mcatanzaro@igalia.com [Sat, 11 Apr 2015 21:28:34 +0000 (21:28 +0000)]
[CMake] Print sorted feature list at the very end of the configure process
https://bugs.webkit.org/show_bug.cgi?id=143596

Reviewed by Martin Robinson.

* CMakeLists.txt: Call PRINT_WEBKIT_OPTIONS at the bottom of the file.
* Source/cmake/WebKitFeatures.cmake: Split option printing into PRINT_WEBKIT_OPTIONS macro,
and sort the options before printing. Reorder some code so that features still get
propagated to the bindings generators.

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

5 years agoWeb Inspector: Debugger sidebar should show errors underneath scripts
jonowells@apple.com [Sat, 11 Apr 2015 20:55:25 +0000 (20:55 +0000)]
Web Inspector: Debugger sidebar should show errors underneath scripts
https://bugs.webkit.org/show_bug.cgi?id=143464

Reviewed by Timothy Hatcher.

Add a new tree element called IssueTreeElement. This shows warnings and errors in the debugger sidebar. These
can be clicked to jump to the line of source code for which the error was thrown. BreakpointTreeElement and
IssueTreeElement now inherit from DebuggerTreeElement to support any needed commonalities among the interfaces
of elements in the debugger sidebar panel.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.html: Add new files.

* UserInterface/Models/IssueMessage.js:
(WebInspector.IssueMessage):
(WebInspector.IssueMessage.prototype.get source):
(WebInspector.IssueMessage.prototype.get lineNumber):
(WebInspector.IssueMessage.prototype.get columnNumber):
(WebInspector.IssueMessage.prototype.get displayLineNumber):
(WebInspector.IssueMessage.prototype.get displayColumnNumber):
(WebInspector.IssueMessage.prototype.get sourceCodeLocation):
(WebInspector.IssueMessage.prototype.saveIdentityToCookie):
(WebInspector.IssueMessage.prototype._sourceCodeLocationDisplayLocationChanged):
Convert to use a backing SourceCodeLocation. Expand API.

* UserInterface/Views/BreakpointTreeElement.js: Inherits now from DebuggerTreeElement.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithBreakpointsOnlyFilterFunction):
(WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointRemoved):
(WebInspector.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
(WebInspector.DebuggerSidebarPanel.prototype._compareDebuggerTreeElements):
(WebInspector.DebuggerSidebarPanel.prototype._addDebuggerObject):
(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
(WebInspector.DebuggerSidebarPanel.prototype._handleIssueAdded):
(WebInspector.DebuggerSidebarPanel.prototype._handleIssuesCleared):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointDisplayLocationDidChange): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._compareBreakpointTreeElements): Deleted.
Add IssueTreeElements to the sidebar whenever a warning or error corresponding to a line of code is found.
Add a filter function and button to filter down to just these. Ensure issue and breakpoint elements can be
properly compared.

* UserInterface/Views/DebuggerTreeElement.js: Added.
(WebInspector.DebuggerTreeElement):
(WebInspector.DebuggerTreeElement.prototype.get debuggerObject):

* UserInterface/Views/IssueTreeElement.css: Added.
(.issue .icon):
(.issue.error .icon):
(.navigation-sidebar-panel-content-tree-outline .item.small.issue .icon):

* UserInterface/Views/IssueTreeElement.js: Added.
(WebInspector.IssueTreeElement):
(WebInspector.IssueTreeElement.prototype.get issueMessage):
(WebInspector.IssueTreeElement.prototype._updateTitles):

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

5 years agoRun flaky conservative GC related test first before polluting stack and registers
utatane.tea@gmail.com [Sat, 11 Apr 2015 19:43:34 +0000 (19:43 +0000)]
Run flaky conservative GC related test first before polluting stack and registers
https://bugs.webkit.org/show_bug.cgi?id=143634

Reviewed by Ryosuke Niwa.

After r182653, JSC API tests fail. However, it's not related to the change.
After investigating the cause of this failure, I've found that the failed test is flaky
because JSC's GC is conservative. If previously allocated JSGlobalObject is accidentally alive
due to conservative roots in C stack and registers, this test fails.

Since GC marks C stack and registers as roots conservatively,
objects not referenced logically can be accidentally marked and alive.
To avoid this situation as possible as we can,
1. run this test first before stack is polluted,
2. extract this test as a function to suppress stack height.

* API/tests/testapi.mm:
(testWeakValue):
(testObjectiveCAPIMain):
(testObjectiveCAPI):

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

5 years agoWeb Inspector: create content view and details sidebar for Frames timeline
commit-queue@webkit.org [Sat, 11 Apr 2015 19:36:39 +0000 (19:36 +0000)]
Web Inspector: create content view and details sidebar for Frames timeline
https://bugs.webkit.org/show_bug.cgi?id=143533

Patch by Matt Baker <mattbaker@apple.com> on 2015-04-11
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Refactoring: RunLoop prefix changed to RenderingFrame.

* inspector/protocol/Timeline.json:

Source/WebCore:

Refactoring: RunLoop prefix changed to RenderingFrame.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::toProtocol):
* inspector/InspectorTimelineAgent.h:

Source/WebInspectorUI:

Added new Rendering Frames timeline content view and details sidebar, and added minor visual tweeks to the
timeline graph such as ensuring 60 FPS budget line is always visible, and large combined frames are split
up once they reach a maximum pixel width.

* Localizations/en.lproj/localizedStrings.js:
New UI strings.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Support for new details sidebar panel.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.shouldShowViewForTimeline):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._loadNewRecording):
Layout timeline is no longer added to timeline graphs, skip Rendering Frame records that have no child events.

* UserInterface/Images/NavigationItemDoughnutChart.svg: Added.
* UserInterface/Images/TimelineRecordRenderingFrame.svg: Added.
New artwork.

* UserInterface/Main.html:
* UserInterface/Test.html:
New files.

* UserInterface/Models/RenderingFrameTimelineRecord.js: Renamed from Source/WebInspectorUI/UserInterface/Models/RunLoopTimelineRecord.js.
(WebInspector.RenderingFrameTimelineRecord):
(WebInspector.RenderingFrameTimelineRecord.resetFrameNumber):
(WebInspector.RenderingFrameTimelineRecord.prototype.get frameNumber):
(WebInspector.RenderingFrameTimelineRecord.prototype.get children):
(WebInspector.RenderingFrameTimelineRecord.prototype.get durationRemainder):
(WebInspector.RenderingFrameTimelineRecord.prototype.durationForRecords.get var):
Added frame numbering and improved the accuracy of sub-frame duratation calculation.
Refactoring: RunLoop prefix changed to RenderingFrame.

* UserInterface/Models/Timeline.js:
(WebInspector.Timeline):
(WebInspector.Timeline.create):
(WebInspector.Timeline.prototype.get recording):
(WebInspector.Timeline.prototype.get displayName):
(WebInspector.Timeline.prototype.get iconClassName):
Added up-pointer to parent recording.

* UserInterface/Models/TimelineRecord.js:
Refactoring: RunLoop prefix changed to RenderingFrame.

* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.reset):
Support for new timeline type.

* UserInterface/Views/ChartDetailsSectionLegendRow.js: Added.
(WebInspector.ChartDetailsSectionLegendRow):
New details section row type for chart legend items.

* UserInterface/Views/ChartDetailsSectionRow.css: Added.
(.details-section .row.chart):
(.details-section .row.chart canvas):
(.details-section .row.chart.empty canvas):
(.details-section > .content > .group > .row.legend-item > .label > .color-swatch):
* UserInterface/Views/ChartDetailsSectionRow.js: Added.
(WebInspector.ChartDetailsSectionRow):
(WebInspector.ChartDetailsSectionRow.prototype.get legendGroup):
(WebInspector.ChartDetailsSectionRow.prototype.set innerLabel):
(WebInspector.ChartDetailsSectionRow.prototype.addChartValue):
(WebInspector.ChartDetailsSectionRow.prototype.clearChart):
(WebInspector.ChartDetailsSectionRow.prototype._refresh.drawSlice):
(WebInspector.ChartDetailsSectionRow.prototype._refresh):
New details section row type for pie/doughnut charts.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
Support for new timeline view type.

* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
Updated for use in rendering frame timeline view.

* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
Removed references to old RunLoop objects.

* UserInterface/Views/RenderingFrameDetailsSidebarPanel.js: Added.
(WebInspector.RenderingFrameDetailsSidebarPanel.formatChartValue):
(WebInspector.RenderingFrameDetailsSidebarPanel):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype.inspect):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype.updateRangeSelection):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype.get renderingFrameTimeline):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype.set renderingFrameTimeline):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype.refresh.durationForRecordType):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype.refresh):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype._resetAll):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype._recordAdded):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype._timelineReset):
(WebInspector.RenderingFrameDetailsSidebarPanel.prototype._getSelectedRecords):
New sidebar panel for showing time breakdown for current frame selection.

* UserInterface/Views/RenderingFrameTimelineDataGridNode.js: Added.
(WebInspector.RenderingFrameTimelineDataGridNode):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get record):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get records):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get data):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
New data grid row type.

* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css: Renamed from Source/WebInspectorUI/UserInterface/Views/RunLoopTimelineOverviewGraph.css.
(.timeline-overview-graph.rendering-frame > .divider):
(.timeline-overview-graph.rendering-frame > .divider > .label):
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js: Renamed from Source/WebInspectorUI/UserInterface/Views/RunLoopTimelineOverviewGraph.js.
(WebInspector.RenderingFrameTimelineOverviewGraph):
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.get graphHeightSeconds):
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.updateLayout.createFrame):
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition.get if):
* UserInterface/Views/RenderingFrameTimelineView.css: Renamed from Source/WebInspectorUI/UserInterface/Views/RunLoopTimelineOverviewGraph.css.
(.timeline-view.rendering-frame > .data-grid):
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing .navigation-sidebar-panel-content-tree-outline.rendering-frame .item .subtitle):
Visual tweeks.
Refactoring: RunLoop prefix changed to RenderingFrame.

* UserInterface/Views/RenderingFrameTimelineView.js: Added.
(WebInspector.RenderingFrameTimelineView):
(WebInspector.RenderingFrameTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.RenderingFrameTimelineView.prototype.shown):
(WebInspector.RenderingFrameTimelineView.prototype.hidden):
(WebInspector.RenderingFrameTimelineView.prototype.updateLayout):
(WebInspector.RenderingFrameTimelineView.prototype.get selectionPathComponents):
(WebInspector.RenderingFrameTimelineView.prototype.filterDidChange):
(WebInspector.RenderingFrameTimelineView.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.RenderingFrameTimelineView.prototype.reset):
(WebInspector.RenderingFrameTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.RenderingFrameTimelineView.prototype.dataGridNodeForTreeElement):
(WebInspector.RenderingFrameTimelineView.prototype._processPendingRecords):
(WebInspector.RenderingFrameTimelineView.prototype._renderingFrameTimelineRecordAdded):
(WebInspector.RenderingFrameTimelineView.prototype._dataGridNodeSelected):
New content view type.

* UserInterface/Views/TimelineIcons.css:
(.rendering-frame-icon .icon):
(.rendering-frame-icon.large .icon):
(.rendering-frame-record .icon):
(.runloop-record .icon):
(.runloop-icon .icon): Deleted.
(.runloop-icon.large .icon): Deleted.
Refactoring: runloop prefix changed to rendering-frame.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._timelineRemoved):
Support for timelines without associated views.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
Refactoring: RunLoop prefix changed to RenderingFrame.

* UserInterface/Views/TimelineRecordFrame.css:
(.timeline-record-frame):
(.timeline-record-frame > .frame):
* UserInterface/Views/TimelineRecordFrame.js:
(WebInspector.TimelineRecordFrame.createCombinedFrames):
Visual tweeks, splitting up large combined frames.

* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Refactoring: runloop prefix changed to rendering-frame.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Added support for new details sidebar and timelines without associated views.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel._timelineAdded.set this):
Support for timelines without associated views.
Refactoring: runloop prefix changed to rendering-frame.

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
New files.

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

5 years agoStop referring to outdated RFC2616 in CacheValidation.cpp
cdumez@apple.com [Sat, 11 Apr 2015 18:25:49 +0000 (18:25 +0000)]
Stop referring to outdated RFC2616 in CacheValidation.cpp
https://bugs.webkit.org/show_bug.cgi?id=143619

Reviewed by Darin Adler.

Stop referring to outdated RFC2616 in CacheValidation.cpp and refer to
the newer RFC7230 & RFC7234. Also update some variables to match the
naming in the RFC for clarity.

No behavior change.

* platform/network/CacheValidation.cpp:
(WebCore::updateResponseHeadersAfterRevalidation):
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
(WebCore::isCacheHeaderSeparator):
(WebCore::parseCacheControlDirectives):

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

5 years ago[CMake] Options should be marked as advanced by default
mcatanzaro@igalia.com [Sat, 11 Apr 2015 18:13:10 +0000 (18:13 +0000)]
[CMake] Options should be marked as advanced by default
https://bugs.webkit.org/show_bug.cgi?id=143572

Reviewed by Gyuyoung Kim.

Options defined with WEBKIT_OPTION_DEFINE are now advanced so that they are hidden from
users by default, unless WEBKIT_OPTION_DEFAULT_PORT_VALUE is used. Add new macros
WEBKIT_OPTION_DEFINE_PUBLIC to define an option that's not hidden by default, to be used
for adding port-specific options, and WEBKIT_OPTION_PRIVATE_PORT_VALUE to override an
option without making it public.

* Source/cmake/WebKitFeatures.cmake:

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

5 years ago[EFL] Unskip media test on EFL port
gyuyoung.kim@webkit.org [Sat, 11 Apr 2015 17:05:39 +0000 (17:05 +0000)]
[EFL] Unskip media test on EFL port

Unreviewed, media tests are being passed except for 25 tests.
The failing tests need to be investigated by Bug 131044.

* platform/efl/TestExpectations:

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

5 years agoWebKit places caret in front of pasted Numbers cells instead of behind
rniwa@webkit.org [Sat, 11 Apr 2015 16:03:07 +0000 (16:03 +0000)]
WebKit places caret in front of pasted Numbers cells instead of behind
https://bugs.webkit.org/show_bug.cgi?id=143627

Reviewed by Darin Adler.

The bug was caused by Position::downstream not respecting modern position types inside a table.
Fixed it by using Position::atStartOfNode which respects before/after positions.

This bug doesn't reproduce when there is no whitespace after td element in the pasted content
because positionAtEndOfInsertedContent() will be inside the last pasted cell inside
ReplaceSelectionCommand::completeHTMLReplacement in those cases. This related but separate bug
is tracked in https://webkit.org/b/143628.

Tests: editing/pasteboard/paste-table-with-unrendered-text-nodes.html

* dom/Position.cpp:
(WebCore::Position::downstream):

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

5 years agoWeb Inspector: Use semi-transparent map item dividers
nvasilyev@apple.com [Sat, 11 Apr 2015 14:40:22 +0000 (14:40 +0000)]
Web Inspector: Use semi-transparent map item dividers
https://bugs.webkit.org/show_bug.cgi?id=143630

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
(.object-tree-map-entry.key:not(:first-child)):
(.object-tree-map-entry.key): Deleted.
(.object-tree-map-entry.key:first-of-type): Deleted.
Use one selector instead of two.

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

5 years agoWeb Inspector: Objects are vertically misaligned by 1px
nvasilyev@apple.com [Sat, 11 Apr 2015 14:37:23 +0000 (14:37 +0000)]
Web Inspector: Objects are vertically misaligned by 1px
https://bugs.webkit.org/show_bug.cgi?id=143629

Reviewed by Timothy Hatcher.

* UserInterface/Views/FormattedValue.css:
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap):

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

5 years ago[ES6] Enable Symbol in web pages
utatane.tea@gmail.com [Sat, 11 Apr 2015 10:02:09 +0000 (10:02 +0000)]
[ES6] Enable Symbol in web pages
https://bugs.webkit.org/show_bug.cgi?id=143375

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

Expose Symbol to web pages.
Symbol was exposed, but it was hidden since it breaks Facebook comments.
This is because at that time Symbol is implemented,
but methods for Symbol.iterator and Object.getOwnPropertySymbols are not implemented yet
and it breaks React.js and immutable.js.

Now methods for Symbol.iterator and Object.getOwnPropertySymbols are implemented
and make sure that Facebook comment input functionality is not broken with exposed Symbol.

So this patch replaces runtime flags SymbolEnabled to SymbolDisabled
and makes enabling symbols by default.

* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* runtime/RuntimeFlags.h:

Source/WebCore:

* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):

Source/WebKit/mac:

* WebView/WebPreferencesPrivate.h:

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:

Source/WebKit2:

* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):

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

5 years agoHide volume controls when playing wirelessly.
roger_fong@apple.com [Sat, 11 Apr 2015 06:23:35 +0000 (06:23 +0000)]
Hide volume controls when playing wirelessly.
https://bugs.webkit.org/show_bug.cgi?id=143621.
<rdar://problem/20490673>

Reviewed by Darin Adler.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateWirelessPlaybackStatus):

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

5 years agoUnreviewed build fix. Updated config.json after recent changes.
rniwa@webkit.org [Sat, 11 Apr 2015 05:07:41 +0000 (05:07 +0000)]
Unreviewed build fix. Updated config.json after recent changes.

* config.json:

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

5 years agoBuild fix.
ap@apple.com [Sat, 11 Apr 2015 05:07:21 +0000 (05:07 +0000)]
Build fix.

* WebCore.xcodeproj/project.pbxproj: Make LaunchServicesSPI.h a private header
instead of project, as it's used in WebKit.

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

5 years ago[EFL] Unreviewed, EFL gardening on 11th April.
gyuyoung.kim@webkit.org [Sat, 11 Apr 2015 03:52:28 +0000 (03:52 +0000)]
[EFL] Unreviewed, EFL gardening on 11th April.

Mark 18 table/mozilla tests to failure. The tests have been failed since r182620.

* platform/efl/TestExpectations:

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

5 years agoAllow LaunchServices to handle URLs on link navigations
weinig@apple.com [Sat, 11 Apr 2015 01:45:04 +0000 (01:45 +0000)]
Allow LaunchServices to handle URLs on link navigations
<rdar://problem/19446826>
https://bugs.webkit.org/show_bug.cgi?id=143544

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/ios/LaunchServicesSPI.h: Added.
Add new SPI header.

Source/WebKit/mac:

* Configurations/WebKitLegacy.xcconfig:
Link MobileCoreServices.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(shouldTryAppLink):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::setUpPolicyListener):
Only let LaunchServices have a crack at the URL if the navigation is:
    1) a main frame navigation
    2) a result of a user gesture

Source/WebKit2:

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
Only let LaunchServices have a crack at the URL if the navigation is:
    1) a main frame navigation
    2) a result of a user gesture

Source/WTF:

* wtf/Platform.h:
Add HAVE macro for this functionality.

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

5 years agoES6: Iterator toString names should be consistent
utatane.tea@gmail.com [Sat, 11 Apr 2015 01:00:07 +0000 (01:00 +0000)]
ES6: Iterator toString names should be consistent
https://bugs.webkit.org/show_bug.cgi?id=142424

Reviewed by Geoffrey Garen.

Iterator Object Names in the spec right now have spaces.
In our implementation some do and some don't.
This patch aligns JSC to the spec.

* runtime/JSArrayIterator.cpp:
* runtime/JSStringIterator.cpp:
* tests/stress/iterator-names.js: Added.
(test):
(iter):
(check):

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

5 years agoWeb Inspector: Fix Console Message Toggle
joepeck@webkit.org [Sat, 11 Apr 2015 00:50:42 +0000 (00:50 +0000)]
Web Inspector: Fix Console Message Toggle

Unreviewed. Correct a post-review comment fix that went too far.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype.set expandable):
The handler needed to be bound to the object.

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

5 years agoWeb Inspector: Fix Console Filter Search, Uncaught Exception
joepeck@webkit.org [Sat, 11 Apr 2015 00:46:51 +0000 (00:46 +0000)]
Web Inspector: Fix Console Filter Search, Uncaught Exception

Rubber-stamped by Timothy Hatcher.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._performSearch):
This regressed with recent refactoring. Fix up the property and class names.

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

5 years agoWeb Inspector: Improve Console Message Formatting
joepeck@webkit.org [Sat, 11 Apr 2015 00:40:17 +0000 (00:40 +0000)]
Web Inspector: Improve Console Message Formatting
https://bugs.webkit.org/show_bug.cgi?id=143623

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
Misc.

* UserInterface/Views/ConsoleMessageView.css: Added.
(.console-message.expandable .console-top-level-message::before):
(.console-message.expandable.expanded .console-top-level-message::before):
(.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider)):
(.console-message-preview-divider):
(.console-message-enclosed):
(.console-message .console-message-stack-trace-container):
(.console-message.expandable.expanded .console-message-stack-trace-container):
(.console-message .console-message-stack-trace-container > li):
(.console-message .console-message-extra-parameters-container > li::before):
New styles for the new ConsoleMessageView children.
Handle console message expansion, a list of extra parameters
and a potential list of stack frames.

(.console-message, .console-user-command):
(.console-message .repeat-count):
(.console-message-text):
(.console-message-text > span):
(.console-error-level):
(.console-error-level .console-message-text):
(.console-debug-level .console-message-text):
(.console-warning-level):
(.console-warning-level .console-message-text):
(.console-user-command .console-message):
(.console-error-level::before):
(.console-warning-level::before):
(.console-user-command::before):
(.console-debug-level::before):
(:matches(.console-warning-level, .console-error-level, .console-log-level).console-message):
(:matches(.console-warning-level, .console-error-level, .console-log-level)::before):
(.console-user-command > .console-message-text):
(.console-message-url):
(.console-saved-variable):
(.console-user-command-result):
(.console-user-command-result.console-log-level::before):
Moved from LogContentView.css to here where it is more appropriate
since ConsoleMessageView added them.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
(WebInspector.ConsoleMessageView.prototype.get expandable):
(WebInspector.ConsoleMessageView.set expandable.this._boundExpandClickHandler):
(WebInspector.ConsoleMessageView.prototype.set expandable):
(WebInspector.ConsoleMessageView.prototype.expand):
(WebInspector.ConsoleMessageView.prototype.collapse):
(WebInspector.ConsoleMessageView.prototype.toggle):
Provide high level constructs for making a ConsoleMessageView
expandable, and APIs to expand/collapse.

(WebInspector.ConsoleMessageView.prototype._appendExtraParameters):
Add and style the new list of extra parameters.

(WebInspector.ConsoleMessageView.prototype._appendStackTrace):
Add and style the new list stack frames.

(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
(WebInspector.ConsoleMessageView.prototype._shouldConsiderObjectLossless):
Handling the top level message text line for all the different cases.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._startEditingTarget):
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline .add-attribute): Deleted.
CSS class .add-attribute was not used. Remove all references.

(.webkit-html-fragment.shadow):
Moved from LogContentView.css to a more appropriate place.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForRemoteObject):
Helper to create a preview or a formatted value for a given object.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._updateMessagesSelection):
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed.else.outlineTitle.treeElement.onexpand): Deleted.
(WebInspector.LogContentView.prototype._propertiesSectionDidUpdateContent): Deleted.
Lots of this code no longer makes sense. Delete some and put FIXMEs
where it makes sense to re-add back useful features.

* UserInterface/Views/ObjectPreviewView.css:
(.object-preview > .size):
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-value .object-tree): Deleted.
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
Tweak styles. Opacity instead of a specific gray to better work
with other colors. Always make objects be inline-block.

* UserInterface/Views/LogContentView.css:
(.console-error-level + .console-item):
(.console-warning-level + .console-item):
(.console-item::before):
(.console-user-command-result): Deleted.
(.console-user-command-result.console-log-level::before): Deleted.
(.console-message, .console-user-command): Deleted.
(.console-message .repeat-count): Deleted.
(.console-message-text): Deleted.
(.console-message-text > span): Deleted.
(.console-error-level): Deleted.
(.console-error-level .section .header .title): Deleted.
(.console-debug-level .console-message-text): Deleted.
(.console-debug-level::before): Deleted.
(.console-error-level::before): Deleted.
(.console-warning-level): Deleted.
(.console-warning-level .console-message-text): Deleted.
(.console-warning-level::before): Deleted.
(.console-user-command .console-message): Deleted.
(.console-user-command::before): Deleted.
(:matches(.console-warning-level, .console-error-level, .console-log-level).console-message): Deleted.
(:matches(.console-warning-level, .console-error-level, .console-log-level)::before): Deleted.
(.console-user-command > .console-message-text): Deleted.
(.console-saved-variable): Deleted.
(.console-message-url): Deleted.
(.console-group-messages .section): Deleted.
(.console-group-messages .section .header): Deleted.
(.console-group-messages .section .header::before): Deleted.
(.console-group-messages .section .header .title): Deleted.
(.console-group-messages .section .properties li .info): Deleted.
(.console-group-messages .outline-disclosure): Deleted.
(.console-group-messages .outline-disclosure > ol): Deleted.
(.console-group-messages .outline-disclosure li .selection): Deleted.
(.console-group-messages .add-attribute): Deleted.
(.error-message): Deleted.
(.auto-complete-text, .editing .auto-complete-text): Deleted.
(.outline-disclosure li.hovered:not(.selected) .selection): Deleted.
(.outline-disclosure li.highlighted .highlight): Deleted.
(.outline-disclosure li.selected.highlighted .highlight): Deleted.
(.outline-disclosure li .selection): Deleted.
(.outline-disclosure li.selected .selection): Deleted.
(.outline-disclosure li.elements-drag-over .selection): Deleted.
(.outline-disclosure ol:focus li.selected .selection): Deleted.
(.outline-disclosure ol.search-match-not-found li.selected .selection): Deleted.
(.outline-disclosure > ol): Deleted.
(.outline-disclosure, .outline-disclosure ol): Deleted.
(.outline-disclosure li): Deleted.
(.outline-disclosure .expanded li): Deleted.
(.outline-disclosure > li.parent): Deleted.
(.outline-disclosure li .webkit-html-tag.close): Deleted.
(.outline-disclosure > li.parent::before): Deleted.
(.outline-disclosure li.parent.expanded::before): Deleted.
(.outline-disclosure ol.children): Deleted.
(.outline-disclosure ol.children.expanded): Deleted.
(.webkit-html-fragment.shadow): Deleted.
Delete now unused styles and move other styles to more appropriate places.

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

5 years agoREGRESSION (182567): regress/script-tests/sorting-benchmark.js fails on 32 bit dfg...
msaboff@apple.com [Sat, 11 Apr 2015 00:00:38 +0000 (00:00 +0000)]
REGRESSION (182567): regress/script-tests/sorting-benchmark.js fails on 32 bit dfg-eager tests
https://bugs.webkit.org/show_bug.cgi?id=143582

Reviewed by Mark Lam.

For 32 bit builds, we favor spilling unboxed values.  The ASSERT at the root of this bug doesn't
fire for 64 bit builds, because we spill an "Other" value as a full JS value (DataFormatJS).
For 32 bit builds however, if we are able, we spill Other values as JSCell* (DataFormatCell).
The fix is to add a check in fillSpeculateInt32Internal() before the ASSERT that always OSR exits
if the spillFormat is DataFormatCell.  Had we spilled in DataFormatJS and the value was a JSCell*,
we would still OSR exit after the speculation check.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode): Fixed an error in a comment while debugging.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):

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

5 years agoUnreviewed, added CSS Shapes to features.json file.
bjonesbe@adobe.com [Fri, 10 Apr 2015 22:09:50 +0000 (22:09 +0000)]
Unreviewed, added CSS Shapes to features.json file.

* features.json:

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

5 years agoMake the analysis page more useful
rniwa@webkit.org [Fri, 10 Apr 2015 21:04:22 +0000 (21:04 +0000)]
Make the analysis page more useful
https://bugs.webkit.org/show_bug.cgi?id=143617

Reviewed by Chris Dumez.

* public/api/analysis-tasks.php:
(fetch_and_push_bugs_to_tasks): Added total and finished numbers of build requests associated
with the fetched analysis tasks as buildRequestCount and finishedBuildRequestCount respectively.
* public/v2/analysis.js:
(App.AnalysisTask.formattedCreatedAt): Added.
(App.AnalysisTask._addLeadingZero): Added.
(App.AnalysisTask.buildRequestCount): Added.
(App.AnalysisTask.finishedBuildRequestCount): Added.
(App.AnalysisTask.statusLabel): Added. Status total and finished numbers of build requests.
(App.AnalysisTask.testGroups):
(App.AnalysisTask.triggerable):
(App.AnalysisTask.label):

* public/v2/app.css: Tweaked style rules for the analysis page.

* public/v2/app.js:
(App.buildPopup): Sort the list of platforms by name.
(App.AnalysisRoute.model): Sort the list of analysis tasks by the order they are created.
(App.AnalysisTaskController._fetchedManifest): Added elementId to associate bug tracker names
such as "Bugzilla" with the corresponding text field.

* public/v2/index.html: Added a bunch of columns to the analysis page and also wrapped the table
showing A/B testing results in a div with overflow: scroll so that it always leaves enough space
for the accompanying graph.

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

5 years agoReplace setFixedLayoutSizeEnabled: with an enum of layout modes
timothy_horton@apple.com [Fri, 10 Apr 2015 20:22:38 +0000 (20:22 +0000)]
Replace setFixedLayoutSizeEnabled: with an enum of layout modes
https://bugs.webkit.org/show_bug.cgi?id=143576

Reviewed by Simon Fraser.

* UIProcess/API/C/WKLayoutMode.h: Added.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _layoutMode]):
(-[WKWebView _setLayoutMode:]):
(-[WKWebView _isFixedLayoutEnabled]): Deleted.
(-[WKWebView _setFixedLayoutEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKLayoutMode.h: Added.
* UIProcess/API/mac/WKView.mm:
(-[WKView _layoutMode]):
(-[WKView _setLayoutMode:]):
(-[WKView _isFixedLayoutEnabled]): Deleted.
(-[WKView _setFixedLayoutEnabled:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Add enums for "layout mode". Currently we have two values: "ViewSize",
which is the normal behavior, and "FixedSize", which is fixed layout mode.
More values will come in the future.

* TestWebKitAPI/Tests/WebKit2Cocoa/FixedLayoutSize.mm:
(TEST):
Adopt.

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

5 years ago_WKWebsiteDataStore doesn't track and remove offline application cache entries
andersca@apple.com [Fri, 10 Apr 2015 19:39:57 +0000 (19:39 +0000)]
_WKWebsiteDataStore doesn't track and remove offline application cache entries
https://bugs.webkit.org/show_bug.cgi?id=143614
rdar://problem/20243235

Reviewed by Andreas Kling.

* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeOfflineWebApplicationCache.

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
Add WKWebsiteDataTypeOfflineWebApplicationCache.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Create a custom application cache storage and fetch the origins from it.

(WebKit::WebsiteDataStore::removeData):
Delete either all the cache entries (since we don't track time in the application cache),
or the ones specified by the given entries.

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

5 years agoBuild fix.
ap@apple.com [Fri, 10 Apr 2015 19:09:14 +0000 (19:09 +0000)]
Build fix.

* Misc/WebNSURLExtras.mm: (-[NSString _webkit_unescapedQueryValue]): Ignore a deprecation.

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

5 years ago[Content Filtering] Support modifying request URLs
aestes@apple.com [Fri, 10 Apr 2015 19:00:31 +0000 (19:00 +0000)]
[Content Filtering] Support modifying request URLs
https://bugs.webkit.org/show_bug.cgi?id=143599
rdar://problem/20442560

Reviewed by Darin Adler.

Source/WebCore:

Tests: contentfiltering/modify-request-url.html
       http/tests/contentfiltering/modify-redirect-request-url.html

Allow NEFilterSource to modifiy request URLs. Also teach MockContentFilter to do the same for testing.

* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::willSendRequest): If NEFilterSource provided a string representing a
valid URL in decisionInfo[NEFilterSourceOptionsRedirectURL], then used that as the request URL.
* platform/spi/cocoa/NEFilterSourceSPI.h: Temporarily defined NEFilterSourceOptionsRedirectURL.
* testing/MockContentFilter.cpp:
(WebCore::MockContentFilter::willSendRequest): If settings() has a valid modifiedRequestURL, use it as the
request URL. Only do so once MockContentFilter has reached its decision point so that both initial requests and
redirect requests can be tested.
* testing/MockContentFilterSettings.h: Added modifiedRequestURL.
(WebCore::MockContentFilterSettings::modifiedRequestURL): Ditto.
(WebCore::MockContentFilterSettings::setModifiedRequestURL): Ditto.
* testing/MockContentFilterSettings.idl: Ditto.

LayoutTests:

* contentfiltering/allow-after-add-data-expected.html: Changed to use pass.html.
* contentfiltering/allow-after-finished-adding-data-expected.html: Ditto.
* contentfiltering/allow-after-response-expected.html: Ditto.
* contentfiltering/allow-after-will-send-request-expected.html: Ditto.
* contentfiltering/block-after-add-data-expected.html: Ditto.
* contentfiltering/block-after-add-data-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-add-data-then-deny-unblock-expected.html: Ditto.
* contentfiltering/block-after-finished-adding-data-expected.html: Ditto.
* contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.html: Ditto.
* contentfiltering/block-after-response-expected.html: Ditto.
* contentfiltering/block-after-response-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-response-then-deny-unblock-expected.html: Ditto.
* contentfiltering/block-after-will-send-request-expected.html: Ditto.
* contentfiltering/block-after-will-send-request-then-allow-unblock-expected.html: Ditto.
* contentfiltering/block-after-will-send-request-then-deny-unblock-expected.html: Ditto.
* contentfiltering/modify-request-url-expected.html: Added.
* contentfiltering/modify-request-url.html: Added.
* contentfiltering/resources/fail.html: Added.
* contentfiltering/resources/pass.html: Added.
* http/tests/contentfiltering/allow-after-redirect-expected.html: Removed the body tag.
* http/tests/contentfiltering/block-after-redirect-expected.html: Ditto.
* http/tests/contentfiltering/modify-redirect-request-url-expected.html: Added.
* http/tests/contentfiltering/modify-redirect-request-url.html: Added.

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

5 years agoDisable Linux-specific code in a Windows build
commit-queue@webkit.org [Fri, 10 Apr 2015 18:55:54 +0000 (18:55 +0000)]
Disable Linux-specific code in a Windows build
https://bugs.webkit.org/show_bug.cgi?id=137973

Patch by Milan Crha <mcrha@redhat.com> on 2015-04-10
Reviewed by Joseph Pecoraro.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):

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

5 years ago[Win] Layout Test fast/backgrounds/selection-background-color-of-list-style.html...
changseok.oh@collabora.com [Fri, 10 Apr 2015 18:14:52 +0000 (18:14 +0000)]
[Win] Layout Test fast/backgrounds/selection-background-color-of-list-style.html is failing
https://bugs.webkit.org/show_bug.cgi?id=143543

Reviewed by Brent Fulgham.

Added missing test results after r182546 for windows.

* platform/win/TestExpectations:
* platform/win/fast/backgrounds/selection-background-color-of-image-list-style-expected.png: Added.
* platform/win/fast/backgrounds/selection-background-color-of-image-list-style-expected.txt: Added.
* platform/win/fast/backgrounds/selection-background-color-of-list-style-expected.png: Added.
* platform/win/fast/backgrounds/selection-background-color-of-list-style-expected.txt: Added.

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

5 years ago[ARM] Fix calleeSaveRegisters() on non iOS platforms after r180516
ossy@webkit.org [Fri, 10 Apr 2015 18:11:14 +0000 (18:11 +0000)]
[ARM] Fix calleeSaveRegisters() on non iOS platforms after r180516
https://bugs.webkit.org/show_bug.cgi?id=143368

Reviewed by Michael Saboff.

* jit/RegisterSet.cpp:
(JSC::RegisterSet::calleeSaveRegisters):

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

5 years agoshowRenderTree: Include the render object to the inlinebox output.
zalan@apple.com [Fri, 10 Apr 2015 18:07:31 +0000 (18:07 +0000)]
showRenderTree: Include the render object to the inlinebox output.
https://bugs.webkit.org/show_bug.cgi?id=143610

This helps to match the inlinebox and its renderer.

Reviewed by Antti Koivisto.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::showLineBox):

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

5 years ago[Win] Implement some methods in DOMHTMLDocument interface.
peavo@outlook.com [Fri, 10 Apr 2015 18:07:05 +0000 (18:07 +0000)]
[Win] Implement some methods in DOMHTMLDocument interface.
https://bugs.webkit.org/show_bug.cgi?id=143602

Reviewed by Alex Christensen.

* DOMHTMLClasses.cpp:
(DOMHTMLDocument::open):
(DOMHTMLDocument::close):
(DOMHTMLDocument::write):
(DOMHTMLDocument::writeln):

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

5 years agoUpdate wireless player placard for OSX.
roger_fong@apple.com [Fri, 10 Apr 2015 17:22:51 +0000 (17:22 +0000)]
Update wireless player placard for OSX.
https://bugs.webkit.org/show_bug.cgi?id=143585.
<rdar://problem/12067439>

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.css:
Adjust button positioning and svg.
(audio::-webkit-media-controls-wireless-playback-picker-button):
(audio::-webkit-media-controls-wireless-playback-picker-button.playing):
Style the wireless playback status placard, small and big versions.
(audio::-webkit-media-controls-wireless-playback-status):
(audio::-webkit-media-controls-wireless-playback-text):
(audio::-webkit-media-controls-wireless-playback-text-top):
(audio::-webkit-media-controls-wireless-playback-text-bottom):
(audio::-webkit-media-controls-wireless-playback-status.small):
(audio::-webkit-media-controls-wireless-playback-text-top.small):
(audio::-webkit-media-controls-wireless-playback-text-bottom.small):
* Modules/mediacontrols/mediaControlsApple.js:
Add new wireless player placard elements.
(Controller.prototype.createControls):
(Controller.prototype.configureInlineControls):
Make sure to switch between small and big placards when switching between fullscreen and small videos.
(Controller.prototype.configureFullScreenControls):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.updateWirelessPlaybackStatus):

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

5 years ago[Mac] Refactor MediaPlaybackTarget
eric.carlson@apple.com [Fri, 10 Apr 2015 14:31:48 +0000 (14:31 +0000)]
[Mac] Refactor MediaPlaybackTarget
https://bugs.webkit.org/show_bug.cgi?id=143571

Reviewed by Jer Noble.

Source/WebCore/:

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::addPlaybackTargetPickerClient): Don't call client if page playback target
    is NULL.
(WebCore::Document::didChoosePlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
* dom/Document.h:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setWirelessPlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
* html/HTMLMediaElement.h:

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::HTMLMediaSession): Don't initialize m_playbackTarget.
(WebCore::HTMLMediaSession::didChoosePlaybackTarget): MediaPlaybackTarget is passed as a Ref<>
* html/HTMLMediaSession.h:

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::playbackTarget): m_playbackTarget is a RefPtr<MediaPlaybackTarget>
(WebCore::Page::didChoosePlaybackTarget): Ditto.
* page/Page.h:

* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::setWirelessPlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.

Make MediaPlaybackTarget RefCounted, and don't require it to be serializable so it can be
subclassed to keep port-specific iformation out of the base class.
* platform/graphics/MediaPlaybackTarget.h:
(WebCore::MediaPlaybackTarget::targetType):
(WebCore::MediaPlaybackTarget::targetContext):
(WebCore::MediaPlaybackTarget::hasActiveRoute):
(WebCore::MediaPlaybackTarget::MediaPlaybackTarget):
(WebCore::MediaPlaybackTarget::setDevicePickerContext): Deleted.
(WebCore::MediaPlaybackTarget::devicePickerContext): Deleted.

MediaPlaybackTargetContext is the struct that is serialized to pass across the process boudary.
It has union to hold port-specific data.
* platform/graphics/MediaPlaybackTargetContext.h: Added.

* platform/graphics/MediaPlaybackTargetPicker.h: didChoosePlaybackTarget takes a Ref<MediaPlaybackTarget>&&
* platform/graphics/MediaPlaybackTargetPickerClient.h: Ditto.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setWirelessPlaybackTarget): Ditto.
* platform/graphics/MediaPlayer.h:

* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):

* platform/graphics/avfoundation/MediaPlaybackTargetMac.h: Added.
(WebCore::MediaPlaybackTargetMac::targetType):
(WebCore::MediaPlaybackTargetMac::outputContext):
* platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
(WebCore::MediaPlaybackTargetMac::create):
(WebCore::MediaPlaybackTargetMac::MediaPlaybackTargetMac):
(WebCore::MediaPlaybackTargetMac::~MediaPlaybackTargetMac):
(WebCore::MediaPlaybackTargetMac::targetContext):
(WebCore::MediaPlaybackTargetMac::hasActiveRoute):
(WebCore::toMediaPlaybackTargetMac):
(WebCore::MediaPlaybackTarget::encode): Deleted.
(WebCore::MediaPlaybackTarget::decode): Deleted.
(WebCore::MediaPlaybackTarget::hasActiveRoute): Deleted.

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Allocate and pass a MediaPlaybackTargetMac
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Take a Ref<MediaPlaybackTarget&&

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget): Ditto.

* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setWirelessPlaybackTarget): Ditto.

Source/WebKit2:

Pass a MediaPlaybackTargetContext across process boundary instead of a MediaPlaybackTarget.
* Shared/WebCoreArgumentCoders.h:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): New.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): New.
* Shared/mac/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): New.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): New.
(IPC::ArgumentCoder<MediaPlaybackTarget>::encode): Deleted.
(IPC::ArgumentCoder<MediaPlaybackTarget>::decode): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected): Take a Ref<MediaPlaybackTarget>&&.

Source/WebKit/mac/:

* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::didChoosePlaybackTarget): Take a Ref<MediaPlaybackTarget>&&.

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

5 years agoAdd total test test of Streams API
calvaris@igalia.com [Fri, 10 Apr 2015 11:20:19 +0000 (11:20 +0000)]
Add total test test of Streams API
https://bugs.webkit.org/show_bug.cgi?id=142682

Unreviewed.

Increased the callbacks timeouts to make tests pass in slower bots
like Yosemite Debug.

* streams/reference-implementation/resources/streams-utils.js:
Created a standardTimeout variable with 100 as default.
* streams/reference-implementation/readable-stream-cancel.html:
* streams/reference-implementation/readable-stream-reader.html:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/readable-stream.html: Used
standardTimeout for the test timeout callbacks.

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

5 years ago[CSS Grid Layout] Fix raw function pointer usages
svillar@igalia.com [Fri, 10 Apr 2015 10:51:01 +0000 (10:51 +0000)]
[CSS Grid Layout] Fix raw function pointer usages
https://bugs.webkit.org/show_bug.cgi?id=143481

Reviewed by Antti Koivisto.

The argument list of
resolveContentBasedTrackSizingFunctionsForItems() became too long
and rather incomprehensible as it included up to 6 function
pointers. This replaces all of them by an enum which describes the
phase of the algorithm that is currently running. With that phase
we have enough information to select the right function to call.

In order not to tangle up too much the method, the new explicit
switch statements where moved to static helper functions.

No new tests as this is just a code refactoring.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::trackSizeForTrackSizeComputationPhase): New helper function.
(WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::trackShouldGrowBeyondGrowthLimitsForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::updateTrackSizeForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase): Ditto.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::distributeSpaceToTracks):
* rendering/RenderGrid.h:

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

5 years agoWebRTC: Remove AudioStreamTrack and VideoStreamTrack (removed in spec)
adam.bergkvist@ericsson.com [Fri, 10 Apr 2015 10:48:47 +0000 (10:48 +0000)]
WebRTC: Remove AudioStreamTrack and VideoStreamTrack (removed in spec)
https://bugs.webkit.org/show_bug.cgi?id=143336

Reviewed by Philippe Normand.

The specific MediaStreamTrakc types (AudioStreamTrack and VideoStreamTrack) have been
removed from the Media Capture and Streams [1] specification.

[1] http://w3c.github.io/mediacapture-main/archives/20150324/getusermedia.html

There are no test for this feature to remove.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/AudioStreamTrack.cpp: Removed.
* Modules/mediastream/AudioStreamTrack.h: Removed.
* Modules/mediastream/AudioStreamTrack.idl: Removed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::active): Deleted.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::create):
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::kind):
(WebCore::MediaStreamTrack::clone):
(WebCore::MediaStreamTrack::trackEnded): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/VideoStreamTrack.cpp: Removed.
* Modules/mediastream/VideoStreamTrack.h: Removed.
* Modules/mediastream/VideoStreamTrack.idl: Removed.
* WebCore.xcodeproj/project.pbxproj:

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

5 years agoFix some minor typos related to the WebProcessCreationParameter.
commit-queue@webkit.org [Fri, 10 Apr 2015 09:23:43 +0000 (09:23 +0000)]
Fix some minor typos related to the WebProcessCreationParameter.
https://bugs.webkit.org/show_bug.cgi?id=143598

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-10
Reviewed by Csaba Osztrogonác.

No new tests, no behavior change.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

5 years agoAdd total test test of Streams API
youenn.fablet@crf.canon.fr [Fri, 10 Apr 2015 09:00:08 +0000 (09:00 +0000)]
Add total test test of Streams API
https://bugs.webkit.org/show_bug.cgi?id=142682

Reviewed by Benjamin Poulain.

This is the full test set that we have for the implementation of
Streams API. When we add more features/code the number of passing
tests will increase.

We have the tests translated from the reference implementation at
streams/reference-implementation and our own tests for some other
things at the streams upper level.

We removed testharness stacktrace in case of failure because it
dumps the filenames with paths. You can activate it for a specific
test by setting its dumpStack attribute to true.

All our former custom tests were integrated in the spec so we they
are now in their appropriate places in the reference
implementation ones. Some of them were changed to match the actual
spec and they are failing now, but we only have to progressively
fix them.

* resources/testharnessreport.js: Avoid printing the stack in case
of test failure to be able to have failing tests as expected
unless commanded otherwise.
* streams/readablestream-constructor-expected.txt: Removed.
* streams/readablestream-constructor.html: Removed.
* streams/readablestream-start-expected.txt: Removed.
* streams/readablestream-start.html: Removed.
* streams/readablestreamreader-constructor-expected.txt: Removed.
* streams/readablestreamreader-constructor.html: Removed.
* streams/reference-implementation/bad-underlying-sources-expected.txt: Added.
* streams/reference-implementation/bad-underlying-sources.html: Added.
* streams/reference-implementation/brand-checks-expected.txt: Added.
* streams/reference-implementation/brand-checks.html: Added.
* streams/reference-implementation/count-queuing-strategy-expected.txt: Added.
* streams/reference-implementation/count-queuing-strategy.html: Added.
* streams/reference-implementation/readable-stream-cancel-expected.txt: Added.
* streams/reference-implementation/readable-stream-cancel.html: Added.
* streams/reference-implementation/readable-stream-expected.txt: Added.
* streams/reference-implementation/readable-stream-reader-expected.txt: Added.
* streams/reference-implementation/readable-stream-reader.html: Added.
* streams/reference-implementation/readable-stream-templated-expected.txt: Added.
* streams/reference-implementation/readable-stream-templated.html: Added.
* streams/reference-implementation/readable-stream.html: Added.
* streams/reference-implementation/resources/byte-length-queuing-strategy.js: Added.
* streams/reference-implementation/resources/count-queuing-strategy.js: Added.
* streams/reference-implementation/resources/streams-utils.js: Added.

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

5 years ago[CMake] Remove unnecessary ENABLE_WEBCORE switch
gyuyoung.kim@webkit.org [Fri, 10 Apr 2015 08:36:50 +0000 (08:36 +0000)]
[CMake] Remove unnecessary ENABLE_WEBCORE switch
https://bugs.webkit.org/show_bug.cgi?id=143584

Reviewed by Csaba Osztrogonác.

WebCore should be built for all ports. So ENABLE_WEBCORE switch looks be redundant.
Remove it.

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFS.cmake:

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

5 years ago[Cocoa] Add a HAVE(AVKIT) and use it
aestes@apple.com [Fri, 10 Apr 2015 08:33:41 +0000 (08:33 +0000)]
[Cocoa] Add a HAVE(AVKIT) and use it
https://bugs.webkit.org/show_bug.cgi?id=143593

Reviewed by David Kilzer.

Source/WebCore:

* page/Settings.h: Only defined setAVKitEnabled() if HAVE(AVKIT).
* platform/ios/WebVideoFullscreenControllerAVKit.mm: Only compiled if HAVE(AVKIT).
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Ditto.

Source/WebKit/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Only set WebKitAVKitEnabled to YES if HAVE(AVKIT).
(-[WebPreferences setAVKitEnabled:]): Only set value for WebKitAVKitEnabled if HAVE(AVKIT).
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Only called Settings::setAVKitEnabled() if HAVE(AVKIT).

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _mayAutomaticallyShowVideoOptimized]): Returned false if !HAVE(AVKIT).
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Removed the check for < iOS 8.2.
(WebKit::WebPageProxy::reattachToWebProcess): Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::create): Created a version of this function that returns nullptr if
the minimum required version of iOS is less than 8.2 or if !HAVE(AVKIT).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Only called Settings::setAVKitEnabled(true) if HAVE(AVKIT).

Source/WTF:

* wtf/Platform.h: Defined HAVE(AVKIT) to be true on all Cocoa platforms except Watch OS.

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

5 years agoUse modern loops in WebProcess
commit-queue@webkit.org [Fri, 10 Apr 2015 06:07:56 +0000 (06:07 +0000)]
Use modern loops in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=143302

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-09
Reviewed by Darin Adler.

Use modern range for-loops in WebProcess.

No new tests, no behavior change.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::focusedWebPage):
(WebKit::WebProcess::webPageGroup):
(WebKit::WebProcess::setTextCheckerState):
(WebKit::WebProcess::resetAllGeolocationPermissions):

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

5 years agoSome CSS3 filters tests crash under iOS testing
simon.fraser@apple.com [Fri, 10 Apr 2015 05:21:14 +0000 (05:21 +0000)]
Some CSS3 filters tests crash under iOS testing
https://bugs.webkit.org/show_bug.cgi?id=143594
rdar://problem/20491140

Reviewed by David Kilzer.

Some tests disable accelerated compositing via testRunner.overridePreference(). In this case,
we'd not create a root scrolling tree node, so null-check it in AsyncScrollingCoordinator::updateNonFastScrollableRegion().

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):

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