Changeset 67458 in webkit


Ignore:
Timestamp:
Sep 14, 2010 4:07:30 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-09-14 Eric Seidel <eric@webkit.org>

Unreviewed, reverting changes r67451 and r67451.
Broke lots of builders.

Only intercept ESC key press when autocorrection UI is visible.
https://bugs.webkit.org/show_bug.cgi?id=45071

  • editing/Editor.cpp:
  • editing/Editor.h:
  • editing/EditorCommand.cpp: (WebCore::createCommandMap):
  • loader/EmptyClients.h:
  • page/EditorClient.h:

2010-09-14 Eric Seidel <eric@webkit.org>

Unreviewed, reverting changes r67451 and r67451.
Broke lots of builders.

Only intercept ESC key press when autocorrection UI is visible.
https://bugs.webkit.org/show_bug.cgi?id=45071

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm: (WebEditorClient::WebEditorClient): (WebEditorClient::dismissCorrectionPanel):

2010-09-14 Eric Seidel <eric@webkit.org>

Unreviewed, reverting changes r67451 and r67451.
Broke lots of builders.

Only intercept ESC key press when autocorrection UI is visible.
https://bugs.webkit.org/show_bug.cgi?id=45071

  • WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::dismissCorrectionPanel):
  • WebProcess/WebCoreSupport/WebEditorClient.h:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r67455 r67458  
     12010-09-14  Eric Seidel  <eric@webkit.org>
     2
     3        Unreviewed, reverting changes r67451 and r67451.
     4        Broke lots of builders.
     5
     6        Only intercept ESC key press when autocorrection UI is visible.
     7        https://bugs.webkit.org/show_bug.cgi?id=45071
     8
     9        * editing/Editor.cpp:
     10        * editing/Editor.h:
     11        * editing/EditorCommand.cpp:
     12        (WebCore::createCommandMap):
     13        * loader/EmptyClients.h:
     14        * page/EditorClient.h:
     15
    1162010-09-14  Kinuko Yasuda  <kinuko@chromium.org>
    217
  • trunk/WebCore/editing/Editor.cpp

    r67451 r67458  
    28552855}
    28562856
    2857 bool Editor::isShowingCorrectionPanel()
    2858 {
    2859 #if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
    2860     if (client())
    2861         return client()->isShowingCorrectionPanel();
    2862 #endif
    2863     return false;
    2864 }
    2865 
    28662857PassRefPtr<Range> Editor::rangeForPoint(const IntPoint& windowPoint)
    28672858{
  • trunk/WebCore/editing/Editor.h

    r67451 r67458  
    314314    void startCorrectionPanelTimer();
    315315    void handleRejectedCorrection();
    316     bool isShowingCorrectionPanel();
    317316
    318317    void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool matchStyle);
  • trunk/WebCore/editing/EditorCommand.cpp

    r67452 r67458  
    11221122    return false;
    11231123}
    1124 
    1125 #if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
    1126 static bool supportedDismissCorrectionPanel(Frame* frame, EditorCommandSource source)
    1127 {
    1128     return supportedFromMenuOrKeyBinding(frame, source) && frame->editor()->isShowingCorrectionPanel();
    1129 }
    1130 #endif
    11311124
    11321125// Enabled functions
     
    14751468        { "YankAndSelect", { executeYankAndSelect, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    14761469#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
    1477         { "CancelOperation", { executeCancelOperation, supportedDismissCorrectionPanel, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1470        { "CancelOperation", { executeCancelOperation, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    14781471#endif
    14791472    };
  • trunk/WebCore/loader/EmptyClients.h

    r67451 r67458  
    471471    virtual void showCorrectionPanel(const FloatRect&, const String&, const String&, Editor*) { }
    472472    virtual void dismissCorrectionPanel(bool) { }
    473     virtual bool isShowingCorrectionPanel() { return false; }
    474473#endif
    475474    virtual void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) { }
  • trunk/WebCore/page/EditorClient.h

    r67451 r67458  
    192192    virtual void showCorrectionPanel(const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacmentString, Editor*) = 0;
    193193    virtual void dismissCorrectionPanel(bool correctionAccepted) = 0;
    194     virtual bool isShowingCorrectionPanel() = 0;
    195194#endif
    196195
  • trunk/WebKit/mac/ChangeLog

    r67451 r67458  
     12010-09-14  Eric Seidel  <eric@webkit.org>
     2
     3        Unreviewed, reverting changes r67451 and r67451.
     4        Broke lots of builders.
     5
     6        Only intercept ESC key press when autocorrection UI is visible.
     7        https://bugs.webkit.org/show_bug.cgi?id=45071
     8
     9        * WebCoreSupport/WebEditorClient.h:
     10        * WebCoreSupport/WebEditorClient.mm:
     11        (WebEditorClient::WebEditorClient):
     12        (WebEditorClient::dismissCorrectionPanel):
     13
    1142010-09-14  Jia Pu  <jpu@apple.com>
    215
  • trunk/WebKit/mac/WebCoreSupport/WebEditorClient.h

    r67451 r67458  
    136136    virtual void showCorrectionPanel(const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
    137137    virtual void dismissCorrectionPanel(bool correctionAccepted);
    138     virtual bool isShowingCorrectionPanel();
    139138#endif
    140139private:
  • trunk/WebKit/mac/WebCoreSupport/WebEditorClient.mm

    r67451 r67458  
    8888}
    8989
    90 static const int InvalidCorrectionPanelTag = 0;
    91 
    9290#ifdef BUILDING_ON_TIGER
    9391@interface NSSpellChecker (NotYetPublicMethods)
     
    187185    , m_haveUndoRedoOperations(false)
    188186#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
    189     , m_correctionPanelTag(InvalidCorrectionPanelTag)
     187    , m_correctionPanelTag(-1)
    190188#endif
    191189{
     
    887885void WebEditorClient::dismissCorrectionPanel(bool correctionAccepted)
    888886{
    889     if (m_correctionPanelTag != InvalidCorrectionPanelTag) {
     887    if (m_correctionPanelTag >= 0) {
    890888        [[NSSpellChecker sharedSpellChecker] dismissCorrection:m_correctionPanelTag acceptCorrection:correctionAccepted];
    891         m_correctionPanelTag = InvalidCorrectionPanelTag;
     889        m_correctionPanelTag = -1;
    892890    }
    893 }
    894 
    895 bool WebEditorClient::isShowingCorrectionPanel()
    896 {
    897     return m_correctionPanelTag != InvalidCorrectionPanelTag;
    898891}
    899892#endif
  • trunk/WebKit2/ChangeLog

    r67451 r67458  
     12010-09-14  Eric Seidel  <eric@webkit.org>
     2
     3        Unreviewed, reverting changes r67451 and r67451.
     4        Broke lots of builders.
     5
     6        Only intercept ESC key press when autocorrection UI is visible.
     7        https://bugs.webkit.org/show_bug.cgi?id=45071
     8
     9        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
     10        (WebKit::WebEditorClient::dismissCorrectionPanel):
     11        * WebProcess/WebCoreSupport/WebEditorClient.h:
     12
    1132010-09-14  Jia Pu  <jpu@apple.com>
    214
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp

    r67451 r67458  
    504504    notImplemented();
    505505}
    506 
    507 bool WebEditorClient::isShowingCorrectionPanel()
    508 {
    509     notImplemented();
    510     return false;
    511 }
    512506#endif
    513507
  • trunk/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h

    r67451 r67458  
    137137    virtual void showCorrectionPanel(const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, WebCore::Editor*);
    138138    virtual void dismissCorrectionPanel(bool correctionAccepted);
    139     virtual bool isShowingCorrectionPanel();
    140139#endif
    141140    WebPage* m_page;
Note: See TracChangeset for help on using the changeset viewer.