Changeset 186829 in webkit
- Timestamp:
- Jul 14, 2015 9:16:27 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 added
- 6 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r186828 r186829 1 2015-07-14 Hunseop Jeong <hs85.jeong@samsung.com> 2 3 [EFL] Scrollbar is not drawn on MiniBrowser. 4 https://bugs.webkit.org/show_bug.cgi?id=143566 5 6 Reviewed by Gyuyoung Kim. 7 8 Implement the ScrollbarThemeEfl to draw the scrollbar on EFL port. 9 10 * PlatformEfl.cmake: Removed the ScrollbarEfl.cpp. 11 12 * platform/Scrollbar.cpp: Removed the !PLATFORM(EFL) guard to use the createNativeScrollbar(). 13 14 * platform/efl/DefaultTheme/CMakeLists.txt: Replaced the image files with new ones. 15 16 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc: 17 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png: Added. 18 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png: Added. 19 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png: Removed. 20 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png: Removed. 21 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png: Removed. 22 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png: Added. 23 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png: Added. 24 * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png: Removed. 25 * platform/efl/RenderThemeEfl.cpp: 26 (WebCore::toEdjeGroup): 27 (WebCore::RenderThemeEfl::paintThemePart): Added the new function to draw the scrollbar 28 using the RenderThemeEfl. 29 30 * platform/efl/RenderThemeEfl.h: 31 * platform/efl/ScrollbarEfl.cpp: Removed. 32 * platform/efl/ScrollbarEfl.h: Removed. 33 * platform/efl/ScrollbarThemeEfl.cpp: Implemented the default functions to draw the 34 scrollbar. 35 (WebCore::scrollbarMap): 36 (WebCore::ScrollbarThemeEfl::~ScrollbarThemeEfl): 37 (WebCore::ScrollbarThemeEfl::scrollbarThickness): 38 (WebCore::ScrollbarThemeEfl::hasThumb): 39 (WebCore::ScrollbarThemeEfl::backButtonRect): 40 (WebCore::ScrollbarThemeEfl::forwardButtonRect): 41 (WebCore::ScrollbarThemeEfl::trackRect): 42 (WebCore::ScrollbarThemeEfl::minimumThumbLength): 43 (WebCore::ScrollbarThemeEfl::paintTrackBackground): 44 (WebCore::ScrollbarThemeEfl::paintThumb): 45 (WebCore::ScrollbarThemeEfl::registerScrollbar): 46 (WebCore::ScrollbarThemeEfl::unregisterScrollbar): 47 (WebCore::ScrollbarThemeEfl::loadThemeIfNeeded): 48 * platform/efl/ScrollbarThemeEfl.h: 49 (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars): 50 1 51 2015-07-14 Andreas Kling <akling@apple.com> 2 52 -
trunk/Source/WebCore/PlatformEfl.cmake
r186255 r186829 98 98 platform/efl/PlatformWheelEventEfl.cpp 99 99 platform/efl/RenderThemeEfl.cpp 100 platform/efl/ScrollbarEfl.cpp101 100 platform/efl/ScrollbarThemeEfl.cpp 102 101 platform/efl/SharedTimerEfl.cpp -
trunk/Source/WebCore/platform/Scrollbar.cpp
r186007 r186829 44 44 namespace WebCore { 45 45 46 #if !PLATFORM(EFL)47 46 PassRefPtr<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size) 48 47 { 49 48 return adoptRef(new Scrollbar(scrollableArea, orientation, size)); 50 49 } 51 #endif52 50 53 51 int Scrollbar::maxOverlapBetweenPages() -
trunk/Source/WebCore/platform/efl/DefaultTheme/CMakeLists.txt
r173354 r186829 53 53 widget/radio/radio.edc 54 54 widget/scrollbar/scrollbar.edc 55 widget/scrollbar/scrollbar_ h.png56 widget/scrollbar/scrollbar_ knob_h.png57 widget/scrollbar/scrollbar_ knob_v.png58 widget/scrollbar/scrollbar_ v.png55 widget/scrollbar/scrollbar_bg_horizontal.png 56 widget/scrollbar/scrollbar_bg_vertical.png 57 widget/scrollbar/scrollbar_thumb_horizontal.png 58 widget/scrollbar/scrollbar_thumb_vertical.png 59 59 widget/search/cancel/cancel_normal_button2.png 60 60 widget/search/cancel/cancel_normal_button.png -
trunk/Source/WebCore/platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc
r139858 r186829 1 1 /* 2 2 Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia 3 Copyright (C) 2015 Samsung Electronics. All rights reserved. 3 4 4 5 This file is free software; you can redistribute it and/or … … 18 19 */ 19 20 20 group { 21 name: "scrollbar.vertical"; 22 23 min: 0 0; /* if > 0, this is the minimum size that will be allocated. 24 * If wants to draw on top, just overflow usign edje's rel1/rel2 25 */ 26 27 images { 28 image: "widget/scrollbar/scrollbar_v.png" COMP; 29 image: "widget/scrollbar/scrollbar_knob_v.png" COMP; 30 } 31 32 script { 33 public hide_timer; 34 35 public hide_timer_cb(val) { 36 run_program(PROGRAM:"hide"); 37 return 0; 38 } 39 40 public hide_timer_stop() { 41 new id = get_int(hide_timer); 42 if (id <= 0) 43 return; 44 45 cancel_timer(id); 46 set_int(hide_timer, 0); 47 } 48 49 public hide_timer_start() { 50 set_int(hide_timer, timer(1.0, "hide_timer_cb", 0)); 51 } 52 53 public message(Msg_Type:type, id, ...) { 54 if ((id == 0) && (type == MSG_FLOAT_SET)) { 55 new Float:vy, Float:sy; 56 57 vy = getfarg(2); 58 sy = getfarg(3); 59 60 if (vy >= 0.0) { 61 set_drag_size(PART:"img.knob", 1.0, sy); 62 set_drag(PART:"img.knob", 0.0, vy); 63 run_program(PROGRAM:"show"); 64 } else 65 run_program(PROGRAM:"hide"); 66 67 hide_timer_stop(); 68 hide_timer_start(); 69 } 70 } 71 72 public update_drag_pos() { 73 new Float:x, Float:y; 74 get_drag(PART:"img.knob", x, y); 75 send_message(MSG_FLOAT, 1, y); 76 } 77 } 78 79 parts { 80 part { 81 name: "rect.base"; 82 type: RECT; 83 description { 21 group { 22 name: "webkit/widget/scrollbar/vertical_thumb"; 23 min: 0 0; /* if > 0, this is the minimum size that will be allocated. 24 * If wants to draw on top, just overflow using edje's rel1/rel2 25 */ 26 27 images { 28 image: "widget/scrollbar/scrollbar_thumb_vertical.png" COMP; 29 } 30 31 parts { 32 part { 33 name: "vertical.rect.base"; 34 type: RECT; 35 description { 36 state: "default" 0.0; 37 min: 8 0; 38 max: 8 999999; 39 align: 1.0 0.5; 40 color: 255 255 255 0; 41 } 42 } 43 44 part { 45 name: "vertical.thumb"; 46 type: IMAGE; 47 description { 48 state: "default" 0.0; 49 min: 8 2; 50 max: 8 999999; 51 align: 0.5 0.5; 52 rel1 {to: "vertical.thumb.area"; relative: 0 0;} 53 rel2 {to: "vertical.thumb.area"; relative: 1 1;} 54 image { 55 normal: "widget/scrollbar/scrollbar_thumb_vertical.png"; 56 middle: SOLID; 57 } 58 } 59 } 60 61 part { 62 name: "vertical.thumb.area"; 63 type: RECT; 64 description { 65 state: "default" 0.0; 66 min: 8 2; 67 max: 8 999999; 68 align: 0.5 0.5; 69 color: 255 0 0 0; 70 } 71 } 72 } 73 } 74 75 group { 76 name: "webkit/widget/scrollbar/vertical_background"; 77 min: 0 0; /* if > 0, this is the minimum size that will be allocated. 78 * If wants to draw on top, just overflow using edje's rel1/rel2 79 */ 80 81 images { 82 image: "widget/scrollbar/scrollbar_bg_vertical.png" COMP; 83 } 84 85 parts { 86 part { 87 name: "vertical.rect.base"; 88 type: RECT; 89 description { 90 state: "default" 0.0; 84 91 min: 10 0; 85 92 max: 10 999999; 86 93 align: 1.0 0.5; 87 state: "default" 0.0; 88 color: 255 255 255 0; 89 } 90 } 91 92 part { 93 name: "rect.clipper"; 94 type: RECT; 95 description { 96 state: "default" 0.0; 97 color: 255 255 255 255; 98 rel1.to: "rect.base"; 99 rel2.to: "rect.base"; 100 } 101 description { 102 state: "hidden" 0.0; 103 color: 255 255 255 64; 104 rel1.to: "rect.base"; 105 rel2.to: "rect.base"; 106 } 107 } 108 109 part { 110 name: "img.scrollbar"; 111 type: IMAGE; 112 mouse_events: 0; 113 clip_to: "rect.clipper"; 114 description { 115 state: "default" 0.0; 116 min: 1 30; 117 max: 1 999999; 118 align: 0.5 0.5; 119 image { 120 normal: "widget/scrollbar/scrollbar_v.png"; 121 border: 0 0 15 15; 122 middle: SOLID; 123 } 124 rel1.to: "rect.base"; 125 rel2.to: "rect.base"; 126 } 127 } 128 129 part { 130 name: "rect.knobarea"; 131 type: RECT; 132 description { 133 state: "default" 0.0; 134 color: 255 255 255 0; 135 min: 5 5; 136 max: 5 999999; 137 align: 0.5 0.5; 138 rel1.to: "rect.base"; 139 rel2.to: "rect.base"; 140 } 141 } 142 143 part { 144 name: "img.knob"; 145 type: IMAGE; 146 mouse_events: 1; 147 clip_to: "rect.clipper"; 148 dragable { 149 x: 0 0 0; 150 y: 1 1 0; 151 confine: "rect.knobarea"; 152 } 153 description { 154 state: "default" 0.0; 155 min: 5 5; 156 max: 5 999999; 157 align: 0.5 0.5; 158 image { 159 normal: "widget/scrollbar/scrollbar_knob_v.png"; 160 border: 3 3 3 3; 161 middle: SOLID; 162 } 163 } 164 } 165 } 166 programs { 167 program { 168 name: "load"; 169 signal: "load"; 170 action: STATE_SET "hidden" 0.0; 171 target: "rect.clipper"; 172 } 173 program { 174 name: "hide"; 175 action: STATE_SET "hidden" 0.0; 176 transition: ACCELERATE 0.5; 177 target: "rect.clipper"; 178 } 179 180 program { 181 name: "show"; 182 action: STATE_SET "default" 0.0; 183 target: "rect.clipper"; 184 } 185 186 program { 187 name: "dragged"; 188 signal: "drag"; 189 source: "img.knob"; 190 script { 191 update_drag_pos(); 192 } 193 } 194 } 195 } 196 197 group { 198 name: "scrollbar.horizontal"; 199 200 min: 0 0; /* if > 0, this is the minimum size that will be allocated. 201 * If wants to draw on top, just overflow usign edje's rel1/rel2 202 */ 203 204 images { 205 image: "widget/scrollbar/scrollbar_h.png" COMP; 206 image: "widget/scrollbar/scrollbar_knob_h.png" COMP; 207 } 208 209 script { 210 public hide_timer; 211 212 public hide_timer_cb(val) { 213 run_program(PROGRAM:"hide"); 214 return 0; 215 } 216 217 public hide_timer_stop() { 218 new id = get_int(hide_timer); 219 if (id <= 0) 220 return; 221 222 cancel_timer(id); 223 set_int(hide_timer, 0); 224 } 225 226 public hide_timer_start() { 227 set_int(hide_timer, timer(1.0, "hide_timer_cb", 0)); 228 } 229 230 public message(Msg_Type:type, id, ...) { 231 if ((id == 0) && (type == MSG_FLOAT_SET)) { 232 new Float:vx, Float:sx; 233 234 vx = getfarg(2); 235 sx = getfarg(3); 236 237 if (vx >= 0.0) { 238 set_drag_size(PART:"img.knob", sx, 1.0); 239 set_drag(PART:"img.knob", vx, 0.0); 240 run_program(PROGRAM:"show"); 241 } else 242 run_program(PROGRAM:"hide"); 243 244 hide_timer_stop(); 245 hide_timer_start(); 246 } 247 } 248 249 public update_drag_pos() { 250 new Float:x, Float:y; 251 get_drag(PART:"img.knob", x, y); 252 send_message(MSG_FLOAT, 1, x); 253 } 254 } 255 256 parts { 257 part { 258 name: "rect.base"; 94 color: 255 255 255 0; 95 } 96 } 97 98 part { 99 name: "vertical.background"; 100 type: IMAGE; 101 description { 102 state: "default" 0.0; 103 min: 10 0; 104 max: 10 999999; 105 align: 0.5 0.5; 106 rel1 {to: "vertical.rect.base"; relative: 0 0;} 107 rel2 {to: "vertical.rect.base"; relative: 1 1;} 108 image.normal: "widget/scrollbar/scrollbar_bg_vertical.png"; 109 } 110 } 111 } 112 } 113 114 group { 115 name: "webkit/widget/scrollbar/horizontal_thumb"; 116 min: 0 0; /* if > 0, this is the minimum size that will be allocated. 117 * If wants to draw on top, just overflow using edje's rel1/rel2 118 */ 119 120 images { 121 image: "widget/scrollbar/scrollbar_thumb_horizontal.png" COMP; 122 } 123 124 parts { 125 part { 126 name: "horizontal.rect.base"; 259 127 type: RECT; 260 128 description { … … 268 136 269 137 part { 270 name: "rect.clipper"; 271 type: RECT; 272 description { 273 state: "default" 0.0; 274 color: 255 255 255 255; 275 rel1.to: "rect.base"; 276 rel2.to: "rect.base"; 277 } 278 description { 279 state: "hidden" 0.0; 280 color: 255 255 255 64; 281 rel1.to: "rect.base"; 282 rel2.to: "rect.base"; 283 } 284 } 285 286 part { 287 name: "img.scrollbar"; 288 type: IMAGE; 289 mouse_events: 0; 290 clip_to: "rect.clipper"; 291 description { 292 state: "default" 0.0; 293 min: 30 1; 294 max: 999999 1; 295 align: 0.5 0.5; 138 name: "horizontal.thumb"; 139 type: IMAGE; 140 description { 141 state: "default" 0.0; 142 min: 2 8; 143 max: 999999 8; 144 align: 0.5 0.5; 145 rel1 {to: "horizontal.rect.base"; relative: 0 0;} 146 rel2 {to: "horizontal.rect.base"; relative: 1 1;} 296 147 image { 297 normal: "widget/scrollbar/scrollbar_h.png"; 298 border: 15 15 0 0; 148 normal: "widget/scrollbar/scrollbar_thumb_horizontal.png"; 299 149 middle: SOLID; 300 150 } 301 rel1.to: "rect.base"; 302 rel2.to: "rect.base"; 303 } 304 } 305 306 307 part { 308 name: "rect.knobarea"; 309 type: RECT; 310 description { 311 state: "default" 0.0; 312 color: 255 255 255 0; 313 min: 5 5; 314 max: 999999 5; 315 align: 0.5 0.5; 316 rel1.to: "rect.base"; 317 rel2.to: "rect.base"; 318 } 319 } 320 321 part { 322 name: "img.knob"; 323 type: IMAGE; 324 mouse_events: 1; 325 clip_to: "rect.clipper"; 326 dragable { 327 x: 1 1 0; 328 y: 0 0 0; 329 confine: "rect.knobarea"; 330 } 331 description { 332 state: "default" 0.0; 333 min: 5 5; 334 max: 999999 5; 335 image { 336 normal: "widget/scrollbar/scrollbar_knob_h.png"; 337 border: 3 3 3 3; 338 middle: SOLID; 339 } 340 } 341 } 342 } 343 programs { 344 program { 345 name: "load"; 346 signal: "load"; 347 action: STATE_SET "hidden" 0.0; 348 target: "rect.clipper"; 349 } 350 program { 351 name: "hide"; 352 action: STATE_SET "hidden" 0.0; 353 transition: ACCELERATE 0.5; 354 target: "rect.clipper"; 355 } 356 357 program { 358 name: "show"; 359 action: STATE_SET "default" 0.0; 360 target: "rect.clipper"; 361 } 362 363 program { 364 name: "dragged"; 365 signal: "drag"; 366 source: "img.knob"; 367 script { 368 update_drag_pos(); 369 } 370 } 371 } 372 } 151 } 152 } 153 154 part { 155 name: "horizontal.thumb.area"; 156 type: RECT; 157 description { 158 state: "default" 0.0; 159 min: 2 8; 160 max: 999999 8; 161 align: 0.5 0.5; 162 color: 255 0 0 0; 163 } 164 } 165 } 166 } 167 168 group { 169 name: "webkit/widget/scrollbar/horizontal_background"; 170 min: 0 0; /* if > 0, this is the minimum size that will be allocated. 171 * If wants to draw on top, just overflow using edje's rel1/rel2 172 */ 173 174 images { 175 image: "widget/scrollbar/scrollbar_bg_horizontal.png" COMP; 176 } 177 178 parts { 179 part { 180 name: "horizontal.rect.base"; 181 type: RECT; 182 description { 183 state: "default" 0.0; 184 min: 0 10; 185 max: 999999 10; 186 align: 0.5 1.0; 187 color: 255 255 255 0; 188 } 189 } 190 191 part { 192 name: "horizontal.background"; 193 type: IMAGE; 194 description { 195 state: "default" 0.0; 196 min: 0 10; 197 max: 99999 10; 198 align: 0.5 0.5; 199 rel1 {to: "horizontal.rect.base"; relative: 0 0;} 200 rel2 {to: "horizontal.rect.base"; relative: 1 1;} 201 image.normal: "widget/scrollbar/scrollbar_bg_horizontal.png"; 202 } 203 } 204 } 205 } -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp
r185745 r186829 94 94 "webkit/widget/combo", 95 95 "webkit/widget/progressbar", 96 "webkit/widget/scrollbar/horizontal_thumb", 97 "webkit/widget/scrollbar/horizontal_background", 98 "webkit/widget/scrollbar/vertical_thumb", 99 "webkit/widget/scrollbar/vertical_background", 96 100 "webkit/widget/search/field", 97 101 "webkit/widget/search/results_button", … … 372 376 } 373 377 378 bool RenderThemeEfl::paintThemePart(const GraphicsContext& context, FormType type, const IntRect& rect) 379 { 380 loadThemeIfNeeded(); 381 _ASSERT_ON_RELEASE_RETURN_VAL(edje(), false, "Could not paint native HTML part due to missing theme."); 382 383 ThemePartCacheEntry* entry = getThemePartFromCache(type, rect.size()); 384 ASSERT(entry); 385 386 edje_object_calc_force(entry->edje()); 387 edje_object_message_signal_process(entry->edje()); 388 evas_render(ecore_evas_get(entry->canvas())); 389 390 cairo_t* cairo = context.platformContext()->cr(); 391 ASSERT(cairo); 392 393 cairo_save(cairo); 394 cairo_set_source_surface(cairo, entry->surface(), rect.x(), rect.y()); 395 cairo_paint_with_alpha(cairo, 1.0); 396 cairo_restore(cairo); 397 398 return false; 399 } 400 374 401 PassRefPtr<RenderTheme> RenderThemeEfl::create(Page* page) 375 402 { -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.h
r179050 r186829 46 46 ComboBox, 47 47 ProgressBar, 48 ScrollbarHorizontalThumb, 49 ScrollbarHorizontalTrackBackground, 50 ScrollbarVerticalThumb, 51 ScrollbarVerticalTrackBackground, 48 52 SearchField, 49 53 SearchFieldResultsButton, … … 177 181 String themePath() const; 178 182 183 bool paintThemePart(const GraphicsContext&, FormType, const IntRect&); 184 179 185 protected: 180 186 static float defaultFontSize; -
trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.cpp
r159897 r186829 30 30 #include "ScrollbarThemeEfl.h" 31 31 32 #include "FrameView.h" 33 #include "NotImplemented.h" 34 #include "Page.h" 35 #include "RenderThemeEfl.h" 36 37 #include <wtf/NeverDestroyed.h> 38 32 39 namespace WebCore { 33 40 … … 38 45 } 39 46 47 static const int defaultThickness = 10; 48 static const int scrollbarThumbMin = 2; 49 50 typedef HashSet<Scrollbar*> ScrollbarMap; 51 static ScrollbarMap& scrollbarMap() 52 { 53 static NeverDestroyed<ScrollbarMap> map; 54 return map; 40 55 } 41 56 57 ScrollbarThemeEfl::~ScrollbarThemeEfl() 58 { 59 } 60 61 int ScrollbarThemeEfl::scrollbarThickness(ScrollbarControlSize) 62 { 63 return defaultThickness; 64 } 65 66 bool ScrollbarThemeEfl::hasThumb(Scrollbar& scrollbar) 67 { 68 return thumbLength(scrollbar) > 0; 69 } 70 71 IntRect ScrollbarThemeEfl::backButtonRect(Scrollbar&, ScrollbarPart, bool) 72 { 73 notImplemented(); 74 return IntRect(); 75 } 76 77 IntRect ScrollbarThemeEfl::forwardButtonRect(Scrollbar&, ScrollbarPart, bool) 78 { 79 notImplemented(); 80 return IntRect(); 81 } 82 83 IntRect ScrollbarThemeEfl::trackRect(Scrollbar& scrollbar, bool) 84 { 85 return scrollbar.frameRect(); 86 } 87 88 int ScrollbarThemeEfl::minimumThumbLength(Scrollbar&) 89 { 90 return scrollbarThumbMin; 91 } 92 93 void ScrollbarThemeEfl::paintTrackBackground(GraphicsContext& context, Scrollbar& scrollbar, const IntRect& rect) 94 { 95 loadThemeIfNeeded(scrollbar); 96 m_theme->paintThemePart(context, (scrollbar.orientation() == HorizontalScrollbar) ? ScrollbarHorizontalTrackBackground : ScrollbarVerticalTrackBackground, rect); 97 } 98 99 void ScrollbarThemeEfl::paintThumb(GraphicsContext& context, Scrollbar& scrollbar, const IntRect& thumbRect) 100 { 101 loadThemeIfNeeded(scrollbar); 102 m_theme->paintThemePart(context, (scrollbar.orientation() == HorizontalScrollbar) ? ScrollbarHorizontalThumb : ScrollbarVerticalThumb, thumbRect); 103 } 104 105 void ScrollbarThemeEfl::registerScrollbar(Scrollbar& scrollbar) 106 { 107 scrollbar.setEnabled(true); 108 scrollbarMap().add(&scrollbar); 109 } 110 111 void ScrollbarThemeEfl::unregisterScrollbar(Scrollbar& scrollbar) 112 { 113 scrollbarMap().remove(&scrollbar); 114 } 115 116 void ScrollbarThemeEfl::loadThemeIfNeeded(Scrollbar& scrollbar) 117 { 118 if (m_theme) 119 return; 120 121 ScrollView* view = scrollbar.parent(); 122 if (!view) 123 return; 124 125 if (!is<FrameView>(view)) 126 return; 127 128 Page* page = downcast<FrameView>(view)->frame().page(); 129 if (!page) 130 return; 131 132 m_theme = static_cast<RenderThemeEfl*>(&page->theme()); 133 } 134 135 } 136 -
trunk/Source/WebCore/platform/efl/ScrollbarThemeEfl.h
r185964 r186829 30 30 #define ScrollbarThemeEfl_h 31 31 32 #include "ScrollbarTheme .h"32 #include "ScrollbarThemeComposite.h" 33 33 34 34 namespace WebCore { 35 35 36 class ScrollbarThemeEfl final : public ScrollbarTheme { 36 class RenderThemeEfl; 37 38 class ScrollbarThemeEfl final : public ScrollbarThemeComposite { 37 39 public: 38 ScrollbarThemeEfl() : m_scrollbarThickness(0) { } 40 ~ScrollbarThemeEfl(); 41 42 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override; 39 43 void setScrollbarThickness(int thickness) { m_scrollbarThickness = thickness; } 40 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) override { return m_scrollbarThickness; }41 44 42 virtual void registerScrollbar(Scrollbar&) override { } 43 virtual void unregisterScrollbar(Scrollbar&) override { } 45 protected: 46 virtual bool usesOverlayScrollbars() const override { return true; } 47 virtual bool hasButtons(Scrollbar&) override { return false; } 48 virtual bool hasThumb(Scrollbar&) override; 49 50 virtual IntRect backButtonRect(Scrollbar&, ScrollbarPart, bool) override; 51 virtual IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool) override; 52 virtual IntRect trackRect(Scrollbar&, bool) override; 53 54 virtual int minimumThumbLength(Scrollbar&) override; 55 56 virtual void paintTrackBackground(GraphicsContext&, Scrollbar&, const IntRect&) override; 57 virtual void paintThumb(GraphicsContext&, Scrollbar&, const IntRect&) override; 58 59 virtual void registerScrollbar(Scrollbar&) override; 60 virtual void unregisterScrollbar(Scrollbar&) override; 61 44 62 private: 63 void loadThemeIfNeeded(Scrollbar&); 64 65 RefPtr<RenderThemeEfl> m_theme; 45 66 int m_scrollbarThickness; 46 67 };
Note: See TracChangeset
for help on using the changeset viewer.