WebKit-https.git
5 years agoBuild fix after r193661.
achristensen@apple.com [Tue, 8 Dec 2015 00:59:17 +0000 (00:59 +0000)]
Build fix after r193661.

Reviewed by Beth Dakin.

* WebView/WebViewData.h:

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

5 years agoCRASH: CodeBlock::setOptimizationThresholdBasedOnCompilationResult + 567
msaboff@apple.com [Tue, 8 Dec 2015 00:31:49 +0000 (00:31 +0000)]
CRASH: CodeBlock::setOptimizationThresholdBasedOnCompilationResult + 567
https://bugs.webkit.org/show_bug.cgi?id=151892

Reviewed by Geoffrey Garen.

Reverted the change made in change set r193491.

The updated change is to finish all concurrent compilations and install the resulting
code blocks before we make any state changes due to debugger activity.  After all code
blocks have been installed, we make the debugger state changes, including jettisoning
all optimized code blocks.

This means that we will discard the optimized code blocks we just installed,
but we won't do that while on the install code block path.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Reverted r193491.
* debugger/Debugger.cpp:
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
Call Heap::completeAllDFGPlans() before updating code blocks for debugging changes.

* heap/Heap.h: Made completeAllDFGPlans() public.

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

5 years agoUnreviewed, rolling out r193655.
commit-queue@webkit.org [Tue, 8 Dec 2015 00:22:16 +0000 (00:22 +0000)]
Unreviewed, rolling out r193655.
https://bugs.webkit.org/show_bug.cgi?id=151970

This change broke existing LayoutTests on mac-wk2 (Requested
by ryanhaddad on #webkit).

Reverted changeset:

"UIProcess should determine AppNap state for WebPage"
https://bugs.webkit.org/show_bug.cgi?id=151964
http://trac.webkit.org/changeset/193655

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

5 years ago[Mac] Remove Mavericks-specific TestExpectations lines
mmaxfield@apple.com [Tue, 8 Dec 2015 00:08:56 +0000 (00:08 +0000)]
[Mac] Remove Mavericks-specific TestExpectations lines
https://bugs.webkit.org/show_bug.cgi?id=151913

Reviewed by Alexey Proskuryakov.

Mavericks is no longer a supported OS.

* platform/mac/TestExpectations:

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

5 years agoFTL lowering should tell B3 the right block frequencies
fpizlo@apple.com [Tue, 8 Dec 2015 00:02:09 +0000 (00:02 +0000)]
FTL lowering should tell B3 the right block frequencies
https://bugs.webkit.org/show_bug.cgi?id=151531

Reviewed by Geoffrey Garen.

This glues together the DFG's view of basic block execution counts and B3's block frequencies.
This further improves our performance on imaging-gaussian-blur. It appears to improve the steady
state throughput by almost 4%.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::newBlock):
(JSC::FTL::Output::insertNewBlocksBefore):
(JSC::FTL::Output::callWithoutSideEffects):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBlock):
* ftl/FTLOutput.h:
(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::insertNewBlocksBefore):

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

5 years agoAdd support for WebViewAdditions
bdakin@apple.com [Mon, 7 Dec 2015 23:47:56 +0000 (23:47 +0000)]
Add support for WebViewAdditions
https://bugs.webkit.org/show_bug.cgi?id=151967

Reviewed by Sam Weinig.

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::respondToChangedSelection):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView updateWebViewAdditions]):
* WebView/WebViewData.h:
* WebView/WebViewInternal.h:

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

5 years agoModern IDB: Miscellaneous test cleanup.
beidson@apple.com [Mon, 7 Dec 2015 23:43:38 +0000 (23:43 +0000)]
Modern IDB: Miscellaneous test cleanup.
https://bugs.webkit.org/show_bug.cgi?id=151968

Reviewed by Sam Weinig.

- Reorganize TestExpectations a bit.
- Remove two tests that primarily test features that have been removed from the spec.

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/cursor-continueprimarykey-expected.txt: Removed.
* storage/indexeddb/cursor-continueprimarykey.html: Removed.
* storage/indexeddb/factory-basics-expected.txt: Removed.
* storage/indexeddb/factory-basics.html: Removed.
* storage/indexeddb/resources/cursor-continueprimarykey.js: Removed.
* storage/indexeddb/resources/factory-basics.js: Removed.

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

5 years agoUpdate JSC feature list for rest parameters and generators
sbarati@apple.com [Mon, 7 Dec 2015 23:15:54 +0000 (23:15 +0000)]
Update JSC feature list for rest parameters and generators
https://bugs.webkit.org/show_bug.cgi?id=151740

Reviewed by Joseph Pecoraro.

* features.json:

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

5 years agoModern IDB: storage/indexeddb/factory-deletedatabase.html fails.
beidson@apple.com [Mon, 7 Dec 2015 23:12:50 +0000 (23:12 +0000)]
Modern IDB: storage/indexeddb/factory-deletedatabase.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151966
Source/WebCore:

Reviewed by Sam Weinig.

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

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onDeleteDatabaseSuccess): The spec says that the result of
  deleteDatabase should be undefined. Without explicitly making it undefined, it's incorrectly null.

LayoutTests:

Reviewed by Sam Weinig.

* platform/mac-wk1/TestExpectations:

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

5 years agoModern IDB: storage/indexeddb/cursor-continue-validity.html fails.
beidson@apple.com [Mon, 7 Dec 2015 23:07:03 +0000 (23:07 +0000)]
Modern IDB: storage/indexeddb/cursor-continue-validity.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151961

Reviewed by Alex Christensen.

Source/WebCore:

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

When an index cursor's iterator was invalidated, there were some cases where it did
not correctly find the next iterator to pick up where it left off.

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

* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::find):
(WebCore::IDBServer::IndexValueStore::loggingString):
* Modules/indexeddb/server/IndexValueStore.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/cursor-finished-expected.txt:

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

5 years agoRefactor TextPainter::paintText() into sub methods.
zalan@apple.com [Mon, 7 Dec 2015 23:01:13 +0000 (23:01 +0000)]
Refactor TextPainter::paintText() into sub methods.
https://bugs.webkit.org/show_bug.cgi?id=151962

Reviewed by Myles C. Maxfield.

No change in functionality.

* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextWithEmphasisIfNeeded):
(WebCore::TextPainter::paintTextWithStyle):
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:

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

5 years agoUIProcess should determine AppNap state for WebPage
barraclough@apple.com [Mon, 7 Dec 2015 22:52:07 +0000 (22:52 +0000)]
UIProcess should determine AppNap state for WebPage
https://bugs.webkit.org/show_bug.cgi?id=151964

Reviewed by Anders Carlson.

Step 1 in unifying this with the iOS process suppression mechanism is to move the decision out of the WebContent process.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::setPageActivityState):
(WebKit::WebPageProxy::updateActivityToken):
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isInWindow):
(WebKit::WebPageProxy::didUpdateViewState):
* UIProcess/WebPageProxy.messages.in:
    - WebPage now propagates PageActivityState to the WebPageProxy, for use
      determining the supression state of the WebProcess.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::setPageActivityState):
(WebKit::WebPage::setUserActivityStarted):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::updatePreferences):
(WebKit::WebPage::updateUserActivity): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
    - WebPage no longer determines when to update it's own UserActivity - instead,
      let the UI process do so. As such, no longer need to track whether process
      supression is enabled. Instead, add message to

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

5 years ago[WK2] Regression(r187691): If a page is showing an auth pane in one tab, any new...
cdumez@apple.com [Mon, 7 Dec 2015 22:44:33 +0000 (22:44 +0000)]
[WK2] Regression(r187691): If a page is showing an auth pane in one tab, any new tabs with same page hang until credentials are entered in first tab
https://bugs.webkit.org/show_bug.cgi?id=151960
<rdar://problem/23618112>

Reviewed by Alex Christensen.

After r187691, if a page is showing an auth pane in one tab, any new
tabs with same page hang until credentials are entered in first tab.
This is because we coalescing all authentication challenges from the
same domain, no matter what tab they are for. This can be confusing
so we now only coalesce authentication challenges within each tab,
by leveraging the pageID (in addition to the domain).

* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Authentication/AuthenticationManager.h:

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

5 years agoDFG ASSERTION FAILED: m_plan.weakReferences.contains(structure).
fpizlo@apple.com [Mon, 7 Dec 2015 22:32:27 +0000 (22:32 +0000)]
DFG ASSERTION FAILED: m_plan.weakReferences.contains(structure).
https://bugs.webkit.org/show_bug.cgi?id=151952

Reviewed by Mark Lam.

Fix a bug revealed by the new ftl-has-a-bad-time.js test. It turns out that our handling of
structures reachable from the compiler wasn't accounting for having a bad time.

* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run):

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

5 years ago[GTK] Clean up virtual functions in MediaPlayerPrivateGStreamerBase
yoon@igalia.com [Mon, 7 Dec 2015 22:23:19 +0000 (22:23 +0000)]
[GTK] Clean up virtual functions in MediaPlayerPrivateGStreamerBase
https://bugs.webkit.org/show_bug.cgi?id=151940

Reviewed by Carlos Garcia Campos.

- Using 'override' when appropriate
- Explicitly marking methods as virtual when they are inherently virtual

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

5 years agoUpdate options for benchmark
jonlee@apple.com [Mon, 7 Dec 2015 22:14:25 +0000 (22:14 +0000)]
Update options for benchmark
https://bugs.webkit.org/show_bug.cgi?id=151956

Reviewed by Simon Fraser.

Move "Fix test complexity" and "Adaptive" checkboxes into a radio group.

Move "Show running results" into a radio group, and add options to remove the HUD.

* Animometer/runner/animometer.html: Get rid of the preamble. Wrap the options
in a form for easier referencing in JS.
* Animometer/runner/resources/animometer.css: Show the surrounding border if the
body's display-minimal class name is set.
* Animometer/runner/resources/animometer.js:

Update the way optionsManager gets and sets default values. Include support for
radio groups.
(window.optionsManager.valueForOption):
(window.optionsManager.updateUIFromLocalStorage):
(window.optionsManager.updateLocalStorageFromUI):

(window.benchmarkRunnerClient.willStartFirstIteration):
(window.sectionsManager.setupRunningSectionStyle):
(window.suitesManager._treeElement): Fly-by whitespace fix.
(window.suitesManager._suitesElements): Ditto.
(window.suitesManager.updateEditsElementsState): Update options check.
(window.suitesManager.updateDisplay): Add a new update function for the HUD.
Attach a class to the body depending on the user's choice.
(window.benchmarkController.initialize): Add an event listener when the form
radio buttons update.
(window.benchmarkController.onFormChanged):
(window.optionsManager._optionsElements): Deleted.
(window.optionsManager._adaptiveTestElement): Deleted.
(window.benchmarkController.onChangeAdaptiveTestCheckbox): Deleted.
* Animometer/tests/resources/main.js:
(Benchmark.prototype.update): Update options checks.
* Animometer/tests/resources/stage.js: Update option check.
(StageBenchmark.prototype.showResults):

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

5 years agoAdd op_watchdog opcode that is generated when VM has a watchdog
sbarati@apple.com [Mon, 7 Dec 2015 22:03:48 +0000 (22:03 +0000)]
Add op_watchdog opcode that is generated when VM has a watchdog
https://bugs.webkit.org/show_bug.cgi?id=151954

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch also makes watchdog a private member
of VM and adds a getter function.

* API/JSContextRef.cpp:
(JSContextGroupClearExecutionTimeLimit):
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitLoopHint):
(JSC::BytecodeGenerator::emitWatchdog):
(JSC::BytecodeGenerator::retrieveLastBinaryOp):
* bytecompiler/BytecodeGenerator.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckWatchdogTimer):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_watchdog):
(JSC::JIT::emitSlow_op_watchdog):
(JSC::JIT::emit_op_new_regexp):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* runtime/VM.cpp:
(JSC::VM::ensureWatchdog):
* runtime/VM.h:
(JSC::VM::watchdog):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
* runtime/VMInlines.h:
(JSC::VM::shouldTriggerTermination):

Source/WebCore:

No new tests because JSC already has tests for this.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::scheduleExecutionTermination):
(WebCore::WorkerScriptController::isTerminatingExecution):

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

5 years agoCrashes on PPC64 due to mprotect() on address not aligned to the page size
berto@igalia.com [Mon, 7 Dec 2015 21:35:02 +0000 (21:35 +0000)]
Crashes on PPC64 due to mprotect() on address not aligned to the page size
https://bugs.webkit.org/show_bug.cgi?id=130237

Reviewed by Mark Lam.

Make sure that commitSize is at least as big as the page size.

* interpreter/JSStack.cpp:
(JSC::commitSize):
(JSC::JSStack::JSStack):
(JSC::JSStack::growSlowCase):
* interpreter/JSStack.h:

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

5 years agoFix internal Windows build
achristensen@apple.com [Mon, 7 Dec 2015 21:09:55 +0000 (21:09 +0000)]
Fix internal Windows build
https://bugs.webkit.org/show_bug.cgi?id=151950

Reviewed by Brent Fulgham.

* Source/cmake/tools/scripts/auto-version.pl:

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

5 years agoWeb Inspector: Uncaught Exception page should have better styles and handle more...
bburg@apple.com [Mon, 7 Dec 2015 20:57:35 +0000 (20:57 +0000)]
Web Inspector: Uncaught Exception page should have better styles and handle more error cases
https://bugs.webkit.org/show_bug.cgi?id=151923

Reviewed by Timothy Hatcher.

Source/WebCore:

Add a check for InspectorFrontendAPI before calling it. This can fail
easily if an uncaught exception stalls initial loading, or whenever
the Inspector frontend is reloaded.

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

Source/WebInspectorUI:

Restructure the Uncaught Exception reporting page to act more like
a modal sheet. Distinguish between uncaught exceptions before and
after the frontend is initially loaded. If the frontend is loaded,
add a clickable link that dismisses the sheet and ignores the error.
If the inspector finished loading, then only show at most one
exception at a time, since subsequent interactions can cause spurious
errors when the sheet is active.

Split existing code into multiple functions so it's easier to follow.
Add miscellaneous guards against internal corruption and weird cases.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Store the flag on the global object
in case WebInspector becomes shadowed or otherwise unusable.

* UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css.
(div.sheet-container):
(div.uncaught-exception-sheet):
(div.uncaught-exception-sheet a):
(div.uncaught-exception-sheet a:active):
(div.uncaught-exception-sheet h2):
(div.uncaught-exception-sheet h1 > img):
(div.uncaught-exception-sheet h2 > img):
(div.uncaught-exception-sheet dl):
(div.uncaught-exception-sheet dt):
(div.uncaught-exception-sheet dd):
(div.uncaught-exception-sheet ul):
(div.uncaught-exception-sheet li):
* UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js.
(stopEventPropagation): Allow clicking whitelisted links on the sheet.
(blockEventHandlers):
(unblockEventHandlers):
(handleUncaughtException):
(dismissErrorSheet):
(createErrorSheet.insertWordBreakCharacters):
(createErrorSheet):
(handleLinkClick):
* UserInterface/Main.html:
* UserInterface/Protocol/MessageDispatcher.js:
(WebInspector.dispatchMessageFromBackend): Don't try to dispatch
messages from the backend when showing the error sheet. They will
probably fail, so suspend dispatching until the sheet is dismissed.

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

5 years agoHook up request and show for typing candidates in WK1
bdakin@apple.com [Mon, 7 Dec 2015 20:37:03 +0000 (20:37 +0000)]
Hook up request and show for typing candidates in WK1
https://bugs.webkit.org/show_bug.cgi?id=151831
-and corresponding-
<rdar://problem/23751214>

Reviewed by Enrica Casucci.

Source/WebCore:

New SPI that is needed.
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSSpellCheckerSPI.h: Added.

Request candidates for editable content whenever selection changes.
* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection):

Implement requestCandidatesForSelection on the EditorClient.
* loader/EmptyClients.h:
* page/EditorClient.h:
(WebCore::EditorClient::requestCandidatesForSelection):

Source/WebKit/mac:

Add member variables to WebEditorClient. One is a WeakPtrFactory for the
asynchronous handlers, and the other caches the VisibleSelection at the time
candidates were requested so that we can make sure the candidates are still
valid once we receive them.
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::WebEditorClient):

Call [NSSpellChecker requestCandidatesForSelectedRange] with the appropriate
parameters.
(WebEditorClient::requestCandidatesForSelection):

Two helpers to compute information that we need for both of the handlers
below.
(candidateRangeForSelection):
(candidateWouldReplaceText):

In this handler, we just need to call [NSSpellChecker showCandidates] with
the appropriate parameters.
(WebEditorClient::handleRequestedCandidates):

Once a candidate is accepted, it should be inserted in the right way.
(WebEditorClient::handleAcceptedCandidate):

Source/WebKit2:

Empty client for now.
* WebProcess/WebCoreSupport/WebEditorClient.h:

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

5 years ago[Streams API] pipeTo tests are failing
calvaris@igalia.com [Mon, 7 Dec 2015 20:35:09 +0000 (20:35 +0000)]
[Streams API] pipeTo tests are failing
https://bugs.webkit.org/show_bug.cgi?id=151949

Unreviewed.

* TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations: Moved the flag from Mac and Win to general as GTK+ is failing too.

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

5 years agoModern IDB: Fix "old versions" when upgrading databases.
beidson@apple.com [Mon, 7 Dec 2015 20:27:37 +0000 (20:27 +0000)]
Modern IDB: Fix "old versions" when upgrading databases.
https://bugs.webkit.org/show_bug.cgi?id=151948

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (5 failing tests now pass, and updated results for a 6th test).

This includes the old version on the IDBVersionChangeEvent, as well as the version the
IDBDatabase is left with if the version change transaction is aborted.

Primary mechanism of the fix is to include the original IDBDatabaseInfo along with
IDBTransactionInfos that represent version change transactions.

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

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction): Deleted.
(WebCore::IDBClient::IDBTransaction::finishAbortOrCommit): Deleted.
* Modules/indexeddb/client/IDBTransactionImpl.h:
(WebCore::IDBClient::IDBTransaction::info):
(WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):

* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::versionChange):
(WebCore::IDBTransactionInfo::IDBTransactionInfo):
(WebCore::IDBTransactionInfo::isolatedCopy):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::originalDatabaseInfo):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/database-basics-expected.txt:
* storage/indexeddb/modern/deletedatabase-2-expected.txt:

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

5 years agoAddress UX issues with the Contribute menu.
jond@apple.com [Mon, 7 Dec 2015 19:48:37 +0000 (19:48 +0000)]
Address UX issues with the Contribute menu.
https://bugs.webkit.org/show_bug.cgi?id=151874

Reviewed by Timothy Hatcher.

* wp-content/themes/webkit/functions.php:
* wp-content/themes/webkit/header.php:
* wp-content/themes/webkit/style.css:
(time, mark, audio, video):
(footer, header, hgroup, menu, nav, section):
(html):
(body):
(ol, ul):
(blockquote, q):
(q:before, q:after):
(table):
(p:empty):
(.admin-bar p > a[name]::before):
(.screen-reader-text):
(.screen-reader-text:focus):
(pre):
(code):
(.feature-header:after):
(.feature.opened .feature-header:after):
(footer nav a:hover):
(header .menu-item-has-children .label-toggle::after):
(header .menu-item):
(.sub-menu-layer):
(.sub-menu-layer .menu-item:first-child):
(.menu > .menu-item > .menu-toggle:checked + .sub-menu):
(@media only screen and (max-width: 920px)):
(header .menu-item > .menu-toggle:checked + a > .label-toggle::after):
(header .menu):
(header .menu-toggle:checked ~ ul):
(header .sub-menu-layer:before):
(header .menu > .menu-item > .menu-toggle:checked ~ .sub-menu):
(footer nav li):
(@media only screen and (max-width: 690px)):
(.feature-filters:after):
(.feature-filters.opened:after):
(#wpadminbar):
(.table-of-contents label:after):
(.menu-toggle:checked ~ .table-of-contents label:after):
(.table-of-contents h6):
(header nav .menu-item-has-children .label-toggle): Deleted.
(header nav .menu-item): Deleted.
(header .menu > .menu-item-has-children:hover > a::before): Deleted.
(.menu > .menu-item > .menu-toggle:checked ~ .sub-menu): Deleted.
(header nav .menu-toggle:checked ~ ul): Deleted.
(header .menu-toggle:checked ~ .sub-menu): Deleted.
(@media only screen and (max-width: 782px)): Deleted.

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

5 years agoUnreviewed.
calvaris@igalia.com [Mon, 7 Dec 2015 19:21:30 +0000 (19:21 +0000)]
Unreviewed.

http://webkit.org/b/147933 and though count queuing strategy and writable stream abort tests are fixed, there
are still issues with pipeTo. For that I created http://webkit.org/b/151949.

* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

5 years agoFTL B3 should be able to make JS->JS calls
fpizlo@apple.com [Mon, 7 Dec 2015 19:17:56 +0000 (19:17 +0000)]
FTL B3 should be able to make JS->JS calls
https://bugs.webkit.org/show_bug.cgi?id=151901

Reviewed by Saam Barati.

This adds support for the Call and InvalidationPoint opcodes in DFG IR. This required doing some
clean-up in the OSR exit code. We don't want the B3 FTL to use a bunch of vectors to hold
side-state, so the use of OSRExitDescriptorImpl is not right. It makes sense in the LLVM FTL
because that code needs some way of saving some state from LowerDFGToLLVM to compile(), but
that's not how B3 FTL works. It turns out that for B3 FTL, there isn't anything in
OSRExitDescriptorImpl that the code in LowerDFGToLLVM can't just capture in a lambda.

This also simplifies some stackmap-related APIs, since I got tired of writing boilerplate.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::replaceWithAddressComputation):
(JSC::AbstractMacroAssembler::addLinkTask):
* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::generate):
* b3/B3Effects.h:
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::generate):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::addDataSection):
(JSC::B3::Procedure::callArgAreaSize):
(JSC::B3::Procedure::requestCallArgAreaSize):
(JSC::B3::Procedure::frameSize):
* b3/B3Procedure.h:
(JSC::B3::Procedure::releaseByproducts):
(JSC::B3::Procedure::code):
* b3/B3StackmapGenerationParams.cpp: Added.
(JSC::B3::StackmapGenerationParams::usedRegisters):
(JSC::B3::StackmapGenerationParams::proc):
(JSC::B3::StackmapGenerationParams::StackmapGenerationParams):
* b3/B3StackmapGenerationParams.h: Added.
(JSC::B3::StackmapGenerationParams::value):
(JSC::B3::StackmapGenerationParams::reps):
(JSC::B3::StackmapGenerationParams::size):
(JSC::B3::StackmapGenerationParams::at):
(JSC::B3::StackmapGenerationParams::operator[]):
(JSC::B3::StackmapGenerationParams::begin):
(JSC::B3::StackmapGenerationParams::end):
(JSC::B3::StackmapGenerationParams::context):
(JSC::B3::StackmapGenerationParams::addLatePath):
* b3/B3StackmapValue.h:
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::doubleValue):
(JSC::B3::ValueRep::withOffset):
* b3/air/AirGenerationContext.h:
* b3/testb3.cpp:
(JSC::B3::testSimplePatchpoint):
(JSC::B3::testSimplePatchpointWithoutOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersGPArgs):
(JSC::B3::testSimplePatchpointWithoutOuputClobbersFPArgs):
(JSC::B3::testSimplePatchpointWithOuputClobbersFPArgs):
(JSC::B3::testPatchpointWithEarlyClobber):
(JSC::B3::testPatchpointCallArg):
(JSC::B3::testPatchpointFixedRegister):
(JSC::B3::testPatchpointAny):
(JSC::B3::testPatchpointLotsOfLateAnys):
(JSC::B3::testPatchpointAnyImm):
(JSC::B3::testPatchpointManyImms):
(JSC::B3::testPatchpointWithRegisterResult):
(JSC::B3::testPatchpointWithStackArgumentResult):
(JSC::B3::testPatchpointWithAnyResult):
(JSC::B3::testSimpleCheck):
(JSC::B3::testCheckLessThan):
(JSC::B3::testCheckMegaCombo):
(JSC::B3::testCheckAddImm):
(JSC::B3::testCheckAddImmCommute):
(JSC::B3::testCheckAddImmSomeRegister):
(JSC::B3::testCheckAdd):
(JSC::B3::testCheckAdd64):
(JSC::B3::testCheckSubImm):
(JSC::B3::testCheckSubBadImm):
(JSC::B3::testCheckSub):
(JSC::B3::testCheckSub64):
(JSC::B3::testCheckNeg):
(JSC::B3::testCheckNeg64):
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul2):
(JSC::B3::testCheckMul64):
(JSC::B3::genericTestCompare):
* ftl/FTLExceptionHandlerManager.cpp:
* ftl/FTLExceptionHandlerManager.h:
* ftl/FTLJSCall.cpp:
* ftl/FTLJSCall.h:
* ftl/FTLJSCallBase.cpp:
(JSC::FTL::JSCallBase::emit):
* ftl/FTLJSCallBase.h:
* ftl/FTLJSCallVarargs.cpp:
* ftl/FTLJSCallVarargs.h:
* ftl/FTLJSTailCall.cpp:
(JSC::FTL::DFG::getRegisterWithAddend):
(JSC::FTL::JSTailCall::emit):
(JSC::FTL::JSTailCall::JSTailCall): Deleted.
* ftl/FTLJSTailCall.h:
(JSC::FTL::JSTailCall::stackmapID):
(JSC::FTL::JSTailCall::estimatedSize):
(JSC::FTL::JSTailCall::operator<):
(JSC::FTL::JSTailCall::patchpoint): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::emitBranchToOSRExitIfWillCatchException):
(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::exitValueForNode):
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):
(JSC::FTL::OSRExitDescriptor::emitOSRExit):
(JSC::FTL::OSRExitDescriptor::emitOSRExitLater):
(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):
(JSC::FTL::OSRExit::OSRExit):
(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::recoverRegistersFromSpillSlot):
(JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck):
(JSC::FTL::OSRExit::needsRegisterRecoveryOnGenericUnwindOSRExitPath):
* ftl/FTLOSRExit.h:
(JSC::FTL::OSRExitDescriptorImpl::OSRExitDescriptorImpl):
(JSC::FTL::OSRExit::considerAddingAsFrequentExitSite):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLState.h:

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

5 years ago'jhbuild build' should fail immediately when building any module fails
mcatanzaro@igalia.com [Mon, 7 Dec 2015 18:54:33 +0000 (18:54 +0000)]
'jhbuild build' should fail immediately when building any module fails
https://bugs.webkit.org/show_bug.cgi?id=145697

Reviewed by Carlos Garcia Campos.

* efl/jhbuildrc: Update jhbuildrc to account for the removal of the use_lib64 option.
* gtk/jhbuildrc: Update jhbuildrc to account for the removal of the use_lib64 option.
Everything is placed under lib instead of lib64 now.
* jhbuild/jhbuild-wrapper: Update jhbuild to the latest upstream commit, and pass
--exit-on-error when running 'jhbuild build'.
* jhbuild/jhbuildrc_common.py:
(init): Don't override PKG_CONFIG_PATH, CMAKE_PREFIX_PATH, or CMAKE_LIBRARY_PATH. Modern
jhbuild should be able to handle these for us without breaking things....

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

5 years agoAdd support to import w3c tests from a repository with a different root that the...
calvaris@igalia.com [Mon, 7 Dec 2015 18:49:59 +0000 (18:49 +0000)]
Add support to import w3c tests from a repository with a different root that the main repo dir
https://bugs.webkit.org/show_bug.cgi?id=151751

Reviewed by Ryosuke Niwa and Youenn Fablet.

We should be able to import tests from repositories that are not pure test repositories and where tests are kept
in a different directory than the repository root.

This patch introduces a new parameter tests_directory that we will use as root directory to search for
tests. All paths will be flattened when copying tests to have a less complicated directory structure. This
requires having the copy_path lists including tuples of origin and destination directories.

* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader._add_test_suite_paths): Adds the paths as a tuple of origin and destination directory.
(TestDownloader.copy_tests): Uses the origin and destination tuple for the paths to copy when copying files.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_tests_directory): Test.

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

5 years agoUpdate Objective-C code generator to pass a reference to calling object for partial...
commit-queue@webkit.org [Mon, 7 Dec 2015 18:35:56 +0000 (18:35 +0000)]
Update Objective-C code generator to pass a reference to calling object for partial interfaces
https://bugs.webkit.org/show_bug.cgi?id=151739

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2015-12-07
Reviewed by Darin Adler.

The fix updates the Objective-C code generator to pass a reference to calling object for partial interfaces.
The change from pass by pointer to pass by reference was introduced in r192849.

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface supplementalStr1]):
(-[DOMTestInterface supplementalStr2]):
(-[DOMTestInterface setSupplementalStr2:]):
(-[DOMTestInterface supplementalStr3]):
(-[DOMTestInterface setSupplementalStr3:]):
(-[DOMTestInterface supplementalNode]):
(-[DOMTestInterface setSupplementalNode:]):
(-[DOMTestInterface builtinAttribute]):
(-[DOMTestInterface setBuiltinAttribute:]):
(-[DOMTestInterface supplementalMethod1]):
(-[DOMTestInterface supplementalMethod2:objArg:]):
(-[DOMTestInterface supplementalMethod3]):
(-[DOMTestInterface supplementalMethod4]):
(-[DOMTestInterface builtinFunction]):

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

5 years agoRename Watchdog::didFire to Watchdog::shouldTerminate because that's what didFire...
sbarati@apple.com [Mon, 7 Dec 2015 18:30:53 +0000 (18:30 +0000)]
Rename Watchdog::didFire to Watchdog::shouldTerminate because that's what didFire really meant
https://bugs.webkit.org/show_bug.cgi?id=151944

Reviewed by Mark Lam.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/VMInlines.h:
(JSC::VM::shouldTriggerTermination):
* runtime/Watchdog.cpp:
(JSC::Watchdog::terminateSoon):
(JSC::Watchdog::shouldTerminateSlow):
(JSC::Watchdog::didFireSlow): Deleted.
* runtime/Watchdog.h:
(JSC::Watchdog::shouldTerminate):
(JSC::Watchdog::didFire): Deleted.

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

5 years agoCrash in MemoryCache::pruneDeadResourcesToSize()
cdumez@apple.com [Mon, 7 Dec 2015 18:15:09 +0000 (18:15 +0000)]
Crash in MemoryCache::pruneDeadResourcesToSize()
https://bugs.webkit.org/show_bug.cgi?id=151833
<rdar://problem/22392235>

Reviewed by David Kilzer.

MemoryCache::pruneDeadResourcesToSize() is iterating over m_allResources
(which is a vector of LRUList). It first destroys decoded data for each
resource in the LRUList. Then, if it does not suffice to reach the
target size, and starts actually removing resources from the cache.

The issue is that this code alters m_allResources (and its LRULists) as
it is iterating over it. We tried to deal with this in various ways:
1. Increment the iterator before removing the resource pointed by the
  iterator.
2. Protect the next resource in the LRUList and abort early if it is no
  longer in the cache.

This adds code complexity and apparently does not correctly handle all
the edge cases as we still see crashes in this code. In particular, I
suspect that 2. may not be sufficient if it is possible for the next
resource to be moved to another LRUList (in which case, next->inCache()
would still return true but the iterator would however become invalid).

To make the code simpler and more robust, this patch copies the LRUList
(and refs the CachedResources) before iterating over it. This is a lot
safer and should hopefully fix the crashes we see in this function.

No new tests, no reproduction case.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneDeadResourcesToSize):

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

5 years ago[GTK][Mac] socketpair assertion failure
philn@webkit.org [Mon, 7 Dec 2015 18:02:14 +0000 (18:02 +0000)]
[GTK][Mac] socketpair assertion failure
https://bugs.webkit.org/show_bug.cgi?id=151293

Reviewed by Carlos Garcia Campos.

* Platform/IPC/unix/ConnectionUnix.cpp: Don't use SEQPACKET sockets on Darwin.

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

5 years agoRename JITBitwiseBinaryOpGenerator to JITBitBinaryOpGenerator.
mark.lam@apple.com [Mon, 7 Dec 2015 17:31:52 +0000 (17:31 +0000)]
Rename JITBitwiseBinaryOpGenerator to JITBitBinaryOpGenerator.
https://bugs.webkit.org/show_bug.cgi?id=151945

Reviewed by Saam Barati.

The lshift operator also need to inherit from JITBitBinaryOpGenerator.  Calling
it "BitBinaryOp" makes more sense than "BitwiseBinaryOp" in that case, and still
makes sense for the bitand, bitor, and bitxor operators.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emitBitBinaryOpFastPath):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emitSlow_op_bitand):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emitSlow_op_bitor):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emitSlow_op_bitxor):
(JSC::JIT::emitBitwiseBinaryOpFastPath): Deleted.
* jit/JITBitAndGenerator.h:
(JSC::JITBitAndGenerator::JITBitAndGenerator):
* jit/JITBitBinaryOpGenerator.h: Copied from Source/JavaScriptCore/jit/JITBitwiseBinaryOpGenerator.h.
(JSC::JITBitBinaryOpGenerator::JITBitBinaryOpGenerator):
(JSC::JITBitwiseBinaryOpGenerator::JITBitwiseBinaryOpGenerator): Deleted.
* jit/JITBitOrGenerator.h:
(JSC::JITBitOrGenerator::JITBitOrGenerator):
* jit/JITBitXorGenerator.h:
(JSC::JITBitXorGenerator::JITBitXorGenerator):
* jit/JITBitwiseBinaryOpGenerator.h: Removed.

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

5 years agoModern IDB: Add some more custom exception messages, passing some more tests..
beidson@apple.com [Mon, 7 Dec 2015 17:30:25 +0000 (17:30 +0000)]
Modern IDB: Add some more custom exception messages, passing some more tests..
https://bugs.webkit.org/show_bug.cgi?id=151912

Reviewed by Andy Estes.

Source/WebCore:

No new tests (Covered by existing tests).

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::index):
* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::objectStore):

LayoutTests:

* platform/mac-wk1/TestExpectations:

* storage/indexeddb/exceptions-expected.txt:
* storage/indexeddb/get-keyrange-expected.txt:
* storage/indexeddb/invalid-keys-expected.txt:
* storage/indexeddb/keypath-edges-expected.txt:
* storage/indexeddb/keyrange-expected.txt:
* storage/indexeddb/transaction-active-flag-expected.txt:
* storage/indexeddb/transaction-and-objectstore-calls-expected.txt:

* storage/indexeddb/resources/exceptions.js:
* storage/indexeddb/resources/transaction-and-objectstore-calls.js:

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

5 years ago[B3] Typo fix after r193386 to fix the build
ossy@webkit.org [Mon, 7 Dec 2015 17:28:57 +0000 (17:28 +0000)]
[B3] Typo fix after r193386 to fix the build
https://bugs.webkit.org/show_bug.cgi?id=151860

Reviewed by Filip Pizlo.

* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::isArgValidForValue):

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

5 years ago[ThreadedCompositor] Add support for PlatformLayer.
yoon@igalia.com [Mon, 7 Dec 2015 17:15:56 +0000 (17:15 +0000)]
[ThreadedCompositor] Add support for PlatformLayer.
https://bugs.webkit.org/show_bug.cgi?id=143299

Reviewed by Žan Doberšek.

Source/WebCore:

This patch implements TextureMapperPlatformLayerProxy and TextureMapperPlatformLayerBuffer to
send a texture (actual texture or BitmapTexture) to the compositing thread directly.
Platform layer renderers should implement TextureMapperPlatformLayerProxyProvider to establish
a connection to the compositing thread. After the connection has been established, the renderer
can render its contents to the TextureMapperPlatformLayerBuffer and pass it to the compositing thread
via TextureMapperPlatformLayer proxy.
The buffer can be an unmanaged texture (a.k.a. platform texture) or BitmapTexture.
For the unmanaged texture, the renderer should manage its life cycle itself. For the BitmapTexture,
it will be managed by TextureMapperPlatformLayerProxy. In that case, used (swapped) buffer will be
recycled because the renderer will use same size and format until it changes its size.

No new tests needed.

* PlatformGTK.cmake:
Adds TextureMapperPlatformLayerBuffer and TextureMapperPlaytformLayerProxy.

* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cairo/ImageBufferDataCairo.h:
Adds mock implementation.

* platform/graphics/PlatformLayer.h:
Adds TextureMapperPlatformLayerProxyProvider as a PlatformLayer for the Threaded Compositor

* platform/graphics/texmap/BitmapTextureGL.h:
(WebCore::BitmapTextureGL::internalFormat): Adds a getter to check the
internal format of texture to check reusability.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
* platform/graphics/texmap/TextureMapperLayer.h:
Exclude GraphicsLayerTextureMapper from build when we are using Coordinated Graphics.

* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: Added.
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: Added.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::GraphicsLayer::create):
Because we removed GraphicsLayerTextureMapper from build, we need to add own factory function.

(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::platformLayerWillBeDestroyed):
(WebCore::CoordinatedGraphicsLayer::setPlatformLayerNeedsDisplay):
Implements sync operations for TextureMapperPlatformLayerProxy

Source/WebKit2:

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
Swap pending buffers of TextureMapperPlatformLayerProxies before painting contents.
(WebKit::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
In threaded compositor, CoordinatedGraphicsScence only cares about creation and deletion
of platform layers.

(WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
Whenever new buffer comes via TextureMapperPlatformLayerProxy, CoordinatedGraphicsScene will
update the scene if it is needed.

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

5 years agoMarking fast/dom/Window/property-access-on-cached-window-after-frame-removed.html...
ryanhaddad@apple.com [Mon, 7 Dec 2015 17:12:18 +0000 (17:12 +0000)]
Marking fast/dom/Window/property-access-on-cached-window-after-frame-removed.html as failing on Win
https://bugs.webkit.org/show_bug.cgi?id=151759

Unreviewed test gardening.

* platform/win/TestExpectations:

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

5 years agoRemoving Yosemite flag from flaky test http/tests/cache/disk-cache/disk-cache-request...
ryanhaddad@apple.com [Mon, 7 Dec 2015 17:05:05 +0000 (17:05 +0000)]
Removing Yosemite flag from flaky test http/tests/cache/disk-cache/disk-cache-request-max-stale.html
https://bugs.webkit.org/show_bug.cgi?id=151661

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 years ago[EFL] Implement scheduleTimer and cancelTimer in IncrementalSweeper class
gyuyoung.kim@webkit.org [Mon, 7 Dec 2015 16:51:14 +0000 (16:51 +0000)]
[EFL] Implement scheduleTimer and cancelTimer in IncrementalSweeper class
https://bugs.webkit.org/show_bug.cgi?id=151656

Reviewed by Csaba Osztrogonác.

Support IncremntalSweeper using Ecore_Timer.

* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::cancelTimer):
* heap/IncrementalSweeper.h:

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

5 years ago[GTK] Allow applications to force Accelerated Compositing mode
commit-queue@webkit.org [Mon, 7 Dec 2015 16:24:01 +0000 (16:24 +0000)]
[GTK] Allow applications to force Accelerated Compositing mode
https://bugs.webkit.org/show_bug.cgi?id=150558

Patch by Mario Sanchez Prada <mario@endlessm.com> on 2015-12-07
Reviewed by Carlos Garcia Campos.

Enable forcing Accelerated Compositing mode to be always on if
a WEBKIT_FORCE_COMPOSITING_MODE environment variable is set.

This can be useful for controlled environments where we know that
AC always on works well enough, to get smoother animations.

* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore): Set forceCompositingMode
setting to true if the environment variable is found.

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

5 years agoUnreviewed EFL gardening. Mark some of blink tests to failure since r190629.
gyuyoung.kim@webkit.org [Mon, 7 Dec 2015 16:22:16 +0000 (16:22 +0000)]
Unreviewed EFL gardening. Mark some of blink tests to failure since r190629.

* platform/efl/TestExpectations:

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

5 years agoMock TestRepositories in W3C importer tests
calvaris@igalia.com [Mon, 7 Dec 2015 16:18:04 +0000 (16:18 +0000)]
Mock TestRepositories in W3C importer tests
https://bugs.webkit.org/show_bug.cgi?id=151938

Reviewed by Youenn Fablet.

The test importer tests should use a fake repository instead of using the real one. The reason why this happened
is because the test repository method reading the file was using the filesystem directly instead of taking the
host one. This patch changes that.

* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader.load_test_repositories): Take a filesystem and use it. If we get no filesystem, we use the
default one.
(TestDownloader.__init__): When loading the repositories, pass the host filesystem.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_harnesslinks_conversion):
(TestImporterTest.test_submodules_generation): Use a fake test repository file.

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

5 years agoTestNetscapePlugIn: Address review comment on r193607
ddkilzer@apple.com [Mon, 7 Dec 2015 13:49:41 +0000 (13:49 +0000)]
TestNetscapePlugIn: Address review comment on r193607
<http://webkit.org/b/151881>

* DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
(testSetStatus): Initializing std::unique_ptr<char[]> with
nullptr is redundant.

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

5 years ago[GTK] Add webkit_uri_request_get_http_method
commit-queue@webkit.org [Mon, 7 Dec 2015 12:36:18 +0000 (12:36 +0000)]
[GTK] Add webkit_uri_request_get_http_method
https://bugs.webkit.org/show_bug.cgi?id=151601

Source/WebKit2:

Patch by Jon Forsberg <jon.orebro@gmail.com> on 2015-12-07
Reviewed by Martin Robinson.

Add a method to get the HTTP method of a WebKitURIRequest.

* UIProcess/API/gtk/WebKitURIRequest.cpp:
(webkit_uri_request_get_http_method):
* UIProcess/API/gtk/WebKitURIRequest.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

Tools:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2015-12-07
Reviewed by Martin Robinson.

Add test case to check HTTP method of WebKitURIRequest.

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testURIRequestHTTPMethod):
(serverCallback):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(sendRequestCallback):

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

5 years agoFix GTK+ build with GStreamer GL
yoon@igalia.com [Mon, 7 Dec 2015 12:02:11 +0000 (12:02 +0000)]
Fix GTK+ build with GStreamer GL
https://bugs.webkit.org/show_bug.cgi?id=151939

Reviewed by Žan Doberšek.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

5 years ago[GTK] Add WebKitWebPage::console-message-sent signal to Web Extensions API
carlosgc@webkit.org [Mon, 7 Dec 2015 11:56:25 +0000 (11:56 +0000)]
[GTK] Add WebKitWebPage::console-message-sent signal to Web Extensions API
https://bugs.webkit.org/show_bug.cgi?id=79918

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

Add WebKitConsoleMessage boxed type that is passed to the
WebKitWebPage::console-message-sent signal with all the details
about the message.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk-4.0.types: Add webkit_console_message_get_type.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section to the docs.
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::willAddMessageToConsole): Add
paramaters for all console message details.
* WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp: Added.
(webkit_console_message_copy):
(webkit_console_message_free):
(webkit_console_message_get_source):
(webkit_console_message_get_level):
(webkit_console_message_get_text):
(webkit_console_message_get_line):
(webkit_console_message_get_source_id):
* WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessagePrivate.h: Added.
(_WebKitConsoleMessage::_WebKitConsoleMessage):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageDidSendConsoleMessage): Emit the
WebKitWebPage::console-message-sent signal.
(didReceiveResponseForResource): Generate a console message in
case of HTTP failure >= 400 for consistency with the inspector.
(didFailLoadForResource): Generate a console message in case of
resource load failure for consistency with the inspector.
(webkit_web_page_class_init): Add WebKitWebPage::console-message-sent signal.
(webkitWebPageCreate): Set custom UI client.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::addMessageToConsole): Pass all the
console message details to the ui client.

Tools:

Add unit tests to check the different console messages.

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
* TestWebKitAPI/Tests/WebKit2Gtk/TestConsoleMessage.cpp: Added.
(ConsoleMessageTest::ConsoleMessage::operator==):
(ConsoleMessageTest::consoleMessageReceivedCallback):
(ConsoleMessageTest::ConsoleMessageTest):
(ConsoleMessageTest::~ConsoleMessageTest):
(ConsoleMessageTest::waitUntilConsoleMessageReceived):
(testWebKitConsoleMessageConsoleAPI):
(testWebKitConsoleMessageJavaScriptException):
(testWebKitConsoleMessageNetworkError):
(testWebKitConsoleMessageSecurityError):
(beforeAll):
(afterAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(consoleMessageSentCallback):
(pageCreatedCallback):

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

5 years ago[EFL] MiniBrowser doesn't exit when called ewk_view_try_close()
ryuan.choi@navercorp.com [Mon, 7 Dec 2015 11:46:28 +0000 (11:46 +0000)]
[EFL] MiniBrowser doesn't exit when called ewk_view_try_close()
https://bugs.webkit.org/show_bug.cgi?id=151934

Reviewed by Csaba Osztrogonác.

Source/WebKit2:

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_try_close):
Called window_close callback immediately when WKPageTryClose returns true.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F): Improved test cases for try_close to test when content does not contain
onbeforeunload callback.

Tools:

* MiniBrowser/efl/main.c:
(on_window_deletion): Revert the changes of r192767.

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

5 years ago[GTK] update-webkitgtk-libs cannot build mesa
mcatanzaro@igalia.com [Mon, 7 Dec 2015 11:01:10 +0000 (11:01 +0000)]
[GTK] update-webkitgtk-libs cannot build mesa
https://bugs.webkit.org/show_bug.cgi?id=151535

Reviewed by Martin Robinson.

Upgrade to newer mesa in order to build successfully against LLVM 3.7. Add missing
dependency of mesa on LLVM, to ensure LLVM is built first. Build LLVM unconditionally, even
on architectures where FTL is not supported, to ensure mesa is always buildable, since LLVM
does not have a stable API and we cannot expect mesa to be buildable unless we control the
LLVM version. Build mesa with --disable-egl since --enable-egl conflicts with
--enable-xlib-glx. This fixes update-webkitgtk-libs on distros with LLVM 3.7.

* gtk/jhbuild.modules:

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

5 years ago[GTK][Mac] libWebExtensionTest link error
philn@webkit.org [Mon, 7 Dec 2015 09:11:30 +0000 (09:11 +0000)]
[GTK][Mac] libWebExtensionTest link error
https://bugs.webkit.org/show_bug.cgi?id=150802

Reviewed by Carlos Garcia Campos.

* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: add dependencies to the webextension library.

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

5 years ago[EFL] Moving preference settings from EwkView to WebPreferencesEfl
ljaehun.lim@samsung.com [Mon, 7 Dec 2015 08:28:41 +0000 (08:28 +0000)]
[EFL] Moving preference settings from EwkView to WebPreferencesEfl
https://bugs.webkit.org/show_bug.cgi?id=151928

Reviewed by Gyuyoung Kim.

It implements WebPreferences::platformInitializeStore() in WebPreferencesEfl.cpp.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/efl/WebPreferencesEfl.cpp:
(WebKit::WebPreferences::platformInitializeStore):

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

5 years agoWeb Inspector: Regression (r192936) - changing selectors in the visual styles sidebar...
commit-queue@webkit.org [Mon, 7 Dec 2015 07:45:27 +0000 (07:45 +0000)]
Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken
https://bugs.webkit.org/show_bug.cgi?id=151924

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2015-12-06
Reviewed by Brian Burg.

* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
(WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
Now uses an event listener instead of an "onselect" function.

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

5 years agoShow more information about SVG renderers in showLayerTree() output
simon.fraser@apple.com [Mon, 7 Dec 2015 06:27:48 +0000 (06:27 +0000)]
Show more information about SVG renderers in showLayerTree() output
https://bugs.webkit.org/show_bug.cgi?id=151930

Reviewed by Zalan Bujtas.

In showLayerTree() output, for SVG renderers show:
- visual and layout overflow, for boxes
- frame rect, for boxes
- layout state
- class and id

* rendering/RenderLayer.cpp:
(WebCore::showLayerTree):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::writeDebugInfo): New function to share dumping with svg output.
(WebCore::write):
* rendering/RenderTreeAsText.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writePositionAndStyle): Show the frameRect for boxes (e.g. RenderSVGRoot).
Much more useful that showing the clippedOverflowRect.
(WebCore::writeStandardPrefix):
(WebCore::writeChildren):
(WebCore::writeSVGResourceContainer):
(WebCore::writeSVGContainer):
(WebCore::write):
(WebCore::writeSVGText):
(WebCore::writeSVGInlineText):
(WebCore::writeSVGImage):
(WebCore::writeSVGGradientStop):
(WebCore::writeResources):
(WebCore::operator<<): Deleted.
* rendering/svg/SVGRenderTreeAsText.h:

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

5 years agoClipping along compositing borders in svg-edit
simon.fraser@apple.com [Mon, 7 Dec 2015 06:27:08 +0000 (06:27 +0000)]
Clipping along compositing borders in svg-edit
https://bugs.webkit.org/show_bug.cgi?id=151791

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderSVGRoot::layout() failed to clear overflow before recomputing
visual overflow, which could cause it to get stuck with stale overflow.
This would cause underpainting if its size went from small to large.

Test: svg/overflow/visual-overflow-change.html

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

LayoutTests:

Ref test that triggers recomputation of overflow.

* svg/overflow/visual-overflow-change-expected.html: Added.
* svg/overflow/visual-overflow-change.html: Added.

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

5 years agoWeb Inspector: Comparisons in setters should use the massaged value (" = x || 0/false...
mattbaker@apple.com [Mon, 7 Dec 2015 06:15:28 +0000 (06:15 +0000)]
Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc")
https://bugs.webkit.org/show_bug.cgi?id=151910

Reviewed by Timothy Hatcher.

Updated setters that use default values to convert falsy inputs to the default value
before compariing against the current value.

* UserInterface/Models/TimelineMarker.js:
(WebInspector.TimelineMarker.prototype.set time):
Assert new value is a number.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGridNode.prototype.set hidden):
(WebInspector.DataGridNode.prototype.set data):
Assert new value is of type object. Use shallowEqual compare before setting value.

* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set classNames):
Use shallowEqual compare before setting value.
(WebInspector.GeneralTreeElement.prototype.set mainTitle):
(WebInspector.GeneralTreeElement.prototype.set subtitle):
(WebInspector.GeneralTreeElement.prototype.set status):
(WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.set startTime):
(WebInspector.TimelineOverview.prototype.set currentTime):
(WebInspector.TimelineOverview.prototype.set endTime):
(WebInspector.TimelineOverview.prototype.set scrollStartTime):
(WebInspector.TimelineOverview.prototype.set selectionStartTime):
Check current ruler selectionStartTime before setting value.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
(WebInspector.TimelineOverviewGraph.prototype.set startTime):
(WebInspector.TimelineOverviewGraph.prototype.set endTime):
(WebInspector.TimelineOverviewGraph.prototype.set currentTime):

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler):
(WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
(WebInspector.TimelineRuler.prototype.set formatLabelCallback):
(WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
(WebInspector.TimelineRuler.prototype.set zeroTime):
(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set endTime):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
(WebInspector.TimelineRuler.prototype.set selectionStartTime):
(WebInspector.TimelineRuler.prototype.set selectionEndTime):
(WebInspector.TimelineRuler.prototype.set duration): Deleted.
The ruler duration and "pinned" state are controlled by setting an end
time. Removed since it wasn't being used, and there shouldn't be two
ways to the exact same thing.

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.set zeroTime):
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):

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

5 years ago[INTL] Implement String.prototype.toLocaleLowerCase in ECMA-402
commit-queue@webkit.org [Mon, 7 Dec 2015 06:13:26 +0000 (06:13 +0000)]
[INTL] Implement String.prototype.toLocaleLowerCase in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147608

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-12-06
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Add toLocaleLowerCase using icu u_strToLower.

* runtime/IntlObject.cpp:
(JSC::defaultLocale): Expose.
(JSC::bestAvailableLocale): Expose.
(JSC::removeUnicodeLocaleExtension): Expose.
* runtime/IntlObject.h:
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncToLocaleLowerCase): Add.

LayoutTests:

* js/script-tests/string-toLocaleLowerCase.js: Added.
* js/string-toLocaleLowerCase-expected.txt: Added.
* js/string-toLocaleLowerCase.html: Added.

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

5 years agoREGRESSION (r187121): Can't get to the main content of the page at https://theinterce...
simon.fraser@apple.com [Mon, 7 Dec 2015 05:14:30 +0000 (05:14 +0000)]
REGRESSION (r187121): Can't get to the main content of the page at https://theintercept.com/drone-papers/
https://bugs.webkit.org/show_bug.cgi?id=151849
rdar://problem/23132828

Reviewed by Zalan Bujtas.

Source/WebCore:

This page uses a fill-forwards animation where the last keyframe has height: auto.
After r187121, we tried to blend the height Length value from the last keyframe to the
first keyframe with progress=0 (which should pick up the 'auto' from the last keyframe).

However, Length::blend() just considered both 0 and 'auto' to be zero, and returned
the 0 length.

So fix Length::blend() to return the "from" length if progress is zero.

Test: animations/fill-forwards-auto-height.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Length::blend takes a double, so don't narrow to float.
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): Declare two variables
at first use.
* platform/Length.h:
(WebCore::Length::blend):

LayoutTests:

New ref test.

The behavior of imported/blink/transitions/transition-not-interpolable.html changed
with this patch, but that test is trying to determine if transitions run to/from
'auto' values, and doing it wrong. The current patch doesn't change the user-visible
behavior of transitions with 'auto' endpoints (covered by http://webkit.org/b/38243).

* animations/fill-forwards-auto-height-expected.html: Added.
* animations/fill-forwards-auto-height.html: Added.
* imported/blink/transitions/transition-not-interpolable-expected.txt:

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

5 years agoGive SVGTransformList some inline vector capacity
simon.fraser@apple.com [Mon, 7 Dec 2015 04:55:15 +0000 (04:55 +0000)]
Give SVGTransformList some inline vector capacity
https://bugs.webkit.org/show_bug.cgi?id=151644

Reviewed by Andreas Kling.

Giving SVGTransformList inline capacity of one drops time under SVGTransformList::parse() by
about 1% on http://animateplus.com/demos/stress-test/

* svg/SVGTransformList.h:

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

5 years agoAddressing post-review comments on r193374.
zalan@apple.com [Mon, 7 Dec 2015 04:40:35 +0000 (04:40 +0000)]
Addressing post-review comments on r193374.

Reviewed by Antti Koivisto.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForText):
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::canUseFor):
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):

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

5 years agoTestNetscapePlugIn: Fix leaks found by static analyzer
ddkilzer@apple.com [Mon, 7 Dec 2015 03:27:30 +0000 (03:27 +0000)]
TestNetscapePlugIn: Fix leaks found by static analyzer
<http://webkit.org/b/151881>

Reviewed by Darin Adler.

Fixes the following leaks found by the static analyzer:
    DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:808:16: warning: Potential leak of memory pointed to by 'path'
            return false;
                   ^~~~~
    DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:808:16: warning: Potential leak of memory pointed to by 'target'
            return false;
                   ^~~~~
    DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:808:16: warning: Potential leak of memory pointed to by 'url'
            return false;
                   ^~~~~

* DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp:
(toCString): Switch to returning std::unique_ptr<char[]>.  Add
early return if allocation fails.
(testPostURLFile): Switch to using std::unique_ptr<char[]>.
Make sure to call fclose() on filehandle, even for an early
return.
(testSetStatus): Switch to using std::unique_ptr<char[]>.

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

5 years agoREGRESSION(r193584): Causes heap use-after-free crashes in Web Inspector tests with...
ddkilzer@apple.com [Mon, 7 Dec 2015 01:54:43 +0000 (01:54 +0000)]
REGRESSION(r193584): Causes heap use-after-free crashes in Web Inspector tests with AddressSanitizer (Requested by ddkilzer on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=151929

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/193584

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

5 years ago[es6] Arrow function syntax. Fix tests after 149338 landing
commit-queue@webkit.org [Mon, 7 Dec 2015 01:09:31 +0000 (01:09 +0000)]
[es6] Arrow function syntax. Fix tests after 149338 landing
https://bugs.webkit.org/show_bug.cgi?id=151927

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

After landing patch for 149338 errors appear in for ES6 Generator. Current fix is removed assert
that was removed by patch with implemenation of ES6 Generator.

* runtime/CommonSlowPaths.cpp:

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

5 years ago[ES6] "super" and "this" should be lexically bound inside an arrow function and shoul...
commit-queue@webkit.org [Sun, 6 Dec 2015 20:56:30 +0000 (20:56 +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-05
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::isArrowFunction):
(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::emitNewArrowFunctionExpression):
(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-06
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@193584 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[JSC] Remove FTLOutput's fence support
commit-queue@webkit.org [Sun, 6 Dec 2015 07:18:59 +0000 (07:18 +0000)]
[JSC] Remove FTLOutput's fence support
https://bugs.webkit.org/show_bug.cgi?id=151909

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-05
Reviewed by Sam Weinig.

Unused code is unused.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::fence): Deleted.
(JSC::FTL::Output::fenceAcqRel): Deleted.
* ftl/FTLOutput.h:
(JSC::FTL::Output::fence): Deleted.
(JSC::FTL::Output::fenceAcqRel): Deleted.

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

5 years agoOne last fix for https redirect.
timothy@apple.com [Sat, 5 Dec 2015 22:02:53 +0000 (22:02 +0000)]
One last fix for https redirect.

* wp-content/themes/webkit/.htaccess:

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

5 years agoAttempt to fix www redirect again.
timothy@apple.com [Sat, 5 Dec 2015 21:55:19 +0000 (21:55 +0000)]
Attempt to fix www redirect again.

* wp-content/themes/webkit/.htaccess:

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

5 years agoFix www redirect again.
timothy@apple.com [Sat, 5 Dec 2015 21:41:09 +0000 (21:41 +0000)]
Fix www redirect again.

* wp-content/themes/webkit/.htaccess:

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

5 years agoFix www redirect when https was used and restore status URL code.
timothy@apple.com [Sat, 5 Dec 2015 21:39:41 +0000 (21:39 +0000)]
Fix www redirect when https was used and restore status URL code.

* wp-content/themes/webkit/.htaccess:
* wp-content/themes/webkit/status.php:

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

5 years agoAnother attempt to fix a 404 error when the site loads via www.webkit.org.
timothy@apple.com [Sat, 5 Dec 2015 21:26:29 +0000 (21:26 +0000)]
Another attempt to fix a 404 error when the site loads via webkit.org.

* wp-content/themes/webkit/status.php:

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

5 years agoFix a 404 error when the site loads via www.webkit.org.
timothy@apple.com [Sat, 5 Dec 2015 21:17:45 +0000 (21:17 +0000)]
Fix a 404 error when the site loads via webkit.org.

* wp-content/themes/webkit/status.php:

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

5 years agoprepare-ChangeLog: Fix some warning messages when using svn
ddkilzer@apple.com [Sat, 5 Dec 2015 17:08:20 +0000 (17:08 +0000)]
prepare-ChangeLog: Fix some warning messages when using svn
<http://webkit.org/b/151914>

Reviewed by Daniel Bates.

* Scripts/prepare-ChangeLog:
(generateFunctionLists): Simplify logic so that we never call
normalizePath() with an undefined value.
(attributeCommand): Quote $subPath for the shell so that we
don't try to run "svn propget" on invalid paths.

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

5 years agoREGRESSION (r193487): Modern IDB: storage/indexeddb/index-multientry.html crashes
ddkilzer@apple.com [Sat, 5 Dec 2015 13:53:27 +0000 (13:53 +0000)]
REGRESSION (r193487): Modern IDB: storage/indexeddb/index-multientry.html crashes

* platform/mac-wk1/TestExpectations: Skip test that crashes
on every run: storage/indexeddb/index-multientry.html.

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

5 years agoRemove CORETEXT_WEB_FONTS
mmaxfield@apple.com [Sat, 5 Dec 2015 07:55:41 +0000 (07:55 +0000)]
Remove CORETEXT_WEB_FONTS
https://bugs.webkit.org/show_bug.cgi?id=151891

Reviewed by Simon Fraser.

The only platform where this was turned off (Mavericks) is no longer supported.

No new tests because there is no behavior difference.

* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont): Deleted.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::registeredFont):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Deleted.
(WebCore::createFontCustomPlatformData): Deleted.
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Deleted.
* platform/text/TextFlags.h:

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

5 years agoGarbage in page tiles when document is too long.
zalan@apple.com [Sat, 5 Dec 2015 07:11:16 +0000 (07:11 +0000)]
Garbage in page tiles when document is too long.
https://bugs.webkit.org/show_bug.cgi?id=151906
rdar://problem/23695858

Reviewed by Simon Fraser.

Source/WebCore:

This patch partially fixes the broken concept(webkit.org/b/151908) of having a nearlyMax/2 sized rectangle to define infiniteness.
(see LayoutRect::infiniteRect() and ClipRect::isInfinite())

Covered by existing test.

* rendering/ClipRect.h: Branch for infinite clipping.
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::intersects):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect): Do not clip when clipping is infinite.
(WebCore::RenderLayer::restoreClip):
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

* platform/ios-simulator/fast/block/float/overhanging-tall-block-expected.txt:
* platform/mac-mavericks/fast/block/float/overhanging-tall-block-expected.txt:
* platform/mac/fast/block/float/overhanging-tall-block-expected.txt:

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

5 years agoModern IDB: Add some more custom exception messages, passing some more tests.
beidson@apple.com [Sat, 5 Dec 2015 05:25:11 +0000 (05:25 +0000)]
Modern IDB: Add some more custom exception messages, passing some more tests.
https://bugs.webkit.org/show_bug.cgi?id=151898

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Some failing tests now pass).

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

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/keypath-arrays-expected.txt:
* storage/indexeddb/noblobs-expected.txt:
* storage/indexeddb/object-lookups-in-versionchange-expected.txt:
* storage/indexeddb/request-result-cache-expected.txt:
* storage/indexeddb/transaction-after-close-expected.txt:
* storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
* storage/indexeddb/transaction-read-only-expected.txt:

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

5 years agoTestNetscapePlugIn: Fix remaining static analyzer warnings
ddkilzer@apple.com [Sat, 5 Dec 2015 04:31:49 +0000 (04:31 +0000)]
TestNetscapePlugIn: Fix remaining static analyzer warnings
<http://webkit.org/b/151888>

Reviewed by Alexey Proskuryakov.

Fixes the following static analyzer warnings:
    Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:101:9: warning: Called function pointer is null (null dereference)
            CRASH();
            ^~~~~~~
    Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:46:5: note: expanded from macro 'CRASH'
        ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ \
        ^~~~~~~~~~~~~~~~
    Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp:375:12: warning: Access to field 'pluginTest' results in a dereference of a null pointer (loaded from variable 'obj')
        return obj->pluginTest->NPP_SetWindow(window);
               ^~~~~~~~~~~~~~~
    2 warnings generated.

* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(CRASH): Use __builtin_trap() for gcc/clang.
(NPP_SetWindow): Add early return if obj is nullptr.

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

5 years agoUnreviewed, rolling out r193486.
commit-queue@webkit.org [Sat, 5 Dec 2015 03:29:36 +0000 (03:29 +0000)]
Unreviewed, rolling out r193486.
https://bugs.webkit.org/show_bug.cgi?id=151904

Causes Infinite Recursion in Timeline Recording (Requested by
JoePeck on #webkit).

Reverted changeset:

"Web Inspector: when a marked-dirty subview is attached to a
parent View, dirtyDescendantsCount gets out of sync"
https://bugs.webkit.org/show_bug.cgi?id=151876
http://trac.webkit.org/changeset/193486

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

5 years agoWeb Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
commit-queue@webkit.org [Sat, 5 Dec 2015 03:20:38 +0000 (03:20 +0000)]
Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
https://bugs.webkit.org/show_bug.cgi?id=151896

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

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Do not implicitly prevent default on these keyboard shortcuts
so we can system beep if we do not do anything.

(WebInspector._reloadPage):
(WebInspector._reloadPageIgnoringCache):
Bail if there is no PageAgent without preventing default for
a beep system beep. Prevent default if we did something.

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

5 years ago[JSC] Some more cleanup of FTLB3Output
benjamin@webkit.org [Sat, 5 Dec 2015 02:57:03 +0000 (02:57 +0000)]
[JSC] Some more cleanup of FTLB3Output
https://bugs.webkit.org/show_bug.cgi?id=151834

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

* ftl/FTLB3Output.h:
(JSC::FTL::Output::trap):
(JSC::FTL::Output::stackmapIntrinsic): Deleted.
(JSC::FTL::Output::frameAddressIntrinsic): Deleted.
(JSC::FTL::Output::patchpointInt64Intrinsic): Deleted.
(JSC::FTL::Output::patchpointVoidIntrinsic): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::probe):

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

5 years ago[JSC] Fix Value::returnsBool() after r193436
benjamin@webkit.org [Sat, 5 Dec 2015 02:26:38 +0000 (02:26 +0000)]
[JSC] Fix Value::returnsBool() after r193436
https://bugs.webkit.org/show_bug.cgi?id=151902

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-04
Reviewed by Saam Barati.

I forgot to carry a test from Branch and Select :(

* b3/B3Value.cpp:
(JSC::B3::Value::returnsBool):

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

5 years agoPlace an upper bound on canvas pixel count
bfulgham@apple.com [Sat, 5 Dec 2015 01:45:33 +0000 (01:45 +0000)]
Place an upper bound on canvas pixel count
https://bugs.webkit.org/show_bug.cgi?id=151825
<rdar://problem/23324916>

Reviewed by Simon Fraser.

Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
we will use for this purpose to some percentage of system RAM.

* html/HTMLCanvasElement.cpp:
(WebCore::removeFromActivePixelMemory): Added helper function
(WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
to ensure ImageBuffer and graphics context state are properly cleaned up.
(WebCore::maxActivePixels): Use one quarter of the system RAM, or 1 GB (whichever is more) as
an upper bound on active pixel memory.
(WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
us to exceed the allowed active pixel count, fail.
(WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
(WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
to handle active pixel memory counts.
(WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
exceed our available pixel memory.

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

5 years agoCrash when secondary clicking on a link on yahoo.com
andersca@apple.com [Sat, 5 Dec 2015 01:45:27 +0000 (01:45 +0000)]
Crash when secondary clicking on a link on yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=151900
rdar://problem/23765149

Reviewed by Beth Dakin.

Don't use +[NSURL URLWithString:] since it doesn't handle invalid URLs as well as WebCore::URL.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):

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

5 years agoFix toggling so hidden links are not clickable still.
timothy@apple.com [Sat, 5 Dec 2015 01:35:47 +0000 (01:35 +0000)]
Fix toggling so hidden links are not clickable still.

* wp-content/themes/webkit/status.php:

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

5 years agoFix another place where feature status internal reference links were wrong.
timothy@apple.com [Sat, 5 Dec 2015 01:23:41 +0000 (01:23 +0000)]
Fix another place where feature status internal reference links were wrong.

* wp-content/themes/webkit/status.php:

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

5 years agoModern IDB: Add some more custom exception messages, passing some more tests.
beidson@apple.com [Sat, 5 Dec 2015 01:21:28 +0000 (01:21 +0000)]
Modern IDB: Add some more custom exception messages, passing some more tests.
https://bugs.webkit.org/show_bug.cgi?id=151895

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Some failing tests now pass).

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

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::deleteIndex):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/aborted-versionchange-closes-expected.txt:
* storage/indexeddb/cursor-continue-dir-expected.txt:
* storage/indexeddb/cursor-continue-expected.txt:
* storage/indexeddb/deleteIndex-expected.txt:
* storage/indexeddb/modern/idbdatabase-transaction-failures-expected.txt:

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

5 years ago[INTL] Implement Number.prototype.toLocaleString in ECMA-402
commit-queue@webkit.org [Sat, 5 Dec 2015 01:14:03 +0000 (01:14 +0000)]
[INTL] Implement Number.prototype.toLocaleString in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147610

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-12-04
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Add toLocaleString in builtin JavaScript that delegates formatting to Intl.NumberFormat.
Keep exisiting native implementation for use if INTL flag is disabled.

* CMakeLists.txt: Add NumberPrototype.js.
* DerivedSources.make: Add NumberPrototype.js.
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/NumberPrototype.js: Added.
(toLocaleString):
* runtime/CommonIdentifiers.h: Add private names for Intl constructors.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Expose Intl constructors to builtin js.
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::finishCreation): Replace toLocaleString implementation.

LayoutTests:

Add tests for ECMA-402 Number.prototype.toLocaleString.
Since NumberFormat is not fully implemented, don't test locale-specific behavior yet.

* js/number-toLocaleString-expected.txt: Added.
* js/number-toLocaleString.html: Added.
* js/script-tests/number-toLocaleString.js: Added.

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

5 years agoFixed feature status internal reference links.
jond@apple.com [Sat, 5 Dec 2015 01:06:50 +0000 (01:06 +0000)]
Fixed feature status internal reference links.

* wp-content/themes/webkit/status.php:

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

5 years agoCRASH: CodeBlock::setOptimizationThresholdBasedOnCompilationResult + 567
msaboff@apple.com [Sat, 5 Dec 2015 01:04:20 +0000 (01:04 +0000)]
CRASH: CodeBlock::setOptimizationThresholdBasedOnCompilationResult + 567
https://bugs.webkit.org/show_bug.cgi?id=151892

Reviewed by Mark Lam.

When the debugger is in the process of attaching and it recompiles functions
for debugging, there can also be a DFG compilation running concurrently.
When we go to update the optimization threshold and find that the replacement
is also baseline code, we shouldn't update the threshold.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):

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

5 years agoCrash in clients using userData in
bdakin@apple.com [Sat, 5 Dec 2015 00:53:03 +0000 (00:53 +0000)]
Crash in clients using userData in
_immediateActionAnimationControllerForHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=151887

Rubber-stamped by Anders Carlsson.

Follow-up fix to handle null userData.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):

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

5 years agoUpdate feature status for up-to-date status information.
jond@apple.com [Sat, 5 Dec 2015 00:42:28 +0000 (00:42 +0000)]
Update feature status for up-to-date status information.
https://bugs.webkit.org/show_bug.cgi?id=151821

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* features.json:

Source/WebCore:

* features.json:

Websites/webkit.org:

* wp-content/themes/webkit/status.php:

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

5 years agoModern IDB: Flip test expectations around so we only list failures.
beidson@apple.com [Sat, 5 Dec 2015 00:31:30 +0000 (00:31 +0000)]
Modern IDB: Flip test expectations around so we only list failures.
https://bugs.webkit.org/show_bug.cgi?id=151880

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by all existing tests).

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::stop):
(WebCore::IDBClient::IDBRequest::enqueueEvent):
(WebCore::IDBClient::IDBRequest::dispatchEvent):
* Modules/indexeddb/client/IDBRequestImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBClient::IDBTransaction::hasPendingActivity):
(WebCore::IDBClient::IDBTransaction::stop):
(WebCore::IDBClient::IDBTransaction::enqueueEvent):
(WebCore::IDBClient::IDBTransaction::dispatchEvent):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyToScriptValue): Protection against a ScriptExecutionContext that no longer has an ExecState.
  A full reworking on the binding utilities to prevent this through is covered by b/151890

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

5 years agoWeb Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescend...
mattbaker@apple.com [Sat, 5 Dec 2015 00:12:23 +0000 (00:12 +0000)]
Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
https://bugs.webkit.org/show_bug.cgi?id=151876

Reviewed by Brian Burg.

* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView.prototype._updateShownTabs):
Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594.

* UserInterface/Views/View.js:
(WebInspector.View._scheduleLayoutForView):
Always perform a synchronous layout when a view that isn't descended from the
root view schedules a layout.

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

5 years agoOSR exits that are exception handlers should emit less code eagerly in the thunk...
sbarati@apple.com [Sat, 5 Dec 2015 00:04:01 +0000 (00:04 +0000)]
OSR exits that are exception handlers should emit less code eagerly in the thunk generator, and instead, should defer as much code generation as possible to be lazily generated in the exit itself
https://bugs.webkit.org/show_bug.cgi?id=151406

Reviewed by Filip Pizlo.

We no longer emit any extra code eagerly for an OSRExit that
is an exception handler. We emit all code lazily in the exit
itself. This has one interesting consequence which is that the
actual C call to compile the exit goes through an OSR exit generation
thunk that must now be aware of resetting the call frame and the stack
pointer to their proper values before making the compileOSRExit C
call. This has one interesting consequence in the FTL because the
FTL will do a pushToSaveImmediateWithoutTouchingRegisters with the
OSR exit index. We must take care to preserve this exit index when
we reset the stack pointer by re-pushing it onto the stack.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::setJITCode):
(JSC::CodeBlock::jitCode):
(JSC::CodeBlock::jitCodeOffset):
(JSC::CodeBlock::jitType):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::frameRegisterCountOffset):
* dfg/DFGJITCode.h:
(JSC::DFG::JITCode::setOSREntryBlock):
(JSC::DFG::JITCode::clearOSREntryBlock):
(JSC::DFG::JITCode::commonDataOffset):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::linkOSRExits):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGOSRExitCompilerCommon.h:
(JSC::DFG::adjustFrameAndStackInOSRExitCompilerThunk):
* dfg/DFGThunks.cpp:
(JSC::DFG::osrExitGenerationThunkGenerator):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLExitThunkGenerator.cpp:
(JSC::FTL::ExitThunkGenerator::~ExitThunkGenerator):
(JSC::FTL::ExitThunkGenerator::emitThunk):
(JSC::FTL::ExitThunkGenerator::emitThunks):
* ftl/FTLExitThunkGenerator.h:
(JSC::FTL::ExitThunkGenerator::didThings):
* ftl/FTLJITCode.h:
(JSC::FTL::JITCode::commonDataOffset):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLThunks.cpp:
(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::osrExitGenerationThunkGenerator):
(JSC::FTL::lazySlowPathGenerationThunkGenerator):
(JSC::FTL::registerClobberCheck):

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

5 years ago[Cocoa] Some fonts cause CTFontCopyAvailableTables() to return nullptr
mmaxfield@apple.com [Fri, 4 Dec 2015 23:52:28 +0000 (23:52 +0000)]
[Cocoa] Some fonts cause CTFontCopyAvailableTables() to return nullptr
https://bugs.webkit.org/show_bug.cgi?id=151884
<rdar://problem/23752253>

Reviewed by Brian Burg.

No new tests.

* platform/graphics/opentype/OpenTypeCG.cpp:
(WebCore::OpenType::fontHasMathTable):

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

5 years agoCrash in clients using userData in
bdakin@apple.com [Fri, 4 Dec 2015 23:22:29 +0000 (23:22 +0000)]
Crash in clients using userData in
_immediateActionAnimationControllerForHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=151887

Reviewed by Sam Weinig.

Cast this correctly.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _web_immediateActionAnimationControllerForHitTestResultInternal:withType:userData:]):

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

5 years agoUnreviewed build-fix; Add new parameter to overloaded createSession() method in Media...
jer.noble@apple.com [Fri, 4 Dec 2015 23:15:34 +0000 (23:15 +0000)]
Unreviewed build-fix; Add new parameter to overloaded createSession() method in MediaPlayerPrivateAVFoundationCF.

* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
(WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF):
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:

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

5 years agoBackground state not being tracked correctly for PDFs on iOS
barraclough@apple.com [Fri, 4 Dec 2015 23:09:37 +0000 (23:09 +0000)]
Background state not being tracked correctly for PDFs on iOS
https://bugs.webkit.org/show_bug.cgi?id=151886

Reviewed by Anders Carlson.

The problem here is that when viewing a PDF we don't have an ApplicationStateTracker.
(While we do have a content view - which normally holds the ApplicationStateTracker -
the content view is not in a window, and only has an ApplicationStateTracker while in a
window). For now, let's give the WKPDFView an ApplicationStateTracker of its very own.
In the future we may want to refactor ownership of the ApplicationStateTracker up to
the WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isBackground]):
    - Added, checks background state of content/PDF view.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
    - expose _isBackground to PageClientImplIOS.
* UIProcess/ApplicationStateTracker.h:
(WebKit::ApplicationStateTracker::isInBackground):
* UIProcess/ApplicationStateTracker.mm:
(WebKit::isBackgroundState):
(WebKit::ApplicationStateTracker::ApplicationStateTracker):
    - generalize WKContentView -> UIView, so this may now also be a WKPDFView.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible):
    - check background state via the WKWebView.
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView willMoveToWindow:]):
(-[WKPDFView didMoveToWindow]):
(-[WKPDFView isBackground]):
(-[WKPDFView _applicationDidEnterBackground]):
(-[WKPDFView _applicationWillEnterForeground]):
    - added methods to initialize ApplicationStateTracker, access background state, & callbacks to the page proxy.

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

5 years agoHaving a bad time has a really awful time when it runs at the same time as the JIT
fpizlo@apple.com [Fri, 4 Dec 2015 22:54:26 +0000 (22:54 +0000)]
Having a bad time has a really awful time when it runs at the same time as the JIT
https://bugs.webkit.org/show_bug.cgi?id=151882
rdar://problem/23547038

Unreviewed, really adding the test this time.

* tests/stress/ftl-has-a-bad-time.js: Added.
(foo):

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

5 years agoAdopt AVContentKeySession
jer.noble@apple.com [Fri, 4 Dec 2015 22:41:44 +0000 (22:41 +0000)]
Adopt AVContentKeySession
https://bugs.webkit.org/show_bug.cgi?id=151221

Reviewed by Eric Carlson.

Adopt a new API for managing key state, AVContentKeySession. Because this necessitates a change
in both the initialization data returned by the needkey event, and passed into the createSession()
method, bump the protocol version number (to 3), and keep supporting the old key management API
for legacy content.

To do so, move most of the implementation of CDMPrivateMediaSourceAVFObjC into a new subclass,
CDMSessionAVStreamSession, and add a new subclass, CDMSessionAVContentKeySession, to support the
new API.

* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
(WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Moved to implementation file.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::validKeySystemRE): Support "com.apple.fps.3_x".
(WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Invalidate all outstanding sessions.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Only support "com.apple.fps.3_x" if the AVContentKeySession class is available.
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Create an instance of CDMSessionAVContentKeySession if "com.apple.fps.3_x" is specified and AVContentKeySession is available.
(WebCore::CDMPrivateMediaSourceAVFObjC::invalidateSession): Remove session from the list of outstanding sessions.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
(WebCore::CDMSessionAVContentKeySession::hasContentKeySession): Simple accessor.
(WebCore::toCDMSessionAVContentKeySession): Safe casting.
* platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: Added.
(-[CDMSessionAVContentKeySessionDelegate initWithParent:]): Simple constructor.
(-[CDMSessionAVContentKeySessionDelegate invalidate]): Remove reference to parent.
(-[CDMSessionAVContentKeySessionDelegate contentKeySession:willProvideKeyRequestInitializationDataForTrackID:]): Pass to parent.
(-[CDMSessionAVContentKeySessionDelegate contentKeySession:didProvideKeyRequestInitializationData:requestHandling:]): Ditto.
(-[CDMSessionAVContentKeySessionDelegate contentKeySessionContentProtectionSessionIdentifierDidChange:]): Ditto.
(WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession): Create the delegate.
(WebCore::CDMSessionAVContentKeySession::~CDMSessionAVContentKeySession): Invalidate the delegate and remove all parsers.
(WebCore::CDMSessionAVContentKeySession::isAvailable): Return true if AVContentKeySession class is available.
(WebCore::CDMSessionAVContentKeySession::generateKeyRequest): Support "keyrelease" message, setting of the certificate, and creating key request object.
(WebCore::CDMSessionAVContentKeySession::releaseKeys): Retrieve keys from storage location.
(WebCore::isEqual): Compares a Uint8Array to a char*.
(WebCore::CDMSessionAVContentKeySession::update): Support "acknowledged" message, "renew" message, and key addition.
(WebCore::CDMSessionAVContentKeySession::addParser): Add the parser to the AVContentKeySession.
(WebCore::CDMSessionAVContentKeySession::removeParser): Remove parser from same.
(WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage): Retrieve key release message from AVContentKeySession.
(WebCore::CDMSessionAVContentKeySession::didProvideContentKeyRequest): Simple setter.
(WebCore::CDMSessionAVContentKeySession::contentKeySession): Lazily create the AVContentKeySession.
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
(WebCore::toCDMSessionAVStreamSession):
* platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm.
(-[CDMSessionAVStreamSessionObserver initWithParent:]): Moved from CDMSessionMediaSourceAVFObjcObserver.
(-[CDMSessionAVStreamSessionObserver contentProtectionSessionIdentifierChanged:]): Ditto.
(WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession): Ditto.
(WebCore::CDMSessionAVStreamSession::~CDMSessionAVStreamSession): Ditto.
(WebCore::CDMSessionAVStreamSession::generateKeyRequest): Ditto.
(WebCore::CDMSessionAVStreamSession::releaseKeys): Ditto.
(WebCore::isEqual): Ditto.
(WebCore::CDMSessionAVStreamSession::update): Ditto.
(WebCore::CDMSessionAVStreamSession::setStreamSession): Ditto.
(WebCore::CDMSessionAVStreamSession::addParser): Ditto.
(WebCore::CDMSessionAVStreamSession::removeParser): Ditto.
(WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage): Ditto.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::CDMSessionMediaSourceAVFObjC::invalidateCDM): Clear the m_cdm.
(WebCore::toCDMSessionMediaSourceAVFObjC):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Instruct our CDM to invalidate their references to us.
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Call addParser().
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Call removeParser().
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Deleted.
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Deleted.

To give us a chance to create a CDMPrivate before we continue decoding media data, "block" further decoding
on the background thread by creating a semaphore and passing it to the main thread, to be triggered when
a CDM is created and attached to this source buffer.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Deleted.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

Drive-by fix: Only throw an error from keyRequestTimerFired() if the underlying call to
generateKeyRequest() returned an error, rather than just failed to create a message.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::keyRequestTimerFired):

Drive-by fix: Pass the CDMSessionClient into CDM::createSession() so that it is immediately available
in the CDMSessionPrivate constructor, rather than setting the client immediately after construction.

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::createSession):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/CDMPrivateClearKey.cpp:
(WebCore::CDMPrivateClearKey::createSession):
* Modules/encryptedmedia/CDMPrivateClearKey.h:
* Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
(WebCore::CDMPrivateMediaPlayer::createSession):
* Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::CDMSessionClearKey):
* Modules/encryptedmedia/CDMSessionClearKey.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
* platform/graphics/CDMSession.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createSession):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::createSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::keyNeeded): Deleted.
* testing/MockCDM.cpp:
(WebCore::MockCDM::createSession):
(WebCore::MockCDMSession::MockCDMSession):
* testing/MockCDM.h:

Add new files to the project:

* WebCore.xcodeproj/project.pbxproj:

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

5 years agoSnippefy bitwise operators for the baseline JIT.
mark.lam@apple.com [Fri, 4 Dec 2015 22:28:11 +0000 (22:28 +0000)]
Snippefy bitwise operators for the baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=151680

Reviewed by Geoffrey Garen.

This patch has passed the JSC tests on x86 and x86_64.  It has also passed the
layout tests on x86_64.

With the DFG enabled, perf is neutral on x86_64 and x86.
With the DFG disabled on x86_64, some AsmBench tests are showing progressions e.g.
    gcc-loops.cpp           1.0269x faster
    stepanov_container.cpp  1.0180x faster

With the DFG disabled on x86, perf is neutral.

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

* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::moveValueRegs):
(JSC::AssemblyHelpers::branchIfNotInt32):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emitBitwiseBinaryOpFastPath):
- Template for the bitwise operations.
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emit_op_bitxor):
- Specializes emitBitwiseBinaryOpFastPath() with the respective snippet generators.
(JSC::JIT::emitSlow_op_bitand):
(JSC::JIT::emitSlow_op_bitor):
(JSC::JIT::emitSlow_op_bitxor):
- Implement respective slow paths.

* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_bitand): Deleted.
(JSC::JIT::emitSlow_op_bitand): Deleted.
(JSC::JIT::emit_op_bitor): Deleted.
(JSC::JIT::emitSlow_op_bitor): Deleted.
(JSC::JIT::emit_op_bitxor): Deleted.
(JSC::JIT::emitSlow_op_bitxor): Deleted.
- Now unified with the 64-bit version using snippets.

* jit/JITBitAndGenerator.cpp: Added.
(JSC::JITBitAndGenerator::generateFastPath):
* jit/JITBitAndGenerator.h: Added.
(JSC::JITBitAndGenerator::JITBitAndGenerator):
* jit/JITBitOrGenerator.cpp: Added.
(JSC::JITBitOrGenerator::generateFastPath):
* jit/JITBitOrGenerator.h: Added.
(JSC::JITBitOrGenerator::JITBitOrGenerator):
* jit/JITBitXorGenerator.cpp: Added.
(JSC::JITBitXorGenerator::generateFastPath):
* jit/JITBitXorGenerator.h: Added.
(JSC::JITBitXorGenerator::JITBitXorGenerator):
* jit/JITBitwiseBinaryOpGenerator.h: Added.
(JSC::JITBitwiseBinaryOpGenerator::JITBitwiseBinaryOpGenerator):
(JSC::JITBitwiseBinaryOpGenerator::didEmitFastPath):
(JSC::JITBitwiseBinaryOpGenerator::endJumpList):
(JSC::JITBitwiseBinaryOpGenerator::slowPathJumpList):

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_bitxor): Deleted.
(JSC::JIT::emit_op_bitor): Deleted.
(JSC::JIT::emitSlow_op_bitxor): Deleted.
(JSC::JIT::emitSlow_op_bitor): Deleted.
* jit/SnippetOperand.h:
(JSC::SnippetOperand::SnippetOperand):

* tests/stress/op_bitand.js:
* tests/stress/op_bitor.js:
* tests/stress/op_bitxor.js:
- Fix a test value typo: it's supposed to be 0x7fffffff, not 0x7ffffff.

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

5 years agoHaving a bad time has a really awful time when it runs at the same time as the JIT
fpizlo@apple.com [Fri, 4 Dec 2015 22:25:26 +0000 (22:25 +0000)]
Having a bad time has a really awful time when it runs at the same time as the JIT
https://bugs.webkit.org/show_bug.cgi?id=151882
rdar://problem/23547038

Reviewed by Geoffrey Garen.

The DFG's use of watchpoints for havingABadTime goes back a long time. We introduced this feature
when we first introduced watchpoints. That left it open to a lot of bitrot. On top of that, this
code doesn't get tested much because having a bad time is not something that is really supposed to
happen.

Well, now I've got reports that it does happen - or at least, we know that it is because of
crashes in an assertion that could only be triggered if a bad time was had. In the meantime, we
added two new features without adequately testing havingABadTime: concurrent JIT and FTL.
Concurrency means that we have to worry about the havingABadTime watchpoint triggering during
compilation. FTL means that we have new code and new optimizations that needs to deal with this
feature correctly.

The bug can arise via race condition or just goofy profiling. As in the newly added test, we could
first profile an allocation thinking that it will allocate sane arrays. Then we might have a bad
time, and then compile that function with the FTL. The ByteCodeParser will represent the
allocation with a NewArray node that has a sane indexingType(). But when we go to lower the Node,
we observe that the Structure* that the JSGlobalObject tells us to use has a different indexing
type. This is a feature of havingABadTime that the DFG knew about, but the FTL didn't. The FTL
didn't know about it because we didn't have adequate tests, and this code rarely gets triggered in
the wild. So, the FTL had a silly assertion that the indexing types match. They absolutely don't
have to match.

There is another bug, a race condition, that remains even if we remove the bad assertion. We set
the havingABadTime watchpoint late in compilation, and we do it based on whether the watchpoint is
still OK. This means that we could parse a function before we have a bad time and then do
optimizations (for example in AbstractInterpreter) like proving that the structure set associated
with the value returned by the NewArray is the one with a sane indexing type. Then, after those
optimizations have already been done, we will go to set the watchpoint. But just as we are doing
this, we could haveABadTime on the main thread. Currently this sort of almost works because
having a bad time requires doing a GC, and we can't GC until the watchpoint collection phase. But
that feels too fragile. So, this phase moves the setting of the watchpoint to the FixupPhase. This
is consistent with our long-term goal of removing the WatchpointCollectionPhase. Moving this to
FixupPhase means that we set the watchpoint before doing any optimizations. So, if having a bad
time happens before the FixupPhase then all optimizations will agree that we're having a bad time
and so everything is fine; if we have a bad time after FixupPhase then we will cancel the
compilation anyway.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::watchHavingABadTime):
(JSC::DFG::FixupPhase::createToString):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIndexingType):
(JSC::DFG::Node::indexingType):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewArray):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewArrayBuffer):
* tests/stress/ftl-has-a-bad-time.js: Added.

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