WebKit-https.git
4 years agoUnreviewed, rolling out r192914.
commit-queue@webkit.org [Wed, 2 Dec 2015 01:37:19 +0000 (01:37 +0000)]
Unreviewed, rolling out r192914.
https://bugs.webkit.org/show_bug.cgi?id=151734

JSC tests for this change are failing on 32 and 64-bit bots
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"[ES6] Implement LLInt/Baseline Support for ES6 Generators and
enable this feature"
https://bugs.webkit.org/show_bug.cgi?id=150792
http://trac.webkit.org/changeset/192914

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

4 years agoEventSenderProxy::swipeGestureWithWheelAndMomentumPhases() leaks an EventSenderSynthe...
ddkilzer@apple.com [Wed, 2 Dec 2015 01:25:12 +0000 (01:25 +0000)]
EventSenderProxy::swipeGestureWithWheelAndMomentumPhases() leaks an EventSenderSyntheticEvent
<http://webkit.org/b/151726>

Reviewed by Simon Fraser.

* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::swipeGestureWithWheelAndMomentumPhases):
Deploy RetainPtr<EventSenderSyntheticEvent> to fix leak.

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

4 years agoRemove WKOriginDataManager
andersca@apple.com [Wed, 2 Dec 2015 01:10:24 +0000 (01:10 +0000)]
Remove WKOriginDataManager
https://bugs.webkit.org/show_bug.cgi?id=151723

Reviewed by Andy Estes.

* UIProcess/API/C/WKOriginDataManager.cpp: Removed.
(WKOriginDataManagerGetTypeID): Deleted.
(WKOriginDataManagerGetOrigins): Deleted.
(WKOriginDataManagerDeleteEntriesForOrigin): Deleted.
(WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Deleted.
(WKOriginDataManagerDeleteAllEntries): Deleted.
* UIProcess/API/C/WKOriginDataManager.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[SVG -> OTF Converter] Force UnitsPerEm to 1000
mmaxfield@apple.com [Wed, 2 Dec 2015 00:57:41 +0000 (00:57 +0000)]
[SVG -> OTF Converter] Force UnitsPerEm to 1000
https://bugs.webkit.org/show_bug.cgi?id=151650

Reviewed by Antti Koivisto.

Source/WebCore:

According to the Adobe Type 1 Font Format:

"Type 1 font programs generally use a 1000 to 1 scaling matrix
for the definition of the relationship of character space unites
to user space units."

Windows actually disregards the "unitsPerEm" value in the "head"
table for some calculations, and hardcodes 1000 instead. In order
to have consistent renderings on Windows and OS X, this patch
forces all generated fonts to have a unitsPerEm of 1000, and
appropriately scales all necessary values.

Test: svg/W3C-SVG-1.1/fonts-elem-03-b.svg

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::scaleUnitsPerEm):
(WebCore::SVGToOTFFontConverter::appendHEADTable):
(WebCore::SVGToOTFFontConverter::appendOS2Table):
(WebCore::SVGToOTFFontConverter::appendVORGTable):
(WebCore::SVGToOTFFontConverter::appendVHEATable):
(WebCore::SVGToOTFFontConverter::appendVMTXTable):
(WebCore::SVGToOTFFontConverter::addKerningPair):
(WebCore::CFFBuilder::CFFBuilder):
(WebCore::CFFBuilder::boundingBox):
(WebCore::CFFBuilder::updateBoundingBox):
(WebCore::CFFBuilder::unscaledLineTo):
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::SVGToOTFFontConverter::appendLigatureGlyphs):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

LayoutTests:

Some tests have quantization differences.

* fast/ruby/ruby-expansion-cjk-2-expected.html:
* fast/ruby/ruby-expansion-cjk-3-expected.html:
* fast/ruby/ruby-expansion-cjk-4-expected.html:
* fast/ruby/ruby-expansion-cjk-5-expected.html:
* fast/ruby/ruby-expansion-cjk-expected.html:
* platform/mac-wk2/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
* platform/mac/svg/batik/text/textEffect3-expected.txt:
* platform/mac/svg/batik/text/textPosition2-expected.txt:
* platform/mac/svg/wicd/test-rightsizing-b-expected.txt:
* svg/custom/acid3-test-77-expected.txt:

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

4 years agoAdd updated test result missing from http://trac.webkit.org/changeset/192924
beidson@apple.com [Wed, 2 Dec 2015 00:50:48 +0000 (00:50 +0000)]
Add updated test result missing from trac.webkit.org/changeset/192924
https://bugs.webkit.org/show_bug.cgi?id=151725

* storage/indexeddb/modern/opendatabase-request-event-expected.txt:

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

4 years agoUpdated favicon.ico with the new logo.
jond@apple.com [Wed, 2 Dec 2015 00:38:24 +0000 (00:38 +0000)]
Updated favicon.ico with the new logo.

* favicon.ico:

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

4 years agoMarking http/tests/xmlhttprequest/methods-async.html as flaky on Yosemite WK2
ryanhaddad@apple.com [Wed, 2 Dec 2015 00:38:23 +0000 (00:38 +0000)]
Marking http/tests/xmlhttprequest/methods-async.html as flaky on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=151729

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoImproved accessibility handling for the small drop-down menu.
jond@apple.com [Wed, 2 Dec 2015 00:37:42 +0000 (00:37 +0000)]
Improved accessibility handling for the small drop-down menu.

* wp-content/themes/webkit/scripts/global.js:

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

4 years agoFixed font rendering. Fixed SVG rendering for Firefox.
jond@apple.com [Wed, 2 Dec 2015 00:35:45 +0000 (00:35 +0000)]
Fixed font rendering. Fixed SVG rendering for Firefox.

* wp-content/themes/webkit/images/icons.svg:
* wp-content/themes/webkit/images/inspector.svg:
* wp-content/themes/webkit/images/twitter.svg:
* wp-content/themes/webkit/style.css:
(code):
(a[name]):
(.screen-reader-text:focus):
(.page-width):
(.tile.category-web-inspector .background-image):
(.tile.category-performance .background-image):
(.tile.category-javascript .background-image):
(.tile.category-css .background-image):
(.tile.category-standards .background-image):
(.tile.category-contributing .background-image):
(.tile.category-storage .background-image):
(.tile.category-layout .background-image):
(.tile.tag-timeline .background-image):
(.tile.tag-console .background-image):
(.tile.tag-debugger .background-image):
(.tile.tag-shortcuts .background-image):
(.tile .background-image.loaded):
(body, input, textarea, select, button): Deleted.

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

4 years agoGive a more detailed message for TypeErrors that result from EnforceRange.
beidson@apple.com [Wed, 2 Dec 2015 00:20:37 +0000 (00:20 +0000)]
Give a more detailed message for TypeErrors that result from EnforceRange.
https://bugs.webkit.org/show_bug.cgi?id=151725

Reviewed by Tim Horton.

Source/WebCore:

No new tests (Covered by changes to existing tests).

* bindings/js/JSDOMBinding.cpp:
(WebCore::rangeErrorString):
(WebCore::enforceRange):

LayoutTests:

* crypto/subtle/aes-cbc-generate-key-expected.txt:
* js/dom/webidl-type-mapping-expected.txt:
* storage/indexeddb/intversion-bad-parameters-expected.txt:
* storage/indexeddb/version-change-event-basic-expected.txt:

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

4 years ago[iOS] Abrupt transition between Fullscreen -> PiP
jer.noble@apple.com [Tue, 1 Dec 2015 23:53:03 +0000 (23:53 +0000)]
[iOS] Abrupt transition between Fullscreen -> PiP
https://bugs.webkit.org/show_bug.cgi?id=151719

Reviewed by Eric Carlson.

Rather than abruptly hiding the fullscreen window, explicitly exit fullscreen mode upon entering PiP.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture):

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

4 years agoWeb Inspector: Timestamp in Tooltip of Event Markers is incorrect
commit-queue@webkit.org [Tue, 1 Dec 2015 23:46:32 +0000 (23:46 +0000)]
Web Inspector: Timestamp in Tooltip of Event Markers is incorrect
https://bugs.webkit.org/show_bug.cgi?id=151722

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

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
Convert the marker's time, to be relative to the start of the recording.

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

4 years agoGive String and AtomicString an existingHash() function
mmaxfield@apple.com [Tue, 1 Dec 2015 23:30:03 +0000 (23:30 +0000)]
Give String and AtomicString an existingHash() function
https://bugs.webkit.org/show_bug.cgi?id=151717

Reviewed by Andreas Kling.

Source/WebCore:

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::CharacterFallbackMapKeyHash::hash):

Source/WTF:

Test: WTF.AtomicStringExistingHash
      WTF.StringExistingHash

* wtf/text/AtomicString.h:
(WTF::AtomicString::existingHash):
* wtf/text/WTFString.h:
(WTF::String::existingHash):

Tools:

* TestWebKitAPI/Tests/WTF/AtomicString.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST):

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

4 years ago[JSC] support CoverInitializedName in nested AssignmentPatterns
commit-queue@webkit.org [Tue, 1 Dec 2015 22:47:00 +0000 (22:47 +0000)]
[JSC] support CoverInitializedName in nested AssignmentPatterns
https://bugs.webkit.org/show_bug.cgi?id=151595

Patch by Caitlin Potter <caitpotter88@gmail.com> on 2015-12-01
Reviewed by Geoffrey Garen.

A regression introduced in bug https://bugs.webkit.org/show_bug.cgi?id=151026
causes the parser to fail when attempting to parse nested
ObjectAssignmentPatterns with CoverInitializedName destructuring targets.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseAssignmentExpressionOrPropagateErrorClass):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseArrayLiteral):
* parser/Parser.h:
(JSC::Parser::ExpressionErrorClassifier::propagateExpressionErrorClass):
* tests/es6.yaml:
* tests/es6/destructuring_assignment_nested_cover_initialized_name.js: Added.
(test1):
(test2):

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

4 years agoAdd new library dependency for LLVMForJavaScriptCore dylib
commit-queue@webkit.org [Tue, 1 Dec 2015 22:46:18 +0000 (22:46 +0000)]
Add new library dependency for LLVMForJavaScriptCore dylib
https://bugs.webkit.org/show_bug.cgi?id=151687

Changes on open source LLVM added a new dependency to libLLVMInstrumentation.a.
Adding this dependency should be backwards compatible, since LLVM has built and
shipped this library even before the creation of FTL.

Patch by Juergen Ributzka <juergen@apple.com> on 2015-12-01
Reviewed by Geoffrey Garen.

* Configurations/LLVMForJSC.xcconfig:

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

4 years ago[Win] Build fix after r192895
mmaxfield@apple.com [Tue, 1 Dec 2015 22:43:52 +0000 (22:43 +0000)]
[Win] Build fix after r192895

Unreviewed.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isSystemFont):
(WebCore::FontPlatformData::setIsSystemFont):
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::Font::platformInit):
(WebCore::Font::platformWidthForGlyph):

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

4 years agoRemoved escpaes to correctly pass query string arguments.
jond@apple.com [Tue, 1 Dec 2015 22:33:04 +0000 (22:33 +0000)]
Removed escpaes to correctly pass query string arguments.

* .htaccess:

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

4 years agoUpdate bindings test results after r192903.
ap@apple.com [Tue, 1 Dec 2015 22:27:04 +0000 (22:27 +0000)]
Update bindings test results after r192903.

* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::construct):

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

4 years ago[ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
utatane.tea@gmail.com [Tue, 1 Dec 2015 22:23:16 +0000 (22:23 +0000)]
[ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
https://bugs.webkit.org/show_bug.cgi?id=150792

Reviewed by Saam Barati.

.:

* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

This patch implements basic functionality of ES6 Generators in LLInt and Baseline tiers.
While the implementation has some inefficient part, the implementation covers edge cases.
Later, we will make this efficient.

    https://bugs.webkit.org/show_bug.cgi?id=151545
    https://bugs.webkit.org/show_bug.cgi?id=151546
    https://bugs.webkit.org/show_bug.cgi?id=151547
    https://bugs.webkit.org/show_bug.cgi?id=151552
    https://bugs.webkit.org/show_bug.cgi?id=151560
    https://bugs.webkit.org/show_bug.cgi?id=151586

To encourage DFG / FTL later, we take the following design.

1. Use switch_imm to jump to the save/resume points.

Instead of saving / restoring instruction pointer to resume from it, we use switch_imm to jump to the resume point.
This limits one entry point to a given generator function. This design makes inlining easy.
The generated code becomes the following.

    function @generatorNext(@generator, @generatorState, @generatorValue, @generatorResumeMode)
    {
        switch (@generatorState) {
        case Initial:
            ...
            initial sequence.
            ...

            op_save(Yield_0);  // op_save contains *virtual* jump to Yield_0.
                               // CFG shows a jump edge to Yield_0 point, but it won't be actually used.
            return ...;

        case Yield_0:
            op_resume();
            if (@generatorResumeMode == Throw)
                ...
            else if (@generatorResumeMode == Return)
                ...
            ...
            // sentValue is a value sent from a caller by `generator.next(sentValue)`.
            sentValue = @generatorValue;
            ...
            op_save(Yield_1);
            return ...;

        case Yield_1:
            op_resume();
            if (@generatorResumeMode == Throw)
                ...
            else if (@generatorResumeMode == Return)
                ...
            ...
            sentValue = @generatorValue;
            ...

        ...
        }
    }

    Resume sequence should not be emitted per yield.
    This should be done in https://bugs.webkit.org/show_bug.cgi?id=151552.

2. Store live frame registers to GeneratorFrame

To save and resume generator's state, we save all the live registers in GeneratorFrame.
And when resuming, we refill registers with saved ones.
Since saved register contains scope register, |this| etc., the environment including the scope chain will be recovered automatically.
While saving and resuming callee registers, we don't save parameter registers.
These registers will be used to control generator's resume behavior.

We perform BytecodeLivenessAnalysis in CodeBlock to determine actually *def*ined registers at that resume point.

3. GeneratorFunction will evaluate parameters before generating Generator

Generator's parameter should be evaluated before entering Generator's body. For example,

    function hello() { ... }
    function *gen(a, b = hello())
    {
        yield b;
    }
    let g = gen(20);  // Now, hello should be called.

To enable this, we evaluate parameters in GeneratorFunction, and after that, we create a Generator and return it.
This can be explained by the following pseudo code.

    function *gen(a, b = hello())
    {
        // This is generator.
        return {
            @generatorNext: function (@generator, @generatorState, @generatorValue, @generatorResumeMode)
            {
                ...
            }
        }
    }

4. op_save seems similar to conditional jump

We won't jump to elsewhere from op_save actually. But we add a *virtual* jump edge (flow) from op_save to the point so called *merge point*.
We construct the CFG as follows,

    (global generator switch) -> (initial sequence) -> (op_save) ----+-> (merge point) -> (next sequence)*
           |                                              |          |
           |                                              v          |
           |                                           (op_ret)      |
           |                                                         |
           +------------------------------------------->(op_resume)--+

By constructing such a graph,

    1. Since we have a flow from (op_save) to (merge point), at merge point, we can *use* locals that are defined before (op_save)
    2. op_save should claim that it does not define anything. And claim that it *use*s locals that are used in (merge point).
    3. at op_resume, we see *use*d locals at merge point and define all of them.

We can do the above things in use-def analysis because use-def analysis is backward analysis.
And after analyzing use-def chains, in op_save / op_resume, we only save / resume live registers at the head of merge point.

* API/JSScriptRef.cpp:
(parseScript):
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinExecutables.cpp:
(JSC::createExecutableInternal):
* builtins/GeneratorPrototype.js: Added.
(generatorResume):
(next):
(return):
(throw):
* bytecode/BytecodeBasicBlock.cpp:
(JSC::isBranch):
* bytecode/BytecodeList.json:
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::stepOverInstruction):
(JSC::computeLocalLivenessForBytecodeOffset):
(JSC::BytecodeLivenessAnalysis::runLivenessFixpoint):
(JSC::BytecodeLivenessAnalysis::computeFullLiveness):
(JSC::BytecodeLivenessAnalysis::computeKills):
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::shrinkToFit):
(JSC::CodeBlock::validate):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::numCalleeLocals):
(JSC::CodeBlock::liveCalleeLocalsAtYield):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::tryGet):
(JSC::EvalCodeCache::getSlow):
(JSC::EvalCodeCache::isCacheable):
* bytecode/ExecutableInfo.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::generatorThisMode):
(JSC::ExecutableInfo::superBinding):
(JSC::ExecutableInfo::parseMode):
(JSC::ExecutableInfo::isArrowFunction): Deleted.
* bytecode/PreciseJumpTargets.cpp:
(JSC::getJumpTargetsForBytecodeOffset):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::parseMode):
(JSC::UnlinkedCodeBlock::generatorThisMode):
(JSC::UnlinkedCodeBlock::superBinding):
(JSC::UnlinkedCodeBlock::isArrowFunction): Deleted.
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeParameters):
(JSC::BytecodeGenerator::newRegister):
(JSC::BytecodeGenerator::reclaimFreeRegisters):
(JSC::BytecodeGenerator::createVariable):
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitNewFunctionExpressionCommon):
(JSC::BytecodeGenerator::emitNewFunctionExpression):
(JSC::BytecodeGenerator::emitNewArrowFunctionExpression):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitIteratorNextWithValue):
(JSC::BytecodeGenerator::emitYieldPoint):
(JSC::BytecodeGenerator::emitSave):
(JSC::BytecodeGenerator::emitResume):
(JSC::BytecodeGenerator::emitYield):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::emitGeneratorStateChange):
(JSC::BytecodeGenerator::emitGeneratorStateLabel):
(JSC::BytecodeGenerator::beginGenerator):
(JSC::BytecodeGenerator::endGenerator):
(JSC::BytecodeGenerator::emitNewFunctionInternal): Deleted.
(JSC::BytecodeGenerator::emitNewFunctionCommon): Deleted.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::generatorThisMode):
(JSC::BytecodeGenerator::superBinding):
(JSC::BytecodeGenerator::generatorRegister):
(JSC::BytecodeGenerator::generatorStateRegister):
(JSC::BytecodeGenerator::generatorValueRegister):
(JSC::BytecodeGenerator::generatorResumeModeRegister):
(JSC::BytecodeGenerator::parseMode):
(JSC::BytecodeGenerator::registerFor):
(JSC::BytecodeGenerator::makeFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::emitHomeObjectForCallee):
(JSC::emitSuperBaseForCallee):
(JSC::ReturnNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
(JSC::YieldExprNode::emitBytecode):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handlePutById):
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledOperands):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::forAllLocalsLiveInBytecode):
* dfg/DFGOSREntrypointCreationPhase.cpp:
(JSC::DFG::OSREntrypointCreationPhase::run):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct):
* ftl/FTLForOSREntryJITCode.cpp:
(JSC::FTL::ForOSREntryJITCode::initializeEntryBuffer):
* ftl/FTLForOSREntryJITCode.h:
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::isAtom):
(JSC::MarkedBlock::isLiveCell):
* interpreter/Interpreter.cpp:
(JSC::eval):
(JSC::Interpreter::dumpRegisters):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::frameRegisterCountFor):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_new_generator_func):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_new_func_exp):
(JSC::JIT::emit_op_new_generator_func_exp):
(JSC::JIT::emit_op_save):
(JSC::JIT::emit_op_resume):
* jit/JITOperations.cpp:
(JSC::operationNewFunctionCommon):
* jit/JITOperations.h:
* llint/LLIntEntrypoint.cpp:
(JSC::LLInt::frameRegisterCountFor):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createYield):
(JSC::ASTBuilder::createFunctionMetadata):
(JSC::ASTBuilder::propagateArgumentsUse):
* parser/Nodes.cpp:
(JSC::FunctionMetadataNode::FunctionMetadataNode):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::createGeneratorParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseYieldExpression):
(JSC::Parser<LexerType>::parsePropertyMethod):
(JSC::Parser<LexerType>::parseFunctionExpression):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::setSourceParseMode):
(JSC::Scope::hasArguments):
(JSC::Scope::collectFreeVariables):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsGeneratorFunction):
(JSC::Scope::setIsGenerator):
(JSC::parse):
* parser/ParserModes.h:
(JSC::isFunctionParseMode):
(JSC::isModuleParseMode):
(JSC::isProgramParseMode):
* parser/SourceCodeKey.h: Added.
(JSC::SourceCodeKey::SourceCodeKey):
(JSC::SourceCodeKey::isHashTableDeletedValue):
(JSC::SourceCodeKey::hash):
(JSC::SourceCodeKey::length):
(JSC::SourceCodeKey::isNull):
(JSC::SourceCodeKey::string):
(JSC::SourceCodeKey::operator==):
(JSC::SourceCodeKeyHash::hash):
(JSC::SourceCodeKeyHash::equal):
(JSC::SourceCodeKeyHashTraits::isEmptyValue):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createYield):
(JSC::SyntaxChecker::createFunctionMetadata):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CodeCache.h:
(JSC::SourceCodeKey::SourceCodeKey): Deleted.
(JSC::SourceCodeKey::isHashTableDeletedValue): Deleted.
(JSC::SourceCodeKey::hash): Deleted.
(JSC::SourceCodeKey::length): Deleted.
(JSC::SourceCodeKey::isNull): Deleted.
(JSC::SourceCodeKey::string): Deleted.
(JSC::SourceCodeKey::operator==): Deleted.
(JSC::SourceCodeKeyHash::hash): Deleted.
(JSC::SourceCodeKeyHash::equal): Deleted.
(JSC::SourceCodeKeyHashTraits::isEmptyValue): Deleted.
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/Completion.cpp:
(JSC::checkSyntax):
(JSC::checkModuleSyntax):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ProgramExecutable::checkSyntax):
* runtime/Executable.h:
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):
* runtime/FunctionConstructor.h:
* runtime/GeneratorFrame.cpp: Added.
(JSC::GeneratorFrame::GeneratorFrame):
(JSC::GeneratorFrame::finishCreation):
(JSC::GeneratorFrame::createStructure):
(JSC::GeneratorFrame::create):
(JSC::GeneratorFrame::save):
(JSC::GeneratorFrame::resume):
(JSC::GeneratorFrame::visitChildren):
* runtime/GeneratorFrame.h: Added.
(JSC::GeneratorFrame::locals):
(JSC::GeneratorFrame::localAt):
(JSC::GeneratorFrame::offsetOfLocals):
(JSC::GeneratorFrame::allocationSizeForLocals):
* runtime/GeneratorFunctionConstructor.cpp: Added.
(JSC::GeneratorFunctionConstructor::GeneratorFunctionConstructor):
(JSC::GeneratorFunctionConstructor::finishCreation):
(JSC::callGeneratorFunctionConstructor):
(JSC::constructGeneratorFunctionConstructor):
(JSC::GeneratorFunctionConstructor::getCallData):
(JSC::GeneratorFunctionConstructor::getConstructData):
* runtime/GeneratorFunctionConstructor.h: Added.
(JSC::GeneratorFunctionConstructor::create):
(JSC::GeneratorFunctionConstructor::createStructure):
* runtime/GeneratorFunctionPrototype.cpp: Added.
(JSC::GeneratorFunctionPrototype::GeneratorFunctionPrototype):
(JSC::GeneratorFunctionPrototype::finishCreation):
* runtime/GeneratorFunctionPrototype.h: Added.
(JSC::GeneratorFunctionPrototype::create):
(JSC::GeneratorFunctionPrototype::createStructure):
* runtime/GeneratorPrototype.cpp: Copied from Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.cpp.
(JSC::GeneratorPrototype::finishCreation):
(JSC::GeneratorPrototype::getOwnPropertySlot):
* runtime/GeneratorPrototype.h: Copied from Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.cpp.
(JSC::GeneratorPrototype::create):
(JSC::GeneratorPrototype::createStructure):
(JSC::GeneratorPrototype::GeneratorPrototype):
* runtime/GeneratorThisMode.h: Added.
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGeneratorFunction.cpp: Added.
(JSC::JSGeneratorFunction::JSGeneratorFunction):
(JSC::JSGeneratorFunction::createImpl):
(JSC::JSGeneratorFunction::create):
(JSC::JSGeneratorFunction::createWithInvalidatedReallocationWatchpoint):
* runtime/JSGeneratorFunction.h: Added.
(JSC::JSGeneratorFunction::allocationSize):
(JSC::JSGeneratorFunction::createStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::generatorFunctionPrototype):
(JSC::JSGlobalObject::generatorPrototype):
(JSC::JSGlobalObject::generatorFunctionStructure):
* runtime/ModuleLoaderObject.cpp:
(JSC::moduleLoaderObjectParseModule):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* tests/es6.yaml:
* tests/es6/generators_yield_star_generic_iterables.js:
(iterator.next):
(iterable.Symbol.iterator):
(__createIterableObject):
* tests/es6/generators_yield_star_instances_of_iterables.js:
(iterator.next):
(iterable.Symbol.iterator):
(__createIterableObject):
* tests/es6/generators_yield_star_iterator_closing.js:
(iterator.next):
(iterable.Symbol.iterator):
(__createIterableObject):
* tests/es6/generators_yield_star_iterator_closing_via_throw.js:
(iterator.next):
(iterable.Symbol.iterator):
(__createIterableObject):
* tests/stress/generator-arguments-from-function.js: Added.
(shouldBe):
(test):
* tests/stress/generator-arguments.js: Added.
(shouldBe):
(g1):
* tests/stress/generator-class-methods-syntax.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntaxError.Cocoa):
(testSyntax.Cocoa.prototype.ok):
(testSyntax.Cocoa):
(testSyntax.Cocoa.ok):
* tests/stress/generator-class-methods.js: Added.
(shouldBe):
(prototype.gen):
(staticGen):
(shouldBe.g.next):
* tests/stress/generator-eval-this.js: Added.
(shouldBe):
(shouldThrow):
(B):
(A):
(C.prototype.generator):
(C):
(TypeError):
* tests/stress/generator-function-constructor.js: Added.
(shouldBe):
(generatorFunctionConstructor):
* tests/stress/generator-function-name.js: Added.
(shouldBe):
(ok):
* tests/stress/generator-methods-with-non-generator.js: Added.
(shouldThrow):
* tests/stress/generator-relations.js: Added.
(shouldBe):
(generatorFunction):
* tests/stress/generator-return-before-first-call.js: Added.
(shouldBe):
(shouldBeIteratorResult):
* tests/stress/generator-return.js: Added.
(shouldBe):
(shouldBeIteratorResult):
* tests/stress/generator-this.js: Added.
(shouldBe):
(shouldThrow):
(gen):
(shouldBe.g.next):
* tests/stress/generator-throw-before-first-call.js: Added.
(unreachable):
(gen):
(catch):
* tests/stress/generator-throw.js: Added.
(shouldBe):
(shouldBeIteratorResult):
* tests/stress/generator-with-new-target.js: Added.
(shouldBe):
(gen):
* tests/stress/generator-with-super.js: Added.
(shouldThrow):
(test):
(B.prototype.gen):
(B):
(A.prototype.gen):
(A):
* tests/stress/generator-yield-star.js: Added.
(shouldBe):
(shouldThrow):
(prototype.call):
(Arrays):
(Arrays.prototype.Symbol.iterator):
(Iterator.prototype.next):
(Iterator.prototype.string_appeared_here):
(Iterator.prototype.Symbol.iterator):
(Iterator):
(gen):

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FastBitVector.h:
(WTF::FastBitVector::forEachSetBit):
* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

4 years agoCorrected rewrite rules to restore convenience paths.
jond@apple.com [Tue, 1 Dec 2015 22:16:53 +0000 (22:16 +0000)]
Corrected rewrite rules to restore convenience paths.

* .htaccess:

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

4 years agoRemove repetitive cruft from FTL OSR exit code in LowerDFGToLLVM
fpizlo@apple.com [Tue, 1 Dec 2015 22:12:42 +0000 (22:12 +0000)]
Remove repetitive cruft from FTL OSR exit code in LowerDFGToLLVM
https://bugs.webkit.org/show_bug.cgi?id=151718

Reviewed by Geoffrey Garen.

* b3/B3StackmapValue.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::lowBlock):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitDescriptor):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToLLVM::blessSpeculation):
(JSC::FTL::DFG::LowerDFGToLLVM::emitOSRExitCall):
(JSC::FTL::DFG::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::DFG::LowerDFGToLLVM::callStackmap):

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

4 years agoNeed completionHandler-based WebKit C SPI for alert, confirm, and prompt
weinig@apple.com [Tue, 1 Dec 2015 22:09:49 +0000 (22:09 +0000)]
Need completionHandler-based WebKit C SPI for alert, confirm, and prompt
<rdar://problem/23320863>
https://bugs.webkit.org/show_bug.cgi?id=151708

Reviewed by Anders Carlsson.

Source/WebKit2:

Add listener based versions of alert, confirm and prompt.

* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKPage.cpp:
(WebKit::RunJavaScriptAlertResultListener::create):
(WebKit::RunJavaScriptAlertResultListener::~RunJavaScriptAlertResultListener):
(WebKit::RunJavaScriptAlertResultListener::call):
(WebKit::RunJavaScriptAlertResultListener::RunJavaScriptAlertResultListener):
(WebKit::RunJavaScriptConfirmResultListener::create):
(WebKit::RunJavaScriptConfirmResultListener::~RunJavaScriptConfirmResultListener):
(WebKit::RunJavaScriptConfirmResultListener::call):
(WebKit::RunJavaScriptConfirmResultListener::RunJavaScriptConfirmResultListener):
(WebKit::RunJavaScriptPromptResultListener::create):
(WebKit::RunJavaScriptPromptResultListener::~RunJavaScriptPromptResultListener):
(WebKit::RunJavaScriptPromptResultListener::call):
(WebKit::RunJavaScriptPromptResultListener::RunJavaScriptPromptResultListener):
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
Update for new WKPageUIClient.

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

4 years agoRemove WebKit2.framework
andersca@apple.com [Tue, 1 Dec 2015 21:57:17 +0000 (21:57 +0000)]
Remove WebKit2.framework
https://bugs.webkit.org/show_bug.cgi?id=151715

Reviewed by Dan Bernstein.

Source/WebKit2:

* Configurations/WebKit2.xcconfig: Removed.
* UIProcess/API/Cocoa/WebKit2.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* mac/Info-WebKit2.plist: Removed.
* mac/MigrateHeadersToWebKit2.make: Removed.
* mac/WebKit2.m: Removed.

Tools:

* TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad.cpp:
* TestWebKitAPI/Tests/WebKit2/StopLoadingDuringDidFailProvisionalLoad_bundle.cpp:
* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm:
* TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
* TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h:

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

4 years agoUnreviewed common typo fix "occurance" => "occurrence".
joepeck@webkit.org [Tue, 1 Dec 2015 21:51:17 +0000 (21:51 +0000)]
Unreviewed common typo fix "occurance" => "occurrence".

Source/WebInspectorUI:

* Scripts/combine-resources.pl:
(concatenateFiles):

Tools:

* Scripts/webkitpy/tool/commands/queries.py:
(FindFlakyTests._print_statistics):

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

4 years agoWeb Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab...
joepeck@webkit.org [Tue, 1 Dec 2015 21:51:14 +0000 (21:51 +0000)]
Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
https://bugs.webkit.org/show_bug.cgi?id=151530

Reviewed by Timothy Hatcher.

If reloading the page caused the console to clear, that was triggering
the console prompt to be focused. When the console prompt is focused,
keyboard input like Spacebar, was just inputing characters instead of
triggering the keyboard shortcut that was expected.

This also means that console.clear() in the inspected page would cause
the inspector to focus the console. That is unexpected as well.

Focusing the console prompt whenever the console log is cleared
is not ideal. If we do want to focus the prompt the caller should
make that determination, not clear.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.clear):

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

4 years agoWeb Inspector: Update Timeline UI based on the Instruments in the Active Recording
joepeck@webkit.org [Tue, 1 Dec 2015 21:51:11 +0000 (21:51 +0000)]
Web Inspector: Update Timeline UI based on the Instruments in the Active Recording
https://bugs.webkit.org/show_bug.cgi?id=151374

Reviewed by Brian Burg.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
Modernize as I was in this code while looking into this patch.

* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
(.sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
These defaults are no longer necessary, the UI overrides them anyways.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Include both the basic and rendering frames toolbars. They will be
mutually exclusive based on if the FPSIntrument is available.

(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._clearInstruments):
When loading a new Recording clear the UI.

(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
(WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument):
(WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument):
Handle toggling the toolbars when the FPS instrument is added/removed.

(WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
(WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
Properly update the sidebar's understanding of the TimelineOverview size.

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

4 years agoWeb Inspector: Initial support for variable timelines
joepeck@webkit.org [Tue, 1 Dec 2015 21:51:08 +0000 (21:51 +0000)]
Web Inspector: Initial support for variable timelines
https://bugs.webkit.org/show_bug.cgi?id=151372

Reviewed by NOBODY (OOPS!).

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.defaultInstruments):
(WebInspector.TimelineManager.prototype._loadNewRecording):
Keep the status quo which is the same set of instruments for each recording.

(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.stopCapturing):
Push responsibility of capturing to the Recording, which has a specific set
of instruments that know what they need to turn on an off from the backend.

* UserInterface/Main.html:
* UserInterface/Models/Instrument.js: Added.
(WebInspector.Instrument):
(WebInspector.Instrument.startLegacyTimelineAgent):
(WebInspector.Instrument.stopLegacyTimelineAgent):
(WebInspector.Instrument.prototype.get timelineRecordType):
(WebInspector.Instrument.prototype.startInstrumentation):
(WebInspector.Instrument.prototype.stopInstrumentation):
New class representing something that can be turned on and off
from the backend and produces a set of Timeline record types.
Currently instruments are 1-to-1 to a Timeline type.

* UserInterface/Models/LayoutInstrument.js: Added.
(WebInspector.LayoutInstrument.prototype.get timelineRecordType):
(WebInspector.LayoutInstrument):
* UserInterface/Models/NetworkInstrument.js: Added.
(WebInspector.NetworkInstrument.prototype.get timelineRecordType):
(WebInspector.NetworkInstrument.prototype.startInstrumentation):
(WebInspector.NetworkInstrument.prototype.stopInstrumentation):
(WebInspector.NetworkInstrument):
* UserInterface/Models/ScriptInstrument.js: Added.
(WebInspector.ScriptInstrument.prototype.get timelineRecordType):
(WebInspector.ScriptInstrument):
The default set of instruments. Currently they all enable the TimelineAgent,
so they share code to enable/disable in the base class to avoid duplication.

* UserInterface/Models/FPSInstrument.js: Added.
(WebInspector.FPSInstrument):
(WebInspector.FPSInstrument.supported):
(WebInspector.FPSInstrument.prototype.get timelineRecordType):
Provide a "supported" static method and simplify other code that
checks whether or not RenderingFrames is available or not.

* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.get displayName): Deleted.
(WebInspector.Timeline.prototype.get iconClassName): Deleted.
Move these to a View class, as this is primarily View logic.

* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get instruments):
(WebInspector.TimelineRecording.prototype.start):
(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.timelineForInstrument):
(WebInspector.TimelineRecording.prototype.addInstrument):
(WebInspector.TimelineRecording.prototype.removeInstrument):
(WebInspector.TimelineRecording.prototype.addEventMarker):
(WebInspector.TimelineRecording.prototype.addTimeline): Deleted.
(WebInspector.TimelineRecording.prototype.removeTimeline): Deleted.
A recording now has a set of Instruments and its own start/stop
which starts/stops its set of Instruments! Treat Instruments as
the variable property of a Recording instead of Timelines.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._timelineAdded): Deleted.
(WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
(WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.displayNameForTimeline):
(WebInspector.TimelineSidebarPanel.iconClassNameForTimeline):
(WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
(WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
(WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted.
Update all TimelineAdded/TimelineRemoved clients to instead check
InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument
to a Timeline to keep the patch simple.

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

4 years agoAdd "RaisesExceptionWithMessage" IDL attribute.
beidson@apple.com [Tue, 1 Dec 2015 21:46:53 +0000 (21:46 +0000)]
Add "RaisesExceptionWithMessage" IDL attribute.
https://bugs.webkit.org/show_bug.cgi?id=151720

Reviewed by Alex Christensen.

No new tests (Covered by changes to existing bindings tests).

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateReturnParameters):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_method_with_exception_with_message):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):

* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj methodWithExceptionWithMessage]):

* bindings/scripts/test/TestObj.idl:

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

4 years agoTest gardening after r192894
mmaxfield@apple.com [Tue, 1 Dec 2015 21:43:30 +0000 (21:43 +0000)]
Test gardening after r192894

Unreviewed.

* fast/text/small-caps-complex-expected.html:
* fast/text/small-caps-complex.html:

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

4 years agoFix anomaly where isMouseEvent returns false for wheel events
darin@apple.com [Tue, 1 Dec 2015 21:14:46 +0000 (21:14 +0000)]
Fix anomaly where isMouseEvent returns false for wheel events
https://bugs.webkit.org/show_bug.cgi?id=151685

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Back three years ago when we made WheelEvent inherit from MouseEvent,
someone decided that isMouseEvent should return false for the wheel events.
An audit of all the callers of isMouseEvent indicated that in almost every
case, it's better to return true, so this patch does that.

All the other call sites that were checking isMouseEvent, here and in the
higher levels of WebKit, benefit from getting true even for wheel events.

* bindings/objc/DOMEvents.mm:
(kitClass): Use eventInterface instead of isMouseEvent to create the appropriate
wrapper class.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition): Eliminated a peculiar search and replace
mistake; "stateution" instead of "execution".

* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Add an isWheelEvent check here so that we
will not ignore wheel events. This preserves behavior. A FIXME questions whether
that is the behavior we want.

* dom/WheelEvent.cpp:
(WebCore::WheelEvent::isMouseEvent): Deleted. No need to override and return false.
* dom/WheelEvent.h: Ditto.

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::defaultEventHandler): Removed unneeded checks for
drag events and wheel events; both are types of mouse event, and so a single
isMouseEvent check takes care of all three of these.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent): Ditto.

Source/WebKit/win:

* DOMEventsClasses.cpp:
(DOMEvent::createInstance): Use eventInterface instead of isMouseEvent to create the appropriate
wrapper class.

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

4 years agoWeb Inspector: Broken Inspector when resources are minified
joepeck@webkit.org [Tue, 1 Dec 2015 21:11:44 +0000 (21:11 +0000)]
Web Inspector: Broken Inspector when resources are minified
https://bugs.webkit.org/show_bug.cgi?id=151711

Reviewed by Timothy Hatcher.

* Scripts/combine-resources.pl:
(concatenateFiles):
Provide a way to just strip resources matches a pattern.

* Scripts/copy-user-interface-resources.pl:
Strip "Debug/" resources before combining / minifying others.

* UserInterface/Views/View.js:
(WebInspector.View.prototype.makeRootView):
(WebInspector.View.prototype.didDetach):
Address warnings from the console.assert stripping phase
for console.assert statements lacking a trailing semicolon.

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

4 years agoFixed static reference PHP syntax for compatibility with the server environment.
jond@apple.com [Tue, 1 Dec 2015 20:53:04 +0000 (20:53 +0000)]
Fixed static reference PHP syntax for compatibility with the server environment.

* wp-content/plugins/table-of-contents.php:

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

4 years agoUse Optional for matrix inverses
commit-queue@webkit.org [Tue, 1 Dec 2015 20:26:05 +0000 (20:26 +0000)]
Use Optional for matrix inverses
https://bugs.webkit.org/show_bug.cgi?id=151575

Patch by Alex Christensen <achristensen@webkit.org> on 2015-12-01
Reviewed by Myles C. Maxfield.

Source/WebCore:

This patch should have no change in behavior.  Some unnecessary checks are removed.
There are a few places where we are no longer multiplying by the identity matrix.
This should remind future coders that not all matrices are invertible.

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::inverse):
(WebCore::WebKitCSSMatrix::translate):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::restore):
(WebCore::CanvasRenderingContext2D::scale):
(WebCore::CanvasRenderingContext2D::rotate):
(WebCore::CanvasRenderingContext2D::translate):
(WebCore::CanvasRenderingContext2D::transform):
(WebCore::CanvasRenderingContext2D::setTransform):
(WebCore::CanvasRenderingContext2D::isPointInPathInternal):
(WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::calculateLayerBoundingRect):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::putByteArray):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::setFilterScale):
(WebCore::Filter::absoluteTransform):
(WebCore::Filter::mapAbsolutePointToLocalPoint):
(WebCore::Filter::renderingMode):
(WebCore::Filter::setRenderingMode):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::replicaTransform):
(WebCore::TextureMapperLayer::setAnimatedFilters):
(WebCore::TextureMapperLayer::mapScrollOffset):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
* platform/graphics/transforms/AffineTransform.cpp:
(WebCore::AffineTransform::yScale):
(WebCore::det):
(WebCore::AffineTransform::isInvertible):
(WebCore::AffineTransform::inverse):
(WebCore::AffineTransform::det): Deleted.
* platform/graphics/transforms/AffineTransform.h:
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::mappedPoint):
(WebCore::TransformState::mappedQuad):
(WebCore::TransformState::mapQuad):
(WebCore::TransformState::flattenWithTransform):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::isInvertible):
(WebCore::TransformationMatrix::inverse):
* platform/graphics/transforms/TransformationMatrix.h:
* rendering/HitTestingTransformState.cpp:
(WebCore::HitTestingTransformState::flattenWithTransform):
(WebCore::HitTestingTransformState::mappedPoint):
(WebCore::HitTestingTransformState::mappedQuad):
(WebCore::HitTestingTransformState::mappedArea):
(WebCore::HitTestingTransformState::boundsOfMappedArea):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::hitTestLayer):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtFloatPoint):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtFloatPoint):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::setupNonScalingStrokeContext):
(WebCore::RenderSVGShape::nodeAtFloatPoint):
(WebCore::RenderSVGShape::calculateStrokeBoundingBox):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::intersectRepaintRectWithShadows):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::clipToImageBuffer):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGMatrix.h:
(WebCore::SVGMatrix::inverse):
(WebCore::SVGMatrix::rotateFromVector):

Source/WebKit2:

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::convertFromRootView):
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::convertPoint):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::convertFromPDFViewToRootView):
(WebKit::PDFPlugin::convertFromPDFViewToScreen):
(WebKit::PDFPlugin::boundsOnScreen):
(WebKit::PDFPlugin::geometryDidChange):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::geometryDidChange):

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

4 years ago[JSC] add missing RequireObjectCoercible() step in destructuring
commit-queue@webkit.org [Tue, 1 Dec 2015 20:11:20 +0000 (20:11 +0000)]
[JSC] add missing RequireObjectCoercible() step in destructuring
https://bugs.webkit.org/show_bug.cgi?id=151596

Patch by Caitlin Potter <caitp@igalia.com> on 2015-12-01
Reviewed by Darin Adler.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitRequireObjectCoercible):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ObjectPatternNode::bindValue):
* tests/stress/destructuring-assignment-require-object-coercible.js: Added.
(testTypeError):
(testOK):

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

4 years agoRemove swipe snapshot before main document load if scroll position is already restored
timothy_horton@apple.com [Tue, 1 Dec 2015 19:57:07 +0000 (19:57 +0000)]
Remove swipe snapshot before main document load if scroll position is already restored
https://bugs.webkit.org/show_bug.cgi?id=151224

Reviewed by Darin Adler.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::didRestoreScrollPosition):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didRestoreScrollPosition):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didRestoreScrollPosition):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didRestoreScrollPosition):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didRestoreScrollPosition):
* WebProcess/WebPage/WebPage.h:
Plumb didRestoreScrollPosition through to ViewGestureController (yikes!).

* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
Cancel waiting for any more loads if we get to firstVisuallyNonEmptyLayout.

(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):
Cancel waiting for scroll position restoration if we make it to main frame load,
because there is a chance we won't be able to restore the old scroll position, and
by main frame load time we've tried as hard as we're going to to restore it.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::endSwipeGesture):
Make some legacy-style-only code clearer that it's legacy-style-only.
Wait for scroll position restoration.

* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
Each time we try to restore the scroll position, see if the requested
scroll position is something we can scroll to by going through ScrollView's
scroll position constraint logic. If we can scroll there, tell our client
(and eventually ViewGestureController) that we successfully restored the
scroll position!

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

4 years agoFixed PHP syntax for compatibility with the server environment.
jond@apple.com [Tue, 1 Dec 2015 19:44:28 +0000 (19:44 +0000)]
Fixed PHP syntax for compatibility with the server environment.

* wp-content/plugins/social-meta.php:
* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/widgets/twitter.php:

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

4 years agoRefactor FTL sub snippet code to support general binary op snippets.
mark.lam@apple.com [Tue, 1 Dec 2015 19:31:58 +0000 (19:31 +0000)]
Refactor FTL sub snippet code to support general binary op snippets.
https://bugs.webkit.org/show_bug.cgi?id=151706

Reviewed by Geoffrey Garen.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:

* ftl/FTLCompile.cpp:
- Moved the BinarySnippetRegisterContext to FTLCompileBinaryOp.cpp verbatim.
- Generalize generateArithSubICFastPath() to generateBinaryOpICFastPath().
  It now uses snippet specific helpers in FTLCompileBinaryOp.cpp to generate
  the fast paths.

* ftl/FTLCompileBinaryOp.cpp: Added.
(JSC::FTL::BinarySnippetRegisterContext::BinarySnippetRegisterContext):
(JSC::FTL::BinarySnippetRegisterContext::initializeRegisters):
(JSC::FTL::BinarySnippetRegisterContext::restoreRegisters):
- Moved here without changed from FTLCompile.cpp.
(JSC::FTL::generateArithSubFastPath):
* ftl/FTLCompileBinaryOp.h: Added.

* ftl/FTLInlineCacheDescriptor.h:
(JSC::FTL::BinaryOpDescriptor::nodeType):
(JSC::FTL::BinaryOpDescriptor::size):
(JSC::FTL::BinaryOpDescriptor::name):
(JSC::FTL::BinaryOpDescriptor::fastPathICName):
(JSC::FTL::BinaryOpDescriptor::slowPathFunction):
(JSC::FTL::BinaryOpDescriptor::leftOperand):
(JSC::FTL::BinaryOpDescriptor::rightOperand):
(JSC::FTL::BinaryOpDescriptor::BinaryOpDescriptor):
(JSC::FTL::ArithSubDescriptor::ArithSubDescriptor): Deleted.
(JSC::FTL::ArithSubDescriptor::leftType): Deleted.
(JSC::FTL::ArithSubDescriptor::rightType): Deleted.
- Refactor ArithSubDescriptor into BinaryOpDescriptor, and re-add a sub-class
  ArithSubDescriptor as specializations of BinaryOpDescriptor.

* ftl/FTLInlineCacheDescriptorInlines.h: Added.
(JSC::FTL::ArithSubDescriptor::ArithSubDescriptor):
(JSC::FTL::ArithSubDescriptor::icSize):

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck):
(JSC::FTL::OSRExit::willArriveAtOSRExitFromCallOperation):
* ftl/FTLOSRExit.h:
* ftl/FTLState.h:

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

4 years ago[iOS] Adjacent emoji overlap each other
mmaxfield@apple.com [Tue, 1 Dec 2015 19:24:52 +0000 (19:24 +0000)]
[iOS] Adjacent emoji overlap each other
https://bugs.webkit.org/show_bug.cgi?id=151690
<rdar://problem/23430453>

Reviewed by Simon Fraser.

Source/WebCore:

This is a partial revert of r188737. It turns out that only CoreText gives correct
glyph advances for emoji. In r188737, I reverted the special iOS emoji processing,
but also removed the logic of using CoreText for emoji advances. This patch adds
the m_isEmoji boolean back, so we can tell if we need to force
platformWidthForGlyph() to use CoreText.

This patch also performs a little bit of cleanup by moving Font's m_isSystemFont
to FontPlatformData where it belongs.

Test: fast/text/emoji-overlap.html

* platform/graphics/Font.cpp:
(WebCore::fillGlyphPage): Removed unnecessary argument.
(WebCore::Font::Font): Deleted.
* platform/graphics/Font.h: Moved getters and booleans to FontPlatformData.
(WebCore::Font::hasCustomTracking): Deleted.
(WebCore::Font::isSystemFont): Deleted.
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData): Initialize new booleans.
(WebCore::FontPlatformData::operator=): Ditto.
* platform/graphics/FontPlatformData.h: Getters for new booleans.
(WebCore::FontPlatformData::isSystemFont):
(WebCore::FontPlatformData::hasCustomTracking):
(WebCore::FontPlatformData::isEmoji):
* platform/graphics/GlyphPage.h: Remove unnecessary argument.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::advanceForColorBitmapFont): Return an Optional instead of using an out
argument.
(WebCore::canUseFastGlyphAdvanceGetter): Make sure that we use CoreText if we are
using the Emoji font.
(WebCore::Font::platformWidthForGlyph):
(WebCore::Font::platformInit): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm: Deal with the new booleans.
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):
(WebCore::FontPlatformData::setFont):
* platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/mac/GlyphPageMac.cpp:
(WebCore::shouldUseCoreText): Use a reference instead of a pointer.
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/win/FontCGWin.cpp:
(WebCore::FontCascade::drawGlyphs): Update for new location of booleans.
* platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill): Removed unnecessary argument.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem): Update for new location of
booleans.

LayoutTests:

* fast/text/emoji-overlap-expected.html: Added.
* fast/text/emoji-overlap.html: Added.

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

4 years ago[Win] Web fonts with small caps have excess whitespace with the complex text codepath
mmaxfield@apple.com [Tue, 1 Dec 2015 19:10:07 +0000 (19:10 +0000)]
[Win] Web fonts with small caps have excess whitespace with the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=151698

Reviewed by Darin Adler.

Source/WebCore:

When performing small-caps on OS X, we bake in the smaller font size into the platform's native font
object. On Windows, we currently don't do that; instead, we just change some ancillary data inside
the FontPlatformData, and our advance & drawing calculations are sensitive to this ancillary data.
However, in the complex text codepath, Uniscribe only takes the native font object as input, and
therefore operates with the wrong font size.

The solution is to bake the smaller font size into the native platform font on Windows, similar to
OS X. It isn't clear why we didn't do this previously, but it seems like we weren't sure that
Windows would select the correct font when we provide new selection criteria. However, for web fonts,
we already use the same mechanism (CreateFontIndirect()) when we create the font in the first place;
therefore, this scaled font request will always work as well.

Test: fast/text/small-caps-complex.html

* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::Font::platformCreateScaledFont): Deleted.

LayoutTests:

* fast/text/resources/tinyfont.svg: Added.
* fast/text/small-caps-complex-expected.html: Added.
* fast/text/small-caps-complex.html: Added.

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

4 years agoMarking http/tests/xmlhttprequest/workers/methods.html as flaky on Yosemite WK2
ryanhaddad@apple.com [Tue, 1 Dec 2015 19:08:48 +0000 (19:08 +0000)]
Marking http/tests/xmlhttprequest/workers/methods.html as flaky on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=151709

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoSkip some specific IDB tests in preparation for enabling the entire directory.
beidson@apple.com [Tue, 1 Dec 2015 18:50:07 +0000 (18:50 +0000)]
Skip some specific IDB tests in preparation for enabling the entire directory.

Reviewed in person by Sam Weinig.

* platform/mac-wk1/TestExpectations:

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

4 years agoModern IDB: storage/indexeddb/create-and-remove-object-store.html fails.
beidson@apple.com [Tue, 1 Dec 2015 18:30:20 +0000 (18:30 +0000)]
Modern IDB: storage/indexeddb/create-and-remove-object-store.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151704

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one previously failing test now passes).

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::deleteObjectStore):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:

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

4 years agoModern IDB: storage/indexeddb/basics.html fails.
beidson@apple.com [Tue, 1 Dec 2015 18:29:27 +0000 (18:29 +0000)]
Modern IDB: storage/indexeddb/basics.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151694

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes, and covered by changes to 3 previously incorrect tests).

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Set the flag determining whether
  or not the request's transaction should be exposed to the DOM.
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::result): Throw an exception if the request is not done.
(WebCore::IDBClient::IDBRequest::error): Ditto.
(WebCore::IDBClient::IDBRequest::transaction): Only return the transaction to the DOM if the flag says so.
* Modules/indexeddb/client/IDBRequestImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abort):
(WebCore::IDBClient::IDBTransaction::commit):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/modern/deletedatabase-1.html:
* storage/indexeddb/modern/opendatabase-versions.html:
* storage/indexeddb/modern/versionchange-event.html:

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

4 years agoRemove Mountain Lion support from gtest
dburkart@apple.com [Tue, 1 Dec 2015 18:26:18 +0000 (18:26 +0000)]
Remove Mountain Lion support from gtest
https://bugs.webkit.org/show_bug.cgi?id=151705

Reviewed by Darin Adler.

* gtest/xcode/Config/General.xcconfig:

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

4 years agoREGRESSION(r192834): [GTK] Test /webkit2/WebKitWebView/editor-state/typing-attributes...
carlosgc@webkit.org [Tue, 1 Dec 2015 17:40:31 +0000 (17:40 +0000)]
REGRESSION(r192834): [GTK] Test /webkit2/WebKitWebView/editor-state/typing-attributes times out after r192834
https://bugs.webkit.org/show_bug.cgi?id=151699

Reviewed by Tim Horton.

In r192834 the code to send EditorStateChanged message to the UI
process from WebPage::didChangeSelection was removed for non-mac
ports.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection): Send EditorStateChanged
message to the UI process also for non-mac ports, as before r192834.

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

4 years agoUpdated webkit.org to use the new theme and WordPress deployment.
jond@apple.com [Tue, 1 Dec 2015 17:39:37 +0000 (17:39 +0000)]
Updated webkit.org to use the new theme and WordPress deployment.

* .htaccess:
* blog/.htaccess:
* index.php: Added.

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

4 years agoFixed a typo that Anders noticed.
ggaren@apple.com [Tue, 1 Dec 2015 17:39:03 +0000 (17:39 +0000)]
Fixed a typo that Anders noticed.

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

4 years agoUnreviewed. Fix timeouts in several HTTP layout tests in GTK+ after r192796.
carlosgc@webkit.org [Tue, 1 Dec 2015 17:35:58 +0000 (17:35 +0000)]
Unreviewed. Fix timeouts in several HTTP layout tests in GTK+ after r192796.

In r192796, the initialization of m_ignoreTLSErrors in
WebProcessPool was removed by mistake, making all HTTP tests that use
HTTPS fail due to invalid certificate errors.

* UIProcess/WebProcessPool.h: Bring back m_ignoreTLSErrors initialization.

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

4 years agoFixed data return format for tweets when updating cache.
jond@apple.com [Tue, 1 Dec 2015 17:34:39 +0000 (17:34 +0000)]
Fixed data return format for tweets when updating cache.

* wp-content/themes/webkit/widgets/twitter.php:

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

4 years agoTheme update to tidy styles and add a theme screenshot.
jond@apple.com [Tue, 1 Dec 2015 17:31:29 +0000 (17:31 +0000)]
Theme update to tidy styles and add a theme screenshot.

* wp-content/themes/webkit/screenshot.png: Added.
* wp-content/themes/webkit/style.css:
(.featured-tile):
(.tile .background-image):

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

4 years agoUnreviewed, rolling out r192876.
carlosgc@webkit.org [Tue, 1 Dec 2015 14:39:58 +0000 (14:39 +0000)]
Unreviewed, rolling out r192876.

It broke a lot of JSC and layout tests for GTK and EFL

Reverted changeset:

"[ES6] "super" and "this" should be lexically bound inside an
arrow function and should live in a JSLexicalEnvironment"
https://bugs.webkit.org/show_bug.cgi?id=149338
http://trac.webkit.org/changeset/192876

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

4 years agoREGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type...
carlosgc@webkit.org [Tue, 1 Dec 2015 13:57:20 +0000 (13:57 +0000)]
REGRESSION(r192247): [GTK] ASSERTION FAILED: type == WebCore::ActionType || type == WebCore::CheckableActionType || type == WebCore::SeparatorType
https://bugs.webkit.org/show_bug.cgi?id=151513

Reviewed by Martin Robinson.

This happens because we are using our own WebContextMenuItemGtk
derived from WebContextMenuItemData, but using our own submenu
items handling. We are using the non-submenu
WebContextMenuItemData constructor to create our submenu items
too, because WebContextMenuItemData always expect the submenu
items to be passed to the constructor, but we have a set_submenu
method in the public API. So we consider that a
WebContextMenuItemGtk is SubmenuType if it has submenu items, but
we use the action type internally. When converting a
WebContextMenuItemGtk to a generic WebContextMenuItemData, we
correctly set the type and pass the submenu items to the
approriate constructor.

* Shared/gtk/WebContextMenuItemGtk.cpp:
(WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk): When
constructing from a WebContextMenuItemData, set the type as
ActionType when it's a submenu type.
* Shared/gtk/WebContextMenuItemGtk.h:
(WebKit::WebContextMenuItemGtk::type): Return SubmenuType if
submenu items vector is not empty, otherwise use the parent method.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkit_context_menu_item_new_with_submenu): Create the
WebContextMenuItemGtk as ActionType.

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

4 years ago[GTK] ASSERTION FAILED: m_table running /webkit2/BackForwardList/navigation in Debug...
carlosgc@webkit.org [Tue, 1 Dec 2015 12:23:34 +0000 (12:23 +0000)]
[GTK] ASSERTION FAILED: m_table running /webkit2/BackForwardList/navigation in Debug build
https://bugs.webkit.org/show_bug.cgi?id=151700

Reviewed by Martin Robinson.

This happens when the frame notifies its observers that the page
will be detached. The m_table that asserts is the
FrameDestructionObserver HashSet. It happens when clearing the
GObject DOM cache wrappers during frame destruction, and there's a
Document object wrapped whose last reference is held by the DOM
wrapper. In that case, the Document object is destroyed while the
frame is being destroyed. Deleting the wrapper objects after the
frame destruction fixes the crash.

* bindings/gobject/DOMObjectCache.cpp:

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

4 years ago[Streams API] pull function of tee should call readFromReadableStreamReader directly
youenn.fablet@crf.canon.fr [Tue, 1 Dec 2015 11:02:30 +0000 (11:02 +0000)]
[Streams API] pull function of tee should call readFromReadableStreamReader directly
https://bugs.webkit.org/show_bug.cgi?id=151497

Source/WebCore:

Reviewed by Darin Adler.

Covered by added test.

* Modules/streams/ReadableStreamInternals.js:
(teeReadableStreamPullFunction): directly calling readFromReadableStreamReader.

LayoutTests:

Unreviewed.

Adding non regression test.

* streams/streams-promises-expected.txt:
* streams/streams-promises.html:

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

4 years ago[Streams API] Clean-up JS built-in code using arrow functions
youenn.fablet@crf.canon.fr [Tue, 1 Dec 2015 10:46:30 +0000 (10:46 +0000)]
[Streams API] Clean-up JS built-in code using arrow functions
https://bugs.webkit.org/show_bug.cgi?id=151489

Reviewed by Darin Adler.

Using arrow functions to remove need for _this.
Made errorWritableStream take two parameters to simplify code and align it with the spec.

No change in behavior.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
(write):
* Modules/streams/WritableStreamInternals.js:
(errorWritableStream):
(writableStreamAdvanceQueue):
(closeWritableStream):

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

4 years ago[Streams API] teeReadableStream should not directly use stream.getReader()
youenn.fablet@crf.canon.fr [Tue, 1 Dec 2015 10:14:04 +0000 (10:14 +0000)]
[Streams API] teeReadableStream should not directly use stream.getReader()
https://bugs.webkit.org/show_bug.cgi?id=151487

Reviewed by Darin Adler.

Source/WebCore:

Covered by added test.

* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream): Create a @ReadableStreamReader instead of calling getReader() which may be disrupted by user scripts.

LayoutTests:

Adding non-regression test.

* streams/streams-promises-expected.txt:
* streams/streams-promises.html:

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

4 years ago[ES6] "super" and "this" should be lexically bound inside an arrow function and shoul...
commit-queue@webkit.org [Tue, 1 Dec 2015 09:46:12 +0000 (09:46 +0000)]
[ES6] "super" and "this" should be lexically bound inside an arrow function and should live in a JSLexicalEnvironment
https://bugs.webkit.org/show_bug.cgi?id=149338

Source/JavaScriptCore:

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-12-01
Reviewed by Saam Barati.

Implemented new version of the lexically bound 'this' in arrow function. In current version
'this' is stored inside of the lexical environment of the function. To store and load we use
op_get_from_scope and op_put_to_scope operations. Also new implementation prevent raising TDZ
error for arrow functions that are declared before super() but invoke after.

* builtins/BuiltinExecutables.cpp:
(JSC::createExecutableInternal):
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::getSlow):
* bytecode/ExecutableInfo.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::isDerivedConstructorContext):
(JSC::ExecutableInfo::isArrowFunctionContext):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::isDerivedConstructorContext):
(JSC::UnlinkedCodeBlock::isArrowFunctionContext):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::variable):
(JSC::BytecodeGenerator::emitLoadArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadThisFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutThisToArrowFunctionContextScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isDerivedConstructorContext):
(JSC::BytecodeGenerator::usesArrowFunction):
(JSC::BytecodeGenerator::needsToUpdateArrowFunctionContext):
(JSC::BytecodeGenerator::usesEval):
(JSC::BytecodeGenerator::usesThis):
(JSC::BytecodeGenerator::newTarget):
(JSC::BytecodeGenerator::makeFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::SuperNode::emitBytecode):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* dfg/DFGAbstractInterpreterInlines.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
* dfg/DFGClobberize.h:
* dfg/DFGDoesGC.cpp:
* dfg/DFGFixupPhase.cpp:
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGPromotedHeapLocation.cpp:
* dfg/DFGPromotedHeapLocation.h:
* dfg/DFGSafeToExecute.h:
* dfg/DFGSpeculativeJIT.cpp:
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:
* ftl/FTLCapabilities.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* interpreter/Interpreter.cpp:
(JSC::eval):
* jit/JIT.cpp:
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emitNewFuncExprCommon):
* jit/JITOpcodes32_64.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createArrowFunctionExpr):
(JSC::ASTBuilder::usesArrowFunction):
* parser/Nodes.h:
(JSC::ScopeNode::usesArrowFunction):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/ParserModes.h:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getModuleProgramCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CodeCache.h:
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::ScriptExecutable):
(JSC::EvalExecutable::create):
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::ModuleProgramExecutable::ModuleProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/Executable.h:
(JSC::ScriptExecutable::isArrowFunctionContext):
(JSC::ScriptExecutable::isDerivedConstructorContext):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createEvalCodeBlock):
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* tests/es6.yaml:
* tests/stress/arrowfunction-activation-sink-osrexit.js:
* tests/stress/arrowfunction-activation-sink.js:
* tests/stress/arrowfunction-lexical-bind-newtarget.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-1.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-2.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-3.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-4.js: Added.
* tests/stress/arrowfunction-lexical-bind-this-1.js:
* tests/stress/arrowfunction-lexical-bind-this-7.js: Added.
* tests/stress/arrowfunction-tdz-1.js: Added.
* tests/stress/arrowfunction-tdz-2.js: Added.
* tests/stress/arrowfunction-tdz-3.js: Added.
* tests/stress/arrowfunction-tdz-4.js: Added.
* tests/stress/arrowfunction-tdz.js: Removed.

LayoutTests:

Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2015-12-01
Reviewed by Saam Barati.

* js/arrowfunction-supercall-expected.txt: Added.
* js/arrowfunction-supercall.html: Added.
* js/arrowfunction-tdz-expected.txt: Added new expectation.
* js/script-tests/arrowfunction-supercall.js: Added.
* js/script-tests/arrowfunction-tdz.js: Added new cases.

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

4 years agoUnreviewed. Add missing inspector files to the GTK+ build.
carlosgc@webkit.org [Tue, 1 Dec 2015 09:24:49 +0000 (09:24 +0000)]
Unreviewed. Add missing inspector files to the GTK+ build.

* PlatformGTK.cmake: Add also Debug css files.

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

4 years ago[Streams API] streams should not directly use Number and related methods
youenn.fablet@crf.canon.fr [Tue, 1 Dec 2015 09:06:25 +0000 (09:06 +0000)]
[Streams API] streams should not directly use Number and related methods
https://bugs.webkit.org/show_bug.cgi?id=151499

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/CommonIdentifiers.h: Adding isNaN as private symbol.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Adding @isNaN function.

Source/WebCore:

Covered by updated test.

Using @Number, @isFinite and @isNaN in place of Number, Number.isFinite and Number.isNaN.

* Modules/streams/ReadableStreamInternals.js:
(enqueueInReadableStream):
* Modules/streams/StreamInternals.js:
(validateAndNormalizeQueuingStrategy):
(enqueueValueWithSize):

LayoutTests:

Added a non-regression test.

* streams/streams-promises-expected.txt:
* streams/streams-promises.html:

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

4 years agoDon't hide the argument name inside for block in AirIteratedRegisterCoalescing.cpp
ossy@webkit.org [Tue, 1 Dec 2015 09:05:36 +0000 (09:05 +0000)]
Don't hide the argument name inside for block in AirIteratedRegisterCoalescing.cpp
https://bugs.webkit.org/show_bug.cgi?id=151622

Reviewed by Darin Adler.

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addEdges):

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

4 years agoUnreviewed. Fix GTK+ build after r192849.
carlosgc@webkit.org [Tue, 1 Dec 2015 09:04:35 +0000 (09:04 +0000)]
Unreviewed. Fix GTK+ build after r192849.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_supplemental_method1):
(webkit_dom_test_interface_supplemental_method2):
(webkit_dom_test_interface_set_supplemental_str2):
(webkit_dom_test_interface_get_supplemental_node):
(webkit_dom_test_interface_set_supplemental_node):

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

4 years ago[Streams API] Remove use of @catch for exposed promises
youenn.fablet@crf.canon.fr [Tue, 1 Dec 2015 08:15:45 +0000 (08:15 +0000)]
[Streams API] Remove use of @catch for exposed promises
https://bugs.webkit.org/show_bug.cgi?id=151625

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::addOwnInternalSlots): Removing @catch from the prototype as it is not safe.

Source/WebCore:

Promise @catch is calling "then" which may be controlled by user scripts.
This patch simply replaces @catch by calling @then directly.

Covered by modified tests.

* Modules/streams/ReadableStream.js:
(pipeTo):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):

LayoutTests:

* streams/streams-promises.html: beefing up the catch test by also overwritting Promise.prototype.then.

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

4 years agoB3::ValueRep::Any should translate into a Arg::ColdUse role in Air
fpizlo@apple.com [Tue, 1 Dec 2015 07:03:55 +0000 (07:03 +0000)]
B3::ValueRep::Any should translate into a Arg::ColdUse role in Air
https://bugs.webkit.org/show_bug.cgi?id=151174

Reviewed by Geoffrey Garen and Benjamin Poulain.

This teaches the register allocator that it should pick spills based on whichever tmp has the
highest score:

    score(tmp) = degree(tmp) / sum(for each use of tmp, block->frequency)

In other words, the numerator is the number of edges in the inteference graph and the denominator
is an estimate of the dynamic number of uses.

This also extends Arg::Role to know that there is such a thing as ColdUse, i.e. a Use that
doesn't count as such for the above formula. Because LateUse is always used in contexts where we
want it to be Cold, I've defined LateUse to imply ColdUse.

This gets rid of all spilling inside the hot loop in Kraken/imaging-gaussian-blur. But more
importantly, it makes our register allocator use a well-known heuristic based on reusable
building blocks like the new Air::UseCounts. Even if the heuristic is slightly wrong, the right
heuristic probably uses the same building blocks.

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
* b3/B3ValueRep.h:
* b3/air/AirArg.cpp:
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::isWarmUse):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isDef):
* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::iteratedRegisterCoalescing):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::IteratedRegisterCoalescingAllocator): Deleted.
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::allocatedReg): Deleted.
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::tmpArraySize): Deleted.
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::initializeDegrees): Deleted.
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build): Deleted.
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::selectSpill): Deleted.
(JSC::B3::Air::isUselessMoveInst): Deleted.
(JSC::B3::Air::assignRegisterToTmpInProgram): Deleted.
(JSC::B3::Air::addSpillAndFillToProgram): Deleted.
(JSC::B3::Air::iteratedRegisterCoalescingOnType): Deleted.
* b3/air/AirLiveness.h:
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/air/AirUseCounts.h: Added.
(JSC::B3::Air::UseCounts::Counts::dump):
(JSC::B3::Air::UseCounts::UseCounts):
(JSC::B3::Air::UseCounts::operator[]):
(JSC::B3::Air::UseCounts::dump):
* runtime/Options.h:

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

4 years agoFix the !ENABLE(DFG_JIT) build after r192699
ossy@webkit.org [Tue, 1 Dec 2015 06:58:44 +0000 (06:58 +0000)]
Fix the !ENABLE(DFG_JIT) build after r192699
https://bugs.webkit.org/show_bug.cgi?id=151616

Reviewed by Darin Adler.

* assembler/MacroAssembler.h:

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

4 years agoSet max-height to prevent narrow images from upscaling.
jond@apple.com [Tue, 1 Dec 2015 06:46:49 +0000 (06:46 +0000)]
Set max-height to prevent narrow images from upscaling.

* wp-content/themes/webkit/style.css:
(article figure > img):
(figure.widescreen):
(figure.widescreen figcaption):
(figure.widescreen img): Deleted.

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

4 years agoUnreviewed, fix build after r192848 and r192849
ljaehun.lim@samsung.com [Tue, 1 Dec 2015 05:34:07 +0000 (05:34 +0000)]
Unreviewed, fix build after r192848 and r192849

- Rename canSuspendForPageCache to canSuspendForDocumentSuspension
- Use references instead of pointers

* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::canSuspendForDocumentSuspension):
(WebCore::BatteryManager::canSuspendForPageCache): Deleted.
* Modules/battery/BatteryManager.h:
* Modules/battery/NavigatorBattery.cpp:
(WebCore::NavigatorBattery::webkitBattery):
* Modules/battery/NavigatorBattery.h:
* Modules/gamepad/deprecated/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::webkitGetGamepads):
* Modules/gamepad/deprecated/NavigatorGamepad.h:
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::NavigatorContentUtils::registerProtocolHandler):
(WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
(WebCore::NavigatorContentUtils::unregisterProtocolHandler):
* Modules/navigatorcontentutils/NavigatorContentUtils.h:
* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/NavigatorVibration.h:

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

4 years agoModern IDB: Unskip "storage/indexeddb/mozilla" instead of each individual test inside...
beidson@apple.com [Tue, 1 Dec 2015 05:20:15 +0000 (05:20 +0000)]
Modern IDB: Unskip "storage/indexeddb/mozilla" instead of each individual test inside of it.
https://bugs.webkit.org/show_bug.cgi?id=151693

Reviewed by Geoffrey Garen.

* platform/mac-wk1/TestExpectations:

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

4 years agoObject::{freeze, seal} perform preventExtensionsTransition twice
utatane.tea@gmail.com [Tue, 1 Dec 2015 05:15:45 +0000 (05:15 +0000)]
Object::{freeze, seal} perform preventExtensionsTransition twice
https://bugs.webkit.org/show_bug.cgi?id=151606

Reviewed by Darin Adler.

In Structure::{freezeTransition, sealTransition}, we perform preventExtensionsTransition.
So it is unnecessary to perform preventExtensionsTransition before executing Structure::{freezeTransition, sealTransition}.

* runtime/JSObject.cpp:
(JSC::JSObject::seal):
(JSC::JSObject::freeze):
(JSC::JSObject::preventExtensions):
* tests/stress/freeze-and-seal-should-prevent-extensions.js: Added.
(shouldBe):
(shouldThrow):

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

4 years ago[JSC] Add Sqrt to B3
benjamin@webkit.org [Tue, 1 Dec 2015 04:59:02 +0000 (04:59 +0000)]
[JSC] Add Sqrt to B3
https://bugs.webkit.org/show_bug.cgi?id=151692

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-30
Reviewed by Geoffrey Garen.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::sqrtDouble):
* assembler/X86Assembler.h:
(JSC::X86Assembler::sqrtsd_mr):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testSqrtArg):
(JSC::B3::testSqrtImm):
(JSC::B3::testSqrtMem):
(JSC::B3::run):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::doubleSqrt):

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

4 years agoFTL lazy slow paths should work with B3
fpizlo@apple.com [Tue, 1 Dec 2015 04:43:28 +0000 (04:43 +0000)]
FTL lazy slow paths should work with B3
https://bugs.webkit.org/show_bug.cgi?id=151667

Reviewed by Geoffrey Garen.

This adds all of the glue necessary to make FTL::LazySlowPath work with B3. The B3 approach
allows us to put all of the code in FTL::LowerDFGToLLVM, instead of having supporting data
structures on the side and a bunch of complex code in FTLCompile.cpp.

* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::generate):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::run):
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::generate):
* b3/B3StackmapValue.h:
* ftl/FTLJSTailCall.cpp:
(JSC::FTL::DFG::recoveryFor):
(JSC::FTL::JSTailCall::emit):
* ftl/FTLLazySlowPath.cpp:
(JSC::FTL::LazySlowPath::LazySlowPath):
(JSC::FTL::LazySlowPath::generate):
* ftl/FTLLazySlowPath.h:
(JSC::FTL::LazySlowPath::createGenerator):
(JSC::FTL::LazySlowPath::patchableJump):
(JSC::FTL::LazySlowPath::done):
(JSC::FTL::LazySlowPath::patchpoint):
(JSC::FTL::LazySlowPath::usedRegisters):
(JSC::FTL::LazySlowPath::callSiteIndex):
(JSC::FTL::LazySlowPath::stub):
* ftl/FTLLocation.cpp:
(JSC::FTL::Location::forValueRep):
(JSC::FTL::Location::forStackmaps):
(JSC::FTL::Location::dump):
(JSC::FTL::Location::isGPR):
(JSC::FTL::Location::gpr):
(JSC::FTL::Location::isFPR):
(JSC::FTL::Location::fpr):
(JSC::FTL::Location::restoreInto):
* ftl/FTLLocation.h:
(JSC::FTL::Location::Location):
(JSC::FTL::Location::forRegister):
(JSC::FTL::Location::forIndirect):
(JSC::FTL::Location::forConstant):
(JSC::FTL::Location::kind):
(JSC::FTL::Location::hasReg):
(JSC::FTL::Location::reg):
(JSC::FTL::Location::hasOffset):
(JSC::FTL::Location::offset):
(JSC::FTL::Location::hash):
(JSC::FTL::Location::hasDwarfRegNum): Deleted.
(JSC::FTL::Location::dwarfRegNum): Deleted.
(JSC::FTL::Location::hasDwarfReg): Deleted.
(JSC::FTL::Location::dwarfReg): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::LowerDFGToLLVM):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
* jit/RegisterSet.cpp:
(JSC::RegisterSet::stubUnavailableRegisters):
(JSC::RegisterSet::macroScratchRegisters):
(JSC::RegisterSet::calleeSaveRegisters):
* jit/RegisterSet.h:

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

4 years agoUse a better RNG for Math.random()
ggaren@apple.com [Tue, 1 Dec 2015 03:39:59 +0000 (03:39 +0000)]
Use a better RNG for Math.random()
https://bugs.webkit.org/show_bug.cgi?id=151641

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Updated for interface change.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::setInputCursor):

Source/WTF:

Use 64 bits in the random number generator instead of 32 bit. (In
the end, JavaScript, which uses doubles, will only see 52 bits.) This
prevents programs that mulitply a random number by a large constant from
seeing non-random "banding" caused by zeroes in the low 20 bits.

I also took the opportunity to upgrade from GameRandom to Xorshift+,
since Xorshift+ passes more benchmarks for randomness, and is not any
slower or more complicated.

Now let us all remember the fateful words of Steve Weibe, who would be
King of Kong: "The randomness went the opposite way that it usually goes."

* wtf/WeakRandom.h:
(WTF::WeakRandom::WeakRandom):
(WTF::WeakRandom::setSeed): Use standard naming.

(WTF::WeakRandom::seed): This function is safe now. "Unsafe" in function
names makes me itch.

(WTF::WeakRandom::get):
(WTF::WeakRandom::getUint32): Update to 64bit.

(WTF::WeakRandom::advance): The Xorshift+ algorithm.

(WTF::WeakRandom::initializeSeed): Deleted.
(WTF::WeakRandom::seedUnsafe): Deleted.

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

4 years agoAmazon.com Additional Information links aren't clickable
jiewen_tan@apple.com [Tue, 1 Dec 2015 02:53:25 +0000 (02:53 +0000)]
Amazon.com Additional Information links aren't clickable
https://bugs.webkit.org/show_bug.cgi?id=151401
<rdar://problem/23454261>

Reviewed by Darin Adler.

Source/WebCore:

The cause of this issue is that the painting order is different from the hittest order so we can end up
with visible but unreachable content. To fix this, the executation flow of hittest has been reordered.
According to the paint system, which renders the webpage from the bottom RenderLayer to the top, contents
are rendered before floats. Hence, for the hittest, which determines the hitted location from top RenderLayer
to the bottom, should do it reversedly. Now, hittest will first test floats then contents.

Test: fast/block/float/hit-test-on-overlapping-floats.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):

LayoutTests:

* fast/block/float/hit-test-on-overlapping-floats-expected.txt: Added.
* fast/block/float/hit-test-on-overlapping-floats.html: Added.

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

4 years agoFix possible crash with animated layers in reflections
simon.fraser@apple.com [Tue, 1 Dec 2015 02:46:09 +0000 (02:46 +0000)]
Fix possible crash with animated layers in reflections
https://bugs.webkit.org/show_bug.cgi?id=151689
rdar://problem/23018612

Reviewed by Darin Adler.

Reflections create additional PlatformCALayers whose owner is set to the GraphicsLayerCA.
Those PlatformCALayers need their owner pointer cleared out when the GraphicsLayerCA
is destroyed.

Tested by compositing/reflections/nested-reflection-transition.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/GraphicsLayerCA.h:

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

4 years agoModern IDB: Iterating index cursors to a specific key is busted.
beidson@apple.com [Tue, 1 Dec 2015 02:29:18 +0000 (02:29 +0000)]
Modern IDB: Iterating index cursors to a specific key is busted.
https://bugs.webkit.org/show_bug.cgi?id=151684

Reviewed by Darin Adler.

Source/WebCore:

No new tests (At least one failing test now passes).

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

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

4 years ago[JSC] Speed up Air Liveness Analysis on Tmps
benjamin@webkit.org [Tue, 1 Dec 2015 02:26:57 +0000 (02:26 +0000)]
[JSC] Speed up Air Liveness Analysis on Tmps
https://bugs.webkit.org/show_bug.cgi?id=151556

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-30
Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Liveness Analysis scales poorly on large graphs like the ones
generated by testComplex().
This patch introduces a faster of Liveness using the continuous indices
of values instead of the values themselves.

There are two main areas of improvements:
1) Reduce the cost of doing a LocalCalc over a BasicBlock.
2) Reduce how many LocalCalc are needed to converge to a solution.

Most of the costs of LocalCalc are from HashSet manipulations.
The HashSet operations are O(1) but the constant is large enough
to be a problem.

I used a similar trick as the Register Allocator to remove hashing
and collision handling: the absolute value of the Tmp is used as an index
into a flat array.

I used Briggs's Sparse Set implementation for the local live information
at each instruction. It has great properties for doing the local calculation:
-No memory reallocation.
-O(1) add() and remove() with a small constant.
-Strict O(n) iteration.
-O(1) clear().

The values Live-At-Head are now stored into a Vector. The Sparse Set
is used to maintain the Tmp uniqueness.

When forwarding new liveness at head to the predecessor, I start by removing
everything that was already in live-at-head. We can assume that any value
in that list has already been added to the predecessors.
This leaves us with a small-ish number of Tmps to add to live-at-head
and to the predecessors.

The speed up convergence, I used the same trick as DFG's liveness: keep
a set of dirty blocks to process. In practice, all the blocks without
back-edges converge quickly, and we only propagate liveness as needed.

This patch reduces the time taken by "testComplex(64, 384)" by another 5%.

The remaining things to do for Liveness are:
-Skip the first block for the fix point (it is often large and doing a local
 calc on it is useless).
-Find a better Data Structure for live-at-tail (updating the HashSet takes
 > 50% of the total convergence time).

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::getAlias):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::getAliasWhenSpilling):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::allocatedReg):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::tmpArraySize):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::initializeDegrees):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addEdges):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addEdge):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::makeWorkList):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::simplify):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::forEachAdjacent):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::hasBeenSimplified):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::decrementDegree):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::forEachNodeMoves):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::isMoveRelated):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::enableMovesOnValue):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::precoloredCoalescingHeuristic):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::conservativeHeuristic):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addWorkList):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::combine):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::freezeMoves):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::selectSpill):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::assignColors):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::dumpInterferenceGraphInDot):
(JSC::B3::Air::iteratedRegisterCoalescingOnType):
(JSC::B3::Air::iteratedRegisterCoalescing):
(JSC::B3::Air::AbsoluteTmpHelper<Arg::GP>::absoluteIndex): Deleted.
(JSC::B3::Air::AbsoluteTmpHelper<Arg::GP>::tmpFromAbsoluteIndex): Deleted.
(JSC::B3::Air::AbsoluteTmpHelper<Arg::FP>::absoluteIndex): Deleted.
(JSC::B3::Air::AbsoluteTmpHelper<Arg::FP>::tmpFromAbsoluteIndex): Deleted.
* b3/air/AirReportUsedRegisters.cpp:
(JSC::B3::Air::reportUsedRegisters):
* b3/air/AirTmpInlines.h:
(JSC::B3::Air::AbsoluteTmpMapper<Arg::GP>::absoluteIndex):
(JSC::B3::Air::AbsoluteTmpMapper<Arg::GP>::tmpFromAbsoluteIndex):
(JSC::B3::Air::AbsoluteTmpMapper<Arg::FP>::absoluteIndex):
(JSC::B3::Air::AbsoluteTmpMapper<Arg::FP>::tmpFromAbsoluteIndex):
* b3/air/AirLiveness.h: Added.

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/IndexSparseSet.h: Added.
(WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet):
(WTF::IndexSparseSet<OverflowHandler>::add):
(WTF::IndexSparseSet<OverflowHandler>::remove):
(WTF::IndexSparseSet<OverflowHandler>::clear):
(WTF::IndexSparseSet<OverflowHandler>::size):
(WTF::IndexSparseSet<OverflowHandler>::isEmpty):
(WTF::IndexSparseSet<OverflowHandler>::contains):

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

4 years agoModern IDB: ObjectStore cursors should not be able to iterate out of their range.
beidson@apple.com [Tue, 1 Dec 2015 02:15:47 +0000 (02:15 +0000)]
Modern IDB: ObjectStore cursors should not be able to iterate out of their range.
https://bugs.webkit.org/show_bug.cgi?id=151683

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Covered by at least one failing test that now passes).

* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

4 years agoCTTE autogenerated bindings code
andersca@apple.com [Tue, 1 Dec 2015 02:13:55 +0000 (02:13 +0000)]
CTTE autogenerated bindings code
https://bugs.webkit.org/show_bug.cgi?id=151682

Reviewed by Darin Adler.

Make sure that JS bindings pass a reference to the object when calling static member functions.

* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::getGamepads):
* Modules/gamepad/NavigatorGamepad.h:
* Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::geolocation):
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/mediasource/AudioTrackMediaSource.h:
(WebCore::AudioTrackMediaSource::sourceBuffer):
* Modules/mediasource/TextTrackMediaSource.h:
(WebCore::TextTrackMediaSource::sourceBuffer):
* Modules/mediasource/VideoTrackMediaSource.h:
(WebCore::VideoTrackMediaSource::sourceBuffer):
* Modules/mediastream/HTMLMediaElementMediaStream.cpp:
(WebCore::HTMLMediaElementMediaStream::srcObject):
(WebCore::HTMLMediaElementMediaStream::setSrcObject):
* Modules/mediastream/HTMLMediaElementMediaStream.h:
* Modules/mediastream/NavigatorMediaDevices.cpp:
(WebCore::NavigatorMediaDevices::mediaDevices):
* Modules/mediastream/NavigatorMediaDevices.h:
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::webkitNotifications):
* Modules/notifications/DOMWindowNotifications.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/notifications/WorkerGlobalScopeNotifications.cpp:
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
* Modules/notifications/WorkerGlobalScopeNotifications.h:
* Modules/speech/DOMWindowSpeechSynthesis.cpp:
(WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
* Modules/speech/DOMWindowSpeechSynthesis.h:
* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase):
* Modules/webdatabase/DOMWindowWebDatabase.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* testing/Internals.cpp:
(WebCore::Internals::enableMockSpeechSynthesizer):

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

4 years agoRename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons...
commit-queue@webkit.org [Tue, 1 Dec 2015 01:55:43 +0000 (01:55 +0000)]
Rename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons for suspension
https://bugs.webkit.org/show_bug.cgi?id=151677

Patch by Katlyn Graff <kgraff@apple.com> on 2015-11-30
Reviewed by Ryosuke Niwa.

Source/WebCore:

Simply a refactoring patch, so no new tests.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::canSuspendForDocumentSuspension):
(WebCore::MediaKeySession::canSuspendForPageCache): Deleted.
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::canSuspendForDocumentSuspension):
(WebCore::Geolocation::canSuspendForPageCache): Deleted.
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache): Deleted.
* Modules/indexeddb/DOMWindowIndexedDatabase.h:
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::canSuspendForDocumentSuspension):
(WebCore::IDBClient::IDBDatabase::canSuspendForPageCache): Deleted.
* Modules/indexeddb/client/IDBDatabaseImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::canSuspendForDocumentSuspension):
(WebCore::IDBClient::IDBRequest::canSuspendForPageCache): Deleted.
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::canSuspendForDocumentSuspension):
(WebCore::IDBClient::IDBTransaction::canSuspendForPageCache): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/legacy/LegacyDatabase.cpp:
(WebCore::LegacyDatabase::canSuspendForDocumentSuspension):
(WebCore::LegacyDatabase::canSuspendForPageCache): Deleted.
* Modules/indexeddb/legacy/LegacyDatabase.h:
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::canSuspendForDocumentSuspension):
(WebCore::LegacyRequest::canSuspendForPageCache): Deleted.
* Modules/indexeddb/legacy/LegacyRequest.h:
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::canSuspendForDocumentSuspension):
(WebCore::LegacyTransaction::canSuspendForPageCache): Deleted.
* Modules/indexeddb/legacy/LegacyTransaction.h:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::canSuspendForDocumentSuspension):
(WebCore::MediaSource::canSuspendForPageCache): Deleted.
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::canSuspendForDocumentSuspension):
(WebCore::SourceBuffer::canSuspendForPageCache): Deleted.
* Modules/mediasource/SourceBuffer.h:
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::canSuspendForDocumentSuspension):
(WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::canSuspendForDocumentSuspension):
(WebCore::RTCDTMFSender::canSuspendForPageCache): Deleted.
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
(WebCore::RTCPeerConnection::canSuspendForPageCache): Deleted.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowNotifications::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowNotifications::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowNotifications::reconnectFrameFromPageCache): Deleted.
* Modules/notifications/DOMWindowNotifications.h:
* Modules/notifications/Notification.cpp:
(WebCore::Notification::canSuspendForDocumentSuspension):
(WebCore::Notification::canSuspendForPageCache): Deleted.
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::canSuspendForDocumentSuspension):
(WebCore::NotificationCenter::canSuspendForPageCache): Deleted.
* Modules/notifications/NotificationCenter.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::canSuspendForDocumentSuspension):
(WebCore::AudioContext::canSuspendForPageCache): Deleted.
* Modules/webaudio/AudioContext.h:
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::canSuspendForDocumentSuspension):
(WebCore::DatabaseContext::canSuspendForPageCache): Deleted.
* Modules/webdatabase/DatabaseContext.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::canSuspendForDocumentSuspension):
(WebCore::WebSocket::canSuspendForPageCache): Deleted.
* Modules/websockets/WebSocket.h:
* css/FontLoader.cpp:
(WebCore::FontLoader::canSuspendForDocumentSuspension):
(WebCore::FontLoader::canSuspendForPageCache): Deleted.
* css/FontLoader.h:
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::canSuspendForDocumentSuspension):
(WebCore::ActiveDOMObject::canSuspendForPageCache): Deleted.
* dom/ActiveDOMObject.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForTabSuspension):
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache): Deleted.
* dom/ScriptExecutionContext.h:
* fileapi/FileReader.cpp:
(WebCore::FileReader::canSuspendForDocumentSuspension):
(WebCore::FileReader::canSuspendForPageCache): Deleted.
* fileapi/FileReader.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/PageCache.cpp:
(WebCore::canCacheFrame):
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::canSuspendForDocumentSuspension):
(WebCore::HTMLMarqueeElement::canSuspendForPageCache): Deleted.
* html/HTMLMarqueeElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canSuspendForDocumentSuspension):
(WebCore::HTMLMediaElement::canSuspendForPageCache): Deleted.
* html/HTMLMediaElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::canSuspendForDocumentSuspension):
(WebCore::HTMLSourceElement::canSuspendForPageCache): Deleted.
* html/HTMLSourceElement.h:
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::canSuspendForDocumentSuspension):
(WebCore::PublicURLManager::canSuspendForPageCache): Deleted.
* html/PublicURLManager.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension):
(WebCore::WebGLRenderingContextBase::canSuspendForPageCache): Deleted.
* html/canvas/WebGLRenderingContextBase.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::open):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::disconnectFrameForDocumentSuspension):
(WebCore::DOMApplicationCache::reconnectFrameFromDocumentSuspension):
(WebCore::DOMApplicationCache::disconnectFrameForPageCache): Deleted.
(WebCore::DOMApplicationCache::reconnectFrameFromPageCache): Deleted.
* loader/appcache/DOMApplicationCache.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow):
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetUnlessSuspendedForDocumentSuspension):
(WebCore::DOMWindow::suspendForDocumentSuspension):
(WebCore::DOMWindow::resumeFromDocumentSuspension):
(WebCore::DOMWindow::disconnectDOMWindowProperties):
(WebCore::DOMWindow::reconnectDOMWindowProperties):
(WebCore::DOMWindow::resetUnlessSuspendedForPageCache): Deleted.
(WebCore::DOMWindow::suspendForPageCache): Deleted.
(WebCore::DOMWindow::resumeFromPageCache): Deleted.
* page/DOMWindow.h:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowExtension::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowExtension::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowExtension::reconnectFrameFromPageCache): Deleted.
* page/DOMWindowExtension.h:
* page/DOMWindowProperty.cpp:
(WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowProperty::disconnectFrameForPageCache): Deleted.
(WebCore::DOMWindowProperty::reconnectFrameFromPageCache): Deleted.
* page/DOMWindowProperty.h:
* page/EventSource.cpp:
(WebCore::EventSource::canSuspendForDocumentSuspension):
(WebCore::EventSource::canSuspendForPageCache): Deleted.
* page/EventSource.h:
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::canSuspendForDocumentSuspension):
(WebCore::SuspendableTimer::canSuspendForPageCache): Deleted.
* page/SuspendableTimer.h:
* workers/Worker.cpp:
(WebCore::Worker::canSuspendForDocumentSuspension):
(WebCore::Worker::canSuspendForPageCache): Deleted.
* workers/Worker.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::canSuspendForDocumentSuspension):
(WebCore::XMLHttpRequest::canSuspendForPageCache): Deleted.
* xml/XMLHttpRequest.h:

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _cacheabilityDictionary]):

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

4 years agoModern IDB: "prevunique" cursors should point at the lowest primary key that matches...
beidson@apple.com [Tue, 1 Dec 2015 01:28:15 +0000 (01:28 +0000)]
Modern IDB: "prevunique" cursors should point at the lowest primary key that matches, not the highest.
https://bugs.webkit.org/show_bug.cgi?id=151675.

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Covered by at least one failing test that now passes, and updates to previously incorrect tests).

* Modules/indexeddb/server/IndexValueEntry.cpp:
(WebCore::IDBServer::IndexValueEntry::reverseBegin): If CursorDuplicity is NoDuplicates, start at the lowest
  entry instead of the highest.
(WebCore::IDBServer::IndexValueEntry::reverseFind):
* Modules/indexeddb/server/IndexValueEntry.h:

* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::reverseFind):
(WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
(WebCore::IDBServer::IndexValueStore::Iterator::nextIndexEntry):
* Modules/indexeddb/server/IndexValueStore.h:

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

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::duplicity):
(WebCore::IDBCursorInfo::isDirectionNoDuplicate): Deleted.
* Modules/indexeddb/shared/IDBCursorInfo.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/modern/index-cursor-1-expected.txt:
* storage/indexeddb/modern/index-cursor-2-expected.txt:
* storage/indexeddb/modern/index-cursor-3-expected.txt:

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

4 years agoBuild fix for some compiler versions.
ap@apple.com [Tue, 1 Dec 2015 01:05:13 +0000 (01:05 +0000)]
Build fix for some compiler versions.

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Disable deprecation warnings while
processing SOFT_LINK_CLASS too.

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

4 years agoFTL OSR Exits that are exception handlers should not have two different entrances...
sbarati@apple.com [Tue, 1 Dec 2015 00:55:32 +0000 (00:55 +0000)]
FTL OSR Exits that are exception handlers should not have two different entrances. Instead, we should have two discrete OSR exits that do different things.
https://bugs.webkit.org/show_bug.cgi?id=151404

Reviewed by Filip Pizlo.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLExceptionHandlerManager.cpp:
(JSC::FTL::ExceptionHandlerManager::addNewExit):
(JSC::FTL::ExceptionHandlerManager::addNewCallOperationExit):
(JSC::FTL::ExceptionHandlerManager::callOperationExceptionTarget):
(JSC::FTL::ExceptionHandlerManager::lazySlowPathExceptionTarget):
(JSC::FTL::ExceptionHandlerManager::callOperationOSRExit):
(JSC::FTL::ExceptionHandlerManager::getByIdOSRExit): Deleted.
(JSC::FTL::ExceptionHandlerManager::subOSRExit): Deleted.
* ftl/FTLExceptionHandlerManager.h:
* ftl/FTLExitThunkGenerator.cpp:
(JSC::FTL::ExitThunkGenerator::emitThunk):
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):
(JSC::FTL::OSRExitDescriptor::isExceptionHandler):
(JSC::FTL::OSRExit::OSRExit):
(JSC::FTL::OSRExit::spillRegistersToSpillSlot):
(JSC::FTL::OSRExit::recoverRegistersFromSpillSlot):
(JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck):
(JSC::FTL::OSRExit::willArriveAtOSRExitFromGenericUnwind):
(JSC::FTL::OSRExit::willArriveAtOSRExitFromCallOperation):
(JSC::FTL::OSRExit::needsRegisterRecoveryOnGenericUnwindOSRExitPath):
(JSC::FTL::OSRExitDescriptor::willArriveAtExitFromIndirectExceptionCheck): Deleted.
(JSC::FTL::OSRExitDescriptor::mightArriveAtOSRExitFromGenericUnwind): Deleted.
(JSC::FTL::OSRExitDescriptor::mightArriveAtOSRExitFromCallOperation): Deleted.
(JSC::FTL::OSRExitDescriptor::needsRegisterRecoveryOnGenericUnwindOSRExitPath): Deleted.
* ftl/FTLOSRExit.h:
* ftl/FTLOSRExitCompilationInfo.h:
(JSC::FTL::OSRExitCompilationInfo::OSRExitCompilationInfo):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileFTLOSRExit):

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

4 years agoNull dereference loading Blink layout test http/tests/misc/detach-during-notifyDone...
jiewen_tan@apple.com [Tue, 1 Dec 2015 00:33:47 +0000 (00:33 +0000)]
Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
https://bugs.webkit.org/show_bug.cgi?id=149309
<rdar://problem/22748363>

Reviewed by Brent Fulgham.

Source/WebCore:

A weird order of event execution introduced by the test case will kill the webpage in a
subframe of the page while executing its |frame.loader().checkLoadCompleteForThisFrame()|.
Therefore, any frames comes after the failing subframe will have no page. Check it before
calling to those frames' |frame.loader().checkLoadCompleteForThisFrame()|, otherwise the
assertion in |frame.loader().checkLoadCompleteForThisFrame()| will fail.

Test: http/tests/misc/detach-during-notifyDone.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadComplete):

Source/WebKit/mac:

* WebView/WebDataSource.mm:
(WebDataSourcePrivate::~WebDataSourcePrivate):
Refine the assertion to treat <rdar://problem/9673866>.

Source/WebKit2:

Callback of bundle clients could kill the documentloader. Therefore, make a copy
of the navigationID before invoking the callback.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):

LayoutTests:

The test case is from Blink r175601:
https://codereview.chromium.org/317513002
The test case will generate a set of weird ordering events that affects the documentLoader:
1. The subframe finishes loading, and since the frame’s testRunner is not set to wait until
done, WebKitTestRunner stops the load (by calling WKBundlePageStopLoading()).
2. This causes the in-progress XHR to be aborted, which causes its readyState to become DONE
(this bug doesn’t always reproduce because sometimes the XHR has already finished before the
frame finishes loading).
3. The onreadystatechange callback is executed, which sets innerHTML on the parent frame.
4. Setting innerHTML disconnects the subframe, nulling out its DocumentLoader.
5. We return to WebFrameLoaderClient::dispatchDidFinishLoad() from step #1, but now the
FrameLoader’s DocumentLoader is null. And WebKit crashes here.

Note that steps 2-4 happen synchronously inside WebFrameLoaderClient::dispatchDidFinishLoad().

* http/tests/misc/detach-during-notifyDone-expected.txt: Added.
* http/tests/misc/detach-during-notifyDone.html: Added.
* http/tests/misc/resources/detached-frame.html: Added.

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

4 years agoUnreviewed, rolling out r192819.
commit-queue@webkit.org [Tue, 1 Dec 2015 00:09:42 +0000 (00:09 +0000)]
Unreviewed, rolling out r192819.
https://bugs.webkit.org/show_bug.cgi?id=151681

This change broke existing layout tests on Windows (Requested
by ryanhaddad on #webkit).

Reverted changeset:

"Unify font-variant-* with font-variant shorthand"
https://bugs.webkit.org/show_bug.cgi?id=149773
http://trac.webkit.org/changeset/192819

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

4 years agoRefactor the op_add, op_sub, and op_mul snippets to use the SnippetOperand class.
mark.lam@apple.com [Tue, 1 Dec 2015 00:07:39 +0000 (00:07 +0000)]
Refactor the op_add, op_sub, and op_mul snippets to use the SnippetOperand class.
https://bugs.webkit.org/show_bug.cgi?id=151678

Reviewed by Geoffrey Garen.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileArithSub):
* ftl/FTLCompile.cpp:
* jit/JITAddGenerator.cpp:
(JSC::JITAddGenerator::generateFastPath):
* jit/JITAddGenerator.h:
(JSC::JITAddGenerator::JITAddGenerator):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):
* jit/JITMulGenerator.cpp:
(JSC::JITMulGenerator::generateFastPath):
* jit/JITMulGenerator.h:
(JSC::JITMulGenerator::JITMulGenerator):
* jit/JITSubGenerator.cpp:
(JSC::JITSubGenerator::generateFastPath):
* jit/JITSubGenerator.h:
(JSC::JITSubGenerator::JITSubGenerator):
* jit/SnippetOperand.h:
(JSC::SnippetOperand::isPositiveConstInt32):

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

4 years agoB3 stackmaps should support early clobber
fpizlo@apple.com [Tue, 1 Dec 2015 00:04:57 +0000 (00:04 +0000)]
B3 stackmaps should support early clobber
https://bugs.webkit.org/show_bug.cgi?id=151668

Reviewed by Geoffrey Garen.

While starting work on FTL lazy slow paths, I realized that we needed some way to say that r11 is
off limits. Not just that it's clobbered, but that it cannot be used for any input values to a
stackmap.

In LLVM we do this by having the AnyRegCC forbid r11.

In B3, we want something more flexible. In this and other cases, what we really want is an early
clobber set. B3 already supported a late clobber set for every stackmap value. Late clobber means
that the act of performing the operation will cause garbage to be written into those registers.
But here we want: assume that garbage magically appears in those registers in the moment before
the operation executes. Any registers in that set will be off-limits to the inputs to the
stackmap. This should be great for other things, like the way the we handle exceptions.

For the simple r11 issue, what we want is to call the StackmapValue::clobber() method, which now
means both early and late clobber. It's the weapon of choice whenever you're unsure.

This adds the early clobber feature, does some minor Inst refactoring to make this less scary,
and adds a test. The test is simple but it's very comprehensive - for example it tests the
early-clobber-after-Move special case.

* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::extraClobberedRegs):
(JSC::B3::StackmapSpecial::extraEarlyClobberedRegs):
(JSC::B3::StackmapSpecial::forEachArgImpl):
* b3/B3StackmapSpecial.h:
* b3/B3StackmapValue.cpp:
(JSC::B3::StackmapValue::dumpMeta):
(JSC::B3::StackmapValue::StackmapValue):
* b3/B3StackmapValue.h:
* b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::extraClobberedRegs):
(JSC::B3::Air::CCallSpecial::extraEarlyClobberedRegs):
(JSC::B3::Air::CCallSpecial::dumpImpl):
* b3/air/AirCCallSpecial.h:
* b3/air/AirInst.h:
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::extraClobberedRegs):
(JSC::B3::Air::Inst::extraEarlyClobberedRegs):
(JSC::B3::Air::Inst::forEachTmpWithExtraClobberedRegs):
(JSC::B3::Air::Inst::reportUsedRegisters):
(JSC::B3::Air::Inst::forEachDefAndExtraClobberedTmp): Deleted.
* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::IteratedRegisterCoalescingAllocator):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::build):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::allocate):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::initializeDegrees):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addEdges):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::addEdge):
(JSC::B3::Air::iteratedRegisterCoalescingOnType):
(JSC::B3::Air::iteratedRegisterCoalescing):
* b3/air/AirSpecial.h:
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/testb3.cpp:
(JSC::B3::testSimplePatchpointWithoutOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithoutOuputClobbersFPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersFPArgs):
(JSC::B3::testPatchpointWithEarlyClobber):
(JSC::B3::testPatchpointCallArg):
(JSC::B3::run):
* dfg/DFGCommon.h:

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

4 years agoRemove Mountain Lion support from ANGLE
dburkart@apple.com [Tue, 1 Dec 2015 00:03:51 +0000 (00:03 +0000)]
Remove Mountain Lion support from ANGLE
https://bugs.webkit.org/show_bug.cgi?id=151679

Reviewed by Darin Adler.

* Configurations/Base.xcconfig:

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

4 years agoUse Optional instead of isNull out argument for nullable getters
darin@apple.com [Mon, 30 Nov 2015 23:57:31 +0000 (23:57 +0000)]
Use Optional instead of isNull out argument for nullable getters
https://bugs.webkit.org/show_bug.cgi?id=151676

Reviewed by Anders Carlsson.

No behavior change, just cleaner code.

* Modules/geolocation/Coordinates.cpp:
(WebCore::Coordinates::altitude): Return an Optional.
(WebCore::Coordinates::altitudeAccuracy): Ditto.
(WebCore::Coordinates::heading): Ditto.
(WebCore::Coordinates::speed): Ditto.
* Modules/geolocation/Coordinates.h: Ditto.

* Modules/indexeddb/IDBVersionChangeEvent.cpp:
(WebCore::IDBVersionChangeEvent::create): Added. The code before was calling
through to Event::create, which is clearly not what was wanted. Also removed
unneeded explicit destructor.
* Modules/indexeddb/IDBVersionChangeEvent.h: Changed return type of newVersion
to Optional and updated for above change.

* Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
(WebCore::IDBClient::IDBVersionChangeEvent::newVersion): Changed to return
an Optional.
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed unused
default argument values; the event type one, at least, was clearly incorrect.
Made more things private, got rid of unneeded destructor, marked class final
instead of marking all functions final.

* Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
(WebCore::LegacyVersionChangeEvent::newVersion): Same as above.
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Ditto.

* Modules/mediastream/MediaTrackConstraints.cpp:
(WebCore::MediaTrackConstraints::optional): Removed bogus bool value. If we
come back to finish later we will have to implement optional return values
for arrays in the JavaScript bindings generator, which should be straightforward.
* Modules/mediastream/MediaTrackConstraints.h: Ditto.

* bindings/js/JSDOMBinding.h:
(WebCore::toNullableJSNumber): Added. This function template is used for
return values that are nullable numbers.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Replaced some existing bogus code to handle nullables with
new equally-bogus code that should be no worse and will compile.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Removed old support for nullables.
(NativeToJSValue): Added new support for nullable numbers.

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation): Removed support for nullables. We almost certainly
won't need it for Objective-C bindings.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated.
* bindings/scripts/test/JS/JSTestObj.cpp: Updated.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Updated.

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

4 years agoSplit platform-independent logic in AVCaptureDeviceManager out into a new class
wenson_hsieh@apple.com [Mon, 30 Nov 2015 23:48:42 +0000 (23:48 +0000)]
Split platform-independent logic in AVCaptureDeviceManager out into a new class
https://bugs.webkit.org/show_bug.cgi?id=151388
<rdar://problem/23593980>

Reviewed by Eric Carlson.

To prepare for creating a MockCaptureDeviceManager to be able to test
MediaDevices.getUserMedia, we create a platform-independent capture device manager
which all platforms should extend and add platform-specific logic to.

The methods CaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints and
CaptureDeviceManager::captureDeviceList should be overridden by each platform
CaptureDeviceManager to respectively create a RealtimeMediaSource and return a list of
capture devices. createMediaSourceForCaptureDeviceWithConstraints attempts to create
a media source for a given device with some constraints; if the contraints cannot be
satisfied, this returns null.

The refactored capture device manager also introduces the notion of a platform-
independent capture session which may be extended by platform device managers for
determining whether a given constraint name, value and media type is valid.

A platform-independent CaptureDeviceInfo now represents either the video or audio
component of a capture device, but not both at once. This means a capture device that
supports both video and audio will emit two separate capture devices.

No new tests, since there should be no behavior change.

* Modules/mediastream/CaptureDeviceInfo.h: Added.
(WebCore::CaptureSessionInfo::~CaptureSessionInfo):
(WebCore::CaptureSessionInfo::supportsVideoSize):
(WebCore::CaptureSessionInfo::bestSessionPresetForVideoDimensions):
* Modules/mediastream/CaptureDeviceManager.cpp: Added.
(CaptureDeviceManager::~CaptureDeviceManager):
(CaptureDeviceManager::getSourcesInfo):
(CaptureDeviceManager::captureDeviceFromDeviceID):
(CaptureDeviceManager::verifyConstraintsForMediaType):
(CaptureDeviceManager::bestSourcesForTypeAndConstraints):
(CaptureDeviceManager::sourceWithUID):
(CaptureDeviceManager::bestDeviceForFacingMode):
(facingModeFromString):
(CaptureDeviceManager::sessionSupportsConstraint):
(CaptureDeviceManager::isSupportedFrameRate):
* Modules/mediastream/CaptureDeviceManager.h: Added.
(WebCore::CaptureDeviceManager::refreshCaptureDeviceList):
(WebCore::CaptureDeviceManager::defaultCaptureSession):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Added.
(WebCore::RealtimeMediaSourceSupportedConstraints::nameForConstraint):
(WebCore::RealtimeMediaSourceSupportedConstraints::constraintFromName):
(WebCore::RealtimeMediaSourceSupportedConstraints::supportsConstraint):
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureSessionInfo::AVCaptureSessionInfo):
(WebCore::AVCaptureSessionInfo::supportsVideoSize):
(WebCore::AVCaptureSessionInfo::bestSessionPresetForVideoDimensions):
(WebCore::AVCaptureDeviceManager::captureDeviceList):
(WebCore::shouldConsiderDeviceInDeviceList):
(WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList):
(WebCore::AVCaptureDeviceManager::AVCaptureDeviceManager):
(WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
(WebCore::AVCaptureDeviceManager::sourceWithUID):
(WebCore::AVCaptureDeviceManager::getSourcesInfo):
(WebCore::AVCaptureDeviceManager::verifyConstraintsForMediaType):
(WebCore::AVCaptureDeviceManager::defaultCaptureSession):
(WebCore::AVCaptureDeviceManager::sessionSupportsConstraint):
(WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints):
(WebCore::AVCaptureDeviceManager::deviceDisconnected):
(WebCore::AVCaptureDeviceManager::isSupportedFrameRate):
(WebCore::CaptureDevice:::m_enabled): Deleted.
(WebCore::captureDeviceList): Deleted.
(WebCore::captureDeviceFromDeviceID): Deleted.
(WebCore::refreshCaptureDeviceList): Deleted.
(WebCore::AVCaptureDeviceManager::bestSessionPresetForVideoSize): Deleted.
(WebCore::AVCaptureDeviceManager::deviceSupportsFacingMode): Deleted.
(WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Deleted.
(WebCore::AVCaptureDeviceManager::isValidConstraint): Deleted.
(WebCore::AVCaptureDeviceManager::validConstraintNames): Deleted.
(WebCore::AVCaptureDeviceManager::validFacingModes): Deleted.
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::applyConstraints):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):

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

4 years agoWeb Inspector: show something useful when the inspector frontend fails to load
bburg@apple.com [Mon, 30 Nov 2015 23:27:23 +0000 (23:27 +0000)]
Web Inspector: show something useful when the inspector frontend fails to load
https://bugs.webkit.org/show_bug.cgi?id=151643

Reviewed by Timothy Hatcher.

When a parse error or other early error happens before the inspector
is fully loaded, we can't use the second-level inspector to tell what's
going on. It would be better to catch any early errors and list them.

This patch adds an error page that shows the early errors that happened
during loading. It provides a list of errors, a link to reload the
inspector, and a link to submit a pre-filled bug report about the error.

For now, this page only shows up in engineering builds because it's
located in the Debug/ directory. We can move it later when it works
better in all cases. Follow-up patches can address smaller issues,
such as the transparent title bar and broken text selection.

 * UserInterface/Debug/CatchEarlyErrors.css: Added.
 * UserInterface/Debug/CatchEarlyErrors.js: Added.
 * UserInterface/Main.html:
 * UserInterface/Main.js: Abort setting up the UI if something happened.

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

4 years agoSnippefy op_div for the baseline JIT.
mark.lam@apple.com [Mon, 30 Nov 2015 23:13:41 +0000 (23:13 +0000)]
Snippefy op_div for the baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=151607

Reviewed by Geoffrey Garen.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:

* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_div):
(JSC::JIT::emitSlow_op_div):
(JSC::JIT::compileBinaryArithOpSlowCase): Deleted.

* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emitBinaryDoubleOp):
(JSC::JIT::emit_op_div): Deleted.
(JSC::JIT::emitSlow_op_div): Deleted.
- Removed the 32-bit specific op_div implementation.  The 64-bit version with the
  op_div snippet can now service both 32-bit and 64-bit.

* jit/JITDivGenerator.cpp: Added.
(JSC::JITDivGenerator::loadOperand):
(JSC::JITDivGenerator::generateFastPath):
* jit/JITDivGenerator.h: Added.
(JSC::JITDivGenerator::JITDivGenerator):
(JSC::JITDivGenerator::didEmitFastPath):
(JSC::JITDivGenerator::endJumpList):
(JSC::JITDivGenerator::slowPathJumpList):

* jit/JITInlines.h:
(JSC::JIT::getOperandConstantDouble): Added.

* jit/SnippetOperand.h: Added.
(JSC::SnippetOperand::SnippetOperand):
(JSC::SnippetOperand::mightBeNumber):
(JSC::SnippetOperand::definitelyIsNumber):
(JSC::SnippetOperand::isConst):
(JSC::SnippetOperand::isConstInt32):
(JSC::SnippetOperand::isConstDouble):
(JSC::SnippetOperand::asRawBits):
(JSC::SnippetOperand::asConstInt32):
(JSC::SnippetOperand::asConstDouble):
(JSC::SnippetOperand::setConstInt32):
(JSC::SnippetOperand::setConstDouble):
- The SnippetOperand encapsulates operand constness, const type, and profiling
  information.  As a result:
  1. The argument list to the JITDivGenerator constructor is now more concise.
  2. The logic of the JITDivGenerator is now less verbose and easier to express.

* parser/ResultType.h:
(JSC::ResultType::isInt32):
(JSC::ResultType::definitelyIsNumber):
(JSC::ResultType::definitelyIsString):
(JSC::ResultType::definitelyIsBoolean):
(JSC::ResultType::mightBeNumber):
(JSC::ResultType::isNotNumber):
- Made these functions const because they were always meant to be const.
  This also allows me to enforce constness in the SnippetOperand.

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

4 years agoFix the graphics benchmark complexity bounds adjustment
commit-queue@webkit.org [Mon, 30 Nov 2015 23:06:27 +0000 (23:06 +0000)]
Fix the graphics benchmark complexity bounds adjustment
https://bugs.webkit.org/show_bug.cgi?id=151670

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-30
Reviewed by Simon Fraser.

Make sure the graphics benchmark complexity bounds adjustment is applied
to the absolute lower bound.

* Animometer/tests/resources/math.js:
(PIDController.prototype._saturate):

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

4 years agoGet rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
timothy_horton@apple.com [Mon, 30 Nov 2015 23:06:17 +0000 (23:06 +0000)]
Get rid of the !USE(ASYNC_NSTEXTINPUTCLIENT) codepath
https://bugs.webkit.org/show_bug.cgi?id=151673

Reviewed by Anders Carlsson.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::resignFirstResponder): Deleted.
(WebKit::WebViewImpl::interpretKeyEvent): Deleted.
(WebKit::WebViewImpl::executeSavedKeypressCommands): Deleted.
(WebKit::WebViewImpl::doCommandBySelector): Deleted.
(WebKit::WebViewImpl::insertText): Deleted.
(WebKit::WebViewImpl::inputContext): Deleted.
(WebKit::WebViewImpl::selectedRange): Deleted.
(WebKit::WebViewImpl::hasMarkedText): Deleted.
(WebKit::WebViewImpl::unmarkText): Deleted.
(WebKit::WebViewImpl::setMarkedText): Deleted.
(WebKit::WebViewImpl::markedRange): Deleted.
(WebKit::WebViewImpl::attributedSubstringForProposedRange): Deleted.
(WebKit::WebViewImpl::characterIndexForPoint): Deleted.
(WebKit::WebViewImpl::firstRectForCharacterRange): Deleted.
(WebKit::WebViewImpl::performKeyEquivalent): Deleted.
(WebKit::WebViewImpl::keyUp): Deleted.
(WebKit::WebViewImpl::keyDown): Deleted.
(WebKit::WebViewImpl::flagsChanged): Deleted.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Deleted.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::notifyApplicationAboutInputContextChange): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition): Deleted.
(WebKit::WebPageProxy::confirmComposition): Deleted.
(WebKit::WebPageProxy::insertText): Deleted.
(WebKit::WebPageProxy::insertDictatedText): Deleted.
(WebKit::WebPageProxy::getMarkedRange): Deleted.
(WebKit::WebPageProxy::getSelectedRange): Deleted.
(WebKit::WebPageProxy::getAttributedSubstringFromRange): Deleted.
(WebKit::WebPageProxy::characterIndexForPoint): Deleted.
(WebKit::WebPageProxy::firstRectForCharacterRange): Deleted.
(WebKit::WebPageProxy::executeKeypressCommands): Deleted.
(WebKit::WebPageProxy::cancelComposition): Deleted.
(WebKit::WebPageProxy::editorStateChanged): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition): Deleted.
(WebKit::WebPage::confirmComposition): Deleted.
(WebKit::WebPage::insertText): Deleted.
(WebKit::WebPage::insertDictatedText): Deleted.
(WebKit::WebPage::getMarkedRange): Deleted.
(WebKit::WebPage::getSelectedRange): Deleted.
(WebKit::WebPage::getAttributedSubstringFromRange): Deleted.
(WebKit::WebPage::characterIndexForPoint): Deleted.
(WebKit::WebPage::firstRectForCharacterRange): Deleted.
(WebKit::WebPage::executeKeypressCommands): Deleted.
(WebKit::WebPage::cancelComposition): Deleted.

Source/WTF:

* wtf/Platform.h:

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

4 years agoModern IDB: Set the correct source on the IDBRequest for cursor updates
beidson@apple.com [Mon, 30 Nov 2015 23:02:00 +0000 (23:02 +0000)]
Modern IDB: Set the correct source on the IDBRequest for cursor updates
https://bugs.webkit.org/show_bug.cgi?id=151665

Reviewed by Andy Estes.

Source/WebCore:

No new tests (At least one existing failing test now passes).

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBClient::IDBObjectStore::putOrAdd):
* Modules/indexeddb/client/IDBObjectStoreImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::IDBRequest):
(WebCore::IDBClient::IDBRequest::setSource):
* Modules/indexeddb/client/IDBRequestImpl.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

4 years agoAdded a new theme and plugins for a redesigned webkit.org.
jond@apple.com [Mon, 30 Nov 2015 22:21:57 +0000 (22:21 +0000)]
Added a new theme and plugins for a redesigned webkit.org.

Reviewed by Timothy Hatcher.

* apple-touch-icon-precomposed.png: Added.
* code-style.md: Added.
* commit-review.md: Added.
* favicon.png: Added.
* security-policy.md: Added.
* tabicon.svg: Added.
* wp-content: Added.
* wp-content/index.php: Added.
* wp-content/maintenance.php: Added.
* wp-content/plugins: Added.
* wp-content/plugins/analytics.php: Added.
* wp-content/plugins/hyperlight: Added.
* wp-content/plugins/hyperlight/hyperlight: Added.
* wp-content/plugins/hyperlight/hyperlight.php: Added.
* wp-content/plugins/hyperlight/hyperlight/hyperlight.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/apache.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/blocklist.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/code.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/cpp.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/csharp.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/css.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/diff.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/filetypes: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/html.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/ini.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/iphp.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/javascript.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/php.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/python.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/syntax.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/vb.php: Added.
* wp-content/plugins/hyperlight/hyperlight/languages/xml.php: Added.
* wp-content/plugins/hyperlight/hyperlight/preg_helper.php: Added.
* wp-content/plugins/index.php: Added.
* wp-content/plugins/social-meta.php: Added.
* wp-content/plugins/table-of-contents.php: Added.
* wp-content/plugins/visual-preview.php: Added.
* wp-content/themes: Added.
* wp-content/themes/index.php: Added.
* wp-content/themes/webkit: Added.
* wp-content/themes/webkit/404.php: Added.
* wp-content/themes/webkit/444.php: Added.
* wp-content/themes/webkit/footer.php: Added.
* wp-content/themes/webkit/front-header.php: Added.
* wp-content/themes/webkit/front-page.php: Added.
* wp-content/themes/webkit/functions.php: Added.
* wp-content/themes/webkit/header.php: Added.
* wp-content/themes/webkit/images: Added.
* wp-content/themes/webkit/images/download.svg: Added.
* wp-content/themes/webkit/images/icons.svg: Added.
* wp-content/themes/webkit/images/inspector.svg: Added.
* wp-content/themes/webkit/images/menu-down.svg: Added.
* wp-content/themes/webkit/images/squirrelfish-lives.svg: Added.
* wp-content/themes/webkit/images/twitter.svg: Added.
* wp-content/themes/webkit/images/webkit.svg: Added.
* wp-content/themes/webkit/includes.php: Added.
* wp-content/themes/webkit/index.php: Added.
* wp-content/themes/webkit/loop.php: Added.
* wp-content/themes/webkit/nightly.php: Added.
* wp-content/themes/webkit/page.php: Added.
* wp-content/themes/webkit/scripts: Added.
* wp-content/themes/webkit/scripts/global.js: Added.
* wp-content/themes/webkit/single.php: Added.
* wp-content/themes/webkit/sitemap.php: Added.
* wp-content/themes/webkit/status.php: Added.
* wp-content/themes/webkit/style.css: Added.
* wp-content/themes/webkit/team.php: Added.
* wp-content/themes/webkit/widgets: Added.
* wp-content/themes/webkit/widgets/icon.php: Added.
* wp-content/themes/webkit/widgets/page.php: Added.
* wp-content/themes/webkit/widgets/post.php: Added.
* wp-content/themes/webkit/widgets/twitter.php: Added.

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

4 years agoFix coding style of Intl code
sukolsak@gmail.com [Mon, 30 Nov 2015 22:21:18 +0000 (22:21 +0000)]
Fix coding style of Intl code
https://bugs.webkit.org/show_bug.cgi?id=151491

Reviewed by Darin Adler.

This patch does three things:
1. Rename pointers and references to ExecState from "exec" to "state".
2. Pass parameters by references instead of pointers if the parameters
   are required.
3. Remove the word "get" from the names of functions that don't return
   values through out arguments.

* runtime/IntlCollator.cpp:
(JSC::IntlCollatorFuncCompare):
* runtime/IntlCollatorConstructor.cpp:
(JSC::initializeCollator):
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::IntlCollatorConstructor::getOwnPropertySlot):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormatFuncFormatDateTime):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructor::getOwnPropertySlot):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatPrototype::getOwnPropertySlot):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormatFuncFormatNumber):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
(JSC::IntlNumberFormatConstructor::getOwnPropertySlot):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatPrototype::getOwnPropertySlot):
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::intlBooleanOption):
(JSC::intlStringOption):
(JSC::privateUseLangTag):
(JSC::canonicalLangTag):
(JSC::grandfatheredLangTag):
(JSC::canonicalizeLanguageTag):
(JSC::canonicalizeLocaleList):
(JSC::lookupSupportedLocales):
(JSC::bestFitSupportedLocales):
(JSC::supportedLocales):
(JSC::getIntlBooleanOption): Deleted.
(JSC::getIntlStringOption): Deleted.
(JSC::getPrivateUseLangTag): Deleted.
(JSC::getCanonicalLangTag): Deleted.
(JSC::getGrandfatheredLangTag): Deleted.
* runtime/IntlObject.h:

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

4 years agoGet rid of the legacy TextIndicatorWindow style
timothy_horton@apple.com [Mon, 30 Nov 2015 22:19:09 +0000 (22:19 +0000)]
Get rid of the legacy TextIndicatorWindow style
https://bugs.webkit.org/show_bug.cgi?id=151674

Reviewed by Anders Carlsson.

* page/TextIndicator.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.

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

4 years agoRemove some unused synchronous drawing SPI
timothy_horton@apple.com [Mon, 30 Nov 2015 22:17:58 +0000 (22:17 +0000)]
Remove some unused synchronous drawing SPI
https://bugs.webkit.org/show_bug.cgi?id=151672

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView forceAsyncDrawingAreaSizeUpdate:]): Deleted.
(-[WKView waitForAsyncDrawingAreaSizeUpdate]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate): Deleted.
(WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate): Deleted.

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

4 years agoAdd an option to select the results form the graphics benchmark
commit-queue@webkit.org [Mon, 30 Nov 2015 22:15:27 +0000 (22:15 +0000)]
Add an option to select the results form the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151666

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-30
Reviewed by Ryosuke Niwa.

We need an easy way to select the graphics benchmark results table such
that when it is copied to the clipboard, rich text format is set to the
clipboard.

* Animometer/runner/animometer.html: Add a new button to select the results table or JSON.

* Animometer/runner/resources/animometer.js:
(window.sectionsManager._sectionDataElement): Selects the container <data> element.
(window.sectionsManager._sectionDataDivElement): Replace a literal string with a string table entry.
(window.sectionsManager.showTestName): Replace a literal string with a string table entry.
(window.sectionsManager.selectData): Selects the container <data> element in a selection.
(window.sectionsManager.selectDataContents): Select the contents of container <data> element in a selection.
(window.benchmarkController.selectResults): Selects the results table.
(window.benchmarkController.showJSON): Function rename.
(window.benchmarkController.selectJSON): Selects the contents of the results JSON.
(window.benchmarkController.showJson): Deleted.

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

4 years agoMarking fast/forms/state-restore-per-form.html as a flaky timeout on mac-wk2
ryanhaddad@apple.com [Mon, 30 Nov 2015 22:15:18 +0000 (22:15 +0000)]
Marking fast/forms/state-restore-per-form.html as a flaky timeout on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=150542

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years ago[JSC] Simplify the loop that remove useless Air instructions
benjamin@webkit.org [Mon, 30 Nov 2015 21:56:56 +0000 (21:56 +0000)]
[JSC] Simplify the loop that remove useless Air instructions
https://bugs.webkit.org/show_bug.cgi?id=151652

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-11-30
Reviewed by Andreas Kling.

* b3/air/AirEliminateDeadCode.cpp:
(JSC::B3::Air::eliminateDeadCode):
Use Vector's removeAllMatching() instead of custom code.

It is likely faster too since we remove few values and Vector
is good at doing that.

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