WebKit-https.git
4 years agoShould remove mouseForceClick and mouseForceCancelled from DOM force events
bdakin@apple.com [Mon, 20 Apr 2015 19:03:00 +0000 (19:03 +0000)]
Should remove mouseForceClick and mouseForceCancelled from DOM force events
https://bugs.webkit.org/show_bug.cgi?id=143904
-and corresponding-
rdar://problem/20578842

Reviewed by Dan Bernstein.

Source/WebCore:

After more thought and discussion, we decided to remove mouseForceClick and
mouseForceCancelled from DOM force events. mouseForceClick is confusing and
redundant. mouseForceCancelled is confusing as it is currently implemented, and
all of its functionality can be filled by exisiting events such as mouseup,
mouseout, etc.

* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded):
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::dispatchMouseForceWillBegin):
(WebCore::Element::dispatchMouseForceClick): Deleted.
(WebCore::Element::dispatchMouseForceCancelled): Deleted.
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* html/HTMLAttributeNames.in:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
* html/HTMLBodyElement.idl:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createEventHandlerNameMap):
* page/DOMWindow.idl:

Source/WebKit2:

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::immediateActionDidCancel):

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

4 years agoFix content extension test flakiness.
achristensen@apple.com [Mon, 20 Apr 2015 18:48:41 +0000 (18:48 +0000)]
Fix content extension test flakiness.
https://bugs.webkit.org/show_bug.cgi?id=143950

Reviewed by Brady Eidson.

Tools:

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
Remove the TestContentExtensions if it exists.
(WTR::TestController::platformConfigureViewForTest):
Log errors in case there are any.

LayoutTests:

* platform/mac-wk2/TestExpectations:
Mark contentextensions tests as not flaky any more.

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

4 years agoImplement immediate action support for tel: and mailto: URLs
timothy_horton@apple.com [Mon, 20 Apr 2015 18:46:33 +0000 (18:46 +0000)]
Implement immediate action support for tel: and mailto: URLs
https://bugs.webkit.org/show_bug.cgi?id=143916
<rdar://problem/19721711>

Reviewed by Darin Adler.

* Shared/API/c/WKImmediateActionTypes.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
Add _animationControllerForDataDetectedLink and use it when
building immediate actions for tel: and mailto: links.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
(-[WebImmediateActionController _menuItemForDataDetectedText]): Deleted.
* WebView/WebUIDelegatePrivate.h:
Add _animationControllerForDataDetectedLink and use it when
building immediate actions for tel: and mailto: links.

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

4 years agoShould not list these tests twice.
bdakin@apple.com [Mon, 20 Apr 2015 18:45:11 +0000 (18:45 +0000)]
Should not list these tests twice.

* platform/mac-wk2/TestExpectations:

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

4 years agoSetting inline style to the same value it already has triggers a style recalc
simon.fraser@apple.com [Mon, 20 Apr 2015 18:31:45 +0000 (18:31 +0000)]
Setting inline style to the same value it already has triggers a style recalc
https://bugs.webkit.org/show_bug.cgi?id=143922

Reviewed by Antti Koivisto.

Source/WebCore:

MutableStyleProperties::setProperty() was taking the result of CSSParser::parseValue()
to mean "parsing changed the style", but it actually just means "parsing succeeded".
Add a new out param, piped through various parser functions, to indicate whether
parsing actually changed style, and instead return that from setProperty().

Add internals.startTrackingStyleRecalcs() and internals.styleRecalcCount() so
we can write tests for style recalc.

Test: fast/css/set-inline-style-recalc.html

* WebCore.xcodeproj/project.pbxproj: Let Xcode have it's way.
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::parseKeywordValue):
(WebCore::parseTranslateTransformValue):
(WebCore::CSSParser::parseFontFaceValue):
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
* css/CSSProperty.h:
(WebCore::StylePropertyMetadata::operator==):
(WebCore::CSSProperty::operator==):
* css/DOMWindowCSS.cpp:
(WebCore::DOMWindowCSS::supports):
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::setProperty):
(WebCore::MutableStyleProperties::appendPrefixingVariantProperty):
(WebCore::MutableStyleProperties::addParsedProperties):
(WebCore::MutableStyleProperties::addParsedProperty):
* css/StyleProperties.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::startTrackingStyleRecalcs):
(WebCore::Document::styleRecalcCount):
* dom/Document.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* testing/Internals.cpp:
(WebCore::Internals::startTrackingStyleRecalcs):
(WebCore::Internals::styleRecalcCount):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Test that changes inline-style (to test this bug fix), and classes (for
proactive testing) and counts style recalcs.

* fast/css/set-inline-style-recalc-expected.txt: Added.
* fast/css/set-inline-style-recalc.html: Added.

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

4 years agoCrash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
beidson@apple.com [Mon, 20 Apr 2015 17:14:33 +0000 (17:14 +0000)]
Crash in StyleResolver::invalidateMatchedPropertiesCache() when using content extensions.
<rdar://problem/20554405> and https://bugs.webkit.org/show_bug.cgi?id=143892

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/contentextensions/style-resolver-changed-reentrancy.html

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::addContentExtensionUserSheet): Call styleResolverChanged on a delay.
(WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Ditto.
(WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired):
* dom/DocumentStyleSheetCollection.h:

LayoutTests:

* http/tests/contentextensions/resources/woff-stylesheet.css: Added.
(@font-face):
* http/tests/contentextensions/style-resolver-changed-reentrancy-expected.txt: Added.
* http/tests/contentextensions/style-resolver-changed-reentrancy.html: Added.
* http/tests/contentextensions/style-resolver-changed-reentrancy.html.json: Added.
* http/tests/resources/Ahem.woff: Added.

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

4 years agoFavicons are not always loaded.
peavo@outlook.com [Mon, 20 Apr 2015 16:49:43 +0000 (16:49 +0000)]
Favicons are not always loaded.
https://bugs.webkit.org/show_bug.cgi?id=143880

Reviewed by Darin Adler.

Source/WebCore:

If the favicon link element(s) in the document does not have a mime type,
the favicon is loaded from the domain root (/favicon.ico). If no favicon
exists at this location, the favicon loading will fail. This can be solved
by not demanding that the link element has a mime type.

Test: fast/dom/icon-url-without-mimetype.html

* loader/icon/IconController.cpp:
(WebCore::iconFromLinkElements): Return the chosen icon URL instead of a vector of URLs.
(WebCore::IconController::url):
(WebCore::iconsFromLinkElements): Deleted.

LayoutTests:

Added new test for icon link elements without mime type.

* fast/dom/icon-url-without-mimetype-expected.txt: Added.
* fast/dom/icon-url-without-mimetype.html: Added.

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

4 years agoContentextensions tests are flaky
ap@apple.com [Mon, 20 Apr 2015 16:37:37 +0000 (16:37 +0000)]
Contentextensions tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=143950

* platform/mac-wk2/TestExpectations: Marking them as such.

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

4 years agoProperly report errors from _WKUserContentExtensionStore.
achristensen@apple.com [Mon, 20 Apr 2015 16:13:07 +0000 (16:13 +0000)]
Properly report errors from _WKUserContentExtensionStore.
https://bugs.webkit.org/show_bug.cgi?id=143808

Reviewed by Darin Adler.

Source/WebKit2:

* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:
(TEST_F):

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

4 years ago[CMake] Include ICU unconditionally on the source lists
mrobinson@webkit.org [Mon, 20 Apr 2015 15:23:45 +0000 (15:23 +0000)]
[CMake] Include ICU unconditionally on the source lists
https://bugs.webkit.org/show_bug.cgi?id=143900

Reviewed by Darin Adler.

No new tests. This is just a build file change.

* CMakeLists.txt: Integrate ICU source files, includes, and libraries into the main
sections. They are shared by all platforms.
* PlatformGTK.cmake: Eliminate build rules that are duplicated from the main CMakeLists.txt.

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

4 years agoAX: iOS: Text input field ignores value of read-only and aria-readonly attributes
cfleizach@apple.com [Mon, 20 Apr 2015 15:05:41 +0000 (15:05 +0000)]
AX: iOS: Text input field ignores value of read-only and aria-readonly attributes
https://bugs.webkit.org/show_bug.cgi?id=143946

Reviewed by Mario Sanchez Prada.

Expose an existing method for determining whether the value can be set to the iOS accessibility platform.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanSetValue]):

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

4 years ago[EFL] Unreviewed gardening
jinwoo7.song@samsung.com [Mon, 20 Apr 2015 10:48:32 +0000 (10:48 +0000)]
[EFL] Unreviewed gardening

Update test expectations for failing tests.

* platform/efl/fast/box-sizing/box-sizing-expected.png: Rebaseline after 176978.
* platform/efl/fast/box-sizing/box-sizing-expected.txt: Ditto.
* platform/efl/fast/css/image-rendering-expected.txt: Added. Rebaseline after r177774.
* platform/efl/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
Rebaseline after r173857.

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

4 years agoMerge TreeShared into Node.
akling@apple.com [Mon, 20 Apr 2015 09:18:26 +0000 (09:18 +0000)]
Merge TreeShared into Node.
<https://webkit.org/b/143942>

Reviewed by Darin Adler.

Node was the only remaining user of TreeShared, so just fold the class into Node.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/Node.cpp:
(WebCore::Node::Node):
(WebCore::Node::~Node):
* dom/Node.h:
(WebCore::Node::ref):
(WebCore::Node::deref):
(WebCore::Node::hasOneRef):
(WebCore::Node::refCount):
(WebCore::adopted):
(WebCore::Node::hasTreeSharedParent): Deleted.
* platform/TreeShared.h: Removed.

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

4 years ago[EFL] Unreviewed gardening
jinwoo7.song@samsung.com [Mon, 20 Apr 2015 08:31:04 +0000 (08:31 +0000)]
[EFL] Unreviewed gardening

Rebaseline after r177774.

* platform/efl/css2.1/t1508-c527-font-00-b-expected.txt: Added.

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

4 years agoAdd a rule for NetworkCache to watchlist file
commit-queue@webkit.org [Mon, 20 Apr 2015 08:29:09 +0000 (08:29 +0000)]
Add a rule for NetworkCache to watchlist file
https://bugs.webkit.org/show_bug.cgi?id=143945

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2015-04-20
Reviewed by Sergio Villar Senin.

And add myself to the list of watchers.

* Scripts/webkitpy/common/config/watchlist:

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

4 years agoImplement `Object.is`
commit-queue@webkit.org [Mon, 20 Apr 2015 07:05:41 +0000 (07:05 +0000)]
Implement `Object.is`
https://bugs.webkit.org/show_bug.cgi?id=143865

Patch by Jordan Harband <ljharb@gmail.com> on 2015-04-20
Reviewed by Darin Adler.

Source/JavaScriptCore:

Expose sameValue to JS, via Object.is
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.is

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorIs):
* runtime/PropertyDescriptor.cpp:
(JSC::sameValue):

LayoutTests:

* js/Object-getOwnPropertyNames-expected.txt:
* js/Object-is-expected.txt: Added.
* js/Object-is.html: Added.
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/Object-is.js: Added.

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

4 years agoRemove all the remaining uses of OwnPtr and PassOwnPtr in JavaScriptCore
darin@apple.com [Mon, 20 Apr 2015 06:05:26 +0000 (06:05 +0000)]
Remove all the remaining uses of OwnPtr and PassOwnPtr in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=143941

Reviewed by Gyuyoung Kim.

* API/JSCallbackObject.h: Use unique_ptr for m_callbackObjectData.
* API/JSCallbackObjectFunctions.h: Ditto.

* API/ObjCCallbackFunction.h: Use unique_ptr for the arguments to the
create function and the constructor and for m_impl.
* API/ObjCCallbackFunction.mm:
(CallbackArgumentOfClass::CallbackArgumentOfClass): Streamline this
class by using RetainPtr<Class>.
(ArgumentTypeDelegate::typeInteger): Use make_unique.
(ArgumentTypeDelegate::typeDouble): Ditto.
(ArgumentTypeDelegate::typeBool): Ditto.
(ArgumentTypeDelegate::typeVoid): Ditto.
(ArgumentTypeDelegate::typeId): Ditto.
(ArgumentTypeDelegate::typeOfClass): Ditto.
(ArgumentTypeDelegate::typeBlock): Ditto.
(ArgumentTypeDelegate::typeStruct): Ditto.
(ResultTypeDelegate::typeInteger): Ditto.
(ResultTypeDelegate::typeDouble): Ditto.
(ResultTypeDelegate::typeBool): Ditto.
(ResultTypeDelegate::typeVoid): Ditto.
(ResultTypeDelegate::typeId): Ditto.
(ResultTypeDelegate::typeOfClass): Ditto.
(ResultTypeDelegate::typeBlock): Ditto.
(ResultTypeDelegate::typeStruct): Ditto.
(JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl): Use
unique_ptr for the arguments to the constructor, m_arguments, and m_result.
Use RetainPtr<Class> for m_instanceClass.
(JSC::objCCallbackFunctionCallAsConstructor): Use nullptr instead of nil or 0
for non-Objective-C object pointer null.
(JSC::ObjCCallbackFunction::ObjCCallbackFunction): Use unique_ptr for
the arguments to the constructor and for m_impl.
(JSC::ObjCCallbackFunction::create): Use unique_ptr for arguments.
(skipNumber): Mark this static since it's local to this source file.
(objCCallbackFunctionForInvocation): Call parseObjCType without doing any
explicit adoptPtr since the types in the traits are now unique_ptr. Also use
nullptr instead of nil for JSObjectRef values.
(objCCallbackFunctionForMethod): Tweaked comment.
(objCCallbackFunctionForBlock): Use nullptr instead of 0 for JSObjectRef.

* bytecode/CallLinkInfo.h: Removed unneeded include of OwnPtr.h.

* heap/GCThread.cpp:
(JSC::GCThread::GCThread): Use unique_ptr.
* heap/GCThread.h: Use unique_ptr for arguments to the constructor and for
m_slotVisitor and m_copyVisitor.
* heap/GCThreadSharedData.cpp:
(JSC::GCThreadSharedData::GCThreadSharedData): Ditto.

* parser/SourceProvider.h: Removed unneeded include of PassOwnPtr.h.

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

4 years agoFixed a typo.
mitz@apple.com [Mon, 20 Apr 2015 04:47:25 +0000 (04:47 +0000)]
Fixed a typo.

* coding/RefPtr.html:

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

4 years agoUpdate RefPtr documentation and deprecation
darin@apple.com [Mon, 20 Apr 2015 04:42:39 +0000 (04:42 +0000)]
Update RefPtr documentation and deprecation
https://bugs.webkit.org/show_bug.cgi?id=143936

Reviewed by Andreas Kling.

Source/WTF:

* WTF.vcxproj/WTF.vcxproj: Removed PassRef.h
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.

Tools:

* Scripts/do-webcore-rename: Put in some DeprecatedPassRefPtr renames.

Websites/webkit.org:

* coding/RefPtr.html: Updated.

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

4 years agoImprove the feature.json files
benjamin@webkit.org [Mon, 20 Apr 2015 03:54:06 +0000 (03:54 +0000)]
Improve the feature.json files

* features.json:

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

4 years agoIntroduce bytecode intrinsics
utatane.tea@gmail.com [Mon, 20 Apr 2015 01:45:50 +0000 (01:45 +0000)]
Introduce bytecode intrinsics
https://bugs.webkit.org/show_bug.cgi?id=143926

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch introduces bytecode level intrinsics into builtins/*.js JS code.
When implementing functions in builtins/*.js,
sometimes we require lower level functionality.

For example, in the current Array.from, we use `result[k] = value`.
The spec requires `[[DefineOwnProperty]]` operation here.
However, usual `result[k] = value` is evaluated as `[[Set]]`. (`PutValue` => `[[Set]]`)
So if we implement `Array.prototype[k]` getter/setter, the difference is observable.

Ideally, reaching here, we would like to use put_by_val_direct bytecode.
However, there's no syntax to generate it directly.

This patch introduces bytecode level intrinsics into JSC BytecodeCompiler.
Like @call, @apply, we introduce a new node, Intrinsic.
These are generated when calling appropriate private symbols in privileged code.
AST parser detects them and generates Intrinsic nodes and
BytecodeCompiler detects them and generate required bytecodes.

Currently, Array.from implementation works fine without this patch.
This is because when the target code is builtin JS,
BytecodeGenerator emits put_by_val_direct instead of put_by_val.
This solves the above issue. However, instead of solving this issue,
it raises another issue; There's no way to emit `[[Set]]` operation.
`[[Set]]` operation is actually used in the spec (Array.from's "length" is set by `[[Set]]`).
So to implement it precisely, introducing bytecode level intrinsics is necessary.

In the subsequent fixes, we'll remove that special path emitting put_by_val_direct
for `result[k] = value` under builtin JS environment. Instead of that special handling,
use bytecode intrinsics instead. It solves problems and it is more intuitive
because written JS code in builtin works as the same to the usual JS code.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/ArrayConstructor.js:
(from):
* bytecode/BytecodeIntrinsicRegistry.cpp: Added.
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
(JSC::BytecodeIntrinsicRegistry::lookup):
* bytecode/BytecodeIntrinsicRegistry.h: Added.
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emitBytecode):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putByValDirect):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/NodeConstructors.h:
(JSC::BytecodeIntrinsicNode::BytecodeIntrinsicNode):
* parser/Nodes.h:
(JSC::BytecodeIntrinsicNode::identifier):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
* runtime/CommonIdentifiers.h:
(JSC::CommonIdentifiers::bytecodeIntrinsicRegistry):
* tests/stress/array-from-with-accessors.js: Added.
(shouldBe):

Tools:

Change cpplint to accept emit_intrinsic_XXX.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):

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

4 years ago[CMake] Synchronize variables between WebKitFeatures.cmake and cmakedonfig.h.cmake
gyuyoung.kim@webkit.org [Mon, 20 Apr 2015 01:28:34 +0000 (01:28 +0000)]
[CMake] Synchronize variables between WebKitFeatures.cmake and cmakedonfig.h.cmake
https://bugs.webkit.org/show_bug.cgi?id=143935

Reviewed by Darin Adler.

Some variables aren't defined in these files or unused variables aren't removed. This
patch cleans up it as well as fix wrong alphabet order.

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

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

4 years agoMake Builtin functions non constructible
utatane.tea@gmail.com [Sun, 19 Apr 2015 18:59:39 +0000 (18:59 +0000)]
Make Builtin functions non constructible
https://bugs.webkit.org/show_bug.cgi?id=143923

Reviewed by Darin Adler.

Builtin functions defined by builtins/*.js accidentally have [[Construct]].
According to the spec, these functions except for explicitly defined as a constructor do not have [[Construct]].
This patch fixes it. When the JS function used for a construction is builtin function, throw not a constructor error.

Ideally, returning ConstructTypeNone in JSFunction::getConstructData is enough.
However, to avoid calling getConstructData (it involves indirect call of function pointer of getConstructData), some places do not check ConstructType.
In these places, they only check the target function is JSFunction because previously JSFunction always has [[Construct]].
So in this patch, we check `isBuiltinFunction()` in those places.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inliningCost):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getConstructData):
* tests/stress/builtin-function-is-construct-type-none.js: Added.
(shouldThrow):

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

4 years ago[ES6] Implement WeakSet
utatane.tea@gmail.com [Sun, 19 Apr 2015 18:08:14 +0000 (18:08 +0000)]
[ES6] Implement WeakSet
https://bugs.webkit.org/show_bug.cgi?id=142408

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch implements ES6 WeakSet.
Current implementation simply leverages WeakMapData with undefined value.
This WeakMapData should be optimized in the same manner as MapData/SetData in the subsequent patch[1].

And in this patch, we also fix WeakMap/WeakSet behavior to conform the ES6 spec.
Except for adders (WeakMap.prototype.set/WeakSet.prototype.add),
methods return false (or undefined for WeakMap.prototype.get)
when a key is not Object instead of throwing a type error.

[1]: https://bugs.webkit.org/show_bug.cgi?id=143919

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSWeakSet.cpp: Added.
(JSC::JSWeakSet::finishCreation):
(JSC::JSWeakSet::visitChildren):
* runtime/JSWeakSet.h: Added.
(JSC::JSWeakSet::createStructure):
(JSC::JSWeakSet::create):
(JSC::JSWeakSet::weakMapData):
(JSC::JSWeakSet::JSWeakSet):
* runtime/WeakMapPrototype.cpp:
(JSC::getWeakMapData):
(JSC::protoFuncWeakMapDelete):
(JSC::protoFuncWeakMapGet):
(JSC::protoFuncWeakMapHas):
* runtime/WeakSetConstructor.cpp: Added.
(JSC::WeakSetConstructor::finishCreation):
(JSC::callWeakSet):
(JSC::constructWeakSet):
(JSC::WeakSetConstructor::getConstructData):
(JSC::WeakSetConstructor::getCallData):
* runtime/WeakSetConstructor.h: Added.
(JSC::WeakSetConstructor::create):
(JSC::WeakSetConstructor::createStructure):
(JSC::WeakSetConstructor::WeakSetConstructor):
* runtime/WeakSetPrototype.cpp: Added.
(JSC::WeakSetPrototype::finishCreation):
(JSC::getWeakMapData):
(JSC::protoFuncWeakSetDelete):
(JSC::protoFuncWeakSetHas):
(JSC::protoFuncWeakSetAdd):
* runtime/WeakSetPrototype.h: Added.
(JSC::WeakSetPrototype::create):
(JSC::WeakSetPrototype::createStructure):
(JSC::WeakSetPrototype::WeakSetPrototype):
* tests/stress/weak-set-constructor-adder.js: Added.
(WeakSet.prototype.add):
* tests/stress/weak-set-constructor.js: Added.

LayoutTests:

Add basic-weakset test and fix WeakMap behavior to conform the latest spec.

* js/dom/basic-weakmap-expected.txt:
* js/dom/basic-weakset-expected.txt: Added.
* js/dom/basic-weakset.html: Added.
* js/dom/script-tests/basic-weakmap.js:
* js/dom/script-tests/basic-weakset.js: Added.

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

4 years agoRestore the WebKit.xcworkspace to the way it was before r182899,
simon.fraser@apple.com [Sun, 19 Apr 2015 16:17:09 +0000 (16:17 +0000)]
Restore the WebKit.xcworkspace to the way it was before r182899,
which inadvertently added the Source directory and a couple of source
files.

* WebKit.xcworkspace/contents.xcworkspacedata:

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

4 years agoWeb Inspector: Pass multiple arguments to classList.add and classList.remove
nvasilyev@apple.com [Sun, 19 Apr 2015 04:20:46 +0000 (04:20 +0000)]
Web Inspector: Pass multiple arguments to classList.add and classList.remove
https://bugs.webkit.org/show_bug.cgi?id=143914

classList.add and classList.remove can accept multiple arguments, use that.

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector.updateDockedState):
* UserInterface/Views/DOMTreeDataGrid.js:
(WebInspector.DOMTreeDataGrid):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.set hasChildren):
* UserInterface/Views/DatabaseContentView.js:
(WebInspector.DatabaseContentView):
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection):
* UserInterface/Views/DetailsSectionPropertiesRow.js:
(WebInspector.DetailsSectionPropertiesRow):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set classNames):
* UserInterface/Views/NavigationItem.js:
(WebInspector.NavigationItem):
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar):
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
* UserInterface/Views/SourceCodeTextEditor.js:
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):
* UserInterface/Views/TimelineRuler.js:

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

4 years agoWeb Inspector: Make prototype pill’s background semi-transparent
nvasilyev@apple.com [Sun, 19 Apr 2015 04:19:54 +0000 (04:19 +0000)]
Web Inspector: Make prototype pill’s background semi-transparent
https://bugs.webkit.org/show_bug.cgi?id=143928

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.prototype-property):

(.object-tree-property.prototype-property:hover, .object-tree-property.prototype-property:focus):
Slightly highlight the prototype pill when hovering over.

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

4 years ago[Mac] Time elapsed should be right-aligned
jonlee@apple.com [Sun, 19 Apr 2015 03:29:25 +0000 (03:29 +0000)]
[Mac] Time elapsed should be right-aligned
https://bugs.webkit.org/show_bug.cgi?id=143927

Reviewed by Eric Carlson.

Current time is left-aligned, which is visually jarring when going from < 1 hour to > 1 hour.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-current-time-display): Set justify-content to flex-end.
(audio::-webkit-media-controls-time-remaining-display): Explicitly set justify-content to flex-start.

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

4 years agoFix lldb_webkit.py to show StringImpls correctly
simon.fraser@apple.com [Sat, 18 Apr 2015 22:06:19 +0000 (22:06 +0000)]
Fix lldb_webkit.py to show StringImpls correctly
https://bugs.webkit.org/show_bug.cgi?id=143920

Reviewed by Andreas Kling.

Update WTFStringImplProvider's is_8bit to use the correct bitmask.

* lldb/lldb_webkit.py:
(WTFStringImplProvider.is_8bit):

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

4 years ago[EFL] Unreviewed gardening
m.pakula@samsung.com [Sat, 18 Apr 2015 20:15:29 +0000 (20:15 +0000)]
[EFL] Unreviewed gardening

Update test expectations for failing tests.

* platform/efl/TestExpectations:
* platform/efl/fast/css/text-overflow-ellipsis-bidi-expected.txt: Rebaseline after r182620.
* platform/efl/fast/dom/focus-contenteditable-expected.txt: Ditto.
* platform/efl/fast/forms/listbox-hit-test-zoomed-expected.txt: Ditto.
* platform/efl/fast/parser/open-comment-in-textarea-expected.txt: Ditto.
* platform/efl/fast/text/international/bidi-layout-across-linebreak-expected.txt: Ditto.
* platform/efl/inspector-protocol/debugger/regress-133182-expected.txt: Rebaseline after r181810.
* platform/efl/svg/wicd/test-rightsizing-b-expected.txt: Rebaseline after r182620.

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

4 years agoREGRESSION (r181656): Animated tiled layers are missing content
simon.fraser@apple.com [Sat, 18 Apr 2015 19:39:13 +0000 (19:39 +0000)]
REGRESSION (r181656): Animated tiled layers are missing content
https://bugs.webkit.org/show_bug.cgi?id=143911
rdar://problem/20596328

Reviewed by Darin Adler.
Source/WebCore:

After r181656, all requestAnimationFrame was falling back to timers, and not
using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
fumble. As a result, GraphicsLayerUpdater (which updates tiled layers during
animations) was failing to do any updates.

Replace this confusing Optional<> code with simpler code that just forces the
clients to make a DisplayRefreshMonitor if they can, first asking
ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().

Make lots of things into references, and use C++11 initialization in some places.

Add Internals API to allow a test to get the number of layer flushes that have
occurred.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::windowScreenDidChange):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
* dom/ScriptedAnimationController.h:
* page/ChromeClient.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::create):
(WebCore::DisplayRefreshMonitor::addClient):
(WebCore::DisplayRefreshMonitor::removeClient):
(WebCore::DisplayRefreshMonitor::displayDidRefresh):
* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/DisplayRefreshMonitorClient.cpp:
(WebCore::DisplayRefreshMonitorClient::~DisplayRefreshMonitorClient):
* platform/graphics/DisplayRefreshMonitorClient.h:
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::registerClient):
(WebCore::DisplayRefreshMonitorManager::unregisterClient):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
(WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
* platform/graphics/DisplayRefreshMonitorManager.h:
* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
(WebCore::GraphicsLayerUpdater::scheduleUpdate):
(WebCore::GraphicsLayerUpdater::screenDidChange):
(WebCore::GraphicsLayerUpdater::displayRefreshFired):
(WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh):
(WebCore::RenderLayerCompositor::flushLayersSoon):
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
(WebCore::RenderLayerCompositor::startTrackingLayerFlushes):
(WebCore::RenderLayerCompositor::layerFlushCount):
* rendering/RenderLayerCompositor.h:
* testing/Internals.cpp:
(WebCore::Internals::startTrackingLayerFlushes):
(WebCore::Internals::layerFlushCount):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

After r181656, all requestAnimationFrame was falling back to timers, and not
using the platform's DisplayRefreshMonitor, because of a Nullopt vs nullptr
fumble.

Replace this confusing Optional<> code with simpler code that just forces the
clients to make a DisplayRefreshMonitor if they can, first asking
ChromeClient, and then falling back to createDefaultDisplayRefreshMonitor().

Make lots of things into references, and use C++11 initialization in some places.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

Test that animates a tiled layer, and checks that layer flushes occur while the
animation is running.

* compositing/animation/animation-backing-expected.txt: Added.
* compositing/animation/animation-backing.html: Added.

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

4 years agoSwipeShadow images are installed on iOS
mitz@apple.com [Sat, 18 Apr 2015 14:57:19 +0000 (14:57 +0000)]
SwipeShadow images are installed on iOS
https://bugs.webkit.org/show_bug.cgi?id=143915

Reviewed by Tim Horton.

* Configurations/WebKit.xcconfig: Added Resources/Mac/* to
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]. We could move more resources there and remove
individual patterns.
* Resources/SwipeShadow.png: Moved to mac.
* Resources/SwipeShadow@2x.png: Moved to mac.
* Resources/mac: Added.
* Resources/mac/SwipeShadow.png: Moved from Source/WebKit2/Resources/SwipeShadow.png.
* Resources/mac/SwipeShadow@2x.png: Moved from Source/WebKit2/Resources/SwipeShadow@2x.png.
* WebKit2.xcodeproj/project.pbxproj: Created mac group in the Resources group and moved
SwipeShadow*.png into it. Updated for file moves.

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

4 years agoFix NetworkCache Statistics database bootstrapping after r182803
cdumez@apple.com [Sat, 18 Apr 2015 14:42:08 +0000 (14:42 +0000)]
Fix NetworkCache Statistics database bootstrapping after r182803
https://bugs.webkit.org/show_bug.cgi?id=143890

Reviewed by Darin Adler.

Update the NetworkCache Statistics database bootstrapping code to use
the records path instead of the version path. Also check that the
filenames in the folder are valid hashes to discard the *-body files.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::recordsPath):
(WebKit::NetworkCache::Cache::storagePath): Deleted.
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::initialize):
(WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache):
(WebKit::NetworkCache::Statistics::shrinkIfNeeded):

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

4 years agoWeb Inspector: All sans-serif font family rules should be set the same way.
jonowells@apple.com [Sat, 18 Apr 2015 04:04:39 +0000 (04:04 +0000)]
Web Inspector: All sans-serif font family rules should be set the same way.
https://bugs.webkit.org/show_bug.cgi?id=143909

Reviewed by Timothy Hatcher.

Update styles so that all uses of sans-serif font use -webkit-system-font consistently.

* UserInterface/Views/DefaultDashboardView.css:
(body.mac-platform.legacy .toolbar .dashboard.default > .item):
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property .prototype-name):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree-outline li .empty-message):
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(.timeline-overview-graph.rendering-frame > .divider > .label):

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

4 years agoClients sometimes block for 500ms in waitForPossibleGeometryUpdates
timothy_horton@apple.com [Sat, 18 Apr 2015 01:04:24 +0000 (01:04 +0000)]
Clients sometimes block for 500ms in waitForPossibleGeometryUpdates
https://bugs.webkit.org/show_bug.cgi?id=143901
<rdar://problem/20488655>

Reviewed by Anders Carlsson.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForMessage):
InterruptWaitingIfSyncMessageArrives already cancels waitForMessage if
a sync message arrives while waiting, but it should also avoid waiting
if there's a sync message already in the queue when the waiting starts,
as that will have the same nasty effect.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
If a synchronous message comes in from the Web process while we're waiting,
cancel our synchronous wait for DidUpdateGeometry. This will cause the size
change to not synchronize with the Web process' painting, but that is better
than pointlessly blocking for 500ms.

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

4 years agoPossible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessage...
cdumez@apple.com [Sat, 18 Apr 2015 00:46:30 +0000 (00:46 +0000)]
Possible null pointer dereference in WebDiagnosticLoggingClient::logDiagnosticMessageWithValue()
https://bugs.webkit.org/show_bug.cgi?id=143899
<rdar://problem/20584215>

Reviewed by Anders Carlsson.

WebDiagnosticLoggingClient::logDiagnosticMessage*() methods failed to
check that m_page.corePage() was non-null before dereferencing, thus
causing crashes when it is null.

* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

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

4 years agoUse ASan poisoning to taint moved-out-of Refs
ap@apple.com [Fri, 17 Apr 2015 22:45:42 +0000 (22:45 +0000)]
Use ASan poisoning to taint moved-out-of Refs
https://bugs.webkit.org/show_bug.cgi?id=143894
rdar://problem/19443723

Reviewed by Darin Adler.

* wtf/Ref.h: (WTF::Ref::~Ref):

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

4 years agoWeb Inspector: Have better inactive window color for pixel borders
timothy@apple.com [Fri, 17 Apr 2015 22:29:19 +0000 (22:29 +0000)]
Web Inspector: Have better inactive window color for pixel borders
https://bugs.webkit.org/show_bug.cgi?id=143888

Reviewed by Joseph Pecoraro.

* UserInterface/Views/FindBanner.css:
(body.window-inactive .find-banner):
* UserInterface/Views/Main.css:
(body.window-inactive.docked.bottom):
(body.window-inactive.docked.right):
(body.window-inactive #split-content-browser):
* UserInterface/Views/NavigationBar.css:
(body.window-inactive .navigation-bar):
* UserInterface/Views/QuickConsole.css:
(body.window-inactive .quick-console):
(.quick-console.showing-log):
* UserInterface/Views/Sidebar.css:
(body.window-inactive .sidebar.left):
(body.window-inactive .sidebar.right):

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

4 years agoWebKit client should be able to add view controller for link preview.
commit-queue@webkit.org [Fri, 17 Apr 2015 22:28:05 +0000 (22:28 +0000)]
WebKit client should be able to add view controller for link preview.
https://bugs.webkit.org/show_bug.cgi?id=143686

Add delegate methods to WKUIDelegatePrivate so that a WebKit client can prepare a view controller
for link preview and react to the dismissal of this view controller. Also connect WKContentView to
preview gesture recognizer and forwards the delegate callbacks to corresponding delegate methods
in WKUIDelegatePrivate.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-04-17
Reviewed by Beth Dakin.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView previewViewControllerForPosition:inSourceView:]):
(-[WKContentView commitPreviewViewController:]):
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):

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

4 years agoLarge values for line-height cause integer overflow in RenderStyle::computedLineHeight
bjonesbe@adobe.com [Fri, 17 Apr 2015 22:25:46 +0000 (22:25 +0000)]
Large values for line-height cause integer overflow in RenderStyle::computedLineHeight
https://bugs.webkit.org/show_bug.cgi?id=143863

Reviewed by Rob Buis.

Source/WebCore:

When we compute huge values for line-height through percentage or CSS
calc, we'll overflow the integer and later on
ShapeOutsideInfo::computeDeltasForContainingBlockLine will ASSERT
because it expects non-negative line height.  So for the computed
line-height, clamp to an integer range to avoid overflow. Note that
the code path for percentages here is safe because LayoutUnit clamps
to an int on conversion.

This is based on a Blink patch by Rob Buis.

Test: fast/shapes/shape-outside-floats/shape-outside-negative-line-height-crash.html

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::computedLineHeight): Clamp line-height to an
    int to avoid overflow.

LayoutTests:

Simplified test from a fuzzer.

* fast/shapes/shape-outside-floats/shape-outside-negative-line-height-crash-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-negative-line-height-crash.html: Added.

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

4 years agoWeb Inspector: Unexpected background at top of console when rubber-banding with selection
commit-queue@webkit.org [Fri, 17 Apr 2015 22:22:03 +0000 (22:22 +0000)]
Web Inspector: Unexpected background at top of console when rubber-banding with selection
https://bugs.webkit.org/show_bug.cgi?id=140710

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

* UserInterface/Views/LogContentView.css:
(.console-messages):
Remove the focus ring on the console's log view, only visible when rubber-banding.

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

4 years agoRemove unused BoundsCheckedPointer
ap@apple.com [Fri, 17 Apr 2015 21:58:01 +0000 (21:58 +0000)]
Remove unused BoundsCheckedPointer
https://bugs.webkit.org/show_bug.cgi?id=143896

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* bytecode/SpeculatedType.cpp: The header was included here.

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/BoundsCheckedPointer.h: Removed.
* wtf/CMakeLists.txt:

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

4 years ago[ES6] Fix name enumeration of static functions for Symbol constructor
utatane.tea@gmail.com [Fri, 17 Apr 2015 21:22:39 +0000 (21:22 +0000)]
[ES6] Fix name enumeration of static functions for Symbol constructor
https://bugs.webkit.org/show_bug.cgi?id=143891

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Fix missing symbolPrototypeTable registration to the js class object.
This patch fixes name enumeration of static functions (Symbol.key, Symbol.keyFor) for Symbol constructor.

* runtime/SymbolConstructor.cpp:

LayoutTests:

Add property names tests for Symbol constructor, Symbol object and Symbol.prototype.

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

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

4 years agoNot able to build WebKit against iOS Simulator 8.3 SDK
dbates@webkit.org [Fri, 17 Apr 2015 20:13:26 +0000 (20:13 +0000)]
Not able to build WebKit against iOS Simulator 8.3 SDK
https://bugs.webkit.org/show_bug.cgi?id=143883

Reviewed by David Kilzer.

Tools:

Copy libraries libWebKitSystemInterfaceIOS{Device, Simulator}8.3.a to the built product directory
so that Xcode uses them.

* Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

Add WebKitSystemInterface for iOS 8.3.

* libWebKitSystemInterfaceIOSDevice8.3.a: Added.
* libWebKitSystemInterfaceIOSSimulator8.3.a: Added.

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

4 years agoForce mouse events should go through normal mouse event handling code paths
bdakin@apple.com [Fri, 17 Apr 2015 19:55:55 +0000 (19:55 +0000)]
Force mouse events should go through normal mouse event handling code paths
https://bugs.webkit.org/show_bug.cgi?id=143749
-and corresponding-
rdar://problem/20472895

Reviewed by Dean Jackson.

Source/WebCore:

This patch moves all of the code to dispatch mouseforcedown, mouseforceup, and
mouseforcechanged into normal mouse event dispatching code. This patch leaves
behind the cancel and click events because we plan to remove those, and it also
leaves mouseforcewillbegin because that is necessarily a very different event more
tied to the NSImmediateActionGestureRecognizer than these other events which are
tied to NSResponder’s pressureChangeWithEvent.

New helper functions.
* dom/Document.cpp:
(WebCore::Document::hasListenerTypeForEventType):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::isForceEvent):

Move the code to ensure the force events have listeners in order to fire to
dispatchMouseEvent, and delete the old implementations.
(WebCore::Element::dispatchMouseEvent):
(WebCore::Element::dispatchMouseForceChanged): Deleted.
(WebCore::Element::dispatchMouseForceDown): Deleted.
(WebCore::Element::dispatchMouseForceUp): Deleted.
* dom/Element.h:

Perform a hit test and pipe the events through dispatchMouseEvent().
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseForceEvent):
* page/EventHandler.h:

New types for the new events.
* platform/PlatformEvent.h:

Forward to EventHandler.
* replay/UserInputBridge.cpp:
(WebCore::UserInputBridge::handleMouseForceEvent):
* replay/UserInputBridge.h:

Source/WebKit2:

This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
NSEventTypePressures that is gets and sends those down to the web process.

Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
NSEventTypePressure, the new name makes it clear how the second parameter differs
from the first.
* Shared/NativeWebMouseEvent.h:

New event types for the new types of events.
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/mac/NativeWebMouseEventMac.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/mac/WebEventFactory.h:

All of the square-peg, round-hole problems of massaging the NSEventTypePressures
events into WebMouseEvents is taken care of here.
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):

Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
and handle it.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):

Handle the new types.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):

Can delete inputDeviceForceDidChange since it’s no longer used.
(WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
* UIProcess/WebPageProxy.h:

Handle the new types of mouse events properly.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):

Delete inputDeviceForceDidChange() and m_lastForceStage.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange): Deleted.

Handle new WebEvent types.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

Tools:

Add mouseForceDown/mouseForceUp/mouseForceChanged support to WebKitTestRunner.
Since there is not a way to create an NSEventTypePressure from scratch, we
subclass NSEvent and override all of the critical methods.

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseForceDown):
(WTR::EventSendingController::mouseForceUp):
(WTR::EventSendingController::mouseForceChanged):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/mac/EventSenderProxy.mm:
(-[EventSenderPressureEvent initAtLocation:globalLocation:stage:pressure:phase:time:eventNumber:]):
(-[EventSenderPressureEvent timestamp]):
(-[EventSenderPressureEvent type]):
(-[EventSenderPressureEvent locationInWindow]):
(-[EventSenderPressureEvent location]):
(-[EventSenderPressureEvent stage]):
(-[EventSenderPressureEvent pressure]):
(-[EventSenderPressureEvent phase]):
(-[EventSenderPressureEvent eventNumber]):
(WTR::EventSenderProxy::mouseForceDown):
(WTR::EventSenderProxy::mouseForceUp):
(WTR::EventSenderProxy::mouseForceChanged):

LayoutTests:

Just a few new tests. More to come.
* fast/events/mouse-force-changed-expected.txt: Added.
* fast/events/mouse-force-changed.html: Added.
* fast/events/mouse-force-down-expected.txt: Added.
* fast/events/mouse-force-down.html: Added.
* fast/events/mouse-force-up-expected.txt: Added.
* fast/events/mouse-force-up.html: Added.

Right now the new tests will only work on Mac 10.10.3 and beyond.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac-mavericks/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoRenderTableCell::computeCollapsed*Border() should check if the cell is still attached...
zalan@apple.com [Fri, 17 Apr 2015 19:53:04 +0000 (19:53 +0000)]
RenderTableCell::computeCollapsed*Border() should check if the cell is still attached to the render tree.
https://bugs.webkit.org/show_bug.cgi?id=143887
rdar://problem/20568989

Reviewed by Simon Fraser.

Detached table cell has no access to its parent table. This is a speculative fix to
avoid dereferencing the invalid table pointer.

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeCollapsedStartBorder):
(WebCore::RenderTableCell::computeCollapsedEndBorder):
(WebCore::RenderTableCell::computeCollapsedBeforeBorder):
(WebCore::RenderTableCell::computeCollapsedAfterBorder):

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

4 years agobuild.webkit.org/dashboard still shows obsolete results for out of order builds sometimes
ap@apple.com [Fri, 17 Apr 2015 19:08:11 +0000 (19:08 +0000)]
build.webkit.org/dashboard still shows obsolete results for out of order builds sometimes
https://bugs.webkit.org/show_bug.cgi?id=143885

Reviewed by Tim Horton.

Fixed a case where we have two builds with the same revision(s). An in order build
is one for which the revision is strictly higher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype._checkForInOrderResult):
(BuildbotQueue.prototype.compareIterationsByRevisions):

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

4 years agoInline JSFunction allocation in DFG
commit-queue@webkit.org [Fri, 17 Apr 2015 18:50:50 +0000 (18:50 +0000)]
Inline JSFunction allocation in DFG
https://bugs.webkit.org/show_bug.cgi?id=143858

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-17
Reviewed by Filip Pizlo.

Followup to my previous patch which inlines JSFunction allocation when
using FTL, now also enabled in DFG.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunction):

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

4 years agoUpdate fullscreen button visibility on fullscreen change.
roger_fong@apple.com [Fri, 17 Apr 2015 18:35:46 +0000 (18:35 +0000)]
Update fullscreen button visibility on fullscreen change.
https://bugs.webkit.org/show_bug.cgi?id=143861.
<rdar://problem/20143218>

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller): There is no need for hasVisualMedia to be a class variable.
(Controller.prototype.handleReadyStateChange):
(Controller.prototype.handleFullscreenChange):
(Controller.prototype.updateFullscreenButtons):

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

4 years agoREGRESSION: SVG does not support link dragging
dbates@webkit.org [Fri, 17 Apr 2015 18:21:30 +0000 (18:21 +0000)]
REGRESSION: SVG does not support link dragging
https://bugs.webkit.org/show_bug.cgi?id=141597

Reviewed by Darin Adler.

Source/WebCore:

Fixes an issue where a SVG hyperlink cannot be dragged. We should support
dragging an SVG A element just as we support dragging an HTML A element.

Test: fast/events/drag-and-drop-link.html

* page/DragController.cpp: Removed explicit include of header Element.h as it will
be ultimately included by HTMLAnchorElement.h, among other headers.
(WebCore::isDraggableLink): Added. Extracted code from HitTestResult::isLiveLink().
(WebCore::DragController::draggableElement): Call WebCore::isDraggableLink() to
determine whether a element is a hyperlink that can be dragged.
* page/DragController.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Write code in terms of
 WebCore::isDraggableLink().
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isLiveLink): Deleted.
* rendering/HitTestResult.h:

Source/WebKit/mac:

Write -[WebElementDictionary _isLiveLink] in terms of WebCore::isDraggableLink().

* Misc/WebElementDictionary.mm:
(-[WebElementDictionary _isLiveLink]):

LayoutTests:

Add a test to ensure we do not regress dragging of a HTML hyperlink or a SVG hyperlink.

* fast/events/drag-and-drop-link-expected.txt: Added.
* fast/events/drag-and-drop-link.html: Added.
* platform/efl/TestExpectations: Mark the test as "failure" since EFL does not support drag-and-drop.
* platform/gtk/TestExpectations: Mark the test as "failure" until we implement drag-and-drop support for
GTK+ as part of fixing <https://bugs.webkit.org/show_bug.cgi?id=42194>.
* platform/ios-simulator/TestExpectations: Skip the test since iOS does not implement
drag-and-drop support.
* platform/mac-wk2/TestExpectations: Skip the test until we implement drag-and-drop support in EventSender
for Mac as part of fixing <https://bugs.webkit.org/show_bug.cgi?id=42194>.

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

4 years agoUnreviewed, rolling out r182912 and r182920.
commit-queue@webkit.org [Fri, 17 Apr 2015 17:33:21 +0000 (17:33 +0000)]
Unreviewed, rolling out r182912 and r182920.
https://bugs.webkit.org/show_bug.cgi?id=143881

Build breakage in some configurations (Requested by ap on
#webkit).

Reverted changesets:

"Force mouse events should go through normal mouse event
handling code paths"
https://bugs.webkit.org/show_bug.cgi?id=143749
http://trac.webkit.org/changeset/182912

http://trac.webkit.org/changeset/182920

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

4 years agoFix review comments for https://bugs.webkit.org/show_bug.cgi?id=143590
said@apple.com [Fri, 17 Apr 2015 17:30:43 +0000 (17:30 +0000)]
Fix review comments for https://bugs.webkit.org/show_bug.cgi?id=143590
following http://trac.webkit.org/changeset/182876.

Reviewed by Daniel Bates.

* ChangeLog:
Fixed typo.

* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::computedFontSizeFromSpecifiedSize):
Fixed a typo in an enum definition and changed the name of an argument.

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

4 years agoNetwork Cache: Read resource record and body in parallel
antti@apple.com [Fri, 17 Apr 2015 17:07:18 +0000 (17:07 +0000)]
Network Cache: Read resource record and body in parallel
https://bugs.webkit.org/show_bug.cgi?id=143879

Reviewed by Chris Dumez.

We currently first fetch the record file and then fetch the body blob if needed.
We can do both operations in parallel to reduce latency.

* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::traverseCacheFiles):

    Do all validation in the client.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::synchronize):

    Maintain a bloom filter that contains the body blobs to avoid unnecessary IO attempts.
    Delete any unknown file in cache directory.

(WebKit::NetworkCache::Storage::addToRecordFilter):

    More informative name for record filter.

(WebKit::NetworkCache::Storage::mayContain):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
(WebKit::NetworkCache::Storage::dispatchReadOperation):

    Start record read IO and body blob read IO in parallel.

(WebKit::NetworkCache::Storage::finishReadOperation):

    The read is finished when we have both the record and the blob.

(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::retrieve):
(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::Storage::clear):
(WebKit::NetworkCache::Storage::shrink):
(WebKit::NetworkCache::Storage::addToContentsFilter): Deleted.
(WebKit::NetworkCache::Storage::decodeRecord): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):

    ReadOperation is now mutable and gathers the read result.

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

4 years agoStop installing WebKit2.framework
andersca@apple.com [Fri, 17 Apr 2015 16:45:02 +0000 (16:45 +0000)]
Stop installing WebKit2.framework
https://bugs.webkit.org/show_bug.cgi?id=143860
rdar://problem/18298491

Reviewed by Dan Bernstein.

* Configurations/WebKit2.xcconfig:
Set SKIP_INSTALL=YES for all SDKs except 10.9 where we still need it.

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

4 years ago[GTK] Gardening 17th April.
commit-queue@webkit.org [Fri, 17 Apr 2015 15:32:10 +0000 (15:32 +0000)]
[GTK] Gardening 17th April.
https://bugs.webkit.org/show_bug.cgi?id=143870

Unreviewed.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-04-17

* platform/gtk/TestExpectations:

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

4 years ago[EFL] Unreviewed EFL gardening on 17 April.
gyuyoung.kim@webkit.org [Fri, 17 Apr 2015 12:53:10 +0000 (12:53 +0000)]
[EFL] Unreviewed EFL gardening on 17 April.

Mark 5 form tests and 3 navigation tests to failure.

* platform/efl/TestExpectations:

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

4 years ago[GTK] One more unreviewed fix after r182882.
ossy@webkit.org [Fri, 17 Apr 2015 11:14:21 +0000 (11:14 +0000)]
[GTK] One more unreviewed fix after r182882.

* TestWebKitAPI/PlatformGTK.cmake: Added back the WebKit2's forwarding header generator dependency.

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

4 years ago[GStreamer] Silent WebAudio buffers support
philn@webkit.org [Fri, 17 Apr 2015 10:43:22 +0000 (10:43 +0000)]
[GStreamer] Silent WebAudio buffers support
https://bugs.webkit.org/show_bug.cgi?id=143869

Reviewed by Carlos Garcia Campos.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop): Set gap flag on silent buffers. The audio
sink can then drop them and avoid un-necessary buffer processing.

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

4 years agoUnreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).
carlosgc@webkit.org [Fri, 17 Apr 2015 10:22:09 +0000 (10:22 +0000)]
Unreviewed. Fix the build with ENABLE(NETWORK_CACHE) and !ENABLE(SHAREABLE_RESOURCE).

* NetworkProcess/cache/NetworkCacheEntry.cpp:
* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes): There's no st_birthtime in Linux.

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

4 years ago[GTK] Unreviewed speculative clean build fix after r182882.
ossy@webkit.org [Fri, 17 Apr 2015 10:19:47 +0000 (10:19 +0000)]
[GTK] Unreviewed speculative clean build fix after r182882.

TestWebKitAPI's forwarding header generator depended on WeKit2's
which generated SOUP related forwarding headers too.

This dependency isn't necessary and was removed by r182882 to make
forwarding header generators parallelizable. But in this case
TestWebKitAPI's and WebKitTestRunner's forwarding header generator
should generate SOUP related forwarding headers too similar to EFL.

* TestWebKitAPI/PlatformGTK.cmake:
* WebKitTestRunner/PlatformGTK.cmake:

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

4 years ago[SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
carlosgc@webkit.org [Fri, 17 Apr 2015 10:16:41 +0000 (10:16 +0000)]
[SOUP] ResourceRequest cache policy is not encoded/decoded in IPC messages
https://bugs.webkit.org/show_bug.cgi?id=143867

Reviewed by Sergio Villar Senin.

Encode/Decode the ResourceRequest cache policy.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

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

4 years ago[SOUP] Redirect to non HTTP destination is broken
carlosgc@webkit.org [Fri, 17 Apr 2015 10:13:40 +0000 (10:13 +0000)]
[SOUP] Redirect to non HTTP destination is broken
https://bugs.webkit.org/show_bug.cgi?id=143866

Reviewed by Sergio Villar Senin.

Source/WebCore:

This is because we are passing true unconditionally as
isHTTPFamilyRequest parameter of
createSoupRequestAndMessageForHandle in continueAfterWillSendRequest.
We don't actually need to pass isHTTPFamilyRequest parameter to
createSoupRequestAndMessageForHandle, since it can simply check
that from the given request.

Covered by unit tets and also cache/disk-cache/disk-cache-redirect-to-data.html.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::continueAfterWillSendRequest):
(WebCore::createSoupRequestAndMessageForHandle):
(WebCore::ResourceHandle::start):

Tools:

Add a unit test to check that redirect to a data URI works.

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testRedirectToDataURI):
(serverCallback):
(beforeAll):

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

4 years agostreams/reference-implementation/readable-stream.html is flaky
calvaris@igalia.com [Fri, 17 Apr 2015 10:03:35 +0000 (10:03 +0000)]
streams/reference-implementation/readable-stream.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=143778

Unreviewed.

Comment out flaky subtests while working on a more complete
solution.

The problem with these tests is that they set a timeout before the
calling done() and this causes some tests to behave
undeterministically, specilly code related to promise
resolution. This could even cause indetermination if the tests
were expected to run correctly.

We think it is better to comment them out and find a more long
term solution that could involve submitting change requests to the
reference tests in the spec. This will be tackled in bug 143774.

* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream-reader-expected.txt:
* streams/reference-implementation/readable-stream-reader.html:
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/readable-stream.html:

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

4 years agostreams/readablestream-reader.html test should really test collected stream case.
youenn.fablet@crf.canon.fr [Fri, 17 Apr 2015 06:50:47 +0000 (06:50 +0000)]
streams/readablestream-reader.html test should really test collected stream case.
https://bugs.webkit.org/show_bug.cgi?id=143818

Reviewed by Darin Adler.

Making the test async so that the stream start async callback is made and the stream be collected.

* streams/readable-stream-reader.html:

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

4 years agohttp/tests/misc/DOMContentLoaded-event.html is flaky
ap@apple.com [Fri, 17 Apr 2015 06:06:50 +0000 (06:06 +0000)]
http/tests/misc/DOMContentLoaded-event.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=143382

Reviewed by Chris Dumez.

* http/tests/misc/DOMContentLoaded-event-expected.txt:
* http/tests/misc/DOMContentLoaded-event.html:
Don't race with a timer, just check if some time passes between DOMContentLoaded and load events.

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

4 years agoWeb Inspector: Breakpoint icons should not get pushed off of debugger sidebar due...
jonowells@apple.com [Fri, 17 Apr 2015 02:10:00 +0000 (02:10 +0000)]
Web Inspector: Breakpoint icons should not get pushed off of debugger sidebar due to long resource names
https://bugs.webkit.org/show_bug.cgi?id=142714

Reviewed by Timothy Hatcher.

Modify the styles for content and group containers inside the debugger sidebar panel's detail sections
such that the rules "display: table" and "display: table-row-group" no longer apply. This will make
the file names which use the rule "text-overflow: ellipsis" truncate as expected.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section > .content):
(.sidebar > .panel.navigation.debugger .details-section.collapsed > .content):
(.sidebar > .panel.navigation.debugger .details-section > .content > .group):
(.sidebar > .panel.navigation.debugger .details-section.scripts):
(.sidebar > .panel.navigation.debugger .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content):

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

4 years agoNumber.parseInt is not === global parseInt in nightly r182673
commit-queue@webkit.org [Fri, 17 Apr 2015 01:36:10 +0000 (01:36 +0000)]
Number.parseInt is not === global parseInt in nightly r182673
https://bugs.webkit.org/show_bug.cgi?id=143799

Patch by Jordan Harband <ljharb@gmail.com> on 2015-04-16
Reviewed by Darin Adler.

Source/JavaScriptCore:

Ensuring parseInt === Number.parseInt, per spec
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.parseint

* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::parseIntFunction):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):

LayoutTests:

* js/number-constructor-expected.txt:
* js/parseInt-expected.txt:
* js/script-tests/number-constructor.js:
* js/script-tests/parseInt.js:

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

4 years agoChanges method of quitting iOS Simulator to be more correct.
jacob_nielsen@apple.com [Fri, 17 Apr 2015 01:28:45 +0000 (01:28 +0000)]
Changes method of quitting iOS Simulator to be more correct.
https://bugs.webkit.org/show_bug.cgi?id=143847
<rdar://problem/20530344>

Reviewed by Darin Adler.

Fixes by addressing the app by ID rather than by name.

* Scripts/webkitdirs.pm:
(quitIOSSimulator):
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.check_sys_deps):

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

4 years agoUse UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
commit-queue@webkit.org [Fri, 17 Apr 2015 01:25:08 +0000 (01:25 +0000)]
Use UNUSED_PARAM instead of the void casting to suppress unused parameter warnings.
https://bugs.webkit.org/show_bug.cgi?id=143750

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

No new tests, no behavior change.

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):

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

4 years agoUse less memory when compiling content extensions
achristensen@apple.com [Fri, 17 Apr 2015 01:12:51 +0000 (01:12 +0000)]
Use less memory when compiling content extensions
https://bugs.webkit.org/show_bug.cgi?id=143857

Reviewed by Benjamin Poulain.

When compiling a content extension, we convert the rule list into several intermediate forms:

1) A String.
2) A JSValue from JSONParse in loadEncodedRules.
3) A Vector of ContentExtensionRules.
4) A CombinedURLFilters object representing the pieces of the regular expressions from the triggers.
5) A Vector of NFAs.
6) A DFA for each NFA.
7) A Vector of DFABytecode.

Each one of these contains all the information contained in the content extension,
so we do not need to keep them all in memory at the same time like we are doing now.
When we are done with one, we can free that memory to greatly reduce the maximum memory usage while compiling.
The next step will be to reduce the copies of the original JSON String and to generate NFAs one at a time.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::CombinedURLFilters::clear):
* contentextensions/CombinedURLFilters.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
Clear structures when finished using them.

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

4 years agoGardening: fix CLOOP build after r182927.
mark.lam@apple.com [Fri, 17 Apr 2015 01:03:55 +0000 (01:03 +0000)]
Gardening: fix CLOOP build after r182927.

Not reviewed.

* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::print):

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

4 years agoWeb Inspector: Should include "Log Value" context menu item in Preview and Collapsed...
joepeck@webkit.org [Fri, 17 Apr 2015 01:00:21 +0000 (01:00 +0000)]
Web Inspector: Should include "Log Value" context menu item in Preview and Collapsed ObjectTree
https://bugs.webkit.org/show_bug.cgi?id=143845

Reviewed by Timothy Hatcher.

Give previews the same "Log Value" context menu so that if you just log
a bunch of objects to the console you can quickly turn that entire object
into a $n reference in the console to interact with.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype.setOriginatingObjectInfo):
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
Provide API to refer to a RemoteObject and optional PropertyPath
that can be used to give the preview a "Log Value" context menu.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
Include the RemoteObject without a path for a preview context menu.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
Include the RemoteObject with a path if we knew it for a preview context menu.

* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
The context menu can never be empty, since we always added at least one item above.

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

4 years agoCompiling a content extension fails when user's home directory is on a different...
beidson@apple.com [Fri, 17 Apr 2015 00:53:19 +0000 (00:53 +0000)]
Compiling a content extension fails when user's home directory is on a different volume from /var/tmp.
https://bugs.webkit.org/show_bug.cgi?id=143834

Reviewed by Anders Carlsson.

Source/WebCore:

- Add moveFile() for a WK2 call site to use.
- Remove renameFile() as it is now dead code.

* platform/FileSystem.h:

* platform/gtk/FileSystemGtk.cpp:
(WebCore::renameFile): Deleted.

* platform/mac/FileSystemMac.mm:
(WebCore::moveFile):

* platform/posix/FileSystemPOSIX.cpp:
(WebCore::renameFile): Deleted.

* platform/win/FileSystemWin.cpp:
(WebCore::renameFile): Deleted.

Source/WebKit2:

* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::compiledToFile): Use moveFile() instead of renameFile()

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

4 years agoRebaseline mouse-cursor-image-set results after r182869
timothy_horton@apple.com [Fri, 17 Apr 2015 00:49:11 +0000 (00:49 +0000)]
Rebaseline mouse-cursor-image-set results after r182869

* fast/events/mouse-cursor-image-set-expected.txt:
* platform/win/fast/events/mouse-cursor-image-set-expected.txt:
* platform/mac/TestExpectations:
Un-skip and land new results.

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

4 years agoDeprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
andersca@apple.com [Fri, 17 Apr 2015 00:46:07 +0000 (00:46 +0000)]
Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=143844

Reviewed by Dan Bernstein.

Source/WebKit2:

* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _validate]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* mac/postprocess-framework-headers.sh:

Tools:

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate newPrivateWindow:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController initWithConfiguration:]):
(-[WK2BrowserWindowController fetchWebsiteData:]):
(-[WK2BrowserWindowController fetchAndClearWebsiteData:]):
(-[WK2BrowserWindowController clearWebsiteData:]):

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

4 years agoInline JSFunction allocation in FTL
commit-queue@webkit.org [Fri, 17 Apr 2015 00:44:58 +0000 (00:44 +0000)]
Inline JSFunction allocation in FTL
https://bugs.webkit.org/show_bug.cgi?id=143851

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-16
Reviewed by Filip Pizlo.

JSFunction allocation is a simple operation that should be inlined when possible.

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNewFunction):
* runtime/JSFunction.h:
(JSC::JSFunction::allocationSize):

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

4 years agoExpose JavaScriptMarkupEnabled preference for WebKit1
weinig@apple.com [Fri, 17 Apr 2015 00:28:20 +0000 (00:28 +0000)]
Expose JavaScriptMarkupEnabled preference for WebKit1
<rdar://problem/19939450>
https://bugs.webkit.org/show_bug.cgi?id=143855

Reviewed by Dan Bernstein.

* WebView/WebPreferenceKeysPrivate.h:
Add new key, WebKitJavaScriptMarkupEnabledPreferenceKey

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
Initialize WebKitJavaScriptMarkupEnabledPreferenceKey to YES.

(-[WebPreferences isJavaScriptMarkupEnabled]):
(-[WebPreferences setJavaScriptMarkupEnabled:]):
Implement getter/setter.

* WebView/WebPreferencesPrivate.h:
Add new property, javaScriptMarkupEnabled.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Map the new preference to WebCore's scriptMarkupEnabled setting.

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

4 years agoAdd $vm debugging tool.
mark.lam@apple.com [Fri, 17 Apr 2015 00:25:14 +0000 (00:25 +0000)]
Add $vm debugging tool.
https://bugs.webkit.org/show_bug.cgi?id=143809

Reviewed by Geoffrey Garen.

For debugging VM bugs, it would be useful to be able to dump VM data structures
from JS code that we instrument.  To this end, let's introduce a
JS_enableDollarVM option that, if true, installs an $vm property into each JS
global object at creation time.  The $vm property refers to an object that
provides a collection of useful utility functions.  For this initial
implementation, $vm will have the following:

    crash() - trigger an intentional crash.

    dfgTrue() - returns true if the current function is DFG compiled, else returns false.
    jitTrue() - returns true if the current function is compiled by the baseline JIT, else returns false.
    llintTrue() - returns true if the current function is interpreted by the LLINT, else returns false.

    gc() - runs a full GC.
    edenGC() - runs an eden GC.

    codeBlockForFrame(frameNumber) - gets the codeBlock at the specified frame (0 = current, 1 = caller, etc).
    printSourceFor(codeBlock) - prints the source code for the codeBlock.
    printByteCodeFor(codeBlock) - prints the bytecode for the codeBlock.

    print(str) - prints a string to dataLog output.
    printCallFrame() - prints the current CallFrame.
    printStack() - prints the JS stack.
    printInternal(value) - prints the JSC internal info for the specified value.

With JS_enableDollarVM=true, JS code can use the above functions like so:

    $vm.print("Using $vm features\n");

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printCallOp):
- FTL compiled functions don't like it when we try to compute the CallLinkStatus.
  Hence, we skip this step if we're dumping an FTL codeBlock.

* heap/Heap.cpp:
(JSC::Heap::collectAndSweep):
(JSC::Heap::collectAllGarbage): Deleted.
* heap/Heap.h:
(JSC::Heap::collectAllGarbage):
- Add ability to do an Eden collection and sweep.

* interpreter/StackVisitor.cpp:
(JSC::printIndents):
(JSC::log):
(JSC::logF):
(JSC::StackVisitor::Frame::print):
(JSC::jitTypeName): Deleted.
(JSC::printif): Deleted.
- Modernize the implementation of StackVisitor::Frame::print(), and remove some
  now redundant code.
- Also fix it so that it downgrades gracefully when encountering inlined DFG
  and compiled FTL functions.

(DebugPrintFrameFunctor::DebugPrintFrameFunctor): Deleted.
(DebugPrintFrameFunctor::operator()): Deleted.
(debugPrintCallFrame): Deleted.
(debugPrintStack): Deleted.
- these have been moved into JSDollarVMPrototype.cpp.

* interpreter/StackVisitor.h:
- StackVisitor::Frame::print() is now enabled for release builds as well so that
  we can call it from $vm.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
- Added the $vm instance to global objects conditional on the JSC_enableDollarVM
  option.

* runtime/Options.h:
- Added the JSC_enableDollarVM option.

* tools/JSDollarVM.cpp: Added.
* tools/JSDollarVM.h: Added.
(JSC::JSDollarVM::createStructure):
(JSC::JSDollarVM::create):
(JSC::JSDollarVM::JSDollarVM):

* tools/JSDollarVMPrototype.cpp: Added.
- This file contains 2 sets of functions:

  a. a C++ implementation of debugging utility functions that are callable when
     doing debugging from lldb.  To the extent possible, these functions try to
     be cautious and not cause unintended crashes should the user call them with
     the wrong info.  Hence, they are designed to be robust rather than speedy.

  b. the native implementations of JS functions in the $vm object.  Where there
     is overlapping functionality, these are built on top of the C++ functions
     above to do the work.

  Note: it does not make sense for all of the $vm functions to have a C++
  counterpart for lldb debugging.  For example, the $vm.dfgTrue() function is
  only useful for JS code, and works via the DFG intrinsics mechanism.
  When doing debugging via lldb, the optimization level of the currently
  executing JS function can be gotten by dumping the current CallFrame instead.

(JSC::currentThreadOwnsJSLock):
(JSC::ensureCurrentThreadOwnsJSLock):
(JSC::JSDollarVMPrototype::addFunction):
(JSC::functionCrash): - $vm.crash()
(JSC::functionDFGTrue): - $vm.dfgTrue()
(JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor):
(JSC::CallerFrameJITTypeFunctor::operator()):
(JSC::CallerFrameJITTypeFunctor::jitType):
(JSC::functionLLintTrue): - $vm.llintTrue()
(JSC::functionJITTrue): - $vm.jitTrue()
(JSC::gc):
(JSC::functionGC): - $vm.gc()
(JSC::edenGC):
(JSC::functionEdenGC): - $vm.edenGC()
(JSC::isValidCodeBlock):
(JSC::codeBlockForFrame):
(JSC::functionCodeBlockForFrame): - $vm.codeBlockForFrame(frameNumber)
(JSC::codeBlockFromArg):
(JSC::functionPrintSourceFor): - $vm.printSourceFor(codeBlock)
(JSC::functionPrintByteCodeFor): - $vm.printBytecodeFor(codeBlock)
(JSC::functionPrint): - $vm.print(str)
(JSC::PrintFrameFunctor::PrintFrameFunctor):
(JSC::PrintFrameFunctor::operator()):
(JSC::printCallFrame):
(JSC::printStack):
(JSC::functionPrintCallFrame): - $vm.printCallFrame()
(JSC::functionPrintStack): - $vm.printStack()
(JSC::printValue):
(JSC::functionPrintValue): - $vm.printValue()
(JSC::JSDollarVMPrototype::finishCreation):
* tools/JSDollarVMPrototype.h: Added.
(JSC::JSDollarVMPrototype::create):
(JSC::JSDollarVMPrototype::createStructure):
(JSC::JSDollarVMPrototype::JSDollarVMPrototype):

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

4 years ago32-bit build fix.
achristensen@apple.com [Fri, 17 Apr 2015 00:09:44 +0000 (00:09 +0000)]
32-bit build fix.

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):
Added WK_API_ENABLED.

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

4 years agoI will be investigating this in the short term, but skip these failing test for
bdakin@apple.com [Thu, 16 Apr 2015 23:52:32 +0000 (23:52 +0000)]
I will be investigating this in the short term, but skip these failing test for
now.

* platform/mac-wk2/TestExpectations:

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

4 years agoMedia element time displays shouldn't wrap.
roger_fong@apple.com [Thu, 16 Apr 2015 23:45:22 +0000 (23:45 +0000)]
Media element time displays shouldn't wrap.
https://bugs.webkit.org/show_bug.cgi?id=143854.
<rdar://problem/20284766>

Reviewed by Brent Fulgham.

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls): Don't wrap any text.
(audio::-webkit-media-controls-time-remaining-display): Also increase remaining time display width by 1.
(audio::-webkit-media-controls-time-remaining-display.five-digit-time): Ditto.
(audio::-webkit-media-controls-time-remaining-display.six-digit-time): Ditto.

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

4 years agoAdd assertions to make sure ActiveDOMObject::suspend() / resume() / stop() overrides...
cdumez@apple.com [Thu, 16 Apr 2015 23:41:27 +0000 (23:41 +0000)]
Add assertions to make sure ActiveDOMObject::suspend() / resume() / stop() overrides don't fire events
https://bugs.webkit.org/show_bug.cgi?id=143850

Reviewed by Alexey Proskuryakov.

Add assertions to make sure ActiveDOMObject::suspend() / resume() / stop()
overrides don't fire events as this is not allowed. This would cause
arbitrary JS execution which would be very dangerous in these stages.

Firing JS events from these functions is a common source of crashes.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::suspend):
(WebCore::WebSocket::resume):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::suspend):
(WebCore::XMLHttpRequest::resume):
(WebCore::XMLHttpRequest::stop):

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

4 years agoRemoved unused WKUserContentFilterRef.
achristensen@apple.com [Thu, 16 Apr 2015 23:41:22 +0000 (23:41 +0000)]
Removed unused WKUserContentFilterRef.
https://bugs.webkit.org/show_bug.cgi?id=143852

Reviewed by Sam Weinig.

Source/WebKit2:

* Shared/WebCompiledContentExtension.cpp:
(WebKit::LegacyContentExtensionCompilationClient::LegacyContentExtensionCompilationClient): Deleted.
(WebKit::LegacyContentExtensionCompilationClient::writeBytecode): Deleted.
(WebKit::LegacyContentExtensionCompilationClient::writeActions): Deleted.
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData): Deleted.
* Shared/WebCompiledContentExtension.h:
* UIProcess/API/C/WKUserContentFilterRef.cpp: Removed.
* UIProcess/API/C/WKUserContentFilterRef.h: Removed.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.h:
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/_WKUserContentExtensionStore.mm:
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformResetPreferencesToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):

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

4 years agoSpeculative fix after r182915
benjamin@webkit.org [Thu, 16 Apr 2015 23:28:21 +0000 (23:28 +0000)]
Speculative fix after r182915
https://bugs.webkit.org/show_bug.cgi?id=143404

Patch by Geoffrey Garen <ggaren@apple.com> on 2015-04-16
Reviewed by Alexey Proskuryakov.

* runtime/SymbolConstructor.h:

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

4 years agoRubber-stamped by Tim Horton.
bdakin@apple.com [Thu, 16 Apr 2015 23:22:12 +0000 (23:22 +0000)]
Rubber-stamped by Tim Horton.

Fixing a small mistake in http://trac.webkit.org/changeset/182912 which should
make sure to use the most up-to-date pressure information when setting the force
on a WebMouseEvent.

* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):

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

4 years agoFixed some typos in a comment.
mark.lam@apple.com [Thu, 16 Apr 2015 23:21:01 +0000 (23:21 +0000)]
Fixed some typos in a comment.

Not reviewed.

* dfg/DFGGenerationInfo.h:

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

4 years agoMedia element can manipulate DOM during Document destruction.
ap@apple.com [Thu, 16 Apr 2015 23:04:00 +0000 (23:04 +0000)]
Media element can manipulate DOM during Document destruction.
rdar://problem/20553898 and https://bugs.webkit.org/show_bug.cgi?id=143780

Patch by Brady Eidson <beidson@apple.com> on 2015-04-16
Reviewed by Jer Noble.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureMediaControls): Bail if the element has no active document.

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

4 years agoUnreviewed. Adding myself as a commiter in contributers.json.
jacob_nielsen@apple.com [Thu, 16 Apr 2015 22:58:22 +0000 (22:58 +0000)]
Unreviewed. Adding myself as a commiter in contributers.json.

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

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

4 years agoIt is very hard to attach a debugger to WebProcess to debug tests
ap@apple.com [Thu, 16 Apr 2015 22:54:46 +0000 (22:54 +0000)]
It is very hard to attach a debugger to WebProcess to debug tests
https://bugs.webkit.org/show_bug.cgi?id=143837

Reviewed by Chris Dumez.

--no-timeout used to only affect waitUntilDone timeout, but not IPC timeout in
WebKitTestRunner, and not pipe reading timeout in run-webkit-tests.

Now it disables all timeouts in tools, as is best for debugging tests.

* Scripts/webkitpy/port/driver.py: (Driver.run_test): Respect --no-timeout, so
that the script doesn't terminate DRT/WKTR when there is no output for a long time.

* WebKitTestRunner/Options.cpp: Removed --no-timeout-at-all, as --no-timeout
now has the same functionality.

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

4 years ago[ES6] Implement Symbol.for and Symbol.keyFor
utatane.tea@gmail.com [Thu, 16 Apr 2015 22:46:35 +0000 (22:46 +0000)]
[ES6] Implement Symbol.for and Symbol.keyFor
https://bugs.webkit.org/show_bug.cgi?id=143404

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch implements Symbol.for and Symbol.keyFor.
SymbolRegistry maintains registered StringImpl* symbols.
And to make this mapping enabled over realms,
VM owns this mapping (not JSGlobalObject).

While there's Default AtomicStringTable per thread,
SymbolRegistry should not exist over VMs.
So everytime VM is created, SymbolRegistry is also created.

In SymbolRegistry implementation, we don't leverage WeakGCMap (or weak reference design).
Theres are several reasons.
1. StringImpl* which represents identity of Symbols is not GC-managed object.
   So we cannot use WeakGCMap directly.
   While Symbol* is GC-managed object, holding weak reference to Symbol* doesn't maintain JS symbols (exposed primitive values to users) liveness,
   because distinct Symbol* can exist.
   Distinct Symbol* means the Symbol* object that pointer value (Symbol*) is different from weakly referenced Symbol* but held StringImpl* is the same.

2. We don't use WTF::WeakPtr. If we add WeakPtrFactory into StringImpl's member, we can track StringImpl*'s liveness by WeakPtr.
   However there's problem about when we prune staled entries in SymbolRegistry.
   Since the memory allocated for the Symbol is typically occupied by allocated symbolized StringImpl*'s content,
   and it is not in GC-heap.
   While heavily registering Symbols and storing StringImpl* into SymbolRegistry, Heap's EdenSpace is not so occupied.
   So GC typically attempt to perform EdenCollection, and it doesn't call WeakGCMap's pruleStaleEntries callback.
   As a result, before pruning staled entries in SymbolRegistry, fast malloc-ed memory fills up the system memory.

So instead of using Weak reference, we take relatively easy design.
When we register symbolized StringImpl* into SymbolRegistry, symbolized StringImpl* is aware of that.
And when destructing it, it removes its reference from SymbolRegistry as if atomic StringImpl do so with AtomicStringTable.

* CMakeLists.txt:
* DerivedSources.make:
* runtime/SymbolConstructor.cpp:
(JSC::SymbolConstructor::getOwnPropertySlot):
(JSC::symbolConstructorFor):
(JSC::symbolConstructorKeyFor):
* runtime/SymbolConstructor.h:
* runtime/VM.cpp:
* runtime/VM.h:
(JSC::VM::symbolRegistry):
* tests/stress/symbol-registry.js: Added.
(test):

Source/WTF:

When we register symbolized StringImpl* into SymbolRegistry, symbolized StringImpl* is aware of that.
And when destructing it, it removes its reference from SymbolRegistry as if atomic StringImpl do so with AtomicStringTable.
While AtomicStringTable (in WebCore case) exists in thread local storage,
SymbolRegistry exists per VM and StringImpl* has a reference to the registered SymbolRegistry.

Since StringImpl has isSymbol etc. members, it's class is aware of Symbol use cases.
So introduce SymbolRegistry in WTF layers as if AtomicStringTable.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::addSlowCase):
(WTF::AtomicString::findSlowCase):
(WTF::AtomicString::findInternal):
(WTF::AtomicString::find): Deleted.
* wtf/text/AtomicString.h:
(WTF::AtomicString::find):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createSymbol):
(WTF::StringImpl::createSymbolEmpty):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::extractFoldedStringInSymbol):
(WTF::StringImpl::symbolRegistry):
(WTF::StringImpl::createSymbolEmpty): Deleted.
* wtf/text/SymbolRegistry.cpp: Copied from Source/JavaScriptCore/runtime/SymbolConstructor.h.
(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):
(WTF::SymbolRegistry::remove):
* wtf/text/SymbolRegistry.h: Added.
(WTF::SymbolRegistryKey::hash):
(WTF::SymbolRegistryKey::impl):
(WTF::SymbolRegistryKey::isHashTableDeletedValue):
(WTF::SymbolRegistryKey::hashTableDeletedValue):
(WTF::DefaultHash<SymbolRegistryKey>::Hash::hash):
(WTF::DefaultHash<SymbolRegistryKey>::Hash::equal):
(WTF::HashTraits<SymbolRegistryKey>::isEmptyValue):
(WTF::SymbolRegistryKey::SymbolRegistryKey):

LayoutTests:

Add tests to check Symbol's identity over different realms.

* js/dom/cross-frame-symbols-expected.txt: Added.
* js/dom/cross-frame-symbols.html: Added.
* js/dom/script-tests/cross-frame-symbols.js: Added.

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

4 years ago[iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager...
jer.noble@apple.com [Thu, 16 Apr 2015 22:42:58 +0000 (22:42 +0000)]
[iOS] When simultaneously exiting-and-entering fullscreen, WebVideoFullscreenManager/Proxy becomes confused about what video element it represents.
https://bugs.webkit.org/show_bug.cgi?id=143680

Reviewed by Simon Fraser.

Source/WebCore:

Add getters for the video's fullscreen layer, and be more tolerant about the order in which setVideoElement() and
setWebVideoFullscreenInterface are called.

* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::videoFullscreenLayer): Added simple getter.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenModelVideoElement.h:
(WebCore::WebVideoFullscreenModelVideoElement::videoElement): Added simple getter.
(WebCore::WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Deleted. Moved to .mm file.
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::WebVideoFullscreenModelVideoElement): Initialize ivars in the .h file.
(WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Call those methods skipped in setVideoElement()
    if m_videoFullscreenInterface had not yet been set.
(WebVideoFullscreenModelVideoElement::setVideoElement): Null-check m_videoFullscreenInterface.

Source/WebKit2:

The original assumption of WebVideoFullscreenManager and -Proxy was that the two classes would represent a
single video element and its full screen state. With multiple animations in and out of fullscreen combined with
multiple fullscreen modes, this assumption no longer holds true.

Rather than having a WebVideoFullscreenManager which /isa/ WebVideoFullscreenModelVideoElement, the manager now
/hasa/ WebVideoFullscreenModelVideoElement (or has many such models). Ditto for WebVideoFullscreenManager and
WebVideoFullscreenInterfaceAVKit. The WebVideoFullscreenInterfaceAVKit still needs a WebVideoFullscreenModel to
communicate with, so a new wrapper class is used for that purpose, WebVideoFullscreenModelContext. Ditto for
WebVideoFullscreenModelVideoElement and the new class WebVideoFullscreenInterfaceContext. These context classes
are paired and share a contextId, allowing the manager and its proxy to route messages between the UIProcess's
WebVideoFullscreenInterfaceAVKit to-and-from the WebProcess's WebVideoFullscreenModelVideoElement.

Both the WebVideoFullscreenModelContext and the WebVideoFullscreenInterfaceContext take a back-pointer to their
manager or manager proxy, and each method on the context simply calls the matching method on the manager and
passes its contextId as a parameter.

Both the WebVideoFullscreenManager and the WebVideoFullscreenManagerProxy pass that contextId in each of their
cross-process messages.

On the other side, the manager and proxy also have a map between contextIds and their matching
WebVideoFullscreenModelVideoElement (in the case of WebVideoFullscreenManager) or
WebVideoFullscreenInterfaceAVKit (in the case of WebVideoFullscreenManagerProxy).

While this change is large by LoC, it is almost entirely boilerplate.  The new and interesting pieces are these:

* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy): No longer a WebVideoFullscreenInterfaceAVKit.
(WebKit::WebVideoFullscreenManagerProxy::invalidate): Walk through the models and interfaces, invalidating each.
(WebKit::WebVideoFullscreenManagerProxy::createModelAndInterface): Added. Return a new model and interface tuple.
(WebKit::WebVideoFullscreenManagerProxy::ensureModelAndInterface): Added. Lazily create, and add to the m_contextMap
    a new model and interface object.
(WebKit::WebVideoFullscreenManagerProxy::ensureModel): Return the model half of ensureModelAndInterface().
(WebKit::WebVideoFullscreenManagerProxy::ensureInterface): Return the interface half of ensureModelAndInterface().
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreen): Walk through the outstanding interface objects, and if
    any have a fullscreen mode which matches the about-to-be-fullscreen interface, request that that other interface
    exit fullscreen.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::nextContextId): Static, incrementing counter used as a contextId source.
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): No longer a WebVideoFullscreenModelVideoElement.
(WebKit::WebVideoFullscreenManager::~WebVideoFullscreenManager): Walk through the models and interfaces, invalidating each.
(WebKit::WebVideoFullscreenManager::ensureModelAndInterface): Added. Return a new model and interface tuple.
(WebKit::WebVideoFullscreenManager::ensureModelAndInterface):  Added. Lazily create, and add to the m_contextMap
    a new model and interface object.
(WebKit::WebVideoFullscreenManager::ensureModel): Return the model half of ensureModelAndInterface().
(WebKit::WebVideoFullscreenManager::ensureInterface): Return the interface half of ensureModelAndInterface().

New classes and methods which just forward on to their owning objects:

* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
(WebKit::WebVideoFullscreenModelContext::create):
(WebKit::WebVideoFullscreenModelContext::~WebVideoFullscreenModelContext):
(WebKit::WebVideoFullscreenModelContext::invalidate):
(WebKit::WebVideoFullscreenModelContext::layerHost):
(WebKit::WebVideoFullscreenModelContext::setLayerHost):
(WebKit::WebVideoFullscreenModelContext::setInitialVideoLayerFrame):
(WebKit::WebVideoFullscreenModelContext::WebVideoFullscreenModelContext):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenModelContext::play):
(WebKit::WebVideoFullscreenModelContext::pause):
(WebKit::WebVideoFullscreenModelContext::togglePlayState):
(WebKit::WebVideoFullscreenModelContext::beginScrubbing):
(WebKit::WebVideoFullscreenModelContext::endScrubbing):
(WebKit::WebVideoFullscreenModelContext::seekToTime):
(WebKit::WebVideoFullscreenModelContext::fastSeek):
(WebKit::WebVideoFullscreenModelContext::beginScanningForward):
(WebKit::WebVideoFullscreenModelContext::beginScanningBackward):
(WebKit::WebVideoFullscreenModelContext::endScanning):
(WebKit::WebVideoFullscreenModelContext::requestExitFullscreen):
(WebKit::WebVideoFullscreenModelContext::setVideoLayerFrame):
(WebKit::WebVideoFullscreenModelContext::videoLayerFrame):
(WebKit::WebVideoFullscreenModelContext::setVideoLayerGravity):
(WebKit::WebVideoFullscreenModelContext::videoLayerGravity):
(WebKit::WebVideoFullscreenModelContext::selectAudioMediaOption):
(WebKit::WebVideoFullscreenModelContext::selectLegibleMediaOption):
(WebKit::WebVideoFullscreenModelContext::fullscreenModeChanged):
(WebKit::WebVideoFullscreenModelContext::didSetupFullscreen):
(WebKit::WebVideoFullscreenModelContext::didEnterFullscreen):
(WebKit::WebVideoFullscreenModelContext::didExitFullscreen):
(WebKit::WebVideoFullscreenModelContext::didCleanupFullscreen):
(WebKit::WebVideoFullscreenModelContext::fullscreenMayReturnToInline):
* WebProcess/ios/WebVideoFullscreenManager.h:
(WebKit::WebVideoFullscreenInterfaceContext::create):
(WebKit::WebVideoFullscreenInterfaceContext::invalidate):
(WebKit::WebVideoFullscreenInterfaceContext::layerHostingContext):
(WebKit::WebVideoFullscreenInterfaceContext::isAnimating):
(WebKit::WebVideoFullscreenInterfaceContext::setIsAnimating):
(WebKit::WebVideoFullscreenInterfaceContext::targetIsFullscreen):
(WebKit::WebVideoFullscreenInterfaceContext::setTargetIsFullscreen):
(WebKit::WebVideoFullscreenInterfaceContext::fullscreenMode):
(WebKit::WebVideoFullscreenInterfaceContext::setFullscreenMode):
(WebKit::WebVideoFullscreenInterfaceContext::isFullscreen):
(WebKit::WebVideoFullscreenInterfaceContext::setIsFullscreen):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenInterfaceContext::WebVideoFullscreenInterfaceContext):
(WebKit::WebVideoFullscreenInterfaceContext::~WebVideoFullscreenInterfaceContext):
(WebKit::WebVideoFullscreenInterfaceContext::setLayerHostingContext):
(WebKit::WebVideoFullscreenInterfaceContext::resetMediaState):
(WebKit::WebVideoFullscreenInterfaceContext::setDuration):
(WebKit::WebVideoFullscreenInterfaceContext::setCurrentTime):
(WebKit::WebVideoFullscreenInterfaceContext::setBufferedTime):
(WebKit::WebVideoFullscreenInterfaceContext::setRate):
(WebKit::WebVideoFullscreenInterfaceContext::setVideoDimensions):
(WebKit::WebVideoFullscreenInterfaceContext::setSeekableRanges):
(WebKit::WebVideoFullscreenInterfaceContext::setCanPlayFastReverse):
(WebKit::WebVideoFullscreenInterfaceContext::setAudioMediaSelectionOptions):
(WebKit::WebVideoFullscreenInterfaceContext::setLegibleMediaSelectionOptions):
(WebKit::WebVideoFullscreenInterfaceContext::setExternalPlayback):

Cross-process methods which now take a contextId parameter:

* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::resetMediaState):
(WebKit::WebVideoFullscreenManagerProxy::setCurrentTime):
(WebKit::WebVideoFullscreenManagerProxy::setBufferedTime):
(WebKit::WebVideoFullscreenManagerProxy::setVideoDimensions):
(WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
(WebKit::WebVideoFullscreenManagerProxy::setCanPlayFastReverse):
(WebKit::WebVideoFullscreenManagerProxy::setAudioMediaSelectionOptions):
(WebKit::WebVideoFullscreenManagerProxy::setLegibleMediaSelectionOptions):
(WebKit::WebVideoFullscreenManagerProxy::setExternalPlaybackProperties):
(WebKit::WebVideoFullscreenManagerProxy::setDuration):
(WebKit::WebVideoFullscreenManagerProxy::setRate):
(WebKit::WebVideoFullscreenManagerProxy::exitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::cleanupFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::play):
(WebKit::WebVideoFullscreenManagerProxy::pause):
(WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
(WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
(WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
(WebKit::WebVideoFullscreenManagerProxy::seekToTime):
(WebKit::WebVideoFullscreenManagerProxy::fastSeek):
(WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
(WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
(WebKit::WebVideoFullscreenManagerProxy::endScanning):
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
(WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
(WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::videoLayerFrame): Deleted.
(WebKit::WebVideoFullscreenManagerProxy::videoLayerGravity): Deleted.
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenForVideoElement):
(WebKit::WebVideoFullscreenManager::resetMediaState):
(WebKit::WebVideoFullscreenManager::setDuration):
(WebKit::WebVideoFullscreenManager::setCurrentTime):
(WebKit::WebVideoFullscreenManager::setBufferedTime):
(WebKit::WebVideoFullscreenManager::setRate):
(WebKit::WebVideoFullscreenManager::setVideoDimensions):
(WebKit::WebVideoFullscreenManager::setSeekableRanges):
(WebKit::WebVideoFullscreenManager::setCanPlayFastReverse):
(WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
(WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
(WebKit::WebVideoFullscreenManager::setExternalPlayback):
(WebKit::WebVideoFullscreenManager::play):
(WebKit::WebVideoFullscreenManager::pause):
(WebKit::WebVideoFullscreenManager::togglePlayState):
(WebKit::WebVideoFullscreenManager::beginScrubbing):
(WebKit::WebVideoFullscreenManager::endScrubbing):
(WebKit::WebVideoFullscreenManager::seekToTime):
(WebKit::WebVideoFullscreenManager::fastSeek):
(WebKit::WebVideoFullscreenManager::beginScanningForward):
(WebKit::WebVideoFullscreenManager::beginScanningBackward):
(WebKit::WebVideoFullscreenManager::endScanning):
(WebKit::WebVideoFullscreenManager::requestExitFullscreen):
(WebKit::WebVideoFullscreenManager::selectAudioMediaOption):
(WebKit::WebVideoFullscreenManager::selectLegibleMediaOption):
(WebKit::WebVideoFullscreenManager::fullscreenModeChanged):
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
(WebKit::WebVideoFullscreenManager::didEnterFullscreen):
(WebKit::WebVideoFullscreenManager::didExitFullscreen):
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
(WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced):
(WebKit::WebVideoFullscreenManager::exitVideoFullscreen): Deleted.

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

4 years agoForgot to edit this TestExpectation file for
bdakin@apple.com [Thu, 16 Apr 2015 22:29:10 +0000 (22:29 +0000)]
Forgot to edit this TestExpectation file for
http://trac.webkit.org/changeset/182912

* platform/mac-wk1/TestExpectations:

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

4 years agoForce mouse events should go through normal mouse event handling code paths
bdakin@apple.com [Thu, 16 Apr 2015 22:18:35 +0000 (22:18 +0000)]
Force mouse events should go through normal mouse event handling code paths
https://bugs.webkit.org/show_bug.cgi?id=143749
-and corresponding-
rdar://problem/20472895

Reviewed by Dean Jackson.

Source/WebCore:

This patch moves all of the code to dispatch mouseforcedown, mouseforceup, and
mouseforcechanged into normal mouse event dispatching code. This patch leaves
behind the cancel and click events because we plan to remove those, and it also
leaves mouseforcewillbegin because that is necessarily a very different event more
tied to the NSImmediateActionGestureRecognizer than these other events which are
tied to NSResponder’s pressureChangeWithEvent.

New helper functions.
* dom/Document.cpp:
(WebCore::Document::hasListenerTypeForEventType):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::isForceEvent):

Move the code to ensure the force events have listeners in order to fire to
dispatchMouseEvent, and delete the old implementations.
(WebCore::Element::dispatchMouseEvent):
(WebCore::Element::dispatchMouseForceChanged): Deleted.
(WebCore::Element::dispatchMouseForceDown): Deleted.
(WebCore::Element::dispatchMouseForceUp): Deleted.
* dom/Element.h:

Perform a hit test and pipe the events through dispatchMouseEvent().
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseForceEvent):
* page/EventHandler.h:

New types for the new events.
* platform/PlatformEvent.h:

Forward to EventHandler.
* replay/UserInputBridge.cpp:
(WebCore::UserInputBridge::handleMouseForceEvent):
* replay/UserInputBridge.h:

Source/WebKit2:

This patch makes pressureChangeWithEvent create NativeWebMouseEvents with the
NSEventTypePressures that is gets and sends those down to the web process.

Re-name pressureEvent to lastPressureEvent. Now that event can sometimes be an
NSEventTypePressure, the new name makes it clear how the second parameter differs
from the first.
* Shared/NativeWebMouseEvent.h:

New event types for the new types of events.
* Shared/WebEvent.h:
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
* Shared/mac/NativeWebMouseEventMac.mm:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
* Shared/mac/WebEventFactory.h:

All of the square-peg, round-hole problems of massaging the NSEventTypePressures
events into WebMouseEvents is taken care of here.
* Shared/mac/WebEventFactory.mm:
(WebKit::mouseButtonForEvent):
(WebKit::globalPointForEvent):
(WebKit::pointForEvent):
(WebKit::WebEventFactory::createWebMouseEvent):

Instead of calling the old inputDeviceForceDidChange, create a NativeWebMouseEvent
and handle it.
* UIProcess/API/mac/WKView.mm:
(-[WKView pressureChangeWithEvent:]):

Handle the new types.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveEvent):

Can delete inputDeviceForceDidChange since it’s no longer used.
(WebKit::WebPageProxy::inputDeviceForceDidChange): Deleted.
* UIProcess/WebPageProxy.h:

Handle the new types of mouse events properly.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleMouseEvent):

Delete inputDeviceForceDidChange() and m_lastForceStage.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::inputDeviceForceDidChange): Deleted.

Handle new WebEvent types.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

Tools:

Add mouseForceDown/mouseForceUp/mouseForceChanged support to WebKitTestRunner.
Since there is not a way to create an NSEventTypePressure from scratch, we
subclass NSEvent and override all of the critical methods.

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseForceDown):
(WTR::EventSendingController::mouseForceUp):
(WTR::EventSendingController::mouseForceChanged):
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/mac/EventSenderProxy.mm:
(-[EventSenderPressureEvent initAtLocation:globalLocation:stage:pressure:phase:time:eventNumber:]):
(-[EventSenderPressureEvent timestamp]):
(-[EventSenderPressureEvent type]):
(-[EventSenderPressureEvent locationInWindow]):
(-[EventSenderPressureEvent location]):
(-[EventSenderPressureEvent stage]):
(-[EventSenderPressureEvent pressure]):
(-[EventSenderPressureEvent phase]):
(-[EventSenderPressureEvent eventNumber]):
(WTR::EventSenderProxy::mouseForceDown):
(WTR::EventSenderProxy::mouseForceUp):
(WTR::EventSenderProxy::mouseForceChanged):

LayoutTests:

Just a few new tests. More to come.
* fast/events/mouse-force-changed-expected.txt: Added.
* fast/events/mouse-force-changed.html: Added.
* fast/events/mouse-force-down-expected.txt: Added.
* fast/events/mouse-force-down.html: Added.
* fast/events/mouse-force-up-expected.txt: Added.
* fast/events/mouse-force-up.html: Added.

Right now the new tests will only work on Mac 10.10.3 and beyond.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac-mavericks/TestExpectations:
* platform/win/TestExpectations:

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

4 years ago[ES6] Use specific functions for @@iterator functions
utatane.tea@gmail.com [Thu, 16 Apr 2015 21:35:30 +0000 (21:35 +0000)]
[ES6] Use specific functions for @@iterator functions
https://bugs.webkit.org/show_bug.cgi?id=143838

Reviewed by Geoffrey Garen.

In ES6, some methods are defined with the different names.

For example,

Map.prototype[Symbol.iterator] === Map.prototype.entries
Set.prototype[Symbol.iterator] === Set.prototype.values
Array.prototype[Symbol.iterator] === Array.prototype.values
%Arguments%[Symbol.iterator] === Array.prototype.values

However, current implementation creates different function objects per name.
This patch fixes it by setting the object that is used for the other method to @@iterator.
e.g. Setting Array.prototype.values function object to Array.prototype[Symbol.iterator].

And we drop Arguments' iterator implementation and replace Argument[@@iterator] implementation
with Array.prototype.values to conform to the spec.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::JSInjectedScriptHost::iteratorEntries):
* runtime/ArgumentsIteratorConstructor.cpp: Removed.
* runtime/ArgumentsIteratorConstructor.h: Removed.
* runtime/ArgumentsIteratorPrototype.cpp: Removed.
* runtime/ArgumentsIteratorPrototype.h: Removed.
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/ArrayPrototype.h:
* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::put):
(JSC::ClonedArguments::deleteProperty):
(JSC::ClonedArguments::defineOwnProperty):
(JSC::ClonedArguments::materializeSpecials):
* runtime/ClonedArguments.h:
* runtime/CommonIdentifiers.h:
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::overrideThings):
* runtime/GenericArgumentsInlines.h:
(JSC::GenericArguments<Type>::getOwnPropertySlot):
(JSC::GenericArguments<Type>::getOwnPropertyNames):
(JSC::GenericArguments<Type>::put):
(JSC::GenericArguments<Type>::deleteProperty):
(JSC::GenericArguments<Type>::defineOwnProperty):
* runtime/JSArgumentsIterator.cpp: Removed.
* runtime/JSArgumentsIterator.h: Removed.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::arrayProtoValuesFunction):
* runtime/MapPrototype.cpp:
(JSC::MapPrototype::finishCreation):
* runtime/ScopedArguments.cpp:
(JSC::ScopedArguments::overrideThings):
* runtime/SetPrototype.cpp:
(JSC::SetPrototype::finishCreation):
* tests/stress/arguments-iterator.js: Added.
(test):
(testArguments):
* tests/stress/iterator-functions.js: Added.
(test):
(argumentsTests):

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

4 years agoSites with both width=device-width and height=device-height load zoomed out
timothy_horton@apple.com [Thu, 16 Apr 2015 21:24:23 +0000 (21:24 +0000)]
Sites with both width=device-width and height=device-height load zoomed out
https://bugs.webkit.org/show_bug.cgi?id=143795
<rdar://problem/20369671>

Reviewed by Ben Poulain.

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
Some sites specify both width=device-width and height=device-height, and
then lay out to device width but with a large amount of vertically scrollable content
(so, height=device-height was a lie).

In all other cases where we use device-width and device-height, we prefer
width=device-width over height=device-height, but in the code to ignore scaling constraints,
the two paths were completely separate. On sites that specify both, this
resulted in us attempting to zoom out to fit the entire height of the very tall page,
which isn't at all what we wanted. So, ignore height=device-height if a width is specified.

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

4 years agoWeb Inspector: "Log Value" of a value inside of an array, does not log the innermost...
joepeck@webkit.org [Thu, 16 Apr 2015 20:54:31 +0000 (20:54 +0000)]
Web Inspector: "Log Value" of a value inside of an array, does not log the innermost value
https://bugs.webkit.org/show_bug.cgi?id=143793

Reviewed by Brian Burg.

Context menu handlers were being handled in the capturing event phase, so
the outer most handler, instead of the inner most handler, was getting
first access. Change this so the events happen in the bubbling phase.

DOM Nodes may appear inside of Object Trees, for instance when shown
in a collection like an array or set. In an effort to standardize on
"inner most" behavior, change the DOMTreeOutline context handler
to also be in bubbling.

In the rare instances where a node object is in the console but
not displayed in an outline (console.dir(node)), then include a
Copy as HTML context menu like you would expect in a DOM tree.

* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype.ondetach):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):

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

4 years agoWeb Inspector: Allow toggling the edibility of a DOMTreeOutline
joepeck@webkit.org [Thu, 16 Apr 2015 20:32:58 +0000 (20:32 +0000)]
Web Inspector: Allow toggling the edibility of a DOMTreeOutline
https://bugs.webkit.org/show_bug.cgi?id=143814

Reviewed by Brian Burg.

By default a DOMTreeOutline will not be editable, but it will
provide a setter to enable editability for DOMTreeContentViews.

* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
Content Views always have editable DOM trees.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.get editable):
(WebInspector.DOMTreeElement.prototype.onattach):
(WebInspector.DOMTreeElement.prototype.ondelete):
(WebInspector.DOMTreeElement.prototype.onenter):
(WebInspector.DOMTreeElement.prototype.ondblclick):
(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
(WebInspector.DOMTreeElement.prototype._populateTextContextMenu):
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
(WebInspector.DOMTreeElement.prototype._startEditing):
Do not provide editability options for shadow DOM or non-editable DOM tree.

* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
(WebInspector.DOMTreeOutline.prototype.get editable):
(WebInspector.DOMTreeOutline.prototype.set editable):
New state.

* UserInterface/Views/FormattedValue.css:
(.formatted-node > .dom-tree-outline li):
Nodes inside object trees were showing text selection when you right
clicked them. Normal selection is not possible. So force no selection.

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

4 years ago<rdar://problem/20575744> Also include a definition of __NSd_{current deployment...
mitz@apple.com [Thu, 16 Apr 2015 20:32:40 +0000 (20:32 +0000)]
<rdar://problem/20575744> Also include a definition of __NSd_{current deployment target} in WKFoundation.h.

Reviewed by Tim Horton.

* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoAdd JSC_functionOverrides=<overrides file> debugging tool.
mark.lam@apple.com [Thu, 16 Apr 2015 19:59:47 +0000 (19:59 +0000)]
Add JSC_functionOverrides=<overrides file> debugging tool.
https://bugs.webkit.org/show_bug.cgi?id=143717

Reviewed by Geoffrey Garen.

This tool allows us to do runtime replacement of function bodies with alternatives
for debugging purposes.  For example, this is useful when we need to debug VM bugs
which manifest in scripts executing in webpages downloaded from remote servers
that we don't control.  The tool allows us to augment those scripts with logging
or test code to help isolate the bugs.

This tool works by substituting the SourceCode at FunctionExecutable creation
time.  It identifies which SourceCode to substitute by comparing the source
string against keys in a set of key value pairs.

The keys are function body strings defined by 'override' clauses in the overrides
file specified by in the JSC_functionOverrides option.  The values are function
body strings defines by 'with' clauses in the overrides file.
See comment blob at top of FunctionOverrides.cpp on the formatting
of the overrides file.

At FunctionExecutable creation time, if the SourceCode string matches one of the
'override' keys from the overrides file, the tool will replace the SourceCode with
a new one based on the corresponding 'with' value string.  The FunctionExecutable
will then be created with the new SourceCode instead.

Some design decisions:
1. We opted to require that the 'with' clause appear on a separate line than the
   'override' clause because this makes it easier to read and write when the
   'override' clause's function body is single lined and long.

2. The user can use any sequence of characters for the delimiter (except for '{',
   '}' and white space characters) because this ensures that there can always be
   some delimiter pattern that does not appear in the function body in the clause
   e.g. in the body of strings in the JS code.

   '{' and '}' are disallowed because they are used to mark the boundaries of the
   function body string.  White space characters are disallowed because they can
   be error prone (the user may not be able to tell between spaces and tabs).

3. The start and end delimiter must be an identical sequence of characters.

   I had considered allowing the use of complementary characters like <>, [], and
   () for making delimiter pairs like:
       [[[[ ... ]]]]
       <[([( ... )])]>

   But in the end, decided against it because:
   a. These sequences of complementary characters can exists in JS code.
      In contrast, a repeating delimiter like %%%% is unlikely to appear in JS
      code.
   b. It can be error prone for the user to have to type the exact complement
      character for the end delimiter in reverse order.
      In contrast, a repeating delimiter like %%%% is much easier to type and
      less error prone.  Even a sequence like @#$%^ is less error prone than
      a complementary sequence because it can be copy-pasted, and need not be
      typed in reverse order.
   c. It is easier to parse for the same delimiter string for both start and end.

4. The tool does a lot of checks for syntax errors in the overrides file because
   we don't want any overrides to fail silently.  If a syntax error is detected,
   the tool will print an error message and call exit().  This avoids the user
   wasting time doing debugging only to be surprised later that their specified
   overrides did not take effect because of some unnoticed typo.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::link):
* runtime/Executable.h:
* runtime/Options.h:
* tools/FunctionOverrides.cpp: Added.
(JSC::FunctionOverrides::overrides):
(JSC::FunctionOverrides::FunctionOverrides):
(JSC::initializeOverrideInfo):
(JSC::FunctionOverrides::initializeOverrideFor):
(JSC::hasDisallowedCharacters):
(JSC::parseClause):
(JSC::FunctionOverrides::parseOverridesInFile):
* tools/FunctionOverrides.h: Added.

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

4 years agoWeb Inspector: Give DOM Nodes a Context Menu to Log Element to the console
joepeck@webkit.org [Thu, 16 Apr 2015 19:47:41 +0000 (19:47 +0000)]
Web Inspector: Give DOM Nodes a Context Menu to Log Element to the console
https://bugs.webkit.org/show_bug.cgi?id=143813

Reviewed by Brian Burg.

Always give DOM Nodes a "Log Element" context menu to log it to the console.
This will give a $n reference, and is a convenient alternative to $0 or
the now removed $1-$9.

* Localizations/en.lproj/localizedStrings.js:
New "Log Element" and "Selected Element" strings.

* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
(WebInspector.DOMTreeOutline.prototype._updateModifiedNodes):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.revealElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
Always include the "Log Element" context menu/

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNode):
This uses all the defaults.

* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
This enables all the extra behavior.

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