⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Mar 8, 2020:

1:00 AM Changeset in webkit [258102] by Megan Gardner
  • 5 edits in trunk/Source

Adopt Context Menus for Data Detectors
https://bugs.webkit.org/show_bug.cgi?id=208779

Switch to context menus for data detector action sheets.

Reviewed by Tim Horton.

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant removeContextMenuInteraction]):
(-[WKActionSheetAssistant ensureContextMenuInteraction]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKActionSheetAssistant contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKActionSheetAssistant _contextMenuInteraction:styleForMenuWithConfiguration:]):
(-[WKActionSheetAssistant contextMenuInteraction:willEndForConfiguration:animator:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView contextMenuDisplayLocationForActionSheetAssistant:]):

Mar 7, 2020:

11:44 PM Changeset in webkit [258130] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[WPE] Mark some tests as crashing

Unreviewed test gardening.

  • platform/wpe/TestExpectations:
9:00 PM Changeset in webkit [258129] by Darin Adler
  • 30 edits
    4 copies in trunk/Source

Begin moving off of live ranges for WebKit internals
https://bugs.webkit.org/show_bug.cgi?id=208432

Reviewed by Daniel Bates.

Source/WebCore:

The DOM Range class is a live range. The live updating feature of these ranges mean
they are expensive to create and destroy and also make all DOM mutation more expensive
while they are alive. We will be able to speed up, likely measurable on Speedometer,
if we can cut down uses of live ranges.

  • Refactored the StaticRange class to create two new structs.
  • The BoundaryPoint struct implements what the DOM standard calls a boundary point: a node and offset. Similar to the RangeBoundaryPoint class, which supports being the boundary point of a live range, but simpler and not live.
  • The SimpleRange struct implements what the DOM standard calls a range (not a live range). Like StaticRange but without reference counting and DOM binding.
  • Since StaticRange is derived publicly from SimpleRange you can pass either to any function that takes a SimpleRange. And since there is a constructor to create a SimpleRange from a Range you can pass a Range to those functions too.
  • Renamed StaticRange::createFromRange to StaticRange::create.
  • Headers.cmake: Added BoundaryPoint.h, SimpleRange.h, and StaticRange.h.
  • Sources.txt: Added BoundaryPoint.cpp and SimpleRange.cpp.
  • WebCore.xcodeproj/project.pbxproj: Added BoundaryPoint.cpp/h and SimpleRange.cpp/h.
  • dom/BoundaryPoint.cpp: Added.
  • dom/BoundaryPoint.h: Added.
  • dom/SimpleRange.cpp: Added.
  • dom/SimpleRange.h: Added.
  • dom/StaticRange.cpp:

(WebCore::StaticRange::StaticRange): Take an rvalue reference to a SimpleRange.
(WebCore::StaticRange::create): Ditto. Changed the other overloads to create
a SimpleRange first then call through to the main one.
(WebCore::isDocumentTypeOrAttr): Wrote a much more efficient version of this.
The old version called the virtual function nodeType twice. This calls it at
most once, and mostly doesn't call it at all.

  • dom/StaticRange.h: Simplified this class, putting most of the actual range

logic into the base class. Note that this change eliminated the peculiar code
that in the == operator that compared nodes using isEqualNode instead of using
node identity. There was no one who needed that other behavior. Also fixed
mistaken use of unsigned long in StaticRange::Init. It's unsigned long in
the IDL file, but confusingly that's just unsigned in .cpp files.

  • dom/StaticRange.idl: Tweaked formatting.
  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::targetRanges const): Updated for rename
of StaticRange::create.

  • editing/ReplaceRangeWithTextCommand.cpp:

(WebCore::ReplaceRangeWithTextCommand::doApply): Updated since VisibleSelection
takes SimpleRange now.
(WebCore::ReplaceRangeWithTextCommand::targetRanges const): Updated for
rename of StaticRange::create.

  • editing/SpellingCorrectionCommand.cpp:

(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): Updated
since a selection now takes a SimpleRange&, not a StaticRange.
(WebCore::SpellingCorrectionCommand::targetRanges const): Updated for
rename of StaticRange::create.

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::willAddTypingToOpenCommand): Ditto.

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::VisibleSelection): Use SimpleRange
instead of StaticRange and Range.

  • editing/VisibleSelection.h: Updated for the above.
  • editing/mac/EditorMac.mm: Added include.
  • page/DragController.cpp: Ditto.
  • page/TextIndicator.cpp: Ditto.

(WebCore::TextIndicator::createWithRange): Updated since VisibleSelection
takes SimpleRange now.

  • page/mac/EventHandlerMac.mm:

(WebCore::InlineTextBox::collectMarkedTextsForHighlights): Tweaked coding
style a bit.

Source/WebKit:

  • Shared/EditingRange.cpp:

(WebKit::EditingRange::fromRange): Initialize out arguments.

  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: Added include.
  • WebProcess/WebPage/FindController.cpp: Ditto.
  • WebProcess/WebPage/WebPage.cpp: Ditto.
  • WebProcess/WebPage/mac/WebPageMac.mm: Ditto.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebFrameIOS.mm: Added include.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebContextMenuClient.mm: Added include.
  • WebView/WebFrame.mm: Ditto.

(-[WebFrame _convertToNSRange:]): Initialized out arguments.

8:35 PM Changeset in webkit [258128] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

CAN_SECURELY_ARCHIVE_FILE_WRAPPER incorrectly excludes watchOS and tvOS
https://bugs.webkit.org/show_bug.cgi?id=208791

Reviewed by Tim Horton.

This is one of several places where a IPHONE_OS_VERSION_MIN_REQUIRED check unintentionally caused a compiler
flag to not be defined on watchOS, when it really should apply to all iOS family targets. Now that we don't
care about building for any iOS family targets aligned with iOS 11 or prior, and also don't build for 10.13 and
prior, we can simply remove the !CAN_SECURELY_ARCHIVE_FILE_WRAPPER codepath.

  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:

(API::Attachment::createSerializedRepresentation const):
(API::Attachment::updateFromSerializedRepresentation):

6:32 PM Changeset in webkit [258127] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, speculative link fix.

  • platform/cocoa/UTTypeRecordSwizzler.mm:
6:25 PM Changeset in webkit [258126] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, speculative link fix.

  • platform/cocoa/UTTypeRecordSwizzler.mm:
6:03 PM Changeset in webkit [258125] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

[CMake] Unreviewed build fix for Mac port

  • PlatformMac.cmake:
5:55 PM Changeset in webkit [258124] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Revise In-App Browser Privacy checks to better reflect the meaning of the flag
https://bugs.webkit.org/show_bug.cgi?id=208793
<rdar://problem/60206256>

Reviewed by John Wilander.

The 'isInAppBrowserPrivacyEnabled' seems like a feature, but it's really an internal debugging flag.

Revise the use of these calls to make it clearer.

Tested by existing test cases.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::sessionWrapperForTask):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain):

5:43 PM Changeset in webkit [258123] by beidson@apple.com
  • 9 edits in trunk/Source

Remember completed subranges during incremental PDF loading.
https://bugs.webkit.org/show_bug.cgi?id=208785

Reviewed by Tim Horton.

Source/JavaScriptCore:

Move 'using WTF::Range' from the WTF/Range.h header to these JSC users.

The alternative to making these 3 changes was to make over 20 changes up in the WebCore/WebKits
to resolve the conflict with WebCore::Range.

  • b3/B3HeapRange.h:
  • b3/air/AirAllocateRegistersAndStackByLinearScan.cpp:
  • heap/JITStubRoutineSet.h:

Source/WebKit:

When a range request from a stream loader completes, we will now extend the main resource buffer
to be large enough to hold that range, then we memcpy the data into the main buffer.

We then keep a RangeSet to remember which ranges we've loaded.
Any future range request that comes in we first check against that RangeSet to see if we can handle it from memory.

This is a necessary optimization because PDFKit tends to ask for the same (or overlapping) ranges quite often.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::ByteRangeRequest::completeWithAccumulatedData):
(WebKit::PDFPlugin::ByteRangeRequest::maybeComplete):
(WebKit::PDFPlugin::pdfDocumentDidLoad):
(WebKit::PDFPlugin::manualStreamDidReceiveData):

Source/WTF:

  • wtf/Range.h: Don't include the typical 'using WTF::Range' as that makes it almost impossible to use in the stack at WebCore or higher (Because of WebCore::Range)
5:34 PM Changeset in webkit [258122] by jer.noble@apple.com
  • 25 edits
    18 adds in trunk/Source/WebKit

[GPUP] Implement Legacy EME API in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=208402

Reviewed by Eric Carlson.

Add support for RemoteLegacyCDMFactory, RemateLegacyCDM,RemoteLegacyCDMSession, and all
of their associated Proxy objects.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::legacyCdmFactoryProxy):
(WebKit::GPUConnectionToWebProcess::dispatchMessage):
(WebKit::GPUConnectionToWebProcess::dispatchSyncMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.cpp: Added.

(WebKit::RemoteLegacyCDMFactoryProxy::RemoteLegacyCDMFactoryProxy):
(WebKit::RemoteLegacyCDMFactoryProxy::createCDM):
(WebKit::RemoteLegacyCDMFactoryProxy::supportsKeySystem):
(WebKit::RemoteLegacyCDMFactoryProxy::didReceiveCDMMessage):
(WebKit::RemoteLegacyCDMFactoryProxy::didReceiveCDMSessionMessage):
(WebKit::RemoteLegacyCDMFactoryProxy::didReceiveSyncCDMMessage):
(WebKit::RemoteLegacyCDMFactoryProxy::didReceiveSyncCDMSessionMessage):
(WebKit::RemoteLegacyCDMFactoryProxy::addProxy):
(WebKit::RemoteLegacyCDMFactoryProxy::removeProxy):
(WebKit::RemoteLegacyCDMFactoryProxy::addSession):
(WebKit::RemoteLegacyCDMFactoryProxy::removeSession):
(WebKit::RemoteLegacyCDMFactoryProxy::getSession const):

  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.h: Added.
  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.messages.in: Added.
  • GPUProcess/media/RemoteLegacyCDMProxy.cpp: Added.

(WebKit::RemoteLegacyCDMProxy::create):
(WebKit::RemoteLegacyCDMProxy::RemoteLegacyCDMProxy):
(WebKit::RemoteLegacyCDMProxy::supportsMIMEType):
(WebKit::RemoteLegacyCDMProxy::createSession):
(WebKit::RemoteLegacyCDMProxy::setPlayerId):
(WebKit::RemoteLegacyCDMProxy::cdmMediaPlayer const):

  • GPUProcess/media/RemoteLegacyCDMProxy.h: Added.

(WebKit::RemoteLegacyCDMProxy::factory const):

  • GPUProcess/media/RemoteLegacyCDMProxy.messages.in: Added.
  • GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: Added.

(WebKit::RemoteLegacyCDMSessionProxy::create):
(WebKit::RemoteLegacyCDMSessionProxy::RemoteLegacyCDMSessionProxy):
(WebKit::convertToUint8Array):
(WebKit::convertToOptionalDataReference):
(WebKit::RemoteLegacyCDMSessionProxy::generateKeyRequest):
(WebKit::RemoteLegacyCDMSessionProxy::releaseKeys):
(WebKit::RemoteLegacyCDMSessionProxy::update):
(WebKit::RemoteLegacyCDMSessionProxy::getCachedKeyForKeyId):
(WebKit::RemoteLegacyCDMSessionProxy::cachedKeyForKeyID):
(WebKit::RemoteLegacyCDMSessionProxy::sendMessage):
(WebKit::RemoteLegacyCDMSessionProxy::sendError):
(WebKit::RemoteLegacyCDMSessionProxy::mediaKeysStorageDirectory const):

  • GPUProcess/media/RemoteLegacyCDMSessionProxy.h: Added.

(WebKit::RemoteLegacyCDMSessionProxy::factory const):
(WebKit::RemoteLegacyCDMSessionProxy::session const):
(WebKit::RemoteLegacyCDMSessionProxy::setPlayer):

  • GPUProcess/media/RemoteLegacyCDMSessionProxy.messages.in: Added.
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::getProxy):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::mediaPlayerCachedKeyForKeyId const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded):
(WebKit::RemoteMediaPlayerProxy::setLegacyCDMSession):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/RemoteTextTrackProxy.cpp:
  • GPUProcess/media/RemoteTextTrackProxy.h:
  • Scripts/webkit/messages.py:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::mediaPlayerManager):
(WebKit::GPUProcessConnection::legacyCDMFactory):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::setCDM):
(WebKit::MediaPlayerPrivateRemote::setCDMSession):
(WebKit::MediaPlayerPrivateRemote::mediaPlayerKeyNeeded):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:
  • WebProcess/GPU/media/RemoteLegacyCDM.cpp: Added.

(WebKit::RemoteLegacyCDM::create):
(WebKit::RemoteLegacyCDM::RemoteLegacyCDM):
(WebKit::RemoteLegacyCDM::supportsMIMEType):
(WebKit::RemoteLegacyCDM::createSession):
(WebKit::RemoteLegacyCDM::setPlayerId):

  • WebProcess/GPU/media/RemoteLegacyCDM.h: Added.
  • WebProcess/GPU/media/RemoteLegacyCDMFactory.cpp: Added.

(WebKit::RemoteLegacyCDMFactory::RemoteLegacyCDMFactory):
(WebKit::RemoteLegacyCDMFactory::registerFactory):
(WebKit::RemoteLegacyCDMFactory::supplementName):
(WebKit::RemoteLegacyCDMFactory::gpuProcessConnection):
(WebKit::RemoteLegacyCDMFactory::supportsKeySystem):
(WebKit::RemoteLegacyCDMFactory::supportsKeySystemAndMimeType):
(WebKit::RemoteLegacyCDMFactory::createCDM):
(WebKit::RemoteLegacyCDMFactory::addSession):
(WebKit::RemoteLegacyCDMFactory::removeSession):
(WebKit::RemoteLegacyCDMFactory::findCDM const):
(WebKit::RemoteLegacyCDMFactory::didReceiveSessionMessage):

  • WebProcess/GPU/media/RemoteLegacyCDMFactory.h: Added.
  • WebProcess/GPU/media/RemoteLegacyCDMIdentifier.h: Added.
  • WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: Added.

(WebKit::convertToArrayBuffer):
(WebKit::convertToUint8Array):
(WebKit::convertToOptionalDataReference):
(WebKit::convertToDataReference):
(WebKit::RemoteLegacyCDMSession::create):
(WebKit::RemoteLegacyCDMSession::RemoteLegacyCDMSession):
(WebKit::RemoteLegacyCDMSession::generateKeyRequest):
(WebKit::RemoteLegacyCDMSession::releaseKeys):
(WebKit::RemoteLegacyCDMSession::update):
(WebKit::RemoteLegacyCDMSession::cachedKeyForKeyID const):
(WebKit::RemoteLegacyCDMSession::sendMessage):
(WebKit::RemoteLegacyCDMSession::sendError):

  • WebProcess/GPU/media/RemoteLegacyCDMSession.h: Added.
  • WebProcess/GPU/media/RemoteLegacyCDMSession.messages.in: Added.
  • WebProcess/GPU/media/RemoteLegacyCDMSessionIdentifier.h: Added.
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::findRemotePlayerId):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
  • WebProcess/GPU/media/WebMediaStrategy.cpp:

(WebKit::WebMediaStrategy::registerLegacyCDMFactories):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • WebProcess/WebProcess.cpp:
5:27 PM Changeset in webkit [258121] by pvollan@apple.com
  • 2 edits in trunk/Source/WTF

Unreviewed build fix.

  • wtf/PlatformUse.h:
4:52 PM Changeset in webkit [258120] by pvollan@apple.com
  • 20 edits
    4 adds in trunk

[iOS] Mapping to UTI from tag and tag class should be performed in the UI process
https://bugs.webkit.org/show_bug.cgi?id=208783

Reviewed by Brent Fulgham.

Source/WebCore:

This mapping should be done in the UI process, since it is using a system service that will no longer be available
in the WebContent process. To achieve this, the method +[UTTypeRecord typeRecordWithTagOverride] is swizzled in
the WebContent process, and is using the cached mapping sent from the UI process.

API test: WebKit.UTIFromTag

  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/UTTypeRecordSwizzler.h: Added.

(WebCore::UTTypeItem::encode const):
(WebCore::UTTypeItem::decode):

  • platform/cocoa/UTTypeRecordSwizzler.mm: Added.

(-[WebUTTypeRecord setIdentifier:]):
(WebCore::vectorOfUTTypeRecords):
(WebCore::typeRecordWithTagOverride):
(WebCore::createVectorOfUTTypeItem):
(WebCore::setVectorOfUTTypeItem):
(WebCore::swizzleUTTypeRecord):

  • platform/network/mac/UTIUtilities.h:
  • platform/network/mac/UTIUtilities.mm:

(WebCore::UTIFromTag):

  • testing/Internals.cpp:

(WebCore::Internals::getUTIFromTag):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/Internals.mm:

(WebCore::Internals::getUTIFromTag):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/NSUTTypeRecordSPI.h: Added.

Source/WebKit:

Send mapping from tag/tag class to UTI from the UI process to the WebContent process as part of the WebProcess
creation parameters. Also, issue some mach-lookup extensions to the WebContent process if Accessibility is
enabled.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

  • wtf/PlatformUse.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4:23 PM Changeset in webkit [258119] by pvollan@apple.com
  • 4 edits in trunk/Source/WebKit

REGRESSION (r258064): API tests intermittently crashing under WebKit::registerDefaultsOverride
https://bugs.webkit.org/show_bug.cgi?id=208784
<rdar://problem/60201631>

Reviewed by Darin Adler.

Speculative crash fix; swizzle [NSUserDefaults registerDefaults:] on the main thread, instead of on a worker thread.

No new tests, since I have not been able to reproduce this issue.

  • UIProcess/Cocoa/PreferenceObserver.h:
  • UIProcess/Cocoa/PreferenceObserver.mm:

(registerDefaultsOverride):
(+[WKPreferenceObserver swizzleRegisterDefaults]):
(-[WKPreferenceObserver init]):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitialize):

4:13 PM Changeset in webkit [258118] by Wenson Hsieh
  • 15 edits
    1 add in trunk/Source

Lazily generate CGPaths for some simple types of paths, such as arcs and lines
https://bugs.webkit.org/show_bug.cgi?id=208464
<rdar://problem/59963226>

Reviewed by Daniel Bates, Darin Adler and Tim Horton.

Source/WebCore:

When the GPU process is enabled and used to render the canvas element, some canvas-related subtests in
MotionMark see significant performance regressions. One of the reasons for this is that in the process of
decoding display list items that contain WebCore::Paths in the GPU process, we end up allocating a new CGPath
for each WebCore::Path. This dramatically increases page demand and memory usage in the GPU process in contrast
to shipping WebKit, due to the fact that all of these CGPaths allocated up-front, and must all exist somewhere
in the heap upon decoding the display list.

In contrast, in shipping WebKit, each call to stroke the current canvas path (i.e. invoking
GraphicsContext::strokePath) is succeeded by clearing the path, which deallocates the CGPath backing the WebCore
Path. The next time a CGPath needs to be created, CoreGraphics is free to then allocate the new CGPath at the
address of the previous CGPath which was just destroyed, which prevents us from dirtying more pages than
necessary. This phenomenon affects most of the canvas-related MotionMark subtests to some degree, though the
impact is most noticeable with Canvas Lines.

On top of all this, a significant portion of time is also spent calling CGPathApply and converting the resulting
CGPathElements into serializable data when encoding each WebCore Path.

To mitigate these two issues and restore the wins we get from memory locality when drawing paths in large
quantities, we can:

  1. In the case of simple paths, stuff some information about how each path was created as inline data on

WebCore::Path itself, as a new data member. For now, this only encompasses lines, arcs, and moves (Paths
where only Path::moveTo was invoked), but may be expanded in the future to include ellipses and rects.
This allows us to achieve two things: (a) make encoding cheaper by not requiring a walk through all of
CGPath's elements, and (b) make decoding cheaper by just initializing the Path using inline data, rather
than having to create a new CGPath.

  1. When painting the StrokePath display list item, just discard m_path after we're done painting with it.

This, in conjunction with (1), means that the CGPath backing the WebCore::Path in the GPU process is only
created when we're just about to paint (i.e. when calling into strokePath()), and destroyed right after
we're done painting with it.

See below for details. There should be no change in behavior.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/InlinePathData.h: Added.

(WebCore::MoveData::encode const):
(WebCore::MoveData::decode):
(WebCore::LineData::encode const):
(WebCore::LineData::decode):
(WebCore::ArcData::encode const):
(WebCore::ArcData::decode):

Introduce InlinePathData, a Variant of several different inline data types, each of which represents one simple
path type that is stored using only inline data. This includes line segments (a start point and an end point),
as well as arcs (which, in addition to a center and start and end angles) also includes an optional offset,
which represents the current position of the path at the time "addArc" was called.

For instance, in the following scenario, the path would have an arc that is offset by (100, 0); if filled, it
would result in a composite shape resembling a semicircle on top of a triangle:

path.moveTo(100, 0);
path.addArc(100, 100, 50, 0, PI, false);
context.fill(path);

When a Path is initialized (or after it is cleared), it starts off with neither a CGPath nor inline data. Moving
the path causes it to store inline MoveData; calling calling addLineTo or addArc then replaces the inline
data with either LineData or ArcData.

If, at any point, the path changes in a different way (i.e. neither line, arc, nor move), we clear out the
inline data and fall back to just representing the path data using the CGPath (m_path).

  • platform/graphics/Path.cpp:

Refactor the following 10 methods: moveTo, addLineTo, addArc, isEmpty, currentPoint, apply, elementCount,
hasCurrentPoint, fastBoundingRect, and boundingRect such that their implementations are now in platform-agnostic
code in Path.cpp. Logic in this platform-agnostic code will generally attempt to use inline path data to compute
an answer (or apply the requested mutations) without having to initialize the platform path representation.
Failing this, we fall back to calling -SlowCase versions of these methods, which will exercise the appropriate
APIs on each platform.

(WebCore::Path::elementCountSlowCase const):
(WebCore::Path::apply const):
(WebCore::Path::isEmpty const):
(WebCore::Path::hasCurrentPoint const):
(WebCore::Path::currentPoint const):
(WebCore::Path::elementCount const):
(WebCore::Path::addArc):
(WebCore::Path::addLineTo):
(WebCore::Path::moveTo):

In the case of these three methods for mutating a path, if we've either only moved the path or haven't touched
it at all, we can get away with only updating our inline path data, and avoid creating a CGPath.

(WebCore::Path::boundingRect const):
(WebCore::Path::fastBoundingRect const):
(WebCore::Path::boundingRectFromInlineData const):
(WebCore::Path::polygonPathFromPoints):

  • platform/graphics/Path.h:

(WebCore::Path::encode const):
(WebCore::Path::decode):

Teach Path::encode and Path::decode to respectively serialize and deserialize WebCore::Path by consulting only
the inline data, if it is present. For simple types of paths, this decreases the cost of both IPC encoding and
decoding, but adds a negligible amount of overhead in the case where the path is non-inline.

(WebCore::Path::hasInlineData const):
(WebCore::Path::hasAnyInlineData const):
(WebCore::Path::isNull const): Deleted.

  • platform/graphics/cairo/PathCairo.cpp:

(WebCore::Path::isEmptySlowCase const):
(WebCore::Path::currentPointSlowCase const):
(WebCore::Path::moveToSlowCase):
(WebCore::Path::addLineToSlowCase):
(WebCore::Path::addArcSlowCase):
(WebCore::Path::boundingRectSlowCase const):
(WebCore::Path::applySlowCase const):
(WebCore::Path::fastBoundingRectSlowCase const):
(WebCore::Path::isNull const):
(WebCore::Path::isEmpty const): Deleted.
(WebCore::Path::hasCurrentPoint const): Deleted.
(WebCore::Path::currentPoint const): Deleted.
(WebCore::Path::moveTo): Deleted.
(WebCore::Path::addLineTo): Deleted.
(WebCore::Path::addArc): Deleted.
(WebCore::Path::boundingRect const): Deleted.
(WebCore::Path::apply const): Deleted.

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::createCGPath const):

Add a helper method that is invoked when the Path is asked for a CGPath. In this case, if there is inline data,
we need to lazily create the path and apply any inline path data we've accumulated. Once we're done applying the
inline data, set a flag (m_needsToApplyInlineData) to false to avoid re-applying inline data to the path.

(WebCore::Path::platformPath const):
(WebCore::Path::ensurePlatformPath):

When ensurePlatformPath is invoked, we are about to mutate our CGPath in such a way that it can't be expressed
in terms of inline data (at least, not with the changes in this patch). Clear out the inline path data in this
case, and apply the CGPath mutations that were previously stashed away in inline path data.

(WebCore::Path::isNull const):

A path is now considered null if it is not only missing a CGPath, but also does not have any inline path data.
This maintains the invariant that isNull() is true iff the platformPath() returns 0x0.

(WebCore::Path::Path):
(WebCore::Path::swap):

Update the constructors and swap helper method (used by assignment operators) to account for the new members.

(WebCore::Path::contains const):
(WebCore::Path::transform):
(WebCore::zeroRectIfNull):
(WebCore::Path::boundingRectSlowCase const):
(WebCore::Path::fastBoundingRectSlowCase const):
(WebCore::Path::moveToSlowCase):
(WebCore::Path::addLineToSlowCase):
(WebCore::Path::addArcSlowCase):
(WebCore::Path::clear):

When clearing Path, instead of setting m_path to a newly allocated CGPath, simply reset it to null. This
ensures that if we then apply some changes that can be expressed using only inline path data, we avoid having to
update the CGPath, and instead just update the inline path data.

(WebCore::Path::isEmptySlowCase const):
(WebCore::Path::currentPointSlowCase const):
(WebCore::Path::applySlowCase const):
(WebCore::Path::elementCountSlowCase const):
(WebCore::Path::boundingRect const): Deleted.
(WebCore::Path::fastBoundingRect const): Deleted.
(WebCore::Path::moveTo): Deleted.
(WebCore::Path::addLineTo): Deleted.
(WebCore::Path::addArc): Deleted.
(WebCore::Path::isEmpty const): Deleted.
(WebCore::Path::hasCurrentPoint const): Deleted.
(WebCore::Path::currentPoint const): Deleted.
(WebCore::Path::apply const): Deleted.
(WebCore::Path::elementCount const): Deleted.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::StrokePath::apply const):

Throw out the current WebCore::Path after we're done painting with it (see (2) in the above ChangeLog entry).

  • platform/graphics/displaylists/DisplayListItems.h:
  • platform/graphics/win/PathDirect2D.cpp:

(WebCore::Path::boundingRectSlowCase const):
(WebCore::Path::fastBoundingRectSlowCase const):
(WebCore::Path::moveToSlowCase):
(WebCore::Path::addLineToSlowCase):
(WebCore::Path::addArcSlowCase):
(WebCore::Path::isEmptySlowCase const):
(WebCore::Path::currentPointSlowCase const):
(WebCore::Path::applySlowCase const):
(WebCore::Path::isNull const):
(WebCore::Path::boundingRect const): Deleted.
(WebCore::Path::fastBoundingRect const): Deleted.
(WebCore::Path::moveTo): Deleted.
(WebCore::Path::addLineTo): Deleted.
(WebCore::Path::addArc): Deleted.
(WebCore::Path::isEmpty const): Deleted.
(WebCore::Path::hasCurrentPoint const): Deleted.
(WebCore::Path::currentPoint const): Deleted.
(WebCore::Path::apply const): Deleted.

Source/WebKit:

Add argument coders for WTF::Monostate, so that Variants of the form: Variant<Monostate, Foo, Bar> can be
encoded and decoded over IPC.

  • Platform/IPC/ArgumentCoders.cpp:

(IPC::ArgumentCoder<Monostate>::encode):
(IPC::ArgumentCoder<Monostate>::decode):

  • Platform/IPC/ArgumentCoders.h:

Source/WTF:

Add a feature flag for INLINE_PATH_DATA. This feature flag exists to ensure that we can avoid having
m_inlineData on Path in ports that don't implement the necessary facilities for inline path data yet, since it
would just end up being wasted memory.

  • wtf/PlatformEnable.h:
4:04 PM Changeset in webkit [258117] by beidson@apple.com
  • 3 edits in trunk/Source/WebKit

Better stream loader management with incremental PDF loading.
https://bugs.webkit.org/show_bug.cgi?id=208790

Reviewed by Tim Horton.

When a stream loader was completing normally, we were leaking it forever.
This adds much better management of outstanding stream loaders
(and logging to help verify the count is as expected)

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::getResourceBytesAtPosition):
(WebKit::PDFPlugin::ByteRangeRequest::completeWithBytes):
(WebKit::PDFPlugin::ByteRangeRequest::completeWithAccumulatedData):
(WebKit::PDFPlugin::ByteRangeRequest::maybeComplete):
(WebKit::PDFPlugin::ByteRangeRequest::completeUnconditionally):
(WebKit::PDFPlugin::didReceiveResponse):
(WebKit::PDFPlugin::didFinishLoading):
(WebKit::PDFPlugin::forgetLoader):
(WebKit::PDFPlugin::cancelAndForgetLoader):

3:33 PM Changeset in webkit [258116] by Konstantin Tokarev
  • 8 edits in trunk/Source

[CMake] Some fixes for building Mac port
https://bugs.webkit.org/show_bug.cgi?id=208770

Reviewed by Don Olmstead.

Source/WebCore:

  • PlatformMac.cmake:

Source/WebCore/PAL:

  • pal/PlatformMac.cmake:

Source/WebKit:

  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:
2:49 PM Changeset in webkit [258115] by Andres Gonzalez
  • 11 edits
    3 adds in trunk/Source

Implementation of AccessibilitySupport AXSIsolatedTreeMode.
https://bugs.webkit.org/show_bug.cgi?id=208691
<rdar://problem/60178602>

Reviewed by Chris Fleizach.

Source/WebCore:

Honors the system AccessibilitySupport IsolatedTreeMode setting. The
system has three modes for IsolatedTree functionality: off, on on main
thread, and on on secondary thread.

  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::isolatedTreeFocusedObject):
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::isIsolatedTreeEnabled):
(WebCore::AXObjectCache::isolatedTreeRootObject):
(WebCore::AXObjectCache::canUseSecondaryAXThread):

  • accessibility/AXObjectCache.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(-[WebAccessibilityObjectWrapperBase detach]):
(-[WebAccessibilityObjectWrapperBase axBackingObject]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):

Source/WebCore/PAL:

Added softlinking for the AccessibilitySupport library (libAccessibility.tbd).

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/spi/cocoa/AccessibilitySupportSPI.h: Added.
  • pal/spi/cocoa/AccessibilitySupportSoftLink.cpp: Added.
  • pal/spi/cocoa/AccessibilitySupportSoftLink.h: Added.

Source/WebKit:

Honors system AccessibilitySupport IsolatedTreeMode setting.

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

2:40 PM Changeset in webkit [258114] by Megan Gardner
  • 3 edits in trunk/Source/WebKit

Build Fix Watch
https://bugs.webkit.org/show_bug.cgi?id=208789

Reviewed by Tim Horton.

  • UIProcess/ios/WKActionSheetAssistant.mm:
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel dealloc]):
(-[WKFileUploadPanel showDocumentPickerMenu]):

2:10 PM Changeset in webkit [258113] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed watchOS build fix: add platform guards.

  • platform/audio/ios/MediaSessionHelperIOS.mm:

(MediaSessionHelperiOS::startMonitoringWirelessRoutes):
(MediaSessionHelperiOS::stopMonitoringWirelessRoutes):

1:32 PM Changeset in webkit [258112] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

generate-bindings-all.pl: "my" variable $fh masks earlier declaration in same scope
https://bugs.webkit.org/show_bug.cgi?id=208757

Reviewed by Yusuke Suzuki.

  • bindings/scripts/generate-bindings-all.pl: Reuse $fh variable instead of defining new one.
1:31 PM Changeset in webkit [258111] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the watchOS build

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

1:03 PM Changeset in webkit [258110] by Megan Gardner
  • 4 edits in trunk/Source/WebKit

Build Fix
https://bugs.webkit.org/show_bug.cgi?id=208787
<rdar://problem/60203011>

Reviewed by Tim Horton.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel showDocumentPickerMenu]):

12:22 PM Changeset in webkit [258109] by jer.noble@apple.com
  • 17 edits
    1 copy
    9 adds in trunk/Source

[GPUP] Move AVSystemController code into the GPU process
https://bugs.webkit.org/show_bug.cgi?id=208727

Reviewed by Eric Carlson.

Source/WebCore:

Move AVSystemController code out of MediaSessionManageriOS and into a new
class MediaSessionHelper, which is currently iOS only. The abstract base class
will be overriden by WebKit in the WebContent process.

Drive-by fix: Don't call a virtual method (resetRestrictions()) from the constructor of a
virtual base class; the virtual function table hasn't been created yet, and the subclasses'
overridden methods won't be called. Move the call to post-creation.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sharedManager):
(WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):

  • platform/audio/ios/MediaSessionHelperIOS.h: Added.
  • platform/audio/ios/MediaSessionHelperIOS.mm: Copied from Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm.

(sharedHelperInstance):
(MediaSessionHelper::sharedHelper):
(MediaSessionHelper::resetSharedHelper):
(MediaSessionHelper::setSharedHelper):
(MediaSessionHelper::addClient):
(MediaSessionHelper::removeClient):
(MediaSessionHelperiOS::MediaSessionHelperiOS):
(MediaSessionHelperiOS::~MediaSessionHelperiOS):
(MediaSessionHelperiOS::providePresentingApplicationPID):
(MediaSessionHelperiOS::startMonitoringWirelessRoutes):
(MediaSessionHelperiOS::stopMonitoringWirelessRoutes):
(MediaSessionHelperiOS::carPlayServerDied):
(MediaSessionHelperiOS::updateCarPlayIsConnected):
(MediaSessionHelperiOS::setIsPlayingToAutomotiveHeadUnit):
(MediaSessionHelperiOS::activeAudioRouteDidChange):
(MediaSessionHelperiOS::activeVideoRouteDidChange):
(MediaSessionHelperiOS::receivedInterruption):
(MediaSessionHelperiOS::applicationDidBecomeActive):
(MediaSessionHelperiOS::applicationDidEnterBackground):
(MediaSessionHelperiOS::applicationWillBecomeInactive):
(MediaSessionHelperiOS::applicationWillEnterForeground):
(MediaSessionHelperiOS::externalOutputDeviceAvailableDidChange):
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper dealloc]):
(-[WebMediaSessionHelper clearCallback]):
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper interruption:]):
(-[WebMediaSessionHelper applicationWillEnterForeground:]):
(-[WebMediaSessionHelper applicationDidBecomeActive:]):
(-[WebMediaSessionHelper applicationWillResignActive:]):
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
(-[WebMediaSessionHelper applicationDidEnterBackground:]):
(-[WebMediaSessionHelper carPlayServerDied:]):
(-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):
(-[WebMediaSessionHelper activeAudioRouteDidChange:]):

  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
(WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):
(WebCore::MediaSessionManageriOS::providePresentingApplicationPID):
(WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
(WebCore::MediaSessionManageriOS::isPlayingToAutomotiveHeadUnitDidChange):
(WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
(WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
(WebCore::MediaSessionManageriOS::receivedInterruption):
(WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
(WebCore::MediaSessionManageriOS::applicationDidBecomeActive):
(WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
(WebCore::MediaSessionManageriOS::applicationWillBecomeInactive):
(WebCore::MediaSessionManageriOS::carPlayServerDied): Deleted.
(WebCore::MediaSessionManageriOS::updateCarPlayIsConnected): Deleted.
(-[WebMediaSessionHelper initWithCallback:]): Deleted.
(-[WebMediaSessionHelper dealloc]): Deleted.
(-[WebMediaSessionHelper clearCallback]): Deleted.
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Deleted.
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Deleted.
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Deleted.
(-[WebMediaSessionHelper interruption:]): Deleted.
(-[WebMediaSessionHelper applicationWillEnterForeground:]): Deleted.
(-[WebMediaSessionHelper applicationDidBecomeActive:]): Deleted.
(-[WebMediaSessionHelper applicationWillResignActive:]): Deleted.
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Deleted.
(-[WebMediaSessionHelper applicationDidEnterBackground:]): Deleted.
(-[WebMediaSessionHelper carPlayServerDied:]): Deleted.
(-[WebMediaSessionHelper carPlayIsConnectedDidChange:]): Deleted.
(-[WebMediaSessionHelper activeAudioRouteDidChange:]): Deleted.

Source/WebKit:

Add a new class pair RemoteMediaSessionHelper/Proxy.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::mediaSessionHelperProxy):
(WebKit::GPUConnectionToWebProcess::ensureMediaSessionHelper):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUConnectionToWebProcess.messages.in:
  • GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp: Added.

(WebKit::RemoteMediaSessionHelperProxy::RemoteMediaSessionHelperProxy):
(WebKit::RemoteMediaSessionHelperProxy::~RemoteMediaSessionHelperProxy):
(WebKit::RemoteMediaSessionHelperProxy::startMonitoringWirelessRoutes):
(WebKit::RemoteMediaSessionHelperProxy::stopMonitoringWirelessRoutes):
(WebKit::RemoteMediaSessionHelperProxy::providePresentingApplicationPID):
(WebKit::RemoteMediaSessionHelperProxy::receivedInterruption):
(WebKit::RemoteMediaSessionHelperProxy::applicationWillEnterForeground):
(WebKit::RemoteMediaSessionHelperProxy::applicationDidEnterBackground):
(WebKit::RemoteMediaSessionHelperProxy::applicationWillBecomeInactive):
(WebKit::RemoteMediaSessionHelperProxy::applicationDidBecomeActive):
(WebKit::RemoteMediaSessionHelperProxy::externalOutputDeviceAvailableDidChange):
(WebKit::RemoteMediaSessionHelperProxy::isPlayingToAutomotiveHeadUnitDidChange):
(WebKit::RemoteMediaSessionHelperProxy::activeAudioRouteDidChange):
(WebKit::RemoteMediaSessionHelperProxy::activeVideoRouteDidChange):

  • GPUProcess/media/ios/RemoteMediaSessionHelperProxy.h: Added.
  • GPUProcess/media/ios/RemoteMediaSessionHelperProxy.messages.in: Added.
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp: Added.

(WebKit::RemoteMediaSessionHelper::RemoteMediaSessionHelper):
(WebKit::RemoteMediaSessionHelper::connection):
(WebKit::RemoteMediaSessionHelper::startMonitoringWirelessRoutes):
(WebKit::RemoteMediaSessionHelper::stopMonitoringWirelessRoutes):
(WebKit::RemoteMediaSessionHelper::providePresentingApplicationPID):
(WebKit::RemoteMediaSessionHelper::receivedInterruption):
(WebKit::RemoteMediaSessionHelper::applicationWillEnterForeground):
(WebKit::RemoteMediaSessionHelper::applicationDidEnterBackground):
(WebKit::RemoteMediaSessionHelper::applicationWillBecomeInactive):
(WebKit::RemoteMediaSessionHelper::applicationDidBecomeActive):
(WebKit::RemoteMediaSessionHelper::externalOutputDeviceAvailableDidChange):
(WebKit::RemoteMediaSessionHelper::isPlayingToAutomotiveHeadUnitDidChange):
(WebKit::RemoteMediaSessionHelper::activeAudioRouteDidChange):
(WebKit::RemoteMediaSessionHelper::activeVideoRouteDidChange):

  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.h: Added.
  • WebProcess/GPU/media/ios/RemoteMediaSessionHelper.messages.in: Added.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setUseGPUProcessForMedia):

12:08 PM Changeset in webkit [258108] by Andres Gonzalez
  • 13 edits in trunk/Source/WebCore

Fix for LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html in IsolatedTree mode.
https://bugs.webkit.org/show_bug.cgi?id=208462
<rdar://problem/59980673>

Reviewed by Chris Fleizach.

Covered by LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html.

  • Updates the IsolatedTree on the TextStateChange notification.
  • Renamed isAccessibilityScrollView to isAccessibilityScrollViewInstance

and used isScrollView instead everywhere it's appropriate. This makes
code like AXObjectCache::rootWebArea work for both AXObjects and IsolatedObjects.

  • Moved several utility functions from WebAccessibilityObjectWrapperMac.mm

to AXObjectCacheMac.mm where they belong, so that they can be used by
AXObjectCache implementation in addition to by the wrapper.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::rootWebArea):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isOnScreen const):
(WebCore::AccessibilityObject::scrollToGlobalPoint const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):

  • accessibility/AccessibilityScrollView.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityContainer]):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::isAccessibilityScrollViewInstance const):
(WebCore::AXIsolatedObject::isAccessibilityScrollView const): Renamed.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postTextStateChangePlatformNotification): Uses
TextMarker utilities instead of calling into the wrapper. This fixes
the crash caused by the wrapper updating the backingObject that in turn
may change the wrapper.
(WebCore::AXTextMarkerRange): Moved from WebAccessibilityObjectWrapperMac.mm.
(WebCore::textMarkerRangeFromMarkers): Moved from WebAccessibilityObjectWrapperMac.mm.
(WebCore::textMarkerForVisiblePosition): Moved from WebAccessibilityObjectWrapperMac.mm.
(WebCore::textMarkerRangeFromVisiblePositions): Moved from WebAccessibilityObjectWrapperMac.mm.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXTextMarkerRange): Moved.
(textMarkerForVisiblePosition): Moved.
(textMarkerRangeFromMarkers): Moved.
(textMarkerRangeFromVisiblePositions): Moved.

10:41 AM Changeset in webkit [258107] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

[GPUP] Null-dereference crash in GPUProcessProxy::openGPUProcessConnection()
https://bugs.webkit.org/show_bug.cgi?id=208772

Reviewed by Maciej Stachowiak.

AuxiliaryProcessProxy::connection() will return a null-pointer if called before the remote
process has launched and a connection established. Rather than send a message directly to
the proxy's IPC::Connection object (which can be null), just call sendWithAsyncReply()
directly on the proxy inself, which will correctly enqueue the message for sending when the
connection is fully established.

Because this crash occurs whenever the "useGPUProcessForMedia" setting is enabled, this is
covered by existing WP2 tests when those tests are run with that setting enabled.

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::openGPUProcessConnection):

10:41 AM Changeset in webkit [258106] by Kocsen Chung
  • 1 copy in tags/Safari-610.1.6.1

Tag Safari-610.1.6.1.

10:25 AM Changeset in webkit [258105] by Kocsen Chung
  • 8 edits in branches/safari-610.1.6-branch/Source

Versioning.

5:17 AM Changeset in webkit [258104] by commit-queue@webkit.org
  • 14 edits in trunk/Source

Canvas drawing commands have to be flushed to the GPUProcess in batches
https://bugs.webkit.org/show_bug.cgi?id=208597

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-08
Reviewed by Myles C. Maxfield.

Source/WebCore:

Make DisplayList::ImageBuffer an observer of DisplayList::Recorder.
It can track adding an item to the recoded DisplayList.

  • platform/graphics/displaylists/DisplayListDrawingContext.cpp:

(WebCore::DisplayList::DrawingContext::DrawingContext):

  • platform/graphics/displaylists/DisplayListDrawingContext.h:
  • platform/graphics/displaylists/DisplayListImageBuffer.h:

(WebCore::DisplayList::ImageBuffer::ImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::Recorder):
(WebCore::DisplayList::Recorder::willAppendItem):

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::Observer::~Observer):
(WebCore::DisplayList::Recorder::Observer::willAppendItem):

Source/WebKit:

RemoteImageBuffer, which is a superclass of DisplayList::ImageBuffer, will
prevent growing its DisplayList more than some limit (512 for now).
When this limit is reached, the recoded DisplayListItems will be flushed to
the GPUProcess in a batch. Flushing this batch would not require GPUProcess
to reply back. RemoteImageBuffer will have to run a full flush anyway
when the pixels are needed because the batch flushing does not include the
current DisplayList::Item.

  • GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h:
  • GPUProcess/graphics/RemoteImageBufferProxy.h:
  • GPUProcess/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::flushImageBufferDrawingContext):
(WebKit::RemoteRenderingBackendProxy::flushImageBufferDrawingContextAndCommit):

  • GPUProcess/graphics/RemoteRenderingBackendProxy.h:
  • GPUProcess/graphics/RemoteRenderingBackendProxy.messages.in:
  • WebProcess/GPU/graphics/RemoteImageBuffer.h:
  • WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.cpp:

(WebKit::RemoteImageBufferMessageHandler::flushDrawingContext):
(WebKit::RemoteImageBufferMessageHandler::flushDrawingContextAndWaitCommit):

3:58 AM Changeset in webkit [258103] by Konstantin Tokarev
  • 4 edits in trunk/Source

[GTK] Fix compilation with disabled OpenGL
https://bugs.webkit.org/show_bug.cgi?id=208773

Reviewed by Yusuke Suzuki.

Source/WebCore:

  • html/OffscreenCanvas.h:

Source/WebKit:

  • UIProcess/API/glib/WebKitProtocolHandler.cpp:

(WebKit::WebKitProtocolHandler::handleGPU):

Mar 7, 2020:

9:39 PM Changeset in webkit [258101] by Brent Fulgham
  • 17 edits in trunk/Source

Create a flag to disable in-app browser quirks
https://bugs.webkit.org/show_bug.cgi?id=208777
<rdar://problem/60062197>

Reviewed by Simon Fraser.

This patch makes the following changes:

  1. Adds a new flag 'NeedsInAppBrowserPrivacyQuirks' to allow quirks to be toggled during testing.
  2. Reclassify this new flag, and the existing 'InAppBrowserPrivacyEnabled' flag from 'settings' to Internal Debug settings

The renamed flags are covered by existing tests.

Source/WebCore:

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setNeedsInAppBrowserPrivacyQuirks):
(WebCore::RuntimeEnabledFeatures::needsInAppBrowserPrivacyQuirks const):

  • page/Settings.yaml:

Source/WebKit:

  • FeatureFlags/WebKit.plist:
  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultInAppBrowserPrivacy):
(WebKit::defaultNeedsInAppBrowserPrivacyQuirks):

  • Shared/WebPreferencesDefaultValues.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _needsInAppBrowserPrivacyQuirks]):
(-[WKPreferences _setNeedsInAppBrowserPrivacyQuirks:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/WebPageProxy.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScript):

  • WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]): Add new flag.
(-[WebPreferences needsInAppBrowserPrivacyQuirks]): Ditto.
(-[WebPreferences setNeedsInAppBrowserPrivacyQuirks:]): Ditto.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:
9:13 PM Changeset in webkit [258100] by jer.noble@apple.com
  • 10 edits in trunk/Source/WebCore

[GPUP] Implement Legacy EME API in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=208402

Reviewed by Eric Carlson.

Prepare for running the LegacyCDM et. al. in the GPU process.

Slightly modernize LegacyCDM to allow all methods representaing a LegacyCDMFactory to be WTF::Functions.

Allow the list of registered factories to be cleared and reset at runtime.

Modify WebKitMediaKeys to notify the MediaPlayer when the keys object is added to a HTMLMediaElement.

Expose the pointer to the internal CDMPrivateInterface for use in WebKit.

  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:

(WebCore::LegacyCDM::platformRegisterFactories):
(WebCore::installedCDMFactories):
(WebCore::LegacyCDM::registerCDMFactory):
(WebCore::LegacyCDMFactoryForKeySystem):
(WebCore::LegacyCDM::supportsKeySystem):
(WebCore::LegacyCDM::keySystemSupportsMimeType):
(WebCore::LegacyCDM::LegacyCDM):
(WebCore::LegacyCDM::createSession):

  • Modules/encryptedmedia/legacy/LegacyCDM.h:
  • Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:

(WebCore::WebKitMediaKeys::setMediaElement):

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaEngineWasUpdated):

  • platform/graphics/LegacyCDMSession.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::setCDM):

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

(WebCore::MediaPlayerPrivateInterface::setCDM):

8:38 PM Changeset in webkit [258099] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[GPUP] LayoutTest debug assertion crashes: InitDataRegistry::registerInitDataType() called mulitple times with same type
https://bugs.webkit.org/show_bug.cgi?id=208765

Reviewed by Simon Fraser.

Wrap calls to registerInitDataType() in a std::call_once, to ensure it's not called muliple times when
platformRegisterFactories() is called multiple times.

  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:

(WebCore::CDMFactory::platformRegisterFactories):

8:35 PM Changeset in webkit [258098] by Simon Fraser
  • 7 edits in trunk/Source

Generalize setSynchronousScrollingReasons() to take a ScrollingNodeID
https://bugs.webkit.org/show_bug.cgi?id=208774

Reviewed by Zalan Bujtas.

Source/WebCore:

We'll be calling setSynchronousScrollingReasons() for overflow nodes at some point,
so change the argument from FrameView to ScrollingNodeID.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):

Source/WebKit:

Whitespace.

  • WebProcess/WebPage/EventDispatcher.h:
8:20 PM Changeset in webkit [258097] by Ross Kirsling
  • 35 edits
    1 move in trunk/Tools

Replace the use of term "rollout" to "revert" in various tools
https://bugs.webkit.org/show_bug.cgi?id=208775

Reviewed by Ryosuke Niwa.

See this webkit-dev thread for the originating discussion:
https://lists.webkit.org/pipermail/webkit-dev/2020-March/031132.html

'rollout' is a confusing term to anyone unacquainted with WebKit;
consensus seems to be that 'revert' would be the best replacement (as opposed to 'rollback').

Given the long legacy of this term within WebKit, it's important to deprecate and not remove 'rollout' commands.
As such, this patch aims to make 'revert' the preferred term everywhere without making 'rollout' fail.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Trac.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/model_unittests.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/trac_unittests.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/actions_unittests.js:
  • BuildSlaveSupport/ews-build/steps.py:
  • BuildSlaveSupport/ews-build/steps_unittest.py:
  • Scripts/webkit-tools-completion.sh:
  • Scripts/webkitpy/common/checkout/changelog_unittest.py:
  • Scripts/webkitpy/common/checkout/checkout_unittest.py:
  • Scripts/webkitpy/common/checkout/scm/svn.py:
  • Scripts/webkitpy/common/net/bugzilla/attachment.py:
  • Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
  • Scripts/webkitpy/tool/bot/commitqueuetask.py:
  • Scripts/webkitpy/tool/bot/feeders.py:
  • Scripts/webkitpy/tool/bot/feeders_unittest.py:
  • Scripts/webkitpy/tool/bot/irc_command.py:
  • Scripts/webkitpy/tool/bot/irc_command_unittest.py:
  • Scripts/webkitpy/tool/bot/ircbot_unittest.py:
  • Scripts/webkitpy/tool/bot/sheriff.py:
  • Scripts/webkitpy/tool/commands/download.py:
  • Scripts/webkitpy/tool/commands/download_unittest.py:
  • Scripts/webkitpy/tool/commands/newcommitbot.py:
  • Scripts/webkitpy/tool/commands/newcommitbot_unittest.py:
  • Scripts/webkitpy/tool/commands/queues_unittest.py:
  • Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
  • Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
  • Scripts/webkitpy/tool/steps/init.py:
  • Scripts/webkitpy/tool/steps/postdiffforrevert.py:
  • Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
  • Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
  • Scripts/webkitpy/tool/steps/reopenbugafterrevert.py: Renamed from Tools/Scripts/webkitpy/tool/steps/reopenbugafterrollout.py.
8:19 PM Changeset in webkit [258096] by beidson@apple.com
  • 3 edits in trunk/Source/WebKit

Make PDF range requests to the network.
https://bugs.webkit.org/show_bug.cgi?id=208776

Reviewed by Alex Christensen.

We already handle a set of range requests from our data provider callbacks.
The current strategy is "wait until we've streamed enough of the entire resource,
perform that request's callback"

For linearized PDFs the second request ever made is for the very end of the PDF document,
so we have to wait for the entire document to load (which is what we already do in non-incremental mode)

Now, we'll actually make the requests for missing data chunks from the network by using the document's request
and adding range headers.

While it is now entirely misnamed, NetscapePlugInStreamLoader is a perfect fit for this.

Once the range request completes from the network we can unblock the PDF thread and go to the next request.

  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::unconditionalCompleteOutstandingRangeRequests):
(WebKit::PDFPlugin::getResourceBytesAtPosition):
(WebKit::PDFPlugin::ByteRangeRequest::clearStreamLoader):
(WebKit::PDFPlugin::ByteRangeRequest::completeWithBytes):
(WebKit::PDFPlugin::ByteRangeRequest::completeWithAccumulatedData):
(WebKit::PDFPlugin::ByteRangeRequest::maybeComplete):
(WebKit::PDFPlugin::ByteRangeRequest::completeUnconditionally):
(WebKit::PDFPlugin::willSendRequest):
(WebKit::PDFPlugin::didReceiveResponse):
(WebKit::PDFPlugin::didReceiveData):
(WebKit::PDFPlugin::didFail):
(WebKit::PDFPlugin::didFinishLoading):
(WebKit::PDFPlugin::byteRangeRequestForLoader):
(WebKit::PDFPlugin::cancelAndForgetLoader):
(WebKit::PDFPlugin::manualStreamDidReceiveData):
(WebKit::PDFPlugin::unconditionalCompleteRangeRequest): Deleted.

8:01 PM Changeset in webkit [258095] by david_quesada@apple.com
  • 6 edits in trunk

Crash in -[_WKRemoteObjectRegistry _invokeMethod:] block when calling a reply block after the web view has deallocated
https://bugs.webkit.org/show_bug.cgi?id=208781
rdar://problem/60061016

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API tests.

  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:

(-[_WKRemoteObjectRegistry _invokeMethod:]):

When the app calls a reply block for a message from the injected bundle, add a nil
check for the underlying WebKit::RemoteObjectRegistry before attempting to send the
reply details back to the web process. It's possible that before this block is
called, the associated web view could have been deallocated, which would invalidate
this _WKRemoteObjectRegistry.

Tools:

Add a test that recreates the conditions of this crash:

  • Send a message from the injected bundle to the UI process that contains a reply block.
  • Hold a reference to the reply block.
  • Let the web view deallocate.
  • Call the block, and expect not to crash.
  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:

(localObjectInterface):

  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.mm:

(-[LocalObject doSomethingWithCompletionHandler:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistryPlugIn.mm:

(-[RemoteObjectRegistryPlugIn callUIProcessMethodWithReplyBlock]):

7:58 PM Changeset in webkit [258094] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

REGRESSION: (r257760?) [ Mac wk2 Debug ] ASSERTION FAILED: child->parentObject() == this in WebCore::AccessibilityObject::insertChild
https://bugs.webkit.org/show_bug.cgi?id=208648

Reviewed by Chris Fleizach.

[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions] must
not update the backing store but instead just get the backing object.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):

7:52 PM Changeset in webkit [258093] by rniwa@webkit.org
  • 5 edits in trunk

TextManipulationController should work with ARIA labels
https://bugs.webkit.org/show_bug.cgi?id=208759

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch makes TextManipulationController work with a few ARIA content attributes.

It also makes observeParagraphs observe content across the entire document since canonicalizing
the starting position can end up skipping some content with ARIA.

Tests: TextManipulation.StartTextManipulationFindAttributeContent

TextManipulation.CompleteTextManipulationShouldReplaceAttributeContent

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::startObservingParagraphs): Now takes two Positions instead
of two VisiblePositions.
(WebCore::isAttributeForTextManipulation): Added.
(WebCore::TextManipulationController::observeParagraphs): Added the code to find elements with
ARIA attributes and a few other elements that don't generate RenderObject's.
(WebCore::TextManipulationController::scheduleObservartionUpdate):
(WebCore::TextManipulationController::addItem): Now takes ManipulationItemData instead of indivisual
fields in it.
(WebCore::TextManipulationController::replace): Added the logic to handle ManipulationItemData
that specify element and attributeName.

  • editing/TextManipulationController.h:

(WebCore::TextManipulationController::ManipulationItemData): Added element and attributeName.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TextManipulation.StartTextManipulationFindAttributeContent): Added.
(TextManipulation.CompleteTextManipulationShouldPreserveOrderOfBlockImage): Updated
the expected number of tokens for the first item as the very first image is correctly
detected per the code change.
(TextManipulation.CompleteTextManipulationShouldReplaceAttributeContent): Added.

7:41 PM Changeset in webkit [258092] by Megan Gardner
  • 5 edits in trunk/Source

Adopt UIContextMenu for WKFileUploadPanel
https://bugs.webkit.org/show_bug.cgi?id=208687

Reviewed by Tim Horton.

Source/WebCore:

New string, no tests needed.

  • en.lproj/Localizable.strings:

Source/WebKit:

Move from the depricated UIDocumentMenuViewController to UIContextMenu.
UI change, not currently testable.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel dealloc]):
(-[WKFileUploadPanel presentWithParameters:resultListener:]):
(-[WKFileUploadPanel dismiss]):
(-[WKFileUploadPanel _browseFilesButtonLabel]):
(-[WKFileUploadPanel contextMenuInteraction:previewForHighlightingMenuWithConfiguration:]):
(-[WKFileUploadPanel _contextMenuInteraction:styleForMenuWithConfiguration:]):
(-[WKFileUploadPanel contextMenuInteraction:configurationForMenuAtLocation:]):
(-[WKFileUploadPanel contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKFileUploadPanel _removeInteraction]):
(-[WKFileUploadPanel _initInteraction]):
(-[WKFileUploadPanel _showFilePickerMenu]):
(-[WKFileUploadPanel _showDocumentPickerMenu]):
(-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
(-[WKFileUploadPanel _presentFullscreenViewController:animated:]):
(photoLibraryIcon): Deleted.
(cameraIcon): Deleted.
(-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]): Deleted.
(-[WKFileUploadPanel documentMenuWasCancelled:]): Deleted.

5:56 PM Changeset in webkit [258091] by achristensen@apple.com
  • 2 edits in trunk/Tools

Regression r258042: Failing API test TestWebKitAPI.URLSchemeHandler.Frames
https://bugs.webkit.org/show_bug.cgi?id=208767

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

The frameID of the main frame before loading is only 0 on Mac right now.
The test is still good because it validates that execution works in the main frame before loading.

5:20 PM Changeset in webkit [258090] by Peng Liu
  • 2 edits in trunk/Source/WebKit

Use the feature flags mechanism to give default feature preference values
https://bugs.webkit.org/show_bug.cgi?id=208607

Reviewed by Simon Fraser.

Fix a Catalyst build failure (We should not copy the WebKit.plist for the Catalyst build).

  • WebKit.xcodeproj/project.pbxproj:
4:38 PM Changeset in webkit [258089] by dbates@webkit.org
  • 2 edits in trunk/Source/WTF

[iOS] Implement support for dictation alternatives
https://bugs.webkit.org/show_bug.cgi?id=208720
<rdar://problem/58540114>

Reviewed by Wenson Hsieh.

Part 5

Enable USE_DICTATION_ALTERNATIVES on iOS.

  • wtf/PlatformUse.h:
4:33 PM Changeset in webkit [258088] by dbates@webkit.org
  • 3 edits in trunk/Source/WebKit

[iOS] Implement support for dictation alternatives
https://bugs.webkit.org/show_bug.cgi?id=208720
<rdar://problem/58540114>

Reviewed by Brady Eidson.

Part 4

This patch was originally written by Morgan Winer. I just simplified it a bit and fixed some
formatting issues to conform to the code style guidelines.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • Platform/spi/ios/UIKitSPI.h: Expose more SPI.
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView insertText:alternatives:style:]): Added.

4:30 PM Changeset in webkit [258087] by dbates@webkit.org
  • 11 edits in trunk/Source

[iOS] Implement support for dictation alternatives
https://bugs.webkit.org/show_bug.cgi?id=208720
<rdar://problem/58540114>

Reviewed by Brent Fulgham.

Part 3

Source/WebCore:

Separate code that is actually USE(AUTOCORRECTION_PANEL)-specific from code that can also
be used when building with USE(DICTATION_ALTERNATIVES) enabled.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • SourcesCocoa.txt: Mark TextAlternativeWithRange.mm as @no-unify to fix build breakage when

a unified source file includes both TextAlternativeWithRange.mm and a file that ultimately
includes LengthBox.h (e.g. WebArchiveResourceFromNSAttributedString.mm). TextAlternativeWithRange.mm
ultimately includes SFNTLayoutTypes.h, which defines a Fixed type that conflicts with enumerator
Fixed (part of the LengthType enumeration) defined in Length.h. Ideally the LengthType enumeration
would be an enum class or scoped to Length to avoid this ambiguity. This would be a big change to do
and so for now I am fixing the build breakage using @no-unify.

  • WebCore.xcodeproj/project.pbxproj: Add TextAlternativeWithRange.mm to the project now that

it is excluded from the unified build.

  • editing/AlternativeTextController.cpp:

(WebCore::markerTypesForAppliedDictationAlternative):
(WebCore::AlternativeTextController::alternativeTextClient):
(WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):

  • editing/AlternativeTextController.h:

Source/WebKit:

Move code that was guarded under PLATFORM(MAC) outside of that guard so that we compile it
so long as USE(DICTATION_ALTERNATIVES) is enabled.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:

Source/WebKitLegacy/mac:

Guard code that requires USE(AUTOCORRECTION_PANEL) to be enabled. Specifically, -_showDictationAlternativeUI
calls -handleAcceptedAlternativeText, but the latter is only compiled in when USE(AUTOCORRECTION_PANEL)
is enabled.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • WebView/WebView.mm:
4:27 PM Changeset in webkit [258086] by dbates@webkit.org
  • 12 edits in trunk/Source

[iOS] Implement support for dictation alternatives
https://bugs.webkit.org/show_bug.cgi?id=208720
<rdar://problem/58540114>

Reviewed by Wenson Hsieh.

Part 2

Source/WebCore:

Include UIKitSPI.h in TextAlternativeWithRange.mm to get the definition of NSTextAlternatives
when building for iOS. Also while I am here, fix up some code style issues and use uniform
initializer syntax.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • editing/mac/TextAlternativeWithRange.mm:

(WebCore::TextAlternativeWithRange::TextAlternativeWithRange):

Source/WebKit:

Move insertDictatedTextAsync() from the Mac-specific implementation files to Cocoa-specific
implementation files as it can be shared by both Mac and iOS. I did very minor C++ modernization:
just more uses of auto and uniform initializer syntax.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::insertDictatedTextAsync):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::insertDictatedTextAsync): Deleted.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::insertDictatedTextAsync):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::insertDictatedTextAsync): Deleted.

4:26 PM Changeset in webkit [258085] by dbates@webkit.org
  • 13 edits
    1 copy
    2 moves
    1 add in trunk/Source

[iOS] Implement support for dictation alternatives
https://bugs.webkit.org/show_bug.cgi?id=208720
<rdar://problem/58540114>

Reviewed by Wenson Hsieh.

Part 1

Source/WebCore:

Rename editing/mac/AlternativeTextUIController.{h, mm} to editing/cocoa/AlternativeTextUIController.{h, mm}
as it can be shared by both Mac and iOS. I also took this opportunity to do some very minor modernization
and cleanup to these files: use =default constructors and put the * on the right side for Objective-C types.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/cocoa/AlternativeTextContextController.h:
  • editing/cocoa/AlternativeTextContextController.mm: Added.

(WebCore::AlternativeTextContextController::addAlternatives):
(WebCore::AlternativeTextContextController::alternativesForContext):
(WebCore::AlternativeTextContextController::removeAlternativesForContext):
(WebCore::AlternativeTextContextController::clear):

  • editing/cocoa/AlternativeTextUIController.h: Renamed from Source/WebCore/editing/mac/AlternativeTextUIController.h.
  • editing/cocoa/AlternativeTextUIController.mm: Renamed from Source/WebCore/editing/mac/AlternativeTextUIController.mm.

(WebCore::AlternativeTextUIController::addAlternatives):
(WebCore::AlternativeTextUIController::alternativesForContext):
(WebCore::AlternativeTextUIController::clear):
(WebCore::AlternativeTextUIController::showAlternatives):
(WebCore::AlternativeTextUIController::handleAcceptedAlternative):
(WebCore::AlternativeTextUIController::dismissAlternatives):
(WebCore::AlternativeTextUIController::removeAlternatives):

Source/WebCore/PAL:

Expose some more SPI.

  • pal/spi/ios/UIKitSPI.h:

Source/WebKit:

Move some of the PageClientMac dictation alternatives code to PageClientImplCocoa so that it
can be shared with iOS.

Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
compiled for iOS. I will do that in a subsequent change once after all the code is in place
to do so.

  • UIProcess/Cocoa/PageClientImplCocoa.h:

(WebKit::PageClientImplCocoa::PageClientImplCocoa): Deleted; moved to be out-of-line to avoid
needing to #include AlternativeTextUIController.h from this file. Declare out-of-line destructor
for the same reason.

  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::PageClientImplCocoa): Moved from PageClientImplCocoa.h.
(WebKit::PageClientImplCocoa::pageClosed):
(WebKit::PageClientImplCocoa::addDictationAlternatives): Moved from PageClientImplMac.mm.
(WebKit::PageClientImplCocoa::removeDictationAlternatives): Ditto.
(WebKit::PageClientImplCocoa::dictationAlternatives): Ditto.

  • UIProcess/PageClient.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::showDictationAlternativeUI): Added; stub function.
(WebKit::PageClientImpl::pageClosed): Deleted; now we will use the base class implementation.

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::PageClientImpl): Moved AlternativeTextUIController logic from here to PageClientImplCocoa::PageClientImplCocoa().
(WebKit::PageClientImpl::pageClosed): Moved AlternativeTextUIController logic from here to PageClientImplCocoa::pageClosed()
so it can be shared and modified this function to call the base class implementation.
(WebKit::PageClientImpl::~PageClientImpl): Deleted; moved to PageClientImplCocoa.mm.
(WebKit::PageClientImpl::addDictationAlternatives): Deleted; moved to PageClientImplCocoa.mm.
(WebKit::PageClientImpl::removeDictationAlternatives): Deleted; moved to PageClientImplCocoa.mm.
(WebKit::PageClientImpl::dictationAlternatives): Deleted; moved to PageClientImplCocoa.mm.

4:14 PM Changeset in webkit [258084] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] commit queue is not skipping layout tests for rollout patches
https://bugs.webkit.org/show_bug.cgi?id=208716

Unreviewed minor fix.

  • BuildSlaveSupport/ews-build/steps.py:

(RunWebKitTests.doStepIf):
(RunWebKit1Tests.doStepIf): Moved to base class RunWebKitTests.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.
3:20 PM Changeset in webkit [258083] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[CMake][Win] GenerateSettings.rb are invoked twice in WebCoreBindings.vcxproj and WebCoreTestSupportBindings.vcxproj
https://bugs.webkit.org/show_bug.cgi?id=208771

Reviewed by Konstantin Tokarev.

CMake Visual Studio generator put a custom command of
GenerateSettings.rb into both WebCoreBindings.vcxproj and
WebCoreTestSupportBindings.vcxproj because both projects are
using the generated files as source files. This causes
unnecessary recompilation.

The fundamental issue of this bug was fixed in CMake 3.12.
<https://gitlab.kitware.com/cmake/cmake/issues/16767>
All Windows ports are using newer CMake for Visual Studio 2019
support.

However, WebCoreTestSupportBindings needs to have a direct or
indirect dependency to WebCoreBindings for CMake Visual Studio
generator to eliminate duplicated custom commands. Otherwise,
GenerateSettings.rb will be triggered in both projects.

  • CMakeLists.txt: Added a explicit dependency to WebCoreBindings

for WebCoreTestSupportBindings.

  • WebCoreMacros.cmake: Removed stale comment.
3:19 PM Changeset in webkit [258082] by eric.carlson@apple.com
  • 24 edits in trunk/Source

Implement setWirelessPlaybackTarget, performTaskAtMediaTime, and wouldTaintOrigin in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=208651
<rdar://problem/60088298>

Reviewed by Youenn Fablet.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove unused lambda parameter.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::performTaskAtMediaTime): Make MediaTime parameter const ref
so it isn't copied.

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

(WebCore::MediaPlayerPrivateInterface::performTaskAtMediaTime): Ditto.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::performTaskAtMediaTime): Ditto.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::performTaskAtMediaTime): Ditto.

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

(WebCore::VideoLayerManagerObjC::setVideoFullscreenLayer): Don't set inline image
contents if image is NULL.

Source/WebKit:

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::dispatchSyncMessage): Dispatch player manager messages.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::didReceiveSyncPlayerMessage): Dispatch player messages.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy): Clear the completion handler
do its destructor doesn't assert.
(WebKit::RemoteMediaPlayerProxy::setWirelessPlaybackTarget): Implement.
(WebKit::RemoteMediaPlayerProxy::performTaskAtMediaTime): Ditto.
(WebKit::RemoteMediaPlayerProxy::wouldTaintOrigin): Ditto.

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::updateCachedState): Update wireless playback target name.
(WebKit::MediaPlayerPrivateRemote::load): Don't log as unimplemented.
(WebKit::MediaPlayerPrivateRemote::wirelessPlaybackTargetName const): Return cached name.
(WebKit::MediaPlayerPrivateRemote::setWirelessPlaybackTarget): Implement.
(WebKit::MediaPlayerPrivateRemote::wouldTaintOrigin const): Ditto.
(WebKit::MediaPlayerPrivateRemote::performTaskAtMediaTime): Ditto.
(WebKit::MediaPlayerPrivateRemote::setClosedCaptionsVisible): Deleted, not needed.
(WebKit::MediaPlayerPrivateRemote::simulateAudioInterruption): Ditto.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/RemoteMediaPlayerConfiguration.h:

(WebKit::RemoteMediaPlayerConfiguration::decode): Decode supportsFullscreen too.

2:53 PM Changeset in webkit [258081] by Alexey Shvayka
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r258049): Unchecked JS exception in jsc::Stringifier::toJSON
https://bugs.webkit.org/show_bug.cgi?id=208766

Reviewed by Yusuke Suzuki.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::toJSON): Add missing RELEASE_AND_RETURN.

2:13 PM Changeset in webkit [258080] by beidson@apple.com
  • 8 edits in trunk/Source

Add runtime flag for incremental PDF loading.
https://bugs.webkit.org/show_bug.cgi?id=208763

Reviewed by Tim Horton.

Source/WebCore:

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setIncrementalPDFLoadingEnabled):
(WebCore::RuntimeEnabledFeatures::incrementalPDFLoadingEnabled const):

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultIncrementalPDFEnabled):

  • Shared/WebPreferencesDefaultValues.h:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::pdfDocumentDidLoad):
(WebKit::PDFPlugin::manualStreamDidReceiveData):
(WebKit::PDFPlugin::manualStreamDidFail):

2:05 PM Changeset in webkit [258079] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][Verification] Use the table wrapper box's offset when matching out-of-flow tables
https://bugs.webkit.org/show_bug.cgi?id=208769
<rdar://problem/60191322>

Reviewed by Antti Koivisto.

Source/WebCore:

In LFC, an out-of-flow table initiates a wrapper table box (out-of-flow) and a child table box (in-flow).
Apply the wrapper table box's offset, when matching the display and the render tree.

Test: fast/layoutformattingcontext/absolute-positioned-simple-table2.html

  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

LayoutTests:

  • fast/layoutformattingcontext/absolute-positioned-simple-table2-expected.html: Added.
  • fast/layoutformattingcontext/absolute-positioned-simple-table2.html: Added.
1:56 PM Changeset in webkit [258078] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk

Remove bad assertion in FTLLowerDFGToB3's compileDelBy().
https://bugs.webkit.org/show_bug.cgi?id=208764
<rdar://problem/59940095>

Reviewed by Keith Miller.

JSTests:

  • stress/delete-by-val-with-base-and-subscript-using-same-cell.js: Added.
  • stress/delete-by-val-with-base-and-subscript-using-same-non-cell.js: Added.

Source/JavaScriptCore:

The assertion ASSERT(base.gpr() != params[2].gpr()) is wrong because it is legal
JS to pass in the same value as the base and subscript. The runtime will handle
it properly.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):

1:46 PM Changeset in webkit [258077] by Darin Adler
  • 2 edits in trunk/Source/WebCore

Make Editor::applyEditingStyleToBodyElement do things in a straightforward manner
https://bugs.webkit.org/show_bug.cgi?id=208177

Reviewed by Wenson Hsieh.

  • editing/Editor.cpp:

(WebCore::Editor::applyEditingStyleToBodyElement const): Use Document::body and
StyledElement::setInlineStyleProperty to apply styles to the body. The older code
was looping over all body elements in the document, for no good reason, and using
the CSS object model wrapper object for the styles, also for no good reason.

11:35 AM Changeset in webkit [258076] by weinig@apple.com
  • 15 edits in trunk

Move JavaScriptCore related feature defines from FeatureDefines.xcconfig to PlatformEnableCocoa.h
https://bugs.webkit.org/show_bug.cgi?id=207436
<rdar://problem/59296762>

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Remove JSC related defines.

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Remove JSC related defines.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Remove JSC related defines.

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Remove JSC related defines.

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Remove JSC related defines.

Source/WTF:

  • wtf/PlatformEnable.h:

Add default values for ENABLE_FAST_JIT_PERMISSIONS and ENABLE_SEPARATED_WX_HEAP.

  • wtf/PlatformEnableCocoa.h:

Added ENABLE_FAST_JIT_PERMISSIONS and ENABLE_INTL (from FeatureDefines.xcconfig), ENABLE_SEPARATED_WX_HEAP
(from PlatformEnable.h) and ENABLE_FTL_JIT (from both FeatureDefines.xcconfig and PlatformEnable.h).

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Remove JSC related defines.

10:34 AM Changeset in webkit [258075] by Chris Fleizach
  • 15 edits in trunk

AX: Provide a way to run tests in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=208629
<rdar://problem/60075583>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Now that we have a way to run this with tests, we don't need to allow usage for an unknown client.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::clientSupportsIsolatedTree):

Tools:

Provide the ability to run tests for accessibility in the isolated tree mode.
This sends a flag over to the injected bundle which calls the right HIServices override so that
the system thinks it is in isolated mode.

  • Scripts/compare-webkit-configurations:

(flag_for_comparison):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(parse_args):

  • Scripts/webkitpy/port/driver.py:

(Driver.cmd_line):

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

(WTR::AccessibilityController::AccessibilityController):
(WTR::AccessibilityController::setAccessibilityIsolatedTreeMode):
(WTR::AccessibilityController::updateIsolatedTreeMode):
(WTR::AccessibilityController::executeOnAXThreadIfPossible):

  • WebKitTestRunner/InjectedBundle/AccessibilityController.h:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/Options.cpp:

(WTR::handleOptionAccessibilityIsolatedTreeMode):
(WTR::OptionsHandler::OptionsHandler):

  • WebKitTestRunner/Options.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::TestController::resetStateToConsistentValues):

  • WebKitTestRunner/TestController.h:

(WTR::TestController::accessibilityIsolatedTreeMode const):

10:26 AM Changeset in webkit [258074] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening.

Land results with new console log line numbers.

  • http/tests/adClickAttribution/anchor-tag-attributes-validation-expected.txt:
  • http/tests/security/anchor-download-block-crossorigin-expected.txt:
9:52 AM Changeset in webkit [258073] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Use start-aligned horizontal adjustment when justify is not eligible.
https://bugs.webkit.org/show_bug.cgi?id=208762
<rdar://problem/60188433>

Reviewed by Antti Koivisto.

Make sure we apply "text-align: start" when "text-align: justify" is not eligible.
Currently "text-align: start" is a no-op, so no chnange in functionality (this might change in the future).

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignHorizontally):
(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::isTextAlignJustify const): Deleted.
(WebCore::Layout::LineBuilder::isTextAlignRight const): Deleted.

9:26 AM Changeset in webkit [258072] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed unified build fix; forward declare referenced types. In this case, WebCore::ImageData.

  • WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h:
8:09 AM Changeset in webkit [258071] by ysuzuki@apple.com
  • 22 edits in trunk

[JSC] Enable public class fields
https://bugs.webkit.org/show_bug.cgi?id=208756

Reviewed by Mark Lam.

JSTests:

Rename useClassFields to usePublicClassFields to keep separate from usePrivateClassFields once
it is implemented.

  • stress/big-int-as-property-name.js:
  • stress/class-fields-bytecode-cache.js:
  • stress/class-fields-computed-to-property-key.js:
  • stress/class-fields-function-name.js:
  • stress/class-fields-harmony.js:
  • stress/class-fields-proxy-define-property.js:
  • stress/class-fields-stress-instance.js:
  • stress/class-fields-to-property-key-const-string-ftl.js:
  • stress/class-fields-to-property-key-const-symbol-ftl.js:
  • stress/class-fields-to-property-key-slow-object-tostring-ftl.js:
  • stress/class-fields-to-property-key-slow-object-valueof-ftl.js:
  • stress/class-fields-to-property-key-string-object-ftl.js:
  • stress/class-fields-to-property-key-string-or-string-object-ftl.js:
  • stress/generator-syntax.js:
  • stress/method-name.js:
  • test262/config.yaml:

Source/JavaScriptCore:

This patch turns public-class-fields feature on, implemented in r254653.
To separate from private-class-fields, this patch renames the flag from useClassFields to usePublicClassFields,
and first enable public-class-fields feature.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionCallValueNode::emitBytecode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • runtime/OptionsList.h:
8:06 AM Changeset in webkit [258070] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][IFC] Do not text-align: justify the runs on the current line if they are followed by a forced break
https://bugs.webkit.org/show_bug.cgi?id=208761
<rdar://problem/59825136>

Reviewed by Antti Koivisto.

Source/WebCore:

https://www.w3.org/TR/css-text-3/#text-align-property
"Text is justified according to the method specified by the text-justify property,
in order to exactly fill the line box. Unless otherwise specified by text-align-last,
the last line before a forced break or the end of the block is start-aligned."

Test: fast/text/text-align-justify-and-forced-line-break.html

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignHorizontally):

LayoutTests:

  • fast/text/text-align-justify-and-forced-line-break-expected.html: Added.
  • fast/text/text-align-justify-and-forced-line-break.html: Added.
1:28 AM Changeset in webkit [258069] by mmaxfield@apple.com
  • 13 edits
    1 add in trunk/Source/WebKit

[GPU Process] Implement CanvasRenderingContext2D.getImageData()
https://bugs.webkit.org/show_bug.cgi?id=208560
<rdar://problem/60060618>

Reviewed by Said Abou-Hallawa.

Adds a new synchronous message between the Web Process and the GPU Process.
Unfortunately, getImageData() synchronously returns results, and we don't
have the infrastructure to make JavaScript interruptible, so this means that
the message has to be synchronous, at least until we add that infrastructure.

When the RemoteImageBuffer receives the getImageData() call, it first
asynchronously flushes the pending display list, doesn't wait for a response,
and then sends the synchronous getImageData() message. Because the GPU Process
receives messages in-order, the Web Process doesn't have to wait for the
response from the flush message.

After this patch, there are a few optimization opportunities we can exploit
where we use SharedBuffer directly instead of copying into and out of the
ImageData.

No new tests because there is no behavior change. We're just using the GPU
process now, instead of implementing the command locally in the Web Process.

  • GPUProcess/graphics/RemoteImageBufferMessageHandlerProxy.h:
  • GPUProcess/graphics/RemoteImageBufferProxy.h:
  • GPUProcess/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::getImageData):

  • GPUProcess/graphics/RemoteRenderingBackendProxy.h:
  • GPUProcess/graphics/RemoteRenderingBackendProxy.messages.in:
  • Platform/IPC/ImageDataReference.h: Added.

(IPC::ImageDataReference::ImageDataReference):
(IPC::ImageDataReference::buffer):
(IPC::ImageDataReference::buffer const):
(IPC::ImageDataReference::encode const):
(IPC::ImageDataReference::decode):

  • Platform/IPC/MessageSender.h:

(IPC::MessageSender::sendSync):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<RefPtr<WebCore::ImageData>>::encode):
(IPC::ArgumentCoder<RefPtr<WebCore::ImageData>>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteImageBuffer.h:
  • WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.cpp:

(WebKit::RemoteImageBufferMessageHandler::getImageData const):
(WebKit::RemoteImageBufferMessageHandler::flushDrawingContext):
(WebKit::RemoteImageBufferMessageHandler::flushDrawingContextAndWaitCommit):

  • WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h:
1:17 AM Changeset in webkit [258068] by Konstantin Tokarev
  • 4 edits in trunk/Source/WebCore

REGRESSION(r257975): [GTK][WPE] Build failure after a clean build
https://bugs.webkit.org/show_bug.cgi?id=208711

Reviewed by Yusuke Suzuki.

Make sure that InternalSettingsGenerated,idl is generated before bindings
generation starts.

Also, make IDL preprocessor die if specified IDL file is missing, instead
of going on silently.

  • CMakeLists.txt:
  • WebCoreMacros.cmake:
  • bindings/scripts/preprocess-idls.pl:

(getFileContents):

1:13 AM Changeset in webkit [258067] by Andres Gonzalez
  • 10 edits in trunk/Source/WebCore

AXIsolatedObject support for documentLinks.
https://bugs.webkit.org/show_bug.cgi?id=208734

Reviewed by Chris Fleizach.

  • Expose documentLinks through the AXCoreObject interface, so that

wrapper code works for both AXObject and AXIsolatedObjects.

  • Struct NodeChange now retains wrapper which was causing crash as the

wrapper was destroyed before it was attached to the IsolatedObject.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::documentLinks):
(WebCore::AccessibilityRenderObject::getDocumentLinks): Deleted.

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::setFocusedNode):
(WebCore::AXIsolatedTree::applyPendingChanges):

  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

12:17 AM Changeset in webkit [258066] by Chris Fleizach
  • 11 edits
    1 delete in trunk/Source

Unreviewed, rolling out r258047.

Referenced SPI not yet available for Safari builders.

Reverted changeset:

"Implementation of AccessibilitySupport AXSIsolatedTreeMode."
https://bugs.webkit.org/show_bug.cgi?id=208691
https://trac.webkit.org/changeset/258047

Note: See TracTimeline for information about the timeline view.