[haiku-webkit-commits] r365 - webkit/trunk/WebCore/platform/haiku

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2010 16:25:51 +0000

Author: stippi
Date: Fri Apr  2 16:25:51 2010
New Revision: 365
URL: http://mmlr.dyndns.org/changeset/365

Log:
Override the background color of text fields and areas with transparent color,
and paint the background ourself. Otherwise the field background draws over
the border region which makes it impossible to have the frame blend with what's
behind the field on the page.

Modified:
   webkit/trunk/WebCore/platform/haiku/RenderThemeHaiku.cpp

Modified: webkit/trunk/WebCore/platform/haiku/RenderThemeHaiku.cpp
==============================================================================
--- webkit/trunk/WebCore/platform/haiku/RenderThemeHaiku.cpp    Fri Apr  2 
15:05:45 2010        (r364)
+++ webkit/trunk/WebCore/platform/haiku/RenderThemeHaiku.cpp    Fri Apr  2 
16:25:51 2010        (r365)
@@ -208,7 +208,11 @@
 
 void RenderThemeHaiku::adjustTextFieldStyle(CSSStyleSelector* selector, 
RenderStyle* style, Element* element) const
 {
+#if 0
        RenderTheme::adjustTextFieldStyle(selector, style, element);
+#else
+    style->setBackgroundColor(Color::transparent);
+#endif
 }
 
 bool RenderThemeHaiku::paintTextField(RenderObject* object, const 
RenderObject::PaintInfo& info, const IntRect& intRect)
@@ -228,13 +232,21 @@
 
        view->PushState();
     be_control_look->DrawTextControlBorder(view, rect, rect, base, flags);
+    // Fill the background as well (we set it to transparent in
+    // adjustTextFieldStyle), otherwise it would draw over the border.
+    view->SetHighColor(255, 255, 255);
+    view->FillRect(rect);
     view->PopState();
     return false;
 }
 
 void RenderThemeHaiku::adjustTextAreaStyle(CSSStyleSelector* selector, 
RenderStyle* style, Element* element) const
 {
+#if 0
        RenderTheme::adjustTextAreaStyle(selector, style, element);
+#else
+       adjustTextFieldStyle(selector, style, element);
+#endif
 }
 
 bool RenderThemeHaiku::paintTextArea(RenderObject* object, const 
RenderObject::PaintInfo& info, const IntRect& intRect)

Other related posts:

  • » [haiku-webkit-commits] r365 - webkit/trunk/WebCore/platform/haiku - webkit