Changeset 121121 in webkit
- Timestamp:
- Jun 24, 2012, 2:44:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/input-set-composition-scroll-expected.txt (added)
-
LayoutTests/fast/forms/input-set-composition-scroll.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/Editor.cpp (modified) (2 diffs)
-
Source/WebCore/editing/Editor.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121120 r121121 1 2012-06-24 Oli Lan <olilan@chromium.org> 2 3 After Editor::setComposition is called, input should scroll to the end of the composition. 4 https://bugs.webkit.org/show_bug.cgi?id=88999 5 6 Reviewed by Ryosuke Niwa. 7 8 This tests that after setComposition is called, the input scrolls to the end of the composition 9 (i.e. that the end of the selection/composition is revealed). 10 11 * fast/forms/input-set-composition-scroll-expected.txt: Added. 12 * fast/forms/input-set-composition-scroll.html: Added. 13 1 14 2012-06-24 Adam Barth <abarth@webkit.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r121117 r121121 1 2012-06-24 Oli Lan <olilan@chromium.org> 2 3 After Editor::setComposition is called, input should scroll to the end of the composition. 4 https://bugs.webkit.org/show_bug.cgi?id=88999 5 6 Reviewed by Ryosuke Niwa. 7 8 This fixes an issue where after a call to setComposition, the start of the composition is revealed 9 (scrolled to) instead of the end (where the caret/editing point should be). 10 11 The change is to allow revealSelectionAfterEditingOperation to take a revealExtent parameter, 12 and to pass that parameter as true when calling from setIgnoreCompositionSelectionChange, which is 13 called at the end of setComposition. 14 15 Test: fast/forms/input-set-composition-scroll.html 16 17 * editing/Editor.cpp: 18 (WebCore::Editor::revealSelectionAfterEditingOperation): 19 (WebCore::Editor::setIgnoreCompositionSelectionChange): 20 * editing/Editor.h: 21 (Editor): 22 1 23 2012-06-24 Joshua Bell <jsbell@chromium.org> 2 24 -
trunk/Source/WebCore/editing/Editor.cpp
r120985 r121121 2297 2297 } 2298 2298 2299 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignment )2299 void Editor::revealSelectionAfterEditingOperation(const ScrollAlignment& alignment, RevealExtentOption revealExtentOption) 2300 2300 { 2301 2301 if (m_ignoreCompositionSelectionChange) 2302 2302 return; 2303 2303 2304 m_frame->selection()->revealSelection(alignment );2304 m_frame->selection()->revealSelection(alignment, revealExtentOption == RevealExtent); 2305 2305 } 2306 2306 … … 2312 2312 m_ignoreCompositionSelectionChange = ignore; 2313 2313 if (!ignore) 2314 revealSelectionAfterEditingOperation( );2314 revealSelectionAfterEditingOperation(ScrollAlignment::alignToEdgeIfNeeded, RevealExtent); 2315 2315 } 2316 2316 -
trunk/Source/WebCore/editing/Editor.h
r120985 r121121 423 423 void pasteAsPlainTextWithPasteboard(Pasteboard*); 424 424 void pasteWithPasteboard(Pasteboard*, bool allowPlainText); 425 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded); 425 426 enum RevealExtentOption { 427 RevealExtent, 428 DoNotRevealExtent 429 }; 430 431 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); 426 432 void markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpelling, RefPtr<Range>& firstMisspellingRange); 427 433 TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask);
Note:
See TracChangeset
for help on using the changeset viewer.