WebKit-https.git
4 years agoImport W3C HTML reflection tests
cdumez@apple.com [Wed, 17 Feb 2016 20:19:32 +0000 (20:19 +0000)]
Import W3C HTML reflection tests
https://bugs.webkit.org/show_bug.cgi?id=154310
<rdar://problem/24685826>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import W3C HTML reflection tests from:
https://github.com/w3c/web-platform-tests/tree/master/html/dom

This improves our test coverage.

* web-platform-tests/html/dom/reflection-embedded-expected.txt: Added.
* web-platform-tests/html/dom/reflection-embedded.html: Added.
* web-platform-tests/html/dom/reflection-forms-expected.txt: Added.
* web-platform-tests/html/dom/reflection-forms.html: Added.
* web-platform-tests/html/dom/reflection-grouping-expected.txt: Added.
* web-platform-tests/html/dom/reflection-grouping.html: Added.
* web-platform-tests/html/dom/reflection-metadata-expected.txt: Added.
* web-platform-tests/html/dom/reflection-metadata.html: Added.
* web-platform-tests/html/dom/reflection-misc-expected.txt: Added.
* web-platform-tests/html/dom/reflection-misc.html: Added.
* web-platform-tests/html/dom/reflection-obsolete-expected.txt: Added.
* web-platform-tests/html/dom/reflection-obsolete.html: Added.
* web-platform-tests/html/dom/reflection-sections-expected.txt: Added.
* web-platform-tests/html/dom/reflection-sections.html: Added.
* web-platform-tests/html/dom/reflection-tabular-expected.txt: Added.
* web-platform-tests/html/dom/reflection-tabular.html: Added.
* web-platform-tests/html/dom/reflection-text-expected.txt: Added.
* web-platform-tests/html/dom/reflection-text.html: Added.

LayoutTests:

Skip newly imported tests in Debug builds because they are slow.

* TestExpectations:

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

4 years agoModern IDB: More WK2 IPC Scaffolding.
beidson@apple.com [Wed, 17 Feb 2016 20:19:20 +0000 (20:19 +0000)]
Modern IDB: More WK2 IPC Scaffolding.
https://bugs.webkit.org/show_bug.cgi?id=154317

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.

Source/WebCore:

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::IDBCursorInfo):
* Modules/indexeddb/shared/IDBCursorInfo.h:
(WebCore::IDBCursorInfo::decode):
* Modules/indexeddb/shared/IDBError.h:
(WebCore::IDBError::decode):
* Modules/indexeddb/shared/IDBIndexInfo.h:
(WebCore::IDBIndexInfo::decode):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
(WebCore::IDBObjectStoreInfo::decode):
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::decode):
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:
(WebCore::IDBResourceIdentifier::decode):
* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::IDBResultData):
* Modules/indexeddb/shared/IDBResultData.h:
(WebCore::IDBResultData::decode):
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::IDBTransactionInfo):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::decode):
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* CMakeLists.txt:
* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Added.

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::didDeleteDatabase):
(WebKit::WebIDBConnectionToServer::didOpenDatabase):
(WebKit::WebIDBConnectionToServer::didAbortTransaction):
(WebKit::WebIDBConnectionToServer::didCommitTransaction):
(WebKit::WebIDBConnectionToServer::didCreateObjectStore):
(WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
(WebKit::WebIDBConnectionToServer::didClearObjectStore):
(WebKit::WebIDBConnectionToServer::didCreateIndex):
(WebKit::WebIDBConnectionToServer::didDeleteIndex):
(WebKit::WebIDBConnectionToServer::didPutOrAdd):
(WebKit::WebIDBConnectionToServer::didGetRecord):
(WebKit::WebIDBConnectionToServer::didGetCount):
(WebKit::WebIDBConnectionToServer::didDeleteRecord):
(WebKit::WebIDBConnectionToServer::didOpenCursor):
(WebKit::WebIDBConnectionToServer::didIterateCursor):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Added.

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

4 years agov3 UI has the capability to schedule an A/B testing in a specific range
rniwa@webkit.org [Wed, 17 Feb 2016 20:18:05 +0000 (20:18 +0000)]
v3 UI has the capability to schedule an A/B testing in a specific range
https://bugs.webkit.org/show_bug.cgi?id=154329

Reviewed by Chris Dumez.

Extended AnalysisTaskChartPane and ResultsTable so that users can select a range of points in either
the overview chart pane and the results viewer table. Extracted TestGroupForm out of the analysis task
page and used right below those two components in the analysis task page.

* public/v3/components/results-table.js:
(ResultsTable):
(ResultsTable.prototype.setRangeSelectorLabels): Added.
(ResultsTable.prototype.setRangeSelectorCallback): Added.
(ResultsTable.prototype.selectedRange): Added.
(ResultsTable.prototype._rangeSelectorClicked): Added.
(ResultsTable.prototype.render): Generate radio boxes to select a range.

* public/v3/components/test-group-form.js:
(TestGroupForm):
(TestGroupForm.prototype.setStartCallback): Added.
(TestGroupForm.prototype.setNeedsName): Added.
(TestGroupForm.prototype.setDisabled): Added.
(TestGroupForm.prototype.setLabel): Added.
(TestGroupForm.prototype.setRepetitionCount): Added.
(TestGroupForm.prototype._submitted): Added.
(TestGroupForm.htmlTemplate): Extracted from AnalysisTaskPage.htmlTemplate.

* public/v3/index.html:

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype._mainSelectionDidChange): Added. Delegates the work to AnalysisTaskPage.
(AnalysisTaskChartPane.prototype.selectedPoints): Added.
(AnalysisTaskPage):
(AnalysisTaskPage.prototype.title):
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._renderTestGroupDetails): Use TestGroupForm's methods instead of mutating DOM.
(AnalysisTaskPage.prototype._retryCurrentTestGroup):
(AnalysisTaskPage.prototype._chartSelectionDidChange): Added.
(AnalysisTaskPage.prototype._createNewTestGroupFromChart): Added.
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): Added.
(AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Added.
(AnalysisTaskPage.prototype._createRetryNameForTestGroup):
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Extracted from _retryCurrentTestGroup
so that we can call it in _createNewTestGroupFromChart and _createNewTestGroupFromViewer.
(AnalysisTaskPage.htmlTemplate):

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

4 years agoCopy http body when being redirected with 308 with NetworkSession
achristensen@apple.com [Wed, 17 Feb 2016 20:11:05 +0000 (20:11 +0000)]
Copy http body when being redirected with 308 with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154348

Reviewed by Brady Eidson.
Source/WebKit2:

This fixes http/tests/security/cors-post-redirect-308.html
which used to assert in ResourceRequest::doUpdateResourceHTTPBody

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::willPerformHTTPRedirection):

LayoutTests:

* http/tests/navigation/post-308-response-expected.txt: Copied from LayoutTests/http/tests/navigation/post-307-response-expected.txt.
* http/tests/navigation/post-308-response.html: Copied from LayoutTests/http/tests/navigation/post-307-response.html.
* http/tests/navigation/resources/redirection-response.php:
Added a test verifying data is being sent with post requests after being redirected with an http status code of 308.
We already had non-CORS tests for 301, 302, 303, and 307, and we already had CORS tests for 301, 302, 303, 307, and 308.
This fills in the missing non-CORS test.

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

4 years agoRegression(r196648): window.showModalDialog is no longer undefined if the client...
cdumez@apple.com [Wed, 17 Feb 2016 19:31:10 +0000 (19:31 +0000)]
Regression(r196648): window.showModalDialog is no longer undefined if the client does not allow showing modal dialog
https://bugs.webkit.org/show_bug.cgi?id=154330

Reviewed by Gavin Barraclough.

Source/WebCore:

window.showModalDialog is no longer undefined if the client does not
allow showing modal dialog after r196648. This patch fixes the issue
and add test coverage for this.

Test: fast/dom/Window/forbid-showModalDialog.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
- Move the DOMWindow::canShowModalDialog() check *before* checking
  for static properties as showModalDialog is now in the static
  property table after r196648.
- Add check for Base::getOwnPropertySlot() first to support overriding
  window.showModalDialog (This behavior matches Firefox).
- Return false if DOMWindow::canShowModalDialog() returns false as this
  seems cleaner than claiming that the property is there but undefined.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::canShowModalDialogNow): Deleted.
This was indentical to canShowModalDialog().

(WebCore::DOMWindow::canShowModalDialog):
(WebCore::DOMWindow::setCanShowModalDialogOverride):
(WebCore::DOMWindow::showModalDialog):
* page/DOMWindow.h:
* testing/Internals.cpp:
(WebCore::Internals::setCanShowModalDialogOverride):
* testing/Internals.h:
* testing/Internals.idl:
Add support for overriding the ChromeClient's canShowModalDialog
decision and hook it up to Internals to add layout test coverage.

LayoutTests:

Add layout test to make sure that window.showModalDialog is undefined
when the client does not allow showing modal dialog and to check that
window.showModalDialog can be shadowed.

* fast/dom/Window/forbid-showModalDialog-expected.txt: Added.
* fast/dom/Window/forbid-showModalDialog.html: Added.

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

4 years agoModern IDB: More WK2 IPC Scaffolding.
beidson@apple.com [Wed, 17 Feb 2016 19:21:59 +0000 (19:21 +0000)]
Modern IDB: More WK2 IPC Scaffolding.
https://bugs.webkit.org/show_bug.cgi?id=154317

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.

Source/WebCore:

* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::IDBCursorInfo):
* Modules/indexeddb/shared/IDBCursorInfo.h:
(WebCore::IDBCursorInfo::decode):
* Modules/indexeddb/shared/IDBError.h:
(WebCore::IDBError::decode):
* Modules/indexeddb/shared/IDBIndexInfo.h:
(WebCore::IDBIndexInfo::decode):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
(WebCore::IDBObjectStoreInfo::decode):
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::IDBRequestData):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::decode):
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
* Modules/indexeddb/shared/IDBResourceIdentifier.h:
(WebCore::IDBResourceIdentifier::decode):
* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::IDBResultData):
* Modules/indexeddb/shared/IDBResultData.h:
(WebCore::IDBResultData::decode):
* Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::IDBTransactionInfo):
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::decode):
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* CMakeLists.txt:
* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Added.

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::didDeleteDatabase):
(WebKit::WebIDBConnectionToServer::didOpenDatabase):
(WebKit::WebIDBConnectionToServer::didAbortTransaction):
(WebKit::WebIDBConnectionToServer::didCommitTransaction):
(WebKit::WebIDBConnectionToServer::didCreateObjectStore):
(WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
(WebKit::WebIDBConnectionToServer::didClearObjectStore):
(WebKit::WebIDBConnectionToServer::didCreateIndex):
(WebKit::WebIDBConnectionToServer::didDeleteIndex):
(WebKit::WebIDBConnectionToServer::didPutOrAdd):
(WebKit::WebIDBConnectionToServer::didGetRecord):
(WebKit::WebIDBConnectionToServer::didGetCount):
(WebKit::WebIDBConnectionToServer::didDeleteRecord):
(WebKit::WebIDBConnectionToServer::didOpenCursor):
(WebKit::WebIDBConnectionToServer::didIterateCursor):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in: Added.

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

4 years agoUnreviewed, rolling out r196675.
commit-queue@webkit.org [Wed, 17 Feb 2016 19:18:12 +0000 (19:18 +0000)]
Unreviewed, rolling out r196675.
https://bugs.webkit.org/show_bug.cgi?id=154344

 "Causes major slowdowns on deltablue-varargs" (Requested by
keith_miller on #webkit).

Reverted changeset:

"Spread operator should be allowed when not the first argument
of parameter list"
https://bugs.webkit.org/show_bug.cgi?id=152721
http://trac.webkit.org/changeset/196675

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

4 years ago[Win] Allow ports to disable automatic text track selection
eric.carlson@apple.com [Wed, 17 Feb 2016 19:17:09 +0000 (19:17 +0000)]
[Win] Allow ports to disable automatic text track selection
https://bugs.webkit.org/show_bug.cgi?id=154322
<rdar://problem/24623986>

Reviewed by Brent Fulgham.

* page/CaptionUserPreferencesMediaAF.cpp:
(MTEnableCaption2015BehaviorPtr): Implement for Windows.

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

4 years agoJSDOMWindow::put should not do the same thing twice
barraclough@apple.com [Wed, 17 Feb 2016 19:04:11 +0000 (19:04 +0000)]
JSDOMWindow::put should not do the same thing twice
https://bugs.webkit.org/show_bug.cgi?id=154334

Reviewed by Chris Dumez.

It either calls JSGlobalObject::put or Base::put. Hint: these are basically the same thing.
In the latter case it might call lookupPut. That's redundant; JSObject::put handles static
table entries.

Source/JavaScriptCore:

* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::hasOwnPropertyForWrite): Deleted.
    - no longer needed.

Source/WebCore:

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
    - just call Base::put.
(WebCore::JSDOMWindow::putByIndex):
    - just call Base::putByIndex.

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

4 years agoCMake build fix after r196698.
achristensen@apple.com [Wed, 17 Feb 2016 19:03:47 +0000 (19:03 +0000)]
CMake build fix after r196698.

* PlatformMac.cmake:

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

4 years agoCMake build fix after r196698.
achristensen@apple.com [Wed, 17 Feb 2016 18:50:42 +0000 (18:50 +0000)]
CMake build fix after r196698.

* CMakeLists.txt:

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

4 years agoAX: Implement sentence related text marker functions using TextIterator
n_wang@apple.com [Wed, 17 Feb 2016 18:16:50 +0000 (18:16 +0000)]
AX: Implement sentence related text marker functions using TextIterator
https://bugs.webkit.org/show_bug.cgi?id=154312

Reviewed by Chris Fleizach.

Source/WebCore:

Using CharacterOffset to implement sentence related text marker calls. Reused
logic from VisibleUnits class. Also fixed an issue where paragraph navigation
should skip preceding and following BR nodes.

Test: accessibility/mac/text-marker-sentence-nav.html

* accessibility/AXObjectCache.cpp:
(WebCore::resetNodeAndOffsetForReplacedNode):
(WebCore::setRangeStartOrEndWithCharacterOffset):
(WebCore::AXObjectCache::characterOffsetForNodeAndOffset):
(WebCore::AXObjectCache::previousCharacterOffset):
(WebCore::AXObjectCache::startCharacterOffsetOfWord):
(WebCore::AXObjectCache::endCharacterOffsetOfWord):
(WebCore::AXObjectCache::previousWordStartCharacterOffset):
(WebCore::AXObjectCache::leftWordRange):
(WebCore::AXObjectCache::rightWordRange):
(WebCore::AXObjectCache::characterBefore):
(WebCore::characterOffsetNodeIsBR):
(WebCore::parentEditingBoundary):
(WebCore::AXObjectCache::nextBoundary):
(WebCore::AXObjectCache::previousBoundary):
(WebCore::AXObjectCache::paragraphForCharacterOffset):
(WebCore::AXObjectCache::nextParagraphEndCharacterOffset):
(WebCore::AXObjectCache::previousParagraphStartCharacterOffset):
(WebCore::AXObjectCache::startCharacterOffsetOfSentence):
(WebCore::AXObjectCache::endCharacterOffsetOfSentence):
(WebCore::AXObjectCache::sentenceForCharacterOffset):
(WebCore::AXObjectCache::nextSentenceEndCharacterOffset):
(WebCore::AXObjectCache::previousSentenceStartCharacterOffset):
(WebCore::AXObjectCache::rootAXEditableElement):
(WebCore::startWordBoundary): Deleted.
(WebCore::endWordBoundary): Deleted.
(WebCore::AXObjectCache::nextWordBoundary): Deleted.
(WebCore::AXObjectCache::previousWordBoundary): Deleted.
* accessibility/AXObjectCache.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* editing/VisibleUnits.cpp:
(WebCore::startWordBoundary):
(WebCore::startOfWord):
(WebCore::endWordBoundary):
(WebCore::startSentenceBoundary):
(WebCore::startOfSentence):
(WebCore::endSentenceBoundary):
* editing/VisibleUnits.h:

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(nextParagraphEndTextMarkerForTextMarkerCallback):
(sentenceTextMarkerRangeForTextMarkerCallback):
(previousSentenceStartTextMarkerForTextMarkerCallback):
(nextSentenceEndTextMarkerForTextMarkerCallback):
(setSelectedVisibleTextRangeCallback):
(AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(AccessibilityUIElement::supportedActions):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker):
(WTR::_convertMathMultiscriptPairsToString):

LayoutTests:

* accessibility/mac/text-marker-paragraph-nav-expected.txt:
* accessibility/mac/text-marker-paragraph-nav.html:
* accessibility/mac/text-marker-sentence-nav-expected.txt: Added.
* accessibility/mac/text-marker-sentence-nav.html: Added.

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

4 years agoRemove unused media cache manager code
andersca@apple.com [Wed, 17 Feb 2016 18:15:57 +0000 (18:15 +0000)]
Remove unused media cache manager code
https://bugs.webkit.org/show_bug.cgi?id=154339

Reviewed by Tim Horton.

* DerivedSources.make:
* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetMediaCacheManager): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKMediaCacheManager.cpp: Removed.
(WKMediaCacheManagerGetTypeID): Deleted.
(WKMediaCacheManagerGetHostnamesWithMediaCache): Deleted.
(WKMediaCacheManagerClearCacheForHostname): Deleted.
(WKMediaCacheManagerClearCacheForAllHostnames): Deleted.
* UIProcess/API/C/WKMediaCacheManager.h: Removed.
* UIProcess/WebMediaCacheManagerProxy.cpp: Removed.
(WebKit::WebMediaCacheManagerProxy::supplementName): Deleted.
(WebKit::WebMediaCacheManagerProxy::create): Deleted.
(WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy): Deleted.
(WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy): Deleted.
(WebKit::WebMediaCacheManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebMediaCacheManagerProxy::processDidClose): Deleted.
(WebKit::WebMediaCacheManagerProxy::shouldTerminate): Deleted.
(WebKit::WebMediaCacheManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebMediaCacheManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Deleted.
(WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Deleted.
(WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Deleted.
(WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Deleted.
* UIProcess/WebMediaCacheManagerProxy.h: Removed.
* UIProcess/WebMediaCacheManagerProxy.messages.in: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/MediaCache/WebMediaCacheManager.cpp: Removed.
(WebKit::WebMediaCacheManager::supplementName): Deleted.
(WebKit::WebMediaCacheManager::WebMediaCacheManager): Deleted.
(WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Deleted.
(WebKit::WebMediaCacheManager::clearCacheForHostname): Deleted.
(WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Deleted.
* WebProcess/MediaCache/WebMediaCacheManager.h: Removed.
* WebProcess/MediaCache/WebMediaCacheManager.messages.in: Removed.
* WebProcess/WebProcess.cpp:
(WebKit::m_webSQLiteDatabaseTracker): Deleted.

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

4 years agoAdding an ios-specific baseline for accessibility/ios-simulator/centerpoint.html...
ryanhaddad@apple.com [Wed, 17 Feb 2016 17:46:00 +0000 (17:46 +0000)]
Adding an ios-specific baseline for accessibility/ios-simulator/centerpoint.html during failure investigation
https://bugs.webkit.org/show_bug.cgi?id=154137

Unreviewed test gardening.

* platform/ios-simulator/accessibility/ios-simulator/centerpoint-expected.txt: Added.

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

4 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator
ryanhaddad@apple.com [Wed, 17 Feb 2016 17:32:50 +0000 (17:32 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator

Unreviewed test gardening.

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

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

4 years agoSkipping tests added with r196688 on ios-simulator due to reliance on unsupported...
ryanhaddad@apple.com [Wed, 17 Feb 2016 17:25:03 +0000 (17:25 +0000)]
Skipping tests added with r196688 on ios-simulator due to reliance on unsupported mouse events.

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 17 Feb 2016 16:50:02 +0000 (16:50 +0000)]
Versioning.

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

4 years agoWeb Inspector: Add singular and plural cases for "Ignore n times before stopping...
mattbaker@apple.com [Wed, 17 Feb 2016 16:01:23 +0000 (16:01 +0000)]
Web Inspector: Add singular and plural cases for "Ignore n times before stopping" label in breakpoint editor
https://bugs.webkit.org/show_bug.cgi?id=154335
<rdar://problem/24655491>

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
Added string for singular ignore count.

* UserInterface/Controllers/BreakpointPopoverController.js:
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
Remove unused variable "this._ignoreCount" and update ignore count text.

(WebInspector.BreakpointPopoverController.prototype._popoverIgnoreInputChanged):
Update ignore count text as value changes.

(WebInspector.BreakpointPopoverController.prototype._updateIgnoreCountText):
Set singular text when count === 1, otherwise set plural text.

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

4 years ago[css-grid] GridSpan refactoring
rego@igalia.com [Wed, 17 Feb 2016 11:45:30 +0000 (11:45 +0000)]
[css-grid] GridSpan refactoring
https://bugs.webkit.org/show_bug.cgi?id=153868

Reviewed by Sergio Villar Senin.

Add new enum to know if a GridSpan is definite or indefinite.
That way we don't need GridUnresolvedSpan class (which is removed).
We can always have two GridSpans in GridCoordinate,
if the position is "auto" the GridSpan will be marked as indefinite.
This will allow in a follow-up patch to avoid repeated calls
to methods that resolve positions.

Most operations in GridSpan are restricted to definite GridSpans (access
to positions, iterator, etc.). For indefinite GridSpans we only need to
know that they're indefinite, we shouldn't use the rest of the data.

No new tests, no change of behavior.

* css/CSSGridTemplateAreasValue.cpp:
(WebCore::stringForPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateAreasRow):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::insertItemIntoGrid):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Deleted.
(WebCore::RenderGrid::autoPlacementMinorAxisDirection): Deleted.
(WebCore::RenderGrid::populateGridPositions): Deleted.
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::definiteGridSpan):
(WebCore::GridSpan::indefiniteGridSpan):
(WebCore::GridSpan::operator==):
(WebCore::GridSpan::integerSpan):
(WebCore::GridSpan::resolvedInitialPosition):
(WebCore::GridSpan::resolvedFinalPosition):
(WebCore::GridSpan::begin):
(WebCore::GridSpan::end):
(WebCore::GridSpan::isDefinite):
(WebCore::GridSpan::GridSpan):
(WebCore::GridCoordinate::GridCoordinate):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::initialPositionSide):
(WebCore::finalPositionSide):
(WebCore::adjustGridPositionsFromStyle):
(WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
(WebCore::resolveGridPositionAgainstOppositePosition):
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
(WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
(WebCore::implicitNamedGridLineForSide): Deleted.
(WebCore::GridResolvedPosition::isNonExistentNamedLineOrArea): Deleted.
(WebCore::resolveNamedGridLinePositionFromStyle): Deleted.
(WebCore::resolveGridPositionFromStyle): Deleted.
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
(WebCore::GridResolvedPosition::operator*): Deleted.
(WebCore::GridResolvedPosition::operator++): Deleted.
(WebCore::GridResolvedPosition::operator==): Deleted.

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

4 years agoWindow should have its 'constructor' property on the prototype
cdumez@apple.com [Wed, 17 Feb 2016 08:38:27 +0000 (08:38 +0000)]
Window should have its 'constructor' property on the prototype
https://bugs.webkit.org/show_bug.cgi?id=154037
<rdar://problem/24689078>

Reviewed by Gavin Barraclough.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

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

Source/WebCore:

Window should have its 'constructor' property on the prototype as per
the Web IDL specification:
http://heycam.github.io/webidl/#interface-prototype-object

Firefox and Chrome already match the specification.

No new tests, covered by:
- fast/dom/Window/window-constructor-settable.html
- fast/dom/Window/window-constructor.html
- http/tests/security/cross-origin-window-property-access.html
- imported/w3c/web-platform-tests/html/dom/interfaces.html

* bindings/scripts/CodeGeneratorJS.pm:
(ConstructorShouldBeOnInstance): Deleted.
Drop this routine as all constructors are now on the prototype.

(InstancePropertyCount):
Do not account for constructor properties as these can only be
on the prototype now.

(PrototypePropertyCount):
Increment the property count by 1 if the interface has a constructor
property (e.g. [NoInterfaceObject] interfaces do not have one).

(GeneratePropertiesHashTable):
Stop calling ConstructorShouldBeOnInstance() as it no longer exists.
Always generated the "constructor" property if:
1. We are generating the prototype hash table.
and
2. The interface needs a constructor (i.e. not marked as
   [NoInterfaceObject]).

(GenerateImplementation):
- Drop code handling the case where ConstructorShouldBeOnInstance()
  returns true as constructors are not always on the prototype and
  the ConstructorShouldBeOnInstance() routine has been dropped.
- Drop code handling [CustomProxyToJSObject]. Now that the constructor
  is always on the prototype, we never need to cast thisValue to a
  JSDOMWindow (by calling toJSDOMWindow). In the Window case, thisValue
  is now casted to a JSDOMWindowPrototype*, similarly to other interfaces
  so we don't need a special casting function anymore.
- Stop generating security checks. This only impacts Window as it is the
  only interface marked as [CheckSecurity]. The cross-origin checking code
  as it was would not work when "constructor" is on the prototype because
  thisValue is a JSDOMWindowPrototype, not a JSDOMWindow and we have no
  way of getting the wrapped window. Also, the security check is no longer
  needed because:
  1. Accessing crossOriginWindow.constructor will not work now that
     constructor is on the prototype because
     JSDOMWindow::getOwnPropertySlot() already prevents access to the
     prototype in the cross-origin case.
  2. "constructor" is a value property, not a getter/setter. Therefore,
     it is no possible to use the getter/setter from a same origin window
     instance and call it on a cross origin window.

LayoutTests:

* http/tests/security/cross-origin-window-property-access-expected.txt:
* http/tests/security/cross-origin-window-property-access.html:
Add checks to make sure it still is not possible to access
window.constructor cross-origin.

* js/getOwnPropertyDescriptor-window-attributes-expected.txt:
* js/getOwnPropertyDescriptor-window-attributes.html:
Update test now that window has it's "constructor" attribute
on the prototype.

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

4 years agoREGRESSION (r196620): Web Inspector: Selecting last message in the console makes...
nvasilyev@apple.com [Wed, 17 Feb 2016 07:18:34 +0000 (07:18 +0000)]
REGRESSION (r196620): Web Inspector: Selecting last message in the console makes the scrollbar visible
https://bugs.webkit.org/show_bug.cgi?id=154326
<rdar://problem/24692717>

Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.css:
(.console-item.selected::after):
Make sure the selected message marker (blue vertical line) doesn't
go over the content view.

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

4 years agoAdd a way to test ScrollAnimator
carlosgc@webkit.org [Wed, 17 Feb 2016 07:16:40 +0000 (07:16 +0000)]
Add a way to test ScrollAnimator
https://bugs.webkit.org/show_bug.cgi?id=153479

Reviewed by Michael Catanzaro.

Source/WebCore:

Tests: fast/scrolling/overlay-scrollbars-scroll-corner.html
       fast/scrolling/scroll-animator-basic-events.html
       fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html
       fast/scrolling/scroll-animator-select-list-events.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::usesMockScrollAnimator):
(WebCore::FrameView::logMockScrollAnimatorMessage):
* page/FrameView.h:
* page/Settings.cpp:
(WebCore::Settings::setUsesMockScrollAnimator):
(WebCore::Settings::usesMockScrollAnimator):
* page/Settings.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollAnimator):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::usesMockScrollAnimator):
(WebCore::ScrollableArea::logMockScrollAnimatorMessage):
* platform/mock/ScrollAnimatorMock.cpp: Added.
(WebCore::ScrollAnimatorMock::create):
(WebCore::ScrollAnimatorMock::ScrollAnimatorMock):
(WebCore::ScrollAnimatorMock::~ScrollAnimatorMock):
(WebCore::ScrollAnimatorMock::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMock::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMock::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMock::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMock::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMock::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMock::mouseExitedContentArea):
(WebCore::ScrollAnimatorMock::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMock::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMock::mouseIsDownInScrollbar):
* platform/mock/ScrollAnimatorMock.h: Added.
* platform/mock/ScrollbarThemeMock.cpp:
(WebCore::ScrollbarThemeMock::usesOverlayScrollbars):
* platform/mock/ScrollbarThemeMock.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::usesMockScrollAnimator):
(WebCore::RenderLayer::logMockScrollAnimatorMessage):
* rendering/RenderLayer.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::usesMockScrollAnimator):
(WebCore::RenderListBox::logMockScrollAnimatorMessage):
* rendering/RenderListBox.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setUsesMockScrollAnimator):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* compositing/overflow/overflow-scrollbar-layer-positions-expected.txt:
* fast/scrolling/overlay-scrollbars-scroll-corner-expected.html: Added.
* fast/scrolling/overlay-scrollbars-scroll-corner.html: Added.
* fast/scrolling/scroll-animator-basic-events-expected.txt: Added.
* fast/scrolling/scroll-animator-basic-events.html: Added.
* fast/scrolling/scroll-animator-overlay-scrollbars-hovered-expected.txt: Added.
* fast/scrolling/scroll-animator-overlay-scrollbars-hovered.html: Added.
* fast/scrolling/scroll-animator-select-list-events-expected.txt: Added.
* fast/scrolling/scroll-animator-select-list-events.html: Added.
* fast/scrolling/scrollbar-tickmarks-hittest.html:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk1/fast/scrolling/scroll-animator-basic-events-expected.txt: Added.
* platform/mac-wk1/fast/scrolling/scroll-animator-select-list-events-expected.txt: Added.

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

4 years agoUnreviewed. Enable overlay scrollbars in GTK+ after r196641.
carlosgc@webkit.org [Wed, 17 Feb 2016 06:54:03 +0000 (06:54 +0000)]
Unreviewed. Enable overlay scrollbars in GTK+ after r196641.

This was blocked by bug #153404, but the commit that introduced
the regression was rolled out in r196641.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk):

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

4 years agoFTL_USES_B3 should be unconditionally true
fpizlo@apple.com [Wed, 17 Feb 2016 06:13:24 +0000 (06:13 +0000)]
FTL_USES_B3 should be unconditionally true
https://bugs.webkit.org/show_bug.cgi?id=154324

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

* dfg/DFGCommon.h:

Source/WTF:

* wtf/Platform.h:

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

4 years agoFTL should support CompareEq(String:, String:)
fpizlo@apple.com [Wed, 17 Feb 2016 05:29:34 +0000 (05:29 +0000)]
FTL should support CompareEq(String:, String:)
https://bugs.webkit.org/show_bug.cgi?id=154269
rdar://problem/24499921

Reviewed by Benjamin Poulain.

Looks like a slight pdfjs slow-down, probably because we're having some recompilations. I
think we should land the increased coverage first and fix the issues after, especially since
the regression is so small and doesn't have a statistically significant effect on the overall
score.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToLLVM::nonSpeculativeCompare):
(JSC::FTL::DFG::LowerDFGToLLVM::stringsEqual):
* tests/stress/ftl-string-equality.js: Added.
* tests/stress/ftl-string-ident-equality.js: Added.
* tests/stress/ftl-string-strict-equality.js: Added.

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

4 years agoFTL should support NewTypedArray
fpizlo@apple.com [Wed, 17 Feb 2016 04:25:57 +0000 (04:25 +0000)]
FTL should support NewTypedArray
https://bugs.webkit.org/show_bug.cgi?id=154268

Reviewed by Saam Barati.

3% speed-up on pdfjs. This was already covered by many different tests.

Rolling this back in after fixing the butterfly argument.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToLLVM::compileAllocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateBasicStorageAndGetEnd):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateBasicStorage):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateObject):

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

4 years agoAllow double tap to zoom in fast-click pages
dino@apple.com [Wed, 17 Feb 2016 03:27:05 +0000 (03:27 +0000)]
Allow double tap to zoom in fast-click pages
https://bugs.webkit.org/show_bug.cgi?id=154318
<rdar://problem/24223767>

Reviewed by Simon Fraser and Benjamin Poulain.

Most of the patch comes from Jon Lee.

Our fast-click algorithm exposed a number of cases where
people missed the double-tap-to-zoom behaviour. In particular,
when you double tap on a large body of text, typical in
blogs and articles.

This patch enhances the algorithm to have a parallel
double-tap gesture recognizer in the situations where
fast-click is enabled. This new gesture recongizer does
not cause the single tap to block for 350ms, so clicks
are still dispatched fast. If it fires, we already have
some information about whether we have a pending double
tap, based on the first tap.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary): Remove the optimization
that only told the content view to disable on pages that allowed double taps. We now allow
them even on fast click pages.

* UIProcess/ios/WKContentViewInteraction.h: Add the new UITapGestureRecognizer for double taps
in fast click pages. This is called nonBlockingDoubleTapGestureRecognizer because, unlike
the existing DoubleTapGestureRecognizer, this one does not force the singleTapRecognizer
to wait.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]): Set up the new UITapGestureRecognizer.
(-[WKContentView cleanupInteraction]): And remove it when we're done.
(-[WKContentView _removeDefaultGestureRecognizers]): Ditto.
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView _inspectorNodeSearchRecognized:]): Something happened, we are no longer in
a potential double tap situation.
(-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]): Remove the check
for potential tap in progress.
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _highlightLongPressRecognized:]): Again, something happened, so we are
no longer in a double tap situation.
(-[WKContentView _longPressRecognized:]): Ditto.
(-[WKContentView _singleTapRecognized:]): Ditto.
(-[WKContentView _doubleTapRecognized:]): Ditto.
(-[WKContentView _resetIsDoubleTapPending]):
(-[WKContentView _fastDoubleTapRecognized:]): We're now pending a double tap.
(-[WKContentView _twoFingerDoubleTapRecognized:]):
(-[WKContentView _didNotHandleTapAsClick:]): If we get here and we have a pending
double tap, then trigger a zoom operation.
(-[WKContentView _setDoubleTapGesturesEnabled:]):

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

4 years agoJSDOMWindow::getOwnPropertySlot should just call getStaticPropertySlot
cdumez@apple.com [Wed, 17 Feb 2016 02:34:36 +0000 (02:34 +0000)]
JSDOMWindow::getOwnPropertySlot should just call getStaticPropertySlot
https://bugs.webkit.org/show_bug.cgi?id=154257

Patch by Gavin Barraclough <barraclough@apple.com> on 2016-02-16
Reviewed by Chris Dumez.

Source/JavaScriptCore:

* runtime/Lookup.h:
(JSC::getStaticPropertySlot):
(JSC::getStaticFunctionSlot):
(JSC::getStaticValueSlot):
    - this could all do with a little more love.
      But enforce the basic precedence:
        (1) regular storage properties always win over static table properties.
        (2) if properties have been reified, don't consult the static tables.
        (3) only if the property is not present on the object & not reified
            should the static hashtable be consulted.

Source/WebCore:

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
    - JSDOMWindow::getOwnPropertySlot should just call getStaticPropertySlot

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

4 years agoJSDOMWindow::getOwnPropertySlot should not search photo chain
barraclough@apple.com [Wed, 17 Feb 2016 01:37:56 +0000 (01:37 +0000)]
JSDOMWindow::getOwnPropertySlot should not search photo chain
https://bugs.webkit.org/show_bug.cgi?id=154102

Reviewed by Chris Dumez.

Should only return *own* properties.

Source/JavaScriptCore:

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):
    - remove hack/special-case for DOMWindow; we no longer need this.

Source/WebCore:

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotNamedItemGetter):

LayoutTests:

* fast/dom/Window/es52-globals-expected.txt:
* http/tests/security/window-named-valueOf-expected.txt:
* imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:
    - update test results.

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

4 years agoSpread operator should be allowed when not the first argument of parameter list
keith_miller@apple.com [Wed, 17 Feb 2016 01:29:37 +0000 (01:29 +0000)]
Spread operator should be allowed when not the first argument of parameter list
https://bugs.webkit.org/show_bug.cgi?id=152721

Reviewed by Saam Barati.

Source/JavaScriptCore:

Spread arguments to functions should now be ES6 compliant. Before we
would only take a spread operator if it was the sole argument to a
function. Additionally, we would not use the Symbol.iterator on the
object to generate the arguments. Instead we would do a loop up to the
length mapping indexed properties to the corresponding argument. We fix
both these issues by doing an AST transformation from foo(...a, b, ...c, d)
to foo(...[...a, b, ...c, d]) (where the spread on the rhs uses the
old spread semantics). This solution has the downside of requiring the
allocation of another object and copying each element twice but avoids a
large change to the vm calling convention.

* interpreter/Interpreter.cpp:
(JSC::loadVarargs):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createElementList):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseArguments):
(JSC::Parser<LexerType>::parseArgument):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/Parser.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createElementList):
* tests/es6.yaml:
* tests/stress/spread-calling.js: Added.
(testFunction):
(testEmpty):
(makeObject):
(otherIterator.return.next):
(otherIterator):
(totalIter):
(throwingIter.return.next):
(throwingIter):
(i.catch):

LayoutTests:

Update tests with new semantics of spread calling.

* js/basic-spread-expected.txt:
* js/parser-syntax-check-expected.txt:
* js/script-tests/basic-spread.js:
* js/script-tests/parser-syntax-check.js:

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

4 years agoCMake build fix.
achristensen@apple.com [Wed, 17 Feb 2016 01:14:13 +0000 (01:14 +0000)]
CMake build fix.

* PlatformMac.cmake:

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

4 years agoNavigator.geolocation should not be marked a [Replaceable] and should be on the prototype
cdumez@apple.com [Wed, 17 Feb 2016 01:11:29 +0000 (01:11 +0000)]
Navigator.geolocation should not be marked a [Replaceable] and should be on the prototype
https://bugs.webkit.org/show_bug.cgi?id=154304
<rdar://problem/24685092>

Reviewed by Gavin Barraclough.

LayoutTests/imported/w3c:

Rebaseline test now that more checks are passing.

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

Source/WebCore:

1. Drop the [Replaceable] IDL extended attribute for navigator.geolocation
   as this does not match other browsers or the specification:
   - https://dev.w3.org/geo/api/spec-source.html#geolocation_interface
2. Move Navigator attributes to the prototype, where they should be as
   per the Web IDL specification.

The previous behavior was meant as a workaround for a bug in the Amazon
iOS app (rdar://problem/16332749). However, I have confirmed that the
latest Amazon App no longer has any issue with those changes.

Test: js/navigator-set-geolocation.html

* Modules/geolocation/NavigatorGeolocation.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstanceForCompatibility): Deleted.

LayoutTests:

* fast/dom/Geolocation/enabled-expected.txt:
* fast/dom/Geolocation/script-tests/enabled.js:
* js/dom/delete-syntax-expected.txt:
* js/dom/script-tests/delete-syntax.js:
Update tests as they expected the navigator properties to be on the
instance rather than the prototype.

* js/dom/script-tests/shadow-navigator-geolocation-in-strict-mode-does-not-throw.js: Removed.
* js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw-expected.txt: Removed.
* js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw.html: Removed.
Drop outdated test.

* js/navigator-set-geolocation-expected.txt: Added.
* js/navigator-set-geolocation.html: Added.
Add test to make sure that Navigator.geolocation cannot be set. I verified that
this test passes in both Firefox and Chrome.

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

4 years ago[JSC] Enable B3 on ARM64
commit-queue@webkit.org [Wed, 17 Feb 2016 00:45:51 +0000 (00:45 +0000)]
[JSC] Enable B3 on ARM64
https://bugs.webkit.org/show_bug.cgi?id=154275

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-02-16
Reviewed by Mark Lam.

The port passes more tests than LLVM now, let's use it by default.

* dfg/DFGCommon.h:

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

4 years agoUse NSURLCredential from serverTrust when evaluating server trust AuthenticationChall...
achristensen@apple.com [Wed, 17 Feb 2016 00:30:39 +0000 (00:30 +0000)]
Use NSURLCredential from serverTrust when evaluating server trust AuthenticationChallenges with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154316

Reviewed by Brady Eidson.

This fixes http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
and many other layout tests that use https because it allows https connections with servers
with self-signed certificates when TestController::canAuthenticateAgainstProtectionSpace in
WebKitTestRunner says it's OK, or when any other WKPageNavigationClient says it's ok.

* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::serverTrustCredential):

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

4 years agoREGRESSION(r196268): WTFCrashWithSecurityImplication on SVG path animation tests
said@apple.com [Wed, 17 Feb 2016 00:00:54 +0000 (00:00 +0000)]
REGRESSION(r196268): WTFCrashWithSecurityImplication on SVG path animation tests
https://bugs.webkit.org/show_bug.cgi?id=154221

Reviewed by Brent Fulgham.

In r196268, a destructor was added to SVGListPropertyTearOff that notifies
its wrapper (the SVGAnimatedListPropertyTearoff) about its deletion. This
allows the wrapper to nullify any references to the wrapped content.

We needed to do the same thing for SVGPathSegListPropertyTearOff. Both
SVGPathSegListPropertyTearOff and SVGListPropertyTearOff inherit from
SVGListProperty and both hold pointers to SVGAnimatedListPropertyTearOff
which needs to be notified.

Tests: exiting svg path animation tests should not crash.

* svg/properties/SVGPathSegListPropertyTearOff.h:
(WebCore::SVGPathSegListPropertyTearOff::~SVGPathSegListPropertyTearOff):

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

4 years agoREGRESSION (r190430): WTFCrashWithSecurityImplication in:void SVGRootInlineBox::layou...
said@apple.com [Tue, 16 Feb 2016 23:59:25 +0000 (23:59 +0000)]
REGRESSION (r190430): WTFCrashWithSecurityImplication in:void SVGRootInlineBox::layoutCharactersInTextBoxes()
https://bugs.webkit.org/show_bug.cgi?id=154185

Reviewed by Ryosuke Niwa.
Source/WebCore:

This is a regression caused by adding support for HTMLSlotElement. The
crash happens when adding an HTMLSlotElement to anther element which should
not have it as a child like SVGTextElement for example. In this case, we
were creating a RenderText which should not be happen inside an SVG document.
The RenderText::createTextBox() was creating InlineTextBox for the slot's
text and attach it to the SVGRootInlineBox. In layoutCharactersInTextBoxes(),
the assumption is the inline box is either SVGInlineTextBox or SVGInlineFlowBox.
But since we have an InlineTextBox instead, the crash happens when casting
the InlineTextBox to SVGInlineFlowBox.

The fix is for createRenderTreeForSlotAssignees() to not create a renderer
when the parent element should not have a renderer for the this element.
This is the same thing we do for createRenderer() which handles the non
HTMLSlotElement case and which is called also from createRenderTreeRecursively().

Test: fast/shadow-dom/text-slot-child-crash.svg

* style/StyleTreeResolver.cpp:
(WebCore::Style::moveToFlowThreadIfNeeded):
(WebCore::Style::TreeResolver::createRenderer): Delete the check for
shouldCreateRenderer() and handling the case when resolvedStyle is null
since these are handled by the caller createRenderTreeRecursively().

(WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
Assert shouldCreateRenderer() is true for this element.

(WebCore::Style::TreeResolver::createRenderTreeRecursively): Don't create
the renderer if shouldCreateRenderer() returns false. Also handle the case
when resolvedStyle is null and pass the new style to createRenderer().

* style/StyleTreeResolver.h:

LayoutTests:

Ensure that adding an HTMLSlotElement with text to an SVGTextElement will
not create a renderer and we won't crash.

* fast/shadow-dom/text-slot-child-crash-expected.txt: Added.
* fast/shadow-dom/text-slot-child-crash.svg: Added.

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

4 years agoUnreviewed, rolling out r196652.
commit-queue@webkit.org [Tue, 16 Feb 2016 23:47:06 +0000 (23:47 +0000)]
Unreviewed, rolling out r196652.
https://bugs.webkit.org/show_bug.cgi?id=154315

This change caused LayoutTest crashes (Requested by ryanhaddad
on #webkit).

Reverted changeset:

"FTL should support NewTypedArray"
https://bugs.webkit.org/show_bug.cgi?id=154268
http://trac.webkit.org/changeset/196652

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

4 years agoRemoteInspector should forward new automation session requests to its client
bburg@apple.com [Tue, 16 Feb 2016 23:45:27 +0000 (23:45 +0000)]
RemoteInspector should forward new automation session requests to its client
https://bugs.webkit.org/show_bug.cgi?id=154260
<rdar://problem/24663313>

Reviewed by Timothy Hatcher.

* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::xpcConnectionReceivedMessage):
(Inspector::RemoteInspector::listingForAutomationTarget):
Use the correct key for the session identifier in the listing. The name()
override for RemoteAutomationTarget is actually the session identifier.

(Inspector::RemoteInspector::receivedAutomationSessionRequestMessage):
* inspector/remote/RemoteInspectorConstants.h: Add new constants.

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

4 years agoEvery RenderLayer should not have to remove itself from the scrollableArea set
simon.fraser@apple.com [Tue, 16 Feb 2016 23:24:14 +0000 (23:24 +0000)]
Every RenderLayer should not have to remove itself from the scrollableArea set
https://bugs.webkit.org/show_bug.cgi?id=154311

Reviewed by Zalan Bujtas.

A subset of RenderLayers are are scrollable, and get registered on the FrameView,
but we pay the cost of a hash lookup for removal on every RenderLayer, which is a waste.

Store a bit that tells RenderLayer that it's in the set and needs to be removed.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:

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

4 years agoAdd tests for iframe and overflow scrollability after navigating back
simon.fraser@apple.com [Tue, 16 Feb 2016 23:24:11 +0000 (23:24 +0000)]
Add tests for iframe and overflow scrollability after navigating back
https://bugs.webkit.org/show_bug.cgi?id=154300

Reviewed by Brent Fulgham.

Test that sends mousewheel events to overflow and iframe, before and after navigating
forward then back.

These tests detect the regression caused by r188659.

* fast/scrolling/iframe-scrollable-after-back-expected.txt: Added.
* fast/scrolling/iframe-scrollable-after-back.html: Added.
* fast/scrolling/overflow-scrollable-after-back-expected.txt: Added.
* fast/scrolling/overflow-scrollable-after-back.html: Added.
* fast/scrolling/resources/scroll-notifying-page.html: Added.
* platform/ios-simulator/TestExpectations: Skip on iOS.

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

4 years agoCSP: Update violation report 'Content-Type' header
dbates@webkit.org [Tue, 16 Feb 2016 23:22:19 +0000 (23:22 +0000)]
CSP: Update violation report 'Content-Type' header
https://bugs.webkit.org/show_bug.cgi?id=153166
<rdar://problem/24383327>

Reviewed by Brent Fulgham.

Source/WebCore:

Inspired by Blink patch:
<https://src.chromium.org/viewvc/blink?view=rev&revision=154215>

Post the Content Security Policy violation report with Content-Type application/csp-report as
per section Reporting of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.

Currently we post CSP violation reports with Content-Type application/json.

* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript): Use report type ViolationReportType::XSSAuditor to PingLoader.
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendViolationReport): Modified to take argument of type ViolationReportType
to determine the appropriate Content-Type header to use for the report. For a XSS Auditor violation report
we use Content-Type application/json. For a Content Security Policy violation report we use Content-Type
application/csp-report. Additionally, pass a ASCIILiteral() to ResourceRequestBase::setHTTPMethod()
as opposed to a constant string literal to avoid a copy of a constant string literal.
* loader/PingLoader.h: Add enum class ViolationReportType.
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation): Use report type ViolationReportType::ContentSecurityPolicy.

LayoutTests:

Update expected results now that we post the Content Security Policy violation report with
Content-Type application/csp-report.

* TestExpectations: Update associated bugs for entries that still fail.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt:
* http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt:
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt: Fix up HTTP_REFERER and csp-report
to reflect the correct value for HTTP_REFERER and the correct values for the report-uri and document-uri keys in the CSP
report JSON object.

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

4 years agoExtract the code specific to v2 UI out of shared statistics.js
rniwa@webkit.org [Tue, 16 Feb 2016 23:16:25 +0000 (23:16 +0000)]
Extract the code specific to v2 UI out of shared statistics.js
https://bugs.webkit.org/show_bug.cgi?id=154277

Reviewed by Chris Dumez.

Extracted statistics-strategies.js out of statistics.js for v2 UI and detect-changes.js. The intent is to
deprecate this file once we implement refined statistics tools in v3 UI and adopt it in detect-changes.js.

* public/shared/statistics.js:
(Statistics.movingAverage): Extracted from the "Simple Moving Average" strategy.
(Statistics.cumultaiveMovingAverage): Extracted from the "Cumulative Moving Average" strategy.
(Statistics.exponentialMovingAverage): Extracted from the "Exponential Moving Average" strategy.
Use a temporary "movingAverage" to keep the last moving average instead of relying on the previous
entry in "averages" array to avoid special casing an array of length 1 and starting the loop at i = 1.
(Statistics.segmentTimeSeriesGreedyWithStudentsTTest): Extracted from "Segmentation: Recursive t-test"
strategy. Don't create the list of averages to match segmentTimeSeriesByMaximizingSchwarzCriterion here.
It's done in newly added averagesFromSegments.
(Statistics.segmentTimeSeriesByMaximizingSchwarzCriterion): Extracted from
"Segmentation: Schwarz criterion" strategy.
(.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Just store the start index to match
* public/v2/app.js:
(App.Pane.updateStatisticsTools):
(App.Pane._computeMovingAverageAndOutliers):
* public/v2/data.js:
* public/v2/index.html:
* public/v2/statistics-strategies.js: Added.
(StatisticsStrategies.MovingAverageStrategies): Added.
(averagesFromSegments): Extracted from "Segmentation: Schwarz criterion" strategy. Now used by both
"Segmentation: Recursive t-test" and "Segmentation: Schwarz criterion" strategies.
(StatisticsStrategies.EnvelopingStrategies): Moved from Statistics.EnvelopingStrategies.
(StatisticsStrategies.TestRangeSelectionStrategies): Moved from Statistics.TestRangeSelectionStrategies.
(createWesternElectricRule): Moved from statistics.js.
(countValuesOnSameSide): Ditto.
(StatisticsStrategies.executeStrategy): Moved from Statistics.executeStrategy.
* tools/detect-changes.js:
(computeRangesForTesting):

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

4 years agoMarking pageoverlay/overlay-installation.html as flaky on ios-simulator
ryanhaddad@apple.com [Tue, 16 Feb 2016 23:13:18 +0000 (23:13 +0000)]
Marking pageoverlay/overlay-installation.html  as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153337

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoUse pid_t everywhere, instead of PlatformProcessIdentifier
andersca@apple.com [Tue, 16 Feb 2016 22:57:01 +0000 (22:57 +0000)]
Use pid_t everywhere, instead of PlatformProcessIdentifier
https://bugs.webkit.org/show_bug.cgi?id=154306

Reviewed by Sam Weinig.

* Platform/IPC/Connection.h:
* Platform/PlatformProcessIdentifier.h: Removed.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
* UIProcess/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::processIdentifier):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::didFinishLaunchingProcess):
* UIProcess/Launcher/ProcessLauncher.h:
(WebKit::ProcessLauncher::processIdentifier):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processIdentifier):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::networkProcessIdentifier):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoRemove WebKit2 header cruft
andersca@apple.com [Tue, 16 Feb 2016 22:54:26 +0000 (22:54 +0000)]
Remove WebKit2 header cruft
https://bugs.webkit.org/show_bug.cgi?id=154309

Reviewed by Sam Weinig.

* WebKit2.xcodeproj/project.pbxproj:
* mac/WKError.h: Removed.
* mac/WKPreferences.h: Removed.

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

4 years agoRemove unused environment variable classes
andersca@apple.com [Tue, 16 Feb 2016 22:43:19 +0000 (22:43 +0000)]
Remove unused environment variable classes
https://bugs.webkit.org/show_bug.cgi?id=154308

Reviewed by Tim Horton.

* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: Removed.
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: Removed.
(WebKit::DynamicLinkerEnvironmentExtractor::DynamicLinkerEnvironmentExtractor): Deleted.
(WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): Deleted.
(WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommand): Deleted.
(WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommands): Deleted.
(WebKit::DynamicLinkerEnvironmentExtractor::processSingleArchitecture): Deleted.
(WebKit::DynamicLinkerEnvironmentExtractor::processFatFile): Deleted.
(WebKit::DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables): Deleted.
* UIProcess/Launcher/mac/EnvironmentVariables.cpp: Removed.
(WebKit::EnvironmentVariables::EnvironmentVariables): Deleted.
(WebKit::EnvironmentVariables::~EnvironmentVariables): Deleted.
(WebKit::EnvironmentVariables::set): Deleted.
(WebKit::EnvironmentVariables::get): Deleted.
(WebKit::EnvironmentVariables::appendValue): Deleted.
(WebKit::EnvironmentVariables::valueIfVariableHasName): Deleted.
(WebKit::EnvironmentVariables::createStringForVariable): Deleted.
(WebKit::EnvironmentVariables::copyEnvironmentVariables): Deleted.
(WebKit::EnvironmentVariables::dump): Deleted.
* UIProcess/Launcher/mac/EnvironmentVariables.h: Removed.
(WebKit::EnvironmentVariables::environmentPointer): Deleted.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoSamplingProfiler still fails with ASan enabled
sbarati@apple.com [Tue, 16 Feb 2016 22:01:37 +0000 (22:01 +0000)]
SamplingProfiler still fails with ASan enabled
https://bugs.webkit.org/show_bug.cgi?id=154301
<rdar://problem/24679502>

Reviewed by Filip Pizlo.

To fix this issue, I've come up with unsafe versions
of all operations that load memory from the thread's call
frame. All these new unsafe methods are marked with SUPPRESS_ASAN.

* interpreter/CallFrame.cpp:
(JSC::CallFrame::callSiteAsRawBits):
(JSC::CallFrame::unsafeCallSiteAsRawBits):
(JSC::CallFrame::callSiteIndex):
(JSC::CallFrame::unsafeCallSiteIndex):
(JSC::CallFrame::stack):
(JSC::CallFrame::callerFrame):
(JSC::CallFrame::unsafeCallerFrame):
(JSC::CallFrame::friendlyFunctionName):
* interpreter/CallFrame.h:
(JSC::ExecState::calleeAsValue):
(JSC::ExecState::callee):
(JSC::ExecState::unsafeCallee):
(JSC::ExecState::codeBlock):
(JSC::ExecState::unsafeCodeBlock):
(JSC::ExecState::scope):
(JSC::ExecState::callerFrame):
(JSC::ExecState::callerFrameOrVMEntryFrame):
(JSC::ExecState::unsafeCallerFrameOrVMEntryFrame):
(JSC::ExecState::callerFrameOffset):
(JSC::ExecState::callerFrameAndPC):
(JSC::ExecState::unsafeCallerFrameAndPC):
* interpreter/Register.h:
(JSC::Register::codeBlock):
(JSC::Register::asanUnsafeCodeBlock):
(JSC::Register::unboxedInt32):
(JSC::Register::tag):
(JSC::Register::unsafeTag):
(JSC::Register::payload):
* interpreter/VMEntryRecord.h:
(JSC::VMEntryRecord::prevTopCallFrame):
(JSC::VMEntryRecord::unsafePrevTopCallFrame):
(JSC::VMEntryRecord::prevTopVMEntryFrame):
(JSC::VMEntryRecord::unsafePrevTopVMEntryFrame):
* runtime/SamplingProfiler.cpp:
(JSC::FrameWalker::walk):
(JSC::FrameWalker::advanceToParentFrame):
(JSC::FrameWalker::isAtTop):
(JSC::FrameWalker::resetAtMachineFrame):

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

4 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Tue, 16 Feb 2016 21:42:26 +0000 (21:42 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196648

Unreviewed test gardening.

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

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

4 years agoAdd checks before redirecting with NetworkSession
achristensen@apple.com [Tue, 16 Feb 2016 21:25:30 +0000 (21:25 +0000)]
Add checks before redirecting with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154298

Reviewed by Andy Estes.

Source/WebCore:

This fixes http/tests/security/cors-post-redirect-307.html and
http/tests/navigation/post-307-response.html when using NetworkSession.

* platform/network/ResourceRequestBase.h:
WEBCORE_EXPORT some functions newly used in WebKit2.

Source/WebKit2:

* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::create):
(WebKit::NetworkDataTask::setPendingDownload):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::~NetworkDataTask):
(WebKit::NetworkDataTask::willPerformHTTPRedirection):
Implemented based on ResourceHandle::willSendRequest but with two notable exceptions:
1. When using NSURLConnection, the last http method and the current http method are not always equal, and this
check needs to change the current http method to match the last http method when being redirected with an http
status code 307.  When using NSURLSession, the current http method is already updated properly.
2. I did not copy the part of ResourceHandle::willSendRequest that uses a CredentialStorage.  I'm trying to avoid
using CredentialStorages with NSURLSession.
(WebKit::NetworkDataTask::scheduleFailure):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):

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

4 years agoCSP: Fix parsing of 'host/path' source expressions
dbates@webkit.org [Tue, 16 Feb 2016 21:18:19 +0000 (21:18 +0000)]
CSP: Fix parsing of 'host/path' source expressions
https://bugs.webkit.org/show_bug.cgi?id=153170
<rdar://problem/24383407>

Reviewed by Brent Fulgham.

Source/WebCore:

Merged from Blink (patch by Mike West):
<https://src.chromium.org/viewvc/blink?revision=154875&view=revision>

Fixes an issue where a source of the form example.com/A/ was incorrectly considered
invalid and hence such a requested resource would be blocked. A source of this form
is valid by the definition of host-source in section Source List Syntax of the Content
Security Policy 2.0 spec., <http://www.w3.org/TR/2015/CR-CSP2-20150721/>.

* page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::parseSource):

LayoutTests:

Remove entry for test http/tests/security/contentSecurityPolicy/source-list-parsing-paths-03.html
as it now passes.

* TestExpectations:

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

4 years agoJSContext Inspector: Support for inline source maps
commit-queue@webkit.org [Tue, 16 Feb 2016 21:17:31 +0000 (21:17 +0000)]
JSContext Inspector: Support for inline source maps
https://bugs.webkit.org/show_bug.cgi?id=154303
<rdar://problem/24670392>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-16
Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Base/URLUtilities.js:
(parseDataURL):
Break a data URL into components.

* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
Handle a data URL without using NetworkAgent. Also move references
to a main frame after checking for NetworkAgent.

* UserInterface/Models/SourceMap.js:
(WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.get sourceMapDisplaySubpath):
Handle JavaScript debuggable script URLs which may not be complete URLs.

(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
Also handle if NetworkAgent does not exist.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
When connected to a JavaScript debuggable we were hiding disclosure
triangles as we did not expect resources to have subresources. If
a SourceMap is added, show them again.

LayoutTests:

* inspector/unit-tests/url-utilities-expected.txt: Added.
* inspector/unit-tests/url-utilities.html: Added.

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

4 years agoCSP: Disallow an empty host in a host-source source expression
dbates@webkit.org [Tue, 16 Feb 2016 21:16:18 +0000 (21:16 +0000)]
CSP: Disallow an empty host in a host-source source expression
https://bugs.webkit.org/show_bug.cgi?id=153168
<rdar://problem/24383366>

Reviewed by Brent Fulgham.

Source/WebCore:

Merged from Blink (patch by rob@robwu.nl):
<https://src.chromium.org/viewvc/blink?revision=180407&view=revision>

* page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::parseSource):

LayoutTests:

Remove entry for test http/tests/security/contentSecurityPolicy/source-list-parsing-07.html
as it now passes.

* TestExpectations:

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

4 years agoFTL should support NewTypedArray
fpizlo@apple.com [Tue, 16 Feb 2016 21:12:04 +0000 (21:12 +0000)]
FTL should support NewTypedArray
https://bugs.webkit.org/show_bug.cgi?id=154268

Reviewed by Saam Barati.

3% speed-up on pdfjs. This was already covered by many different tests.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToLLVM::compileAllocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateBasicStorageAndGetEnd):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateBasicStorage):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateObject):

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

4 years agoModern IDB: WK2 IPC Scaffolding.
beidson@apple.com [Tue, 16 Feb 2016 20:58:56 +0000 (20:58 +0000)]
Modern IDB: WK2 IPC Scaffolding.
https://bugs.webkit.org/show_bug.cgi?id=154296

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.

Source/WebCore:

* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/shared/IDBResourceIdentifier.h:

Source/WebKit2:

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::establishIDBConnectionToServer):
(WebKit::DatabaseToWebProcessConnection::removeIDBConnectionToServer):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/DatabaseToWebProcessConnection.messages.in:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp: Added.
(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::messageSenderConnection):
(WebKit::WebIDBConnectionToClient::connectionToClient):
(WebKit::WebIDBConnectionToClient::didDeleteDatabase):
(WebKit::WebIDBConnectionToClient::didOpenDatabase):
(WebKit::WebIDBConnectionToClient::didAbortTransaction):
(WebKit::WebIDBConnectionToClient::didCommitTransaction):
(WebKit::WebIDBConnectionToClient::didCreateObjectStore):
(WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
(WebKit::WebIDBConnectionToClient::didClearObjectStore):
(WebKit::WebIDBConnectionToClient::didCreateIndex):
(WebKit::WebIDBConnectionToClient::didDeleteIndex):
(WebKit::WebIDBConnectionToClient::didPutOrAdd):
(WebKit::WebIDBConnectionToClient::didGetRecord):
(WebKit::WebIDBConnectionToClient::didGetCount):
(WebKit::WebIDBConnectionToClient::didDeleteRecord):
(WebKit::WebIDBConnectionToClient::didOpenCursor):
(WebKit::WebIDBConnectionToClient::didIterateCursor):
(WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::didStartTransaction):
(WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h: Added.

* Platform/Logging.h:

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp: Added.
(WebKit::generateConnectionToServerIdentifier):
(WebKit::WebIDBConnectionToServer::create):
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::messageSenderConnection):
(WebKit::WebIDBConnectionToServer::coreConnectionToServer):
(WebKit::WebIDBConnectionToServer::deleteDatabase):
(WebKit::WebIDBConnectionToServer::openDatabase):
(WebKit::WebIDBConnectionToServer::abortTransaction):
(WebKit::WebIDBConnectionToServer::commitTransaction):
(WebKit::WebIDBConnectionToServer::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToServer::createObjectStore):
(WebKit::WebIDBConnectionToServer::deleteObjectStore):
(WebKit::WebIDBConnectionToServer::clearObjectStore):
(WebKit::WebIDBConnectionToServer::createIndex):
(WebKit::WebIDBConnectionToServer::deleteIndex):
(WebKit::WebIDBConnectionToServer::putOrAdd):
(WebKit::WebIDBConnectionToServer::getRecord):
(WebKit::WebIDBConnectionToServer::getCount):
(WebKit::WebIDBConnectionToServer::deleteRecord):
(WebKit::WebIDBConnectionToServer::openCursor):
(WebKit::WebIDBConnectionToServer::iterateCursor):
(WebKit::WebIDBConnectionToServer::establishTransaction):
(WebKit::WebIDBConnectionToServer::databaseConnectionClosed):
(WebKit::WebIDBConnectionToServer::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToServer::didFireVersionChangeEvent):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: Added.

* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
* WebProcess/Databases/WebDatabaseProvider.h:

* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession):
* WebProcess/Databases/WebToDatabaseProcessConnection.h:

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

4 years agostress/sampling-profiler-deep-stack.js fails on ARM 32bit
sbarati@apple.com [Tue, 16 Feb 2016 20:50:46 +0000 (20:50 +0000)]
stress/sampling-profiler-deep-stack.js fails on ARM 32bit
https://bugs.webkit.org/show_bug.cgi?id=154255
<rdar://problem/24662996>

Reviewed by Mark Lam.

The bug here wasn't in the implementation of the sampling profiler
itself. Rather, it was a bug in the test. JSC wasn't spending a lot
of time in a function that the test assumed a lot of time was spent in.
That's because the DFG was doing a good job at optimizing the function
at the leaf of the recursion. Because of that, we often wouldn't sample it.
I fixed this by making the leaf function do more work.

* tests/stress/sampling-profiler-deep-stack.js:
(platformSupportsSamplingProfiler.foo):

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

4 years ago[Web IDL] Operations should be on the instance for global objects or if [Unforgeable]
cdumez@apple.com [Tue, 16 Feb 2016 20:23:02 +0000 (20:23 +0000)]
[Web IDL] Operations should be on the instance for global objects or if [Unforgeable]
https://bugs.webkit.org/show_bug.cgi?id=154120
<rdar://problem/24613231>

Reviewed by Gavin Barraclough.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

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

Source/JavaScriptCore:

Have putEntry() take a thisValue parameter in addition to the base,
instead of relying on PropertySlot::thisValue() because this did not
always do the right thing. In particular, when JSDOMWindow::put() was
called to set a function, it would end up setting the new value on the
JSDOMWindowShell instead of the actual JSDOMWindow.
JSDOMWindow::getOwnPropertySlot() would then not be able to find it.
Therefore the following would fail:
$ window.open = "test"
$ console.log(window.open) // prints the native function instead of "test"

* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
* runtime/Lookup.h:
(JSC::putEntry):
(JSC::lookupPut):

Source/WebCore:

Operations should be on the instance for global objects or if
[Unforgeable] as per the Web IDL specification:
- http://heycam.github.io/webidl/#es-operations
- http://heycam.github.io/webidl/#dfn-unforgeable-on-an-interface

This patch implements this behavior in order to align
with the specification and other browsers.

No new tests, already covered by existing tests.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
Update function names now that they have "Instance" in their
name instead of "Prototype".

(WebCore::JSDOMWindow::getOwnPropertySlot):
- Update function names now that they have "Instance" in their
  name instead of "Prototype".
- Move the functions hard-coding *before* the static table check
  now that these functions are in the static table to maintain
  the previous behavior.

* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
Update function names now that they have "Instance" in their
name instead of "Prototype".

* bindings/scripts/CodeGeneratorJS.pm:
- Move functions to the instance if their interface is a global
  object or if they are marked as [Unforgeable]. Operations are
  now treated more like attributes, as they can now be either on
  the instance or the prototype. In a lot of places, I now use
  the naming "properties" instead of "attributes" as "properties"
  refer both "attributes" and "operations" / "functions".

* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
Rebaseline bindings tests.

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
Rebaseline test because the order of static properties has changed:
functions are now before constants instead of after.

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

4 years agoAdd a redirect for B3 documentation
jond@apple.com [Tue, 16 Feb 2016 20:18:11 +0000 (20:18 +0000)]
Add a redirect for B3 documentation
https://bugs.webkit.org/show_bug.cgi?id=154293

Reviewed by Timothy Hatcher.

* .htaccess:

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

4 years agoMarking webarchive/loading/missing-data.html as flaky on ios-simulator-wk2
ryanhaddad@apple.com [Tue, 16 Feb 2016 19:53:10 +0000 (19:53 +0000)]
Marking webarchive/loading/missing-data.html as flaky on ios-simulator-wk2
https://bugs.webkit.org/show_bug.cgi?id=153380

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoRevert r195826.
weinig@apple.com [Tue, 16 Feb 2016 19:33:54 +0000 (19:33 +0000)]
Revert r195826.

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

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

4 years agoClonedArguments should not materialize its special properties unless they are being...
keith_miller@apple.com [Tue, 16 Feb 2016 19:28:09 +0000 (19:28 +0000)]
ClonedArguments should not materialize its special properties unless they are being changed or deleted
https://bugs.webkit.org/show_bug.cgi?id=154128

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Before we would materialize ClonedArguments whenever they were being accessed.
However this would cause the IC to miss every time as the structure for
the arguments object would change as we went to IC it. Thus on the next
function call we would miss the cache since the new arguments object
would not have materialized the value.

* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::getOwnPropertySlot):
* tests/stress/cloned-arguments-modification.js: Added.
(foo):

LayoutTests:

Have argumnets-strict-mode test the speed of spreading the arguments object.

* js/regress/script-tests/arguments-strict-mode.js:
(foo):

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

4 years agoMarking fast/events/keydown-1.html as flaky on mac-wk1 debug
ryanhaddad@apple.com [Tue, 16 Feb 2016 19:13:17 +0000 (19:13 +0000)]
Marking fast/events/keydown-1.html as flaky on mac-wk1 debug
https://bugs.webkit.org/show_bug.cgi?id=154297

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

4 years agoFTL should support StringFromCharCode
fpizlo@apple.com [Tue, 16 Feb 2016 19:12:36 +0000 (19:12 +0000)]
FTL should support StringFromCharCode
https://bugs.webkit.org/show_bug.cgi?id=154267
Source/JavaScriptCore:

rdar://problem/24192536

Reviewed by Mark Lam.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode): Fix a bug preventing the UntypedUse from being effective.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStringFromCharCode): Implement the opcode.
* tests/stress/string-from-char-code-slow.js: Added.

LayoutTests:

Reviewed by Mark Lam.

* js/regress/script-tests/string-from-char-code.js: Added.
(result):
* js/regress/script-tests/untyped-string-from-char-code.js: Added.
(result):
* js/regress/string-from-char-code-expected.txt: Added.
* js/regress/string-from-char-code.html: Added.
* js/regress/untyped-string-from-char-code-expected.txt: Added.
* js/regress/untyped-string-from-char-code.html: Added.

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

4 years agoRollout r188659. This broke scrolling of iframes and overflow when
simon.fraser@apple.com [Tue, 16 Feb 2016 18:48:36 +0000 (18:48 +0000)]
Rollout r188659. This broke scrolling of iframes and overflow when
navigating back to a page in the page cache.

The fix was overly agressive and had no layout test. I will fix the original
issue a different way.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* page/FrameView.cpp:
(WebCore::FrameView::clearScrollableAreas): Deleted.
* page/FrameView.h:

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

4 years ago[GTK] No hover-horizontal scrolling available
carlosgc@webkit.org [Tue, 16 Feb 2016 18:15:37 +0000 (18:15 +0000)]
[GTK] No hover-horizontal scrolling available
https://bugs.webkit.org/show_bug.cgi?id=122859

Reviewed by Michael Catanzaro.

Source/WebCore:

This is a regression of WebKit2, because in WebKit1 we used native
widgets for frame scrollbars that handled this automatically. Now
we need to also check if the mouse is over frame scrollbars to
adjust the wheel event.

Test: platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Pass the adjusted wheel
event to platformCompleteWheelEvent().
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
Check also frame scrollbars.

LayoutTests:

* platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll-expected.html: Added.
* platform/gtk/scrollbars/main-frame-scrollbar-horizontal-wheel-scroll.html: Added.

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

4 years agoFactor id mutation style invalidation code into a class
antti@apple.com [Tue, 16 Feb 2016 17:24:01 +0000 (17:24 +0000)]
Factor id mutation style invalidation code into a class
https://bugs.webkit.org/show_bug.cgi?id=154287

Reviewed by Andreas Kling.

Source/WebCore:

Also add a cheap basic optimization that avoids descendant invalidation if they can not be affected.

It would be easy to implement fine grained invalidation like with classes and attribute selectors.
However dynamic id changes are not common enough (nor recommended) to pay the memory cost of
the required data structures.

Test: fast/css/style-invalidation-id-change-descendants.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
* dom/Element.cpp:
(WebCore::makeIdForStyleResolution):
(WebCore::Element::attributeChanged):
(WebCore::checkNeedsStyleInvalidationForIdChange): Deleted.
* style/IdChangeInvalidation.cpp: Added.
(WebCore::Style::IdChangeInvalidation::invalidateStyle):
* style/IdChangeInvalidation.h: Added.
(WebCore::Style::IdChangeInvalidation::IdChangeInvalidation):
(WebCore::Style::IdChangeInvalidation::~IdChangeInvalidation):

LayoutTests:

* fast/css/style-invalidation-id-change-descendants-expected.txt: Added.
* fast/css/style-invalidation-id-change-descendants.html: Added.

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

4 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Tue, 16 Feb 2016 17:12:26 +0000 (17:12 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196621

Unreviewed test gardening.

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

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

4 years agoWeb Inspector: Increase the width of the find banner's search field
nvasilyev@apple.com [Tue, 16 Feb 2016 16:42:10 +0000 (16:42 +0000)]
Web Inspector: Increase the width of the find banner's search field
https://bugs.webkit.org/show_bug.cgi?id=154284

Reviewed by Timothy Hatcher.

* UserInterface/Views/FindBanner.css:
(.find-banner > input[type="search"]):
Keep the minimum width the same as the current width.

(body .find-banner.console-find-banner):
Overwrite ".navigation-bar .item {flex-wrap: nowrap}".

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

4 years agoDrop StyleResolver and SelectorQueryCache when entering PageCache.
akling@apple.com [Tue, 16 Feb 2016 10:00:15 +0000 (10:00 +0000)]
Drop StyleResolver and SelectorQueryCache when entering PageCache.
<https://webkit.org/b/154238>

Reviewed by Antti Koivisto.

Source/WebCore:

Stop keeping these around for cached pages to save lots of memory.
We can easily rebuild them if a cached navigation occurs, and this
way we also don't need to worry about invalidating style for cached
pages in all the right places.

Restoring a cached page will now lead to a forced style recalc.
We don't try to defer this (beyond a zero-timer) since it's going
to happen anyway, and it's nicer to front-load the cost rather than
stuttering on the first user content interaction.

* dom/Document.cpp:
(WebCore::Document::setInPageCache):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
(WebCore::CachedPage::clear): Deleted.
* history/CachedPage.h:
(WebCore::CachedPage::markForVisitedLinkStyleRecalc): Deleted.
(WebCore::CachedPage::markForFullStyleRecalc): Deleted.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
(WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
* history/PageCache.h:
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors): Deleted.
* page/Page.cpp:
(WebCore::Page::setViewScaleFactor): Deleted.
(WebCore::Page::setDeviceScaleFactor): Deleted.
(WebCore::Page::setPagination): Deleted.
(WebCore::Page::setPaginationLineGridEnabled): Deleted.
(WebCore::Page::setVisitedLinkStore): Deleted.

Source/WebKit/win:

* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::removeAllVisitedLinks): Deleted.
(WebVisitedLinkStore::addVisitedLinkHash): Deleted.

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

4 years ago[GTK] clicking on the scrollbar trough steps rather than jumps to the clicked position
carlosgc@webkit.org [Tue, 16 Feb 2016 09:50:26 +0000 (09:50 +0000)]
[GTK] clicking on the scrollbar trough steps rather than jumps to the clicked position
https://bugs.webkit.org/show_bug.cgi?id=115363

Reviewed by Michael Catanzaro.

Allow ScrollbarTheme to decide the behavior of a button press event,
instead of only deciding whether to center on thumb or not. This
way we can match the current GTK+ behavior in WebKit, without
affecting other ports.

* platform/ScrollTypes.h: Add ScrollbarButtonPressAction enum.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::mouseDown): Ask ScrollbarTheme to handle the
event for the pressed part and do the requested action.
* platform/ScrollbarTheme.cpp:
(WebCore::ScrollbarTheme::handleMousePressEvent): Add default
implementation. It's equivalent to the previous default implementation.
* platform/ScrollbarTheme.h:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::handleMousePressEvent): Match current
GTK+ behavior: left click centers on thumb and right click
scrolls. Dragging the thumb works for left and middle buttons.
* platform/gtk/ScrollbarThemeGtk.h:
* platform/ios/ScrollbarThemeIOS.h: Remove shouldCenterOnThumb,
and don't override handleMousePressEvent since iOS wants the
default behavior.
* platform/ios/ScrollbarThemeIOS.mm:
* platform/mac/ScrollbarThemeMac.h: Override handleMousePressEvent
and remove shouldCenterOnThumb.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::shouldCenterOnThumb): Same implementation just made it
static to be used as helper.
(WebCore::ScrollbarThemeMac::handleMousePressEvent): Return the
desired action keeping the same behavior.
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::handleMousePressEvent): Ditto.
* platform/win/ScrollbarThemeWin.h:
* rendering/RenderScrollbarTheme.h:

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

4 years agoMouse cursor doesn't change when entering scrollbars
carlosgc@webkit.org [Tue, 16 Feb 2016 09:45:41 +0000 (09:45 +0000)]
Mouse cursor doesn't change when entering scrollbars
https://bugs.webkit.org/show_bug.cgi?id=154243

Reviewed by Simon Fraser.

If the scrollbar is over or very close to text or a link, when
entering the scrollbar the cursor is not changed, keeping the beam
or hand cursor when using the scrollbar. Same happens for image
documents where the magnifier cursor is used and it remains when
entering the scrollbars. We should use pointer cursor always for
scrollbars.

* page/EventHandler.cpp:
(WebCore::EventHandler::updateCursor): Request also to include
frame scrollbars in hit test result.
(WebCore::EventHandler::selectCursor): Use always pointer cursor
for scrollbars.

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

4 years ago[Mac][cmake] Unreviewed buildfix after r196488. Just for fun.
ossy@webkit.org [Tue, 16 Feb 2016 09:33:27 +0000 (09:33 +0000)]
[Mac][cmake] Unreviewed buildfix after r196488. Just for fun.

* PlatformMac.cmake:

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

4 years agoOptimize style invalidations for attribute selectors
antti@apple.com [Tue, 16 Feb 2016 08:20:58 +0000 (08:20 +0000)]
Optimize style invalidations for attribute selectors
https://bugs.webkit.org/show_bug.cgi?id=154242

Reviewed by Andreas Kling.

Source/WebCore:

Currently we invalidate the whole element subtree if there are any attribute selectors for the changed attribute.
This is slow as generally few if any elements are really affected. Using attribute selectors for dynamic styling
should be performant.

This patch implements optimization strategy for attributes similar to what we already have for classes:

- Collect a map of all rules that contains descendant-affecting attribute selectors for a given attribute.
- When an attribute value changes check if there are any such rules for it.
- Check if the value change affects the results of any of the attribute selectors.
- Only if it does invalidate the exact descendant elements affected by the rules.

Test: fast/css/style-invalidation-attribute-change-descendants.html

* WebCore.xcodeproj/project.pbxproj:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::ancestorClassRules):
(WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML):

    Create optimization RuleSets when needed.

* css/DocumentRuleSets.h:
(WebCore::DocumentRuleSets::uncommonAttribute):
(WebCore::DocumentRuleSets::features):
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::makeAttributeSelectorKey):
(WebCore::RuleFeatureSet::collectFeatures):

    Collect rules with descendant affecting attribute selectors.

(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
(WebCore::RuleFeatureSet::shrinkToFit):
* css/RuleFeature.h:
* css/SelectorChecker.cpp:
(WebCore::anyAttributeMatches):
(WebCore::SelectorChecker::attributeSelectorMatches):

    Expose function for matching single attribute selectors.

(WebCore::canMatchHoverOrActiveInQuirksMode):
* css/SelectorChecker.h:
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
(WebCore::makeIdForStyleResolution):
(WebCore::Element::attributeChanged):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::addAttributeInternal):
(WebCore::Element::removeAttribute):

    Add AttributeChangeInvalidation where needed.

(WebCore::Element::needsStyleInvalidation):

    Move to Element from ClassChangeInvalidation.

(WebCore::Element::willModifyAttribute):

    No more full style invalidation on attribute change.

* style/AttributeChangeInvalidation.cpp: Added.
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):

    Invalidate local style.
    Check if we need to invalidate descendants by looking into ancestorAttributeRules.

(WebCore::Style::AttributeChangeInvalidation::invalidateDescendants):

    Use StyleInvalidationAnalysis to invalidate the subtree for the relevant rules.

* style/AttributeChangeInvalidation.h: Added.
(WebCore::Style::AttributeChangeInvalidation::needsInvalidation):
(WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
(WebCore::Style::AttributeChangeInvalidation::~AttributeChangeInvalidation):

    If needed, invalidate descendants before and after attribute change to catch rules that start and stop applying.

LayoutTests:

* fast/css/style-invalidation-attribute-change-descendants-expected.txt: Added.
* fast/css/style-invalidation-attribute-change-descendants.html: Added.

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

4 years agoDo security checks early in JSDOMWindow::put*()
cdumez@apple.com [Tue, 16 Feb 2016 08:11:47 +0000 (08:11 +0000)]
Do security checks early in JSDOMWindow::put*()
https://bugs.webkit.org/show_bug.cgi?id=154270

Reviewed by Gavin Barraclough.

Source/WebCore:

Do security checks early in JSDOMWindow::put() / JSDOMWindow::putByIndex()
and return as soon as possible. This makes it less error-prone as we need
to do the security check only once, at the top of the function.

Also lock down the security further by calling lookupPut() only if the
property name is "location". The "location" property is the only one that
can be set cross-origin. Previously, trying to set a property such as
"name" (which cannot be set cross-origin) relied on the attribute setter
doing the security check when getting called. The new check is less error
prone and will correctly prevent overriding window's method cross-origin
once these move down from the prototype (Bug 154120).

Finally, the previous code was failing to set the "location" property
cross-origin after the window has been reified. This patch fixes the
issue by always calling the original "location" property setter from the
static table in the cross-origin case.

Test: http/tests/security/cross-origin-reified-window-location-setting.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
(WebCore::JSDOMWindow::putByIndex):

LayoutTests:

* http/tests/security/cross-frame-access-put-expected.txt:
Rebaseline. The extra security warnings are for the following properties:
closed, crypto, frameElement, pageXOffset and pageYOffset.
All these properties are read-only and therefore cannot be set (cross-origin
or not). The previous code was not doing an explicit check and ended up
trying to set these properties. However, since they are read-only, we would
silently fail to set them. The new code does the explicit check and therefore
will warn and NOT attempt to set.

* http/tests/security/cross-origin-reified-window-location-setting-expected.txt: Added.
* http/tests/security/cross-origin-reified-window-location-setting.html: Added.
Add test to check that setting window.location cross-origin still works after the
window object has been reified.

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

4 years ago[ARMv7] Some JSC test fails due to exhausting the JIT code heap on the no LLINT test...
mark.lam@apple.com [Tue, 16 Feb 2016 07:10:11 +0000 (07:10 +0000)]
[ARMv7] Some JSC test fails due to exhausting the JIT code heap on the no LLINT test configuration.
https://bugs.webkit.org/show_bug.cgi?id=151611

Reviewed by Saam Barati.

These tests are only failing because they are compiling too much with the LLINT
disabled.  As a result, they are using more JIT code heap space than is allowed
by the OS.

This patch excludes these tests from the noLLINT configuration on 32-bit ARM.

* js/script-tests/dfg-float32array.js:
* js/script-tests/dfg-float64array.js:
* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int32array-overflow-values.js:
* js/script-tests/dfg-int32array.js:
* js/script-tests/dfg-int8array.js:
* js/script-tests/dfg-osr-entry-hoisted-clobbered-structure-check.js:
* js/script-tests/dfg-uint16array.js:
* js/script-tests/dfg-uint32array-overflow-values.js:
* js/script-tests/dfg-uint32array.js:
* js/script-tests/dfg-uint8array.js:
* js/script-tests/dfg-uint8clampedarray.js:
* js/script-tests/regress-141098.js:

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

4 years agoRemoved unused files after r196478.
mitz@apple.com [Tue, 16 Feb 2016 06:42:59 +0000 (06:42 +0000)]
Removed unused files after r196478.

* Configurations/DatabaseProcess.xcconfig: Removed.
* Configurations/NetworkProcess.xcconfig: Removed.
* Configurations/PluginProcess.xcconfig: Removed.
* Configurations/WebContentProcess.xcconfig: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[ThreadedCompositor] position:fixed elements do not have their own layers when thread...
changseok.oh@collabora.com [Tue, 16 Feb 2016 05:39:57 +0000 (05:39 +0000)]
[ThreadedCompositor] position:fixed elements do not have their own layers when threaded compositor is enabled.
https://bugs.webkit.org/show_bug.cgi?id=154100

Reviewed by Carlos Garcia Campos.

Currently, fixed elements are redrawn to a backing store every time layout or scroll happens.
It results in the bad effect on performance-wise. Letting fixed element have separate layers is
necessary when threaded compositor is enabled at least. Because async scrolling requires it.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updatePreferences):

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

4 years ago[Mac] Gather some rudimentary statistics during resource load
bfulgham@apple.com [Tue, 16 Feb 2016 05:36:38 +0000 (05:36 +0000)]
[Mac] Gather some rudimentary statistics during resource load
https://bugs.webkit.org/show_bug.cgi?id=153575
<rdar://problem/24075254>

Reviewed by Brady Eidson.

Source/WebCore:

Tested by: http/tests/navigation/statistics.html

* CMakeLists.txt:
* PlatformWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::updateLastHandledUserGestureTimestamp): Log user interaction
with the ResourceLoadObserver.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Track load statistics if the
user interacted with the document.
* loader/ResourceLoadObserver.cpp: Added.
* loader/ResourceLoadObserver.h: Added.
* loader/ResourceLoadStatistics.cpp: Added.
* loader/ResourceLoadStatistics.h: Added.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal): Track load statistics.
* page/Settings.cpp:
(WebCore::Settings::setResourceLoadStatisticsEnabled): Added.
* page/Settings.h:
(WebCore::Settings::resourceLoadStatisticsEnabled): Added.
* platform/Logging.h:
* testing/Internals.cpp:
(WebCore::Internals::resourceLoadStatisticsForOrigin):
(WebCore::Internals::setResourceLoadStatisticsEnabled):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit/mac:

* Misc/WebKitNSStringExtras.h:
* Misc/WebKitNSStringExtras.mm:
(+[NSString _webkit_localStorageDirectoryWithBundleIdentifier:]): Added.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences resourceLoadStatisticsEnabled]): Added.
(-[WebPreferences setResourceLoadStatisticsEnabled:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(WebKitInitializeApplicationCachePathIfNecessary):
(WebKitInitializeApplicationStatisticsStoragePathIfNecessary): Added.
(-[WebView _commonInitializationWithFrameName:groupName:]): Add call to new
initialization method.
(-[WebView _preferencesChanged:]): Track changes in the user's desire to
monitor resource load statistics.
(+[WebView _applicationWillTerminate]): Write statistics to disk (if preferences
say to do so.)

Tools:

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]): Add menu item for new debug flag.
(-[SettingsController toggleResourceLoadStatisticsEnabled:]): Added.
(-[SettingsController resourceLoadStatisticsEnabled]): Added.
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]): React to changes in
users's desire to track resource load statistics.

LayoutTests:

* http/tests/navigation/resources/redirect-on-reload-updates-history-item-statistics.php: Added.
* http/tests/navigation/resources/redirect-updates-history-item-done-statistics.html: Added.
* http/tests/navigation/statistics-expected.txt: Added.
* http/tests/navigation/statistics.html: Added.

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

4 years agoThe following properties should exist on the global object: AudioTrackList, AudioTrac...
cdumez@apple.com [Tue, 16 Feb 2016 05:32:56 +0000 (05:32 +0000)]
The following properties should exist on the global object: AudioTrackList, AudioTrack, VideoTrackList, VideoTrack
https://bugs.webkit.org/show_bug.cgi?id=154250
<rdar://problem/24660829>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

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

Source/WebCore:

The following properties should exist on the global object:
- AudioTrackList, AudioTrack, VideoTrackList, VideoTrack

These interfaces are not marked as [NoInterfaceObject] in:
- https://html.spec.whatwg.org/#audiotracklist-and-videotracklist-objects

No new tests, already covered by existing tests.

* html/track/AudioTrack.idl:
* html/track/AudioTrackList.idl:
* html/track/VideoTrack.idl:
* html/track/VideoTrackList.idl:

LayoutTests:

Rebaseline now that AudioTrackList, AudioTrack, VideoTrackList and VideoTrack
are exposed on the global Window object.

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

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

4 years agoWeb Inspector: Non-overlay scrollbars obscure the ends of lines in the console and...
nvasilyev@apple.com [Tue, 16 Feb 2016 05:15:22 +0000 (05:15 +0000)]
Web Inspector: Non-overlay scrollbars obscure the ends of lines in the console and sidebars
https://bugs.webkit.org/show_bug.cgi?id=154276

Reviewed by Timothy Hatcher.

* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
* UserInterface/Views/DatabaseContentView.css:
(.storage-view.query):
* UserInterface/Views/LogContentView.css:
(.content-view.log):
Replace all occurrences of "overflow-y: overlay" with "overflow-y: auto".

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

4 years ago[JSC] BranchAdd can override arguments of its stackmap
commit-queue@webkit.org [Tue, 16 Feb 2016 04:51:20 +0000 (04:51 +0000)]
[JSC] BranchAdd can override arguments of its stackmap
https://bugs.webkit.org/show_bug.cgi?id=154274

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

With the 3 operands BranchAdd added in r196513, we can run into
a register allocation such that the destination register is also
used by a value in the stack map.

It use to be that BranchAdd was a 2 operand instruction.
In that form, the destination is also one of the source and
can be recovered through Sub. There is no conflict between
destination and the stackmap.

After r196513, the destination has its own value. It is uncommon
on x86 because of the aggressive aliasing but that can happen.
On ARM, that's a standard form since there is no need for aliasing.

Since the arguments of the stackmap are of type EarlyUse,
they appeared as not interfering with the destination. When the register
allocator gives the same register to the destination and something in
the stack map, the result of BranchAdd destroys the value kept alive
for the stackmap.

In this patch, I introduce a concept very similar to ForceLateUse
to keep the argument of the stackmap live in CheckAdd. The new
role is "ForceLateUseUnlessRecoverable".

In this mode, anything that is not also an input argument becomes
LateUse. As such, it interferes with the destination of CheckAdd.
The arguments are recovered by the slow patch of CheckAdd. They
remain Early use.

This new modes ensure that destination can be aliased to the source
when that's useful, while making sure it is not aliased with another
value that needs to be live on exit.

* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::forEachArg):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::forEachArg):
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
(WTF::printInternal):
* b3/B3StackmapSpecial.h:
* b3/B3StackmapValue.h:

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

4 years ago[EFL] Rebaseline after r196244.
hs85.jeong@samsung.com [Tue, 16 Feb 2016 04:41:58 +0000 (04:41 +0000)]
[EFL] Rebaseline after r196244.

Unreviewed test gardening.

* platform/efl/compositing/geometry/clipping-foreground-expected.txt:
* platform/efl/compositing/geometry/root-layer-update-expected.txt:
* platform/efl/compositing/overflow/ancestor-overflow-expected.txt:
* platform/efl/compositing/overflow/nested-scrolling-expected.txt:
* platform/efl/compositing/overflow/overflow-scroll-expected.txt:
* platform/efl/compositing/overflow/parent-overflow-expected.txt:
* platform/efl/compositing/overflow/scrollbar-painting-expected.txt:
* platform/efl/compositing/reflections/nested-reflection-on-overflow-expected.txt:
* platform/efl/compositing/sibling-positioning-expected.txt:
* platform/efl/css3/unicode-bidi-isolate-basic-expected.txt:
* platform/efl/fast/block/positioning/auto/vertical-rl/007-expected.txt:
* platform/efl/fast/block/positioning/vertical-rl/fixed-positioning-expected.txt:
* platform/efl/fast/borders/border-antialiasing-expected.txt:
* platform/efl/fast/clip/001-expected.txt:
* platform/efl/fast/clip/013-expected.txt:
* platform/efl/fast/clip/014-expected.txt:
* platform/efl/fast/clip/016-expected.txt:
* platform/efl/fast/clip/outline-overflowClip-expected.txt:
* platform/efl/fast/css/clip-zooming-expected.txt:
* platform/efl/fast/forms/validation-message-appearance-expected.txt:
* platform/efl/fast/inline/left-right-center-inline-alignment-in-ltr-and-rtl-blocks-expected.txt:
* platform/efl/fast/line-grid/line-grid-inside-columns-expected.txt:
* platform/efl/fast/line-grid/line-grid-into-columns-expected.txt:
* platform/efl/fast/lists/scrolled-marker-paint-expected.txt:
* platform/efl/fast/multicol/client-rects-expected.txt:
* platform/efl/fast/multicol/column-break-with-balancing-expected.txt:
* platform/efl/fast/multicol/column-rules-expected.txt:
* platform/efl/fast/multicol/column-rules-stacking-expected.txt:
* platform/efl/fast/multicol/columns-shorthand-parsing-expected.txt:
* platform/efl/fast/multicol/float-paginate-complex-expected.txt:
* platform/efl/fast/multicol/float-paginate-empty-lines-expected.txt:
* platform/efl/fast/multicol/float-paginate-expected.txt:
* platform/efl/fast/multicol/layers-in-multicol-expected.txt:
* platform/efl/fast/multicol/layers-split-across-columns-expected.txt:
* platform/efl/fast/multicol/max-height-columns-block-expected.txt:
* platform/efl/fast/multicol/nested-columns-expected.txt:
* platform/efl/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/efl/fast/multicol/overflow-across-columns-expected.txt:
* platform/efl/fast/multicol/overflow-across-columns-percent-height-expected.txt:
* platform/efl/fast/multicol/overflow-unsplittable-expected.txt:
* platform/efl/fast/multicol/paginate-block-replaced-expected.txt:
* platform/efl/fast/multicol/pagination/BottomToTop-bt-expected.txt:
* platform/efl/fast/multicol/pagination/BottomToTop-lr-expected.txt:
* platform/efl/fast/multicol/pagination/BottomToTop-rl-expected.txt:
* platform/efl/fast/multicol/pagination/BottomToTop-tb-expected.txt:
* platform/efl/fast/multicol/pagination/LeftToRight-bt-expected.txt:
* platform/efl/fast/multicol/pagination/LeftToRight-rl-expected.txt:
* platform/efl/fast/multicol/pagination/LeftToRight-tb-expected.txt:
* platform/efl/fast/multicol/pagination/LeftToRight-tb-hittest-expected.txt:
* platform/efl/fast/multicol/pagination/RightToLeft-bt-expected.txt:
* platform/efl/fast/multicol/pagination/RightToLeft-lr-expected.txt:
* platform/efl/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt:
* platform/efl/fast/multicol/pagination/RightToLeft-rl-expected.txt:
* platform/efl/fast/multicol/pagination/RightToLeft-rl-hittest-expected.txt:
* platform/efl/fast/multicol/pagination/RightToLeft-tb-expected.txt:
* platform/efl/fast/multicol/pagination/TopToBottom-bt-expected.txt:
* platform/efl/fast/multicol/pagination/TopToBottom-lr-expected.txt:
* platform/efl/fast/multicol/pagination/TopToBottom-rl-expected.txt:
* platform/efl/fast/multicol/positive-leading-expected.txt:
* platform/efl/fast/multicol/scrolling-column-rules-expected.txt:
* platform/efl/fast/multicol/scrolling-overflow-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-child-property-removal-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-removal-expected.txt:
* platform/efl/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/efl/fast/multicol/span/span-as-nested-columns-child-expected.txt:
* platform/efl/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/efl/fast/multicol/table-vertical-align-expected.txt:
* platform/efl/fast/multicol/tall-image-behavior-expected.txt:
* platform/efl/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt:
* platform/efl/fast/multicol/vertical-lr/column-rules-expected.txt:
* platform/efl/fast/multicol/vertical-lr/float-multicol-expected.txt:
* platform/efl/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* platform/efl/fast/multicol/vertical-lr/float-paginate-expected.txt:
* platform/efl/fast/multicol/vertical-lr/nested-columns-expected.txt:
* platform/efl/fast/multicol/vertical-rl/column-break-with-balancing-expected.txt:
* platform/efl/fast/multicol/vertical-rl/column-rules-expected.txt:
* platform/efl/fast/multicol/vertical-rl/float-multicol-expected.txt:
* platform/efl/fast/multicol/vertical-rl/float-paginate-complex-expected.txt:
* platform/efl/fast/multicol/vertical-rl/float-paginate-expected.txt:
* platform/efl/fast/multicol/vertical-rl/nested-columns-expected.txt:
* platform/efl/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/efl/fast/overflow/float-in-relpositioned-expected.txt:
* platform/efl/fast/overflow/overflow-auto-position-absolute-expected.txt:
* platform/efl/fast/overflow/overflow-rtl-expected.txt:
* platform/efl/fast/overflow/paged-x-div-expected.txt:
* platform/efl/fast/overflow/paged-x-div-with-column-gap-expected.txt:
* platform/efl/fast/overflow/paged-x-on-root-expected.txt:
* platform/efl/fast/overflow/paged-x-with-column-gap-expected.txt:
* platform/efl/fast/overflow/paged-y-div-expected.txt:
* platform/efl/fast/overflow/scroll-nested-positioned-layer-in-overflow-expected.txt:
* platform/efl/fast/regions/repaint/region-painting-via-layout-expected.txt:
* platform/efl/fast/repaint/box-shadow-h-expected.txt:
* platform/efl/fast/repaint/box-shadow-v-expected.txt:
* platform/efl/fast/repaint/layer-outline-expected.txt:
* platform/efl/fast/repaint/layer-outline-horizontal-expected.txt:
* platform/efl/fast/table/edge-offsets-expected.txt:
* platform/efl/fast/transforms/overflow-with-transform-expected.txt:
* platform/efl/fast/transforms/rotated-transform-affects-scrolling-1-expected.txt: Added.
* platform/efl/fast/transforms/rotated-transform-affects-scrolling-2-expected.txt: Added.
* platform/efl/printing/single-line-must-not-be-split-into-two-pages-expected.txt:
* platform/efl/scrollbars/scrollbars-on-positioned-content-expected.txt:
* platform/efl/svg/custom/getscreenctm-in-scrollable-div-area-nested-expected.txt: Added.
* platform/efl/svg/custom/image-rescale-clip-expected.txt: Added.

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

4 years agoStop using NSMapTable in places where we were only using it to be GC safe
weinig@apple.com [Tue, 16 Feb 2016 04:07:11 +0000 (04:07 +0000)]
Stop using NSMapTable in places where we were only using it to be GC safe
<rdar://problem/24063723>
https://bugs.webkit.org/show_bug.cgi?id=154264

Reviewed by Dan Bernstein.

Switch from NSMapTable to HashMap.

* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOMInternal.h:
* bindings/objc/DOMInternal.mm:
* bindings/objc/WebScriptObject.mm:
* bridge/objc/objc_instance.mm:
* platform/spi/cocoa/NSPointerFunctionsSPI.h: Removed. No longer used.

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

4 years agoRe-enable INTL on WinCairo
commit-queue@webkit.org [Tue, 16 Feb 2016 02:32:55 +0000 (02:32 +0000)]
Re-enable INTL on WinCairo
https://bugs.webkit.org/show_bug.cgi?id=154256

Patch by Alex Christensen <achristensen@webkit.org> on 2016-02-15
Reviewed by Michael Catanzaro.

* Source/cmake/OptionsWin.cmake:
Peavo updated icu and it works, so let's re-enable INTL on WinCairo to catch Windows build failures.

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

4 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Tue, 16 Feb 2016 01:53:19 +0000 (01:53 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196607

Unreviewed test gardening.

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

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

4 years agoWeb Inspector: Visual sidebar minor regression fixes
commit-queue@webkit.org [Tue, 16 Feb 2016 00:50:21 +0000 (00:50 +0000)]
Web Inspector: Visual sidebar minor regression fixes
https://bugs.webkit.org/show_bug.cgi?id=154237
<rdar://problem/24653135>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-02-15
Reviewed by Timothy Hatcher.

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder):
Do not display the placeholder, as it is not used in comma separated value
property editors.

(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle::before):
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle): Deleted.
Added ::before to get rid of the "-" on subtitle elements (r196266).

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange):
Recalculates the width for all comma separated value elements (r196266).

(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
Only open/close sections with properties that have values when a new node
or selector item is selected.

(WebInspector.VisualStyleDetailsPanel.prototype._populateBorderSection):
Make copies of the default unit lists to prevent modifying the values used
later in other sections (r194728).

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

4 years agoImplement content sniffing check with NetworkSession
achristensen@apple.com [Tue, 16 Feb 2016 00:20:46 +0000 (00:20 +0000)]
Implement content sniffing check with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154261

Reviewed by Andy Estes.

This fixes http/tests/xmlhttprequest/small-chunks-response-text.html when using NetworkSession.

* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::create):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask):
Content sniffing is enabled by default.  Disable it if the NetworkLoadParameters say not to.
This is analogous to behavior in ResourceHandle::createNSURLConnection.

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

4 years agoRe-sync W3C web-platform-tests' html/dom/interfaces.html
cdumez@apple.com [Mon, 15 Feb 2016 23:58:25 +0000 (23:58 +0000)]
Re-sync W3C web-platform-tests' html/dom/interfaces.html
https://bugs.webkit.org/show_bug.cgi?id=154259

Reviewed by Ryosuke Niwa.

Re-sync W3C web-platform-tests' html/dom/interfaces.html after:
- https://github.com/w3c/web-platform-tests/pull/2580

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

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

4 years agoWeb Inspector: eliminate the linear and rendering frames TimelineOverview subclasses
mattbaker@apple.com [Mon, 15 Feb 2016 23:57:25 +0000 (23:57 +0000)]
Web Inspector: eliminate the linear and rendering frames TimelineOverview subclasses
https://bugs.webkit.org/show_bug.cgi?id=154000
<rdar://problem/24553105>

Reviewed by Timothy Hatcher.

This patch eliminates the TimelineOverview subclasses, and moves logic for switching between
a time-based or frame-based graph into the overview itself. The values of the overview's start
time, current time, and end time now match the values in the timeline recording regardless of the
current view mode. When viewing the rendering frames graph, the recording times are ignored and
all frames are included. The overview maintains separate zoom level and ruler selection settings
for each view mode.

* UserInterface/Main.html:
* UserInterface/Views/LinearTimelineOverview.js: Removed.
* UserInterface/Views/RenderingFrameTimelineOverview.js: Removed.
Removed TimelineOverview subclasses.

* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.get height):
Set FPS graph height to 108 pixels.

* UserInterface/Views/TimelineOverview.css:
(.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)):
(.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:not(:first-child)):
(.timeline-overview > .graphs-container > .timeline-overview-graph:nth-child(even)): Deleted.
(.timeline-overview > .graphs-container > .timeline-overview-graph:not(:first-child)): Deleted.
Disable alternating graph styles when showing FPS instrument.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create separate settings for timelines and FPS view modes.
(WebInspector.TimelineOverview.prototype.get viewMode):
(WebInspector.TimelineOverview.prototype.set viewMode):
(WebInspector.TimelineOverview.prototype.set startTime):
Adjust the current ruler selection when start time changes. Not necessary
when showing the FPS instrument, which doesn't have a start time.
(WebInspector.TimelineOverview.prototype.get secondsPerPixel):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
Now a wrapper around the corresponding view mode setting.
(WebInspector.TimelineOverview.prototype.set pixelAlignDuration):
(WebInspector.TimelineOverview.prototype.get scrollStartTime):
(WebInspector.TimelineOverview.prototype.set scrollStartTime):
Now a wrapper around the corresponding view mode setting.
(WebInspector.TimelineOverview.prototype.get visibleDuration):
(WebInspector.TimelineOverview.prototype.get height):
Return the sum height of all visible overview graphs.
(WebInspector.TimelineOverview.prototype.shown):
Show overview graphs for the current view mode.
(WebInspector.TimelineOverview.prototype.hidden):
(WebInspector.TimelineOverview.prototype.reset):
(WebInspector.TimelineOverview.prototype.recordWasFiltered):
(WebInspector.TimelineOverview.prototype.selectRecord):
(WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
(WebInspector.TimelineOverview.prototype.layout):
Layout for both view modes is largely identical, and differs only in the treatment
of the overview's start time, current time, and end time. Time-based instruments
use time values from the recording, while the FPS instrument has a fixed start time
of zero, and a current and end time pinned to the last rendering frame.
(WebInspector.TimelineOverview.prototype._handleScrollEvent):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):
(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._timelineRulerMouseClicked):
(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
Save the selection for the current view mode.
(WebInspector.TimelineOverview.prototype._recordSelected):
(WebInspector.TimelineOverview.prototype._resetSelection.reset):
(WebInspector.TimelineOverview.prototype._resetSelection):
(WebInspector.TimelineOverview.prototype._canShowTimelineType):
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Sets zoom level, ruler selection, and graph visibility based on current view mode.
(WebInspector.TimelineOverview.prototype._createViewModeSettings):
Helper function for creating an object to track the zoom level and ruler
selection of each view mode.
(WebInspector.TimelineOverview.prototype.get _currentSettings):
Internal getter for retrieving the settings for the current view mode.
(WebInspector.TimelineOverview.prototype.canShowTimeline): Deleted.
Not needed now that the overview contains all timelines.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
(WebInspector.TimelineOverviewGraph.prototype.shown):
(WebInspector.TimelineOverviewGraph.prototype.hidden):
Toggle CSS hidden class.

* UserInterface/Views/TimelineRecordFrame.js:
No need to query offsetHeight now that TimelineOverviewGraph has a height property.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Create a single timeline overview.
(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.recordWasFiltered):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
Update the timeline  overview's mode based on the current timeline view.
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
Removed special handling for the FPS overview.
Removed selection start time adjustment, which is now handled internally by TimelineOverview.
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection):

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
(WebInspector.TimelineSidebarPanel.prototype._renderingFrameTimelineTimesUpdated):
(WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
Refresh the view mode when the content view changes.
(WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
(WebInspector.TimelineSidebarPanel.prototype._viewModeSelected):
(WebInspector.TimelineSidebarPanel.prototype._viewModeForTimeline):
(WebInspector.TimelineSidebarPanel.prototype._updateViewModeIfNeeded):
Sync the tree outline, frames chart, and navigation bar with the current view mode.
(WebInspector.TimelineSidebarPanel.prototype.shown):
Refreshing the frame selection is unnecessary. It's updated by the recording content
view whenever the ruler selection changes.
(WebInspector.TimelineSidebarPanel.prototype.get viewMode): Deleted.
No longer public, since the timeline overview now owns the view mode. Internally the sidebar
still tracks the current state so it can determine when the value has changed.
(WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview):
(WebInspector.TimelineSidebarPanel.prototype.showTimelineViewForTimeline):
The sidebar should only be synced to the overview after the content view has changed.
(WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
Removed unnecessary assertion.
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode): Deleted.
Replaced by _updateViewModeIfNeeded.

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

4 years agov1 UI and v2 UI should share statistics.js
rniwa@webkit.org [Mon, 15 Feb 2016 23:57:22 +0000 (23:57 +0000)]
v1 UI and v2 UI should share statistics.js
https://bugs.webkit.org/show_bug.cgi?id=154262

Reviewed by Chris Dumez.

Share statistics.js between v1 and v2 UI.

* public/index.html:
* public/js/shared.js: Deleted.
* public/js/statistics.js: Removed.
* public/shared: Added.
* public/shared/statistics.js: Moved from Websites/perf.webkit.org/public/v2/js/statistics.js.
* public/v2/index.html:
* public/v2/js/statistics.js: Removed.
* public/v3/index.html:
* tools/detect-changes.js:

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

4 years ago[Font Loading] Implement FontFace JavaScript object
mmaxfield@apple.com [Mon, 15 Feb 2016 23:39:02 +0000 (23:39 +0000)]
[Font Loading] Implement FontFace JavaScript object
https://bugs.webkit.org/show_bug.cgi?id=153345

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/text/font-face-javascript.html

This patch implements the FontFace Javascript object. This object mostly consists of
style getters / setters, which we implement by parsing input strings and generating
output strings similarly to getComputedStyle(). This object also has a load() function
which returns a promise which will be fulfilled or rejected depending on the load.
There is also a "loaded" attribute which exposes this promise directly. Also, a status
field is exposed so script knows what the state of the load is.

Currently, loading depends on our CachedResourceLoader which is part of the Document,
so this API is not available in a non-document context.

Another caveat is that immediate-mode font loading (where the content provides an
ArrayBuffer containing the bytes of the font file) is forthcoming. This requires
changing the relationship between CSSFontFaceSource and CachedFont.

CSSFontFace has been modified to keep a strong reference to the CSSFontSelector. This
is because the lifetime of the CSSFontFace can now outlive the CSSFontSelector. When
the CSSFontSelector is removed from the Document, it explicitly clears its constituent
CSSFontFaces, thereby breaking the reference cycle.

Test: fast/text/font-face-javascript-expected.html

* CMakeLists.txt: Add new files.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredWrapper::globalObject): Remove whitespace.
(WebCore::DeferredWrapper::deferred): Allow access to the inner JSC object.
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromise::deferred): Ditto.
* bindings/js/JSFontFaceCustom.cpp: Copied from Source/WebCore/bindings/js/JSDOMPromise.cpp.
(WebCore::JSFontFace::loaded):
(WebCore::JSFontFace::load):
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::CSSFontFace):
(WebCore::CSSFontFace::adoptSource):
(WebCore::CSSFontFace::updateStatus): Enforce the state machine's transitions.
(WebCore::CSSFontFace::fontLoaded):
(WebCore::CSSFontFace::pump):
(WebCore::CSSFontFace::load):
* css/CSSFontFace.h:
(WebCore::CSSFontFaceClient::~CSSFontFaceClient):
(WebCore::CSSFontFace::create):
(WebCore::CSSFontFace::status):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::appendSources): Update for new CSSFontFace API.
(WebCore::CSSFontSelector::registerLocalFontFacesForFamily): Ditto.
(WebCore::CSSFontSelector::addFontFaceRule): Ditto.
(WebCore::CSSFontSelector::kick): Ditto.
(WebCore::appendSources): Deleted.
(WebCore::registerLocalFontFacesForFamily): Deleted.
* css/CSSFontSelector.h:
* css/CSSUnicodeRangeValue.cpp: Use for serializing the "unicodeRange" property.
* css/FontFace.cpp:
(WebCore::createPromise): Implement the remaining Javascript API functions.
(WebCore::valueFromDictionary):
(WebCore::FontFace::create):
(WebCore::FontFace::FontFace):
(WebCore::FontFace::parseString):
(WebCore::FontFace::status):
(WebCore::FontFace::kick):
(WebCore::FontFace::load):
(WebCore::FontFace::fulfillPromise):
(WebCore::FontFace::rejectPromise):
(WebCore::parseString): Deleted.
* css/FontFace.h:
(WebCore::FontFace::promise):
(WebCore::FontFace::backing):
(WebCore::FontFace::create): Deleted.
* css/FontFace.idl: Copied from Source/WebCore/bindings/js/JSDOMPromise.cpp.

LayoutTests:

* fast/text/font-face-javascript-expected.txt: Added.
* fast/text/font-face-javascript.html: Added.
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoNull-deref crash in DefaultAudioDestinationNode::suspend()
jer.noble@apple.com [Mon, 15 Feb 2016 22:37:53 +0000 (22:37 +0000)]
Null-deref crash in DefaultAudioDestinationNode::suspend()
https://bugs.webkit.org/show_bug.cgi?id=154248

Reviewed by Alex Christensen.

Drive-by fix: AudioContext should be a reference, not a pointer.

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::AnalyserNode):
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::create):
* Modules/webaudio/AudioBasicInspectorNode.cpp:
(WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
(WebCore::AudioBasicInspectorNode::connect):
(WebCore::AudioBasicInspectorNode::disconnect):
(WebCore::AudioBasicInspectorNode::checkNumberOfChannelsForInput):
(WebCore::AudioBasicInspectorNode::updatePullStatus):
* Modules/webaudio/AudioBasicInspectorNode.h:
* Modules/webaudio/AudioBasicProcessorNode.cpp:
(WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
(WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
* Modules/webaudio/AudioBasicProcessorNode.h:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::create):
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
(WebCore::AudioBufferSourceNode::renderFromBuffer):
(WebCore::AudioBufferSourceNode::setBuffer):
(WebCore::AudioBufferSourceNode::startPlaying):
(WebCore::AudioBufferSourceNode::looping):
(WebCore::AudioBufferSourceNode::setLooping):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::createBufferSource):
(WebCore::AudioContext::createMediaElementSource):
(WebCore::AudioContext::createMediaStreamDestination):
(WebCore::AudioContext::createScriptProcessor):
(WebCore::AudioContext::createBiquadFilter):
(WebCore::AudioContext::createWaveShaper):
(WebCore::AudioContext::createPanner):
(WebCore::AudioContext::createConvolver):
(WebCore::AudioContext::createDynamicsCompressor):
(WebCore::AudioContext::createAnalyser):
(WebCore::AudioContext::createGain):
(WebCore::AudioContext::createDelay):
(WebCore::AudioContext::createChannelSplitter):
(WebCore::AudioContext::createChannelMerger):
(WebCore::AudioContext::createOscillator):
* Modules/webaudio/AudioContext.h:
(WebCore::operator==):
(WebCore::operator!=):
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
(WebCore::AudioDestinationNode::render):
(WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio):
* Modules/webaudio/AudioDestinationNode.h:
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::AudioNode):
(WebCore::AudioNode::connect):
(WebCore::AudioNode::disconnect):
(WebCore::AudioNode::setChannelCount):
(WebCore::AudioNode::setChannelCountMode):
(WebCore::AudioNode::setChannelInterpretation):
(WebCore::AudioNode::scriptExecutionContext):
(WebCore::AudioNode::processIfNecessary):
(WebCore::AudioNode::checkNumberOfChannelsForInput):
(WebCore::AudioNode::propagatesSilence):
(WebCore::AudioNode::pullInputs):
(WebCore::AudioNode::enableOutputsIfNecessary):
(WebCore::AudioNode::deref):
(WebCore::AudioNode::finishDeref):
* Modules/webaudio/AudioNode.h:
(WebCore::AudioNode::context):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::connect):
(WebCore::AudioNodeInput::disconnect):
(WebCore::AudioNodeInput::disable):
(WebCore::AudioNodeInput::enable):
(WebCore::AudioNodeInput::updateInternalBus):
(WebCore::AudioNodeInput::bus):
(WebCore::AudioNodeInput::internalSummingBus):
(WebCore::AudioNodeInput::sumAllConnections):
(WebCore::AudioNodeInput::pull):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::setNumberOfChannels):
(WebCore::AudioNodeOutput::updateNumberOfChannels):
(WebCore::AudioNodeOutput::propagateChannelCount):
(WebCore::AudioNodeOutput::pull):
(WebCore::AudioNodeOutput::bus):
(WebCore::AudioNodeOutput::fanOutCount):
(WebCore::AudioNodeOutput::paramFanOutCount):
(WebCore::AudioNodeOutput::addInput):
(WebCore::AudioNodeOutput::removeInput):
(WebCore::AudioNodeOutput::disconnectAllInputs):
(WebCore::AudioNodeOutput::addParam):
(WebCore::AudioNodeOutput::removeParam):
(WebCore::AudioNodeOutput::disconnectAllParams):
(WebCore::AudioNodeOutput::disable):
(WebCore::AudioNodeOutput::enable):
* Modules/webaudio/AudioNodeOutput.h:
(WebCore::AudioNodeOutput::context):
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::value):
(WebCore::AudioParam::smooth):
(WebCore::AudioParam::calculateSampleAccurateValues):
(WebCore::AudioParam::calculateFinalValues):
(WebCore::AudioParam::calculateTimelineValues):
(WebCore::AudioParam::connect):
(WebCore::AudioParam::disconnect):
* Modules/webaudio/AudioParam.h:
(WebCore::AudioParam::create):
(WebCore::AudioParam::AudioParam):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valueForContextTime):
* Modules/webaudio/AudioParamTimeline.h:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
(WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::finish):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/AudioSummingJunction.cpp:
(WebCore::AudioSummingJunction::AudioSummingJunction):
(WebCore::AudioSummingJunction::~AudioSummingJunction):
(WebCore::AudioSummingJunction::changedOutputs):
(WebCore::AudioSummingJunction::updateRenderingState):
* Modules/webaudio/AudioSummingJunction.h:
(WebCore::AudioSummingJunction::context):
* Modules/webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::BiquadFilterNode):
* Modules/webaudio/BiquadFilterNode.h:
(WebCore::BiquadFilterNode::create):
* Modules/webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::BiquadProcessor):
* Modules/webaudio/BiquadProcessor.h:
* Modules/webaudio/ChannelMergerNode.cpp:
(WebCore::ChannelMergerNode::create):
(WebCore::ChannelMergerNode::ChannelMergerNode):
(WebCore::ChannelMergerNode::checkNumberOfChannelsForInput):
* Modules/webaudio/ChannelMergerNode.h:
* Modules/webaudio/ChannelSplitterNode.cpp:
(WebCore::ChannelSplitterNode::create):
(WebCore::ChannelSplitterNode::ChannelSplitterNode):
* Modules/webaudio/ChannelSplitterNode.h:
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::ConvolverNode):
(WebCore::ConvolverNode::setBuffer):
* Modules/webaudio/ConvolverNode.h:
(WebCore::ConvolverNode::create):
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::suspend):
(WebCore::DefaultAudioDestinationNode::close):
* Modules/webaudio/DefaultAudioDestinationNode.h:
(WebCore::DefaultAudioDestinationNode::create):
* Modules/webaudio/DelayNode.cpp:
(WebCore::DelayNode::DelayNode):
* Modules/webaudio/DelayNode.h:
(WebCore::DelayNode::create):
* Modules/webaudio/DelayProcessor.cpp:
(WebCore::DelayProcessor::DelayProcessor):
* Modules/webaudio/DelayProcessor.h:
* Modules/webaudio/DynamicsCompressorNode.cpp:
(WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
* Modules/webaudio/DynamicsCompressorNode.h:
(WebCore::DynamicsCompressorNode::create):
* Modules/webaudio/GainNode.cpp:
(WebCore::GainNode::GainNode):
(WebCore::GainNode::checkNumberOfChannelsForInput):
* Modules/webaudio/GainNode.h:
(WebCore::GainNode::create):
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::create):
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
(WebCore::MediaElementAudioSourceNode::setFormat):
* Modules/webaudio/MediaElementAudioSourceNode.h:
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::create):
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* Modules/webaudio/MediaStreamAudioDestinationNode.h:
* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
(WebCore::MediaStreamAudioSourceNode::setFormat):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
(WebCore::OfflineAudioDestinationNode::offlineRender):
(WebCore::OfflineAudioDestinationNode::notifyComplete):
* Modules/webaudio/OfflineAudioDestinationNode.h:
(WebCore::OfflineAudioDestinationNode::create):
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::create):
(WebCore::OscillatorNode::OscillatorNode):
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::pullInputs):
(WebCore::PannerNode::process):
(WebCore::PannerNode::listener):
(WebCore::PannerNode::setPanningModel):
* Modules/webaudio/PannerNode.h:
(WebCore::PannerNode::create):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::create):
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::initialize):
(WebCore::ScriptProcessorNode::fireProcessEvent):
* Modules/webaudio/ScriptProcessorNode.h:
* Modules/webaudio/WaveShaperNode.cpp:
(WebCore::WaveShaperNode::WaveShaperNode):
(WebCore::WaveShaperNode::setOversample):
* Modules/webaudio/WaveShaperNode.h:
(WebCore::WaveShaperNode::create):

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

4 years agoNull-deref crash in DefaultAudioDestinationNode::suspend()
jer.noble@apple.com [Mon, 15 Feb 2016 22:36:00 +0000 (22:36 +0000)]
Null-deref crash in DefaultAudioDestinationNode::suspend()
https://bugs.webkit.org/show_bug.cgi?id=154248

Reviewed by Alex Christensen.

Null-check scriptExecutionContext() before deref.

* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::suspend):
(WebCore::DefaultAudioDestinationNode::close):

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

4 years ago[EFL] Update Tools/efl/install-dependencies
ossy@webkit.org [Mon, 15 Feb 2016 22:33:25 +0000 (22:33 +0000)]
[EFL] Update Tools/efl/install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=154239

Reviewed by Michael Catanzaro.

* efl/install-dependencies:

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

4 years agoMove Download authentication code to AuthenticationManager
achristensen@apple.com [Mon, 15 Feb 2016 22:25:49 +0000 (22:25 +0000)]
Move Download authentication code to AuthenticationManager
https://bugs.webkit.org/show_bug.cgi?id=154132

Reviewed by Sam Weinig.

When a video element makes a request that receives an authentication challenge, the
AuthenticationManager receives an AuthenticationChallenge without an AuthenticationClient.
As a result, Download::receivedCredential and other functions were being called, which
sent a message to the challenge's sender.  This functionality is not specific to downloads,
so I moved it from Download to AuthenticationManager.

This fixes http/tests/media/video-auth.html when using NetworkSession
because I use AuthenticationManager::receivedCredential if there is no AuthenticationClient
instead of improperly asserting that there is always an AuthenticationClient if there is no
completionHandler.

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential): Deleted.
(WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
(WebKit::Download::receivedCancellation): Deleted.
(WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
(WebKit::Download::receivedChallengeRejection): Deleted.
* NetworkProcess/Downloads/mac/DownloadMac.mm:
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential): Deleted.
(WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
(WebKit::Download::receivedCancellation): Deleted.
(WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
(WebKit::Download::receivedChallengeRejection): Deleted.
* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::platformDidFinish):
(WebKit::Download::receivedCredential): Deleted.
(WebKit::Download::receivedRequestToContinueWithoutCredential): Deleted.
(WebKit::Download::receivedCancellation): Deleted.
(WebKit::Download::continueWithoutCredential): Deleted.
(WebKit::Download::useCredential): Deleted.
(WebKit::Download::cancelAuthenticationChallenge): Deleted.
(WebKit::Download::receivedRequestToPerformDefaultHandling): Deleted.
(WebKit::Download::receivedChallengeRejection): Deleted.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/AuthenticationManager.h:
(WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
* Shared/Authentication/cocoa: Added.
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Added.
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/Authentication/soup: Added.
* Shared/Authentication/soup/AuthenticationManagerSoup.cpp: Added.
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoXMLHttpRequest / XMLHttpRequestUpload should inherit XMLHttpRequestEventTarget
cdumez@apple.com [Mon, 15 Feb 2016 22:03:04 +0000 (22:03 +0000)]
XMLHttpRequest / XMLHttpRequestUpload should inherit XMLHttpRequestEventTarget
https://bugs.webkit.org/show_bug.cgi?id=154230

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:

Source/WebCore:

MLHttpRequest / XMLHttpRequestUpload should inherit XMLHttpRequestEventTarget
as per:
https://xhr.spec.whatwg.org/#xmlhttprequesteventtarget

Firefox and Chrome already match the specification.

No new tests, already covered by existing tests.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestEventTarget.h: Added.
* xml/XMLHttpRequestEventTarget.idl: Copied from Source/WebCore/xml/XMLHttpRequestUpload.idl.
* xml/XMLHttpRequestUpload.h:
* xml/XMLHttpRequestUpload.idl:

LayoutTests:

Rebaseline tests now that XMLHttpRequestEventTarget is exposed on the
global objects.

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

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

4 years agoRefine SimulatedMouseEvent to support Event.isTrusted
jiewen_tan@apple.com [Mon, 15 Feb 2016 21:38:25 +0000 (21:38 +0000)]
Refine SimulatedMouseEvent to support Event.isTrusted
https://bugs.webkit.org/show_bug.cgi?id=154133
<rdar://problem/24616246>

Reviewed by Darin Adler.

Source/WebCore:

This patch extracts everything related to create/dispatch SimulatedMouseEvent from MouseEvent.h/cpp
and EventDispatcher.h/cpp, and produces SimulateClick.h/cpp which will handle simulated click solely.
After that, we hide the SimulatedMouseEvent and only expose simulateClick to be called. The reason is
that we both want to tell whether the call sites are from user agent/bindings and keep the
SimulatedMouseEvent intact.

Also, this patch separate Element::dispatchSimulatedClick into two: one for the user agent, and another
for the bindings. Therefore, HTMLElement.click will be treated as untrusted.

Some of the changes in this patch referred Blink r200401:
https://codereview.chromium.org/1285793004

Modified test:
LayoutTests/imported/blink/fast/events/event-trusted.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::dispatchSimulatedClick):
(WebCore::Element::dispatchSimulatedClickForBindings):
* dom/Element.h:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick): Deleted.
* dom/EventDispatcher.h:
* dom/MouseEvent.cpp:
(WebCore::SimulatedMouseEvent::create): Deleted.
(WebCore::SimulatedMouseEvent::~SimulatedMouseEvent): Deleted.
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent): Deleted.
* dom/MouseEvent.h:
* dom/SimulatedClick.cpp: Added.
(WebCore::simulateMouseEvent):
(WebCore::simulateClick):
* dom/SimulatedClick.h: Added.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::click):

LayoutTests:

* imported/blink/fast/events/event-trusted-expected.txt:
* imported/blink/fast/events/event-trusted.html:

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

4 years agoWeb Inspector: Show inherited CSS variables in the Style sidebar
timothy@apple.com [Mon, 15 Feb 2016 21:37:10 +0000 (21:37 +0000)]
Web Inspector: Show inherited CSS variables in the Style sidebar
https://bugs.webkit.org/show_bug.cgi?id=154215
rdar://problem/24644058

Reviewed by Joseph Pecoraro.

* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.isInheritedPropertyName): Added.
(WebInspector.CSSProperty.prototype.update): Use WebInspector.CSSProperty.isInheritedPropertyName.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload): Use WebInspector.CSSProperty.isInheritedPropertyName.

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

4 years agoWeb Inspector: Sidebars are defaulting to their minimum width, instead of a good...
timothy@apple.com [Mon, 15 Feb 2016 21:30:00 +0000 (21:30 +0000)]
Web Inspector: Sidebars are defaulting to their minimum width, instead of a good width
https://bugs.webkit.org/show_bug.cgi?id=154218
rdar://problem/24644192

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel): Default the setting value to 300 instead of 0, so the minimum isn't used.

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

4 years agoMarking animations/animation-delay-changed.html as flaky on ios-simulator
ryanhaddad@apple.com [Mon, 15 Feb 2016 21:25:01 +0000 (21:25 +0000)]
Marking animations/animation-delay-changed.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=154253

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years agoWeb Inspector: Web Workers have no access to console for debugging
commit-queue@webkit.org [Mon, 15 Feb 2016 21:23:23 +0000 (21:23 +0000)]
Web Inspector: Web Workers have no access to console for debugging
https://bugs.webkit.org/show_bug.cgi?id=26237

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-15
Reviewed by Timothy Hatcher.

LayoutTests/imported/w3c:

* web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt:
Update test results for a console.warn message that the test produces from a Worker.

Source/JavaScriptCore:

* inspector/ConsoleMessage.h:
Add accessor for MessageLevel.

Source/WebCore:

This adds the most basic console message support to Workers.
Messages logged from workers get surfaced through the Page's console.
This lacks support for logging and interacting with arguments,
which would be addressed when adding more complete Worker
debugging tools.

Test: inspector/console/messageAdded-from-worker.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new files.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::~WorkerScriptController):
(WebCore::WorkerScriptController::initScript):
Set the ConsoleClient for the Worker's global object. We route
the messages to the Page's console.

* bindings/js/WorkerScriptController.h:
* workers/WorkerConsoleClient.h: Added.
* workers/WorkerConsoleClient.cpp: Added.
(WebCore::WorkerConsoleClient::WorkerConsoleClient):
(WebCore::WorkerConsoleClient::~WorkerConsoleClient):
(WebCore::WorkerConsoleClient::profile):
(WebCore::WorkerConsoleClient::profileEnd):
(WebCore::WorkerConsoleClient::count):
(WebCore::WorkerConsoleClient::time):
(WebCore::WorkerConsoleClient::timeEnd):
(WebCore::WorkerConsoleClient::timeStamp):
Stub most console methods in a Worker.

(WebCore::WorkerConsoleClient::messageWithTypeAndLevel):
Send worker log messages to the global scope and on to the main page.

* workers/WorkerGlobalScope.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
Ideally we want to converge on simple addConsoleMessage
APIs that just take a ConsoleMessage, without a barrage
of parameters. Add these versions now.

LayoutTests:

* inspector/console/messageAdded-from-worker-expected.txt: Added.
* inspector/console/messageAdded-from-worker.html: Added.
* inspector/console/resources/worker-console-log.js: Added.

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