diff options
-rw-r--r-- | webkit/SConscript | 1 | ||||
-rw-r--r-- | webkit/glue/event_conversion.cc | 20 | ||||
-rw-r--r-- | webkit/port/page/chromium/AccessibilityObjectWrapper.h | 2 | ||||
-rw-r--r-- | webkit/port/platform/graphics/FontPlatformData.h | 11 |
4 files changed, 23 insertions, 11 deletions
diff --git a/webkit/SConscript b/webkit/SConscript index 519e809..7e3fc34 100644 --- a/webkit/SConscript +++ b/webkit/SConscript @@ -116,6 +116,7 @@ env.Prepend( '$WEBKIT_DIR/port/platform', '$WEBKIT_DIR/port/platform/chromium', '$WEBKIT_DIR/port/platform/graphics', + '$WEBKIT_DIR/port/platform/graphics/chromium', '$WEBKIT_DIR/port/platform/$WEBKIT_PLATFORM_SUBDIR', '$WEBKIT_DIR/port/svg/graphics', '$WEBKIT_DIR/port/platform/network', diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc index 2421c3c..857fb9e 100644 --- a/webkit/glue/event_conversion.cc +++ b/webkit/glue/event_conversion.cc @@ -117,12 +117,10 @@ MakePlatformMouseEvent::MakePlatformMouseEvent(Widget* widget, MakePlatformWheelEvent::MakePlatformWheelEvent(Widget* widget, const WebMouseWheelEvent& e) -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_LINUX) { #elif defined(OS_MACOSX) : PlatformWheelEvent(e.mac_event.get()) { -#elif defined(OS_LINUX) - : PlatformWheelEvent(NULL) { #endif #if defined(OS_WIN) || defined(OS_LINUX) m_position = widget->convertFromContainingWindow(IntPoint(e.x, e.y)); @@ -161,11 +159,11 @@ static inline const PlatformKeyboardEvent::Type ToPlatformKeyboardEventType( return PlatformKeyboardEvent::KeyDown; } -#if defined(OS_WIN) static inline String ToSingleCharacterString(UChar c) { return String(&c, 1); } +#if defined(OS_WIN) static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { switch (keyCode) { case VK_MENU: @@ -268,17 +266,19 @@ static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { return String::format("U+%04X", toupper(keyCode)); } } +#else +static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { + return String::format("U+%04X", toupper(keyCode)); +} #endif MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e) -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_LINUX) { #elif defined(OS_MACOSX) : PlatformKeyboardEvent(e.mac_event.get()) { -#elif defined(OS_LINUX) - : PlatformKeyboardEvent(NULL) { #endif -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_LINUX) m_type = ToPlatformKeyboardEventType(e.type); if (m_type == Char || m_type == KeyDown) m_text = m_unmodifiedText = ToSingleCharacterString(e.key_code); @@ -290,7 +290,6 @@ MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e) } else { m_windowsVirtualKeyCode = 0; } - m_isSystemKey = e.system_key; #endif m_autoRepeat = (e.modifiers & WebInputEvent::IS_AUTO_REPEAT) != 0; m_isKeypad = (e.modifiers & WebInputEvent::IS_KEYPAD) != 0; @@ -298,6 +297,9 @@ MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e) m_ctrlKey = (e.modifiers & WebInputEvent::CTRL_KEY) != 0; m_altKey = (e.modifiers & WebInputEvent::ALT_KEY) != 0; m_metaKey = (e.modifiers & WebInputEvent::META_KEY) != 0; +#if defined(OS_WIN) + m_isSystemKey = e.system_key; +#endif } void MakePlatformKeyboardEvent::SetKeyType(Type type) { diff --git a/webkit/port/page/chromium/AccessibilityObjectWrapper.h b/webkit/port/page/chromium/AccessibilityObjectWrapper.h index 12cd146..bd890ea 100644 --- a/webkit/port/page/chromium/AccessibilityObjectWrapper.h +++ b/webkit/port/page/chromium/AccessibilityObjectWrapper.h @@ -26,8 +26,6 @@ #ifndef AccessibilityObjectWrapper_h #define AccessibilityObjectWrapper_h -#include <oleacc.h> - namespace WebCore { class AccessibilityObject; diff --git a/webkit/port/platform/graphics/FontPlatformData.h b/webkit/port/platform/graphics/FontPlatformData.h index 77f85cd..362ed16 100644 --- a/webkit/port/platform/graphics/FontPlatformData.h +++ b/webkit/port/platform/graphics/FontPlatformData.h @@ -24,10 +24,17 @@ #ifndef FontPlatformData_H #define FontPlatformData_H +#include "config.h" + #include "StringImpl.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> + +// TODO(tc): Once this file is only included by the ChromiumWin build, we can +// remove the PLATFORM #ifs. +#if PLATFORM(WIN_OS) #include <usp10.h> +#endif typedef struct HFONT__ *HFONT; @@ -69,8 +76,10 @@ public: return m_font == other.m_font && m_size == other.m_size; } +#if PLATFORM(WIN_OS) SCRIPT_FONTPROPERTIES* scriptFontProperties() const; SCRIPT_CACHE* scriptCache() const { return &m_scriptCache; } +#endif private: // We refcount the internal HFONT so that FontPlatformData can be @@ -114,8 +123,10 @@ private: RefPtr<RefCountedHFONT> m_font; float m_size; // Point size of the font in pixels. +#if PLATFORM(WIN_OS) mutable SCRIPT_CACHE m_scriptCache; mutable SCRIPT_FONTPROPERTIES* m_scriptFontProperties; +#endif }; } |