WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
297706
[TextureMapper] wrong drop-shadow position in high DPI
https://bugs.webkit.org/show_bug.cgi?id=297706
Summary
[TextureMapper] wrong drop-shadow position in high DPI
Fujii Hironori
Reported
2025-08-20 18:45:12 PDT
[GTK] wrong drop-shadow position in high DPI ./Tools/Scripts/run-minibrowser --gtk --release LayoutTests/css3/filters/drop-shadow-current-color.html EXPECTED: you should see 8 square boxes ACTUAL: you see 4 rectangles GTK WebKitTestRunner works as expected.
Attachments
test case
(347 bytes, text/html)
2025-08-21 04:32 PDT
,
Fujii Hironori
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2025-08-21 02:47:47 PDT
Disabling the AC mode work around the problem. I can see 8 boxes. But, worng color, this is another bug. WEBKIT_DISABLE_COMPOSITING_MODE=1 ./Tools/Scripts/run-minibrowser --gtk --release LayoutTests/css3/filters/drop-shadow-current-color.html
Fujii Hironori
Comment 2
2025-08-21 04:32:52 PDT
Created
attachment 476470
[details]
test case
Fujii Hironori
Comment 3
2025-08-21 05:08:00 PDT
TextureMapper expects DIP (device independent pixel). But, GraphicsLayerCoordinated uses DP (device pixel). For example, there is 100px x 100px element in x2 device scale factor. GraphicsLayerTextureMapper and GraphicsLayerWC creates a 100x100 TextureMapperLayer. And, apply x2 scale transform to the root layer. OTOH, GraphicsLayerCoordinated creates a 200x200 TextureMapperLayer. TextureMapper::applyDropShadowFilter apply the drop-shadow filter.
https://github.com/WebKit/WebKit/blob/5701312dba4c15a1c46bf57662d1638eda398100/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp#L1064
LayerTreeHost::applyDeviceScaleFactor and DrawingAreaWC::updateRootLayerDeviceScaleFactor apply a transform to the root layer.
https://github.com/WebKit/WebKit/blob/5701312dba4c15a1c46bf57662d1638eda398100/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp#L295
https://github.com/WebKit/WebKit/blob/5701312dba4c15a1c46bf57662d1638eda398100/Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp#L309
Fujii Hironori
Comment 4
2025-08-22 05:26:24 PDT
I was wrong. GraphicsLayerCoordinated is using DIP.
Fujii Hironori
Comment 5
2025-08-23 06:03:50 PDT
I confirmed Windows port has the same issue. This is a bug of TextureMapper.
Fujii Hironori
Comment 6
2025-08-23 06:53:50 PDT
I think this is a the same problem with
bug#218734
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug