Skip to content
Permalink
Browse files
-Wunused-result in WebCoreSupport/WebContextMenuClient.cpp
https://bugs.webkit.org/show_bug.cgi?id=240364

Patch by Michael Catanzaro <mcatanzaro@gnome.org> on 2022-05-12
Reviewed by Chris Dumez.

* Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):

Canonical link: https://commits.webkit.org/250507@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mcatanzaro authored and webkit-commit-queue committed May 13, 2022
1 parent b54396f commit 03abdd14d7677ec4122c48e5b6dbd5ef6ab71098
Showing 2 changed files with 15 additions and 2 deletions.
@@ -1,3 +1,17 @@
2022-05-12 Michael Catanzaro <mcatanzaro@redhat.com>

-Wunused-result in WebCoreSupport/WebContextMenuClient.cpp
https://bugs.webkit.org/show_bug.cgi?id=240364

Reviewed by Chris Dumez.

Fix this code: it's trying but failing to strip whitespace from the string. No new test
because this code is not built on macOS and not exposed in GTK API, and those are the only
platforms which seem to have context menu tests.

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):

2022-05-12 Alex Christensen <achristensen@webkit.org>

Revert r293861
@@ -58,8 +58,7 @@ void WebContextMenuClient::searchWithGoogle(const WebCore::Frame* frame)
if (!page)
return;

auto searchString = frame->editor().selectedText();
searchString.stripWhiteSpace();
auto searchString = frame->editor().selectedText().stripWhiteSpace();
searchString = makeStringByReplacingAll(encodeWithURLEscapeSequences(searchString), "%20"_s, "+"_s);
auto searchURL = URL { "https://www.google.com/search?q=" + searchString + "&ie=UTF-8&oe=UTF-8" };

0 comments on commit 03abdd1

Please sign in to comment.