diff options
author | Feng Qian <> | 2009-04-10 18:11:29 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-10 18:11:29 -0700 |
commit | 8f72e70a9fd78eec56623b3a62e68f16b7b27e28 (patch) | |
tree | 181bf9a400c30a1bf34ea6d72560e8d00111d549 /WebCore/editing/Editor.h | |
parent | 7ed56f225e0ade046e1c2178977f72b2d896f196 (diff) | |
download | external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.zip external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.gz external_webkit-8f72e70a9fd78eec56623b3a62e68f16b7b27e28.tar.bz2 |
AI 145796: Land the WebKit merge @r42026.
Automated import of CL 145796
Diffstat (limited to 'WebCore/editing/Editor.h')
-rw-r--r-- | WebCore/editing/Editor.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/WebCore/editing/Editor.h b/WebCore/editing/Editor.h index d97f670..ce8fa0f 100644 --- a/WebCore/editing/Editor.h +++ b/WebCore/editing/Editor.h @@ -110,8 +110,8 @@ public: bool shouldDeleteRange(Range*) const; bool shouldApplyStyle(CSSStyleDeclaration*, Range*); - void respondToChangedSelection(const Selection& oldSelection); - void respondToChangedContents(const Selection& endingSelection); + void respondToChangedSelection(const VisibleSelection& oldSelection); + void respondToChangedContents(const VisibleSelection& endingSelection); TriState selectionHasStyle(CSSStyleDeclaration*) const; const SimpleFontData* fontForSelection(bool&) const; @@ -151,6 +151,9 @@ public: bool selectionStartHasStyle(CSSStyleDeclaration*) const; bool clientIsEditable() const; + + void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; } + bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; } class Command { public: @@ -192,9 +195,11 @@ public: bool isSelectionMisspelled(); Vector<String> guessesForMisspelledSelection(); Vector<String> guessesForUngrammaticalSelection(); + Vector<String> guessesForMisspelledOrUngrammaticalSelection(bool& misspelled, bool& ungrammatical); void markMisspellingsAfterTypingToPosition(const VisiblePosition&); - void markMisspellings(const Selection&); - void markBadGrammar(const Selection&); + void markMisspellings(const VisibleSelection&); + void markBadGrammar(const VisibleSelection&); + void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection, bool markGrammar, const VisibleSelection& grammarSelection); void advanceToNextMisspelling(bool startBeforeSelection = false); void showSpellingGuessPanel(); bool spellingPanelIsShowing(); @@ -250,7 +255,7 @@ public: void clear(); - Selection selectionForCommand(Event*); + VisibleSelection selectionForCommand(Event*); void appendToKillRing(const String&); void prependToKillRing(const String&); @@ -278,6 +283,7 @@ private: Vector<CompositionUnderline> m_customCompositionUnderlines; bool m_ignoreCompositionSelectionChange; bool m_shouldStartNewKillRingSequence; + bool m_shouldStyleWithCSS; bool canDeleteRange(Range*) const; bool canSmartReplaceWithPasteboard(Pasteboard*); @@ -295,6 +301,8 @@ private: PassRefPtr<Range> firstVisibleRange(const String&, bool caseFlag); PassRefPtr<Range> lastVisibleRange(const String&, bool caseFlag); + + void changeSelectionAfterCommand(const VisibleSelection& newSelection, bool closeTyping, bool clearTypingStyle, EditCommand*); }; inline void Editor::setStartNewKillRingSequence(bool flag) |