[Webkit-unassigned] [Bug 43395] [GTK/EFL] rendering was broken in naver.com

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 17 22:21:14 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43395





--- Comment #15 from Ryuan Choi <ryuan.choi at samsung.com>  2010-08-17 22:21:14 PST ---
(In reply to comment #14)
> (From update of attachment 64495 [details])
> > Index: WebCore/ChangeLog
> > ===================================================================
> > --- WebCore/ChangeLog	(revision 65425)
> > +++ WebCore/ChangeLog	(working copy)
> > @@ -1,3 +1,19 @@
> > +2010-08-16  Ryuan Choi  <ryuan.choi at gmail.com>
> > +
> > +        Reviewed by NOBODY (OOPS!).
> > +
> > +        [GTK/EFL] rendering was broken in naver.com
> > +        https://bugs.webkit.org/show_bug.cgi?id=43395
> > +
> > +        Implement RenderThemeEfl::systemFont to render "Missing plugin" when we
> > +        don't have proper plugin.
> > +
> > +        * platform/efl/RenderThemeEfl.cpp:
> > +        (WebCore::RenderThemeEfl::setDefaultFontSize):
> > +        (WebCore::RenderThemeEfl::defaultGUIFont):
> > +        (WebCore::RenderThemeEfl::systemFont):
> > +        * platform/efl/RenderThemeEfl.h:
> 
> Could you please explain why RenderThemeEfl::systemFont fixes it? Maybe mentioning the code path.

At first, Thank you for reviewing.

I thought that this is cairo error so I add some segmemtation fault in _cairo_set_error.

below is stack trace
#0  _cairo_set_error (cr=0x81af208, status=CAIRO_STATUS_INVALID_MATRIX) at cairo.c:115
#1  0x00b8f4c6 in WebCore::Font::drawGlyphs (this=0xbfffdb90, context=0xbfffe988, font=0x84f1278, glyphBuffer=..., from=0, numGlyphs=15, point=...) at WebCore/platform/graphics/cairo/FontCairo.cpp:51
#2  0x00803eda in WebCore::Font::drawGlyphBuffer (this=0xbfffdb90, context=0xbfffe988, glyphBuffer=..., point=...) at WebCore/platform/graphics/FontFastPath.cpp:241
#3  0x00803d11 in WebCore::Font::drawSimpleText (this=0xbfffdb90, context=0xbfffe988, run=..., point=..., from=0, to=15) at WebCore/platform/graphics/FontFastPath.cpp:214
#4  0x007f5d59 in WebCore::Font::drawText (this=0xbfffdb90, context=0xbfffe988, run=..., point=..., from=0, to=15) at WebCore/platform/graphics/Font.cpp:154
#5  0x0080f564 in WebCore::GraphicsContext::drawBidiText (this=0xbfffe988, font=..., run=..., point=...) at WebCore/platform/graphics/GraphicsContext.cpp:366
#6  0x008e039b in WebCore::RenderEmbeddedObject::paintReplaced (this=0x84ba63c, paintInfo=..., tx=8, ty=27) at WebCore/rendering/RenderEmbeddedObject.cpp:420
#7  0x0092b0fe in WebCore::RenderReplaced::paint (this=0x84ba63c, paintInfo=..., tx=8, ty=27) at WebCore/rendering/RenderReplaced.cpp:145
#8  0x008dff87 in WebCore::RenderEmbeddedObject::paint (this=0x84ba63c, paintInfo=..., tx=8, ty=8) at WebCore/rendering/RenderEmbeddedObject.cpp:380

especially in frame 6,
webkit pass font infomation to drawBidiText after getting it in getReplacementTextGeometry.
but EFL doesn't implement systemFont() called by getReplacementTextGeometry.
so when webkit called cairo_set_scaled_font in Font::drawGlyphs, cairo was failed.


> 
> Also you are not fixing the Gtk bug, but only EFL. Please make it explicit in the patch/ChangeLog.
> 
Ok, I'll remove GTK letter in ChangeLog.

> > --- WebCore/platform/efl/RenderThemeEfl.cpp	(revision 65424)
> > +++ WebCore/platform/efl/RenderThemeEfl.cpp	(working copy)
> > @@ -26,6 +26,7 @@
> >  #include "config.h"
> >  #include "RenderThemeEfl.h"
> >  
> > +#include "CSSValueKeywords.h"
> >  #include "FileSystem.h"
> >  #include "Frame.h"
> >  #include "FrameView.h"
> > @@ -631,6 +632,8 @@ void RenderThemeEfl::themeChanged()
> >      applyPartDescriptions();
> >  }
> >  
> > +float RenderThemeEfl::defaultFontSize = 16.0f;
> > +
> >  RenderThemeEfl::RenderThemeEfl(Page* page)
> >      : RenderTheme()
> >      , m_page(page)
> > @@ -985,10 +988,28 @@ bool RenderThemeEfl::paintSearchField(Re
> >      return paintThemePart(o, SearchField, i, rect);
> >  }
> >  
> > -void RenderThemeEfl::systemFont(int, FontDescription&) const
> > +void RenderThemeEfl::setDefaultFontSize(int size)
> > +{
> > +    defaultFontSize = size;
> > +}
> > +
> > +const String& RenderThemeEfl::defaultGUIFont()
> 
> I personally do not like defaultGUIFont() naming much.
I just copied from chromium.
I think that I can remove this function into systemFont()

> 
> >  {
> > -    // If you remove this notImplemented(), replace it with an comment that explains why.
> 
> Please respect the request above :-)
> 
Ok I'll add some comment in systemFont()

> > -    notImplemented();
> > +    DEFINE_STATIC_LOCAL(String, fontFace, ("Sans"));
> > +    return fontFace;
> > +}
> > +
> > +void RenderThemeEfl::systemFont(int propId, FontDescription& fontDescription) const
> > +{
> > +    // copied from RenderThemeChromiumSkia
> > +    float fontSize = defaultFontSize;
> > +
> > +    fontDescription.firstFamily().setFamily(defaultGUIFont());
> > +    fontDescription.setSpecifiedSize(fontSize);
> > +    fontDescription.setIsAbsoluteSize(true);
> > +    fontDescription.setGenericFamily(FontDescription::NoFamily);
> > +    fontDescription.setWeight(FontWeightNormal);
> > +    fontDescription.setItalic(false);
> >  }
> >  
> >  }
> > Index: WebCore/platform/efl/RenderThemeEfl.h
> > ===================================================================
> > --- WebCore/platform/efl/RenderThemeEfl.h	(revision 65424)
> > +++ WebCore/platform/efl/RenderThemeEfl.h	(working copy)
> > @@ -142,6 +142,14 @@ public:
> >  
> >      virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
> >      virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
> > +
> > +    static void setDefaultFontSize(int size);
> > +
> > +protected:
> > +    static const String& defaultGUIFont();
> > +
> > +    static float defaultFontSize;
> > +
> >  private:
> >      void createCanvas();
> >      void createEdje();
> > Index: WebKit/efl/ChangeLog
> > ===================================================================
> > --- WebKit/efl/ChangeLog	(revision 65425)
> > +++ WebKit/efl/ChangeLog	(working copy)
> > @@ -1,3 +1,17 @@
> > +2010-08-16  Ryuan Choi  <ryuan.choi at gmail.com>
> > +
> > +        Reviewed by NOBODY (OOPS!).
> > +
> > +        [GTK/EFL] rendering was broken in naver.com
> > +        https://bugs.webkit.org/show_bug.cgi?id=43395
> > +
> > +        call RenderThemeEfl::setDefaultFontSize when initialzed and user want to
> > +        change.
> 
> Start the phrase with capital, and correct the spelling of "initialzed".
> 
I'm sorry. I'll do that.

> >  #include <Ecore.h>
> > @@ -552,6 +553,7 @@ static Ewk_View_Private_Data* _ewk_view_
> >      priv->page_settings->setLoadsImagesAutomatically(true);
> >      priv->page_settings->setDefaultFixedFontSize(12);
> >      priv->page_settings->setDefaultFontSize(16);
> > +    WebCore::RenderThemeEfl::setDefaultFontSize(16);
> 
> I wonder the difference between page_settings->setDefaultFontSize(16) and RenderThemeEfl::setDefaultFontSize(16);

hmm. I'll check how defaultFont of settings can use.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list