[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:27:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fc3f9206b7a2afe1b9c30f7777709ac5a13eb218
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 9 21:30:22 2010 +0000

    2010-10-09  Varun Jain  <varunjain at chromium.org>
    
            Reviewed by Darin Fisher.
    
            Adding one method to the WebView interface: method to inform the
            renderer to scroll the currently focused element into view, for
            instance, when it is hidden due to window resizing.
            Also adding methods to WebNode and WebElement to expose more
            features of the underlying WebCore::Node.
            https://bugs.webkit.org/show_bug.cgi?id=46296
    
            * public/WebElement.h:
            * public/WebNode.h:
            * public/WebView.h:
            * src/WebElement.h:
            (WebKit::WebElement::isTextFormControlElement):
            * src/WebNode.cpp:
            (WebKit::WebNode::isContentEditable):
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::scrollFocusedNodeIntoView):
            * src/WebViewImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 197c8b7..e04fffd 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-09  Varun Jain  <varunjain at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        Adding one method to the WebView interface: method to inform the
+        renderer to scroll the currently focused element into view, for
+        instance, when it is hidden due to window resizing.
+        Also adding methods to WebNode and WebElement to expose more
+        features of the underlying WebCore::Node.
+        https://bugs.webkit.org/show_bug.cgi?id=46296
+
+        * public/WebElement.h:
+        * public/WebNode.h:
+        * public/WebView.h:
+        * src/WebElement.h:
+        (WebKit::WebElement::isTextFormControlElement):
+        * src/WebNode.cpp:
+        (WebKit::WebNode::isContentEditable):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::scrollFocusedNodeIntoView):
+        * src/WebViewImpl.h:
+
 2010-10-08  Andrei Popescu  <andreip at google.com>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index 5b6fd6a..8d51e98 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -50,6 +50,7 @@ class WebNamedNodeMap;
         void assign(const WebElement& e) { WebNode::assign(e); }
 
         WEBKIT_API bool isFormControlElement() const;
+        WEBKIT_API bool isTextFormControlElement() const;
         WEBKIT_API WebString tagName() const;
         WEBKIT_API bool hasTagName(const WebString&) const;
         WEBKIT_API bool hasAttribute(const WebString&) const;
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index f54ff04..7116dfa 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -96,6 +96,7 @@ public:
     WEBKIT_API WebNodeList childNodes();
     WEBKIT_API WebString createMarkup() const;
     WEBKIT_API bool isTextNode() const;
+    WEBKIT_API bool isContentEditable() const;
     WEBKIT_API bool isElementNode() const;
     WEBKIT_API void addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
     WEBKIT_API void removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index fdd4729..741b1d1 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -161,6 +161,9 @@ public:
     // send it.
     virtual void clearFocusedNode() = 0;
 
+    // Scrolls the node currently in focus into view.
+    virtual void scrollFocusedNodeIntoView() = 0;
+
 
     // Zoom ----------------------------------------------------------------
 
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index 91f310d..34daa34 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -47,6 +47,11 @@ bool WebElement::isFormControlElement() const
     return constUnwrap<Element>()->isFormControlElement();
 }
 
+bool WebElement::isTextFormControlElement() const
+{
+    return constUnwrap<Element>()->isTextFormControl();
+}
+
 WebString WebElement::tagName() const
 {
     return constUnwrap<Element>()->tagName();
diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp
index caea589..e91d1ee 100644
--- a/WebKit/chromium/src/WebNode.cpp
+++ b/WebKit/chromium/src/WebNode.cpp
@@ -32,6 +32,7 @@
 #include "WebNode.h"
 
 #include "Document.h"
+#include "Element.h"
 #include "Frame.h"
 #include "FrameLoaderClientImpl.h"
 #include "Node.h"
@@ -144,6 +145,11 @@ bool WebNode::isTextNode() const
     return m_private->isTextNode();
 }
 
+bool WebNode::isContentEditable() const
+{
+    return m_private->isContentEditable();
+}
+
 bool WebNode::isElementNode() const
 {
     return m_private->isElementNode();
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 599c65e..7625a44 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -1525,6 +1525,15 @@ void WebViewImpl::clearFocusedNode()
     }
 }
 
+void WebViewImpl::scrollFocusedNodeIntoView()
+{
+    Node* focusedNode = focusedWebCoreNode();
+    if (focusedNode && focusedNode->isElementNode()) {
+        Element* elementNode = static_cast<Element*>(focusedNode);
+        elementNode->scrollIntoViewIfNeeded(true);
+    }
+}
+
 double WebViewImpl::zoomLevel()
 {
     return m_zoomLevel;
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index e51df4d..30d0314 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -132,6 +132,7 @@ public:
     virtual void setFocusedFrame(WebFrame* frame);
     virtual void setInitialFocus(bool reverse);
     virtual void clearFocusedNode();
+    virtual void scrollFocusedNodeIntoView();
     virtual double zoomLevel();
     virtual double setZoomLevel(bool textOnly, double zoomLevel);
     virtual void zoomLimitsChanged(double minimumZoomLevel,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list