Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.h

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 const WebFloatSize& elasticOverscrollDelta, 130 const WebFloatSize& elasticOverscrollDelta,
131 float pageScaleDelta, 131 float pageScaleDelta,
132 float topControlsShownRatioDelta) override; 132 float topControlsShownRatioDelta) override;
133 void mouseCaptureLost() override; 133 void mouseCaptureLost() override;
134 void setFocus(bool enable) override; 134 void setFocus(bool enable) override;
135 bool setComposition( 135 bool setComposition(
136 const WebString& text, 136 const WebString& text,
137 const WebVector<WebCompositionUnderline>& underlines, 137 const WebVector<WebCompositionUnderline>& underlines,
138 int selectionStart, 138 int selectionStart,
139 int selectionEnd) override; 139 int selectionEnd) override;
140 bool confirmComposition() override; 140 bool confirmComposition(int newCursorPosition = 1) override;
141 bool confirmComposition(ConfirmCompositionBehavior selectionBehavior) overri de; 141 bool confirmComposition(ConfirmCompositionBehavior selectionBehavior, int ne wCursorPosition = 1) override;
142 bool confirmComposition(const WebString& text) override; 142 bool confirmComposition(const WebString& text, int newCursorPosition = 1) ov erride;
143 bool compositionRange(size_t* location, size_t* length) override; 143 bool compositionRange(size_t* location, size_t* length) override;
144 WebTextInputInfo textInputInfo() override; 144 WebTextInputInfo textInputInfo() override;
145 WebTextInputType textInputType() override; 145 WebTextInputType textInputType() override;
146 WebColor backgroundColor() const override; 146 WebColor backgroundColor() const override;
147 WebPagePopup* pagePopup() const override; 147 WebPagePopup* pagePopup() const override;
148 bool selectionBounds(WebRect& anchor, WebRect& focus) const override; 148 bool selectionBounds(WebRect& anchor, WebRect& focus) const override;
149 bool selectionTextDirection(WebTextDirection& start, WebTextDirection& end) const override; 149 bool selectionTextDirection(WebTextDirection& start, WebTextDirection& end) const override;
150 bool isSelectionAnchorFirst() const override; 150 bool isSelectionAnchorFirst() const override;
151 bool caretOrSelectionRange(size_t* location, size_t* length) override; 151 bool caretOrSelectionRange(size_t* location, size_t* length) override;
152 void setTextDirection(WebTextDirection) override; 152 void setTextDirection(WebTextDirection) override;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 explicit WebViewImpl(WebViewClient*); 553 explicit WebViewImpl(WebViewClient*);
554 ~WebViewImpl() override; 554 ~WebViewImpl() override;
555 555
556 int textInputFlags(); 556 int textInputFlags();
557 557
558 WebString inputModeOfFocusedElement(); 558 WebString inputModeOfFocusedElement();
559 559
560 // Returns true if the event was actually processed. 560 // Returns true if the event was actually processed.
561 bool keyEventDefault(const WebKeyboardEvent&); 561 bool keyEventDefault(const WebKeyboardEvent&);
562 562
563 bool confirmComposition(const WebString& text, ConfirmCompositionBehavior); 563 bool confirmComposition(const WebString& text, ConfirmCompositionBehavior, i nt newCursorPosition);
564 564
565 // Returns true if the view was scrolled. 565 // Returns true if the view was scrolled.
566 bool scrollViewWithKeyboard(int keyCode, int modifiers); 566 bool scrollViewWithKeyboard(int keyCode, int modifiers);
567 567
568 void hideSelectPopup(); 568 void hideSelectPopup();
569 569
570 HitTestResult hitTestResultForRootFramePos(const IntPoint&); 570 HitTestResult hitTestResultForRootFramePos(const IntPoint&);
571 HitTestResult hitTestResultForViewportPos(const IntPoint&); 571 HitTestResult hitTestResultForViewportPos(const IntPoint&);
572 572
573 // Consolidate some common code between starting a drag over a target and 573 // Consolidate some common code between starting a drag over a target and
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 double m_lastFrameTimeMonotonic; 756 double m_lastFrameTimeMonotonic;
757 }; 757 };
758 758
759 // We have no ways to check if the specified WebView is an instance of 759 // We have no ways to check if the specified WebView is an instance of
760 // WebViewImpl because WebViewImpl is the only implementation of WebView. 760 // WebViewImpl because WebViewImpl is the only implementation of WebView.
761 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 761 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
762 762
763 } // namespace blink 763 } // namespace blink
764 764
765 #endif 765 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698