Title: [104573] trunk/Source/WebKit2
Revision
104573
Author
[email protected]
Date
2012-01-10 07:35:59 -0800 (Tue, 10 Jan 2012)

Log Message

Unreviewed, rolling out an accidental commit r104569.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::inputMethodQuery):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::respondToChangedSelection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (104572 => 104573)


--- trunk/Source/WebKit2/ChangeLog	2012-01-10 15:32:31 UTC (rev 104572)
+++ trunk/Source/WebKit2/ChangeLog	2012-01-10 15:35:59 UTC (rev 104573)
@@ -1,3 +1,18 @@
+2012-01-10  Csaba Osztrogonác  <[email protected]>
+
+        Unreviewed, rolling out an accidental commit r104569.
+
+        * Shared/EditorState.cpp:
+        (WebKit::EditorState::encode):
+        (WebKit::EditorState::decode):
+        * Shared/EditorState.h:
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebView::inputMethodQuery):
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit::WebEditorClient::respondToChangedSelection):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::editorState):
+
 2012-01-10  Kenneth Rohde Christiansen  <[email protected]>
 
         Unreviewed potential Mac WK2 build fix.

Modified: trunk/Source/WebKit2/Shared/EditorState.cpp (104572 => 104573)


--- trunk/Source/WebKit2/Shared/EditorState.cpp	2012-01-10 15:32:31 UTC (rev 104572)
+++ trunk/Source/WebKit2/Shared/EditorState.cpp	2012-01-10 15:35:59 UTC (rev 104573)
@@ -44,8 +44,7 @@
 #if PLATFORM(QT)
     encoder->encode(cursorPosition);
     encoder->encode(anchorPosition);
-    encoder->encode(editorRect);
-    encoder->encode(cursorRect);
+    encoder->encode(microFocus);
     encoder->encode(compositionRect);
     encoder->encode(selectedText);
     encoder->encode(surroundingText);
@@ -82,12 +81,9 @@
     if (!decoder->decode(result.anchorPosition))
         return false;
 
-    if (!decoder->decode(result.editorRect))
+    if (!decoder->decode(result.microFocus))
         return false;
 
-    if (!decoder->decode(result.cursorRect))
-        return false;
-
     if (!decoder->decode(result.compositionRect))
         return false;
 

Modified: trunk/Source/WebKit2/Shared/EditorState.h (104572 => 104573)


--- trunk/Source/WebKit2/Shared/EditorState.h	2012-01-10 15:32:31 UTC (rev 104572)
+++ trunk/Source/WebKit2/Shared/EditorState.h	2012-01-10 15:35:59 UTC (rev 104573)
@@ -63,8 +63,7 @@
     unsigned cursorPosition;
     unsigned anchorPosition;
 
-    WebCore::IntRect editorRect;
-    WebCore::IntRect cursorRect;
+    WebCore::IntRect microFocus;
     WebCore::IntRect compositionRect;
     WTF::String selectedText;
     WTF::String surroundingText;

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (104572 => 104573)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2012-01-10 15:32:31 UTC (rev 104572)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2012-01-10 15:35:59 UTC (rev 104573)
@@ -924,7 +924,7 @@
 
     switch(property) {
     case Qt::ImCursorRectangle:
-        return QRectF(state.cursorRect);
+        return QRectF(state.microFocus);
     case Qt::ImFont:
         return QVariant();
     case Qt::ImCursorPosition:

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp (104572 => 104573)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp	2012-01-10 15:32:31 UTC (rev 104572)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp	2012-01-10 15:35:59 UTC (rev 104573)
@@ -186,9 +186,8 @@
     EditorState state = m_page->editorState();
 
 #if PLATFORM(QT)
-    // FIXME: Move this to act on the vkb visibility change.
-    if (state.isContentEditable)
-        m_page->send(Messages::WebPageProxy::FocusEditableArea(state.cursorRect, state.editorRect));
+    if (Element* scope = frame->selection()->rootEditableElement())
+        m_page->send(Messages::WebPageProxy::FocusEditableArea(state.microFocus, scope->getRect()));
 #endif
 
     m_page->send(Messages::WebPageProxy::EditorStateChanged(state));

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (104572 => 104573)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-01-10 15:32:31 UTC (rev 104572)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-01-10 15:35:59 UTC (rev 104573)
@@ -398,9 +398,6 @@
     if (!scope)
         return result;
 
-    if (selectionRoot)
-        result.editorRect = frame->view()->contentsToWindow(selectionRoot->getRect());
-
     RefPtr<Range> range;
     if (result.hasComposition && (range = frame->editor()->compositionRange())) {
         frame->editor()->getCompositionSelection(result.anchorPosition, result.cursorPosition);
@@ -418,7 +415,7 @@
     }
 
     if (range)
-        result.cursorRect = frame->view()->contentsToWindow(frame->editor()->firstRectForRange(range.get()));
+        result.microFocus = frame->view()->contentsToWindow(frame->editor()->firstRectForRange(range.get()));
 
     // FIXME: We should only transfer innerText when it changes and do this on the UI side.
     if (result.isContentEditable && !result.isInPasswordField) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to