Timeline



Mar 28, 2016:

8:28 PM Changeset in webkit [198774] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Ensure maximum accuracy while profiling
https://bugs.webkit.org/show_bug.cgi?id=155809
<rdar://problem/25325035>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-28
Reviewed by Timothy Hatcher.

  • Localizations/en.lproj/localizedStrings.js:

New strings.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager):
When starting the inspector, if it was previously closed while
breakpoints were temporarily disabled, restore the correct
breakpoints enabled state.

(WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
Warn if we ever try to enable breakpoints during timeline recordings.

(WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
(WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily):
(WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily):
Method to start/stop temporarily disabling breakpoints.

(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
When temporarily disabling breakpoints avoid the convenience behavior of
enabling all breakpoints when enabling or setting a single breakpoint.

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager.prototype.startCapturing):
Emit a will start capturing event to do work before enabling instruments.

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger .timeline-recording-warning):
(.sidebar > .panel.navigation.debugger .timeline-recording-warning > a):
Styles for a warning section in the Debugger Sidebar when the Debugger
is temporarily disabled due to a Timeline recording.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart):
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped):
Modify the Debugger state and UI before and after a Timeline recording.

7:03 PM Changeset in webkit [198773] by achristensen@apple.com
  • 4 edits in trunk

Fix Mac Ninja build after r198766.

.:

  • Source/cmake/WebKitMacros.cmake:

WebCore_DERIVED_SOURCES are intentionally in a separate library to reduce linker line length.
This is now only specific to WebKit2_DERIVED_SOURCES, so I'm moving it there.

Source/WebKit2:

  • CMakeLists.txt:
6:27 PM Changeset in webkit [198772] by achristensen@apple.com
  • 2 edits in trunk

Fix Windows build after r198766.

  • Source/cmake/WebKitMacros.cmake:

Use the filename from the cpp so that WebCorePrefix.cpp and WebCoreDerivedSourcesPrefix.cpp
generate unique .pch files, even though they both include WebCorePrefix.h

6:06 PM Changeset in webkit [198771] by Alan Bujtas
  • 10 edits
    2 adds in trunk

Pixel turds when bordered div is resized on SMF forum software.
https://bugs.webkit.org/show_bug.cgi?id=155957
<rdar://problem/25010646>

Reviewed by Simon Fraser.

Use unmodified, non-snapped bounding box rect when computing dirty rects.

Source/WebCore:

Test: fast/repaint/hidpi-box-with-subpixel-height-inflates.html

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getTrailingCorner):

  • rendering/RenderInline.h:
  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::borderBoundingBox): Deleted.

  • rendering/RenderLineBreak.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::setBestTruncatedAt):

LayoutTests:

  • fast/repaint/hidpi-box-with-subpixel-height-inflates-expected.txt: Added.
  • fast/repaint/hidpi-box-with-subpixel-height-inflates.html: Added.
5:59 PM Changeset in webkit [198770] by commit-queue@webkit.org
  • 2 edits
    3 adds in trunk/Source/JavaScriptCore

[JSC] ArithSub should not propagate "UsesAsOther"
https://bugs.webkit.org/show_bug.cgi?id=155932

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

The node ArithSub was backpropagating UsesAsOther.
This causes any GetByVal on a Double Array to have an extra
hole check if it flows into an ArithSub.

The definition of ArithSub (12.8.4.1) has both operands go
through ToNumber(). ToNumber() on "undefined" always produces
NaN. It is safe to ignore the NaN marker from hole when
the DAG flows into ArithSub.

This patch also adds this change and test coverage to ArithAdd.
ArithAdd was not a problem in practice because it is only
generated before Fixup if both operands are known to be numerical.
The change to ArithAdd is there to protect us of the ArithSub-like
problems if we ever improve our support of arithmetic operators.

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • tests/stress/arith-add-on-double-array-with-holes.js: Added.

(let.testCase.of.testCases.eval.nonObservableHoleOnLhs):
(let.testCase.of.testCases.observableHoleOnLhs):
(let.testCase.of.testCases.nonObservableHoleOnRhs):
(let.testCase.of.testCases.observableHoleOnRhs):

  • tests/stress/arith-sub-on-double-array-with-holes.js: Added.

(let.testCase.of.testCases.eval.nonObservableHoleOnLhs):
(let.testCase.of.testCases.observableHoleOnLhs):
(let.testCase.of.testCases.nonObservableHoleOnRhs):
(let.testCase.of.testCases.observableHoleOnRhs):

  • tests/stress/value-add-on-double-array-with-holes.js: Added.

(let.testCase.of.testCases.eval.nonObservableHoleOnLhs):
(let.testCase.of.testCases.observableHoleOnLhs):
(let.testCase.of.testCases.nonObservableHoleOnRhs):
(let.testCase.of.testCases.observableHoleOnRhs):

5:58 PM Changeset in webkit [198769] by Chris Fleizach
  • 3 edits
    2 adds in trunk

AX: Crash when AX trying to create element for an old auto fill element
https://bugs.webkit.org/show_bug.cgi?id=155943

Reviewed by Joanmarie Diggs.

Source/WebCore:

When an auto-fill element is removed, the Node hangs around but the renderer is gone.
In those cases, we can't blindly add the result of getOrCreate to the children array.

Test: accessibility/auto-fill-crash.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addTextFieldChildren):

LayoutTests:

  • accessibility/auto-fill-crash-expected.txt: Added.
  • accessibility/auto-fill-crash.html: Added.
5:42 PM Changeset in webkit [198768] by Chris Fleizach
  • 5 edits
    2 adds in trunk

AX: iOS: Can't navigate inside ContentEditable fields with voiceover enabled
https://bugs.webkit.org/show_bug.cgi?id=155942

Reviewed by Joanmarie Diggs.

Source/WebCore:

The code to set the selected text range on a non-native text control (like a contenteditable) was either
wrong or broke at some point. It assumed that creating a Position with the contenteditable node with the right
offset would make a valid Position, but it almost never did.

Instead we can use this helper method to create a valid Position.

Test: accessibility/set-selected-text-range-contenteditable.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setSelectedTextRange):

LayoutTests:

  • accessibility/set-selected-text-range-contenteditable-expected.txt: Added.
  • accessibility/set-selected-text-range-contenteditable.html: Added.
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
5:36 PM Changeset in webkit [198767] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening on 29th Mar.

Mark svg text tests to failure. Besides remove duplicated a test.

  • platform/efl/TestExpectations:
5:19 PM Changeset in webkit [198766] by achristensen@apple.com
  • 10 edits
    1 copy in trunk

Fix Ninja build on Mac
https://bugs.webkit.org/show_bug.cgi?id=151399

Reviewed by Darin Adler.

.:

  • Source/CMakeLists.txt:
  • Source/cmake/WebKitMacros.cmake:

Source/WebCore:

  • CMakeLists.txt:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:

This moves WebCoreDerivedSources to a separate static library to reduce linker command
line lengths when using ninja on mac. This also helps Windows builds, which sometimes
regenerate everything every time you build; now you'll be able to just build WebCore
and WebKit without all the WebCoreDerivedSources stuff.

Source/WebKit:

  • PlatformWin.cmake:
5:08 PM Changeset in webkit [198765] by matthew_hanson@apple.com
  • 5 edits in branches/safari-601.1.46-branch/Source

Versioning.

5:07 PM Changeset in webkit [198764] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-601.1.46.123

New Tag.

4:26 PM Changeset in webkit [198763] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

Fix build on some stricter compilers by removing unnecessary WTFMove.
Opportunistically remove some unnecessary "WebCore::"s
Followup to r198762

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::keyPathAny):
(WebCore::IDBObjectStore::transaction):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):

3:49 PM Changeset in webkit [198762] by beidson@apple.com
  • 48 edits
    22 deletes in trunk/Source

Modern IDB: Remove abstract base classes for all IDB DOM classes.
https://bugs.webkit.org/show_bug.cgi?id=155951

Reviewed by Alex Christensen.

Source/WebCore:

Refactor - No behavior change.

  • Modules/indexeddb/DOMWindowIndexedDatabase.cpp:

(WebCore::DOMWindowIndexedDatabase::indexedDB):

  • Modules/indexeddb/IDBAny.cpp:

(WebCore::IDBAny::IDBAny):
(WebCore::IDBAny::~IDBAny):
(WebCore::IDBAny::idbDatabase):
(WebCore::IDBAny::domStringList):
(WebCore::IDBAny::idbCursor):
(WebCore::IDBAny::idbCursorWithValue):
(WebCore::IDBAny::idbFactory):
(WebCore::IDBAny::idbIndex):
(WebCore::IDBAny::idbObjectStore):
(WebCore::IDBAny::idbTransaction):
(WebCore::IDBAny::scriptValue):
(WebCore::IDBAny::integer):
(WebCore::IDBAny::string):
(WebCore::IDBAny::keyPath):

  • Modules/indexeddb/IDBAny.h:

(WebCore::IDBAny::create):
(WebCore::IDBAny::createUndefined):
(WebCore::IDBAny::type):
(WebCore::IDBAny::~IDBAny): Deleted.
(WebCore::IDBAny::isLegacy): Deleted.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::create):
(WebCore::IDBCursor::IDBCursor):
(WebCore::IDBCursor::~IDBCursor):
(WebCore::IDBCursor::sourcesDeleted):
(WebCore::IDBCursor::effectiveObjectStore):
(WebCore::IDBCursor::transaction):
(WebCore::IDBCursor::direction):
(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::source):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):
(WebCore::IDBCursor::activeDOMObjectName):
(WebCore::IDBCursor::canSuspendForDocumentSuspension):
(WebCore::IDBCursor::hasPendingActivity):
(WebCore::IDBCursor::decrementOutstandingRequestCount):

  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::info):
(WebCore::IDBCursor::setRequest):
(WebCore::IDBCursor::clearRequest):
(WebCore::IDBCursor::request):
(WebCore::IDBCursor::isKeyCursor):
(WebCore::IDBCursor::~IDBCursor): Deleted.
(WebCore::IDBCursor::continueFunction): Deleted.
(WebCore::IDBCursor::isModernCursor): Deleted.
(WebCore::IDBCursor::hasPendingActivity): Deleted.

  • Modules/indexeddb/IDBCursorWithValue.cpp:

(WebCore::IDBCursorWithValue::create):
(WebCore::IDBCursorWithValue::IDBCursorWithValue):
(WebCore::IDBCursorWithValue::~IDBCursorWithValue):

  • Modules/indexeddb/IDBCursorWithValue.h:

(WebCore::IDBCursorWithValue::~IDBCursorWithValue): Deleted.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::create):
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::~IDBDatabase):
(WebCore::IDBDatabase::hasPendingActivity):
(WebCore::IDBDatabase::name):
(WebCore::IDBDatabase::version):
(WebCore::IDBDatabase::objectStoreNames):
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::deleteObjectStore):
(WebCore::IDBDatabase::close):
(WebCore::IDBDatabase::maybeCloseInServer):
(WebCore::IDBDatabase::activeDOMObjectName):
(WebCore::IDBDatabase::canSuspendForDocumentSuspension):
(WebCore::IDBDatabase::stop):
(WebCore::IDBDatabase::startVersionChangeTransaction):
(WebCore::IDBDatabase::didStartTransaction):
(WebCore::IDBDatabase::willCommitTransaction):
(WebCore::IDBDatabase::didCommitTransaction):
(WebCore::IDBDatabase::willAbortTransaction):
(WebCore::IDBDatabase::didAbortTransaction):
(WebCore::IDBDatabase::didCommitOrAbortTransaction):
(WebCore::IDBDatabase::fireVersionChangeEvent):
(WebCore::IDBDatabase::dispatchEvent):
(WebCore::IDBDatabase::didCreateIndexInfo):
(WebCore::IDBDatabase::didDeleteIndexInfo):

  • Modules/indexeddb/IDBDatabase.h:

(WebCore::IDBDatabase::info):
(WebCore::IDBDatabase::databaseConnectionIdentifier):
(WebCore::IDBDatabase::serverConnection):
(WebCore::IDBDatabase::isClosingOrClosed):
(WebCore::IDBDatabase::~IDBDatabase): Deleted.

  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::shouldThrowSecurityException):
(WebCore::IDBFactory::create):
(WebCore::IDBFactory::IDBFactory):
(WebCore::IDBFactory::getDatabaseNames):
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
(WebCore::IDBFactory::cmp):

  • Modules/indexeddb/IDBFactory.h:

(WebCore::IDBFactory::~IDBFactory): Deleted.

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::IDBIndex):
(WebCore::IDBIndex::~IDBIndex):
(WebCore::IDBIndex::activeDOMObjectName):
(WebCore::IDBIndex::canSuspendForDocumentSuspension):
(WebCore::IDBIndex::hasPendingActivity):
(WebCore::IDBIndex::name):
(WebCore::IDBIndex::objectStore):
(WebCore::IDBIndex::keyPathAny):
(WebCore::IDBIndex::keyPath):
(WebCore::IDBIndex::unique):
(WebCore::IDBIndex::multiEntry):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::doGetKey):
(WebCore::IDBIndex::markAsDeleted):
(WebCore::IDBIndex::ref):
(WebCore::IDBIndex::deref):

  • Modules/indexeddb/IDBIndex.h:

(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::info):
(WebCore::IDBIndex::modernObjectStore):
(WebCore::IDBIndex::isDeleted):
(WebCore::IDBIndex::~IDBIndex): Deleted.
(WebCore::IDBIndex::isModern): Deleted.

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::create):
(WebCore::IDBObjectStore::IDBObjectStore):
(WebCore::IDBObjectStore::~IDBObjectStore):
(WebCore::IDBObjectStore::activeDOMObjectName):
(WebCore::IDBObjectStore::canSuspendForDocumentSuspension):
(WebCore::IDBObjectStore::hasPendingActivity):
(WebCore::IDBObjectStore::name):
(WebCore::IDBObjectStore::keyPathAny):
(WebCore::IDBObjectStore::keyPath):
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::transaction):
(WebCore::IDBObjectStore::autoIncrement):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::putForCursorUpdate):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::modernDelete):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):
(WebCore::IDBObjectStore::markAsDeleted):
(WebCore::IDBObjectStore::rollbackInfoForVersionChangeAbort):
(WebCore::IDBObjectStore::visitReferencedIndexes):

  • Modules/indexeddb/IDBObjectStore.h:

(WebCore::IDBObjectStore::isDeleted):
(WebCore::IDBObjectStore::info):
(WebCore::IDBObjectStore::modernTransaction):
(WebCore::IDBObjectStore::~IDBObjectStore): Deleted.
(WebCore::IDBObjectStore::isModern): Deleted.

  • Modules/indexeddb/IDBOpenDBRequest.cpp:

(WebCore::IDBOpenDBRequest::createDeleteRequest):
(WebCore::IDBOpenDBRequest::createOpenRequest):
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::~IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::onError):
(WebCore::IDBOpenDBRequest::versionChangeTransactionDidFinish):
(WebCore::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
(WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
(WebCore::IDBOpenDBRequest::dispatchEvent):
(WebCore::IDBOpenDBRequest::onSuccess):
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
(WebCore::IDBOpenDBRequest::onDeleteDatabaseSuccess):
(WebCore::IDBOpenDBRequest::requestCompleted):
(WebCore::IDBOpenDBRequest::requestBlocked):

  • Modules/indexeddb/IDBOpenDBRequest.h:

(WebCore::IDBOpenDBRequest::databaseIdentifier):
(WebCore::IDBOpenDBRequest::version):
(WebCore::IDBOpenDBRequest::~IDBOpenDBRequest): Deleted.

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::create):
(WebCore::IDBRequest::createCount):
(WebCore::IDBRequest::createGet):
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::~IDBRequest):
(WebCore::IDBRequest::result):
(WebCore::IDBRequest::errorCode):
(WebCore::IDBRequest::error):
(WebCore::IDBRequest::source):
(WebCore::IDBRequest::setSource):
(WebCore::IDBRequest::setVersionChangeTransaction):
(WebCore::IDBRequest::transaction):
(WebCore::IDBRequest::readyState):
(WebCore::IDBRequest::sourceObjectStoreIdentifier):
(WebCore::IDBRequest::sourceIndexIdentifier):
(WebCore::IDBRequest::requestedIndexRecordType):
(WebCore::IDBRequest::eventTargetInterface):
(WebCore::IDBRequest::activeDOMObjectName):
(WebCore::IDBRequest::canSuspendForDocumentSuspension):
(WebCore::IDBRequest::hasPendingActivity):
(WebCore::IDBRequest::stop):
(WebCore::IDBRequest::enqueueEvent):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):
(WebCore::IDBRequest::setResultToUndefined):
(WebCore::IDBRequest::resultCursor):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::requestCompleted):
(WebCore::IDBRequest::onError):
(WebCore::IDBRequest::onSuccess):

  • Modules/indexeddb/IDBRequest.h:

(WebCore::IDBRequest::resourceIdentifier):
(WebCore::IDBRequest::connection):
(WebCore::IDBRequest::modernResult):
(WebCore::IDBRequest::pendingCursor):
(WebCore::IDBRequest::requestType):
(WebCore::IDBRequest::isOpenDBRequest):
(WebCore::IDBRequest::~IDBRequest): Deleted.

  • Modules/indexeddb/IDBRequestCompletionEvent.cpp:

(WebCore::IDBRequestCompletionEvent::IDBRequestCompletionEvent):

  • Modules/indexeddb/IDBRequestCompletionEvent.h:

(WebCore::IDBRequestCompletionEvent::create):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::create):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::~IDBTransaction):
(WebCore::IDBTransaction::mode):
(WebCore::IDBTransaction::db):
(WebCore::IDBTransaction::serverConnection):
(WebCore::IDBTransaction::error):
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::abortDueToFailedRequest):
(WebCore::IDBTransaction::transitionedToFinishing):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::activeDOMObjectName):
(WebCore::IDBTransaction::canSuspendForDocumentSuspension):
(WebCore::IDBTransaction::hasPendingActivity):
(WebCore::IDBTransaction::stop):
(WebCore::IDBTransaction::isActive):
(WebCore::IDBTransaction::isFinishedOrFinishing):
(WebCore::IDBTransaction::addRequest):
(WebCore::IDBTransaction::removeRequest):
(WebCore::IDBTransaction::scheduleOperation):
(WebCore::IDBTransaction::scheduleOperationTimer):
(WebCore::IDBTransaction::operationTimerFired):
(WebCore::IDBTransaction::commit):
(WebCore::IDBTransaction::commitOnServer):
(WebCore::IDBTransaction::finishAbortOrCommit):
(WebCore::IDBTransaction::didStart):
(WebCore::IDBTransaction::notifyDidAbort):
(WebCore::IDBTransaction::didAbort):
(WebCore::IDBTransaction::didCommit):
(WebCore::IDBTransaction::fireOnComplete):
(WebCore::IDBTransaction::fireOnAbort):
(WebCore::IDBTransaction::enqueueEvent):
(WebCore::IDBTransaction::dispatchEvent):
(WebCore::IDBTransaction::createObjectStore):
(WebCore::IDBTransaction::createObjectStoreOnServer):
(WebCore::IDBTransaction::didCreateObjectStoreOnServer):
(WebCore::IDBTransaction::createIndex):
(WebCore::IDBTransaction::createIndexOnServer):
(WebCore::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBTransaction::requestOpenCursor):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::openCursorOnServer):
(WebCore::IDBTransaction::didOpenCursorOnServer):
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::iterateCursorOnServer):
(WebCore::IDBTransaction::didIterateCursorOnServer):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestGetValue):
(WebCore::IDBTransaction::requestGetKey):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::getRecordOnServer):
(WebCore::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBTransaction::requestCount):
(WebCore::IDBTransaction::getCountOnServer):
(WebCore::IDBTransaction::didGetCountOnServer):
(WebCore::IDBTransaction::requestDeleteRecord):
(WebCore::IDBTransaction::deleteRecordOnServer):
(WebCore::IDBTransaction::didDeleteRecordOnServer):
(WebCore::IDBTransaction::requestClearObjectStore):
(WebCore::IDBTransaction::clearObjectStoreOnServer):
(WebCore::IDBTransaction::didClearObjectStoreOnServer):
(WebCore::IDBTransaction::requestPutOrAdd):
(WebCore::IDBTransaction::putOrAddOnServer):
(WebCore::IDBTransaction::didPutOrAddOnServer):
(WebCore::IDBTransaction::deleteObjectStore):
(WebCore::IDBTransaction::deleteObjectStoreOnServer):
(WebCore::IDBTransaction::didDeleteObjectStoreOnServer):
(WebCore::IDBTransaction::deleteIndex):
(WebCore::IDBTransaction::deleteIndexOnServer):
(WebCore::IDBTransaction::didDeleteIndexOnServer):
(WebCore::IDBTransaction::operationDidComplete):
(WebCore::IDBTransaction::establishOnServer):
(WebCore::IDBTransaction::activate):
(WebCore::IDBTransaction::deactivate):

  • Modules/indexeddb/IDBTransaction.h:

(WebCore::IDBTransaction::info):
(WebCore::IDBTransaction::database):
(WebCore::IDBTransaction::originalDatabaseInfo):
(WebCore::IDBTransaction::isVersionChange):
(WebCore::IDBTransaction::isReadOnly):
(WebCore::IDBTransaction::isFinished):
(WebCore::TransactionActivator::TransactionActivator):
(WebCore::TransactionActivator::~TransactionActivator):
(WebCore::IDBTransaction::~IDBTransaction): Deleted.

  • Modules/indexeddb/IDBVersionChangeEvent.cpp:

(WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
(WebCore::IDBVersionChangeEvent::newVersion):
(WebCore::IDBVersionChangeEvent::eventInterface):
(WebCore::IDBVersionChangeEvent::create): Deleted.

  • Modules/indexeddb/IDBVersionChangeEvent.h:

(isType):

  • Modules/indexeddb/client/IDBAnyImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBAnyImpl.h: Removed.
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:
  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBCursorImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBCursorImpl.h: Removed.
  • Modules/indexeddb/client/IDBCursorWithValueImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBCursorWithValueImpl.h: Removed.
  • Modules/indexeddb/client/IDBDatabaseImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBDatabaseImpl.h: Removed.
  • Modules/indexeddb/client/IDBFactoryImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBFactoryImpl.h: Removed.
  • Modules/indexeddb/client/IDBIndexImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBIndexImpl.h: Removed.
  • Modules/indexeddb/client/IDBObjectStoreImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBObjectStoreImpl.h: Removed.
  • Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBOpenDBRequestImpl.h: Removed.
  • Modules/indexeddb/client/IDBRequestImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBRequestImpl.h: Removed.
  • Modules/indexeddb/client/IDBTransactionImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBTransactionImpl.h: Removed.
  • Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp: Removed.
  • Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed.
  • Modules/indexeddb/client/TransactionOperation.cpp:
  • Modules/indexeddb/client/TransactionOperation.h:
  • Modules/indexeddb/shared/IDBCursorInfo.cpp:

(WebCore::IDBCursorInfo::objectStoreCursor):
(WebCore::IDBCursorInfo::indexCursor):
(WebCore::IDBCursorInfo::IDBCursorInfo):

  • Modules/indexeddb/shared/IDBCursorInfo.h:
  • Modules/indexeddb/shared/IDBRequestData.cpp:

(WebCore::IDBRequestData::IDBRequestData):

  • Modules/indexeddb/shared/IDBRequestData.h:
  • Modules/indexeddb/shared/IDBResourceIdentifier.cpp:

(WebCore::IDBResourceIdentifier::IDBResourceIdentifier):

  • Modules/indexeddb/shared/IDBResourceIdentifier.h:
  • Modules/indexeddb/shared/IDBTransactionInfo.cpp:
  • Modules/indexeddb/shared/InProcessIDBServer.cpp:
  • Modules/indexeddb/shared/InProcessIDBServer.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSIDBCursorCustom.cpp:

(WebCore::JSIDBCursor::visitAdditionalChildren):

  • bindings/js/JSIDBCursorWithValueCustom.cpp:
  • bindings/js/JSIDBIndexCustom.cpp:

(WebCore::JSIDBIndex::visitAdditionalChildren):

  • bindings/js/JSIDBObjectStoreCustom.cpp:

(WebCore::JSIDBObjectStore::visitAdditionalChildren):

  • inspector/InspectorIndexedDBAgent.cpp:

Source/WebKit2:

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
3:41 PM Changeset in webkit [198761] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/Tools

Upstream webkitdirs.pm from trunk.
rdar://problem/25253479

Rubber-stamped by Dean Johnson.

  • Scripts/webkitdirs.pm:
3:34 PM Changeset in webkit [198760] by BJ Burg
  • 5 edits in trunk/Source/WebKit2

Web Automation: add commands to move and resize a browsing context's window
https://bugs.webkit.org/show_bug.cgi?id=155349
<rdar://problem/25104911>

Reviewed by Timothy Hatcher.

Parse the new origin or size and request the window to change to the
new frame. This calls through to PageUIClient::setWindowFrame().

  • UIProcess/Automation/Automation.json:

Add new enum values for protocol parsing error cases.
Add new commands.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
Added. Parse the incoming payload and bail if nothing would happen
or the values are not usable or out of range. Complain if a change
did not happen when the requested and actual size are different.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/WebPageProxy.h: Move setWindowFrame to be public.
3:34 PM Changeset in webkit [198759] by BJ Burg
  • 3 edits in trunk/Source/WebKit2

Web Automation: split protocol object BrowsingContext.windowFrame into two separate members
https://bugs.webkit.org/show_bug.cgi?id=155952
<rdar://problem/25393597>

Reviewed by Timothy Hatcher.

Using the name 'windowFrame' causes conflicts with some Objective-C code.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::buildBrowsingContextForPage):

2:37 PM Changeset in webkit [198758] by mmaxfield@apple.com
  • 4 edits
    12 adds in trunk

[RTL Scrollbars] Position:sticky can be positioned under vertical RTL scrollbar
https://bugs.webkit.org/show_bug.cgi?id=155949

Reviewed by Simon Fraser.

Source/WebCore:

When performing sticky positioning logic, we were setting the clip rect's position
equal to the scrollPosition of the layer. This computation assumes that the top
left of the scroll position is the same as the top left of the clip rect. When
using RTL scrollbars, this is not true, so this code simply needs to be made aware
of the presence of an RTL scrollbar.

Tests: fast/scrolling/rtl-scrollbars-sticky-document-2.html

fast/scrolling/rtl-scrollbars-sticky-document.html
fast/scrolling/rtl-scrollbars-sticky-iframe-2.html
fast/scrolling/rtl-scrollbars-sticky-iframe.html
fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html
fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):

LayoutTests:

  • platform/ios-simulator/TestExpectations:
  • fast/scrolling/rtl-scrollbars-sticky-document-2-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-document-2.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-document-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-document.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-iframe-2-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-iframe-2.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-iframe-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-iframe.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-expected.html: Added.
  • fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html: Added.
1:59 PM Changeset in webkit [198757] by clopez@igalia.com
  • 3 edits in trunk/Source/WebKit2

[CMake] Unreviewed build fix after r198736.
https://bugs.webkit.org/show_bug.cgi?id=155221

Unreviewed.

  • CMakeLists.txt: Fix typo, add WebAutomationSession.cpp and declare JavaScriptCore_SCRIPTS_DIR.
  • WebProcess/Automation/WebAutomationSessionProxy.h: Add missing include.
1:58 PM Changeset in webkit [198756] by tonikitoo@webkit.org
  • 3 edits in trunk/Source/WebCore

Rename PlatformWheelEvent::isEndGesture to isEndOfMomentumScroll.
https://bugs.webkit.org/show_bug.cgi?id=155940

Reviewed by Simon Fraser.

No new tests needed.

The new name better reflects its purpose. Also it is a preparation to fix bug 155746.

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::shouldResetLatching):
(WebCore::PlatformWheelEvent::isEndOfMomentumScroll: Renamed; Formally isEndGesture.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::gestureShouldBeginSnap):

1:32 PM Changeset in webkit [198755] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Use std::exchange for std::functions instead of WTFMove
https://bugs.webkit.org/show_bug.cgi?id=155950
rdar://problem/25348817

Reviewed by Anders Carlsson.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::setPendingDownloadID):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
This makes the member variable nullptr when the value is moved so we don't use it again.

11:52 AM Changeset in webkit [198754] by BJ Burg
  • 5 edits in trunk/Source/WebKit2

Web Automation: report the browsing context's window frame (size and origin)
https://bugs.webkit.org/show_bug.cgi?id=155323
<rdar://problem/25094089>

Reviewed by Timothy Hatcher.

To prepare for implementing resize and move commands, add a
windowFrame member to the browsing context protocol type.

  • UIProcess/Automation/Automation.json:

Add a frame Rect to BrowsingContext.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::handleForWebPageProxy):
(WebKit::WebAutomationSession::buildBrowsingContextForPage):
Extract the code to build a BrowsingContext object. Add
code to calculate and insert the page's window frame size.

(WebKit::WebAutomationSession::getBrowsingContexts):
(WebKit::WebAutomationSession::getBrowsingContext):
(WebKit::WebAutomationSession::createBrowsingContext):
(WebKit::WebAutomationSession::switchToBrowsingContext):
Refactoring as above.

  • UIProcess/Automation/WebAutomationSession.h:

Adjust signatures.

  • UIProcess/WebPageProxy.h: Make getWindowFrame public.
11:39 AM Changeset in webkit [198753] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Setup cloned continuation renderer properly.
https://bugs.webkit.org/show_bug.cgi?id=155640

Reviewed by Simon Fraser.

Set the "renderer has outline ancestor" flag on the cloned inline renderer when
we split the original renderer for continuation.
It ensures that when the cloned part of the continuation requests repaint, we properly
invalidate the ancestor outline (if needed).

Source/WebCore:

Test: fast/inline/outline-with-continuation-assert.html

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::clone):

LayoutTests:

  • fast/inline/outline-with-continuation-assert-expected.txt: Added.
  • fast/inline/outline-with-continuation-assert.html: Added.
11:21 AM Changeset in webkit [198752] by BJ Burg
  • 18 edits in trunk/Source/JavaScriptCore

Web Inspector: protocol generator should generate C++ string-to-enum helper functions
https://bugs.webkit.org/show_bug.cgi?id=155691
<rdar://problem/25258078>

Reviewed by Timothy Hatcher.

There's a lot of code throughout the Inspector agents and automation code
that needs to convert a raw string into a typed protocol enum. Generate
some helpers that do this conversion so clients can move over to using it.

These helpers are necessary for when we eventually switch to calling backend
dispatcher handlers with typed arguments instead of untyped JSON objects.

To correctly generate a conversion function for an anonymous enum, the
generator needs to be able to get the containing object type's declaration.
Since the model's Type object each have only one instance, there is a
one-to-one association between type and its declaration.

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator.generate_output):
(CppProtocolTypesHeaderGenerator._generate_forward_declarations):
Clean up this method to use methodcaller to sort types by raw name.

(_generate_declarations_for_enum_conversion_methods):
(_generate_declarations_for_enum_conversion_methods.return_type_with_export_macro):
(_generate_declarations_for_enum_conversion_methods.type_member_is_anonymous_enum_type):
Added. Generates a new section with an unfilled template and specializations of
the template for every named and anonymous enum in every domain. Guards for
domains wrap the forward declarations. This is added to the end of the header
file so that specializations for both types of enums are in the same place.

  • inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:

(CppProtocolTypesImplementationGenerator.generate_output):
(CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain):
(CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain.type_member_is_anonymous_enum_type):
(CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain.generate_conversion_method_body):
Added. Generate a static array of offsets into the enum constant value array.
Then, loop over this array of offsets and do string comparisons against the
provided string and enum constant values at the relevant offsets for this enum.

  • inspector/scripts/codegen/generator_templates.py:

(GeneratorTemplates): Update copyright year in generated files.

  • inspector/scripts/codegen/models.py:

(AliasedType.init):
(EnumType.init):
(EnumType.enum_values):
(EnumType.declaration):
(ArrayType.init):
(ArrayType.declaration):
(ObjectType.init):
(ObjectType.declaration):
(Protocol.resolve_types):
(Protocol.lookup_type_reference):
Pass the type declaration to Type constructors if available. If not,
fill in a placeholder name for the type in the constructor instead of caller.

Rebaseline all the things, mostly for copyright block changes.

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/expected/enum-values.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
11:01 AM Changeset in webkit [198751] by Nikita Vasilyev
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Use font-variant-numeric: tabular-nums instead of -apple-system-monospaced-numbers
https://bugs.webkit.org/show_bug.cgi?id=155826
<rdar://problem/25330631>

Reviewed by Myles C. Maxfield.

  • UserInterface/Views/CodeMirrorOverrides.css:

(.CodeMirror .CodeMirror-linenumber):

  • UserInterface/Views/DataGrid.css:

(.data-grid td):

  • UserInterface/Views/DefaultDashboardView.css:

(.toolbar .dashboard.default > .item):

  • UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:

(.object-tree-array-index .index-name):

10:49 AM Changeset in webkit [198750] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Add font-variant-numeric to CSS autocompletions
https://bugs.webkit.org/show_bug.cgi?id=155941
<rdar://problem/25381735>

Reviewed by Timothy Hatcher.

Also, remove -apple-system-monospaced-numbers.
font-variant-numeric: tabular-nuns should be used instead.

  • UserInterface/Models/CSSKeywordCompletions.js:
10:49 AM MathML/Early_2016_Refactoring created by fred.wang@free.fr
10:48 AM Changeset in webkit [198749] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking transitions/cancel-transition.html as flaky on ios-sim-wk2
https://bugs.webkit.org/show_bug.cgi?id=155948

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
10:47 AM Changeset in webkit [198748] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

REGRESSION (r195303): Web Inspector: Wrong indentation in the type coverage profiler popovers
https://bugs.webkit.org/show_bug.cgi?id=155930
<rdar://problem/25377042>

Reviewed by Timothy Hatcher.

Increased specificity of TypeTreeView CSS selectors, and added new
overrides for rules made global by r195303, which don't apply to the
TypeTreeView's or its tree elements.

  • UserInterface/Views/TypeTreeElement.css:

(.item.type-tree-element):
(.item.type-tree-element > .titles):
(.item.type-tree-element > .disclosure-button):
(.item.type-tree-element.parent > .disclosure-button):
(.item.type-tree-element.parent.expanded > .disclosure-button):
(.item.type-tree-element > .icon):
(.item.type-tree-element.prototype):
(.item.type-tree-element.prototype:focus):
(.item.type-tree-element.prototype + ol):
(.type-tree-element): Deleted.
(.type-tree-element > .titles): Deleted.
(.type-tree-element > .disclosure-button): Deleted.
(.type-tree-element.parent > .disclosure-button): Deleted.
(.type-tree-element.parent.expanded > .disclosure-button): Deleted.
(.type-tree-element > .icon): Deleted.
(.type-tree-element.prototype): Deleted.
(.type-tree-element.prototype:focus): Deleted.
(.type-tree-element.prototype + ol): Deleted.

  • UserInterface/Views/TypeTreeView.css:

(.tree-outline.type li):

  • UserInterface/Views/TypeTreeView.js:

(WebInspector.TypeTreeView):
Use custom indentation.

10:46 AM Changeset in webkit [198747] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Large repaints while typing in the console tab
https://bugs.webkit.org/show_bug.cgi?id=155627
<rdar://problem/25234875>

Reviewed by Timothy Hatcher.

Specify the height of flexbox elements to reduce repaint areas.

  • UserInterface/Views/Main.css:

(#navigation-sidebar):
(#content): z-index doesn't affect repaint areas once the height is set.
(#details-sidebar):

10:44 AM Changeset in webkit [198746] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/loader/scroll-position-restored-on-back.html as flaky on ios-sim debug WK2
https://bugs.webkit.org/show_bug.cgi?id=155947

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
10:17 AM Changeset in webkit [198745] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Inspector Memory Timeline sometimes encounters unstoppable rAF drawing
https://bugs.webkit.org/show_bug.cgi?id=155906

Reviewed by Anders Carlsson.

It was possible to get Web Inspector into a state where repeated, expensive
requestAnimationFrame calls prevented user events from being handled, making it
unresponsive.

requestAnimationFrame uses callOnMainThread() to get a notification from the
CVDispayLink thread to the main thread, which is a -performSelectorOnMainThread...
Under the hood, this ends up as a CFRunLoopPerformBlock().

User events come in via Connection::enqueueIncomingMessage(), which uses RunLoop::main()::dispatch(),
which uses a CFRunLoopSource. Evidently, repeated calls to CFRunLoopPerformBlock() can prevent the
CFRunLoopSource from being handled.

Fix by moving requestAnimationFrame from callOnMainThread() to RunLoop::main()::dispatch().

  • platform/graphics/mac/DisplayRefreshMonitorMac.cpp:

(WebCore::DisplayRefreshMonitorMac::displayLinkFired):

10:15 AM Changeset in webkit [198744] by jdiggs@igalia.com
  • 2 edits in trunk/Tools

Add myself as reviewer

9:34 AM Changeset in webkit [198743] by BJ Burg
  • 2 edits in trunk/Source/WebKit2

Unreviewed, fix the build.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

InspectorProtocolObjects.h was renamed to AutomationProtocolObjects.h.

9:15 AM Changeset in webkit [198742] by jer.noble@apple.com
  • 1 edit
    1 add in trunk/LayoutTests

Unreviewed rebaselining; Different track IDs are selected in El Capitan.

  • platform/mac/media/track/video-track-alternate-groups-expected.txt: Added.
9:04 AM Changeset in webkit [198741] by Chris Dumez
  • 13 edits in trunk

Disk cache speculative validation requests do not have the 'Referer' HTTP header set
https://bugs.webkit.org/show_bug.cgi?id=155890
<rdar://problem/25279962>

Reviewed by Antti Koivisto.

Source/WebCore:

Export a couple more symbols so we can use them from WebKit2.

  • platform/network/HTTPHeaderMap.h:
  • platform/network/ResourceRequestBase.h:

Source/WebKit2:

Disk cache speculative validation requests did not have the 'Referer'
HTTP header set. This was breaking some streaming sites (such as
twitch.tv).

We now store all the original request's HTTP headers in the disk cache
so we can re-use them for the speculative validation requests. When the
actual request comes later on, we also make sure that the HTTP headers
used in the speculative validation request match the ones from the
effective request. If they don't we don't use the speculatively
validated resource as the server may return a different resource in
such case.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::retrieve):
Pass the effective ResourceRequest to the NetworkCacheSpeculativeLoadManager
so it can check that the speculative validation request's HTTP headers
match the effective request's headers.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::wasRevalidated):
We now have a member in PreloadedEntry to keep the request used for validation, if
speculative validation was done. This is so that we can compare its HTTP headers
with the ones of the effective request later on.

(WebKit::NetworkCache::dumpHTTPHeadersDiff):
Debug function that prints which HTTP headers did not match in the speculative
validation request and in the effective request.

(WebKit::NetworkCache::requestsHeadersMatch):
New utility function to check that the speculative validation request's HTTP
headers match the ones of the effective requests. Note that we allow for
headers related to validation to differ.

(WebKit::NetworkCache::SpeculativeLoadManager::canUsePreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::canUsePendingPreload):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
Check that the speculative validation request's HTTP headers match the
ones of the effective request. If they don't then do not use the
speculatively validated resource.

(WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):
(WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
(WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:

(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):

  • Keep all the request's headers in SubresourceInfo instead of just the 'User-Agent' one.
  • Drop the custom copy constructor / assignment operator for SubresourceInfo that were making isolated copies on the members. We technically don't need to use SubresourceInfo objects in other threads than the main one. In SpeculativeLoadManager::preloadEntry(), we now make capture a SubresourceInfo* in the lambda to avoid calling the copy constructor. We also make sure that the object gets destroyed in the lambda function, which is executed in the main thread.

LayoutTests:

Update existing layout test to make sure that speculative validation
requests have their HTTP 'Referer' header set.

  • http/tests/cache/disk-cache/speculative-validation/validation-request-expected.txt:
  • http/tests/cache/disk-cache/speculative-validation/validation-request.html:
8:57 AM Changeset in webkit [198740] by timothy@apple.com
  • 8 edits in trunk/Source/WebKit2

Web Automation: Add Automation protocol commands to handle JavaScript dialogs

https://bugs.webkit.org/show_bug.cgi?id=155888
rdar://problem/25360218

Reviewed by Brian Burg.

  • UIProcess/API/APIAutomationSessionClient.h:

(API::AutomationSessionClient::isShowingJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): Added.

  • UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
  • UIProcess/Automation/Automation.json: Added new commands.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::isShowingJavaScriptDialog): Added.
(WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog): Added.
(WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog): Added.
(WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog): Added.
(WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt): Added.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Cocoa/AutomationSessionClient.h:
  • UIProcess/Cocoa/AutomationSessionClient.mm:

(WebKit::AutomationSessionClient::AutomationSessionClient): Added.
(WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): Added.

8:57 AM Changeset in webkit [198739] by timothy@apple.com
  • 11 edits in trunk/Source

Web Automation: Add commands to compute layout of an element

https://bugs.webkit.org/show_bug.cgi?id=155841
rdar://problem/25340075

Reviewed by Brian Burg.

Source/WebCore:

  • dom/Element.h: Mark scrollIntoViewIfNeeded() method as exported so WK2 can use it.
  • platform/ScrollView.h: Mark rootViewToContents(IntRect) method as exported so WK2 can use it.

Source/WebKit2:

  • UIProcess/Automation/Automation.json: Added computeElementLayout.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::computeElementLayout): Added.
(WebKit::WebAutomationSession::didComputeElementLayout): Added.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in:

(DidComputeElementLayout): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.messages.in:

(ComputeElementLayout): Added.

8:57 AM Changeset in webkit [198738] by timothy@apple.com
  • 12 edits in trunk/Source

Web Automation: Add Automation protocol commands to resolve frames as handles

https://bugs.webkit.org/show_bug.cgi?id=155650
rdar://problem/25242422

Reviewed by Brian Burg.

Source/WebCore:

  • page/DOMWindow.h: Marked focus() method as exported so WK2 can use them.
  • page/FrameTree.h: Marked scopedChild() methods as exported so WK2 can use them.

Source/WebKit2:

  • UIProcess/Automation/Automation.json:

Added resolveFrameHandle and resolveParentFrameHandle.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::webFrameProxyForHandle): Added.
(WebKit::WebAutomationSession::handleForWebFrameID): Added.
(WebKit::WebAutomationSession::handleForWebFrameProxy): Added.
(WebKit::WebAutomationSession::evaluateJavaScriptFunction): Use frame handles now.
(WebKit::WebAutomationSession::resolveChildFrameHandle): Added.
(WebKit::WebAutomationSession::didChildResolveFrame): Added.
(WebKit::WebAutomationSession::resolveParentFrameHandle): Added.
(WebKit::WebAutomationSession::didResolveParentFrame): Added.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in:

(DidResolveChildFrame): Added.
(DidResolveParentFrame): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::elementForNodeHandle): Added.
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithOrdinal): Added.
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithNodeHandle): Added.
(WebKit::WebAutomationSessionProxy::resolveChildFrameWithName): Added.
(WebKit::WebAutomationSessionProxy::resolveParentFrame): Added.
(WebKit::WebAutomationSessionProxy::focusFrame): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.messages.in:

(ResolveChildFrameWithOrdinal): Added.
(ResolveChildFrameWithNodeHandle): Added.
(ResolveChildFrameWithName): Added.
(ResolveParentFrame): Added.
(FocusFrame): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.js:

(AutomationSessionProxy.prototype.nodeForIdentifier): Added.
Public method that eats the exception thrown by the private method.

8:57 AM Changeset in webkit [198737] by timothy@apple.com
  • 9 edits in trunk/Source/WebKit2

Web Automation: Add Automation.evaluateJavaScriptFunction

https://bugs.webkit.org/show_bug.cgi?id=155524
rdar://problem/25181888

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/Automation.json: Added evaluateJavaScriptFunction command.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::evaluateJavaScriptFunction): Added.
(WebKit::WebAutomationSession::didEvaluateJavaScriptFunction): Added.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in: Added didEvaluateJavaScriptFunction.
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::toJSArray): Added.
(WebKit::callPropertyFunction): Added.
(WebKit::evaluateJavaScriptCallback): Added.
(WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame): Dispatch pending callbacks as errors.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Added.
(WebKit::WebAutomationSessionProxy::didEvaluateJavaScriptFunction): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.js:

(AutomationSessionProxy): Added maps for node handles.
(AutomationSessionProxy.prototype.evaluateJavaScriptFunction): Added.
(AutomationSessionProxy.prototype._jsonParse): Added.
(AutomationSessionProxy.prototype._jsonStringify): Added.
(AutomationSessionProxy.prototype._reviveJSONValue): Added.
(AutomationSessionProxy.prototype._replaceJSONValue): Added.
(AutomationSessionProxy.prototype._createNodeHandle): Added.
(AutomationSessionProxy.prototype._nodeForIdentifier): Added.
(AutomationSessionProxy.prototype._identifierForNode): Added.

  • WebProcess/Automation/WebAutomationSessionProxy.messages.in: Added evaluateJavaScriptFunction.
8:56 AM Changeset in webkit [198736] by timothy@apple.com
  • 12 edits
    6 adds in trunk/Source/WebKit2

Add WebAutomationSessionProxy for WebProcess side automation tasks

https://bugs.webkit.org/show_bug.cgi?id=155221
rdar://problem/25054868

Reviewed by Joseph Pecoraro.

  • CMakeLists.txt: Add build step to build-in WebAutomationSessionProxy.js.
  • DerivedSources.make: Ditto.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::~WebAutomationSession):
(WebKit::WebAutomationSession::setProcessPool): Add / remove message receiver.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/Automation/WebAutomationSession.messages.in: Added.

Test message to get things to build.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::removeMessageReceiver):
(WebKit::WebProcessPool::setAutomationSession):

  • UIProcess/WebProcessPool.h:
  • WebKit2.xcodeproj/project.pbxproj: Added new files.
  • WebProcess/Automation/WebAutomationSessionProxy.cpp: Added.

(WebKit::toJSString):
(WebKit::toJSValue):
(WebKit::WebAutomationSessionProxy::WebAutomationSessionProxy):
(WebKit::WebAutomationSessionProxy::~WebAutomationSessionProxy):
(WebKit::evaluate):
(WebKit::createUUID):
(WebKit::WebAutomationSessionProxy::scriptObjectForFrame):
(WebKit::WebAutomationSessionProxy::didClearWindowObjectForFrame):
Create a script object per frame that is evaluated from WebAutomationSessionProxy.js.
Clear the script object when the window object is cleared.

  • WebProcess/Automation/WebAutomationSessionProxy.h: Added.

(WebKit::WebAutomationSessionProxy::test):
Added test message to let the messages files build.

  • WebProcess/Automation/WebAutomationSessionProxy.js: Added.
  • WebProcess/Automation/WebAutomationSessionProxy.messages.in: Added.
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
Call WebAutomationSessionProxy::didClearWindowObjectForFrame to clear the script object.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensureAutomationSessionProxy):
(WebKit::WebProcess::destroyAutomationSessionProxy):
Creates and destroys the WebAutomationSessionProxy when the UIProcess WebAutomationSession
is set or removed on the WebProcessPool.

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::automationSessionProxy): Added.

  • WebProcess/WebProcess.messages.in: Added. Test message to get things to build.
8:23 AM Changeset in webkit [198735] by commit-queue@webkit.org
  • 15 edits in trunk/Source/WebCore

Remove USE(TEXTURE_MAPPER) guards inside TextureMapper sources.
https://bugs.webkit.org/show_bug.cgi?id=155944

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-28
Reviewed by Michael Catanzaro.

After r196429 TextureMapper sources are built only in ports which actually
use TextureMapper, so USE(TEXTURE_MAPPER) guards in them are redundant now.

No new tests needed.

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
  • platform/graphics/texmap/TextureMapper.cpp:
  • platform/graphics/texmap/TextureMapper.h:
  • platform/graphics/texmap/TextureMapperBackingStore.cpp:
  • platform/graphics/texmap/TextureMapperBackingStore.h:
  • platform/graphics/texmap/TextureMapperFPSCounter.cpp:
  • platform/graphics/texmap/TextureMapperFPSCounter.h:
  • platform/graphics/texmap/TextureMapperLayer.cpp:
  • platform/graphics/texmap/TextureMapperLayer.h:
  • platform/graphics/texmap/TextureMapperTile.cpp:
  • platform/graphics/texmap/TextureMapperTile.h:
  • platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
  • platform/graphics/texmap/TextureMapperTiledBackingStore.h:
7:06 AM Changeset in webkit [198734] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL] Mark failing indexeddb tests to failure

Unreviewed EFL gardening.

Additionally a shadow dom test is marked to failure because shadow dom is not enabled on EFL port yet.

  • platform/efl/TestExpectations:
7:03 AM Changeset in webkit [198733] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Tried to fix the build after r198728.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::gestureEvent):

4:22 AM Changeset in webkit [198732] by Manuel Rego Casasnovas
  • 2 edits in trunk/Source/WebCore

[css-grid] Remove unneeded lines in offsetAndBreadthForPositionedChild()
https://bugs.webkit.org/show_bug.cgi?id=155788

Reviewed by Sergio Villar Senin.

Just remove 2 lines/variables that were not needed at all in
RenderGrid::offsetAndBreadthForPositionedChild().

No new tests, no change of behavior.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):

1:45 AM Changeset in webkit [198731] by Hunseop Jeong
  • 2 edits in trunk/LayoutTests

[EFL] Remove the more passed tests after r198728

Unreviewed EFL gardening.

  • platform/efl/TestExpectations:
1:02 AM Changeset in webkit [198730] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit2

Unreviewed GTK build fix for the threaded compositor feature after r198655.
Adjust the first parameter of ThreadSafeCoordinatedSurface::copyToTexture().

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp:

(WebKit::ThreadSafeCoordinatedSurface::copyToTexture):

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h:

Mar 27, 2016:

11:47 PM Changeset in webkit [198729] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Removed redundant #if conditions in ANGLEWebKitBridge.h
https://bugs.webkit.org/show_bug.cgi?id=155880

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-27
Reviewed by Csaba Osztrogonác.

GTK, Efl, AppleWin, and WinCairo ports can be built only with cmake,
so condition !defined(BUILDING_WITH_CMAKE) implies
!PLATFORM(GTK) && !PLATFORM(EFL) && !PLATOFRM(WIN).

No new tests needed.

  • platform/graphics/ANGLEWebKitBridge.h:
10:59 PM Changeset in webkit [198728] by Hunseop Jeong
  • 7 edits in trunk

[EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
PerformanceTests:

https://bugs.webkit.org/show_bug.cgi?id=148470

Reviewed by Darin Adler.

  • Skipped: Unskip the Bindings/event-target-wrapper test.

Source/WebKit2:

https://bugs.webkit.org/show_bug.cgi?id=148470

Reviewed by Darin Adler.

UI events are suppressed in webPage after r188793.
I revert the r136133 for passing the events to WebPage

  • WebProcess/WebPage/WebPage.cpp: Removed the codes which was uploaded at r136133.

(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::canHandleUserEvents): Deleted.

  • WebProcess/WebPage/WebPage.h:

LayoutTests:

https://bugs.webkit.org/show_bug.cgi?id=148470

Reviewed by Darin Adler.

  • platform/efl/TestExpectations: Unskip the passed tests.
10:07 PM Changeset in webkit [198727] by dbates@webkit.org
  • 2 edits in trunk

WebKit.xcworkspace "All Source" scheme always copies OS X WebKitSystemInterface libraries
https://bugs.webkit.org/show_bug.cgi?id=155889

Reviewed by Alexey Proskuryakov.

Fixes an issue where building the "All Source" scheme in WebKit.xcworkspace would
always copy the OS X WebKitSystemInterface libraries regardless of the selected
base SDK. In particular, it would copy the OS X WebKitSystemInterface libraries
when building with SDK iphonesimulator. WebKit.xcworkspace should copy the SDK-
specific WebKitSystemInterface libraries.

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:
7:31 PM Changeset in webkit [198726] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

[EFL][AX] Mark AX failing tests to failure

Unreveiwed EFL gardening.

  • platform/efl/TestExpectations:
7:32 AM Changeset in webkit [198725] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Mark rtl-scrollbar's tests to pass with incorrectly

Unreviewed EFL gardening.

  • platform/efl/TestExpectations: Though rtl scrollbar isn't supported by EFL yet, it has been passed.

Mar 26, 2016:

8:07 PM Changeset in webkit [198724] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Tried to fix the build.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _takeViewSnapshot]):

8:06 PM FeatureFlags edited by Dr Alex Gouaillard
(diff)
7:13 PM Changeset in webkit [198723] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Tried to fix the build.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _takeViewSnapshot]):

6:05 PM Changeset in webkit [198722] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Mac CMake build fix.

  • PlatformMac.cmake:

Link with AVFoundation libraries.

5:59 PM Changeset in webkit [198721] by dino@apple.com
  • 1 edit in trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

Fix the build by removing the #endif I left in on my last attempt.

  • UIProcess/API/Cocoa/WKWebView.mm:
5:44 PM Changeset in webkit [198720] by dino@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix build after my most recent commit.

  • UIProcess/API/Cocoa/WKWebView.mm:

(WebKit::bufferFormat): Delete the WebKitAdditions include.

4:50 PM Changeset in webkit [198719] by dino@apple.com
  • 10 edits in trunk/Source

Move extended color detection into Open Source
https://bugs.webkit.org/show_bug.cgi?id=155909
<rdar://problem/25369754>

Reviewed by Anders Carlsson.

The code for detecting extended color displays
was hidden while the iPad Pro 9.7" was in development.
Now it is public, move the detection to Open Source.

While doing this, add a new method to PlatformScreen
so that we have a more obvious way to detect such
displays.

Source/WebCore:

  • platform/PlatformScreen.h: Add screenSupportsExtendedColor.
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayerCocoa::commonInit): Set the backing
store format to the RGBA10XR if we're on an extended
display.

  • platform/ios/LegacyTileGridTile.mm:

(WebCore::LegacyTileGridTile::LegacyTileGridTile): Ditto.
(WebCore::setBackingStoreFormat): Deleted. Now set directly
in the constructor.

  • platform/ios/PlatformScreenIOS.mm:

(WebCore::screenDepthPerComponent): Cleanup.
(WebCore::screenSupportsExtendedColor): Implement the
iOS version of this using MobileGestalt.

  • platform/mac/PlatformScreenMac.mm:

(WebCore::displayFromWidget): Whitespace cleanup.
(WebCore::screenForWidget):
(WebCore::screenForWindow):
(WebCore::screenSupportsExtendedColor): Default implementation
returns false for all screens at the moment.

  • platform/spi/cocoa/QuartzCoreSPI.h: New constant.
  • platform/spi/ios/MobileGestaltSPI.h: Ditto.

Source/WebKit2:

  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::bufferFormat): No need to use WebKitAdditions any
more.

1:07 PM Changeset in webkit [198718] by ggaren@apple.com
  • 7 edits in trunk/Source/bmalloc

2016-03-26 Geoffrey Garen <ggaren@apple.com>

Unreviewed, rolling out r198702, r198704.

Caused a memory regression on PLUM.

Reverted changeset:

bmalloc: fix an ASSERT on iOS
https://bugs.webkit.org/show_bug.cgi?id=155911
http://trac.webkit.org/changeset/198704

bmalloc: support physical page sizes that don't match the virtual page size
https://bugs.webkit.org/show_bug.cgi?id=155898
http://trac.webkit.org/changeset/198702

11:37 AM Changeset in webkit [198717] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

[OS X] Layout sometimes flakily assumes overlay scrollbars when clicky-scroll-wheel-mouse is attached and system preference detects scrollbar mode
https://bugs.webkit.org/show_bug.cgi?id=155912

Reviewed by Simon Fraser.

When the system preference is set to detect the scrollbar type (overlay or
always-on, and a clicky scroll wheel mouse is connected, AppKit
asynchronously tells all the NSScrollerImpPairs about the kind of scrollbar
it should be using. However, when this notification is delivered, it may
be in between FrameViews, which means we may not have any
NSScrollerImpPairs created to listen to the notification.

r198444 solved this by asking if we missed any update whenever we create
an NSScrollerImpPair. This works partially; however, there is a significant
amount of layout which occurs before we create the first ScrollAnimatorMac.
This layout will ask the ScrollbarThemeMac if overlay scrollbars are
enabled, and the results will be stale (because we haven't created any the
NSScrollerImpPairs yet).

Luckly, AppKit fires a notification when it discovers what kind of
scrollbars should be used. We can rely on this notification in the event
that we don't have any NSScrollerImpPairs created.

Covered (as best as possible) by existing RTL scrollbar tests. However,
the system preference that governs this is not currently testable.

  • platform/mac/ScrollbarThemeMac.mm:

(+[WebScrollbarPrefsObserver registerAsObserver]):

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove the old code.

5:53 AM Changeset in webkit [198716] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Remove duplicated tests in EFL TextExpectations.

Unreviewed EFL gardening.

  • platform/efl/TestExpectations: Clean up duplicated pathes.
12:31 AM Changeset in webkit [198715] by mitz@apple.com
  • 3 edits in trunk/Source/WebKit2

Treat SHA-1-signed certificates as insecure by default.

Reviewed by Sam Weinig.

  • UIProcess/API/APIPageConfiguration.h: Initialize m_treatsSHA1SignedCertificatesAsInsecure to true.
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]): Initialize _treatsSHA1SignedCertificatesAsInsecure to YES.

12:08 AM Changeset in webkit [198714] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

ES6 Class syntax. Invoking method of parent class in constructor before super() lead to crash
https://bugs.webkit.org/show_bug.cgi?id=152108

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-26
Reviewed by Ryosuke Niwa.

  • js/arrowfunction-superproperty-expected.txt:
  • js/script-tests/arrowfunction-superproperty.js:
  • js/script-tests/class-syntax-name.js:
  • js/script-tests/class-syntax-string-and-numeric-names.js:

Remove stale FIXMEs from LayoutTests where the bugs have been fixed.

Mar 25, 2016:

11:51 PM Changeset in webkit [198713] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Misc. JavaScriptCore built-ins cleanups
https://bugs.webkit.org/show_bug.cgi?id=155920

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-25
Reviewed by Mark Lam.

  • builtins/RegExpPrototype.js:

(match):
No need for an else after an if that always returns.

  • builtins/TypedArrayConstructor.js:

(of):
Fix error message to use the correct function name.

(allocateInt8Array):
(allocateInt16Array):
(allocateInt32Array):
(allocateUint32Array):
(allocateUint16Array):
(allocateUint8Array):
(allocateUint8ClampedArray):
(allocateFloat32Array):
(allocateFloat64Array):
Cleanup style to be like all the other code.

  • tests/stress/typedarray-of.js:

Test the exception message.

10:36 PM Changeset in webkit [198712] by commit-queue@webkit.org
  • 2 edits in trunk/WebKitLibraries

Web Inspector: make at the root should not create a WebKitLibraries/--lvm directory
https://bugs.webkit.org/show_bug.cgi?id=155918

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-25
Reviewed by Timothy Hatcher.

  • Makefile:

Remove no longer used --llvm option.

10:31 PM Changeset in webkit [198711] by commit-queue@webkit.org
  • 5 edits
    3 adds in trunk

Date.prototype.toLocaleDateString uses overridable Object.create
https://bugs.webkit.org/show_bug.cgi?id=155917

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-25
Reviewed by Mark Lam.

Source/JavaScriptCore:

  • builtins/DatePrototype.js:

(toLocaleString.toDateTimeOptionsAnyAll):
(toLocaleDateString.toDateTimeOptionsDateDate):
(toLocaleTimeString.toDateTimeOptionsTimeTime):
Switch from @Object.create to @Object.@create to guarentee we are
using the built-in create method and not user defined code.

  • runtime/CommonIdentifiers.h:
  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):
Setup the @create private symbol.

LayoutTests:

  • js/regress-155917-expected.txt: Added.
  • js/regress-155917.html: Added.
  • js/script-tests/regress-155917.js: Added.

(Object.create):

9:37 PM Changeset in webkit [198710] by matthew_hanson@apple.com
  • 5 edits in branches/safari-601-branch/Source

Versioning.

9:35 PM Changeset in webkit [198709] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-601.6.13

New Tag.

8:47 PM Changeset in webkit [198708] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Put the x86 Assembler on a binary diet
https://bugs.webkit.org/show_bug.cgi?id=155683

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-25
Reviewed by Darin Adler.

The MacroAssemblers are heavily inlined. This is unfortunately
important for baseline JIT where many branches can be eliminated
at compile time.

This inlining causes a lot of binary bloat. The phases
lowering to ASM are massively large.

This patch improves the situation a bit for x86 through
many small improvements:

-Every instruction starts with ensureSpace(). The slow

path realloc the buffer.
From that slow path, only fastRealloc() was a function
call. What is around does not need to be fast, I moved
the whole grow() function out of line for those cases.

-When testing multiple registers for REX requirements,

we had something like this:

byteRegRequiresRex(reg) regRequiresRex(index)
byteRegRequiresRex(rm)
regRequiresRex(base)

Those were producing multiple test-and-branch. Those branches
are effectively random so we don't have to care about individual
branches being predictable.

The new code effectively does:

byteRegRequiresRex(reg | rm)
regRequiresRex(index | base)

-Change "ModRmMode" to have the value we can OR directly

to the generated ModRm.
This is important because some ModRM code is so large
that is goes out of line;

-Finally, a big change on how we write to the AssemblerBuffer.

Previously, instructions were written byte by byte into
the assembler buffer of the MacroAssembler.

The problem with that is the compiler cannot prove that
the buffer pointer and the AssemblerBuffer are not pointing
to the same memory.

Because of that, before any write, all the local register
were pushed back to the AssemblerBuffer memory, then everything
was read back after the write to compute the next write.

I attempted to use the "restrict" keyword and wrapper types
to help Clang with that but nothing worked.

The current solution is to keep a local copy of the index
and the buffer pointer in the scope of each instruction.
That is done by AssemblerBuffer::LocalWriter.

Since LocalWriter only exists locally, it stays in
register and we don't have all the memory churn between
each byte writing. This also allows clang to combine
obvious cases since there are no longer observable side
effects between bytes.

This patch reduces the binary size by 66k. It is a small
speed-up on Sunspider.

  • assembler/AssemblerBuffer.h:

(JSC::AssemblerBuffer::ensureSpace):
(JSC::AssemblerBuffer::LocalWriter::LocalWriter):
(JSC::AssemblerBuffer::LocalWriter::~LocalWriter):
(JSC::AssemblerBuffer::LocalWriter::putByteUnchecked):
(JSC::AssemblerBuffer::LocalWriter::putShortUnchecked):
(JSC::AssemblerBuffer::LocalWriter::putIntUnchecked):
(JSC::AssemblerBuffer::LocalWriter::putInt64Unchecked):
(JSC::AssemblerBuffer::LocalWriter::putIntegralUnchecked):
(JSC::AssemblerBuffer::putIntegral):
(JSC::AssemblerBuffer::outOfLineGrow):

  • assembler/MacroAssemblerX86Common.h:
  • assembler/X86Assembler.h:

(JSC::X86Assembler::X86InstructionFormatter::byteRegRequiresRex):
(JSC::X86Assembler::X86InstructionFormatter::regRequiresRex):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::LocalBufferWriter):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::emitRex):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::emitRexW):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::emitRexIf):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::emitRexIfNeeded):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::putModRm):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::putModRmSib):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::registerModRM):
(JSC::X86Assembler::X86InstructionFormatter::LocalBufferWriter::memoryModRM):
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp32): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp8): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::twoByteOp): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::threeByteOp): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp64): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp32): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp8): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::twoByteOp64): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::oneByteOp8): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::twoByteOp8): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::emitRex): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::emitRexW): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::emitRexIf): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::emitRexIfNeeded): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::putModRm): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::putModRmSib): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::registerModRM): Deleted.
(JSC::X86Assembler::X86InstructionFormatter::memoryModRM): Deleted.

8:45 PM Changeset in webkit [198707] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Sometimes clearing focused nodes in ProfileView leaves a dangling call stack that can never be removed
https://bugs.webkit.org/show_bug.cgi?id=155915

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-25
Reviewed by Timothy Hatcher.

  • UserInterface/Views/ProfileDataGridTree.js:

(WebInspector.ProfileDataGridTree.prototype.addFocusNode):
(WebInspector.ProfileDataGridTree.prototype.rollbackFocusNode):
(WebInspector.ProfileDataGridTree.prototype.clearFocusNodes):
(WebInspector.ProfileDataGridTree.prototype._focusChanged):
(WebInspector.ProfileDataGridTree.prototype._saveFocusedNodeOriginalParent):
(WebInspector.ProfileDataGridTree.prototype._restoreFocusedNodeToOriginalParent):
Be a little more explicit about saving and resotring nodes.
When restoring, work around a DataGrid issue by temporarily
collapsing and expanding the part of the node we are being
reattached to. This is a cheap workaround for an otherwise
complex DataGrid / DataGridTree issue.

7:09 PM Changeset in webkit [198706] by Dewei Zhu
  • 2 edits in trunk/Tools

Dromaeo patch used by run-benchmark should not include an invalid address.
https://bugs.webkit.org/show_bug.cgi?id=155910

Reviewed by Ryosuke Niwa.

Should not use invalid 'http://127.0.0.1/Icons/w3c_home' in the patched version of test.

  • Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch:
6:12 PM Changeset in webkit [198705] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

RegExp.prototype.test should be an intrinsic again
https://bugs.webkit.org/show_bug.cgi?id=155861

Reviewed by Yusuke Suzuki.

  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::finishCreation):

5:50 PM Changeset in webkit [198704] by ggaren@apple.com
  • 2 edits in trunk/Source/bmalloc

bmalloc: fix an ASSERT on iOS
https://bugs.webkit.org/show_bug.cgi?id=155911

Reviewed by Gavin Barraclough.

  • bmalloc/VMAllocate.h:

(bmalloc::vmValidatePhysical): Call through to vmValidatePhysical because
the vmValidate function validates virtual sizes rather than physical
sizes.

5:21 PM Changeset in webkit [198703] by jer.noble@apple.com
  • 3 edits
    8 adds in trunk

[Mac] Audio tracks in alternate groups are not represented correctly as AudioTracks
https://bugs.webkit.org/show_bug.cgi?id=155891
<rdar://problem/24841372>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/video-track-alternate-groups.html

Previously, we created an AudioTrack for every AVPlayerItemTrack, and additionally, a
AudioTrack for every AVMediaSelectionOption that did not have an associated AVAssetTrack.
This caused a number of issues with various types of media, including media with fallback
tracks.

Now, we will create an AudioTrack for every AVMediaSelectionOption, and only create an
AudioTrack for every AVPlayerItem track if no AVMediaSelectionGroups (and thus no
AVMediaSeletionOptions) exist.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::determineChangedTracksFromNewTracksAndOldItems):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):

LayoutTests:

  • media/content/audio-tracks-alternate-group-with-fallback.mp4: Added.
  • media/content/audio-tracks-no-alternate-group.mp4: Added.
  • media/content/audio-tracks-some-in-alternate-group.mp4: Added.
  • media/track/video-track-alternate-groups-expected.txt: Added.
  • media/track/video-track-alternate-groups.html: Added.
  • platform/mac-yosemite/media/track/video-track-alternate-groups-expected.txt: Added.
4:56 PM WebKitGTK/2.12.x edited by Michael Catanzaro
(diff)
4:46 PM Changeset in webkit [198702] by ggaren@apple.com
  • 7 edits in trunk/Source/bmalloc

bmalloc: support physical page sizes that don't match the virtual page size
https://bugs.webkit.org/show_bug.cgi?id=155898

Reviewed by Gavin Barraclough.

This is a memory savings on iOS devices where the virtual page size
is 16kB but the physical page size is 4kB.

  • bmalloc/Chunk.h:

(bmalloc::Chunk::Chunk): smallPageSize is now unrelated to the OS's
page size -- it just reflects the optimal unit of memory to recycle
between small objects.

We only need to round up to largeAlignment because small objects allocate
as subsets of large objects now.

(bmalloc::Chunk::page):
(bmalloc::Object::pageBegin):
(bmalloc::Object::line): Adopt smallPageSize.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::initializeLineMetadata):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateLarge): Adopt smallPageSize.

(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateXLarge):
(bmalloc::Heap::shrinkXLarge): Adopt vmPageSizePhysical(). We want the
physical page size because that's the unit at which the hardware MMU
will recycle memory.

  • bmalloc/Sizes.h: Adopt smallPageSize.
  • bmalloc/VMAllocate.h:

(bmalloc::vmPageSizePhysical):
(bmalloc::vmPageSize): Distinguish between page size, which is the virtual
memory page size advertised by the OS, and physical page size, which the
true hardware page size.

(bmalloc::vmSize):
(bmalloc::vmValidate):
(bmalloc::vmValidatePhysical):
(bmalloc::tryVMAllocate):
(bmalloc::vmDeallocatePhysicalPages):
(bmalloc::vmAllocatePhysicalPages):
(bmalloc::vmDeallocatePhysicalPagesSloppy):
(bmalloc::vmAllocatePhysicalPagesSloppy): Adopt vmPageSize() and
vmPageSizePhyiscal().

  • bmalloc/Vector.h:

(bmalloc::Vector::initialCapacity):
(bmalloc::Vector<T>::shrink):
(bmalloc::Vector<T>::shrinkCapacity):
(bmalloc::Vector<T>::growCapacity): Adopt vmPageSize(). We'd prefer to
use vmPageSizePhysical() but mmap() doesn't support it.

  • bmalloc/XLargeMap.cpp: #include.
4:45 PM Changeset in webkit [198701] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

RenderImage::repaintOrMarkForLayout fails when the renderer is detached.
https://bugs.webkit.org/show_bug.cgi?id=155885
<rdar://problem/25359164>

Reviewed by Simon Fraser.

Making containingBlockFor* functions standalone ensures that we don't
call them on an invalid object.

Covered by existing tests.

  • dom/Element.cpp:

(WebCore::layoutOverflowRectContainsAllDescendants):

  • rendering/LogicalSelectionOffsetCaches.h:

(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):

  • rendering/RenderElement.cpp:

(WebCore::containingBlockForFixedPosition):
(WebCore::containingBlockForAbsolutePosition):
(WebCore::containingBlockForObjectInFlow):
(WebCore::RenderElement::containingBlockForFixedPosition): Deleted.
(WebCore::RenderElement::containingBlockForAbsolutePosition): Deleted.
(WebCore::isNonRenderBlockInline): Deleted.
(WebCore::RenderElement::containingBlockForObjectInFlow): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::styleWillChange):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::containingBlock):

4:44 PM Changeset in webkit [198700] by ggaren@apple.com
  • 15 edits
    1 copy
    2 deletes in trunk/Source/bmalloc

2016-03-25 Geoffrey Garen <ggaren@apple.com>

Unreviewed, rolling in r198679.

r198679 was just a rename. The regression was caused by r198675 and then
fixed in r198693.

Restored changeset:

"bmalloc: Renamed LargeChunk => Chunk"
https://bugs.webkit.org/show_bug.cgi?id=155894
http://trac.webkit.org/changeset/198679

4:27 PM Changeset in webkit [198699] by bshafiei@apple.com
  • 7 edits in tags/Safari-602.1.25.0.1

Merged r198698. rdar://problem/25352879

4:23 PM Changeset in webkit [198698] by mark.lam@apple.com
  • 7 edits in trunk

ES6's throwing of TypeErrors on access of RegExp.prototype flag properties breaks websites.
https://bugs.webkit.org/show_bug.cgi?id=155904

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

There exists a JS library XRegExp (see http://xregexp.com) that extends the regexp
implementation. XRegExp does feature testing by comparing RegExp.prototype.sticky
to undefined. See:

Example 1. https://github.com/slevithan/xregexp/blob/28a2b033c5951477bed8c7c867ddf7e89c431cd4/tests/perf/index.html

...
} else if (knownVersion[version]) {

Hack around ES6 incompatibility in XRegExp versions prior to 3.0.0
if (parseInt(version, 10) < 3) {

delete RegExp.prototype.sticky;

}
...

Example 2. https://github.com/slevithan/xregexp/blob/d0e665d4068cec4d15919215b098b2373f1f12e9/tests/perf/versions/xregexp-all-v2.0.0.js

...
Check for flag y support (Firefox 3+)

hasNativeY = RegExp.prototype.sticky !== undef,

...

The ES6 spec states that we should throw a TypeError here because RegExp.prototype
is not a RegExp object, and the sticky getter is only allowed to be called on
RegExp objects. See https://tc39.github.io/ecma262/2016/#sec-get-regexp.prototype.sticky.
As a result, websites that uses XRegExp can break (e.g. some Atlassian tools).

As a workaround, we'll return undefined instead of throwing on access of these
flag properties that may be used for feature testing.

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoGetterGlobal):
(JSC::regExpProtoGetterIgnoreCase):
(JSC::regExpProtoGetterMultiline):
(JSC::regExpProtoGetterSticky):
(JSC::regExpProtoGetterUnicode):

LayoutTests:

  • ietestcenter/Javascript/TestCases/15.10.7.2-1.js:

(ES5Harness.registerTest.test):

  • ietestcenter/Javascript/TestCases/15.10.7.3-1.js:

(ES5Harness.registerTest.test):

  • ietestcenter/Javascript/TestCases/15.10.7.4-1.js:

(ES5Harness.registerTest.test):

  • updated these tests to not expect a TypeError due to the workaround.
  • js/pic/cached-named-property-getter.html:
  • updated this test to use the source property (which still throws a TypeError) instead of the ignoreCase property which no longer does.
4:15 PM Changeset in webkit [198697] by dino@apple.com
  • 6 edits in trunk/Source

Remove use of extern "C" to include QuartzCore files
https://bugs.webkit.org/show_bug.cgi?id=155905
Source/WebCore:

<rdar://problem/25364798>

Reviewed by Anders Carlson.

We can avoid having to wrap constants in extern "C", since they
are mangled the same in both C and C++.

  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Now that

QuartzCoreSPI.h has CABackdropLayer, remove the duplicate entry.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Ditto.
  • platform/spi/cocoa/QuartzCoreSPI.h: Include the framework private

file. Repace EXTERN_C with "extern".

Source/WebKit2:

Reviewed by Anders Carlson.

We can avoid having to wrap constants in extern "C", since they
are mangled the same in both C and C++.

  • UIProcess/mac/RemoteLayerTreeHost.mm: Remove the

mention of CABackdropLayer.

4:06 PM Changeset in webkit [198696] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Add a compile time flag for using QTKit
https://bugs.webkit.org/show_bug.cgi?id=155868

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-25
Reviewed by Daniel Bates.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::buildMediaEnginesVector):

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
  • platform/graphics/mac/MediaTimeQTKit.h:
  • platform/graphics/mac/MediaTimeQTKit.mm:
  • platform/mac/WebVideoFullscreenController.mm:

(SOFT_LINK_CLASS):
(-[WebVideoFullscreenController setVideoElement:]):
(-[WebVideoFullscreenController updatePowerAssertions]):

4:04 PM Changeset in webkit [198695] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] fix divide-by-zero in String.prototype.padStart/padEnd
https://bugs.webkit.org/show_bug.cgi?id=155903

Patch by Caitlin Potter <caitp@igalia.com> on 2016-03-25
Reviewed by Filip Pizlo.

  • runtime/StringPrototype.cpp:

(JSC::padString):

3:55 PM Changeset in webkit [198694] by benjamin@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] materialize-past-butterfly-allocation.js time out in debug

  • tests/stress/materialize-past-butterfly-allocation.js:

The test times out on the debug bots. We suspect there is nothing
wrong, just overkill loops.

3:04 PM Changeset in webkit [198693] by ggaren@apple.com
  • 2 edits in trunk/Source/bmalloc

2016-03-25 Geoffrey Garen <ggaren@apple.com>

Unreviewed, try to fix a crash seen on the bots.

  • bmalloc/Allocator.cpp: (bmalloc::Allocator::reallocate): We have to take the lock even if we're only reading our own data becuse LargeObject contains validation code that will read our neighbors' data as well.
3:01 PM Changeset in webkit [198692] by Beth Dakin
  • 7 edits in trunk/Source/WebCore

Autoscrolling from a drag selection does not work in full screen, or when the
window is against the screen edge
https://bugs.webkit.org/show_bug.cgi?id=155858
-and corresponding-
rdar://problem/9338465

Reviewed by Simon Fraser.

WebKit2 has always had this bug. Since WebKit1 scrolling in handled largely
by AppKit, we did not have this bug because AppKit adjusts the autoscroll
amount whenever the window is at the edge of the screen and the user is
trying to autoscroll in that direction. This patch employs the same technique
in WebCore.

Instead of using EventHandler::lastKnownMousePosition() as the autoscroll
amount, use EventHandler::effectiveMousePositionForSelectionAutoscroll()
which will adjust the lastKnownMousePosition if the window is at the edge of
the screen.

  • page/AutoscrollController.cpp:

(WebCore::AutoscrollController::autoscrollTimerFired):

For most ports, effectiveMousePositionForSelectionAutoscroll() will just
return m_lastKnownMousePosition. We override it in EventHandlerMac to return
an adjusted amount.

  • page/EventHandler.cpp:

(WebCore::EventHandler::effectiveMousePositionForSelectionAutoscroll):

  • page/EventHandler.h:
  • page/mac/EventHandlerMac.mm:

(WebCore::autoscrollAdjustmentFactorForScreenBoundaries):
(WebCore::EventHandler::effectiveMousePositionForSelectionAutoscroll):

Make screenForDisplayID available as on PlatformScreen.h instead of just
being a static function in the implementation file.

  • platform/PlatformScreen.h:
  • platform/mac/PlatformScreenMac.mm:

(WebCore::screenForDisplayID):

2:55 PM Changeset in webkit [198691] by rniwa@webkit.org
  • 11 edits
    2 adds
    2 deletes in trunk/Websites/perf.webkit.org

Migrate admin-regenerate-manifest.js to mocha.js and test v3 UI code
https://bugs.webkit.org/show_bug.cgi?id=155863

Reviewed by Joseph Pecoraro.

Replaced admin-regenerate-manifest.js by a new mocha.js tests using the new server testing capability
added in r198642 and tested v3 UI code (parsing manifest.json and creating models). Also removed
/admin/regenerate-manifest since it has been superseded by /api/manifest.

This patch also extracts manifest.js out of main.js so that it could be used and tested without the
DOM support in node.

  • public/admin/regenerate-manifest.php: Deleted.
  • public/include/db.php: Fixed a regression from r198642 since CONFIG_DIR now doesn't end with

a trailing backslash.

  • public/include/manifest.php:

(ManifestGenerator::bug_trackers): Avoid a warning message when there are no repositories.

  • public/v3/index.html:
  • public/v3/main.js:

(main):

  • public/v3/models/bug-tracker.js:

(BugTracker.prototype.newBugUrl): Added.
(BugTracker.prototype.repositories): Added.

  • public/v3/models/manifest.js: Added. Extracted from main.js.

(Manifest.fetch): Moved from main.js' fetchManifest.
(Manifest._didFetchManifest): Moved from main.js' didFetchManifest.

  • public/v3/models/platform.js:

(Platform.prototype.hasTest): Fixed the bug that "test" here was shadowing the function parameter of
the same name. This is tested by the newly added test cases.

  • server-tests/api-build-requests-tests.js:
  • server-tests/api-manifest.js: Added. Migrated test cases from tests/admin-regenerate-manifest.js

with additional assertions for v3 UI model objects.

  • server-tests/resources/test-server.js:

(TestServer.prototype.start):
(TestServer.prototype.testConfig): Renamed from _constructTestConfig now that this is a public API.
Also no longer takes dataDirectory as an argument since it's always the same.
(TestServer.prototype._ensureDataDirectory): Fixed a bug that we weren't making public/data.
(TestServer.prototype.cleanDataDirectory): Added. Remove all files inside public/data between tests.
(TestServer.prototype.inject): Added. Calls before, etc... because always calling before had an
unintended side effect of slowing down unit tests even through they don't need Postgres or Apache.

  • tests/admin-regenerate-manifest.js: Removed.
  • tools/js/database.js:
  • tools/js/v3-models.js:
1:57 PM Changeset in webkit [198690] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Clicking a result in Quick Open dialog dismisses the dialog, does nothing
https://bugs.webkit.org/show_bug.cgi?id=155892
<rdar://problem/25361220>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/OpenResourceDialog.js:

(WebInspector.OpenResourceDialog):
Allow repeat selection so clicking a selected element makes a selection
and dismisses the dialog.

(WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
Suppress select and deselect. Only user clicks should cause a selection event.

(WebInspector.OpenResourceDialog.prototype._handleBlurEvent):
Prevent the dialog from being dismissed before tree item selection occurs.

(WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
Set the represented object (dialog result) and dismiss.

1:52 PM Changeset in webkit [198689] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking compositing/repaint/become-overlay-composited-layer.html as flaky on ios-sim-wk2
https://bugs.webkit.org/show_bug.cgi?id=155737

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
1:45 PM Changeset in webkit [198688] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Unreviewed, rolling out r198619.
https://bugs.webkit.org/show_bug.cgi?id=155902

Switching to Console tab sometimes results in blank tab.
(Requested by JoePeck on #webkit).

Reverted changeset:

"Web Inspector: Large repaints while typing in the console
tab"
https://bugs.webkit.org/show_bug.cgi?id=155627
http://trac.webkit.org/changeset/198619

1:37 PM Changeset in webkit [198687] by beidson@apple.com
  • 5 edits
    1 add
    4 deletes in trunk

Soften push/replaceState frequency restrictions.
<rdar://problem/25228439> and https://bugs.webkit.org/show_bug.cgi?id=155901
.:

Rubber-stamped by Timothy Hatcher.

  • ManualTests/state-objects-time-limit.html: Added.

Source/WebCore:

Rubber-stamped by Timothy Hatcher.

Covered by existing LayoutTests and a new Manual Test.

  • page/History.cpp:

(WebCore::History::stateObjectAdded): Allow 100 state object operations every 30 seconds.

  • page/History.h:

LayoutTests:

Rubber-stamped by Timothy Hatcher.

  • fast/loader/stateobjects/pushstate-frequency-with-user-gesture-expected.txt: Removed.
  • fast/loader/stateobjects/pushstate-frequency-with-user-gesture.html: Removed.
  • fast/loader/stateobjects/replacestate-frequency-with-user-gesture-expected.txt: Removed.
  • fast/loader/stateobjects/replacestate-frequency-with-user-gesture.html: Removed.
1:30 PM Changeset in webkit [198686] by Ryan Haddad
  • 15 edits
    1 move
    1 add in trunk/Source/bmalloc

Unreviewed, rolling out r198679.

This change caused flaky LayoutTest crashes

Reverted changeset:

"bmalloc: Renamed LargeChunk => Chunk"
https://bugs.webkit.org/show_bug.cgi?id=155894
http://trac.webkit.org/changeset/198679

12:50 PM Changeset in webkit [198685] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-601.1.46-branch

Merge r197856. rdar://problem/25152411

12:32 PM Changeset in webkit [198684] by enrica@apple.com
  • 2 edits in trunk/Source/WebCore

Data Detection creates multiple links even when the detected content is within the same node.
https://bugs.webkit.org/show_bug.cgi?id=155860
rdar://problem/25319579

Reviewed by Tim Horton.

If the detected content spans over multiple query fragments,
we need to check if consecutive fragments are all within the
same node. This way we can avoid creating multiple ranges and
consequntly more links.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

12:25 PM Changeset in webkit [198683] by hyatt@apple.com
  • 6 edits
    6 adds in trunk

Implement the allow-end value of the hanging-punctuation CSS property.
https://bugs.webkit.org/show_bug.cgi?id=104996

Reviewed by Simon Fraser.

Source/WebCore:

Added new tests in fast/text.

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::constructLine):
Fix a bug where empty RenderInlines were incorrectly excluding their end borders if
they occurred at the end of a line. Needed to adequately test allow-end and empty
inline borders.

  • rendering/RenderText.cpp:

(WebCore::RenderText::isHangableStopOrComma):
Helper function that identifies the hangable stops and commas.

  • rendering/RenderText.h:

Add new isHangableStopOrComma function to RenderText.

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::lineWidth):
(WebCore::BreakingContext::atEnd):
(WebCore::BreakingContext::fitsOnLineOrHangsAtEnd):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::computeAdditionalBetweenWordsWidth):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
Modified breaking rules to handle allow-end. The basic idea is to see if you can
fit without the comma and only hang if you do, and if nothing else gets added to the
line after the comma. This involves tracking a new state, m_hangsAtEnd, that can
be set/cleared while iterating over the objects that will end up on the line.

LayoutTests:

  • fast/text/hanging-punctuation-allow-end-basic-expected.html: Added.
  • fast/text/hanging-punctuation-allow-end-basic.html: Added.
  • fast/text/hanging-punctuation-allow-end-expected.html: Added.
  • fast/text/hanging-punctuation-allow-end-inlines-expected.html: Added.
  • fast/text/hanging-punctuation-allow-end-inlines.html: Added.
  • fast/text/hanging-punctuation-allow-end.html: Added.
11:44 AM Changeset in webkit [198682] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

Add WebKitSystemInterface for iOS 9.3
https://bugs.webkit.org/show_bug.cgi?id=155893

Rubber-stamped by Alexey Proskuryakov.

Tools:

  • Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

  • libWebKitSystemInterfaceIOSDevice9.3.a: Added.
  • libWebKitSystemInterfaceIOSSimulator9.3.a: Added.
11:42 AM Changeset in webkit [198681] by dbates@webkit.org
  • 2 edits in trunk

REGRESSION (r197358): WebKitSystemInterface.h copied into directory named "--llvm"
https://bugs.webkit.org/show_bug.cgi?id=155838

Reviewed by Alexey Proskuryakov.

Do not pass command line flag --llvm when calling script copy-webkitlibraries-to-product-directory
to avoid copying the WebKitSystemInterface libraries to an incorrect location. The --llvm flag was
removed from copy-webkitlibraries-to-product-directory in <http://trac.webkit.org/changeset/197358>.

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:
11:42 AM Changeset in webkit [198680] by ggaren@apple.com
  • 2 edits in trunk/Source/bmalloc

bmalloc: stress_aligned fails when allocating a zero-sized object with XLarge alignment
https://bugs.webkit.org/show_bug.cgi?id=155896

Reviewed by Andreas Kling.

We normally filter zero-sized allocations into small allocations, but
a zero-sized allocation can sneak through if it requires sufficiently
large alignment.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::tryAllocateXLarge): Set a floor on allocation size to
catch zero-sized allocations.

11:32 AM Changeset in webkit [198679] by ggaren@apple.com
  • 15 edits
    1 move
    1 delete in trunk/Source/bmalloc

bmalloc: Renamed LargeChunk => Chunk
https://bugs.webkit.org/show_bug.cgi?id=155894

Reviewed by Michael Saboff.

A Chunk can contain both small and large objects now.

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::allocate):

  • bmalloc/BoundaryTag.h:

(bmalloc::BoundaryTag::isFree):

  • bmalloc/Chunk.h: Copied from Source/bmalloc/bmalloc/LargeChunk.h.

(bmalloc::Chunk::pages):
(bmalloc::Chunk::begin):
(bmalloc::Chunk::end):
(bmalloc::Chunk::Chunk):
(bmalloc::Chunk::get):
(bmalloc::Chunk::beginTag):
(bmalloc::Chunk::endTag):
(bmalloc::Chunk::offset):
(bmalloc::Chunk::object):
(bmalloc::Chunk::page):
(bmalloc::Chunk::line):
(bmalloc::SmallLine::begin):
(bmalloc::SmallPage::begin):
(bmalloc::SmallPage::end):
(bmalloc::Object::Object):
(bmalloc::Object::begin):
(bmalloc::LargeChunk::pages): Deleted.
(bmalloc::LargeChunk::begin): Deleted.
(bmalloc::LargeChunk::end): Deleted.
(bmalloc::LargeChunk::LargeChunk): Deleted.
(bmalloc::LargeChunk::get): Deleted.
(bmalloc::LargeChunk::beginTag): Deleted.
(bmalloc::LargeChunk::endTag): Deleted.
(bmalloc::LargeChunk::offset): Deleted.
(bmalloc::LargeChunk::object): Deleted.
(bmalloc::LargeChunk::page): Deleted.
(bmalloc::LargeChunk::line): Deleted.

  • bmalloc/Deallocator.cpp:
  • bmalloc/FreeList.cpp:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::allocateLarge):

  • bmalloc/LargeChunk.h: Removed.
  • bmalloc/LargeObject.h:

(bmalloc::LargeObject::LargeObject):
(bmalloc::LargeObject::merge):
(bmalloc::LargeObject::split):

  • bmalloc/Object.h:

(bmalloc::Object::chunk):

  • bmalloc/ObjectType.cpp:
  • bmalloc/Sizes.h:
  • bmalloc/SmallAllocator.h: Removed.
  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::VMHeap):
(bmalloc::VMHeap::allocateChunk):
(bmalloc::VMHeap::allocateLargeChunk): Deleted.

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::allocateLargeObject):
(bmalloc::VMHeap::deallocateLargeObject):

  • bmalloc/Zone.cpp:

(bmalloc::enumerator):

  • bmalloc/Zone.h:

(bmalloc::Zone::chunks):
(bmalloc::Zone::addChunk):
(bmalloc::Zone::largeChunks): Deleted.
(bmalloc::Zone::addLargeChunk): Deleted.

11:18 AM Changeset in webkit [198678] by BJ Burg
  • 30 edits in trunk/Source

Web Inspector: protocol generator should prefix C++ filenames with the protocol group
https://bugs.webkit.org/show_bug.cgi?id=155859
<rdar://problem/25349859>

Reviewed by Alex Christensen and Joseph Pecoraro.

Source/JavaScriptCore:

Like for generated Objective-C files, we should use the 'protocol group' name
as the prefix for generated C++ files so that headers from different protocol
groups have unambiguous names.

  • inspector/scripts/codegen/cpp_generator.py:

(CppGenerator):
(CppGenerator.init):
(CppGenerator.protocol_name):
Make all C++ code generators extend the CppGenerator python class and use the
protocol_name() instance method. This matches a recent change to the ObjC generator.

  • inspector/scripts/codegen/cpp_generator_templates.py:

(CppGeneratorTemplates):
Drive-by cleanup to use #pragma once instead of header guards.

  • inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py:

(CppAlternateBackendDispatcherHeaderGenerator):
(CppAlternateBackendDispatcherHeaderGenerator.init):
(CppAlternateBackendDispatcherHeaderGenerator.output_filename):
(CppAlternateBackendDispatcherHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:

(CppBackendDispatcherHeaderGenerator):
(CppBackendDispatcherHeaderGenerator.init):
(CppBackendDispatcherHeaderGenerator.output_filename):
(CppBackendDispatcherHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:

(CppBackendDispatcherImplementationGenerator):
(CppBackendDispatcherImplementationGenerator.init):
(CppBackendDispatcherImplementationGenerator.output_filename):
(CppBackendDispatcherImplementationGenerator.generate_output):

  • inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:

(CppFrontendDispatcherHeaderGenerator):
(CppFrontendDispatcherHeaderGenerator.init):
(CppFrontendDispatcherHeaderGenerator.output_filename):
(CppFrontendDispatcherHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:

(CppFrontendDispatcherImplementationGenerator):
(CppFrontendDispatcherImplementationGenerator.init):
(CppFrontendDispatcherImplementationGenerator.output_filename):
(CppFrontendDispatcherImplementationGenerator.generate_output):

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator):
(CppProtocolTypesHeaderGenerator.init):
(CppProtocolTypesHeaderGenerator.output_filename):
(CppProtocolTypesHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:

(CppProtocolTypesImplementationGenerator):
(CppProtocolTypesImplementationGenerator.init):
(CppProtocolTypesImplementationGenerator.output_filename):
(CppProtocolTypesImplementationGenerator.generate_output):
Use the protocol_name() instance method to compute generated protocol file names.

  • inspector/scripts/codegen/models.py:

Explicitly set the 'protocol_group' for the Inspector protocol.

Rebaseline generator test results.

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/expected/enum-values.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

Source/WebKit2:

Adjust header include and build system paths.

  • CMakeLists.txt:

Revert the workaround introduced in r198659 since this change fixes the
underlying issue.

  • DerivedSources.make:
  • UIProcess/Automation/WebAutomationSession.cpp:
  • UIProcess/Automation/WebAutomationSession.h:
  • WebKit2.xcodeproj/project.pbxproj:
11:14 AM Changeset in webkit [198677] by achristensen@apple.com
  • 6 edits in trunk/Source/WebCore

Revert most of r198673.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::buildMediaEnginesVector):

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
  • platform/graphics/mac/MediaTimeQTKit.h:
  • platform/graphics/mac/MediaTimeQTKit.mm:
  • platform/mac/WebVideoFullscreenController.mm:
11:07 AM Changeset in webkit [198676] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

putByIndexBeyondVectorLengthWithoutAttributes should not crash if it can't ensureLength
https://bugs.webkit.org/show_bug.cgi?id=155730

Reviewed by Saam Barati.

This patch makes ensureLength return a boolean indicating if it was able to set the length.
ensureLength also no longer sets the butterfly to null if the allocation of the butterfly
fails. All of ensureLengths callers including putByIndexBeyondVectorLengthWithoutAttributes
have been adapted to throw an out of memory error if ensureLength fails.

  • runtime/JSArray.cpp:

(JSC::JSArray::setLength):
(JSC::JSArray::unshiftCountWithAnyIndexingType):

  • runtime/JSObject.cpp:

(JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
(JSC::JSObject::ensureLengthSlow):

  • runtime/JSObject.h:

(JSC::JSObject::ensureLength):

11:07 AM Changeset in webkit [198675] by ggaren@apple.com
  • 19 edits
    2 deletes in trunk/Source/bmalloc

bmalloc: small and large objects should share memory
https://bugs.webkit.org/show_bug.cgi?id=155866

Reviewed by Andreas Kling.

This patch cuts our VM footprint in half. (VM footprint usually doesn't
matter, but on iOS there's an artificial VM limit around 700MB, and if
you hit it you jetsam / crash.)

It's also a step toward honoring the hardware page size at runtime,
which will reduce memory usage on iOS.

This patch is a small improvement in peak memory usage because it allows
small and large objects to recycle each other's memory. The tradeoff is
that we require more metadata, which causes more memory usage after
shrinking down from peak memory usage. In the end, we have some memory
wins and some losses, and a small win in the mean on our standard memory
benchmarks.

  • bmalloc.xcodeproj/project.pbxproj: Removed SuperChunk.
  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::reallocate): Adopt a new Heap API for shrinking
large objects because it's a little more complicated than it used to be.

Don't check for equality in the XLarge case because we don't do it in
other cases, and it's unlikely that we'll be called for no reason.

  • bmalloc/BumpAllocator.h:

(bmalloc::BumpAllocator::allocate): Don't ASSERT isSmall because that's
an old concept from when small and large objects were in distinct memory
regions.

  • bmalloc/Deallocator.cpp:

(bmalloc::Deallocator::deallocateSlowCase): Large objects are not
segregated anymore.

(bmalloc::Deallocator::deallocateLarge): Deleted.

  • bmalloc/Deallocator.h:

(bmalloc::Deallocator::deallocateFastCase): Don't ASSERT isSmall(). See
above.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeSmallPage):
(bmalloc::Heap::scavengeSmallPages): New helpers for returning cached
small pages to the large object heap.

(bmalloc::Heap::allocateSmallPage): Allocate small pages from the large
object heap. This is how we accomplish sharing.

(bmalloc::Heap::deallocateSmallLine): Handle large objects since we can
encounter them on this code path now.

(bmalloc::Heap::splitAndAllocate): Fixed a bug where we would sometimes
not split even though we could.

Allocating a large object also requires ref'ing its small line so that
we can alias memory between small and large objects.

(bmalloc::Heap::allocateLarge): Return cached small pages before
allocating a large object that would fit in a cached small page. This
allows some large allocations to reuse small object memory.

(bmalloc::Heap::shrinkLarge): New helper.

(bmalloc::Heap::deallocateLarge): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/LargeChunk.h:

(bmalloc::LargeChunk::pageBegin):
(bmalloc::LargeChunk::pageEnd):
(bmalloc::LargeChunk::lines):
(bmalloc::LargeChunk::pages):
(bmalloc::LargeChunk::begin):
(bmalloc::LargeChunk::end):
(bmalloc::LargeChunk::LargeChunk):
(bmalloc::LargeChunk::get):
(bmalloc::LargeChunk::endTag):
(bmalloc::LargeChunk::offset):
(bmalloc::LargeChunk::object):
(bmalloc::LargeChunk::page):
(bmalloc::LargeChunk::line):
(bmalloc::SmallLine::begin):
(bmalloc::SmallLine::end):
(bmalloc::SmallPage::begin):
(bmalloc::SmallPage::end):
(bmalloc::Object::Object):
(bmalloc::Object::begin):
(bmalloc::Object::pageBegin):
(bmalloc::Object::line):
(bmalloc::Object::page): I merged all the SmallChunk metadata and code
into LargeChunk. Now we use a single class to track both small and large
metadata, so we can share memory between small and large objects.

I'm going to rename this class to Chunk in a follow-up patch.

  • bmalloc/Object.h:

(bmalloc::Object::chunk): Updated for LargeChunk transition.

  • bmalloc/ObjectType.cpp:

(bmalloc::objectType):

  • bmalloc/ObjectType.h:

(bmalloc::isXLarge):
(bmalloc::isSmall): Deleted. The difference between small and large
objects is now stored in metadata and is not a property of their
virtual address range.

  • bmalloc/SegregatedFreeList.h: One more entry because we cover all of

what used to be the super chunk in a large chunk now.

  • bmalloc/Sizes.h: Removed bit masking helpers because we don't use

address masks to distinguish small vs large object type anymore.

  • bmalloc/SmallChunk.h: Removed.
  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::SmallPage): Store object type per page because any
given page can be used for large objects or small objects.

  • bmalloc/SuperChunk.h: Removed.
  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::VMHeap):
(bmalloc::VMHeap::allocateLargeChunk):
(bmalloc::VMHeap::allocateSmallChunk): Deleted.
(bmalloc::VMHeap::allocateSuperChunk): Deleted.

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::allocateLargeObject):
(bmalloc::VMHeap::deallocateLargeObject):
(bmalloc::VMHeap::allocateSmallPage): Deleted.
(bmalloc::VMHeap::deallocateSmallPage): Deleted. Removed super chunk and
small chunk support.

  • bmalloc/Zone.cpp:

(bmalloc::enumerator):

  • bmalloc/Zone.h:

(bmalloc::Zone::largeChunks):
(bmalloc::Zone::addLargeChunk):
(bmalloc::Zone::superChunks): Deleted.
(bmalloc::Zone::addSuperChunk): Deleted. Removed super chunk and
small chunk support.

10:37 AM Changeset in webkit [198674] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

[JSC] implement String.prototype.padStart() and String.prototype.padEnd() proposal
https://bugs.webkit.org/show_bug.cgi?id=155795

Patch by Caitlin Potter <caitp@igalia.com> on 2016-03-25
Reviewed by Darin Adler.

Source/JavaScriptCore:

Implements ECMAScript proposal http://tc39.github.io/proposal-string-pad-start-end/
Currently at Stage 3.

  • runtime/JSString.h:
  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::repeatCharacter):
(JSC::repeatStringPattern):
(JSC::padString):
(JSC::stringProtoFuncPadEnd):
(JSC::stringProtoFuncPadStart):

  • tests/es6.yaml:
  • tests/es6/String.prototype_methods_String.prototype.padEnd.js: Added.
  • tests/es6/String.prototype_methods_String.prototype.padStart.js: Added.

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
10:24 AM Changeset in webkit [198673] by achristensen@apple.com
  • 8 edits in trunk/Source

Add a compile time flag for using QTKit
https://bugs.webkit.org/show_bug.cgi?id=155868

Reviewed by Dan Bates.

Source/WebCore:

  • platform/graphics/MediaPlayer.cpp:

(WebCore::buildMediaEnginesVector):

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
  • platform/graphics/mac/MediaTimeQTKit.h:
  • platform/graphics/mac/MediaTimeQTKit.mm:
  • platform/mac/WebVideoFullscreenController.mm:

Source/WTF:

  • wtf/Platform.h:
10:12 AM Changeset in webkit [198672] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Remove unused lambda capture after r196984.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
resourceResponse is not used in the lambda.

10:00 AM Changeset in webkit [198671] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix Mac CMake build.

  • PlatformMac.cmake:
9:25 AM Changeset in webkit [198670] by commit-queue@webkit.org
  • 2 edits in trunk

Detect correct number of processors on windows
https://bugs.webkit.org/show_bug.cgi?id=155884

Patch by Bill Ming <mbbill@gmail.com> on 2016-03-25
Reviewed by Alex Christensen.

  • Tools/Scripts/run-jsc-stress-tests:
9:14 AM Changeset in webkit [198669] by Brent Fulgham
  • 5 edits in trunk

[Win] Improve CMake build performance
https://bugs.webkit.org/show_bug.cgi?id=155871
<rdar://problem/24747822>

Reviewed by Alex Christensen.

.:

Add a flag to the PROCESS_ALLINONE_FILE macro so that it does not remove
the files contained in the passed all-in-one file, since this breaks
dependency checking and generation of the derived sources from the IDL.
Instead, include the header files in the project so that all files get
generated.

  • Source/cmake/WebKitMacros: Updated for 'DerivedSources.cpp' use case.

Source/WebCore:

Treat DerivedSources.cpp as an 'All-in-one' file. Pass a flag to the
PROCESS_ALLINONE_FILE macro so that it does not remove the contents of
the file, since this breaks dependency checking and generation of the
sources from the IDL files. Instead, include the header files in the
project so that all files get generated.

  • CMakeLists.txt: Updated for 'DerivedSources.cpp'
  • DerivedSources.cpp: Add some generated files that were missing.
9:05 AM Changeset in webkit [198668] by dbates@webkit.org
  • 2 edits in trunk/Tools

Use webkitdirs::determineXcodeSDK() instead of webkitdirs::willUseIOSDeviceSDK()
in copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=155869

Reviewed by Alexey Proskuryakov.

It is sufficient and more direct to call webkitdirs::determineXcodeSDK() instead of
webkitdirs::willUseIOSDeviceSDK() to process the --sdk/--device/--ios-simulator command
line argument.

  • Scripts/copy-webkitlibraries-to-product-directory:
8:23 AM Changeset in webkit [198667] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Scrolling/selection is broken in Quick Open dialog resource tree
https://bugs.webkit.org/show_bug.cgi?id=155877
<rdar://problem/25356149>

Reviewed by Timothy Hatcher.

Dialog and tree outline now use "display: flex", causing the height of the
tree outline to be based on the height of the dialog. Overflow scrolling
in the tree outline now has the expected behavior.

  • UserInterface/Views/OpenResourceDialog.css:

(.open-resource-dialog):
(.open-resource-dialog > .tree-outline):

7:47 AM Changeset in webkit [198666] by commit-queue@webkit.org
  • 6 edits in trunk

Turned on ENABLE_REQUEST_ANIMATION_FRAME by default for any port.
https://bugs.webkit.org/show_bug.cgi?id=155882

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-25
Reviewed by Michael Catanzaro.

It was already enabled in all trunk ports, and is required for
WebInspectorUI to work.

.:

  • Source/cmake/OptionsGTK.cmake: Removed duplication of default value.
  • Source/cmake/OptionsMac.cmake: Ditto.
  • Source/cmake/WebKitFeatures.cmake: Turned

ENABLE_REQUEST_ANIMATION_FRAME ON.

Tools:

  • Scripts/webkitperl/FeatureList.pm:
7:19 AM Changeset in webkit [198665] by youenn.fablet@crf.canon.fr
  • 32 edits
    12 adds in trunk

[Fetch API] Add basic loading of resources
https://bugs.webkit.org/show_bug.cgi?id=155637

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebasing test expectations.
Updating scheme-blob.js to ensure generated test names are stable run after run.

  • web-platform-tests/fetch/api/basic/accept-header-expected.txt:
  • web-platform-tests/fetch/api/basic/integrity-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt:
  • web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-about-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob.js:

(checkFetchResponse): Deleted.
(checkKoUrl): Deleted.

  • web-platform-tests/fetch/api/basic/scheme-data-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-others-expected.txt:
  • web-platform-tests/fetch/api/basic/stream-response-expected.txt:

Source/WebCore:

Adding support for basic fetch for Window (no support for Worker yet).
A FetchResponse object is created for every fetch task.
But it will only be exposed to JS at promise fulfillment time, i.e. once initial response headers are retrieved.

Updating Blob resource handle to add Content-Type and Content-Length header and notifying of error in case of erroneous HTTP method.

Fetch is limited to same origin requests currently due to some WPT tests that would timeout otherwise.

Tests: http/tests/fetch/closing-while-fetching.html

http/tests/fetch/get-response-body-while-loading.html

Also covered by rebased tests.

  • Modules/fetch/DOMWindowFetch.cpp: Creating a FetchResponse to start fetching.

(WebCore::DOMWindowFetch::fetch):

  • Modules/fetch/DOMWindowFetch.h:
  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consume):
(WebCore::FetchBody::consumeArrayBuffer): Handling of body promises in case of data stored as a buffer.
(WebCore::FetchBody::consumeText): Passing the promise as a reference.
(WebCore::blobFromArrayBuffer): Helper routine.
(WebCore::FetchBody::fulfillTextPromise): Helper routine.
(WebCore::FetchBody::loadedAsArrayBuffer): Updated to handle storing of data as a buffer.
(WebCore::FetchBody::loadedAsText):
(WebCore::FetchBody::bodyForInternalRequest): Helper routine to generate the request body data to be sent as part of the fetch request.
(WebCore::FetchBody::extractFromText):

  • Modules/fetch/FetchBody.h:

(WebCore::FetchBody::loadingBody):
(WebCore::FetchBody::FetchBody):

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::loadBlob): Updated to cope with the change that FetchLoader::start does not return a boolean anymore
but will directly call failure callbacks.
(WebCore::FetchBodyOwner::loadedBlobAsText): Moving it closer to other blob loading routines.
(WebCore::FetchBodyOwner::finishBlobLoading):

  • Modules/fetch/FetchBodyOwner.h:

(WebCore::FetchBodyOwner::body):
(WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):

  • Modules/fetch/FetchHeaders.cpp:

(WebCore::FetchHeaders::fill):
(WebCore::FetchHeaders::filterAndFill): Helper routine to fill headers from a HTTPHeaderMap after being filtered.

  • Modules/fetch/FetchHeaders.h:

(WebCore::FetchHeaders::internalHeaders):

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):
(WebCore::FetchLoader::didFailRedirectCheck):

  • Modules/fetch/FetchLoader.h:
  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::internalRequest): Routine used to create the ResourceRequest transmitted to ThreadableLoader.

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::fetch): Start fetching by creating a FetchLoader based on passed request.
(WebCore::FetchResponse::BodyLoader::didSucceed): FetchLoader callback.
(WebCore::FetchResponse::BodyLoader::didFail): Ditto.
(WebCore::FetchResponse::BodyLoader::BodyLoader): Ditto.
(WebCore::FetchResponse::BodyLoader::didReceiveResponse): Ditto.
(WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Ditto.
(WebCore::FetchResponse::BodyLoader::start): Starting fetch loader.
(WebCore::FetchResponse::BodyLoader::stop): Stopping fetch loader.
(WebCore::FetchResponse::stop): Stop loader if any.

  • Modules/fetch/FetchResponse.h:
  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::doStart: Notifying the loader with an error if verb is not GET.
(WebCore::BlobResourceHandle::notifyResponseOnSuccess): Adding support for Content-Type and Content-Lenth headers.
(WebCore::BlobResourceHandle::createAsync): Removing GET verb check.

LayoutTests:

  • TestExpectations: Removed flaky test expectations.
  • http/tests/fetch/closing-while-fetching-expected.txt: Added.
  • http/tests/fetch/closing-while-fetching.html: Added.
  • http/tests/fetch/get-response-body-while-loading-expected.txt: Added.
  • http/tests/fetch/get-response-body-while-loading.html: Added.
  • http/tests/resources/download-json-with-delay.php: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt: Added.
7:08 AM Changeset in webkit [198664] by commit-queue@webkit.org
  • 1 edit
    2 deletes in trunk/Source/WebCore

Removed leftovers of WCHAR_UNICODE code path after r162782.
https://bugs.webkit.org/show_bug.cgi?id=155881

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-25
Reviewed by Csaba Osztrogonác.

No new tests needed.

  • platform/text/TextEncodingDetectorNone.cpp: Removed.
  • platform/text/wchar/TextBreakIteratorWchar.cpp: Removed.
7:08 AM Changeset in webkit [198663] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening.

Mark new failing tests with existing or new bug.

  • platform/efl/TestExpectations:
2:42 AM Changeset in webkit [198662] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening.

Mark some blink imported tests to timeout, imageonlyfailure.
Besides some AX tests need to have new baseline, which have been tested since r197616.

  • platform/efl/TestExpectations:

Mar 24, 2016:

11:46 PM Changeset in webkit [198661] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening. Mark crash tests in proper category.

  • platform/efl/TestExpectations:
10:14 PM Changeset in webkit [198660] by commit-queue@webkit.org
  • 2 edits in trunk

Determine architecture for running jsc stress tests on windows
https://bugs.webkit.org/show_bug.cgi?id=155840

Patch by Bill Ming <mbbill@gmail.com> on 2016-03-24
Reviewed by Alex Christensen.

  • Tools/Scripts/run-jsc-stress-tests:
8:59 PM Changeset in webkit [198659] by achristensen@apple.com
  • 7 edits in trunk/Source

Fix Mac CMake build.

Source/JavaScriptCore:

  • PlatformMac.cmake:

Link to Security framework.

Source/WebCore:

  • PlatformMac.cmake:

Add new file and directory.

Source/WebKit2:

  • CMakeLists.txt:

Temporarily add DERIVED_SOURCES_JAVASCRIPTCORE_DIR after DERIVED_SOURCES_WEBCORE_DIR,
because both contain a unique header named InspectorBackendDispatchers.h and this include
order includes the correct one for WebKit2 first.

  • PlatformMac.cmake:

Add new files. Optionally link to AVFAudio.

7:24 PM Changeset in webkit [198658] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r198500.

Roll back in r197552 as it did not seem to cause a PLT
regression after all

Reverted changeset:

"Unreviewed, rolling out r197552."
https://bugs.webkit.org/show_bug.cgi?id=154986
http://trac.webkit.org/changeset/198500

7:14 PM Changeset in webkit [198657] by dbates@webkit.org
  • 17 edits
    3 adds in trunk

CSP: Move logic for reporting a violation from ContentSecurityPolicyDirectiveList to ContentSecurityPolicy
https://bugs.webkit.org/show_bug.cgi?id=155842
<rdar://problem/25340377>
And
https://bugs.webkit.org/show_bug.cgi?id=155133

Reviewed by Brent Fulgham.

Source/WebCore:

Towards associating source file, line-, and column- numbers (https://bugs.webkit.org/show_bug.cgi?id=114317)
with a CSP console message we should move the logic for logging the console message/reporting the violation
from class ContentSecurityPolicyDirectiveList to class ContentSecurityPolicy so that it is closer to the
script execution context that can access such information.

The responsibilities of the class ContentSecurityPolicyDirectiveList have been reduced. It is responsible
for parsing a string representation of the Content Security Policy and providing functions to determine
the violated directive (if any) for a given source (e.g. URL). ContentSecurityPolicyDirectiveList no longer
takes responsibility logging a console message or sending a violation report (if applicable). Falling out
from this decrease in responsibility is the removal of enum ContentSecurityPolicyDirectiveList::ReportingStatus
and the need to pass a enumerator of this enum to each ContentSecurityPolicyDirectiveList to suppress
the sending of a violation report. The caller of ContentSecurityPolicyDirectiveList is responsible for
making this determination.

With the exception of a change to the error message for an inline event handler violation, there are no
other functional changes. When an inline event handler violation occurs we will emit either:

Refused to execute a script for an inline event handler because 'unsafe-inline' does not appear in the
script-src directive of the Content Security Policy.

Or:

Refused to execute a script for an inline event handler because 'unsafe-inline' appears in neither the
script-src directive nor the default-src directive of the Content Security Policy.

depending on whether the Content Security Policy contains a script-src directive or not.

  • CMakeLists.txt: Add files ContentSecurityPolicyDirective.cpp and ContentSecurityPolicyDirectiveNames.cpp.
  • WebCore.xcodeproj/project.pbxproj: Add files ContentSecurityPolicyDirective.cpp and ContentSecurityPolicyDirectiveNames.{cpp, h}.
  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::consoleMessageForViolation): Moved from file ContentSecurityPolicyDirectiveList.cpp and
incorporates the functionality of ContentSecurityPolicyDirectiveList::reportViolation(). Modified
to take a reference to the violated directive (ContentSecurityPolicyDirective object) and removed
the boolean parameter violatesDefaultSrc as we can deduce this from the violated directive.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Modified to call ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeEval().
(WebCore::ContentSecurityPolicy::foundHashOfContentInAllPolicies): Renamed; Formerly named allPoliciesAllowHashFromContent.
Modified to early return if either no algorithms are given or the specified content to hash is
the empty string.
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Moved logic for reporting a violation from
ContentSecurityPolicyDirectiveList member function of the same name to here.
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Moved logic for reporting a violation from
ContentSecurityPolicyDirectiveList member function of the same name to here. Additionally, changed the
error message text to better describe the reason for the violation.
(WebCore::ContentSecurityPolicy::allowScriptWithNonce): Ditto.
(WebCore::ContentSecurityPolicy::allowStyleWithNonce): Ditto.
(WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
(WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
(WebCore::ContentSecurityPolicy::allowEval): Ditto.
(WebCore::ContentSecurityPolicy::allowFrameAncestors): Ditto.
(WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
(WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowChildContextFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
(WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
(WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
(WebCore::ContentSecurityPolicy::reportViolation): Simplified signature by having it take a reference to
a ContentSecurityPolicyDirective object. Also split functionality into two variants: one variant takes a
pointer to a JSC::ExecState, one variant takes a source file, and line and column positions.
(WebCore::ContentSecurityPolicy::allPoliciesAllowHashFromContent): Deleted.
(WebCore::ContentSecurityPolicy::gatherReportURIs): Deleted.

  • page/csp/ContentSecurityPolicy.h:

(WebCore::ContentSecurityPolicy::violatedDirectiveInAnyPolicy): Formerly named allPoliciesAllow. Modified
to return the violated directive.
(WebCore::ContentSecurityPolicy::allPoliciesAllow): Deleted.

  • page/csp/ContentSecurityPolicyDirective.cpp: Added.
  • page/csp/ContentSecurityPolicyDirective.h: Added.

(WebCore::ContentSecurityPolicyDirective::ContentSecurityPolicyDirective): Modified to take a reference to the
directive list that contains this directive instead of pointer to a ContentSecurityPolicy object.
(WebCore::ContentSecurityPolicyDirective::name): Added.
(WebCore::ContentSecurityPolicyDirective::directiveList): Added.
(WebCore::ContentSecurityPolicyDirective::isDefaultSrc): Added.
(WebCore::ContentSecurityPolicyDirective::policy): Deleted.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp: Remove unused header <wtf/Optional.h>. Also remove header wtf/text/StringBuilder.h

as the function that made use of it, consoleMessageForViolation, was moved to file ContentSecurityPolicy.cpp.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeEval): Formerly named allowEval.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineScript): Formerly named allowInlineScript.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForUnsafeInlineStyle): Formerly named allowInlineStyle.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScriptHash): Formerly named allowInlineScriptWithHash.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyleHash): Formerly named allowInlineStyleWithHash.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScriptNonce): Formerly named allowScriptWithNonce.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyleNonce): Formerly named allowStyleWithNonce.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForBaseURI): Formerly named allowBaseURI.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForChildContext): Formerly named allowChildContextFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForConnectSource): Formerly named allowConnectToSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFont): Formerly named allowFontFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFormAction): Formerly named allowFormAction.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrame): Formerly named allowChildFrameFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrameAncestor): Formerly named allowFrameAncestors.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForImage): Formerly named allowImageFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForMedia): Formerly named allowMediaFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForObjectSource): Formerly named allowObjectFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForPluginType): Formerly named allowPluginType.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript): Formerly named allowScriptFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForStyle): Formerly named allowStyleFromSource.
(WebCore::ContentSecurityPolicyDirectiveList::parse): Update code to make use of ContentSecurityPolicyDirectiveNames constants.
(WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective): Pass |this| instead of the ContentSecurityPolicy object.
(WebCore::ContentSecurityPolicyDirectiveList::addDirective): Update code to make use of ContentSecurityPolicyDirectiveNames constants.
(WebCore::isExperimentalDirectiveName): Deleted.
(WebCore::isCSPDirectiveName): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::reportViolation): Deleted.
(WebCore::consoleMessageForViolation): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowJavaScriptURLs): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowInlineEventHandlers): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowInlineScript): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowInlineScriptWithHash): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowScriptWithNonce): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowInlineStyle): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowInlineStyleWithHash): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowStyleWithNonce): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowEval): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowPluginType): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowScriptFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowObjectFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowChildContextFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowChildFrameFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowImageFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowStyleFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowFontFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowMediaFromSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowConnectToSource): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowFormAction): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowBaseURI): Deleted.
(WebCore::ContentSecurityPolicyDirectiveList::allowFrameAncestors): Deleted.

  • page/csp/ContentSecurityPolicyDirectiveList.h:

(WebCore::ContentSecurityPolicyDirectiveList::defaultSrc): Added.
(WebCore::ContentSecurityPolicyDirectiveList::policy): Added. Also added FIXME comment to remove this function. This
function is only used by ContentSecurityPolicyMediaListDirective so that it can log a console message on a parsing error.
(WebCore::ContentSecurityPolicyDirectiveList::denyIfEnforcingPolicy): Deleted.

  • page/csp/ContentSecurityPolicyDirectiveNames.cpp: Added.
  • page/csp/ContentSecurityPolicyDirectiveNames.h: Added.
  • page/csp/ContentSecurityPolicyMediaListDirective.cpp:

(WebCore::ContentSecurityPolicyMediaListDirective::ContentSecurityPolicyMediaListDirective): Modified to take a reference to the
directive list that contains this directive instead of pointer to a ContentSecurityPolicy object.
(WebCore::ContentSecurityPolicyMediaListDirective::parse): Updated code to use ContentSecurityPolicyDirectiveList::policy() instead
of ContentSecurityPolicyDirective::policy() as the latter was removed. Ideally this class should not need to use the ContentSecurityPolicy
object to log a console message.

  • page/csp/ContentSecurityPolicyMediaListDirective.h:
  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::isExperimentalDirectiveName): Moved from file ContentSecurityPolicyDirectiveList.cpp because this function is only used
in this file.
(WebCore::isCSPDirectiveName): Ditto.
(WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar): Update code to make use of ContentSecurityPolicyDirectiveNames constants.

  • page/csp/ContentSecurityPolicySourceListDirective.cpp:

(WebCore::ContentSecurityPolicySourceListDirective::ContentSecurityPolicySourceListDirective): Modified to take a reference to
the directive list that contains this directive instead of pointer to a ContentSecurityPolicy object.

  • page/csp/ContentSecurityPolicySourceListDirective.h:

LayoutTests:

Update expected results to reflect new error message text for an inline event handler violation.

  • http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt:
  • http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy-expected.txt:
  • http/tests/security/contentSecurityPolicy/script-src-none-inline-event-expected.txt:
7:03 PM Changeset in webkit [198656] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

[OS X] Overflow:scroll scrollbars do not obey overlay/always-on system preference changes
https://bugs.webkit.org/show_bug.cgi?id=155830

Reviewed by Simon Fraser.

When the scrollbar style changes, the available width of all ScrollableAreas change,
and therefore a relayout must occur.

Each ScrollableArea owns its own ScrollAnimator (if necessary). Upon creation, the
ScrollAnimator will start listening for changes to the system preference for
overlay / always-on scrollbars. When notified, the ScrollAnimator tells its owning
ScrollableArea that scrollbarStyleChanged().

For main-frame scrolling, FrameView overrides scrollbarStyleChanged and causes a
relayout. However, for overflow:scroll elements, no relayout is triggered. This
patch overrides availableContentSizeChanged() for RenderLayer (which is used for
overflow:scroll elements). This override triggers a relayout.

It also updates the mechanism in RenderBlock::recomputeLogicalWidth() to ensure that
a change in scrollbar size causes RenderBlockFlow::layoutBlock() to relayout its
children. This is appropriate because block child positioning is affected by
scrollbar size.

No new tests (for now). Presumably we could mock the message we receive when the
system preference is changed. However, I haven't implemented that yet.

  • rendering/RenderBlock.cpp: Rename setHasBorderOrPaddingLogicalWidthChanged().

(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::recomputeLogicalWidth):

  • rendering/RenderBlock.h: Ditto.

(WebCore::RenderBlock::setShouldForceRelayoutChildren):
(WebCore::RenderBlock::shouldForceRelayoutChildren):

  • rendering/RenderElement.cpp: Ditto.

(WebCore::RenderElement::RenderElement):

  • rendering/RenderElement.h: Ditto.

(WebCore::RenderElement::setRenderBlockShouldForceRelayoutChildren):
(WebCore::RenderElement::renderBlockShouldForceRelayoutChildren):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::availableContentSizeChanged): Cause a relayout to occur.

  • rendering/RenderLayer.h:
6:13 PM Changeset in webkit [198655] by commit-queue@webkit.org
  • 75 edits in trunk/Source

Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
https://bugs.webkit.org/show_bug.cgi?id=155412

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-03-24
Reviewed by Darin Adler.

Source/WebCore:

Having NativeImagePtr as a raw pointer makes managing the life cycle of
the returned CGImageRef hard. A lot of work was done to ensure the CG
pointer is refcounted correctly. It was also not possible to move a
FrameData since calling the destructor was releasing the CGImageRef.

With this change, PassNativeImagePtr is not needed anymore. So all the
instance of PassNativeImagePtr can be replaced by NativeImagePtr.

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::nativeImageForCurrentTime):

  • html/HTMLVideoElement.h: Replace PassNativeImagePtr with NativeImagePtr.
  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawImage): Replace PassNativeImagePtr
with NativeImagePtr.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::addImageToCache):

  • loader/cache/MemoryCache.h: Remove USE(CG) and CFRetain(image) since

this code can compile on all platforms. The image refcount will be
incremented when the image is assigned to FrameData.m_image in the
BitmapImage constructor.

  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::synchronousNativeIconForPageURL):

  • loader/icon/IconDatabase.h:
  • loader/icon/IconDatabaseBase.h: Replace PassNativeImagePtr with NativeImagePtr.
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::haveFrameImageAtIndex):
(WebCore::BitmapImage::cacheFrame):
(WebCore::BitmapImage::ensureFrameIsCached):
(WebCore::BitmapImage::frameImageAtIndex):
(WebCore::BitmapImage::nativeImageForCurrentFrame):
(WebCore::BitmapImage::haveFrameAtIndex): Deleted.
(WebCore::BitmapImage::frameAtIndex): Deleted.
Replace PassNativeImagePtr with NativeImagePtr, m_frame with m_image and
*Frame* with *FrameImage*.

  • platform/graphics/BitmapImage.h:

(WebCore::FrameData::FrameData):
A BitmapImage can have one or more FrameData. A FrameData member can be
named for shortness as "frame", "m_frames", etc. A FrameData can have
zero or one NativeImagePtr. A NativeImagePtr can be named as "image",
"m_image", etc.

  • platform/graphics/GraphicsContext.h: Replace PassNativeImagePtr with

NativeImagePtr.

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/Icon.h:

Change the members of type CGImageRef to be RetainPtr<CGImageRef>.

  • platform/graphics/Image.h:

(WebCore::Image::nativeImageForCurrentFrame):
(WebCore::Image::getNSImage):
(WebCore::Image::getTIFFRepresentation):
(WebCore::Image::getCGImageRef):
(WebCore::Image::getFirstCGImageRefOfSize):
(WebCore::Image::getCGImageArray):
(WebCore::Image::getGdkPixbuf):
(WebCore::Image::getEvasObject):

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::createFrameImageAtIndex):
(WebCore::ImageSource::createFrameAtIndex): Deleted.

  • platform/graphics/ImageSource.h:

Change 0 to nullptr, PassRefPtr to RefPtr and PassNativeImagePtr to
NativeImagePtr.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::nativeImageForCurrentTime):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
Replace PassNativeImagePtr with NativeImagePtr.

  • platform/graphics/NativeImagePtr.h:

Make NativeImagePtr a smart pointer for CG. Get rid of PassNativeImagePtr
since NativeImagePtr is now a smart pointer on all platforms.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
Replace PassNativeImagePtr with NativeImagePtr.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsToImage):
Since Image::nativeImageForCurrentFrame() returns a RetainPtr, move it
to m_pendingContentsImage to remove the refcount churn.

  • platform/graphics/cairo/BitmapImageCairo.cpp:

(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::FrameData::clear):
Replace m_frame with m_image and frame* with frameImage*.

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::copyCairoImageSurface):

  • platform/graphics/cairo/CairoUtilities.h:

Replace PassRefPtr with RefPtr.

  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
Replace *Frame* with *FrameImage*.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::drawNativeImage):
Replace PassNativeImagePtr with NativeImagePtr.

  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBuffer::copyImage): Create a new NativeImagePtr so it can
be moved to the BitmapImage::create().
(WebCore::copySurfaceToImageAndAdjustRect):
(WebCore::getImageData):
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
Replace PassRefPtr with RefPtr.

  • platform/graphics/cg/BitmapImageCG.cpp:

(WebCore::FrameData::clear): No need to call CGImageRelease(). Just assign
m_image to nullptr and CGImageRelease() will be called from the RetainPtr
destructor.

(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::BitmapImage::getCGImageRef):
(WebCore::BitmapImage::getFirstCGImageRefOfSize):
(WebCore::BitmapImage::getCGImageArray):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::copyUnscaledFrameImageAtIndex):
(WebCore::BitmapImage::copyUnscaledFrameAtIndex): Deleted.
Replace CGImageRef with RetainPtr<CGImageRef>. Replace *Frame* with
*FrameImage*.

  • platform/graphics/cg/GraphicsContext3DCG.cpp:

(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
(WebCore::GraphicsContext3D::paintToCanvas):
Use m_cgImage.get() instead of m_cgImage when calling CG functions.

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::drawNativeImage):
(WebCore::GraphicsContext::drawPattern):
Replace PassNativeImagePtr with NativeImagePtr. Get the raw CGImageRef
from the NativeImagePtr when calling the CG functions.

  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::createBitmapImageAfterScalingIfNeeded): Move the image argument
when calling BitmapImage::create().

(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
Replace PassRefPtr with RefPtr.

  • platform/graphics/cg/ImageSourceCG.cpp:

(WebCore::ImageSource::createFrameImageAtIndex):
(WebCore::ImageSource::createFrameAtIndex): Deleted.
Rename the function and simplify the code since the local variable
and the return value are both smart pointers.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
(WebCore::DisplayList::DrawNativeImage::apply):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawNativeImage::create):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawNativeImage):

  • platform/graphics/displaylists/DisplayListRecorder.h:

Replace PassNativeImagePtr with NativeImagePtr and use constant reference.

  • platform/graphics/efl/GraphicsContext3DEfl.cpp:

(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
Call a function with its new name.

  • platform/graphics/efl/IconEfl.cpp:

(WebCore::Icon::createIconForFiles):

  • platform/graphics/gstreamer/ImageGStreamerCairo.cpp:

(ImageGStreamer::ImageGStreamer):

  • platform/graphics/gtk/IconGtk.cpp:

(WebCore::Icon::createIconForFiles):

  • platform/graphics/ios/IconIOS.mm:

(WebCore::Icon::Icon):
(WebCore::Icon::createIconForFiles):
(WebCore::Icon::createIconForImage):

  • platform/graphics/mac/IconMac.mm:

(WebCore::Icon::createIconForFiles):
Use smart pointers RetainPtr<CGImageRef> instead of raw pointers CGImageRef.
And change PassRefPtr to RefPtr and 0 to nullptr.

  • platform/graphics/mac/ImageMac.mm:

(WebCore::BitmapImage::getTIFFRepresentation): Get the raw pointer from the
returned smart pointer.

  • platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:

(WebCore::CoordinatedSurface::create):

  • platform/graphics/texmap/coordinated/CoordinatedSurface.h:

Replace PassRefPtr with RefPtr.

  • platform/graphics/win/IconWin.cpp:

(WebCore::Icon::createIconForFiles): Change PassRefPtr to RefPtr.

  • platform/graphics/win/ImageCGWin.cpp:

(WebCore::BitmapImage::create): Replace PassRefPtr with RefPtr.
(WebCore::BitmapImage::drawFrameMatchingSourceSize): Call the function
with its new name and get the raw pointer from the returned smart pointer.

  • platform/graphics/win/ImageCairoWin.cpp:

(WebCore::BitmapImage::create): Replace PassRefPtr with ReftPtr and use
the move semantics for passing the argument to BitmapImage::create().
(WebCore::BitmapImage::drawFrameMatchingSourceSize): Call the function
with its new name.

  • platform/image-decoders/ImageDecoder.h:
  • platform/image-decoders/cairo/ImageDecoderCairo.cpp:

(WebCore::ImageFrame::asNewNativeImage):

  • platform/win/DragImageCGWin.cpp:

(WebCore::createDragImageFromImage):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::nativeImageForCurrentFrame):

  • svg/graphics/SVGImage.h:
  • svg/graphics/SVGImageForContainer.cpp:

(WebCore::SVGImageForContainer::nativeImageForCurrentFrame):

  • svg/graphics/SVGImageForContainer.h:

Replace PassNativeImagePtr with NativeImagePtr.

Source/WebKit/mac:

  • Misc/WebCache.mm:

(+[WebCache addImageToCache:forURL:forFrame:]):
WebCore::MemoryCache() is taking an rvalue NativeImagePtr. We need to create
NativeImagePtr from the image raw pointer when calling this function.

Source/WebKit/win:

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::snapshot):
Replace PassRefPtr with RefPtr.

Source/WebKit2:

  • Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:

(WebKit::WebCoordinatedSurface::createWithSurface):
(WebKit::WebCoordinatedSurface::create):
(WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
(WebKit::WebCoordinatedSurface::copyToTexture):

  • Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::create):
(WebKit::ShareableBitmap::createShareable):
(WebKit::ShareableBitmap::ShareableBitmap):

  • Shared/ShareableBitmap.h:

Replace PassRefPtr with RefPtr and use WTFMove() instead of RefPtr::release()
when passing the RefPtr.

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::createSurfaceFromData):
(WebKit::ShareableBitmap::createCairoSurface):
Replace PassRefPtr with RefPtr.

(WebKit::ShareableBitmap::createImage):

  • Shared/cg/ShareableBitmapCG.cpp:

(WebKit::ShareableBitmap::createImage):
Replace PassRefPtr with RefPtr and use the move semantics when calling
BitmapImage::create().

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:

(WebKit::ThreadedCoordinatedLayerTreeHost::createCoordinatedSurface):

  • WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

Replace PassRefPtr with RefPtr

5:52 PM Changeset in webkit [198654] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

Safari Crashes if audio.src is changed while connected to AudioAnalyserNode
https://bugs.webkit.org/show_bug.cgi?id=153593
<rdar://problem/23648082>

Reviewed by Eric Carlson.

m_ringBuffer is accessed on the high-priority WebAudio thread after it has been cleared (a
null-deref). Protect against unsafe access on multiple threads of a non-refcounted object by
a simple try_lock.

Additionally, limit the use of variables in use by both the separate WebAudio thread method
(provideInput()) and AVAudioMix thread method (process()) where possible, and convert to
std::atomic<> where ivars must be acessed by both threads. m_writeCount is entirely superfluous,
as it is a synonym for the endTime returned by m_ringBuffer->getCurrentFrameBounds().

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::provideInput):
(WebCore::AudioSourceProviderAVFObjC::prepare):
(WebCore::AudioSourceProviderAVFObjC::unprepare):
(WebCore::AudioSourceProviderAVFObjC::process):

5:36 PM WebInspectorDebugging edited by Joseph Pecoraro
Added WebKitDebug prefix to log to system console. (diff)
5:31 PM WebInspectorDebugging edited by Joseph Pecoraro
Added new WebKitDebug prefix for local inspector debugging. (diff)
4:56 PM Changeset in webkit [198653] by enrica@apple.com
  • 8 edits in trunk/Source

Adopt new SPI from DataDetectorsCore to decide link behavior.
https://bugs.webkit.org/show_bug.cgi?id=155780
rdar://problem/25303631

Reviewed by Sam Weinig.

Source/WebCore:

isDataDetectorLink and shouldCancelDefaultAction now
use the SPI provided by DataDetectorsCore to decide
what is the link behavior when the user taps on it.

  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::isDataDetectorLink):
(WebCore::DataDetection::requiresExtendedContext):
(WebCore::DataDetection::dataDetectorIdentifier):
(WebCore::DataDetection::shouldCancelDefaultAction):

  • platform/cocoa/DataDetectorsCoreSoftLink.h:
  • platform/cocoa/DataDetectorsCoreSoftLink.mm:
  • platform/spi/cocoa/DataDetectorsCoreSPI.h:

Source/WebKit2:

Changed use of data detection functions to take
a reference to Element instead of a pointer.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleTap):
(WebKit::WebPage::commitPotentialTap):
(WebKit::WebPage::getPositionInformation):

4:18 PM Changeset in webkit [198652] by sbarati@apple.com
  • 6 edits
    4 adds in trunk

ES6: Implement IsRegExp function and use where needed in String.prototype.* methods
https://bugs.webkit.org/show_bug.cgi?id=155854

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch is a straight forward implementation of IsRegExp
in the ES6 spec:
https://tc39.github.io/ecma262/#sec-isregexp
We now use this IsRegExp function inside String.prototype.(startsWith | endsWith | includes)
as is dictated by the spec.

  • runtime/RegExpConstructor.h:

(JSC::RegExpConstructor::recordMatch):
(JSC::isRegExp):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):
(JSC::stringProtoFuncIncludes):

  • tests/es6.yaml:
  • tests/es6/well-known_symbols_Symbol.match_String.prototype.endsWith.js: Added.

(test):

  • tests/es6/well-known_symbols_Symbol.match_String.prototype.includes.js: Added.

(test):

  • tests/es6/well-known_symbols_Symbol.match_String.prototype.startsWith.js: Added.

(test):

  • tests/stress/string-prototype-methods-endsWith-startsWith-includes-correctness.js: Added.

(assert):
(test):
(test.get let):
(get let):

LayoutTests:

  • js/string-includes-expected.txt:
4:16 PM Changeset in webkit [198651] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[WK2] Disable network cache speculative validation by default
https://bugs.webkit.org/show_bug.cgi?id=155857
<rdar://problem/25233210>

Reviewed by Alex Christensen.

Disable network cache speculative validation by default. Clients such
as Safari now use the API added in r198544 to enable if they want.

  • UIProcess/API/APIProcessPoolConfiguration.h:
4:09 PM Changeset in webkit [198650] by enrica@apple.com
  • 2 edits in trunk/Source/WebCore

DataDetection creates links that are longer than the actual result.
https://bugs.webkit.org/show_bug.cgi?id=155850
rdar://problem/25280740

Reviewed by Anders Carlsson.

When a data detection result is composed of multiple fragments,
the range for the last fragment should take into account the end
offset of the query range structure, since there could be additional
content in that range that is not part of the result.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

4:01 PM Changeset in webkit [198649] by commit-queue@webkit.org
  • 32 edits
    3 deletes in trunk

Unreviewed, rolling out r198627.
https://bugs.webkit.org/show_bug.cgi?id=155856

Caused use-after-free (Requested by ap on #webkit).

Reverted changeset:

"[Fetch API] Add basic loading of resources"
https://bugs.webkit.org/show_bug.cgi?id=155637
http://trac.webkit.org/changeset/198627

3:43 PM Changeset in webkit [198648] by sbarati@apple.com
  • 15 edits in trunk

Web Inspector: Separate Debugger enable state from the debugger breakpoints enabled state
https://bugs.webkit.org/show_bug.cgi?id=152193
<rdar://problem/23867520>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When all breakpoints are disabled, we can recompile all JS
code and remove the necessary debugging code that is emitted.
This allows for the code that is executing to be almost as fast
as it is with the debugger completely disabled. This is in preparation for:
https://bugs.webkit.org/show_bug.cgi?id=155809
which will introduce a high fidelity profiler. That profiler
could be built off the principle that breakpoints are disabled
when we're performing a high fidelity profile. Doing so, for example,
allows the sampling profiler to better measure the real performance
of the JS of a particular application.

  • debugger/Debugger.cpp:

(JSC::Debugger::setBreakpointsActivated):
(JSC::Debugger::setPauseOnExceptionsState):

  • debugger/Debugger.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::Graph):

  • inspector/JSGlobalObjectScriptDebugServer.cpp:

(Inspector::JSGlobalObjectScriptDebugServer::attachDebugger):
(Inspector::JSGlobalObjectScriptDebugServer::detachDebugger):

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::enable):

  • runtime/Executable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock):
(JSC::JSGlobalObject::createModuleProgramCodeBlock):
(JSC::JSGlobalObject::queueMicrotask):
(JSC::JSGlobalObject::hasDebugger):
(JSC::JSGlobalObject::hasInteractiveDebugger):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::runtimeFlags):
(JSC::JSGlobalObject::hasDebugger): Deleted.

Source/WebCore:

No new tests because this is already tested by inspector tests.

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::attachDebugger):
(WebCore::PageScriptDebugServer::detachDebugger):

LayoutTests:

  • inspector/script-profiler/event-type-API.html:
  • inspector/script-profiler/event-type-Microtask.html:
  • inspector/script-profiler/event-type-Other.html:
3:35 PM Changeset in webkit [198647] by msaboff@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Create private builtin helper advanceStringIndexUnicode() for use by RegExp builtins
https://bugs.webkit.org/show_bug.cgi?id=155855

Reviewed by Mark Lam.

Moved advanceStringIndexUnicode() as a separate helper. Added it as a private builtin
to the GlobalObject like other private builtins.

  • builtins/RegExpPrototype.js:

(advanceStringIndexUnicode):
(match):
(match.advanceStringIndexUnicode): Deleted.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

3:27 PM Changeset in webkit [198646] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebCore

[MSE] Make calling HTMLMediaElement.buffered less expensive
https://bugs.webkit.org/show_bug.cgi?id=155846

Reviewed by Eric Carlson.

The MSE specification requires a new TimeRanges object be returned when calling
HTMLMediaElement.buffered. Additionally, the requirements for generating the buffered time
ranges for MediaSource and its constituent SourceBuffers are specific and expensive. Rather
than perform all these steps each time HTMLMediaElement.buffered is queried, cache the final
result and only regenerate the cached value if the buffered ranges of the consituent
SourceBuffers has changed.

Also, make copying a PlatformTimeRanges more efficient by doing a straight vector-to-vector
copy of the PlatformTimeRange's data.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::buffered):
(WebCore::MediaSource::regenerateActiveSourceBuffers):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

  • Modules/mediasource/SourceBuffer.h:
  • platform/graphics/PlatformTimeRanges.cpp:

(WebCore::PlatformTimeRanges::PlatformTimeRanges): Deleted.
(WebCore::PlatformTimeRanges::operator=): Deleted.
(WebCore::PlatformTimeRanges::copy): Deleted.

  • platform/graphics/PlatformTimeRanges.h:
3:20 PM Changeset in webkit [198645] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Reduce forced layouts
https://bugs.webkit.org/show_bug.cgi?id=155852
<rdar://problem/25345197>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-24
Reviewed by Timothy Hatcher.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype.layout):
(WebInspector.DataGrid.prototype._positionResizerElements):
(WebInspector.DataGrid.prototype._positionHeaderViews):
In loops, force layout once, calculate values, then set styles.

  • UserInterface/Views/RadioButtonNavigationItem.js:

(WebInspector.RadioButtonNavigationItem):
(WebInspector.RadioButtonNavigationItem.prototype.updateLayout):
Force layout once to calculate the min-width, then never again.

3:18 PM Changeset in webkit [198644] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Open Resource Dialog should not system beep when using Enter to select an item
https://bugs.webkit.org/show_bug.cgi?id=155853

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-24
Reviewed by Timothy Hatcher.

  • UserInterface/Views/OpenResourceDialog.js:

(WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
Prevent default when handling Enter with a selected result.

3:14 PM Changeset in webkit [198643] by dbates@webkit.org
  • 3 edits in trunk/LayoutTests

Update expected results following <http://trac.webkit.org/changeset/198591>
(https://bugs.webkit.org/show_bug.cgi?id=155777)

  • http/tests/security/contentSecurityPolicy/audio-redirect-blocked-expected.txt:
  • http/tests/security/contentSecurityPolicy/video-redirect-blocked-expected.txt:
1:17 PM Changeset in webkit [198642] by rniwa@webkit.org
  • 10 edits
    6 adds in trunk/Websites/perf.webkit.org

Add mocha server tests for /api/build-requests
https://bugs.webkit.org/show_bug.cgi?id=155831

Reviewed by Chris Dumez.

Added the new mocha.js based server-tests for /api/build-requests. The new harness automatically:

  • starts a new Apache instance
  • switches the database during testing via setting an environmental variable
  • backups and restores public/data directory during testing

As a result, developer no longer has to manually setup Apache, edit config.json manually to use
a testing database, or run /api/manifest.php to re-generate the manifest file after testing.

This patch also makes ID resolution optional on /api/build-requests so that v3 model based syncing
scripts can re-use the same code as the v3 UI to process the JSON. tools/sync-with-buildbot.py has
been modified to use this option (useLegacyIdResolution).

  • config.json: Added configurations for the test httpd server.
  • init-database.sql: Don't error when tables and types don't exist (when database is empty).
  • public/api/build-requests.php:

(main): Made the ID resolution optional with useLegacyIdResolution. Also removed "updates" from the
results JSON since it's never used.

  • public/include/build-requests-fetcher.php:

(BuildRequestsFetcher::construct):
(BuildRequestsFetcher::fetch_roots_for_set_if_needed): Fixed the bug that we would include the same
commit multiple times for each root set.

  • public/include/db.php:

(config): If present, use ORG_WEBKIT_PERF_CONFIG_PATH instead of Websites/perf.webkit.org/config.json.

  • server-tests: Added.
  • server-tests/api-build-requests-tests.js: Added. Tests for /api/build-requests.

(.addMockData):

  • server-tests/resources: Added.
  • server-tests/resources/test-server.conf: Added. Apache configuration file for testing.
  • server-tests/resources/test-server.js: Added.

(TestSever): Added.
(TestSever.prototype.start): Added.
(TestSever.prototype.stop): Added.
(TestSever.prototype.remoteAPI): Added. Configures RemoteAPI to be used with the test sever.
(TestSever.prototype.database): Added. Returns Database configured to use the test database.
(TestSever.prototype._constructTestConfig): Creates config.json for testing. The file is generated by
_start and db.php's config() reads it from the environmental variable: ORG_WEBKIT_PERF_CONFIG_PATH.
(TestSever.prototype._ensureDataDirectory): Renames public/data to public/original-data if exists,
and creates a new empty public/data.
(TestSever.prototype._restoreDataDirectory): Deletes public/data and renames public/original-data
back to public/data.
(TestSever.prototype._ensureTestDatabase): Drops the test database if exists and creates a new one.
(TestSever.prototype.initDatabase): Run init-database.sql to start each test with a consistent state.
(TestSever.prototype._executePgsqlCommand): Executes a postgres command line tool such as psql.
(TestSever.prototype._determinePgsqlDirectory): Finds the directory that contains psql.
(TestSever.prototype._startApache): Starts an Apache instance for testing.
(TestSever.prototype._stopApache): Stops the Apache instance for testing.
(TestSever.prototype._waitForPid): Waits for the Apache pid file to appear or disappear.
(before): Start the test server at the beginning.
(beforeEach): Re-initialize all tables before each test.
(after): Stop the test server at the end.

  • tools/js/config.js:

(Config.prototype.path):
(Config.prototype.serverRoot): Added. The path to Websites/perf.webkit.org/public/.
(Config.prototype.pathFromRoot): Added. Resolves a path from Websites/perf.webkit.org.

  • tools/js/database.js:

(Database): Now optionally takes the database name to use a different database during testing.
(Database.prototype.connect):
(Database.prototype.query): Added.
(Database.prototype.insert): Added.
(tableToPrefixMap): Maps table name to its prefix. Used by Database.insert.

  • tools/js/remote.js: Added.

(RemoteAPI): Added. This is node.js equivalent of RemoteAPI in public/v3/remote.js.
(RemoteAPI.prototype.configure): Added.
(RemoteAPI.prototype.fetchJSON): Added.
(RemoteAPI.prototype.fetchJSONWithStatus): Added.
(RemoteAPI.prototype.sendHttpRequest): Added.

  • tools/sync-with-buildbot.py:

(main): Use useLegacyIdResolution as this script relies on the legacy behavior.

  • unit-tests/checkconfig.js: pg was never directly used in this test.
12:56 PM Changeset in webkit [198641] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Fix iOS9 performance regression after r197572
https://bugs.webkit.org/show_bug.cgi?id=155845
<rdar://problem/25144924>

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-24
Reviewed by Chris Dumez.

  • wtf/Platform.h:

Use CFURLConnection instead of NSURLConnection on internal iOS9 builds.

12:05 PM Changeset in webkit [198640] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit/mac

Fix some new PDFKit-related warnings
https://bugs.webkit.org/show_bug.cgi?id=155847
<rdar://problem/25340312>

Reviewed by Anders Carlsson.

  • WebView/WebPDFView.mm:

(-[WebPDFView setViewState:]):

  • WebView/WebPreferences.mm:

(-[WebPreferences PDFDisplayMode]):
PDFDisplayMode is now a real enum.

11:56 AM Changeset in webkit [198639] by matthew_hanson@apple.com
  • 4 edits
    3 adds in branches/safari-601-branch

Merge r198592. rdar://problem/25332806

11:42 AM Changeset in webkit [198638] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Improve update-webkit-dependency script.
https://bugs.webkit.org/show_bug.cgi?id=155576

Patch by Jeremy Zerfas <WebKit@JeremyZerfas.com> on 2016-03-24
Reviewed by Brent Fulgham.

  • Scripts/update-webkit-dependency:

-Updated script to also use ETags for helping to determine whether dependency is up to date.
-Updated script so it usually won't need to download the entire dependency each time it is

ran.

-Updated script to ensure zip file contains expected directories before trying to install.
-Added some more error checking and improved error messages.
(lastModifiedToUnixTime): Deleted.

  • Scripts/update-webkit-wincairo-libs:

-Corrected comment about what script does.

11:42 AM Changeset in webkit [198637] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r189129): <audio> elements do not have playback controls on iOS.
https://bugs.webkit.org/show_bug.cgi?id=155808
<rdar://problem/23822457>

Reviewed by Eric Carlson.

Audio elements should never require fullscreen for playback.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):

11:14 AM Changeset in webkit [198636] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/Source/WebCore

Merge custom patch. rdar://problem/25152415.

11:14 AM Changeset in webkit [198635] by matthew_hanson@apple.com
  • 4 edits
    3 adds in branches/safari-601.1.46-branch

Merge r198592. rdar://problem/25271136

11:14 AM Changeset in webkit [198634] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/Source/WebCore

Merge r198157. rdar://problem/25271134

11:14 AM Changeset in webkit [198633] by matthew_hanson@apple.com
  • 8 edits
    8 adds in branches/safari-601.1.46-branch

Merge r195614. rdar://problem/24850429

11:04 AM Changeset in webkit [198632] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Clean up cookie jar after r198195
https://bugs.webkit.org/show_bug.cgi?id=155484

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-24
Reviewed by Tim Horton.

Get rid of a now unneeded macro.

  • loader/CookieJar.cpp:

(WebCore::storageSession):
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):

10:54 AM Changeset in webkit [198631] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.1.25.0.1/Source

Versioning.

10:51 AM Changeset in webkit [198630] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.25.0.1

New tag.

10:07 AM Changeset in webkit [198629] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix null dereferencing in NetworkLoad::continueCanAuthenticateAgainstProtectionSpace
https://bugs.webkit.org/show_bug.cgi?id=155799
rdar://25289012

Reviewed by Tim Horton.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
Null-check all the things!

10:01 AM Changeset in webkit [198628] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix webkitpy tests after r198617
https://bugs.webkit.org/show_bug.cgi?id=155827

Patch by Bill Ming <mbbill@gmail.com> on 2016-03-24
Reviewed by Alex Christensen.

  • Scripts/webkitpy/tool/steps/confirmdiff.py:

(ConfirmDiff._show_pretty_diff):

9:53 AM Changeset in webkit [198627] by youenn.fablet@crf.canon.fr
  • 32 edits
    12 adds in trunk

[Fetch API] Add basic loading of resources
https://bugs.webkit.org/show_bug.cgi?id=155637

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebasing test expectations.
Updating scheme-blob.js to ensure generated test names are stable run after run.

  • web-platform-tests/fetch/api/basic/accept-header-expected.txt:
  • web-platform-tests/fetch/api/basic/integrity-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt:
  • web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt:
  • web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-about-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-blob.js:

(checkFetchResponse): Deleted.
(checkKoUrl): Deleted.

  • web-platform-tests/fetch/api/basic/scheme-data-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-others-expected.txt:
  • web-platform-tests/fetch/api/basic/stream-response-expected.txt:

Source/WebCore:

Adding support for basic fetch for Window (no support for Worker yet).
A FetchResponse object is created for every fetch task.
But it will only be exposed to JS at promise fulfillment time, i.e. once initial response headers are retrieved.

Updating Blob resource handle to add Content-Type and Content-Length header and notifying of error in case of erroneous HTTP method.

Fetch is limited to same origin requests currently due to some WPT tests that would timeout otherwise.

Tests: http/tests/fetch/closing-while-fetching.html

http/tests/fetch/get-response-body-while-loading.html

Also covered by rebased tests.

  • Modules/fetch/DOMWindowFetch.cpp: Creating a FetchResponse to start fetching.

(WebCore::DOMWindowFetch::fetch):

  • Modules/fetch/DOMWindowFetch.h:
  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consume):
(WebCore::FetchBody::consumeArrayBuffer): Handling of body promises in case of data stored as a buffer.
(WebCore::FetchBody::consumeText): Passing the promise as a reference.
(WebCore::blobFromArrayBuffer): Helper routine.
(WebCore::FetchBody::fulfillTextPromise): Helper routine.
(WebCore::FetchBody::loadedAsArrayBuffer): Updated to handle storing of data as a buffer.
(WebCore::FetchBody::loadedAsText):
(WebCore::FetchBody::bodyForInternalRequest): Helper routine to generate the request body data to be sent as part of the fetch request.
(WebCore::FetchBody::extractFromText):

  • Modules/fetch/FetchBody.h:

(WebCore::FetchBody::loadingBody):
(WebCore::FetchBody::FetchBody):

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::loadBlob): Updated to cope with the change that FetchLoader::start does not return a boolean anymore
but will directly call failure callbacks.
(WebCore::FetchBodyOwner::loadedBlobAsText): Moving it closer to other blob loading routines.
(WebCore::FetchBodyOwner::finishBlobLoading):

  • Modules/fetch/FetchBodyOwner.h:

(WebCore::FetchBodyOwner::body):
(WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):

  • Modules/fetch/FetchHeaders.cpp:

(WebCore::FetchHeaders::fill):
(WebCore::FetchHeaders::filterAndFill): Helper routine to fill headers from a HTTPHeaderMap after being filtered.

  • Modules/fetch/FetchHeaders.h:

(WebCore::FetchHeaders::internalHeaders):

  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):
(WebCore::FetchLoader::didFailRedirectCheck):

  • Modules/fetch/FetchLoader.h:
  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::internalRequest): Routine used to create the ResourceRequest transmitted to ThreadableLoader.

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::fetch): Start fetching by creating a FetchLoader based on passed request.
(WebCore::FetchResponse::BodyLoader::didSucceed): FetchLoader callback.
(WebCore::FetchResponse::BodyLoader::didFail): Ditto.
(WebCore::FetchResponse::BodyLoader::BodyLoader): Ditto.
(WebCore::FetchResponse::BodyLoader::didReceiveResponse): Ditto.
(WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Ditto.
(WebCore::FetchResponse::BodyLoader::start): Starting fetch loader.
(WebCore::FetchResponse::BodyLoader::stop): Stopping fetch loader.
(WebCore::FetchResponse::stop): Stop loader if any.

  • Modules/fetch/FetchResponse.h:
  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::doStart: Notifying the loader with an error if verb is not GET.
(WebCore::BlobResourceHandle::notifyResponseOnSuccess): Adding support for Content-Type and Content-Lenth headers.
(WebCore::BlobResourceHandle::createAsync): Removing GET verb check.

LayoutTests:

  • TestExpectations: Removed flaky test expectations.
  • http/tests/fetch/closing-while-fetching-expected.txt: Added.
  • http/tests/fetch/closing-while-fetching.html: Added.
  • http/tests/fetch/get-response-body-while-loading-expected.txt: Added.
  • http/tests/fetch/get-response-body-while-loading.html: Added.
  • http/tests/resources/download-json-with-delay.php: Added.
  • platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/request-headers-expected.txt: Added.
9:20 AM Changeset in webkit [198626] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Remove virtual inheritance from SVGTransformable.
<https://webkit.org/b/155837>

Reviewed by Anders Carlsson.

Nothing else inherits SVGLocatable, so make the inheritance non-virtual.

  • svg/SVGTransformable.h:
9:13 AM Changeset in webkit [198625] by msaboff@apple.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

[ES6] Add Proxy based tests for RegExp.prototype[@@match]
https://bugs.webkit.org/show_bug.cgi?id=155807

Reviewed by Saam Barati.

Added new test that uses Proxy to verify RegExp.prototype[@@match] processing
conforms to the ES6 standard

Modified builtin RegExp.prototype[@@match] to be ES6 spec conformant.

Updated es6.yaml as Proxy_internal_get_calls_RegExp.prototype[Symbol.match].js now passes.

  • builtins/RegExpPrototype.js:

(match):

  • tests/es6.yaml: Updated.
  • tests/stress/regexp-match-proxy.js: Added.

(assert):
(let.getProxyNullExec.new.Proxy):
(let.getSetProxyNullExec.new.Proxy):
(get resetTracking):
(let.getSetProxyMatches_s.new.Proxy):
(set get getSetProxyNullExec):
(let.getSetProxyMatches_tx_Greedy.new.Proxy):
(set get getSetProxyMatches_s):
(let.getSetProxyMatchesUnicode_digit_nonGreedy.new.Proxy):
(set get getSetProxyMatches_tx_Greedy):

7:19 AM Changeset in webkit [198624] by msaboff@apple.com
  • 7 edits in trunk

[ES6] Greedy unicode RegExp's don't properly backtrack past non BMP characters
https://bugs.webkit.org/show_bug.cgi?id=155829

Reviewed by Saam Barati.

Source/JavaScriptCore:

When we backup when matching part of a unicode pattern, we can't just backup one character.
Instead we need to save our start position before trying to match a character and
restore the position if the match fails. This was done in other places, but wasn't
done for all greedy types.

Fixed matchGlobal() to properly handle advancing past non BMP characters.

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::matchGlobal):

  • runtime/RegExpObjectInlines.h:

(JSC::RegExpObject::advanceStringUnicode):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::matchCharacterClass):
(JSC::Yarr::Interpreter::matchDisjunction):

LayoutTests:

Added new test cases.

  • js/regexp-unicode-expected.txt:
  • js/script-tests/regexp-unicode.js:
6:27 AM Changeset in webkit [198623] by Gyuyoung Kim
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening.

Unskip passing tests, which have been passed a long time ago.
Failed to track correct revision on EFL buildbot.

  • platform/efl/TestExpectations:
3:36 AM Changeset in webkit [198622] by youenn.fablet@crf.canon.fr
  • 5 edits in trunk/Source/WebCore

Remove DeferredWrapper::resolve<Vector<unsigned char>>
https://bugs.webkit.org/show_bug.cgi?id=154849

Reviewed by Darin Adler.

Adding fulfillPromiseWithArrayBuffer to resolve a promise with an ArrayBuffer.
If the ArrayBuffer is null, the promise is rejected with an OutOfMemory exception.

Not covered by tests since we would need to make tryCreate return null on failing allocation.

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::processIfEmptyOrDisturbed):
(WebCore::FetchBody::loadedAsArrayBuffer):

  • bindings/js/JSDOMPromise.cpp:

(WebCore::fulfillPromiseWithArrayBuffer):

  • bindings/js/JSDOMPromise.h:

(WebCore::DeferredWrapper::resolve<JSC::JSValue>): Deleted.
(WebCore::DeferredWrapper::resolve): Deleted.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::digest):
(WebCore::JSSubtleCrypto::exportKey):
(WebCore::JSSubtleCrypto::wrapKey):

2:02 AM Changeset in webkit [198621] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Source/JavaScriptCore

[JSC] In some cases, the integer range optimization phase never converges
https://bugs.webkit.org/show_bug.cgi?id=155828
rdar://problem/25155460

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

In certain conditions, the integer range optimization phase continuously
changes the representation of the same truth, preventing it from
converging to a stable state.

The bug starts by having the same ground truth incomming into a block
in different valid forms. For example, you can have x < 42 coming as:

1) x < 42
2) x < 41 + 1
3) x < 43 - 1

Having those 3 alone coming from predecessors would be okay, we would
just accumulate them. The problem is when you have a combination
of rule that filter out the previously obtained truth, then add a new
form of the same truth.

Let's use the test case as an example. We have two incoming blocks:

Block #1:

-i < 42
-i != 41

Block #2:

-i < 41
-i == 42 - 42 (i == 0 refining the rule above).

Let say that our conditions at head are now [i < 41, i < 42 - 1].

If we merge block #2:

-i < 42 and i < 41 -> i < 42
-i < 42 and i < 42 - 1 -> i < 42
-i != 41 and i < 41 -> i < 41
-i != 41 and i < 42 - 1 -> nothing

The new head is: [i < 41, i < 42]

If we merge block #1:

-i < 41 and i < 41 -> i < 41
-i < 41 and i < 42 -> i < 42
-i == 42 - 42 and i < 41 -> (i < 41 and i < 42 - 1)
-i == 42 - 42 and i < 42 -> i < 42

After filter, we are back to [i < 41, i < 42 - 1].

There are several variations of this idea where the same truth
rotate different forms with each merge().

One possible solution is to make filter() more aggressive
to avoid the better form occuring at merge(). I'll probably
do that at some point but that seems fragile since the same
problem could reappear if merge() is later improved.

For this patch, I went with a more generic solution after
merge(): if the generated form is equivalent to one that
previously existed at head, pick the existing form.

In the previous example, what happens is we only have
either [i < 41] or [i < 42 - 1] but never both simultaneously.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
  • tests/stress/integer-range-optimization-constant-representation-1.js: Added.
  • tests/stress/integer-range-optimization-constant-representation-2.js: Added.

Two variation. One timeout in release because of the additional flags.
The other is gets more type of run but only assert in debug.

1:10 AM Changeset in webkit [198620] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebInspectorUI

Web Inspector: Miscellaneous performance fixes in Timeline recording
https://bugs.webkit.org/show_bug.cgi?id=155832

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-24
Reviewed by Timothy Hatcher.

  • UserInterface/Models/CallingContextTree.js:

(WebInspector.CCTNode.prototype.hasChildren):
No need to allocate an array with all of the properties, we can just
check if there is at least one property using a short circuit for..in.
Performance was always faster for empty, small, and large objects
in micro benchmarks.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype.layout):
Avoid causing DOM layout when positioning resizers. They only need
a layout if we are resizing the DataGrid, or the initial layout.

  • UserInterface/Views/NavigationBar.js:

(WebInspector.NavigationBar):
(WebInspector.NavigationBar.prototype.needsLayout):
(WebInspector.NavigationBar.prototype.layout):
Avoid causing DOM layout every View layout. In fact, only do a
DOM layout when someone has triggered a needsLayout on this
navigation bar. A basic dirty layout (triggered by a parent)
should not have caused us to resize.

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
  • UserInterface/Views/LayoutTimelineOverviewGraph.js:

(WebInspector.LayoutTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/MemoryTimelineOverviewGraph.js:

(WebInspector.MemoryTimelineOverviewGraph.prototype.reset):
(WebInspector.MemoryTimelineOverviewGraph.prototype._updateLegend):

  • UserInterface/Views/NetworkTimelineOverviewGraph.js:
  • UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:

(WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):

  • UserInterface/Views/ScriptTimelineOverviewGraph.js:

Avoid doing any work in non-visible graphs. This was very common
because the RenderingFrameTimelineOverviewGraph is never visible
when the other timeline graphs are, but was performing lots of work.

  • UserInterface/Views/MemoryCategoryView.js:

(WebInspector.MemoryCategoryView.prototype.clear):
(WebInspector.MemoryCategoryView.prototype._updateDetails):
(WebInspector.MemoryCategoryView):

  • UserInterface/Views/MemoryTimelineView.js:

(WebInspector.MemoryTimelineView.prototype.reset):
(WebInspector.MemoryTimelineView.prototype._updateUsageLegend):
(WebInspector.MemoryTimelineView.prototype._updateMaxComparisonLegend):
Cache values to avoid textContent calls even if the content did not change.
This reduces unnecessary work when the values wouldn't change.

  • UserInterface/Views/TimelineRecordBar.js:

(WebInspector.TimelineRecordBar.createCombinedBars):
(WebInspector.TimelineRecordBar.prototype.set records):
Revert to fast loop and as this code path is very hot and for..of iteration
was showing up in profiles. Remove assert which seems rather pointless but
showed up in profiles.

12:13 AM Changeset in webkit [198619] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Large repaints while typing in the console tab
https://bugs.webkit.org/show_bug.cgi?id=155627
<rdar://problem/25234875>

Reviewed by Timothy Hatcher.

Use a position: absolute workaround to reduce large repaint areas caused by flexbox.

  • UserInterface/Views/LogContentView.css:

(body.selected-tab-console #content):
This selector must only affect the console tab as it breaks sidebars in other tabs.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):
(WebInspector._tabBarItemSelected):

  • UserInterface/Views/TabBar.js:

(WebInspector.TabBar.prototype.set selectedTabBarItem):
Add "selected-tab-console" class to <body> when the console tab is selected.

Note: See TracTimeline for information about the timeline view.