<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>297706</bug_id>
          
          <creation_ts>2025-08-20 18:45:12 -0700</creation_ts>
          <short_desc>[TextureMapper] wrong drop-shadow position in high DPI</short_desc>
          <delta_ts>2025-08-23 06:53:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=218734</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>DoNotImportToRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2137898</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-20 18:45:12 -0700</bug_when>
    <thetext>[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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2137945</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-21 02:47:47 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2137956</commentid>
    <comment_count>2</comment_count>
      <attachid>476470</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-21 04:32:52 -0700</bug_when>
    <thetext>Created attachment 476470
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2137962</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-21 05:08:00 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138225</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-22 05:26:24 -0700</bug_when>
    <thetext>I was wrong. GraphicsLayerCoordinated is using DIP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138456</commentid>
    <comment_count>5</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-23 06:03:50 -0700</bug_when>
    <thetext>I confirmed Windows port has the same issue. This is a bug of TextureMapper.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138462</commentid>
    <comment_count>6</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2025-08-23 06:53:50 -0700</bug_when>
    <thetext>I think this is a the same problem with bug#218734.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>476470</attachid>
            <date>2025-08-21 04:32:52 -0700</date>
            <delta_ts>2025-08-21 04:32:52 -0700</delta_ts>
            <desc>test case</desc>
            <filename>drop-shadow.html</filename>
            <type>text/html</type>
            <size>347</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZT4KICBkaXYgewogICAgICBwb3NpdGlvbjogcmVsYXRpdmU7
CiAgICAgIG1hcmdpbjogMTBweDsKICAgICAgaGVpZ2h0OiAxMDBweDsKICAgICAgd2lkdGg6IDEw
MHB4OwogIH0KICAuYiB7CiAgICAgIGJhY2tncm91bmQ6IGJsYWNrOwogICAgICBmaWx0ZXI6IGRy
b3Atc2hhZG93KDExMHB4IDUwcHggMCBibGFjayk7CiAgfQogIC50IHsKICAgICAgd2lsbC1jaGFu
Z2U6IHRyYW5zZm9ybTsKICB9Cjwvc3R5bGU+CllvdSBzaG91bGQgc2VlIDIgc3F1aXJlIGJveGVz
IHdpdGhvdXQgYW4gaW50ZXJzZWN0aW9uIGluIGhpZ2ggRFBJLgo8ZGl2IGNsYXNzPSJiIHQiPjwv
ZGl2Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>