[Webkit-unassigned] [Bug 84010] [GTK] atk/textChangedNotifications API test fails

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


https://bugs.webkit.org/show_bug.cgi?id=84010


Mario Sanchez Prada <msanchez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #137346|                            |review?
               Flag|                            |




--- Comment #1 from Mario Sanchez Prada <msanchez at igalia.com>  2012-04-16 07:32:45 PST ---
Created an attachment (id=137346)
 --> (https://bugs.webkit.org/attachment.cgi?id=137346&action=review)
Patch proposal

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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list