Skip to content
Permalink
Browse files
[EFL] Implement scrollbarThickness for opaque scrollbar
https://bugs.webkit.org/show_bug.cgi?id=125034

Reviewed by Gyuyoung Kim.

Implemented scrollbarThickness to support opaque scrollbar.
Now, edj can decide whether to support opaque scrollbar by adding scrollbar.thickness.
In addition, added OVERRIDE/FINAL keyword and removed unnecessary destructor
in ScrollbarThemeEfl.cpp.

No new tests, no behavior changes with default theme.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::loadTheme):
Update thickness of scrollbar when theme was loaded.
* platform/efl/ScrollbarThemeEfl.cpp:
* platform/efl/ScrollbarThemeEfl.h:
(WebCore::ScrollbarThemeEfl::setScrollbarThickness):
(WebCore::ScrollbarThemeEfl::scrollbarThickness):
(WebCore::ScrollbarThemeEfl::registerScrollbar):
(WebCore::ScrollbarThemeEfl::unregisterScrollbar):


Canonical link: https://commits.webkit.org/143148@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Ryuan Choi committed Dec 1, 2013
1 parent 649609b commit 705832fa14a2cf2c7d42729d1dfbe3aedfa4711b
Showing 4 changed files with 39 additions and 25 deletions.
@@ -1,3 +1,27 @@
2013-11-30 Ryuan Choi <ryuan.choi@samsung.com>

[EFL] Implement scrollbarThickness for opaque scrollbar
https://bugs.webkit.org/show_bug.cgi?id=125034

Reviewed by Gyuyoung Kim.

Implemented scrollbarThickness to support opaque scrollbar.
Now, edj can decide whether to support opaque scrollbar by adding scrollbar.thickness.
In addition, added OVERRIDE/FINAL keyword and removed unnecessary destructor
in ScrollbarThemeEfl.cpp.

No new tests, no behavior changes with default theme.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::loadTheme):
Update thickness of scrollbar when theme was loaded.
* platform/efl/ScrollbarThemeEfl.cpp:
* platform/efl/ScrollbarThemeEfl.h:
(WebCore::ScrollbarThemeEfl::setScrollbarThickness):
(WebCore::ScrollbarThemeEfl::scrollbarThickness):
(WebCore::ScrollbarThemeEfl::registerScrollbar):
(WebCore::ScrollbarThemeEfl::unregisterScrollbar):

2013-11-29 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>

Remove Symbian specific code.
@@ -42,8 +42,9 @@
#include "RenderObject.h"
#include "RenderProgress.h"
#include "RenderSlider.h"
#include "ScrollbarThemeEfl.h"
#include "Settings.h"
#include "UserAgentStyleSheets.h"

#include <Ecore_Evas.h>
#include <Edje.h>
#include <new>
@@ -512,6 +513,10 @@ bool RenderThemeEfl::loadTheme()
// Set new loaded theme, and apply it.
m_edje = o;

const char* thickness = edje_object_data_get(m_edje.get(), "scrollbar.thickness");
if (thickness && !Settings::mockScrollbarsEnabled())
static_cast<ScrollbarThemeEfl*>(ScrollbarTheme::theme())->setScrollbarThickness(atoi(thickness));

edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/foreground", applyColorCallback, this);
edje_object_signal_callback_add(edje(), "color_class,set", "webkit/selection/background", applyColorCallback, this);
edje_object_signal_callback_add(edje(), "color_class,set", "webkit/focus_ring", applyColorCallback, this);
@@ -37,22 +37,5 @@ ScrollbarTheme* ScrollbarTheme::nativeTheme()
return &theme;
}

ScrollbarThemeEfl::~ScrollbarThemeEfl()
{
}

int ScrollbarThemeEfl::scrollbarThickness(ScrollbarControlSize)
{
return 0; // we paint on top
}

void ScrollbarThemeEfl::registerScrollbar(ScrollbarThemeClient*)
{
}

void ScrollbarThemeEfl::unregisterScrollbar(ScrollbarThemeClient*)
{
}

}

@@ -33,14 +33,16 @@

namespace WebCore {

class ScrollbarThemeEfl : public ScrollbarTheme {
class ScrollbarThemeEfl FINAL : public ScrollbarTheme {
public:
virtual ~ScrollbarThemeEfl();

virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);

virtual void registerScrollbar(ScrollbarThemeClient*);
virtual void unregisterScrollbar(ScrollbarThemeClient*);
ScrollbarThemeEfl() : m_scrollbarThickness(0) { }
void setScrollbarThickness(int thickness) { m_scrollbarThickness = thickness; }
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) OVERRIDE { return m_scrollbarThickness; }

virtual void registerScrollbar(ScrollbarThemeClient*) OVERRIDE { }
virtual void unregisterScrollbar(ScrollbarThemeClient*) OVERRIDE { }
private:
int m_scrollbarThickness;
};

}

0 comments on commit 705832f

Please sign in to comment.