[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 15:31:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 54f68cdcccd098099e9ac328cc74552cc1d8d5a1
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 5 22:00:54 2010 +0000

    2010-11-05  Ilya Sherman  <isherman at chromium.org>
    
            Reviewed by Simon Fraser.
    
            Querying selection start and end should be const
            https://bugs.webkit.org/show_bug.cgi?id=48786
    
            * rendering/RenderTextControl.cpp:
            (WebCore::RenderTextControl::selectionStart):
            (WebCore::RenderTextControl::selectionEnd):
            (WebCore::RenderTextControl::visiblePositionForIndex):
            (WebCore::RenderTextControl::indexForVisiblePosition):
            * rendering/RenderTextControl.h:
    2010-11-05  Ilya Sherman  <isherman at chromium.org>
    
            Reviewed by Simon Fraser.
    
            Querying selection start and end should be const
            https://bugs.webkit.org/show_bug.cgi?id=48786
    
            * public/WebInputElement.h:
            * src/WebInputElement.cpp:
            (WebKit::WebInputElement::selectionStart):
            (WebKit::WebInputElement::selectionEnd):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4f2eb77..86da837 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-05  Ilya Sherman  <isherman at chromium.org>
+
+        Reviewed by Simon Fraser.
+
+        Querying selection start and end should be const
+        https://bugs.webkit.org/show_bug.cgi?id=48786
+
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::selectionStart):
+        (WebCore::RenderTextControl::selectionEnd):
+        (WebCore::RenderTextControl::visiblePositionForIndex):
+        (WebCore::RenderTextControl::indexForVisiblePosition):
+        * rendering/RenderTextControl.h:
+
 2010-11-05  Chris Marrin  <cmarrin at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebCore/rendering/RenderTextControl.cpp b/WebCore/rendering/RenderTextControl.cpp
index 3d6b04b..e81dfb9 100644
--- a/WebCore/rendering/RenderTextControl.cpp
+++ b/WebCore/rendering/RenderTextControl.cpp
@@ -200,7 +200,7 @@ void RenderTextControl::setLastChangeWasUserEdit(bool lastChangeWasUserEdit)
     document()->setIgnoreAutofocus(lastChangeWasUserEdit);
 }
 
-int RenderTextControl::selectionStart()
+int RenderTextControl::selectionStart() const
 {
     Frame* frame = this->frame();
     if (!frame)
@@ -208,7 +208,7 @@ int RenderTextControl::selectionStart()
     return indexForVisiblePosition(frame->selection()->start());
 }
 
-int RenderTextControl::selectionEnd()
+int RenderTextControl::selectionEnd() const
 {
     Frame* frame = this->frame();
     if (!frame)
@@ -264,7 +264,7 @@ PassRefPtr<Range> RenderTextControl::selection(int start, int end) const
     return Range::create(document(), m_innerText, start, m_innerText, end);
 }
 
-VisiblePosition RenderTextControl::visiblePositionForIndex(int index)
+VisiblePosition RenderTextControl::visiblePositionForIndex(int index) const
 {
     if (index <= 0)
         return VisiblePosition(m_innerText.get(), 0, DOWNSTREAM);
@@ -281,7 +281,7 @@ VisiblePosition RenderTextControl::visiblePositionForIndex(int index)
     return VisiblePosition(endContainer, endOffset, UPSTREAM);
 }
 
-int RenderTextControl::indexForVisiblePosition(const VisiblePosition& pos)
+int RenderTextControl::indexForVisiblePosition(const VisiblePosition& pos) const
 {
     Position indexPosition = pos.deepEquivalent();
     if (!indexPosition.node() || indexPosition.node()->rootEditableElement() != m_innerText)
diff --git a/WebCore/rendering/RenderTextControl.h b/WebCore/rendering/RenderTextControl.h
index b75de0e..0060973 100644
--- a/WebCore/rendering/RenderTextControl.h
+++ b/WebCore/rendering/RenderTextControl.h
@@ -40,8 +40,8 @@ public:
     bool lastChangeWasUserEdit() const { return m_lastChangeWasUserEdit; }
     void setLastChangeWasUserEdit(bool lastChangeWasUserEdit);
 
-    int selectionStart();
-    int selectionEnd();
+    int selectionStart() const;
+    int selectionEnd() const;
     PassRefPtr<Range> selection(int start, int end) const;
 
     virtual void subtreeHasChanged();
@@ -49,8 +49,8 @@ public:
     String textWithHardLineBreaks();
     void selectionChanged(bool userTriggered);
 
-    VisiblePosition visiblePositionForIndex(int index);
-    int indexForVisiblePosition(const VisiblePosition&);
+    VisiblePosition visiblePositionForIndex(int index) const;
+    int indexForVisiblePosition(const VisiblePosition&) const;
 
     void updatePlaceholderVisibility(bool, bool);
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 2775be6..8c7e178 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-05  Ilya Sherman  <isherman at chromium.org>
+
+        Reviewed by Simon Fraser.
+
+        Querying selection start and end should be const
+        https://bugs.webkit.org/show_bug.cgi?id=48786
+
+        * public/WebInputElement.h:
+        * src/WebInputElement.cpp:
+        (WebKit::WebInputElement::selectionStart):
+        (WebKit::WebInputElement::selectionEnd):
+
 2010-11-05  Chris Marrin  <cmarrin at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index d0df079..0c0764c 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -76,8 +76,8 @@ namespace WebKit {
         WEBKIT_API void setAutofilled(bool);
         WEBKIT_API void dispatchFormControlChangeEvent();
         WEBKIT_API void setSelectionRange(int, int);
-        WEBKIT_API int selectionStart();
-        WEBKIT_API int selectionEnd();
+        WEBKIT_API int selectionStart() const;
+        WEBKIT_API int selectionEnd() const;
         WEBKIT_API bool isValidValue(const WebString&) const;
 
 #if WEBKIT_IMPLEMENTATION
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 9d50ed1..d032ef8 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -145,14 +145,14 @@ void WebInputElement::setSelectionRange(int start, int end)
     unwrap<HTMLInputElement>()->setSelectionRange(start, end);
 }
 
-int WebInputElement::selectionStart()
+int WebInputElement::selectionStart() const
 {
-    return unwrap<HTMLInputElement>()->selectionStart();
+    return constUnwrap<HTMLInputElement>()->selectionStart();
 }
 
-int WebInputElement::selectionEnd()
+int WebInputElement::selectionEnd() const
 {
-    return unwrap<HTMLInputElement>()->selectionEnd();
+    return constUnwrap<HTMLInputElement>()->selectionEnd();
 }
 
 bool WebInputElement::isValidValue(const WebString& value) const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list