<!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>[186829] 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/186829">186829</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-07-14 21:16:27 -0700 (Tue, 14 Jul 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[EFL] Scrollbar is not drawn on MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=143566
Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-07-14
Reviewed by Gyuyoung Kim.
Implement the ScrollbarThemeEfl to draw the scrollbar on EFL port.
* PlatformEfl.cmake: Removed the ScrollbarEfl.cpp.
* platform/Scrollbar.cpp: Removed the !PLATFORM(EFL) guard to use the createNativeScrollbar().
* platform/efl/DefaultTheme/CMakeLists.txt: Replaced the image files with new ones.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc:
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png: Added.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png: Added.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png: Removed.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png: Removed.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png: Removed.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png: Added.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png: Added.
* platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png: Removed.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::toEdjeGroup):
(WebCore::RenderThemeEfl::paintThemePart): Added the new function to draw the scrollbar
using the RenderThemeEfl.
* platform/efl/RenderThemeEfl.h:
* platform/efl/ScrollbarEfl.cpp: Removed.
* platform/efl/ScrollbarEfl.h: Removed.
* platform/efl/ScrollbarThemeEfl.cpp: Implemented the default functions to draw the
scrollbar.
(WebCore::scrollbarMap):
(WebCore::ScrollbarThemeEfl::~ScrollbarThemeEfl):
(WebCore::ScrollbarThemeEfl::scrollbarThickness):
(WebCore::ScrollbarThemeEfl::hasThumb):
(WebCore::ScrollbarThemeEfl::backButtonRect):
(WebCore::ScrollbarThemeEfl::forwardButtonRect):
(WebCore::ScrollbarThemeEfl::trackRect):
(WebCore::ScrollbarThemeEfl::minimumThumbLength):
(WebCore::ScrollbarThemeEfl::paintTrackBackground):
(WebCore::ScrollbarThemeEfl::paintThumb):
(WebCore::ScrollbarThemeEfl::registerScrollbar):
(WebCore::ScrollbarThemeEfl::unregisterScrollbar):
(WebCore::ScrollbarThemeEfl::loadThemeIfNeeded):
* platform/efl/ScrollbarThemeEfl.h:
(WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):</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>
<li><a href="#trunkSourceWebCoreplatformScrollbarcpp">trunk/Source/WebCore/platform/Scrollbar.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemeCMakeListstxt">trunk/Source/WebCore/platform/efl/DefaultTheme/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbaredc">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc</a></li>
<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>
<li><a href="#trunkSourceWebCoreplatformeflScrollbarThemeEflcpp">trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflScrollbarThemeEflh">trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_bg_horizontalpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_bg_verticalpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_thumb_horizontalpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_thumb_verticalpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_hpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_knob_hpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_knob_vpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_vpng">trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png</a></li>
<li><a href="#trunkSourceWebCoreplatformeflScrollbarEflcpp">trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflScrollbarEflh">trunk/Source/WebCore/platform/efl/ScrollbarEfl.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/ChangeLog        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2015-07-14 Hunseop Jeong <hs85.jeong@samsung.com>
+
+ [EFL] Scrollbar is not drawn on MiniBrowser.
+ https://bugs.webkit.org/show_bug.cgi?id=143566
+
+ Reviewed by Gyuyoung Kim.
+
+ Implement the ScrollbarThemeEfl to draw the scrollbar on EFL port.
+
+ * PlatformEfl.cmake: Removed the ScrollbarEfl.cpp.
+
+ * platform/Scrollbar.cpp: Removed the !PLATFORM(EFL) guard to use the createNativeScrollbar().
+
+ * platform/efl/DefaultTheme/CMakeLists.txt: Replaced the image files with new ones.
+
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc:
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png: Added.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png: Added.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png: Removed.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png: Removed.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png: Removed.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png: Added.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png: Added.
+ * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png: Removed.
+ * platform/efl/RenderThemeEfl.cpp:
+ (WebCore::toEdjeGroup):
+ (WebCore::RenderThemeEfl::paintThemePart): Added the new function to draw the scrollbar
+ using the RenderThemeEfl.
+
+ * platform/efl/RenderThemeEfl.h:
+ * platform/efl/ScrollbarEfl.cpp: Removed.
+ * platform/efl/ScrollbarEfl.h: Removed.
+ * platform/efl/ScrollbarThemeEfl.cpp: Implemented the default functions to draw the
+ scrollbar.
+ (WebCore::scrollbarMap):
+ (WebCore::ScrollbarThemeEfl::~ScrollbarThemeEfl):
+ (WebCore::ScrollbarThemeEfl::scrollbarThickness):
+ (WebCore::ScrollbarThemeEfl::hasThumb):
+ (WebCore::ScrollbarThemeEfl::backButtonRect):
+ (WebCore::ScrollbarThemeEfl::forwardButtonRect):
+ (WebCore::ScrollbarThemeEfl::trackRect):
+ (WebCore::ScrollbarThemeEfl::minimumThumbLength):
+ (WebCore::ScrollbarThemeEfl::paintTrackBackground):
+ (WebCore::ScrollbarThemeEfl::paintThumb):
+ (WebCore::ScrollbarThemeEfl::registerScrollbar):
+ (WebCore::ScrollbarThemeEfl::unregisterScrollbar):
+ (WebCore::ScrollbarThemeEfl::loadThemeIfNeeded):
+ * platform/efl/ScrollbarThemeEfl.h:
+ (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
+
</ins><span class="cx"> 2015-07-14 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> Don't persist history item tree for subframes across reloads.
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformEfl.cmake (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformEfl.cmake        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/PlatformEfl.cmake        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -97,7 +97,6 @@
</span><span class="cx"> platform/efl/PlatformScreenEfl.cpp
</span><span class="cx"> platform/efl/PlatformWheelEventEfl.cpp
</span><span class="cx"> platform/efl/RenderThemeEfl.cpp
</span><del>- platform/efl/ScrollbarEfl.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></pre></div>
<a id="trunkSourceWebCoreplatformScrollbarcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Scrollbar.cpp (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Scrollbar.cpp        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/Scrollbar.cpp        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -43,12 +43,10 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-#if !PLATFORM(EFL)
</del><span class="cx"> PassRefPtr<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(new Scrollbar(scrollableArea, orientation, size));
</span><span class="cx"> }
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> int Scrollbar::maxOverlapBetweenPages()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemeCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/DefaultTheme/CMakeLists.txt (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/DefaultTheme/CMakeLists.txt        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/DefaultTheme/CMakeLists.txt        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -52,10 +52,10 @@
</span><span class="cx"> widget/radio/img_radio_on.png
</span><span class="cx"> widget/radio/radio.edc
</span><span class="cx"> widget/scrollbar/scrollbar.edc
</span><del>- widget/scrollbar/scrollbar_h.png
- widget/scrollbar/scrollbar_knob_h.png
- widget/scrollbar/scrollbar_knob_v.png
- widget/scrollbar/scrollbar_v.png
</del><ins>+ widget/scrollbar/scrollbar_bg_horizontal.png
+ widget/scrollbar/scrollbar_bg_vertical.png
+ widget/scrollbar/scrollbar_thumb_horizontal.png
+ widget/scrollbar/scrollbar_thumb_vertical.png
</ins><span class="cx"> widget/search/cancel/cancel_normal_button2.png
</span><span class="cx"> widget/search/cancel/cancel_normal_button.png
</span><span class="cx"> widget/search/cancel/search_cancel.edc
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbaredc"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
</span><ins>+ Copyright (C) 2015 Samsung Electronics. All rights reserved.
</ins><span class="cx">
</span><span class="cx"> This file is free software; you can redistribute it and/or
</span><span class="cx"> modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -17,245 +18,112 @@
</span><span class="cx"> Boston, MA 02110-1301, USA.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-group {
- name: "scrollbar.vertical";
</del><ins>+ group {
+ name: "webkit/widget/scrollbar/vertical_thumb";
+ min: 0 0; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow using edje's rel1/rel2
+ */
</ins><span class="cx">
</span><del>- min: 0 0; /* if > 0, this is the minimum size that will be allocated.
- * If wants to draw on top, just overflow usign edje's rel1/rel2
- */
</del><ins>+ images {
+ image: "widget/scrollbar/scrollbar_thumb_vertical.png" COMP;
+ }
</ins><span class="cx">
</span><del>- images {
- image: "widget/scrollbar/scrollbar_v.png" COMP;
- image: "widget/scrollbar/scrollbar_knob_v.png" COMP;
- }
-
- script {
- public hide_timer;
-
- public hide_timer_cb(val) {
- run_program(PROGRAM:"hide");
- return 0;
- }
-
- public hide_timer_stop() {
- new id = get_int(hide_timer);
- if (id <= 0)
- return;
-
- cancel_timer(id);
- set_int(hide_timer, 0);
- }
-
- public hide_timer_start() {
- set_int(hide_timer, timer(1.0, "hide_timer_cb", 0));
- }
-
- public message(Msg_Type:type, id, ...) {
- if ((id == 0) && (type == MSG_FLOAT_SET)) {
- new Float:vy, Float:sy;
-
- vy = getfarg(2);
- sy = getfarg(3);
-
- if (vy >= 0.0) {
- set_drag_size(PART:"img.knob", 1.0, sy);
- set_drag(PART:"img.knob", 0.0, vy);
- run_program(PROGRAM:"show");
- } else
- run_program(PROGRAM:"hide");
-
- hide_timer_stop();
- hide_timer_start();
- }
- }
-
- public update_drag_pos() {
- new Float:x, Float:y;
- get_drag(PART:"img.knob", x, y);
- send_message(MSG_FLOAT, 1, y);
- }
- }
-
- parts {
</del><ins>+ parts {
</ins><span class="cx"> part {
</span><del>- name: "rect.base";
</del><ins>+ name: "vertical.rect.base";
</ins><span class="cx"> type: RECT;
</span><span class="cx"> description {
</span><del>- min: 10 0;
- max: 10 999999;
- align: 1.0 0.5;
</del><span class="cx"> state: "default" 0.0;
</span><ins>+ min: 8 0;
+ max: 8 999999;
+ align: 1.0 0.5;
</ins><span class="cx"> color: 255 255 255 0;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> part {
</span><del>- name: "rect.clipper";
- type: RECT;
</del><ins>+ name: "vertical.thumb";
+ type: IMAGE;
</ins><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><del>- color: 255 255 255 255;
- rel1.to: "rect.base";
- rel2.to: "rect.base";
</del><ins>+ min: 8 2;
+ max: 8 999999;
+ align: 0.5 0.5;
+ rel1 {to: "vertical.thumb.area"; relative: 0 0;}
+ rel2 {to: "vertical.thumb.area"; relative: 1 1;}
+ image {
+ normal: "widget/scrollbar/scrollbar_thumb_vertical.png";
+ middle: SOLID;
+ }
</ins><span class="cx"> }
</span><del>- description {
- state: "hidden" 0.0;
- color: 255 255 255 64;
- rel1.to: "rect.base";
- rel2.to: "rect.base";
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> part {
</span><del>- name: "img.scrollbar";
- type: IMAGE;
- mouse_events: 0;
- clip_to: "rect.clipper";
</del><ins>+ name: "vertical.thumb.area";
+ type: RECT;
</ins><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><del>- min: 1 30;
- max: 1 999999;
</del><ins>+ min: 8 2;
+ max: 8 999999;
</ins><span class="cx"> align: 0.5 0.5;
</span><del>- image {
- normal: "widget/scrollbar/scrollbar_v.png";
- border: 0 0 15 15;
- middle: SOLID;
- }
- rel1.to: "rect.base";
- rel2.to: "rect.base";
</del><ins>+ color: 255 0 0 0;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><ins>+ }
+ }
</ins><span class="cx">
</span><ins>+ group {
+ name: "webkit/widget/scrollbar/vertical_background";
+ min: 0 0; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow using edje's rel1/rel2
+ */
+
+ images {
+ image: "widget/scrollbar/scrollbar_bg_vertical.png" COMP;
+ }
+
+ parts {
</ins><span class="cx"> part {
</span><del>- name: "rect.knobarea";
</del><ins>+ name: "vertical.rect.base";
</ins><span class="cx"> type: RECT;
</span><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><ins>+ min: 10 0;
+ max: 10 999999;
+ align: 1.0 0.5;
</ins><span class="cx"> color: 255 255 255 0;
</span><del>- min: 5 5;
- max: 5 999999;
- align: 0.5 0.5;
- rel1.to: "rect.base";
- rel2.to: "rect.base";
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> part {
</span><del>- name: "img.knob";
</del><ins>+ name: "vertical.background";
</ins><span class="cx"> type: IMAGE;
</span><del>- mouse_events: 1;
- clip_to: "rect.clipper";
- dragable {
- x: 0 0 0;
- y: 1 1 0;
- confine: "rect.knobarea";
- }
</del><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><del>- min: 5 5;
- max: 5 999999;
</del><ins>+ min: 10 0;
+ max: 10 999999;
</ins><span class="cx"> align: 0.5 0.5;
</span><del>- image {
- normal: "widget/scrollbar/scrollbar_knob_v.png";
- border: 3 3 3 3;
- middle: SOLID;
- }
</del><ins>+ rel1 {to: "vertical.rect.base"; relative: 0 0;}
+ rel2 {to: "vertical.rect.base"; relative: 1 1;}
+ image.normal: "widget/scrollbar/scrollbar_bg_vertical.png";
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- }
- programs {
- program {
- name: "load";
- signal: "load";
- action: STATE_SET "hidden" 0.0;
- target: "rect.clipper";
- }
- program {
- name: "hide";
- action: STATE_SET "hidden" 0.0;
- transition: ACCELERATE 0.5;
- target: "rect.clipper";
- }
</del><ins>+ }
+ }
</ins><span class="cx">
</span><del>- program {
- name: "show";
- action: STATE_SET "default" 0.0;
- target: "rect.clipper";
- }
</del><ins>+ group {
+ name: "webkit/widget/scrollbar/horizontal_thumb";
+ min: 0 0; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow using edje's rel1/rel2
+ */
</ins><span class="cx">
</span><del>- program {
- name: "dragged";
- signal: "drag";
- source: "img.knob";
- script {
- update_drag_pos();
- }
- }
- }
-}
</del><ins>+ images {
+ image: "widget/scrollbar/scrollbar_thumb_horizontal.png" COMP;
+ }
</ins><span class="cx">
</span><del>-group {
- name: "scrollbar.horizontal";
-
- min: 0 0; /* if > 0, this is the minimum size that will be allocated.
- * If wants to draw on top, just overflow usign edje's rel1/rel2
- */
-
- images {
- image: "widget/scrollbar/scrollbar_h.png" COMP;
- image: "widget/scrollbar/scrollbar_knob_h.png" COMP;
- }
-
- script {
- public hide_timer;
-
- public hide_timer_cb(val) {
- run_program(PROGRAM:"hide");
- return 0;
- }
-
- public hide_timer_stop() {
- new id = get_int(hide_timer);
- if (id <= 0)
- return;
-
- cancel_timer(id);
- set_int(hide_timer, 0);
- }
-
- public hide_timer_start() {
- set_int(hide_timer, timer(1.0, "hide_timer_cb", 0));
- }
-
- public message(Msg_Type:type, id, ...) {
- if ((id == 0) && (type == MSG_FLOAT_SET)) {
- new Float:vx, Float:sx;
-
- vx = getfarg(2);
- sx = getfarg(3);
-
- if (vx >= 0.0) {
- set_drag_size(PART:"img.knob", sx, 1.0);
- set_drag(PART:"img.knob", vx, 0.0);
- run_program(PROGRAM:"show");
- } else
- run_program(PROGRAM:"hide");
-
- hide_timer_stop();
- hide_timer_start();
- }
- }
-
- public update_drag_pos() {
- new Float:x, Float:y;
- get_drag(PART:"img.knob", x, y);
- send_message(MSG_FLOAT, 1, x);
- }
- }
-
- parts {
</del><ins>+ parts {
</ins><span class="cx"> part {
</span><del>- name: "rect.base";
</del><ins>+ name: "horizontal.rect.base";
</ins><span class="cx"> type: RECT;
</span><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><span class="lines">@@ -267,106 +135,71 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> part {
</span><del>- name: "rect.clipper";
- type: RECT;
</del><ins>+ name: "horizontal.thumb";
+ type: IMAGE;
</ins><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><del>- color: 255 255 255 255;
- rel1.to: "rect.base";
- rel2.to: "rect.base";
</del><ins>+ min: 2 8;
+ max: 999999 8;
+ align: 0.5 0.5;
+ rel1 {to: "horizontal.rect.base"; relative: 0 0;}
+ rel2 {to: "horizontal.rect.base"; relative: 1 1;}
+ image {
+ normal: "widget/scrollbar/scrollbar_thumb_horizontal.png";
+ middle: SOLID;
+ }
</ins><span class="cx"> }
</span><del>- description {
- state: "hidden" 0.0;
- color: 255 255 255 64;
- rel1.to: "rect.base";
- rel2.to: "rect.base";
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> part {
</span><del>- name: "img.scrollbar";
- type: IMAGE;
- mouse_events: 0;
- clip_to: "rect.clipper";
</del><ins>+ name: "horizontal.thumb.area";
+ type: RECT;
</ins><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><del>- min: 30 1;
- max: 999999 1;
</del><ins>+ min: 2 8;
+ max: 999999 8;
</ins><span class="cx"> align: 0.5 0.5;
</span><del>- image {
- normal: "widget/scrollbar/scrollbar_h.png";
- border: 15 15 0 0;
- middle: SOLID;
- }
- rel1.to: "rect.base";
- rel2.to: "rect.base";
- }
</del><ins>+ color: 255 0 0 0;
+ }
</ins><span class="cx"> }
</span><ins>+ }
+ }
</ins><span class="cx">
</span><ins>+ group {
+ name: "webkit/widget/scrollbar/horizontal_background";
+ min: 0 0; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow using edje's rel1/rel2
+ */
</ins><span class="cx">
</span><ins>+ images {
+ image: "widget/scrollbar/scrollbar_bg_horizontal.png" COMP;
+ }
+
+ parts {
</ins><span class="cx"> part {
</span><del>- name: "rect.knobarea";
</del><ins>+ name: "horizontal.rect.base";
</ins><span class="cx"> type: RECT;
</span><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><ins>+ min: 0 10;
+ max: 999999 10;
+ align: 0.5 1.0;
</ins><span class="cx"> color: 255 255 255 0;
</span><del>- min: 5 5;
- max: 999999 5;
- align: 0.5 0.5;
- rel1.to: "rect.base";
- rel2.to: "rect.base";
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> part {
</span><del>- name: "img.knob";
</del><ins>+ name: "horizontal.background";
</ins><span class="cx"> type: IMAGE;
</span><del>- mouse_events: 1;
- clip_to: "rect.clipper";
- dragable {
- x: 1 1 0;
- y: 0 0 0;
- confine: "rect.knobarea";
- }
</del><span class="cx"> description {
</span><span class="cx"> state: "default" 0.0;
</span><del>- min: 5 5;
- max: 999999 5;
- image {
- normal: "widget/scrollbar/scrollbar_knob_h.png";
- border: 3 3 3 3;
- middle: SOLID;
- }
</del><ins>+ min: 0 10;
+ max: 99999 10;
+ align: 0.5 0.5;
+ rel1 {to: "horizontal.rect.base"; relative: 0 0;}
+ rel2 {to: "horizontal.rect.base"; relative: 1 1;}
+ image.normal: "widget/scrollbar/scrollbar_bg_horizontal.png";
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>- }
- programs {
- program {
- name: "load";
- signal: "load";
- action: STATE_SET "hidden" 0.0;
- target: "rect.clipper";
- }
- program {
- name: "hide";
- action: STATE_SET "hidden" 0.0;
- transition: ACCELERATE 0.5;
- target: "rect.clipper";
- }
-
- program {
- name: "show";
- action: STATE_SET "default" 0.0;
- target: "rect.clipper";
- }
-
- program {
- name: "dragged";
- signal: "drag";
- source: "img.knob";
- script {
- update_drag_pos();
- }
- }
- }
-}
</del><ins>+ }
+ }
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_bg_horizontalpng"></a>
<div class="binary"><h4>Added: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_bg_verticalpng"></a>
<div class="binary"><h4>Added: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_hpng"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-\x89PNG
-
--IHDR\xFC\xFA\xA7àsBIT|d\x88XIDAT(\xCF\xED\xC111@\xE9<oj\x8Ey\xA4g|zi\xBC˵\xD6\xE0\xB3\xF7VU\x89\xA4\xBA[$u\xCEII%UՃ\xEB\xBA\xFE\xAA\xBBL\xD2I\xC0I<\xC6pW\x95\x93\xB8\xBB=\xE74\x80\xEFG!-k\x9F\x88\xDD\xE6IEND\xAEB`\x82
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_knob_hpng"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-\x89PNG
-
--IHDRd\xB3JI\xABsBIT|d\x88hIDAT8\xCB\xEDձ-\x800Cѳ\x93\x9AE؇\x92(hQDO\x91(هmș\x86\x80\xE2\xDE_\xB2\x8CRJgf\x93\xA4\x81do\xE1u\xEE~8̬fw\x9FSJ\x80(\xF3\x91gkk-\xC0I\xFE\xC0HI{\xA4\xF8I{&\xB9I\xBA\xE2C\xBE\xFF\x92\xF5\x98C'^\xB3\xE1\xE2IEND\xAEB`\x82
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_knob_vpng"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-\x89PNG
-
--IHDRdN\xC7\xFAsBIT|d\x88lIDATH\xC7\xED֡\xC2@Dᙹ\xD34\x92~"\xA9\x81\xCDw- RCd\xFAI7\xDC\xB3\x8F\xD9'\xFF
-\xC7\xB7\x88x\x92\xBC\xDB>$\xBD:\x80Gkm÷\xCD\xF6[\xB6W\xA4l\xAF\x92\xB4d\x94\xB4?*,,,,,,\xFC3Fĕ!".\x91<3\x92<;\x80}\xCE\xD9\xD3\xEC5\x96'\xE4\xE3\xFA\xB0IEND\xAEB`\x82
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_thumb_horizontalpng"></a>
<div class="binary"><h4>Added: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_thumb_verticalpng"></a>
<div class="binary"><h4>Added: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkSourceWebCoreplatformeflDefaultThemewidgetscrollbarscrollbar_vpng"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,5 +0,0 @@
</span><del>-\x89PNG
-
--IHDR\xFC\xB6\xCENsBIT|d\x88\IDAT8\xCB\xEDDZ!ѯe\xA0\x92\xEB\xBF\xFAp\xA2
-\xF0 ]`\xB5\xE0\x8Cd\xE7\xAD\xD6ZI{\xEF        01\xB3ID\x94\xCE9%I\xA5̬:\x92tsss\xF3\xB7D\xC4I\x8E\x999\x99\xE9\xBF\xCDL\xA7\xB5VJ\xE1\x8C1I\x9F\x8C/`\xEF\xF5zIEND\xAEB`\x82
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflRenderThemeEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -93,6 +93,10 @@
</span><span class="cx"> "webkit/widget/checkbox",
</span><span class="cx"> "webkit/widget/combo",
</span><span class="cx"> "webkit/widget/progressbar",
</span><ins>+ "webkit/widget/scrollbar/horizontal_thumb",
+ "webkit/widget/scrollbar/horizontal_background",
+ "webkit/widget/scrollbar/vertical_thumb",
+ "webkit/widget/scrollbar/vertical_background",
</ins><span class="cx"> "webkit/widget/search/field",
</span><span class="cx"> "webkit/widget/search/results_button",
</span><span class="cx"> "webkit/widget/search/results_decoration",
</span><span class="lines">@@ -371,6 +375,29 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool RenderThemeEfl::paintThemePart(const GraphicsContext& context, FormType type, const IntRect& rect)
+{
+ loadThemeIfNeeded();
+ _ASSERT_ON_RELEASE_RETURN_VAL(edje(), false, "Could not paint native HTML part due to missing theme.");
+
+ ThemePartCacheEntry* entry = getThemePartFromCache(type, rect.size());
+ ASSERT(entry);
+
+ edje_object_calc_force(entry->edje());
+ edje_object_message_signal_process(entry->edje());
+ evas_render(ecore_evas_get(entry->canvas()));
+
+ cairo_t* cairo = context.platformContext()->cr();
+ ASSERT(cairo);
+
+ cairo_save(cairo);
+ cairo_set_source_surface(cairo, entry->surface(), rect.x(), rect.y());
+ cairo_paint_with_alpha(cairo, 1.0);
+ cairo_restore(cairo);
+
+ return false;
+}
+
</ins><span class="cx"> PassRefPtr<RenderTheme> RenderThemeEfl::create(Page* page)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(new RenderThemeEfl(page));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflRenderThemeEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -45,6 +45,10 @@
</span><span class="cx"> CheckBox,
</span><span class="cx"> ComboBox,
</span><span class="cx"> ProgressBar,
</span><ins>+ ScrollbarHorizontalThumb,
+ ScrollbarHorizontalTrackBackground,
+ ScrollbarVerticalThumb,
+ ScrollbarVerticalTrackBackground,
</ins><span class="cx"> SearchField,
</span><span class="cx"> SearchFieldResultsButton,
</span><span class="cx"> SearchFieldResultsDecoration,
</span><span class="lines">@@ -176,6 +180,8 @@
</span><span class="cx"> void setThemePath(const String&);
</span><span class="cx"> String themePath() const;
</span><span class="cx">
</span><ins>+ bool paintThemePart(const GraphicsContext&, FormType, const IntRect&);
+
</ins><span class="cx"> protected:
</span><span class="cx"> static float defaultFontSize;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflScrollbarEflcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,48 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007 Holger Hans Peter Freyther zecke@selfish.org
- * (C) 2009 Kenneth Rohde Christiansen
- * (C) 2009 INdT, Instituto Nokia de Technologia
- * (C) 2009-2010 ProFUSION embedded systems
- * (C) 2009-2010 Samsung Electronics
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "ScrollbarEfl.h"
-
-#include "IntRect.h"
-#include "Settings.h"
-
-namespace WebCore {
-
-PassRefPtr<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size)
-{
- if (Settings::mockScrollbarsEnabled())
- return adoptRef(new Scrollbar(scrollableArea, orientation, size));
-
- return adoptRef(new ScrollbarEfl(scrollableArea, orientation, size));
-}
-ScrollbarEfl::ScrollbarEfl(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize)
-
- : Scrollbar(scrollableArea, orientation, controlSize)
-{
-}
-
-ScrollbarEfl::~ScrollbarEfl()
-{
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformeflScrollbarEflh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/efl/ScrollbarEfl.h (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/ScrollbarEfl.h        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/ScrollbarEfl.h        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
- * Copyright (C) 2009-2010 ProFUSION embedded systems
- * Copyright (C) 2009-2010 Samsung Electronics
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScrollbarEfl_h
-#define ScrollbarEfl_h
-
-#include "Scrollbar.h"
-#include <wtf/PassRefPtr.h>
-
-namespace WebCore {
-
-class ScrollbarEfl final : public Scrollbar {
-public:
- friend class Scrollbar;
- virtual ~ScrollbarEfl();
-
-protected:
- ScrollbarEfl(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize);
-
-};
-
-}
-
-#endif // ScrollbarEfl_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformeflScrollbarThemeEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.cpp (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.cpp        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.cpp        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -29,6 +29,13 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "ScrollbarThemeEfl.h"
</span><span class="cx">
</span><ins>+#include "FrameView.h"
+#include "NotImplemented.h"
+#include "Page.h"
+#include "RenderThemeEfl.h"
+
+#include <wtf/NeverDestroyed.h>
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> ScrollbarTheme* ScrollbarTheme::nativeTheme()
</span><span class="lines">@@ -37,5 +44,93 @@
</span><span class="cx"> return &theme;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static const int defaultThickness = 10;
+static const int scrollbarThumbMin = 2;
+
+typedef HashSet<Scrollbar*> ScrollbarMap;
+static ScrollbarMap& scrollbarMap()
+{
+ static NeverDestroyed<ScrollbarMap> map;
+ return map;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ScrollbarThemeEfl::~ScrollbarThemeEfl()
+{
+}
+
+int ScrollbarThemeEfl::scrollbarThickness(ScrollbarControlSize)
+{
+ return defaultThickness;
+}
+
+bool ScrollbarThemeEfl::hasThumb(Scrollbar& scrollbar)
+{
+ return thumbLength(scrollbar) > 0;
+}
+
+IntRect ScrollbarThemeEfl::backButtonRect(Scrollbar&, ScrollbarPart, bool)
+{
+ notImplemented();
+ return IntRect();
+}
+
+IntRect ScrollbarThemeEfl::forwardButtonRect(Scrollbar&, ScrollbarPart, bool)
+{
+ notImplemented();
+ return IntRect();
+}
+
+IntRect ScrollbarThemeEfl::trackRect(Scrollbar& scrollbar, bool)
+{
+ return scrollbar.frameRect();
+}
+
+int ScrollbarThemeEfl::minimumThumbLength(Scrollbar&)
+{
+ return scrollbarThumbMin;
+}
+
+void ScrollbarThemeEfl::paintTrackBackground(GraphicsContext& context, Scrollbar& scrollbar, const IntRect& rect)
+{
+ loadThemeIfNeeded(scrollbar);
+ m_theme->paintThemePart(context, (scrollbar.orientation() == HorizontalScrollbar) ? ScrollbarHorizontalTrackBackground : ScrollbarVerticalTrackBackground, rect);
+}
+
+void ScrollbarThemeEfl::paintThumb(GraphicsContext& context, Scrollbar& scrollbar, const IntRect& thumbRect)
+{
+ loadThemeIfNeeded(scrollbar);
+ m_theme->paintThemePart(context, (scrollbar.orientation() == HorizontalScrollbar) ? ScrollbarHorizontalThumb : ScrollbarVerticalThumb, thumbRect);
+}
+
+void ScrollbarThemeEfl::registerScrollbar(Scrollbar& scrollbar)
+{
+ scrollbar.setEnabled(true);
+ scrollbarMap().add(&scrollbar);
+}
+
+void ScrollbarThemeEfl::unregisterScrollbar(Scrollbar& scrollbar)
+{
+ scrollbarMap().remove(&scrollbar);
+}
+
+void ScrollbarThemeEfl::loadThemeIfNeeded(Scrollbar& scrollbar)
+{
+ if (m_theme)
+ return;
+
+ ScrollView* view = scrollbar.parent();
+ if (!view)
+ return;
+
+ if (!is<FrameView>(view))
+ return;
+
+ Page* page = downcast<FrameView>(view)->frame().page();
+ if (!page)
+ return;
+
+ m_theme = static_cast<RenderThemeEfl*>(&page->theme());
+}
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformeflScrollbarThemeEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.h (186828 => 186829)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.h        2015-07-15 02:12:16 UTC (rev 186828)
+++ trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.h        2015-07-15 04:16:27 UTC (rev 186829)
</span><span class="lines">@@ -29,19 +29,40 @@
</span><span class="cx"> #ifndef ScrollbarThemeEfl_h
</span><span class="cx"> #define ScrollbarThemeEfl_h
</span><span class="cx">
</span><del>-#include "ScrollbarTheme.h"
</del><ins>+#include "ScrollbarThemeComposite.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class ScrollbarThemeEfl final : public ScrollbarTheme {
</del><ins>+class RenderThemeEfl;
+
+class ScrollbarThemeEfl final : public ScrollbarThemeComposite {
</ins><span class="cx"> public:
</span><del>- ScrollbarThemeEfl() : m_scrollbarThickness(0) { }
</del><ins>+ ~ScrollbarThemeEfl();
+
+ virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override;
</ins><span class="cx"> void setScrollbarThickness(int thickness) { m_scrollbarThickness = thickness; }
</span><del>- virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override { return m_scrollbarThickness; }
</del><span class="cx">
</span><del>- virtual void registerScrollbar(Scrollbar&) override { }
- virtual void unregisterScrollbar(Scrollbar&) override { }
</del><ins>+protected:
+ virtual bool usesOverlayScrollbars() const override { return true; }
+ virtual bool hasButtons(Scrollbar&) override { return false; }
+ virtual bool hasThumb(Scrollbar&) override;
+
+ virtual IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool) override;
+ virtual IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool) override;
+ virtual IntRect trackRect(Scrollbar&, bool) override;
+
+ virtual int minimumThumbLength(Scrollbar&) override;
+
+ virtual void paintTrackBackground(GraphicsContext&, Scrollbar&, const IntRect&) override;
+ virtual void paintThumb(GraphicsContext&, Scrollbar&, const IntRect&) override;
+
+ virtual void registerScrollbar(Scrollbar&) override;
+ virtual void unregisterScrollbar(Scrollbar&) override;
+
</ins><span class="cx"> private:
</span><ins>+ void loadThemeIfNeeded(Scrollbar&);
+
+ RefPtr<RenderThemeEfl> m_theme;
</ins><span class="cx"> int m_scrollbarThickness;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>