Changeset 65813 in webkit


Ignore:
Timestamp:
Aug 23, 2010 9:18:44 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-08-23 Ryuan Choi <ryuan.choi@samsung.com>

Reviewed by Antonio Gomes.

[EFL] rendering was broken when missing plugin.
https://bugs.webkit.org/show_bug.cgi?id=43395

Implement RenderThemeEfl::systemFont to render "Missing plugin" when we
don't have proper plugin.
In this case, RenderEmbeddedObject::paintReplaced call systemFont and
pass returned font to GraphicsContext.

  • platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::setDefaultFontSize): (WebCore::RenderThemeEfl::systemFont):
  • platform/efl/RenderThemeEfl.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r65810 r65813  
     12010-08-23  Ryuan Choi  <ryuan.choi@samsung.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [EFL] rendering was broken when missing plugin.
     6        https://bugs.webkit.org/show_bug.cgi?id=43395
     7
     8        Implement RenderThemeEfl::systemFont to render "Missing plugin" when we
     9        don't have proper plugin.
     10        In this case, RenderEmbeddedObject::paintReplaced call systemFont and
     11        pass returned font to GraphicsContext.
     12
     13        * platform/efl/RenderThemeEfl.cpp:
     14        (WebCore::RenderThemeEfl::setDefaultFontSize):
     15        (WebCore::RenderThemeEfl::systemFont):
     16        * platform/efl/RenderThemeEfl.h:
     17
    1182010-08-23  Pavel Podivilov  <podivilov@chromium.org>
    219
  • trunk/WebCore/platform/efl/RenderThemeEfl.cpp

    r64570 r65813  
    2727#include "RenderThemeEfl.h"
    2828
     29#include "CSSValueKeywords.h"
    2930#include "FileSystem.h"
    3031#include "Frame.h"
     
    632633}
    633634
     635float RenderThemeEfl::defaultFontSize = 16.0f;
     636
    634637RenderThemeEfl::RenderThemeEfl(Page* page)
    635638    : RenderTheme()
     
    986989}
    987990
    988 void RenderThemeEfl::systemFont(int, FontDescription&) const
    989 {
    990     // If you remove this notImplemented(), replace it with an comment that explains why.
    991     notImplemented();
    992 }
    993 
    994 }
     991void RenderThemeEfl::setDefaultFontSize(int size)
     992{
     993    defaultFontSize = size;
     994}
     995
     996void RenderThemeEfl::systemFont(int propId, FontDescription& fontDescription) const
     997{
     998    // It was called by RenderEmbeddedObject::paintReplaced to render alternative string.
     999    // To avoid cairo_error while rendering, fontDescription should be passed.
     1000    DEFINE_STATIC_LOCAL(String, fontFace, ("Sans"));
     1001    float fontSize = defaultFontSize;
     1002
     1003    fontDescription.firstFamily().setFamily(fontFace);
     1004    fontDescription.setSpecifiedSize(fontSize);
     1005    fontDescription.setIsAbsoluteSize(true);
     1006    fontDescription.setGenericFamily(FontDescription::NoFamily);
     1007    fontDescription.setWeight(FontWeightNormal);
     1008    fontDescription.setItalic(false);
     1009}
     1010
     1011}
  • trunk/WebCore/platform/efl/RenderThemeEfl.h

    r64570 r65813  
    143143    virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
    144144    virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
     145
     146    static void setDefaultFontSize(int size);
     147
     148protected:
     149    static float defaultFontSize;
     150
    145151private:
    146152    void createCanvas();
Note: See TracChangeset for help on using the changeset viewer.