Changeset 80324 in webkit
- Timestamp:
- Mar 3, 2011 9:50:44 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80320 r80324 1 2011-03-03 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Reviewed by Eric Seidel. 4 5 [EFL] Adjust functions of RenderThemeEfl.cpp to WebKit parameter style 6 https://bugs.webkit.org/show_bug.cgi?id=54392 7 8 Functions of RenderThemeEfl.cpp adhere efl coding style instead of WebKit coding style. 9 WebCore's functions should adhere WebKit coding style. 10 11 * platform/efl/RenderThemeEfl.cpp: 12 (WebCore::RenderThemeEfl::themePartCacheEntryReset): 13 (WebCore::RenderThemeEfl::themePartCacheEntrySurfaceCreate): 14 (WebCore::RenderThemeEfl::cacheThemePartNew): 15 (WebCore::RenderThemeEfl::cacheThemePartReset): 16 (WebCore::RenderThemeEfl::cacheThemePartResizeAndReset): 17 (WebCore::RenderThemeEfl::cacheThemePartGet): 18 (WebCore::RenderThemeEfl::cacheThemePartFlush): 19 (WebCore::RenderThemeEfl::applyEdjeStateFromForm): 20 (WebCore::RenderThemeEfl::paintThemePart): 21 (WebCore::renderThemeEflColorClassSelectionActive): 22 (WebCore::renderThemeEflColorClassSelectionInactive): 23 (WebCore::renderThemeEflColorClassFocusRing): 24 (WebCore::renderThemeEflColorClassButtonText): 25 (WebCore::renderThemeEflColorClassComboText): 26 (WebCore::renderThemeEflColorClassEntryText): 27 (WebCore::renderThemeEflColorClassSearchText): 28 (WebCore::RenderThemeEfl::applyPartDescription): 29 (WebCore::RenderThemeEfl::applyPartDescriptions): 30 (WebCore::RenderThemeEfl::controlSupportsTints): 31 (WebCore::RenderThemeEfl::baselinePosition): 32 (WebCore::RenderThemeEfl::paintSliderTrack): 33 (WebCore::RenderThemeEfl::adjustSliderTrackStyle): 34 (WebCore::RenderThemeEfl::adjustSliderThumbStyle): 35 (WebCore::RenderThemeEfl::paintSliderThumb): 36 (WebCore::RenderThemeEfl::adjustCheckboxStyle): 37 (WebCore::RenderThemeEfl::paintCheckbox): 38 (WebCore::RenderThemeEfl::adjustRadioStyle): 39 (WebCore::RenderThemeEfl::paintRadio): 40 (WebCore::RenderThemeEfl::adjustButtonStyle): 41 (WebCore::RenderThemeEfl::paintButton): 42 (WebCore::RenderThemeEfl::adjustMenuListStyle): 43 (WebCore::RenderThemeEfl::paintMenuList): 44 (WebCore::RenderThemeEfl::adjustTextFieldStyle): 45 (WebCore::RenderThemeEfl::paintTextField): 46 (WebCore::RenderThemeEfl::adjustTextAreaStyle): 47 (WebCore::RenderThemeEfl::paintTextArea): 48 (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle): 49 (WebCore::RenderThemeEfl::paintSearchFieldDecoration): 50 (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle): 51 (WebCore::RenderThemeEfl::paintSearchFieldResultsButton): 52 (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle): 53 (WebCore::RenderThemeEfl::paintSearchFieldResultsDecoration): 54 (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle): 55 (WebCore::RenderThemeEfl::paintSearchFieldCancelButton): 56 (WebCore::RenderThemeEfl::adjustSearchFieldStyle): 57 (WebCore::RenderThemeEfl::paintSearchField): 58 (WebCore::RenderThemeEfl::adjustProgressBarStyle): 59 (WebCore::RenderThemeEfl::paintProgressBar): 60 (WebCore::RenderThemeEfl::paintMediaFullscreenButton): 61 (WebCore::RenderThemeEfl::paintMediaMuteButton): 62 (WebCore::RenderThemeEfl::paintMediaPlayButton): 63 (WebCore::RenderThemeEfl::paintMediaSeekBackButton): 64 (WebCore::RenderThemeEfl::paintMediaSeekForwardButton): 65 (WebCore::RenderThemeEfl::paintMediaSliderTrack): 66 (WebCore::RenderThemeEfl::paintMediaSliderThumb): 67 (WebCore::RenderThemeEfl::paintMediaVolumeSliderContainer): 68 (WebCore::RenderThemeEfl::paintMediaVolumeSliderTrack): 69 (WebCore::RenderThemeEfl::paintMediaVolumeSliderThumb): 70 (WebCore::RenderThemeEfl::paintMediaCurrentTime): 71 1 72 2011-03-03 Andy Estes <aestes@apple.com> 2 73 -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp
r78041 r80324 5 5 * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia 6 6 * Copyright (C) 2009-2010 ProFUSION embedded systems 7 * Copyright (C) 2009-201 0Samsung Electronics7 * Copyright (C) 2009-2011 Samsung Electronics 8 8 * 9 9 * This library is free software; you can redistribute it and/or … … 69 69 } 70 70 71 bool RenderThemeEfl::themePartCacheEntryReset(struct ThemePartCacheEntry* ce, FormType type)71 bool RenderThemeEfl::themePartCacheEntryReset(struct ThemePartCacheEntry* entry, FormType type) 72 72 { 73 73 const char *file, *group; 74 74 75 ASSERT( ce);75 ASSERT(entry); 76 76 77 77 edje_object_file_get(m_edje, &file, 0); … … 80 80 ASSERT(group); 81 81 82 if (!edje_object_file_set( ce->o, file, group)) {83 Edje_Load_Error err = edje_object_load_error_get( ce->o);82 if (!edje_object_file_set(entry->o, file, group)) { 83 Edje_Load_Error err = edje_object_load_error_get(entry->o); 84 84 const char *errmsg = edje_load_error_str(err); 85 85 EINA_LOG_ERR("Could not load '%s' from theme %s: %s", … … 90 90 } 91 91 92 bool RenderThemeEfl::themePartCacheEntrySurfaceCreate(struct ThemePartCacheEntry* ce)92 bool RenderThemeEfl::themePartCacheEntrySurfaceCreate(struct ThemePartCacheEntry* entry) 93 93 { 94 94 int w, h; … … 96 96 97 97 ASSERT(ce); 98 ASSERT( ce->ee);99 100 ecore_evas_geometry_get( ce->ee, 0, 0, &w, &h);98 ASSERT(entry->ee); 99 100 ecore_evas_geometry_get(entry->ee, 0, 0, &w, &h); 101 101 ASSERT(w > 0); 102 102 ASSERT(h > 0); 103 103 104 ce->surface = cairo_image_surface_create_for_data((unsigned char *)ecore_evas_buffer_pixels_get(ce->ee),104 entry->surface = cairo_image_surface_create_for_data((unsigned char *)ecore_evas_buffer_pixels_get(entry->ee), 105 105 CAIRO_FORMAT_ARGB32, w, h, w * 4); 106 status = cairo_surface_status( ce->surface);106 status = cairo_surface_status(entry->surface); 107 107 if (status != CAIRO_STATUS_SUCCESS) { 108 108 EINA_LOG_ERR("Could not create cairo surface: %s", … … 117 117 struct RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::cacheThemePartNew(FormType type, const IntSize& size) 118 118 { 119 struct ThemePartCacheEntry * ce= new struct ThemePartCacheEntry;120 121 if (! ce) {119 struct ThemePartCacheEntry *entry = new struct ThemePartCacheEntry; 120 121 if (!entry) { 122 122 EINA_LOG_ERR("could not allocate ThemePartCacheEntry."); 123 123 return 0; 124 124 } 125 125 126 ce->ee = ecore_evas_buffer_new(size.width(), size.height());127 if (! ce->ee) {126 entry->ee = ecore_evas_buffer_new(size.width(), size.height()); 127 if (!entry->ee) { 128 128 EINA_LOG_ERR("ecore_evas_buffer_new(%d, %d) failed.", 129 129 size.width(), size.height()); 130 delete ce;130 delete entry; 131 131 return 0; 132 132 } 133 133 134 ce->o = edje_object_add(ecore_evas_get(ce->ee));135 ASSERT( ce->o);136 if (!themePartCacheEntryReset( ce, type)) {137 evas_object_del( ce->o);138 ecore_evas_free( ce->ee);139 delete ce;134 entry->o = edje_object_add(ecore_evas_get(entry->ee)); 135 ASSERT(entry->o); 136 if (!themePartCacheEntryReset(entry, type)) { 137 evas_object_del(entry->o); 138 ecore_evas_free(entry->ee); 139 delete entry; 140 140 return 0; 141 141 } 142 142 143 if (!themePartCacheEntrySurfaceCreate( ce)) {144 evas_object_del( ce->o);145 ecore_evas_free( ce->ee);146 delete ce;143 if (!themePartCacheEntrySurfaceCreate(entry)) { 144 evas_object_del(entry->o); 145 ecore_evas_free(entry->ee); 146 delete entry; 147 147 return 0; 148 148 } 149 149 150 evas_object_resize( ce->o, size.width(), size.height());151 evas_object_show( ce->o);152 153 ce->type = type;154 ce->size = size;155 156 m_partCache.prepend( ce);157 return ce;150 evas_object_resize(entry->o, size.width(), size.height()); 151 evas_object_show(entry->o); 152 153 entry->type = type; 154 entry->size = size; 155 156 m_partCache.prepend(entry); 157 return entry; 158 158 } 159 159 160 160 // just change the edje group and return the same entry 161 struct RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::cacheThemePartReset(FormType type, struct RenderThemeEfl::ThemePartCacheEntry* ce)162 { 163 if (!themePartCacheEntryReset( ce, type)) {164 ce->type = FormTypeLast; // invalidate165 m_partCache.append( ce);161 struct RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::cacheThemePartReset(FormType type, struct RenderThemeEfl::ThemePartCacheEntry* entry) 162 { 163 if (!themePartCacheEntryReset(entry, type)) { 164 entry->type = FormTypeLast; // invalidate 165 m_partCache.append(entry); 166 166 return 0; 167 167 } 168 ce->type = type;169 m_partCache.prepend( ce);170 return ce;168 entry->type = type; 169 m_partCache.prepend(entry); 170 return entry; 171 171 } 172 172 173 173 // resize entry and reset it 174 struct RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::cacheThemePartResizeAndReset(FormType type, const IntSize& size, struct RenderThemeEfl::ThemePartCacheEntry* ce)175 { 176 cairo_surface_finish( ce->surface);177 ecore_evas_resize( ce->ee, size.width(), size.height());178 evas_object_resize( ce->o, size.width(), size.height());179 180 if (!themePartCacheEntrySurfaceCreate( ce)) {181 evas_object_del( ce->o);182 ecore_evas_free( ce->ee);183 delete ce;174 struct RenderThemeEfl::ThemePartCacheEntry* RenderThemeEfl::cacheThemePartResizeAndReset(FormType type, const IntSize& size, struct RenderThemeEfl::ThemePartCacheEntry* entry) 175 { 176 cairo_surface_finish(entry->surface); 177 ecore_evas_resize(entry->ee, size.width(), size.height()); 178 evas_object_resize(entry->o, size.width(), size.height()); 179 180 if (!themePartCacheEntrySurfaceCreate(entry)) { 181 evas_object_del(entry->o); 182 ecore_evas_free(entry->ee); 183 delete entry; 184 184 return 0; 185 185 } 186 186 187 return cacheThemePartReset(type, ce);187 return cacheThemePartReset(type, entry); 188 188 } 189 189 … … 198 198 end = m_partCache.end(); 199 199 for (i = 0; itr != end; i++, itr++) { 200 struct ThemePartCacheEntry * ce= *itr;201 if ( ce->size == size) {202 if ( ce->type == type)203 return ce;204 ce_last_size = ce;200 struct ThemePartCacheEntry *entry = *itr; 201 if (entry->size == size) { 202 if (entry->type == type) 203 return entry; 204 ce_last_size = entry; 205 205 idxLastSize = i; 206 206 } … … 215 215 } 216 216 217 ThemePartCacheEntry* ce= m_partCache.last();217 ThemePartCacheEntry* entry = m_partCache.last(); 218 218 m_partCache.removeLast(); 219 return cacheThemePartResizeAndReset(type, size, ce);219 return cacheThemePartResizeAndReset(type, size, entry); 220 220 } 221 221 … … 227 227 end = m_partCache.end(); 228 228 for (; itr != end; itr++) { 229 struct ThemePartCacheEntry * ce= *itr;230 cairo_surface_finish( ce->surface);231 evas_object_del( ce->o);232 ecore_evas_free( ce->ee);233 delete ce;229 struct ThemePartCacheEntry *entry = *itr; 230 cairo_surface_finish(entry->surface); 231 evas_object_del(entry->o); 232 ecore_evas_free(entry->ee); 233 delete entry; 234 234 } 235 235 m_partCache.clear(); 236 236 } 237 237 238 void RenderThemeEfl::applyEdjeStateFromForm(Evas_Object* o , ControlStates states)238 void RenderThemeEfl::applyEdjeStateFromForm(Evas_Object* object, ControlStates states) 239 239 { 240 240 const char *signals[] = { // keep in sync with WebCore/platform/ThemeTypes.h … … 250 250 }; 251 251 252 edje_object_signal_emit(o , "reset", "");252 edje_object_signal_emit(object, "reset", ""); 253 253 254 254 for (size_t i = 0; i < WTF_ARRAY_LENGTH(signals); ++i) { 255 255 if (states & (1 << i)) 256 edje_object_signal_emit(o , signals[i], "");257 } 258 } 259 260 bool RenderThemeEfl::paintThemePart(RenderObject* o , FormType type, const PaintInfo& i, const IntRect& rect)261 { 262 ThemePartCacheEntry* ce;256 edje_object_signal_emit(object, signals[i], ""); 257 } 258 } 259 260 bool RenderThemeEfl::paintThemePart(RenderObject* object, FormType type, const PaintInfo& info, const IntRect& rect) 261 { 262 ThemePartCacheEntry* entry; 263 263 Eina_List* updates; 264 264 cairo_t* cairo; … … 267 267 ASSERT(m_edje); 268 268 269 ce= cacheThemePartGet(type, rect.size());270 ASSERT( ce);271 if (! ce)269 entry = cacheThemePartGet(type, rect.size()); 270 ASSERT(entry); 271 if (!entry) 272 272 return false; 273 273 274 applyEdjeStateFromForm( ce->o, controlStatesForRenderer(o));275 276 cairo = i .context->platformContext();274 applyEdjeStateFromForm(entry->o, controlStatesForRenderer(object)); 275 276 cairo = info.context->platformContext(); 277 277 ASSERT(cairo); 278 278 … … 280 280 // treatment, move them to special functions. 281 281 if (type == SliderVertical || type == SliderHorizontal) { 282 RenderSlider* renderSlider = toRenderSlider(o );282 RenderSlider* renderSlider = toRenderSlider(object); 283 283 Edje_Message_Float_Set* msg; 284 284 int max, value; … … 297 297 msg->val[0] = static_cast<float>(value) / static_cast<float>(max); 298 298 msg->val[1] = 0.1; 299 edje_object_message_send( ce->o, EDJE_MESSAGE_FLOAT_SET, 0, msg);299 edje_object_message_send(entry->o, EDJE_MESSAGE_FLOAT_SET, 0, msg); 300 300 #if ENABLE(PROGRESS_TAG) 301 301 } else if (type == ProgressBar) { … … 315 315 msg->val[0] = 0; 316 316 msg->val[1] = value; 317 edje_object_message_send( ce->o, EDJE_MESSAGE_FLOAT_SET, 0, msg);317 edje_object_message_send(entry->o, EDJE_MESSAGE_FLOAT_SET, 0, msg); 318 318 #endif 319 319 } 320 320 321 edje_object_calc_force( ce->o);322 edje_object_message_signal_process( ce->o);323 updates = evas_render_updates(ecore_evas_get( ce->ee));321 edje_object_calc_force(entry->o); 322 edje_object_message_signal_process(entry->o); 323 updates = evas_render_updates(ecore_evas_get(entry->ee)); 324 324 evas_render_updates_free(updates); 325 325 326 326 cairo_save(cairo); 327 cairo_set_source_surface(cairo, ce->surface, rect.x(), rect.y());327 cairo_set_source_surface(cairo, entry->surface, rect.x(), rect.y()); 328 328 cairo_paint_with_alpha(cairo, 1.0); 329 329 cairo_restore(cairo); … … 346 346 } 347 347 348 static void renderThemeEflColorClassSelectionActive(void* data, Evas_Object* o , const char* signal, const char* source)348 static void renderThemeEflColorClassSelectionActive(void* data, Evas_Object* object, const char* signal, const char* source) 349 349 { 350 350 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 351 351 int fr, fg, fb, fa, br, bg, bb, ba; 352 352 353 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0))353 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0)) 354 354 return; 355 355 … … 357 357 } 358 358 359 static void renderThemeEflColorClassSelectionInactive(void* data, Evas_Object* o , const char* signal, const char* source)359 static void renderThemeEflColorClassSelectionInactive(void* data, Evas_Object* object, const char* signal, const char* source) 360 360 { 361 361 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 362 362 int fr, fg, fb, fa, br, bg, bb, ba; 363 363 364 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0))364 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0)) 365 365 return; 366 366 … … 368 368 } 369 369 370 static void renderThemeEflColorClassFocusRing(void* data, Evas_Object* o , const char* signal, const char* source)370 static void renderThemeEflColorClassFocusRing(void* data, Evas_Object* object, const char* signal, const char* source) 371 371 { 372 372 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 373 373 int fr, fg, fb, fa; 374 374 375 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, 0, 0, 0, 0, 0, 0, 0, 0))375 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, 0, 0, 0, 0, 0, 0, 0, 0)) 376 376 return; 377 377 … … 379 379 } 380 380 381 static void renderThemeEflColorClassButtonText(void* data, Evas_Object* o , const char* signal, const char* source)381 static void renderThemeEflColorClassButtonText(void* data, Evas_Object* object, const char* signal, const char* source) 382 382 { 383 383 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 384 384 int fr, fg, fb, fa, br, bg, bb, ba; 385 385 386 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0))386 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0)) 387 387 return; 388 388 … … 390 390 } 391 391 392 static void renderThemeEflColorClassComboText(void* data, Evas_Object* o , const char* signal, const char* source)392 static void renderThemeEflColorClassComboText(void* data, Evas_Object* object, const char* signal, const char* source) 393 393 { 394 394 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 395 395 int fr, fg, fb, fa, br, bg, bb, ba; 396 396 397 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0))397 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0)) 398 398 return; 399 399 … … 401 401 } 402 402 403 static void renderThemeEflColorClassEntryText(void* data, Evas_Object* o , const char* signal, const char* source)403 static void renderThemeEflColorClassEntryText(void* data, Evas_Object* object, const char* signal, const char* source) 404 404 { 405 405 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 406 406 int fr, fg, fb, fa, br, bg, bb, ba; 407 407 408 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0))408 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0)) 409 409 return; 410 410 … … 412 412 } 413 413 414 static void renderThemeEflColorClassSearchText(void* data, Evas_Object* o , const char* signal, const char* source)414 static void renderThemeEflColorClassSearchText(void* data, Evas_Object* object, const char* signal, const char* source) 415 415 { 416 416 RenderThemeEfl* that = static_cast<RenderThemeEfl *>(data); 417 417 int fr, fg, fb, fa, br, bg, bb, ba; 418 if (!edje_object_color_class_get(o , source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0))418 if (!edje_object_color_class_get(object, source, &fr, &fg, &fb, &fa, &br, &bg, &bb, &ba, 0, 0, 0, 0)) 419 419 return; 420 420 … … 523 523 } 524 524 525 void RenderThemeEfl::applyPartDescription(Evas_Object* o , struct ThemePartDesc* desc)525 void RenderThemeEfl::applyPartDescription(Evas_Object* object, struct ThemePartDesc* desc) 526 526 { 527 527 Evas_Coord minw, minh, maxw, maxh; 528 528 529 edje_object_size_min_get(o , &minw, &minh);529 edje_object_size_min_get(object, &minw, &minh); 530 530 if (!minw && !minh) 531 edje_object_size_min_calc(o , &minw, &minh);531 edje_object_size_min_calc(object, &minw, &minh); 532 532 533 533 desc->min.setWidth(Length(minw, Fixed)); 534 534 desc->min.setHeight(Length(minh, Fixed)); 535 535 536 edje_object_size_max_get(o , &maxw, &maxh);536 edje_object_size_max_get(object, &maxw, &maxh); 537 537 desc->max.setWidth(Length(maxw, Fixed)); 538 538 desc->max.setHeight(Length(maxh, Fixed)); 539 539 540 if (!edje_object_part_exists(o , "text_confinement"))540 if (!edje_object_part_exists(object, "text_confinement")) 541 541 desc->padding = LengthBox(0, 0, 0, 0); 542 542 else { … … 558 558 oh = maxh; 559 559 560 evas_object_move(o , ox, oy);561 evas_object_resize(o , ow, oh);562 edje_object_calc_force(o );563 edje_object_message_signal_process(o );564 edje_object_part_geometry_get(o , "text_confinement", &px, &py, &pw, &ph);560 evas_object_move(object, ox, oy); 561 evas_object_resize(object, ow, oh); 562 edje_object_calc_force(object); 563 edje_object_message_signal_process(object); 564 edje_object_part_geometry_get(object, "text_confinement", &px, &py, &pw, &ph); 565 565 566 566 t = py - oy; … … 603 603 void RenderThemeEfl::applyPartDescriptions() 604 604 { 605 Evas_Object* o ;605 Evas_Object* object; 606 606 unsigned int i; 607 607 const char* file; … … 613 613 ASSERT(file); 614 614 615 o = edje_object_add(ecore_evas_get(m_canvas));616 if (!o ) {615 object = edje_object_add(ecore_evas_get(m_canvas)); 616 if (!object) { 617 617 EINA_LOG_ERR("Could not create Edje object."); 618 618 return; … … 623 623 const char* group = edjeGroupFromFormType(type); 624 624 m_partDescs[i].type = type; 625 if (!edje_object_file_set(o , file, group)) {626 Edje_Load_Error err = edje_object_load_error_get(o );625 if (!edje_object_file_set(object, file, group)) { 626 Edje_Load_Error err = edje_object_load_error_get(object); 627 627 const char* errmsg = edje_load_error_str(err); 628 628 EINA_LOG_ERR("Could not set theme group '%s' of file '%s': %s", … … 631 631 applyPartDescriptionFallback(m_partDescs + i); 632 632 } else 633 applyPartDescription(o , m_partDescs + i);634 } 635 evas_object_del(o );633 applyPartDescription(object, m_partDescs + i); 634 } 635 evas_object_del(object); 636 636 } 637 637 … … 768 768 } 769 769 770 bool RenderThemeEfl::controlSupportsTints(const RenderObject* o ) const771 { 772 return isEnabled(o );773 } 774 775 int RenderThemeEfl::baselinePosition(const RenderObject* o ) const776 { 777 if (!o ->isBox())770 bool RenderThemeEfl::controlSupportsTints(const RenderObject* object) const 771 { 772 return isEnabled(object); 773 } 774 775 int RenderThemeEfl::baselinePosition(const RenderObject* object) const 776 { 777 if (!object->isBox()) 778 778 return 0; 779 779 780 if (o ->style()->appearance() == CheckboxPart781 || o ->style()->appearance() == RadioPart)782 return toRenderBox(o )->marginTop() + toRenderBox(o)->height() - 3;783 784 return RenderTheme::baselinePosition(o );785 } 786 787 bool RenderThemeEfl::paintSliderTrack(RenderObject* o , const PaintInfo& i, const IntRect& rect)788 { 789 if (o ->style()->appearance() == SliderHorizontalPart)790 return paintThemePart(o , SliderHorizontal, i, rect);791 return paintThemePart(o , SliderVertical, i, rect);792 } 793 794 void RenderThemeEfl::adjustSliderTrackStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const795 { 796 if (!m_page && e && e->document()->page()) {797 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustSliderTrackStyle(selector, style, e);780 if (object->style()->appearance() == CheckboxPart 781 || object->style()->appearance() == RadioPart) 782 return toRenderBox(object)->marginTop() + toRenderBox(object)->height() - 3; 783 784 return RenderTheme::baselinePosition(object); 785 } 786 787 bool RenderThemeEfl::paintSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect) 788 { 789 if (object->style()->appearance() == SliderHorizontalPart) 790 return paintThemePart(object, SliderHorizontal, info, rect); 791 return paintThemePart(object, SliderVertical, info, rect); 792 } 793 794 void RenderThemeEfl::adjustSliderTrackStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 795 { 796 if (!m_page && element && element->document()->page()) { 797 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustSliderTrackStyle(selector, style, element); 798 798 return; 799 799 } … … 809 809 } 810 810 811 void RenderThemeEfl::adjustSliderThumbStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const812 { 813 adjustSliderTrackStyle(selector, style, e );814 } 815 816 bool RenderThemeEfl::paintSliderThumb(RenderObject* o , const PaintInfo& i, const IntRect& rect)817 { 818 return paintSliderTrack(o , i, rect);819 } 820 821 void RenderThemeEfl::adjustCheckboxStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const822 { 823 if (!m_page && e && e->document()->page()) {824 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustCheckboxStyle(selector, style, e);811 void RenderThemeEfl::adjustSliderThumbStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 812 { 813 adjustSliderTrackStyle(selector, style, element); 814 } 815 816 bool RenderThemeEfl::paintSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect) 817 { 818 return paintSliderTrack(object, info, rect); 819 } 820 821 void RenderThemeEfl::adjustCheckboxStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 822 { 823 if (!m_page && element && element->document()->page()) { 824 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustCheckboxStyle(selector, style, element); 825 825 return; 826 826 } … … 835 835 } 836 836 837 bool RenderThemeEfl::paintCheckbox(RenderObject* o , const PaintInfo& i, const IntRect& rect)838 { 839 return paintThemePart(o , CheckBox, i, rect);840 } 841 842 void RenderThemeEfl::adjustRadioStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const843 { 844 if (!m_page && e && e->document()->page()) {845 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustRadioStyle(selector, style, e);837 bool RenderThemeEfl::paintCheckbox(RenderObject* object, const PaintInfo& info, const IntRect& rect) 838 { 839 return paintThemePart(object, CheckBox, info, rect); 840 } 841 842 void RenderThemeEfl::adjustRadioStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 843 { 844 if (!m_page && element && element->document()->page()) { 845 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustRadioStyle(selector, style, element); 846 846 return; 847 847 } … … 856 856 } 857 857 858 bool RenderThemeEfl::paintRadio(RenderObject* o , const PaintInfo& i, const IntRect& rect)859 { 860 return paintThemePart(o , RadioButton, i, rect);861 } 862 863 void RenderThemeEfl::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const864 { 865 if (!m_page && e && e->document()->page()) {866 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustButtonStyle(selector, style, e);858 bool RenderThemeEfl::paintRadio(RenderObject* object, const PaintInfo& info, const IntRect& rect) 859 { 860 return paintThemePart(object, RadioButton, info, rect); 861 } 862 863 void RenderThemeEfl::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 864 { 865 if (!m_page && element && element->document()->page()) { 866 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustButtonStyle(selector, style, element); 867 867 return; 868 868 } … … 879 879 } 880 880 881 bool RenderThemeEfl::paintButton(RenderObject* o , const PaintInfo& i, const IntRect& rect)882 { 883 return paintThemePart(o , Button, i, rect);884 } 885 886 void RenderThemeEfl::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const887 { 888 if (!m_page && e && e->document()->page()) {889 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustMenuListStyle(selector, style, e);881 bool RenderThemeEfl::paintButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 882 { 883 return paintThemePart(object, Button, info, rect); 884 } 885 886 void RenderThemeEfl::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 887 { 888 if (!m_page && element && element->document()->page()) { 889 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustMenuListStyle(selector, style, element); 890 890 return; 891 891 } … … 897 897 } 898 898 899 bool RenderThemeEfl::paintMenuList(RenderObject* o , const PaintInfo& i, const IntRect& rect)900 { 901 return paintThemePart(o , ComboBox, i, rect);902 } 903 904 void RenderThemeEfl::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const905 { 906 if (!m_page && e && e->document()->page()) {907 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustTextFieldStyle(selector, style, e);899 bool RenderThemeEfl::paintMenuList(RenderObject* object, const PaintInfo& info, const IntRect& rect) 900 { 901 return paintThemePart(object, ComboBox, info, rect); 902 } 903 904 void RenderThemeEfl::adjustTextFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 905 { 906 if (!m_page && element && element->document()->page()) { 907 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustTextFieldStyle(selector, style, element); 908 908 return; 909 909 } … … 915 915 } 916 916 917 bool RenderThemeEfl::paintTextField(RenderObject* o , const PaintInfo& i, const IntRect& rect)918 { 919 return paintThemePart(o , TextField, i, rect);920 } 921 922 void RenderThemeEfl::adjustTextAreaStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const923 { 924 adjustTextFieldStyle(selector, style, e );925 } 926 927 bool RenderThemeEfl::paintTextArea(RenderObject* o , const PaintInfo& i, const IntRect& r)928 { 929 return paintTextField(o , i, r);930 } 931 932 void RenderThemeEfl::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const933 { 934 if (!m_page && e && e->document()->page()) {935 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustSearchFieldDecorationStyle(selector, style, e);917 bool RenderThemeEfl::paintTextField(RenderObject* object, const PaintInfo& info, const IntRect& rect) 918 { 919 return paintThemePart(object, TextField, info, rect); 920 } 921 922 void RenderThemeEfl::adjustTextAreaStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 923 { 924 adjustTextFieldStyle(selector, style, element); 925 } 926 927 bool RenderThemeEfl::paintTextArea(RenderObject* object, const PaintInfo& info, const IntRect& rect) 928 { 929 return paintTextField(object, info, rect); 930 } 931 932 void RenderThemeEfl::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 933 { 934 if (!m_page && element && element->document()->page()) { 935 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustSearchFieldDecorationStyle(selector, style, element); 936 936 return; 937 937 } … … 941 941 } 942 942 943 bool RenderThemeEfl::paintSearchFieldDecoration(RenderObject* o , const PaintInfo& i, const IntRect& rect)944 { 945 return paintThemePart(o , SearchFieldDecoration, i, rect);946 } 947 948 void RenderThemeEfl::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const949 { 950 if (!m_page && e && e->document()->page()) {951 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustSearchFieldResultsButtonStyle(selector, style, e);943 bool RenderThemeEfl::paintSearchFieldDecoration(RenderObject* object, const PaintInfo& info, const IntRect& rect) 944 { 945 return paintThemePart(object, SearchFieldDecoration, info, rect); 946 } 947 948 void RenderThemeEfl::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 949 { 950 if (!m_page && element && element->document()->page()) { 951 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustSearchFieldResultsButtonStyle(selector, style, element); 952 952 return; 953 953 } … … 957 957 } 958 958 959 bool RenderThemeEfl::paintSearchFieldResultsButton(RenderObject* o , const PaintInfo& i, const IntRect& rect)960 { 961 return paintThemePart(o , SearchFieldResultsButton, i, rect);962 } 963 964 void RenderThemeEfl::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const965 { 966 if (!m_page && e && e->document()->page()) {967 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustSearchFieldResultsDecorationStyle(selector, style, e);959 bool RenderThemeEfl::paintSearchFieldResultsButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 960 { 961 return paintThemePart(object, SearchFieldResultsButton, info, rect); 962 } 963 964 void RenderThemeEfl::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 965 { 966 if (!m_page && element && element->document()->page()) { 967 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustSearchFieldResultsDecorationStyle(selector, style, element); 968 968 return; 969 969 } … … 973 973 } 974 974 975 bool RenderThemeEfl::paintSearchFieldResultsDecoration(RenderObject* o , const PaintInfo& i, const IntRect& rect)976 { 977 return paintThemePart(o , SearchFieldResultsDecoration, i, rect);978 } 979 980 void RenderThemeEfl::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const981 { 982 if (!m_page && e && e->document()->page()) {983 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustSearchFieldCancelButtonStyle(selector, style, e);975 bool RenderThemeEfl::paintSearchFieldResultsDecoration(RenderObject* object, const PaintInfo& info, const IntRect& rect) 976 { 977 return paintThemePart(object, SearchFieldResultsDecoration, info, rect); 978 } 979 980 void RenderThemeEfl::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 981 { 982 if (!m_page && element && element->document()->page()) { 983 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustSearchFieldCancelButtonStyle(selector, style, element); 984 984 return; 985 985 } … … 989 989 } 990 990 991 bool RenderThemeEfl::paintSearchFieldCancelButton(RenderObject* o , const PaintInfo& i, const IntRect& rect)992 { 993 return paintThemePart(o , SearchFieldCancelButton, i, rect);994 } 995 996 void RenderThemeEfl::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e ) const997 { 998 if (!m_page && e && e->document()->page()) {999 static_cast<RenderThemeEfl*>(e ->document()->page()->theme())->adjustSearchFieldStyle(selector, style, e);991 bool RenderThemeEfl::paintSearchFieldCancelButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 992 { 993 return paintThemePart(object, SearchFieldCancelButton, info, rect); 994 } 995 996 void RenderThemeEfl::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 997 { 998 if (!m_page && element && element->document()->page()) { 999 static_cast<RenderThemeEfl*>(element->document()->page()->theme())->adjustSearchFieldStyle(selector, style, element); 1000 1000 return; 1001 1001 } … … 1007 1007 } 1008 1008 1009 bool RenderThemeEfl::paintSearchField(RenderObject* o , const PaintInfo& i, const IntRect& rect)1010 { 1011 return paintThemePart(o , SearchField, i, rect);1009 bool RenderThemeEfl::paintSearchField(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1010 { 1011 return paintThemePart(object, SearchField, info, rect); 1012 1012 } 1013 1013 … … 1033 1033 1034 1034 #if ENABLE(PROGRESS_TAG) 1035 void RenderThemeEfl::adjustProgressBarStyle(CSSStyleSelector* , RenderStyle* style, Element*) const1035 void RenderThemeEfl::adjustProgressBarStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const 1036 1036 { 1037 1037 style->setBoxShadow(0); 1038 1038 } 1039 1039 1040 bool RenderThemeEfl::paintProgressBar(RenderObject* o , const PaintInfo& i, const IntRect& rect)1041 { 1042 return paintThemePart(o , ProgressBar, i, rect);1040 bool RenderThemeEfl::paintProgressBar(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1041 { 1042 return paintThemePart(object, ProgressBar, info, rect); 1043 1043 } 1044 1044 #endif … … 1057 1057 } 1058 1058 1059 bool RenderThemeEfl::paintMediaFullscreenButton(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1059 bool RenderThemeEfl::paintMediaFullscreenButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1060 1060 { 1061 1061 notImplemented(); … … 1063 1063 } 1064 1064 1065 bool RenderThemeEfl::paintMediaMuteButton(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1065 bool RenderThemeEfl::paintMediaMuteButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1066 1066 { 1067 1067 notImplemented(); … … 1069 1069 } 1070 1070 1071 bool RenderThemeEfl::paintMediaPlayButton(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1071 bool RenderThemeEfl::paintMediaPlayButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1072 1072 { 1073 1073 notImplemented(); … … 1075 1075 } 1076 1076 1077 bool RenderThemeEfl::paintMediaSeekBackButton(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1077 bool RenderThemeEfl::paintMediaSeekBackButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1078 1078 { 1079 1079 notImplemented(); … … 1081 1081 } 1082 1082 1083 bool RenderThemeEfl::paintMediaSeekForwardButton(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1083 bool RenderThemeEfl::paintMediaSeekForwardButton(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1084 1084 { 1085 1085 notImplemented(); … … 1087 1087 } 1088 1088 1089 bool RenderThemeEfl::paintMediaSliderTrack(RenderObject* o , const PaintInfo& paintInfo, const IntRect& r)1089 bool RenderThemeEfl::paintMediaSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1090 1090 { 1091 1091 notImplemented(); … … 1093 1093 } 1094 1094 1095 bool RenderThemeEfl::paintMediaSliderThumb(RenderObject* o , const PaintInfo& paintInfo, const IntRect& r)1095 bool RenderThemeEfl::paintMediaSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1096 1096 { 1097 1097 notImplemented(); … … 1099 1099 } 1100 1100 1101 bool RenderThemeEfl::paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo& paintInfo, const IntRect& rect)1101 bool RenderThemeEfl::paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo& info, const IntRect& rect) 1102 1102 { 1103 1103 notImplemented(); … … 1105 1105 } 1106 1106 1107 bool RenderThemeEfl::paintMediaVolumeSliderTrack(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1107 bool RenderThemeEfl::paintMediaVolumeSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1108 1108 { 1109 1109 notImplemented(); … … 1111 1111 } 1112 1112 1113 bool RenderThemeEfl::paintMediaVolumeSliderThumb(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1113 bool RenderThemeEfl::paintMediaVolumeSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1114 1114 { 1115 1115 notImplemented(); … … 1117 1117 } 1118 1118 1119 bool RenderThemeEfl::paintMediaCurrentTime(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)1119 bool RenderThemeEfl::paintMediaCurrentTime(RenderObject* object, const PaintInfo& info, const IntRect& rect) 1120 1120 { 1121 1121 notImplemented();
Note: See TracChangeset
for help on using the changeset viewer.