Changeset 287868 in webkit
- Timestamp:
- Jan 10, 2022, 9:04:15 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
- 1 copied
-
ChangeLog (modified) (1 diff)
-
PlatformWin.cmake (modified) (1 diff)
-
platform/graphics/FloatRect.h (modified) (1 diff)
-
platform/graphics/win/FloatRectWin.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/win/IntRectWin.cpp ) (2 diffs)
-
platform/graphics/win/IntRectWin.cpp (modified) (4 diffs)
-
platform/win/PopupMenuWin.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r287867 r287868 1 2022-01-10 Yusuke Suzuki <ysuzuki@apple.com> 2 3 Fix Windows build after r287829 4 https://bugs.webkit.org/show_bug.cgi?id=235054 5 6 Reviewed by Sam Weinig. 7 8 FTW removal accidentally removed RECT handling in FloatRect while it is not a part of Direct2D. 9 This patch recovers it. And we also use IntRect in some places since it is proper one. 10 11 * PlatformWin.cmake: 12 * platform/graphics/FloatRect.h: 13 * platform/graphics/win/FloatRectWin.cpp: Copied from Source/WebCore/platform/graphics/win/IntRectWin.cpp. 14 (WebCore::FloatRect::FloatRect): 15 * platform/graphics/win/IntRectWin.cpp: 16 (WebCore::IntRect::IntRect): 17 (WebCore::IntRect::operator RECT const): 18 * platform/win/PopupMenuWin.cpp: 19 (WebCore::monitorFromHwnd): 20 (WebCore::PopupMenuWin::calculatePositionAndSize): 21 1 22 2022-01-10 Alan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/PlatformWin.cmake
r287829 r287868 43 43 platform/graphics/win/DIBPixelData.cpp 44 44 platform/graphics/win/DisplayRefreshMonitorWin.cpp 45 platform/graphics/win/FloatRectWin.cpp 45 46 platform/graphics/win/FontCacheWin.cpp 46 47 platform/graphics/win/FontDescriptionWin.cpp -
trunk/Source/WebCore/platform/graphics/FloatRect.h
r287829 r287868 223 223 #endif 224 224 225 #if PLATFORM(WIN) 226 WEBCORE_EXPORT FloatRect(const RECT&); 227 #endif 228 225 229 static FloatRect infiniteRect(); 226 230 bool isInfinite() const; -
trunk/Source/WebCore/platform/graphics/win/FloatRectWin.cpp
r287867 r287868 1 2 1 /* 3 * Copyright (C) 20 06Apple Inc. All rights reserved.2 * Copyright (C) 2022 Apple Inc. All rights reserved. 4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 22 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 24 */ 26 25 27 26 #include "config.h" 28 #include " IntRect.h"27 #include "FloatRect.h" 29 28 30 29 #include <windows.h> 31 #include <wtf/MathExtras.h>32 30 33 31 namespace WebCore { 34 32 35 IntRect::IntRect(const RECT& r) 36 : m_location(IntPoint(r.left, r.top)), m_size(IntSize(r.right - r.left, r.bottom - r.top)) 33 FloatRect::FloatRect(const RECT& r) 34 : m_location(r.left, r.top) 35 , m_size(r.right - r.left, r.bottom - r.top) 37 36 { 38 37 } 39 38 40 IntRect::operator RECT() const41 {42 RECT rect = { x(), y(), maxX(), maxY() };43 return rect;44 39 } 45 46 } -
trunk/Source/WebCore/platform/graphics/win/IntRectWin.cpp
r287829 r287868 1 1 2 2 /* 3 * Copyright (C) 2006 Apple Inc. All rights reserved.3 * Copyright (C) 2006-2022 Apple Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 22 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 25 */ 26 26 … … 34 34 35 35 IntRect::IntRect(const RECT& r) 36 : m_location(IntPoint(r.left, r.top)), m_size(IntSize(r.right - r.left, r.bottom - r.top)) 36 : m_location(r.left, r.top) 37 , m_size(r.right - r.left, r.bottom - r.top) 37 38 { 38 39 } … … 40 41 IntRect::operator RECT() const 41 42 { 42 RECT rect = { x(), y(), maxX(), maxY() }; 43 return rect; 43 return { x(), y(), maxX(), maxY() }; 44 44 } 45 45 -
trunk/Source/WebCore/platform/win/PopupMenuWin.cpp
r285640 r287868 98 98 } 99 99 100 static FloatRect monitorFromHwnd(HWND hwnd)100 static IntRect monitorFromHwnd(HWND hwnd) 101 101 { 102 102 HMONITOR monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY); … … 306 306 ::MoveWindow(m_popup, absoluteScreenCoords.x(), absoluteScreenCoords.y(), absoluteScreenCoords.width(), absoluteScreenCoords.height(), false); 307 307 308 FloatRect screen = monitorFromHwnd(m_popup);308 IntRect screen = monitorFromHwnd(m_popup); 309 309 310 310 // Now we determine the actual location and measurements of the popup itself.
Note:
See TracChangeset
for help on using the changeset viewer.