Timeline



Jan 17, 2017:

11:07 PM Changeset in webkit [210846] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/po

Revert "Merge r210214 - [GTK] German translation update"

This reverts commit r210817.

9:17 PM Changeset in webkit [210845] by Darin Adler
  • 141 edits
    1 delete in trunk/Source

Remove PassRefPtr from "loader" directory of WebCore
https://bugs.webkit.org/show_bug.cgi?id=167055

Reviewed by Alex Christensen.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::processHttpEquiv): Pass a reference.

  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::unapply): Ditto.
(WebCore::EditCommandComposition::reapply): Ditto.
(WebCore::CompositeEditCommand::ensureComposition): Return a reference.
(WebCore::CompositeEditCommand::applyCommandToComposite): Use a reference.

  • editing/CompositeEditCommand.h: Updated for above changes.
  • editing/Editor.cpp:

(WebCore::Editor::unappliedEditing): Take a reference instead of a PassRefPtr.
(WebCore::Editor::reappliedEditing): Ditto.

  • editing/Editor.h: Updated for above changes. Also changed the

FragmentAndResources resources vector to hold Ref instead of RefPtr.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::createFragmentAndAddResources): Updated for change to
FragmentAndResources.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::WebContentReader::readWebArchive): Pass a reference.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::WebContentReader::readWebArchive): Pass a reference.

  • history/PageCache.cpp:

(WebCore::canCacheFrame): Use a reference.

  • html/FileInputType.cpp:

(WebCore::FileInputType::handleDOMActivateEvent): Pass references.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::formMethod): Use auto.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::prepareForSubmission): Updated to use a return
values for textFieldValues intsead of an out argument with getTextFieldValues.
(WebCore::HTMLFormElement::textFieldValues): Renamed from getTextFieldValues
and changed to use a return value instead of an out argument.
(WebCore::HTMLFormElement::submit): Pass a reference.
(WebCore::HTMLFormElement::requestAutocomplete): Pass a Ref&&.

  • html/HTMLFormElement.h: Updated for above changes.
  • html/HTMLHtmlElement.cpp:

(WebCore::HTMLHtmlElement::insertedByParser): Use a reference.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process): Pass a reference.
(WebCore::HTMLLinkElement::setCSSStyleSheet): Use auto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource): Use a reference.

  • inspector/InspectorApplicationCacheAgent.cpp:

(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus): Use a reference,
also update for struct-style member names withou m_ prefix.
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): Ditto.
(WebCore::InspectorApplicationCacheAgent::getManifestForFrame): Ditto.
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): Ditto.
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache): Ditto.
(WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): Ditto.
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): Ditto.

  • inspector/InspectorApplicationCacheAgent.h: Updated for above changes.
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl): Take a reference.

  • inspector/InspectorInstrumentation.h: Updated for the above.
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::DocumentLoader): Move much initialization to class definition.
(WebCore::DocumentLoader::originalRequest): Moved to header to make it inline.
(WebCore::DocumentLoader::originalRequestCopy): Ditto.
(WebCore::DocumentLoader::request): Ditto.
(WebCore::DocumentLoader::url): Ditto.
(WebCore::DocumentLoader::stopLoading): Pass a reference.
(WebCore::DocumentLoader::willSendRequest): Updated to take a raw pointer instead of a
PassRefPtr.
(WebCore::DocumentLoader::commitData): Call shouldUseMainResourceEncoding instead of
special casing WebArchive.
(WebCore::DocumentLoader::maybeCreateArchive): Pass references.
(WebCore::DocumentLoader::setArchive): Take Ref&& instead of PassRefPtr.
(WebCore::DocumentLoader::addAllArchiveResources): Take a reference instead
of a pointer.
(WebCore::DocumentLoader::popArchiveForSubframe): Return RefPtr instead of
PassRefPtr.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::subresources): Return a Vector<Ref> instead of a
Vector<RefPtr>.
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired): Use move
instead of swap.
(WebCore::DocumentLoader::scheduleArchiveLoad): Use shouldLoadFromArchiveOnly
instead of a special case for each type of archive.
(WebCore::DocumentLoader::originalURL): Moved to header to make it inline.
(WebCore::DocumentLoader::responseURL): Ditto.
(WebCore::DocumentLoader::documentURL): Call shouldUseMainResourceURL instead of
special casing WebArchive.
(WebCore::DocumentLoader::responseMIMEType): Moved to header to make it inline.
(WebCore::DocumentLoader::currentContentType): Ditto.
(WebCore::DocumentLoader::contentFilter): Ditto.
(WebCore::DocumentLoader::getIconLoadDecisionForIconURL): Pass a reference.
(WebCore::DocumentLoader::getIconDataForIconURL): Ditto.
(WebCore::DocumentLoader::dispatchOnloadEvents): Use a reference.
(WebCore::DocumentLoader::unreachableURL): Moved to header to make it inline.

  • loader/DocumentLoader.h: Updated for the above.
  • loader/EmptyClients.cpp: Updated for changes to client interfaces.
  • loader/EmptyClients.h: Ditto.
  • loader/FormState.cpp:

(WebCore::FormState::FormState): Take references instead of PassRefPtr, also
take Vector&& instead of Vector& when we want to take ownership and use move
instead of swap to do that.
(WebCore::FormState::create): Ditto.

  • loader/FormState.h: Updated for the above. Also changed return values to be

references instead of pointers and members to be Ref instead of RefPtr.

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::Attributes::parseMethodType): Updated for change
to the Method enumeration.
(WebCore::FormSubmission::Attributes::copyFrom): Deleted.
(WebCore::FormSubmission::FormSubmission): Use Ref&& instead of PassRefPtr.
(WebCore::FormSubmission::create): Use reference instead of pointer and
raw pointer instead of PassRefPtr. Also copy attributes using copy constructor
instead of an explicit copyFrom function.
(WebCore::FormSubmission::requestURL): Updated for change to the Method
enumeration.
(WebCore::FormSubmission::populateFrameLoadRequest): Ditto.

  • loader/FormSubmission.h: Updated for the above changes. Made the Attributes

class copyable, since we copy it. Changed some functions to return references
instead of pointers and use Ref instead of RefPtr for data members.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::submitForm): Updated for changes to FormSubmission
and FormState.
(WebCore::FrameLoader::receivedFirstData): Ditto.
(WebCore::FrameLoader::loadFrameRequest): Ditto.
(WebCore::FrameLoader::loadResourceSynchronously): Ditto.
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.

  • loader/FrameLoaderClient.h: Use references, pointers, RefPtr, and Ref

instead of PassRefPtr. Removed unused empty dispatchDidFailToStartPlugin.

  • loader/HistoryController.cpp:

(WebCore::HistoryController::pushState): Take RefPtr&& instead of PassRefPtr.
(WebCore::HistoryController::replaceState): Ditto.

  • loader/HistoryController.h: Updated for the above.
  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::updateFromElement): Pass a reference.

  • loader/NavigationScheduler.cpp: Use refernces and Ref&& instead of

pointers and PassRefPtr.
(WebCore::ScheduledNavigation::ScheduledNavigation): Added an overload
that sests m_shouldOpenExternalURLsPolicy.

  • loader/NavigationScheduler.h: Updated for the above.
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start): Use and pass references.
(WebCore::ResourceLoader::willSendRequest): Ditto.
(WebCore::ResourceLoader::didReceiveResponse): Ditto.
(WebCore::ResourceLoader::didFail): Ditto.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::createJavaAppletWidget): Return RefPtr instead
of PassRefPtr. Pass references instead of pointers.
(WebCore::SubframeLoader::loadOrRedirectSubframe): Ditto.
(WebCore::SubframeLoader::loadSubframe): Ditto.
(WebCore::SubframeLoader::document): Deleted. This was never really the
correct idiom for getting the appropriate document; hiding the dependency
on m_frame wasn't paing off.
(WebCore::SubframeLoader::loadPlugin): Pass reference instead of pointer.
(WebCore::SubframeLoader::shouldConvertInvalidURLsToBlank): Eliminated
unneeded null checking and complexity due to going through the document
instead of the frame for this check.

  • loader/SubframeLoader.h: Updated for the above.
  • loader/appcache/ApplicationCache.cpp:

(WebCore::ApplicationCache::ApplicationCache): Moved data member
initialization to the class definition.
(WebCore::ApplicationCache::~ApplicationCache): Pass a reference instead
of a pointer.
(WebCore::ApplicationCache::isComplete): Ditto.
(WebCore::ApplicationCache::setManifestResource): Take Ref&& instead of
PassRefPtr.
(WebCore::ApplicationCache::addResource): Ditto.
(WebCore::ApplicationCache::removeResource): Deleted. Was unused.

  • loader/appcache/ApplicationCache.h: Updated for above changes.
  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::ApplicationCacheGroup): Moved most
member initialization to the class definition.
(WebCore::ApplicationCacheGroup::~ApplicationCacheGroup): Pass a reference.
(WebCore::ApplicationCacheGroup::cacheForMainRequest): Removed
unnecessary preflight for removeFragmentIdentifier, which efficiently
does nothing if there is no identifier. Use early return.
(WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest): More of
the same.
(WebCore::ApplicationCacheGroup::selectCache): Ditto, also take a reference,
and use event names instead of a special enumeration to poast events.
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL): Ditto.
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
(WebCore::ApplicationCacheGroup::failedLoadingMainResource): Ditto.
(WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Ditto.
(WebCore::ApplicationCacheGroup::cacheDestroyed): Ditto.
(WebCore::ApplicationCacheGroup::stopLoadingInFrame): Ditto.
(WebCore::ApplicationCacheGroup::setNewestCache): Use Ref&& instead of
PassRefPtr.
(WebCore::ApplicationCacheGroup::makeObsolete): More of the same.
(WebCore::ApplicationCacheGroup::update): Ditto.
(WebCore::ApplicationCacheGroup::abort): Ditto.
(WebCore::ApplicationCacheGroup::didReceiveResponse): Ditto.
(WebCore::ApplicationCacheGroup::didFinishLoading): Ditto.
(WebCore::ApplicationCacheGroup::didFail): Ditto.
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest): Ditto.
(WebCore::ApplicationCacheGroup::manifestNotFound): Ditto.
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Ditto.
(WebCore::ApplicationCacheGroup::startLoadingEntry): Ditto.
(WebCore::ApplicationCacheGroup::deliverDelayedMainResources): Use a modern
for loop.
(WebCore::ApplicationCacheGroup::addEntry): Use auto and simplify logic
for adding.
(WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache): Update since
function result is a reference.
(WebCore::ApplicationCacheGroup::scheduleReachedMaxAppCacheSizeCallback):
Use auto.
(WebCore::ApplicationCacheGroup::postListenerTask): Take event type instead of
taking a special enumeration.

  • loader/appcache/ApplicationCacheGroup.h: Updated for the above.
  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::ApplicationCacheHost::ApplicationCacheHost): Move most member
initialization to the class definition.
(WebCore::ApplicationCacheHost::~ApplicationCacheHost): Use reference.
(WebCore::ApplicationCacheHost::selectCacheWithoutManifest): Ditto.
(WebCore::ApplicationCacheHost::selectCacheWithManifest): Ditto.
(WebCore::ApplicationCacheHost::mainResourceDataReceived): Ditto.
(WebCore::ApplicationCacheHost::failedLoadingMainResource): Ditto.
(WebCore::ApplicationCacheHost::finishedLoadingMainResource): Ditto.
(WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect): Ditto.
(WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse): Ditto.
(WebCore::ApplicationCacheHost::createFileURL): Ditto.
(WebCore::ApplicationCacheHost::maybeLoadSynchronously): Ditto.
(WebCore::ApplicationCacheHost::notifyDOMApplicationCache): Take event
type instead of special enumeration.
(WebCore::ApplicationCacheHost::stopLoadingInFrame): Use reference.
(WebCore::ApplicationCacheHost::stopDeferringEvents): Updated to use
event types instead of special enumeration and also repaired possible
edge case where code in event handler somehow triggers additional events.
(WebCore::ApplicationCacheHost::resourceList): Renamed from fillResourceList
and changed to return a vector instead of populating one.
(WebCore::ApplicationCacheHost::applicationCacheInfo): Tweak coding style a bit.
(WebCore::createApplicationCacheEvent): Factored this helper out of
dispatchDOMEvent so we can use Ref instead of RefPtr.
(WebCore::ApplicationCacheHost::dispatchDOMEvent): Updated to recent event type
rather than receiving an event id and mapping it to a type.
(WebCore::ApplicationCacheHost::setApplicationCache): Take RefPtr&& instead of
PassRefPtr.
(WebCore::ApplicationCacheHost::update): Pass a reference.
(WebCore::ApplicationCacheHost::swapCache): Ditto.
(WebCore::ApplicationCacheHost::abort): Ditto.

  • loader/appcache/ApplicationCacheHost.h: Updated for the above.
  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::loadCacheGroup): Pass a Ref instead of RefPtr.
(WebCore::ApplicationCacheStorage::cacheGroupForURL): Ditto.
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): Ditto.
(WebCore::ApplicationCacheStorage::cacheGroupDestroyed): Take a reference.
(WebCore::ApplicationCacheStorage::cacheGroupMadeObsolete): Ditto.
(WebCore::ApplicationCacheStorage::storeNewestCache): Ditto.
(WebCore::ApplicationCacheStorage::loadCache): Return RefPtr instead of PassRefPtr.
(WebCore::ApplicationCacheStorage::deleteCacheGroup): Pass a reference.

  • loader/appcache/ApplicationCacheStorage.h: Updated for the above.
  • loader/appcache/DOMApplicationCache.cpp:

(WebCore::DOMApplicationCache::DOMApplicationCache): Take a reference.
(WebCore::DOMApplicationCache::toEventType): Deleted.

  • loader/appcache/DOMApplicationCache.h: Updated for the above. Made most

members private.

  • loader/archive/Archive.cpp:

(WebCore::Archive::clearAllSubframeArchives): Use a set for the logic that
prevents us from walking the same archive more than once, rather than using
a vector. Left it recursive, though.

  • loader/archive/Archive.h: Git rid of the type function, replacing it with

three functions for the four different policies we currently have about the
different archive types. Changed functions to take Ref&& instead of PassRefPtr
and return const Vector<Ref>& instead of const Vector<RefPtr>&, changing the
data members to match.

  • loader/archive/ArchiveFactory.cpp:

(WebCore::createArchiveMIMETypesMap): Factored this out of the archiveMIMETypes
function so we don't need a boolean. Also use ASCIILiteral.
(WebCore::archiveMIMETypes): Updated to se the above.

  • loader/archive/ArchiveResourceCollection.cpp:

(WebCore::ArchiveResourceCollection::addAllResources): Take a reference.
(WebCore::ArchiveResourceCollection::popSubframeArchive): Return RefPtr instead
of PassRefPtr.

  • loader/archive/ArchiveResourceCollection.h: Updated for the above.
  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createPropertyListRepresentation): Use auto and
fewer local variables, more references for argument types and return values.
(WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
(WebCore::LegacyWebArchive::createResource): Ditto.
(WebCore::LegacyWebArchive::create): Ditto.
(WebCore::LegacyWebArchive::extract): Ditto.
(WebCore::LegacyWebArchive::type): Deleted.
(WebCore::LegacyWebArchive::rawDataRepresentation): More of the same.
(WebCore::LegacyWebArchive::createFromSelection): Ditto.

  • loader/archive/cf/LegacyWebArchive.h: Updated for the above. Also marked the

class final and added overrides for the four new policy member functions.

  • loader/archive/mhtml/MHTMLArchive.cpp:

(WebCore::MHTMLArchive::create): Pass references.
(WebCore::MHTMLArchive::generateMHTMLData): Return RefPtr instead of
PassRefPtr.

  • loader/archive/mhtml/MHTMLArchive.h: Updated for the above. Also marked the

class final and added overrides for the four new policy member functions.

  • loader/archive/mhtml/MHTMLParser.cpp:

(WebCore::MHTMLParser::parseArchiveWithHeader): Pass Ref instead of RefPtr
to setMainResource and addSubframeArchive.
(WebCore::MHTMLParser::addResourceToArchive): Ditto.

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet): Return RefPtr instead
of PassRefPtr.

  • loader/cache/CachedCSSStyleSheet.h: Updated for the above.
  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setInitiator): Take a reference instead of a
PassRefPtr.

  • loader/cache/CachedResourceRequest.h: Updated for the above.
  • loader/cocoa/DiskCacheMonitor.h: Removed. This is a duplicate, unused copy

of DiskCacheMonitorCocoa.h.

  • loader/cocoa/DiskCacheMonitorCocoa.h: Removed unneeded exporting and virtual

member functions, made more things private, and changed return type to RefPtr
instead of PassRefPtr.

  • loader/cocoa/DiskCacheMonitorCocoa.mm:

(WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):
Changed return type to RefPtr instead of PassRefPtr.

  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::setIconDataForIconURL): Take raw pointer instead of
PassRefPtr.
(WebCore::IconDatabase::getOrCreateIconRecord): Return Ref instead of PassRefPtr.
(WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase): Return RefPtr
instead of PassRefPtr.

  • loader/icon/IconDatabase.h: Updated for the above. Also marked functions final

instead of override.

  • loader/icon/IconDatabaseBase.h: Ditto.
  • loader/icon/PageURLRecord.cpp:

(WebCore::PageURLRecord::PageURLRecord): Moved initialization to the header.
(WebCore::PageURLRecord::~PageURLRecord): Wrote code here instead of calling
setIconRecord(nullptr).
(WebCore::PageURLRecord::setIconRecord): Take RefPtr&& instead of PassRefPtr.

  • loader/icon/PageURLRecord.h: Updatd for the above.
  • page/Chrome.cpp:

(WebCore::Chrome::runOpenPanel): Updated to take two references.

  • page/Chrome.h: Ditto.
  • page/ChromeClient.h: ditto.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::applicationCache): Pass a reference.
(WebCore::DOMWindow::setLocation): Ditto.
(WebCore::DOMWindow::createWindow): Ditto.
(WebCore::DOMWindow::open): Ditto.

  • page/EditorClient.h: Changed arguments to references instead of PassRefPtr.
  • page/History.cpp:

(WebCore::History::stateObjectAdded): Pass an rvalue reference.

  • page/Location.cpp:

(WebCore::Location::reload): Pass reference instead of pointer.
(WebCore::Location::setLocation): Ditto.

  • platform/URL.cpp:

(WebCore::URL::setFragmentIdentifier): Take a StringView rather than
a String, which is more flexible for callers. Also eliminated an unneeded
string allocation when the old string had a fragment that is being replaced.

  • platform/URL.h: Updated for the above.
  • replay/ReplayInputDispatchMethods.cpp:

(WebCore::InitialNavigation::dispatch): Pass reference.

  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::requestImageResource): Ditto.

  • svg/SVGFontFaceUriElement.cpp:

(WebCore::SVGFontFaceUriElement::loadFont): Ditto.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::updateExternalDocument): Ditto.

Source/WebKit/ios:

  • WebCoreSupport/WebChromeClientIOS.h: Updated runOpenPanel to take references.

Made class final and most functions private and final.

  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::runOpenPanel): Updated to take references.

Source/WebKit/mac:

  • WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient.

Also made class final and most functions private and final.

  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::runOpenPanel): Updated to take references.

  • WebCoreSupport/WebEditorClient.h: Updated for changes to EditorClient.
  • WebCoreSupport/WebEditorClient.mm:

(-[WebUndoStep initWithUndoStep:]): Take reference instead of PassRefPtr.
(+[WebUndoStep stepWithUndoStep:]): Ditto.
(-[WebUndoStep step]): Return reference instead of pointer.
(-[WebEditorUndoTarget undoEditing:]): Updated for the above.
(-[WebEditorUndoTarget redoEditing:]): Ditto.
(WebEditorClient::registerUndoOrRedoStep): Take reference instead of
PassRefPtr.
(WebEditorClient::registerUndoStep): Ditto.
(WebEditorClient::registerRedoStep): Ditto.

  • WebCoreSupport/WebFrameLoaderClient.h: Updated for changes to

FrameLoaderClient, marked functions final instead of override.

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Take
pointer instead of PassRefPtr.
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
(makeFormFieldValuesDictionary): Take a reference.
(WebFrameLoaderClient::dispatchWillSendSubmitEvent): Take Ref&& instead
of PassRefPtr.
(WebFrameLoaderClient::dispatchWillSubmitForm): Take a reference instead
of PassRefPtr.
(WebFrameLoaderClient::actionDictionary): Take a pointer instead of PassRePtr.
(WebFrameLoaderClient::createFrame): Take a reference instead of a pointer.
(WebFrameLoaderClient::createPlugin): Ditto.
(WebFrameLoaderClient::createJavaAppletWidget): Ditto.
(WebFrameLoaderClient::createNetworkingContext): Ditto.
(WebFrameLoaderClient::didCreateQuickLookHandle): Pass a reference.

  • WebCoreSupport/WebFrameNetworkingContext.h: Use Ref instead of PassRefPtr.
  • WebCoreSupport/WebFrameNetworkingContext.mm: Tweak style a bit.
  • WebCoreSupport/WebOpenPanelResultListener.h: Take a reference instead of

PassRefPtr. Use RefPtr for class field.

  • WebCoreSupport/WebOpenPanelResultListener.mm:

(-[WebOpenPanelResultListener dealloc]): Deleted. Compiler will now do it
correctly without us declaring anything explicitly.
(-[WebOpenPanelResultListener cancel]): Get rid of hand-written deref code,
and let RefPtr do the work.
(-[WebOpenPanelResultListener chooseFilename:]): Ditto.
(-[WebOpenPanelResultListener chooseFilenames:]): Ditto.
(-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]):
Rewrote to use a modern Objective-C for loop, reserveInitialCapacity,
and uncheckedAppend.

  • WebView/WebArchive.mm:

(-[WebArchive initWithMainResource:subresources:subframeArchives:]):
Updated for changes to LegacyWebArchive.
(-[WebArchive mainResource]): Ditto.
(-[WebArchive subresources]): Ditto.
(-[WebArchive subframeArchives]): Ditto.

  • WebView/WebDataSource.mm:

(-[WebDataSource _addSubframeArchives:]): Use a modern Objective-C for loop
instead of NSEnumerator.
(-[WebDataSource _fileWrapperForURL:]): Use auto.
(-[WebDataSource _documentFragmentWithArchive:]): Pass a reference.
(-[WebDataSource mainResource]): Ditto.
(-[WebDataSource subresources]): Ditto.
(-[WebDataSource subresourceForURL:]): Ditto.
(-[WebDataSource addSubresource:]): Ditto.

  • WebView/WebResource.mm:

(-[WebResourcePrivate initWithCoreResource:]): Take Ref&& instead of PassRefPtr.
(-[WebResourcePrivate dealloc]): Remove explicit deref since RefPtr will now take
care of it
(-[WebResource initWithCoder:]): Pass a reference.
(-[WebResource encodeWithCoder:]): Updated since coreResource is now RefPtr.
(-[WebResource _initWithCoreResource:]): Take Ref&& instead of PassRefPtr.
(-[WebResource _coreResource]): Return reference rather than pointer.
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
Added code to handle the null case and pass a reference rather than a pointer.

  • WebView/WebResourceInternal.h: Updated for the above.

Source/WebKit/win:

  • Plugins/PluginView.cpp:

(WebCore::PluginView::mediaCanStart): Fix call to dispatchDidFailToStartPlugin
by calling it directly on WebFrameLoaderClient. If my theory is correct, the old
call has been broken and doing nothing since r177941, two years ago, which made
the argument types different between FrameLoaderClient and WebFrameLoaderClient,
leaving WebFrameLoaderClient::dispatchDidFailToStartPlugin as dead code.

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::runOpenPanel): Updated for change to ChromeClient.

  • WebCoreSupport/WebChromeClient.h: Ditto.
  • WebCoreSupport/WebEditorClient.cpp:

(WebEditorUndoCommand::WebEditorUndoCommand): Take a reference instead of
a PassRefPtr. Also use Ref instead of RefPtr.
(WebEditorClient::shouldChangeTypingStyle): Deleted. Empty function that was
never called.
(WebEditorClient::webViewDidChangeTypingStyle): Ditto.
(WebEditorClient::webViewDidChangeSelection): Ditto.
(WebEditorClient::registerUndoStep): Take reference instead of PassRefPtr.
(WebEditorClient::registerRedoStep): Ditto.

  • WebCoreSupport/WebEditorClient.h: Updated for the above. Also marked the

class and member functions final and made them all private, which will
help us catch if there are any that don't correctly match WebCore.

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Updated
for change to ChromeClient.
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
(WebFrameLoaderClient::dispatchWillSendSubmitEvent): Ditto.
(WebFrameLoaderClient::dispatchWillSubmitForm): Ditto.
(WebFrameLoaderClient::createFrame): Ditto. Also merged two functions into
one because one was private and only called by the other.
(WebFrameLoaderClient::createPlugin): Ditto.
(WebFrameLoaderClient::createJavaAppletWidget): Ditto.
(WebFrameLoaderClient::createNetworkingContext): Ditto.

  • WebCoreSupport/WebFrameLoaderClient.h: Ditto.
  • WebCoreSupport/WebFrameNetworkingContext.h:

(WebFrameNetworkingContext::create): Return a Ref instead of a PassRefPtr.

Source/WebKit2:

  • Shared/APIWebArchive.h: Use RefPtr&& instead of PassRefPtr.
  • Shared/APIWebArchive.mm:

(API::WebArchive::create): Ditto.
(API::WebArchive::WebArchive): Ditto.
(API::WebArchive::subresources): Ditto.
(API::WebArchive::subframeArchives): Ditto.

  • Shared/TextCheckerState.h: Initialize data members so classes

using this won't have to explicitly initalize them.

  • UIProcess/WebIconDatabase.cpp:

(WebKit::WebIconDatabase::setIconDataForIconURL): Pass a raw
pointer to WebCore.

  • UIProcess/WebPageProxy.h: Removed forward declaration of

StringPairVector, not needed here.

  • WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:

(WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy): Take a reference.
(WebKit::WebIconDatabaseProxy::retainIconForPageURL): Updated for reference.
(WebKit::WebIconDatabaseProxy::releaseIconForPageURL): Ditto.
(WebKit::WebIconDatabaseProxy::synchronousIconForPageURL): Ditto.
(WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): Ditto.
(WebKit::WebIconDatabaseProxy::receivedIconLoadDecision): Ditto.
(WebKit::WebIconDatabaseProxy::iconDataForIconURL): Ditto.
(WebKit::WebIconDatabaseProxy::setIconURLForPageURL): Ditto.
(WebKit::WebIconDatabaseProxy::setIconDataForIconURL): Ditto.

  • WebProcess/IconDatabase/WebIconDatabaseProxy.h: Updated for the above.

Marked the class final, made most functions private and final.

  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:

(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
Removed assertion that a pointer is non-null since that pointer is now a
reference. Left use of PassRefPtr here for now.z

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad): Updated since application cache
host is now a reference rather thna a pointer.

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::willSendRequest): Ditto.
(WebKit::WebResourceLoader::didReceiveResponse): Ditto.
(WebKit::WebResourceLoader::didFailResourceLoad): Ditto.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::buildHTTPHeaders): Got rid of unneeded use of String::format.
(WebKit::PluginView::create): Take a reference instead of PassRefPtr.
(WebKit::PluginView::PluginView): Ditto. Also moved much of the data
member initialization to the class definition.
(WebKit::PluginView::recreateAndInitialize): Take Ref&& instead of PassRefPtr.
(WebKit::PluginView::manualLoadDidReceiveResponse): Updated for change to
ManualStreamState enumeration.
(WebKit::PluginView::manualLoadDidReceiveData): Ditto.
(WebKit::PluginView::manualLoadDidFinishLoading Ditto.):
(WebKit::PluginView::manualLoadDidFail): Ditto.
(WebKit::PluginView::liveResourceData): Return RefPtr insead of PassRefPtr.
(WebKit::PluginView::redeliverManualStream): Updated for ManualStreamState.

  • WebProcess/Plugins/PluginView.h: Updated for the above. Also changed

ManualStreamState into an enum class.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp: Changed m_page to a reference.

(WebKit::WebChromeClient::runOpenPanel): Take both arguments as references.

  • WebProcess/WebCoreSupport/WebChromeClient.h: Updated for the above.
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::registerUndoStep): Take reference instead of PassRefPtr.
(WebKit::WebEditorClient::registerRedoStep): Ditto.

  • WebProcess/WebCoreSupport/WebEditorClient.h: Updated for the above
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
Updated for change to FrameLoaderClient.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
(WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent): Ditto.
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): Ditto.
(WebKit::WebFrameLoaderClient::createFrame): Ditto.
(WebKit::WebFrameLoaderClient::createPlugin): Ditto.
(WebKit::WebFrameLoaderClient::recreatePlugin): Ditto.
(WebKit::WebFrameLoaderClient::createJavaAppletWidget): Ditto.
(WebKit::WebFrameLoaderClient::createNetworkingContext): Ditto.
(WebKit::WebFrameLoaderClient::didRequestAutocomplete): Ditto.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Updated for the above.
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::didReceiveMobileDocType): Updated since m_page is a
reference now.
(WebKit::WebChromeClient::observedContentChange): Ditto.
(WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame): Ditto.
(WebKit::WebChromeClient::didLayout): Ditto.
(WebKit::WebChromeClient::didStartOverflowScroll): Ditto.
(WebKit::WebChromeClient::didEndOverflowScroll): Ditto.
(WebKit::WebChromeClient::hasStablePageScaleFactor): Ditto.
(WebKit::WebChromeClient::showPlaybackTargetPicker): Ditto.
(WebKit::WebChromeClient::eventThrottlingDelay): Ditto.
(WebKit::WebChromeClient::deviceOrientation): Ditto.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Pass reference.
(WebKit::WebPage::createPlugin): Return RefPtr instead of PassRefPtr.
(WebKit::WebPage::fromCorePage): Updated for change to WebChromeClient.
(WebKit::WebPage::setHeaderPageBanner): Take pointer instead of PassRefPtr.
(WebKit::WebPage::setFooterPageBanner): Ditto.
(WebKit::WebPage::setActiveOpenPanelResultListener): Take Ref&& instead of
PassRefPtr.
(WebKit::WebPage::currentSelectionAsRange): Return RefPtr instead of PassRefPtr.
(WebKit::WebPage::rangeFromEditingRange): Ditto.

  • WebProcess/WebPage/WebPage.h: Updated for the above.
  • WebProcess/WebPage/efl/WebPageEfl.cpp:

(WebKit::WebPage::cachedResponseDataForURL): Return RefPtr instead of PassRefPtr.

  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::cachedResponseDataForURL): Ditto.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::cachedResponseDataForURL): Ditto.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::cachedResponseDataForURL): Ditto.
(WebKit::WebPage::setTopOverhangImage): Take raw pointer instead of PassRefPtr.
(WebKit::WebPage::setBottomOverhangImage): Ditto.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::WebProcess): Pass a reference. Move most initialization to
the class definition.

  • WebProcess/WebProcess.h: Updaed for the above.
8:22 PM Changeset in webkit [210844] by fpizlo@apple.com
  • 69 edits
    16 adds in trunk

Make opaque root scanning truly constraint-based
https://bugs.webkit.org/show_bug.cgi?id=165760

Reviewed by Geoffrey Garen.
JSTests:


Added this test, which demonstrates the benefit of having a dedicated string subspace.

  • microbenchmarks/stringalloc.js: Added.

Source/JavaScriptCore:

We have bugs when visitChildren() changes its mind about what opaque root to add, since
we don't have barriers on opaque roots. This supposedly once worked for generational GC,
and I started adding more barriers to support concurrent GC. But I think that the real
bug here is that we want the JSObject->OpaqueRoot to be evaluated as a constraint that
participates in the fixpoint. I like to think of this as an *output* constraint, because it
is concerned with outgoing edges in the heap from the object that registered the constraint.
An *input* constraint is like what Weak<> does when deciding whether the thing it points to
should be live.

Whether or not an object has output constraints depends on its type. So, we want the GC to
have a feature where we rapidly call some function on all marked objects of some type.

It's easy to rapidly scan all marked objects in a MarkedBlock. So, we want to allocate all
objects that have output constraints in their own MarkedBlocks and we want to track the set
of MarkedBlocks with output constraints.

This patch makes it easy to have clients of JSC's internal C++ APIs create a Subspace - like
what we used to call MarkedSpace::Subspace but now it's in the JSC namespace - which is
a collection of objects that you can easily scan during GC from a MarkingConstraint. It's
now possible for internal C++ API clients to register their own MarkingConstraints. The DOM
now uses this to create two Subspaces (more on why two below) and it calls
JSCell::visitOutputConstraints() on all of the marked objects in those subspaces using a new
MarkingConstraint. That MarkingConstraint uses a new style of volatility, called
SeldomGreyed, which is like GreyedByExecution except it is opportunistically not executed
as roots in the hopes that their sole execution will be the snapshot-at-the-end. I also
converted the CodeBlock rescan constraint to SeldomGreyed, since that's also an output
constraint.

This patch also uses Subspace for something pretty obvious: knowing how to call the
destructor. Subspaces can specialize the sweep for their way of invoking destructors. We
have the following subspaces:

  • auxiliary
  • cell
  • destructibleCell - for JSCell subclasses that have destructors and StructureIsImmortal
  • stringSpace - inlines ~JSString into the sweep, making string allocation 7% faster
  • destructibleObjectSpace - for JSDestructibleObject subclasses


And WebCore adds:

  • outputConstraint - for JSDOMObjects that have a visitAdditionalChildren
  • globalObjectOutputConstraint - for JSDOMGlobalObjects that have a visitAdditionalChildren, since JSDOMGlobalObjects are not JSDestructibleObjects


The Subspace for a type is selected by saying JSC::subspaceFor<Type>(vm). This calls
Type::subspaceFor<Type>(vm). This allows cell classes to override subspaceFor<> and it
allows any subspaceFor<> implementation to query static flags in the type. This is how
JSCell::subspaceFor<> can select either cellSpace or destructibleCellSpace.

This patch is mostly about:

  • Moving MarkedSpace::Subspace out of MarkedSpace and making it a nice class with a nice API. Almost all of its functionality is just taken out of MarkedSpace.
  • Converting users of the old API for allocating objects and getting MarkedAllocators, like heap.allocatorForObjectWithoutDestructor() and its friends. That would now say vm.cellSpace.allocatorFor().


Altogether, this means that we only have a small regression on Dromaeo. The regression is
due to the fact that we scan output constraints. Before the Subspace optimizations (see
r209766, which was rolled out in r209812), this regression on Dromaeo/jslib was 2x but after
the optimizations in this patch it's only 1.12x. Note that Dromaeo/jslib creats gigabytes of
DOM nodes. Compared to web pages, this is a very extreme synthetic microbenchmark. Still, we
like optimizing these because we don't want to presume what web pages will look like.

The use of Subspaces to specialize destructors happened not because it's super necessary but
because I wanted to introduce a single unified way of communicating to the GC how to treat
different types. Any Subspace feature that allowed us to collect some types together would
have to be mindful of the destructorness of objects. I could have turned this into a
liability where each Subspace has two subsubspaces - one for destructor objects and one for
non-destructor objects, which would have allowed me to keep the old sweep specialization
code. Just days prior, mlam wanted to do something that was hard because of that old sweep
specializer, so I decided to take the opportunity to fix the sweep specializer while also
making Subspace be the one true way of teaching the GC about types. To validate that this
actually does things, I added a JSStringSubspace and a test that shows that this is a 7%
string allocation progression.

In bug 167066, I'm getting rid of the rest of the code in JSC that would special-case for
JSDestructibleObject vs StructureIsImmortal by using the GC's DestructionMode. After that,
Subspace will be only mechanism by which JSC uses the GC to encode types.

Prior to this change, having multiple MarkedSpace::Subspaces would have been expensive
because they create a bunch of MarkedAllocators upfront. We now have the ability to create
MarkedAllocators lazily. We create them on the first allocation from that size class or when
a JIT asks for the MarkedAllocator. The concurrent JITs can ask for MarkedAllocators because
their creation is under a lock.

On my machine, this might be a 1.1% JetStream speed-up with 87% confidence and it might be
a 0.4% PLT3 slow-down with 92% confidence. Note that 0.4% on PLT3 is the level of systematic
error on PLT3 on my computer: I've seen definite 0.4% speed-ups and slow-downs that were not
confirmed by any bot. Let's see what the bots say.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfile::initialize):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileNewTypedArray):
(JSC::DFG::SpeculativeJIT::emitAllocateButterfly):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocatorForSize):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedCell):
(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):

  • heap/AllocatorAttributes.h:

(JSC::AllocatorAttributes::AllocatorAttributes):

  • heap/ConstraintVolatility.h: Added.

(WTF::printInternal):

  • heap/GCActivityCallback.cpp:
  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::markToFixpoint):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::collectInThread):
(JSC::Heap::stopTheWorld):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::bytesVisited):
(JSC::Heap::addCoreConstraints):
(JSC::Heap::addMarkingConstraint):
(JSC::Heap::notifyIsSafeToCollect):
(JSC::Heap::preventCollection):
(JSC::Heap::allowCollection):
(JSC::Heap::setMutatorShouldBeFenced):
(JSC::Heap::buildConstraintSet): Deleted.
(JSC::Heap::writeBarrierOpaqueRootSlow): Deleted.
(JSC::Heap::addMutatorShouldBeFencedCache): Deleted.

  • heap/Heap.h:

(JSC::Heap::mutatorExecutionVersion):
(JSC::Heap::numOpaqueRoots):
(JSC::Heap::vm): Deleted.
(JSC::Heap::subspaceForObjectWithoutDestructor): Deleted.
(JSC::Heap::subspaceForObjectDestructor): Deleted.
(JSC::Heap::subspaceForAuxiliaryData): Deleted.
(JSC::Heap::allocatorForObjectWithoutDestructor): Deleted.
(JSC::Heap::allocatorForObjectWithDestructor): Deleted.
(JSC::Heap::allocatorForAuxiliaryData): Deleted.

  • heap/HeapInlines.h:

(JSC::Heap::vm):
(JSC::Heap::allocateWithDestructor): Deleted.
(JSC::Heap::allocateWithoutDestructor): Deleted.
(JSC::Heap::allocateObjectOfType): Deleted.
(JSC::Heap::subspaceForObjectOfType): Deleted.
(JSC::Heap::allocatorForObjectOfType): Deleted.
(JSC::Heap::allocateAuxiliary): Deleted.
(JSC::Heap::tryAllocateAuxiliary): Deleted.
(JSC::Heap::tryReallocateAuxiliary): Deleted.
(JSC::Heap::ascribeOwner): Deleted.
(JSC::Heap::writeBarrierOpaqueRoot): Deleted.

  • heap/LargeAllocation.cpp:

(JSC::LargeAllocation::tryCreate):
(JSC::LargeAllocation::LargeAllocation):
(JSC::LargeAllocation::~LargeAllocation):
(JSC::LargeAllocation::sweep):

  • heap/LargeAllocation.h:
  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::MarkedAllocator):
(JSC::MarkedAllocator::tryAllocateWithoutCollecting):
(JSC::MarkedAllocator::tryAllocateIn):
(JSC::MarkedAllocator::allocateSlowCaseImpl):
(JSC::MarkedAllocator::tryAllocateBlock):
(JSC::MarkedAllocator::shrink):
(JSC::MarkedAllocator::markedSpace):

  • heap/MarkedAllocator.h:

(JSC::MarkedAllocator::nextAllocatorInSubspace):
(JSC::MarkedAllocator::setNextAllocatorInSubspace):
(JSC::MarkedAllocator::subspace):
(JSC::MarkedAllocator::tryAllocate): Deleted.
(JSC::MarkedAllocator::allocate): Deleted.
(JSC::MarkedAllocator::forEachBlock): Deleted.

  • heap/MarkedAllocatorInlines.h: Added.

(JSC::MarkedAllocator::tryAllocate):
(JSC::MarkedAllocator::allocate):
(JSC::MarkedAllocator::forEachBlock):
(JSC::MarkedAllocator::forEachNotEmptyBlock):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::subspace):
(JSC::MarkedBlock::Handle::sweep):
(JSC::MarkedBlock::Handle::specializedSweep): Deleted.
(JSC::MarkedBlock::Handle::sweepHelperSelectScribbleMode): Deleted.
(JSC::MarkedBlock::Handle::sweepHelperSelectEmptyMode): Deleted.
(JSC::MarkedBlock::Handle::sweepHelperSelectHasNewlyAllocated): Deleted.
(JSC::MarkedBlock::Handle::sweepHelperSelectSweepMode): Deleted.
(JSC::MarkedBlock::Handle::sweepHelperSelectMarksMode): Deleted.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::Handle::visitWeakSet):

  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::Handle::isNewlyAllocatedStale):
(JSC::MarkedBlock::Handle::hasAnyNewlyAllocated):
(JSC::MarkedBlock::heap):
(JSC::MarkedBlock::space):
(JSC::MarkedBlock::Handle::space):
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::finishSweepKnowingSubspace):
(JSC::MarkedBlock::Handle::sweepDestructionMode):
(JSC::MarkedBlock::Handle::emptyMode):
(JSC::MarkedBlock::Handle::scribbleMode):
(JSC::MarkedBlock::Handle::newlyAllocatedMode):
(JSC::MarkedBlock::Handle::marksMode):
(JSC::MarkedBlock::Handle::forEachMarkedCell):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::initializeSizeClassForStepSize):
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::lastChanceToFinalize):
(JSC::MarkedSpace::addMarkedAllocator):
(JSC::MarkedSpace::allocate): Deleted.
(JSC::MarkedSpace::tryAllocate): Deleted.
(JSC::MarkedSpace::allocateLarge): Deleted.
(JSC::MarkedSpace::tryAllocateLarge): Deleted.

  • heap/MarkedSpace.h:

(JSC::MarkedSpace::heap):
(JSC::MarkedSpace::allocatorLock):
(JSC::MarkedSpace::subspaceForObjectsWithDestructor): Deleted.
(JSC::MarkedSpace::subspaceForObjectsWithoutDestructor): Deleted.
(JSC::MarkedSpace::subspaceForAuxiliaryData): Deleted.
(JSC::MarkedSpace::allocatorFor): Deleted.
(JSC::MarkedSpace::destructorAllocatorFor): Deleted.
(JSC::MarkedSpace::auxiliaryAllocatorFor): Deleted.
(JSC::MarkedSpace::allocateWithoutDestructor): Deleted.
(JSC::MarkedSpace::allocateWithDestructor): Deleted.
(JSC::MarkedSpace::allocateAuxiliary): Deleted.
(JSC::MarkedSpace::tryAllocateAuxiliary): Deleted.
(JSC::MarkedSpace::forEachSubspace): Deleted.

  • heap/MarkingConstraint.cpp:

(JSC::MarkingConstraint::MarkingConstraint):

  • heap/MarkingConstraint.h:

(JSC::MarkingConstraint::volatility):

  • heap/MarkingConstraintSet.cpp:

(JSC::MarkingConstraintSet::resetStats):
(JSC::MarkingConstraintSet::add):
(JSC::MarkingConstraintSet::executeConvergenceImpl):

  • heap/MarkingConstraintSet.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::visitAsConstraint):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::mergeIfNecessary):
(JSC::SlotVisitor::mergeOpaqueRootsIfNecessary): Deleted.

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::setIgnoreNewOpaqueRoots):

  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::reportExtraMemoryVisited):
(JSC::SlotVisitor::reportExternalMemoryVisited):

  • heap/Subspace.cpp: Added.

(JSC::Subspace::Subspace):
(JSC::Subspace::~Subspace):
(JSC::Subspace::finishSweep):
(JSC::Subspace::destroy):
(JSC::Subspace::allocate):
(JSC::Subspace::tryAllocate):
(JSC::Subspace::allocatorForSlow):
(JSC::Subspace::allocateSlow):
(JSC::Subspace::tryAllocateSlow):

  • heap/Subspace.h: Added.

(JSC::Subspace::tryAllocatorFor):
(JSC::Subspace::allocatorFor):

  • heap/SubspaceInlines.h: Added.

(JSC::Subspace::forEachMarkedBlock):
(JSC::Subspace::forEachNotEmptyMarkedBlock):
(JSC::Subspace::forEachLargeAllocation):
(JSC::Subspace::forEachMarkedCell):

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::specializedVisit):

  • heap/WeakBlock.h:
  • heap/WeakSet.h:

(JSC::WeakSet::visit):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize):
(JSC::AssemblyHelpers::emitAllocateVariableSized):
(JSC::AssemblyHelpers::emitAllocateVariableSizedCell):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_new_object):

  • jsc.cpp:
  • runtime/ButterflyInlines.h:

(JSC::Butterfly::createUninitialized):
(JSC::Butterfly::growArrayRight):

  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createEmpty):

  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::overrideThings):

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::initModifiedArgumentsDescriptor):

  • runtime/HashMapImpl.h:

(JSC::HashMapBuffer::create):

  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitialized):
(JSC::JSArray::unshiftCountSlowCase):

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):

  • runtime/JSCell.h:

(JSC::subspaceFor):

  • runtime/JSCellInlines.h:

(JSC::JSCell::visitOutputConstraints):
(JSC::JSCell::subspaceFor):
(JSC::allocateCell):

  • runtime/JSDestructibleObject.h:

(JSC::JSDestructibleObject::subspaceFor):

  • runtime/JSDestructibleObjectSubspace.cpp: Added.

(JSC::JSDestructibleObjectSubspace::JSDestructibleObjectSubspace):
(JSC::JSDestructibleObjectSubspace::~JSDestructibleObjectSubspace):
(JSC::JSDestructibleObjectSubspace::finishSweep):
(JSC::JSDestructibleObjectSubspace::destroy):

  • runtime/JSDestructibleObjectSubspace.h: Added.
  • runtime/JSObject.h:

(JSC::JSObject::JSObject):

  • runtime/JSObjectInlines.h:
  • runtime/JSSegmentedVariableObject.h:
  • runtime/JSString.h:

(JSC::JSString::subspaceFor):

  • runtime/JSStringSubspace.cpp: Added.

(JSC::JSStringSubspace::JSStringSubspace):
(JSC::JSStringSubspace::~JSStringSubspace):
(JSC::JSStringSubspace::finishSweep):
(JSC::JSStringSubspace::destroy):

  • runtime/JSStringSubspace.h: Added.
  • runtime/RegExpMatchesArray.h:

(JSC::tryCreateUninitializedRegExpMatchesArray):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

No new tests yet. I think that writing tests for this is a big investigation:
https://bugs.webkit.org/show_bug.cgi?id=165808

Remove the previous advancing wavefront DOM write barrier. I don't think this will scale
very well. It's super confusing.

This change makes it so that visitAdditionalChildren can become a GC constraint that
executes as part of the fixpoint. This changes all WebCore visitAdditionalChildren into
output constraints by using new JSC API for Subspaces and MarkingConstraints.

  • ForwardingHeaders/heap/MarkedAllocatorInlines.h: Added.
  • ForwardingHeaders/heap/MarkedBlockInlines.h: Added.
  • ForwardingHeaders/heap/MarkingConstraint.h: Added.
  • ForwardingHeaders/heap/SubspaceInlines.h: Added.
  • ForwardingHeaders/heap/VisitingTimeout.h: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):
(WebCore::writeBarrierOpaqueRootSlow): Deleted.

  • bindings/js/CommonVM.h:

(WebCore::writeBarrierOpaqueRoot): Deleted.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::finishCreation):
(WebCore::JSDOMGlobalObject::scriptExecutionContext):

  • bindings/js/JSDOMWrapper.cpp:

(WebCore::outputConstraintSubspaceFor):
(WebCore::globalObjectOutputConstraintSubspaceFor):

  • bindings/js/JSDOMWrapper.h:
  • bindings/js/WebCoreJSClientData.cpp: Added.

(WebCore::JSVMClientData::JSVMClientData):
(WebCore::JSVMClientData::~JSVMClientData):
(WebCore::JSVMClientData::getAllWorlds):
(WebCore::initNormalWorldClientData):

  • bindings/js/WebCoreJSClientData.h:

(WebCore::JSVMClientData::outputConstraintSpace):
(WebCore::JSVMClientData::globalObjectOutputConstraintSpace):
(WebCore::JSVMClientData::forEachOutputConstraintSpace):
(WebCore::JSVMClientData::JSVMClientData): Deleted.
(WebCore::JSVMClientData::~JSVMClientData): Deleted.
(WebCore::JSVMClientData::getAllWorlds): Deleted.
(WebCore::initNormalWorldClientData): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted):
(WebCore::notifyChildNodeRemoved):

8:21 PM Changeset in webkit [210843] by Michael Catanzaro
  • 213 edits
    4 deletes in trunk

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

It introduced dozens of test timeouts.

Reverted changeset:
"[Modern Media Controls] Turn modern media controls on by default"
https://bugs.webkit.org/show_bug.cgi?id=165668
http://trac.webkit.org/changeset/210834

7:59 PM Changeset in webkit [210842] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Remove positionOutsideContainingSpecialElement
https://bugs.webkit.org/show_bug.cgi?id=167150

Reviewed by Antti Koivisto.

It is not used anymore.

No change in functionality.

  • editing/htmlediting.cpp:

(WebCore::isFirstVisiblePositionInSpecialElement): Deleted.
(WebCore::isLastVisiblePositionInSpecialElement): Deleted.
(WebCore::positionOutsideContainingSpecialElement): Deleted.

  • editing/htmlediting.h:
5:46 PM Changeset in webkit [210841] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK][MediaStream] Update bug number for some tests after r210838.

Fix the bug number for tests fast/mediastream/MediaStream-add-ended-tracks.html
and fast/mediastream/MediaStream-add-remove-tracks.html that I wrongly updated
in r210838.

Unreviewed gardening.

  • platform/gtk/TestExpectations:
5:37 PM Changeset in webkit [210840] by akling@apple.com
  • 3 edits in trunk/Source/WTF

Annotate FastMalloc functions with returns_nonnull attribute.
<https://webkit.org/b/167144>

Reviewed by Antti Koivisto.

Decorate fastMalloc() and friends with attribute((returns_nonnull)) for supporting
compilers that can do useful things with that information.

  • wtf/Compiler.h:
  • wtf/FastMalloc.h:
5:35 PM Changeset in webkit [210839] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix nits found after landing r210833.
https://bugs.webkit.org/show_bug.cgi?id=167065

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::replaceAllChildren):

  • dom/ContainerNode.h:
5:32 PM Changeset in webkit [210838] by clopez@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK][MediaStream] Update list of MediaStream tests that fail.

Unskip all the MediaStream tests and instead mark them as failing or timing out.

Unreviewed gardening.

  • platform/gtk/TestExpectations:
5:27 PM Changeset in webkit [210837] by msaboff@apple.com
  • 7 edits
    1 add in trunk

Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
https://bugs.webkit.org/show_bug.cgi?id=167125

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.

New test with limits that run slow and take a reasonable amount of memory
before the change and run fast, using little memory with the change.

Source/JavaScriptCore:

Changed Yarr to handle nested parenthesized subexpressions where the minimum count is
not 0 directly in the Yarr interpreter. Previously we'd factor an expression like
(a|b)+ into (a|b)(a|b)* with special handling for captures. This factoring was done
using a deep copy that doubled the size of the resulting expresion for each nested
parenthesized subexpression. Now the Yarr interpreter can directly process a regexp
like (a|b){2,42}.

The parser will allow one level of nested, non-zero minimum, counted parenthesis using
the old copy method. After one level, it will generate parenthesis terms with a non-zero
minimum. Such an expression wasn't handled by the Yarr JIT before the change, so this
change isn't a performance regression.

Added a minimum count to the YarrPattern and ByteTerm classes, and then factored that
minimum into the interpreter. A non-zero minimum is only handled by the Yarr interpreter.
If the Yarr JIT see such a term, it punts back to the interpreter.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
(JSC::Yarr::Interpreter::matchCharacterClass):
(JSC::Yarr::Interpreter::backtrackCharacterClass):
(JSC::Yarr::Interpreter::matchBackReference):
(JSC::Yarr::Interpreter::backtrackBackReference):
(JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
(JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
(JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
(JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
(JSC::Yarr::Interpreter::matchParentheses):
(JSC::Yarr::Interpreter::backtrackParentheses):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
(JSC::Yarr::ByteCompiler::atomCharacterClass):
(JSC::Yarr::ByteCompiler::atomBackReference):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):

  • yarr/YarrInterpreter.h:

(JSC::Yarr::ByteTerm::ByteTerm):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
(JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
(JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
(JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
(JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
(JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
(JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
(JSC::Yarr::YarrGenerator::generateTerm):
(JSC::Yarr::YarrGenerator::backtrackTerm):
(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::backtrack):
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::YarrPatternConstructor::copyTerm):
(JSC::Yarr::YarrPatternConstructor::quantifyAtom):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPattern::YarrPattern):

  • yarr/YarrPattern.h:

(JSC::Yarr::PatternTerm::PatternTerm):
(JSC::Yarr::PatternTerm::quantify):
(JSC::Yarr::YarrPattern::reset):

5:21 PM Changeset in webkit [210836] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

WidthCache should be off while under memory pressure.
<https://webkit.org/b/167141>

Reviewed by Antti Koivisto.

Since we empty all the WidthCaches when we come under memory pressure, we shouldn't
repopulate them until the pressure has gone away.

  • platform/graphics/WidthCache.h:

(WebCore::WidthCache::add):

5:14 PM Changeset in webkit [210835] by Antti Koivisto
  • 35 edits in trunk/Source

Persist derived data
https://bugs.webkit.org/show_bug.cgi?id=167136

Reviewed by Andreas Kling.

Source/WebCore:

  • loader/LoaderStrategy.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didRetrieveDerivedDataFromCache):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::options):

  • loader/ResourceLoaderOptions.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didRetrieveDerivedDataFromCache):

  • loader/SubresourceLoader.h:
  • loader/cache/CachedResource.h:

(WebCore::CachedResource::didRetrieveDerivedDataFromCache):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::defaultCachedResourceOptions):

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::cacheBodyKey):
(WebCore::ResourceResponseBase::setCacheBodyKey):
(WebCore::ResourceResponseBase::encode):
(WebCore::ResourceResponseBase::decode):

Source/WebKit:

  • WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKit2:

Add a mechanism for storing arbitrary data into disk cache.

From WebCore level data can be stored using

loaderStrategy()->storeDerivedDataToCache(key, partition, type, data);

The data is keyed with the body hash of a network resource. It can be retrieved along
with the resource by specifying the type in ResourceLoaderOptions. If a related data
blob is found it will be deliver via CachedResource::didRetrieveDerivedDataFromCache()
callback.

This patch adds the mechanism but doesn't yet use it for anything.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

Look for related resources to return if needed.

(WebKit::NetworkResourceLoader::sendResultForCacheEntry):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::resourceType):

(WebKit::NetworkCache::Cache::retrieveData):

(WebKit::NetworkCache::Cache::storeData):
(WebKit::NetworkCache::Cache::makeCacheKey): Deleted.

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheKey.cpp:

(WebKit::NetworkCache::Key::Key):

  • NetworkProcess/cache/NetworkCacheKey.h:

(WebKit::NetworkCache::DataKey::encode):
(WebKit::NetworkCache::DataKey::decode):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::traverse):

  • NetworkProcess/cache/NetworkCacheStorage.h:

Return body hash with the Record.

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):

  • Platform/IPC/ArgumentCoders.cpp:

(IPC::ArgumentCoder<SHA1::Digest>::encode):
(IPC::ArgumentCoder<SHA1::Digest>::decode):

  • Platform/IPC/ArgumentCoders.h:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::storeDerivedDataToCache):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didRetrieveDerivedData):

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
4:42 PM Changeset in webkit [210834] by commit-queue@webkit.org
  • 213 edits
    4 copies
    10 adds in trunk

[Modern Media Controls] Turn modern media controls on by default
https://bugs.webkit.org/show_bug.cgi?id=165668

Patch by Antoine Quint <Antoine Quint> on 2017-01-17
Reviewed by Dean Jackson.

Source/WebCore:

Tests: media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html

media/modern-media-controls/pip-support/ipad/pip-support-enabled.html
media/modern-media-controls/pip-support/ipad/pip-support-tap.html
media/modern-media-controls/placard-support/ipad/placard-support-pip.html
media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html

Fix an error which may be triggered prior to Sierra where we would assume the presentation
mode API was avaiable when it might not be, which caused a few tests to fail.

  • Modules/modern-media-controls/media/pip-support.js:

(PiPSupport.prototype.syncControl):
(PiPSupport):

Source/WebKit/mac:

Enabled modern media controls by default in WK1.

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Source/WebKit2:

Use DEFAULT_EXPERIMENTAL_FEATURES_ENABLED as the default value for modern media controls, which is true.

  • Shared/WebPreferencesDefinitions.h:

Tools:

Enabled modern media controls by default in test runners.

  • DumpRenderTree/TestOptions.h:
  • WebKitTestRunner/TestOptions.h:

LayoutTests:

Turn modern media controls off for a majority of pre-existing tests that made assumptions on the implementation
of media controls.

For tests designed for modern media controls, we don't need to opt out since modern media controls are now on
by default, and we turn them back on since they were skipped. But we make these tests more resilient by:

  1. adding iPad-specific tests
  2. adding platform-agnostic ways to press an element, using either eventSender or uiController
  3. checking that elements that are sized asynchronously are indeed sized before making assumptions to that effect
  4. ensuring that we don't have additional scheduler.frameDidFire callbacks after we no longer need them
  • TestExpectations:
  • accessibility/mac/video-tag-hit-test.html:
  • accessibility/mac/video-volume-slider-accessibility.html:
  • accessibility/media-element.html:
  • accessibility/media-emits-object-replacement.html:
  • compositing/video/poster-expected.html:
  • compositing/video/poster.html:
  • fast/hidpi/video-controls-in-hidpi.html:
  • fast/layers/video-layer.html:
  • fullscreen/video-controls-drag.html:
  • fullscreen/video-controls-override.html:
  • fullscreen/video-controls-rtl.html:
  • fullscreen/video-controls-timeline.html:
  • http/tests/media/hls/video-controls-live-stream.html:
  • http/tests/media/hls/video-duration-accessibility.html:
  • http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html:
  • http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html:
  • http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html:
  • http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html:
  • media/accessibility-closed-captions-has-aria-owns.html:
  • media/adopt-node-crash.html:
  • media/airplay-autoplay.html:
  • media/audio-as-video-fullscreen.html:
  • media/audio-controls-do-not-fade-out.html:
  • media/audio-controls-rendering.html:
  • media/audio-controls-timeline-in-media-document.html:
  • media/audio-delete-while-slider-thumb-clicked.html:
  • media/audio-repaint.html:
  • media/click-placeholder-not-pausing.html:
  • media/click-volume-bar-not-pausing.html:
  • media/controls-after-reload.html:
  • media/controls-drag-timebar.html:
  • media/controls-right-click-on-timebar.html:
  • media/controls-strict.html:
  • media/controls-styling.html:
  • media/controls-without-preload.html:
  • media/controls/airplay-controls.html:
  • media/controls/airplay-picker.html:
  • media/controls/basic.html:
  • media/controls/elementOrder.html:
  • media/controls/forced-tracks-only.html:
  • media/controls/fullscreen-button-inline-layout.html:
  • media/controls/inline-elements-dropoff-order.html:
  • media/controls/picture-in-picture.html:
  • media/controls/pip-placeholder-without-video-controls.html:
  • media/controls/showControlsButton.html:
  • media/controls/statusDisplay.html:
  • media/controls/statusDisplayBad.html:
  • media/controls/track-menu.html:
  • media/mac/controls-panel-not-clipped-out-expected.html:
  • media/mac/controls-panel-not-clipped-out.html:
  • media/media-captions-no-controls.html:
  • media/media-controller-drag-crash.html:
  • media/media-controls-accessibility.html:
  • media/media-controls-cancel-events.html:
  • media/media-controls-clone.html:
  • media/media-controls-drag-timeline-set-controls-property.html:
  • media/media-controls-timeline-updates-after-playing.html:
  • media/media-controls-timeline-updates-when-hovered.html:
  • media/media-controls-timeline-updates.html:
  • media/media-document-audio-controls-visible.html:
  • media/media-document-audio-repaint.html:
  • media/media-fullscreen-return-to-inline.html:
  • media/modern-media-controls/airplay-button/airplay-button-on.html:
  • media/modern-media-controls/airplay-button/airplay-button.html:
  • media/modern-media-controls/airplay-placard/airplay-placard-text-section.html:
  • media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
  • media/modern-media-controls/audio/audio-controls-buttons.html:
  • media/modern-media-controls/audio/audio-controls-metrics.html:
  • media/modern-media-controls/button/button.html:
  • media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
  • media/modern-media-controls/forward-button/forward-button.html:
  • media/modern-media-controls/fullscreen-button/fullscreen-button.html:
  • media/modern-media-controls/fullscreen-support/fullscreen-support-click.html:
  • media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap-expected.txt: Added.
  • media/modern-media-controls/fullscreen-support/ipad/fullscreen-support-tap.html: Added.
  • media/modern-media-controls/icon-button/icon-button-active-state.html:
  • media/modern-media-controls/icon-button/icon-button-on.html:
  • media/modern-media-controls/icon-button/icon-button.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-buttons-styles.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-controls-bar-styles.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-time-control-styles.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-dropping-controls.html:
  • media/modern-media-controls/layout-node/addChild.html:
  • media/modern-media-controls/layout-node/children.html:
  • media/modern-media-controls/layout-node/height.html:
  • media/modern-media-controls/layout-node/insertAfter.html:
  • media/modern-media-controls/layout-node/insertBefore.html:
  • media/modern-media-controls/layout-node/node-made-dirty-during-layout.html:
  • media/modern-media-controls/layout-node/remove.html:
  • media/modern-media-controls/layout-node/removeChild.html:
  • media/modern-media-controls/layout-node/subclassing.html:
  • media/modern-media-controls/layout-node/visible.html:
  • media/modern-media-controls/layout-node/width.html:
  • media/modern-media-controls/layout-node/x.html:
  • media/modern-media-controls/layout-node/y.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-containers-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-controls-bar-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-right-container-margin.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html:
  • media/modern-media-controls/media-controller/media-controller-auto-hide.html:
  • media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html:
  • media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html:
  • media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html:
  • media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html:
  • media/modern-media-controls/media-controller/media-controller-resize.html:
  • media/modern-media-controls/media-controller/media-controller-scale-factor.html:
  • media/modern-media-controls/media-controller/media-controller-single-container.html:
  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/pip-button/pip-button.html:
  • media/modern-media-controls/pip-placard/pip-placard-text-section.html:
  • media/modern-media-controls/pip-support/ipad/pip-support-enabled-expected.txt: Added.
  • media/modern-media-controls/pip-support/ipad/pip-support-enabled.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled.html.
  • media/modern-media-controls/pip-support/ipad/pip-support-tap-expected.txt: Added.
  • media/modern-media-controls/pip-support/ipad/pip-support-tap.html: Copied from LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html.
  • media/modern-media-controls/pip-support/pip-support-click.html:
  • media/modern-media-controls/pip-support/pip-support-enabled.html:
  • media/modern-media-controls/placard-support/ipad/placard-support-pip-expected.txt: Copied from LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt.
  • media/modern-media-controls/placard-support/ipad/placard-support-pip.html: Added.
  • media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
  • media/modern-media-controls/play-pause-button/play-pause-button.html:
  • media/modern-media-controls/playback-support/playback-support-button-click-expected.txt:
  • media/modern-media-controls/playback-support/playback-support-button-click.html:
  • media/modern-media-controls/resources/media-controls-utils.js:

(pressOnElement):
(finishMediaControlsTest):

  • media/modern-media-controls/rewind-button/rewind-button.html:
  • media/modern-media-controls/scheduler/not-reentrant.html:
  • media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html:
  • media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag-expected.txt: Copied from LayoutTests/media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt.
  • media/modern-media-controls/scrubber-support/ipad/scrubber-support-drag.html: Added.
  • media/modern-media-controls/scrubber-support/scrubber-support-click.html:
  • media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt:
  • media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
  • media/modern-media-controls/seek-backward-support/seek-backward-support.html:
  • media/modern-media-controls/seek-forward-support/seek-forward-support.html:
  • media/modern-media-controls/skip-back-button/skip-back-button.html:
  • media/modern-media-controls/slider/slider-fill.html:
  • media/modern-media-controls/slider/slider-styles.html:
  • media/modern-media-controls/start-support/start-support-click-to-start-expected.txt:
  • media/modern-media-controls/start-support/start-support-click-to-start.html:
  • media/modern-media-controls/status-label/status-label-font.html:
  • media/modern-media-controls/status-label/status-label-text-selection.html:
  • media/modern-media-controls/status-label/status-label.html:
  • media/modern-media-controls/time-label/time-label.html:
  • media/modern-media-controls/tracks-button/tracks-button.html:
  • media/modern-media-controls/tracks-panel/tracks-panel-right-x.html:
  • media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html:
  • media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:
  • media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html:
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls-expected.txt:
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html:
  • media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html:
  • media/modern-media-controls/volume-slider/volume-slider-value.html:
  • media/modern-media-controls/volume-support/volume-support-click.html:
  • media/modern-media-controls/volume-support/volume-support-drag.html:
  • media/nodesFromRect-shadowContent.html:
  • media/progress-events-generated-correctly.html:
  • media/require-user-gesture-to-load-video.html:
  • media/tab-focus-inside-media-elements.html:
  • media/track/track-cue-rendering-horizontal.html:
  • media/track/track-cue-rendering-vertical.html:
  • media/track/track-cues-cuechange.html:
  • media/track/track-cues-enter-exit.html:
  • media/track/track-in-band-duplicate-tracks-when-source-changes.html:
  • media/track/track-manual-mode.html:
  • media/video-controls-audiotracks-trackmenu.html:
  • media/video-controls-captions-trackmenu-localized.html:
  • media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html:
  • media/video-controls-captions-trackmenu-sorted.html:
  • media/video-controls-captions-trackmenu.html:
  • media/video-controls-drop-and-restore-timeline.html:
  • media/video-controls-in-media-document.html:
  • media/video-controls-no-display-with-text-track.html:
  • media/video-controls-rendering.html:
  • media/video-controls-show-on-kb-or-ax-event.html:
  • media/video-controls-toggling.html:
  • media/video-controls-transformed.html:
  • media/video-controls-visible-audio-only.html:
  • media/video-controls-visible-exiting-fullscreen.html:
  • media/video-controls-zoomed.html:
  • media/video-display-toggle.html:
  • media/video-empty-source.html:
  • media/video-fullscreeen-only-controls.html:
  • media/video-fullscreeen-only-playback.html:
  • media/video-initially-hidden-volume-slider-up.html:
  • media/video-no-audio.html:
  • media/video-play-audio-require-user-gesture.html:
  • media/video-play-require-user-gesture.html:
  • media/video-trackmenu-selection.html:
  • media/video-volume-slider-drag.html:
  • media/video-volume-slider.html:
  • media/video-zoom-controls.html:
  • media/volume-bar-empty-when-muted.html:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/ios-simulator/media/video-play-glyph-composited-outside-overflow-scrolling-touch-container.html:
  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
4:14 PM Changeset in webkit [210833] by Chris Dumez
  • 13 edits
    2 adds in trunk

Document title changed twice when setting document.title
https://bugs.webkit.org/show_bug.cgi?id=167065

Reviewed by Darin Adler.

Source/WebCore:

Setting document.title would call the document title to be set twice
first to the empty string and then to the new title. This is because
setting document.title is equivalent to setting title.textContent [1],
which first removes all children and then inserts the new one [2], and
we call updateTitle() for each step. This is because
HTMLTitleElement::childrenChanged() is called twice (once for the
removal of the existing children, and a second time when the new child
is inserted), and childrenChanged() calls document::titleElementTextChanged().

Since no JS event is fired between those 2 mutations, it is safe (i.e. non
observable from JS) to update the title only once after both mutations have
taken place. To achieve this, add a new replaceAllChildren() function
which implements [3]. This replaceAllChildren() has the benefit of
calling ContainerNode::childrenChanged() only once, after both mutations
have taken place, thus avoiding unnecessary work. This fixes the issue
when setting the title and should be performance-positive in general.

[1] https://html.spec.whatwg.org/#document.title
[2] https://dom.spec.whatwg.org/#dom-node-textcontent
[3] https://dom.spec.whatwg.org/#concept-node-replace-all

Test: fast/dom/Node/textContent-mutationEvents.html

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::notifyChildInserted):
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::replaceAllChildren):
(WebCore::ContainerNode::rebuildSVGExtensionsElementsIfNecessary):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::updateTreeAfterInsertion):

  • dom/ContainerNode.h:

Add new replaceAllChildrenWith() function which implements [3]
in a way that calls ContainerNode::childrenChanged() only once.

  • dom/Element.cpp:

(WebCore::Element::childrenChanged):
Deal with new AllChildrenReplaced ChildChange type.

  • dom/Node.cpp:

(WebCore::Node::setTextContent):
Call replaceAllChildrenWith() as per the specification:

  • dom/Range.cpp:

(WebCore::Range::surroundContents):
Call replaceAllChildrenWith(nullptr) as per the specification:

Tools:

Add WebKit2GTK API test that was written by Michael Catanzaro.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:

(testWebViewTitleChange):
(beforeAll):

LayoutTests:

  • fast/dom/Node/textContent-mutationEvents-expected.txt: Added.
  • fast/dom/Node/textContent-mutationEvents.html: Added.

Add layout test to make sure that the mutation events are properly
fired when setting Node.textContent.

  • fast/dom/title-text-property-2-expected.txt:
  • fast/dom/title-text-property-2.html:
  • fast/dom/title-text-property-expected.txt:
  • http/tests/globalhistory/history-delegate-basic-title-expected.txt:

Update / rebaseline existing tests now that we no longer temporarily
reset document.title to the empty string when overriding the title.

4:11 PM Changeset in webkit [210832] by commit-queue@webkit.org
  • 19 edits in trunk

ENABLE(USER_TIMING) Not Defined for Apple Windows or OS X Ports
https://bugs.webkit.org/show_bug.cgi?id=116551
<rdar://problem/13949830>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-17
Reviewed by Alex Christensen.

.:

  • Source/cmake/OptionsEfl.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:

Remove stale RESOURCE_TIMING references which are now a runtime enabled feature
that is part of the existing WEB_TIMING feature.

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
4:02 PM Changeset in webkit [210831] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Editing nested RTL-LTR content makes the process unresponsive.
https://bugs.webkit.org/show_bug.cgi?id=167140
rdar://problem/29057611

Reviewed by Ryosuke Niwa.

Source/WebCore:

Break out of the loop if we keep coming back to the same position.
This is a workaround for the underlying editing/position bug -> webkit.org/b/167138.

Test: editing/rtl-to-ltr-editing-word-move-spin.html

  • editing/VisibleUnits.cpp:

(WebCore::visualWordPosition):

LayoutTests:

  • editing/rtl-to-ltr-editing-word-move-spin-expected.txt: Added.
  • editing/rtl-to-ltr-editing-word-move-spin.html: Added.
3:57 PM Changeset in webkit [210830] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking http/tests/media/hls/hls-video-resize.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=162507

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
3:52 PM Changeset in webkit [210829] by fpizlo@apple.com
  • 60 edits in trunk/Source

JSCell::classInfo() shouldn't have a bunch of mitigations for being called during destruction
https://bugs.webkit.org/show_bug.cgi?id=167066

Reviewed by Keith Miller and Michael Saboff.
Source/JavaScriptCore:


This reduces the size of JSCell::classInfo() by half and removes some checks that
this function previously had to do in case it was called from destructors.

I changed all of the destructors so that they don't call JSCell::classInfo() and I
added an assertion to JSCell::classInfo() to catch cases where someone called it
from a destructor accidentally.

This means that we only have one place in destruction that needs to know the class:
the sweeper's call to the destructor.

One of the trickiest outcomes of this is the need to support inherits() tests in
JSObjectGetPrivate(), when it is called from the destructor callback on the object
being destructed. JSObjectGetPrivate() is undefined behavior anyway if you use it
on any dead-but-not-destructed object other than the one being destructed right
now. The purpose of the inherits() tests is to distinguish between different kinds
of CallbackObjects, which may have different kinds of base classes. I think that
this was always subtly wrong - for example, if the object being destructed is a
JSGlobalObject then it's not a DestructibleObject, is not in a destructor block,
but does not have an immortal Structure - so classInfo() is not valid. This fixes
the issue by having ~JSCallbackObject know its classInfo. It now stashes its
classInfo in VM so that JSObjectGetPrivate can use that classInfo if it detects
that it's being used on a currently-destructing object.

That was the only really weird part of this patch. The rest is mostly removing
illegal uses of jsCast<> in destructors. There were a few other genuine uses of
classInfo() but they were in code that already knew how to get its classInfo()
using other means:

  • You can still say structure()->classInfo(), and I use this form in code that knows that its StructureIsImmortal.


  • You can use this->classInfo() if it's overridden, like in subclasses of JSDestructibleObject.


Rolling this back in because I think I fixed the crashes.

  • API/JSAPIWrapperObject.mm:

(JSAPIWrapperObjectHandleOwner::finalize):

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::~JSCallbackObject):
(JSC::JSCallbackObject<Parent>::init):

  • API/JSObjectRef.cpp:

(classInfoPrivate):
(JSObjectGetPrivate):
(JSObjectSetPrivate):

  • bytecode/EvalCodeBlock.cpp:

(JSC::EvalCodeBlock::destroy):

  • bytecode/FunctionCodeBlock.cpp:

(JSC::FunctionCodeBlock::destroy):

  • bytecode/ModuleProgramCodeBlock.cpp:

(JSC::ModuleProgramCodeBlock::destroy):

  • bytecode/ProgramCodeBlock.cpp:

(JSC::ProgramCodeBlock::destroy):

  • bytecode/UnlinkedEvalCodeBlock.cpp:

(JSC::UnlinkedEvalCodeBlock::destroy):

  • bytecode/UnlinkedFunctionCodeBlock.cpp:

(JSC::UnlinkedFunctionCodeBlock::destroy):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::destroy):

  • bytecode/UnlinkedModuleProgramCodeBlock.cpp:

(JSC::UnlinkedModuleProgramCodeBlock::destroy):

  • bytecode/UnlinkedProgramCodeBlock.cpp:

(JSC::UnlinkedProgramCodeBlock::destroy):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::lastChanceToFinalize):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::allocateSlowCaseImpl):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::sweep):

  • jit/JITThunks.cpp:

(JSC::JITThunks::finalize):

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::destroy):

  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::clearCode):

  • runtime/JSCellInlines.h:

(JSC::JSCell::classInfo):
(JSC::JSCell::callDestructor):

  • runtime/JSLock.h:

(JSC::JSLock::ownerThread):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::destroy):

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::destroy):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::destroy):

  • runtime/JSSegmentedVariableObject.h:
  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::destroy):

  • runtime/VM.h:
  • wasm/js/JSWebAssemblyCallee.cpp:

(JSC::JSWebAssemblyCallee::destroy):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::destroy):

  • wasm/js/WebAssemblyToJSCallee.cpp:

(JSC::WebAssemblyToJSCallee::WebAssemblyToJSCallee):
(JSC::WebAssemblyToJSCallee::destroy):

Source/WebCore:

No new tests because no new behavior.

It's now necessary to avoid jsCast in destructors and finalizers. This was an easy
rule to introduce because this used to always be the rule.

  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::JSDeprecatedCSSOMValueOwner::finalize):

  • bindings/js/JSDOMIterator.h:

(WebCore::IteratorTraits>::destroy):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

Source/WebKit2:


Just remove now-erroneous use of jsCast<>.

  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:

(WebKit::NPRuntimeObjectMap::finalize):

3:50 PM Changeset in webkit [210828] by commit-queue@webkit.org
  • 170 edits in trunk/Source

Remove unnecessary includes
https://bugs.webkit.org/show_bug.cgi?id=167114

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-17
Reviewed by Alex Christensen.
Source/WebKit2:

  • WebProcess/WebPage/ios/WebPageIOS.mm:
3:33 PM Changeset in webkit [210827] by beidson@apple.com
  • 8 edits in trunk

An update to one gamepad's values should only change that gamepad's modified timestamp.
<rdar://problem/28620865> and https://bugs.webkit.org/show_bug.cgi?id=167139

Reviewed by Andy Estes.

Source/WebKit2:

Track the lastModifiedTime for a gamepad in the UI process, and pass it along to web processes.

  • Shared/Gamepad/GamepadData.cpp:

(WebKit::GamepadData::GamepadData):
(WebKit::GamepadData::encode):
(WebKit::GamepadData::decode):

  • Shared/Gamepad/GamepadData.h:

(WebKit::GamepadData::lastUpdateTime):

  • UIProcess/Gamepad/UIGamepad.cpp:

(WebKit::UIGamepad::UIGamepad):
(WebKit::UIGamepad::updateFromPlatformGamepad):
(WebKit::UIGamepad::condensedGamepadData):
(WebKit::UIGamepad::fullGamepadData):

  • UIProcess/Gamepad/UIGamepad.h:
  • WebProcess/Gamepad/WebGamepad.cpp:

(WebKit::WebGamepad::updateValues):

LayoutTests:

  • gamepad/gamepad-timestamp.html:
3:24 PM Changeset in webkit [210826] by akling@apple.com
  • 4 edits in trunk/Source/WebCore

Kill the presentation attribute cache.
<https://webkit.org/b/119542>

Reviewed by Antti Koivisto.

This cache was added to placate some old page cycler test that was measuring load times
on pages captured in 2000. That content is not super relevant anymore, and I think
we can live without this cache.

  • dom/StyledElement.cpp:

(WebCore::StyledElement::rebuildPresentationAttributeStyle):
(WebCore::presentationAttributeCache): Deleted.
(WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner): Deleted.
(WebCore::PresentationAttributeCacheCleaner::didHitPresentationAttributeCache): Deleted.
(WebCore::PresentationAttributeCacheCleaner::cleanCache): Deleted.
(WebCore::presentationAttributeCacheCleaner): Deleted.
(WebCore::StyledElement::clearPresentationAttributeCache): Deleted.
(WebCore::attributeNameSort): Deleted.
(WebCore::StyledElement::makePresentationAttributeCacheKey): Deleted.
(WebCore::computePresentationAttributeCacheHash): Deleted.

  • dom/StyledElement.h:
  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):

12:57 PM Changeset in webkit [210825] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

It's not possible to perform a POST request with HTTPBody content in a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=167131
rdar://problem/20464240

Reviewed by Beth Dakin.

Encode/decode the form data if necessary.

  • Shared/LoadParameters.cpp:

(WebKit::LoadParameters::encode):
(WebKit::LoadParameters::decode):

12:25 PM Changeset in webkit [210824] by fpizlo@apple.com
  • 35 edits in trunk/Source

Unreviewed, roll out http://trac.webkit.org/changeset/210821
It was causing crashes.

Source/JavaScriptCore:

  • API/JSAPIWrapperObject.mm:

(JSAPIWrapperObjectHandleOwner::finalize):

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::~JSCallbackObject):
(JSC::JSCallbackObject<Parent>::init):

  • API/JSObjectRef.cpp:

(JSObjectGetPrivate):
(JSObjectSetPrivate):
(classInfoPrivate): Deleted.

  • bytecode/EvalCodeBlock.cpp:

(JSC::EvalCodeBlock::destroy):

  • bytecode/FunctionCodeBlock.cpp:

(JSC::FunctionCodeBlock::destroy):

  • bytecode/ModuleProgramCodeBlock.cpp:

(JSC::ModuleProgramCodeBlock::destroy):

  • bytecode/ProgramCodeBlock.cpp:

(JSC::ProgramCodeBlock::destroy):

  • bytecode/UnlinkedEvalCodeBlock.cpp:

(JSC::UnlinkedEvalCodeBlock::destroy):

  • bytecode/UnlinkedFunctionCodeBlock.cpp:

(JSC::UnlinkedFunctionCodeBlock::destroy):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::destroy):

  • bytecode/UnlinkedModuleProgramCodeBlock.cpp:

(JSC::UnlinkedModuleProgramCodeBlock::destroy):

  • bytecode/UnlinkedProgramCodeBlock.cpp:

(JSC::UnlinkedProgramCodeBlock::destroy):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::lastChanceToFinalize):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::allocateSlowCaseImpl):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::sweep):

  • jit/JITThunks.cpp:

(JSC::JITThunks::finalize):

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::destroy):

  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::clearCode):

  • runtime/JSCellInlines.h:

(JSC::JSCell::classInfo):
(JSC::JSCell::callDestructor):

  • runtime/JSLock.h:

(JSC::JSLock::exclusiveThread):
(JSC::JSLock::ownerThread): Deleted.

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::destroy):

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::destroy):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::destroy):

  • runtime/JSSegmentedVariableObject.h:
  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::destroy):

  • runtime/VM.h:
  • wasm/js/JSWebAssemblyCallee.cpp:

(JSC::JSWebAssemblyCallee::destroy):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::destroy):

  • wasm/js/WebAssemblyToJSCallee.cpp:

(JSC::WebAssemblyToJSCallee::WebAssemblyToJSCallee):
(JSC::WebAssemblyToJSCallee::destroy):

Source/WebCore:

  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::JSDeprecatedCSSOMValueOwner::finalize):

  • bindings/js/JSDOMIterator.h:

(WebCore::IteratorTraits>::destroy):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

12:04 PM Changeset in webkit [210823] by achristensen@apple.com
  • 208 edits
    104 adds in trunk/LayoutTests

LayoutTests/imported/w3c:

Refresh WPT tests up to 73f4ad361ca56d890b5f46d62c3bc84371a77e10

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

Patch by Youenn Fablet <youennf@gmail.com> on 2017-01-17
Reviewed by Alex Christensen.

Refreshing tests but not WPT dependencies.

  • resources/ImportExpectations:
  • resources/TestRepositories:
  • resources/resource-files.json:
  • web-platform-tests/IndexedDB/idbindex-rename-abort.html:
  • web-platform-tests/IndexedDB/idbindex-rename-errors.html:
  • web-platform-tests/IndexedDB/idbindex-rename.html:
  • web-platform-tests/IndexedDB/idbkeyrange-expected.txt:
  • web-platform-tests/IndexedDB/idbkeyrange.htm:
  • web-platform-tests/IndexedDB/idbobjectstore-rename-abort.html:
  • web-platform-tests/IndexedDB/idbobjectstore-rename-errors.html:
  • web-platform-tests/IndexedDB/idbobjectstore-rename-store.html:
  • web-platform-tests/IndexedDB/idbrequest_error-expected.txt: Added.
  • web-platform-tests/IndexedDB/idbrequest_error.html: Added.
  • web-platform-tests/IndexedDB/idbrequest_result-expected.txt: Added.
  • web-platform-tests/IndexedDB/idbrequest_result.html: Added.
  • web-platform-tests/IndexedDB/name-scopes.html:
  • web-platform-tests/IndexedDB/support-promises.js:

(databaseName):
(requestWatcher):
(migrateDatabase):
(migrateNamedDatabase):
(createNamedDatabase):
(openNamedDatabase):
(const.createBooksStore):
(createNotBooksStore):
(checkStoreIndexes):
(checkStoreGenerator):

  • web-platform-tests/IndexedDB/transaction-abort-generator-revert.html:
  • web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert.html:
  • web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert.html:
  • web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert.html:
  • web-platform-tests/IndexedDB/upgrade-transaction-lifecycle-backend-aborted-expected.txt: Added.
  • web-platform-tests/IndexedDB/upgrade-transaction-lifecycle-backend-aborted.html: Added.
  • web-platform-tests/IndexedDB/upgrade-transaction-lifecycle-committed-expected.txt: Added.
  • web-platform-tests/IndexedDB/upgrade-transaction-lifecycle-committed.html: Added.
  • web-platform-tests/IndexedDB/upgrade-transaction-lifecycle-user-aborted-expected.txt: Added.
  • web-platform-tests/IndexedDB/upgrade-transaction-lifecycle-user-aborted.html: Added.
  • web-platform-tests/IndexedDB/w3c-import.log:
  • web-platform-tests/LICENSE.md: Added.
  • web-platform-tests/README.md:
  • web-platform-tests/XMLHttpRequest/OWNERS:
  • web-platform-tests/XMLHttpRequest/open-url-multi-window-6.htm:
  • web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-event-order.js:

(getNextEvent):
(global.assert_xhr_event_order_matches):

  • web-platform-tests/check_stability.py:

(GitHub.init):
(GitHub.patch):
(GitHub.post_comment):
(Firefox.install):
(Firefox._latest_geckodriver_version):
(call):
(setup_github_logging):
(get_sha1):
(get_affected_testfiles):
(write_inconsistent):
(write_results):
(main):

  • web-platform-tests/ci_built_diff.sh: Added.
  • web-platform-tests/common/redirect-opt-in.py: Added.

(main):

  • web-platform-tests/common/w3c-import.log:
  • web-platform-tests/custom-elements/parser/parser-uses-constructed-element-expected.txt:
  • web-platform-tests/custom-elements/parser/parser-uses-constructed-element.html:
  • web-platform-tests/dom/OWNERS:
  • web-platform-tests/dom/events/w3c-import.log:
  • web-platform-tests/dom/historical-expected.txt:
  • web-platform-tests/dom/historical.html:
  • web-platform-tests/dom/nodes/Node-cloneNode-expected.txt:
  • web-platform-tests/dom/nodes/Node-cloneNode.html:
  • web-platform-tests/domparsing/w3c-import.log:
  • web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys.html:
  • web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession.html:
  • web-platform-tests/encrypted-media/content/video_512x288_h264-360k_multikey_key1_dashinit.mp4: Added.
  • web-platform-tests/encrypted-media/drm-events.html:
  • web-platform-tests/encrypted-media/drm-expiration.html:
  • web-platform-tests/encrypted-media/drm-keystatuses-multiple-sessions.html:
  • web-platform-tests/encrypted-media/drm-keystatuses.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-destroy-persistent-license.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-persistent-license-events.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-persistent-license.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-persistent-usage-record-events.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-retrieve-persistent-usage-record.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-clear-encrypted.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-encrypted-clear.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-multikey.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-multisession.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-setMediaKeys-after-src.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-setMediaKeys-after-update.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-setMediaKeys-immediately.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-setMediaKeys-onencrypted.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-two-videos.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary-waitingforkey.html:
  • web-platform-tests/encrypted-media/drm-mp4-playback-temporary.html:
  • web-platform-tests/encrypted-media/drm-mp4-requestmediakeysystemaccess.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys-again-after-playback.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys-again-after-resetting-src.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys-at-same-time.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys-multiple-times-with-different-mediakeys.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys-to-multiple-video-elements.html:
  • web-platform-tests/encrypted-media/drm-mp4-setmediakeys.html:
  • web-platform-tests/encrypted-media/drm-mp4-waiting-for-a-key.html:
  • web-platform-tests/encrypted-media/drm-not-callable-after-createsession.html:
  • web-platform-tests/encrypted-media/drm-temporary-license-type.html:
  • web-platform-tests/fetch/api/basic/request-headers-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers.js:

(checkContentType):
(requestOriginHeader):

  • web-platform-tests/fetch/api/basic/request-upload-expected.txt:
  • web-platform-tests/fetch/api/basic/request-upload-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/request-upload.js:
  • web-platform-tests/fetch/api/headers/headers-basic-expected.txt:
  • web-platform-tests/fetch/api/headers/headers-basic.html:
  • web-platform-tests/fetch/api/headers/headers-idl.html:
  • web-platform-tests/fetch/api/redirect/redirect-count-worker.html:
  • web-platform-tests/fetch/api/redirect/redirect-count.html:
  • web-platform-tests/fetch/api/redirect/redirect-count.js:

(redirectCount):

  • web-platform-tests/fetch/api/redirect/redirect-referrer-expected.txt: Added.
  • web-platform-tests/fetch/api/redirect/redirect-referrer-worker-expected.txt: Added.
  • web-platform-tests/fetch/api/redirect/redirect-referrer-worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker.html.
  • web-platform-tests/fetch/api/redirect/redirect-referrer.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count.html.
  • web-platform-tests/fetch/api/redirect/redirect-referrer.js: Added.

(testReferrerAfterRedirection):

  • web-platform-tests/fetch/api/redirect/w3c-import.log:
  • web-platform-tests/fetch/api/request/multi-globals/current/current.html:
  • web-platform-tests/fetch/api/request/multi-globals/incumbent/incumbent.html:
  • web-platform-tests/fetch/api/request/multi-globals/url-parsing.html:
  • web-platform-tests/fetch/api/request/request-bad-port-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-bad-port.html: Added.
  • web-platform-tests/fetch/api/request/request-idl.html:
  • web-platform-tests/fetch/api/request/request-init-001.sub-expected.txt:
  • web-platform-tests/fetch/api/request/request-init-001.sub.html:
  • web-platform-tests/fetch/api/request/w3c-import.log:
  • web-platform-tests/fetch/api/resources/redirect.py:

(main):

  • web-platform-tests/fetch/api/response/multi-globals/current/current.html:
  • web-platform-tests/fetch/api/response/multi-globals/incumbent/incumbent.html:
  • web-platform-tests/fetch/api/response/multi-globals/url-parsing.html:
  • web-platform-tests/fetch/api/response/response-consume-expected.txt:
  • web-platform-tests/fetch/api/response/response-consume.html:
  • web-platform-tests/fetch/nosniff/image-expected.txt:
  • web-platform-tests/fetch/nosniff/image.html:
  • web-platform-tests/html/OWNERS:
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/post_name_on_load.html: Added.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/w3c-import.log:
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resume-timer-on-history-back-expected.txt: Added.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resume-timer-on-history-back.html: Added.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/w3c-import.log:
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/resources/a.html: Added.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/resources/b.html: Added.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/resources/c.html: Added.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/resources/w3c-import.log.
  • web-platform-tests/html/browsers/browsing-the-web/history-traversal/w3c-import.log:
  • web-platform-tests/html/browsers/history/the-location-interface/location-pathname-setter-question-mark-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-pathname-setter-question-mark.html: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter.html: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window-expected.txt:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/frame.html:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log:
  • web-platform-tests/html/browsers/origin/cross-origin-objects/win-documentdomain.sub.html:
  • web-platform-tests/html/dom/elements-embedded.js:
  • web-platform-tests/html/dom/elements-metadata.js:
  • web-platform-tests/html/dom/elements-misc.js:
  • web-platform-tests/html/dom/elements-text.js:
  • web-platform-tests/html/dom/elements/elements-in-the-dom/historical-expected.txt: Added.
  • web-platform-tests/html/dom/elements/elements-in-the-dom/historical.html: Added.
  • web-platform-tests/html/dom/elements/elements-in-the-dom/w3c-import.log:
  • web-platform-tests/html/dom/interfaces.html:
  • web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • web-platform-tests/html/dom/reflection-metadata-expected.txt:
  • web-platform-tests/html/dom/reflection-misc-expected.txt:
  • web-platform-tests/html/dom/reflection-text-expected.txt:
  • web-platform-tests/html/resources/common.js:
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1-expected.txt: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2-expected.txt: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2.html: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append-expected.txt: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append.html: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents-expected.txt: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents.html: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html: Added.
  • web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/w3c-import.log:
  • web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html:
  • web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html:
  • web-platform-tests/html/semantics/embedded-content/the-canvas-element/toDataURL.nocontext.html:
  • web-platform-tests/html/semantics/embedded-content/the-canvas-element/toDataURL.png.complexcolours.png:
  • web-platform-tests/html/semantics/embedded-content/the-img-element/image.png: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/w3c-import.log:
  • web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:
  • web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate.html:
  • web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt:
  • web-platform-tests/html/semantics/forms/form-control-infrastructure/form.html:
  • web-platform-tests/html/semantics/forms/form-submission-0/submit-entity-body.html:
  • web-platform-tests/html/semantics/forms/form-submission-0/url-encoded-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/url-encoded.html:
  • web-platform-tests/html/semantics/forms/resetting-a-form/reset-form.html:
  • web-platform-tests/html/semantics/forms/the-form-element/form-nameditem-expected.txt:
  • web-platform-tests/html/semantics/forms/the-form-element/form-nameditem.html:
  • web-platform-tests/html/semantics/forms/the-input-element/clone-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/the-input-element/clone.html: Added.
  • web-platform-tests/html/semantics/forms/the-input-element/radio-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/radio.html:
  • web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
  • web-platform-tests/html/semantics/forms/the-label-element/labelable-elements-expected.txt:
  • web-platform-tests/html/semantics/forms/the-label-element/labelable-elements.html:
  • web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/the-select-element/select-validity.html: Added.
  • web-platform-tests/html/semantics/forms/the-select-element/select-value-expected.txt: Added.
  • web-platform-tests/html/semantics/forms/the-select-element/select-value.html: Added.
  • web-platform-tests/html/semantics/forms/the-select-element/w3c-import.log:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html:
  • web-platform-tests/html/semantics/interfaces-expected.txt:
  • web-platform-tests/html/semantics/interfaces.js:
  • web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant.html:
  • web-platform-tests/html/syntax/parsing/html5lib_entities01-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_entities01.html:
  • web-platform-tests/html/syntax/parsing/html5lib_entities02-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_entities02.html:
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_adoption01-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_adoption01.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_foreign-fragment-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_foreign-fragment.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_math-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_math.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_innerHTML_webkit02.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_isindex-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_isindex.html:
  • web-platform-tests/html/syntax/parsing/html5lib_menuitem-element-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_menuitem-element.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_namespace-sensitivity-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_namespace-sensitivity.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_ruby-expected.txt: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_ruby.html: Added.
  • web-platform-tests/html/syntax/parsing/html5lib_template-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_template.html:
  • web-platform-tests/html/syntax/parsing/html5lib_tests11-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_tests11.html:
  • web-platform-tests/html/syntax/parsing/html5lib_tests19-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_tests19.html:
  • web-platform-tests/html/syntax/parsing/html5lib_tests2-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_tests2.html:
  • web-platform-tests/html/syntax/parsing/html5lib_tests20-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_tests20.html:
  • web-platform-tests/html/syntax/parsing/html5lib_tests25-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_tests25.html:
  • web-platform-tests/html/syntax/parsing/html5lib_tests7-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_tests7.html:
  • web-platform-tests/html/syntax/parsing/html5lib_webkit01-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_webkit01.html:
  • web-platform-tests/html/syntax/parsing/html5lib_webkit02-expected.txt:
  • web-platform-tests/html/syntax/parsing/html5lib_webkit02.html:
  • web-platform-tests/html/syntax/parsing/test.js:

(test_serializer):

  • web-platform-tests/html/syntax/parsing/w3c-import.log:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-onauxclick-expected.txt: Added.
  • web-platform-tests/html/webappapis/scripting/events/event-handler-onauxclick.html: Added.
  • web-platform-tests/html/webappapis/scripting/events/w3c-import.log:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-same-origin-with-hash-expected.txt: Added.
  • web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-same-origin-with-hash.html: Added.
  • web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-same-origin-with-hash-expected.txt: Added.
  • web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-same-origin-with-hash.html: Added.
  • web-platform-tests/html/webappapis/scripting/processing-model-2/w3c-import.log:
  • web-platform-tests/media-source/mediasource-errors.html:
  • web-platform-tests/resource-timing/resource_cached-expected.txt: Added.
  • web-platform-tests/resource-timing/resource_cached.htm: Added.
  • web-platform-tests/resource-timing/resource_connection_reuse-expected.txt: Added.
  • web-platform-tests/resource-timing/resource_connection_reuse.html: Added.
  • web-platform-tests/resource-timing/resource_dynamic_insertion-expected.txt: Added.
  • web-platform-tests/resource-timing/resource_dynamic_insertion.html: Added.
  • web-platform-tests/resource-timing/resources/fake_responses.html: Added.
  • web-platform-tests/resource-timing/resources/fake_responses.py: Added.

(main):

  • web-platform-tests/resource-timing/resources/inject_resource_test.html: Added.
  • web-platform-tests/resource-timing/resources/w3c-import.log:
  • web-platform-tests/resource-timing/resources/webperftestharnessextension.js: Added.

(test_method_exists):
(test_noless_than):
(test_resource_entries):
(performance_entrylist_checker.entry_check):
(performance_entrylist_checker.entrylist_order_check):
(performance_entrylist_checker.entrylist_check):
(performance_entrylist_checker):
(PerformanceContext):
(PerformanceContext.prototype.initialMeasures):
(PerformanceContext.prototype.mark):
(PerformanceContext.prototype.measure):
(PerformanceContext.prototype.clearMarks):
(PerformanceContext.prototype.clearMeasures):
(PerformanceContext.prototype.getEntries):
(PerformanceContext.prototype.getEntriesByType):
(PerformanceContext.prototype.getEntriesByName):
(PerformanceContext.prototype.setResourceTimingBufferSize):
(PerformanceContext.prototype.registerResourceTimingBufferFullCallback):
(PerformanceContext.prototype.clearResourceTimings):

  • web-platform-tests/resource-timing/w3c-import.log:
  • web-platform-tests/shadow-dom/slotchange-event-expected.txt:
  • web-platform-tests/shadow-dom/slotchange-event.html:
  • web-platform-tests/update-built-tests.sh: Added.
  • web-platform-tests/url/OWNERS:
  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml.xhtml:
  • web-platform-tests/url/a-element-origin.html:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml.xhtml:
  • web-platform-tests/url/a-element.html:
  • web-platform-tests/url/setters_tests.json:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-origin-expected.txt:
  • web-platform-tests/url/url-setters-expected.txt:
  • web-platform-tests/url/urlsearchparams-append.html:
  • web-platform-tests/url/urlsearchparams-constructor-expected.txt:
  • web-platform-tests/url/urlsearchparams-constructor.html:
  • web-platform-tests/url/urlsearchparams-delete.html:
  • web-platform-tests/url/urlsearchparams-get.html:
  • web-platform-tests/url/urlsearchparams-getall.html:
  • web-platform-tests/url/urlsearchparams-has.html:
  • web-platform-tests/url/urlsearchparams-set.html:
  • web-platform-tests/url/urlsearchparams-stringifier.html:
  • web-platform-tests/url/urltestdata.json:
  • web-platform-tests/w3c-import.log:
  • web-platform-tests/webrtc/RTCDataChannelEvent-constructor-expected.txt: Added.
  • web-platform-tests/webrtc/RTCDataChannelEvent-constructor.html: Added.
  • web-platform-tests/webrtc/RTCPeerConnectionIceEvent-constructor-expected.txt: Added.
  • web-platform-tests/webrtc/RTCPeerConnectionIceEvent-constructor.html: Added.
  • web-platform-tests/webrtc/datachannel-emptystring.html:
  • web-platform-tests/webrtc/simplecall.html:
  • web-platform-tests/webrtc/w3c-import.log:

LayoutTests:
Refresh WPT tests up to 73f4ad361ca56d890b5f46d62c3bc84371a77e10
https://bugs.webkit.org/show_bug.cgi?id=167105

Patch by Youenn Fablet <youenn@apple.com> on 2017-01-17
Reviewed by Alex Christensen.

Skipping two fetch tests as they reach an ASSERT on debug builds (missing implemented feature).

  • TestExpectations:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-expected.txt: Added.
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-willValidate-expected.txt:
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form-expected.txt.
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements-expected.txt.
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/select-validity-expected.txt: Added.
  • platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interfaces-expected.txt.
  • tests-options.json:
11:24 AM Changeset in webkit [210822] by Joseph Pecoraro
  • 10 edits in trunk/Source

Crash when closing tab with debugger paused
https://bugs.webkit.org/show_bug.cgi?id=161746
<rdar://problem/15607819>

Reviewed by Brian Burg and Brent Fulgham.

Source/WebCore:

  • page/Page.h:

(WebCore::Page::incrementNestedRunLoopCount):
(WebCore::Page::decrementNestedRunLoopCount):
(WebCore::Page::insideNestedRunLoop):
Keep track of whether or not this Page is inside of a nested run loop.
Currently the only nested run loop we know about is EventLoop used
by Web Inspector when debugging JavaScript.

(WebCore::Page::whenUnnested):
Callback that can be called when we are no longer inside of a nested
run loop.

(WebCore::Page::~Page):
Ensure we are not in a known nested run loop when destructing, since
that could be unsafe.

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
Increment and decrement as we go into or leave the nested runloop.

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::disconnectAllFrontends):
Rework destruction to allow disconnectAllFrontends to happen earlier
if necessary. WebKit clients may use this to disconnect remote
frontends when closing a Page.

Source/WebKit/mac:

  • WebView/WebView.mm:

(WebKit::DeferredPageDestructor::createDeferredPageDestructor):
(WebKit::DeferredPageDestructor::DeferredPageDestructor):
(WebKit::DeferredPageDestructor::tryDestruction):
(-[WebView _close]):
Defer destruction of the Page if we are in a nested runloop.

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::DeferredPageDestructor::createDeferredPageDestructor):
(WebKit::DeferredPageDestructor::DeferredPageDestructor):
(WebKit::DeferredPageDestructor::tryDestruction):
(WebKit::WebPage::close):
Defer destruction of the Page and WebPage if we are in a nested runloop.
Also, proactively close all inspector frontends, including remote frontends.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::completeSyntheticClick):
Return early in some cases where a nested run loop may have closed
the WebPage on us while handling JavaScript events.

10:55 AM Changeset in webkit [210821] by fpizlo@apple.com
  • 35 edits in trunk/Source

JSCell::classInfo() shouldn't have a bunch of mitigations for being called during destruction
https://bugs.webkit.org/show_bug.cgi?id=167066

Reviewed by Keith Miller and Michael Saboff.
Source/JavaScriptCore:


This reduces the size of JSCell::classInfo() by half and removes some checks that
this function previously had to do in case it was called from destructors.

I changed all of the destructors so that they don't call JSCell::classInfo() and I
added an assertion to JSCell::classInfo() to catch cases where someone called it
from a destructor accidentally.

This means that we only have one place in destruction that needs to know the class:
the sweeper's call to the destructor.

One of the trickiest outcomes of this is the need to support inherits() tests in
JSObjectGetPrivate(), when it is called from the destructor callback on the object
being destructed. JSObjectGetPrivate() is undefined behavior anyway if you use it
on any dead-but-not-destructed object other than the one being destructed right
now. The purpose of the inherits() tests is to distinguish between different kinds
of CallbackObjects, which may have different kinds of base classes. I think that
this was always subtly wrong - for example, if the object being destructed is a
JSGlobalObject then it's not a DestructibleObject, is not in a destructor block,
but does not have an immortal Structure - so classInfo() is not valid. This fixes
the issue by having ~JSCallbackObject know its classInfo. It now stashes its
classInfo in VM so that JSObjectGetPrivate can use that classInfo if it detects
that it's being used on a currently-destructing object.

That was the only really weird part of this patch. The rest is mostly removing
illegal uses of jsCast<> in destructors. There were a few other genuine uses of
classInfo() but they were in code that already knew how to get its classInfo()
using other means:

  • You can still say structure()->classInfo(), and I use this form in code that knows that its StructureIsImmortal.


  • You can use this->classInfo() if it's overridden, like in subclasses of JSDestructibleObject.
  • API/JSAPIWrapperObject.mm:

(JSAPIWrapperObjectHandleOwner::finalize):

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::~JSCallbackObject):
(JSC::JSCallbackObject<Parent>::init):

  • API/JSObjectRef.cpp:

(classInfoPrivate):
(JSObjectGetPrivate):
(JSObjectSetPrivate):

  • bytecode/EvalCodeBlock.cpp:

(JSC::EvalCodeBlock::destroy):

  • bytecode/FunctionCodeBlock.cpp:

(JSC::FunctionCodeBlock::destroy):

  • bytecode/ModuleProgramCodeBlock.cpp:

(JSC::ModuleProgramCodeBlock::destroy):

  • bytecode/ProgramCodeBlock.cpp:

(JSC::ProgramCodeBlock::destroy):

  • bytecode/UnlinkedEvalCodeBlock.cpp:

(JSC::UnlinkedEvalCodeBlock::destroy):

  • bytecode/UnlinkedFunctionCodeBlock.cpp:

(JSC::UnlinkedFunctionCodeBlock::destroy):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::destroy):

  • bytecode/UnlinkedModuleProgramCodeBlock.cpp:

(JSC::UnlinkedModuleProgramCodeBlock::destroy):

  • bytecode/UnlinkedProgramCodeBlock.cpp:

(JSC::UnlinkedProgramCodeBlock::destroy):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::lastChanceToFinalize):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::allocateSlowCaseImpl):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::sweep):

  • jit/JITThunks.cpp:

(JSC::JITThunks::finalize):

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::destroy):

  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::clearCode):

  • runtime/JSCellInlines.h:

(JSC::JSCell::classInfo):
(JSC::JSCell::callDestructor):

  • runtime/JSLock.h:

(JSC::JSLock::ownerThread):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::destroy):

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::destroy):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::destroy):

  • runtime/JSSegmentedVariableObject.h:
  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::destroy):

  • runtime/VM.h:
  • wasm/js/JSWebAssemblyCallee.cpp:

(JSC::JSWebAssemblyCallee::destroy):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::destroy):

  • wasm/js/WebAssemblyToJSCallee.cpp:

(JSC::WebAssemblyToJSCallee::WebAssemblyToJSCallee):
(JSC::WebAssemblyToJSCallee::destroy):

Source/WebCore:

No new tests because no new behavior.

It's now necessary to avoid jsCast in destructors and finalizers. This was an easy
rule to introduce because this used to always be the rule.

  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::JSDeprecatedCSSOMValueOwner::finalize):

  • bindings/js/JSDOMIterator.h:

(WebCore::IteratorTraits>::destroy):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

10:52 AM Changeset in webkit [210820] by Jonathan Bedard
  • 2 edits in trunk/Tools

'webkit-patch post' no longer works with moved/copied files
https://bugs.webkit.org/show_bug.cgi?id=166914
<rdar://problem/29979707>

Reviewed by Daniel Bates.

SVN 1.9 has a bug where when a file has been moved or copied, the svn diff of the new
file outputs only the "Index:" line with an empty body. This workaround
ignores such output from svn diff. A issue has been filed with SVN, a link to the
public email list tracking this bug is below.
http://mail-archives.apache.org/mod_mbox/subversion-users/201701.mbox/%3cCF9BDE0A-7454-4405-8259-1120C6B76A03@apple.com%3e

  • Scripts/svn-create-patch:

(generateDiff): Ignore an "Index:" line with an empty body.

7:14 AM Changeset in webkit [210819] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.14.3

WebKitGTK+ 2.14.3

7:12 AM Changeset in webkit [210818] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.3 release.

.:

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.14.3.
5:49 AM Changeset in webkit [210817] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/gtk/po

Merge r210214 - [GTK] German translation update
https://bugs.webkit.org/show_bug.cgi?id=152228

Patch by Bernd Homuth <dev@hmt.im> on 2016-12-30
Rubber-stamped by Michael Catanzaro.

  • de.po:
5:47 AM Changeset in webkit [210816] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r210545 - ThreadedCoordinatedLayerTreeHost::renderNextFrame() should short-cut to layer flushing
https://bugs.webkit.org/show_bug.cgi?id=157614

Reviewed by Carlos Garcia Campos.

CoordinatedLayerTreeHost prevents any layer flushes while a previously-commited scene
state is still being rendered on the composition thread. renderNextFrame() is called
once that is complete, and a new layer flush is scheduled.

This change improves the whole ordeal by immediately performing the layer flush only if
it was requested during the time we were waiting on the renderer (i.e. when the latest
scene state was being composited), instead of scheduling it unconditionally.
m_scheduledWhileWaitingForRenderer member variable is added to track that occurrence.

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
(WebKit::CoordinatedLayerTreeHost::renderNextFrame):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
5:47 AM Changeset in webkit [210815] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210543 - [CoordinatedGraphics] TextureMapperPlatformLayerProxy is constantly getting activated
https://bugs.webkit.org/show_bug.cgi?id=166856

Reviewed by Michael Catanzaro.

When CoordinatedGraphicsLayer::setContentsNeedsDisplay() is called, currently with
the threaded CoordinatedGraphics mode the platform layer is marked for synchronizing.
This means that at flush-time this layer swaps the buffer of the wrapped platform
layer and updates the layer state to indicate that the underlying
TextureMapperPlatformLayerProxy object has to be activated on the composition thread.

This current logic results in the TextureMapperPlatformLayerProxy object being
reactivated for every display request that arrives via setContentsNeedsDisplay().
This is pretty wasteful since this activation heap-allocates a RunLoop::Timer object
which internally also locks up the GLib main context to attach a new source, and
that's only after the source on the previous RunLoop::Timer was detached before
that RunLoop::Timer was destroyed.

To avoid this, CoordinatedGraphicsLayer::setContentsNeedsDisplay() sets a new flag,
m_shouldUpdatePlatformLayer. During flush, this flag is checked in
CoordinatedGraphicsLayer::updatePlatformLayer(), with the buffer swap performed in
case it's set. CoordinatedGraphicsLayer::syncPlatformLayer() now only sets the
platform layer proxy object for that layer's state.

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

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
5:47 AM Changeset in webkit [210814] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210542 - [TexMap] Use WTF::Function in TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=166853

Reviewed by Michael Catanzaro.

Use WTF::Function in the TextureMapperPlatformLayerProxy, instead of
the std::function bloat.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::scheduleUpdateOnCompositorThread):
(WebCore::TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
5:47 AM Changeset in webkit [210813] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210541 - [TextureMapper] TextureMapperPlatformLayerProxy::swapBuffers() should hold the lock throughout invocation
https://bugs.webkit.org/show_bug.cgi?id=166852

Reviewed by Michael Catanzaro.

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::swapBuffer): Append to previous buffer
to the m_usedBuffers Vector while the object's lock is held. Everywhere else the
m_usedBuffers Vector is used under the lock, no reason to not do the same here.

5:40 AM Changeset in webkit [210812] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r208975 - MemoryPressureHandler should only trigger synchronous GC on iOS
<https://webkit.org/b/165043>
<rdar://problem/29312684>

Reviewed by Sam Weinig.

On iOS we know that there is really only one web process in play at a time,
so it's okay to do a synchronous GC immediately in response to high memory pressure.

On other platforms, we may have tens or hundreds of web processes, and if they
all start doing full GCs at the same time, it can easily bring a system to its knees
if it's already under pressure.

Fix this by using garbageCollectSoon() on non-iOS platforms.

  • page/MemoryRelease.cpp:

(WebCore::releaseCriticalMemory):

5:38 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
5:36 AM Changeset in webkit [210811] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210223 - [GTK] Since the memory pressure relief has been activated, my disk has a high usage and the desktop stalls
https://bugs.webkit.org/show_bug.cgi?id=164052

Reviewed by Michael Catanzaro.

Check how much memory is freed by the memory pressure handler and wait for a long time if we didn't free that
much.

  • platform/linux/MemoryPressureHandlerLinux.cpp:

(WebCore::MemoryPressureHandler::EventFDPoller::EventFDPoller):

5:36 AM Changeset in webkit [210810] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r208536 - [Linux] Memory values shown by memory pressure handler logger are not useful
https://bugs.webkit.org/show_bug.cgi?id=164589

Reviewed by Michael Catanzaro.

We are currently using the VmSize field from /proc/self/status which is the virtual memory size of the process
and doesn't normally change even when the memory pressure handler manages to release memory. So, most of the
time we see that there's no changes in memory usage in the logs.
We should use the actual memory used by the process, memory that the process can release and then it's relevant
for the memory pressure handler. Using other fields from /proc/self/status we could do something like VmRSS -
(RssFile + RssShme), but there's also /proc/self/statm that provides the same information in a single. The main
different is that statm provides both resident and shared memory directly, but in number of pages, so we need to
multiply by the size of the page.
This patch adds a method to parse /proc/self/statm in its given file, because I plan to use this for the linux
memory sampler that is incorrectly parsing /proc/self/statm.

  • platform/Linux.cmake: Add new files to compilation.
  • platform/linux/CurrentProcessMemoryStatus.cpp: Added.

(WebCore::systemPageSize): Return the page size.
(WebCore::currentProcessMemoryStatus): Parse /proc/self/statm and fill the given ProcessMemoryStatus.

  • platform/linux/CurrentProcessMemoryStatus.h: Added.
  • platform/linux/MemoryPressureHandlerLinux.cpp:

(WebCore::MemoryPressureHandler::processMemoryUsage(): Helper function to return the memory used by the process
in bytes.
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Use processMemoryUsage().

5:34 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
5:25 AM Changeset in webkit [210809] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Tools

Merge r210233 - REGRESSION(r173753): [GTK] Source/WebKit is distributed in tarballs
https://bugs.webkit.org/show_bug.cgi?id=165797

Reviewed by Michael Catanzaro.

Move directory ruleset after all exclude rules of Source rulset.

  • gtk/manifest.txt.in:
5:24 AM Changeset in webkit [210808] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210583 - Unreviewed, rolling out r182947.
https://bugs.webkit.org/show_bug.cgi?id=166922

Caused huge memory leak see https://webkit.org/b/166884
(Requested by KaL on #webkit).

Reverted changeset:

"[GStreamer] Silent WebAudio buffers support"
https://bugs.webkit.org/show_bug.cgi?id=143869
http://trac.webkit.org/changeset/182947

5:21 AM Changeset in webkit [210807] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

REGRESSION(r203047): [GTK][Stable] "notify::title" signal unreliably triggered multiple times
https://bugs.webkit.org/show_bug.cgi?id=165073

Patch by Michael Catanzaro <Michael Catanzaro> on 2017-01-17
Reviewed by Carlos Garcia Campos.

  • dom/Document.cpp:

(WebCore::Document::setTitle):

5:21 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
5:16 AM Changeset in webkit [210806] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.14

Merge r210271 - WorkQueueGeneric's platformInvalidate() can deadlock when called on the RunLoop's thread
https://bugs.webkit.org/show_bug.cgi?id=166645

Reviewed by Carlos Garcia Campos.

Source/WTF:

WorkQueue can be destroyed on its invoking thread itself.
The scenario is the following.

  1. Create WorkQueue (in thread A).
  2. Dispatch a task (in thread A, dispatching a task to thread B).
  3. Deref in thread A.
  4. The task is executed in thread B.
  5. Deref in thread B.
  6. The WorkQueue is destroyed, calling platformInvalidate in thread B.

In that case, if platformInvalidate waits thread B's termination, it causes deadlock.
We do not need to wait the thread termination.

  • wtf/WorkQueue.h:
  • wtf/generic/WorkQueueGeneric.cpp:

(WorkQueue::platformInitialize):
(WorkQueue::platformInvalidate):

Tools:

  • TestWebKitAPI/Tests/WTF/WorkQueue.cpp:

(TestWebKitAPI::TEST):

5:10 AM Changeset in webkit [210805] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210670 - [GTK] WebKitWebProcess at 100% CPU loading hyphenation dictionaries
https://bugs.webkit.org/show_bug.cgi?id=165601

Reviewed by Carlos Garcia Campos.

In HyphenationLibHyphen, retrieve the canonicalized absolute pathname of the dictionary file
in order to avoid storing symbolic links as the target files for specific locales. libhyphen
distributes its dictionary files by linking a set of similar locales files to a single file.
Not resolving those symbolic links means we'll be opening a single file via multiple
HyphenationDictionary objects, which is far from optimal.

To add insult to injury, these HyphenationDictionary objects were stored in a TinyLRUCache
with a slim capacity of 4. This meant that while already loading one single file through
multiple symlinks, because of continuous eviciton from this LRU cache the same symlinks
continued to be processed, in some cases resulting in opening the same dictionary file
hundreds or thousands of times. The capacity of this TinyLRUCache is increased to 32
to keep the amount of open libhyphen dictionaries capped at some reasonable number.

  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::scanDirectoryForDicionaries):

5:09 AM Changeset in webkit [210804] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210357 - [SOUP] AddressSanitizer: heap-use-after-free under WTF::String::fromUTF8()
https://bugs.webkit.org/show_bug.cgi?id=166722

Patch by Milan Crha <mcrha@redhat.com> on 2017-01-05
Reviewed by Alex Christensen.

  • platform/soup/PublicSuffixSoup.cpp:

(WebCore::topPrivatelyControlledDomain):
Use a variable to hold UTF-8 version of the domain, because
the soup_tld_get_base_domain() returns a pointer into the passed-in
string, which could be freed due to the temporary object being freed.

4:27 AM Changeset in webkit [210803] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r209821 - CSP: Allow HTTPS URL to match HTTP source expression
https://bugs.webkit.org/show_bug.cgi?id=159520
<rdar://problem/27287177>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number.html

  • page/csp/ContentSecurityPolicySource.cpp:

(WebCore::ContentSecurityPolicySource::schemeMatches):
(WebCore::ContentSecurityPolicySource::portMatches):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number.html: Added.
  • platform/wk2/TestExpectations: Skip the test on WebKit2 because it makes use of Internals.registerDefaultPortForProtocol(),

which does not work with NetworkProcess.

4:18 AM Changeset in webkit [210802] by Carlos Garcia Campos
  • 3 edits
    8 adds in releases/WebKitGTK/webkit-2.14

Merge r209789 - CSP: ws: and wss: blocked with connect-src *
https://bugs.webkit.org/show_bug.cgi?id=165804
<rdar://problem/28563643>

Reviewed by David Kilzer.

Source/WebCore:

Allow * to match ws: and wss:. This will make our behavior of * more closely conform
the behavior of * in the Content Security Policy Level 3 spec.,
<https://w3c.github.io/webappsec-csp/#match-url-to-source-expression> (Editor's Draft, 2 December 2016).

Tests: http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed.html

http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed.html
http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed.html
http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed.html

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):

LayoutTests:

Add tests to ensure that * matches ws: and wss:.

  • http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed.html: Added.
4:16 AM Changeset in webkit [210801] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210800 - REGRESSION(r208997): [GLX] Google maps labels broken when using glXCreateContextAttribsARB
https://bugs.webkit.org/show_bug.cgi?id=166489

Reviewed by Žan Doberšek.

The format GL_ALPHA that can be used in WebGL's texImage2D and texSubImage2D functions is deprecated
in the OpenGL layer when using a core profile. Due to this, when using core, we need to transform
that parameter into something supported by OpenGL.

What we do is to use a texture with just GL_RED format (that allows a single color component) to
store the alpha values, and then configure the texture to swizzle red and alpha when accessing the
pixel components.

No new tests added.

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::texImage2D):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::texSubImage2D):

3:08 AM Changeset in webkit [210800] by magomez@igalia.com
  • 5 edits in trunk/Source/WebCore

REGRESSION(r208997): [GLX] Google maps labels broken when using glXCreateContextAttribsARB
https://bugs.webkit.org/show_bug.cgi?id=166489

Reviewed by Žan Doberšek.

The format GL_ALPHA that can be used in WebGL's texImage2D and texSubImage2D functions is deprecated
in the OpenGL layer when using a core profile. Due to this, when using core, we need to transform
that parameter into something supported by OpenGL.

What we do is to use a texture with just GL_RED format (that allows a single color component) to
store the alpha values, and then configure the texture to swizzle red and alpha when accessing the
pixel components.

No new tests added.

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::texImage2D):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::texSubImage2D):

2:24 AM Changeset in webkit [210799] by tpopela@redhat.com
  • 3 edits in trunk/Source/WebCore

Unreviewed build fix for the Release build with enabled logging

  • html/MediaElementSession.cpp:
  • html/track/InbandGenericTextTrack.cpp:
2:11 AM Changeset in webkit [210798] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

MediaKeySession: use existing 'message' event name
https://bugs.webkit.org/show_bug.cgi?id=167095

Reviewed by Sam Weinig.

When dispatching the 'message' event in MediaKeySession::enqueueMessage(),
use the messageEvent member that's provided by the EventNames object. This
removes the need for a custom static AtomicString object.

  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::enqueueMessage):
(WebCore::messageEventName): Deleted.

Jan 16, 2017:

10:20 PM Changeset in webkit [210797] by commit-queue@webkit.org
  • 46 edits in trunk

Remove the REQUEST_ANIMATION_FRAME flag
https://bugs.webkit.org/show_bug.cgi?id=156980
<rdar://problem/25906849>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-16
Reviewed by Simon Fraser.

.:

  • Source/cmake/OptionsEfl.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp:
  • dom/Document.h:
  • dom/RequestAnimationFrameCallback.idl:
  • dom/ScriptedAnimationController.cpp:
  • dom/ScriptedAnimationController.h:
  • loader/EmptyClients.h:
  • page/Chrome.cpp:
  • page/Chrome.h:
  • page/ChromeClient.h:
  • page/DOMWindow.cpp:
  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • page/FrameView.cpp:
  • page/FrameView.h:
  • page/animation/AnimationController.cpp:
  • page/animation/AnimationController.h:
  • page/animation/AnimationControllerPrivate.h:
  • platform/HostWindow.h:
  • platform/ScrollAnimationSmooth.h:
  • testing/Internals.cpp:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::syncDisplayState):
(WebKit::CompositingCoordinator::nextAnimationServiceTime):

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

(WebKit::CoordinatedLayerTreeHost::scheduleAnimation):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/LayerTreeHost.h:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
7:53 PM Changeset in webkit [210796] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

[QuickLook] QLPreviewConverter should be owned by its delegate
https://bugs.webkit.org/show_bug.cgi?id=167104

Reviewed by Andreas Kling.

Instead of having QuickLookHandle own both the QLPreviewConverter and its delegate, have it
just own the delegate and have the delegate own the QLPreviewConverter.

No change in behavior. Covered by existing tests.

  • loader/ios/QuickLook.h:

(WebCore::QuickLookHandle::converter): Moved out-of-line.

  • loader/ios/QuickLook.mm: Renamed WebPreviewConverterDelegate to WebPreviewConverter, and

gave it ownership of the QLPreviewConverter, QuickLookHandleClient, and preview response.
(-[WebPreviewConverter initWithResourceLoader:resourceResponse:quickLookHandle:]):
Added a ResourceResponse parameter.
(-[WebPreviewConverter setClient:]): Moved from QuickLookHandle::setClient().
(-[WebPreviewConverter appendDataArray:]): Moved from QuickLookHandle::didReceiveDataArray().
(-[WebPreviewConverter finishedAppending]): Moved from QuickLookHandle::didFinishLoading().
(-[WebPreviewConverter failed]): Moved from QuickLookHandle::didFail().
(-[WebPreviewConverter platformConverter]): Added to return the QLPreviewConverter.
(-[WebPreviewConverter _sendDidReceiveResponseIfNecessary]): Used _previewResponse directly.
(WebCore::QuickLookHandle::~QuickLookHandle): Removed unneeded logging.
(WebCore::QuickLookHandle::didReceiveData): Called -[WebPreviewConverter appendDataArray:].
(WebCore::QuickLookHandle::didReceiveBuffer): Ditto.
(WebCore::QuickLookHandle::didFinishLoading): Called -[WebPreviewConverter finishedAppending].
(WebCore::QuickLookHandle::didFail): Called -[WebPreviewConverter failed].
(WebCore::QuickLookHandle::setClient): Called -[WebPreviewConverter setClient:].
(WebCore::QuickLookHandle::previewFileName): Retrieved the QLPreviewConverter via
-[WebPreviewConverter platformConverter].
(WebCore::QuickLookHandle::previewUTI): Ditto.
(WebCore::QuickLookHandle::previewRequestURL): Ditto.
(WebCore::QuickLookHandle::converter): Ditto.
(WebCore::QuickLookHandle::didReceiveDataArray): Deleted.
(WebCore::QuickLookHandle::previewResponse): Deleted.

7:47 PM Changeset in webkit [210795] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

CrashTracer: com.apple.WebKit.WebContent at JavaScriptCore: WTF::StringImpl::containsOnlyWhitespace
https://bugs.webkit.org/show_bug.cgi?id=167106
<rdar://problem/24457632>

Reviewed by Tim Horton.

Speculative fix.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

Test before casting to Text.

7:42 PM Changeset in webkit [210794] by clopez@igalia.com
  • 2 edits
    2 adds in trunk/LayoutTests

[GTK][MSE] Update list of media-source tests that fail.

Unskip imported/w3c/web-platform-tests/media-source tests for WebKitGTK+
Report the list of those tests that fail.
Rebase imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer.html.

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt: Added. Rebased.
4:04 PM Changeset in webkit [210793] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: add "Persist Logs on Navigation" to settings screen
https://bugs.webkit.org/show_bug.cgi?id=166992

Patch by Devin Rousso <Devin Rousso> on 2017-01-16
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Controllers/LogManager.js:

(WebInspector.LogManager):
(WebInspector.LogManager.prototype._delayedMessagesCleared):

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
Move setting and UI toggle for "Keep Log on Navigation" to the global settings dictionary
and content view.

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView):
Add checkbox for new setting and spacer between text settings and log settings.

3:15 PM Changeset in webkit [210792] by jfernandez@igalia.com
  • 6 edits
    6 adds in trunk

[css-grid] Implementing baseline positioning for grid containers
https://bugs.webkit.org/show_bug.cgi?id=165063

Reviewed by Darin Adler and Sergio Villar Senin.

Source/WebCore:

Implementation of the 'first-line' baseline for Grid containers,
according to the CSS Grid Layout spec.
https://drafts.csswg.org/css-grid/#grid-baselines

The self-baseline and content-baseline alignment logic is still
not implemented, hence some cases will be implemented in
future patches.

Tests: fast/css-grid-layout/grid-baseline-margins.html

fast/css-grid-layout/grid-baseline-must-respect-grid-order.html
fast/css-grid-layout/grid-baseline.html

  • rendering/RenderGrid.cpp:

(WebCore::synthesizedBaselineFromBorderBox):
(WebCore::RenderGrid::isInlineBaselineAlignedChild):
(WebCore::RenderGrid::baselinePosition):
(WebCore::RenderGrid::firstLineBaseline):
(WebCore::RenderGrid::inlineBlockBaseline):

  • rendering/RenderGrid.h:

LayoutTests:

Tests to verify the baseline positioning of grid and inline-grid blocks.
Note that two of these new tests are expected to fail because of a Flexbox
bug, since we use Flexbox as reference test.

  • TestExpectations:
  • fast/css-grid-layout/grid-baseline-expected.html: Added.
  • fast/css-grid-layout/grid-baseline-margins-expected.html: Added.
  • fast/css-grid-layout/grid-baseline-margins.html: Added.
  • fast/css-grid-layout/grid-baseline-must-respect-grid-order-expected.txt: Added.
  • fast/css-grid-layout/grid-baseline-must-respect-grid-order.html: Added.
  • fast/css-grid-layout/grid-baseline.html: Added.
  • fast/css-grid-layout/resources/grid-alignment.css:

(.alignSelfBaseline):
(.selfBaseline):

3:04 PM Changeset in webkit [210791] by aestes@apple.com
  • 1 edit in trunk/Source/WebCore/ChangeLog

Fix a ChangeLog typo.

2:23 PM Changeset in webkit [210790] by weinig@apple.com
  • 8 edits
    2 adds in trunk

Add the ability to use numbers in makeString()
https://bugs.webkit.org/show_bug.cgi?id=167087

Reviewed by Darin Adler.

Source/WTF:

Allow numbers to be easily used in makeString() and tryMakeString().

For instance, you can now write:

int amount = 7;
auto foo = makeString("There are ", amount, " apples in the cart");

  • WTF.xcodeproj/project.pbxproj:

Add new file.

  • wtf/text/IntegerToStringConversion.h:

(WTF::writeNumberToBufferImpl):
(WTF::writeNumberToBufferSigned):
(WTF::writeNumberToBufferUnsigned):
(WTF::lengthOfNumberAsStringImpl):
(WTF::lengthOfNumberAsStringSigned):
(WTF::lengthOfNumberAsStringUnsigned):
Add variants of integer writing code that compute the length of the string
that would be produced and writes the string to an existing buffer.

(WTF::IntegerToStringConversionTrait<AtomicString>::flush): Deleted.
(WTF::IntegerToStringConversionTrait<String>::flush): Deleted.
(WTF::IntegerToStringConversionTrait<StringBuilder>::flush): Deleted.
Move these traits to their respective classes.

  • wtf/text/AtomicString.h:

(WTF::IntegerToStringConversionTrait<AtomicString>::flush):

  • wtf/text/StringBuilder.h:

(WTF::IntegerToStringConversionTrait<StringBuilder>::flush):

  • wtf/text/WTFString.h:

(WTF::IntegerToStringConversionTrait<String>::flush):
Traits moved here from IntegerToStringConversion.h

  • wtf/text/StringConcatenateNumbers.h: Added.

(WTF::StringTypeAdapter<int>::StringTypeAdapter<int>):
(WTF::StringTypeAdapter<int>::length):
(WTF::StringTypeAdapter<int>::is8Bit):
(WTF::StringTypeAdapter<int>::writeTo):
(WTF::StringTypeAdapter<int>::toString):
(WTF::StringTypeAdapter<unsigned>::StringTypeAdapter<unsigned>):
(WTF::StringTypeAdapter<unsigned>::length):
(WTF::StringTypeAdapter<unsigned>::is8Bit):
(WTF::StringTypeAdapter<unsigned>::writeTo):
(WTF::StringTypeAdapter<unsigned>::toString):
(WTF::StringTypeAdapter<float>::StringTypeAdapter<float>):
(WTF::StringTypeAdapter<float>::length):
(WTF::StringTypeAdapter<float>::is8Bit):
(WTF::StringTypeAdapter<float>::writeTo):
(WTF::StringTypeAdapter<float>::toString):
(WTF::StringTypeAdapter<double>::StringTypeAdapter<double>):
(WTF::StringTypeAdapter<double>::length):
(WTF::StringTypeAdapter<double>::is8Bit):
(WTF::StringTypeAdapter<double>::writeTo):
(WTF::StringTypeAdapter<double>::toString):
Add basic adaptors for int, unsigned, float, and double.

(WTF::FormattedNumber::fixedPrecision):
(WTF::FormattedNumber::fixedWidth):
(WTF::FormattedNumber::length):
(WTF::FormattedNumber::buffer):
(WTF::FormattedNumber::stringView):
(WTF::StringTypeAdapter<FormattedNumber>::StringTypeAdapter<FormattedNumber>):
(WTF::StringTypeAdapter<FormattedNumber>::length):
(WTF::StringTypeAdapter<FormattedNumber>::is8Bit):
(WTF::StringTypeAdapter<FormattedNumber>::writeTo):
(WTF::StringTypeAdapter<FormattedNumber>::toString):
Add a special class, FormattedNumber, and an adaptor for it, allowing for
fixedPrecision and fixedWidth representation of doubles.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: Added.

Add tests for StringConcatenate, focusing on new numeric additions.

2:14 PM Changeset in webkit [210789] by aestes@apple.com
  • 5 edits in trunk/Source

[QuickLook] Do some cleanup in QuickLookHandle
https://bugs.webkit.org/show_bug.cgi?id=166864

Reviewed by Darin Adler.

Source/WebCore:

  • loader/ios/QuickLook.h: Stopped including QuickLookHandleClient.h and forward-declared

instead; changed setClient() to take a Ref<QuickLookHandleClient>&&; renamed nsResponse() to
previewResponse(); changed QuickLookHandle() to take a ResourceLoader& and const
ResourceResponse&; gave m_delegate a stronger type; removed unused m_quicklookFileHandle;
initialized m_finishedLoadingDataIntoConverter to false.
(WebCore::QuickLookHandle::firstRequestURL): Stopped exporting.
(WebCore::QuickLookHandle::setClient): Moved definition out-of-line.

  • loader/ios/QuickLook.mm: Renamed WebResourceLoaderQuickLookDelegate to

WebPreviewConverterDelegate and stopped conforming to NSURLConnectionDelegate and
WebCoreResourceLoaderDelegate; removed @property quickLookHandle and initialized
_quickLookHandle in the initializer instead.
(-[WebPreviewConverter initWithResourceLoader:quickLookHandle:]): Changed to take references
to resourceLoader and quickLookHandle.
(-[WebPreviewConverter _sendDidReceiveResponseIfNecessary]): Stoped checking for a nil
_quickLookHandle, since it is never nil.
(-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Deleted.
QLPreviewConverter never calls this method.
(-[WebPreviewConverter connection:didReceiveData:lengthReceived:]): Stopped checking for a
nil _resourceLoader, since it is never nil.
(-[WebPreviewConverter connectionDidFinishLoading:]): Ditto.
(-[WebPreviewConverter connection:didFailWithError:]): Ditto.
(WebCore::emptyClient): Changed to return a reference.
(WebCore::QuickLookHandle::QuickLookHandle): Moved creation of the delegate,
firstRequestURL, and response to here from QuickLookHandle::create(). Called
ResourceLoader::didCreateQuickLookHandle() here instead of in QuickLookHandle::create().
(WebCore::QuickLookHandle::create): Used std::make_unique to create the QuickLookHandle.
(WebCore::QuickLookHandle::didFinishLoading): Set m_finishedLoadingDataIntoConverter to true
instead of YES.
(WebCore::QuickLookHandle::setClient): Moved the client rvalue reference into m_client.
(WebCore::QuickLookHandle::~QuickLookHandle): Stopped clearing m_converter and calling
-detachHandle.
(WebCore::QuickLookHandle::previewRequestURL): Used dot syntax.
(WebCore::QuickLookHandle::previewResponse): Renamed from nsResponse().

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::didCreateQuickLookHandle): Changed to pass a
Ref<QuickLookHandleClient>&& to QuickLookHandle::setClient().

1:11 PM Changeset in webkit [210788] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: add UI Zoom level to Settings screen
https://bugs.webkit.org/show_bug.cgi?id=166991

Patch by Devin Rousso <Devin Rousso> on 2017-01-16
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Main.js:

(WebInspector.loaded):
(WebInspector._dockedResizerMouseDown):
(WebInspector._increaseZoom):
(WebInspector._decreaseZoom):
(WebInspector._resetZoom):
(WebInspector.getZoomFactor): Renamed from _zoomFactor.
(WebInspector.setZoomFactor): Renamed from _setZoomFactor.

  • UserInterface/Base/Setting.js:

(WebInspector.settings):
Moved zoomFactor setting to global dictionary.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
Add UI input for changing zoomFactor.

9:45 AM Changeset in webkit [210787] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Remove CSSPropertyNames.in from the project. It's not used any more,
now that we generate files from CSSProperties.json.

  • WebCore.xcodeproj/project.pbxproj:
3:49 AM Changeset in webkit [210786] by Carlos Garcia Campos
  • 12 edits in trunk/Source

[SOUP] Accept-language could be set twice in a row for the default context
https://bugs.webkit.org/show_bug.cgi?id=167089

Reviewed by Žan Doberšek.

Source/WebCore:

If NetworkStorageSession doesn't have a SoupNetworkSession yet, we are creating it only to set the
languages. Since we already set the global value, the languages will be set when the SoupNetworkSession is
created later. This is not a big deal for the language property, but it will be for proxies after bug #128674.
Since NetworkStorageSession::soupNetworkSession() it's actually getting or creating the SoupNetworkSession, this
patch renames it as NetworkStorageSession::getOrCreateSoupNetworkSession() and now
NetworkStorageSession::soupNetworkSession() returns a pointer without creating the SoupNetworkSession, so it can
be nullptr. This can now be used to only use the default SoupNetworkSession when it has already been created.

  • platform/network/NetworkStorageSession.h:

(WebCore::NetworkStorageSession::soupNetworkSession): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

  • platform/network/soup/DNSSoup.cpp:

(WebCore::DNSResolveQueue::updateIsUsingProxy): Ditto.
(WebCore::DNSResolveQueue::platformResolve): Ditto.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession): This is the old soupNetworkSession(), now renamed.
(WebCore::NetworkStorageSession::soupNetworkSession): Return a pointer with the current value of m_session that
now can be nullptr.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::sessionFromContext): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

Source/WebKit2:

  • NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:

(WebKit::CustomProtocolManager::registerScheme): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

  • NetworkProcess/efl/NetworkProcessMainEfl.cpp:
  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::userPreferredLanguagesChanged): Only set the languages if NetworkStorageSession has a
SoupNetworkSession.

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::soupSession): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

  • WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:

(WebKit::WebCookieManager::setCookiePersistentStorage): Ditto.

  • WebProcess/efl/WebProcessMainEfl.cpp:
3:24 AM Changeset in webkit [210785] by Carlos Garcia Campos
  • 6 edits in trunk/Source

[SOUP] Fix handling of accept language property
https://bugs.webkit.org/show_bug.cgi?id=166969

Reviewed by Michael Catanzaro.

Source/WebCore:

Add SoupNetworkSession::setInitialAcceptLanguages() static method and update setAcceptLanguages to receive the
string already built from the languages vector. Now the SoupNetworkSession saves that value globally that
is always used when creating new sessions.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::switchToNewTestingSession): Remove workaround.

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession): If initial accept languages were set, apply them to the newly created context.
(WebCore::SoupNetworkSession::setInitialAcceptLanguages): Just save the given value globally.
(WebCore::SoupNetworkSession::setAcceptLanguages): It receives now the string, so just set it to the session.

  • platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::buildAcceptLanguages): Moved from WebCore.
(WebKit::NetworkProcess::userPreferredLanguagesChanged): Build the accept language string from the vector and
pass set it to SoupNetworkSession to be used for new sessions, and also to all other existing sessions.

Jan 15, 2017:

4:14 PM Changeset in webkit [210784] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Add the build fix for browsers that don't yet support custom elements SPI.
It was supposedly to be a part of the previous commit.

  • public/v3/components/base.js:

(ComponentBase.defineElement):

4:12 PM Changeset in webkit [210783] by rniwa@webkit.org
  • 8 edits
    3 adds in trunk/Websites/perf.webkit.org

Adopt custom elements API in perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=167045

Reviewed by Darin Adler.

Adopt custom elements API in ComponentBase, and create the shadow tree lazily in content() and render()
instead of eagerly creating it inside the constructor.

For now, create a separate element class for each component in ComponentBase.defineElement instead of
making ComponentBase inherit from HTMLElement to preserve the semantics we have as well as to test
the boundaries of what custom elements API allows for framework authors.

In order to ensure one-to-one correspondence between elements and their components, we use a static map,
ComponentBase._currentlyConstructedByInterface, to remember which element or component is being created
and use that in custom element's constructor to update element.component() and this._element.

Also dropped the support for not having attachShadow as we've shipped this feature in Safari 10.

Finally, added tests to be ran inside a browser to test the front end code in browser-tests.

  • browser-tests/component-base-tests.js: Added. Basic tests for ComponentBase.
  • browser-tests/index.html: Added.
  • public/v3/components/base.js:

(ComponentBase): Don't create the shadow tree. Use the currently constructed element as this._element if
there is one (the custom element's constructor is getting called). Otherwise create a new element but
store this component in the map to avoid creating a new component in the custom element's constructor.
(ComponentBase.prototype.content): Lazily create the shadow tree now.
(ComponentBase.prototype.render): Ditto.
(ComponentBase.prototype._ensureShadowTree): Renamed from _constructShadowTree. Dropped the support for
not having shadow DOM API. This is now required. Also use importNode instead of cloneNode in cloning
the template content since the latter would not get upgraded.
(ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Modernized the code. Don't
re-create a component if its element had already been upgraded by its custom element constructor.
(ComponentBase.defineElement): Add this component to the static maps. _componentByName is used by
_recursivelyReplaceUnknownElementsByComponents to instantiate new components in the browsers that don't
support custom elements API and _componentByClass is used by ComponentBase's constructor to lookup the
element name. The latter should go away once all components fully adopt ComponentBase.defineElement.
(ComponentBase.defineElement.elementClass): A class to define a custom element for the component.
We need to reconfigure the property since class's name is not writable but configurable.

  • public/v3/components/button-base.js:

(ButtonBase.htmlTemplate): Added. Extracted the common code from CloseButton and WarningIcon.
(ButtonBase.buttonContent): Added. An abstract method overridden by CloseButton and WarningIcon.
(ButtonBase.sizeFactor): Added. Overridden by WarningIcon.
(ButtonBase.cssTemplate): Updated to use :host.

  • public/v3/components/close-button.js:

(CloseButton.buttonContent): Renamed from htmlTemplate.

  • public/v3/components/spinner-icon.js:

(SpinnerIcon.cssTemplate): Removed webkit prefixed properties, and updated it to animate stroke instead
of opacity to reduce the power usage.
(SpinnerIcon.htmlTemplate): Factored stroke, stroke-width, and stroke-linecap into cssTemplate.

  • public/v3/components/warning-icon.js:

(WarningIcon.cssTemplate): Deleted.
(WarningIcon.sizeFactor): Added.
(WarningIcon.buttonContent): Renamed from htmlTemplate.

  • public/v3/pages/summary-page.js:

(SummaryPage._constructRatioGraph): Fixed a bug that we were not never calling spinner.updateRendering().
(SummaryPage.prototype._renderCell):

3:02 PM WebInspectorCodingStyleGuide edited by BJ Burg
(diff)
2:42 PM Changeset in webkit [210782] by Michael Catanzaro
  • 2 edits in trunk/Tools

Unreviewed, remove stale comment.

This test was fixed by r163173.

  • TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
1:01 PM Changeset in webkit [210781] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[SOUP] SoupNetworkSession constructor should be explicit
https://bugs.webkit.org/show_bug.cgi?id=167069

Reviewed by Darin Adler.

  • platform/network/soup/SoupNetworkSession.h:
12:05 PM Changeset in webkit [210780] by commit-queue@webkit.org
  • 23 edits
    3 deletes in trunk

[WebIDL] Remove custom bindings for HTMLInputElement, HTMLFrameElement, HTMLMediaElement and HTMLOptionsCollection
https://bugs.webkit.org/show_bug.cgi?id=167039

Patch by Sam Weinig <sam@webkit.org> on 2017-01-15
Reviewed by Darin Adler.

Source/WebCore:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSHTMLFrameElementCustom.cpp: Removed.
  • bindings/js/JSHTMLInputElementCustom.cpp: Removed.
  • bindings/js/JSHTMLMediaElementCustom.cpp: Removed.

Remove files.

  • html/HTMLOptionsCollection.idl:
  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:

(WebCore::JSHTMLOptionsCollection::setLength): Deleted.
Remove custom setLength. The bindings generator can handle this now.

  • html/HTMLFrameElement.idl:

Resort to match spec. Replace custom annotation for location with SetterCallWith=ScriptState.

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::setLocation):

  • html/HTMLFrameElementBase.h:

Add implementation of setLocation.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::selectionStartForBindings):
(WebCore::HTMLInputElement::setSelectionStartForBindings):
(WebCore::HTMLInputElement::selectionEndForBindings):
(WebCore::HTMLInputElement::setSelectionEndForBindings):
(WebCore::HTMLInputElement::selectionDirectionForBindings):
(WebCore::HTMLInputElement::setSelectionDirectionForBindings):
(WebCore::HTMLInputElement::setSelectionRangeForBindings):

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.idl:

Add variants of the selection properties that throw using the 'forBindings' suffix to differentiate.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setControllerForBindings):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::controllerForBindings):

  • html/HTMLMediaElement.idl:

Add a variant of the controller property that unsets the media group, using the 'forBindings' suffix to differentiate.

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::setLength):
Match other implementations by ignoring attempts to set large lengths (> 10000) rather than clamping.

LayoutTests:

  • fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
  • fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
  • fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html:
  • fast/dom/HTMLSelectElement/select-selectedIndex.html:

Update tests / results now that negative lengths don't throw, but do log due to be converted
to a large number.

  • fast/forms/select-max-length-expected.txt:

Update result now that a large length is not clamped, but rather, ignored.

11:39 AM Changeset in webkit [210779] by timothy_horton@apple.com
  • 8 edits in trunk/Source

De-duplicate more (nearly) identical code in Editor(Mac|IOS).mm
https://bugs.webkit.org/show_bug.cgi?id=167063

Reviewed by Dan Bernstein.

Source/WebCore:

No new tests, just refactoring.

  • editing/Editor.h:

Adjust to fontAttributesForSelectionStart returning a RetainPtr.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle):
Make use of more Obj-C literals (for NSNumber).

(WebCore::Editor::fontAttributesForSelectionStart):
Merge this from EditorMac and EditorIOS. There are a number of attributes
that are currently only extracted on Mac, and it's not clear why (and
probably should be shared).

(WebCore::Editor::stringSelectionForPasteboard):
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
Merge these functions from EditorMac and EditorIOS. The iOS implementation
was missing a reasonable bug fix from r161925.

(WebCore::Editor::createFragmentAndAddResources):
Merge this from EditorMac and EditorIOS. The Mac implementation was missing
a reasonable bug fix from r203482.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::fontAttributesForSelectionStart): Deleted.
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Deleted.
(WebCore::Editor::createFragmentAndAddResources): Deleted.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::fontAttributesForSelectionStart): Deleted.
(WebCore::Editor::stringSelectionForPasteboard): Deleted.
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Deleted.
(WebCore::Editor::createFragmentAndAddResources): Deleted.

Source/WebKit/mac:

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _selectionStartFontAttributesAsRTF]):
(-[WebHTMLView _updateFontPanel]):

  • WebView/WebView.mm:

(-[WebView typingAttributes]):
Adjust to fontAttributesForSelectionStart returning a RetainPtr.

9:47 AM Changeset in webkit [210778] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

[Cocoa] Unify FontPlatformData's hashing and equality operators
https://bugs.webkit.org/show_bug.cgi?id=167061

Reviewed by Darin Adler.

On iOS, we were using CFEqual() and CFHash(), while on macOS
we were using pointer hashing and pointer equality. Instead,
we should be consistent about these operators.

Right now, FontPlatformData holds two internal CTFontRefs, and
switching to these higher-level CFEqual() and CFHash()
functions is required for eliminating one of these two
internal font objects.

No new tests because there is no behavior change.

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::hash): Deleted.

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::platformIsEqual):
(WebCore::cascadeToLastResortAttributesDictionary):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::hash):

  • platform/graphics/win/FontPlatformDataCGWin.cpp:

(WebCore::FontPlatformData::hash):

  • platform/graphics/win/FontPlatformDataCairoWin.cpp:

(WebCore::FontPlatformData::hash):

  • platform/graphics/win/FontPlatformDataDirect2D.cpp:

(WebCore::FontPlatformData::hash):

2:48 AM Changeset in webkit [210777] by akling@apple.com
  • 7 edits in trunk/Source/WebCore

FrameView shouldn't keep dangling pointers into dead render trees.
<https://webkit.org/b/167011>

Reviewed by Antti Koivisto.

Added some pretty paranoid assertions to FrameView that verify all of its raw pointers
into the render tree are gone after the render tree has been destroyed.
They immediately caught two bugs, also fixed in this patch.

  • page/FrameView.h:
  • page/FrameView.cpp:

(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree): Added these two callbacks for before/after
Document tears down its render tree. The former clears the layout root, and detaches
custom scrollbars. The latter contains a bunch of sanity assertions that pointers into
the now-destroyed render tree are gone.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree): Notify FrameView before/after teardown.

  • page/animation/AnimationController.h:
  • page/animation/AnimationController.cpp:

(WebCore::AnimationController::hasAnimations): Added a helper to check if there are
any composite animations around, as these contain raw pointers to renderers.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::RenderElement::willBeDestroyed): Moved slow repaint object unregistration
from willBeRemovedFromTree() to willBeDestroyed(). The willBeRemovedFromTree() callback
is skipped as an optimization during full tree teardown, but willBeDestroyed() always
gets called. This fixes a bug where we'd fail to remove dangling pointers.

12:23 AM Changeset in webkit [210776] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebCore

[Cocoa] Unify font fallback between macOS and iOS for when the font-family list is exhausted
https://bugs.webkit.org/show_bug.cgi?id=167056

Reviewed by Darin Adler.

When performing font fallback, each item in the font-family list is examined.
If no appropriate fonts are found, WebKit asks the system for an appropriate
font. As of a few years ago, both macOS and iOS used platform calls to
produce a font; however, each platform used a different platform call. This
patch migrates both platforms to use a shared function which uses only
one of the platform calls (which means the other platform call is never used).

There are still some behavior differences between macOS and iOS (which are now
hidden behind a PLATFORM() guard), but I'd like to minimize and eliminate these
in the future. Using a shared function is a step toward this goal.

No new tests because there is no behavior change.

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::lookupFallbackFont):
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::getSystemFontFallbackForCharacters): Deleted.
(WebCore::platformLookupFallbackFont): Deleted.

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformLookupFallbackFont): Deleted.

Jan 14, 2017:

11:22 PM Changeset in webkit [210775] by Yusuke Suzuki
  • 17 edits in trunk

Annotate large string tests with largeHeap
https://bugs.webkit.org/show_bug.cgi?id=167054

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/dense-set.js:
  • microbenchmarks/lots-of-fields.js:
  • stress/joined-strings-should-not-exceed-max-string-length.js:
  • stress/make-large-string-jit-strcat.js:
  • stress/make-large-string-jit.js:
  • stress/make-large-string-strcat.js:
  • stress/make-large-string.js:
  • stress/string-joining-long-strings-should-not-crash.js:
  • stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:

Tools:

  • Scripts/run-javascriptcore-tests:
  • Scripts/run-jsc-stress-tests:

LayoutTests:

  • js/script-tests/stringimpl-to-jsstring-on-large-strings-1.js:
  • js/script-tests/stringimpl-to-jsstring-on-large-strings-2.js:
  • js/script-tests/stringimpl-to-jsstring-on-large-strings-3.js:
10:59 PM Changeset in webkit [210774] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

Report CPU usage of tabs after they become non-visible using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167019
<rdar://problem/30019773>

Reviewed by Darin Adler.

Report CPU usage of tabs after they become non-visible using diagnostic logging.
We start measure CPU usage 5 seconds after a tab goes to the background, for 5
minutes and report how much CPU the tab used during those 5 minutes. We will
not log if the tab gets closed or moved to the foreground during those 5
minutes.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::postPageBackgroundingKey):

  • page/DiagnosticLoggingKeys.h:
  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::didStartProvisionalLoad):
(WebCore::Page::didFinishLoad):
(WebCore::foregroundCPUUsageToDiagnosticLogginKey):
(WebCore::Page::measurePostLoadCPUUsage):
(WebCore::backgroundCPUUsageToDiagnosticLogginKey):
(WebCore::Page::measurePostBackgroundingCPUUsage):
(WebCore::Page::setIsVisibleInternal):

  • page/Page.h:
  • page/Settings.cpp:

(WebCore::Settings::isPostBackgroundingCPUUsageMeasurementEnabled):

  • page/Settings.h:
10:45 PM Changeset in webkit [210773] by timothy_horton@apple.com
  • 7 edits in trunk/Source/WebCore

De-duplicate some (nearly) identical code in Editor(Mac|IOS).mm
https://bugs.webkit.org/show_bug.cgi?id=167062

Reviewed by Dan Bernstein.

No new tests, just refactoring.

  • editing/Editor.cpp:

(WebCore::Editor::fontForSelection):
(WebCore::Editor::styleForSelectionStart):
(WebCore::Editor::adjustedSelectionRange):

  • editing/Editor.h:

Move these three functions to Editor and unguard them, because they're
not Cocoa specific.

  • platform/spi/cocoa/NSAttributedStringSPI.h:

Move some iOS-only NSAttributedString IPI (so no Internal SDK switch)
to NSAttributedStringSPI.h.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::replaceSelectionWithAttributedString):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
(WebCore::Editor::dataInRTFDFormat):
(WebCore::Editor::dataInRTFFormat):
Move these six functions here.
selectionInWebArchiveFormat and replaceSelectionWithAttributedString are
entirely identical; writeSelectionToPasteboard and createFragment...
both have slightly suspicious-looking differences that I left intact
and wrote comments about (especially createFragment..., the other one
is somewhat explicable). The two dataInRTF(D)Format functions used to
be static functions, but for now are required from both EditorCocoa
and Editor(Mac|IOS), so we'll make them static member functions.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::fontForSelection): Deleted.
(WebCore::Editor::selectionInWebArchiveFormat): Deleted.
(WebCore::dataInRTFDFormat): Deleted.
(WebCore::dataInRTFFormat): Deleted.
(WebCore::Editor::writeSelectionToPasteboard): Deleted.
(WebCore::Editor::createFragmentForImageResourceAndAddResource): Deleted.
(WebCore::Editor::replaceSelectionWithAttributedString): Deleted.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::fontForSelection): Deleted.
(WebCore::Editor::selectionInWebArchiveFormat): Deleted.
(WebCore::dataInRTFDFormat): Deleted.
(WebCore::dataInRTFFormat): Deleted.
(WebCore::Editor::writeSelectionToPasteboard): Deleted.
(WebCore::Editor::createFragmentForImageResourceAndAddResource): Deleted.
(WebCore::Editor::replaceSelectionWithAttributedString): Deleted.

10:27 PM Changeset in webkit [210772] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Cmd-, should open Settings tab
https://bugs.webkit.org/show_bug.cgi?id=167028

Patch by Devin Rousso <Devin Rousso> on 2017-01-14
Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):
(WebInspector._showSettingsTab): Added.

9:06 PM Changeset in webkit [210771] by commit-queue@webkit.org
  • 5 edits in trunk

Remove stale references to ENABLE_ES6_GENERATORS and ENABLE_PROMISES
https://bugs.webkit.org/show_bug.cgi?id=167043

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-14
Reviewed by Darin Adler.

.:

  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
8:44 PM WebKitGTK/2.14.x edited by Michael Catanzaro
Propose r209821 (diff)
8:35 PM WebKitGTK/2.14.x edited by Michael Catanzaro
Propose bug #165073 (diff)
11:59 AM Changeset in webkit [210770] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Small code cleanup after r210760
https://bugs.webkit.org/show_bug.cgi?id=167047

Reviewed by Sam Weinig.

No change in functionality.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPosition):

11:35 AM Changeset in webkit [210769] by Yusuke Suzuki
  • 6 edits in trunk/Source

WebAssembly: Suppress warnings & errors in GCC
https://bugs.webkit.org/show_bug.cgi?id=167049

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • wasm/WasmFunctionParser.h:

Add missing { } after the switch. Ideally, it is not necessary.
But in GCC, it is required. Since this function is fairly large,
I think the code generated by this does not cause performance
regression.

  • wasm/WasmPageCount.h:

UINT_MAX is defined in limits.h.

  • wasm/generateWasmValidateInlinesHeader.py:

On the other hand, we use this suppress pragma here to solve the
same problem in wasm/WasmFunctionParser.h. Since the load function
is fairly small, the additional return { }; may generate some
suboptimal code. See bug 150794 for more detail.

Source/WTF:

  • wtf/LEBDecoder.h:

(WTF::LEBDecoder::decodeInt):
If T = int, it performs -1 << shift. It causes
warning in GCC. Instead, we first cast it to the
UnsignedT, perform operation and re-cast to the
T.

10:45 AM Changeset in webkit [210768] by Alan Bujtas
  • 23 edits in trunk/Source/WebCore

Renderers should have a simple way to access Settings.
https://bugs.webkit.org/show_bug.cgi?id=167048

Now that RenderObjects can never outlive the Page, we can just access the Settings
through Page instead of Document::settings/Frame::settings.

Reviewed by Andreas Kling.

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::paintCaret):
(WebCore::RenderBlock::shouldPaintSelectionGaps):

  • rendering/RenderBlockFlow.cpp:

(WebCore::needsAppleMailPaginationQuirk):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::startAlignedOffsetForLine):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::layoutOverflowRectForPropagation):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::RenderElement::shouldRespectImageOrientation):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):

  • rendering/RenderFrameSet.cpp:

(WebCore::RenderFrameSet::flattenFrameSet):

  • rendering/RenderIFrame.cpp:

(WebCore::RenderIFrame::flattenFrame):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::addChildIgnoringContinuation):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
(WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
(WebCore::RenderLayer::hasAcceleratedTouchScrolling):
(WebCore::RenderLayer::getRectToExpose):
(WebCore::RenderLayer::overhangAmount):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::calculateClipRects):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::shouldAggressivelyRetainTiles):
(WebCore::RenderLayerBacking::shouldTemporarilyRetainTileCohorts):
(WebCore::RenderLayerBacking::useGiantTiles):
(WebCore::RenderLayerBacking::startAnimation):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
(WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
(WebCore::RenderLayerCompositor::requiresContentShadowLayer):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::shouldPlaceBlockDirectionScrollbarOnLeft):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):

  • rendering/RenderObject.h:

(WebCore::RenderObject::settings):

  • rendering/RenderText.cpp:

(WebCore::SecureTextTimer::restart):

  • rendering/RenderView.cpp:

(WebCore::RenderView::clientLogicalWidthForFixedPosition):
(WebCore::RenderView::clientLogicalHeightForFixedPosition):
(WebCore::RenderView::paintBoxDecorations):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

9:35 AM Changeset in webkit [210767] by Chris Dumez
  • 9 edits
    2 adds in trunk

Align the innerText setter with the HTML spec and Gecko
https://bugs.webkit.org/show_bug.cgi?id=160971

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

  • web-platform-tests/domparsing/createContextualFragment-expected.txt:
  • web-platform-tests/innerText/setter-expected.txt:

Source/WebCore:

Align the innerText setter and createContextualFragment() with the
HTML specification and Gecko. In particular, they no longer throw
when the context element is a void element. This behavior was there
to match an old IE behavior but Edge dropped this behavior.

Test: fast/dom/br-set-outerText.html

  • dom/Element.cpp:
  • dom/Element.h:
  • editing/markup.cpp:

(WebCore::createContextualFragment):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::setInnerText):
(WebCore::HTMLElement::setOuterText):

LayoutTests:

Add test coverage for outerText, which is non-standard.

  • fast/dom/br-set-outerText-expected.txt: Added.
  • fast/dom/br-set-outerText.html: Added.
8:19 AM Changeset in webkit [210766] by Yusuke Suzuki
  • 3 edits
    1 add in trunk

Reserve capacity for StringBuilder in unescape
https://bugs.webkit.org/show_bug.cgi?id=167008

Reviewed by Sam Weinig.

JSTests:

  • stress/unescape.js: Added.

(shouldBe):

Source/JavaScriptCore:

unescape function is frequently called in Kraken sha256-iterative.
This patch just reserves the capacity for the StringBuilder.

Currently, we select the length of the string for the reserved capacity.
It improves the performance 2.73%.

Benchmark report for Kraken on sakura-trick.

VMs tested:
"baseline" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/untot/Release/bin/jsc
"patched" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/un/Release/bin/jsc

Collected 100 samples per benchmark/VM, with 100 VM invocations per benchmark. Emitted a call to gc() between
sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime()
function to get microsecond-level timing. Reporting benchmark execution times with 95% confidence intervals in
milliseconds.

baseline patched

stanford-crypto-sha256-iterative 51.609+-0.672 50.237+-0.860 might be 1.0273x faster

<arithmetic> 51.609+-0.672 50.237+-0.860 might be 1.0273x faster

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncUnescape):

1:01 AM Changeset in webkit [210765] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

Remove unused WKView initializer parameter
https://bugs.webkit.org/show_bug.cgi?id=167046

Reviewed by Dan Bernstein.

  • UIProcess/API/mac/WKView.mm:

(-[WKView initWithFrame:processPool:configuration:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
(-[WKView initWithFrame:configurationRef:]):
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.

  • UIProcess/API/mac/WKViewInternal.h:

Ever since WKWebView stopped having WKView inside it, this parameter
has never been used. Now, it only leads to confusion.

Jan 13, 2017:

11:09 PM Changeset in webkit [210764] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings tab is restored when reopening inspector
https://bugs.webkit.org/show_bug.cgi?id=167025

Patch by Devin Rousso <Devin Rousso> on 2017-01-13
Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

(WebInspector._tabBrowserSelectedTabContentViewDidChange):
Only save the selectedTabIndex if the current tab should be saved and reloaded upon opening
the WebInspector window.

9:59 PM Changeset in webkit [210763] by commit-queue@webkit.org
  • 30 edits in trunk

Remove ENABLE(DETAILS_ELEMENT) guards
https://bugs.webkit.org/show_bug.cgi?id=167042

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-13
Reviewed by Alex Christensen.

.:

  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::setIsExpanded):

  • html/HTMLDetailsElement.cpp:
  • html/HTMLDetailsElement.idl:
  • html/HTMLSummaryElement.cpp:
  • html/HTMLTagNames.in:
  • html/shadow/DetailsMarkerControl.cpp:
  • rendering/RenderDetailsMarker.cpp:
  • rendering/RenderDetailsMarker.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::isDetailsMarker):

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:52 PM Changeset in webkit [210762] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build after r210753.
https://bugs.webkit.org/show_bug.cgi?id=166730

  • platform/WebGLStateTracker.h:

WTF::Function apparently needs to explicitly be differentiated from JSC::Attribute Function in PropertySlot.h.

8:04 PM Changeset in webkit [210761] by beidson@apple.com
  • 4 edits in trunk/Source/WebKit2

Crash when visiting a webpage that uses Gamepads in a new WebProcess after a previous page has used gamepads..
https://bugs.webkit.org/show_bug.cgi?id=167033

Reviewed by Alex Christensen.

  • UIProcess/Gamepad/UIGamepadProvider.cpp:

(WebKit::UIGamepadProvider::processPoolStartedUsingGamepads): Don't schedule a state update here.
(WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads): Ditto.

  • UIProcess/Gamepad/UIGamepadProvider.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::startedUsingGamepads): Populate the WebProcess with initial gamepads.

7:42 PM Changeset in webkit [210760] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Potential nullptr dereference in RenderLayer::updateLayerPosition()
https://bugs.webkit.org/show_bug.cgi?id=167036
<rdar://problem/30023019>

Reviewed by Dean Jackson.

A value was being used without nullptr checking, even though it had been checked for null a
few lines prior.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPosition): Add missing nullptr check.

7:40 PM Changeset in webkit [210759] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Resources disappear from the network tab when iframe gets removed from DOM
https://bugs.webkit.org/show_bug.cgi?id=166776
<rdar://problem/29909640>

Reviewed by Matt Baker.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel):
Don't remove resource tree elements from Network tab when iframe gets detached from the DOM.

7:35 PM Changeset in webkit [210758] by Darin Adler
  • 166 edits
    3 deletes in trunk/Source

Remove PassRefPtr from more of "platform"
https://bugs.webkit.org/show_bug.cgi?id=166809

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • inspector/JSInjectedScriptHost.h:

(Inspector::JSInjectedScriptHost::impl): Simplified code since we don't need a
const_cast here any more.

  • runtime/PrivateName.h:

(JSC::PrivateName::uid): Ditto.

Source/WebCore:

  • CMakeLists.txt: Removed DeviceMotionClientMock.cpp.
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:

Added now-needed include.

  • Modules/speech/SpeechSynthesisUtterance.cpp:

(WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
Pass a reference instead of a pointer.

  • Modules/speech/SpeechSynthesisUtterance.h: Tweaks, msade a few things

more private and final.

  • bindings/js/JSDOMConvert.h:

(WebCore::Detail::getPtrOrRef): Removed no-longer-needed const_cast.

  • bindings/js/JSDOMWrapper.h:

(WebCore::JSDOMWrapper::wrapped): Ditto.

  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::~ScriptModuleLoader): Ditto.

  • css/BasicShapeFunctions.cpp:

(WebCore::convertToLengthSize): Updated for LengthSize struct.
(WebCore::convertToCenterCoordinate): Ditto.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createPositionListForLayer): Take a reference.
(WebCore::getBorderRadiusCornerValues): Updated for LengthSize struct.
(WebCore::getBorderRadiusCornerValue): Ditto.
(WebCore::getBorderRadiusShorthandValue): Ditto.
(WebCore::fillSizeToCSSValue): Ditto.
(WebCore::ComputedStyleExtractor::propertyValue): Updated many properties
since the layer properties now return references rather than pointers.

  • css/CSSImageGeneratorValue.cpp:

(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::image): Removed
no-longer-needed const_cast.

  • css/CSSKeyframesRule.cpp:

(WebCore::CSSKeyframesRule::item): Ditto.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::init): Updated for LengthSize struct.

  • css/CSSStyleRule.h: Removed no-longer-needed const_cast.
  • css/CSSToStyleMap.cpp:

(WebCore::convertToLengthSize): Updated for LengthSize struct.

  • css/FontFace.cpp:

(WebCore::FontFace::family): Removed no-longer-needed const_cast.
(WebCore::FontFace::style): Ditto.
(WebCore::FontFace::weight): Ditto.
(WebCore::FontFace::unicodeRange): Ditto.
(WebCore::FontFace::variant): Ditto.
(WebCore::FontFace::featureSettings): Ditto.

  • css/LengthFunctions.cpp:

(WebCore::sizeForLengthSize): Added.
(WebCore::floatSizeForLengthSize): Updated for LengthSize struct.

  • css/LengthFunctions.h: Added sizeForLengthSize.
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::paintOrder): Cut down on creation of unused objects.
We now create only what we actually use.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertRadius): Updated for
LengthSize struct.
(WebCore::StyleBuilderConverter::convertShapeValue): Pass references
when creating ShapeValue.

  • css/StyleBuilderCustom.h:

(WebCore::forwardInheritedValue): Added. This set of overloaded
functions allows us to use move semantics for some types, but copy
them when inheriting. Doing it with special cases here allows us to
resolve this without adding overloads someone might be tempted to
call outside the style builder, and without adding special cases to
the JSON file for each property.
(WebCore::StyleBuilderCustom::applyValueWebkitDashboardRegion):
Add WTFMove as needed to work with rvalue references.
(WebCore::StyleBuilderCustom::applyValueSize): Ditto.
(WebCore::StyleBuilderCustom::applyInheritTextIndent): Ditto.
(WebCore::StyleBuilderCustom::applyValueTextIndent): Ditto.
(WebCore::StyleBuilderCustom::applyInheritLineHeight): Ditto.
(WebCore::StyleBuilderCustom::applyValueLineHeight): Ditto.
(WebCore::StyleBuilderCustom::applyInheritClip): Ditto.
(WebCore::StyleBuilderCustom::applyValueClip): Ditto.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::State::cacheBorderAndBackground): Use
references instead of pointers.
(WebCore::StyleResolver::applyMatchedProperties): Ditto.
(WebCore::StyleResolver::applyProperty): Update for changes to the
custom property data in RenderStyle.

  • css/makeprop.pl: Use auto quite a bit more in the generated code.

Updated special cases for layers to expect references. Added a WTFMove
so we can get move semantics for converted values that come out in
an optional. Added call to forwardInheritedValue (see above).

  • dom/Document.cpp:

(WebCore::Document::pageSizeAndMarginsInPixels): Use auto and update
since LengthSize is a struct.

  • dom/EventPath.cpp:

(WebCore::EventPath::computePathUnclosedToTarget): Use auto.

  • dom/LiveNodeList.h:

(WebCore::LiveNodeList::ownerNode): Removed no-longer-needed const_cast.

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::source): Removed unneeded static_cast.

  • dom/Node.cpp:

(WebCore::nodeSetPreTransformedFromNodeOrStringVector): Tweaked formatting.

  • dom/Range.h:

(WebCore::Range::ownerDocument): Removed no-longer-needed const_cast.

  • dom/RegisteredEventListener.h:

(WebCore::RegisteredEventListener::callback): Ditto.

  • dom/ScriptRunner.cpp:

(WebCore::ScriptRunner::~ScriptRunner): Ditto.

  • html/HTMLCollection.h:

(WebCore::HTMLCollection::ownerNode): Ditto.

  • html/parser/HTMLStackItem.h:

(WebCore::HTMLStackItem::node): Ditto.

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::setJavaScriptPaused): Cut down on the number
of different functions here. Also use reference rather than pointer.

  • inspector/PageScriptDebugServer.h: Updated for above change.
  • loader/HistoryController.cpp:

(WebCore::HistoryController::recursiveSetProvisionalItem): Removed
no-longer-needed const_cast.
(WebCore::HistoryController::recursiveGoToItem): Ditto.

  • page/Frame.cpp:

(WebCore::Frame::ownerRenderer): Use auto. Let the is<> function do null
checking for us.
(WebCore::Frame::frameForWidget): Take a reference rather than a pointer.

  • page/Frame.h: Updated for the above.
  • page/FrameView.cpp:

(WebCore::FrameView::invalidateRect): Use Chrome directly instead of using
HostWindow. HostWindow is an abstraction for the platform layer, and there
is no good reason to use it here.
(WebCore::FrameView::scheduleAnimation): Ditto.
(WebCore::FrameView::graphicsLayerForPlatformWidget): Updated to use reference
when calling RenderWidget::find.
(WebCore::FrameView::scrollContentsFastPath): Use Chrome instead of HostWindow.
(WebCore::FrameView::hostWindow): Use early return.
(WebCore::FrameView::updateScrollCorner): Removed unneeded call through to base
class function, which was empty.
(WebCore::FrameView::hasCustomScrollbars): Updated since the children set now
contains Ref rather than RefPtr.
(WebCore::FrameView::parentFrameView): Use early return.
(WebCore::FrameView::updateWidgetPositions): Use reference instead of pointer.

  • page/FrameView.h: Use final instead of override. Remove now-unneeded const_cast.
  • page/Page.cpp:

(WebCore::Page::pluginViews): Updated since the children set now contains
Ref rather than RefPtr.

  • page/PrintContext.cpp:

(WebCore::PrintContext::pageProperty): Updated for LengthSize struct.

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::fireAnimationEventsIfNeeded): Updated for changes to
the types in animation function members.
(WebCore::AnimationBase::timeToNextService): Ditto.
(WebCore::AnimationBase::progress): Ditto.
(WebCore::AnimationBase::getElapsedTime): Ditto.

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc): Updated for LengthSize struct.
(WebCore::LengthPropertyWrapper::LengthPropertyWrapper): Updated since we now
use rvalue references and move semantics when setting length properties.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame): Tweaked to
use auto, pass references.

  • platform/KeyedCoding.h: Return RefPtr instead of PassRefPtr.
  • platform/LengthBox.h: Added a constructor that moves the lengths in, rather

than always copying them.

  • platform/LengthSize.cpp:

(WebCore::operator<<): Updated since LengthSize is a struct.

  • platform/LengthSize.h: Turned LengthSize into a struct and removed all the

getter and setter code.

  • platform/PlatformSpeechSynthesis.h: Removed. Unused.
  • platform/PlatformSpeechSynthesisUtterance.cpp:

(WebCore::PlatformSpeechSynthesisUtterance::create): Return Ref rather than PassRefPtr.
(WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance): Take
a reference. Initialize data members in class definition.

  • platform/PlatformSpeechSynthesisUtterance.h: Updated for the above.
  • platform/PlatformSpeechSynthesisVoice.cpp:

(WebCore::PlatformSpeechSynthesisVoice::create): Return Ref rather than PassRefPtr.

  • platform/PlatformSpeechSynthesisVoice.h: Updated for the above.
  • platform/ScrollView.cpp:

(WebCore::ScrollView::addChild): Take a reference rather than a PassRefPtr.
(WebCore::ScrollView::setHasScrollbarInternal): Updated for change to addChild
(WebCore::ScrollView::scrollContentsFastPath): Deleted. This was never called,
so made it pure virtual.
(WebCore::ScrollView::frameRectsChanged): Use a modern for loop.
(WebCore::ScrollView::clipRectChanged): Ditto.
(WebCore::ScrollView::updateScrollCorner): Deleted. This was empty so made it pure
virtual and changed FrameView to not call it.
(WebCore::ScrollView::setParentVisible): Use a modern for loop.
(WebCore::ScrollView::show): Ditto.
(WebCore::ScrollView::hide): Ditto.

  • platform/ScrollView.h: Changed the children set to contain Ref instead of RefPtr.

Changed functions that were never overridden to either be final or non-virtual,
Changed functions that were never called to be pure virtual.

  • platform/Theme.h:

(WebCore::Theme::minimumControlSize): Updated for LengthSize struct.

  • platform/animation/Animation.h: Changed timingFunction and trigger to return

raw pointers instead of PassRefPtr. Changed setTimingFunction and setTrigger to
take RefPtr&& and Ref&& instead of PassRefPtr. CHanged initialTimingfunction and
initialTrigger to return Ref.

  • platform/animation/AnimationList.cpp: Removed redundant check in FILL_UNSET_PROPERTY.

(WebCore::AnimationList::AnimationList): Use modern for loop, reserveInitialCapacity,
and uncheckedAppend.

  • platform/animation/AnimationList.h: Changed append to take Ref&& instead of PassRefPtr.

changed vecto to contain Ref instead of RefPtr. Added move constructor and assignment
operator.

  • platform/animation/AnimationTrigger.h:

(WebCore::AutoAnimationTrigger::clone): Return Ref instead of PassRefPtr.
(WebCore::AutoAnimationTrigger::create): Ditto.
(WebCore::AutoAnimationTrigger::clone): Ditto.
(WebCore::ScrollAnimationTrigger::create): Ditto.
(WebCore::ScrollAnimationTrigger::clone): Ditto.

  • platform/animation/TimingFunction.h:

(WebCore::LinearTimingFunction::create): Return Ref instead of PassRefPtr.
(WebCore::CubicBezierTimingFunction::create): Ditto.
(WebCore::CubicBezierTimingFunction::defaultTimingFunction): Return a reference
instead of a pointer.
(WebCore::CubicBezierTimingFunction::createReversed): Return Ref instead of PassRefPtr.
(WebCore::CubicBezierTimingFunction::clone): Ditto.
(WebCore::StepsTimingFunction::create): Ditto.
(WebCore::StepsTimingFunction::clone): Ditto.
(WebCore::SpringTimingFunction::create): Ditto.
(WebCore::SpringTimingFunction::clone): Ditto.

  • platform/audio/AudioBus.h:

(WebCore::AudioBus::channel): Removed no-longer-needed const_cast.

  • platform/cf/KeyedEncoderCF.cpp:

(WebCore::KeyedEncoderCF::finishEncoding): Return RefPtr instead of PassRefPtr.

  • platform/cf/KeyedEncoderCF.h: Use final instead of override. Made even more

private. Changed return value of finishEncoding to Ref instead of PassRefPtr.

  • platform/efl/PlatformSpeechSynthesisProviderEfl.h: Removed include of PassRefPtr.h.
  • platform/glib/KeyedEncoderGlib.cpp:

(WebCore::KeyedEncoderGlib::finishEncoding): Return RefPtr instead of PassRefPtr.

  • platform/glib/KeyedEncoderGlib.h: Use final instead of override. Made even more

private. Changed return value of finishEncoding to Ref instead of PassRefPtr.

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::outsetSizeForBlur): Simplified, removing unnecessary floating point math.
(WebCore::FilterOperations::FilterOperations): Deleted. Let the compiler generate this.
(WebCore::FilterOperations::operator=): Deleted. Let the compiler generate this.
(WebCore::FilterOperations::operator==): Streamlined.
(WebCore::FilterOperations::operationsMatch): Ditto.
(WebCore::FilterOperations::hasReferenceFilter): Ditto.
(WebCore::FilterOperations::hasOutsets): Ditto.
(WebCore::FilterOperations::outsets): Ditto.
(WebCore::FilterOperations::hasFilterThatAffectsOpacity): Ditto.
(WebCore::FilterOperations::hasFilterThatMovesPixels): Ditto.

  • platform/graphics/filters/FilterOperations.h: Updated for above changes.
  • platform/graphics/FontCache.h: Removed included of PassRefPtr.h.
  • platform/graphics/FontPlatformData.h: Tweaked formatting. Removed nesting

from #if since our formatting makes it hard to see nesting. Let the compiler
generate the default move and copy constructors and assignemnt operators except
in the USE(FREETYPE) case.

  • platform/graphics/GraphicsLayer.h:

(WebCore::AnimationValue::AnimationValue): Updated since clone now returns a Ref
rather than a RefPtr.
(WebCore::FloatAnimationValue::FloatAnimationValue): Deleted. Let the compiler
generate the copy constructor without defining it explicitly.
(WebCore::TransformAnimationValue::TransformAnimationValue): Use a modern for
loop, reserveInitialCapacity, and unchecked append. Also tell the compiler to
generate the move constructor, since the special work is only needed for the
copy constructor.
(WebCore::FilterAnimationValue::FilterAnimationValue): Ditto.
(WebCore::KeyframeValueList::KeyframeValueList): Ditto.

  • platform/graphics/LegacyCDMSession.h: Removed include of PassRefPtr.h.
  • platform/graphics/PathUtilities.cpp:

(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline): Updated
for LengthSize struct.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:

(WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF): Take a reference.
Don't bother setting m_client since we never use it.
(WebCore::CDMSessionAVFoundationCF::generateKeyRequest): Clean up code a bit
by using auto a lot more.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added include

that is now needed since it was removed from the base class. Tidied the class
up a bit, marking it final, making everything private, taking a reference, and
removing an unused data member, m_client.

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::MediaPlayerPrivateAVFoundationCF::createSession): Pass a reference.

  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:

added include of WTFString.h, now needed because of removing an unneeded
include from another header file.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::animationCanBeAccelerated): Updated since trigger
is a raw pointer now.
(WebCore::GraphicsLayerCA::timingFunctionForAnimationValue): Updated to
return a reference rather than a pointer.
(WebCore::GraphicsLayerCA::setAnimationEndpoints): Updated for the above change.
(WebCore::GraphicsLayerCA::setAnimationKeyframes): Ditto.
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Ditto.
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Ditto.
(WebCore::GraphicsLayerCA::setFilterAnimationEndpoints): Ditto.
(WebCore::GraphicsLayerCA::setFilterAnimationKeyframes): Ditto.

  • platform/graphics/ca/GraphicsLayerCA.h: Ditto.
  • platform/ios/PlatformSpeechSynthesizerIOS.mm:

(-[WebSpeechSynthesisWrapper speakUtterance:]): CHanged argument to be a
RefPtr&& instead of a PassRefPtr.

  • platform/mac/ThemeMac.mm:

(WebCore::sizeFromNSControlSize): Updated for LenghtSize struct.
(WebCore::checkboxSize): Ditto.
(WebCore::radioSize): Ditto.
(WebCore::ThemeMac::controlSize): Ditto.
(WebCore::ThemeMac::minimumControlSize): Ditto.

  • platform/mac/WidgetMac.mm:

(WebCore::Widget::setFocus): Updated to pass a reference.

  • platform/mock/DeviceMotionClientMock.cpp: Removed. Unused.
  • platform/mock/DeviceMotionClientMock.h: Removed. Unused.
  • platform/win/CursorWin.cpp:

(WebCore::createSharedCursor): Return a Ref instead of a PassRefPtr.
(WebCore::loadSharedCursor): Ditto.
(WebCore::loadCursorByName): Ditto.

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::output): Removed a no-longer-needed const_cast.
(WebCore::FilterEffectRenderer::outputRect): Ditto.

  • rendering/ImageQualityController.cpp:

(WebCore::ImageQualityController::chooseInterpolationQuality): Tweaked formatting.

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::paintFillLayers): Updated to take a reference. Also
used a vector to iterate the linked list in reverse order instead of recursion.
(WebCore::InlineFlowBox::paintFillLayer): Take a reference.
(WebCore::InlineFlowBox::paintMask):

  • rendering/InlineFlowBox.h: Updated for the above.
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintRootBoxFillLayers): Use auto a bit.
(WebCore::RenderBox::getBackgroundPaintedExtent): Use reference for the layers.
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect): Ditto.
(WebCore::RenderBox::backgroundHasOpaqueTopLayer): Ditto.
(WebCore::RenderBox::paintMaskImages): Ditto.
(WebCore::RenderBox::maskClipRect): Ditto.
(WebCore::RenderBox::paintFillLayers): Ditto.
(WebCore::RenderBox::paintFillLayer): Ditto.
(WebCore::layersUseImage): Ditto.
(WebCore::RenderBox::repaintLayerRectsForImage): Ditto.

  • rendering/RenderBox.h: Updated for the above.
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended): Use reference for
the layers.
(WebCore::RenderBoxModelObject::calculateFillTileSize): Ditto.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Ditto.
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): Ditto.
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground): Ditto.

  • rendering/RenderBoxModelObject.h: Updated for the above.
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::~RenderElement): Use references for the layers.
(WebCore::RenderElement::adjustStyleDifference): Ditto.
(WebCore::RenderElement::updateFillImages): Ditto.
(WebCore::RenderElement::setStyle): Use RenderStyle::replace to replace the
old style with the new style, and get the old one out at the same time.
(WebCore::RenderElement::styleDidChange): Use references for the layers.
(WebCore::mustRepaintFillLayers): Ditto.
(WebCore::RenderElement::repaintAfterLayoutIfNeeded): Ditto.

  • rendering/RenderElement.h: Updated for the above.
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
Refactor so we don't need so many functions in RenderStyle.

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::adjustInnerStyle): Ditto.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::createScrollbar): Pass widget as reference to addChild.
Also did a few other tweaks and used more specific types.

  • rendering/RenderLayerBacking.cpp:

(WebCore::canCreateTiledImage): Updated since layers are references.
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::createScrollbar): Pass widget as reference to addChild.

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBackgroundsBehindCell): Updated to use
references for layers.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle): Use WTFMove to pass a LengthBox.
(WebCore::RenderTheme::isControlStyled): Updated since LengthSize is a struct,
more WTFMove, change since layers are ferences.

  • rendering/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::adjustSizeConstraints): Update for Length and
LengthSize changes.
(WebCore::RenderThemeEfl::paintThemePart): Use reference instead of pointer.
(WebCore::RenderThemeEfl::applyPartDescriptionFallback): Update for Length and
LengthSize changes.
(WebCore::RenderThemeEfl::applyPartDescription): Ditto.
(WebCore::RenderThemeEfl::adjustCheckboxStyle): Ditto.
(WebCore::RenderThemeEfl::adjustRadioStyle): Ditto.

  • rendering/RenderThemeGtk.cpp:

(WebCore::borderRadiiFromStyle): Update for Length and LengthSize changes.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustCheckboxStyle): Update for Length and
LengthSize changes.
(WebCore::RenderThemeIOS::isControlStyled): Ditto.
(WebCore::RenderThemeIOS::adjustRadioStyle): Ditto.
(WebCore::RenderThemeIOS::adjustRoundBorderRadius): Ditto.
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations): Ditto.
(WebCore::RenderThemeIOS::adjustSliderTrackStyle): Ditto.
(WebCore::RenderThemeIOS::adjustSliderThumbSize): Ditto.

  • rendering/RenderWidget.cpp:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): Use move
insteead of swap and modern for loop instead of iterators.
(WebCore::moveWidgetToParentSoon): Take a reference instead of a pointer.
(WebCore::RenderWidget::setWidget): Update for above change.
(WebCore::RenderWidget::find): Take a reference instead of a pointer.

  • rendering/RenderWidget.h: Updated for above changes.
  • rendering/TextAutoSizing.cpp:

(WebCore::TextAutoSizingValue::reset): Updated since Length is passed as
rvalue reference now.

  • rendering/mathml/MathMLStyle.cpp:

(WebCore::MathMLStyle::getMathMLStyle): Updated since mathMLStyle returns
a reference.
(WebCore::MathMLStyle::resolveMathMLStyleTree): Ditto.

  • rendering/mathml/RenderMathMLBlock.h:

(WebCore::RenderMathMLBlock::mathMLStyle): Removed no-longer needed const_cast,
changed to return a reference rather than a pointer.
(WebCore::RenderMathMLTable::mathMLStyle): Ditto.

  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::fractionParameters): Updated since mathMLStyle
returns a reference.
(WebCore::RenderMathMLFraction::stackParameters): Ditto.

  • rendering/mathml/RenderMathMLOperator.h:

(WebCore::RenderMathMLOperator::isLargeOperatorInDisplayStyle): Ditto.
(WebCore::RenderMathMLOperator::shouldMoveLimits): Ditto.

  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::verticalParameters): Ditto.

  • rendering/mathml/RenderMathMLToken.cpp:

(WebCore::RenderMathMLToken::updateMathVariantGlyph): Ditto.

  • rendering/style/BasicShapes.cpp:

(WebCore::floatSizeForLengthSize): Updated for LengthSize struct.

  • rendering/style/BorderData.h:

(WebCore::BorderData::BorderData): Ditto.
(WebCore::BorderData::hasBorderRadius): Ditto.

  • rendering/style/ContentData.cpp:

(WebCore::ContentData::clone): Updated member names.

  • rendering/style/ContentData.h: Ditto.
  • rendering/style/NinePieceImage.cpp:

(WebCore::NinePieceImage::computeSlices): Use initializer lists so we get
move optimization without requiring explicit WTFMove.

  • rendering/style/DataRef.h:

(WebCore::DataRef::DataRef): Removed no-longer needed const_cast.
(WebCore::DataRef::replace): Added. This function is like Ref::replace, and
can be used to put a new value in and get an old value out without running into
the rule Ref has about not being reused once it becomes null because of being
moved out of. This function is a lot like std::exchange.
(WebCore::DataRef::operator const T&): Added operator so we can use these
as references without any function call in read-only contexts.
(WebCore::DataRef::get): Changed to return a reference rather than pointer.
(WebCore::DataRef::access): Ditto.

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeValue::timingFunction): Updated since timingFunction
returns a raw pointer.
(WebCore::KeyframeList::~KeyframeList): Removed unneeded call to clear,
which does things that are redundant since we are about to destroy all the
data members.
(WebCore::KeyframeList::operator==): Tweaked codign style a bit.

  • rendering/style/NinePieceImage.h: Updated most functions in this class

for the changes to DataRef.

  • rendering/style/RenderStyle.cpp: Updated nearly every function in this

class for the changes to DataRef, to eliminate the peculiar naming and use
our standard data member naming, m_memberName in a class, and memberName in a
struct or struct-like class for publicly accessible members, to pass, take,
and return more references and rvalue references, and to use modern for loops.
Other changes listed below function by function.
(WebCore::RenderStyle::defaultStyle): Use NeverDestroyed instead of allocating
on the heap.
(WebCore::RenderStyle::RenderStyle): Added a new constructor that performs
the replace operation, using a combination of DataRef::replace and std::exchange.
(WebCore::RenderStyle::replace): Added. Calls the above constructor.
(WebCore::RenderStyle::setScrollSnapType): Use SET_NESTED_VAR so we get equality
checks on this property, for the normal efficiency benefit.
(WebCore::RenderStyle::setDashboardRegion): Moved this here from the header.
(WebCore::RenderStyle::appendContent): Deleted.
(WebCore::RenderStyle::setContent): Refactored this set of functions to simplify.

  • rendering/style/RenderStyle.h: Updated most functions as mentioned above.

Also updated macros to use the do/while(0) technique. Removed the long list of
friend classes with the elaborate comments; turned out none needed friendship
despite the comments. Made more things private. Moved large functions out of the
class definition.
(WebCore::RenderStyle::getTextShadowExtent): Deleted.
(WebCore::RenderStyle::getTextShadowHorizontalExtent): Deleted.
(WebCore::RenderStyle::getTextShadowVerticalExtent): Deleted.
(WebCore::RenderStyle::aspectRatio): Deleted.
(WebCore::RenderStyle::alignContentPosition): Deleted.
(WebCore::RenderStyle::alignContentDistribution): Deleted.
(WebCore::RenderStyle::alignContentOverflowAlignment): Deleted.
(WebCore::RenderStyle::alignItemsPosition): Deleted.
(WebCore::RenderStyle::alignItemsOverflowAlignment): Deleted.
(WebCore::RenderStyle::alignSelfPosition): Deleted.
(WebCore::RenderStyle::alignSelfOverflowAlignment): Deleted.
(WebCore::RenderStyle::justifyContentPosition): Deleted.
(WebCore::RenderStyle::justifyContentDistribution): Deleted.
(WebCore::RenderStyle::justifyContentOverflowAlignment): Deleted.
(WebCore::RenderStyle::justifyItemsPosition): Deleted.
(WebCore::RenderStyle::justifyItemsOverflowAlignment): Deleted.
(WebCore::RenderStyle::justifyItemsPositionType): Deleted.
(WebCore::RenderStyle::justifySelfPosition): Deleted.
(WebCore::RenderStyle::justifySelfOverflowAlignment): Deleted.
(WebCore::RenderStyle::setAlignContentPosition): Deleted.
(WebCore::RenderStyle::setAlignContentOverflow): Deleted.
(WebCore::RenderStyle::setAlignContentDistribution): Deleted.
(WebCore::RenderStyle::setAlignItemsOverflow): Deleted.
(WebCore::RenderStyle::setAlignSelfOverflow): Deleted.
(WebCore::RenderStyle::setJustifyContentOverflow): Deleted.
(WebCore::RenderStyle::setJustifyContentDistribution): Deleted.
(WebCore::RenderStyle::setJustifyItemsPosition): Deleted.
(WebCore::RenderStyle::setJustifyItemsOverflow): Deleted.
(WebCore::RenderStyle::setJustifyItemsPositionType): Deleted.
(WebCore::RenderStyle::setJustifySelfPosition): Deleted.
(WebCore::RenderStyle::setJustifySelfOverflow): Deleted.
(WebCore::RenderStyle::noninheritedFlagsMemoryOffset): Deleted.

  • rendering/style/SVGRenderStyle.cpp: Similar changes to RenderStyle.cpp above.
  • rendering/style/SVGRenderStyle.h: Ditto.
  • rendering/style/ShapeValue.h:

(WebCore::ShapeValue::create): Take a Ref&& instead of a RefPtr.
(WebCore::ShapeValue::ShapeValue): Ditto.

  • rendering/style/StyleBackgroundData.cpp: Update data member names.
  • rendering/style/StyleBackgroundData.h: Ditto; make them public and remove the

getter functions.

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::cssValue): Removed no-longer-needed const_cast.

  • rendering/style/StyleCustomPropertyData.h: Update data member names.

(WebCore::StyleCustomPropertyData::operator==): Removed unnecessary reference
count churn.
(WebCore::StyleCustomPropertyData::setCustomPropertyValue): Take an rvalue
reference.
(WebCore::StyleCustomPropertyData::getCustomPropertyValue): Deleted.
(WebCore::StyleCustomPropertyData::values): Deleted.
(WebCore::StyleCustomPropertyData::hasCustomProperty): Deleted.
(WebCore::StyleCustomPropertyData::containsVariables): Deleted.
(WebCore::StyleCustomPropertyData::setContainsVariables): Deleted.

  • rendering/style/StyleFilterData.cpp: Update data member names.
  • rendering/style/StyleFilterData.h: Ditto.
  • rendering/style/StyleFlexibleBoxData.cpp: Ditto.
  • rendering/style/StyleFlexibleBoxData.h: Ditto.
  • rendering/style/StyleGridData.cpp: Ditto.
  • rendering/style/StyleGridData.h: Ditto.
  • rendering/style/StyleGridItemData.cpp: Ditto.
  • rendering/style/StyleGridItemData.h: Ditto.
  • rendering/style/StyleGeneratedImage.cpp:

(WebCore::StyleGeneratedImage::cssValue): Removed no-longer-needed const_cast.
(WebCore::StyleGeneratedImage::imageSize): Ditto.
(WebCore::StyleGeneratedImage::image): Ditto.

  • rendering/style/StyleInheritedData.cpp: Update data member names.
  • rendering/style/StyleInheritedData.h: Ditto.
  • rendering/style/StyleRareInheritedData.cpp: Ditto.
  • rendering/style/StyleRareInheritedData.h: Ditto.
  • rendering/style/StyleMultiColData.cpp: Ditto.
  • rendering/style/StyleMultiColData.h: Ditto.
  • rendering/style/StyleRareNonInheritedData.cpp: Ditto.
  • rendering/style/StyleRareNonInheritedData.h: Ditto.
  • rendering/style/StyleTransformData.cpp: Ditto.
  • rendering/style/StyleTransformData.h: Ditto.
  • rendering/style/StyleVisualData.cpp: Ditto.
  • rendering/style/StyleVisualData.h: Ditto.
  • style/StylePendingResources.cpp:

(WebCore::Style::loadPendingResources): Update since layers are references.

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(NetscapePluginWidget::handleEvent): Pass a reference.

  • WebView/WebView.mm:

(-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
Updated since the children set now contains Ref instead of RefPtr.

Source/WebKit2:

  • Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:

(IPC::ArgumentCoder<TextureMapperAnimation>::encode): Updated since timing function
returns a raw pointer.
(IPC::ArgumentCoder<TextureMapperAnimation>::decode): Updated since timing function
setters now takes an rvalue reference.

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:

(WebKit::PDFPlugin::createScrollbar): Updated since addChild now takes a reference.

Source/WTF:

  • wtf/Ref.h: Changed the template so that a const Ref<T> does not prohibit non-const

use of T. We can still use const Ref<const T> to express that. The earlier design
was intentional, but was not consistent with either actual references or with
other smart pointer classes like RefPtr. One way to see how much better this is,
is to see all the many, many cases where we have const_cast just to work around
this. I searched for those and included fixes for many in this patch.

7:17 PM Changeset in webkit [210757] by commit-queue@webkit.org
  • 4 edits in trunk

26 MotionMark performance tests failing
https://bugs.webkit.org/show_bug.cgi?id=166854

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-01-13
Reviewed by Ryosuke Niwa.
PerformanceTests:

Skip running MotionMark on WebKit perf bots.

  • Skipped:

Tools:

Unrelated change. This is the last place that we need to rename Animometer
to MotionMark.

  • Scripts/webkitpy/common/config/watchlist:
7:07 PM Changeset in webkit [210756] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: the 'lock' icon for non-editable rules in the Style Rules sidebar lacks a tooltip
https://bugs.webkit.org/show_bug.cgi?id=166909
<rdar://problem/29959406>

Reviewed by Matt Baker.

Convert the lock icon from a pseudo-element to an 'img' element and add a title attribute.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/CSSStyleDeclarationSection.css:

(.style-declaration-section.locked > .header > .locked-icon):
(.style-declaration-section.locked > .header::before): Deleted.

  • UserInterface/Views/CSSStyleDeclarationSection.js:

(WebInspector.CSSStyleDeclarationSection):

6:53 PM Changeset in webkit [210755] by rniwa@webkit.org
  • 23 edits in trunk/Websites/perf.webkit.org

Instrument calls to render()
https://bugs.webkit.org/show_bug.cgi?id=167037

Reviewed by Sam Weinig.

Wrap every call to render() by newly added ComponentBase.updateRendering() to instrument it.
Also, use arrow functions instead of this.render.bind or regular closures for simplicity.

Currently, we're making 5100 calls to render() while opening the summary page, and that's way too high.

  • public/v3/components/analysis-results-viewer.js:

(AnalysisResultsViewer.prototype._expandBetween):

  • public/v3/components/bar-graph-group.js:

(BarGraphGroup.prototype.updateGroupRendering): Renamed form render() as BarGraphGroup is not a component.

  • public/v3/components/base.js:

(ComponentBase.prototype.updateRendering): Added. Instruments render() call.

  • public/v3/components/chart-pane-base.js:

(ChartPaneBase.prototype.fetchAnalysisTasks):
(ChartPaneBase.prototype._mainSelectionDidZoom):
(ChartPaneBase.prototype._updateStatus):
(ChartPaneBase.prototype._requestOpeningCommitViewer):
(ChartPaneBase.prototype._keyup):
(ChartPaneBase.prototype.render):

  • public/v3/components/commit-log-viewer.js:
  • public/v3/components/customizable-test-group-form.js:

(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype._customize):

  • public/v3/components/editable-text.js:

(EditableText.prototype._didUpdate):

  • public/v3/components/pane-selector.js:

(PaneSelector.prototype._selectedItem):

  • public/v3/components/results-table.js:

(ResultsTable.prototype.render):

  • public/v3/components/time-series-chart.js:

(TimeSeriesChart._renderEnqueuedCharts):

  • public/v3/pages/analysis-category-page.js:

(AnalysisCategoryPage.prototype.open):
(AnalysisCategoryPage.prototype.updateFromSerializedState):
(AnalysisCategoryPage.prototype.filterDidChange):
(AnalysisCategoryPage.prototype.render):

  • public/v3/pages/analysis-task-page.js:

(AnalysisTaskChartPane.prototype._updateStatus):
(AnalysisTaskPage.prototype.updateFromSerializedState):
(AnalysisTaskPage.prototype._didFetchTask):
(AnalysisTaskPage.prototype._didFetchRelatedAnalysisTasks):
(AnalysisTaskPage.prototype._didFetchMeasurement):
(AnalysisTaskPage.prototype._didFetchTestGroups):
(AnalysisTaskPage.prototype._showAllTestGroups):
(AnalysisTaskPage.prototype._didFetchAnalysisResults):
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._renderTestGroupList.):
(AnalysisTaskPage.prototype._renderTestGroupList):
(AnalysisTaskPage.prototype._createTestGroupListItem):
(AnalysisTaskPage.prototype._showTestGroup):
(AnalysisTaskPage.prototype._didStartEditingTaskName):
(AnalysisTaskPage.prototype._updateTaskName):
(AnalysisTaskPage.prototype._updateTestGroupName):
(AnalysisTaskPage.prototype._hideCurrentTestGroup):
(AnalysisTaskPage.prototype._updateChangeType):
(AnalysisTaskPage.prototype._associateBug):
(AnalysisTaskPage.prototype._dissociateBug):
(AnalysisTaskPage.prototype._associateCommit):
(AnalysisTaskPage.prototype._dissociateCommit):
(AnalysisTaskPage.prototype._chartSelectionDidChange):
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer):

  • public/v3/pages/build-request-queue-page.js:

(BuildRequestQueuePage.prototype.open.):
(BuildRequestQueuePage.prototype.open):

  • public/v3/pages/chart-pane.js:

(ChartPane.prototype.setOpenRepository):
(ChartPane.prototype._trendLineTypeDidChange):
(ChartPane.prototype._updateTrendLine):

  • public/v3/pages/charts-page.js:

(ChartsPage.prototype.updateFromSerializedState):
(ChartsPage.prototype._updateDomainsFromSerializedState):
(ChartsPage.prototype.setNumberOfDaysFromToolbar):
(ChartsPage.prototype._didMutatePaneList):
(ChartsPage.prototype.render):

  • public/v3/pages/charts-toolbar.js:

(ChartsToolbar.prototype.render):

  • public/v3/pages/create-analysis-task-page.js:

(CreateAnalysisTaskPage.prototype.updateFromSerializedState):

  • public/v3/pages/dashboard-page.js:

(DashboardPage.prototype.updateFromSerializedState):
(DashboardPage.prototype._fetchedData):

  • public/v3/pages/heading.js:

(Heading.prototype.render):

  • public/v3/pages/page-with-heading.js:

(PageWithHeading.prototype.render):

  • public/v3/pages/page.js:

(Page.prototype.open):

  • public/v3/pages/summary-page.js:

(SummaryPage.prototype.open):
(SummaryPage.prototype.this._renderQueue.push):
(SummaryPage):
(SummaryPage.prototype._renderCell):

5:32 PM Changeset in webkit [210754] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking inspector/worker/debugger-scripts.html as flaky on macOS.
https://trac.webkit.org/changeset/209517

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:05 PM Changeset in webkit [210753] by Chris Dumez
  • 19 edits
    3 copies
    1 add in trunk/Source

[WK2] Add diagnostic logging to measure WebGL usage
https://bugs.webkit.org/show_bug.cgi?id=166730
<rdar://problem/29883469>

Reviewed by Alex Christensen.

Add diagnostic logging to measure high performance WebGL usage. We report
at regular intervals in which WebGL state Safari is:

  • Inactive
  • ActiveInForegroundTab
  • ActiveInBackgroundTabOnly

This should give us an estimate of:

  • What % of the time is Safari using high performance graphics
  • What % of this time is only due to background tabs

Source/WebCore:

No new tests, no Web-facing behavior change.

  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
(WebCore::WebGLRenderingContextBase::registerWithWebGLStateTracker):

  • html/canvas/WebGLRenderingContextBase.h:
  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::inactiveKey):
(WebCore::DiagnosticLoggingKeys::activeInForegroundTabKey):
(WebCore::DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey):
(WebCore::DiagnosticLoggingKeys::stateKey):
(WebCore::WebCore::DiagnosticLoggingKeys::webGLKey):

  • page/DiagnosticLoggingKeys.h:
  • page/Page.cpp:

(WebCore::Page::Page):

  • page/Page.h:

(WebCore::Page::webGLStateTracker):

  • page/PageConfiguration.cpp:
  • page/PageConfiguration.h:
  • platform/WebGLStateTracker.cpp: Copied from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.

(WebCore::WebGLStateTracker::WebGLStateTracker):
(WebCore::m_stateChangeHandler):
(WebCore::WebGLStateTracker::updateWebGLState):

  • platform/WebGLStateTracker.h: Copied from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
  • platform/graphics/GraphicsContext3DAttributes.h:

Source/WebKit2:

  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp: Added.

(WebKit::HighPerformanceGraphicsUsageSampler::HighPerformanceGraphicsUsageSampler):
(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

  • UIProcess/HighPerformanceGraphicsUsageSampler.h: Copied from Source/WebCore/platform/graphics/GraphicsContext3DAttributes.h.
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::setIsUsingHighPerformanceWebGL):
(WebKit::WebPageProxy::isUsingHighPerformanceWebGL):

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::m_highPerformanceGraphicsUsageSampler):

  • UIProcess/WebProcessPool.h:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userInterfaceLayoutDirection):

5:03 PM Changeset in webkit [210752] by Ryan Haddad
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r210735.

This change introduced LayoutTest and JSC test flakiness.

Reverted changeset:

"Reserve capacity for StringBuilder in unescape"
https://bugs.webkit.org/show_bug.cgi?id=167008
http://trac.webkit.org/changeset/210735

4:46 PM Changeset in webkit [210751] by Chris Dumez
  • 1 edit
    8 adds in trunk/LayoutTests/imported/w3c

Import innerText/ w3c web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=167024

Reviewed by Alex Christensen.

Import innerText/ w3c web-platform-tests from upstream 4b4b2eeb.

  • web-platform-tests/innerText/getter-expected.txt: Added.
  • web-platform-tests/innerText/getter-tests.js: Added.

(CSS.supports):

  • web-platform-tests/innerText/getter.html: Added.
  • web-platform-tests/innerText/setter-expected.txt: Added.
  • web-platform-tests/innerText/setter-tests.js: Added.

(string_appeared_here.forEach):

  • web-platform-tests/innerText/setter.html: Added.
  • web-platform-tests/innerText/w3c-import.log: Added.
4:36 PM Changeset in webkit [210750] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Avoid nullptr frame dereference when scrollTo is called on a disconnected DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=167030
<rdar://problem/29995070>

Reviewed by Dean Jackson.

Correct DOMWindow::scrollTo to match all other functions in the class so that the it
checks that the current frame is valid before attempting to use it.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::scrollTo):

4:16 PM Changeset in webkit [210749] by Chris Dumez
  • 4 edits
    10 adds in trunk/LayoutTests/imported/w3c

Resync domparsing/ web-platform-tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=167023

Reviewed by Alex Christensen.

Resync domparsing/ web-platform-tests from upstream 4b4b2eeb.

  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-doctype-expected.txt: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-doctype.html: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml-expected.txt: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-xml.html: Added.
  • web-platform-tests/domparsing/XMLSerializer-serializeToString-expected.txt: Added.
  • web-platform-tests/domparsing/XMLSerializer-serializeToString.html: Added.
  • web-platform-tests/domparsing/createContextualFragment-expected.txt:
  • web-platform-tests/domparsing/createContextualFragment.html:
  • web-platform-tests/domparsing/insert_adjacent_html-xhtml-expected.txt: Added.
  • web-platform-tests/domparsing/insert_adjacent_html-xhtml.xhtml: Added.
  • web-platform-tests/domparsing/style_attribute_html-expected.txt: Added.
  • web-platform-tests/domparsing/style_attribute_html.html: Added.
  • web-platform-tests/domparsing/w3c-import.log:
3:46 PM Changeset in webkit [210748] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Use a strong reference when calling callOnMainThread to schedule events in AudioScheduledSourceNode.
https://bugs.webkit.org/show_bug.cgi?id=166983

Reviewed by Brent Fulgham.

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::finish):

  • Modules/webaudio/AudioScheduledSourceNode.h:
3:42 PM Changeset in webkit [210747] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Protect MediaPlayer from being destroyed mid-load()
https://bugs.webkit.org/show_bug.cgi?id=166976

Reviewed by Eric Carlson.

It's possible for a message sent by MediaPlayer to HTMLMediaElement to cause
MediaPlayer to be destroyed before MediaPlayer::load() completes. We have
previously protected against this same problem in HTMLMediaElement::loadResource()
by ref'ing at the beginning of the function and deref'ing on exit. To do the
same in MediaPlayer, it must become RefCounted.

To keep the same semantics about m_client in MediaPlayer (always available without
requiring a null-check), make a new static MediaPlayerClient object which can
replace the real (HTMLMediaElement) client when the MediaPlayer is invalidated.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::createMediaPlayer):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::nullMediaPlayerClient):
(WebCore::MediaPlayer::create):
(WebCore::MediaPlayer::MediaPlayer):
(WebCore::MediaPlayer::invalidate):
(WebCore::MediaPlayer::load):
(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::inMediaDocument):
(WebCore::MediaPlayer::fullscreenMode):
(WebCore::MediaPlayer::requestedRate):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::cachedKeyForKeyId):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::mediaKeysStorageDirectory):
(WebCore::MediaPlayer::referrer):
(WebCore::MediaPlayer::userAgent):
(WebCore::MediaPlayer::graphicsDeviceAdapter):
(WebCore::MediaPlayer::cachedResourceLoader):
(WebCore::MediaPlayer::createResourceLoader):
(WebCore::MediaPlayer::addAudioTrack):
(WebCore::MediaPlayer::removeAudioTrack):
(WebCore::MediaPlayer::addTextTrack):
(WebCore::MediaPlayer::removeTextTrack):
(WebCore::MediaPlayer::addVideoTrack):
(WebCore::MediaPlayer::removeVideoTrack):
(WebCore::MediaPlayer::outOfBandTrackSources):
(WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::MediaPlayer::handlePlaybackCommand):
(WebCore::MediaPlayer::sourceApplicationIdentifier):
(WebCore::MediaPlayer::preferredAudioCharacteristics):
(WebCore::MediaPlayer::doesHaveAttribute):
(WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
(WebCore::MediaPlayer::getRawCookies):
(WebCore::MediaPlayer::shouldDisableSleep):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayer::platformVolumeConfigurationRequired):
(WebCore::MediaPlayer::client):

3:39 PM Changeset in webkit [210746] by ggaren@apple.com
  • 12 edits
    2 adds in trunk/Source/bmalloc

bmalloc: Use a separate zone when using system malloc
https://bugs.webkit.org/show_bug.cgi?id=167014

Reviewed by Filip Pizlo.

Harris asked for this so he could separate Safari and WebKit memory use
when doing memory analysis.

This patch adds an explicit DebugHeap class that contains all our
code for specialized allocation with debugging.

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

(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::tryAllocate):
(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::allocateSlowCase):

  • bmalloc/Allocator.h: Forward to DebugHeap instead of inlining all the

code. This is required for our new interface, and it is also a nice
simplification that moves some not-very-important code out of the way.

  • bmalloc/Deallocator.cpp:

(bmalloc::Deallocator::Deallocator):
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::deallocateSlowCase):

  • bmalloc/Deallocator.h: Ditto.
  • bmalloc/DebugHeap.cpp: Added.

(bmalloc::DebugHeap::DebugHeap):
(bmalloc::DebugHeap::malloc):
(bmalloc::DebugHeap::memalign):
(bmalloc::DebugHeap::realloc):
(bmalloc::DebugHeap::free):

  • bmalloc/DebugHeap.h: Added. New class for overriding normal heap

behavior. Right now, it just adds a malloc zone and then forwards to
system malloc -- but we can add lots more kinds of debug heaps in the
future if we find them useful.

  • bmalloc/Environment.cpp:

(bmalloc::Environment::Environment):
(bmalloc::Environment::computeIsDebugHeapEnabled):
(bmalloc::Environment::computeIsBmallocEnabled): Deleted.

  • bmalloc/Environment.h:

(bmalloc::Environment::isDebugHeapEnabled):
(bmalloc::Environment::isBmallocEnabled): Deleted. Renamed everything to
reflect our new use of DebugHeap.

  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):

  • bmalloc/Heap.h:

(bmalloc::Heap::debugHeap): Updated to use DebugHeap.
(bmalloc::Heap::environment): Deleted.

  • bmalloc/bmalloc.h:

(bmalloc::api::isEnabled): Updated to use DebugHeap.

3:30 PM Changeset in webkit [210745] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Initialize the ArraySpecies watchpoint as Clear and transition to IsWatched once slice is called for the first time
https://bugs.webkit.org/show_bug.cgi?id=167017
<rdar://problem/30019309>

Reviewed by Keith Miller and Filip Pizlo.

This patch is to reverse the JSBench regression from r210695.

The new state diagram for the array species watchpoint is as
follows:

  1. On GlobalObject construction, it starts life out as ClearWatchpoint.
  2. When slice is called for the first time, we observe the state

of the world, and either transition it to IsWatched if we were able
to set up the object property conditions, or to IsInvalidated if we
were not.

  1. The DFG compiler will now only lower slice as an intrinsic if

it observed the speciesWatchpoint.state() as IsWatched.

  1. The IsWatched => IsInvalidated transition happens only when

one of the object property condition watchpoints fire.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • runtime/ArrayPrototype.cpp:

(JSC::speciesWatchpointIsValid):
(JSC::speciesConstructArray):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::ArrayPrototype::tryInitializeSpeciesWatchpoint):
(JSC::ArrayPrototype::initializeSpeciesWatchpoint): Deleted.

  • runtime/ArrayPrototype.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):

3:02 PM Changeset in webkit [210744] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

3:01 PM Changeset in webkit [210743] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.20

New tag.

1:27 PM Changeset in webkit [210742] by eric.carlson@apple.com
  • 12 edits
    1 copy
    3 adds in trunk

[MediaStream, Mac] Add mock audio source
https://bugs.webkit.org/show_bug.cgi?id=166974

Reviewed by Jer Noble.
Source/WebCore:

Add a mock audio source for testing media streams.

No new tests, updated webaudio/mediastreamaudiosourcenode.html.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSample):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):

  • platform/mediastream/mac/AVAudioCaptureSource.h:

(WebCore::AVAudioCaptureSource::Observer::~Observer): Deleted.

  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSource::addObserver):
(WebCore::AVAudioCaptureSource::removeObserver):
(WebCore::AVAudioCaptureSource::start):

  • platform/mediastream/mac/MockRealtimeAudioSourceMac.h: Added.
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm: Added.

(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac):
(WebCore::MockRealtimeAudioSource::createMuted):
(WebCore::MockRealtimeAudioSourceMac::addObserver):
(WebCore::MockRealtimeAudioSourceMac::removeObserver):
(WebCore::MockRealtimeAudioSourceMac::start):
(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
(WebCore::MockRealtimeAudioSourceMac::render):
(WebCore::MockRealtimeAudioSourceMac::applySampleRate):
(WebCore::MockRealtimeAudioSourceMac::audioSourceProvider):

  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::create):
(WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::WebAudioSourceProviderAVFObjC::startProducingData): Deleted.
(WebCore::WebAudioSourceProviderAVFObjC::stopProducingData): Deleted.

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::startProducingData):
(WebCore::MockRealtimeAudioSource::stopProducingData):
(WebCore::MockRealtimeAudioSource::elapsedTime):
(WebCore::MockRealtimeAudioSource::tick):

  • platform/mock/MockRealtimeAudioSource.h:

(WebCore::MockRealtimeAudioSource::render):
(WebCore::MockRealtimeAudioSource::renderInterval):
(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource): Deleted.

LayoutTests:

  • webaudio/mediastreamaudiosourcenode-expected.txt:
  • webaudio/mediastreamaudiosourcenode.html:
1:19 PM Changeset in webkit [210741] by weinig@apple.com
  • 22 edits
    2 deletes in trunk

[WebIDL] Remove custom bindings for DeviceMotionEvent and DeviceOrientationEvent
https://bugs.webkit.org/show_bug.cgi?id=167006

Reviewed by Geoffrey Garen.

Source/WebCore:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDeviceMotionEventCustom.cpp: Removed.
  • bindings/js/JSDeviceOrientationEventCustom.cpp: Removed.

Remove Custom bindings files.

  • dom/DeviceMotionData.cpp:

(WebCore::DeviceMotionData::create):
(WebCore::DeviceMotionData::DeviceMotionData):
(WebCore::DeviceMotionData::Acceleration::create): Deleted.
(WebCore::DeviceMotionData::Acceleration::Acceleration): Deleted.
(WebCore::DeviceMotionData::RotationRate::create): Deleted.
(WebCore::DeviceMotionData::RotationRate::RotationRate): Deleted.

  • dom/DeviceMotionData.h:

(WebCore::DeviceMotionData::Acceleration::create):
(WebCore::DeviceMotionData::Acceleration::x):
(WebCore::DeviceMotionData::Acceleration::y):
(WebCore::DeviceMotionData::Acceleration::z):
(WebCore::DeviceMotionData::Acceleration::Acceleration):
(WebCore::DeviceMotionData::RotationRate::create):
(WebCore::DeviceMotionData::RotationRate::alpha):
(WebCore::DeviceMotionData::RotationRate::beta):
(WebCore::DeviceMotionData::RotationRate::gamma):
(WebCore::DeviceMotionData::RotationRate::RotationRate):
(WebCore::DeviceMotionData::interval):
(WebCore::DeviceMotionData::Acceleration::canProvideX): Deleted.
(WebCore::DeviceMotionData::Acceleration::canProvideY): Deleted.
(WebCore::DeviceMotionData::Acceleration::canProvideZ): Deleted.
(WebCore::DeviceMotionData::RotationRate::canProvideAlpha): Deleted.
(WebCore::DeviceMotionData::RotationRate::canProvideBeta): Deleted.
(WebCore::DeviceMotionData::RotationRate::canProvideGamma): Deleted.
(WebCore::DeviceMotionData::canProvideInterval): Deleted.
Re-work using std::optional rather than an explicit bool/value pair.

  • dom/DeviceMotionEvent.cpp:

(WebCore::convert):
(WebCore::DeviceMotionEvent::acceleration):
(WebCore::DeviceMotionEvent::accelerationIncludingGravity):
(WebCore::DeviceMotionEvent::rotationRate):
(WebCore::DeviceMotionEvent::interval):
(WebCore::DeviceMotionEvent::initDeviceMotionEvent):

  • dom/DeviceMotionEvent.h:

Implement IDL interface. For now, we have duplicate structs for
Acceleration and RotationRate (one here, one in DeviceMotionData)
which can be consolidated in the future.

  • dom/DeviceMotionEvent.idl:

Add dictionaries for Acceleration and RotationRate, and update IDL to
specify the correct nullability of attributes and arguments.

  • dom/DeviceOrientationData.cpp:

(WebCore::DeviceOrientationData::create):
(WebCore::DeviceOrientationData::DeviceOrientationData):
(WebCore::DeviceOrientationData::alpha): Deleted.
(WebCore::DeviceOrientationData::beta): Deleted.
(WebCore::DeviceOrientationData::gamma): Deleted.
(WebCore::DeviceOrientationData::absolute): Deleted.
(WebCore::DeviceOrientationData::canProvideAlpha): Deleted.
(WebCore::DeviceOrientationData::canProvideBeta): Deleted.
(WebCore::DeviceOrientationData::canProvideGamma): Deleted.
(WebCore::DeviceOrientationData::compassHeading): Deleted.
(WebCore::DeviceOrientationData::compassAccuracy): Deleted.
(WebCore::DeviceOrientationData::canProvideCompassHeading): Deleted.
(WebCore::DeviceOrientationData::canProvideCompassAccuracy): Deleted.
(WebCore::DeviceOrientationData::canProvideAbsolute): Deleted.

  • dom/DeviceOrientationData.h:

(WebCore::DeviceOrientationData::create):
(WebCore::DeviceOrientationData::alpha):
(WebCore::DeviceOrientationData::beta):
(WebCore::DeviceOrientationData::gamma):
(WebCore::DeviceOrientationData::compassHeading):
(WebCore::DeviceOrientationData::compassAccuracy):
(WebCore::DeviceOrientationData::absolute):
Re-work using std::optional rather than an explicit bool/value pair.

  • dom/DeviceOrientationEvent.cpp:

(WebCore::DeviceOrientationEvent::alpha):
(WebCore::DeviceOrientationEvent::beta):
(WebCore::DeviceOrientationEvent::gamma):
(WebCore::DeviceOrientationEvent::compassHeading):
(WebCore::DeviceOrientationEvent::compassAccuracy):
(WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
(WebCore::DeviceOrientationEvent::absolute):

  • dom/DeviceOrientationEvent.h:

Implement IDL interface.

  • dom/DeviceOrientationEvent.idl:

Update IDL to specify the correct nullability of attributes and arguments.

  • platform/ios/DeviceMotionClientIOS.mm:

(WebCore::DeviceMotionClientIOS::motionChanged):

  • platform/ios/DeviceOrientationClientIOS.mm:

(WebCore::DeviceOrientationClientIOS::orientationChanged):
Update for use of std:optional.

Source/WebKit/mac:

  • WebView/WebDeviceOrientation.mm:

(convert):
(-[WebDeviceOrientation initWithCanProvideAlpha:alpha:canProvideBeta:beta:canProvideGamma:gamma:]):
Update for new use of std::optional.

LayoutTests:

  • fast/dom/DeviceMotion/optional-event-properties-expected.txt:
  • fast/dom/DeviceMotion/script-tests/optional-event-properties.js:

Update test to account for slightly stricter, but more consistent IDL conversion rules.

12:53 PM Changeset in webkit [210740] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

[GStreamer] Cache the accelerated capability of MediaPlayerClient in MediaPlayerPrivateGStreamerBase
https://bugs.webkit.org/show_bug.cgi?id=167015

Reviewed by Jer Noble.

In MediaPlayerPrivateGStreamerBase, avoid continuously querying the MediaPlayerClient
object about the accelerated compositing capabilities. Instead, cache this information
when creating the video sink (which is most affected by this information anyway), storing
it in a new protected boolean member variable in the MediaPlayerPrivateGStreamerBase class.

All calls to MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated() and
MediaPlayerClient::mediaPlayerAcceleratedCompositingEnabled() are replaced by tests
on the value of this new member variable.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
11:18 AM Changeset in webkit [210739] by matthew_hanson@apple.com
  • 12 edits in branches/safari-603-branch/Source/WebKit2

Roll out r209189 via r210726. rdar://problem/29428877

11:18 AM Changeset in webkit [210738] by matthew_hanson@apple.com
  • 9 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r210694. rdar://problem/29983526

11:16 AM Changeset in webkit [210737] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

Defer use of autoplay heuristics to clients
https://bugs.webkit.org/show_bug.cgi?id=167010

Patch by Matt Rajca <mrajca@apple.com> on 2017-01-13
Reviewed by Alex Christensen.

Switch the autoplay policy tristate to an on/off option since clients should run any
heuristics and simply send their final decision to WebKit.

  • Shared/WebsitePolicies.h:

(WebKit::WebsitePolicies::encode):
(WebKit::WebsitePolicies::decode):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesGetAutoplayEnabled):
(WKWebsitePoliciesSetAutoplayEnabled):
(WKWebsitePoliciesGetAutoplayPolicy): Replaced.
(WKWebsitePoliciesSetAutoplayPolicy): Replaced.

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setAutoplayEnabled:]):
(-[_WKWebsitePolicies autoplayEnabled]):
(-[_WKWebsitePolicies setAutoplayPolicy:]): Replaced.
(-[_WKWebsitePolicies autoplayPolicy]): Replaced.

11:00 AM Changeset in webkit [210736] by Yusuke Suzuki
  • 2 edits in trunk/Tools

run-jsc-benchmarks' echo should have -e option
https://bugs.webkit.org/show_bug.cgi?id=167009

Reviewed by Sam Weinig.

echo requires -e option to use escape sequence.
Without it, in some environment (in my Fedora 25), the escape sequence is not
recognized and just dumped as \c etc.

  • Scripts/run-jsc-benchmarks:
10:30 AM Changeset in webkit [210735] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Reserve capacity for StringBuilder in unescape
https://bugs.webkit.org/show_bug.cgi?id=167008

Reviewed by Sam Weinig.

unescape function is frequently called in Kraken sha256-iterative.
This patch just reserves the capacity for the StringBuilder.

Currently, we select the length of the string for the reserved capacity.
It improves the performance 2.73%.

Benchmark report for Kraken on sakura-trick.

VMs tested:
"baseline" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/untot/Release/bin/jsc
"patched" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/un/Release/bin/jsc

Collected 100 samples per benchmark/VM, with 100 VM invocations per benchmark. Emitted a call to gc() between
sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used the jsc-specific preciseTime()
function to get microsecond-level timing. Reporting benchmark execution times with 95% confidence intervals in
milliseconds.

baseline patched

stanford-crypto-sha256-iterative 51.609+-0.672 50.237+-0.860 might be 1.0273x faster

<arithmetic> 51.609+-0.672 50.237+-0.860 might be 1.0273x faster

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncUnescape):

10:09 AM Changeset in webkit [210734] by Michael Catanzaro
  • 2 edits in trunk

[CMake] Clean up SHARED_CORE option
https://bugs.webkit.org/show_bug.cgi?id=167004

Reviewed by Alex Christensen.

  • CMakeLists.txt:
9:54 AM Changeset in webkit [210733] by Chris Dumez
  • 10 edits
    3 adds in trunk/Source/WebCore

Report post-page load CPU usage using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=166950
<rdar://problem/30014496>

Reviewed by Alex Christensen.

Shortly after page load (5 seconds), we measure the WebContent process'
CPU usage over 10 seconds and report the percentage back via release
logging. We also log the percentage using diagnostic logging using the
following buckets:

  • Below 10%
  • 10 to 20%
  • 20 to 40%
  • 60 to 80%
  • Over 80%

The logging works on both Mac and iOS. I verified that I get results
consistent with Activity Monitor or top.

No new tests, no Web-facing behavior change, only extra logging.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::postPageLoadKey):
(WebCore::DiagnosticLoggingKeys::cpuUsageKey):

  • page/DiagnosticLoggingKeys.h:
  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::didFinishLoad):
(WebCore::cpuUsageToDiagnosticLogginKey):
(WebCore::Page::measurePostLoadCPUUsage):

  • page/Page.h:
  • page/Settings.cpp:

(WebCore::Settings::isPostLoadCPUUsageMeasurementEnabled):

  • page/Settings.h:
  • platform/CPUTime.cpp: Added.

(WebCore::getCPUTime):
(WebCore::CPUTime::percentageCPUUsageSince):

  • platform/CPUTime.h: Added.
  • platform/cocoa/CPUTimeCocoa.mm: Added.

(WebCore::timeValueToMicroseconds):
(WebCore::getCPUTime):

9:54 AM Changeset in webkit [210732] by Michael Catanzaro
  • 5 edits in trunk/Source/WebCore

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

Caused many layout test timeouts on GTK+ bots

Reverted changeset:

"Protect MediaPlayer from being destroyed mid-load()"
https://bugs.webkit.org/show_bug.cgi?id=166976
http://trac.webkit.org/changeset/210677

9:23 AM Changeset in webkit [210731] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Added preprocessor guard for iOS-specific piece of code in GraphicsContext3DOpenGL
https://bugs.webkit.org/show_bug.cgi?id=167005

Reviewed by Alex Christensen.

Variable "boundFrameBuffer" is used only in iOS-specific code

No new tests needed.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):

6:26 AM Changeset in webkit [210730] by eric.carlson@apple.com
  • 6 edits in trunk

REGRESSION (r210621): [mac-wk2] LayoutTest fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html timing out
https://bugs.webkit.org/show_bug.cgi?id=166980
Source/WebCore:

Unreviewed, fix test broken by r210621.

No new tests, updated fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html
and results.

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

(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):

Drive-by fix: null-check parent.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): Do nothing if the layer

has changed since the KVO notification.

LayoutTests:


Unreviewed, fix test broken by r210621.

  • fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled-expected.txt:
  • fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html:
  • platform/mac-wk2/TestExpectations: Un-skip fixed test.
12:24 AM Changeset in webkit [210729] by Carlos Garcia Campos
  • 16 edits
    1 delete in trunk/Source

[SOUP] Simplify cookie storage handling
https://bugs.webkit.org/show_bug.cgi?id=166967

Reviewed by Sergio Villar Senin.

Source/WebCore:

We currently have a global cookie storage, and several create() methods in SoupNetworkSession to create sessions
with different cookie jars. This could be simplified by moving the cookie storage handling to
NetworkStorageSession and removing all create() methods from SoupNetworkSession. This patch also removes the
default SoupNetworkSession in favor of using the default NetworkStorageSession.

  • platform/network/NetworkStorageSession.h: Add a default cookie storage to be used when the

NetworkStorageSession doesn't have a platform soup session.

  • platform/network/soup/CookieJarSoup.cpp: Remove the global cookie storage handling.

(WebCore::setCookiesFromDOM): Use NetworkStorageSession::cookieStorage() instead.
(WebCore::cookiesForSession): Ditto.
(WebCore::cookiesEnabled): Check the policy instead like all other ports do, since now we will always have a
default shared cookie jar.
(WebCore::getRawCookies): Use NetworkStorageSession::cookieStorage() instead.
(WebCore::deleteCookie): Ditto.
(WebCore::addCookie): Ditto.
(WebCore::getHostnamesWithCookies): Ditto.
(WebCore::deleteCookiesForHostnames): Ditto.
(WebCore::deleteAllCookies): Ditto.

  • platform/network/soup/CookieJarSoup.h: Removed.
  • platform/network/soup/CookieStorageSoup.cpp:

(WebCore::soupCookiesChanged): Use the cookie storage from the NetworkStorageSession::defaultStorageSession().
(WebCore::startObservingCookieChanges): Ditto.
(WebCore::stopObservingCookieChanges): Ditto.

  • platform/network/soup/DNSSoup.cpp:

(WebCore::DNSResolveQueue::updateIsUsingProxy): Get the SoupSession from the NetworkStorageSession::defaultStorageSession().
(WebCore::DNSResolveQueue::platformResolve): Ditto.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Create a new SoupNetworkSession without
providing a cookie storage to ensure it creates its own private one.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Ditto.
(WebCore::NetworkStorageSession::soupNetworkSession): Create the SoupNetworkSession on demand passing the global
shared cookie storage.
(WebCore::NetworkStorageSession::cookieStorage): Return the cookie storage from the SoupNetworkSession if we
have one, otherwise create the global shared one and return it.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::sessionFromContext): Get the SoupSession from the NetworkStorageSession::defaultStorageSession().

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession): Remove all create methods and the unused constructor that
receives a SoupSession. Allow to pass a nullptr SoupCookieJar and create one in such case.

  • platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

Get the SoupSession from NetworkStorageSession::defaultStorageSession().

  • NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:

(WebKit::CustomProtocolManager::registerScheme): Get the SoupSession from NetworkStorageSession::defaultStorageSession().

  • NetworkProcess/efl/NetworkProcessMainEfl.cpp: Ditto.
  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::userPreferredLanguagesChanged): Ditto.
(WebKit::NetworkProcess::platformInitializeNetworkProcess): SoupNetworkSession::clearOldSoupCache is static.

  • WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:

(WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Use the cookie storage from NetworkStorageSession::defaultStorageSession().
(WebKit::WebCookieManager::setCookiePersistentStorage): Ditto.

  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:

(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Ditto.

  • WebProcess/efl/WebProcessMainEfl.cpp:
12:17 AM Changeset in webkit [210728] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[SOUP] Do not use the legacy session ID in WebFrameNetworkingContext::storageSession()
https://bugs.webkit.org/show_bug.cgi?id=166970

Reviewed by Sergio Villar Senin.

Get the session for the current page instead.

  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:

(WebKit::WebFrameNetworkingContext::storageSession):

Note: See TracTimeline for information about the timeline view.