<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[189020] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/189020">189020</a></dd>
<dt>Author</dt> <dd>gyuyoung.kim@webkit.org</dd>
<dt>Date</dt> <dd>2015-08-27 02:59:37 -0700 (Thu, 27 Aug 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
https://bugs.webkit.org/show_bug.cgi?id=148511

Reviewed by Csaba Osztrogonác.

To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.

Additionally this patch fixes style errors in RenderThemeEfl.cpp

* PlatformEfl.cmake:
* rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
(WebCore::toEdjeGroup):
(WebCore::setSourceGroupForEdjeObject):
(WebCore::RenderThemeEfl::adjustSizeConstraints):
(WebCore::isFormElementTooLargeToDisplay):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
(WebCore::RenderThemeEfl::getThemePartFromCache):
(WebCore::RenderThemeEfl::clearThemePartCache):
(WebCore::RenderThemeEfl::applyEdjeStateFromForm):
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore::RenderThemeEfl::isControlStyled):
(WebCore::RenderThemeEfl::paintThemePart):
(WebCore::RenderThemeEfl::create):
(WebCore::RenderTheme::themeForPage):
(WebCore::applyColorCallback):
(WebCore::fillColorsFromEdjeClass):
(WebCore::RenderThemeEfl::setColorFromThemeClass):
(WebCore::RenderThemeEfl::setThemePath):
(WebCore::RenderThemeEfl::themePath):
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::applyPartDescriptionFallback):
(WebCore::RenderThemeEfl::applyPartDescription):
(WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::~RenderThemeEfl):
(WebCore::supportsFocus):
(WebCore::RenderThemeEfl::supportsFocusRing):
(WebCore::RenderThemeEfl::controlSupportsTints):
(WebCore::RenderThemeEfl::baselinePosition):
(WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeEfl::platformFocusRingColor):
(WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
(WebCore::RenderThemeEfl::paintSliderTrack):
(WebCore::RenderThemeEfl::adjustSliderTrackStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbStyle):
(WebCore::RenderThemeEfl::adjustSliderThumbSize):
(WebCore::RenderThemeEfl::sliderTickSize):
(WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore::RenderThemeEfl::paintSliderThumb):
(WebCore::RenderThemeEfl::adjustCheckboxStyle):
(WebCore::RenderThemeEfl::paintCheckbox):
(WebCore::RenderThemeEfl::adjustRadioStyle):
(WebCore::RenderThemeEfl::paintRadio):
(WebCore::RenderThemeEfl::adjustButtonStyle):
(WebCore::RenderThemeEfl::paintButton):
(WebCore::RenderThemeEfl::adjustMenuListStyle):
(WebCore::RenderThemeEfl::paintMenuList):
(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
(WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
(WebCore::RenderThemeEfl::adjustTextFieldStyle):
(WebCore::RenderThemeEfl::paintTextField):
(WebCore::RenderThemeEfl::adjustTextAreaStyle):
(WebCore::RenderThemeEfl::paintTextArea):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
(WebCore::RenderThemeEfl::adjustSearchFieldStyle):
(WebCore::RenderThemeEfl::paintSearchField):
(WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeEfl::paintInnerSpinButton):
(WebCore::RenderThemeEfl::setDefaultFontSize):
(WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
(WebCore::RenderThemeEfl::adjustProgressBarStyle):
(WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeEfl::animationDurationForProgressBar):
(WebCore::RenderThemeEfl::paintProgressBar):
(WebCore::RenderThemeEfl::mediaControlsStyleSheet):
(WebCore::RenderThemeEfl::mediaControlsScript):
* rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformEflcmake">trunk/Source/WebCore/PlatformEfl.cmake</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorerenderingRenderThemeEflcpp">trunk/Source/WebCore/rendering/RenderThemeEfl.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeEflh">trunk/Source/WebCore/rendering/RenderThemeEfl.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformeflRenderThemeEflcpp">trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflRenderThemeEflh">trunk/Source/WebCore/platform/efl/RenderThemeEfl.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189019 => 189020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-27 09:46:26 UTC (rev 189019)
+++ trunk/Source/WebCore/ChangeLog        2015-08-27 09:59:37 UTC (rev 189020)
</span><span class="lines">@@ -1,3 +1,94 @@
</span><ins>+2015-08-27  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
+
+        [EFL] Move RenderThemeEfl.cpp|h from WebCore/platform/efl to WebCore/rendering
+        https://bugs.webkit.org/show_bug.cgi?id=148511
+
+        Reviewed by Csaba Osztrogonác.
+
+        To be aligned with other ports, move RenderThemeEfl.cpp|h to WebCore/rendering.
+
+        Additionally this patch fixes style errors in RenderThemeEfl.cpp
+
+        * PlatformEfl.cmake:
+        * rendering/RenderThemeEfl.cpp: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.cpp.
+        (WebCore::toEdjeGroup):
+        (WebCore::setSourceGroupForEdjeObject):
+        (WebCore::RenderThemeEfl::adjustSizeConstraints):
+        (WebCore::isFormElementTooLargeToDisplay):
+        (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
+        (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
+        (WebCore::RenderThemeEfl::getThemePartFromCache):
+        (WebCore::RenderThemeEfl::clearThemePartCache):
+        (WebCore::RenderThemeEfl::applyEdjeStateFromForm):
+        (WebCore::RenderThemeEfl::applyEdjeRTLState):
+        (WebCore::RenderThemeEfl::isControlStyled):
+        (WebCore::RenderThemeEfl::paintThemePart):
+        (WebCore::RenderThemeEfl::create):
+        (WebCore::RenderTheme::themeForPage):
+        (WebCore::applyColorCallback):
+        (WebCore::fillColorsFromEdjeClass):
+        (WebCore::RenderThemeEfl::setColorFromThemeClass):
+        (WebCore::RenderThemeEfl::setThemePath):
+        (WebCore::RenderThemeEfl::themePath):
+        (WebCore::RenderThemeEfl::loadTheme):
+        (WebCore::RenderThemeEfl::applyPartDescriptionFallback):
+        (WebCore::RenderThemeEfl::applyPartDescription):
+        (WebCore::RenderThemeEfl::applyPartDescriptionsFrom):
+        (WebCore::RenderThemeEfl::RenderThemeEfl):
+        (WebCore::RenderThemeEfl::~RenderThemeEfl):
+        (WebCore::supportsFocus):
+        (WebCore::RenderThemeEfl::supportsFocusRing):
+        (WebCore::RenderThemeEfl::controlSupportsTints):
+        (WebCore::RenderThemeEfl::baselinePosition):
+        (WebCore::RenderThemeEfl::platformActiveSelectionBackgroundColor):
+        (WebCore::RenderThemeEfl::platformInactiveSelectionBackgroundColor):
+        (WebCore::RenderThemeEfl::platformActiveSelectionForegroundColor):
+        (WebCore::RenderThemeEfl::platformInactiveSelectionForegroundColor):
+        (WebCore::RenderThemeEfl::platformFocusRingColor):
+        (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
+        (WebCore::RenderThemeEfl::paintSliderTrack):
+        (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
+        (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
+        (WebCore::RenderThemeEfl::adjustSliderThumbSize):
+        (WebCore::RenderThemeEfl::sliderTickSize):
+        (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
+        (WebCore::RenderThemeEfl::sliderTickSnappingThreshold):
+        (WebCore::RenderThemeEfl::supportsDataListUI):
+        (WebCore::RenderThemeEfl::paintSliderThumb):
+        (WebCore::RenderThemeEfl::adjustCheckboxStyle):
+        (WebCore::RenderThemeEfl::paintCheckbox):
+        (WebCore::RenderThemeEfl::adjustRadioStyle):
+        (WebCore::RenderThemeEfl::paintRadio):
+        (WebCore::RenderThemeEfl::adjustButtonStyle):
+        (WebCore::RenderThemeEfl::paintButton):
+        (WebCore::RenderThemeEfl::adjustMenuListStyle):
+        (WebCore::RenderThemeEfl::paintMenuList):
+        (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
+        (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
+        (WebCore::RenderThemeEfl::adjustTextFieldStyle):
+        (WebCore::RenderThemeEfl::paintTextField):
+        (WebCore::RenderThemeEfl::adjustTextAreaStyle):
+        (WebCore::RenderThemeEfl::paintTextArea):
+        (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
+        (WebCore::RenderThemeEfl::paintSearchFieldResultsButton):
+        (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle):
+        (WebCore::RenderThemeEfl::paintSearchFieldResultsDecorationPart):
+        (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
+        (WebCore::RenderThemeEfl::paintSearchFieldCancelButton):
+        (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
+        (WebCore::RenderThemeEfl::paintSearchField):
+        (WebCore::RenderThemeEfl::adjustInnerSpinButtonStyle):
+        (WebCore::RenderThemeEfl::paintInnerSpinButton):
+        (WebCore::RenderThemeEfl::setDefaultFontSize):
+        (WebCore::RenderThemeEfl::updateCachedSystemFontDescription):
+        (WebCore::RenderThemeEfl::adjustProgressBarStyle):
+        (WebCore::RenderThemeEfl::animationRepeatIntervalForProgressBar):
+        (WebCore::RenderThemeEfl::animationDurationForProgressBar):
+        (WebCore::RenderThemeEfl::paintProgressBar):
+        (WebCore::RenderThemeEfl::mediaControlsStyleSheet):
+        (WebCore::RenderThemeEfl::mediaControlsScript):
+        * rendering/RenderThemeEfl.h: Renamed from Source/WebCore/platform/efl/RenderThemeEfl.h.
+
</ins><span class="cx"> 2015-08-26  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         watchdog m_didFire state erroneously retained.
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformEfl.cmake (189019 => 189020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformEfl.cmake        2015-08-27 09:46:26 UTC (rev 189019)
+++ trunk/Source/WebCore/PlatformEfl.cmake        2015-08-27 09:59:37 UTC (rev 189020)
</span><span class="lines">@@ -119,7 +119,6 @@
</span><span class="cx">     platform/efl/PlatformMouseEventEfl.cpp
</span><span class="cx">     platform/efl/PlatformScreenEfl.cpp
</span><span class="cx">     platform/efl/PlatformWheelEventEfl.cpp
</span><del>-    platform/efl/RenderThemeEfl.cpp
</del><span class="cx">     platform/efl/ScrollbarThemeEfl.cpp
</span><span class="cx">     platform/efl/SharedTimerEfl.cpp
</span><span class="cx">     platform/efl/SoundEfl.cpp
</span><span class="lines">@@ -284,6 +283,8 @@
</span><span class="cx">     platform/text/enchant/TextCheckerEnchant.cpp
</span><span class="cx"> 
</span><span class="cx">     platform/text/hyphen/HyphenationLibHyphen.cpp
</span><ins>+
+    rendering/RenderThemeEfl.cpp
</ins><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> if (USE_GEOCLUE2)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflRenderThemeEflcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (189019 => 189020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2015-08-27 09:46:26 UTC (rev 189019)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2015-08-27 09:59:37 UTC (rev 189020)
</span><span class="lines">@@ -1,1061 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007 Apple Inc.
- * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
- * Copyright (C) 2008 Collabora Ltd.
- * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
- * Copyright (C) 2009-2010 ProFUSION embedded systems
- * Copyright (C) 2009-2011 Samsung Electronics
- * Copyright (c) 2012 Intel Corporation. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include &quot;config.h&quot;
-#include &quot;RenderThemeEfl.h&quot;
-
-#include &quot;CSSValueKeywords.h&quot;
-#include &quot;CairoUtilitiesEfl.h&quot;
-#include &quot;ExceptionCodePlaceholder.h&quot;
-#include &quot;FloatRoundedRect.h&quot;
-#include &quot;FontDescription.h&quot;
-#include &quot;GraphicsContext.h&quot;
-#include &quot;HTMLInputElement.h&quot;
-#include &quot;InputTypeNames.h&quot;
-#include &quot;NotImplemented.h&quot;
-#include &quot;Page.h&quot;
-#include &quot;PaintInfo.h&quot;
-#include &quot;PlatformContextCairo.h&quot;
-#include &quot;RenderBox.h&quot;
-#include &quot;RenderObject.h&quot;
-#include &quot;RenderProgress.h&quot;
-#include &quot;RenderSlider.h&quot;
-#include &quot;ScrollbarThemeEfl.h&quot;
-#include &quot;Settings.h&quot;
-#include &quot;UserAgentScripts.h&quot;
-#include &quot;UserAgentStyleSheets.h&quot;
-#include &lt;Ecore_Evas.h&gt;
-#include &lt;Edje.h&gt;
-#include &lt;new&gt;
-#include &lt;wtf/text/CString.h&gt;
-#include &lt;wtf/text/StringBuilder.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-// TODO: change from object count to ecore_evas size (bytes)
-// TODO: as objects are webpage/user defined and they can be very large.
-#define RENDER_THEME_EFL_PART_CACHE_MAX 32
-
-// Initialize default font size.
-float RenderThemeEfl::defaultFontSize = 16.0f;
-
-static const float minCancelButtonSize = 5;
-static const float maxCancelButtonSize = 21;
-
-static const float minSearchDecorationButtonSize = 1;
-static const float maxSearchDecorationButtonSize = 15;
-static const float searchFieldDecorationButtonOffset = 3;
-
-// Constants for progress tag animation.
-// These values have been copied from RenderThemeGtk.cpp
-static const int progressAnimationFrames = 10;
-static const double progressAnimationInterval = 0.125;
-
-static const int sliderThumbWidth = 29;
-static const int sliderThumbHeight = 11;
-
-#define _ASSERT_ON_RELEASE_RETURN(o, fmt, ...) \
-    do { if (!o) { EINA_LOG_CRIT(fmt, ## __VA_ARGS__); ASSERT(o); return; } } while (0)
-#define _ASSERT_ON_RELEASE_RETURN_VAL(o, val, fmt, ...) \
-    do { if (!o) { EINA_LOG_CRIT(fmt, ## __VA_ARGS__); ASSERT(o); return val; } } while (0)
-
-
-static const char* toEdjeGroup(FormType type)
-{
-    static const char* groups[] = {
-        &quot;webkit/widget/button&quot;,
-        &quot;webkit/widget/radio&quot;,
-        &quot;webkit/widget/entry&quot;,
-        &quot;webkit/widget/checkbox&quot;,
-        &quot;webkit/widget/combo&quot;,
-        &quot;webkit/widget/progressbar&quot;,
-        &quot;webkit/widget/scrollbar/horizontal_thumb&quot;,
-        &quot;webkit/widget/scrollbar/horizontal_background&quot;,
-        &quot;webkit/widget/scrollbar/vertical_thumb&quot;,
-        &quot;webkit/widget/scrollbar/vertical_background&quot;,
-        &quot;webkit/widget/search/field&quot;,
-        &quot;webkit/widget/search/results_button&quot;,
-        &quot;webkit/widget/search/results_decoration&quot;,
-        &quot;webkit/widget/search/cancel_button&quot;,
-        &quot;webkit/widget/slider/vertical&quot;,
-        &quot;webkit/widget/slider/horizontal&quot;,
-        &quot;webkit/widget/slider/thumb_vertical&quot;,
-        &quot;webkit/widget/slider/thumb_horizontal&quot;,
-        &quot;webkit/widget/spinner&quot;,
-        0
-    };
-    ASSERT(type &gt;= 0);
-    ASSERT((size_t)type &lt; sizeof(groups) / sizeof(groups[0])); // Out of sync?
-    return groups[type];
-}
-
-static bool setSourceGroupForEdjeObject(Evas_Object* o, const String&amp; themePath, const char* group)
-{
-    ASSERT(o);
-    ASSERT(!themePath.isEmpty());
-
-    if (!edje_object_file_set(o, themePath.utf8().data(), group)) {
-        const char* message = edje_load_error_str(edje_object_load_error_get(o));
-        EINA_LOG_ERR(&quot;Could not set theme group '%s' of file '%s': %s&quot;, group, themePath.utf8().data(), message);
-        return false;
-    }
-
-    return true;
-}
-
-void RenderThemeEfl::adjustSizeConstraints(RenderStyle&amp; style, FormType type) const
-{
-    loadThemeIfNeeded();
-
-    // These are always valid, even if no theme could be loaded.
-    const ThemePartDesc* desc = m_partDescs + (size_t)type;
-
-    if (style.minWidth().isIntrinsic())
-        style.setMinWidth(desc-&gt;min.width());
-    if (style.minHeight().isIntrinsic())
-        style.setMinHeight(desc-&gt;min.height());
-
-    if (desc-&gt;max.width().value() &gt; 0 &amp;&amp; style.maxWidth().isIntrinsicOrAuto())
-        style.setMaxWidth(desc-&gt;max.width());
-    if (desc-&gt;max.height().value() &gt; 0 &amp;&amp; style.maxHeight().isIntrinsicOrAuto())
-        style.setMaxHeight(desc-&gt;max.height());
-
-    style.setPaddingTop(desc-&gt;padding.top());
-    style.setPaddingBottom(desc-&gt;padding.bottom());
-    style.setPaddingLeft(desc-&gt;padding.left());
-    style.setPaddingRight(desc-&gt;padding.right());
-}
-
-static bool isFormElementTooLargeToDisplay(const IntSize&amp; elementSize)
-{
-    // This limit of 20000 pixels is hardcoded inside edje -- anything above this size
-    // will be clipped. This value seems to be reasonable enough so that hardcoding it
-    // here won't be a problem.
-    static const int maxEdjeDimension = 20000;
-
-    return elementSize.width() &gt; maxEdjeDimension || elementSize.height() &gt; maxEdjeDimension;
-}
-
-std::unique_ptr&lt;RenderThemeEfl::ThemePartCacheEntry&gt; RenderThemeEfl::ThemePartCacheEntry::create(const String&amp; themePath, FormType type, const IntSize&amp; size)
-{
-    ASSERT(!themePath.isEmpty());
-
-    if (isFormElementTooLargeToDisplay(size) || size.isEmpty()) {
-        EINA_LOG_ERR(&quot;Cannot render an element of size %dx%d.&quot;, size.width(), size.height());
-        return nullptr;
-    }
-
-    auto entry = std::make_unique&lt;ThemePartCacheEntry&gt;();
-
-    entry-&gt;m_canvas = EflUniquePtr&lt;Ecore_Evas&gt;(ecore_evas_buffer_new(size.width(), size.height()));
-    if (!entry-&gt;canvas()) {
-        EINA_LOG_ERR(&quot;ecore_evas_buffer_new(%d, %d) failed.&quot;, size.width(), size.height());
-        return nullptr;
-    }
-
-    // By default EFL creates buffers without alpha.
-    ecore_evas_alpha_set(entry-&gt;canvas(), EINA_TRUE);
-
-    entry-&gt;m_edje = EflUniquePtr&lt;Evas_Object&gt;(edje_object_add(ecore_evas_get(entry-&gt;canvas())));
-    ASSERT(entry-&gt;edje());
-
-    if (!setSourceGroupForEdjeObject(entry-&gt;edje(), themePath, toEdjeGroup(type)))
-        return nullptr;
-
-    entry-&gt;m_surface = createSurfaceForBackingStore(entry-&gt;canvas());
-    if (!entry-&gt;surface())
-        return nullptr;
-
-    evas_object_resize(entry-&gt;edje(), size.width(), size.height());
-    evas_object_show(entry-&gt;edje());
-
-    entry-&gt;type = type;
-    entry-&gt;size = size;
-
-    return entry;
-}
-
-void RenderThemeEfl::ThemePartCacheEntry::reuse(const String&amp; themePath, FormType newType, const IntSize&amp; newSize)
-{
-    ASSERT(!themePath.isEmpty());
-
-    if (type != newType) {
-        type = newType;
-        if (!setSourceGroupForEdjeObject(edje(), themePath, toEdjeGroup(newType))) {
-            type = FormTypeLast; // Invalidate.
-            return;
-        }
-    }
-
-    if (size != newSize) {
-        size = newSize;
-        ecore_evas_resize(canvas(), newSize.width(), newSize.height());
-        evas_object_resize(edje(), newSize.width(), newSize.height());
-
-        m_surface = createSurfaceForBackingStore(canvas());
-        if (!surface()) {
-            type = FormTypeLast; // Invalidate;
-            return;
-        }
-    }
-}
-
-RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::getThemePartFromCache(FormType type, const IntSize&amp; size)
-{
-    size_t reusableNodeIndex = 0;
-
-    for (size_t i = 0; i &lt; m_partCache.size(); ++i) {
-        ThemePartCacheEntry* candidatedEntry = m_partCache[i].get();
-        if (candidatedEntry-&gt;size == size) {
-            if (candidatedEntry-&gt;type == type) {
-                // Found the right item, move it to the head of the list
-                // and return it.
-                auto temp = WTF::move(m_partCache[i]);
-                m_partCache.remove(i);
-                m_partCache.insert(0, WTF::move(temp));
-                return m_partCache.first().get();
-            }
-            reusableNodeIndex = i;
-        }
-    }
-
-    if (m_partCache.size() &lt; RENDER_THEME_EFL_PART_CACHE_MAX) {
-        auto entry = ThemePartCacheEntry::create(themePath(), type, size);
-        if (entry)
-            m_partCache.insert(0, WTF::move(entry));
-
-        return m_partCache.first().get();
-    }
-
-    // The cache is full, reuse the last item we found that had the
-    // requested size to avoid resizing. If there was none, reuse
-    // the last item of the list.
-    if (!reusableNodeIndex)
-        reusableNodeIndex = m_partCache.size() - 1;
-
-    ThemePartCacheEntry* reusedEntry = m_partCache[reusableNodeIndex].get();
-    ASSERT(reusedEntry);
-    reusedEntry-&gt;reuse(themePath(), type, size);
-    auto temp = WTF::move(m_partCache[reusableNodeIndex]);
-    m_partCache.remove(reusableNodeIndex);
-    m_partCache.insert(0, WTF::move(temp));
-
-    return m_partCache.first().get();
-}
-
-void RenderThemeEfl::clearThemePartCache()
-{
-    for (auto&amp; part : m_partCache)
-        part = nullptr;
-}
-
-void RenderThemeEfl::applyEdjeStateFromForm(Evas_Object* object, const ControlStates* states, bool haveBackground)
-{
-    const char *signals[] = { // keep in sync with WebCore/platform/ThemeTypes.h
-        &quot;hovered&quot;,
-        &quot;pressed&quot;,
-        &quot;focused&quot;,
-        &quot;enabled&quot;,
-        &quot;checked&quot;,
-        &quot;read-only&quot;,
-        &quot;default&quot;,
-        &quot;window-inactive&quot;,
-        &quot;indeterminate&quot;,
-        &quot;spinup&quot;
-    };
-
-    edje_object_signal_emit(object, &quot;reset&quot;, &quot;&quot;);
-
-    for (size_t i = 0; i &lt; WTF_ARRAY_LENGTH(signals); ++i) {
-        if (states-&gt;states() &amp; (1 &lt;&lt; i))
-            edje_object_signal_emit(object, signals[i], &quot;&quot;);
-    }
-
-    if (haveBackground)
-        edje_object_signal_emit(object, &quot;styled&quot;, &quot;&quot;);
-}
-
-void RenderThemeEfl::applyEdjeRTLState(Evas_Object* edje, const RenderObject&amp; object, FormType type, const IntRect&amp; rect)
-{
-    if (type == SliderVertical || type == SliderHorizontal) {
-        if (!is&lt;RenderSlider&gt;(object))
-            return; // probably have -webkit-appearance: slider..
-
-        HTMLInputElement&amp; input = downcast&lt;RenderSlider&gt;(object).element();
-        double valueRange = input.maximum() - input.minimum();
-
-        auto msg = std::make_unique&lt;Edje_Message_Float_Set&gt;();
-        msg-&gt;count = 2;
-
-        // The first parameter of the message decides if the progress bar
-        // grows from the end of the slider or from the beginning. On vertical
-        // sliders, it should always be the same and will not be affected by
-        // text direction settings.
-        if (object.style().direction() == RTL || type == SliderVertical)
-            msg-&gt;val[0] = 1;
-        else
-            msg-&gt;val[0] = 0;
-
-        msg-&gt;val[1] = (input.valueAsNumber() - input.minimum()) / valueRange;
-        edje_object_message_send(edje, EDJE_MESSAGE_FLOAT_SET, 0, msg.get());
-    } else if (type == ProgressBar) {
-        const auto&amp; renderProgress = downcast&lt;RenderProgress&gt;(object);
-
-        int max = rect.width();
-        double value = renderProgress.position();
-
-        auto msg = std::make_unique&lt;Edje_Message_Float_Set&gt;();
-        msg-&gt;count = 2;
-
-        if (object.style().direction() == RTL)
-            msg-&gt;val[0] = (1.0 - value) * max;
-        else
-            msg-&gt;val[0] = 0;
-        msg-&gt;val[1] = value;
-        edje_object_message_send(edje, EDJE_MESSAGE_FLOAT_SET, 0, msg.get());
-    }
-}
-
-bool RenderThemeEfl::isControlStyled(const RenderStyle&amp; style, const BorderData&amp; border, const FillLayer&amp; background, const Color&amp; backgroundColor) const
-{
-    return RenderTheme::isControlStyled(style, border, background, backgroundColor) || style.appearance() == MenulistButtonPart;
-}
-
-bool RenderThemeEfl::paintThemePart(const RenderObject&amp; object, FormType type, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    loadThemeIfNeeded();
-    _ASSERT_ON_RELEASE_RETURN_VAL(edje(), false, &quot;Could not paint native HTML part due to missing theme.&quot;);
-
-    ThemePartCacheEntry* entry = getThemePartFromCache(type, rect.size());
-    if (!entry)
-        return false;
-
-    bool haveBackgroundColor = isControlStyled(object.style(), object.style().border(), *object.style().backgroundLayers(), Color::white);
-    ControlStates states(extractControlStatesForRenderer(object));
-    applyEdjeStateFromForm(entry-&gt;edje(), &amp;states, haveBackgroundColor);
-
-    applyEdjeRTLState(entry-&gt;edje(), object, type, rect);
-
-    edje_object_calc_force(entry-&gt;edje());
-    edje_object_message_signal_process(entry-&gt;edje());
-    evas_render(ecore_evas_get(entry-&gt;canvas()));
-
-    cairo_t* cairo = info.context-&gt;platformContext()-&gt;cr();
-    ASSERT(cairo);
-
-    cairo_save(cairo);
-    cairo_set_source_surface(cairo, entry-&gt;surface(), rect.x(), rect.y());
-    cairo_paint_with_alpha(cairo, 1.0);
-    cairo_restore(cairo);
-
-    return false;
-}
-
-bool RenderThemeEfl::paintThemePart(const GraphicsContext&amp; context, FormType type, const IntRect&amp; rect)
-{
-    loadThemeIfNeeded();
-    _ASSERT_ON_RELEASE_RETURN_VAL(edje(), false, &quot;Could not paint native HTML part due to missing theme.&quot;);
-
-    ThemePartCacheEntry* entry = getThemePartFromCache(type, rect.size());
-    ASSERT(entry);
-
-    edje_object_calc_force(entry-&gt;edje());
-    edje_object_message_signal_process(entry-&gt;edje());
-    evas_render(ecore_evas_get(entry-&gt;canvas()));
-
-    cairo_t* cairo = context.platformContext()-&gt;cr();
-    ASSERT(cairo);
-
-    cairo_save(cairo);
-    cairo_set_source_surface(cairo, entry-&gt;surface(), rect.x(), rect.y());
-    cairo_paint_with_alpha(cairo, 1.0);
-    cairo_restore(cairo);
-
-    return false;
-}
-
-PassRefPtr&lt;RenderTheme&gt; RenderThemeEfl::create(Page* page)
-{
-    return adoptRef(new RenderThemeEfl(page));
-}
-
-PassRefPtr&lt;RenderTheme&gt; RenderTheme::themeForPage(Page* page)
-{
-    if (page)
-        return RenderThemeEfl::create(page);
-
-    static RenderTheme* fallback = RenderThemeEfl::create(0).leakRef();
-    return fallback;
-}
-
-static void applyColorCallback(void* data, Evas_Object*, const char* /* signal */, const char* colorClass)
-{
-    RenderThemeEfl* that = static_cast&lt;RenderThemeEfl*&gt;(data);
-    that-&gt;setColorFromThemeClass(colorClass);
-    that-&gt;platformColorsDidChange(); // Triggers relayout.
-}
-
-static bool fillColorsFromEdjeClass(Evas_Object* o, const char* colorClass, Color* color1, Color* color2 = 0, Color* color3 = 0)
-{
-    int r1, g1, b1, a1;
-    int r2, g2, b2, a2;
-    int r3, g3, b3, a3;
-
-    if (!edje_object_color_class_get(o, colorClass, &amp;r1, &amp;g1, &amp;b1, &amp;a1, &amp;r2, &amp;g2, &amp;b2, &amp;a2, &amp;r3, &amp;g3, &amp;b3, &amp;a3))
-        return false;
-
-    if (color1)
-        color1-&gt;setRGB(makeRGBA(r1, g1, b1, a1));
-    if (color2)
-        color2-&gt;setRGB(makeRGBA(r2, g2, b2, a2));
-    if (color3)
-        color3-&gt;setRGB(makeRGBA(r3, g3, b3, a3));
-
-    return true;
-}
-
-void RenderThemeEfl::setColorFromThemeClass(const char* colorClass)
-{
-    ASSERT(edje());
-
-    if (!strcmp(&quot;webkit/selection/foreground&quot;, colorClass))
-        m_supportsSelectionForegroundColor = fillColorsFromEdjeClass(edje(), colorClass, &amp;m_activeSelectionForegroundColor, &amp;m_inactiveSelectionForegroundColor);
-    else if (!strcmp(&quot;webkit/selection/background&quot;, colorClass))
-        fillColorsFromEdjeClass(edje(), colorClass, &amp;m_activeSelectionBackgroundColor, &amp;m_inactiveSelectionBackgroundColor);
-    else if (!strcmp(&quot;webkit/focus_ring&quot;, colorClass)) {
-        if (!fillColorsFromEdjeClass(edje(), colorClass, &amp;m_focusRingColor))
-            return;
-
-        // platformFocusRingColor() is only used for the default theme (without page)
-        // The following is ugly, but no other way to do it unless we change it to use page themes as much as possible.
-        RenderTheme::setCustomFocusRingColor(m_focusRingColor);
-    }
-}
-
-void RenderThemeEfl::setThemePath(const String&amp; newThemePath)
-{
-    if (newThemePath == m_themePath)
-        return;
-
-    if (newThemePath.isEmpty()) {
-        EINA_LOG_CRIT(&quot;No valid theme defined, things will not work properly.&quot;);
-        return;
-    }
-
-    String oldThemePath = m_themePath;
-    m_themePath = newThemePath;
-
-    // Keep the consistence by restoring the previous theme path
-    // if we cannot load the new one.
-    if (!loadTheme())
-        m_themePath = oldThemePath;
-}
-
-String RenderThemeEfl::themePath() const
-{
-#ifndef NDEBUG
-    if (edje()) {
-        const char* path;
-        edje_object_file_get(edje(), &amp;path, 0);
-        ASSERT(m_themePath == path);
-    }
-#endif
-    return m_themePath;
-}
-
-bool RenderThemeEfl::loadTheme()
-{
-    ASSERT(!m_themePath.isEmpty());
-
-    if (!canvas()) {
-        m_canvas = EflUniquePtr&lt;Ecore_Evas&gt;(ecore_evas_buffer_new(1, 1));
-        _ASSERT_ON_RELEASE_RETURN_VAL(canvas(), false,
-                &quot;Could not create canvas required by theme, things will not work properly.&quot;);
-    }
-
-    EflUniquePtr&lt;Evas_Object&gt; o = EflUniquePtr&lt;Evas_Object&gt;(edje_object_add(ecore_evas_get(canvas())));
-    _ASSERT_ON_RELEASE_RETURN_VAL(o, false, &quot;Could not create new base Edje object.&quot;);
-
-    if (!setSourceGroupForEdjeObject(o.get(), m_themePath, &quot;webkit/base&quot;))
-        return false; // Keep current theme.
-
-    // Invalidate existing theme part cache.
-    if (edje())
-        clearThemePartCache();
-
-    // Set new loaded theme, and apply it.
-    m_edje = WTF::move(o);
-
-    const char* thickness = edje_object_data_get(m_edje.get(), &quot;scrollbar.thickness&quot;);
-    if (thickness &amp;&amp; !Settings::mockScrollbarsEnabled())
-        static_cast&lt;ScrollbarThemeEfl*&gt;(ScrollbarTheme::theme())-&gt;setScrollbarThickness(atoi(thickness));
-
-    edje_object_signal_callback_add(edje(), &quot;color_class,set&quot;, &quot;webkit/selection/foreground&quot;, applyColorCallback, this);
-    edje_object_signal_callback_add(edje(), &quot;color_class,set&quot;, &quot;webkit/selection/background&quot;, applyColorCallback, this);
-    edje_object_signal_callback_add(edje(), &quot;color_class,set&quot;, &quot;webkit/focus_ring&quot;, applyColorCallback, this);
-
-    applyPartDescriptionsFrom(m_themePath);
-
-    setColorFromThemeClass(&quot;webkit/selection/foreground&quot;);
-    setColorFromThemeClass(&quot;webkit/selection/background&quot;);
-    setColorFromThemeClass(&quot;webkit/focus_ring&quot;);
-
-    platformColorsDidChange(); // Schedules a relayout, do last.
-
-    return true;
-}
-
-void RenderThemeEfl::applyPartDescriptionFallback(ThemePartDesc* desc)
-{
-    desc-&gt;min.setWidth(Length(0, Fixed));
-    desc-&gt;min.setHeight(Length(0, Fixed));
-
-    desc-&gt;max.setWidth(Length(0, Fixed));
-    desc-&gt;max.setHeight(Length(0, Fixed));
-
-    desc-&gt;padding = LengthBox(0, 0, 0, 0);
-}
-
-void RenderThemeEfl::applyPartDescription(Evas_Object* object, ThemePartDesc* desc)
-{
-    Evas_Coord minw, minh, maxw, maxh;
-
-    edje_object_size_min_get(object, &amp;minw, &amp;minh);
-    if (!minw &amp;&amp; !minh)
-        edje_object_size_min_calc(object, &amp;minw, &amp;minh);
-
-    desc-&gt;min.setWidth(Length(minw, Fixed));
-    desc-&gt;min.setHeight(Length(minh, Fixed));
-
-    edje_object_size_max_get(object, &amp;maxw, &amp;maxh);
-    desc-&gt;max.setWidth(Length(maxw, Fixed));
-    desc-&gt;max.setHeight(Length(maxh, Fixed));
-
-    if (!edje_object_part_exists(object, &quot;text_confinement&quot;))
-        desc-&gt;padding = LengthBox(0, 0, 0, 0);
-    else {
-        Evas_Coord px, py, pw, ph;
-        Evas_Coord ox = 0, oy = 0, ow = 0, oh = 0;
-        int t, r, b, l;
-
-        if (minw &gt; 0)
-            ow = minw;
-        else
-            ow = 100;
-        if (minh &gt; 0)
-            oh = minh;
-        else
-            oh = 100;
-        if (maxw &gt; 0 &amp;&amp; ow &gt; maxw)
-            ow = maxw;
-        if (maxh &gt; 0 &amp;&amp; oh &gt; maxh)
-            oh = maxh;
-
-        evas_object_move(object, ox, oy);
-        evas_object_resize(object, ow, oh);
-        edje_object_calc_force(object);
-        edje_object_message_signal_process(object);
-        edje_object_part_geometry_get(object, &quot;text_confinement&quot;, &amp;px, &amp;py, &amp;pw, &amp;ph);
-
-        t = py - oy;
-        b = (oh + oy) - (ph + py);
-
-        l = px - ox;
-        r = (ow + ox) - (pw + px);
-
-        desc-&gt;padding = LengthBox(t, r, b, l);
-    }
-}
-
-void RenderThemeEfl::applyPartDescriptionsFrom(const String&amp; themePath)
-{
-    EflUniquePtr&lt;Evas_Object&gt; temp = EflUniquePtr&lt;Evas_Object&gt;(edje_object_add(ecore_evas_get(canvas())));
-    _ASSERT_ON_RELEASE_RETURN(temp, &quot;Could not create Edje object.&quot;);
-
-    for (size_t i = 0; i &lt; FormTypeLast; i++) {
-        FormType type = static_cast&lt;FormType&gt;(i);
-        m_partDescs[i].type = type;
-        if (!setSourceGroupForEdjeObject(temp.get(), themePath, toEdjeGroup(type)))
-            applyPartDescriptionFallback(m_partDescs + i);
-        else
-            applyPartDescription(temp.get(), m_partDescs + i);
-    }
-}
-
-RenderThemeEfl::RenderThemeEfl(Page* page)
-    : RenderTheme()
-    , m_page(page)
-    , m_activeSelectionBackgroundColor(0, 0, 255)
-    , m_activeSelectionForegroundColor(Color::white)
-    , m_inactiveSelectionBackgroundColor(0, 0, 128)
-    , m_inactiveSelectionForegroundColor(200, 200, 200)
-    , m_focusRingColor(32, 32, 224, 224)
-    , m_sliderThumbColor(Color::darkGray)
-    , m_supportsSelectionForegroundColor(false)
-{
-}
-
-RenderThemeEfl::~RenderThemeEfl()
-{
-    clearThemePartCache();
-}
-
-static bool supportsFocus(ControlPart appearance)
-{
-    switch (appearance) {
-    case PushButtonPart:
-    case ButtonPart:
-    case TextFieldPart:
-    case TextAreaPart:
-    case SearchFieldPart:
-    case MenulistPart:
-    case RadioPart:
-    case CheckboxPart:
-    case SliderVerticalPart:
-    case SliderHorizontalPart:
-        return true;
-    default:
-        return false;
-    }
-}
-
-bool RenderThemeEfl::supportsFocusRing(const RenderStyle&amp; style) const
-{
-    return supportsFocus(style.appearance());
-}
-
-bool RenderThemeEfl::controlSupportsTints(const RenderObject&amp; object) const
-{
-    return isEnabled(object);
-}
-
-int RenderThemeEfl::baselinePosition(const RenderBox&amp; box) const
-{
-    if (box.style().appearance() == CheckboxPart || box.style().appearance() == RadioPart)
-        return box.marginTop() + box.height() - 3;
-    return RenderTheme::baselinePosition(box);
-}
-
-Color RenderThemeEfl::platformActiveSelectionBackgroundColor() const
-{
-    loadThemeIfNeeded();
-    return m_activeSelectionBackgroundColor;
-}
-
-Color RenderThemeEfl::platformInactiveSelectionBackgroundColor() const
-{
-    loadThemeIfNeeded();
-    return m_inactiveSelectionBackgroundColor;
-}
-
-Color RenderThemeEfl::platformActiveSelectionForegroundColor() const
-{
-    loadThemeIfNeeded();
-    return m_activeSelectionForegroundColor;
-}
-
-Color RenderThemeEfl::platformInactiveSelectionForegroundColor() const
-{
-    loadThemeIfNeeded();
-    return m_inactiveSelectionForegroundColor;
-}
-
-Color RenderThemeEfl::platformFocusRingColor() const
-{
-    loadThemeIfNeeded();
-    return m_focusRingColor;
-}
-
-bool RenderThemeEfl::supportsSelectionForegroundColors() const
-{
-    loadThemeIfNeeded();
-    return m_supportsSelectionForegroundColor;
-}
-
-bool RenderThemeEfl::paintSliderTrack(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    if (object.style().appearance() == SliderHorizontalPart)
-        paintThemePart(object, SliderHorizontal, info, rect);
-    else
-        paintThemePart(object, SliderVertical, info, rect);
-
-#if ENABLE(DATALIST_ELEMENT)
-    paintSliderTicks(object, info, rect);
-#endif
-
-    return false;
-}
-
-void RenderThemeEfl::adjustSliderTrackStyle(StyleResolver&amp;, RenderStyle&amp; style, Element*) const
-{
-    style.setBoxShadow(nullptr);
-}
-
-void RenderThemeEfl::adjustSliderThumbStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
-    style.setBoxShadow(nullptr);
-}
-
-void RenderThemeEfl::adjustSliderThumbSize(RenderStyle&amp; style, Element*) const
-{
-    ControlPart part = style.appearance();
-    if (part == SliderThumbVerticalPart) {
-        style.setWidth(Length(sliderThumbHeight, Fixed));
-        style.setHeight(Length(sliderThumbWidth, Fixed));
-    } else if (part == SliderThumbHorizontalPart) {
-        style.setWidth(Length(sliderThumbWidth, Fixed));
-        style.setHeight(Length(sliderThumbHeight, Fixed));
-    }
-}
-
-#if ENABLE(DATALIST_ELEMENT)
-IntSize RenderThemeEfl::sliderTickSize() const
-{
-    return IntSize(1, 6);
-}
-
-int RenderThemeEfl::sliderTickOffsetFromTrackCenter() const
-{
-    static const int sliderTickOffset = -12;
-
-    return sliderTickOffset;
-}
-
-LayoutUnit RenderThemeEfl::sliderTickSnappingThreshold() const
-{
-    // The same threshold value as the Chromium port.
-    return 5;
-}
-#endif
-
-bool RenderThemeEfl::supportsDataListUI(const AtomicString&amp; type) const
-{
-#if ENABLE(DATALIST_ELEMENT)
-    // FIXME: We need to support other types.
-    return type == InputTypeNames::email()
-        || type == InputTypeNames::range()
-        || type == InputTypeNames::search()
-        || type == InputTypeNames::url();
-#else
-    UNUSED_PARAM(type);
-    return false;
-#endif
-}
-
-bool RenderThemeEfl::paintSliderThumb(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    if (object.style().appearance() == SliderThumbHorizontalPart)
-        paintThemePart(object, SliderThumbHorizontal, info, rect);
-    else
-        paintThemePart(object, SliderThumbVertical, info, rect);
-
-    return false;
-}
-
-void RenderThemeEfl::adjustCheckboxStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustCheckboxStyle(styleResolver, style, element);
-        return;
-    }
-
-    adjustSizeConstraints(style, CheckBox);
-
-    style.resetBorder();
-
-    const ThemePartDesc* desc = m_partDescs + (size_t)CheckBox;
-    if (style.width().value() &lt; desc-&gt;min.width().value())
-        style.setWidth(desc-&gt;min.width());
-    if (style.height().value() &lt; desc-&gt;min.height().value())
-        style.setHeight(desc-&gt;min.height());
-}
-
-bool RenderThemeEfl::paintCheckbox(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, CheckBox, info, rect);
-}
-
-void RenderThemeEfl::adjustRadioStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustRadioStyle(styleResolver, style, element);
-        return;
-    }
-
-    adjustSizeConstraints(style, RadioButton);
-
-    style.resetBorder();
-
-    const ThemePartDesc* desc = m_partDescs + (size_t)RadioButton;
-    if (style.width().value() &lt; desc-&gt;min.width().value())
-        style.setWidth(desc-&gt;min.width());
-    if (style.height().value() &lt; desc-&gt;min.height().value())
-        style.setHeight(desc-&gt;min.height());
-}
-
-bool RenderThemeEfl::paintRadio(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, RadioButton, info, rect);
-}
-
-void RenderThemeEfl::adjustButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustButtonStyle(styleResolver, style, element);
-        return;
-    }
-
-    // adjustSizeConstrains can make SquareButtonPart's size wrong (by adjusting paddings), so call it only for PushButtonPart and ButtonPart
-    if (style.appearance() == PushButtonPart || style.appearance() == ButtonPart)
-        adjustSizeConstraints(style, Button);
-}
-
-bool RenderThemeEfl::paintButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, Button, info, rect);
-}
-
-void RenderThemeEfl::adjustMenuListStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustMenuListStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, ComboBox);
-    style.resetBorder();
-    style.setWhiteSpace(PRE);
-
-    style.setLineHeight(RenderStyle::initialLineHeight());
-}
-
-bool RenderThemeEfl::paintMenuList(const RenderObject&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
-{
-    return paintThemePart(object, ComboBox, info, IntRect(rect));
-}
-
-void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    // Height is locked to auto if height is not specified.
-    style.setHeight(Length(Auto));
-
-    // The &lt;select&gt; box must be at least 12px high for the button to render the text inside the box without clipping.
-    const int dropDownBoxMinHeight = 12;
-
-    // Calculate min-height of the &lt;select&gt; element.
-    int minHeight = style.fontMetrics().height();
-    minHeight = std::max(minHeight, dropDownBoxMinHeight);
-    style.setMinHeight(Length(minHeight, Fixed));
-
-    adjustMenuListStyle(styleResolver, style, element);
-}
-
-bool RenderThemeEfl::paintMenuListButtonDecorations(const RenderBox&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
-{
-    return paintMenuList(object, info, rect);
-}
-
-void RenderThemeEfl::adjustTextFieldStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustTextFieldStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, TextField);
-    style.resetBorder();
-}
-
-bool RenderThemeEfl::paintTextField(const RenderObject&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
-{
-    return paintThemePart(object, TextField, info, IntRect(rect));
-}
-
-void RenderThemeEfl::adjustTextAreaStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const
-{
-}
-
-bool RenderThemeEfl::paintTextArea(const RenderObject&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
-{
-    return paintTextField(object, info, rect);
-}
-
-void RenderThemeEfl::adjustSearchFieldResultsButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldResultsButtonStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, SearchFieldResultsButton);
-    style.resetBorder();
-    style.setWhiteSpace(PRE);
-
-    float fontScale = style.fontSize() / defaultFontSize;
-    int decorationSize = lroundf(std::min(std::max(minSearchDecorationButtonSize, defaultFontSize * fontScale), maxSearchDecorationButtonSize));
-
-    style.setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
-    style.setHeight(Length(decorationSize, Fixed));
-}
-
-bool RenderThemeEfl::paintSearchFieldResultsButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, SearchFieldResultsButton, info, rect);
-}
-
-void RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, SearchFieldResultsDecoration);
-    style.resetBorder();
-    style.setWhiteSpace(PRE);
-
-    float fontScale = style.fontSize() / defaultFontSize;
-    int decorationSize = lroundf(std::min(std::max(minSearchDecorationButtonSize, defaultFontSize * fontScale), maxSearchDecorationButtonSize));
-
-    style.setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
-    style.setHeight(Length(decorationSize, Fixed));
-}
-
-bool RenderThemeEfl::paintSearchFieldResultsDecorationPart(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, SearchFieldResultsDecoration, info, rect);
-}
-
-void RenderThemeEfl::adjustSearchFieldCancelButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldCancelButtonStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, SearchFieldCancelButton);
-    style.resetBorder();
-    style.setWhiteSpace(PRE);
-
-    // Logic taken from RenderThemeChromium.cpp.
-    // Scale the button size based on the font size.
-    float fontScale = style.fontSize() / defaultFontSize;
-    int cancelButtonSize = lroundf(std::min(std::max(minCancelButtonSize, defaultFontSize * fontScale), maxCancelButtonSize));
-
-    style.setWidth(Length(cancelButtonSize, Fixed));
-    style.setHeight(Length(cancelButtonSize, Fixed));
-}
-
-bool RenderThemeEfl::paintSearchFieldCancelButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, SearchFieldCancelButton, info, rect);
-}
-
-void RenderThemeEfl::adjustSearchFieldStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, SearchField);
-    style.resetBorder();
-    style.setWhiteSpace(PRE);
-}
-
-bool RenderThemeEfl::paintSearchField(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, SearchField, info, rect);
-}
-
-void RenderThemeEfl::adjustInnerSpinButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
-{
-    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
-        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustInnerSpinButtonStyle(styleResolver, style, element);
-        return;
-    }
-    adjustSizeConstraints(style, Spinner);
-}
-
-bool RenderThemeEfl::paintInnerSpinButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    return paintThemePart(object, Spinner, info, rect);
-}
-
-void RenderThemeEfl::setDefaultFontSize(int size)
-{
-    defaultFontSize = size;
-}
-
-void RenderThemeEfl::updateCachedSystemFontDescription(CSSValueID, FontDescription&amp; fontDescription) const
-{
-    // It was called by RenderEmbeddedObject::paintReplaced to render alternative string.
-    // To avoid cairo_error while rendering, fontDescription should be passed.
-    fontDescription.setOneFamily(&quot;Sans&quot;);
-    fontDescription.setSpecifiedSize(defaultFontSize);
-    fontDescription.setIsAbsoluteSize(true);
-    fontDescription.setWeight(FontWeightNormal);
-    fontDescription.setItalic(FontItalicOff);
-}
-
-void RenderThemeEfl::adjustProgressBarStyle(StyleResolver&amp;, RenderStyle&amp; style, Element*) const
-{
-    style.setBoxShadow(nullptr);
-}
-
-double RenderThemeEfl::animationRepeatIntervalForProgressBar(RenderProgress&amp;) const
-{
-    return progressAnimationInterval;
-}
-
-double RenderThemeEfl::animationDurationForProgressBar(RenderProgress&amp;) const
-{
-    return progressAnimationInterval * progressAnimationFrames * 2; // &quot;2&quot; for back and forth;
-}
-
-bool RenderThemeEfl::paintProgressBar(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
-{
-    if (!object.isProgress())
-        return true;
-
-    return paintThemePart(object, ProgressBar, info, rect);
-}
-
-#if ENABLE(VIDEO)
-String RenderThemeEfl::mediaControlsStyleSheet()
-{
-    return ASCIILiteral(mediaControlsBaseUserAgentStyleSheet);
-}
-
-String RenderThemeEfl::mediaControlsScript()
-{
-    StringBuilder scriptBuilder;
-    scriptBuilder.append(mediaControlsLocalizedStringsJavaScript, sizeof(mediaControlsLocalizedStringsJavaScript));
-    scriptBuilder.append(mediaControlsBaseJavaScript, sizeof(mediaControlsBaseJavaScript));
-    return scriptBuilder.toString();
-}
-#endif
-
-#undef _ASSERT_ON_RELEASE_RETURN
-#undef _ASSERT_ON_RELEASE_RETURN_VAL
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformeflRenderThemeEflh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (189019 => 189020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h        2015-08-27 09:46:26 UTC (rev 189019)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h        2015-08-27 09:59:37 UTC (rev 189020)
</span><span class="lines">@@ -1,260 +0,0 @@
</span><del>-/*
- * This file is part of the WebKit project.
- *
- * Copyright (C) 2006 Apple Inc.
- * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
- * Copyright (C) 2007 Holger Hans Peter Freyther
- * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
- * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
- * Copyright (C) 2009-2010 ProFUSION embedded systems
- * Copyright (C) 2009-2010 Samsung Electronics
- * All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef RenderThemeEfl_h
-#define RenderThemeEfl_h
-
-#include &quot;RenderTheme.h&quot;
-
-#include &lt;Eina.h&gt;
-#include &lt;cairo.h&gt;
-#include &lt;wtf/efl/UniquePtrEfl.h&gt;
-
-namespace WebCore {
-
-enum FormType { // KEEP IN SYNC WITH edjeGroupFromFormType()
-    Button,
-    RadioButton,
-    TextField,
-    CheckBox,
-    ComboBox,
-    ProgressBar,
-    ScrollbarHorizontalThumb,
-    ScrollbarHorizontalTrackBackground,
-    ScrollbarVerticalThumb,
-    ScrollbarVerticalTrackBackground,
-    SearchField,
-    SearchFieldResultsButton,
-    SearchFieldResultsDecoration,
-    SearchFieldCancelButton,
-    SliderVertical,
-    SliderHorizontal,
-    SliderThumbVertical,
-    SliderThumbHorizontal,
-    Spinner,
-    FormTypeLast
-};
-
-class RenderThemeEfl final : public RenderTheme {
-private:
-    explicit RenderThemeEfl(Page*);
-    virtual ~RenderThemeEfl();
-
-public:
-    static PassRefPtr&lt;RenderTheme&gt; create(Page*);
-
-    // A method asking if the theme's controls actually care about redrawing when hovered.
-    virtual bool supportsHover(const RenderStyle&amp;) const override { return true; }
-
-    // A method Returning whether the control is styled by css or not e.g specifying background-color.
-    virtual bool isControlStyled(const RenderStyle&amp;, const BorderData&amp;, const FillLayer&amp;, const Color&amp; backgroundColor) const override;
-
-    // A method asking if the theme is able to draw the focus ring.
-    virtual bool supportsFocusRing(const RenderStyle&amp;) const override;
-
-    // A method asking if the control changes its tint when the window has focus or not.
-    virtual bool controlSupportsTints(const RenderObject&amp;) const override;
-
-    // A general method asking if any control tinting is supported at all.
-    virtual bool supportsControlTints() const override { return true; }
-
-    // A general method asking if foreground colors of selection are supported.
-    virtual bool supportsSelectionForegroundColors() const override;
-
-    // A method to obtain the baseline position for a &quot;leaf&quot; control. This will only be used if a baseline
-    // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
-    // controls that need to do this.
-    virtual int baselinePosition(const RenderBox&amp;) const override;
-
-    virtual Color platformActiveSelectionBackgroundColor() const override;
-    virtual Color platformInactiveSelectionBackgroundColor() const override;
-    virtual Color platformActiveSelectionForegroundColor() const override;
-    virtual Color platformInactiveSelectionForegroundColor() const override;
-    virtual Color platformFocusRingColor() const override;
-
-    // Set platform colors; remember to call platformColorDidChange after.
-    void setColorFromThemeClass(const char* colorClass);
-
-    void setButtonTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
-    void setComboTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
-    void setEntryTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
-    void setSearchTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
-
-    void adjustSizeConstraints(RenderStyle&amp;, FormType) const;
-
-    virtual void adjustCheckboxStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintCheckbox(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustRadioStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintRadio(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustTextFieldStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintTextField(const RenderObject&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
-
-    virtual void adjustTextAreaStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintTextArea(const RenderObject&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
-
-    virtual void adjustMenuListStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintMenuList(const RenderObject&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
-
-    virtual void adjustMenuListButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintMenuListButtonDecorations(const RenderBox&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
-
-    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustSearchFieldStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintSearchField(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintSearchFieldResultsButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintSearchFieldCancelButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustSliderTrackStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintSliderTrack(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustSliderThumbStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-
-    virtual void adjustSliderThumbSize(RenderStyle&amp;, Element*) const override;
-
-#if ENABLE(DATALIST_ELEMENT)
-    virtual IntSize sliderTickSize() const override;
-    virtual int sliderTickOffsetFromTrackCenter() const override;
-    virtual LayoutUnit sliderTickSnappingThreshold() const override;
-#endif
-
-    virtual bool supportsDataListUI(const AtomicString&amp;) const override;
-
-    virtual bool paintSliderThumb(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    virtual void adjustInnerSpinButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintInnerSpinButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-
-    static void setDefaultFontSize(int fontsize);
-
-    virtual void adjustProgressBarStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
-    virtual bool paintProgressBar(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
-    virtual double animationRepeatIntervalForProgressBar(RenderProgress&amp;) const override;
-    virtual double animationDurationForProgressBar(RenderProgress&amp;) const override;
-
-#if ENABLE(VIDEO)
-    virtual String mediaControlsStyleSheet() override;
-    virtual String mediaControlsScript() override;
-#endif
-#if ENABLE(VIDEO_TRACK)
-    virtual bool supportsClosedCaptioning() const override { return true; }
-#endif
-
-    void setThemePath(const String&amp;);
-    String themePath() const;
-
-    bool paintThemePart(const GraphicsContext&amp;, FormType, const IntRect&amp;);
-
-protected:
-    static float defaultFontSize;
-
-private:
-    bool loadTheme();
-    ALWAYS_INLINE bool loadThemeIfNeeded() const
-    {
-        return m_edje || (!m_themePath.isEmpty() &amp;&amp; const_cast&lt;RenderThemeEfl*&gt;(this)-&gt;loadTheme());
-    }
-
-    // System fonts.
-    virtual void updateCachedSystemFontDescription(CSSValueID, FontDescription&amp;) const override;
-
-    ALWAYS_INLINE Ecore_Evas* canvas() const { return m_canvas.get(); }
-    ALWAYS_INLINE Evas_Object* edje() const { return m_edje.get(); }
-
-    void applyPartDescriptionsFrom(const String&amp; themePath);
-
-    void applyEdjeStateFromForm(Evas_Object*, const ControlStates*, bool);
-    void applyEdjeRTLState(Evas_Object*, const RenderObject&amp;, FormType, const IntRect&amp;);
-    bool paintThemePart(const RenderObject&amp;, FormType, const PaintInfo&amp;, const IntRect&amp;);
-
-    Page* m_page;
-    Color m_activeSelectionBackgroundColor;
-    Color m_activeSelectionForegroundColor;
-    Color m_inactiveSelectionBackgroundColor;
-    Color m_inactiveSelectionForegroundColor;
-    Color m_focusRingColor;
-    Color m_sliderThumbColor;
-
-    String m_themePath;
-    // Order so that the canvas gets destroyed at last.
-    EflUniquePtr&lt;Ecore_Evas&gt; m_canvas;
-    EflUniquePtr&lt;Evas_Object&gt; m_edje;
-
-    bool m_supportsSelectionForegroundColor;
-
-    struct ThemePartDesc {
-        FormType type;
-        LengthSize min;
-        LengthSize max;
-        LengthBox padding;
-    };
-    void applyPartDescriptionFallback(struct ThemePartDesc*);
-    void applyPartDescription(Evas_Object*, struct ThemePartDesc*);
-
-    struct ThemePartCacheEntry {
-        static std::unique_ptr&lt;RenderThemeEfl::ThemePartCacheEntry&gt; create(const String&amp; themePath, FormType, const IntSize&amp;);
-        void reuse(const String&amp; themePath, FormType, const IntSize&amp;);
-
-        ALWAYS_INLINE Ecore_Evas* canvas() { return m_canvas.get(); }
-        ALWAYS_INLINE Evas_Object* edje() { return m_edje.get(); }
-        ALWAYS_INLINE cairo_surface_t* surface() { return m_surface.get(); }
-
-        FormType type;
-        IntSize size;
-
-    private:
-        // Order so that the canvas gets destroyed at last.
-        EflUniquePtr&lt;Ecore_Evas&gt; m_canvas;
-        EflUniquePtr&lt;Evas_Object&gt; m_edje;
-        RefPtr&lt;cairo_surface_t&gt; m_surface;
-    };
-
-    struct ThemePartDesc m_partDescs[FormTypeLast];
-
-    // List of ThemePartCacheEntry* sorted so that the most recently
-    // used entries come first. We use a list for efficient moving
-    // of items within the container.
-    Vector&lt;std::unique_ptr&lt;ThemePartCacheEntry&gt;&gt; m_partCache;
-
-    ThemePartCacheEntry* getThemePartFromCache(FormType, const IntSize&amp;);
-    void clearThemePartCache();
-};
-}
-
-#endif // RenderThemeEfl_h
</del></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeEflcppfromrev189019trunkSourceWebCoreplatformeflRenderThemeEflcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/rendering/RenderThemeEfl.cpp (from rev 189019, trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp) (0 => 189020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeEfl.cpp                                (rev 0)
+++ trunk/Source/WebCore/rendering/RenderThemeEfl.cpp        2015-08-27 09:59:37 UTC (rev 189020)
</span><span class="lines">@@ -0,0 +1,1073 @@
</span><ins>+/*
+ * Copyright (C) 2007 Apple Inc.
+ * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2011 Samsung Electronics
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RenderThemeEfl.h&quot;
+
+#include &quot;CSSValueKeywords.h&quot;
+#include &quot;CairoUtilitiesEfl.h&quot;
+#include &quot;ExceptionCodePlaceholder.h&quot;
+#include &quot;FloatRoundedRect.h&quot;
+#include &quot;FontDescription.h&quot;
+#include &quot;GraphicsContext.h&quot;
+#include &quot;HTMLInputElement.h&quot;
+#include &quot;InputTypeNames.h&quot;
+#include &quot;NotImplemented.h&quot;
+#include &quot;Page.h&quot;
+#include &quot;PaintInfo.h&quot;
+#include &quot;PlatformContextCairo.h&quot;
+#include &quot;RenderBox.h&quot;
+#include &quot;RenderObject.h&quot;
+#include &quot;RenderProgress.h&quot;
+#include &quot;RenderSlider.h&quot;
+#include &quot;ScrollbarThemeEfl.h&quot;
+#include &quot;Settings.h&quot;
+#include &quot;UserAgentScripts.h&quot;
+#include &quot;UserAgentStyleSheets.h&quot;
+#include &lt;Ecore_Evas.h&gt;
+#include &lt;Edje.h&gt;
+#include &lt;new&gt;
+#include &lt;wtf/text/CString.h&gt;
+#include &lt;wtf/text/StringBuilder.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+// TODO: change from object count to ecore_evas size (bytes)
+// TODO: as objects are webpage/user defined and they can be very large.
+#define RENDER_THEME_EFL_PART_CACHE_MAX 32
+
+// Initialize default font size.
+float RenderThemeEfl::defaultFontSize = 16.0f;
+
+static const float minCancelButtonSize = 5;
+static const float maxCancelButtonSize = 21;
+
+static const float minSearchDecorationButtonSize = 1;
+static const float maxSearchDecorationButtonSize = 15;
+static const float searchFieldDecorationButtonOffset = 3;
+
+// Constants for progress tag animation.
+// These values have been copied from RenderThemeGtk.cpp
+static const int progressAnimationFrames = 10;
+static const double progressAnimationInterval = 0.125;
+
+static const int sliderThumbWidth = 29;
+static const int sliderThumbHeight = 11;
+
+#define _ASSERT_ON_RELEASE_RETURN(o, fmt, ...) \
+    do { \
+        if (!o) { \
+            EINA_LOG_CRIT(fmt, ## __VA_ARGS__); \
+            ASSERT(o); \
+            return; \
+        } \
+    } while (0)
+
+#define _ASSERT_ON_RELEASE_RETURN_VAL(o, val, fmt, ...) \
+    do { \
+        if (!o) { \
+            EINA_LOG_CRIT(fmt, ## __VA_ARGS__); \
+            ASSERT(o); \
+            return val; \
+        } \
+    } while (0)
+
+static const char* toEdjeGroup(FormType type)
+{
+    static const char* groups[] = {
+        &quot;webkit/widget/button&quot;,
+        &quot;webkit/widget/radio&quot;,
+        &quot;webkit/widget/entry&quot;,
+        &quot;webkit/widget/checkbox&quot;,
+        &quot;webkit/widget/combo&quot;,
+        &quot;webkit/widget/progressbar&quot;,
+        &quot;webkit/widget/scrollbar/horizontal_thumb&quot;,
+        &quot;webkit/widget/scrollbar/horizontal_background&quot;,
+        &quot;webkit/widget/scrollbar/vertical_thumb&quot;,
+        &quot;webkit/widget/scrollbar/vertical_background&quot;,
+        &quot;webkit/widget/search/field&quot;,
+        &quot;webkit/widget/search/results_button&quot;,
+        &quot;webkit/widget/search/results_decoration&quot;,
+        &quot;webkit/widget/search/cancel_button&quot;,
+        &quot;webkit/widget/slider/vertical&quot;,
+        &quot;webkit/widget/slider/horizontal&quot;,
+        &quot;webkit/widget/slider/thumb_vertical&quot;,
+        &quot;webkit/widget/slider/thumb_horizontal&quot;,
+        &quot;webkit/widget/spinner&quot;,
+        0
+    };
+    ASSERT(type &gt;= 0);
+    ASSERT((size_t)type &lt; sizeof(groups) / sizeof(groups[0])); // Out of sync?
+    return groups[type];
+}
+
+static bool setSourceGroupForEdjeObject(Evas_Object* o, const String&amp; themePath, const char* group)
+{
+    ASSERT(o);
+    ASSERT(!themePath.isEmpty());
+
+    if (!edje_object_file_set(o, themePath.utf8().data(), group)) {
+        const char* message = edje_load_error_str(edje_object_load_error_get(o));
+        EINA_LOG_ERR(&quot;Could not set theme group '%s' of file '%s': %s&quot;, group, themePath.utf8().data(), message);
+        return false;
+    }
+
+    return true;
+}
+
+void RenderThemeEfl::adjustSizeConstraints(RenderStyle&amp; style, FormType type) const
+{
+    loadThemeIfNeeded();
+
+    // These are always valid, even if no theme could be loaded.
+    const ThemePartDesc* desc = m_partDescs + (size_t)type;
+
+    if (style.minWidth().isIntrinsic())
+        style.setMinWidth(desc-&gt;min.width());
+    if (style.minHeight().isIntrinsic())
+        style.setMinHeight(desc-&gt;min.height());
+
+    if (desc-&gt;max.width().value() &gt; 0 &amp;&amp; style.maxWidth().isIntrinsicOrAuto())
+        style.setMaxWidth(desc-&gt;max.width());
+    if (desc-&gt;max.height().value() &gt; 0 &amp;&amp; style.maxHeight().isIntrinsicOrAuto())
+        style.setMaxHeight(desc-&gt;max.height());
+
+    style.setPaddingTop(desc-&gt;padding.top());
+    style.setPaddingBottom(desc-&gt;padding.bottom());
+    style.setPaddingLeft(desc-&gt;padding.left());
+    style.setPaddingRight(desc-&gt;padding.right());
+}
+
+static bool isFormElementTooLargeToDisplay(const IntSize&amp; elementSize)
+{
+    // This limit of 20000 pixels is hardcoded inside edje -- anything above this size
+    // will be clipped. This value seems to be reasonable enough so that hardcoding it
+    // here won't be a problem.
+    static const int maxEdjeDimension = 20000;
+
+    return elementSize.width() &gt; maxEdjeDimension || elementSize.height() &gt; maxEdjeDimension;
+}
+
+std::unique_ptr&lt;RenderThemeEfl::ThemePartCacheEntry&gt; RenderThemeEfl::ThemePartCacheEntry::create(const String&amp; themePath, FormType type, const IntSize&amp; size)
+{
+    ASSERT(!themePath.isEmpty());
+
+    if (isFormElementTooLargeToDisplay(size) || size.isEmpty()) {
+        EINA_LOG_ERR(&quot;Cannot render an element of size %dx%d.&quot;, size.width(), size.height());
+        return nullptr;
+    }
+
+    auto entry = std::make_unique&lt;ThemePartCacheEntry&gt;();
+
+    entry-&gt;m_canvas = EflUniquePtr&lt;Ecore_Evas&gt;(ecore_evas_buffer_new(size.width(), size.height()));
+    if (!entry-&gt;canvas()) {
+        EINA_LOG_ERR(&quot;ecore_evas_buffer_new(%d, %d) failed.&quot;, size.width(), size.height());
+        return nullptr;
+    }
+
+    // By default EFL creates buffers without alpha.
+    ecore_evas_alpha_set(entry-&gt;canvas(), EINA_TRUE);
+
+    entry-&gt;m_edje = EflUniquePtr&lt;Evas_Object&gt;(edje_object_add(ecore_evas_get(entry-&gt;canvas())));
+    ASSERT(entry-&gt;edje());
+
+    if (!setSourceGroupForEdjeObject(entry-&gt;edje(), themePath, toEdjeGroup(type)))
+        return nullptr;
+
+    entry-&gt;m_surface = createSurfaceForBackingStore(entry-&gt;canvas());
+    if (!entry-&gt;surface())
+        return nullptr;
+
+    evas_object_resize(entry-&gt;edje(), size.width(), size.height());
+    evas_object_show(entry-&gt;edje());
+
+    entry-&gt;type = type;
+    entry-&gt;size = size;
+
+    return entry;
+}
+
+void RenderThemeEfl::ThemePartCacheEntry::reuse(const String&amp; themePath, FormType newType, const IntSize&amp; newSize)
+{
+    ASSERT(!themePath.isEmpty());
+
+    if (type != newType) {
+        type = newType;
+        if (!setSourceGroupForEdjeObject(edje(), themePath, toEdjeGroup(newType))) {
+            type = FormTypeLast; // Invalidate.
+            return;
+        }
+    }
+
+    if (size != newSize) {
+        size = newSize;
+        ecore_evas_resize(canvas(), newSize.width(), newSize.height());
+        evas_object_resize(edje(), newSize.width(), newSize.height());
+
+        m_surface = createSurfaceForBackingStore(canvas());
+        if (!surface()) {
+            type = FormTypeLast; // Invalidate;
+            return;
+        }
+    }
+}
+
+RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::getThemePartFromCache(FormType type, const IntSize&amp; size)
+{
+    size_t reusableNodeIndex = 0;
+
+    for (size_t i = 0; i &lt; m_partCache.size(); ++i) {
+        ThemePartCacheEntry* candidatedEntry = m_partCache[i].get();
+        if (candidatedEntry-&gt;size == size) {
+            if (candidatedEntry-&gt;type == type) {
+                // Found the right item, move it to the head of the list
+                // and return it.
+                auto temp = WTF::move(m_partCache[i]);
+                m_partCache.remove(i);
+                m_partCache.insert(0, WTF::move(temp));
+                return m_partCache.first().get();
+            }
+            reusableNodeIndex = i;
+        }
+    }
+
+    if (m_partCache.size() &lt; RENDER_THEME_EFL_PART_CACHE_MAX) {
+        auto entry = ThemePartCacheEntry::create(themePath(), type, size);
+        if (entry)
+            m_partCache.insert(0, WTF::move(entry));
+
+        return m_partCache.first().get();
+    }
+
+    // The cache is full, reuse the last item we found that had the
+    // requested size to avoid resizing. If there was none, reuse
+    // the last item of the list.
+    if (!reusableNodeIndex)
+        reusableNodeIndex = m_partCache.size() - 1;
+
+    ThemePartCacheEntry* reusedEntry = m_partCache[reusableNodeIndex].get();
+    ASSERT(reusedEntry);
+    reusedEntry-&gt;reuse(themePath(), type, size);
+    auto temp = WTF::move(m_partCache[reusableNodeIndex]);
+    m_partCache.remove(reusableNodeIndex);
+    m_partCache.insert(0, WTF::move(temp));
+
+    return m_partCache.first().get();
+}
+
+void RenderThemeEfl::clearThemePartCache()
+{
+    for (auto&amp; part : m_partCache)
+        part = nullptr;
+}
+
+void RenderThemeEfl::applyEdjeStateFromForm(Evas_Object* object, const ControlStates* states, bool haveBackground)
+{
+    const char* signals[] = { // keep in sync with WebCore/platform/ThemeTypes.h
+        &quot;hovered&quot;,
+        &quot;pressed&quot;,
+        &quot;focused&quot;,
+        &quot;enabled&quot;,
+        &quot;checked&quot;,
+        &quot;read-only&quot;,
+        &quot;default&quot;,
+        &quot;window-inactive&quot;,
+        &quot;indeterminate&quot;,
+        &quot;spinup&quot;
+    };
+
+    edje_object_signal_emit(object, &quot;reset&quot;, &quot;&quot;);
+
+    for (size_t i = 0; i &lt; WTF_ARRAY_LENGTH(signals); ++i) {
+        if (states-&gt;states() &amp; (1 &lt;&lt; i))
+            edje_object_signal_emit(object, signals[i], &quot;&quot;);
+    }
+
+    if (haveBackground)
+        edje_object_signal_emit(object, &quot;styled&quot;, &quot;&quot;);
+}
+
+void RenderThemeEfl::applyEdjeRTLState(Evas_Object* edje, const RenderObject&amp; object, FormType type, const IntRect&amp; rect)
+{
+    if (type == SliderVertical || type == SliderHorizontal) {
+        if (!is&lt;RenderSlider&gt;(object))
+            return; // probably have -webkit-appearance: slider..
+
+        HTMLInputElement&amp; input = downcast&lt;RenderSlider&gt;(object).element();
+        double valueRange = input.maximum() - input.minimum();
+
+        auto msg = std::make_unique&lt;Edje_Message_Float_Set&gt;();
+        msg-&gt;count = 2;
+
+        // The first parameter of the message decides if the progress bar
+        // grows from the end of the slider or from the beginning. On vertical
+        // sliders, it should always be the same and will not be affected by
+        // text direction settings.
+        if (object.style().direction() == RTL || type == SliderVertical)
+            msg-&gt;val[0] = 1;
+        else
+            msg-&gt;val[0] = 0;
+
+        msg-&gt;val[1] = (input.valueAsNumber() - input.minimum()) / valueRange;
+        edje_object_message_send(edje, EDJE_MESSAGE_FLOAT_SET, 0, msg.get());
+    } else if (type == ProgressBar) {
+        const auto&amp; renderProgress = downcast&lt;RenderProgress&gt;(object);
+
+        int max = rect.width();
+        double value = renderProgress.position();
+
+        auto msg = std::make_unique&lt;Edje_Message_Float_Set&gt;();
+        msg-&gt;count = 2;
+
+        if (object.style().direction() == RTL)
+            msg-&gt;val[0] = (1.0 - value) * max;
+        else
+            msg-&gt;val[0] = 0;
+        msg-&gt;val[1] = value;
+        edje_object_message_send(edje, EDJE_MESSAGE_FLOAT_SET, 0, msg.get());
+    }
+}
+
+bool RenderThemeEfl::isControlStyled(const RenderStyle&amp; style, const BorderData&amp; border, const FillLayer&amp; background, const Color&amp; backgroundColor) const
+{
+    return RenderTheme::isControlStyled(style, border, background, backgroundColor) || style.appearance() == MenulistButtonPart;
+}
+
+bool RenderThemeEfl::paintThemePart(const RenderObject&amp; object, FormType type, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    loadThemeIfNeeded();
+    _ASSERT_ON_RELEASE_RETURN_VAL(edje(), false, &quot;Could not paint native HTML part due to missing theme.&quot;);
+
+    ThemePartCacheEntry* entry = getThemePartFromCache(type, rect.size());
+    if (!entry)
+        return false;
+
+    bool haveBackgroundColor = isControlStyled(object.style(), object.style().border(), *object.style().backgroundLayers(), Color::white);
+    ControlStates states(extractControlStatesForRenderer(object));
+    applyEdjeStateFromForm(entry-&gt;edje(), &amp;states, haveBackgroundColor);
+
+    applyEdjeRTLState(entry-&gt;edje(), object, type, rect);
+
+    edje_object_calc_force(entry-&gt;edje());
+    edje_object_message_signal_process(entry-&gt;edje());
+    evas_render(ecore_evas_get(entry-&gt;canvas()));
+
+    cairo_t* cairo = info.context-&gt;platformContext()-&gt;cr();
+    ASSERT(cairo);
+
+    cairo_save(cairo);
+    cairo_set_source_surface(cairo, entry-&gt;surface(), rect.x(), rect.y());
+    cairo_paint_with_alpha(cairo, 1.0);
+    cairo_restore(cairo);
+
+    return false;
+}
+
+bool RenderThemeEfl::paintThemePart(const GraphicsContext&amp; context, FormType type, const IntRect&amp; rect)
+{
+    loadThemeIfNeeded();
+    _ASSERT_ON_RELEASE_RETURN_VAL(edje(), false, &quot;Could not paint native HTML part due to missing theme.&quot;);
+
+    ThemePartCacheEntry* entry = getThemePartFromCache(type, rect.size());
+    ASSERT(entry);
+
+    edje_object_calc_force(entry-&gt;edje());
+    edje_object_message_signal_process(entry-&gt;edje());
+    evas_render(ecore_evas_get(entry-&gt;canvas()));
+
+    cairo_t* cairo = context.platformContext()-&gt;cr();
+    ASSERT(cairo);
+
+    cairo_save(cairo);
+    cairo_set_source_surface(cairo, entry-&gt;surface(), rect.x(), rect.y());
+    cairo_paint_with_alpha(cairo, 1.0);
+    cairo_restore(cairo);
+
+    return false;
+}
+
+PassRefPtr&lt;RenderTheme&gt; RenderThemeEfl::create(Page* page)
+{
+    return adoptRef(new RenderThemeEfl(page));
+}
+
+PassRefPtr&lt;RenderTheme&gt; RenderTheme::themeForPage(Page* page)
+{
+    if (page)
+        return RenderThemeEfl::create(page);
+
+    static RenderTheme* fallback = RenderThemeEfl::create(0).leakRef();
+    return fallback;
+}
+
+static void applyColorCallback(void* data, Evas_Object*, const char* /* signal */, const char* colorClass)
+{
+    RenderThemeEfl* that = static_cast&lt;RenderThemeEfl*&gt;(data);
+    that-&gt;setColorFromThemeClass(colorClass);
+    that-&gt;platformColorsDidChange(); // Triggers relayout.
+}
+
+static bool fillColorsFromEdjeClass(Evas_Object* o, const char* colorClass, Color* color1, Color* color2 = 0, Color* color3 = 0)
+{
+    int r1, g1, b1, a1;
+    int r2, g2, b2, a2;
+    int r3, g3, b3, a3;
+
+    if (!edje_object_color_class_get(o, colorClass, &amp;r1, &amp;g1, &amp;b1, &amp;a1, &amp;r2, &amp;g2, &amp;b2, &amp;a2, &amp;r3, &amp;g3, &amp;b3, &amp;a3))
+        return false;
+
+    if (color1)
+        color1-&gt;setRGB(makeRGBA(r1, g1, b1, a1));
+    if (color2)
+        color2-&gt;setRGB(makeRGBA(r2, g2, b2, a2));
+    if (color3)
+        color3-&gt;setRGB(makeRGBA(r3, g3, b3, a3));
+
+    return true;
+}
+
+void RenderThemeEfl::setColorFromThemeClass(const char* colorClass)
+{
+    ASSERT(edje());
+
+    if (!strcmp(&quot;webkit/selection/foreground&quot;, colorClass))
+        m_supportsSelectionForegroundColor = fillColorsFromEdjeClass(edje(), colorClass, &amp;m_activeSelectionForegroundColor, &amp;m_inactiveSelectionForegroundColor);
+    else if (!strcmp(&quot;webkit/selection/background&quot;, colorClass))
+        fillColorsFromEdjeClass(edje(), colorClass, &amp;m_activeSelectionBackgroundColor, &amp;m_inactiveSelectionBackgroundColor);
+    else if (!strcmp(&quot;webkit/focus_ring&quot;, colorClass)) {
+        if (!fillColorsFromEdjeClass(edje(), colorClass, &amp;m_focusRingColor))
+            return;
+
+        // platformFocusRingColor() is only used for the default theme (without page)
+        // The following is ugly, but no other way to do it unless we change it to use page themes as much as possible.
+        RenderTheme::setCustomFocusRingColor(m_focusRingColor);
+    }
+}
+
+void RenderThemeEfl::setThemePath(const String&amp; newThemePath)
+{
+    if (newThemePath == m_themePath)
+        return;
+
+    if (newThemePath.isEmpty()) {
+        EINA_LOG_CRIT(&quot;No valid theme defined, things will not work properly.&quot;);
+        return;
+    }
+
+    String oldThemePath = m_themePath;
+    m_themePath = newThemePath;
+
+    // Keep the consistence by restoring the previous theme path
+    // if we cannot load the new one.
+    if (!loadTheme())
+        m_themePath = oldThemePath;
+}
+
+String RenderThemeEfl::themePath() const
+{
+#ifndef NDEBUG
+    if (edje()) {
+        const char* path;
+        edje_object_file_get(edje(), &amp;path, 0);
+        ASSERT(m_themePath == path);
+    }
+#endif
+    return m_themePath;
+}
+
+bool RenderThemeEfl::loadTheme()
+{
+    ASSERT(!m_themePath.isEmpty());
+
+    if (!canvas()) {
+        m_canvas = EflUniquePtr&lt;Ecore_Evas&gt;(ecore_evas_buffer_new(1, 1));
+        _ASSERT_ON_RELEASE_RETURN_VAL(canvas(), false,
+        &quot;Could not create canvas required by theme, things will not work properly.&quot;);
+    }
+
+    EflUniquePtr&lt;Evas_Object&gt; o = EflUniquePtr&lt;Evas_Object&gt;(edje_object_add(ecore_evas_get(canvas())));
+    _ASSERT_ON_RELEASE_RETURN_VAL(o, false, &quot;Could not create new base Edje object.&quot;);
+
+    if (!setSourceGroupForEdjeObject(o.get(), m_themePath, &quot;webkit/base&quot;))
+        return false; // Keep current theme.
+
+    // Invalidate existing theme part cache.
+    if (edje())
+        clearThemePartCache();
+
+    // Set new loaded theme, and apply it.
+    m_edje = WTF::move(o);
+
+    const char* thickness = edje_object_data_get(m_edje.get(), &quot;scrollbar.thickness&quot;);
+    if (thickness &amp;&amp; !Settings::mockScrollbarsEnabled())
+        static_cast&lt;ScrollbarThemeEfl*&gt;(ScrollbarTheme::theme())-&gt;setScrollbarThickness(atoi(thickness));
+
+    edje_object_signal_callback_add(edje(), &quot;color_class,set&quot;, &quot;webkit/selection/foreground&quot;, applyColorCallback, this);
+    edje_object_signal_callback_add(edje(), &quot;color_class,set&quot;, &quot;webkit/selection/background&quot;, applyColorCallback, this);
+    edje_object_signal_callback_add(edje(), &quot;color_class,set&quot;, &quot;webkit/focus_ring&quot;, applyColorCallback, this);
+
+    applyPartDescriptionsFrom(m_themePath);
+
+    setColorFromThemeClass(&quot;webkit/selection/foreground&quot;);
+    setColorFromThemeClass(&quot;webkit/selection/background&quot;);
+    setColorFromThemeClass(&quot;webkit/focus_ring&quot;);
+
+    platformColorsDidChange(); // Schedules a relayout, do last.
+
+    return true;
+}
+
+void RenderThemeEfl::applyPartDescriptionFallback(ThemePartDesc* desc)
+{
+    desc-&gt;min.setWidth(Length(0, Fixed));
+    desc-&gt;min.setHeight(Length(0, Fixed));
+
+    desc-&gt;max.setWidth(Length(0, Fixed));
+    desc-&gt;max.setHeight(Length(0, Fixed));
+
+    desc-&gt;padding = LengthBox(0, 0, 0, 0);
+}
+
+void RenderThemeEfl::applyPartDescription(Evas_Object* object, ThemePartDesc* desc)
+{
+    Evas_Coord minw, minh, maxw, maxh;
+
+    edje_object_size_min_get(object, &amp;minw, &amp;minh);
+    if (!minw &amp;&amp; !minh)
+        edje_object_size_min_calc(object, &amp;minw, &amp;minh);
+
+    desc-&gt;min.setWidth(Length(minw, Fixed));
+    desc-&gt;min.setHeight(Length(minh, Fixed));
+
+    edje_object_size_max_get(object, &amp;maxw, &amp;maxh);
+    desc-&gt;max.setWidth(Length(maxw, Fixed));
+    desc-&gt;max.setHeight(Length(maxh, Fixed));
+
+    if (!edje_object_part_exists(object, &quot;text_confinement&quot;))
+        desc-&gt;padding = LengthBox(0, 0, 0, 0);
+    else {
+        Evas_Coord px, py, pw, ph;
+        Evas_Coord ox = 0, oy = 0, ow = 0, oh = 0;
+        int top, right, bottom, left;
+
+        if (minw &gt; 0)
+            ow = minw;
+        else
+            ow = 100;
+        if (minh &gt; 0)
+            oh = minh;
+        else
+            oh = 100;
+        if (maxw &gt; 0 &amp;&amp; ow &gt; maxw)
+            ow = maxw;
+        if (maxh &gt; 0 &amp;&amp; oh &gt; maxh)
+            oh = maxh;
+
+        evas_object_move(object, ox, oy);
+        evas_object_resize(object, ow, oh);
+        edje_object_calc_force(object);
+        edje_object_message_signal_process(object);
+        edje_object_part_geometry_get(object, &quot;text_confinement&quot;, &amp;px, &amp;py, &amp;pw, &amp;ph);
+
+        top = py - oy;
+        bottom = (oh + oy) - (ph + py);
+
+        left = px - ox;
+        right = (ow + ox) - (pw + px);
+
+        desc-&gt;padding = LengthBox(top, right, bottom, left);
+    }
+}
+
+void RenderThemeEfl::applyPartDescriptionsFrom(const String&amp; themePath)
+{
+    EflUniquePtr&lt;Evas_Object&gt; temp = EflUniquePtr&lt;Evas_Object&gt;(edje_object_add(ecore_evas_get(canvas())));
+    _ASSERT_ON_RELEASE_RETURN(temp, &quot;Could not create Edje object.&quot;);
+
+    for (size_t i = 0; i &lt; FormTypeLast; i++) {
+        FormType type = static_cast&lt;FormType&gt;(i);
+        m_partDescs[i].type = type;
+        if (!setSourceGroupForEdjeObject(temp.get(), themePath, toEdjeGroup(type)))
+            applyPartDescriptionFallback(m_partDescs + i);
+        else
+            applyPartDescription(temp.get(), m_partDescs + i);
+    }
+}
+
+RenderThemeEfl::RenderThemeEfl(Page* page)
+    : RenderTheme()
+    , m_page(page)
+    , m_activeSelectionBackgroundColor(0, 0, 255)
+    , m_activeSelectionForegroundColor(Color::white)
+    , m_inactiveSelectionBackgroundColor(0, 0, 128)
+    , m_inactiveSelectionForegroundColor(200, 200, 200)
+    , m_focusRingColor(32, 32, 224, 224)
+    , m_sliderThumbColor(Color::darkGray)
+    , m_supportsSelectionForegroundColor(false)
+{
+}
+
+RenderThemeEfl::~RenderThemeEfl()
+{
+    clearThemePartCache();
+}
+
+static bool supportsFocus(ControlPart appearance)
+{
+    switch (appearance) {
+    case PushButtonPart:
+    case ButtonPart:
+    case TextFieldPart:
+    case TextAreaPart:
+    case SearchFieldPart:
+    case MenulistPart:
+    case RadioPart:
+    case CheckboxPart:
+    case SliderVerticalPart:
+    case SliderHorizontalPart:
+        return true;
+    default:
+        return false;
+    }
+}
+
+bool RenderThemeEfl::supportsFocusRing(const RenderStyle&amp; style) const
+{
+    return supportsFocus(style.appearance());
+}
+
+bool RenderThemeEfl::controlSupportsTints(const RenderObject&amp; object) const
+{
+    return isEnabled(object);
+}
+
+int RenderThemeEfl::baselinePosition(const RenderBox&amp; box) const
+{
+    if (box.style().appearance() == CheckboxPart || box.style().appearance() == RadioPart)
+        return box.marginTop() + box.height() - 3;
+    return RenderTheme::baselinePosition(box);
+}
+
+Color RenderThemeEfl::platformActiveSelectionBackgroundColor() const
+{
+    loadThemeIfNeeded();
+    return m_activeSelectionBackgroundColor;
+}
+
+Color RenderThemeEfl::platformInactiveSelectionBackgroundColor() const
+{
+    loadThemeIfNeeded();
+    return m_inactiveSelectionBackgroundColor;
+}
+
+Color RenderThemeEfl::platformActiveSelectionForegroundColor() const
+{
+    loadThemeIfNeeded();
+    return m_activeSelectionForegroundColor;
+}
+
+Color RenderThemeEfl::platformInactiveSelectionForegroundColor() const
+{
+    loadThemeIfNeeded();
+    return m_inactiveSelectionForegroundColor;
+}
+
+Color RenderThemeEfl::platformFocusRingColor() const
+{
+    loadThemeIfNeeded();
+    return m_focusRingColor;
+}
+
+bool RenderThemeEfl::supportsSelectionForegroundColors() const
+{
+    loadThemeIfNeeded();
+    return m_supportsSelectionForegroundColor;
+}
+
+bool RenderThemeEfl::paintSliderTrack(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    if (object.style().appearance() == SliderHorizontalPart)
+        paintThemePart(object, SliderHorizontal, info, rect);
+    else
+        paintThemePart(object, SliderVertical, info, rect);
+
+#if ENABLE(DATALIST_ELEMENT)
+    paintSliderTicks(object, info, rect);
+#endif
+
+    return false;
+}
+
+void RenderThemeEfl::adjustSliderTrackStyle(StyleResolver&amp;, RenderStyle&amp; style, Element*) const
+{
+    style.setBoxShadow(nullptr);
+}
+
+void RenderThemeEfl::adjustSliderThumbStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
+    style.setBoxShadow(nullptr);
+}
+
+void RenderThemeEfl::adjustSliderThumbSize(RenderStyle&amp; style, Element*) const
+{
+    ControlPart part = style.appearance();
+    if (part == SliderThumbVerticalPart) {
+        style.setWidth(Length(sliderThumbHeight, Fixed));
+        style.setHeight(Length(sliderThumbWidth, Fixed));
+    } else if (part == SliderThumbHorizontalPart) {
+        style.setWidth(Length(sliderThumbWidth, Fixed));
+        style.setHeight(Length(sliderThumbHeight, Fixed));
+    }
+}
+
+#if ENABLE(DATALIST_ELEMENT)
+IntSize RenderThemeEfl::sliderTickSize() const
+{
+    return IntSize(1, 6);
+}
+
+int RenderThemeEfl::sliderTickOffsetFromTrackCenter() const
+{
+    static const int sliderTickOffset = -12;
+
+    return sliderTickOffset;
+}
+
+LayoutUnit RenderThemeEfl::sliderTickSnappingThreshold() const
+{
+    // The same threshold value as the Chromium port.
+    return 5;
+}
+#endif
+
+bool RenderThemeEfl::supportsDataListUI(const AtomicString&amp; type) const
+{
+#if ENABLE(DATALIST_ELEMENT)
+    // FIXME: We need to support other types.
+    return type == InputTypeNames::email()
+        || type == InputTypeNames::range()
+        || type == InputTypeNames::search()
+        || type == InputTypeNames::url();
+#else
+    UNUSED_PARAM(type);
+    return false;
+#endif
+}
+
+bool RenderThemeEfl::paintSliderThumb(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    if (object.style().appearance() == SliderThumbHorizontalPart)
+        paintThemePart(object, SliderThumbHorizontal, info, rect);
+    else
+        paintThemePart(object, SliderThumbVertical, info, rect);
+
+    return false;
+}
+
+void RenderThemeEfl::adjustCheckboxStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustCheckboxStyle(styleResolver, style, element);
+        return;
+    }
+
+    adjustSizeConstraints(style, CheckBox);
+
+    style.resetBorder();
+
+    const ThemePartDesc* desc = m_partDescs + (size_t)CheckBox;
+    if (style.width().value() &lt; desc-&gt;min.width().value())
+        style.setWidth(desc-&gt;min.width());
+    if (style.height().value() &lt; desc-&gt;min.height().value())
+        style.setHeight(desc-&gt;min.height());
+}
+
+bool RenderThemeEfl::paintCheckbox(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, CheckBox, info, rect);
+}
+
+void RenderThemeEfl::adjustRadioStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustRadioStyle(styleResolver, style, element);
+        return;
+    }
+
+    adjustSizeConstraints(style, RadioButton);
+
+    style.resetBorder();
+
+    const ThemePartDesc* desc = m_partDescs + (size_t)RadioButton;
+    if (style.width().value() &lt; desc-&gt;min.width().value())
+        style.setWidth(desc-&gt;min.width());
+    if (style.height().value() &lt; desc-&gt;min.height().value())
+        style.setHeight(desc-&gt;min.height());
+}
+
+bool RenderThemeEfl::paintRadio(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, RadioButton, info, rect);
+}
+
+void RenderThemeEfl::adjustButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustButtonStyle(styleResolver, style, element);
+        return;
+    }
+
+    // adjustSizeConstrains can make SquareButtonPart's size wrong (by adjusting paddings), so call it only for PushButtonPart and ButtonPart
+    if (style.appearance() == PushButtonPart || style.appearance() == ButtonPart)
+        adjustSizeConstraints(style, Button);
+}
+
+bool RenderThemeEfl::paintButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, Button, info, rect);
+}
+
+void RenderThemeEfl::adjustMenuListStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustMenuListStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, ComboBox);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
+
+    style.setLineHeight(RenderStyle::initialLineHeight());
+}
+
+bool RenderThemeEfl::paintMenuList(const RenderObject&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
+{
+    return paintThemePart(object, ComboBox, info, IntRect(rect));
+}
+
+void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    // Height is locked to auto if height is not specified.
+    style.setHeight(Length(Auto));
+
+    // The &lt;select&gt; box must be at least 12px high for the button to render the text inside the box without clipping.
+    const int dropDownBoxMinHeight = 12;
+
+    // Calculate min-height of the &lt;select&gt; element.
+    int minHeight = style.fontMetrics().height();
+    minHeight = std::max(minHeight, dropDownBoxMinHeight);
+    style.setMinHeight(Length(minHeight, Fixed));
+
+    adjustMenuListStyle(styleResolver, style, element);
+}
+
+bool RenderThemeEfl::paintMenuListButtonDecorations(const RenderBox&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
+{
+    return paintMenuList(object, info, rect);
+}
+
+void RenderThemeEfl::adjustTextFieldStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustTextFieldStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, TextField);
+    style.resetBorder();
+}
+
+bool RenderThemeEfl::paintTextField(const RenderObject&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
+{
+    return paintThemePart(object, TextField, info, IntRect(rect));
+}
+
+void RenderThemeEfl::adjustTextAreaStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const
+{
+}
+
+bool RenderThemeEfl::paintTextArea(const RenderObject&amp; object, const PaintInfo&amp; info, const FloatRect&amp; rect)
+{
+    return paintTextField(object, info, rect);
+}
+
+void RenderThemeEfl::adjustSearchFieldResultsButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldResultsButtonStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, SearchFieldResultsButton);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
+
+    float fontScale = style.fontSize() / defaultFontSize;
+    int decorationSize = lroundf(std::min(std::max(minSearchDecorationButtonSize, defaultFontSize * fontScale), maxSearchDecorationButtonSize));
+
+    style.setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
+    style.setHeight(Length(decorationSize, Fixed));
+}
+
+bool RenderThemeEfl::paintSearchFieldResultsButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, SearchFieldResultsButton, info, rect);
+}
+
+void RenderThemeEfl::adjustSearchFieldResultsDecorationPartStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldResultsDecorationPartStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, SearchFieldResultsDecoration);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
+
+    float fontScale = style.fontSize() / defaultFontSize;
+    int decorationSize = lroundf(std::min(std::max(minSearchDecorationButtonSize, defaultFontSize * fontScale), maxSearchDecorationButtonSize));
+
+    style.setWidth(Length(decorationSize + searchFieldDecorationButtonOffset, Fixed));
+    style.setHeight(Length(decorationSize, Fixed));
+}
+
+bool RenderThemeEfl::paintSearchFieldResultsDecorationPart(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, SearchFieldResultsDecoration, info, rect);
+}
+
+void RenderThemeEfl::adjustSearchFieldCancelButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldCancelButtonStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, SearchFieldCancelButton);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
+
+    // Logic taken from RenderThemeChromium.cpp.
+    // Scale the button size based on the font size.
+    float fontScale = style.fontSize() / defaultFontSize;
+    int cancelButtonSize = lroundf(std::min(std::max(minCancelButtonSize, defaultFontSize * fontScale), maxCancelButtonSize));
+
+    style.setWidth(Length(cancelButtonSize, Fixed));
+    style.setHeight(Length(cancelButtonSize, Fixed));
+}
+
+bool RenderThemeEfl::paintSearchFieldCancelButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, SearchFieldCancelButton, info, rect);
+}
+
+void RenderThemeEfl::adjustSearchFieldStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustSearchFieldStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, SearchField);
+    style.resetBorder();
+    style.setWhiteSpace(PRE);
+}
+
+bool RenderThemeEfl::paintSearchField(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, SearchField, info, rect);
+}
+
+void RenderThemeEfl::adjustInnerSpinButtonStyle(StyleResolver&amp; styleResolver, RenderStyle&amp; style, Element* element) const
+{
+    if (!m_page &amp;&amp; element &amp;&amp; element-&gt;document().page()) {
+        static_cast&lt;RenderThemeEfl&amp;&gt;(element-&gt;document().page()-&gt;theme()).adjustInnerSpinButtonStyle(styleResolver, style, element);
+        return;
+    }
+    adjustSizeConstraints(style, Spinner);
+}
+
+bool RenderThemeEfl::paintInnerSpinButton(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    return paintThemePart(object, Spinner, info, rect);
+}
+
+void RenderThemeEfl::setDefaultFontSize(int size)
+{
+    defaultFontSize = size;
+}
+
+void RenderThemeEfl::updateCachedSystemFontDescription(CSSValueID, FontDescription&amp; fontDescription) const
+{
+    // It was called by RenderEmbeddedObject::paintReplaced to render alternative string.
+    // To avoid cairo_error while rendering, fontDescription should be passed.
+    fontDescription.setOneFamily(&quot;Sans&quot;);
+    fontDescription.setSpecifiedSize(defaultFontSize);
+    fontDescription.setIsAbsoluteSize(true);
+    fontDescription.setWeight(FontWeightNormal);
+    fontDescription.setItalic(FontItalicOff);
+}
+
+void RenderThemeEfl::adjustProgressBarStyle(StyleResolver&amp;, RenderStyle&amp; style, Element*) const
+{
+    style.setBoxShadow(nullptr);
+}
+
+double RenderThemeEfl::animationRepeatIntervalForProgressBar(RenderProgress&amp;) const
+{
+    return progressAnimationInterval;
+}
+
+double RenderThemeEfl::animationDurationForProgressBar(RenderProgress&amp;) const
+{
+    return progressAnimationInterval * progressAnimationFrames * 2; // &quot;2&quot; for back and forth;
+}
+
+bool RenderThemeEfl::paintProgressBar(const RenderObject&amp; object, const PaintInfo&amp; info, const IntRect&amp; rect)
+{
+    if (!object.isProgress())
+        return true;
+
+    return paintThemePart(object, ProgressBar, info, rect);
+}
+
+#if ENABLE(VIDEO)
+String RenderThemeEfl::mediaControlsStyleSheet()
+{
+    return ASCIILiteral(mediaControlsBaseUserAgentStyleSheet);
+}
+
+String RenderThemeEfl::mediaControlsScript()
+{
+    StringBuilder scriptBuilder;
+    scriptBuilder.append(mediaControlsLocalizedStringsJavaScript, sizeof(mediaControlsLocalizedStringsJavaScript));
+    scriptBuilder.append(mediaControlsBaseJavaScript, sizeof(mediaControlsBaseJavaScript));
+    return scriptBuilder.toString();
+}
+#endif
+
+#undef _ASSERT_ON_RELEASE_RETURN
+#undef _ASSERT_ON_RELEASE_RETURN_VAL
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeEflhfromrev189019trunkSourceWebCoreplatformeflRenderThemeEflh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/rendering/RenderThemeEfl.h (from rev 189019, trunk/Source/WebCore/platform/efl/RenderThemeEfl.h) (0 => 189020)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeEfl.h                                (rev 0)
+++ trunk/Source/WebCore/rendering/RenderThemeEfl.h        2015-08-27 09:59:37 UTC (rev 189020)
</span><span class="lines">@@ -0,0 +1,260 @@
</span><ins>+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2006 Apple Inc.
+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
+ * Copyright (C) 2007 Holger Hans Peter Freyther
+ * Copyright (C) 2007 Alp Toker &lt;alp@atoker.com&gt;
+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ * All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef RenderThemeEfl_h
+#define RenderThemeEfl_h
+
+#include &quot;RenderTheme.h&quot;
+
+#include &lt;Eina.h&gt;
+#include &lt;cairo.h&gt;
+#include &lt;wtf/efl/UniquePtrEfl.h&gt;
+
+namespace WebCore {
+
+enum FormType { // KEEP IN SYNC WITH edjeGroupFromFormType()
+    Button,
+    RadioButton,
+    TextField,
+    CheckBox,
+    ComboBox,
+    ProgressBar,
+    ScrollbarHorizontalThumb,
+    ScrollbarHorizontalTrackBackground,
+    ScrollbarVerticalThumb,
+    ScrollbarVerticalTrackBackground,
+    SearchField,
+    SearchFieldResultsButton,
+    SearchFieldResultsDecoration,
+    SearchFieldCancelButton,
+    SliderVertical,
+    SliderHorizontal,
+    SliderThumbVertical,
+    SliderThumbHorizontal,
+    Spinner,
+    FormTypeLast
+};
+
+class RenderThemeEfl final : public RenderTheme {
+private:
+    explicit RenderThemeEfl(Page*);
+    virtual ~RenderThemeEfl();
+
+public:
+    static PassRefPtr&lt;RenderTheme&gt; create(Page*);
+
+    // A method asking if the theme's controls actually care about redrawing when hovered.
+    virtual bool supportsHover(const RenderStyle&amp;) const override { return true; }
+
+    // A method Returning whether the control is styled by css or not e.g specifying background-color.
+    virtual bool isControlStyled(const RenderStyle&amp;, const BorderData&amp;, const FillLayer&amp;, const Color&amp; backgroundColor) const override;
+
+    // A method asking if the theme is able to draw the focus ring.
+    virtual bool supportsFocusRing(const RenderStyle&amp;) const override;
+
+    // A method asking if the control changes its tint when the window has focus or not.
+    virtual bool controlSupportsTints(const RenderObject&amp;) const override;
+
+    // A general method asking if any control tinting is supported at all.
+    virtual bool supportsControlTints() const override { return true; }
+
+    // A general method asking if foreground colors of selection are supported.
+    virtual bool supportsSelectionForegroundColors() const override;
+
+    // A method to obtain the baseline position for a &quot;leaf&quot; control. This will only be used if a baseline
+    // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
+    // controls that need to do this.
+    virtual int baselinePosition(const RenderBox&amp;) const override;
+
+    virtual Color platformActiveSelectionBackgroundColor() const override;
+    virtual Color platformInactiveSelectionBackgroundColor() const override;
+    virtual Color platformActiveSelectionForegroundColor() const override;
+    virtual Color platformInactiveSelectionForegroundColor() const override;
+    virtual Color platformFocusRingColor() const override;
+
+    // Set platform colors; remember to call platformColorDidChange after.
+    void setColorFromThemeClass(const char* colorClass);
+
+    void setButtonTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+    void setComboTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+    void setEntryTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+    void setSearchTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+
+    void adjustSizeConstraints(RenderStyle&amp;, FormType) const;
+
+    virtual void adjustCheckboxStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintCheckbox(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustRadioStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintRadio(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustTextFieldStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintTextField(const RenderObject&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
+
+    virtual void adjustTextAreaStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintTextArea(const RenderObject&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
+
+    virtual void adjustMenuListStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintMenuList(const RenderObject&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
+
+    virtual void adjustMenuListButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintMenuListButtonDecorations(const RenderBox&amp;, const PaintInfo&amp;, const FloatRect&amp;) override;
+
+    virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustSearchFieldStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintSearchField(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustSearchFieldResultsButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintSearchFieldResultsButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustSearchFieldCancelButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintSearchFieldCancelButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustSliderTrackStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintSliderTrack(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustSliderThumbStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+
+    virtual void adjustSliderThumbSize(RenderStyle&amp;, Element*) const override;
+
+#if ENABLE(DATALIST_ELEMENT)
+    virtual IntSize sliderTickSize() const override;
+    virtual int sliderTickOffsetFromTrackCenter() const override;
+    virtual LayoutUnit sliderTickSnappingThreshold() const override;
+#endif
+
+    virtual bool supportsDataListUI(const AtomicString&amp;) const override;
+
+    virtual bool paintSliderThumb(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    virtual void adjustInnerSpinButtonStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintInnerSpinButton(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+
+    static void setDefaultFontSize(int fontsize);
+
+    virtual void adjustProgressBarStyle(StyleResolver&amp;, RenderStyle&amp;, Element*) const override;
+    virtual bool paintProgressBar(const RenderObject&amp;, const PaintInfo&amp;, const IntRect&amp;) override;
+    virtual double animationRepeatIntervalForProgressBar(RenderProgress&amp;) const override;
+    virtual double animationDurationForProgressBar(RenderProgress&amp;) const override;
+
+#if ENABLE(VIDEO)
+    virtual String mediaControlsStyleSheet() override;
+    virtual String mediaControlsScript() override;
+#endif
+#if ENABLE(VIDEO_TRACK)
+    virtual bool supportsClosedCaptioning() const override { return true; }
+#endif
+
+    void setThemePath(const String&amp;);
+    String themePath() const;
+
+    bool paintThemePart(const GraphicsContext&amp;, FormType, const IntRect&amp;);
+
+protected:
+    static float defaultFontSize;
+
+private:
+    bool loadTheme();
+    ALWAYS_INLINE bool loadThemeIfNeeded() const
+    {
+        return m_edje || (!m_themePath.isEmpty() &amp;&amp; const_cast&lt;RenderThemeEfl*&gt;(this)-&gt;loadTheme());
+    }
+
+    // System fonts.
+    virtual void updateCachedSystemFontDescription(CSSValueID, FontDescription&amp;) const override;
+
+    ALWAYS_INLINE Ecore_Evas* canvas() const { return m_canvas.get(); }
+    ALWAYS_INLINE Evas_Object* edje() const { return m_edje.get(); }
+
+    void applyPartDescriptionsFrom(const String&amp; themePath);
+
+    void applyEdjeStateFromForm(Evas_Object*, const ControlStates*, bool);
+    void applyEdjeRTLState(Evas_Object*, const RenderObject&amp;, FormType, const IntRect&amp;);
+    bool paintThemePart(const RenderObject&amp;, FormType, const PaintInfo&amp;, const IntRect&amp;);
+
+    Page* m_page;
+    Color m_activeSelectionBackgroundColor;
+    Color m_activeSelectionForegroundColor;
+    Color m_inactiveSelectionBackgroundColor;
+    Color m_inactiveSelectionForegroundColor;
+    Color m_focusRingColor;
+    Color m_sliderThumbColor;
+
+    String m_themePath;
+    // Order so that the canvas gets destroyed at last.
+    EflUniquePtr&lt;Ecore_Evas&gt; m_canvas;
+    EflUniquePtr&lt;Evas_Object&gt; m_edje;
+
+    bool m_supportsSelectionForegroundColor;
+
+    struct ThemePartDesc {
+        FormType type;
+        LengthSize min;
+        LengthSize max;
+        LengthBox padding;
+    };
+    void applyPartDescriptionFallback(struct ThemePartDesc*);
+    void applyPartDescription(Evas_Object*, struct ThemePartDesc*);
+
+    struct ThemePartCacheEntry {
+        static std::unique_ptr&lt;RenderThemeEfl::ThemePartCacheEntry&gt; create(const String&amp; themePath, FormType, const IntSize&amp;);
+        void reuse(const String&amp; themePath, FormType, const IntSize&amp;);
+
+        ALWAYS_INLINE Ecore_Evas* canvas() { return m_canvas.get(); }
+        ALWAYS_INLINE Evas_Object* edje() { return m_edje.get(); }
+        ALWAYS_INLINE cairo_surface_t* surface() { return m_surface.get(); }
+
+        FormType type;
+        IntSize size;
+
+    private:
+        // Order so that the canvas gets destroyed at last.
+        EflUniquePtr&lt;Ecore_Evas&gt; m_canvas;
+        EflUniquePtr&lt;Evas_Object&gt; m_edje;
+        RefPtr&lt;cairo_surface_t&gt; m_surface;
+    };
+
+    struct ThemePartDesc m_partDescs[FormTypeLast];
+
+    // List of ThemePartCacheEntry* sorted so that the most recently
+    // used entries come first. We use a list for efficient moving
+    // of items within the container.
+    Vector&lt;std::unique_ptr&lt;ThemePartCacheEntry&gt;&gt; m_partCache;
+
+    ThemePartCacheEntry* getThemePartFromCache(FormType, const IntSize&amp;);
+    void clearThemePartCache();
+};
+}
+
+#endif // RenderThemeEfl_h
</ins></span></pre>
</div>
</div>

</body>
</html>