WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-236923-20220403225616.patch (text/plain), 9.21 KB, created by
Said Abou-Hallawa
on 2022-04-03 22:56:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2022-04-03 22:56:17 PDT
Size:
9.21 KB
patch
obsolete
>Subversion Revision: 292278 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4c58d7a470b75bbf268e08511ac941a5309d17f6..2350c2a5ffd6e267fb62ed4803183c75a57d3074 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,32 @@ >+2022-04-03 Said Abou-Hallawa <said@apple.com> >+ >+ [GPU Process] [iOS] Sometimes the text drop shadow is not drawn >+ https://bugs.webkit.org/show_bug.cgi?id=236923 >+ rdar://89196794 >+ >+ Reviewed by Simon Fraser. >+ >+ The baseCTM of internal context of DrawGlyphsRecorder has to match the >+ baseCTM of the owner DisplayList::Recorder. >+ >+ When recording the glyph runs, DrawGlyphsRecorder::recordDrawGlyphs() >+ updates the shadow of the recorder such that ShadowsIgnoreTransforms is >+ set to "false". That means no shadow transformation will be applied to >+ the offset or the blur radius in GPUP. >+ >+ * platform/graphics/DrawGlyphsRecorder.h: >+ * platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp: >+ (WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder): >+ (WebCore::DrawGlyphsRecorder::populateInternalState): >+ * platform/graphics/displaylists/DisplayListRecorder.cpp: >+ (WebCore::DisplayList::Recorder::Recorder): >+ * platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp: >+ (WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder): >+ * platform/graphics/win/DrawGlyphsRecorderWin.cpp: >+ (WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder): >+ * rendering/RenderThemeIOS.mm: >+ (WebCore::paintAttachmentText): >+ > 2022-04-03 Tim Horton <timothy_horton@apple.com> > > Standardize naming of WK_NETWORK_EXTENSION_LDFLAGS (from LD_FLAGS) >diff --git a/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h b/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h >index ea6935bd06822f113dbbb06141e30df8a2254ee5..3d9f71b3659cc6a38296a732ac65c1d62d6492ce 100644 >--- a/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h >+++ b/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h >@@ -55,7 +55,7 @@ class DrawGlyphsRecorder { > public: > enum class DeconstructDrawGlyphs : bool { No, Yes }; > enum class DeriveFontFromContext : bool { No, Yes }; >- explicit DrawGlyphsRecorder(GraphicsContext&, DeconstructDrawGlyphs = DeconstructDrawGlyphs::No, DeriveFontFromContext = DeriveFontFromContext::No); >+ explicit DrawGlyphsRecorder(GraphicsContext&, float scaleFactor = 1, DeconstructDrawGlyphs = DeconstructDrawGlyphs::No, DeriveFontFromContext = DeriveFontFromContext::No); > > void drawGlyphs(const Font&, const GlyphBufferGlyph*, const GlyphBufferAdvance*, unsigned numGlyphs, const FloatPoint& anchorPoint, FontSmoothingMode); > >diff --git a/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp b/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp >index 95b081b967f9f36088669699e8f8f0d8018307b5..b9a8b94d2d26c0a8728c3ddd8ce8bfa1e5c36e7c 100644 >--- a/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp >+++ b/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp >@@ -86,12 +86,13 @@ UniqueRef<GraphicsContext> DrawGlyphsRecorder::createInternalContext() > return makeUniqueRef<GraphicsContextCG>(context.get()); > } > >-DrawGlyphsRecorder::DrawGlyphsRecorder(GraphicsContext& owner, DeconstructDrawGlyphs deconstructDrawGlyphs, DeriveFontFromContext deriveFontFromContext) >+DrawGlyphsRecorder::DrawGlyphsRecorder(GraphicsContext& owner, float scaleFactor, DeconstructDrawGlyphs deconstructDrawGlyphs, DeriveFontFromContext deriveFontFromContext) > : m_owner(owner) > , m_deconstructDrawGlyphs(deconstructDrawGlyphs) > , m_deriveFontFromContext(deriveFontFromContext) > , m_internalContext(createInternalContext()) > { >+ m_internalContext->applyDeviceScaleFactor(scaleFactor); > } > > void DrawGlyphsRecorder::populateInternalState(const GraphicsContextState& contextState) >@@ -99,7 +100,7 @@ void DrawGlyphsRecorder::populateInternalState(const GraphicsContextState& conte > m_originalState.fillBrush = contextState.fillBrush(); > m_originalState.strokeBrush = contextState.strokeBrush(); > >- m_originalState.ctm = m_owner.getCTM(); // FIXME: Deal with base CTM. >+ m_originalState.ctm = m_owner.getCTM(); > > m_originalState.dropShadow = contextState.dropShadow(); > m_originalState.ignoreTransforms = contextState.shadowsIgnoreTransforms(); >diff --git a/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp b/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp >index e2d06801a3378964b78f2a20d6957bd8778c9c7f..54bc82c037dc0b5962ae3eb01fdf30e5b21208f8 100644 >--- a/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp >+++ b/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp >@@ -48,7 +48,7 @@ namespace DisplayList { > > Recorder::Recorder(const GraphicsContextState& state, const FloatRect& initialClip, const AffineTransform& initialCTM, DrawGlyphsRecorder::DeconstructDrawGlyphs deconstructDrawGlyphs) > : GraphicsContext(state) >- , m_drawGlyphsRecorder(*this, deconstructDrawGlyphs) >+ , m_drawGlyphsRecorder(*this, initialCTM.xScale(), deconstructDrawGlyphs) > { > m_stateStack.append({ state, initialCTM, initialCTM.mapRect(initialClip) }); > } >diff --git a/Source/WebCore/platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp b/Source/WebCore/platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp >index d09c1373ea9aaaf4a185136ee8853d788fc4178d..02c10081a40699fb15a164623b90f5a67a3a37d9 100644 >--- a/Source/WebCore/platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp >+++ b/Source/WebCore/platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp >@@ -32,7 +32,7 @@ > > namespace WebCore { > >-DrawGlyphsRecorder::DrawGlyphsRecorder(GraphicsContext& owner, DeconstructDrawGlyphs, DeriveFontFromContext) >+DrawGlyphsRecorder::DrawGlyphsRecorder(GraphicsContext& owner, float, DeconstructDrawGlyphs, DeriveFontFromContext) > : m_owner(owner) > { > } >diff --git a/Source/WebCore/platform/graphics/win/DrawGlyphsRecorderWin.cpp b/Source/WebCore/platform/graphics/win/DrawGlyphsRecorderWin.cpp >index 5d66eb72ad13c24dac095a945f614a6f55222492..fee43bb90144abb436ece80209f5606ce4ed9106 100644 >--- a/Source/WebCore/platform/graphics/win/DrawGlyphsRecorderWin.cpp >+++ b/Source/WebCore/platform/graphics/win/DrawGlyphsRecorderWin.cpp >@@ -32,7 +32,7 @@ > > namespace WebCore { > >-DrawGlyphsRecorder::DrawGlyphsRecorder(GraphicsContext& owner, DeconstructDrawGlyphs, DeriveFontFromContext) >+DrawGlyphsRecorder::DrawGlyphsRecorder(GraphicsContext& owner, float, DeconstructDrawGlyphs, DeriveFontFromContext) > : m_owner(owner) > { > } >diff --git a/Source/WebCore/rendering/RenderThemeIOS.mm b/Source/WebCore/rendering/RenderThemeIOS.mm >index 7393d708f0414d6d5cf72e252d51aab4a1599886..571834af75c86a81dfcba006815d5b28d567c3ed 100644 >--- a/Source/WebCore/rendering/RenderThemeIOS.mm >+++ b/Source/WebCore/rendering/RenderThemeIOS.mm >@@ -1922,7 +1922,7 @@ static void paintAttachmentIcon(GraphicsContext& context, RenderAttachmentInfo& > > static void paintAttachmentText(GraphicsContext& context, RenderAttachmentInfo& info) > { >- DrawGlyphsRecorder recorder(context, DrawGlyphsRecorder::DeconstructDrawGlyphs::Yes, DrawGlyphsRecorder::DeriveFontFromContext::Yes); >+ DrawGlyphsRecorder recorder(context, 1, DrawGlyphsRecorder::DeconstructDrawGlyphs::Yes, DrawGlyphsRecorder::DeriveFontFromContext::Yes); > > for (const auto& line : info.lines) > recorder.drawNativeText(line.font.get(), CTFontGetSize(line.font.get()), line.line.get(), line.rect); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 1969a76f4177fab46971a14168a6e80e824e033e..24e27bf4e37c63bf5bddd18a4aa46e9e99469b9c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2022-04-03 Said Abou-Hallawa <said@apple.com> >+ >+ [GPU Process] [iOS] Sometimes the text drop shadow is not drawn >+ https://bugs.webkit.org/show_bug.cgi?id=236923 >+ rdar://89196794 >+ >+ Reviewed by Simon Fraser. >+ >+ Unskip failed the text drop shadow layout test. >+ >+ * platform/ios-wk2/TestExpectations: >+ > 2022-04-02 Myles C. Maxfield <mmaxfield@apple.com> > > [Cocoa] Automatically relayout the page when new fonts are installed >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index 30ecb511a618e97b8e83def947b742e2c8906f40..79717de9690e47134e0cd4161c92bdc7bc4e784f 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -2210,12 +2210,9 @@ webkit.org/b/234536 webxr/high-performance.html [ Failure ] > # Wrong text color > webkit.org/b/236913 imported/blink/fast/multicol/vertical-lr/float-content-break.html [ ImageOnlyFailure ] > >-# No/bad colored boxes >-webkit.org/b/236923 fast/css/paint-order-shadow.html [ ImageOnlyFailure ] >-webkit.org/b/236923 imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ] >- > # No/bad gradient/pattern > webkit.org/b/236924 svg/transforms/transformed-text-fill-pattern.html [ ImageOnlyFailure ] >+webkit.org/b/236924 imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ] > > # Media failures > webkit.org/b/237295 fast/mediastream/video-rotation-gpu-process-crash.html [ Timeout Crash Pass ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 236923
:
456432
| 456531