Timeline
Dec 5, 2021:
- 9:49 PM Changeset in webkit [286538] by
-
- 59 edits1 add in trunk
[GPU Process] Add the encoding/decoding for Filter and FilterEffect
https://bugs.webkit.org/show_bug.cgi?id=232844
Reviewed by Wenson Hsieh.
Source/WebCore:
This patch adds the encoding and decoding for the FilterEffect and the
Filter objects. Because these objects have super-classes, we are going
to do the encoding and decoding through a new IPC class called
FilterReference.
The encoding and decoding of these classes will be needed in two cases:
1) DisplayList::Recorder::drawFilteredImageBuffer()
2) RemoteImageBufferProxy::filteredImage()
A few things have not be done this patch yet:
1) LightSource has not been encoded/decoded
2) FELighting classes have not been encoded/decoded
3) FEImage has not been encoded/decoded
4) SVGFilter has not been encoded/decoded
This patch does not change any behavior even if the GPU Process for DOM
rendering is enabled. The sourceImage for the filter and the filter image
need to be of type of RemoteImageBufferProxy to this code to be called.
- Headers.cmake:
- WebCore.xcodeproj/project.pbxproj:
- platform/graphics/ConcreteImageBuffer.h:
- platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawFilteredImageBuffer):
- platform/graphics/GraphicsContext.h:
- platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::append):
- platform/graphics/displaylists/DisplayListItemBuffer.cpp:
(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):
- platform/graphics/displaylists/DisplayListItemType.cpp:
(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):
- platform/graphics/displaylists/DisplayListItemType.h:
- platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawFilteredImageBuffer::DrawFilteredImageBuffer):
(WebCore::DisplayList::DrawFilteredImageBuffer::apply const):
(WebCore::DisplayList::DrawFilteredImageBuffer::apply):
(WebCore::DisplayList::operator<<):
- platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawFilteredImageBuffer::sourceImageIdentifier const):
(WebCore::DisplayList::DrawFilteredImageBuffer::sourceImageRect const):
(WebCore::DisplayList::DrawFilteredImageBuffer::globalBounds const):
(WebCore::DisplayList::DrawFilteredImageBuffer::localBounds const):
- platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawFilteredImageBuffer):
- platform/graphics/displaylists/DisplayListRecorder.h:
- platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordDrawFilteredImageBuffer):
- platform/graphics/displaylists/DisplayListRecorderImpl.h:
- platform/graphics/filters/FEBlend.h:
(WebCore::FEBlend::encode const):
(WebCore::FEBlend::decode):
- platform/graphics/filters/FEColorMatrix.h:
(WebCore::FEColorMatrix::encode const):
(WebCore::FEColorMatrix::decode):
- platform/graphics/filters/FEComponentTransfer.h:
(WebCore::ComponentTransferFunction::encode const):
(WebCore::ComponentTransferFunction::decode):
(WebCore::FEComponentTransfer::encode const):
(WebCore::FEComponentTransfer::decode):
- platform/graphics/filters/FEComposite.h:
(WebCore::FEComposite::encode const):
(WebCore::FEComposite::decode):
- platform/graphics/filters/FEConvolveMatrix.h:
(WebCore::FEConvolveMatrix::encode const):
(WebCore::FEConvolveMatrix::decode):
- platform/graphics/filters/FEDiffuseLighting.h:
(WebCore::FEDiffuseLighting::decode):
- platform/graphics/filters/FEDisplacementMap.h:
(WebCore::FEDisplacementMap::encode const):
(WebCore::FEDisplacementMap::decode):
- platform/graphics/filters/FEDropShadow.h:
(WebCore::FEDropShadow::encode const):
(WebCore::FEDropShadow::decode):
- platform/graphics/filters/FEFlood.h:
(WebCore::FEFlood::encode const):
(WebCore::FEFlood::decode):
- platform/graphics/filters/FEGaussianBlur.h:
(WebCore::FEGaussianBlur::encode const):
(WebCore::FEGaussianBlur::decode):
- platform/graphics/filters/FELighting.h:
(WebCore::FELighting::encode const):
(WebCore::FELighting::decode):
- platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::create):
(WebCore::FEMerge::FEMerge):
- platform/graphics/filters/FEMerge.h:
(WebCore::FEMerge::encode const):
(WebCore::FEMerge::decode):
- platform/graphics/filters/FEMorphology.h:
(WebCore::FEMorphology::encode const):
(WebCore::FEMorphology::decode):
- platform/graphics/filters/FEOffset.h:
(WebCore::FEOffset::encode const):
(WebCore::FEOffset::decode):
- platform/graphics/filters/FESpecularLighting.h:
(WebCore::FESpecularLighting::decode):
- platform/graphics/filters/FETile.h:
- platform/graphics/filters/FETurbulence.h:
(WebCore::FETurbulence::encode const):
(WebCore::FETurbulence::decode):
- platform/graphics/filters/Filter.cpp:
(WebCore::Filter::apply):
- platform/graphics/filters/Filter.h:
(WebCore::Filter::setClipOperation):
- platform/graphics/filters/SourceGraphic.h:
- rendering/CSSFilter.cpp:
(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):
- rendering/CSSFilter.h:
- rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::applyFilterEffect):
- rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
- svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::build const):
Source/WebKit:
- GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):
- GPUProcess/graphics/RemoteDisplayListRecorder.h:
- GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
- GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::getFilteredImageForImageBuffer):
- GPUProcess/graphics/RemoteRenderingBackend.h:
- GPUProcess/graphics/RemoteRenderingBackend.messages.in:
- Platform/IPC/FilterReference.h: Added.
(IPC::FilterReference::FilterReference):
(IPC::FilterReference::takeFilter):
(IPC::FilterReference::encodeFilterEffect):
(IPC::FilterReference::decodeFilterEffect):
(IPC::FilterReference::encodeSVGFilter):
(IPC::FilterReference::decodeSVGFilter):
(IPC::FilterReference::encodeCSSFilter):
(IPC::FilterReference::decodeCSSFilter):
(IPC::FilterReference::encodeFilter):
(IPC::FilterReference::decodeFilter):
(IPC::FilterReference::encode const):
(IPC::FilterReference::decode):
- Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
- WebKit.xcodeproj/project.pbxproj:
- WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFilteredImageBuffer):
- WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
- WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
- WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::getFilteredImage):
- WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
Tools:
- TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
- TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
- 8:40 PM Changeset in webkit [286537] by
-
- 6 edits in trunk
Add trace points for generated momentum events
https://bugs.webkit.org/show_bug.cgi?id=233857
Reviewed by Tim Horton.
Source/WebKit:
Add start/end points for synthetic momentum, and a trace point for each generated event.
- WebProcess/WebPage/MomentumEventDispatcher.cpp:
(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
Source/WTF:
- wtf/SystemTracing.h:
Tools:
Add start/end points for synthetic momentum, and a trace point for each generated event.
- Tracing/SystemTracePoints.plist:
Dec 4, 2021:
- 8:14 PM Changeset in webkit [286536] by
-
- 3 edits in trunk/Tools
Change WTR::AccessibilityUIElement::descriptionOfValue(id) to return a RetainPtr.
https://bugs.webkit.org/show_bug.cgi?id=233815
<rdar://problem/86019373>
Reviewed by Chris Fleizach.
This fixes several tests in isolated tree mode, in particular:
accessibility/mac/focus-crash.html
accessibility/mac/search-predicate.html
- WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
- WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::descriptionOfValue const):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::embeddedImageDescription const):
- 7:51 PM Changeset in webkit [286535] by
-
- 9 edits in trunk
Rename DerivedSources/WebKit2 to DerivedSources/WebKit
https://bugs.webkit.org/show_bug.cgi?id=233803
Reviewed by Tim Horton.
Mechanical rename.
No new tests because there is no behavior change.
- Configurations/BaseTarget.xcconfig:
- DerivedSources-output.xcfilelist:
- PlatformGTK.cmake:
- Scripts/generate-derived-sources.sh:
- Scripts/generate-unified-sources.sh:
- UnifiedSources-output.xcfilelist:
- WebKit.xcodeproj/project.pbxproj:
- 8:51 AM Changeset in webkit [286534] by
-
- 5 edits in trunk/Source/WebCore
[LFC][IFC] Compute isFirstBox/isLastBox for text content
https://bugs.webkit.org/show_bug.cgi?id=233850
Reviewed by Antti Koivisto.
This is in preparation for helping the iterator interface to compute renderer (layout box) boundaries for text content.
- layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::computeIsFirstIsLastBoxForInlineContent):
- layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
- layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayoutForIntergration):
- layout/formattingContexts/inline/display/InlineDisplayBox.h:
(WebCore::InlineDisplay::Box::setIsFirstBox):
- 8:08 AM Changeset in webkit [286533] by
-
- 2 edits7 adds in trunk/Source/WebKit
Add command line
webpushtoolfor daemon development and debugging.
https://bugs.webkit.org/show_bug.cgi?id=233845
Reviewed by Tim Horton.
No behavior change.
This utility will eventually be quite fleshed out.
For now, it can act as a terminal that prints debug messages from webpushd.
- Configurations/webpushtool.xcconfig: Added.
- Resources/webpushtool.entitlements: Added.
- WebKit.xcodeproj/project.pbxproj:
- WebKit.xcodeproj/xcshareddata/xcschemes/webpushtool.xcscheme: Added.
- webpushd/webpushtool/WebPushToolConnection.h: Added.
- webpushd/webpushtool/WebPushToolConnection.mm: Added.
(WebPushTool::Connection::create):
(WebPushTool::maybeConnectToService):
(WebPushTool::Connection::Connection):
(WebPushTool::Connection::connectToService):
(WebPushTool::Connection::startAction):
(WebPushTool::Connection::startDebugStreamAction):
(WebPushTool::Connection::sendAuditToken):
(WebPushTool::Connection::connectionDropped):
(WebPushTool::Connection::messageReceived):
- webpushd/webpushtool/WebPushToolMain.mm: Added.
(printUsageAndTerminate):
(main):
- 7:28 AM Changeset in webkit [286532] by
-
- 5 edits2 adds in trunk
CSS animation sorting may crash due to AnimationList copy upon CSS Animation removal
https://bugs.webkit.org/show_bug.cgi?id=233819
rdar://85596065
Reviewed by Dean Jackson and Darin Adler.
Source/WebCore:
Test: webanimations/css-animation-sorting-crash-2.html
When resolving animations during style resolution, we sort them to ensure they're in the right
composite order as defined by the Web Animations and related specifications, in this case the
CSS Animations specification defining how CSS Animations set on a given element are sorted.
Indeed, a given element may have multiple animations specified on it, and in fact it may have
multiple instances of the same animation. For instance, settinganimation-name: anim, anim, anim
would create three separate CSS Animations all with the same keyframes and timing properties.
The CSS machinery within WebKit creates an AnimationList to reference the animations parsed from
CSS. Each animation is an Animation object. These Animation objects are ref-counted.
When we update animations, using Styleable::updateCSSAnimations(), we compare the current AnimationList
for this style resolution, with the previous AnimationList specified when this method was last called
for this element. The outcome of this comparison will yield new CSSAnimation objects, the removal of
such objects or the update of existing objects by setting the Animation object as its "backing animation".
When we're done we keep a reference to the current AnimationList on the element's KeyframeEffectStack.
Later, when we resolve animations during style resolution and we get to sort the animations, we will
use the AnimationList which contains the Animation objects in the order they were specified in the
animation-listproperty to establish the order in which the CSSAnimation objects should be ordered
relative to one another, based on their "backing animation" which must be an Animation object found
in the AnimationList.
If we fail to find matching Animation objects, we crash due to a call to RELEASE_ASSERT_NOT_REACHED()
in compareCSSAnimations(const CSSAnimation&, const CSSAnimation&).
So, why would we ever get in a situation where we reach this RELEASE_ASSERT_NOT_REACHED? Well, there is
a situation where we manipulate the AnimationList set on the KeyframeEffectStack in Styleable::updateCSSAnimations().
That case is when Styleable::cancelDeclarativeAnimations() is called, and we call the static function
removeCSSAnimationCreatedByMarkup(). In this function, we actually make a copy of the previously recorded
AnimationList because that list isconstso we can't manipulate it directly. To make this copy we call
AnimationList::copy() which creates a new AnimationList object, which itself is not the issue, but also
makes copies of each Animation object within. Now, that's the problem, because at this point our pointer
comparisons in compareCSSAnimations() will fail since the Animation objects we recorded in
Styleable::updateCSSAnimations() will no longer be the same instances as those in the manipulated AnimationList.
To fix this, we add a new AnimationList::shallowCopy() method to specify whether we want clones or references
of the Animation members, and when calling removeCSSAnimationCreatedByMarkup(), we use this new method such
that we get references and not clones. This ensures that removing an animation from the list will indeed
create a new AnimationList, but the two lists will have references to the same Animation objects.
- platform/animation/AnimationList.cpp:
(WebCore::AnimationList::AnimationList):
- platform/animation/AnimationList.h:
(WebCore::AnimationList::copy const):
(WebCore::AnimationList::shallowCopy const):
- style/Styleable.cpp:
(WebCore::removeCSSAnimationCreatedByMarkup):
LayoutTests:
Add a test that used to crash before this patch.
- webanimations/css-animation-sorting-crash-2-expected.txt: Added.
- webanimations/css-animation-sorting-crash-2.html: Added.
- 7:24 AM Changeset in webkit [286531] by
-
- 4 edits2 adds in trunk
Fix parentNode in CompositeEditCommand::splitTreeToNode
https://bugs.webkit.org/show_bug.cgi?id=230710
Patch by Rob Buis <rbuis@igalia.com> on 2021-12-04
Reviewed by Ryosuke Niwa.
Source/WebCore:
Fix parentNode handling in CompositeEditCommand::splitTreeToNode and
also a few more IndentOutdentCommand methods to support the test case.
Test: editing/execCommand/outdent-cut-crash.html
- editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs):
- editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::indentIntoBlockquote): do not call positionInParentAfterNode
if insertNodeBefore failed.
(WebCore::IndentOutdentCommand::outdentParagraph): need to check for null positions
before calling moveParagraphs.
LayoutTests:
- editing/execCommand/outdent-cut-crash-expected.txt: Added.
- editing/execCommand/outdent-cut-crash.html: Added.
- 7:22 AM Changeset in webkit [286530] by
-
- 7 edits in trunk/LayoutTests
AX: Make ellipsis-text.html, aria-roledescription.html, and aria-switch-checked.html pass in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=233790
Reviewed by Chris Fleizach.
- accessibility/aria-roledescription-expected.txt:
- accessibility/aria-roledescription.html:
- accessibility/aria-switch-checked-expected.txt:
- accessibility/aria-switch-checked.html:
Make these tests async. They must be made async to pass in
isolated tree mode as they dynamically change page content using JS.
- accessibility/ellipsis-text.html:
Make this test isolated-tree-friendly by selecting elements with accessibleElementById instead
document.getElementById("id").focus()andaccessibilityController.focusedElement
- platform/glib/accessibility/aria-roledescription-expected.txt:
Update platform-specfic expectation for the new version of this test.
- 5:52 AM Changeset in webkit [286529] by
-
- 2 edits in trunk/Source/WebCore
[LFC][IFC] Set BoxGeometry for bidi inline boxes
https://bugs.webkit.org/show_bug.cgi?id=233616
Reviewed by Antti Koivisto.
In this patch we compute the BoxGeometry values for the bidi inline boxes.
BoxGeometry is mostly used for boundingClientRect/offsetWidth(left etc).
- layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
- 1:13 AM Changeset in webkit [286528] by
-
- 12 edits in trunk/Source/WebCore
Prepare for SharedWorker implementation
https://bugs.webkit.org/show_bug.cgi?id=233848
Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-04
Reviewed by Chris Dumez.
This splits off the parts of bug 230382 that don't change behavior.
- workers/AbstractWorker.cpp:
(WebCore::AbstractWorker::workerFetchOptions):
- workers/AbstractWorker.h:
- workers/DedicatedWorkerThread.h:
- workers/Worker.cpp:
(WebCore::Worker::Worker):
(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):
- workers/Worker.h:
- workers/WorkerOptions.h:
- workers/WorkerOrWorkletScriptController.cpp:
- workers/WorkerOrWorkletScriptController.h:
- workers/WorkerThread.cpp:
(WebCore::WorkerThread::createThread):
- workers/WorkerThread.h:
(WebCore::WorkerThread::isServiceWorkerThread const): Deleted.
- workers/service/context/ServiceWorkerThread.h:
- 12:28 AM Changeset in webkit [286527] by
-
- 3 edits in trunk/Source/WebKit
[Cocoa] Launch Captive Portal WebContent process when requested
https://bugs.webkit.org/show_bug.cgi?id=233824
<rdar://problem/86023898>
Reviewed by Darin Adler.
When the WebKit client requests a Captive Portal process, launch the dedicated XPC service
with Captive Portal entitlements.
- UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::webContentServiceName): New helper function.
(WebKit::serviceName): Update to use new helper.
(WebKit::ProcessLauncher::launchProcess): Log errors when launching.
- WebKit.xcodeproj/project.pbxproj: Include the CaptivePortal xpc service when creating
development symlinks.