diff options
Diffstat (limited to 'WebKit/android/jni/WebViewCore.h')
-rw-r--r-- | WebKit/android/jni/WebViewCore.h | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 5820dc5..be8de94 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -149,14 +149,6 @@ namespace android { void scrollTo(int x, int y, bool animate = false); /** - * Scroll to the point x,y relative to the current position. - * @param x The relative x position. - * @param y The relative y position. - * @param animate If it is true, animate to the new scroll position - */ - void scrollBy(int x, int y, bool animate); - - /** * Record the invalid rectangle */ void contentInvalidate(const WebCore::IntRect &rect); @@ -311,7 +303,7 @@ namespace android { WebCore::Frame* frame, int x, int y); // set the scroll amount that webview.java is currently showing - void setScrollOffset(int moveGeneration, int userScrolled, int dx, int dy); + void setScrollOffset(int moveGeneration, bool sendScrollEvent, int dx, int dy); void setGlobalBounds(int x, int y, int h, int v); @@ -554,6 +546,8 @@ namespace android { void listBoxRequest(WebCoreReply* reply, const uint16_t** labels, size_t count, const int enabled[], size_t enabledCount, bool multiple, const int selected[], size_t selectedCountOrSelection); + bool shouldPaintCaret() { return m_shouldPaintCaret; } + void setShouldPaintCaret(bool should) { m_shouldPaintCaret = should; } // these members are shared with webview.cpp static Mutex gFrameCacheMutex; @@ -579,15 +573,19 @@ namespace android { bool isPaused() const { return m_isPaused; } void setIsPaused(bool isPaused) { m_isPaused = isPaused; } bool drawIsPaused() const; - int visibleScreenWidth() const { return m_visibleScreenWidth; } - int visibleScreenHeight() const { return m_visibleScreenHeight; } - void setVisibleScreenWidth(int w) { m_visibleScreenWidth = w; } - void setVisibleScreenHeight(int h) { m_visibleScreenHeight = h; } + // The actual content (without title bar) size in doc coordinate + int screenWidth() const { return m_screenWidth; } + int screenHeight() const { return m_screenHeight; } #if USE(CHROME_NETWORK_STACK) void setWebRequestContextUserAgent(); void setWebRequestContextCacheMode(int mode); WebRequestContext* webRequestContext(); #endif + + // Attempts to scroll the layer to the x,y coordinates of rect. The + // layer is the id of the LayerAndroid. + void scrollRenderLayer(int layer, const SkRect& rect); + // end of shared members // internal functions @@ -638,11 +636,6 @@ namespace android { CachedHistory m_history; int m_screenWidth; // width of the visible rect in document coordinates int m_screenHeight;// height of the visible rect in document coordinates - // The m_screenHeight is not equal to the visibleRect from WebView, - // using m_visibleScreenHeight to store that info. - // After we can fix the m_screenHeight in java side, we can merge them. - int m_visibleScreenWidth; - int m_visibleScreenHeight; int m_textWrapWidth; float m_scale; unsigned m_domtree_version; @@ -650,6 +643,7 @@ namespace android { PageGroup* m_groupForVisitedLinks; bool m_isPaused; int m_cacheMode; + bool m_shouldPaintCaret; SkTDArray<PluginWidgetAndroid*> m_plugins; WebCore::Timer<WebViewCore> m_pluginInvalTimer; @@ -677,18 +671,20 @@ namespace android { // below are members responsible for accessibility support String modifySelectionTextNavigationAxis(DOMSelection* selection, int direction, int granularity); String modifySelectionDomNavigationAxis(DOMSelection* selection, int direction, int granularity); - Text* traverseVisibleNonEmptyNonWhitespaceTextNode(Node* fromNode, Node* toNode ,int direction); + Text* traverseNextContentTextNode(Node* fromNode, Node* toNode ,int direction); bool isVisible(Node* node); bool isHeading(Node* node); String formatMarkup(DOMSelection* selection); void selectAt(int x, int y); Node* m_currentNodeDomNavigationAxis; void scrollNodeIntoView(Frame* frame, Node* node); - bool isVisibleNonEmptyNonWhitespaceTextNode(Node* node); - String stripAppleSpanFromMarkup(String markup); - int rangeCompliantChildOffset(Node* parent, int offset); - Node* getFirstIntermediaryInputOrButton(Node* fromNode, Node* toNode); - bool isInputControl(Node* node); + bool isContentTextNode(Node* node); + Node* getIntermediaryInputElement(Node* fromNode, Node* toNode, int direction); + bool isContentInputElement(Node* node); + bool isDescendantOf(Node* parent, Node* node); + void advanceAnchorNode(DOMSelection* selection, int direction, String& markup, bool ignoreFirstNode, ExceptionCode& ec); + Node* getNextAnchorNode(Node* anchorNode, bool skipFirstHack, int direction); + Node* getImplicitBoundaryNode(Node* node, unsigned offset, int direction); #if ENABLE(TOUCH_EVENTS) bool m_forwardingTouchEvents; |