WebKit-https.git
3 years agoFollowup to:
darin@apple.com [Fri, 4 Mar 2016 17:20:46 +0000 (17:20 +0000)]
Followup to:
Remove "virtual" from all lines that have both "virtual" and "override".
https://bugs.webkit.org/show_bug.cgi?id=155005

Reviewed by Geoffrey Garen.

* Scripts/do-webcore-rename: Added more regular expressions to make sure we always
use either override or final, not both, and to remove virtual from all lines that
have both virtual and final.

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

3 years agoREGRESSION (r197541): many tiled drawing tests failing after new "large tile size...
darin@apple.com [Fri, 4 Mar 2016 17:02:25 +0000 (17:02 +0000)]
REGRESSION (r197541): many tiled drawing tests failing after new "large tile size" logic was added
https://bugs.webkit.org/show_bug.cgi?id=155020

* platform/mac-wk2/TestExpectations: Added failure expectations for tiled drawing tests.
* platform/wk2/TestExpectations: Moved some expectations to a more appropriate section in the file.

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

3 years agoInform WebKit and WebCore if a page is controlled by automation.
timothy@apple.com [Fri, 4 Mar 2016 16:55:55 +0000 (16:55 +0000)]
Inform WebKit and WebCore if a page is controlled by automation.

https://bugs.webkit.org/show_bug.cgi?id=154991
rdar://problem/24965784

Reviewed by Joseph Pecoraro.

Source/WebCore:

* page/Page.h:
(WebCore::Page::isControlledByAutomation): Added.
(WebCore::Page::setControlledByAutomation): Added.

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetIsControlledByAutomation):
(WKPageSetControlledByAutomation):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setControlledByAutomation):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isControlledByAutomation):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageIsControlledByAutomation):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::isControlledByAutomation):
(WebKit::WebPage::setControlledByAutomation):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

3 years agoRemove "virtual" from all lines that have both "virtual" and "override".
darin@apple.com [Fri, 4 Mar 2016 16:47:55 +0000 (16:47 +0000)]
Remove "virtual" from all lines that have both "virtual" and "override".
https://bugs.webkit.org/show_bug.cgi?id=155005

Reviewed by Geoffrey Garen.

* Scripts/do-webcore-rename: Added a regular expression to this script to do the job.

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

3 years ago[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in gener...
gskachkov@gmail.com [Fri, 4 Mar 2016 09:52:39 +0000 (09:52 +0000)]
[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in generator.
https://bugs.webkit.org/show_bug.cgi?id=152575

Reviewed by Yusuke Suzuki.

Added support of the 'SuperProperty' in arrow function within of the generator
method of class. Before patch parser  did not recognize that current arrow function
is declated inside of the generator and raise SyntaxError.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::isGeneratorBoundary):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsGenerator):
(JSC::Parser::closestParentOrdinaryFunctionNonLexicalScope):
* tests/stress/arrowfunction-lexical-bind-superproperty.js:

LayoutTests:

* js/arrowfunction-superproperty-expected.txt:
* js/arrowfunction-syntax-errors-expected.txt:
* js/script-tests/arrowfunction-superproperty.js:
* js/script-tests/arrowfunction-syntax-errors.js:

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

3 years agoComposedTreeIterator may traverse slotted nodes multiple times
antti@apple.com [Fri, 4 Mar 2016 09:29:12 +0000 (09:29 +0000)]
ComposedTreeIterator may traverse slotted nodes multiple times
https://bugs.webkit.org/show_bug.cgi?id=154983

Reviewed by Ryosuke Niwa.

Source/WebCore:

Traversal of slotted nodes can escape to real siblings. Those siblings are then traversed again as slotted nodes.

Test: fast/shadow-dom/composed-tree-slots.html

* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::initializeContextStack):
(WebCore::ComposedTreeIterator::traverseNextInShadowTree):
(WebCore::ComposedTreeIterator::traverseNextLeavingContext):
(WebCore::ComposedTreeIterator::advanceInSlot):
* dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::Context::Context):

    Include end iterator to the context.
    For slotted nodes set it up to point to the next sibling of the node.

(WebCore::ComposedTreeIterator::context):
(WebCore::ComposedTreeIterator::traverseNextSkippingChildren):

LayoutTests:

* fast/shadow-dom/composed-tree-slots-expected.txt: Added.
* fast/shadow-dom/composed-tree-slots.html: Added.

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

3 years agoDrop DocumentSharedObjectPool immediately when going into PageCache.
akling@apple.com [Fri, 4 Mar 2016 09:03:00 +0000 (09:03 +0000)]
Drop DocumentSharedObjectPool immediately when going into PageCache.
<https://webkit.org/b/154986>

Reviewed by Antti Koivisto.

The DocumentSharedObjectPool is a weirdly efficient little optimization
that deduplicates ElementData during the first 10s of a Document's lifetime.
While it's up, every ElementData created will persist so it can be used for
deduplication.

If a Document goes into the PageCache while its shared object pool is still
alive, we can just kill it right away. This will sometimes allow us to free
a bunch of ElementData sooner.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setInPageCache):
(WebCore::Document::clearSharedObjectPool):
(WebCore::Document::sharedObjectPoolClearTimerFired): Deleted.
* dom/Document.h:

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

3 years agoRemove PassRefPtr from ThreadableLoader and relatives
youenn.fablet@crf.canon.fr [Fri, 4 Mar 2016 08:27:36 +0000 (08:27 +0000)]
Remove PassRefPtr from ThreadableLoader and relatives
https://bugs.webkit.org/show_bug.cgi?id=154966

Reviewed by Darin Adler.

Covered by existing tests.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::create):
* loader/DocumentThreadableLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* loader/WorkerThreadableLoader.h:

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

3 years agoLet XCode have its own way and also sort the file.
rniwa@webkit.org [Fri, 4 Mar 2016 07:41:45 +0000 (07:41 +0000)]
Let XCode have its own way and also sort the file.

* WebCore.xcodeproj/project.pbxproj:

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

3 years agoDFG/FTL should inline accesses to RegExpObject::m_lastIndex
fpizlo@apple.com [Fri, 4 Mar 2016 06:36:24 +0000 (06:36 +0000)]
DFG/FTL should inline accesses to RegExpObject::m_lastIndex
https://bugs.webkit.org/show_bug.cgi?id=155003

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

The Octane/regexp benchmark sets RegExps' lastIndex a lot. I could imagine this being
something that people want to do. Right now, I'm not convinced that making the RegExp object
be more plain-JS would be a good idea considering that pretty much all uses of it will
require some special compiler magic. Also, it's good that this patch teaches the compiler
how to reason about lastIndex since some of my other plans for regexp involve having the
compiler treat more regexp stuff as intrinsic.

This is a smaller Octane/regexp speed-up than I hoped - maybe around 1%. It's an enormous
speed-up on the microbenchmarks attached to this patch.

* dfg/DFGAbstractHeap.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePutAccessorByVal):
(JSC::DFG::SpeculativeJIT::compileGetRegExpObjectLastIndex):
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLAbstractHeapRepository.cpp:
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileStringReplace):
(JSC::FTL::DFG::LowerDFGToB3::compileGetRegExpObjectLastIndex):
(JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex):
(JSC::FTL::DFG::LowerDFGToB3::didOverflowStack):
(JSC::FTL::DFG::LowerDFGToB3::lowObject):
(JSC::FTL::DFG::LowerDFGToB3::lowRegExpObject):
(JSC::FTL::DFG::LowerDFGToB3::lowString):
* runtime/RegExpObject.h:
(JSC::RegExpObject::createStructure):
(JSC::RegExpObject::offsetOfLastIndex):

LayoutTests:

* js/regress/regexp-last-index-expected.txt: Added.
* js/regress/regexp-last-index.html: Added.
* js/regress/regexp-set-last-index-expected.txt: Added.
* js/regress/regexp-set-last-index.html: Added.
* js/regress/script-tests/regexp-last-index.js: Added.
* js/regress/script-tests/regexp-set-last-index.js: Added.

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

3 years agoRegression(r196770): Unable to use HipChat Mac app
cdumez@apple.com [Fri, 4 Mar 2016 06:00:02 +0000 (06:00 +0000)]
Regression(r196770): Unable to use HipChat Mac app
https://bugs.webkit.org/show_bug.cgi?id=154999
<rdar://problem/24931959>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Add a setter to PutPropertySlot to override the 'isStrictMode' flag.

* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setStrictMode):

Source/WebCore:

r196770 made [Unforgeable] operations such as Location.reload()
non-writable as per the Web IDL specification. As a result,
trying to set such properties will be ignored in non-strict
mode and will throw an exception is strict mode. This also matches
Firefox and Chrome.

However, this broke the HipChat Mac App (the Web App seems fine)
because it sets Location.reload() and is using strict mode, therefore
causing an exception to be thrown.

This patch adds a quirk to JSLocation::putDelegate() which disable
strict mode when we detect that the application is HipChat. As a
result, we no longer throw when HipChat tries to set Location.reload
and the application is able to connect again.

* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::putDelegate):
Add a quirk which disables strict mode if the application is HipChat.

* platform/RuntimeApplicationChecks.cpp:
(WebCore::mainBundleIdentifier):
Extract this from mainBundleIsEqualTo() so it can be shared with
applicationBundleIdentifier().

(WebCore::applicationBundleIdentifier):
Returns the application bundle identifier, which is a static variable.
For the WebContent / Networking processes, the application bundle
identifier gets set to the UIProcess bundle identifier upon
initialization. If unset, we fall back to using mainBundleIdentifier()
which will do the right thing for the WK2 UIProcess and WK1.

(WebCore::mainBundleIsEqualTo):
Extract part of the code to mainBundleIdentifier() to better share
code.

(WebCore::applicationIsHipChat):
Add utility function that checks if the application is HipChat. This
will do the right thing whether it is called from the UIProcess, the
WebProcess or the UIProcess.

(WebCore::setApplicationBundleIdentifier):
Add utility function to set the application bundle identifier. It gets
called with the UIProcess bundle identifier by the NetworkProcess and
the WebProcess upon initialization.

* platform/RuntimeApplicationChecks.h:

Source/WebKit2:

Have the NetworkProcess and the WebProcess pass the UIProcess bundle
identifier to WebCore so that we can do app detection of applications
using a WK2 WebView (such as HipChat).

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

3 years agoUnreviewed, remove test with flaky timeout that doesn't test anything anymore. This...
fpizlo@apple.com [Fri, 4 Mar 2016 05:49:23 +0000 (05:49 +0000)]
Unreviewed, remove test with flaky timeout that doesn't test anything anymore. This test
was relevant back when arguments got torn off; something that we don't do anymore. It
uses a loop that waits for the top-tier compiler to compile it. We don't write tests
like that anymore.

* js/dfg-osr-exit-between-create-and-tearoff-arguments-expected.txt: Removed.
* js/dfg-osr-exit-between-create-and-tearoff-arguments.html: Removed.
* js/script-tests/dfg-osr-exit-between-create-and-tearoff-arguments.js: Removed.

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

3 years ago[JSC] Add support for MADD, MSUB and MNEG to Air
commit-queue@webkit.org [Fri, 4 Mar 2016 04:40:17 +0000 (04:40 +0000)]
[JSC] Add support for MADD, MSUB and MNEG to Air
https://bugs.webkit.org/show_bug.cgi?id=154997

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

ARM64 can do an Add/Sub in the Multiply units.
LLVM was doing so but we lost that when switching to B3.

This patch adds those instructions in Air.

There are more ALUs than multiply units, thus we are more
likely to successfully schedule a Multiply+Add than 2 Multiply.
I am conservative and only emit a multiply-add if the value
can be interned. As far as I can tell from what is generated
by LLVM, that backend had the same rule.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::multiplyAdd32):
(JSC::MacroAssemblerARM64::multiplySub32):
(JSC::MacroAssemblerARM64::multiplyNeg32):
(JSC::MacroAssemblerARM64::multiplyAdd64):
(JSC::MacroAssemblerARM64::multiplySub64):
(JSC::MacroAssemblerARM64::multiplyNeg64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::populateWithInterestingValues):
(JSC::B3::floatingPointOperands):
(JSC::B3::int64Operands):
(JSC::B3::int32Operands):
(JSC::B3::testMulAddArgsLeft):
(JSC::B3::testMulAddArgsRight):
(JSC::B3::testMulAddArgsLeft32):
(JSC::B3::testMulAddArgsRight32):
(JSC::B3::testMulSubArgsLeft):
(JSC::B3::testMulSubArgsRight):
(JSC::B3::testMulSubArgsLeft32):
(JSC::B3::testMulSubArgsRight32):
(JSC::B3::testMulNegArgs):
(JSC::B3::testMulNegArgs32):
(JSC::B3::run):

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

3 years agoUnreviewed, rolling in r197174.
ggaren@apple.com [Fri, 4 Mar 2016 04:02:25 +0000 (04:02 +0000)]
Unreviewed, rolling in r197174.
https://bugs.webkit.org/show_bug.cgi?id=154762

The right calculation for alignment is actually:

    vmAlignment - getpagesize() + vmSize

instead of:

    vmAlignment - vmPageSize + vmSize

The vmPageSize might be larger than getpagesize().

Restored changeset:

"bmalloc: Added a fast XLarge allocator"
https://bugs.webkit.org/show_bug.cgi?id=154720
http://trac.webkit.org/changeset/197174

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

3 years ago[ES6] Implement Proxy.[[SetPrototypeOf]]
sbarati@apple.com [Fri, 4 Mar 2016 03:43:06 +0000 (03:43 +0000)]
[ES6] Implement Proxy.[[SetPrototypeOf]]
https://bugs.webkit.org/show_bug.cgi?id=154931

Reviewed by Ryosuke Niwa.

This patch is a straight forward implementation of Proxy.[[SetPrototypeOf]]
with respect to section 9.5.2 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v

* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::put):
(JSC::ProxyObject::getGenericPropertyNames):
(JSC::ProxyObject::performSetPrototype):
(JSC::ProxyObject::setPrototype):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-set-prototype-of.js: Added.
(assert):
(throw.new.Error.let.handler.get setPrototypeOf):
(throw.new.Error.set let):
(throw.new.Error.set catch):
(throw.new.Error):
(assert.let.handler.setPrototypeOf):
(assert.set let):
(assert.set catch):
(let.handler.setPrototypeOf):
(set let):
(set catch):

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

3 years agoJSArrayBuffers should be collected less aggressively
keith_miller@apple.com [Fri, 4 Mar 2016 03:19:11 +0000 (03:19 +0000)]
JSArrayBuffers should be collected less aggressively
https://bugs.webkit.org/show_bug.cgi?id=154982

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

We are currently too aggressive in our collection of ArrayBuffer wrappers.
There are three cases where we need to avoid collecting ArrayBuffer wrappers.
1. If the wrapper has custom properties.
2. If the wrapper is a subclass of ArrayBuffer.
3. If the wrapper is in a WeakMap/WeakSet.

Currently, we only pass the first case in WebCore and none in the jsc CLI.
This patch removes some optimizations that cause us to collect when we
should not. Namely, always skipping the object unless it has custom
properties. Additionally, in the case of subclassing, we also need a way
for custom JSArrayBuffer objects to register themselves as the wrapper for
an ArrayBuffer class.

Finally, this patch fixes an issue where views would not mark their ArrayBuffer
as an opaque root. This patch also moves an associated ASSERT that the
ArrayBuffer held by a view is not null in JSGenericTypedArrayView::visitChildren
into JSArrayBufferView::visitChildren, where we add the opaque root.

* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::finishCreation):
(JSC::JSArrayBuffer::create):
(JSC::JSArrayBuffer::createWithoutWrapping):
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::visitChildren):
* runtime/JSArrayBufferView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren): Deleted.
* runtime/SimpleTypedArrayController.cpp:
(JSC::SimpleTypedArrayController::toJS):
(JSC::SimpleTypedArrayController::registerWrapper):
(JSC::SimpleTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(JSC::SimpleTypedArrayController::JSArrayBufferOwner::finalize):
* runtime/SimpleTypedArrayController.h:
* runtime/TypedArrayController.h:

Source/WebCore:

We are currently too aggressive in our collection of ArrayBuffer wrappers.
There are three cases where we need to avoid collecting ArrayBuffer wrappers.
1. If the wrapper has custom properties.
2. If the wrapper is a subclass of ArrayBuffer.
3. If the wrapper is in a WeakMap/WeakSet.

Currently, we only pass the first case in WebCore and none in the jsc CLI.
This patch removes some optimizations that cause us to collect when we
should not. Namely, always skipping the object unless it has custom
properties. Additionally, in the case of subclassing, we also need a way
for custom JSArrayBuffer objects to register themselves as the wrapper for
an ArrayBuffer class.

Finally, this patch removes an unnecessary ref() and deref() of
ArrayBuffer objects during the creation/destruction of the wrapper.
Since an ArrayBuffer object's GC lifetime will be at least as long
as the lifetime of the wrapper we are creating for it we don't need
to ref() and deref() the ArrayBuffer object. This lifetime is
guaranteed because ArrayBuffer objects are both GCed and refcounted
and any new wrapper will visit the ArrayBuffer object as long as the
wrapper is still alive.

Test: js/arraybuffer-wrappers.html

* bindings/js/JSDOMBinding.h:
(WebCore::toJS):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::registerWrapper):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): Deleted.
* bindings/js/WebCoreTypedArrayController.h:

LayoutTests:

* js/arraybuffer-wrappers-expected.txt: Added.
* js/arraybuffer-wrappers.html: Added.
* js/script-tests/arraybuffer-wrappers.js: Added.
(prototype.types.forEach):

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

3 years agoOctane/regexp's Exec function should benefit from array length accessor inlining
fpizlo@apple.com [Fri, 4 Mar 2016 02:43:53 +0000 (02:43 +0000)]
Octane/regexp's Exec function should benefit from array length accessor inlining
https://bugs.webkit.org/show_bug.cgi?id=154994

Reviewed by Benjamin Poulain.

It does:

    var thingy = blahbitty.blah;
    if (thingy)
        foo = thingy.length;

So, 'thingy' is SpecArray | SpecOther, which prevents the array length accessor inlining from
kicking in. Our strategy for this elsewhere in the DFG is to allow a one-time speculation that
we won't see SpecOther, since *usually* we see SpecOther mixed with other stuff in cases like
this where there is some null check guarding the code.

This gives another slight speed-up on Octane/regexp.

* bytecode/SpeculatedType.h:
(JSC::isCellSpeculation):
(JSC::isCellOrOtherSpeculation):
(JSC::isNotCellSpeculation):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateCell):
(JSC::DFG::Node::shouldSpeculateCellOrOther):
(JSC::DFG::Node::shouldSpeculateNotCell):

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

3 years agoUse larger tiles when possible to reduce per-tile painting overhead
simon.fraser@apple.com [Fri, 4 Mar 2016 02:26:49 +0000 (02:26 +0000)]
Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=154985
rdar://problem/23635219

Reviewed by Tim Horton.
Source/WebCore:

There's no reason to use lots of 512x512 tiles on a non-scrollable page. We can reduce
per-tile painting overhead by using one big tile. On vertically scrolling pages, we
can also use wide tiles to reduce tile-crossing when painting. Have FrameView tell
the TiledBacking about scrollability, allowing TileController to make tile size decisions.

Change the "giant tile" code path to just return whether Settings says we're in giant
tile mode, so that tile size decisions can be made in TileController.

TileController now stores a single margin size, and a per-edge margin flag rather than a size
per edge. It computes tile size based on scrollability, but adjusts tile size with some
hysteresis to avoid size thrashing for content that frequently resizes the document (e.g.
some performance tests).

TileGrid stores a copy of the tile size, so that it remains unchanged from one revalidate
to the next, and the grid can detect when the tile size changes, since it needs to throw away
all tiles in that case.

Tests: tiled-drawing/tile-size-both-scrollable.html
       tiled-drawing/tile-size-horizontally-scrollable.html
       tiled-drawing/tile-size-unscrollable.html
       tiled-drawing/tile-size-vertically-scrollable.html

* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::addedOrRemovedScrollbar):
(WebCore::FrameView::willStartLiveResize): Tell the tile backing when live resize starts and stops.
(WebCore::FrameView::willEndLiveResize):
* platform/graphics/EdgeSet.h: Added. Template class that just stores some value
per edge.
(WebCore::EdgeSet::EdgeSet):
(WebCore::EdgeSet::top):
(WebCore::EdgeSet::setTop):
(WebCore::EdgeSet::right):
(WebCore::EdgeSet::setRight):
(WebCore::EdgeSet::bottom):
(WebCore::EdgeSet::setBottom):
(WebCore::EdgeSet::left):
(WebCore::EdgeSet::setLeft):
(WebCore::EdgeSet::operator==):
(WebCore::EdgeSet::operator!=):
* platform/graphics/GraphicsLayerClient.h: Rather than have the client return the
tile size, have it return whether we're in giant tile mode.
(WebCore::GraphicsLayerClient::useGiantTiles):
(WebCore::GraphicsLayerClient::tileSize): Deleted.
* platform/graphics/TiledBacking.h:
(WebCore::defaultTileSize): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerUseGiantTiles):
(WebCore::GraphicsLayerCA::platformCALayerTileSize): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerUseGiantTiles):
(WebCore::PlatformCALayerClient::platformCALayerTileSize): Deleted.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
(WebCore::TileController::setScrollability):
(WebCore::TileController::willStartLiveResize):
(WebCore::TileController::didEndLiveResize):
(WebCore::TileController::tileSize):
(WebCore::TileController::setHasMargins):
(WebCore::TileController::setMarginSize):
(WebCore::TileController::hasMargins):
(WebCore::TileController::hasHorizontalMargins):
(WebCore::TileController::hasVerticalMargins):
(WebCore::TileController::topMarginHeight):
(WebCore::TileController::bottomMarginHeight):
(WebCore::TileController::leftMarginWidth):
(WebCore::TileController::rightMarginWidth):
(WebCore::TileController::setTileMargins): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::setNeedsDisplayInRect):
(WebCore::TileGrid::rectForTileIndex):
(WebCore::TileGrid::getTileIndexRangeForRect):
(WebCore::TileGrid::removeAllTiles):
(WebCore::TileGrid::revalidateTiles):
* platform/graphics/ca/TileGrid.h:
(WebCore::TileGrid::tileSize):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):
(WebCore::RenderLayerBacking::useGiantTiles):
(WebCore::RenderLayerBacking::tileSize): Deleted.
* rendering/RenderLayerBacking.h:

Source/WebKit2:

Do a bit of #include cleanup.

* Shared/mac/RemoteLayerBackingStore.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

LayoutTests:

Rebaseline tests with new tile sizes. Add new tests that explicitly test tile size on
pages with different scrollability.

* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-both-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-both-scrollable.html: Added.
* tiled-drawing/tile-size-horizontally-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-horizontally-scrollable.html: Added.
* tiled-drawing/tile-size-unscrollable-expected.txt: Added.
* tiled-drawing/tile-size-unscrollable.html: Added.
* tiled-drawing/tile-size-vertically-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-vertically-scrollable.html: Added.
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

3 years agoFix an image resource URL in tiled scrolling tests
simon.fraser@apple.com [Fri, 4 Mar 2016 02:26:36 +0000 (02:26 +0000)]
Fix an image resource URL in tiled scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=154981

Reviewed by Tim Horton.

These tests had an incorrect url to compositing/resources/simple_image.png.

* tiled-drawing/scrolling/fixed-background/fixed-background-composited-expected.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-composited.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-negative-z-index-fixed-expected.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-negative-z-index-fixed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background.html:
* tiled-drawing/scrolling/fixed-background/fixed-html-background.html:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background.html:

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

3 years agoAdd Proxy tests for exceptions that depend on an object being non-extensible and...
sbarati@apple.com [Fri, 4 Mar 2016 02:25:30 +0000 (02:25 +0000)]
Add Proxy tests for exceptions that depend on an object being non-extensible and having configurable properties
https://bugs.webkit.org/show_bug.cgi?id=154745

Reviewed by Geoffrey Garen.

This patch is mostly an implementation of Proxy.[[OwnPropertyKeys]]
with respect to section 9.5.11 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys

This patch also changes call sites of getOwnPropertyNames and
getPropertyNames to expect that an exception can be thrown.

* dfg/DFGOperations.cpp:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::iteratorEntries):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/IntlObject.cpp:
(JSC::supportedLocales):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::get):
(JSC::JSValue::put):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::getPropertyNames):
(JSC::JSObject::getGenericPropertyNames):
* runtime/JSObject.h:
(JSC::makeIdentifier):
(JSC::createListFromArrayLike):
* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):
* runtime/MapConstructor.cpp:
(JSC::constructMap):
* runtime/ObjectConstructor.cpp:
(JSC::defineProperties):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::ownPropertyKeys):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::getOwnPropertySlotByIndex):
(JSC::ProxyObject::deleteProperty):
(JSC::ProxyObject::deletePropertyByIndex):
(JSC::ProxyObject::defineOwnProperty):
(JSC::ProxyObject::performGetOwnPropertyNames):
(JSC::ProxyObject::getOwnPropertyNames):
(JSC::ProxyObject::getOwnNonIndexPropertyNames):
(JSC::ProxyObject::getStructurePropertyNames):
(JSC::ProxyObject::getGenericPropertyNames):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
(JSC::ProxyObject::create):
(JSC::ProxyObject::createStructure):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::add):
(JSC::Structure::getPropertyNamesFromStructure):
(JSC::Structure::checkConsistency):
(JSC::Structure::canCachePropertyNameEnumerator):
(JSC::Structure::canAccessPropertiesQuicklyForEnumeration):
(JSC::Structure::canAccessPropertiesQuickly): Deleted.
* runtime/Structure.h:
* runtime/WeakMapConstructor.cpp:
(JSC::constructWeakMap):
* tests/es6.yaml:
* tests/stress/proxy-own-keys.js: Added.
(assert):
(throw.new.Error.let.handler.ownKeys):
(throw.new.Error):
(assert.let.handler.get ownKeys):
(assert.let.handler.ownKeys):
(let.handler.ownKeys):
(i.catch):
(shallowEq):
(let.handler.getOwnPropertyDescriptor):
(i.set assert):
(set add):
(set assert):
(set if):

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

3 years agoWeb Inspector: Temporarily hide the TimelineSidebarPanel
timothy@apple.com [Fri, 4 Mar 2016 01:57:29 +0000 (01:57 +0000)]
Web Inspector: Temporarily hide the TimelineSidebarPanel

https://bugs.webkit.org/show_bug.cgi?id=154974
rdar://problem/24956380

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView): Remove _showNavigationSidebarItem and hide the sidebar.

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

3 years agoArray prototype JS builtins should support Symbol.species
keith_miller@apple.com [Fri, 4 Mar 2016 01:56:39 +0000 (01:56 +0000)]
Array prototype JS builtins should support Symbol.species
https://bugs.webkit.org/show_bug.cgi?id=154710

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add support for Symbol.species in the Array.prototype JS
builtin functions.

* builtins/ArrayPrototype.js:
(filter):
(map):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
(JSC::arrayConstructorPrivateFuncIsArrayConstructor):
* runtime/ArrayConstructor.h:
(JSC::ArrayConstructor::create):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tests/stress/array-species-functions.js:
(id):

LayoutTests:

Add test that checks the Array object created by a species
constructor in Array.prototype functions cannot come from a
different global object without subclassing.

* js/array-species-different-globalobjects-expected.txt: Added.
* js/array-species-different-globalobjects.html: Added.

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

3 years ago[ES6] Make Unicode RegExp pattern parsing conform to the spec
msaboff@apple.com [Fri, 4 Mar 2016 01:24:28 +0000 (01:24 +0000)]
[ES6] Make Unicode RegExp pattern parsing conform to the spec
https://bugs.webkit.org/show_bug.cgi?id=154988

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Updated RegExp pattern processing with 'u' (Unicode) flag to conform to the
spec (https://tc39.github.io/ecma262/2016/#sec-patterns).  In the spec, the
grammar is annotated with [U] annotations.  Productions that are prefixed with
[+U] are only available with the Unicode flags while productions prefixed with
[~U] are only available without the Unicode flag.

Added flags argument to Yarr::checkSyntax() so we can catch Unicode flag related
parsing errors at syntax checking time.  Restricted what escapes are available for
non Unicode patterns.  Most of this is defined in the IdentityEscape rule in the
pattern grammar.

Added \- as a CharacterClass only escape in Unicode patterns.

Updated the tests for these changes.

Made changes suggested in https://bugs.webkit.org/show_bug.cgi?id=154842#c22 after
change set r197426 was landed.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegExp):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createRegExp):
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readChecked):
(JSC::Yarr::Interpreter::InputStream::readSurrogatePairChecked):
(JSC::Yarr::Interpreter::InputStream::reread):
(JSC::Yarr::Interpreter::InputStream::uncheckInput):
(JSC::Yarr::Interpreter::InputStream::atStart):
(JSC::Yarr::Interpreter::InputStream::atEnd):
(JSC::Yarr::Interpreter::testCharacterClass):
(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
* yarr/YarrParser.h:
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::isIdentityEscapeAnError):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parse):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::putChar):
(JSC::Yarr::CharacterClassConstructor::putRange):
(JSC::Yarr::CharacterClassConstructor::addSorted):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
* yarr/YarrSyntaxChecker.cpp:
(JSC::Yarr::SyntaxChecker::disjunction):
(JSC::Yarr::checkSyntax):
* yarr/YarrSyntaxChecker.h:

LayoutTests:

Added tests cases.

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:
(shouldThrowInvalidEscape):

[ES6] Add support for Symbol.toPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154877

Reviewed by Saam Barati.

Update test for Symbol.toPrimitive.

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

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

3 years ago[ES6] Implement Proxy.[[DefineOwnProperty]]
sbarati@apple.com [Fri, 4 Mar 2016 01:07:04 +0000 (01:07 +0000)]
[ES6] Implement Proxy.[[DefineOwnProperty]]
https://bugs.webkit.org/show_bug.cgi?id=154759

Reviewed by Geoffrey Garen and Mark Lam.

This patch is a straight forward implementation of Proxy.[[DefineOwnProperty]]
with respect to section 9.5.6 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
(JSC::constructObjectFromPropertyDescriptor):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::isExtensible):
(JSC::ProxyObject::performDefineOwnProperty):
(JSC::ProxyObject::defineOwnProperty):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-define-own-property.js: Added.
(assert):
(throw.new.Error):
(assert.let.handler.get defineProperty):
(assert.let.handler.defineProperty):
(let.handler.defineProperty):
(i.catch):
(assert.try.):
(assert.set get catch):
(assert.let.setter):
(assert.let.getter):
(assert.set get let.handler.defineProperty):
(assert.set get let):
(assert.):

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

3 years agoUse std::make_unique<> when creating std::unique_ptr<>
gyuyoung.kim@webkit.org [Fri, 4 Mar 2016 00:54:21 +0000 (00:54 +0000)]
Use std::make_unique<> when creating std::unique_ptr<>
https://bugs.webkit.org/show_bug.cgi?id=154574

Reviewed by Darin Adler.

* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::open):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createColorChooser):

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

3 years ago[ES6] Add support for Symbol.toPrimitive
keith_miller@apple.com [Fri, 4 Mar 2016 00:47:55 +0000 (00:47 +0000)]
[ES6] Add support for Symbol.toPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154877

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch adds suport for Symbol.toPrimitive. Since we don't currently
generate snippits for one side of a binary operation we only need to change
the JSObject::ToPrimitive function and update some optimizations in the DFG
that need to know how conversions to primitive values should work. As of
ES6, the date prototype is also no longer special cased in the ToPrimitive
operation. Instead, Date.prototype has a Symbol.species function that
replicates the old behavior.

* bytecode/ObjectPropertyConditionSet.cpp:
(JSC::generateConditionsForPropertyMissConcurrently):
* bytecode/ObjectPropertyConditionSet.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::watchConditions):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
* dfg/DFGGraph.h:
* runtime/CommonIdentifiers.h:
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::finishCreation):
(JSC::dateProtoFuncToPrimitiveSymbol):
* runtime/Error.cpp:
(JSC::throwTypeError):
* runtime/Error.h:
* runtime/JSCJSValueInlines.h:
(JSC::toPreferredPrimitiveType):
* runtime/JSObject.cpp:
(JSC::callToPrimitiveFunction):
(JSC::JSObject::ordinaryToPrimitive):
(JSC::JSObject::defaultValue):
(JSC::JSObject::toPrimitive):
(JSC::JSObject::getPrimitiveNumber):
(JSC::callDefaultValueFunction): Deleted.
(JSC::throwTypeError): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::toPrimitive): Deleted.
* runtime/SmallStrings.h:
* runtime/SymbolPrototype.cpp:
(JSC::SymbolPrototype::finishCreation):
* runtime/SymbolPrototype.h:
(JSC::SymbolPrototype::create):
* tests/es6.yaml:
* tests/stress/date-symbol-toprimitive.js: Added.
* tests/stress/ropes-symbol-toprimitive.js: Added.
(ropify):
(String.prototype.Symbol.toPrimitive):
* tests/stress/symbol-toprimitive.js: Added.
(foo.Symbol.toPrimitive):
(catch):

LayoutTests:

Update test for Symbol.toPrimitive.

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

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

3 years agoWeb Inspector: Selected range path component should be zero time corrected
mattbaker@apple.com [Fri, 4 Mar 2016 00:39:41 +0000 (00:39 +0000)]
Web Inspector: Selected range path component should be zero time corrected
https://bugs.webkit.org/show_bug.cgi?id=154950
<rdar://problem/24947022>

Reviewed by Timothy Hatcher.

Subtracts zero time from TimelineRange start and end values, and corrects
a cosmetic issue in TimelineRuler which showed selection handle tooltips
that weren't adjusted for the ruler's zero time.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._updateSelection):

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

3 years agoWeb Inspector: Events and Frames mode switch does not fully switch until first zoom
mattbaker@apple.com [Fri, 4 Mar 2016 00:33:15 +0000 (00:33 +0000)]
Web Inspector: Events and Frames mode switch does not fully switch until first zoom
https://bugs.webkit.org/show_bug.cgi?id=154971
<rdar://problem/24955871>

Reviewed by Timothy Hatcher.

Switching modes toggles the visibility of the tree outline, which changes
the width of the overview's ruler, graphs, and scroll container. When the
view mode changes, the overview needs a forced "resize" layout.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._viewModeDidChange):

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

3 years agoSource/WebCore:
rniwa@webkit.org [Fri, 4 Mar 2016 00:28:44 +0000 (00:28 +0000)]
Source/WebCore:
Disallow custom elements inside a window-less documents
https://bugs.webkit.org/show_bug.cgi?id=154944
<rdar://problem/24944875>

Reviewed by Antti Koivisto.

Disallow custom elements inside a window-less documents such as the shared inert document of template elements
and the ones created by DOMImplementation.createDocument and DOMImplementation.createHTMLDocument.

Throw NotSupportedError in defineCustomElement when it's called in such a document as discussed in:
https://github.com/w3c/webcomponents/issues/369

Tests: fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html
       fast/custom-elements/parser/parser-uses-registry-of-owner-document.html

* bindings/js/JSDOMBinding.cpp:
(WebCore::throwNotSupportedError): Added.
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineCustomElement): Throw NotSupportedError when the context object's document doesn't
have a browsing context (i.e. window-less).
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Replaced a FIXME with an assertion now that we
disallow instantiation of custom elements inside a template element.

LayoutTests:
Disallow custom elements inside template elements and share the registry for windowless documents
https://bugs.webkit.org/show_bug.cgi?id=154944
<rdar://problem/24944875>

Reviewed by Antti Koivisto.

Added various tests to ensure the custom elements registry is not shared between documents with
distinct browsing context (e.g. iframes) but shared among the ones that share a single browsing context
(e.g. documents created by DOMImplementation).

Also added a test case for defineCustomElement to ensure it throws NotSupportedError when it's called on
a template element's inert owner document as well as a basic test case for document.write.

* fast/custom-elements/Document-defineCustomElement-expected.txt:
* fast/custom-elements/Document-defineCustomElement.html: Added a new test case.
* fast/custom-elements/parser/parser-constructs-custom-element-in-document-write-expected.txt: Added.
* fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html: Added.
* fast/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt: Added.
* fast/custom-elements/parser/parser-uses-registry-of-owner-document.html: Added.

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

3 years agoMove SPI to CFNetworkSPI.h
achristensen@apple.com [Fri, 4 Mar 2016 00:26:23 +0000 (00:26 +0000)]
Move SPI to CFNetworkSPI.h
https://bugs.webkit.org/show_bug.cgi?id=154992

Reviewed by Andy Estes.

Source/WebCore:

* platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::applyBasicAuthorizationHeader):

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

3 years agoUse CredentialStorage with NetworkSession
achristensen@apple.com [Fri, 4 Mar 2016 00:21:34 +0000 (00:21 +0000)]
Use CredentialStorage with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154939

Reviewed by Darin Adler.

Source/WebCore:

This makes the credential-based http tests pass when using NetworkSession.

* platform/network/CredentialBase.h:
(WebCore::CredentialBase::encodingRequiresPlatformData):
* platform/network/CredentialStorage.h:
WEBCORE_EXPORT more things that are newly used in WebKit2.

Source/WebKit2:

* config.h:
Added compile-time flag to help us be able to keep track and remove this code when we can.
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::pendingDownloadLocation):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::sessionID):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::applyBasicAuthorizationHeader):
(WebKit::NetworkDataTask::NetworkDataTask):
Use a credential storage and preemptively apply basic authentication headers if we have credentials from the storage.
This is analogous to code in ResourceHandle::createNSURLConnection.

(WebKit::NetworkDataTask::didReceiveChallenge):
Make this look more like ResourceHandle::didReceiveAuthenticationChallenge.
The call to tryPasswordBasedAuthentication was moved from the delegate callback to here.

(WebKit::NetworkDataTask::willPerformHTTPRedirection):
Use credentials from the credential storage if they exist.  This is analogous to code in ResourceHandle::willSendRequest.

(WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
Use credentials from the credential storage if they exist.  This is analogous to code in ResourceHandle::tryHandlePasswordBasedAuthentication.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
If we are given a credential with CredentialPersistenceForSession, put it in the credential storage and give
CFNetwork a credential with CredentialPersistenceNone so it won't automatically be used again until the credential
storage says its ok to use again.  This gives us the ability to clear session credentials when logout credentials are used.
This is analogous to code in ResourceHandle::receivedCredential.

(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkSession::clearCredentials): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearCachedCredentials):
(WebKit::WebProcess::focusedWebPage):
We no longer need to clear credentials from the NSURLSessions because we don't store session credentials in them.
Instead, calling CredentialStorage.clearCredentials is sufficient.

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

3 years ago[GTK] Unreviewed fix after r197505 (Run the run-benchmark script on the performance...
clopez@igalia.com [Thu, 3 Mar 2016 23:57:13 +0000 (23:57 +0000)]
[GTK] Unreviewed fix after r197505 (Run the run-benchmark script on the performance bot.)
https://bugs.webkit.org/show_bug.cgi?id=154595

Unreviewed fix after r197505.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunBenchmarkTests.start):

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

3 years agoSubpixel rendering: Make collapsed borders painting subpixel aware.
zalan@apple.com [Thu, 3 Mar 2016 23:55:52 +0000 (23:55 +0000)]
Subpixel rendering: Make collapsed borders painting subpixel aware.
https://bugs.webkit.org/show_bug.cgi?id=154980

Reviewed by David Hyatt.

This patch enables collapsed borders with odd pixel width paint on subpixel position.
Currently borders with odd pixels are split at integral position so that border-width: 3px;
paints 1px on the left(top) and 2px on the right(bottom) side. With this patch
we paint 1.5px on both sides(on 2x display).

Source/WebCore:

Test: fast/table/hidpi-collapsed-border-with-odd-pixel-width.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):

LayoutTests:

* fast/table/hidpi-collapsed-border-with-odd-pixel-width-expected.html: Added.
* fast/table/hidpi-collapsed-border-with-odd-pixel-width.html: Added.

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

3 years agoAdd unit tests for WTF::OptionSet
dbates@webkit.org [Thu, 3 Mar 2016 23:49:18 +0000 (23:49 +0000)]
Add unit tests for WTF::OptionSet
https://bugs.webkit.org/show_bug.cgi?id=154925
<rdar://problem/24964211>

Reviewed by Darin Adler.

Source/WTF:

* wtf/CMakeLists.txt: Add header OptionSet.h to the list of WTF headers.
* wtf/OptionSet.h: Use in-class initialization to initialize m_storage and declare
the trivial constexpr constructor as default.
(WTF::OptionSet::OptionSet): For convenience add a constructor that takes a std::initializer_list.
This code was written by Anders Carlsson.

Tools:

Add tests to ensure that we do not regress the behavior of WTF::OptionSet.

* TestWebKitAPI/CMakeLists.txt: Add file TestWebKitAPI/Tests/WTF/OptionSet.cpp.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/Tests/WTF/OptionSet.cpp: Added.
(TestWebKitAPI::TEST):

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

3 years agoDFG should be able to compile StringReplace
fpizlo@apple.com [Thu, 3 Mar 2016 23:30:49 +0000 (23:30 +0000)]
DFG should be able to compile StringReplace
https://bugs.webkit.org/show_bug.cgi?id=154979

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Adds support for StringReplace to the DFG tier. This is a 3% speed-up on Octane/regexp.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::speculateRegExpObject):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITOperations.h:

LayoutTests:

Add a microbenchmark for a case of StringReplace that we hadn't covered with a microbenchmark
yet: using something absurd for the replace value. This is interesting for implementing the
32_64 version of StringReplace, which gets really weird in the absurd case because of how it
consumes the entire register file while making the call on x86-32.

* js/regress/script-tests/string-replace-generic.js: Added.
* js/regress/string-replace-generic-expected.txt: Added.
* js/regress/string-replace-generic.html: Added.

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

3 years agoAdd support for the "last" value of hanging-punctuation
hyatt@apple.com [Thu, 3 Mar 2016 21:49:32 +0000 (21:49 +0000)]
Add support for the "last" value of hanging-punctuation
https://bugs.webkit.org/show_bug.cgi?id=154977

Reviewed by Darin Adler and Simon Fraser.

Source/WebCore:

New tests in fast/text.

This patch adds support for the new "last" value and also fixes up both
"first" and "last" to work with leading and trailing whitespace that ends
up getting collapsed away.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::inlineAncestorHasEndBorderPaddingOrMargin):
(WebCore::isLastInFlowRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderText.cpp:
(WebCore::isHangablePunctuationAtLineEnd):
(WebCore::RenderText::hangablePunctuationStartWidth):
(WebCore::RenderText::hangablePunctuationEndWidth):
(WebCore::RenderText::firstCharacterIndexStrippingSpaces):
(WebCore::RenderText::lastCharacterIndexStrippingSpaces):
(WebCore::RenderText::trimmedPrefWidths):
* rendering/RenderText.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):

LayoutTests:

* fast/text/hanging-punctuation-first-and-last-together-expected.html: Added.
* fast/text/hanging-punctuation-first-and-last-together.html: Added.
* fast/text/hanging-punctuation-first-ws-expected.html: Added.
* fast/text/hanging-punctuation-first-ws.html: Added.
* fast/text/hanging-punctuation-last-expected.html: Added.
* fast/text/hanging-punctuation-last-rtl-expected.html: Added.
* fast/text/hanging-punctuation-last-rtl.html: Added.
* fast/text/hanging-punctuation-last-ws-expected.html: Added.
* fast/text/hanging-punctuation-last-ws.html: Added.
* fast/text/hanging-punctuation-last.html: Added.

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

3 years agoAdopt CFNetwork storage partitioning SPI
aestes@apple.com [Thu, 3 Mar 2016 21:46:07 +0000 (21:46 +0000)]
Adopt CFNetwork storage partitioning SPI
https://bugs.webkit.org/show_bug.cgi?id=154957
rdar://problem/23614620

Reviewed by Darin Adler.

Source/WebCore:

Adopt CFNetwork SPI for creating storage partitions. If Settings::cookieStoragePartitioningEnabled() is true,
create cookie storage partitions for third-party contexts. This feature is disabled by default.

No new tests. Test support is tracked by <https://webkit.org/b/154958>.

* page/Settings.cpp:
(WebCore::Settings::setCookieStoragePartitioningEnabled): Controls whether storage partitioning for cookies is enabled.
* page/Settings.h:
(WebCore::Settings::cookieStoragePartitioningEnabled):
* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::cookieStoragePartition): Computes a storage partition identifier by determining the top
privately-controlled domain of the cookie's first-party (main frame document) URL, then determining whether the
cookie's document hostname is a subdomain of it. If is is not, the first-party top domain is the partition name.
Otherwise, there is no partition name.
* platform/network/mac/CookieJarMac.mm:
(WebCore::applyPartitionToCookies): Returns a deep copy of the given cookie array after adding a storage
partition property to each copied cookie.
(WebCore::cookiesInPartitionForURL): Returns cookies for the partition computed by the given URLs. If no
partition can be determined, nil is returned.
(WebCore::cookiesForURL): Returns cookiesInPartitionForURL() if non-nil, otherwise returns wkHTTPCookiesForURL().
(WebCore::cookiesForSession): Started calling cookiesForURL().
(WebCore::setCookiesFromDOM): Called applyPartitionToCookies() if a partition can be computed from the given URLs.
(WebCore::getRawCookies): Started calling cookiesForURL().
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection): Computed the storage partition identifier for the new request.
If non-empty, set it as a property on the NSURLRequest where CFNetwork knows to find it.
* platform/spi/cf/CFNetworkSPI.h: Declare new SPI for building with the public SDK.

Source/WebKit2:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask): Computed the storage partition identifier for the new session task.
If non-empty, set it using a NSURLSessionTask SPI.

Source/WTF:

* wtf/Platform.h: Defined HAVE_CFNETWORK_STORAGE_PARTITIONING.

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

3 years ago[WK2] testRunner.setPrivateBrowsingEnabled doesn't work with NetworkProcess
commit-queue@webkit.org [Thu, 3 Mar 2016 21:25:09 +0000 (21:25 +0000)]
[WK2] testRunner.setPrivateBrowsingEnabled doesn't work with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115274

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

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::destroyPrivateBrowsingSession):
(WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
(WebKit::WebProcess::pluginProcessConnectionManager):
* WebProcess/WebProcess.h:

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

3 years agoWeb Inspector: Assertion Failed: Cannot show timeline because it does not belong...
mattbaker@apple.com [Thu, 3 Mar 2016 20:34:39 +0000 (20:34 +0000)]
Web Inspector: Assertion Failed: Cannot show timeline because it does not belong to the shown recording. – "overview"
https://bugs.webkit.org/show_bug.cgi?id=154972
<rdar://problem/24956233>

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Just show the overview if the recording has no timeline of the given type.

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

3 years agoUpdate image test
jonlee@apple.com [Thu, 3 Mar 2016 20:26:46 +0000 (20:26 +0000)]
Update image test
https://bugs.webkit.org/show_bug.cgi?id=154962

Rubber-stamped by Darin Adler.

* Animometer/tests/master/image-data.html: Make each canvas have a compositing layer.
* Animometer/tests/master/resources/image-data.js:
(initialize): Update to load multiple images serially.
(_loadImage):
(tune): Use display instead of visibility. When showing an element anew, move it somewhere else.
(_createTestElement): Set up the element, refactor out placement of element to _refreshElement.
(_refreshElement): Place element in a tile grid.
(animate):
(_getRandomNeighboringPixelIndex): Use a more conservative distribution to make the effect last a little longer.
* Animometer/tests/master/resources/compass.svg: Added.
* Animometer/tests/master/resources/console.svg: Added.
* Animometer/tests/master/resources/contribute.svg: Added.
* Animometer/tests/master/resources/debugger.svg: Added.
* Animometer/tests/master/resources/inspector.svg: Added.
* Animometer/tests/master/resources/layout.svg: Added.
* Animometer/tests/master/resources/performance.svg: Added.
* Animometer/tests/master/resources/script.svg: Added.
* Animometer/tests/master/resources/shortcuts.svg: Added.
* Animometer/tests/master/resources/standards.svg: Added.
* Animometer/tests/master/resources/storage.svg: Added.
* Animometer/tests/master/resources/styles.svg: Added.
* Animometer/tests/master/resources/timeline.svg: Added.

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

3 years agostorage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html flaky on mac...
beidson@apple.com [Thu, 3 Mar 2016 19:46:25 +0000 (19:46 +0000)]
storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=154747

Reviewed by Alex Christensen.

This callback coming out of order like this is okay, so the test should just allow it.

It makes sense that the flake is WK2-only, since WK1 has a much more well defined order
with thread-hopping versus process-hopping.

* storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
* storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt:
* storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:

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

3 years ago[[SetPrototypeOf]] isn't properly implemented everywhere
sbarati@apple.com [Thu, 3 Mar 2016 19:18:35 +0000 (19:18 +0000)]
[[SetPrototypeOf]] isn't properly implemented everywhere
https://bugs.webkit.org/show_bug.cgi?id=154943

Reviewed by Benjamin Poulain.

We were copy-pasting implememntation bits that belong in OrdinarySetPrototypeOf
in a few different places that call O.[[SetPrototypeOf]](v)
rather than having those bits in OrdinarySetPrototypeOf itself.
We need to put those copy-pasted bits into OrdinarySetPrototypeOf
and not the call sites of O.[[SetPrototypeOf]](v) because
O.[[SetPrototypeOf]](v) won't always call into OrdinarySetPrototypeOf.
This is needed for correctness because this behavior is now observable
with the ES6 Proxy object.

* runtime/ClassInfo.h:
* runtime/JSCell.cpp:
(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototype):
* runtime/JSCell.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::allowsAccessFrom):
* runtime/JSObject.h:
(JSC::JSObject::mayInterceptIndexedAccesses):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSetPrototypeOf):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectSetPrototypeOf):

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

3 years ago[css-grid] Fix order of grid shorthands in CSSPropertyNames.in
rego@igalia.com [Thu, 3 Mar 2016 18:34:11 +0000 (18:34 +0000)]
[css-grid] Fix order of grid shorthands in CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=154915

Reviewed by Darin Adler.

The order of columns and rows in grid and grid-template shorthands
has been swapped recently (r196906 & r196934).
However the order was not updated in CSSPropertyNames.in file.

* css/CSSPropertyNames.in:

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

3 years agostorage/indexeddb/intversion-open-in-upgradeneeded.html is flaky on mac-wk2 debug.
beidson@apple.com [Thu, 3 Mar 2016 18:30:38 +0000 (18:30 +0000)]
storage/indexeddb/intversion-open-in-upgradeneeded.html is flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=154706

Rubberstamped by Alex Christensen.

This test was fixed by http://trac.webkit.org/changeset/197474.

Unskipping it now.

* platform/mac-wk2/TestExpectations:

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

3 years agoAllInOne build fix.
ap@apple.com [Thu, 3 Mar 2016 17:40:57 +0000 (17:40 +0000)]
AllInOne build fix.

* rendering/RenderFlexibleBox.cpp:
* rendering/RenderGrid.cpp:
Don't have two static functions with the same name.

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

3 years agoUnreviewed, rolling out r197442.
commit-queue@webkit.org [Thu, 3 Mar 2016 17:28:27 +0000 (17:28 +0000)]
Unreviewed, rolling out r197442.
https://bugs.webkit.org/show_bug.cgi?id=154967

Broke tests, and also uses a wrong approach (Requested by ap
on #webkit).

Reverted changeset:

"Disable FTL JIT testing on 32-bit JSC tester bots"
https://bugs.webkit.org/show_bug.cgi?id=154858
http://trac.webkit.org/changeset/197442

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

3 years agoDrop [TreatNullAs=EmptyString] from URL interface attributes
cdumez@apple.com [Thu, 3 Mar 2016 17:25:26 +0000 (17:25 +0000)]
Drop [TreatNullAs=EmptyString] from URL interface attributes
https://bugs.webkit.org/show_bug.cgi?id=154951

Reviewed by Darin Adler.

Source/WebCore:

Drop [TreatNullAs=EmptyString] from URL interface attributes to match
the specification:
- https://url.spec.whatwg.org/#api

Firefox and Chrome both already follow the specification and convert
null to the "null" string.

No new tests, already covered by existing tests.

* html/URLUtils.idl:

LayoutTests:

Update existing tests now that URL interface attributes no longer treat
null as the empty string.

* fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hash.html:
* fast/dom/DOMURL/set-href-attribute-host-expected.txt:
* fast/dom/DOMURL/set-href-attribute-host.html:
* fast/dom/DOMURL/set-href-attribute-hostname-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hostname.html:
* fast/dom/DOMURL/set-href-attribute-pathname-expected.txt:
* fast/dom/DOMURL/set-href-attribute-pathname.html:
* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
* fast/dom/DOMURL/set-href-attribute-protocol.html:
* fast/dom/DOMURL/set-href-attribute-search-expected.txt:
* fast/dom/DOMURL/set-href-attribute-search.html:

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

3 years ago[TextureMapper] Use RGBA format for textures attached to framebuffers
commit-queue@webkit.org [Thu, 3 Mar 2016 17:09:49 +0000 (17:09 +0000)]
[TextureMapper] Use RGBA format for textures attached to framebuffers
https://bugs.webkit.org/show_bug.cgi?id=154965

Patch by Miguel Gomez <magomez@igalia.com> on 2016-03-03
Reviewed by Žan Doberšek.

Use RGBA format when allocating textures that will be used as framebuffer
attachments. This means adding a new flag to BitmapTexture and modifying
BitmapTextureGL to use the appropriate format according to the flag. Also,
BitmapTexturePool needs to use two vectors to handle both types of textures
separately, as we want to avoid constantly switching the format of a reused
texture.

No new tests since the behavior change is covered by existing tests.

* platform/graphics/texmap/BitmapTexture.h: Add new flag.
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::BitmapTextureGL): Receive flags on constructor and use RGBA
when the FBOAttachment flag is enabled.
(WebCore::BitmapTextureGL::applyFilters): Use FBOAttachemt flag to request a texture.
* platform/graphics/texmap/BitmapTextureGL.h: Add flags to the constructor.
* platform/graphics/texmap/BitmapTexturePool.cpp: Add a new vector of textures to hold
those in RGBA format.
(WebCore::BitmapTexturePool::acquireTexture): Return a texture for the usage specified
in the incoming flags.
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): Release textures from
both vectors.
(WebCore::BitmapTexturePool::createTexture): Pass the usage flag when creating a new
texture.
* platform/graphics/texmap/BitmapTexturePool.h: Add new texture vector and add flags to
the needed headers.
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool): Pass the received flags to the BitmapTexturePool.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface): Use FBOAttachemt flag to request a texture.

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

3 years ago[GTK] Run the run-benchmark script on the performance bot.
clopez@igalia.com [Thu, 3 Mar 2016 16:40:19 +0000 (16:40 +0000)]
[GTK] Run the run-benchmark script on the performance bot.
https://bugs.webkit.org/show_bug.cgi?id=154595

Reviewed by Carlos Garcia Campos.

* BuildSlaveSupport/build.webkit.org-config/master.cfg: Add new RunBenchmarkTests step on the perf bots (only for the GTK+ port at this moment).
(RunBenchmarkTests):
(RunBenchmarkTests.start):
(RunBenchmarkTests.getText):
(RunBenchmarkTests.getText2):
(BuildAndPerfTestFactory.__init__):
(DownloadAndPerfTestFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add new test for RunBenchmarkTests and update expected steps of GTK+ perf bot.
(RunBenchmarkTest):
(RunBenchmarkTest.assertResults):
(RunBenchmarkTest.test_success):
(RunBenchmarkTest.test_tests_failed):
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Log both the current iteration as also the total iterations for the current benchmark/plan.
(BenchmarkRunner._run_benchmark):
* Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py: Use python logging also for errors.
(GTKMiniBrowserDriver.close_browsers):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Implement support for running all available benchmark plans.
(parse_args):
(start):
(main):

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

3 years ago[EFL] Remove u-szeged.hu SVN mirror in EFL perf bot
gyuyoung.kim@webkit.org [Thu, 3 Mar 2016 14:09:22 +0000 (14:09 +0000)]
[EFL] Remove u-szeged.hu SVN mirror in EFL perf bot
https://bugs.webkit.org/show_bug.cgi?id=154960

Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json: Remove szeged univ's svn mirror.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

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

3 years ago[CSS Box Alignment] New CSS Value 'normal' for Content Alignment
jfernandez@igalia.com [Thu, 3 Mar 2016 11:05:32 +0000 (11:05 +0000)]
[CSS Box Alignment] New CSS Value 'normal' for Content Alignment
https://bugs.webkit.org/show_bug.cgi?id=154282

Source/WebCore:

Reviewed by David Hyatt.

The Box Alignment specification defines a new value 'normal' to be used
as default for the different layout models, which will define the
specific behavior for each case. This patch adds a new CSS value in the
parsing logic and adapts the Content Alignment properties to the new
value.

The 'auto' value is no longer valid and the Computed Value will be
always the specified value. Hence, I removed the StyleResolver logic
because is not required now; the specific behavior of the 'normal'
value will be resolved at layout time.

Computed value of both align-content and justify-content is the
specified value, we don't have to resolve any 'auto' value now.

Additionally, this patch updates the layout logic as well, for both
Flexbox and Grid layout models.

No new tests, since we only need to rebaseline those test cases
affected by the new default computed value.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Deleted.
(WebCore::CSSComputedStyleDeclaration::copyProperties): Deleted.
(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::isFlexOrGrid): Deleted.
(WebCore::ComputedStyleExtractor::customPropertyValue): Deleted.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseContentDistributionOverflowPosition):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ContentPosition):
* rendering/RenderFlexibleBox.cpp:
(WebCore::normalValueBehavior):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
(WebCore::RenderFlexibleBox::alignFlexLines):
(WebCore::alignContentSpaceBetweenChildren): Deleted.
* rendering/RenderGrid.cpp:
(WebCore::normalValueBehavior):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::resolveContentDistributionFallback):
(WebCore::contentDistributionOffset):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
* rendering/style/RenderStyle.cpp:
(WebCore::resolvedContentAlignmentPosition):
(WebCore::resolvedContentAlignmentDistribution):
(WebCore::RenderStyle::resolvedJustifyContentPosition):
(WebCore::RenderStyle::resolvedJustifyContentDistribution):
(WebCore::RenderStyle::resolvedAlignContentPosition):
(WebCore::RenderStyle::resolvedAlignContentDistribution):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:

LayoutTests:

The Box Alignment specification defines a new value 'normal' to be used
as default for the different layout models, which will define the
specific behavior for each case. This patch adds a new CSS value in the
parsing logic and adapts the Content Alignment properties to the new
value.

Since the 'normal' vlaue, initial/default for both justify-content
and align-content CSS properties, behaves now as 'stretch' instead
of o'start' we have to rebaseline those tests affected by the new
default value.

Reviewed by David Hyatt.

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/parse-align-content-expected.txt:
* css3/parse-align-content.html:
* css3/parse-justify-content-expected.txt:
* css3/parse-justify-content.html:
* css3/resources/alignment-parsing-utils.js:
(checkBadValues):
* fast/css-grid-layout/auto-content-resolution-columns.html:
* fast/css-grid-layout/grid-auto-columns-rows-update.html:
* fast/css-grid-layout/grid-auto-flow-resolution.html:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-dynamic-updates-relayout.html:
* fast/css-grid-layout/grid-element-min-max-width.html:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/grid-initialize-span-one-items.html:
* fast/css-grid-layout/grid-item-addition-auto-placement-update.html:
* fast/css-grid-layout/grid-item-addition-track-breadth-update.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-ltr.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-ltr.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl.html:
* fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-negative-indexes.html:
* fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-item-removal-auto-placement-update.html:
* fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
* fast/css-grid-layout/grid-update-sizes-after-distributing-all.html:
* fast/css-grid-layout/implicit-columns-auto-resolution.html:
* fast/css-grid-layout/implicit-position-dynamic-change.html:
* fast/css-grid-layout/mark-as-infinitely-growable.html:
* fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html:
* fast/css-grid-layout/minmax-spanning-resolution-columns.html:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html:
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
* fast/css-grid-layout/percent-intrinsic-track-breadth.html:
* fast/css-grid-layout/percent-track-breadths-regarding-container-size.html:
* fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
(checkGridTemplatesSetJSValues):
* fast/css-grid-layout/resources/grid-template-shorthand-parsing-utils.js:
(checkGridDefinitionsSetJSValues):
(testGridDefinitionsSetBadJSValues):
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

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

3 years agoSlider thumb style should not depend on renderers
antti@apple.com [Thu, 3 Mar 2016 10:48:10 +0000 (10:48 +0000)]
Slider thumb style should not depend on renderers
https://bugs.webkit.org/show_bug.cgi?id=154961

Reviewed by Andreas Kling.

Currently slider thumb pseudo id is computed based on host element renderer.
Style is the input for building a render tree and should be computable without having one.

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::hostInput):
(WebCore::SliderThumbElement::customStyleForRenderer):

    Compute pseudo id based on the host style.
    Return nullptr so style recalc will otherwise proceed normally.

(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren):
(WebCore::SliderContainerElement::SliderContainerElement):
(WebCore::SliderContainerElement::create):
(WebCore::SliderContainerElement::createElementRenderer):
(WebCore::SliderContainerElement::customStyleForRenderer):

    Here too.

(WebCore::SliderContainerElement::shadowPseudoId):
(WebCore::sliderThumbShadowPseudoId): Deleted.
(WebCore::mediaSliderThumbShadowPseudoId): Deleted.
* html/shadow/SliderThumbElement.h:

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

3 years ago[css-grid] Simplify method to resolve auto-placed items
rego@igalia.com [Thu, 3 Mar 2016 10:23:35 +0000 (10:23 +0000)]
[css-grid] Simplify method to resolve auto-placed items
https://bugs.webkit.org/show_bug.cgi?id=154911

Reviewed by Sergio Villar Senin.

Refactor the method to resolve auto-placed items
as we're only interested in knowing the span size.

Adapt the calls to use the span size instead of a GridSpan.

No new tests, no change of behavior.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::spanSizeForAutoPlacedItem):
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
Renamed to spanSizeForAutoPlacedItem().
* rendering/style/GridResolvedPosition.h:

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

3 years agoFix Windows build after r197489.
achristensen@apple.com [Thu, 3 Mar 2016 09:12:05 +0000 (09:12 +0000)]
Fix Windows build after r197489.

* jsc.cpp:

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

3 years agoAdd some new controllers, and refine tests
jonlee@apple.com [Thu, 3 Mar 2016 08:22:32 +0000 (08:22 +0000)]
Add some new controllers, and refine tests
https://bugs.webkit.org/show_bug.cgi?id=154914

Reviewed by Simon Fraser.

Improve tests.

* Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle
in a container element. Expand the container element by the max blur radius, and clip
overflow. This way, when the blur is applied, it avoids causing layer resizes.
* Animometer/tests/master/resources/focus.js:
(FocusElement.Utilities.createClass): Create a container element, and put the particle
inside.
(hide): Set display:none.
(show): Set display:block.
(animate): Apply filters to the container element.
(FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
keep them in the stage, but set the display style instead. Use this._offsetIndex to
keep track of which elements are displayed.
(FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
(FocusStage.call.getBlurValue): Make sure elements are always blurred.
(FocusStage.call.getOpacityValue): Make sure elements have some opacity.
* Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the
stage appear less black when the complexity gets large enough.
(tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
frame.

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

3 years agoAdd some new controllers, and refine tests
jonlee@apple.com [Thu, 3 Mar 2016 08:15:35 +0000 (08:15 +0000)]
Add some new controllers, and refine tests
https://bugs.webkit.org/show_bug.cgi?id=154914

Reviewed by Simon Fraser.

Add a controller that centers around 30 fps instead of 60 fps.

* Animometer/developer.html: Add a new option.
* Animometer/resources/debug-runner/animometer.js:
* Animometer/resources/runner/animometer.js:
(this._processData.findRegression): When calculating the complexity-frameLength regression,
check the controller, and use a 30 fps baseline if needed.
* Animometer/resources/statistics.js:
(Regression.Utilities.createClass): Update to allow clients to specify the baseline
frame length.
* Animometer/tests/resources/main.js:
(tune): Override some of the constants in RampController. Move those constants out for
easier reading.

Add a fixed controller, with no step.

* Animometer/developer.html: Add a controller that takes no step.
* Animometer/resources/debug-runner/animometer.js:
* Animometer/tests/resources/main.js:
(Rotater.Utilities.createClass):

Switch to ramp controller as default.

* Animometer/developer.html: Increase the test length to 20 seconds.
* Animometer/resources/debug-runner/animometer.js: Rename the "adjustment" field to "controller"
since that is a more accurate description.
* Animometer/resources/debug-runner/graph.js:
* Animometer/resources/runner/animometer.js: Update preferences for release suite.

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

3 years agoHTMLFormElement's named property getter does not return a RadioNodelist
cdumez@apple.com [Thu, 3 Mar 2016 07:44:00 +0000 (07:44 +0000)]
HTMLFormElement's named property getter does not return a RadioNodelist
https://bugs.webkit.org/show_bug.cgi?id=154949

Reviewed by Ryosuke Niwa.

Source/WebCore:

HTMLFormElement's named property getter should return a RadioNodeList
when there are several matches:
https://html.spec.whatwg.org/multipage/forms.html#the-form-element

Previously, WebKit returned a generic NodeList. As a result, users
cannot create a white-and-gold hat in the MAKE A HAT GREAT AGAIN
section at:
https://www.washingtonpost.com/news/the-fix/wp/2015/10/06/hey-lets-all-make-our-own-donald-trump-hats/

Chrome and Firefox already match the specification. Edge will soon.

Test: fast/dom/HTMLFormElement/named-property-getter-radionodelist.html

* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):

LayoutTests:

Add layout test to confirm that HTMLFormElement's named property getter
does indeed return a RadioNodeList when there are several matches.

* fast/dom/HTMLFormElement/named-property-getter-radionodelist-expected.txt: Added.
* fast/dom/HTMLFormElement/named-property-getter-radionodelist.html: Added.

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

3 years agoProperly cancel downloads when using NetworkSession
commit-queue@webkit.org [Thu, 3 Mar 2016 07:36:17 +0000 (07:36 +0000)]
Properly cancel downloads when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154893

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-02
Reviewed by Brady Eidson.

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::Download):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::cancel):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

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

3 years ago[jhbuild] Remove LLVM dependency.
fred.wang@free.fr [Thu, 3 Mar 2016 06:37:30 +0000 (06:37 +0000)]
[jhbuild] Remove LLVM dependency.
https://bugs.webkit.org/show_bug.cgi?id=153274

Patch by Frederic Wang <fwang@igalia.com> on 2016-03-03
Reviewed by Carlos Garcia Campos.

* gtk/jhbuild.modules:

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

3 years agoDrop [TreatNullAs=LegacyNullString] from HTMLBaseElement.href
cdumez@apple.com [Thu, 3 Mar 2016 06:31:37 +0000 (06:31 +0000)]
Drop [TreatNullAs=LegacyNullString] from HTMLBaseElement.href
https://bugs.webkit.org/show_bug.cgi?id=154952

Reviewed by Ryosuke Niwa.

Source/WebCore:

Drop [TreatNullAs=LegacyNullString] from HTMLBaseElement.href as this
does not match the specification:
- https://html.spec.whatwg.org/multipage/semantics.html#the-base-element

Firefox and Chrome both convert null to the string "null".

No new tests, updated the following existing test:
fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html

* html/HTMLBaseElement.idl:

LayoutTests:

Update existing layout test now that HTMLBaseElement.href setter no
longer treats null as the empty string.

* fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document-expected.txt:
* fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html:

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

3 years agoWeb Inspector: Update MemoryTimelineView for new ruler height
mattbaker@apple.com [Thu, 3 Mar 2016 06:26:59 +0000 (06:26 +0000)]
Web Inspector: Update MemoryTimelineView for new ruler height
https://bugs.webkit.org/show_bug.cgi?id=153904
<rdar://problem/24517259>

Reviewed by Timothy Hatcher.

* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .details > .timeline-ruler):
(.timeline-view.memory > .content > .details > .subtitle):
Adjust ruler top and subtitle padding for shorter timeline ruler.
Also reduced padding in the Categories heading area to tighen up
the layout a bit.

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

3 years agoRegExpExec/RegExpTest should not unconditionally speculate cell
fpizlo@apple.com [Thu, 3 Mar 2016 05:58:59 +0000 (05:58 +0000)]
RegExpExec/RegExpTest should not unconditionally speculate cell
https://bugs.webkit.org/show_bug.cgi?id=154901

Reviewed by Benjamin Poulain.

This is a three part change. It all started with a simple goal: end the rage-recompiles in
Octane/regexp by enabling the DFG and FTL to do untyped RegExpExec/RegExpTest. This keeps us
in the optimized code when you do a regexp match on a number, for example.

While implementing this, I realized that DFGOperations.cpp was bad at exception checking. When
it did check for exceptions, it used exec->hadException() instead of vm.exception(). So I
fixed that. I also made sure that the regexp operations checked for exception after doing
toString().

Unfortunately, the introduction of untyped RegExpExec/RegExpTest caused a regression on
Octane/regexp. This was because we were simultaneously scheduling replacement and OSR compiles
of some large functions with the FTL JIT. The OSR compiles were not useful. This was a
regression from the previous changes to make OSR compiles happen sooner. The problem is that
this change also removed the throttling of OSR compiles even in those cases where we suspect
that replacement is more likely. This patch reintroduces that throttling, but only in the
replacement path.

This change ends up being neutral overall.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpExec):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpTest):
(JSC::FTL::DFG::LowerDFGToB3::compileNewRegexp):
* tests/stress/regexp-exec-effect-after-exception.js: Added.

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

3 years ago[JSC] JSCell_freeListNext and JSCell_structureID are considered not overlapping
commit-queue@webkit.org [Thu, 3 Mar 2016 05:29:16 +0000 (05:29 +0000)]
[JSC] JSCell_freeListNext and JSCell_structureID are considered not overlapping
https://bugs.webkit.org/show_bug.cgi?id=154947

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

This bug was discovered while testing https://bugs.webkit.org/show_bug.cgi?id=154894.

The problem was that JSCell_freeListNext and JSCell_structureID were
considered as disjoint. When reordering instructions, the scheduler
could move the write of the StructureID first to reduce dependencies.
This would erase half of JSCell_freeListNext before we get a chance
to load the value.

This patch changes the hierarchy to make sure nothing is written
until JSCell_freeListNext is processed.

All credits for this patch go to Filip.

* ftl/FTLAbstractHeapRepository.cpp:
(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
* ftl/FTLAbstractHeapRepository.h:

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

3 years ago[JSC] Improve Select of Doubles based on Double condition
commit-queue@webkit.org [Thu, 3 Mar 2016 05:19:02 +0000 (05:19 +0000)]
[JSC] Improve Select of Doubles based on Double condition
https://bugs.webkit.org/show_bug.cgi?id=154572

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

Octane has a bunch of Select on Double based on comparing Doubles.
A few nodes generate that: ValueRep, Min, Max, etc.

On ARM64, we can improve our code a lot. ARM can do a select
based on flags with the FCSEL instruction.

On x86, this patch adds aggressive aliasing for moveDoubleConditionallyXXX.
This has obviously a much more limited impact.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::moveDoubleConditionally32): Deleted.
(JSC::MacroAssembler::moveDoubleConditionally64): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyTest32): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyTest64): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyDouble): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyFloat): Deleted.
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::moveDoubleConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyDouble):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyFloat):
(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveDoubleConditionally32):
(JSC::MacroAssemblerARM64::moveDoubleConditionally64):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyTest32):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyTest64):
(JSC::MacroAssemblerARM64::branch64):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::moveConditionally32):
(JSC::MacroAssemblerX86Common::moveDoubleConditionally32):
(JSC::MacroAssemblerX86Common::moveDoubleConditionallyTest32):
(JSC::MacroAssemblerX86Common::moveDoubleConditionallyDouble):
(JSC::MacroAssemblerX86Common::moveDoubleConditionallyFloat):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::moveDoubleConditionally64):
(JSC::MacroAssemblerX86_64::moveDoubleConditionallyTest64):
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::shouldTryAliasingDef):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::populateWithInterestingValues):
(JSC::B3::floatingPointOperands):
(JSC::B3::int64Operands):
(JSC::B3::int32Operands):
(JSC::B3::testSelectCompareFloat):
(JSC::B3::testSelectCompareFloatToDouble):
(JSC::B3::testSelectDoubleCompareDouble):
(JSC::B3::testSelectDoubleCompareDoubleWithAliasing):
(JSC::B3::testSelectFloatCompareFloat):
(JSC::B3::testSelectFloatCompareFloatWithAliasing):
(JSC::B3::run):

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

3 years agoAdd ability to generate a Heap Snapshot
commit-queue@webkit.org [Thu, 3 Mar 2016 05:15:56 +0000 (05:15 +0000)]
Add ability to generate a Heap Snapshot
https://bugs.webkit.org/show_bug.cgi?id=154847

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-02
Reviewed by Mark Lam.

This adds HeapSnapshot, HeapSnapshotBuilder, and HeapProfiler.

HeapProfiler hangs off of the VM and holds the list of snapshots.
I expect to add other HeapProfiling features, such as allocation
tracking, to the profiler.

HeapSnapshot contains a collection of live cells and their identifiers.
It can point to a previous HeapSnapshot, to ensure that a cell that
already received an identifier maintains the same identifier across
multiple snapshots. When a snapshotted cell gets garbage collected,
the cell will be swept from the HeapSnapshot at the end of collection
to ensure the list contains only live cells.

When building a HeapSnapshot nodes are added in increasing node
identifier order. When done building, the list of nodes is complete
and the snapshot is finalized. At this point the nodes are sorted
by JSCell* address to allow for quick lookup of a JSCell*.

HeapSnapshotBuilder is where snapshotting begins. The builder
will initiate a specialized heap snapshotting garbage collection.
During this collection the builder will be notified of all marked
(live) cells, and connections between cells, as seen by SlotVisitors.
The builder can reference the previous, readonly, HeapSnapshots to
avoid creating new nodes for cells that have already been snapshotted.
When it is determined that we are visiting a live cell for the first
time, we give the cell a unique identifier and add it to the the
snapshot we are building.

Since edge data is costly, and of little long term utility, this
data is only held by the builder for serialization, and not stored
long term with the HeapSnapshot node data.

The goals of HeapSnapshotting at this time are:
- minimal impact on performance when not profiling the heap
- unique identifier for cells, so they may be identified across multiple snapshots
- nodes and edges to be able to construct a graph of which nodes reference/retain which other nodes
- node data - identifier, type (class name), size
- edge data - from cell, to cell, type / data (to come in a follow-up patch)

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
Add new files to the build.

* heap/Heap.cpp:
(JSC::Heap::isHeapSnapshotting):
(JSC::RemoveDeadHeapSnapshotNodes::RemoveDeadHeapSnapshotNodes):
(JSC::RemoveDeadHeapSnapshotNodes::operator()):
(JSC::Heap::removeDeadHeapSnapshotNodes):
(JSC::Heap::collectImpl):
After every collection, sweep dead cells from in memory snapshots.

* runtime/VM.cpp:
(JSC::VM::ensureHeapProfiler):
* runtime/VM.h:
(JSC::VM::heapProfiler):
* heap/Heap.h:
* heap/HeapProfiler.cpp: Added.
(JSC::HeapProfiler::HeapProfiler):
(JSC::HeapProfiler::~HeapProfiler):
(JSC::HeapProfiler::mostRecentSnapshot):
(JSC::HeapProfiler::appendSnapshot):
(JSC::HeapProfiler::clearSnapshots):
(JSC::HeapProfiler::setActiveSnapshotBuilder):
* heap/HeapProfiler.h: Added.
(JSC::HeapProfiler::vm):
(JSC::HeapProfiler::activeSnapshotBuilder):
VM and Heap can look at the profiler to determine if we are building a
snapshot, or the "head" snapshot to use for sweeping.

* heap/HeapSnapshot.cpp: Added.
(JSC::HeapSnapshot::HeapSnapshot):
(JSC::HeapSnapshot::~HeapSnapshot):
(JSC::HeapSnapshot::appendNode):
Add a node to the unfinalized list of new cells.

(JSC::HeapSnapshot::sweepCell):
(JSC::HeapSnapshot::shrinkToFit):
Collect a list of cells for sweeping and then remove them all at once
in shrinkToFit. This is done to avoid thrashing of individual removes
that could cause many overlapping moves within the Vector.

(JSC::HeapSnapshot::finalize):
Sort the list, and also cache the bounding start/stop identifiers.
No other snapshot can contain an identifier in this range, so it will
improve lookup of a node from an identifier.

(JSC::HeapSnapshot::nodeForCell):
(JSC::HeapSnapshot::nodeForObjectIdentifier):
Search helpers.

* heap/HeapSnapshotBuilder.h: Added.
(JSC::HeapSnapshotNode::HeapSnapshotNode):
(JSC::HeapSnapshotEdge::HeapSnapshotEdge):
Node and Edge struct types the builder creates.

* heap/HeapSnapshotBuilder.cpp: Added.
(JSC::HeapSnapshotBuilder::getNextObjectIdentifier):
(JSC::HeapSnapshotBuilder::HeapSnapshotBuilder):
(JSC::HeapSnapshotBuilder::~HeapSnapshotBuilder):
(JSC::HeapSnapshotBuilder::buildSnapshot):
(JSC::HeapSnapshotBuilder::appendNode):
(JSC::HeapSnapshotBuilder::appendEdge):
When building the snapshot, generating the next identifier, and
appending to any of the lists must be guarded by a lock because
SlotVisitors running in parallel may be accessing the builder.

(JSC::HeapSnapshotBuilder::hasExistingNodeForCell):
Looking up if a node already exists in a previous snapshot can be
done without a lock because at this point the data is readonly.

(JSC::edgeTypeToNumber):
(JSC::edgeTypeToString):
(JSC::HeapSnapshotBuilder::json):
JSON serialization of a heap snapshot contains node and edge data.

* heap/SlotVisitor.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
Set/clear the active snapshot builder to know if this will be a
snapshotting GC or not.

(JSC::SlotVisitor::append):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
Inform the builder of a new node or edge.

(JSC::SlotVisitor::visitChildren):
Remember the current cell we are visiting so that if we need to
inform the builder of edges we know the "from" cell.

* jsc.cpp:
(SimpleObject::SimpleObject):
(SimpleObject::create):
(SimpleObject::finishCreation):
(SimpleObject::visitChildren):
(SimpleObject::createStructure):
(SimpleObject::hiddenValue):
(SimpleObject::setHiddenValue):
Create a new class "SimpleObject" that can be used by heap snapshotting
tests. It is easy to filter for this new class name and test internal
edge relationships created by garbage collection visiting the cell.

(functionCreateSimpleObject):
(functionGetHiddenValue):
(functionSetHiddenValue):
Expose methods to create and interact with a SimpleObject.

(functionGenerateHeapSnapshot):
Expose methods to create a heap snapshot. This currently automatically
turns the serialized string into a JSON object. That may change.

* tests/heapProfiler.yaml: Added.
* tests/heapProfiler/basic-edges.js: Added.
(excludeStructure):
* tests/heapProfiler/basic-nodes.js: Added.
(hasDifferentSizeNodes):
(hasAllInternalNodes):
Add tests for basic node and edge data.

* tests/heapProfiler/driver/driver.js: Added.
(assert):
(CheapHeapSnapshotNode):
(CheapHeapSnapshotEdge):
(CheapHeapSnapshotEdge.prototype.get from):
(CheapHeapSnapshotEdge.prototype.get to):
(CheapHeapSnapshot):
(CheapHeapSnapshot.prototype.get nodes):
(CheapHeapSnapshot.prototype.get edges):
(CheapHeapSnapshot.prototype.nodeWithIdentifier):
(CheapHeapSnapshot.prototype.nodesWithClassName):
(CheapHeapSnapshot.prototype.classNameFromTableIndex):
(CheapHeapSnapshot.prototype.edgeTypeFromTableIndex):
(createCheapHeapSnapshot):
(HeapSnapshotNode):
(HeapSnapshotEdge):
(HeapSnapshot):
(HeapSnapshot.prototype.nodesWithClassName):
(createHeapSnapshot):
Add two HeapSnapshot representations.
CheapHeapSnapshot creates two lists of node and edge data that
lazily creates objects as needed.
HeapSnapshot creates an object for each node and edge. This
is wasteful but easier to use.

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

3 years agoWeb Inspector: Timelines UI redesign: replace content view container with a content...
mattbaker@apple.com [Thu, 3 Mar 2016 03:50:37 +0000 (03:50 +0000)]
Web Inspector: Timelines UI redesign: replace content view container with a content browser
https://bugs.webkit.org/show_bug.cgi?id=153033
<rdar://problem/24195565>

Reviewed by Timothy Hatcher.

This patch replaces the ContentViewContainer in the Timelines tab with a ContentBrowser,
moves filtering controls from the sidebar to the new browser's navigation bar, and adds
a new leaf path component for the current ruler selection to the main content browser's
navigation bar.

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

* UserInterface/Base/Utilities.js:
Added global en dash string.

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

* UserInterface/Models/TimelineRange.js:
(WebInspector.TimelineRange):
(WebInspector.TimelineRange.prototype.get startValue):
(WebInspector.TimelineRange.prototype.set startValue):
(WebInspector.TimelineRange.prototype.get endValue):
(WebInspector.TimelineRange.prototype.set endValue):
New represented object used by ruler selection path components.

* UserInterface/Views/FilterBarNavigationItem.js:
(WebInspector.FilterBarNavigationItem):
(WebInspector.FilterBarNavigationItem.prototype.get filterBar):
Adapter class for using a FilterBar as a NavigationItem.

* UserInterface/Views/TimelineIcons.css:
(.time-icon .icon):
Icon class used by ruler selection path component.

* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser):
(.content-view.timeline-recording > .content-browser > .navigation-bar):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows):
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid table.data):
(.content-view.timeline-recording > .content-view-container): Deleted.
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data): Deleted.
New styles for the ContentBrowser that replaces the ContentViewContainer.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Create the ContentBrowser, ruler selection path components, and the browser's filter bar.

(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
Implemented by the content browser instead of the view container.

(WebInspector.TimelineRecordingContentView.prototype.get selectionPathComponents):
Add timeline and selection path components. Components for the current TimelineView
are now located in the lower content browser's navigation bar.

(WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
(WebInspector.TimelineRecordingContentView.prototype.get saveData):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.closed):
(WebInspector.TimelineRecordingContentView.prototype.canGoBack):
(WebInspector.TimelineRecordingContentView.prototype.canGoForward):
(WebInspector.TimelineRecordingContentView.prototype.goBack):
(WebInspector.TimelineRecordingContentView.prototype.goForward):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
Implemented by the content browser instead of the view container.

(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
Create the root tree element for the lower content browser's navigation bar.

(WebInspector.TimelineRecordingContentView.prototype._timeRangePathComponentSelected):
Update the ruler selection based on the new path component.

(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
Implemented by the content browser instead of the view container.

(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Update the currently selected path component when the ruler selection changes.
If the entire range is selected, show the "Entire Recording" path component,
otherwise update the TimelineRange of the path component for the user-defined
selection and refresh all timeline range path components.

(WebInspector.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
Update title text and sibling relationships for ruler selection path components.

(WebInspector.TimelineRecordingContentView.prototype._createTimelineRangePathComponent):
Helper function for creating TimelineRange path components.

(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
The TimelineView scope bar is no longer added to the sidebar. The UI has been moved
to the lower content browser navigation bar.

(WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection): Deleted.
No longer needed since the selected range is shown in the navigation bar.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.get navigationItems):
Adds the TimelineView's scope bar (if any) to the lower content browser's navigation
bar. Items are inserted before the filter bar, which is always the right-most item.

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

3 years agoWeb Inspector: Timelines UI redesign: show content tree outline records in timeline...
mattbaker@apple.com [Thu, 3 Mar 2016 03:45:50 +0000 (03:45 +0000)]
Web Inspector: Timelines UI redesign: show content tree outline records in timeline data grids
https://bugs.webkit.org/show_bug.cgi?id=153032
<rdar://problem/24195317>

Reviewed by Timothy Hatcher.

This patch relocates the data shown in the Timelines navigation sidebar content tree outline
to a new grid column in each TimelineDataGrid. Logic for creating subtitles, goto arrow buttons,
and status elements (the progress spinner used for network resources) has been replicated in
the appropriate TimelineDataGridNode classes.

Duplicate logic contained in TimelineRecordTreeElement classes is left in place for now, but
will be removed in <https://webkit.org/b/153036>.

* UserInterface/Views/DataGrid.css:
(.data-grid td.error):
Use --error-text-color CSS variable.

* UserInterface/Views/DataGrid.js:
Removed GoToArrowClicked event.
(WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked): Deleted.
(WebInspector.DataGridNode.prototype.createGoToArrowButton): Deleted.
Now part of TimelineDataGridNode.

* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode):
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
Create name cell.

* UserInterface/Views/LayoutTimelineView.css:
(.timeline-view.layout > .data-grid .eventType-column): Deleted.
Column border no longer hidden.

* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
Setup name column.

* UserInterface/Views/NetworkTimelineView.css:
(.timeline-view.network > .data-grid .name-column .subtitle):
Don't show subtitles in the Network grid's name column.

* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
Setup name column.

* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .data-grid th.graph-column > .timeline-ruler):
(.timeline-view.overview > .data-grid th.graph-column > .timeline-ruler > .header):
(.timeline-view.overview > .data-grid th):
(body.window-inactive .timeline-view.overview > .data-grid th):
(.timeline-view.overview .timeline-ruler > .event-markers):
(.timeline-view.overview > .data-grid):
(.timeline-view.overview > .timeline-ruler): Deleted.
(.timeline-view.overview > .timeline-ruler > .header): Deleted.
(body.window-inactive .timeline-view.overview > .timeline-ruler > .header): Deleted.
(.timeline-view.overview > .timeline-ruler > .event-markers): Deleted.
New styles for adding grid column headers and using a TimelineRuler as the
graph column header.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView):
Setup name column and add ruler to graph column header.

* UserInterface/Views/ProfileNodeDataGridNode.js:
(WebInspector.ProfileNodeDataGridNode):
Use cached data instead of creating row data at construction time.
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
Create name cell.
(WebInspector.ProfileNodeDataGridNode.prototype._iconClassNameForProfileNode):
(WebInspector.ProfileNodeDataGridNode.prototype._titleForProfileNode):
Copied from ProfileNodeTreeElement.

* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
(WebInspector.RenderingFrameTimelineDataGridNode):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
Create name cell.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
Setup name column.

* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode):
Renamed "graphOnly" to "includesGraph", since resource rows in the overview
now show the name column in addition to the graph column. Resource events
LoadingDidFinish and LoadingDidFail now need to be handled for both types
of resource rows.

(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
Update resource status element and create name cell content.
(WebInspector.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.
(WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
Show resource when goto arrow is clicked.
(WebInspector.ResourceTimelineDataGridNode.prototype._updateStatus):
Update name cell's text color and progress spinner.

* UserInterface/Views/ResourceTreeElement.css:
(.item.resource.failed):
(.item.resource.failed .subtitle):
Use --error-text-color CSS variable.

* UserInterface/Views/ScriptTimelineDataGridNode.js:
(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.

* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
Setup name column.

* UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.createCellContent):
Added now that this node type is no longer "graph only".
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.

* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode):
Renamed `graphOnly` to `includesGraph`.
(WebInspector.TimelineDataGridNode.prototype.createCellContent):
Removed icon element creation. This is now handled by the DataGrid.
(WebInspector.TimelineDataGridNode.prototype.refresh):
Refresh of all node cells after updating the graph.
(WebInspector.TimelineDataGridNode.prototype.createGoToArrowButton):
(WebInspector.TimelineDataGridNode.prototype.createGoToArrowButton.buttonClicked):
Relocated from DataGrid, as it's only used by TimelineDataGridNodes.

* UserInterface/Views/TimelineView.css:
(.timeline-view > .data-grid .indeterminate-progress-spinner):
Styles for grid cell progress spinners.

* UserInterface/Views/Variables.css:
(:root):
Added --error-text-color variable to remove duplication.

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

3 years agoPaint table borders on empty cells even in quirks mode.
zalan@apple.com [Thu, 3 Mar 2016 03:30:30 +0000 (03:30 +0000)]
Paint table borders on empty cells even in quirks mode.
https://bugs.webkit.org/show_bug.cgi?id=154928

Reviewed by David Hyatt.

Enable border painting for empty cells unless 'empty-cells: hide' is set.
This is inline with FF and Chrome behaviour.

Source/WebCore:

Test: fast/table/border-on-empty-table-cells-quirks-mode.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBoxDecorations):

LayoutTests:

* fast/table/border-on-empty-table-cells-quirks-mode-expected.html: Added.
* fast/table/border-on-empty-table-cells-quirks-mode.html: Added.

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

3 years agoRegExpPrototype should check for exceptions after calling toString and doing so shoul...
fpizlo@apple.com [Thu, 3 Mar 2016 02:06:18 +0000 (02:06 +0000)]
RegExpPrototype should check for exceptions after calling toString and doing so should not be expensive
https://bugs.webkit.org/show_bug.cgi?id=154927

Reviewed by Saam Barati.

While working on regexp optimizations, I found that RegExpPrototype calls toString(), an
effectful operation that could do anything, without then checking for hadException().

So I added a call to hadException().

But that regressed Octane/regexp by 5%!  That's a lot!  It turns out that
exec->hadException() is soooper slow. So, I made it cheaper to check for exceptions from
toString(): there is now a variant called toStringFast() that returns null iff it throws an
exception.

This allowed me to add the exception check without regressing perf.

Note that toString() must retain its old behavior of returning an empty string on exception.
There is just too much code that relies on that behavior.

* runtime/JSCJSValue.cpp:
(JSC::JSValue::isValidCallee):
(JSC::JSValue::toStringSlowCase):
(JSC::JSValue::toWTFStringSlowCase):
* runtime/JSCJSValue.h:
(JSC::JSValue::asValue):
* runtime/JSString.h:
(JSC::JSValue::toString):
(JSC::JSValue::toStringFast):
(JSC::JSValue::toWTFString):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):

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

3 years agoclean up JSObject::isExtensibleInline and JSObject::setPrototypeOfInline, and rename...
sbarati@apple.com [Thu, 3 Mar 2016 02:04:49 +0000 (02:04 +0000)]
clean up JSObject::isExtensibleInline and JSObject::setPrototypeOfInline, and rename setPrototypeOf to setPrototype
https://bugs.webkit.org/show_bug.cgi?id=154942

Reviewed by Benjamin Poulain.

These don't need to be inlined in the way they are.
Doing dynamic dispatch is ok performance wise until
we have evidence stating otherwise.

* API/JSObjectRef.cpp:
(JSObjectSetPrototype):
(JSObjectHasProperty):
* runtime/ClassInfo.h:
* runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
* runtime/JSCell.cpp:
(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototype):
(JSC::JSCell::setPrototypeOf): Deleted.
* runtime/JSCell.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::isExtensible):
(JSC::JSObject::reifyAllStaticProperties):
(JSC::JSObject::defineOwnNonIndexProperty):
(JSC::JSObject::setPrototypeOf): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::mayInterceptIndexedAccesses):
(JSC::JSObject::indexingShouldBeSparse):
(JSC::JSObject::setPrototypeOfInline): Deleted.
(JSC::JSObject::isExtensibleInline): Deleted.
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSetPrototypeOf):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::objectConstructorIsExtensible):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::performPreventExtensions):
(JSC::ProxyObject::performIsExtensible):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectIsExtensible):
(JSC::reflectObjectSetPrototypeOf):
* runtime/StringObject.cpp:
(JSC::StringObject::defineOwnProperty):

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

3 years agoMarking storage/indexeddb/odd-strings.html as flaky on mac-wk1
ryanhaddad@apple.com [Thu, 3 Mar 2016 01:29:31 +0000 (01:29 +0000)]
Marking storage/indexeddb/odd-strings.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=154619

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoUnreviewed test gardening.
beidson@apple.com [Thu, 3 Mar 2016 01:22:22 +0000 (01:22 +0000)]
Unreviewed test gardening.

* platform/wk2/TestExpectations: Mark two tests that are very slow as [ Slow ].

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

3 years agoHTML parser instantiates a custom element inside a template element with a wrong...
rniwa@webkit.org [Thu, 3 Mar 2016 01:20:56 +0000 (01:20 +0000)]
HTML parser instantiates a custom element inside a template element with a wrong owner document
https://bugs.webkit.org/show_bug.cgi?id=154936

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Updated the expected results for newly passing test cases.

One test case in additions-to-parsing-xhtml-documents/node-document.html starts failing due to a bug in the test.
The bug in the test will be fixed in https://github.com/w3c/web-platform-tests/pull/2651

Finally, remove duplicated HTML template element tests in html-templates since there is a new copy under
web-platform-tests/html/semantics/scripting-1/the-template-element/. Unfortunately, we can't remove
html-templates/parsing-html-templates/ because we haven't imported web-platform-tests/html/syntax yet.

* html-templates/additions-to-parsing-xhtml-documents: Removed.
* html-templates/additions-to-serializing-xhtml-documents: Removed.
* html-templates/additions-to-the-css-user-agent-style-sheet: Removed.
* html-templates/additions-to-the-steps-to-clone-a-node: Removed.
* html-templates/definitions: Removed.
* html-templates/innerhtml-on-templates: Removed.
* html-templates/serializing-html-templates: Removed.
* html-templates/template-element: Removed.
* web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document.html:
* web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-001-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/node-document-changes-expected.txt:

Source/WebCore:

The bug was caused by our implementation following the old spec which didn't create a appropriate template
contents owner document [1] for a document without a browsing context. The new spec no longer has this clause,
and we should be always creating the appropriate template contents owner document unless the document itself
is an appropriate template contents owner document for another document (comes up in nested template elements).

No new tests since the behavior change is covered by existing tests.

[1] https://html.spec.whatwg.org/#appropriate-template-contents-owner-document

* dom/Document.h:
(WebCore::Document::templateDocument):

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

3 years agoPageThrottler should apply hysteresis to media activity
barraclough@apple.com [Thu, 3 Mar 2016 01:19:51 +0000 (01:19 +0000)]
PageThrottler should apply hysteresis to media activity
https://bugs.webkit.org/show_bug.cgi?id=154940

Reviewed by Ryosuke Niwa.

Currently PageThrottler keeps a track of audible plugin activity and HTML media element
activity separately. Audible plugin activity also gets an extra 5s hysteresis applied,
so that after audio playback has completed there is a chance to queue up more audio
before timer throttling kicks in. HTML audio does not get this grace. Funnel both
together into a single activity flag, such that the hysteresis is applied to both.

* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
(WebCore::m_mediaActivityHysteresis):
    - PageActivityState::AudiblePlugin -> PageActivityState::MediaActivity.
(WebCore::m_mediaActivityCounter):
    - when m_mediaActivityCounter value changes call mediaActivityCounterChanged().
(WebCore::PageThrottler::mediaActivityCounterChanged):
    - Drive PageActivityState::MediaActivity indirectly via m_mediaActivityHysteresis,
      such that a 5s hysteresis is applied.
* page/PageThrottler.h:
    - Removed AudiblePlugin (merged in with MediaActivity).
(WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):
    - m_audiblePluginHysteresis.impulse -> m_mediaActivityHysteresis.impulse.

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

3 years agoWeb Inspector: Timelines UI redesign: relocate recording controls to TimelineTabConte...
mattbaker@apple.com [Thu, 3 Mar 2016 00:34:59 +0000 (00:34 +0000)]
Web Inspector: Timelines UI redesign: relocate recording controls to TimelineTabContentView's content browser
https://bugs.webkit.org/show_bug.cgi?id=153532
<rdar://problem/24361611>

Reviewed by Timothy Hatcher.

This patch shifts UI controller responsibilities from the sidebar panel
to the tab content view. Controls for starting/stopping the recording and
switching view modes are now located in the tab's navigation bar, as is
the hidden tree outline of open timeline recordings.

* Localizations/en.lproj/localizedStrings.js:
New UI strings. Renamed view-mode radio buttons located from the sidebar
to "Events" and "Frames". UI for switching modes isn't final, and the
labels may change or be removed entirely in favor of image-only buttons.

* UserInterface/Main.html:
New file.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.ContentBrowserTabContentView.prototype.treeElementForRepresentedObject):
Allow subclasses to override behavior for retrieving the tree element
for a represented object. Default behavior delegates the implementation
to the navigation sidebar.

(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar): Deleted.
Renamed to _revealAndSelectRepresentedObject as it's no longer specific
to the sidebar.

* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.restoreStateFromCookie):
(WebInspector.TabContentView.prototype.saveStateToCookie):
A navigation sidebar shouldn't be required to save/restore cookie state.

* UserInterface/Views/TimelineTabContentView.css: Added.
(.timeline.tab.content-view .navigation-bar > .item.toggle-navigation-sidebar.activate.button):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop:hover):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop:active):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop *):
(.timeline.tab.content-view .navigation-bar > .item.radio):
Styles for new navigation items: record button and view mode radio buttons.

* UserInterface/Views/TimelineTabContentView.js:
Logic for maintaining the timeline recording hierarchy and the state
of the active recording has been added to the tab content view.

(WebInspector.TimelineTabContentView):
(WebInspector.TimelineTabContentView.prototype.shown):
(WebInspector.TimelineTabContentView.prototype.hidden):
(WebInspector.TimelineTabContentView.prototype.canShowRepresentedObject):
Objects other than recordings are no longer shown in the tab's content
browser. Displaying other objects (such as timeline resources) in the
content browser will be addressed in a follow-up patch: https://bugs.webkit.org/show_bug.cgi?id=154920.

(WebInspector.TimelineTabContentView.prototype.get supportsSplitContentBrowser):
(WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
(WebInspector.TimelineTabContentView.prototype.saveToCookie):
Persist view state that was previously located in the sidebar.

(WebInspector.TimelineTabContentView.prototype.treeElementForRepresentedObject):
Implements logic previously limited to the navigation sidebar. Only tree
elements for timeline recordings are supported, since other represented
objects (timeline resources) no longer have content tree outline tree elements.

(WebInspector.TimelineTabContentView.prototype._capturingStartedOrStopped):
(WebInspector.TimelineTabContentView.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineTabContentView.prototype._toggleNewRecordingOnSpacebar):
(WebInspector.TimelineTabContentView.prototype._toggleRecording):
(WebInspector.TimelineTabContentView.prototype._recordButtonClicked):
(WebInspector.TimelineTabContentView.prototype._recordingsTreeSelectionDidChange):
(WebInspector.TimelineTabContentView.prototype._recordingCreated):
(WebInspector.TimelineTabContentView.prototype._addRecording):
(WebInspector.TimelineTabContentView.prototype._recordingCountChanged):
(WebInspector.TimelineTabContentView.prototype._recordingLoaded):
Implementations copied from the sidebar panel.

(WebInspector.TimelineTabContentView.prototype._recordingSelected):
Implementation similar to that which existed in the sidebar panel, except
that logic related to instruments isn't needed. Updates to timeline view
filters will be implemented in a follow-up patch: https://bugs.webkit.org/show_bug.cgi?id=154924.

(WebInspector.TimelineTabContentView.prototype._viewModeSelected):
This method is now limited to the handling of the radio button event only.
Additional logic which existed in the sidebar panel's implementation has
been pushed into _changeViewMode, which does the actual work of toggling
view modes.

(WebInspector.TimelineTabContentView.prototype._changeViewMode):
Updates the current view mode state. If triggered by a user selection (was
called by the radio button event handler), the correct timeline view for
the new mode is shown.

(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Helper function for showing the view for the specified timeline type, if
the timeline exists in the current recording. Otherwise the overview timeline
view is displayed.

(WebInspector.TimelineTabContentView.prototype._displayedContentViewNavigationItemsDidChange):
Keep the view mode in sync with the content browser.

(WebInspector.TimelineTabContentView.prototype._getTimelineForCurrentContentView):
Helper function for getting the currently displayed timeline.

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

3 years agoUpdate the media element's presentation mode properly after going in and out of full...
adachan@apple.com [Thu, 3 Mar 2016 00:34:19 +0000 (00:34 +0000)]
Update the media element's presentation mode properly after going in and out of full screen via the Full Screen API
https://bugs.webkit.org/show_bug.cgi?id=154834

Reviewed by Simon Fraser.

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Element.cpp:
(WebCore::Element::willBecomeFullscreenElement):
* dom/Element.h:
(WebCore::Element::ancestorWillEnterFullscreen):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
If the Full Screen API is enabled and this media element is entering a mode other than standard
full screen, see if it's currently contained in a full screen element. If so, exit full screen.
(WebCore::HTMLMediaElement::willBecomeFullscreenElement):
If this media element is going to standard full screen, update its presentation mode. If
this media element also supports presentation mode and it currently has a presentation mode
that's not standard full screen, exit that presentation mode directly without animation.
(WebCore::HTMLMediaElement::willStopBeingFullscreenElement):
Set the presentation mode back to inline unless it's already changed to a different
presentation mode.
* html/HTMLMediaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::ancestorWillEnterFullscreen):
Reset this video element's presentation state to inline if its ancestor is going to full screen.
(WebCore::HTMLVideoElement::exitToFullscreenModeWithoutAnimationIfPossible):
If the fullscreen mode the video element is exiting from is supported, exit that mode to the new mode.
* html/HTMLVideoElement.h:
* page/ChromeClient.h:
* platform/mac/WebVideoFullscreenInterfaceMac.h:
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):

Source/WebKit2:

* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode):
Call the new exitFullscreenWithoutAnimationToMode() method on WebVideoFullscreenInterfaceMac.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

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

3 years agoSkip unsupported test fast/text/complex-small-caps-non-bmp-capitalize.html on ios...
ryanhaddad@apple.com [Thu, 3 Mar 2016 00:26:54 +0000 (00:26 +0000)]
Skip unsupported test fast/text/complex-small-caps-non-bmp-capitalize.html on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoModern IDB: Close UniqueIDBDatabases once they become unused.
beidson@apple.com [Thu, 3 Mar 2016 00:23:47 +0000 (00:23 +0000)]
Modern IDB: Close UniqueIDBDatabases once they become unused.
https://bugs.webkit.org/show_bug.cgi?id=154922

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/256-open-databases.html
       storage/indexeddb/modern/exceed-open-file-limit.html

Without this change, attempts to open a 256th database in the DatabaseProcess will fail on Mac.

Due to SQLite journal files, this limit could come up as early as 128 databases if they are all
in active use.

This is because launchd - by default - limits xpc services to having 256 open file handles by default.

While we should explore raising the limit, we should also close databases we no longer need.

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::closeUniqueIDBDatabase):
(WebCore::IDBServer::IDBServer::deleteUniqueIDBDatabase): Deleted.
* Modules/indexeddb/server/IDBServer.h:

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

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

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

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): Handle the case where opening
  the backing store failed by firing an error event instead of pretending everything is okay.
(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::isCurrentlyInUse):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired): If the database is not
  currently in use, close it.
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
(WebCore::IDBServer::UniqueIDBDatabase::deletePending): Deleted.

* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::isolatedCopy): Actually get this right.

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/modern/256-open-databases-expected.txt: Added.
* storage/indexeddb/modern/256-open-databases.html: Added.
* storage/indexeddb/modern/exceed-open-file-limit-expected.txt: Added.
* storage/indexeddb/modern/exceed-open-file-limit.html: Added.
* storage/indexeddb/modern/resources/256-open-databases.js: Added.
* storage/indexeddb/modern/resources/exceed-open-file-limit.js: Added.

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

3 years agoWeb Inspector: Timelines UI redesign: add the timelines tree outline to the TimelineO...
mattbaker@apple.com [Thu, 3 Mar 2016 00:21:00 +0000 (00:21 +0000)]
Web Inspector: Timelines UI redesign: add the timelines tree outline to the TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=153034
<rdar://problem/24195628>

Reviewed by Timothy Hatcher.

Move the Timelines tree outline to the overview, in preparation for <https://webkit.org/b/153036>.

* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .timeline-ruler > .header): Deleted.
(.timeline-view.overview > .timeline-ruler > .event-markers): Deleted.
These are now part of the default ruler style.

* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .tree-outline.timelines):
(.timeline-overview > .tree-outline.timelines::before):
(body.window-inactive .timeline-overview > .tree-outline.timelines):
(.timeline-overview.frames > .tree-outline.timelines):
(.timeline-overview > .tree-outline.timelines .close-button):
(.timeline-overview > .tree-outline.timelines .item.selected .close-button):
(.timeline-overview > .tree-outline.timelines .item:not(.selected):nth-child(even)):
(.timeline-overview > .tree-outline.timelines .item:not(.selected):not(:first-child)):
(.timeline-overview > .tree-outline.timelines .item.selected + .item):
(body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item):
(.timeline-overview > .tree-outline.timelines :focus .item.selected + .item):
(.timeline-overview > .scroll-container):
(.timeline-overview.frames > .scroll-container):
(.timeline-overview > .timeline-ruler):
(.timeline-overview.frames > .timeline-ruler):
(.timeline-overview > .timeline-ruler > .markers):
(.timeline-overview > .graphs-container):
(.timeline-overview.frames > .graphs-container):
Styles for the timelines tree outline. A content element is inserted before the
tree to fill the gap created by the timeline ruler. For now the tree has a fixed
width of 185px, and is hidden when displaying the FPS instrument.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.get selectedTimeline):
(WebInspector.TimelineOverview.prototype.set selectedTimeline):
Make the selected timeline accessible to the parent view, since the overview doesn't
have a "represented object", or receive ContentView change notifications.

(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Add and remove instrument tree elements. Each tree element is created with a height
equal to it's overview graph, and is shown/hidden based on the current view mode.

(WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
Update the selected timeline and dispatch change event.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._timelineSelected):
Sync the overview's timeline selection with the current ContentView's represented object.

* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header):
(.timeline-ruler > .header > .divider > .label):
(.timeline-ruler > .selection-drag):
(.timeline-ruler > .selection-handle):
Ruler height changed to 23px, to be consistent with the DataGrid header.

* UserInterface/Views/TreeOutline.css:
(.tree-outline.large .item .icon):
Large icon style updated to match TimelineSidebarPanel.css. The 32px
size is outdated and no longer used.

* UserInterface/Views/Variables.css:
(:root):
New color variables, used by TimelineOverview.css.

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

3 years agoDisable timer throttling increases for visually idle / active pages.
barraclough@apple.com [Thu, 3 Mar 2016 00:19:05 +0000 (00:19 +0000)]
Disable timer throttling increases for visually idle / active pages.
https://bugs.webkit.org/show_bug.cgi?id=154935

Reviewed by Chris Dumez.

Currently any page that is visually idle can timer throttle, and all are eligible for throttling
allow throttling to increase.

Instead, still allow any visually idle page to timer throttle, but only allow increasing in those
that are fully hidden & inactive (no page loading or media activity).

* page/Page.cpp:
(WebCore::Page::setTimerThrottlingState):
    - Updated policy per commet above.
(WebCore::Page::setPageActivityState):
(WebCore::Page::setIsVisible):
    - We now may need to updated timer throttling when these change.

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

3 years agoRebaseline fast/transforms/bounding-rect-zoom.html for ios-simulator after r197450
ryanhaddad@apple.com [Thu, 3 Mar 2016 00:17:12 +0000 (00:17 +0000)]
Rebaseline fast/transforms/bounding-rect-zoom.html for ios-simulator after r197450

Unreviewed test gardening.

* platform/ios-simulator/fast/transforms/bounding-rect-zoom-expected.txt:

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

3 years agoRebaseline imported/w3c/web-platform-tests/html/dom/reflection-forms.html for ios...
ryanhaddad@apple.com [Thu, 3 Mar 2016 00:10:55 +0000 (00:10 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/reflection-forms.html for ios-simulator after r197458

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:

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

3 years agoCrashes in media tests after http://trac.webkit.org/changeset/197461
bdakin@apple.com [Wed, 2 Mar 2016 23:48:43 +0000 (23:48 +0000)]
Crashes in media tests after trac.webkit.org/changeset/197461
https://bugs.webkit.org/show_bug.cgi?id=154933

Reviewed by Eric Carlson.

Since the controlsManagerInterface is not guaranteed to exist, it doesn't
make sense to return a reference. Return a pointer instead.
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::isVisible):
(WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):

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

3 years ago[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
commit-queue@webkit.org [Wed, 2 Mar 2016 22:45:46 +0000 (22:45 +0000)]
[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
https://bugs.webkit.org/show_bug.cgi?id=154651

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-02
Reviewed by Alex Christensen.

.:

* Source/cmake/WebKitMacros.cmake: Used phony target instead of
CMake's PRE_BUILD COMMAND feature because the latter actually
generates pre-link target instead of pre-build.

Source/JavaScriptCore:

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WebCore:

No new tests needed.

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WTF:

* CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

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

3 years ago[[SetPrototypeOf]] should be a fully virtual method in ClassInfo::methodTable
sbarati@apple.com [Wed, 2 Mar 2016 22:39:02 +0000 (22:39 +0000)]
[[SetPrototypeOf]] should be a fully virtual method in ClassInfo::methodTable
https://bugs.webkit.org/show_bug.cgi?id=154897

Reviewed by Filip Pizlo.

This patch makes us more consistent with how the ES6 specification models the
[[SetPrototypeOf]] trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.[[SetPrototypeOf]]. This patch
still allows directly setting the prototype for situations where this
is the desired behavior. This is equivalent to setting the internal
[[Prototype]] field as described in the specification.

* API/JSClassRef.cpp:
(OpaqueJSClass::prototype):
* API/JSObjectRef.cpp:
(JSObjectMake):
(JSObjectSetPrototype):
(JSObjectHasProperty):
* API/JSWrapperMap.mm:
(makeWrapper):
* runtime/ClassInfo.h:
* runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
* runtime/JSCell.cpp:
(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototypeOf):
* runtime/JSCell.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::resetPrototype):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
* runtime/JSObject.cpp:
(JSC::JSObject::switchToSlowPutArrayStorage):
(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototypeOf):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::setPrototype): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::setPrototypeOfInline):
(JSC::JSObject::mayInterceptIndexedAccesses):
* runtime/JSProxy.cpp:
(JSC::JSProxy::setTarget):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSetPrototypeOf):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectSetPrototypeOf):

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

3 years agoAdd a custom element test for synchronous element construction in HTML parser
rniwa@webkit.org [Wed, 2 Mar 2016 22:37:57 +0000 (22:37 +0000)]
Add a custom element test for synchronous element construction in HTML parser
https://bugs.webkit.org/show_bug.cgi?id=154932

Reviewed by Antti Koivisto.

Added a test.

* fast/custom-elements/parser/parser-constructs-custom-element-synchronously-expected.txt: Added.
* fast/custom-elements/parser/parser-constructs-custom-element-synchronously.html: Added.

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

3 years agoAdd a benchmark for string transcoding.
fpizlo@apple.com [Wed, 2 Mar 2016 22:30:49 +0000 (22:30 +0000)]
Add a benchmark for string transcoding.

Rubber stamped by Saam Barati.

I wrote some code like this while working on
https://github.com/WebAssembly/design/pull/573. I thought I'd add it as a benchmark since
it stresses things that we may not have good bench coverage for.

* js/regress/script-tests/string-transcoding.js: Added.
(decodeUTF8):
(encodeUTF8):
(arraysEqual):
(arrayToString):
(setHeader):
(print):
(tryArray):
(doSteps):
* js/regress/string-transcoding-expected.txt: Added.
* js/regress/string-transcoding.html: Added.

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

3 years agoAdd support for the "first" value of the hanging-punctuation property.
hyatt@apple.com [Wed, 2 Mar 2016 22:29:26 +0000 (22:29 +0000)]
Add support for the "first" value of the hanging-punctuation property.
https://bugs.webkit.org/show_bug.cgi?id=154919

Reviewed by Simon Fraser.

Source/WebCore:

New tests added in fast/text.

Implement the "first" value for hanging-punctuation as described here:
https://drafts.csswg.org/css-text-3/#propdef-hanging-punctuation

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
Update the preferred logical width computation to factor in hanging punctuation.
This check is similar to the text-indent logic in that we only want to do it for
the first formatted line.

* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::simpleLineLayout):
Make sure to turn off simple line layout when hanging punctuation is present. Eventually
it should be feasible to support this in simple line layout, but since the full line
layout model has to work with it anyway, we are starting there.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::isLastInFlowRun):
Helper functions that are needed to determine whether or not we're allowed to apply
hanging punctuation "first" to a text run.

(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
This function manipulates logicalLeft and availableWidth when hanging punctuation
is present to shift the line as needed and to expand the availableWidth of the line.

* rendering/RenderText.cpp:
(WebCore::isHangablePunctuationAtLineStart):
(WebCore::isHangablePunctuationAtLineEnd):
(WebCore::RenderText::hangablePunctuationStartWidth):
(WebCore::RenderText::trimmedPrefWidths):
* rendering/RenderText.h:
RenderText has a helper function for handing back the hangable punctuation width. This
is used everywhere line layout wants to apply that offset. There are also helper functions
that detect whether the character is a hangable punctuation character.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::printReason):
Turn off simple line layout when hanging punctuation is enabled.

* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
Modified to expand the available width when hanging punctuation is present so that we
know we have more room on the line.

* rendering/line/LineWidth.h:
(WebCore::LineWidth::isFirstLine):
Add an accessor for whether or not we're the first line.

LayoutTests:

* fast/text/hanging-punctuation-first-expected.html: Added.
* fast/text/hanging-punctuation-first-rtl-expected.html: Added.
* fast/text/hanging-punctuation-first-rtl.html: Added.
* fast/text/hanging-punctuation-first.html: Added.

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

3 years agoMake HTML parser construct custom elements
rniwa@webkit.org [Wed, 2 Mar 2016 21:56:47 +0000 (21:56 +0000)]
Make HTML parser construct custom elements
https://bugs.webkit.org/show_bug.cgi?id=154908
Source/WebCore:

<rdar://problem/24923735>

Reviewed by Antti Koivisto.

Added the support for instantiating custom elements inside the parser. Based on Jan F2F discussion,
the HTML parser is going to synchronously construct custom elements. When a custom element constructor
throws, the HTML parser creates a HTMLUnknownElement instead.

In our implementation, we pause the parser completely and construct custom elements using the same
mechanism used to run author scripts. It's possible that we may want to apply some optimizations to
to make custom element construction but it's probably a good idea to get semantics right first.

Tests: fast/custom-elements/parser/parser-constructs-custom-elements.html
       fast/custom-elements/parser/parser-fallsback-to-unknown-element.html
       fast/custom-elements/parser/parser-sets-attributes-and-children.html
       fast/custom-elements/parser/parser-uses-constructed-element.html

* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::constructElement): Added ShouldClearException as an argument
to be used by the HTML parser since the parser can't re-throw to anywhere or fail parsing.

* bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::ShouldClearException): Added.

* dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation): Do not clear the exception here since createElement
must re-throw the exception thrown by a custom element constructor.
(WebCore::Document::createElementForBindings):

* dom/make_names.pl:
(printFactoryCppFile): Added ConstructorFunctionMapEntry which contains the constructor function
as well as the qualified name.
(printFactoryHeaderFile): Added a variant of createKnownElement and createElement that takes
AtomicString instead of QualifiedName.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::setAttributes): Added a variant that takes Vector<Attribute>.
(WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): Added. Returns a
custom element interface when the element doesn't match any builtin element and there is a custom
element definition that matches the specified name.
(WebCore::HTMLConstructionSite::insertCustomElement): Added. Like insertElement but also sets the
attributes on the newly created custom element.
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface): Extracted from
createHTMLElement. When customElementInterface is not nullptr, we optionally find the custom
element interface and return nullptr.
(WebCore::HTMLConstructionSite::createHTMLElement):
* html/parser/HTMLConstructionSite.h:

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Create a custom element when there
is a pending custom element to create (i.e. m_customElementToConstruct is not empty).
(WebCore::HTMLDocumentParser::isWaitingForScripts):

* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::create): Added a variant used for custom elements.
(WebCore::HTMLStackItem::HTMLStackItem): Ditto.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::CustomElementConstructionData::CustomElementConstructionData): Added. It needs to be in
the cpp file to avoid introducing more header dependencies in HTMLTreeBuilder.h.
(WebCore::CustomElementConstructionData::~CustomElementConstructionData): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Use insertGenericHTMLElement when creating
a generic element that could be custom elements.
(WebCore::HTMLTreeBuilder::insertGenericHTMLElement): Added. Create and insert a new element
or set m_customElementToConstruct so that the HTMLDocumentParser will create a custom element later.
(WebCore::HTMLTreeBuilder::didCreateCustomOrCallbackElement): Added. Called by HTMLDocumentParser
when it finishes creating a new custom element.

* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::takeCustomElementConstructionData): Added.
(WebCore::HTMLTreeBuilder::hasParserBlockingScriptWork): Renamed from hasParserBlockingScript.
Checks the existence of m_customElementToConstruct as well as m_scriptToProcess.

LayoutTests:

Reviewed by Antti Koivisto.

Added W3C testharness.js based tests for instantiating custom elements inside the HTML parser.

* fast/custom-elements/parser: Added.
* fast/custom-elements/parser/parser-constructs-custom-elements-expected.txt: Added.
* fast/custom-elements/parser/parser-constructs-custom-elements.html: Added.
* fast/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt: Added.
* fast/custom-elements/parser/parser-fallsback-to-unknown-element.html: Added.
* fast/custom-elements/parser/parser-sets-attributes-and-children-expected.txt: Added.
* fast/custom-elements/parser/parser-sets-attributes-and-children.html: Added.
* fast/custom-elements/parser/parser-uses-constructed-element-expected.txt: Added.
* fast/custom-elements/parser/parser-uses-constructed-element.html: Added.

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

3 years agoUse IndentTextOrNot instead of passing isFirstLine/shouldIndentText as bool.
zalan@apple.com [Wed, 2 Mar 2016 21:42:22 +0000 (21:42 +0000)]
Use IndentTextOrNot instead of passing isFirstLine/shouldIndentText as bool.
https://bugs.webkit.org/show_bug.cgi?id=154628

Reviewed by Simon Fraser.

No change in behaviour.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::logicalLeftSelectionOffset):
(WebCore::RenderBlock::logicalRightSelectionOffset):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
(WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
(WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
(WebCore::RenderBlock::startOffsetForLineInRegion):
(WebCore::RenderBlock::endOffsetForLineInRegion):
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::startOffsetForLine):
(WebCore::RenderBlock::endOffsetForLine):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::getClearDelta):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::updateLogicalInlinePositions):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionBottom):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::updateLineConstrains):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::availableWidthAtOffset):
* rendering/line/LineWidth.h:
(WebCore::LineWidth::shouldIndentText):

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

3 years agoAdd support for playbackControlsManager
bdakin@apple.com [Wed, 2 Mar 2016 20:59:28 +0000 (20:59 +0000)]
Add support for playbackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=154742
-and corresponding-
rdar://problem/23833753

Reviewed by Jer Noble.

Source/WebCore:

Make AVKitSPI.h private so that it can be used from other projects.
* WebCore.xcodeproj/project.pbxproj:

Right now, set up a controls manager for a video when it starts playing. In
the future, this is something that should be handled by the
PlatformMediaSessionManager since we only want a controls for the
currentSession.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::playInternal):

New function setUpVideoControlsManager.
* page/ChromeClient.h:

Make these CoreMedia functions available on Mac and iOS instead of just iOS.
* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:

This patch fleshes out an implementation for a bunch of these interface
functions since they need to communicate to the playbackControlsManager. This
is also where the playbackControlsManager lives.
* platform/mac/WebVideoFullscreenInterfaceMac.h:

Define an interface and implementation for WebPlaybackControlsManager.
* platform/mac/WebVideoFullscreenInterfaceMac.mm:
(-[WebPlaybackControlsManager initWithWebVideoFullscreenInterfaceMac:]):
(-[WebPlaybackControlsManager isSeeking]):
(-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]):
(-[WebPlaybackControlsManager audioMediaSelectionOptions]):
(-[WebPlaybackControlsManager currentAudioMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentAudioMediaSelectionOption:]):
(-[WebPlaybackControlsManager legibleMediaSelectionOptions]):
(-[WebPlaybackControlsManager currentLegibleMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentLegibleMediaSelectionOption:]):
(-[WebPlaybackControlsManager cancelThumbnailAndAudioAmplitudeSampleGeneration]):

Relay this information to the playbackControlsManager.
(WebCore::WebVideoFullscreenInterfaceMac::setDuration):
(WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
(WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
(WebCore::WebVideoFullscreenInterfaceMac::ensureControlsManager):
(WebCore::WebVideoFullscreenInterfaceMac::playBackControlsManager):
(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):

New SPI needed.
* platform/spi/cocoa/AVKitSPI.h:
* platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

WebVideoFullscreenManagerProxy ensures the model and interface for the
UIProcess side of the playbackControlsManager. It also caches the
m_controlsManagerContextId so that it can return the
controlsManagerInterface.
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
(WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):

Pipe isPlayingMediaDidChange() to WebViewImpl, and use that information to
update WebViewImplAdditions.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::isPlayingMediaDidChange):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::isPlayingVideoWithAudio):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isPlayingAudio):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isPlayingMediaDidChange):

Pipe setUpVideoControlsManager to the WebVideoFullscreenManager.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setUpVideoControlsManager):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Ensure the model an interface for the playbackControlsManager on the
WebProcess side and pass the message to the UIProcess to do the same.
* WebProcess/cocoa/WebVideoFullscreenManager.h:
* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setUpVideoControlsManager):

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

3 years agoAdd Page::TimerThrottlingState
barraclough@apple.com [Wed, 2 Mar 2016 20:39:37 +0000 (20:39 +0000)]
Add Page::TimerThrottlingState
https://bugs.webkit.org/show_bug.cgi?id=154926

Reviewed by Chris Dumez.

Hidden page timer throttling is currently a boolean state, indicated by whether the Optional
m_timerThrottlingEnabledTime is in a set/unset state. When enabled, the increasing mechanism
may or may not be enabled, this is controlled directly by the setting.

Refactor to add an enum tracking timer throttling being in one of three states - disabled,
enabled, or enabled-increasing. This cleans things up, and will enabled up to introduce a
dynamic policy for when enabled-throttling is enabled. (Behavior is unchanged in this patch.)

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setIsVisuallyIdleInternal):
(WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):
    - setTimerThrottlingEnabled -> updateTimerThrottlingState.
(WebCore::Page::updateTimerThrottlingState):
    - policy decision (currently enabled if visually-idle) was scattered across
      all call sites to setTimerThrottlingState. Unify in one place.
(WebCore::Page::setTimerThrottlingState):
    - Was setTimerThrottlingEnabled.
(WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
(WebCore::Page::setDOMTimerAlignmentInterval):
(WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
    - updated to check m_timerThrottlingState.
(WebCore::Page::setTimerThrottlingEnabled): Deleted.
    - This became updateTimerThrottlingState.
* page/Page.h:
(WebCore::Page::timerThrottlingEnabled): Deleted.
    - Removed, it's easy enough now to just check m_timerThrottlingState.

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

3 years agoAlign HTMLInputElement.maxLength with the specification
cdumez@apple.com [Wed, 2 Mar 2016 20:38:23 +0000 (20:38 +0000)]
Align HTMLInputElement.maxLength with the specification
https://bugs.webkit.org/show_bug.cgi?id=154906

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

* web-platform-tests/html/dom/reflection-forms-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/maxlength-expected.txt:

Source/WebCore:

Align HTMLInputElement.maxLength with the specification:
- https://html.spec.whatwg.org/multipage/forms.html#dom-input-maxlength
- https://html.spec.whatwg.org/multipage/forms.html#attr-input-maxlength

In particular, the following Web-facing change was made:
- HTMLInputElement.maxLength returns -1 instead of 524288 when
  the corresponding content attribute is missing, cannot be parsed
  or out of range (i.e. negative), as per:
  - https://html.spec.whatwg.org/multipage/infrastructure.html#limited-to-only-non-negative-numbers

Note that HTMLTextAreaElement.maxLength was already returning -1 in
this case.

The new behavior matches Firefox. Chrome however, still seems to
return 524288.

Note that we keep using 524288 as a maximum maxLength internally for
performance reasons. However, we stop exposing this arbitrary value to
the Web as this is an internal limitation.

No new tests, already covered by existing tests.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
Initialize m_maxLength to -1 initially, instead of 524288.

(WebCore::HTMLInputElement::tooLong):
Call effectiveMaxLength() instead of maxLength(), which no longer
exists. effectiveMaxLength() makes sure of returning a value in
the range [0, 524288].

(WebCore::HTMLInputElement::parseAttribute):

(WebCore::HTMLInputElement::effectiveMaxLength):
Split maxLength() into maxLengthForBindings() and effectiveMaxLength().
effectiveMaxLength() returns a value in the range [0, 524288], while
maxLengthForBindings() returns values in the range [-1, 2147483647].

(WebCore::HTMLInputElement::setMaxLength): Deleted.
The implementation was moved to the parent class so that it can be
shared with HTMLTextAreaElement.

(WebCore::HTMLInputElement::maxLengthAttributeChanged):
Rename for clarity.

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
Cache the parsed maxLength when the content attribute changes, similarly
to what is already done in HTMLInputElement.

(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
(WebCore::HTMLTextAreaElement::validationMessage):
(WebCore::HTMLTextAreaElement::tooLong):
Call effectiveMaxLength() instead of maxLength() which no longer exists.
effectiveMaxLength() returns a cached value and is therefore a lot more
efficient.

* html/HTMLTextAreaElement.h:
* html/HTMLTextAreaElement.idl:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setMaxLengthForBindings):
This was moved up from HTMLInputElement / HTMLTextAreaElement to avoid code
duplication.

* html/HTMLTextFormControlElement.h:

* html/InputType.cpp:
(WebCore::InputType::validationMessage):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
Call HTMLInputElement::effectiveMaxLength() instead of
HTMLInputElement::maxLength() which no longer exists.

LayoutTests:

Update test now that input.maxLength initially returns -1
instead of 524288.

* fast/forms/input-maxlength-expected.txt:
* fast/forms/input-maxlength.html:

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

3 years agoSIGSEGV in Proxy [[Get]] and [[Set]] recursion
sbarati@apple.com [Wed, 2 Mar 2016 19:17:18 +0000 (19:17 +0000)]
SIGSEGV in Proxy [[Get]] and [[Set]] recursion
https://bugs.webkit.org/show_bug.cgi?id=154854

Reviewed by Yusuke Suzuki.

We need to be aware of the possibility that the VM
may recurse and that we can stack overflow.

* runtime/ProxyObject.cpp:
(JSC::performProxyGet):
(JSC::ProxyObject::performPut):
* tests/stress/proxy-get-and-set-recursion-stack-overflow.js: Added.
(assert):
(testStackOverflowGet):
(testStackOverflowIndexedGet):
(testStackOverflowSet):
(testStackOverflowIndexedSet):

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

3 years agoUnreviewed, rolling out r197434 and r197436.
commit-queue@webkit.org [Wed, 2 Mar 2016 18:54:03 +0000 (18:54 +0000)]
Unreviewed, rolling out r197434 and r197436.
https://bugs.webkit.org/show_bug.cgi?id=154921

This change caused a LayoutTest assertion in debug (Requested
by ryanhaddad on #webkit).

Reverted changesets:

"Extend CSSFontSelector's lifetime to be longer than the
Document's lifetime"
https://bugs.webkit.org/show_bug.cgi?id=154101
http://trac.webkit.org/changeset/197434

"Unreviewed build fix after r197434."
http://trac.webkit.org/changeset/197436

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

3 years agoVersioning.
bshafiei@apple.com [Wed, 2 Mar 2016 18:31:22 +0000 (18:31 +0000)]
Versioning.

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

3 years agoREGRESSION(r197409): [GTK] Web process always crashes on WebPage construction after...
carlosgc@webkit.org [Wed, 2 Mar 2016 17:59:34 +0000 (17:59 +0000)]
REGRESSION(r197409): [GTK] Web process always crashes on WebPage construction after r197409
https://bugs.webkit.org/show_bug.cgi?id=154918

Reviewed by Žan Doberšek.

We have an incorrect check in DrawingAreaImpl constructor that has
never actually worked because it uses the page settings before
they were initialized. But that has been fixed in r197409 and now
we are always forcing accelerated compositing mode incorrectly,
because m_alwaysUseCompositing is set in the constructor and never
changed again.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl): Remove code to set
settings and m_alwaysUseCompositing, since that should be done in
updatePreferences().
(WebKit::DrawingAreaImpl::updatePreferences): Update the settings
accordingly and always update m_alwaysUseCompositing when AC is
enabled and forced in the settings.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): WebPage::updatePreferences() calls
DrawingArea::updatePreferences(), but since r197409 it happens
before the drawing area has been created. So, call
DrawingArea::updatePreferences() in the constructor right after
the main frame has been created, since
DrawingArea::updatePreferences() uses the main frame.

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

3 years agoSubpixel layout: Enable vertical/horizontal subpixel spacing for tables.
zalan@apple.com [Wed, 2 Mar 2016 17:16:05 +0000 (17:16 +0000)]
Subpixel layout: Enable vertical/horizontal subpixel spacing for tables.
https://bugs.webkit.org/show_bug.cgi?id=154899

Reviewed by Simon Fraser.

This patch enables authors to specify device pixel values for table border spacing.
(see border-spacing)

Source/WebCore:

Test: fast/table/hidpi-vertical-and-horizontal-spacing.html

* css/CSSPropertyNames.in:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::offsetLeftForColumn):
(WebCore::RenderTable::offsetWidthForColumn):
(WebCore::RenderTable::RenderTable): Deleted.
* rendering/RenderTable.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::horizontalBorderSpacing):
(WebCore::RenderStyle::verticalBorderSpacing):
(WebCore::RenderStyle::setHorizontalBorderSpacing):
(WebCore::RenderStyle::setVerticalBorderSpacing):
* rendering/style/RenderStyle.h:
* rendering/style/StyleInheritedData.h:

LayoutTests:

* fast/table/hidpi-vertical-and-horizontal-spacing-expected.html: Added.
* fast/table/hidpi-vertical-and-horizontal-spacing.html: Added.

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

3 years agoHave parseHTMLInteger() / parseHTMLNonNegativeInteger() use WTF::Optional
cdumez@apple.com [Wed, 2 Mar 2016 17:12:37 +0000 (17:12 +0000)]
Have parseHTMLInteger() / parseHTMLNonNegativeInteger() use WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=154845

Reviewed by Darin Adler.

Take into consideration review comments made after landing r197389.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseBorderWidthAttribute):
(WebCore::HTMLElement::parseAttribute):
* html/HTMLInputElement.cpp:
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::maxLength):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLNonNegativeInteger):
* html/parser/HTMLParserIdioms.h:
(WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
(WebCore::limitToOnlyHTMLNonNegative):
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):

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

3 years ago[AX][GTK] Position-related tests need new baseline after r196439
jdiggs@igalia.com [Wed, 2 Mar 2016 17:08:08 +0000 (17:08 +0000)]
[AX][GTK] Position-related tests need new baseline after r196439
https://bugs.webkit.org/show_bug.cgi?id=154917

The tests in question include the position accessed via the component
interface. The result changed by one pixel after r196439.

Unreviewed gardening.

* platform/gtk/accessibility/image-link-expected.txt: new baseline
* platform/gtk/accessibility/math-multiscript-attributes-expected.txt: new baseline
* platform/gtk/accessibility/table-attributes-expected.txt: new baseline
* platform/gtk/accessibility/table-cell-spans-expected.txt: new baseline
* platform/gtk/accessibility/table-cells-expected.txt: new baseline
* platform/gtk/accessibility/table-detection-expected.txt: new baseline
* platform/gtk/accessibility/table-sections-expected.txt: new baseline

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