Changeset 121125 in webkit
- Timestamp:
- Jun 24, 2012, 5:29:03 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
WebCore.exp.in (modified) (1 diff)
-
editing/Editor.cpp (modified) (1 diff)
-
editing/Editor.h (modified) (1 diff)
-
editing/FrameSelection.cpp (modified) (3 diffs)
-
editing/FrameSelection.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121124 r121125 1 2012-06-24 Adam Barth <abarth@webkit.org> 2 3 Change the type of the second argument of FrameSelection::revealSelection to use RevealExtentOption 4 https://bugs.webkit.org/show_bug.cgi?id=89833 5 6 Reviewed by Ryosuke Niwa. 7 8 As requested by Ryosuke Niwa. Rare boolean parameters are hard to read. 9 10 * WebCore.exp.in: 11 * editing/Editor.cpp: 12 (WebCore::Editor::revealSelectionAfterEditingOperation): 13 * editing/Editor.h: 14 (Editor): 15 * editing/FrameSelection.cpp: 16 (WebCore::FrameSelection::setSelection): 17 (WebCore::FrameSelection::revealSelection): 18 * editing/FrameSelection.h: 19 1 20 2012-06-24 Antti Koivisto <antti@apple.com> 2 21 -
trunk/Source/WebCore/WebCore.exp.in
r121016 r121125 255 255 __ZN7WebCore14FrameSelection10setFocusedEb 256 256 __ZN7WebCore14FrameSelection12setSelectionERKNS_16VisibleSelectionEjNS0_19CursorAlignOnScrollENS_15TextGranularityE 257 __ZN7WebCore14FrameSelection15revealSelectionERKNS_15ScrollAlignmentE b257 __ZN7WebCore14FrameSelection15revealSelectionERKNS_15ScrollAlignmentENS_18RevealExtentOptionE 258 258 __ZN7WebCore14FrameSelection16setSelectedRangeEPNS_5RangeENS_9EAffinityEb 259 259 __ZN7WebCore14FrameSelection19absoluteCaretBoundsEv -
trunk/Source/WebCore/editing/Editor.cpp
r121121 r121125 2302 2302 return; 2303 2303 2304 m_frame->selection()->revealSelection(alignment, revealExtentOption == RevealExtent);2304 m_frame->selection()->revealSelection(alignment, revealExtentOption); 2305 2305 } 2306 2306 -
trunk/Source/WebCore/editing/Editor.h
r121121 r121125 424 424 void pasteWithPasteboard(Pasteboard*, bool allowPlainText); 425 425 426 enum RevealExtentOption {427 RevealExtent,428 DoNotRevealExtent429 };430 431 426 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); 432 427 void markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpelling, RefPtr<Range>& firstMisspellingRange); -
trunk/Source/WebCore/editing/FrameSelection.cpp
r119705 r121125 304 304 alignment = (align == AlignCursorOnScrollAlways) ? ScrollAlignment::alignTopAlways : ScrollAlignment::alignToEdgeIfNeeded; 305 305 306 revealSelection(alignment, true);306 revealSelection(alignment, RevealExtent); 307 307 } 308 308 … … 1933 1933 } 1934 1934 1935 void FrameSelection::revealSelection(const ScrollAlignment& alignment, bool revealExtent)1935 void FrameSelection::revealSelection(const ScrollAlignment& alignment, RevealExtentOption revealExtentOption) 1936 1936 { 1937 1937 LayoutRect rect; … … 1944 1944 break; 1945 1945 case VisibleSelection::RangeSelection: 1946 rect = revealExtent ? VisiblePosition(extent()).absoluteCaretBounds() : enclosingIntRect(bounds(false));1946 rect = revealExtentOption == RevealExtent ? VisiblePosition(extent()).absoluteCaretBounds() : enclosingIntRect(bounds(false)); 1947 1947 break; 1948 1948 } -
trunk/Source/WebCore/editing/FrameSelection.h
r120896 r121125 50 50 enum EUserTriggered { NotUserTriggered = 0, UserTriggered = 1 }; 51 51 52 enum RevealExtentOption { 53 RevealExtent, 54 DoNotRevealExtent 55 }; 56 52 57 class CaretBase { 53 58 WTF_MAKE_NONCOPYABLE(CaretBase); … … 248 253 HTMLFormElement* currentForm() const; 249 254 250 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, bool revealExtent = false);255 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); 251 256 void setSelectionFromNone(); 252 257
Note:
See TracChangeset
for help on using the changeset viewer.