Changeset 171724 in webkit


Ignore:
Timestamp:
Jul 29, 2014 12:52:11 AM (10 years ago)
Author:
ryuan.choi@samsung.com
Message:

[EFL] Alpha value of ewk_view_bg_color_set is not working
https://bugs.webkit.org/show_bug.cgi?id=135333

Reviewed by Gyuyoung Kim.

evas_object_image_alpha_set should be called for the transparent evas object.

  • UIProcess/API/efl/EwkView.cpp:

(EwkView::handleEvasObjectColorSet):
(EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.

  • UIProcess/API/efl/EwkView.h:
  • UIProcess/API/efl/ewk_view.cpp:

(ewk_view_bg_color_set): Moved the logic to EwkView.

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r171715 r171724  
     12014-07-29  Ryuan Choi  <ryuan.choi@samsung.com>
     2
     3        [EFL] Alpha value of ewk_view_bg_color_set is not working
     4        https://bugs.webkit.org/show_bug.cgi?id=135333
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        evas_object_image_alpha_set should be called for the transparent evas object.
     9
     10        * UIProcess/API/efl/EwkView.cpp:
     11        (EwkView::handleEvasObjectColorSet):
     12        (EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
     13        * UIProcess/API/efl/EwkView.h:
     14        * UIProcess/API/efl/ewk_view.cpp:
     15        (ewk_view_bg_color_set): Moved the logic to EwkView.
     16
    1172014-07-28  Mark Rowe  <mrowe@apple.com>
    218
  • trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp

    r171291 r171724  
    12371237    ASSERT(smartData);
    12381238
    1239     evas_object_image_alpha_set(smartData->image, alpha < 255);
     1239    int backgroundAlpha;
     1240    WKViewGetBackgroundColor(toEwkView(smartData)->wkView(), nullptr, nullptr, nullptr, &backgroundAlpha);
     1241    evas_object_image_alpha_set(smartData->image, alpha < 255 || backgroundAlpha < 255);
    12401242    parentSmartClass.color_set(evasObject, red, green, blue, alpha);
    12411243}
     
    14161418}
    14171419
     1420void EwkView::setBackgroundColor(int red, int green, int blue, int alpha)
     1421{
     1422    if (red == 255 && green == 255 && blue == 255 && alpha == 255)
     1423        WKViewSetDrawsBackground(wkView(), true);
     1424    else
     1425        WKViewSetDrawsBackground(wkView(), false);
     1426
     1427    int objectAlpha;
     1428    Evas_Object* image = smartData()->image;
     1429    evas_object_color_get(image, nullptr, nullptr, nullptr, &objectAlpha);
     1430    evas_object_image_alpha_set(image, alpha < 255 || objectAlpha < 255);
     1431
     1432    WKViewSetBackgroundColor(wkView(), red, green, blue, alpha);
     1433}
     1434
    14181435Evas_Smart_Class EwkView::parentSmartClass = EVAS_SMART_CLASS_INIT_NULL;
    14191436
  • trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h

    r170347 r171724  
    182182    bool scrollBy(const WebCore::IntSize&);
    183183
     184    void setBackgroundColor(int red, int green, int blue, int alpha);
     185
    184186    void didFindZoomableArea(const WKPoint&, const WKRect&);
    185187
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp

    r169997 r171724  
    734734    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl);
    735735
    736     if (red == 255 && green == 255 && blue == 255 && alpha == 255)
    737         WKViewSetDrawsBackground(impl->wkView(), true);
    738     else
    739         WKViewSetDrawsBackground(impl->wkView(), false);
    740 
    741     WKViewSetBackgroundColor(impl->wkView(), red, green, blue, alpha);
     736    impl->setBackgroundColor(red, green, blue, alpha);
    742737}
    743738
Note: See TracChangeset for help on using the changeset viewer.