Reviewed by Maciej.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2005 00:58:35 +0000 (00:58 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2005 00:58:35 +0000 (00:58 +0000)
commit0ab325af9c4eed875d472e95beeadb92f51ec007
treea3dc92849d2b18bc2b54e6c3db162b1afb51276e
parent104131ea9ac53f3342b7377619200450a1bc9912
    Reviewed by Maciej.

        - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8

        Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check,
        rather than relying on high level assumptions about which calls can and can't destroy the HTML element
        (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element.
        We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems,
        because this just avoids nil-dereferencing.

        * kwq/KWQButton.mm:
        (-[KWQButton becomeFirstResponder]):
        (-[KWQButton nextKeyView]):
        (-[KWQButton previousKeyView]):
        * kwq/KWQListBox.mm:
        (-[KWQTableView mouseDown:]):
        (-[KWQTableView becomeFirstResponder]):
        (-[KWQTableView numberOfRowsInTableView:]):
        (-[KWQTableView tableViewSelectionDidChange:]):
        (-[KWQTableView tableView:shouldSelectRow:]):
        (-[KWQTableView selectionShouldChangeInTableView:]):
        * kwq/KWQScrollBar.mm:
        (-[KWQScrollBar scroll:]):
        * kwq/KWQSlider.mm:
        (-[KWQSlider mouseDown:]):
        (-[KWQSlider slide:]):
        (-[KWQSlider becomeFirstResponder]):
        (-[KWQSlider nextKeyView]):
        (-[KWQSlider previousKeyView]):
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView becomeFirstResponder]):
        (-[KWQTextAreaTextView resignFirstResponder]):
        (-[KWQTextAreaTextView mouseDown:]):
        * kwq/KWQTextField.mm:
        (-[KWQTextFieldController action:]):
        (-[KWQTextFieldController controlTextDidEndEditing:]):
        (-[KWQTextFieldController controlTextDidChange:]):
        (-[KWQTextFieldController textView:didHandleEvent:]):
        (-[KWQTextFieldController setHasFocus:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/html_formimpl.cpp
WebCore/khtml/html/html_formimpl.h
WebCore/kwq/KWQButton.mm
WebCore/kwq/KWQListBox.mm
WebCore/kwq/KWQScrollBar.mm
WebCore/kwq/KWQSlider.mm
WebCore/kwq/KWQTextArea.mm
WebCore/kwq/KWQTextField.mm