소스 검색

LibWeb: Stop painting backgrounds for TextNodes

Doing so was causing the background to be painted twice, which looks
ugly if the background is semi-transparent. The painting is a bit of a
hack, as some situations apparently relied on it. This commit is ripping
the band-aid off to find where those are and fix them. :^)
Sam Atkins 3 년 전
부모
커밋
b88641e44b
1개의 변경된 파일0개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 4
      Userland/Libraries/LibWeb/Layout/TextNode.cpp

+ 0 - 4
Userland/Libraries/LibWeb/Layout/TextNode.cpp

@@ -74,10 +74,6 @@ void TextNode::paint_fragment(PaintContext& context, const LineBoxFragment& frag
 {
     auto& painter = context.painter();
 
-    if (phase == PaintPhase::Background) {
-        painter.fill_rect(enclosing_int_rect(fragment.absolute_rect()), computed_values().background_color());
-    }
-
     if (phase == PaintPhase::Foreground) {
         painter.set_font(font());