Commit f0804e9d authored by tony@chromium.org's avatar tony@chromium.org
Browse files

2010-05-12 Tony Chang <tony@chromium.org>

        Reviewed by Darin Adler.

        Spellcheck disabling does not disable context menu
        https://bugs.webkit.org/show_bug.cgi?id=25639

        * editing/spelling/context-menu-suggestions.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/gtk/Skipped:
        * platform/mac-leopard/editing/spelling/context-menu-suggestions-expected.txt: Added.
        * platform/qt/Skipped:
        * platform/win/Skipped:
2010-05-12  Tony Chang  <tony@chromium.org>

        Reviewed by Darin Adler.

        Spellcheck disabling does not disable context menu
        https://bugs.webkit.org/show_bug.cgi?id=25639

        Test: editing/spelling/context-menu-suggestions.html

        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::populate):
2010-05-12  Tony Chang  <tony@chromium.org>

        Reviewed by Darin Adler.

        Spellcheck disabling does not disable context menu
        https://bugs.webkit.org/show_bug.cgi?id=25639

        * DumpRenderTree/mac/EventSendingController.mm:
        (+[EventSendingController isSelectorExcludedFromWebScript:]):
        (+[EventSendingController webScriptNameForSelector:]):
        (-[EventSendingController contextClick:]): add a bool parameter that
              when true, dumps the context menu items to stdout.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5e7f9c56
2010-05-12 Tony Chang <tony@chromium.org>
Reviewed by Darin Adler.
Spellcheck disabling does not disable context menu
https://bugs.webkit.org/show_bug.cgi?id=25639
* editing/spelling/context-menu-suggestions.html: Added.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/mac-leopard/editing/spelling/context-menu-suggestions-expected.txt: Added.
* platform/qt/Skipped:
* platform/win/Skipped:
2010-05-16 Andreas Kling <andreas.kling@nokia.com>
 
Reviewed by Kenneth Rohde Christiansen.
<body onload="test()">
<p>This test checks that spelling suggestions in the context menu are not show when spellcheck="false".
To test manually, right click on the text in the input box.</p>
<input id="input" spellcheck="false" />
</body>
<script>
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
var input = document.getElementById("input");
input.focus();
document.execCommand("InsertText", false, 'w');
document.execCommand("InsertText", false, 'w');
document.execCommand("InsertText", false, ' ');
var x = input.offsetParent.offsetLeft + input.offsetLeft + 4;
var y = input.offsetParent.offsetTop + input.offsetTop + input.offsetHeight / 2;
if (!window.eventSender)
return;
console.log("Spelling suggestings should NOT be here");
eventSender.mouseMoveTo(x, y);
eventSender.contextClick(true);
input.setAttribute("spellcheck", "true");
console.log("Spelling suggestings SHOULD be here");
eventSender.mouseMoveTo(x, y);
eventSender.contextClick(true);
}
</script>
......@@ -2831,3 +2831,6 @@ BUG44018 WIN : inspector/styles-disable-then-enable.html = TEXT
// Flaky crashing test. Started crashing around Chromium r47220
BUG44150 LINUX DEBUG : fast/forms/input-text-paste-maxlength.html = CRASH PASS
// Need to dump context menu items on eventSender.contextClick(true).
BUGWK39105 : editing/spelling/context-menu-suggestions.html = TEXT
......@@ -5919,3 +5919,7 @@ css1/color_and_background/background_attachment.html
# Skip this, it's pending on one patch in the commit queue
accessibility/aria-controls-with-tabs.html
# Need to dump context menu items on eventSender.contextClick(true).
# https://bugs.webkit.org/show_bug.cgi?id=39102
editing/spelling/context-menu-suggestions.html
CONSOLE MESSAGE: line 24: Spelling suggestings should NOT be here
ContextMenuItems: Search in Spotlight, Search in Google, <separator>, Look Up in Dictionary, <separator>, Cut, Copy, Paste, <separator>, Spelling and Grammar, Font, Speech, Writing Direction, Inspect Element
CONSOLE MESSAGE: line 30: Spelling suggestings SHOULD be here
ContextMenuItems: wow, <separator>, Ignore Spelling, Learn Spelling, <separator>, Search in Spotlight, Search in Google, <separator>, Look Up in Dictionary, <separator>, Cut, Copy, Paste, <separator>, Spelling and Grammar, Font, Speech, Writing Direction, Inspect Element
This test checks that spelling suggestions in the context menu are not show when spellcheck="false". To test manually, right click on the text in the input box.
......@@ -5090,3 +5090,7 @@ editing/selection/shift-click.html
# New test hangs QT bot
# Discussed in https://bugs.webkit.org/show_bug.cgi?id=38928
fast/loader/recursive-before-unload-crash.html
# Need to dump context menu items on eventSender.contextClick(true).
# https://bugs.webkit.org/show_bug.cgi?id=39103
editing/spelling/context-menu-suggestions.html
......@@ -876,3 +876,7 @@ fast/css/display-none-inline-style-change-crash.html
# https://bugs.webkit.org/show_bug.cgi?id=38795 - doesn't print PaintEvent instrumentation output
inspector/timeline-paint.html
# Need to dump context menu items on eventSender.contextClick(true). TODO: add bug number
# https://bugs.webkit.org/show_bug.cgi?id=39104
editing/spelling/context-menu-suggestions.html
2010-05-12 Tony Chang <tony@chromium.org>
Reviewed by Darin Adler.
Spellcheck disabling does not disable context menu
https://bugs.webkit.org/show_bug.cgi?id=25639
Test: editing/spelling/context-menu-suggestions.html
* platform/ContextMenu.cpp:
(WebCore::ContextMenu::populate):
2010-05-16 Sam Weinig <sam@webkit.org>
 
Reviewed by Dan Bernstein.
......@@ -392,8 +392,9 @@ void ContextMenu::populate()
} else { // Make an editing context menu
SelectionController* selection = frame->selection();
bool inPasswordField = selection->isInPasswordField();
bool spellCheckingEnabled = frame->editor()->spellCheckingEnabledInFocusedNode();
if (!inPasswordField) {
if (!inPasswordField && spellCheckingEnabled) {
// Consider adding spelling-related or grammar-related context menu items (never both, since a single selected range
// is never considered a misspelling and bad grammar at the same time)
bool misspelling;
......
2010-05-12 Tony Chang <tony@chromium.org>
Reviewed by Darin Adler.
Spellcheck disabling does not disable context menu
https://bugs.webkit.org/show_bug.cgi?id=25639
* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController contextClick:]): add a bool parameter that
when true, dumps the context menu items to stdout.
2010-05-16 Robert Hogan <robert@webkit.org>
 
Reviewed by Kenneth Rohde Christiansen.
......@@ -122,7 +122,7 @@ BOOL replayingSavedEvents;
{
if (aSelector == @selector(beginDragWithFiles:)
|| aSelector == @selector(clearKillRing)
|| aSelector == @selector(contextClick)
|| aSelector == @selector(contextClick:)
|| aSelector == @selector(enableDOMUIEventLogging:)
|| aSelector == @selector(fireKeyboardEventsToElement:)
|| aSelector == @selector(keyDown:withModifiers:withLocation:)
......@@ -152,6 +152,8 @@ BOOL replayingSavedEvents;
{
if (aSelector == @selector(beginDragWithFiles:))
return @"beginDragWithFiles";
if (aSelector == @selector(contextClick:))
return @"contextClick";
if (aSelector == @selector(enableDOMUIEventLogging:))
return @"enableDOMUIEventLogging";
if (aSelector == @selector(fireKeyboardEventsToElement:))
......@@ -492,7 +494,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
[self mouseScrollByX:x andY:y continuously:NO];
}
- (void)contextClick
- (void)contextClick:(BOOL)shouldPrintMenuItems
{
[[[mainFrame frameView] documentView] layout];
[self updateClickCountForButton:RightMouseButton];
......@@ -508,8 +510,19 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
pressure:0.0];
NSView *subView = [[mainFrame webView] hitTest:[event locationInWindow]];
if (subView)
[subView menuForEvent:event];
if (subView) {
NSMenu* menu = [subView menuForEvent:event];
if (shouldPrintMenuItems) {
printf("ContextMenuItems: ");
for (int i = 0; i < [menu numberOfItems]; ++i) {
if (i > 0)
printf(", ");
NSMenuItem* menuItem = [menu itemAtIndex:i];
fputs([menuItem isSeparatorItem] ? "<separator>" : [[menuItem title] UTF8String], stdout);
}
printf("\n");
}
}
}
- (void)scheduleAsynchronousClick
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment