Bug 84010 - [GTK] atk/textChangedNotifications API test fails
Summary: [GTK] atk/textChangedNotifications API test fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-16 00:21 PDT by Philippe Normand
Modified: 2012-04-19 15:56 PDT (History)
4 users (show)

See Also:


Attachments
Patch proposal (3.71 KB, patch)
2012-04-16 07:32 PDT, Mario Sanchez Prada
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2012-04-16 00:21:49 PDT
First failing build is http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release/builds/22284
I suspect http://trac.webkit.org/changeset/114220 might be culprit.

I'll skip this test for now.
Comment 1 Mario Sanchez Prada 2012-04-16 07:32:45 PDT
Created attachment 137346 [details]
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.
Comment 2 Martin Robinson 2012-04-16 08:21:31 PDT
Is Dictation a new feature? I'm surprised it isn't behind a compile-time flag.
Comment 3 Jia Pu 2012-04-16 18:23:22 PDT
(In reply to comment #2)
> Is Dictation a new feature? I'm surprised it isn't behind a compile-time flag.

Currently this is used only by OS X. I can certainly put it behind compile time flag, if that's desirable.
Comment 4 Jia Pu 2012-04-17 10:26:49 PDT
It seems http://trac.webkit.org/changeset/114311 has already fixed this.
Comment 5 Martin Robinson 2012-04-17 10:34:17 PDT
We just need to unskip the test now.
Comment 6 Mario Sanchez Prada 2012-04-18 00:37:49 PDT
Committed r114490: <http://trac.webkit.org/changeset/114490>
Comment 7 Eric Seidel (no email) 2012-04-19 15:56:50 PDT
Comment on attachment 137346 [details]
Patch proposal

Cleared review? from attachment 137346 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).