Bug 45898 - editing/selection/context-menu-on-text.html fails on chromium
Summary: editing/selection/context-menu-on-text.html fails on chromium
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 49366 49367
  Show dependency treegraph
 
Reported: 2010-09-16 09:29 PDT by John Gregg
Modified: 2010-11-14 17:18 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.09 KB, patch)
2010-09-16 09:55 PDT, John Gregg
no flags Details | Formatted Diff | Diff
Patch (10.84 KB, patch)
2010-11-11 00:23 PST, Hajime Morrita
no flags Details | Formatted Diff | Diff
Patch (10.76 KB, patch)
2010-11-11 20:07 PST, Hajime Morrita
tkent: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Gregg 2010-09-16 09:29:33 PDT
new test added in http://trac.webkit.org/changeset/67626/ fails on chromium, being skipped.
Comment 1 John Gregg 2010-09-16 09:55:48 PDT
Created attachment 67810 [details]
Patch
Comment 2 John Gregg 2010-09-16 10:05:00 PDT
Committed r67632: <http://trac.webkit.org/changeset/67632>
Comment 3 John Gregg 2010-09-16 10:05:40 PDT
Patch landed was just test expectations.  Bug still exists.
Comment 4 WebKit Review Bot 2010-09-16 10:35:13 PDT
http://trac.webkit.org/changeset/67632 might have broken GTK Linux 32-bit Release
Comment 5 Hajime Morrita 2010-11-11 00:23:42 PST
Created attachment 73585 [details]
Patch
Comment 6 Hajime Morrita 2010-11-11 00:29:31 PST
(In reply to comment #5)
> Created an attachment (id=73585) [details]
> Patch

The patch doesn't care about spellchecking.
I filed Bug 49366 for that case.
Comment 7 Kent Tamura 2010-11-11 19:38:51 PST
Comment on attachment 73585 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=73585&action=review

> WebKit/chromium/src/WebBindings.cpp:330
> +    for (size_t i = 0; i < data.size(); i++)

nit: we prefer ++i

> WebKitTools/DumpRenderTree/chromium/EventSender.cpp:741
> +    // These constant is based on Safari's context menu because tests are made for it.

"These constants are"?

> WebKitTools/DumpRenderTree/chromium/EventSender.cpp:770
> +    // Clears last context menu data because
> +    // we need to know if the context menu be requested after following mouse events.

Line breaking between "because" and "we" looks curious.  The first line is not so long and it can contain more words.

> WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp:449
> +    OwnPtr<WebContextMenuData> given(new WebContextMenuData(contextMenuData));
> +    m_lastContextMenuData.swap(given);

Why not m_lastContextMenuData = adoptPtr(new WebContextmenuData(contextMenuData)) ?

> WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp:455
> +    OwnPtr<WebContextMenuData> empty;
> +    m_lastContextMenuData.swap(empty);

Why not m_lastContextMenuData.clear()?
Comment 8 Hajime Morrita 2010-11-11 20:07:30 PST
Created attachment 73694 [details]
Patch
Comment 9 Hajime Morrita 2010-11-11 20:09:39 PST
Hi Kent-san, thank you for reviewing!
I updated the patch to address your feedback.

> > WebKit/chromium/src/WebBindings.cpp:330
> > +    for (size_t i = 0; i < data.size(); i++)
> 
> nit: we prefer ++i
Fixed.

> 
> > WebKitTools/DumpRenderTree/chromium/EventSender.cpp:741
> > +    // These constant is based on Safari's context menu because tests are made for it.
> 
> "These constants are"?
Fixed.

> 
> > WebKitTools/DumpRenderTree/chromium/EventSender.cpp:770
> > +    // Clears last context menu data because
> > +    // we need to know if the context menu be requested after following mouse events.
> 
> Line breaking between "because" and "we" looks curious.  The first line is not so long and it can contain more words.
Fixed.

> 
> > WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp:449
> > +    OwnPtr<WebContextMenuData> given(new WebContextMenuData(contextMenuData));
> > +    m_lastContextMenuData.swap(given);
> 
> Why not m_lastContextMenuData = adoptPtr(new WebContextmenuData(contextMenuData)) ?
Rewrote to use adoptPtr(). Thank you for telling this.

> 
> > WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp:455
> > +    OwnPtr<WebContextMenuData> empty;
> > +    m_lastContextMenuData.swap(empty);
> 
> Why not m_lastContextMenuData.clear()?
Fixed.
Comment 10 Kent Tamura 2010-11-11 20:16:27 PST
Comment on attachment 73694 [details]
Patch

ok
Comment 11 Hajime Morrita 2010-11-11 22:02:21 PST
Committed r71886: <http://trac.webkit.org/changeset/71886>
Comment 12 WebKit Review Bot 2010-11-11 22:31:50 PST
http://trac.webkit.org/changeset/71886 might have broken Chromium Win Release
Comment 13 Marcus Bulach 2010-11-12 03:00:30 PST
(In reply to comment #12)
> http://trac.webkit.org/changeset/71886 might have broken Chromium Win Release

We need to make a similar change to fix test_shell.
I've temporarily disabled this test again, see more details:
https://bugs.webkit.org/show_bug.cgi?id=45898
Comment 14 Marcus Bulach 2010-11-12 03:01:02 PST
(In reply to comment #13)
> (In reply to comment #12)
> > http://trac.webkit.org/changeset/71886 might have broken Chromium Win Release
> 
> We need to make a similar change to fix test_shell.
> I've temporarily disabled this test again, see more details:
> https://bugs.webkit.org/show_bug.cgi?id=45898

Sorry, this is the correct bug:
https://bugs.webkit.org/show_bug.cgi?id=49436
Comment 15 Hajime Morrita 2010-11-14 17:18:50 PST
Hi Bulach, thank you for file them!
I have one more upcoming DRT change.
So I'll port them to test_shell after land next one. 

(In reply to comment #14)
> (In reply to comment #13)
> > (In reply to comment #12)
> > > http://trac.webkit.org/changeset/71886 might have broken Chromium Win Release
> > 
> > We need to make a similar change to fix test_shell.
> > I've temporarily disabled this test again, see more details:
> > https://bugs.webkit.org/show_bug.cgi?id=45898
> 
> Sorry, this is the correct bug:
> https://bugs.webkit.org/show_bug.cgi?id=49436