瀏覽代碼

LibWeb: Use enclosing (rather than rounded) rect for overflow clipping

If we use a rounded rect we'll clip off subpixels around the edge.
MacDue 2 年之前
父節點
當前提交
5f8b9f7936
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Painting/PaintableBox.cpp

@@ -361,7 +361,7 @@ void PaintableBox::apply_clip_overflow_rect(PaintContext& context, PaintPhase ph
 
     if (!m_clipping_overflow) {
         context.painter().save();
-        context.painter().add_clip_rect(context.rounded_device_rect(*clip_rect).to_type<int>());
+        context.painter().add_clip_rect(context.enclosing_device_rect(*clip_rect).to_type<int>());
         m_clipping_overflow = true;
     }