WebKit-https.git
4 years agoFix Windows clean build after r189746
achristensen@apple.com [Tue, 15 Sep 2015 00:29:00 +0000 (00:29 +0000)]
Fix Windows clean build after r189746

* WebCore.vcxproj/copyForwardingHeaders.cmd:
Copy headers from new legacy directory.

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

4 years agoWeb Inspector: tab bar stutters when moving mouse after closing tab
bburg@apple.com [Tue, 15 Sep 2015 00:27:56 +0000 (00:27 +0000)]
Web Inspector: tab bar stutters when moving mouse after closing tab
https://bugs.webkit.org/show_bug.cgi?id=149138

Reviewed by Joseph Pecoraro.

The tab bar lacked the 'static-layout' class between when the Promise microtask
ran and the beginning of the requestAnimationFrame. This caused a flash of
tabs that are way too wide.

Re-add the static-layout class immediately after measuring the 'after' tab size.
This code should probably just manually compute tab sizes since flexbox
layout is quite slow and our measurement code here forces layout several times.

* UserInterface/Views/TabBar.js:

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

4 years agowindow.HTMLDetailsElement should exist
cdumez@apple.com [Tue, 15 Sep 2015 00:17:20 +0000 (00:17 +0000)]
window.HTMLDetailsElement should exist
https://bugs.webkit.org/show_bug.cgi?id=149139

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/interactive-elements/the-details-element/details-expected.txt:
* web-platform-tests/html/semantics/interfaces-expected.txt:

Source/WebCore:

window.HTMLDetailsElement should exist:
https://html.spec.whatwg.org/multipage/forms.html#the-details-element

Drop the [NoInterfaceObject] IDL extended attribute in WebKit to
address the problem.

No new tests, already covered by existing tests.

* html/HTMLDetailsElement.idl:

LayoutTests:

Rebaseline test now that HTMLDetailsElement is exposed on the global
Window object.

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

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

4 years agoWeb Inspector: backend command promises are not rejected when a protocol error occurs
bburg@apple.com [Tue, 15 Sep 2015 00:10:01 +0000 (00:10 +0000)]
Web Inspector: backend command promises are not rejected when a protocol error occurs
https://bugs.webkit.org/show_bug.cgi?id=141403

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Fix a few corner cases for how InspectorBackend delivers command failures.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype.deliverFailure): Added.
(InspectorBackend.Command.prototype._invokeWithArguments):

    If argument-checking fails, return a rejected promise or invoke the supplied callback
    on a zero-delay setTimeout to ensure that the reply is asynchronous.

LayoutTests:

Expand coverage of an existing protocol layer test to cover success and failure modes.

* inspector/protocol/inspector-backend-invocation-return-value-expected.txt:
* inspector/protocol/inspector-backend-invocation-return-value.html:

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

4 years agoUnreviewed, rolling out r189751, r189752, and r189754.
commit-queue@webkit.org [Mon, 14 Sep 2015 23:44:33 +0000 (23:44 +0000)]
Unreviewed, rolling out r189751, r189752, and r189754.
https://bugs.webkit.org/show_bug.cgi?id=149143

caused crashes everywhere (Requested by alexchristensen on
#webkit).

Reverted changesets:

"LLInt get/put inline caches shouldn't use tons of opcodes"
https://bugs.webkit.org/show_bug.cgi?id=149106
http://trac.webkit.org/changeset/189751

"Unreviewed, fix non-x86 LLInt build."
http://trac.webkit.org/changeset/189752

"Unreviewed, really fix non-x86 LLInt build without also
breaking everything else."
http://trac.webkit.org/changeset/189754

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

4 years agoWeb Inspector: middle-clicking a tab in the tab bar should close it
bburg@apple.com [Mon, 14 Sep 2015 23:40:07 +0000 (23:40 +0000)]
Web Inspector: middle-clicking a tab in the tab bar should close it
https://bugs.webkit.org/show_bug.cgi?id=149135

Reviewed by Joseph Pecoraro.

This matches the behavior of the tab bar in Safari and other browsers.

* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype._handleMouseDown):
(WebInspector.TabBar.prototype._handleClick):

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

4 years agoTest gardening after r189670
mmaxfield@apple.com [Mon, 14 Sep 2015 23:31:32 +0000 (23:31 +0000)]
Test gardening after r189670

Unreviewed.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

4 years agoAdd scroll snap blog post resources.
wenson_hsieh@apple.com [Mon, 14 Sep 2015 23:27:37 +0000 (23:27 +0000)]
Add scroll snap blog post resources.

* blog-files/scroll-snap/overflow-normal.mp4: Added.
* blog-files/scroll-snap/snap-2d-rotated.mp4: Added.
* blog-files/scroll-snap/snap-2d.mp4: Added.
* blog-files/scroll-snap/snap-coordinates-centered.mp4: Added.
* blog-files/scroll-snap/snap-coordinates.mp4: Added.
* blog-files/scroll-snap/snap-repeat-100.mp4: Added.

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

4 years agoFix AppleWin CMake build
commit-queue@webkit.org [Mon, 14 Sep 2015 23:23:29 +0000 (23:23 +0000)]
Fix AppleWin CMake build
https://bugs.webkit.org/show_bug.cgi?id=149137

Patch by Alex Christensen <achristensen@webkit.org> on 2015-09-14
Reviewed by Brent Fulgham.

* PlatformAppleWin.cmake:
Spell Inband correctly.
* css/makegrammar.pl:
Add quotes so bison can be in a directory with spaces in it.

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

4 years agoAdd scroll snap demo directory and files.
wenson_hsieh@apple.com [Mon, 14 Sep 2015 23:21:20 +0000 (23:21 +0000)]
Add scroll snap demo directory and files.

* demos/scroll-snap/images/1.png: Added.
* demos/scroll-snap/images/10.png: Added.
* demos/scroll-snap/images/11.png: Added.
* demos/scroll-snap/images/12.png: Added.
* demos/scroll-snap/images/13.png: Added.
* demos/scroll-snap/images/14.png: Added.
* demos/scroll-snap/images/15.png: Added.
* demos/scroll-snap/images/16.png: Added.
* demos/scroll-snap/images/2.png: Added.
* demos/scroll-snap/images/3.png: Added.
* demos/scroll-snap/images/4.png: Added.
* demos/scroll-snap/images/5.png: Added.
* demos/scroll-snap/images/6.png: Added.
* demos/scroll-snap/images/7.png: Added.
* demos/scroll-snap/images/8.png: Added.
* demos/scroll-snap/images/9.png: Added.
* demos/scroll-snap/images/bluecross.svg: Added.
* demos/scroll-snap/images/corner.svg: Added.
* demos/scroll-snap/index.html: Added.

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

4 years agoUnreviewed, really fix non-x86 LLInt build without also breaking everything else.
fpizlo@apple.com [Mon, 14 Sep 2015 22:40:29 +0000 (22:40 +0000)]
Unreviewed, really fix non-x86 LLInt build without also breaking everything else.

* llint/LowLevelInterpreter64.asm:

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

4 years agoConsolidate touch event code dealing with force.
mitz@apple.com [Mon, 14 Sep 2015 22:25:36 +0000 (22:25 +0000)]
Consolidate touch event code dealing with force.

Reviewed by Beth Dakin.

* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::state):
(WebKit::WebPlatformTouchPoint::setForce):
(WebKit::WebPlatformTouchPoint::force):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::positionForCGPoint):
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):

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

4 years agoUnreviewed, fix non-x86 LLInt build.
fpizlo@apple.com [Mon, 14 Sep 2015 22:25:30 +0000 (22:25 +0000)]
Unreviewed, fix non-x86 LLInt build.

* llint/LowLevelInterpreter64.asm:

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

4 years agoLLInt get/put inline caches shouldn't use tons of opcodes
fpizlo@apple.com [Mon, 14 Sep 2015 22:10:52 +0000 (22:10 +0000)]
LLInt get/put inline caches shouldn't use tons of opcodes
https://bugs.webkit.org/show_bug.cgi?id=149106

Reviewed by Geoffrey Garen.

Our LLInt get/put inline caches currently use separate opcodes to reduce branching. For
example, instead of having get_by_id branch on the kind of offset (inline or
out-of-line), we have two get_by_id instructions: get_by_id and get_by_id_out_of_line.
But the problem with this approach is that it doesn't scale. In the property type
inference work (https://bugs.webkit.org/show_bug.cgi?id=148610), we need each kind of put
inline cache to support 11 different kinds of type checks. It seemed ridiculous to add 60
new put_by_id opcodes (there are currently 6 variants of put_by_id, so after adding type
checks, we'd have 6 * 11 = 66 variants of put_by_id).

So, this patch completely changes the strategy to mostly using branching inside the
opcode implementation. It's unlikely to have a performance effect. For example, the long
road to generational GC caused a seemingly prohibitive regression in LLInt inline caches,
and yet nobody noticed. The regression was because the inline cache was in terms of the
structure, not the structure ID, so the code was doing a structure ID table lookup. If we
didn't notice that, then we probably won't notice a couple new branches. (Also, this
patch fixes that regression - the code no longer does such lookups except in the one
unavoidable case in put_by_id transition chain checking.)

This patch also turns the isDirect operand of put_by_id into a flags field. I will use
this flags field to encode the desired type check in bug 148610.

This patch has no effect on performance according to run-jsc-benchmarks.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::printGetByIdCacheStatus):
(JSC::CodeBlock::printPutByIdCacheStatus):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/CodeBlock.h:
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
* bytecode/Instruction.h:
(JSC::Instruction::Instruction):
* bytecode/PutByIdFlags.cpp: Added.
(WTF::printInternal):
* bytecode/PutByIdFlags.h: Added.
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFromLLInt):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedInstruction::UnlinkedInstruction):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_by_id):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

4 years ago[Win] Unreviewed build fix after r189746
achristensen@apple.com [Mon, 14 Sep 2015 21:27:58 +0000 (21:27 +0000)]
[Win] Unreviewed build fix after r189746

* WebCore.vcxproj/WebCoreIncludeCommon.props:
Include new legacy directory.

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

4 years agoProgress towards CMake on Mac.
achristensen@apple.com [Mon, 14 Sep 2015 21:22:46 +0000 (21:22 +0000)]
Progress towards CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=149123

Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:
Defined and enabled some more features needed on Mac.
* Source/cmake/WebKitMacros.cmake:
Objective C bindings need special changes when generating:
Some of the bindings do not generate a .mm file but the header is needed.
Some of the bindings do generate a .mm file that doesn't compile but the header is needed.
In order to handle these cases, it is necessary to change the GENERATE_BINDINGS macro just for ObjC.

Source/JavaScriptCore:

* CMakeLists.txt:
Make forwarding headers for the replay subdirectory.
* PlatformMac.cmake:
Make forwarding headers for the generated inspector headers.
They should eventually either be packaged correctly with JavaScriptCore headers and included correctly.

Source/WebCore:

* CMakeLists.txt:
Added some more files.
* PlatformMac.cmake:
Added more files and listed the strange ObjC bindings.
* contentextensions/DFACombiner.cpp:
* contentextensions/DFACombiner.h:
Added preprocessor protection.
* platform/FileSystem.h:
Include utility.  It's needed to compile the different configurations.
* platform/ScrollAnimator.cpp:
ScrollAnimator is an abstract class on Mac.  Don't compile it.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
FontAntialiasingStateSaver.h is only used on iOS.
* rendering/RenderThemeMac.mm:
config.h needs to be outside the #if !PLATFORM(IOS) to compile correctly without precompiled headers.

Source/WebKit:

* CMakeLists.txt:
* PlatformMac.cmake:
Added more sources, make non-c99 sources compile as objc++
* PlatformWin.cmake:
Moved WebCoreTestSupport sources and includes to CMakeLists.txt to share.

Source/WebKit/mac:

* WebView/WebPDFDocumentExtras.mm:
(appendValuesInPDFNameSubtreeToVector):
* WebView/WebPDFView.mm:
Removed cmake include quirks that are not needed when we include things correctly from Quartz.framework/Frameworks.

Source/WebKit2:

* PlatformMac.cmake:
Added some more sources.

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

4 years ago[iOS] Stop importing WebKitAdditions/WKContentViewInteraction.mm
mitz@apple.com [Mon, 14 Sep 2015 21:16:31 +0000 (21:16 +0000)]
[iOS] Stop importing WebKitAdditions/WKContentViewInteraction.mm
https://bugs.webkit.org/show_bug.cgi?id=149127

Reviewed by Beth Dakin.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):

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

4 years ago[ES6] Cache the resolution result in JSModuleRecord
utatane.tea@gmail.com [Mon, 14 Sep 2015 21:15:19 +0000 (21:15 +0000)]
[ES6] Cache the resolution result in JSModuleRecord
https://bugs.webkit.org/show_bug.cgi?id=148896

Reviewed by Saam Barati.

The resolveExport operation is frequently called. For example,
1. When instantiating the module environment, we call it for each exported name and imported
   name.
2. When linking the imported module environment to the code block, we call it to resolve the
   resolution.
3. When looking up the property from the namespace object, we call it to look up the original
   module for the imported binding.
4. When creating the namespace object, we need to collect all the exported names from the module
   and need to resolve them by calling resolveExport.

However, resolveExport takes some cost. It traces the imported modules and resolves the reference
queried by the original module.

The resolveExport operation is pure function; given a module record and an export name,
it always returns the same result. So we cache resolution results in the module record to avoid
repeated resolveExport calls with the same arguments.
Here, we only cache the correctly resolved references, since,
1. We rarely looked up the non-correctly-resolved ones. In the linking phase, attempting to
   resolve non-correctly-resolved ones throws a syntax error. So only namespace object creation
   phase does it in a syntax valid script.
2. This strategy limits the size of the cache map. The number of the correctly exported bindings
   is defined by the modules' code. So the size does not become infinitely large.

Currently, the all modules cannot be linked twice. For example,

  graph 1

  -> (A) -> (B)

  graph 2

  -> (C) -> (A) -> (B)

We cannot test the behavior now because when executing the graph 2, (A) and (B) are already linked,
it raises an error in the current loader spec. But it should be allowed[1] since it will occur when
there is multiple module tag in WebCore.

[1]: https://github.com/whatwg/loader/issues/41

* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::ResolveQuery::Hash::hash):
(JSC::JSModuleRecord::ResolveQuery::Hash::equal):
(JSC::JSModuleRecord::cacheResolution):
(JSC::ResolveQueryHash::hash): Deleted.
(JSC::ResolveQueryHash::equal): Deleted.
(JSC::resolveExportLoop): Deleted.
* runtime/JSModuleRecord.h:
* tests/modules/caching-should-not-make-ambiguous.js: Added.
* tests/modules/caching-should-not-make-ambiguous/A.js: Added.
* tests/modules/caching-should-not-make-ambiguous/B.js: Added.
* tests/modules/caching-should-not-make-ambiguous/C.js: Added.
* tests/modules/caching-should-not-make-ambiguous/D.js: Added.
* tests/modules/caching-should-not-make-ambiguous/main.js: Added.
* tests/modules/different-view.js: Added.
(from.string_appeared_here.shouldThrow):
* tests/modules/different-view/A.js: Added.
* tests/modules/different-view/B.js: Added.
* tests/modules/different-view/C.js: Added.
* tests/modules/different-view/D.js: Added.
* tests/modules/different-view/E.js: Added.
* tests/modules/different-view/main.js: Added.
* tests/modules/fallback-ambiguous.js: Added.
(from.string_appeared_here.shouldThrow):
* tests/modules/fallback-ambiguous/A.js: Added.
* tests/modules/fallback-ambiguous/B.js: Added.
* tests/modules/fallback-ambiguous/C.js: Added.
* tests/modules/fallback-ambiguous/D.js: Added.
* tests/modules/fallback-ambiguous/E.js: Added.
* tests/modules/fallback-ambiguous/main.js: Added.
* tests/modules/self-star-link.js: Added.
* tests/modules/self-star-link/A.js: Added.
* tests/modules/self-star-link/B.js: Added.
* tests/modules/self-star-link/C.js: Added.
* tests/modules/self-star-link/D.js: Added.
* tests/modules/self-star-link/E.js: Added.
* tests/modules/uncacheable-when-see-star.js: Added.
* tests/modules/uncacheable-when-see-star/A-pre.js: Added.
* tests/modules/uncacheable-when-see-star/A.js: Added.
* tests/modules/uncacheable-when-see-star/B.js: Added.
* tests/modules/uncacheable-when-see-star/C.js: Added.
* tests/modules/uncacheable-when-see-star/D.js: Added.
* tests/modules/uncacheable-when-see-star/E-pre.js: Added.
* tests/modules/uncacheable-when-see-star/E.js: Added.
* tests/modules/uncacheable-when-see-star/main1.js: Added.
* tests/modules/uncacheable-when-see-star/main2.js: Added.

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

4 years agoRename current concrete IDB implementation to "Legacy".
beidson@apple.com [Mon, 14 Sep 2015 21:01:41 +0000 (21:01 +0000)]
Rename current concrete IDB implementation to "Legacy".
https://bugs.webkit.org/show_bug.cgi?id=149118

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (No change in behavior).

This patch makes IDL bindings abstract.
It then renames the current concrete implementations of the bindings from "IDB" to "Legacy".
Finally it moves those files and their support classes to a "legacy" subfolder.

* CMakeLists.txt:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
* Modules/indexeddb/IDBAny.cpp:
* Modules/indexeddb/IDBAny.h:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorWithValue.cpp:
* Modules/indexeddb/IDBCursorWithValue.h:
* Modules/indexeddb/IDBCursorWithValue.idl:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBOpenDBRequest.h:
* Modules/indexeddb/IDBOpenDBRequest.idl:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/indexeddb/legacy/IDBCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCallbacks.h.
* Modules/indexeddb/legacy/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp.
* Modules/indexeddb/legacy/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackend.h.
* Modules/indexeddb/legacy/IDBCursorBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.cpp.
* Modules/indexeddb/legacy/IDBCursorBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendOperations.h.
* Modules/indexeddb/legacy/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp.
* Modules/indexeddb/legacy/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h.
* Modules/indexeddb/legacy/IDBDatabaseCallbacks.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h.
* Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp.
* Modules/indexeddb/legacy/IDBDatabaseCallbacksImpl.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h.
* Modules/indexeddb/legacy/IDBFactoryBackendInterface.h: Renamed from Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h.
* Modules/indexeddb/legacy/IDBPendingDeleteCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h.
* Modules/indexeddb/legacy/IDBPendingOpenCall.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h.
* Modules/indexeddb/legacy/IDBPendingTransactionMonitor.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp.
* Modules/indexeddb/legacy/IDBPendingTransactionMonitor.h: Renamed from Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h.
* Modules/indexeddb/legacy/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp.
* Modules/indexeddb/legacy/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h.
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp.
* Modules/indexeddb/legacy/IDBTransactionBackendOperations.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h.
* Modules/indexeddb/legacy/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.cpp.
* Modules/indexeddb/legacy/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionCoordinator.h.
* Modules/indexeddb/legacy/LegacyAny.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBAny.cpp.
* Modules/indexeddb/legacy/LegacyAny.h: Added.
* Modules/indexeddb/legacy/LegacyCursor.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.cpp.
* Modules/indexeddb/legacy/LegacyCursor.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursor.h.
* Modules/indexeddb/legacy/LegacyCursorWithValue.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp.
* Modules/indexeddb/legacy/LegacyCursorWithValue.h: Copied from Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h.
* Modules/indexeddb/legacy/LegacyDatabase.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.cpp.
* Modules/indexeddb/legacy/LegacyDatabase.h: Copied from Source/WebCore/Modules/indexeddb/IDBDatabase.h.
* Modules/indexeddb/legacy/LegacyFactory.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.cpp.
* Modules/indexeddb/legacy/LegacyFactory.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.h.
* Modules/indexeddb/legacy/LegacyIndex.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBIndex.cpp.
* Modules/indexeddb/legacy/LegacyIndex.h: Added.
* Modules/indexeddb/legacy/LegacyObjectStore.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp.
* Modules/indexeddb/legacy/LegacyObjectStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBObjectStore.h.
* Modules/indexeddb/legacy/LegacyOpenDBRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp.
* Modules/indexeddb/legacy/LegacyOpenDBRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h.
* Modules/indexeddb/legacy/LegacyRequest.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.cpp.
* Modules/indexeddb/legacy/LegacyRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBRequest.h.
* Modules/indexeddb/legacy/LegacyTransaction.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.cpp.
* Modules/indexeddb/legacy/LegacyTransaction.h: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.h.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:

Source/WebKit2:

* CMakeLists.txt:

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

4 years agoDisable PICTURE_SIZES on AppleWin
cdumez@apple.com [Mon, 14 Sep 2015 20:36:04 +0000 (20:36 +0000)]
Disable PICTURE_SIZES on AppleWin
https://bugs.webkit.org/show_bug.cgi?id=149125

Reviewed by Alexey Proskuryakov.

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:

LayoutTests:

* platform/win/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Removed.
* platform/win/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-expected.txt: Removed.
* platform/win/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/parse-a-srcset-attribute-expected.txt: Removed.
* platform/win/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/select-an-image-source-expected.txt: Removed.
* platform/win/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-source-set-expected.txt: Removed.

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

4 years agoImplement the arithmetic instructions for floats in WebAssembly
commit-queue@webkit.org [Mon, 14 Sep 2015 18:30:08 +0000 (18:30 +0000)]
Implement the arithmetic instructions for floats in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149102

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-14
Reviewed by Geoffrey Garen.

This patch implements the arithmetic instructions for floats (float32)
in WebAssembly by converting the float operands to doubles, performing
the equivalent double instructions, and converting the result back to
float. The asm.js spec says that "As proved in 'When is double rounding
innocuous?' (Figueroa 1995), both the 32- and 64-bit versions of
standard arithmetic operations produce equivalent results when given
32-bit inputs and coerced to 32-bit outputs."
(http://asmjs.org/spec/latest/#floatish)

This patch also pads WebAssembly call frames by maxFrameExtentForSlowPathCall,
so that there is no need to adjust the stack pointer every time we make
a slow path call.

* tests/stress/wasm-arithmetic-float32.js:
* tests/stress/wasm/arithmetic-float32.wasm:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::startFunction):
(JSC::WASMFunctionCompiler::buildUnaryF32):
(JSC::WASMFunctionCompiler::buildBinaryF32):
(JSC::WASMFunctionCompiler::callOperation):
(JSC::WASMFunctionCompiler::callAndUnboxResult):
(JSC::WASMFunctionCompiler::endFunction): Deleted.
(JSC::WASMFunctionCompiler::buildBinaryI32): Deleted.
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseUnaryExpressionF32):
(JSC::WASMFunctionParser::parseBinaryExpressionF32):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildUnaryF32):
(JSC::WASMFunctionSyntaxChecker::buildBinaryF32):

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

4 years agoUnreviewed, skip fast/text/international/system-language for now.
said@apple.com [Mon, 14 Sep 2015 17:57:27 +0000 (17:57 +0000)]
Unreviewed, skip fast/text/international/system-language for now.
WebKitTestRunner declarative language setting is broken for iOS.

* platform/ios-simulator/TestExpectations:

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

4 years agoUnreviewed, expect css3/flexbox/image-percent-max-height.html to fail on iOS.
said@apple.com [Mon, 14 Sep 2015 17:38:48 +0000 (17:38 +0000)]
Unreviewed, expect css3/flexbox/image-percent-max-height.html to fail on iOS.
The test is already expected to fail on mac, windows and gtk.

* platform/ios-simulator/TestExpectations:

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

4 years agoUnreviewed, rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html on...
cdumez@apple.com [Mon, 14 Sep 2015 16:30:18 +0000 (16:30 +0000)]
Unreviewed, rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html on iOS.

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

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

4 years agoWeb Inspector: Border under the styles filter field is clipped
nvasilyev@apple.com [Mon, 14 Sep 2015 16:24:34 +0000 (16:24 +0000)]
Web Inspector: Border under the styles filter field is clipped
https://bugs.webkit.org/show_bug.cgi?id=149115

Reviewed by Darin Adler.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content + .options-container > .filter-bar):

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

4 years agoSkip fast/text/international/system-language where unsupported.
ap@apple.com [Mon, 14 Sep 2015 16:14:21 +0000 (16:14 +0000)]
Skip fast/text/international/system-language where unsupported.

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

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

4 years agoEden GC should not try to jettison old CodeBlocks in the remembered set
ggaren@apple.com [Mon, 14 Sep 2015 16:09:20 +0000 (16:09 +0000)]
Eden GC should not try to jettison old CodeBlocks in the remembered set
https://bugs.webkit.org/show_bug.cgi?id=149108

Reviewed by Saam Barati.

All we know about objects in the remembered set is that they must be
visited. We don't know whether they're referenced or not because we
won't mark the objects that point to them.

Therefore, it's incorrect for a CodeBlock to consider jettisoning
itself when it's marked as a part of the remembered set: Some
old object might have visited the CodeBlock strongly if given the chance.

I believe this doesn't cause any problems currently because we happen
to visit all strong references to all CodeBlocks elligible for jettison
during every GC.

However, this behavior is a logical oddity that tripped me up, and I
believe it will start causing real problems once we start to jettison
baseline CodeBlocks, since we do not visit all strong references to all
baseline CodeBlocks during every GC.

* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::clearMarksForEdenCollection):
(JSC::CodeBlockSet::traceMarked): Be sure to visit the remembered set
strongly, in order to prohibit jettisoning.

(JSC::CodeBlockSet::rememberCurrentlyExecutingCodeBlocks):
* heap/CodeBlockSet.h: Track the remembered set during eden GCs.

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

4 years ago[EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
gyuyoung.kim@webkit.org [Mon, 14 Sep 2015 13:55:10 +0000 (13:55 +0000)]
[EFL] Remove create() factory function in EvasGLContext and EvasGLSurface
https://bugs.webkit.org/show_bug.cgi?id=149110

Reviewed by Csaba Osztrogonác.

It is not good implementation we support both create() factory function and public constructor.
In EvasGLContext and EvasGLSurface cases, those have supported both. However create() factory is only
used by EwkView. Thus let's remove the create() function, then EwkView creates EvasGLContext using
std::make_unique<> directly.

Source/WebCore:

* platform/graphics/efl/EvasGLContext.h:
(WebCore::EvasGLContext::create): Deleted.
* platform/graphics/efl/EvasGLSurface.h:
(WebCore::EvasGLSurface::create): Deleted.

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::createGLSurface):

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

4 years agomin-width/height should default to auto for grid items
svillar@igalia.com [Mon, 14 Sep 2015 10:40:55 +0000 (10:40 +0000)]
min-width/height should default to auto for grid items
https://bugs.webkit.org/show_bug.cgi?id=146021

Reviewed by Darin Adler.

Based on Blink's r194408, r194863 and r194887 by <rego@igalia.com>.

Source/WebCore:

From the spec (http://dev.w3.org/csswg/css-grid/#grid-items):
"The auto value of min-width and min-height behaves on grid
items in the relevant axis analogously to its behavior on flex
items in the main axis."

From now on the default value for min-width and min-height for
grid items is auto, meaning that in general, grid items won't
shrink bellow their content.

The change is not exactly the same as the one in Blink because
this one takes into account vertical writting modes, something
that was not well handled in the original one.

Tests: fast/css-grid-layout/min-width-height-auto-overflow.html
       fast/css-grid-layout/min-width-height-auto.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalHeight):

LayoutTests:

Apart from the original tests this includes some extra ones to
verify that we behave correctly with vertical writing modes.

* fast/css-grid-layout/min-width-height-auto-expected.txt: Added.
* fast/css-grid-layout/min-width-height-auto-overflow-expected.html: Added.
* fast/css-grid-layout/min-width-height-auto-overflow.html: Added.
* fast/css-grid-layout/min-width-height-auto.html: Added.
* fast/css/auto-min-size-expected.txt:
* fast/css/auto-min-size.html:

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

4 years ago[css-grid] Percentage columns should remove scrollbar's width
rego@igalia.com [Mon, 14 Sep 2015 09:46:37 +0000 (09:46 +0000)]
[css-grid] Percentage columns should remove scrollbar's width
https://bugs.webkit.org/show_bug.cgi?id=149116

Reviewed by Sergio Villar Senin.

Source/WebCore:

Currently the calculation of percentage columns was not subtracting the
scrollbar's size.
Fixed RenderGrid::computeUsedBreadthOfSpecifiedLength()
to avoid this problem.

Test: fast/css-grid-layout/grid-percent-track-scrollbar.html

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

LayoutTests:

Added test to check the behavior for both columns and rows.
Note that rows (height) were already working fine.

* fast/css-grid-layout/grid-percent-track-scrollbar-expected.txt: Added.
* fast/css-grid-layout/grid-percent-track-scrollbar.html: Added.

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

4 years ago[Streams API] pipe-to writable stream tests
calvaris@igalia.com [Mon, 14 Sep 2015 08:47:39 +0000 (08:47 +0000)]
[Streams API] pipe-to writable stream tests
https://bugs.webkit.org/show_bug.cgi?id=148296

Reviewed by Darin Adler.

* streams/reference-implementation/pipe-to-expected.txt: Added.
* streams/reference-implementation/pipe-to.html: Added.

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

4 years ago[Streams API] Add readable stream templated tests for writable streams
calvaris@igalia.com [Mon, 14 Sep 2015 08:35:52 +0000 (08:35 +0000)]
[Streams API] Add readable stream templated tests for writable streams
https://bugs.webkit.org/show_bug.cgi?id=148304

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-templated-expected.txt: Added new expectations.
* streams/reference-implementation/readable-stream-templated.html: New writable stream tests.

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

4 years ago[Streams API] Add pipe-to-options writable stream tests
calvaris@igalia.com [Mon, 14 Sep 2015 07:59:48 +0000 (07:59 +0000)]
[Streams API] Add pipe-to-options writable stream tests
https://bugs.webkit.org/show_bug.cgi?id=148297

Reviewed by Darin Adler.

* streams/reference-implementation/pipe-to-options-expected.txt: Added.
* streams/reference-implementation/pipe-to-options.html: Added.

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

4 years ago[Streams API] Add tests about abort on writable streams
calvaris@igalia.com [Mon, 14 Sep 2015 07:56:27 +0000 (07:56 +0000)]
[Streams API] Add tests about abort on writable streams
https://bugs.webkit.org/show_bug.cgi?id=148298

Reviewed by Darin Adler.

* streams/reference-implementation/writable-stream-abort-expected.txt: Added.
* streams/reference-implementation/writable-stream-abort.html: Added.

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

4 years ago[Streams API] Add general writable streams tests
calvaris@igalia.com [Mon, 14 Sep 2015 07:53:04 +0000 (07:53 +0000)]
[Streams API] Add general writable streams tests
https://bugs.webkit.org/show_bug.cgi?id=148299

Reviewed by Darin Adler.

* streams/reference-implementation/writable-stream-expected.txt: Added.
* streams/reference-implementation/writable-stream.html: Added.

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

4 years ago[GTK] Layout Test media/video-volume-slider.html is flaky
changseok.oh@collabora.com [Mon, 14 Sep 2015 07:47:41 +0000 (07:47 +0000)]
[GTK] Layout Test media/video-volume-slider.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=149032

Reviewed by Philippe Normand.

* platform/gtk/TestExpectations: media/video-volume-slider.html is removed.

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

4 years agoImprove Node pre-insertion validation when the parent is a Document
cdumez@apple.com [Mon, 14 Sep 2015 05:08:39 +0000 (05:08 +0000)]
Improve Node pre-insertion validation when the parent is a Document
https://bugs.webkit.org/show_bug.cgi?id=149109
<rdar://problem/22560436>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/dom/nodes/Node-insertBefore-expected.txt:
* web-platform-tests/dom/nodes/Node-replaceChild-expected.txt:
* web-platform-tests/dom/nodes/append-on-Document-expected.txt:
* web-platform-tests/dom/nodes/prepend-on-Document-expected.txt:

Source/WebCore:

Improve Node pre-insertion validation when the parent is a Document to
match the specification:
https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity
https://dom.spec.whatwg.org/#concept-node-replace

This affects the following API: Node.insertBefore(), Node.appendChild(),
Node.replaceChild().

WebKit current fails to do the following checks whenever the parent is a
Document from pre-insertion validation:
1. If the inserted Node is a DocumentFragment, we should make sure it
  contains only one Element.
-> This is because a Document can have only one child that is an
   Element [1].
2.a. If an Element is inserted, we should make sure it is not inserted
     before a DocumentType.
2.b. If a DocumentType is inserted, we should make sure it is not
     inserted after an Element.
-> This is because the DocType must come before the optional Element
   child [1].

Firefox and Chrome already match the specification here. This patch
aligns WebKit's behavior with those browsers and the specification.

[1] https://dom.spec.whatwg.org/#node-trees

No new tests, already covered by existing W3C tests.

* dom/ContainerNode.cpp:
(WebCore::checkAcceptChild):
(WebCore::checkAddChild):
(WebCore::checkReplaceChild):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::appendChild):
(WebCore::containsConsideringHostElements): Deleted.
(WebCore::checkAcceptChildGuaranteedNodeTypes): Deleted.
* dom/Document.cpp:
(WebCore::Document::canAcceptChild):
(WebCore::Document::cloneNodeInternal): Deleted.
* dom/Document.h:

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

4 years agoDocument.adoptNode() should be able to explicitly adopt a DocumentType node
cdumez@apple.com [Mon, 14 Sep 2015 05:06:40 +0000 (05:06 +0000)]
Document.adoptNode() should be able to explicitly adopt a DocumentType node
https://bugs.webkit.org/show_bug.cgi?id=149097
LayoutTests/imported/w3c:

<rdar://problem/22549345>

Reviewed by Ryosuke Niwa.

Rebaseline W3C test now that a new check is passing.

* web-platform-tests/dom/nodes/Document-adoptNode-expected.txt:

Source/WebCore:

<rdar://problem/22549345>

Reviewed by Ryosuke Niwa.

Document.adoptNode() should be able to explicitly adopt a DocumentType
node as per the latest DOM specification:
https://dom.spec.whatwg.org/#dom-document-adoptnode

Chrome and Firefox match the specidicaiton but WebKit was throwing a
NotSupportedError.

No new tests, already covered by existing test.

* dom/Document.cpp:
(WebCore::Document::adoptNode): Deleted.

LayoutTests:

Reviewed by Ryosuke Niwa.

Rebaseline DOM3 tests, those seem to be outdated now.

* dom/xhtml/level3/core/documentadoptnode10-expected.txt:
* dom/xhtml/level3/core/documentadoptnode11-expected.txt:
* dom/xhtml/level3/core/documentadoptnode12-expected.txt:

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

4 years agoDocument.title does not behave according to specification
cdumez@apple.com [Mon, 14 Sep 2015 05:03:29 +0000 (05:03 +0000)]
Document.title does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=149098

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/html/dom/documents/dom-tree-accessors/document.title-01-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.title-02-expected.txt:

Source/WebCore:

Update Document.title to behave according to the latest DOM specification:
https://html.spec.whatwg.org/multipage/dom.html#document.title

In particular, the following Web-Exposed changes were made:
1. The title Element should be the first title element in the document
   (in tree order) [1]. Previously, WebKit would use the first title
   Element *added* to the Document. Document.title returns the text
   content of the title Element so this change is web-exposed.
2. If the title Element is replaced after the title has been set by the
   JS (via the document.title setter), we should update the value
   returned by the document.title getter. Previously, WebKit would set
   a flag if the title was explicitly set by JS via document.title
   setter and later title element changes would not override the title
   set by the JS. This behavior isn't specified and does not match the
   behavior of other browsers.

The new behavior is also consistent with the behavior of Firefox and
Chrome.

Some refactoring was made for the sake of clarity now that our
implementation has changed. See details below.

[1] https://html.spec.whatwg.org/multipage/dom.html#the-title-element-2

No new tests, already covered by existing tests.

* dom/Document.cpp:
(WebCore::Document::updateTitleFromTitleElement):
New convenience method that calls updateTitle() with the text of the
document's current title Element. If there is no title Element, it
clears the title.

(WebCore::Document::updateTitleElement):
Method which updates the Document's title Element whenever a title
Element is added or removed from the Document. Once the title Element
is updated, it takes care of calling updateTitleFromTitleElement() to
update the Document's title.

(WebCore::Document::titleElementAdded):
(WebCore::Document::titleElementRemoved):
(WebCore::Document::titleElementTextChanged):
New Document public API called by HTMLTitleElement / SVGTitleElement
whenever a title Element is added / removed from the Document or
whenever the title element's text has changed. These methods will
take care of calling updateTitleElement() / updateTitleFromTitleElement()
as necessary.
Previously, we would only have 2 methods:
- setTitleElement() which would be called whenever a title Element was
  added to the document or when its text had changed. The name was
  confusing because it would not necessarily set the document's title
  Element and it would be used both for title element update and a
  simple title update. This method has been split into 2:
  titleElementAdded() and titleElementTextChanged().
- removeTitle() which would be called whenever a title Element was
  removed. The naming was confusing because it would not necessarily
  remove the Document's title Element. This is now called
  titleElementRemoved().

* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::insertedInto):
Call the new titleElementAdded() instead of setTitleElement().

(WebCore::HTMLTitleElement::removedFrom):
Call the new titleElementRemoved() instead of removeTitle().

(WebCore::HTMLTitleElement::childrenChanged):
Call the new titleElementTextChanged() instead of
setTitleElement() / removeTitle() as we don't really want
to remove or add a title Element. We merely want to notify
the document that the title element text has changed in
case it is the current title Element of the Document.

(WebCore::HTMLTitleElement::computedTextWithDirection):
Rename textWithDirection() to computedTextWithDirection() to
make it clear it is not a simple getter and make it private
as it is only used to set the m_title member which caches the
computed text.

* html/HTMLTitleElement.h:
Add new textWithDirection() getter which returns m_title. This
is needed so that Document can query the title of the Element.
Previously, HTMLTitleElement would pass directly m_title to
the Document when calling Document::setTitleElement().

* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedInto):
Call the new titleElementAdded() instead of setTitleElement().

(WebCore::SVGTitleElement::removedFrom):
Call the new titleElementRemoved() instead of removeTitle().

(WebCore::SVGTitleElement::childrenChanged):
Call the new titleElementTextChanged() instead of
setTitleElement().

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

4 years agodocument.lastModified should use the user's local time zone
cdumez@apple.com [Mon, 14 Sep 2015 04:18:18 +0000 (04:18 +0000)]
document.lastModified should use the user's local time zone
https://bugs.webkit.org/show_bug.cgi?id=149092
LayoutTests/imported/w3c:

<rdar://problem/22567705>

Reviewed by Ryosuke Niwa.

Rebaseline a couple of W3C tests now that more checks are passing.

* web-platform-tests/html/dom/documents/resource-metadata-management/document-lastModified-01-expected.txt:
* web-platform-tests/html/dom/documents/resource-metadata-management/document-lastModified-expected.txt:

Source/WebCore:

<rdar://problem/22567705>

Reviewed by Ryosuke Niwa.

document.lastModified should use the user's local time zone:
https://html.spec.whatwg.org/multipage/dom.html#dom-document-lastmodified

Chrome and Firefox comply with the specification but WebKit was using
UTC. This patch aligns WebKit's behavior with the specification and
other browsers.

No new tests, already covered by existing tests.

* dom/Document.cpp:
(WebCore::Document::lastModified):
(WebCore::Document::setCookieURL): Deleted.

LayoutTests:

Reviewed by Ryosuke Niwa.

Update test so that it converts document.lastModified to UTF before
printing it. This is so that we can consistent layout tests results, no
matter the system's timezone.

* http/tests/misc/last-modified-parsing-expected.txt:
* http/tests/resources/last-modified.php:

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

4 years agoUnreviewed EFL gardening.
gyuyoung.kim@webkit.org [Mon, 14 Sep 2015 03:07:48 +0000 (03:07 +0000)]
Unreviewed EFL gardening.

Mark fast/text/international/system-language/system-font-punctuation.html to *Missing* since r188377.
Additionally some tests have been passed since r188693. Removed the tests in TestExpectation.

* platform/efl/TestExpectations:

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

4 years agoNode.baseURI should not return null for detached nodes
cdumez@apple.com [Mon, 14 Sep 2015 03:04:47 +0000 (03:04 +0000)]
Node.baseURI should not return null for detached nodes
https://bugs.webkit.org/show_bug.cgi?id=149104
<rdar://problem/22559535>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/dom/nodes/Node-baseURI-expected.txt:

Source/WebCore:

Node.baseURI should not return null for detached nodes. It should return
the node document's base URL. The node document is set when the node is
created so it is valid even if the node is detached [1]:
https://dom.spec.whatwg.org/#dom-node-baseuri

WebKit was traversing the ancestors to find the base URL, which only
works if the node is attached. Also, WebKit was taking into account
the xml:base attribute when computing the baseURI.

Both Chrome and Firefox already dropped support for xml:base:
https://code.google.com/p/chromium/issues/detail?id=341854
https://bugzilla.mozilla.org/show_bug.cgi?id=903372

Firefox complies with the specification. Chrome's baseURI still only
works for attached Nodes as their implementation still traverses the
DOM tree, despite dropping support for xml:base.

This patch drops support xml:base when computing Node.baseURI, as
Firefox, Chrome and the latest DOM specification do. It also makes
Node.baseURI work for detached Nodes by returning the base URL of the
node Document. This means we no longer have to traverse the Node's
ancestors in the DOM tree. This is consistent with the behavior of
Firefox and the latest DOM specification.

This patch does not drop the SVGElement.xmlbase attribute yet. However,
we should probably consider making this change as well given that:
- The SVG2 specification dropped it
- Chrome dropped it.
- It no longers impacts Node.baseURI

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976

No new tests, already covered by existing test.

* dom/Document.cpp:
(WebCore::Document::setContent): Deleted.
* dom/Document.h:
(WebCore::Document::inputCursor): Deleted.
* dom/DocumentType.cpp:
(WebCore::DocumentType::nodeName): Deleted.
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::imageSourceURL): Deleted.
(WebCore::Element::rendererIsNeeded): Deleted.
(WebCore::Element::createElementRenderer): Deleted.
(WebCore::Element::insertedInto): Deleted.
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::baseURI):
* dom/Node.h:
* svg/SVGElement.idl:

LayoutTests:

* dom/xhtml/level3/core/nodegetbaseuri03-expected.txt:
Rebaseline outdated DOM3 test.

* svg/custom/image-base-uri-expected.txt: Removed.
* svg/custom/image-base-uri.svg: Removed.
Drop outdated SVG test. SVG2 no longer support xml:base.

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

4 years agoCharacterData API parameters should not be optional
cdumez@apple.com [Mon, 14 Sep 2015 02:42:06 +0000 (02:42 +0000)]
CharacterData API parameters should not be optional
https://bugs.webkit.org/show_bug.cgi?id=149101
<rdar://problem/22546954>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/CharacterData-appendData-expected.txt:
* web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt:

Source/WebCore:

CharacterData API parameters should not be optional as per the DOM
specification:
https://dom.spec.whatwg.org/#characterdata

The parameters are also mandatory in Firefox and Chrome. However,
those parameters are optional in WebKit. When DOMString parameters
were omitted, we would use the "undefined" string instead. When
unsigned long parameters were omitted, we would use 0 instead.
This patch aligns our behavior with the specification and other
major browsers.

No new tests, already covered by existing tests.

* dom/CharacterData.cpp:
(WebCore::CharacterData::appendData):
* dom/CharacterData.h:
* dom/CharacterData.idl:
* dom/Element.cpp:
(WebCore::Element::mergeWithNextTextNode):
* dom/Node.cpp:
(WebCore::Node::normalize):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::exitText):

LayoutTests:

Update existing test to reflect our web-exposed behavior change.

* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/dom/script-tests/non-numeric-values-numeric-parameters.js:

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

4 years agoRemove all uses of PassRefPtr in crypto, storage, and history
gyuyoung.kim@webkit.org [Mon, 14 Sep 2015 02:36:37 +0000 (02:36 +0000)]
Remove all uses of PassRefPtr in crypto, storage, and history
https://bugs.webkit.org/show_bug.cgi?id=149091

Reviewed by Andreas Kling.

Source/WebCore:

* crypto/CryptoKeyPair.cpp:
(WebCore::CryptoKeyPair::CryptoKeyPair):
* crypto/CryptoKeyPair.h:
(WebCore::CryptoKeyPair::create):
* crypto/SubtleCrypto.h:
(WebCore::SubtleCrypto::create):
* crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
(WebCore::CryptoKeyRSA::create):
* crypto/keys/CryptoKeyAES.cpp:
(WebCore::CryptoKeyAES::generate):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyHMAC.cpp:
(WebCore::CryptoKeyHMAC::generate):
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::create):
* history/BackForwardController.cpp:
(WebCore::BackForwardController::BackForwardController):
* history/BackForwardController.h:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setStateObject):
(WebCore::HistoryItem::setFormData):
* history/HistoryItem.h:
(WebCore::HistoryItem::stateObject):
* loader/EmptyClients.cpp:
* page/Page.cpp:
(WebCore::Page::Page):
* storage/Storage.cpp:
(WebCore::Storage::create):
(WebCore::Storage::Storage):
* storage/Storage.h:
* storage/StorageArea.h:
* storage/StorageMap.cpp:
(WebCore::StorageMap::copy):
(WebCore::StorageMap::setItem):
(WebCore::StorageMap::setItemIgnoringQuota):
(WebCore::StorageMap::removeItem):
* storage/StorageMap.h:
* storage/StorageNamespace.h:

Source/WebKit:

* Storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::storageArea):
* Storage/StorageNamespaceImpl.h:

Source/WebKit2:

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
* WebProcess/Storage/StorageNamespaceImpl.h:

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

4 years agoDefine HAVE_LINK_PREVIEW in WebKit2
mitz@apple.com [Sun, 13 Sep 2015 19:13:41 +0000 (19:13 +0000)]
Define HAVE_LINK_PREVIEW in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=149099

Reviewed by Sam Weinig.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/WKImagePreviewViewController.mm:
* config.h:

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

4 years agoWebkit Gujarati Translations
mcatanzaro@igalia.com [Sun, 13 Sep 2015 14:01:49 +0000 (14:01 +0000)]
Webkit Gujarati Translations
https://bugs.webkit.org/show_bug.cgi?id=139530

Unreviewed.

Patch by Ankit Patel <ankit@redhat.com> on 2015-09-13

* gu.po:

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

4 years agoAnother test fix after r189670.
mmaxfield@apple.com [Sun, 13 Sep 2015 06:46:30 +0000 (06:46 +0000)]
Another test fix after r189670.

Unreviewed.

* platform/mac-wk1/TestExpectations:

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

4 years agoTest fix after r189670.
mmaxfield@apple.com [Sun, 13 Sep 2015 06:19:01 +0000 (06:19 +0000)]
Test fix after r189670.

Unreviewed.

* platform/mac/TestExpectations:

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

4 years ago[Cocoa] Add system-language-specific tests
mmaxfield@apple.com [Sun, 13 Sep 2015 04:10:06 +0000 (04:10 +0000)]
[Cocoa] Add system-language-specific tests
https://bugs.webkit.org/show_bug.cgi?id=148775

Reviewed by Alexey Proskuryakov.

This patch adds (or rewrites) tests to take advantage of our new ability to mock
the system language for testing (https://bugs.webkit.org/show_bug.cgi?id=148671).

It tests these patches:
https://bugs.webkit.org/show_bug.cgi?id=148164
https://bugs.webkit.org/show_bug.cgi?id=147504
https://bugs.webkit.org/show_bug.cgi?id=147862
https://bugs.webkit.org/show_bug.cgi?id=147964

* fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html: Renamed from LayoutTests/fast/text/arabic-glyph-cache-fill-combine-expected.html.
* fast/text/international/system-language/arabic-glyph-cache-fill-combine.html: Renamed from LayoutTests/fast/text/arabic-glyph-cache-fill-combine.html.
* fast/text/international/system-language/han-quotes-expected-mismatch.html: Added.
* fast/text/international/system-language/han-quotes.html: Added.
* fast/text/international/system-language/hindi-system-font-punctuation-expected.html: Renamed from LayoutTests/fast/text/hindi-system-font-punctuation-expected.html.
* fast/text/international/system-language/hindi-system-font-punctuation.html: Renamed from LayoutTests/fast/text/hindi-system-font-punctuation.html.
* fast/text/international/system-language/system-font-punctuation.html: Renamed from LayoutTests/fast/text/system-font-punctuation.html.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/text/system-font-punctuation-expected.txt.
* platform/mac/TestExpectations:
* platform/mac/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/mac/fast/text/system-font-punctuation-expected.txt.
* platform/win/TestExpectations:
* platform/win/fast/text/international/system-language/system-font-punctuation-expected.txt: Renamed from LayoutTests/platform/win/fast/text/system-font-punctuation-expected.txt.

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

4 years ago[Cocoa] Allow testing with the system language
mmaxfield@apple.com [Sun, 13 Sep 2015 03:47:56 +0000 (03:47 +0000)]
[Cocoa] Allow testing with the system language
https://bugs.webkit.org/show_bug.cgi?id=148671

Reviewed by Anders Carlsson and Alexey Proskuryakov.

Source/WebKit2:

This patch adds two new SPI functions for setting and retrieving a vector of
override languages to/from the WKContextConfiguration. The implementation of
these functions holds state inside WebProcessPoolConfiguration. Then, when
we launch a process, the WebProcessProxy will inject these override languages
into the ProcessLauncher::LaunchOptions so that the ProcessLauncher can
inject these languages into the XPC Bootstrap message. Then, in the Web
Process's main(), the XPC Boostrap message is read, and the platform
languages are set via NSUserDefaults setting a volatile domain.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(main): Set the volatile domain with NSUserDefaults.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h: Hold state for the override
languages.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyOverrideLanguages): SPI.
(WKContextConfigurationSetOverrideLanguages): Ditto.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService): Inject the languages into the XPC Bootstrap
message.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions): Inject the override languages
into the ProcessLauncher::LaunchOptions.

Tools:

React to tests marked with language=lang1,lang2,etc in their header.
Once this information is parsed, pass it to
WKContextConfigurationSetOverrideLanguages().

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize): Don't clobber the language
list.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions): Call
WKContextConfigurationSetOverrideLanguages().
(WTR::updateTestOptionsFromTestHeader): Inspect the language option.
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::viewSupportsOptions): Cause a differing language
option to restart the web process.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::viewSupportsOptions): Ditto.

LayoutTests:

Add a test for the declarative form of setting the system language.

* fast/text/international/system-language/declarative-language-expected.txt: Added.
* fast/text/international/system-language/declarative-language.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

4 years ago[WKTR] Allow changing the WKContextConfiguration between successive tests
mmaxfield@apple.com [Sun, 13 Sep 2015 02:31:34 +0000 (02:31 +0000)]
[WKTR] Allow changing the WKContextConfiguration between successive tests
https://bugs.webkit.org/show_bug.cgi?id=148833

Reviewed by Tim Horton.

Previously, we were creating a single WKContext and it lived for the life of the entire test runner.
However, there are certain tests which require specifying options in this object. This patch makes
our existing code for recreating the test runner web view also recreate the WKContext.

As such, our options to the view are now options to the WKContextConfiguration. This patch renames the
class.

* WebKitTestRunner/ContextConfigurationOptions.h: Renamed from Tools/WebKitTestRunner/ViewOptions.h.
* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::options):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::generateContextConfiguration):
(WTR::TestController::generatePageConfiguration):
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::ensureViewSupportsOptionsForTest):
(WTR::updateContextConfigurationOptionsFromTestHeader):
(WTR::TestController::contextConfigurationOptionsForTest):
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
(WTR::updateViewOptionsFromTestHeader): Deleted.
(WTR::TestController::viewOptionsForTest): Deleted.
* WebKitTestRunner/TestController.h:
(WTR::TestController::injectedBundlePath):
(WTR::TestController::testPluginDirectory):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
(WTR::TestController::platformCreateOtherPage):
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::viewSupportsOptions):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::updatePlatformSpecificContextConfigurationOptionsForTest):
(WTR::TestController::updatePlatformSpecificViewOptionsForTest): Deleted.

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

4 years agoUpdated Spanish translation
mcatanzaro@igalia.com [Sun, 13 Sep 2015 01:14:08 +0000 (01:14 +0000)]
Updated Spanish translation
https://bugs.webkit.org/show_bug.cgi?id=145550

Unreviewed.

Patch by Francisco Serrador <fserrador@gmail.com> on 2015-09-12

* es.po:

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

4 years agoUpdated Slovenian translation
mcatanzaro@igalia.com [Sun, 13 Sep 2015 01:11:46 +0000 (01:11 +0000)]
Updated Slovenian translation
https://bugs.webkit.org/show_bug.cgi?id=123080

Unreviewed.

Patch by Matej Urbančič <mateju@svn.gnome.org> on 2015-09-12

* sl.po:

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

4 years agoWebkit Tamil translations updated
mcatanzaro@igalia.com [Sun, 13 Sep 2015 01:08:22 +0000 (01:08 +0000)]
Webkit Tamil translations updated
https://bugs.webkit.org/show_bug.cgi?id=139478

Unreviewed.

Patch by Shantha kumar <shkumar@redhat.com> on 2015-09-12

* ta.po:

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

4 years ago[l10n] Updated Bulgarian translation
mcatanzaro@igalia.com [Sat, 12 Sep 2015 23:56:21 +0000 (23:56 +0000)]
[l10n] Updated Bulgarian translation
https://bugs.webkit.org/show_bug.cgi?id=142611

Unreviewed.

Patch by Zahari Yurukov <zahari.yurukov@gmail.com> on 2015-09-12

* bg.po:

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

4 years ago[l10n] Updated Polish translation of WebKitGTK+
mcatanzaro@igalia.com [Sat, 12 Sep 2015 23:54:17 +0000 (23:54 +0000)]
[l10n] Updated Polish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=148475

Unreviewed.

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2015-09-12

* pl.po:

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

4 years ago[GTK] [l10n] Updated Turkish translation of WebKitGTK+
mcatanzaro@igalia.com [Sat, 12 Sep 2015 23:27:19 +0000 (23:27 +0000)]
[GTK] [l10n] Updated Turkish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=148362

Unreviewed.

Patch by Muhammet Kara <muhammetk@gmail.com> on 2015-09-12

* tr.po: Added.

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

4 years ago[GTK] [l10n] Updated Turkish translation of WebKitGTK+
mcatanzaro@igalia.com [Sat, 12 Sep 2015 23:20:54 +0000 (23:20 +0000)]
[GTK] [l10n] Updated Turkish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=148362

Unreviewed.

* tr.po: Added.

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

4 years agowindow.EventTarget should exist
cdumez@apple.com [Sat, 12 Sep 2015 21:52:25 +0000 (21:52 +0000)]
window.EventTarget should exist
https://bugs.webkit.org/show_bug.cgi?id=149085
<rdar://problem/22546774>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/dom/interface-objects-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Drop [NoInterfaceObject] for the EventTarget interface to match Chrome,
Firefox and the specification:
https://dom.spec.whatwg.org/#interface-eventtarget

No new tests, already covered by existing tests.

* dom/EventTarget.idl:

LayoutTests:

Update / rebaseline existing test as window.EventTarget now exists.

* fast/dom/dom-constructors-expected.txt:
* fast/dom/dom-constructors.html:

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

4 years ago[iOS] Allow UDP networking
ap@apple.com [Sat, 12 Sep 2015 21:49:59 +0000 (21:49 +0000)]
[iOS] Allow UDP networking
https://bugs.webkit.org/show_bug.cgi?id=149081
rdar://problem/22291743

Reviewed by Sam Weinig.

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

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

4 years agoREGRESSION(r189585): run-perf-tests Speedometer fails with a console error
fpizlo@apple.com [Sat, 12 Sep 2015 20:52:26 +0000 (20:52 +0000)]
REGRESSION(r189585): run-perf-tests Speedometer fails with a console error
https://bugs.webkit.org/show_bug.cgi?id=149066

Reviewed by Michael Saboff.

The bug here was that the new IC code was calling actionForCell() more than once. That's
illegal, since when actionForCell() returns RetryCacheLater, it means that it changed some
object's Structure. The Repatch code was doing things like "if (actionForCell(blah) ==
AttemptToCache)" in more than one place, so that if the first such expression was false, then
we'd fall through to the next one. It's possible for the first call to return RetryCacheLater,
in which case our view of the world just got clobbered and we need to return, and then the
second call will probably return AttemptToCache because it *thinks* that we had bailed the last
time and we're now in a future IC invocation.

The solution is to cache the actionForCell() result. This is a bit tricky, because we need to
do this after we check if we're in a proxy.

Debugging bugs like these requires adding ad hoc bisection code in various places. We already
had the basic hooks for this. This patch makes those hooks a bit more useful. In the case of
the LLInt->JIT tier-up hooks, it adds a CodeBlock* argument so that we can bisect based on the
CodeBlock. In the case of Repatch, it puts the Options::forceICFailure() check in a helper
function that also takes ExecState*, which allows us to bisect on either CodeBlock or
CodeOrigin.

* jit/Repatch.cpp:
(JSC::actionForCell):
(JSC::forceICFailure):
(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):
(JSC::tryRepatchIn):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::shouldJIT):
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::entryOSR):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* tests/stress/retry-cache-later.js:

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

4 years agoWeb Inspector: Extract InspectorFrontendAPI dispatching from WebInspectorUI
commit-queue@webkit.org [Sat, 12 Sep 2015 19:02:17 +0000 (19:02 +0000)]
Web Inspector: Extract InspectorFrontendAPI dispatching from WebInspectorUI
https://bugs.webkit.org/show_bug.cgi?id=149089

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

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.cpp: Added.
(WebKit::WebInspectorFrontendAPIDispatcher::WebInspectorFrontendAPIDispatcher):
(WebKit::WebInspectorFrontendAPIDispatcher::reset):
(WebKit::WebInspectorFrontendAPIDispatcher::frontendLoaded):
(WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
(WebKit::WebInspectorFrontendAPIDispatcher::dispatchMessageAsync):
(WebKit::WebInspectorFrontendAPIDispatcher::evaluateExpressionOnLoad):
* WebProcess/WebPage/WebInspectorFrontendAPIDispatcher.h: Added.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::WebInspectorUI):
(WebKit::WebInspectorUI::establishConnection):
(WebKit::WebInspectorUI::frontendLoaded):
(WebKit::WebInspectorUI::setDockSide):
(WebKit::WebInspectorUI::setDockingUnavailable):
(WebKit::WebInspectorUI::showConsole):
(WebKit::WebInspectorUI::showResources):
(WebKit::WebInspectorUI::showMainResourceForFrame):
(WebKit::WebInspectorUI::startPageProfiling):
(WebKit::WebInspectorUI::stopPageProfiling):
(WebKit::WebInspectorUI::didSave):
(WebKit::WebInspectorUI::didAppend):
(WebKit::WebInspectorUI::sendMessageToFrontend):
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.
(WebKit::WebInspectorUI::evaluateExpressionOnLoad): Deleted.
(WebKit::WebInspectorUI::evaluatePendingExpressions): Deleted.
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Deleted.

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

4 years agoWeb Inspector: Move Already Generic Inspector Page Context Menu to Generic Setup
commit-queue@webkit.org [Sat, 12 Sep 2015 18:31:21 +0000 (18:31 +0000)]
Web Inspector: Move Already Generic Inspector Page Context Menu to Generic Setup
https://bugs.webkit.org/show_bug.cgi?id=149088

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

* UIProcess/WebInspectorProxy.cpp:
(WebKit::getContextMenuFromProposedMenu):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::getContextMenuFromProposedMenu): Deleted.
(WebKit::WebInspectorProxy::platformCreateInspectorPage):

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

4 years agoWeb Inspector: disambiguate inspected/frontend controllers and pages in backend code
bburg@apple.com [Sat, 12 Sep 2015 17:44:40 +0000 (17:44 +0000)]
Web Inspector: disambiguate inspected/frontend controllers and pages in backend code
https://bugs.webkit.org/show_bug.cgi?id=149071

Reviewed by Joseph Pecoraro.

Source/WebCore:

Be consistent about prefixing pages, inspector controllers, and window controllers
with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
in the frontend connection code, which are tracked by https://webkit.org/b/149006.

No new tests, no behavior change.

* WebCore.order:
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::show):
(WebCore::InspectorController::close):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
(WebCore::InspectorFrontendClientLocal::~InspectorFrontendClientLocal):
(WebCore::InspectorFrontendClientLocal::canAttachWindow):
(WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
(WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
(WebCore::InspectorFrontendClientLocal::openInNewTab):
(WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
(WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
(WebCore::InspectorFrontendClientLocal::isUnderTest):
* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::freePage):
* loader/EmptyClients.h:

Source/WebKit/ios:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorClient::WebInspectorClient):
(WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebInspectorClient::openLocalFrontend): Renamed.
(WebInspectorClient::closeLocalFrontend): Renamed.
(WebInspectorClient::inspectorDestroyed): Deleted.
(WebInspectorClient::openInspectorFrontend): Deleted.
(WebInspectorClient::closeInspectorFrontend): Deleted.
(WebInspectorClient::showInspectorIndication):
(WebInspectorClient::hideInspectorIndication):
(WebInspectorClient::didSetSearchingForNode):
(WebInspectorFrontendClient::WebInspectorFrontendClient):

Source/WebKit/mac:

Be consistent about prefixing pages, inspector controllers, and window controllers
with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
in the frontend connection code, which are tracked by https://webkit.org/b/149006.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::WebInspectorClient): Renamed.
(WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebInspectorClient::openLocalFrontend): Renamed.
(WebInspectorClient::closeLocalFrontend): Renamed.
(WebInspectorClient::didSetSearchingForNode):
(WebInspectorFrontendClient::WebInspectorFrontendClient):
(WebInspectorFrontendClient::attachAvailabilityChanged):
(WebInspectorFrontendClient::canAttach):
(WebInspectorFrontendClient::frontendLoaded):
(WebInspectorFrontendClient::startWindowDrag):
(WebInspectorFrontendClient::bringToFront):
(WebInspectorFrontendClient::closeWindow):
(WebInspectorFrontendClient::disconnectFromBackend):
(WebInspectorFrontendClient::attachWindow):
(WebInspectorFrontendClient::detachWindow):
(WebInspectorFrontendClient::setAttachedWindowHeight):
(WebInspectorFrontendClient::setToolbarHeight):
(WebInspectorFrontendClient::updateWindowTitle):
(WebInspectorFrontendClient::save):
(WebInspectorFrontendClient::append):
(-[WebInspectorWindowController init]):
(-[WebInspectorWindowController initWithInspectedWebView:isUnderTest:]):
(-[WebInspectorWindowController dealloc]):
(-[WebInspectorWindowController frontendWebView]):
(-[WebInspectorWindowController close]):
(-[WebInspectorWindowController showWindow:]):
(-[WebInspectorWindowController setAttachedWindowHeight:]):
(-[WebInspectorWindowController destroyInspectorView]):
(-[WebInspectorWindowController webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
(WebInspectorClient::inspectorDestroyed): Deleted.
(WebInspectorClient::openInspectorFrontend): Deleted.
(WebInspectorClient::closeInspectorFrontend): Deleted.
(-[WebInspectorWindowController webView]): Deleted.
* WebInspector/WebInspector.h:
* WebInspector/WebInspector.mm:
(-[WebInspector initWithInspectedWebView:]): Renamed.
(-[WebInspector inspectedWebViewClosed]): Renamed.
(-[WebInspector showWindow]):
(-[WebInspector close:]):
(-[WebInspector evaluateInFrontend:script:]):
(-[WebInspector releaseFrontend]):
(-[WebInspector initWithWebView:]): Deleted.
(-[WebInspector webViewClosed]): Deleted.
* WebView/WebView.mm:
(-[WebView _close]):
(-[WebView inspector]):

Source/WebKit/win:

Be consistent about prefixing pages, inspector controllers, and window controllers
with either "frontend" or "inspected", as appropriate. This change makes obvious some bugs
in the frontend connection code, which are tracked by https://webkit.org/b/149006.

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebInspectorClient::openLocalFrontend): Renamed.
(WebInspectorClient::closeLocalFrontend): Renamed.
(WebInspectorClient::inspectorDestroyed): Deleted.
(WebInspectorClient::openInspectorFrontend): Deleted.
(WebInspectorClient::closeInspectorFrontend): Deleted.
* WebCoreSupport/WebInspectorClient.h:
* WebInspector.cpp:
(WebInspector::createInstance):
(WebInspector::WebInspector):
(WebInspector::inspectedWebViewClosed): Renamed.
(WebInspector::show):
(WebInspector::close):
(WebInspector::isJavaScriptProfilingEnabled):
(WebInspector::setJavaScriptProfilingEnabled):
(WebInspector::evaluateInFrontend):
(WebInspector::webViewClosed): Deleted.
* WebInspector.h:
* WebView.cpp:
(WebView::close):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectedPageDestroyed): Renamed.
(WebKit::WebInspectorClient::openLocalFrontend): Renamed.
(WebKit::WebInspectorClient::closeLocalFrontend): Renamed.
(WebKit::WebInspectorClient::inspectorDestroyed): Deleted.
(WebKit::WebInspectorClient::openInspectorFrontend): Deleted.
(WebKit::WebInspectorClient::closeInspectorFrontend): Deleted.
* WebProcess/WebCoreSupport/WebInspectorClient.h:

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

4 years agoChildNode.replaceWith() without argument should replace the node with an empty Docume...
cdumez@apple.com [Sat, 12 Sep 2015 17:33:52 +0000 (17:33 +0000)]
ChildNode.replaceWith() without argument should replace the node with an empty DocumentFragment
https://bugs.webkit.org/show_bug.cgi?id=149073
<rdar://problem/22547801>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/dom/nodes/ChildNode-replaceWith-expected.txt:

Source/WebCore:

ChildNode.replaceWith() without argument should replace the node with
an empty DocumentFragment, as per the specification:
https://dom.spec.whatwg.org/#dom-childnode-replacewith
https://dom.spec.whatwg.org/#converting-nodes-into-a-node

Previously, WebKit did not do anything in this case. This patch fixes
it.

No new tests, already covered by existing test.

* dom/Node.cpp:
(WebCore::Node::replaceWith):

LayoutTests:

Fix / rebaseline test now that our behavior has changed.

* fast/dom/ChildNode-replaceWith-expected.txt:
* fast/dom/ChildNode-replaceWith.html:

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

4 years agoRemove all uses of PassRefPtr in WebCore/plugins
gyuyoung.kim@webkit.org [Sat, 12 Sep 2015 08:47:20 +0000 (08:47 +0000)]
Remove all uses of PassRefPtr in WebCore/plugins
https://bugs.webkit.org/show_bug.cgi?id=149055

Reviewed by Darin Adler.

* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::DOMMimeType):
(WebCore::DOMMimeType::enabledPlugin):
* plugins/DOMMimeType.h:
(WebCore::DOMMimeType::create):
* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::item):
* plugins/DOMMimeTypeArray.h:
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::item):
* plugins/DOMPlugin.h:
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::item):
* plugins/DOMPluginArray.h:
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::bindingInstance):

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

4 years agoRemove all uses of PassRefPtr in WebCore/accessibility and WebCore/fileapi
gyuyoung.kim@webkit.org [Sat, 12 Sep 2015 08:45:51 +0000 (08:45 +0000)]
Remove all uses of PassRefPtr in WebCore/accessibility and WebCore/fileapi
https://bugs.webkit.org/show_bug.cgi?id=149059

Reviewed by Darin Adler.

* accessibility/AXObjectCache.cpp:
* accessibility/AccessibilityObject.cpp:
(WebCore::rangeClosestToRange):
(WebCore::AccessibilityObject::rangeOfStringClosestToRangeInDirection):
(WebCore::AccessibilityObject::selectionRange):
(WebCore::AccessibilityObject::selectText):
* accessibility/AccessibilityObject.h:
* accessibility/ios/AXObjectCacheIOS.mm:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
(-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
* accessibility/mac/AXObjectCacheMac.mm:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
* fileapi/FileList.h:
(WebCore::FileList::append):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* fileapi/WebKitBlobBuilder.h:

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

4 years agoMark http/tests/cache/disk-cache/disk-cache-cancel.html as flaky for
ap@apple.com [Sat, 12 Sep 2015 04:47:01 +0000 (04:47 +0000)]
Mark http/tests/cache/disk-cache/disk-cache-cancel.html as flaky for
https://bugs.webkit.org/show_bug.cgi?id=149087

* platform/wk2/TestExpectations:

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

4 years agoSVGColor custom text format is different from the CSS color custom text format
commit-queue@webkit.org [Sat, 12 Sep 2015 01:51:56 +0000 (01:51 +0000)]
SVGColor custom text format is different from the CSS color custom text format
https://bugs.webkit.org/show_bug.cgi?id=148879

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-09-11
Reviewed by Daniel Bates.

Source/WebCore:

Implement the serialization of a CSS color value as it is described in
<https://drafts.csswg.org/cssom/#serializing-css-values>. Add the new
function Color::cssText() which is refactored from the existing function
Color::serialized(). Use the new function for serializing the SVGColor
always and also for Color but only when the alpha component is not 1.

Test: svg/css/computed-style-rgb-color.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Move the code
for serializing the color from this function to Color::cssText().

* platform/graphics/Color.cpp:
(WebCore::Color::serialized): Call Color::cssText() if the alpha component
is not 1 and delete the repeated code.

(WebCore::Color::cssText):
* platform/graphics/Color.h: Add the new function to the header file.

* svg/SVGColor.cpp:
(WebCore::SVGColor::customCSSText): Call Color::cssText() always instead
of calling Color::serialized() for serializing the SVGColor.

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/parse-color-int-or-percent-crash.html:
* platform/mac/svg/webarchive/svg-script-subresouces-expected.txt:
* svg/css/case-sensitive-tags-expected.txt:
* svg/css/case-sensitive-tags.html:
* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/script-tests/svg-attribute-parser-mode.js:
* svg/css/svg-attribute-parser-mode-expected.txt:
* svg/dom/SVGColor-expected.txt:
* svg/dom/SVGPaint-expected.txt:
* svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt:
* svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js:
* svg/dom/script-tests/SVGColor.js:
* svg/dom/script-tests/SVGPaint.js:
* svg/webarchive/svg-script-subresouces-expected.webarchive:
* transitions/svg-transitions-expected.txt:
Fix expected results for existing tests

* svg/css/computed-style-rgb-color-expected.txt: Added.
* svg/css/computed-style-rgb-color.html: Added.
Ensure that the correct format is returned when getComputedStyle() is
called for an SVG color.

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

4 years agoImplement the relational instructions for floats in WebAssembly
commit-queue@webkit.org [Sat, 12 Sep 2015 00:57:43 +0000 (00:57 +0000)]
Implement the relational instructions for floats in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149080

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-11
Reviewed by Geoffrey Garen.

This patch implements the relational instructions for floats (float32)
in WebAssembly by converting float operands to doubles and then
comparing them using the existing double comparison instructions in the
macro assembler.

* tests/stress/wasm-relational.js:
* tests/stress/wasm/relational.wasm:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildRelationalF32):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseRelationalF32ExpressionI32):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildRelationalF32):

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

4 years agoAX: ARIA 1.1 @aria-current
commit-queue@webkit.org [Sat, 12 Sep 2015 00:47:20 +0000 (00:47 +0000)]
AX: ARIA 1.1 @aria-current
https://bugs.webkit.org/show_bug.cgi?id=146012

Patch by Nan Wang <n_wang@apple.com> on 2015-09-11
Reviewed by Chris Fleizach.

Source/JavaScriptCore:

Updated inspector to support aria-current.

* inspector/protocol/DOM.json:

Source/WebCore:

Tests: accessibility/aria-current.html
       inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html

Added support for ARIA 1.1 aria-current.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::invalidStatus):
(WebCore::AccessibilityObject::ariaCurrentState):
(WebCore::AccessibilityObject::hasTagName):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* html/HTMLAttributeNames.in:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

Source/WebInspectorUI:

Added support for ARIA 1.1 aria-current.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

LayoutTests:

* accessibility/aria-current-expected.txt: Added.
* accessibility/aria-current.html: Added.
* inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent-expected.txt: Added.
* inspector/dom/getAccessibilityPropertiesForNode_ariaCurrent.html: Added.
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoLayoutTestHelper crashes if a color profile isn't set for a 3rd party monitor
msaboff@apple.com [Sat, 12 Sep 2015 00:15:51 +0000 (00:15 +0000)]
LayoutTestHelper crashes if a color profile isn't set for a 3rd party monitor
https://bugs.webkit.org/show_bug.cgi?id=149083

Reviewed by Alexey Proskuryakov.

Check to make sure that we have a valid factoryProfile CFDictionaryRef before using it.

* DumpRenderTree/mac/LayoutTestHelper.m:
(colorProfileURLForDisplay):

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

4 years agoMark http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html...
ap@apple.com [Fri, 11 Sep 2015 23:55:32 +0000 (23:55 +0000)]
Mark http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html as flaky for
https://bugs.webkit.org/show_bug.cgi?id=149082

* TestExpectations:

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

4 years agoAnother build fix.
bdakin@apple.com [Fri, 11 Sep 2015 23:05:48 +0000 (23:05 +0000)]
Another build fix.

* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::size):
(WebKit::ViewSnapshot::imageSizeInBytes):

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

4 years agoUpdate test for bug 148971
dewei_zhu@apple.com [Fri, 11 Sep 2015 22:52:40 +0000 (22:52 +0000)]
Update test for bug 148971
https://bugs.webkit.org/show_bug.cgi?id=149076

Reviewed by Chris Dumez.

* platform/win/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Updated.

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

4 years agoStill need view snapshotting code for non-IOSurface for the sim
bdakin@apple.com [Fri, 11 Sep 2015 22:31:55 +0000 (22:31 +0000)]
Still need view snapshotting code for non-IOSurface for the sim
https://bugs.webkit.org/show_bug.cgi?id=149077

Reviewed by Tim Horton.

This fixes the simulator build.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _zoomToPoint:atScale:animated:]):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor):
(WebKit::ViewSnapshot::surface):
(WebKit::ViewSnapshot::imageSizeInBytes):
(WebKit::ViewSnapshot::size):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::singleton):
(WebKit::ViewSnapshotStore::snapshottingContext):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::~ViewSnapshot):
(WebKit::ViewSnapshot::setSurface):
(WebKit::ViewSnapshot::hasImage):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):

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

4 years agoUnreviewed, moved myself to the list of committers.
ssakshuwong@apple.com [Fri, 11 Sep 2015 21:40:17 +0000 (21:40 +0000)]
Unreviewed, moved myself to the list of committers.

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

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

4 years agocryptographicallyRandomValuesFromOS should use CCRandomCopyBytes when available.
keith_miller@apple.com [Fri, 11 Sep 2015 21:34:15 +0000 (21:34 +0000)]
cryptographicallyRandomValuesFromOS should use CCRandomCopyBytes when available.
https://bugs.webkit.org/show_bug.cgi?id=148439

Reviewed by Alexey Proskuryakov.

Recently, we switched to using arc4random_buf on Darwin but further research indicates that
arc4random_buf has the same behavior we had before and thus we were just pushing the problem
further down the stack. CCRandomCopyBytes, however, appears to be more advanced and has much
better error handling than we had before.

* WTF.xcodeproj/project.pbxproj:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/spi/darwin/CommonCryptoSPI.h: Added.

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

4 years agoDOMTokenList update steps for classList don't follow the spec
cdumez@apple.com [Fri, 11 Sep 2015 21:33:16 +0000 (21:33 +0000)]
DOMTokenList update steps for classList don't follow the spec
https://bugs.webkit.org/show_bug.cgi?id=148589
<rdar://problem/22547443>

Reviewed by Ryosuke Niwa and Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C tests for DOMTokenList now that more checks are passing.

* web-platform-tests/dom/lists/DOMTokenList-stringifier-expected.txt:
* web-platform-tests/dom/nodes/Element-classlist-expected.txt:

Source/WebCore:

Update our DOMTokenList implementation to behave according to
the latest DOM specification:
https://dom.spec.whatwg.org/#interface-domtokenlist

In particular, the following changes were made:
- The stringifier now returns the result of the ordered set serializer
  for tokens. This means that we drop duplicate spaces and extra spaces
  [1][2][3].
- DOMSettableTokenList.value now returns the result of the ordered set
  serializer for tokens [4] as well.
- When the DOMTokenList's tokens are updated and there is an associated
  Element attribute, we set the attribute value to be the the ordered
  set serializer for tokens. This is according to the DOMTokenList
  update steps in the specification [6]. Chrome does not match the
  specification either.

Edge browser behaves according to the specification already. Firefox was
implementing this via [7] but no recent progress. This makes the JS API
nicer to use and interest was shown by jQuery Team.

The following refactoring was done:
- Merge ClassList / RelList into a single AttributeDOMTokenList class
  as their code is mostly duplicated and the only thing that changes
  is which attribute is associated (class vs rel). AttributeDOMTokenList
  now keeps the attribute name as a member so it could be used for any
  attribute. AttributeDOMTokenList overrides DOMTokenList's
  updateAfterTokenChange() to do update the attribute's value as per
  [6].
- We no longer use a SpaceSplitString for the internal representation
  as we need to sanitize the tokens (drop duplicates and extra spaces).
  DOMTokenList now has an internal Vector<AtomicString> containing the
  tokens that is constructed from the algorithm in [2]. As a result,
  most of the logic is now in DOMTokenList instead of its subclasses
  which means that most methods are no longer virtual. We only have
  one virtual function named updateAfterTokenChange() to do the update
  steps as AttributeDOMTokenList needs to update the associated
  attribute.

This change does not seem to impact Dromaeo.

[1] https://dom.spec.whatwg.org/#concept-ordered-set-serializer
[2] https://dom.spec.whatwg.org/#ordered%20sets
[3] https://dom.spec.whatwg.org/#stringification-behavior
[4] https://dom.spec.whatwg.org/#dom-domsettabletokenlist-value
[5] https://dom.spec.whatwg.org/#dom-domtokenlist-contains (step 2)
[6] https://dom.spec.whatwg.org/#concept-DTL-update
[7] https://bugzilla.mozilla.org/show_bug.cgi?id=869788

No new tests, already covered by existing tests.

* dom/Element.cpp:
(WebCore::Element::classAttributeChanged):
When the class attribute changes, make sure to update the associated
classList if there is one. We could do this lazily if it turns out
to be a performance problem. However, chances are this is not as
classList is rarely used and we only need to update the classList if
it was ever accessed by JS for this Element.

(WebCore::Element::insertedInto):
Drop call to clearClassListValueForQuirksMode() as we no longer need
to maintain a separate SpaceSplitString for classes when in quirks
mode. This is because AttributeDOMTokenList now has its own Vector
of classes in their original cases. It therefore no longer relies on
Element::classNames() which has its case folded when in quirks mode.

(WebCore::Element::classList):
Return a AttributeDOMTokenList instead of a ClassList.

* html/AttributeDOMTokenList.h: Added.
* html/AttributeDOMTokenList.cpp: Added.
(WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
Call DOMTokenList::setValue() using the attribute's value so that
DOMTokenList can initialize its token Vector.

(WebCore::AttributeDOMTokenList::attributeValueChanged):
If the attribute value was changed by somebody else that the
AttributeDOMTokenList, call DOMTokenList::setValue() so that it
can update its token Vector.

(WebCore::AttributeDOMTokenList::updateAfterTokenChange):
This is called whenever the token Vector is changed via JS. In
this case, we update the associated attribute's value.

* html/ClassList.cpp: Removed.
* html/ClassList.h: Removed.
Now merged into AttributeDOMTokenList.

* html/DOMSettableTokenList.cpp:
* html/DOMSettableTokenList.h:
Get rid of most of the code as most of the logic is now in
DOMTokenList parent class.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::validateToken):
Use a String parameter instead of an AtomicString as this method does
not need the input the be an AtomicString. This avoid atomizing
String unnecessarily.

(WebCore::DOMTokenList::validateTokens):
Use a modern loop.

(WebCore::DOMTokenList::contains):
No longer use containsInternal() virtual function. We can now check
the internal token Vector.

(WebCore::DOMTokenList::add):
Now update the internal Vector. Use a modern loop and try to minimize
Vector capacity reallocation.

(WebCore::DOMTokenList::remove):
Now update the internal Vector.

(WebCore::DOMTokenList::toggle):
Now update the internal Vector and refactor the code so that it is
structured exactly as the algorithm in the specification for
clarity.

(WebCore::DOMTokenList::value):
Now return the result of the ordered set serializer for tokens. This
method is used for:
- The DOMSettableTokenList.value() getter
- The DOMTokenList stringifier
- As attribute value when updating the associated attribute in
  AttributeDOMTokenList.

(WebCore::DOMTokenList::setValue):
Update the internal Vector using the algorithm in [2].

* html/DOMTokenList.h:
(WebCore::DOMTokenList::length):
No longer virtual, now returns the size of the internal token Vector.

(WebCore::DOMTokenList::item):
No longer virtual, now returns the token at the given index in the
internal Vector.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::relList):
Now return a AttributeDOMTokenList.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::relList):
Now return a AttributeDOMTokenList.

* html/RelList.cpp: Removed.
* html/RelList.h: Removed.
Now merged into AttributeDOMTokenList.

LayoutTests:

Update / rebaseline existing tests as our behavior changed.

* fast/dom/HTMLElement/class-list-expected.txt:
* fast/dom/HTMLElement/class-list-quirks-expected.txt:
* fast/dom/HTMLElement/script-tests/class-list.js:
* fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
* fast/dom/HTMLOutputElement/htmloutputelement-expected.txt:
* fast/dom/HTMLOutputElement/htmloutputelement.html:
* fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:
* fast/dom/rel-list-expected.txt:
* fast/dom/rel-list.html:

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

4 years agoUnreviewed gardening to make Windows bot green.
achristensen@apple.com [Fri, 11 Sep 2015 21:28:19 +0000 (21:28 +0000)]
Unreviewed gardening to make Windows bot green.

* platform/win/TestExpectations:
imported/w3c/web-platform-tests/html/dom/interfaces.html is newly imported and fails on Windows.

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

4 years agoBuild fix
bdakin@apple.com [Fri, 11 Sep 2015 21:28:10 +0000 (21:28 +0000)]
Build fix

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):

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

4 years agoMark svg/animations/svgboolean-animation-1 as flaky for
ap@apple.com [Fri, 11 Sep 2015 21:26:39 +0000 (21:26 +0000)]
Mark svg/animations/svgboolean-animation-1 as flaky for
https://bugs.webkit.org/show_bug.cgi?id=149072

* TestExpectations:

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

4 years agoShould use CARenderServerRenderLayerWithTransform for snapshots on iOS
bdakin@apple.com [Fri, 11 Sep 2015 21:24:01 +0000 (21:24 +0000)]
Should use CARenderServerRenderLayerWithTransform for snapshots on iOS
https://bugs.webkit.org/show_bug.cgi?id=149069
-and corresponding-
rdar://problem/19726953

Reviewed by Tim Horton.

This will let us own the backing IOSurface, which will let us share more code
with Mac.

Use CARenderServerRenderLayerWithTransform
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
(-[WKWebView _zoomToPoint:atScale:animated:]):

We can eliminate things needed for the slot-based API.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor):
(WebKit::ViewSnapshot::surface):
(WebKit::ViewSnapshot::imageSizeInBytes):
(WebKit::ViewSnapshot::size):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::singleton):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::~ViewSnapshot):
(WebKit::ViewSnapshot::setSurface):
(WebKit::ViewSnapshot::hasImage):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
(WebKit::ViewSnapshotStore::snapshottingContext): Deleted.

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

4 years agoUnreviewed, added myself to the list of contributors.
ssakshuwong@apple.com [Fri, 11 Sep 2015 21:23:45 +0000 (21:23 +0000)]
Unreviewed, added myself to the list of contributors.

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

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

4 years agofast/hidpi/image-set-without-specified-width.html flakily tries to install multiple...
timothy_horton@apple.com [Fri, 11 Sep 2015 18:59:12 +0000 (18:59 +0000)]
fast/hidpi/image-set-without-specified-width.html flakily tries to install multiple callbacks for the same event
https://bugs.webkit.org/show_bug.cgi?id=149067

Reviewed by Alexey Proskuryakov.

* fast/hidpi/image-set-without-specified-width.html:
Wait until we've successfully set the deviceScaleFactor
before reloading the page; otherwise, we can end up trying to set it
again after the reload (and depending on how long it takes the callback
to return, again, and again, and again...)

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

4 years agoThere should be a defaultSpotCheck-like mode that doesn't run the MaximalFlushInserti...
commit-queue@webkit.org [Fri, 11 Sep 2015 18:44:47 +0000 (18:44 +0000)]
There should be a defaultSpotCheck-like mode that doesn't run the MaximalFlushInsertionPhase in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=149058

Patch by Saam barati <sbarati@apple.com> on 2015-09-11
Reviewed by Geoffrey Garen.

* Scripts/run-jsc-stress-tests:

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

4 years agoAdd initial support for floats in WebAsssembly
commit-queue@webkit.org [Fri, 11 Sep 2015 18:40:53 +0000 (18:40 +0000)]
Add initial support for floats in WebAsssembly
https://bugs.webkit.org/show_bug.cgi?id=149062

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-11
Reviewed by Geoffrey Garen.

Implement the ConstantPoolIndex, Immediate, GetLocal, and GetGlobal
instructions for floats (float32) in WebAssembly.

* tests/stress/wasm-arithmetic-float32.js: Added.
(shouldBe):
* tests/stress/wasm-globals.js:
* tests/stress/wasm-type-conversion.js:
* tests/stress/wasm/arithmetic-float32.wasm: Added.
* tests/stress/wasm/globals.wasm:
* tests/stress/wasm/type-conversion.wasm:
* wasm/WASMConstants.h:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildSetLocal):
(JSC::WASMFunctionCompiler::buildReturn):
(JSC::WASMFunctionCompiler::buildImmediateF32):
(JSC::WASMFunctionCompiler::buildGetLocal):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseExpression):
(JSC::WASMFunctionParser::parseExpressionF32):
(JSC::WASMFunctionParser::parseConstantPoolIndexExpressionF32):
(JSC::WASMFunctionParser::parseImmediateExpressionF32):
(JSC::WASMFunctionParser::parseGetLocalExpressionF32):
(JSC::WASMFunctionParser::parseGetGlobalExpressionF32):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildImmediateF32):
* wasm/WASMReader.cpp:
(JSC::WASMReader::readOpExpressionF32):
* wasm/WASMReader.h:

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

4 years ago2015-09-11 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 11 Sep 2015 17:35:59 +0000 (17:35 +0000)]
2015-09-11  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the CLOOP build.

        Unreviewed.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::finalizeBaselineJITInlineCaches):
        (JSC::CodeBlock::finalizeUnconditionally):

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

4 years ago[EFL] Fix WASM build
ossy@webkit.org [Fri, 11 Sep 2015 16:56:19 +0000 (16:56 +0000)]
[EFL] Fix WASM build
https://bugs.webkit.org/show_bug.cgi?id=149065

Reviewed by Darin Adler.

* wasm/WASMFunctionParser.cpp:

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

4 years agoEl Capitan test result gardening.
ap@apple.com [Fri, 11 Sep 2015 16:21:46 +0000 (16:21 +0000)]
El Capitan test result gardening.

* platform/mac/TestExpectations: Remove a test that should pass now.

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

4 years agoJavaScriptCore should discard optimized code after some time
ggaren@apple.com [Fri, 11 Sep 2015 16:08:39 +0000 (16:08 +0000)]
JavaScriptCore should discard optimized code after some time
https://bugs.webkit.org/show_bug.cgi?id=149048

Reviewed by Michael Saboff.

This patch adds a new jettison type -- JettisonDueToOldAge -- and starts
using it for DFG and FTL code. Baseline and LLInt code will come in a
follow-up patch.

The primary goal is to save memory. Some popular websites leave about 10MB
of dead code sitting around immediately after they finish loading.

Throwing away code periodically might also save us from profiling
pathologies that lead to performance dead ends.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitAggregate): Updated for rename, and removed a
stale comment.

(JSC::CodeBlock::shouldVisitStrongly): Renamed to shouldVisitStrongly
because the practical effect of this function is to trigger a call to
visitStrongly.

(JSC::CodeBlock::isKnownToBeLiveDuringGC): Check the
m_visitStronglyHasBeenCalled flag instead of
shouldImmediatelyAssumeLivenessDuringScan / shouldVisitStrongly because
m_visitStronglyHasBeenCalled can be set by anybody even if the CodeBlock
would not otherwise visit itself strongly.

(JSC::CodeBlock::shouldJettisonDueToWeakReference): New helper function
for readability.

(JSC::CodeBlock::shouldJettisonDueToOldAge): New helper function that
tells if a CodeBlock is old enough for deletion.

(JSC::CodeBlock::determineLiveness): There's no need to check
shouldImmediatelyAssumeLivenessDuringScan here because we will not call
this function if shouldImmediatelyAssumeLivenessDuringScan is true.
Also, it's just not clear -- if someone chooses to call this function --
that it would be safe to ignore them simply because
shouldImmediatelyAssumeLivenessDuringScan was true.

(JSC::CodeBlock::finalizeLLIntInlineCaches): Moved code out into a helper
function to make the main function more readable.

(JSC::CodeBlock::finalizeBaselineJITInlineCaches): Ditto.

(JSC::CodeBlock::finalizeUnconditionally): Added code for jettisoning a
CodeBlock if it is too old. Moved large sections of code into helper
functions to aid readability in this function.

(JSC::CodeBlock::jettison): Account for the fact that we might jettison
a CodeBlock without OSR exit and without requiring a stack shoot-down.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::setInstallTime):
(JSC::CodeBlock::timeSinceInstall): Track CodeBlock age to help us
decide when to delete.

* jit/JITCode.h:
(JSC::JITCode::timeToLive): Static limits on CodeBlock lifetime. I got
these numbers from the place where numbers come from.

* profiler/ProfilerJettisonReason.cpp:
(WTF::printInternal):
* profiler/ProfilerJettisonReason.h: Updated for new jettison type.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode): Record install time so that we
can measure how old a CodeBlock is.

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

4 years agoElement.tagName should be upper-case for HTML elements in HTML documents
cdumez@apple.com [Fri, 11 Sep 2015 14:51:32 +0000 (14:51 +0000)]
Element.tagName should be upper-case for HTML elements in HTML documents
https://bugs.webkit.org/show_bug.cgi?id=148843
<rdar://problem/22559081>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/dom/nodes/Document-createElementNS-expected.txt:
* web-platform-tests/dom/nodes/Element-tagName-expected.txt:
* web-platform-tests/dom/nodes/Node-nodeName-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-table-element/table-insertRow-expected.txt:

Source/WebCore:

Element.tagName should be upper-case for HTML elements in HTML documents,
as per the DOM specification:
https://dom.spec.whatwg.org/#dom-element-tagname

Previously, WebKit would fail to upper-case the tagname if the element's
tag had a prefix. This patch corrects this. This aligns our behavior with
Firefox, Chrome and IE.

No new tests, already covered by existing tests.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::nodeName):

LayoutTests:

Update / rebaseline test now that our behavior has changed.

* fast/dom/Node/initial-values-expected.txt:
* fast/dom/Node/script-tests/initial-values.js:

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

4 years agodocument.body = "text" should throw a TypeError, not a HierarchyRequestError
cdumez@apple.com [Fri, 11 Sep 2015 14:50:37 +0000 (14:50 +0000)]
document.body = "text" should throw a TypeError, not a HierarchyRequestError
https://bugs.webkit.org/show_bug.cgi?id=149057
<rdar://problem/22567157>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline test now that a new check is passing.

* web-platform-tests/html/dom/documents/dom-tree-accessors/document.body-setter-01-expected.txt:

Source/WebCore:

document.body = "text" should throw a TypeError, not a
HierarchyRequestError:
https://html.spec.whatwg.org/multipage/dom.html#dom-document-body

This is because "text" is a DOMString and it cannot be converted into an
HTMLElement?. Therefore, the WebIDL specification says we should throw a
TypeError in this case.

Chrome and Firefox throw the right exception.

No new tests, already covered by existing test.

* dom/Document.idl:

LayoutTests:

Rebaseline test as we now throw a different exception.

* fast/dom/setter-type-enforcement-expected.txt:

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

4 years ago[JSC] Weak should only accept cell pointees.
akling@apple.com [Fri, 11 Sep 2015 09:16:37 +0000 (09:16 +0000)]
[JSC] Weak should only accept cell pointees.
<https://webkit.org/b/148955>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Since WeakImpls only support pointing to JSCell derived objects,
enforce that at compile time by having the API use JSCell* instead of JSValue.

WeakHandleOwner callbacks now get JSCell& and JSCell*& respectively instead
of wrapping the cell pointer in a Handle<Unknown>.

Also added a static_assert so Weak<T> can't be instantiated with a T that's
not convertible to JSCell.

* API/JSAPIWrapperObject.mm:
(JSAPIWrapperObjectHandleOwner::finalize):
(JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots):
(JSC::JSAPIWrapperObject::finishCreation):
* API/JSManagedValue.mm:
(JSManagedValueHandleOwner::isReachableFromOpaqueRoots):
(JSManagedValueHandleOwner::finalize):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::finalize):
* builtins/BuiltinExecutables.h:
* heap/Heap.cpp:
(JSC::Heap::addFinalizer):
(JSC::Heap::FinalizerOwner::finalize):
* heap/Heap.h:
* heap/WeakBlock.cpp:
(JSC::WeakBlock::visit):
(JSC::WeakBlock::reap):
* heap/WeakHandleOwner.cpp:
(JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
(JSC::WeakHandleOwner::finalize):
* heap/WeakHandleOwner.h:
* heap/WeakImpl.h:
(JSC::WeakImpl::WeakImpl):
(JSC::WeakImpl::state):
(JSC::WeakImpl::cell):
(JSC::WeakImpl::asWeakImpl):
(JSC::WeakImpl::jsValue): Deleted.
* heap/WeakInlines.h:
(JSC::Weak<T>::Weak):
(JSC::>):
(JSC::Weak<T>::operator):
(JSC::Weak<T>::get):
(JSC::Weak<T>::was):
* heap/WeakSet.h:
* heap/WeakSetInlines.h:
(JSC::WeakSet::allocate):
(JSC::WeakBlock::finalize):
* jit/JITThunks.cpp:
(JSC::JITThunks::finalize):
* jit/JITThunks.h:
* jsc.cpp:
(WTF::ElementHandleOwner::isReachableFromOpaqueRoots): Deleted.
* runtime/JSCell.h:
(JSC::jsCast):
* runtime/RegExpCache.cpp:
(JSC::RegExpCache::finalize):
* runtime/RegExpCache.h:
* runtime/Structure.cpp:
(JSC::StructureTransitionTable::singleTransition):
(JSC::StructureTransitionTable::setSingleTransition):

Source/WebCore:

Update WebCore bindings for the new Weak and Weak-related signatures.

* bindings/js/JSCSSRuleListCustom.cpp:
(WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackDataWeak::WeakOwner::isReachableFromOpaqueRoots):
* bindings/js/JSCallbackData.h:
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
(WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/js/WebCoreTypedArrayController.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestActiveDOMObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestCustomNamedGetterOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestEventTargetOwner::finalize):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestExceptionOwner::finalize):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestGenerateIsReachableOwner::finalize):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministicOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestNondeterministicOwner::finalize):
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestOverloadedConstructorsOwner::finalize):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltinsOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestOverrideBuiltinsOwner::finalize):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestTypedefsOwner::finalize):
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributeOwner::isReachableFromOpaqueRoots):
(WebCore::JSattributeOwner::finalize):
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyOwner::isReachableFromOpaqueRoots):
(WebCore::JSreadonlyOwner::finalize):
* bindings/scripts/test/JS/JSreadonly.h:
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::finalize):
* bridge/runtime_root.h:

Source/WebKit2:

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::finalize):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:

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

4 years agoWeb Inspector: Remove unused files
commit-queue@webkit.org [Fri, 11 Sep 2015 01:43:07 +0000 (01:43 +0000)]
Web Inspector: Remove unused files
https://bugs.webkit.org/show_bug.cgi?id=149049

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

* WebProcess/WebPage/efl/WebInspectorEfl.cpp: Removed.
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Removed.

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

4 years agoWebInspectorUI should have a WebPage reference
commit-queue@webkit.org [Fri, 11 Sep 2015 01:42:09 +0000 (01:42 +0000)]
WebInspectorUI should have a WebPage reference
https://bugs.webkit.org/show_bug.cgi?id=149046

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-10
Reviewed by Geoffrey Garen.

* WebProcess/WebPage/WebInspectorUI.cpp:
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::page): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::inspectorUI):

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

4 years agoUnreviewed, rolling out r189595.
commit-queue@webkit.org [Fri, 11 Sep 2015 01:39:37 +0000 (01:39 +0000)]
Unreviewed, rolling out r189595.
https://bugs.webkit.org/show_bug.cgi?id=149052

The tests still fail (Requested by ap on #webkit).

Reverted changeset:

"Spurious output on Windows tests: AQMEIOManager::FindIOUnit:
error -1"
https://bugs.webkit.org/show_bug.cgi?id=142929
http://trac.webkit.org/changeset/189595

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

4 years agoImplement switch statements in WebAssembly
commit-queue@webkit.org [Fri, 11 Sep 2015 01:37:09 +0000 (01:37 +0000)]
Implement switch statements in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149051

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-10
Reviewed by Geoffrey Garen.

This patch implements switch statements in WebAssembly using the
JSC::BinarySwitch class.

* tests/stress/wasm-control-flow.js:
* tests/stress/wasm/control-flow.wasm:
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildSwitch):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseSwitchStatement):
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildSwitch):

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

4 years agoAX: Mavericks: Text cursor does not move along with VoiceOver cursor for text fields
cfleizach@apple.com [Fri, 11 Sep 2015 00:55:14 +0000 (00:55 +0000)]
AX: Mavericks: Text cursor does not move along with VoiceOver cursor for text fields
https://bugs.webkit.org/show_bug.cgi?id=148891

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Asychronous focus setting DOES work on Yosemite, just not Mavericks.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):

LayoutTests:

Mark accessibility focus tests as passing on Yosemite.

* platform/mac/TestExpectations:

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

4 years agoStructure should be able to tell you if it had ever been a dictionary
fpizlo@apple.com [Thu, 10 Sep 2015 23:07:08 +0000 (23:07 +0000)]
Structure should be able to tell you if it had ever been a dictionary
https://bugs.webkit.org/show_bug.cgi?id=149047

Reviewed by Mark Lam.

Introduces the hasBeenDictionary flag to Structure, which tells you if this structure or
any of its ancestors is a dictionary. We already implicitly tracked this for DFG
watchpoint optimizations, so this is mainly just decoupling that existing logic from
watchpoints. Having Structure::hasBeenDictionary() enables some of the heuristics in the
property type inference work (https://bugs.webkit.org/show_bug.cgi?id=148610).

* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::dump):
* runtime/Structure.h:

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