Changeset 19672 in webkit
- Timestamp:
- Feb 16, 2007 5:15:48 PM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r19667 r19672 1 2007-02-16 Darin Adler <darin@apple.com> 2 3 Reviewed by Adele. 4 5 - fix <rdar://problem/4990864> ASSERT in FormDelegate.m while dragging text between frames 6 7 This symptom is specific to Safari, so no layout test. 8 9 * editing/DeleteSelectionCommand.cpp: 10 (WebCore::DeleteSelectionCommand::doApply): Only call textWillBeDeletedInTextField if the 11 text field is focused. 12 * html/HTMLInputElement.cpp: 13 (WebCore::HTMLInputElement::aboutToUnload): Only call textFieldDidEndEditing if the text 14 field is focused. 15 (WebCore::HTMLInputElement::dispatchBlurEvent): Remove unneeded type cast. 16 (WebCore::HTMLInputElement::defaultEventHandler): Only call doTextFieldCommandFromEvent if 17 the text field is focused. 18 * rendering/RenderTextControl.cpp: 19 (WebCore::RenderTextControl::subtreeHasChanged): Only call textDidChangeInTextArea, 20 textFieldDidBeginEditing, and textDidChangeInTextField if the element is focused. 21 1 22 2007-02-16 Anders Carlsson <acarlsson@apple.com> 2 23 -
trunk/WebCore/editing/DeleteSelectionCommand.cpp
r19088 r19672 559 559 Node* startNode = m_selectionToDelete.start().node(); 560 560 Node* ancestorNode = startNode ? startNode->shadowAncestorNode() : 0; 561 if (ancestorNode && ancestorNode->hasTagName(inputTag) && static_cast<HTMLInputElement*>(ancestorNode)->isTextField()) 561 if (ancestorNode && ancestorNode->hasTagName(inputTag) 562 && static_cast<HTMLInputElement*>(ancestorNode)->isTextField() 563 && ancestorNode->focused()) 562 564 document()->frame()->textWillBeDeletedInTextField(static_cast<Element*>(ancestorNode)); 563 565 } -
trunk/WebCore/html/HTMLInputElement.cpp
r19662 r19672 224 224 void HTMLInputElement::aboutToUnload() 225 225 { 226 if (isTextField() && document()->frame())226 if (isTextField() && focused() && document()->frame()) 227 227 document()->frame()->textFieldDidEndEditing(this); 228 228 } … … 243 243 if (inputType() == PASSWORD) 244 244 document()->frame()->setSecureKeyboardEntry(false); 245 document()->frame()->textFieldDidEndEditing( static_cast<Element*>(this));245 document()->frame()->textFieldDidEndEditing(this); 246 246 } 247 247 HTMLGenericFormElement::dispatchBlurEvent(); … … 1169 1169 bool clickElement = false; 1170 1170 1171 if (isTextField() && document()->frame()1171 if (isTextField() && focused() && document()->frame() 1172 1172 && document()->frame()->doTextFieldCommandFromEvent(this, static_cast<KeyboardEvent*>(evt))) { 1173 1173 evt->setDefaultHandled(); -
trunk/WebCore/rendering/RenderTextControl.cpp
r19620 r19672 488 488 if (m_multiLine) { 489 489 element->setValueMatchesRenderer(false); 490 if (Frame* frame = document()->frame()) 491 frame->textDidChangeInTextArea(element); 490 if (element->focused()) 491 if (Frame* frame = document()->frame()) 492 frame->textDidChangeInTextArea(element); 492 493 } else { 493 494 HTMLInputElement* input = static_cast<HTMLInputElement*>(element); … … 501 502 502 503 if (!wasDirty) { 504 if (input->focused()) 505 if (Frame* frame = document()->frame()) 506 frame->textFieldDidBeginEditing(input); 507 } 508 if (input->focused()) 503 509 if (Frame* frame = document()->frame()) 504 frame->textFieldDidBeginEditing(input); 505 } 506 if (Frame* frame = document()->frame()) 507 frame->textDidChangeInTextField(input); 510 frame->textDidChangeInTextField(input); 508 511 } 509 512 }
Note: See TracChangeset
for help on using the changeset viewer.