Reviewed by Adam Roben
authorsullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jan 2008 17:21:43 +0000 (17:21 +0000)
committersullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Jan 2008 17:21:43 +0000 (17:21 +0000)
commit5dc041ef4f0a30dc1ed705f38813ad34fdfbf1c8
tree9b6f4f4421b439d5ae06bd369d2a0787fed643e3
parent34ea591d575d29a93986c88c1bab4fc8c5191762
    Reviewed by Adam Roben

        - fixed <rdar://problem/5671668> REGRESSION (r28711-r28730): With caret in an empty form field,
          Delete menu item is enabled but shouldn't be

        The enabled logic was incorrect for the Delete menu item. To fix this, I added an EditorCommandSource
        parameter to the enabled functions so that they can have parallel logic to the execute functions.

        * editing/EditorCommand.cpp:
        added EditorCommandSource parameter to isEnabled function prototype
        (WebCore::enabled):
        added unused EditorCommandSource parameter to these isEnabled functions:
        (WebCore::enabledAnySelection):
        (WebCore::enabledAnySelectionAndMark):
        (WebCore::enableCaretInEditableText):
        (WebCore::enabledCopy):
        (WebCore::enabledCut):

        (WebCore::enabledDelete):
        new function, uses logic previously used by Delete command for DOM sources; uses logic in enabledCut
        for menu source

        added unused EditorCommandSource parameter to these isEnabled functions:
        (WebCore::enabledInEditableText):
        (WebCore::enabledInRichlyEditableText):
        (WebCore::enabledPaste):
        (WebCore::enabledRangeInEditableText):
        (WebCore::enabledRangeInRichlyEditableText):
        (WebCore::enabledRedo):
        (WebCore::enabledUndo):

        (WebCore::CommandEntry::):
        wire up new enabledDelete function as delete function for Delete command

        (WebCore::Editor::Command::isEnabled):
        pass EditorCommandSource parameter to isEnabled function

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/editing/EditorCommand.cpp