X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fweb%2FPopupListBox.h;h=cf3e6cbd4d68d87dbf8f1a41b0939f44ed8d401b;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=94e0eeb06a7f14f56b8a553d42b2674b97aebb38;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/web/PopupListBox.h b/src/third_party/WebKit/Source/web/PopupListBox.h index 94e0eeb..cf3e6cb 100644 --- a/src/third_party/WebKit/Source/web/PopupListBox.h +++ b/src/third_party/WebKit/Source/web/PopupListBox.h @@ -37,9 +37,6 @@ #include "wtf/text/WTFString.h" namespace WebCore { - -typedef unsigned long long TimeStamp; - class Font; class GraphicsContext; class IntRect; @@ -49,6 +46,11 @@ class PlatformGestureEvent; class PlatformTouchEvent; class PlatformWheelEvent; class PopupMenuClient; +} + +namespace blink { + +typedef unsigned long long TimeStamp; class PopupContent { public: @@ -77,32 +79,32 @@ struct PopupItem { String label; Type type; int yOffset; // y offset of this item, relative to the top of the popup. - TextDirection textDirection; + WebCore::TextDirection textDirection; bool hasTextDirectionOverride; bool enabled; }; // This class uses WebCore code to paint and handle events for a drop-down list // box ("combobox" on Windows). -class PopupListBox FINAL : public FramelessScrollView, public PopupContent { +class PopupListBox FINAL : public WebCore::FramelessScrollView, public PopupContent { public: - static PassRefPtr create(PopupMenuClient* client, bool deviceSupportsTouch) + static PassRefPtr create(WebCore::PopupMenuClient* client, bool deviceSupportsTouch) { return adoptRef(new PopupListBox(client, deviceSupportsTouch)); } // FramelessScrollView - virtual void paint(GraphicsContext*, const IntRect&) OVERRIDE; - virtual bool handleMouseDownEvent(const PlatformMouseEvent&) OVERRIDE; - virtual bool handleMouseMoveEvent(const PlatformMouseEvent&) OVERRIDE; - virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&) OVERRIDE; - virtual bool handleWheelEvent(const PlatformWheelEvent&) OVERRIDE; - virtual bool handleKeyEvent(const PlatformKeyboardEvent&) OVERRIDE; - virtual bool handleTouchEvent(const PlatformTouchEvent&) OVERRIDE; - virtual bool handleGestureEvent(const PlatformGestureEvent&) OVERRIDE; + virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&) OVERRIDE; + virtual bool handleMouseDownEvent(const WebCore::PlatformMouseEvent&) OVERRIDE; + virtual bool handleMouseMoveEvent(const WebCore::PlatformMouseEvent&) OVERRIDE; + virtual bool handleMouseReleaseEvent(const WebCore::PlatformMouseEvent&) OVERRIDE; + virtual bool handleWheelEvent(const WebCore::PlatformWheelEvent&) OVERRIDE; + virtual bool handleKeyEvent(const WebCore::PlatformKeyboardEvent&) OVERRIDE; + virtual bool handleTouchEvent(const WebCore::PlatformTouchEvent&) OVERRIDE; + virtual bool handleGestureEvent(const WebCore::PlatformGestureEvent&) OVERRIDE; // ScrollView - virtual HostWindow* hostWindow() const OVERRIDE; + virtual WebCore::HostWindow* hostWindow() const OVERRIDE; virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; // PopupListBox methods @@ -161,7 +163,7 @@ private: friend class PopupContainer; friend class RefCounted; - PopupListBox(PopupMenuClient*, bool deviceSupportsTouch); + PopupListBox(WebCore::PopupMenuClient*, bool deviceSupportsTouch); virtual ~PopupListBox() { @@ -194,22 +196,22 @@ private: void invalidateRow(int index); // Get the bounds of a row. - IntRect getRowBounds(int index); + WebCore::IntRect getRowBounds(int index); // Converts a point to an index of the row the point is over - int pointToRowIndex(const IntPoint&); + int pointToRowIndex(const WebCore::IntPoint&); // Paint an individual row - void paintRow(GraphicsContext*, const IntRect&, int rowIndex); + void paintRow(WebCore::GraphicsContext*, const WebCore::IntRect&, int rowIndex); // Test if the given point is within the bounds of the popup window. - bool isPointInBounds(const IntPoint&); + bool isPointInBounds(const WebCore::IntPoint&); // Called when the user presses a text key. Does a prefix-search of the items. - void typeAheadFind(const PlatformKeyboardEvent&); + void typeAheadFind(const WebCore::PlatformKeyboardEvent&); // Returns the font to use for the given row - Font getRowFont(int index); + WebCore::Font getRowFont(int index); // Moves the selection down/up one item, taking care of looping back to the // first/last element if m_loopSelectionNavigation is true. @@ -250,14 +252,14 @@ private: Vector m_items; // The