summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/efl
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-27 11:02:25 +0100
committerSteve Block <steveblock@google.com>2010-09-02 17:17:20 +0100
commite8b154fd68f9b33be40a3590e58347f353835f5c (patch)
tree0733ce26384183245aaa5656af26c653636fe6c1 /WebCore/platform/efl
parentda56157816334089526a7a115a85fd85a6e9a1dc (diff)
downloadexternal_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebCore/platform/efl')
-rw-r--r--WebCore/platform/efl/PopupMenuEfl.cpp3
-rw-r--r--WebCore/platform/efl/RenderThemeEfl.cpp23
-rw-r--r--WebCore/platform/efl/RenderThemeEfl.h6
3 files changed, 28 insertions, 4 deletions
diff --git a/WebCore/platform/efl/PopupMenuEfl.cpp b/WebCore/platform/efl/PopupMenuEfl.cpp
index 401f24f..a6f7a53 100644
--- a/WebCore/platform/efl/PopupMenuEfl.cpp
+++ b/WebCore/platform/efl/PopupMenuEfl.cpp
@@ -43,7 +43,8 @@ PopupMenuEfl::~PopupMenuEfl()
{
// Tell client to destroy data related to this popup since this object is
// going away.
- hide();
+ if (m_view)
+ hide();
}
void PopupMenuEfl::show(const IntRect& rect, FrameView* view, int index)
diff --git a/WebCore/platform/efl/RenderThemeEfl.cpp b/WebCore/platform/efl/RenderThemeEfl.cpp
index 36600a9..102f754 100644
--- a/WebCore/platform/efl/RenderThemeEfl.cpp
+++ b/WebCore/platform/efl/RenderThemeEfl.cpp
@@ -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,24 @@ bool RenderThemeEfl::paintSearchField(RenderObject* o, const PaintInfo& i, const
return paintThemePart(o, SearchField, i, rect);
}
-void RenderThemeEfl::systemFont(int, FontDescription&) const
+void RenderThemeEfl::setDefaultFontSize(int size)
{
- // If you remove this notImplemented(), replace it with an comment that explains why.
- notImplemented();
+ defaultFontSize = size;
+}
+
+void RenderThemeEfl::systemFont(int propId, FontDescription& fontDescription) const
+{
+ // It was called by RenderEmbeddedObject::paintReplaced to render alternative string.
+ // To avoid cairo_error while rendering, fontDescription should be passed.
+ DEFINE_STATIC_LOCAL(String, fontFace, ("Sans"));
+ float fontSize = defaultFontSize;
+
+ fontDescription.firstFamily().setFamily(fontFace);
+ fontDescription.setSpecifiedSize(fontSize);
+ fontDescription.setIsAbsoluteSize(true);
+ fontDescription.setGenericFamily(FontDescription::NoFamily);
+ fontDescription.setWeight(FontWeightNormal);
+ fontDescription.setItalic(false);
}
}
diff --git a/WebCore/platform/efl/RenderThemeEfl.h b/WebCore/platform/efl/RenderThemeEfl.h
index 8e5650d..478dfc5 100644
--- a/WebCore/platform/efl/RenderThemeEfl.h
+++ b/WebCore/platform/efl/RenderThemeEfl.h
@@ -142,6 +142,12 @@ public:
virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
+
+ static void setDefaultFontSize(int size);
+
+protected:
+ static float defaultFontSize;
+
private:
void createCanvas();
void createEdje();