Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1100c0ba6eb79172088ca695c8cb1e51036d9232
https://github.com/WebKit/WebKit/commit/1100c0ba6eb79172088ca695c8cb1e51036d9232
Author: Said Abou-Hallawa <[email protected]>
Date: 2023-01-11 (Wed, 11 Jan 2023)
Changed paths:
M Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
M Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
M Source/WebCore/platform/graphics/mac/controls/ControlMac.mm
M
Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M
Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
M Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderImage.cpp
M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
M
Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
Log Message:
-----------
[GPU Process] DrawFocusRing with timeOffset is not recorded for macOS
https://bugs.webkit.org/show_bug.cgi?id=250403
rdar://104039216
Reviewed by Simon Fraser.
The 'timeOffset' argument to GraphicsContext::drawFocusRing() was never used.
Instead we always pass std::numeric_limits<double>::max() to
NSInitializeCGFocusRingStyleForTime(). This means its return value is always
false.
So there is no need to pass 'timeOffset' and 'needsRepaint' to drawFocusRing().
Therefore the Mac versions of drawFocusRing() are not needed.
We can just have two versions of GraphicsContext::drawFocusRing():
1. The first one takes (const Path&, float outlineWidth, ...). The
'outlineWidth'
is used to set the lineWidth on Cairo and to set the blurRadius on Windows.
2. The second one takes (const Vector<FloatRect>&, float outlineOffset, float
outlineWidth, ...).
The 'outlineOffset' is used to shrink the focus ring rectangles. On Cocoa and
Windows
platforms this version will convert the rects to a Path and call the previous
one.
* Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawFocusRing):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::drawFocusRing):
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::GraphicsContextCG::drawFocusRing):
(WebCore::drawFocusRingAtTime): Deleted.
(WebCore::drawFocusRing): Deleted.
(WebCore::drawFocusRingToContext): Deleted.
(WebCore::drawFocusRingToContextAtTime): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawFocusRingPath::apply const):
(WebCore::DisplayList::DrawFocusRingRects::apply const):
(WebCore::DisplayList::dumpItem):
(WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath):
(WebCore::DisplayList::DrawFocusRingPath::outlineWidth const):
(WebCore::DisplayList::DrawFocusRingPath::encode const):
(WebCore::DisplayList::DrawFocusRingPath::decode):
(WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects):
(WebCore::DisplayList::DrawFocusRingRects::rects const):
(WebCore::DisplayList::DrawFocusRingRects::outlineOffset const):
(WebCore::DisplayList::DrawFocusRingRects::outlineWidth const):
(WebCore::DisplayList::DrawFocusRingRects::color const):
(WebCore::DisplayList::DrawFocusRingRects::encode const):
(WebCore::DisplayList::DrawFocusRingRects::decode):
(WebCore::DisplayList::DrawFocusRingPath::width const): Deleted.
(WebCore::DisplayList::DrawFocusRingPath::offset const): Deleted.
(WebCore::DisplayList::DrawFocusRingRects::width const): Deleted.
(WebCore::DisplayList::DrawFocusRingRects::offset const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawFocusRing):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordDrawFocusRingPath):
(WebCore::DisplayList::RecorderImpl::recordDrawFocusRingRects):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
*
Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::drawFocusRing):
*
Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
* Source/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContextCG::drawFocusRing):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::drawFocusRing):
(WebCore::RenderElement::paintFocusRing const):
* Source/WebCore/rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawFocusRingPath):
(WebKit::RemoteDisplayListRecorder::drawFocusRingRects):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingPath):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingRects):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
Canonical link: https://commits.webkit.org/258794@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes