Changeset 84982 in webkit
- Timestamp:
- Apr 26, 2011 4:53:03 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 2 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r84967 r84982 1 2011-04-26 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r84951. 4 http://trac.webkit.org/changeset/84951 5 https://bugs.webkit.org/show_bug.cgi?id=59558 6 7 "breaks chromium compile" (Requested by dpranke on #webkit). 8 9 * WebKit.gyp: 10 * public/WebFrame.h: 11 * public/WebWidget.h: 12 * public/mac/WebSubstringUtil.h: Removed. 13 * src/WebFrameImpl.cpp: 14 (WebKit::WebFrameImpl::firstRectForCharacterRange): 15 * src/WebFrameImpl.h: 16 * src/WebPopupMenuImpl.cpp: 17 * src/WebPopupMenuImpl.h: 18 * src/WebViewImpl.cpp: 19 * src/WebViewImpl.h: 20 * src/mac/WebSubstringUtil.mm: Removed. 21 1 22 2011-04-26 Daniel Cheng <dcheng@chromium.org> 2 23 -
trunk/Source/WebKit/chromium/WebKit.gyp
r84953 r84982 97 97 'public/mac/WebSandboxSupport.h', 98 98 'public/mac/WebScreenInfoFactory.h', 99 'public/mac/WebSubstringUtil.h',100 99 'public/mac/WebThemeEngine.h', 101 100 'public/WebAccessibilityCache.h', … … 386 385 'src/mac/WebInputEventFactory.mm', 387 386 'src/mac/WebScreenInfoFactory.mm', 388 'src/mac/WebSubstringUtil.mm',389 387 'src/LocalFileSystemChromium.cpp', 390 388 'src/LocalizedStrings.cpp', -
trunk/Source/WebKit/chromium/public/WebFrame.h
r84951 r84982 397 397 virtual WebRange markedRange() const = 0; 398 398 399 // Returns the frame rectangle in window coordinate space of the given text400 // range.401 399 virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0; 402 403 // Returns the index of a character in the Frame's text stream at the given404 // point. The point is in the window coordinate space. Will return405 // WTF::notFound if the point is invalid.406 virtual size_t characterIndexForPoint(const WebPoint&) const = 0;407 400 408 401 // Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll, -
trunk/Source/WebKit/chromium/public/WebWidget.h
r84951 r84982 41 41 42 42 class WebInputEvent; 43 class WebRange;44 43 class WebString; 45 44 struct WebPoint; … … 122 121 virtual bool confirmComposition(const WebString& text) = 0; 123 122 124 // Fetches the character range of the current composition, also called the125 // "marked range." Returns true and fills the out-paramters on success;126 // returns false on failure.127 virtual bool compositionRange(size_t* location, size_t* length) = 0;128 129 123 // Returns the current text input type of this WebWidget. 130 124 virtual WebTextInputType textInputType() = 0; … … 137 131 // bottom of the selected line. 138 132 virtual bool selectionRange(WebPoint& start, WebPoint& end) const = 0; 139 140 // Fetch the current selection range of this WebWidget. If there is no141 // selection, it will output a 0-length range with the location at the142 // caret. Returns true and fills the out-paramters on success; returns false143 // on failure.144 virtual bool caretOrSelectionRange(size_t* location, size_t* length) = 0;145 133 146 134 // Changes the text direction of the selected input node. -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r84951 r84982 86 86 #include "Editor.h" 87 87 #include "EventHandler.h" 88 #include "FocusController.h"89 88 #include "FormState.h" 90 89 #include "FrameLoadRequest.h" … … 92 91 #include "FrameTree.h" 93 92 #include "FrameView.h" 93 #include "HitTestResult.h" 94 94 #include "HTMLCollection.h" 95 95 #include "HTMLFormElement.h" … … 100 100 #include "HTMLNames.h" 101 101 #include "HistoryItem.h" 102 #include "HitTestResult.h"103 102 #include "InspectorController.h" 104 103 #include "Page.h" … … 1165 1164 return false; 1166 1165 IntRect intRect = frame()->editor()->firstRectForRange(range.get()); 1167 rect = WebRect(intRect); 1168 // When inside an text control, don't adjust the range. 1169 if (!selectionRoot) 1170 rect = frame()->view()->contentsToWindow(rect); 1166 rect = WebRect(intRect.x(), intRect.y(), intRect.width(), intRect.height()); 1171 1167 1172 1168 return true; 1173 }1174 1175 size_t WebFrameImpl::characterIndexForPoint(const WebPoint& webPoint) const1176 {1177 if (!frame())1178 return notFound;1179 1180 IntPoint point = frame()->view()->windowToContents(webPoint);1181 HitTestResult result = frame()->eventHandler()->hitTestResultAtPoint(point, false);1182 RefPtr<Range> range = frame()->rangeForPoint(result.point());1183 if (!range.get())1184 return notFound;1185 1186 size_t location, length;1187 TextIterator::locationAndLengthFromRange(range.get(), location, length);1188 return location;1189 1169 } 1190 1170 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.h
r84951 r84982 153 153 virtual WebRange markedRange() const; 154 154 virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const; 155 virtual size_t characterIndexForPoint(const WebPoint&) const;156 155 virtual bool executeCommand(const WebString&); 157 156 virtual bool executeCommand(const WebString&, const WebString& value); -
trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
r84951 r84982 44 44 #include "WebInputEvent.h" 45 45 #include "WebInputEventConversion.h" 46 #include "WebRange.h"47 46 #include "WebRect.h" 48 47 #include "WebWidgetClient.h" … … 254 253 } 255 254 256 bool WebPopupMenuImpl::compositionRange(size_t* location, size_t* length)257 {258 *location = 0;259 *length = 0;260 return false;261 }262 263 255 WebTextInputType WebPopupMenuImpl::textInputType() 264 256 { … … 269 261 { 270 262 return WebRect(); 271 }272 273 bool WebPopupMenuImpl::caretOrSelectionRange(size_t* location, size_t* length)274 {275 *location = 0;276 *length = 0;277 return false;278 263 } 279 264 -
trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.h
r84951 r84982 52 52 class WebMouseEvent; 53 53 class WebMouseWheelEvent; 54 class WebRange;55 54 struct WebRect; 56 55 … … 78 77 virtual bool confirmComposition(); 79 78 virtual bool confirmComposition(const WebString& text); 80 virtual bool compositionRange(size_t* location, size_t* length);81 79 virtual WebTextInputType textInputType(); 82 80 virtual WebRect caretOrSelectionBounds(); 83 81 virtual bool selectionRange(WebPoint& start, WebPoint& end) const { return false; } 84 virtual bool caretOrSelectionRange(size_t* location, size_t* length);85 82 virtual void setTextDirection(WebTextDirection direction); 86 83 virtual bool isAcceleratedCompositingActive() const { return false; } -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r84951 r84982 92 92 #include "Settings.h" 93 93 #include "SpeechInputClientImpl.h" 94 #include "TextIterator.h"95 94 #include "Timer.h" 96 95 #include "TraceEvent.h" … … 117 116 #include "WebPoint.h" 118 117 #include "WebPopupMenuImpl.h" 119 #include "WebRange.h"120 118 #include "WebRect.h" 121 119 #include "WebRuntimeFeatures.h" … … 1397 1395 } 1398 1396 1399 bool WebViewImpl::compositionRange(size_t* location, size_t* length)1400 {1401 Frame* focused = focusedWebCoreFrame();1402 if (!focused || !m_imeAcceptEvents)1403 return false;1404 Editor* editor = focused->editor();1405 if (!editor || !editor->hasComposition())1406 return false;1407 1408 RefPtr<Range> range = editor->compositionRange();1409 if (!range.get())1410 return false;1411 1412 if (TextIterator::locationAndLengthFromRange(range.get(), *location, *length))1413 return true;1414 return false;1415 }1416 1417 1397 WebTextInputType WebViewImpl::textInputType() 1418 1398 { … … 1504 1484 end = frame->view()->contentsToWindow(end); 1505 1485 return true; 1506 }1507 1508 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length)1509 {1510 const Frame* focused = focusedWebCoreFrame();1511 if (!focused)1512 return false;1513 1514 SelectionController* controller = focused->selection();1515 if (!controller)1516 return false;1517 1518 RefPtr<Range> range = controller->selection().firstRange();1519 if (!range.get())1520 return false;1521 1522 if (TextIterator::locationAndLengthFromRange(range.get(), *location, *length))1523 return true;1524 return false;1525 1486 } 1526 1487 -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r84951 r84982 108 108 virtual bool confirmComposition(); 109 109 virtual bool confirmComposition(const WebString& text); 110 virtual bool compositionRange(size_t* location, size_t* length);111 110 virtual WebTextInputType textInputType(); 112 111 virtual WebRect caretOrSelectionBounds(); 113 112 virtual bool selectionRange(WebPoint& start, WebPoint& end) const; 114 virtual bool caretOrSelectionRange(size_t* location, size_t* length);115 113 virtual void setTextDirection(WebTextDirection direction); 116 114 virtual bool isAcceleratedCompositingActive() const;
Note: See TracChangeset
for help on using the changeset viewer.