Changeset 235840 in webkit


Ignore:
Timestamp:
Sep 9, 2018 10:12:44 PM (6 years ago)
Author:
Fujii Hironori
Message:

[Win][Clang] Add FloatRect(const RECT&) constructor
https://bugs.webkit.org/show_bug.cgi?id=189398

Reviewed by Alex Christensen.

While trying to build WebKit WinCairo port with the latest Clang
(Bug 171618), the following compilation errors were reported.

error: no viable conversion from returned value of type 'RECT' (aka 'tagRECT') to function return type 'WebCore::FloatRect'

No new tests (No behavior change).

  • platform/graphics/FloatRect.h:
  • platform/graphics/win/FloatRectDirect2D.cpp:

(WebCore::FloatRect::FloatRect): Added a new constructor taking a RECT as the argument.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r235833 r235840  
     12018-09-09  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][Clang] Add FloatRect(const RECT&) constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=189398
     5
     6        Reviewed by Alex Christensen.
     7
     8        While trying to build WebKit WinCairo port with the latest Clang
     9        (Bug 171618), the following compilation errors were reported.
     10
     11          error: no viable conversion from returned value of type 'RECT' (aka 'tagRECT') to function return type 'WebCore::FloatRect'
     12
     13        No new tests (No behavior change).
     14
     15        * platform/graphics/FloatRect.h:
     16        * platform/graphics/win/FloatRectDirect2D.cpp:
     17        (WebCore::FloatRect::FloatRect): Added a new constructor taking a RECT as the argument.
     18
    1192018-09-08  Andy Estes  <aestes@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/FloatRect.h

    r235358 r235840  
    4646
    4747#if PLATFORM(WIN)
     48typedef struct tagRECT RECT;
    4849struct D2D_RECT_F;
    4950typedef D2D_RECT_F D2D1_RECT_F;
     
    196197
    197198#if PLATFORM(WIN)
     199    WEBCORE_EXPORT FloatRect(const RECT&);
    198200    WEBCORE_EXPORT FloatRect(const D2D1_RECT_F&);
    199201    WEBCORE_EXPORT operator D2D1_RECT_F() const;
  • trunk/Source/WebCore/platform/graphics/win/FloatRectDirect2D.cpp

    r207681 r235840  
    5151}
    5252
     53FloatRect::FloatRect(const RECT& rect)
     54    : m_location(rect.left, rect.top)
     55    , m_size(rect.right - rect.left, rect.bottom - rect.top)
     56{
     57}
     58
    5359FloatRect::FloatRect(const D2D1_RECT_F& r)
    5460{
Note: See TracChangeset for help on using the changeset viewer.