Changeset 85958 in webkit
- Timestamp:
- May 6, 2011 10:30:10 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85956 r85958 1 2011-05-06 Adam Roben <aroben@apple.com> 2 3 Add a WindowGeometry struct for use in the ScheduleChildWindowGeometryUpdate message 4 5 This will make it easier to add more info to this message in the future (like whether the 6 window is visible). 7 8 Fixes <http://webkit.org/b/60374> Adding parameters to ScheduleChildWindowGeometryUpdate 9 message is tedious 10 11 Reviewed by Anders Carlsson. 12 13 * Scripts/webkit2/messages.py: 14 (struct_or_class): Added WindowGeometry to the list of structs. 15 16 * Shared/win/WindowGeometry.cpp: Added. 17 * Shared/win/WindowGeometry.h: Added. 18 19 * win/WebKit2.vcproj: Added new files. 20 21 * UIProcess/PageClient.h: 22 * UIProcess/WebPageProxy.h: 23 * UIProcess/WebPageProxy.messages.in: 24 * UIProcess/win/WebPageProxyWin.cpp: 25 (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate): 26 * UIProcess/win/WebView.cpp: 27 (WebKit::WebView::scheduleChildWindowGeometryUpdate): 28 (WebKit::WebView::updateChildWindowGeometries): 29 * UIProcess/win/WebView.h: 30 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: 31 (WebKit::NetscapePlugin::platformGeometryDidChange): 32 * WebProcess/Plugins/PluginController.h: 33 * WebProcess/Plugins/PluginView.cpp: 34 (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate): 35 * WebProcess/Plugins/PluginView.h: 36 * WebProcess/WebPage/WebPage.h: 37 * WebProcess/WebPage/win/WebPageWin.cpp: 38 (WebKit::WebPage::scheduleChildWindowGeometryUpdate): 39 Changed to use WindowGeometry. 40 1 41 2011-05-06 David Kilzer <ddkilzer@apple.com> 2 42 -
trunk/Source/WebKit2/Scripts/webkit2/messages.py
r85571 r85958 275 275 'WebKit::WebPreferencesStore', 276 276 'WebKit::WebProcessCreationParameters', 277 'WebKit::WindowGeometry', 277 278 ]) 278 279 -
trunk/Source/WebKit2/UIProcess/PageClient.h
r85795 r85958 54 54 class WebEditCommandProxy; 55 55 class WebPopupMenuProxy; 56 57 #if PLATFORM(WIN) 58 struct WindowGeometry; 59 #endif 56 60 57 61 class PageClient { … … 140 144 virtual HWND nativeWindow() = 0; 141 145 virtual void setGestureReachedScrollingLimit(bool) = 0; 142 virtual void scheduleChildWindowGeometryUpdate( HWND, const WebCore::IntRect& rectInParentClientCoordinates, const WebCore::IntRect& clipRectInChildClientCoordinates) = 0;146 virtual void scheduleChildWindowGeometryUpdate(const WindowGeometry&) = 0; 143 147 #endif 144 148 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r85908 r85958 112 112 struct WebPageCreationParameters; 113 113 struct WebPopupItem; 114 115 #if PLATFORM(WIN) 116 struct WindowGeometry; 117 #endif 114 118 115 119 #if ENABLE(GESTURE_EVENTS) … … 736 740 737 741 #if PLATFORM(WIN) 738 void scheduleChildWindowGeometryUpdate( uint64_t window, const WebCore::IntRect& rectInParentClientCoordinates, const WebCore::IntRect& clipRectInChildClientCoordinates);742 void scheduleChildWindowGeometryUpdate(const WindowGeometry&); 739 743 #endif 740 744 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r85908 r85958 244 244 245 245 # Miscellaneous Windows messages 246 ScheduleChildWindowGeometryUpdate( uint64_t window, WebCore::IntRect rectInParentClientCoordinates, WebCore::IntRect clipRectInChildClientCoordinates)246 ScheduleChildWindowGeometryUpdate(WebKit::WindowGeometry geometry) 247 247 #endif 248 248 -
trunk/Source/WebKit2/UIProcess/win/WebPageProxyWin.cpp
r85860 r85958 71 71 } 72 72 73 void WebPageProxy::scheduleChildWindowGeometryUpdate( uint64_t window, const IntRect& rectInParentClientCoordinates, const IntRect& clipRectInChildClientCoordinates)73 void WebPageProxy::scheduleChildWindowGeometryUpdate(const WindowGeometry& geometry) 74 74 { 75 m_pageClient->scheduleChildWindowGeometryUpdate( reinterpret_cast<HWND>(window), rectInParentClientCoordinates, clipRectInChildClientCoordinates);75 m_pageClient->scheduleChildWindowGeometryUpdate(geometry); 76 76 } 77 77 -
trunk/Source/WebKit2/UIProcess/win/WebView.cpp
r85808 r85958 43 43 #include "WebPageProxy.h" 44 44 #include "WebPopupMenuProxyWin.h" 45 #include "WindowGeometry.h" 45 46 #include <Commctrl.h> 46 47 #include <WebCore/BitmapInfo.h> … … 1530 1531 } 1531 1532 1532 void WebView::scheduleChildWindowGeometryUpdate(HWND window, const WebCore::IntRect& rectInParentClientCoordinates, const WebCore::IntRect& clipRectInChildClientCoordinates) 1533 { 1534 ChildWindowGeometry geometry; 1535 geometry.rectInParentClientCoordinates = rectInParentClientCoordinates; 1536 geometry.clipRectInChildClientCoordinates = clipRectInChildClientCoordinates; 1537 1538 m_childWindowGeometriesToUpdate.set(window, geometry); 1533 void WebView::scheduleChildWindowGeometryUpdate(const WindowGeometry& geometry) 1534 { 1535 m_childWindowGeometriesToUpdate.set(geometry.window, geometry); 1539 1536 } 1540 1537 … … 1552 1549 void WebView::updateChildWindowGeometries() 1553 1550 { 1554 HashMap<HWND, ChildWindowGeometry> geometriesToUpdate;1551 HashMap<HWND, WindowGeometry> geometriesToUpdate; 1555 1552 geometriesToUpdate.swap(m_childWindowGeometriesToUpdate); 1556 1553 1557 1554 HDWP deferWindowPos = ::BeginDeferWindowPos(geometriesToUpdate.size()); 1558 1555 1559 HashMap<HWND, ChildWindowGeometry>::const_iterator end = geometriesToUpdate.end();1560 for (HashMap<HWND, ChildWindowGeometry>::const_iterator it = geometriesToUpdate.begin(); it != end; ++it) {1561 HWND window = it->first; 1562 if (!::IsWindow( window))1556 for (HashMap<HWND, WindowGeometry>::const_iterator::Values it = geometriesToUpdate.begin().values(), end = geometriesToUpdate.end().values(); it != end; ++it) { 1557 const WindowGeometry& geometry = *it; 1558 1559 if (!::IsWindow(geometry.window)) 1563 1560 continue; 1564 1561 1565 const ChildWindowGeometry& geometry = it->second; 1566 1567 const IntRect& windowRect = geometry.rectInParentClientCoordinates; 1568 deferWindowPos = ::DeferWindowPos(deferWindowPos, window, 0, windowRect.x(), windowRect.y(), windowRect.width(), windowRect.height(), SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); 1569 1570 const IntRect& clipRect = geometry.clipRectInChildClientCoordinates; 1571 setWindowRegion(window, adoptPtr(::CreateRectRgn(clipRect.x(), clipRect.y(), clipRect.maxX(), clipRect.maxY()))); 1562 deferWindowPos = ::DeferWindowPos(deferWindowPos, geometry.window, 0, geometry.frame.x(), geometry.frame.y(), geometry.frame.width(), geometry.frame.height(), SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER); 1563 1564 setWindowRegion(geometry.window, adoptPtr(::CreateRectRgn(geometry.clipRect.x(), geometry.clipRect.y(), geometry.clipRect.maxX(), geometry.clipRect.maxY()))); 1572 1565 } 1573 1566 -
trunk/Source/WebKit2/UIProcess/win/WebView.h
r85795 r85958 212 212 213 213 virtual HWND nativeWindow(); 214 virtual void scheduleChildWindowGeometryUpdate( HWND, const WebCore::IntRect& rectInParentClientCoordinates, const WebCore::IntRect& clipRectInChildClientCoordinates);214 virtual void scheduleChildWindowGeometryUpdate(const WindowGeometry&); 215 215 216 216 virtual void setGestureReachedScrollingLimit(bool limitReached) { m_gestureReachedScrollingLimit = limitReached; } … … 269 269 bool m_gestureReachedScrollingLimit; 270 270 271 struct ChildWindowGeometry { 272 WebCore::IntRect rectInParentClientCoordinates; 273 WebCore::IntRect clipRectInChildClientCoordinates; 274 }; 275 276 HashMap<HWND, ChildWindowGeometry> m_childWindowGeometriesToUpdate; 271 HashMap<HWND, WindowGeometry> m_childWindowGeometriesToUpdate; 277 272 278 273 #if ENABLE(FULLSCREEN_API) -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp
r85795 r85958 29 29 #include "PluginController.h" 30 30 #include "WebEvent.h" 31 #include "WindowGeometry.h" 31 32 #include <WebCore/DefWndProcWindowClass.h> 32 33 #include <WebCore/GraphicsContext.h> … … 152 153 ::SetWindowPos(m_window, 0, 0, 0, m_frameRect.width(), m_frameRect.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER); 153 154 154 m_pluginController->scheduleWindowedPluginGeometryUpdate(m_window, m_frameRect, clipRectInPluginWindowCoordinates); 155 WindowGeometry geometry; 156 geometry.window = m_window; 157 geometry.frame = m_frameRect; 158 geometry.clipRect = clipRectInPluginWindowCoordinates; 159 160 m_pluginController->scheduleWindowedPluginGeometryUpdate(geometry); 155 161 } 156 162 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginController.h
r85795 r85958 39 39 40 40 namespace WebKit { 41 42 #if PLATFORM(WIN) 43 struct WindowGeometry; 44 #endif 41 45 42 46 class PluginController { … … 93 97 // Tells the controller that the given HWND needs to be positioned and clipped to the given 94 98 // coordinates sometime soon. The controller will decide exactly when this will happen. 95 virtual void scheduleWindowedPluginGeometryUpdate( HWND, const WebCore::IntRect& rectInParentClientCoordinates, const WebCore::IntRect& clipRectInPluginWindowCoordinates) = 0;99 virtual void scheduleWindowedPluginGeometryUpdate(const WindowGeometry&) = 0; 96 100 #endif 97 101 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r85795 r85958 1005 1005 } 1006 1006 1007 void PluginView::scheduleWindowedPluginGeometryUpdate( HWND pluginWindow, const IntRect& rectInParentClientCoordinates, const IntRect& clipRectInPluginWindowCoordinates)1008 { 1009 m_webPage->scheduleChildWindowGeometryUpdate( pluginWindow, rectInParentClientCoordinates, clipRectInPluginWindowCoordinates);1007 void PluginView::scheduleWindowedPluginGeometryUpdate(const WindowGeometry& geometry) 1008 { 1009 m_webPage->scheduleChildWindowGeometryUpdate(geometry); 1010 1010 } 1011 1011 #endif -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h
r85795 r85958 133 133 #if PLATFORM(WIN) 134 134 virtual HWND nativeParentWindow(); 135 virtual void scheduleWindowedPluginGeometryUpdate( HWND, const WebCore::IntRect& rectInClientCoordinates, const WebCore::IntRect& clipRectInPluginWindowCoordinates);135 virtual void scheduleWindowedPluginGeometryUpdate(const WindowGeometry&); 136 136 #endif 137 137 #if PLATFORM(MAC) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r85806 r85958 113 113 struct WebPreferencesStore; 114 114 115 #if PLATFORM(WIN) 116 struct WindowGeometry; 117 #endif 118 115 119 #if ENABLE(GESTURE_EVENTS) 116 120 class WebGestureEvent; … … 261 265 #elif PLATFORM(WIN) 262 266 HWND nativeWindow() const { return m_nativeWindow; } 263 void scheduleChildWindowGeometryUpdate( HWND, const WebCore::IntRect& rectInParentClientCoordinates, const WebCore::IntRect& clipRectInChildClientCoordinates);267 void scheduleChildWindowGeometryUpdate(const WindowGeometry&); 264 268 #endif 265 269 -
trunk/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
r85863 r85958 33 33 #include "WebPreferencesStore.h" 34 34 #include "WebProcess.h" 35 #include "WindowGeometry.h" 35 36 #include <WebCore/FocusController.h> 36 37 #include <WebCore/FontRenderingMode.h> … … 464 465 } 465 466 466 void WebPage::scheduleChildWindowGeometryUpdate( HWND window, const IntRect& rectInParentClientCoordinates, const IntRect& clipRectInChildClientCoordinates)467 { 468 WebProcess::shared().connection()->send(Messages::WebPageProxy::ScheduleChildWindowGeometryUpdate( reinterpret_cast<uint64_t>(window), rectInParentClientCoordinates, clipRectInChildClientCoordinates), m_pageID);467 void WebPage::scheduleChildWindowGeometryUpdate(const WindowGeometry& geometry) 468 { 469 WebProcess::shared().connection()->send(Messages::WebPageProxy::ScheduleChildWindowGeometryUpdate(geometry), m_pageID); 469 470 } 470 471 -
trunk/Source/WebKit2/win/WebKit2.vcproj
r85756 r85958 1282 1282 </FileConfiguration> 1283 1283 </File> 1284 <File 1285 RelativePath="..\Shared\win\WindowGeometry.cpp" 1286 > 1287 </File> 1288 <File 1289 RelativePath="..\Shared\win\WindowGeometry.h" 1290 > 1291 </File> 1284 1292 </Filter> 1285 1293 <Filter
Note: See TracChangeset
for help on using the changeset viewer.