|
|
Created:
6 years, 2 months ago by Habib Virji Modified:
5 years, 10 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, kpschoedel, mkwst+moarreviews-shell_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionEmbedder API for accessing DOM3 code value based on dom code value
Sets the domCode value to the WebKeyboard event.
Blink then using embedder API call to converts a dom code to a DOM code value.
DOM3 code value are defined in keyboard_converer_data.h, where it maps the native value to the DOM code value. On blink side, it sends dom key value to fetch DOM3 code value.
Includes changes to the eventsender as previously it used windowsVirtualKeyCode. This has been replaced by code string, which is used to find equivalent domCode value.
BUG=227231
R=garykac, Wez
Committed: https://crrev.com/565c80c51413690b152b540f3b8dca9cb0abfdb5
Cr-Commit-Position: refs/heads/master@{#315013}
Patch Set 1 #Patch Set 2 : Embedder API to allow access to DOM3 code value based on native key value #
Total comments: 6
Patch Set 3 : Updated as per code review comments #
Total comments: 4
Patch Set 4 : #Patch Set 5 : Using domCode to find codeString and update to the tests #Patch Set 6 : Renamed the function name and added new embedded API to convert code string to dom enum value #Patch Set 7 : "Updated to return WebString and int instead of long" #
Total comments: 5
Patch Set 8 : Updated with correct cast for event_sender #Patch Set 9 : "Moved embedder API from render_view_impl to blink_platform_impl" #Patch Set 10 : #Patch Set 11 : Updated to latest master #Patch Set 12 : Updated to latest master. #Patch Set 13 : Change toupper to base:ToUpperASCII #
Messages
Total messages: 48 (17 generated)
To support blink changes https://codereview.chromium.org/663523002/
habib.virji@samsung.com changed reviewers: + haraken@chromium.org, jamesr@chromium.org, tkent@chromium.org
@garykac: Is change in the above mechanism of using usb code okay??
On 2014/10/22 15:27:14, Habib Virji wrote: > @garykac: Is change in the above mechanism of using usb code okay?? This change is not needed any more
Message was sent while issue was closed.
habib.virji@samsung.com changed reviewers: + wez@chromium.org - haraken@chromium.org, jamesr@chromium.org, tkent@chromium.org
Message was sent while issue was closed.
habib.virji@samsung.com changed required reviewers: + garykac@chromium.org
This CL has been updated based on comments from Wez and is required now.
apavlov@chromium.org changed reviewers: + apavlov@chromium.org
Any updates on this?
https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... content/renderer/render_view_impl.cc:1789: int native) { This seems to fit 80 chars unwrapped? https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... content/renderer/render_view_impl.h:381: virtual const char* getKeyboardDOMCodeValue(int nativeValue); The style guide does not seem to honor the "get" prefix. keyboardDOMCodeValue() should do fine. https://codereview.chromium.org/658183002/diff/20001/content/shell/renderer/t... File content/shell/renderer/test_runner/event_sender.cc (right): https://codereview.chromium.org/658183002/diff/20001/content/shell/renderer/t... content/shell/renderer/test_runner/event_sender.cc:1273: } else if ("scrollLock" == code_str) { is this a drive-by change?
@apavlov: Will update your changes. Kevin was doing some changes on the
On 2014/11/13 15:03:50, Habib Virji wrote: > @apavlov: Will update your changes. Kevin was doing some changes on the chromium side. I am just waiting for that CL to land. Once done will push in for my changes.
On 2014/11/13 15:04:24, Habib Virji wrote: > On 2014/11/13 15:03:50, Habib Virji wrote: > > @apavlov: Will update your changes. Kevin was doing some changes on the > chromium side. I am just waiting for that CL to land. Once done will push in for > my changes. Thanks, Habib. Looking forward to this getting fixed.
Thanks apavlov, have addressed your comments. Blink side is updated too. Hoping for Wez or gary to have a look as chrome side changes are landed. https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... content/renderer/render_view_impl.cc:1789: int native) { On 2014/11/12 08:56:32, apavlov wrote: > This seems to fit 80 chars unwrapped? Done. https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/20001/content/renderer/render_... content/renderer/render_view_impl.h:381: virtual const char* getKeyboardDOMCodeValue(int nativeValue); On 2014/11/12 08:56:32, apavlov wrote: > The style guide does not seem to honor the "get" prefix. keyboardDOMCodeValue() > should do fine. Done. https://codereview.chromium.org/658183002/diff/20001/content/shell/renderer/t... File content/shell/renderer/test_runner/event_sender.cc (right): https://codereview.chromium.org/658183002/diff/20001/content/shell/renderer/t... content/shell/renderer/test_runner/event_sender.cc:1273: } else if ("scrollLock" == code_str) { Actually these changes are not needed any more, it is useful for testing but not useful much. Removing them.
A small nit: the first two issue Description lines essentially say the same thing. Please retain only one of those and copy the issue Subject as the first line of the Description.
habib.virji@samsung.com changed required reviewers: - garykac@chromium.org
On 2014/12/01 at 12:50:50, apavlov wrote: > A small nit: the first two issue Description lines essentially say the same thing. Please retain only one of those and copy the issue Subject as the first line of the Description. Thanks. Done.
On 2014/12/01 13:17:38, Habib Virji wrote: > On 2014/12/01 at 12:50:50, apavlov wrote: > > A small nit: the first two issue Description lines essentially say the same > thing. Please retain only one of those and copy the issue Subject as the first > line of the Description. > > Thanks. Done. The description text doesn't really describe what _this_ CL does; can we update it to reflect that this is the Chromium-side implementation of the embedder API that Blink will call to convert a native code to a DOM code value.
https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... content/renderer/render_view_impl.cc:1825: return ui::KeycodeConverter::NativeKeycodeToCode(native); Two-space indent for the body of the method. https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... content/renderer/render_view_impl.h:385: virtual const char* keyboardDOMCodeValue(int nativeValue); Is |int| going to be large enough to hold a DomKey value? I think they are defined with 32-bit values.
Adding Kevin, FHI
habib.virji@samsung.com changed reviewers: + dgozman@chromium.org
https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... content/renderer/render_view_impl.cc:1825: return ui::KeycodeConverter::NativeKeycodeToCode(native); On 2014/12/02 04:03:14, Wez wrote: > Two-space indent for the body of the method. Done. https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/40001/content/renderer/render_... content/renderer/render_view_impl.h:385: virtual const char* keyboardDOMCodeValue(int nativeValue); On 2014/12/02 at 04:03:14, Wez wrote: > Is |int| going to be large enough to hold a DomKey value? I think they are defined with 32-bit values. It is based on the value from nativeVirtualKeyCode(), and it is int. Perhaps, needs updating.
habib.virji@samsung.com changed reviewers: + rbyers@chromium.org - dgozman@chromium.org
The CQ bit was checked by apavlov@chromium.org
The CQ bit was unchecked by apavlov@chromium.org
habib.virji@samsung.com changed reviewers: + jeremy@chromium.org - apavlov@chromium.org, rbyers@chromium.org
@jeremy: Can you please review changes for content/renderer/render_view_impl.h/cc. These changes are for corresponding Blink changes: https://codereview.chromium.org/663523002/. Adds two embedder API to access DOM code value and DOM code enum. @sadrul: content/browser/renderer_host/web_input_event_aura.cc. Change is to assign WebKeyboardEvent, domCode, to set Dom code enum. @rbyers: These changes are to assign domCode value for test purpose, content/shell/renderer/test_runner/event_sender.cc
habib.virji@samsung.com changed reviewers: + rbyers@chromium.org, sadrul@chromium.org
habib.virji@samsung.com changed reviewers: + jamesr@chromium.org, piman@chromium.org - jeremy@chromium.org
@piman/jamesr: Can you please review changes for content/renderer/render_view_impl.h/cc. These changes are for corresponding Blink changes: https://codereview.chromium.org/663523002/. Adds two embedder API to access DOM code value and DOM code enum.
jamesr@chromium.org changed reviewers: - jamesr@chromium.org
I'm not an owner for this code (any more)
habib.virji@samsung.com changed reviewers: + jochen@chromium.org
https://codereview.chromium.org/658183002/diff/120001/content/renderer/render... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/120001/content/renderer/render... content/renderer/render_view_impl.h:365: virtual int domEnumFromCodeString(const blink::WebString& codeString); Why do these need to be virtual members of WebViewImpl? They don't access state, they could be static. https://codereview.chromium.org/658183002/diff/120001/content/shell/renderer/... File content/shell/renderer/test_runner/event_sender.cc (right): https://codereview.chromium.org/658183002/diff/120001/content/shell/renderer/... content/shell/renderer/test_runner/event_sender.cc:1369: event_down.domCode = static_cast<long>( is domCode supposed to be long or int? We should be consistent.
Thanks piman, updated event_sender with correct cast. Regarding using static instead of virtual, perhaps it needs to be virtual in render_view_impl.cc. As explained below. https://codereview.chromium.org/658183002/diff/120001/content/renderer/render... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/120001/content/renderer/render... content/renderer/render_view_impl.h:365: virtual int domEnumFromCodeString(const blink::WebString& codeString); No they do. Both functions are trying to access value defined in ui/events/keycodes/dom4/keycode_converter_data.h. They are kind of helper function for the values defined on the chromium side to be passed to the blink side. https://codereview.chromium.org/658183002/diff/120001/content/shell/renderer/... File content/shell/renderer/test_runner/event_sender.cc (right): https://codereview.chromium.org/658183002/diff/120001/content/shell/renderer/... content/shell/renderer/test_runner/event_sender.cc:1369: event_down.domCode = static_cast<long>( It is supposed to be int.
On Wed, Jan 28, 2015 at 2:02 AM, <habib.virji@samsung.com> wrote: > Thanks piman, updated event_sender with correct cast. > > Regarding using static instead of virtual, perhaps it needs to be virtual > in > render_view_impl.cc. As explained below. > > > https://codereview.chromium.org/658183002/diff/120001/ > content/renderer/render_view_impl.h > File content/renderer/render_view_impl.h (right): > > https://codereview.chromium.org/658183002/diff/120001/ > content/renderer/render_view_impl.h#newcode365 > content/renderer/render_view_impl.h:365: virtual int > domEnumFromCodeString(const blink::WebString& codeString); > No they do. > > Both functions are trying to access value defined in > ui/events/keycodes/dom4/keycode_converter_data.h. They are kind of > helper function for the values defined on the chromium side to be passed > to the blink side. I understand it needs to be on the chromium side, but why does it have to be a member function on RenderViewImpl? It doesn't access any field from RenderViewImpl. The returned values don't depend on which RenderView this is talking to. > > > https://codereview.chromium.org/658183002/diff/120001/ > content/shell/renderer/test_runner/event_sender.cc > File content/shell/renderer/test_runner/event_sender.cc (right): > > https://codereview.chromium.org/658183002/diff/120001/ > content/shell/renderer/test_runner/event_sender.cc#newcode1369 > content/shell/renderer/test_runner/event_sender.cc:1369: > event_down.domCode = static_cast<long>( > It is supposed to be int. > > https://codereview.chromium.org/658183002/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
https://codereview.chromium.org/658183002/diff/120001/content/renderer/render... File content/renderer/render_view_impl.h (right): https://codereview.chromium.org/658183002/diff/120001/content/renderer/render... content/renderer/render_view_impl.h:365: virtual int domEnumFromCodeString(const blink::WebString& codeString); On 2015/01/28 10:02:11, Habib Virji wrote: > No they do. > > Both functions are trying to access value defined in > ui/events/keycodes/dom4/keycode_converter_data.h. They are kind of helper > function for the values defined on the chromium side to be passed to the blink > side. > These are embedder-provided APIs on the WebViewClient - the key event handling code in Blink needs the embedder to provide them and WebViewClient ended up being the cleanest place to do that, IIUC.
On Wed, Jan 28, 2015 at 4:51 PM, <wez@chromium.org> wrote: > > https://codereview.chromium.org/658183002/diff/120001/ > content/renderer/render_view_impl.h > File content/renderer/render_view_impl.h (right): > > https://codereview.chromium.org/658183002/diff/120001/ > content/renderer/render_view_impl.h#newcode365 > content/renderer/render_view_impl.h:365: virtual int > domEnumFromCodeString(const blink::WebString& codeString); > On 2015/01/28 10:02:11, Habib Virji wrote: > >> No they do. >> > > Both functions are trying to access value defined in >> ui/events/keycodes/dom4/keycode_converter_data.h. They are kind of >> > helper > >> function for the values defined on the chromium side to be passed to >> > the blink > >> side. >> > > > These are embedder-provided APIs on the WebViewClient - the key event > handling code in Blink needs the embedder to provide them and > WebViewClient ended up being the cleanest place to do that, IIUC. > Given that RenderViewImpl is meant to be eventually removed, I would prefer if we found another place, e.g. on BlinkPlatformImpl / blink::Platform. Antoine > > https://codereview.chromium.org/658183002/ > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Thanks Antoine, code has been updated to use blink_platform_impl and does not use render_view_impl.
lgtm
The CQ bit was checked by habib.virji@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/658183002/220001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tes...)
The CQ bit was checked by habib.virji@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/658183002/240001
Message was sent while issue was closed.
Committed patchset #13 (id:240001)
Message was sent while issue was closed.
Patchset 13 (id:??) landed as https://crrev.com/565c80c51413690b152b540f3b8dca9cb0abfdb5 Cr-Commit-Position: refs/heads/master@{#315013} |