Changeset 167428 in webkit
- Timestamp:
- Apr 17, 2014 7:53:31 AM (10 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r167363 r167428 1 2014-04-17 Hyowon Kim <hw1008.kim@samsung.com> 2 3 [EFL] Remove deprecated ewk_paint code. 4 https://bugs.webkit.org/show_bug.cgi?id=131266 5 6 Reviewed by Gyuyoung Kim. 7 8 ewk_paint related code was deprecated since r166637. 9 10 * PlatformEfl.cmake: Remove ewk_paint_context.cpp 11 1 12 2014-04-16 Simon Fraser <simon.fraser@apple.com> 2 13 -
trunk/Source/WebKit/PlatformEfl.cmake
r166037 r167428 128 128 efl/ewk/ewk_main.cpp 129 129 efl/ewk/ewk_network.cpp 130 efl/ewk/ewk_paint_context.cpp131 130 efl/ewk/ewk_security_origin.cpp 132 131 efl/ewk/ewk_security_policy.cpp -
trunk/Source/WebKit/efl/ChangeLog
r167346 r167428 1 2014-04-17 Hyowon Kim <hw1008.kim@samsung.com> 2 3 [EFL] Remove deprecated ewk_paint code. 4 https://bugs.webkit.org/show_bug.cgi?id=131266 5 6 Reviewed by Gyuyoung Kim. 7 8 ewk_paint related code was deprecated since r166637. 9 10 * WebCoreSupport/AcceleratedCompositingContextEfl.cpp: 11 * WebCoreSupport/ChromeClientEfl.cpp: 12 (WebCore::ChromeClientEfl::invalidateRootView): Deleted. 13 (WebCore::ChromeClientEfl::invalidateContentsAndRootView): Deleted. 14 (WebCore::ChromeClientEfl::invalidateContentsForSlowScroll): Deleted. 15 (WebCore::ChromeClientEfl::scroll): Deleted. 16 * WebCoreSupport/ChromeClientEfl.h: 17 * WebCoreSupport/InspectorClientEfl.cpp: 18 * ewk/ewk_paint_context.cpp: Removed. 19 * ewk/ewk_paint_context_private.h: Removed. 20 * ewk/ewk_view.cpp: 21 (_ewk_view_priv_del): 22 (_ewk_view_smart_calculate): 23 (ewk_view_smart_set): 24 (_ewk_view_repaints_resize): Deleted. 25 (_ewk_view_repaint_add): Deleted. 26 (_ewk_view_repaints_flush): Deleted. 27 (_ewk_view_smart_flush): Deleted. 28 (ewk_view_repaints_pop): Deleted. 29 (ewk_view_repaint_add): Deleted. 30 (ewk_view_paint): Deleted. 31 (ewk_view_paint_contents): Deleted. 32 (ewk_view_repaint): Deleted. 33 (ewk_view_scroll): Deleted. 34 (ewk_view_tiled_backing_store_invalidate): Deleted. 35 * ewk/ewk_view_private.h: 36 1 37 2014-04-16 Jeongeun Kim <je_julie.kim@samsung.com> 2 38 -
trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
r167342 r167428 25 25 #include "CairoUtilities.h" 26 26 #include "CairoUtilitiesEfl.h" 27 #include "FrameView.h" 27 28 #include "GraphicsLayerTextureMapper.h" 28 29 #include "MainFrame.h" -
trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
r166831 r167428 515 515 #endif 516 516 517 void ChromeClientEfl::invalidateRootView(const IntRect& updateRect)518 {519 #if USE(TILED_BACKING_STORE)520 ewk_view_tiled_backing_store_invalidate(m_view, updateRect);521 #else522 UNUSED_PARAM(updateRect);523 notImplemented();524 #endif525 }526 527 void ChromeClientEfl::invalidateContentsAndRootView(const IntRect& updateRect)528 {529 if (updateRect.isEmpty())530 return;531 532 Evas_Coord x, y, w, h;533 534 x = updateRect.x();535 y = updateRect.y();536 w = updateRect.width();537 h = updateRect.height();538 ewk_view_repaint(m_view, x, y, w, h);539 }540 541 void ChromeClientEfl::invalidateContentsForSlowScroll(const IntRect& updateRect)542 {543 invalidateContentsAndRootView(updateRect);544 }545 546 void ChromeClientEfl::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)547 {548 ewk_view_scroll(m_view, scrollDelta, rectToScroll, clipRect);549 }550 551 517 void ChromeClientEfl::loadIconForFiles(const Vector<String>&, FileIconLoader*) 552 518 { -
trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
r166831 r167428 157 157 virtual void scrollRectIntoView(const IntRect&) const override { } 158 158 159 virtual void invalidateRootView(const IntRect&) override ;160 virtual void invalidateContentsAndRootView(const IntRect&) override ;161 virtual void invalidateContentsForSlowScroll(const IntRect&) override ;162 virtual void scroll(const IntSize&, const IntRect&, const IntRect&) override ;159 virtual void invalidateRootView(const IntRect&) override { } 160 virtual void invalidateContentsAndRootView(const IntRect&) override { } 161 virtual void invalidateContentsForSlowScroll(const IntRect&) override { } 162 virtual void scroll(const IntSize&, const IntRect&, const IntRect&) override { } 163 163 164 164 virtual void dispatchViewportPropertiesDidChange(const ViewportArguments&) const override; -
trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
r164245 r167428 25 25 26 26 #include "EflInspectorUtilities.h" 27 #include "FrameView.h" 27 28 #include "InspectorController.h" 28 29 #include "MainFrame.h" -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r167346 r167428 70 70 #include "Settings.h" 71 71 #include "SoupNetworkSession.h" 72 #include "TiledBackingStore.h"73 72 #include "c_instance.h" 74 73 #include "ewk_contextmenu_private.h" … … 77 76 #include "ewk_history_private.h" 78 77 #include "ewk_js_private.h" 79 #include "ewk_paint_context_private.h"80 78 #include "ewk_private.h" 81 79 #include "ewk_settings_private.h" … … 264 262 WebCore::PopupMenuClient* menuClient; 265 263 } popup; 266 struct {267 Eina_Rectangle* array;268 size_t count;269 size_t allocated;270 } repaints;271 264 unsigned int imh; /**< input method hints */ 272 265 struct { … … 422 415 } 423 416 424 static Eina_Bool _ewk_view_repaints_resize(Ewk_View_Private_Data* priv, size_t size)425 {426 void* tmp = realloc(priv->repaints.array, size * sizeof(Eina_Rectangle));427 if (!tmp) {428 CRITICAL("could not realloc repaints array to %zu elements.", size);429 return false;430 }431 priv->repaints.allocated = size;432 priv->repaints.array = static_cast<Eina_Rectangle*>(tmp);433 return true;434 }435 436 static void _ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height)437 {438 size_t newSize = 0;439 440 if (priv->repaints.allocated == priv->repaints.count)441 newSize = priv->repaints.allocated + ewkViewRepaintsSizeStep;442 else if (!priv->repaints.count && priv->repaints.allocated > ewkViewRepaintsSizeInitial)443 newSize = ewkViewRepaintsSizeInitial;444 445 if (newSize) {446 if (!_ewk_view_repaints_resize(priv, newSize))447 return;448 }449 450 Eina_Rectangle* rect = priv->repaints.array + priv->repaints.count;451 priv->repaints.count++;452 453 rect->x = x;454 rect->y = y;455 rect->w = width;456 rect->h = height;457 458 DBG("add repaint %d, %d+%dx%d", x, y, width, height);459 }460 461 static void _ewk_view_repaints_flush(Ewk_View_Private_Data* priv)462 {463 priv->repaints.count = 0;464 if (priv->repaints.allocated <= ewkViewRepaintsSizeMaximumFree)465 return;466 _ewk_view_repaints_resize(priv, ewkViewRepaintsSizeMaximumFree);467 }468 469 417 // Default Event Handling ////////////////////////////////////////////// 470 418 static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData) … … 833 781 /* do not delete priv->main_frame */ 834 782 835 free(priv->repaints.array);836 837 783 eina_stringshare_del(priv->settings.userAgent); 838 784 eina_stringshare_del(priv->settings.userStylesheet); … … 1055 1001 smartData->view.h = height; 1056 1002 1057 _ewk_view_repaint_add(priv, 0, 0, width, height);1058 1059 1003 // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set). 1060 1004 evas_object_smart_callback_call(ewkView, "view,resized", 0); … … 1128 1072 ewk_frame_scroll_set(smartData->main_frame, x, y); 1129 1073 return result; 1130 }1131 1132 static void _ewk_view_smart_flush(Ewk_View_Smart_Data* smartData)1133 {1134 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);1135 _ewk_view_repaints_flush(priv);1136 1074 } 1137 1075 … … 1314 1252 api->zoom_weak_set = _ewk_view_smart_zoom_weak_set; 1315 1253 api->zoom_weak_smooth_scale_set = _ewk_view_smart_zoom_weak_smooth_scale_set; 1316 api->flush = _ewk_view_smart_flush;1317 1254 api->disable_render = _ewk_view_smart_disable_render; 1318 1255 api->enable_render = _ewk_view_smart_enable_render; … … 2663 2600 2664 2601 /** 2665 * Gets the internal array of repaint requests.2666 *2667 * This array should not be modified anyhow. It should be processed2668 * immediately as any further ewk_view call might change it, like2669 * those that add repaints or flush them, so be sure that your code2670 * does not call any of those while you process the repaints,2671 * otherwise copy the array.2672 *2673 * @param priv private handle pointer of the view to get repaints.2674 * @param count where to return the number of elements of returned array, may be @c 0.2675 *2676 * @return reference to array of requested repaints.2677 *2678 * @note this is not for general use but just for subclasses that want2679 * to define their own backing store.2680 */2681 const Eina_Rectangle* ewk_view_repaints_pop(Ewk_View_Private_Data* priv, size_t* count)2682 {2683 if (count)2684 *count = 0;2685 EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0);2686 if (count)2687 *count = priv->repaints.count;2688 2689 priv->repaints.count = 0;2690 2691 return priv->repaints.array;2692 }2693 2694 /**2695 * Add a new repaint request to queue.2696 *2697 * The repaints are assumed to be relative to current viewport.2698 *2699 * @param priv private handle pointer of the view to add repaint request.2700 * @param x horizontal position relative to current view port (scrolled).2701 * @param y vertical position relative to current view port (scrolled).2702 * @param width width of area to be repainted2703 * @param height height of area to be repainted2704 *2705 * @note this is not for general use but just for subclasses that want2706 * to define their own backing store.2707 */2708 void ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height)2709 {2710 EINA_SAFETY_ON_NULL_RETURN(priv);2711 _ewk_view_repaint_add(priv, x, y, width, height);2712 }2713 2714 /**2715 2602 * Do layout if required, applied recursively. 2716 2603 * … … 2730 2617 } 2731 2618 view->updateLayoutAndStyleIfNeededRecursive(); 2732 }2733 2734 /* internal methods ****************************************************/2735 /**2736 * @internal2737 * Paints using given graphics context the given area.2738 *2739 * This uses viewport relative area and will also handle scrollbars2740 * and other extra elements. See ewk_view_paint_contents() for the2741 * alternative function.2742 *2743 * @param priv the pointer to the private data of the view to use as paint source2744 * @param cr the cairo context to use as paint destination, its state will2745 * be saved before operation and restored afterwards2746 * @param area viewport relative geometry to paint2747 *2748 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure2749 *2750 * @note This is an easy to use version, but internal structures are2751 * always created, then graphics context is clipped, then2752 * painted, restored and destroyed. This might not be optimum,2753 * so using @a Ewk_Paint_Context may be a better solutions2754 * for large number of operations.2755 *2756 * @see ewk_view_paint_contents()2757 * @see ewk_paint_context_paint()2758 *2759 * @note This is not for general use but just for subclasses that want2760 * to define their own backing store.2761 */2762 Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, Ewk_Paint_Context* context, const Eina_Rectangle* area)2763 {2764 EINA_SAFETY_ON_NULL_RETURN_VAL(priv, false);2765 EINA_SAFETY_ON_NULL_RETURN_VAL(context, false);2766 EINA_SAFETY_ON_NULL_RETURN_VAL(area, false);2767 WebCore::FrameView* view = priv->page->mainFrame().view();2768 EINA_SAFETY_ON_NULL_RETURN_VAL(view, false);2769 2770 ewk_paint_context_save(context);2771 ewk_paint_context_clip(context, area);2772 ewk_paint_context_paint(context, view, area);2773 ewk_paint_context_restore(context);2774 2775 return true;2776 }2777 2778 /**2779 * @internal2780 * Paints just contents using given graphics context the given area.2781 *2782 * This uses absolute coordinates for area and will just handle2783 * contents, no scrollbars or extras. See ewk_view_paint() for the2784 * alternative solution.2785 *2786 * @param priv the pointer to the private data of the view to use as paint source2787 * @param cr the cairo context to use as paint destination, its state will2788 * be saved before operation and restored afterwards2789 * @param area absolute geometry to paint2790 *2791 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure2792 *2793 * @note This is an easy to use version, but internal structures are2794 * always created, then graphics context is clipped, then2795 * painted, restored and destroyed. This might not be optimum,2796 * so using @a Ewk_Paint_Context may be a better solutions2797 * for large number of operations.2798 *2799 * @see ewk_view_paint()2800 * @see ewk_paint_context_paint_contents()2801 *2802 * @note This is not for general use but just for subclasses that want2803 * to define their own backing store.2804 */2805 Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data* priv, Ewk_Paint_Context* context, const Eina_Rectangle* area)2806 {2807 EINA_SAFETY_ON_NULL_RETURN_VAL(priv, false);2808 EINA_SAFETY_ON_NULL_RETURN_VAL(context, false);2809 EINA_SAFETY_ON_NULL_RETURN_VAL(area, false);2810 WebCore::FrameView* view = priv->page->mainFrame().view();2811 EINA_SAFETY_ON_NULL_RETURN_VAL(view, false);2812 2813 view->updateLayoutAndStyleIfNeededRecursive();2814 2815 ewk_paint_context_save(context);2816 ewk_paint_context_clip(context, area);2817 ewk_paint_context_paint_contents(context, view, area);2818 ewk_paint_context_restore(context);2819 2820 return true;2821 2619 } 2822 2620 … … 3509 3307 } 3510 3308 3511 void ewk_view_repaint(Evas_Object* ewkView, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height)3512 {3513 DBG("ewkView=%p, region=%d,%d + %dx%d", ewkView, x, y, width, height);3514 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);3515 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);3516 3517 _ewk_view_repaint_add(priv, x, y, width, height);3518 _ewk_view_smart_changed(smartData);3519 }3520 3521 void ewk_view_scroll(Evas_Object* ewkView, const WebCore::IntSize& delta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect&)3522 {3523 ASSERT_UNUSED(rectToScroll, !rectToScroll.isEmpty());3524 ASSERT_UNUSED(delta, delta.width() || delta.height());3525 3526 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);3527 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);3528 3529 ewk_view_mark_for_sync(ewkView);3530 }3531 3532 3309 /** 3533 3310 * @internal … … 4604 4381 } 4605 4382 4606 #if USE(TILED_BACKING_STORE)4607 /**4608 * @internal4609 * Invalidate given area to repaint. The backing store will mark tiles that are4610 * in the area as dirty.4611 *4612 * @param ewkView View.4613 * @param area Area to invalidate4614 */4615 void ewk_view_tiled_backing_store_invalidate(Evas_Object* ewkView, const WebCore::IntRect& area)4616 {4617 EINA_SAFETY_ON_NULL_RETURN(ewkView);4618 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);4619 EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);4620 4621 if (priv->page->mainFrame().tiledBackingStore())4622 priv->page->mainFrame().tiledBackingStore()->invalidate(area);4623 }4624 #endif4625 4626 4383 namespace EWKPrivate { 4627 4384 -
trunk/Source/WebKit/efl/ewk/ewk_view_private.h
r167342 r167428 27 27 #include "Page.h" 28 28 #include "Widget.h" 29 #include "ewk_paint_context_private.h"30 29 #include "ewk_view.h" 31 30 … … 96 95 bool ewk_view_run_open_panel(Evas_Object* ewkView, Evas_Object* frame, Ewk_File_Chooser* fileChooser, Eina_List** selectedFilenames); 97 96 98 void ewk_view_repaint(Evas_Object* ewkView, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height);99 void ewk_view_scroll(Evas_Object*, const WebCore::IntSize& delta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect);100 97 WebCore::Page* ewk_view_core_page_get(const Evas_Object* ewkView); 101 98 … … 119 116 bool ewk_view_focus_can_cycle(Evas_Object* ewkView, Ewk_Focus_Direction direction); 120 117 121 Eina_Bool ewk_view_paint(Ewk_View_Private_Data* priv, Ewk_Paint_Context* context, const Eina_Rectangle* area);122 Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data* priv, Ewk_Paint_Context* context, const Eina_Rectangle* area);123 124 118 #if ENABLE(NETSCAPE_PLUGIN_API) 125 119 void ewk_view_js_window_object_clear(Evas_Object* ewkView, Evas_Object* frame); 126 #endif127 128 #if USE(TILED_BACKING_STORE)129 void ewk_view_tiled_backing_store_invalidate(Evas_Object* ewkView, const WebCore::IntRect& area);130 120 #endif 131 121 … … 134 124 bool ewk_view_need_touch_events_get(const Evas_Object*); 135 125 #endif 136 137 const Eina_Rectangle* ewk_view_repaints_pop(Ewk_View_Private_Data* priv, size_t* count);138 139 void ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height);140 126 141 127 void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data* priv);
Note: See TracChangeset
for help on using the changeset viewer.