Changeset 167428 in webkit


Ignore:
Timestamp:
Apr 17, 2014 7:53:31 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Remove deprecated ewk_paint code.
https://bugs.webkit.org/show_bug.cgi?id=131266

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-04-17
Reviewed by Gyuyoung Kim.

ewk_paint related code was deprecated since r166637.

Source/WebKit:

  • PlatformEfl.cmake: Remove ewk_paint_context.cpp

Source/WebKit/efl:

  • WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
  • WebCoreSupport/ChromeClientEfl.cpp:

(WebCore::ChromeClientEfl::invalidateRootView): Deleted.
(WebCore::ChromeClientEfl::invalidateContentsAndRootView): Deleted.
(WebCore::ChromeClientEfl::invalidateContentsForSlowScroll): Deleted.
(WebCore::ChromeClientEfl::scroll): Deleted.

  • WebCoreSupport/ChromeClientEfl.h:
  • WebCoreSupport/InspectorClientEfl.cpp:
  • ewk/ewk_paint_context.cpp: Removed.
  • ewk/ewk_paint_context_private.h: Removed.
  • ewk/ewk_view.cpp:

(_ewk_view_priv_del):
(_ewk_view_smart_calculate):
(ewk_view_smart_set):
(_ewk_view_repaints_resize): Deleted.
(_ewk_view_repaint_add): Deleted.
(_ewk_view_repaints_flush): Deleted.
(_ewk_view_smart_flush): Deleted.
(ewk_view_repaints_pop): Deleted.
(ewk_view_repaint_add): Deleted.
(ewk_view_paint): Deleted.
(ewk_view_paint_contents): Deleted.
(ewk_view_repaint): Deleted.
(ewk_view_scroll): Deleted.
(ewk_view_tiled_backing_store_invalidate): Deleted.

  • ewk/ewk_view_private.h:
Location:
trunk/Source/WebKit
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r167363 r167428  
     12014-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
    1122014-04-16  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/Source/WebKit/PlatformEfl.cmake

    r166037 r167428  
    128128    efl/ewk/ewk_main.cpp
    129129    efl/ewk/ewk_network.cpp
    130     efl/ewk/ewk_paint_context.cpp
    131130    efl/ewk/ewk_security_origin.cpp
    132131    efl/ewk/ewk_security_policy.cpp
  • trunk/Source/WebKit/efl/ChangeLog

    r167346 r167428  
     12014-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
    1372014-04-16  Jeongeun Kim  <je_julie.kim@samsung.com>
    238
  • trunk/Source/WebKit/efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp

    r167342 r167428  
    2525#include "CairoUtilities.h"
    2626#include "CairoUtilitiesEfl.h"
     27#include "FrameView.h"
    2728#include "GraphicsLayerTextureMapper.h"
    2829#include "MainFrame.h"
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

    r166831 r167428  
    515515#endif
    516516
    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 #else
    522     UNUSED_PARAM(updateRect);
    523     notImplemented();
    524 #endif
    525 }
    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 
    551517void ChromeClientEfl::loadIconForFiles(const Vector<String>&, FileIconLoader*)
    552518{
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h

    r166831 r167428  
    157157    virtual void scrollRectIntoView(const IntRect&) const override { }
    158158
    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 { }
    163163
    164164    virtual void dispatchViewportPropertiesDidChange(const ViewportArguments&) const override;
  • trunk/Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp

    r164245 r167428  
    2525
    2626#include "EflInspectorUtilities.h"
     27#include "FrameView.h"
    2728#include "InspectorController.h"
    2829#include "MainFrame.h"
  • trunk/Source/WebKit/efl/ewk/ewk_view.cpp

    r167346 r167428  
    7070#include "Settings.h"
    7171#include "SoupNetworkSession.h"
    72 #include "TiledBackingStore.h"
    7372#include "c_instance.h"
    7473#include "ewk_contextmenu_private.h"
     
    7776#include "ewk_history_private.h"
    7877#include "ewk_js_private.h"
    79 #include "ewk_paint_context_private.h"
    8078#include "ewk_private.h"
    8179#include "ewk_settings_private.h"
     
    264262        WebCore::PopupMenuClient* menuClient;
    265263    } popup;
    266     struct {
    267         Eina_Rectangle* array;
    268         size_t count;
    269         size_t allocated;
    270     } repaints;
    271264    unsigned int imh; /**< input method hints */
    272265    struct {
     
    422415}
    423416
    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 
    469417// Default Event Handling //////////////////////////////////////////////
    470418static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
     
    833781    /* do not delete priv->main_frame */
    834782
    835     free(priv->repaints.array);
    836 
    837783    eina_stringshare_del(priv->settings.userAgent);
    838784    eina_stringshare_del(priv->settings.userStylesheet);
     
    10551001        smartData->view.h = height;
    10561002
    1057         _ewk_view_repaint_add(priv, 0, 0, width, height);
    1058 
    10591003        // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set).
    10601004        evas_object_smart_callback_call(ewkView, "view,resized", 0);
     
    11281072    ewk_frame_scroll_set(smartData->main_frame, x, y);
    11291073    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);
    11361074}
    11371075
     
    13141252    api->zoom_weak_set = _ewk_view_smart_zoom_weak_set;
    13151253    api->zoom_weak_smooth_scale_set = _ewk_view_smart_zoom_weak_smooth_scale_set;
    1316     api->flush = _ewk_view_smart_flush;
    13171254    api->disable_render = _ewk_view_smart_disable_render;
    13181255    api->enable_render = _ewk_view_smart_enable_render;
     
    26632600
    26642601/**
    2665  * Gets the internal array of repaint requests.
    2666  *
    2667  * This array should not be modified anyhow. It should be processed
    2668  * immediately as any further ewk_view call might change it, like
    2669  * those that add repaints or flush them, so be sure that your code
    2670  * 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 want
    2679  *       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 repainted
    2703  * @param height height of area to be repainted
    2704  *
    2705  * @note this is not for general use but just for subclasses that want
    2706  *       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 /**
    27152602 * Do layout if required, applied recursively.
    27162603 *
     
    27302617    }
    27312618    view->updateLayoutAndStyleIfNeededRecursive();
    2732 }
    2733 
    2734 /* internal methods ****************************************************/
    2735 /**
    2736  * @internal
    2737  * Paints using given graphics context the given area.
    2738  *
    2739  * This uses viewport relative area and will also handle scrollbars
    2740  * and other extra elements. See ewk_view_paint_contents() for the
    2741  * alternative function.
    2742  *
    2743  * @param priv the pointer to the private data of the view to use as paint source
    2744  * @param cr the cairo context to use as paint destination, its state will
    2745  *        be saved before operation and restored afterwards
    2746  * @param area viewport relative geometry to paint
    2747  *
    2748  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
    2749  *
    2750  * @note This is an easy to use version, but internal structures are
    2751  *       always created, then graphics context is clipped, then
    2752  *       painted, restored and destroyed. This might not be optimum,
    2753  *       so using @a Ewk_Paint_Context may be a better solutions
    2754  *       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 want
    2760  *       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  * @internal
    2780  * Paints just contents using given graphics context the given area.
    2781  *
    2782  * This uses absolute coordinates for area and will just handle
    2783  * contents, no scrollbars or extras. See ewk_view_paint() for the
    2784  * alternative solution.
    2785  *
    2786  * @param priv the pointer to the private data of the view to use as paint source
    2787  * @param cr the cairo context to use as paint destination, its state will
    2788  *        be saved before operation and restored afterwards
    2789  * @param area absolute geometry to paint
    2790  *
    2791  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
    2792  *
    2793  * @note This is an easy to use version, but internal structures are
    2794  *       always created, then graphics context is clipped, then
    2795  *       painted, restored and destroyed. This might not be optimum,
    2796  *       so using @a Ewk_Paint_Context may be a better solutions
    2797  *       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 want
    2803  *       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;
    28212619}
    28222620
     
    35093307}
    35103308
    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 
    35323309/**
    35333310 * @internal
     
    46044381}
    46054382
    4606 #if USE(TILED_BACKING_STORE)
    4607 /**
    4608  * @internal
    4609  * Invalidate given area to repaint. The backing store will mark tiles that are
    4610  * in the area as dirty.
    4611  *
    4612  * @param ewkView View.
    4613  * @param area Area to invalidate
    4614  */
    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 #endif
    4625 
    46264383namespace EWKPrivate {
    46274384
  • trunk/Source/WebKit/efl/ewk/ewk_view_private.h

    r167342 r167428  
    2727#include "Page.h"
    2828#include "Widget.h"
    29 #include "ewk_paint_context_private.h"
    3029#include "ewk_view.h"
    3130
     
    9695bool ewk_view_run_open_panel(Evas_Object* ewkView, Evas_Object* frame, Ewk_File_Chooser* fileChooser, Eina_List** selectedFilenames);
    9796
    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);
    10097WebCore::Page* ewk_view_core_page_get(const Evas_Object* ewkView);
    10198
     
    119116bool ewk_view_focus_can_cycle(Evas_Object* ewkView, Ewk_Focus_Direction direction);
    120117
    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 
    124118#if ENABLE(NETSCAPE_PLUGIN_API)
    125119void ewk_view_js_window_object_clear(Evas_Object* ewkView, Evas_Object* frame);
    126 #endif
    127 
    128 #if USE(TILED_BACKING_STORE)
    129 void ewk_view_tiled_backing_store_invalidate(Evas_Object* ewkView, const WebCore::IntRect& area);
    130120#endif
    131121
     
    134124bool ewk_view_need_touch_events_get(const Evas_Object*);
    135125#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);
    140126
    141127void ewk_view_layout_if_needed_recursive(Ewk_View_Private_Data* priv);
Note: See TracChangeset for help on using the changeset viewer.