[webkit-reviews] review requested: [Bug 84010] [GTK] atk/textChangedNotifications API test fails : [Attachment 137346] Patch proposal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 16 07:32:45 PDT 2012


Mario Sanchez Prada <msanchez at igalia.com> has asked  for review:
Bug 84010: [GTK] atk/textChangedNotifications API test fails
https://bugs.webkit.org/show_bug.cgi?id=84010

Attachment 137346: Patch proposal
https://bugs.webkit.org/attachment.cgi?id=137346&action=review

------- Additional Comments from Mario Sanchez Prada <msanchez at igalia.com>
It is segfaulting in WebCore::Editor, at Source/WebCore/editing/Editor.cpp:920.
See the snippet:

   bool Editor::insertTextWithoutSendingTextEvent(const String& text, bool
selectInsertedText, TextEvent* triggeringEvent)
   {
      [...]
       if (selection.isContentEditable()) {
	   if (Node* selectionStart = selection.start().deprecatedNode()) {
	       RefPtr<Document> document = selectionStart->document();

	       // Insert the text
	       if (triggeringEvent->isDictation())   <--- SEGV here,
triggeringEvent might be NULL (see check in line below, in the else branch)
		   DictationCommand::insertText(document.get(), text,
triggeringEvent->dictationAlternatives(), selection);
	       else {
		   TypingCommand::Options options = 0;
		   if (selectInsertedText)
		       options |= TypingCommand::SelectInsertedText;
		   if (autocorrectionWasApplied)
		       options |= TypingCommand::RetainAutocorrectionIndicator;

		   TypingCommand::insertText(document.get(), text, selection,
options, triggeringEvent && triggeringEvent->isComposition() ?
TypingCommand::TextCompositionConfirm : TypingCommand::TextCompositionNone);
	       }
   [...]
   }

So, the attached patch would fix the issue.


More information about the webkit-reviews mailing list