Changeset 46591 in webkit
- Timestamp:
- Jul 30, 2009 11:25:42 AM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r46590 r46591 1 2009-07-30 Yong Li <yong.li@torchmobile.com> 2 3 Reviewed by George Staikos. 4 5 WINCE PORT: some files modified to build for WINCE 6 https://bugs.webkit.org/show_bug.cgi?id=27816 7 8 * accessibility/AccessibilityObject.h: 9 * page/win/EventHandlerWin.cpp: 10 (WebCore::EventHandler::createDraggingClipboard): 11 * platform/win/PlatformMouseEventWin.cpp: 12 (WebCore::messageToEventType): 13 (WebCore::PlatformMouseEvent::PlatformMouseEvent): 14 * platform/win/PlatformScreenWin.cpp: 15 (WebCore::deviceInfoForWidget): 16 (WebCore::screenIsMonochrome): 17 * platform/win/PopupMenuWin.cpp: 18 (WebCore::PopupMenu::show): 19 (WebCore::PopupMenu::paint): 20 (WebCore::registerPopup): 21 (WebCore::PopupWndProc): 22 1 23 2009-07-30 Yong Li <yong.li@torchmobile.com> 2 24 -
trunk/WebCore/accessibility/AccessibilityObject.h
r46555 r46591 41 41 #if PLATFORM(MAC) 42 42 #include <wtf/RetainPtr.h> 43 #elif PLATFORM(WIN) 43 #elif PLATFORM(WIN) && !PLATFORM(WINCE) 44 44 #include "AccessibilityObjectWrapperWin.h" 45 45 #include "COMPtr.h" … … 429 429 #if PLATFORM(MAC) 430 430 RetainPtr<AccessibilityObjectWrapper> m_wrapper; 431 #elif PLATFORM(WIN) 431 #elif PLATFORM(WIN) && !PLATFORM(WINCE) 432 432 COMPtr<AccessibilityObjectWrapper> m_wrapper; 433 433 #elif PLATFORM(GTK) -
trunk/WebCore/page/win/EventHandlerWin.cpp
r38211 r46591 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 88 89 PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const 89 90 { 91 #if PLATFORM(WINCE) 92 return 0; 93 #else 90 94 COMPtr<WCDataObject> dataObject; 91 95 WCDataObject::createInstance(&dataObject); 92 96 return ClipboardWin::create(true, dataObject.get(), ClipboardWritable); 97 #endif 93 98 } 94 99 -
trunk/WebCore/platform/win/PlatformMouseEventWin.cpp
r44270 r46591 1 1 /* 2 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2007-2008 Torch Mobile Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 64 65 return MouseEventReleased; 65 66 67 #if !PLATFORM(WINCE) 66 68 case WM_MOUSELEAVE: 69 #endif 67 70 case WM_MOUSEMOVE: 68 71 return MouseEventMoved; … … 105 108 break; 106 109 case WM_MOUSEMOVE: 110 #if !PLATFORM(WINCE) 107 111 case WM_MOUSELEAVE: 112 #endif 108 113 if (wParam & MK_LBUTTON) 109 114 m_button = LeftButton; -
trunk/WebCore/platform/win/PlatformScreenWin.cpp
r37271 r46591 1 1 /* 2 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Torch Mobile, Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 50 51 static DEVMODE deviceInfoForWidget(Widget* widget) 51 52 { 52 MONITORINFOEX monitorInfo = monitorInfoForWidget(widget);53 54 53 DEVMODE deviceInfo; 55 54 deviceInfo.dmSize = sizeof(DEVMODE); 56 55 deviceInfo.dmDriverExtra = 0; 56 #if PLATFORM(WINCE) 57 if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &deviceInfo)) 58 deviceInfo.dmBitsPerPel = 16; 59 #else 60 MONITORINFOEX monitorInfo = monitorInfoForWidget(widget); 57 61 EnumDisplaySettings(monitorInfo.szDevice, ENUM_CURRENT_SETTINGS, &deviceInfo); 62 #endif 58 63 59 64 return deviceInfo; … … 75 80 bool screenIsMonochrome(Widget* widget) 76 81 { 82 #if PLATFORM(WINCE) 83 // EnumDisplaySettings doesn't set dmColor in DEVMODE. 84 return false; 85 #else 77 86 DEVMODE deviceInfo = deviceInfoForWidget(widget); 78 87 return deviceInfo.dmColor == DMCOLOR_MONOCHROME; 88 #endif 79 89 } 80 90 -
trunk/WebCore/platform/win/PopupMenuWin.cpp
r46564 r46591 1 1 /* 2 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007-2009 Torch Mobile Inc. 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 40 41 #include <tchar.h> 41 42 #include <windows.h> 43 #if PLATFORM(WINCE) 44 #include <ResDefCE.h> 45 #define MAKEPOINTS(l) (*((POINTS FAR *)&(l))) 46 #endif 42 47 43 48 using std::min; … … 111 116 return; 112 117 118 #if PLATFORM(WINCE) 119 ::SetWindowLong(m_popup, 0, (LONG)this); 120 #else 113 121 ::SetWindowLongPtr(m_popup, 0, (LONG_PTR)this); 122 #endif 114 123 } 115 124 … … 125 134 // Note: Must use 'BOOL' and 'FALSE' instead of 'bool' and 'false' to avoid stack corruption with SystemParametersInfo 126 135 BOOL shouldAnimate = FALSE; 136 #if !PLATFORM(WINCE) 127 137 ::SystemParametersInfo(SPI_GETCOMBOBOXANIMATION, 0, &shouldAnimate, 0); 128 138 … … 139 149 } 140 150 } else 151 #endif 141 152 ::ShowWindow(m_popup, SW_SHOWNORMAL); 142 153 ::SetCapture(m_popup); … … 453 464 } 454 465 if (!m_bmp) { 466 #if PLATFORM(WINCE) 467 BitmapInfo bitmapInfo(true, clientRect().width(), clientRect().height()); 468 #else 455 469 BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(clientRect().size()); 456 470 #endif 457 471 void* pixels = 0; 458 472 m_bmp = ::CreateDIBSection(m_DC, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0); … … 585 599 return true; 586 600 601 #if PLATFORM(WINCE) 602 WNDCLASS wcex; 603 #else 587 604 WNDCLASSEX wcex; 588 589 605 wcex.cbSize = sizeof(WNDCLASSEX); 590 606 wcex.hIconSm = 0; 591 607 wcex.style = CS_DROPSHADOW; 608 #endif 609 592 610 wcex.lpfnWndProc = PopupWndProc; 593 611 wcex.cbClsExtra = 0; … … 599 617 wcex.lpszMenuName = 0; 600 618 wcex.lpszClassName = kPopupWindowClassName; 601 wcex.hIconSm = 0;602 619 603 620 haveRegisteredWindowClass = true; 604 621 622 #if PLATFORM(WINCE) 623 return ::RegisterClass(&wcex); 624 #else 605 625 return ::RegisterClassEx(&wcex); 626 #endif 606 627 } 607 628 … … 610 631 { 611 632 LRESULT lResult = 0; 633 #if PLATFORM(WINCE) 634 LONG longPtr = GetWindowLong(hWnd, 0); 635 #else 612 636 LONG_PTR longPtr = GetWindowLongPtr(hWnd, 0); 637 #endif 613 638 PopupMenu* popup = reinterpret_cast<PopupMenu*>(longPtr); 614 639 … … 727 752 728 753 BOOL shouldHotTrack = FALSE; 754 #if !PLATFORM(WINCE) 729 755 ::SystemParametersInfo(SPI_GETHOTTRACKING, 0, &shouldHotTrack, 0); 756 #endif 730 757 731 758 RECT bounds; … … 812 839 } 813 840 break; 841 #if !PLATFORM(WINCE) 814 842 case WM_PRINTCLIENT: 815 843 if (popup) 816 844 popup->paint(popup->clientRect(), (HDC)wParam); 817 845 break; 846 #endif 818 847 default: 819 848 lResult = DefWindowProc(hWnd, message, wParam, lParam);
Note: See TracChangeset
for help on using the changeset viewer.