1. Chromium Embedded Framework
  2. cef
  3. Pull requests

Pull requests

#104 Open
Repository
cef_osrtouch
Branch
touch_pr
Repository
cef
Branch
master

Touch processing for OSR, different API

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

git checkout master
git remote add kebbyfr/cef_osrtouch https://bitbucket.org/kebbyfr/cef_osrtouch.git
git fetch kebbyfr/cef_osrtouch
git merge --no-ff -m 'Merged in kebbyfr/cef_osrtouch/touch_pr (pull request #104)' remotes/kebbyfr/cef_osrtouch/touch_pr
Author
  1. Tammo Hinrichs
Reviewers
Description

An alternative approach to https://bitbucket.org/chromiumembedded/cef/pull-requests/100 - please read my comments there. This PR is the implementation of what I suggested.

Original issue: https://bitbucket.org/chromiumembedded/cef/issues/1059/cef3-multi-touch-support-with-offscreen

Missing: CefClient usage (I can probably do Win32, anyone up for Linux/Mac/etc?), unit tests

  • Issues #100: Add support for off-screen rendering resolved

Comments (35)

  1. Nishant Kaushik

    (I hope I am not stepping over the lines here, but we desperately need Touch support :) So my 2 cents on closing this -

    Marshall Greenblatt , Tammo Hinrichs I have added UnitTests, and OSX sample usage to this pull request. It includes -

    0) Since the Pull request was out of date, I have rebased it to the latest master.

    1) Sample client usage for OSX. Since there is no touch screen on OSX devices, the sample usage simulates touch screen by mapping touch events on TrackPad to Touch Events on Screen (and may be slightly flaky hence).To ensure it does not interfere with other Trackpad events, this mapping is only enabled if touch-events=enabled commandline is passed and caps lock key is on.

    2) Sample Client Usage Win: Sample client usage for Win is based on WM_TOUCH (and not WM_POINTER) since WM_POINTER is not available on Win7, and a lot of clients will likely require Win7 support.

    3) UnitTests for SendTouchEvent API. The UnitTest ensures that SendTouchEvent are working by validating that appropriate JavaScript events are triggered.

    4) Style cleanups.

    A live patch (pull request) is here - "curl https://api.bitbucket.org/2.0/repositories/nishant_kaushik/acrocef/pullrequests/6/patch -L"

    The unit tests are working on all platforms and the sample simulating Touch by mapping Trackpad seems to work reasonably well. Please review. Tammo Hinrichs It'll be great if you can help with adding Win sample usage to close this long standing issue.

        1. Nishant Kaushik

          Thanks Tammo, I can understand that :). I'll try to add Windows sample usage and if it works update the pull request with that and you can help review that to make sure it is correct.

        2. Nishant Kaushik

          Tammo Hinrichs I have added Windows sample usage also. The Windows Sample client usage for is based on WM_TOUCH (and not WM_POINTER) since WM_POINTER is not available on Win7, and we (and a lot of other clients likely) still require Win7 support.

          Sample Usage appended to Pull Request itself.

          Or you can look at the commit -

          https://bitbucket.org/nishant_kaushik/acrocef/commits/0ee2c5a33696700e59efaafd0e8fcaaab7cf70f3?at=master

          I also noticed two minor issues that I have updated in PR below and have fixed. In addition this commit also includes the style fixes and cleanup. Please review the sample usages and other changes.

        3. Nishant Kaushik

          Tammo Hinrichs [again overstepping the boundaries but :)] Please let me know if I can help further with rebasing these changes and keeping them in Sync with the master to ease with merging to Trunk. (While my other PRs were under review I had automated, rebasing, building and validating my PRs on Win/Mac.) Since we are now using this Touch implementation, I am doing the same with this PR by forking this as a local PR, with original commits rebased to master and sample usage + cleanup) https://bitbucket.org/nishant_kaushik/acrocef/pull-requests/6

          (I would need write access to https://bitbucket.org/kebbyfr/cef_osrtouch for that though)

          1. Tammo Hinrichs author

            Not overstepping the boundaries at all; you seem to have the time to complete this PR (and I don't really) so I gave you write access to the repo. Update ahead as you wish. And thank you! :)

              1. Dmitry Azaraev

                Thanks to all. As for Windows example while it miss WM_POINTER usage, i suggest just to include comment about in sample code, otherwise followers miss this point. (Argues about Windows 7 is correct, but on modern systems WM_POINTER support should be mandatory choice. )

              2. Tammo Hinrichs author

                Looks very good to me now. Thanks!

                Speaking of overstepping boundaries and now becoming the guy who demands stuff: Could you check John's comment on CefRenderWidgetHostViewOSR::OnGestureEvent() below and add the three lines of code he suggested?

  2. Alexey Makarov

    Nishant Kaushik. I have complie CEF 3071 with changes from PR 104 and test on Win10. cefclient.exe --off-screen-rendering-enabled --touch-events-enabled You see, the problem is that though touch-scroll works just fine but if there is some texting and other objects then it become selected while I try to touch-scroll the page. Screen captupe link https://yadi.sk/i/fm-LggO-3KooNf Problem in the CefClient.

  3. Cristian Carli

    Hello everyone i follow this project for long time and I want to try it because is extremely charming but i tried to download the project and build it and I obtain a lot of error and I don't know how to solve it. I have also tried to start from a standard build and follow the instruction from the guide but i obtain an error during the extracting. So is there anyone that can can send me the build project with .sln file ? Thanks to much

  4. Benjamin Laffont

    Hello,

    have you tested it on maps.google.fr ?

    I have included it on the 55 build version with CefSharp on it and i was unable to pinch to zoom on maps. (it can be my own integration that have failed...)

    Thanks,

      1. Benjamin Laffont

        Hello,

        Sorry to insist, it will be my last post :D

        I have found the problem and make my own resolution (maybe not the best...) My touch problem was located in the render_widget_host_view_osr.cc file, in the CefRenderWidgetHostViewOSR::TranslateTouchEvent method

        Symptom : When you totally disable mouse events, you cannot pinch to zoom in maps.google.fr. You can invoke the devtool on this website and launch a monitorEvents(document) on the console. You will see (on a fully touch action) some mouse events.

        Problem : In the given method, we call CreateWebTouchEventFromMotionEvent but this method does not fill properly the Id so that when we call MarkUnchangedTouchPointsAsStationary, we mark ALL events as stationary (even the last move event sent).

        Solution : I just comment the call of MarkUnchangedTouchPointsAsStationary. This is not the best but i have now a fully functional solution with native touch/pinch to zoom.

        Let me know if it is the right solution :)

        Regards,

        1. Nishant Kaushik

          Hi Benjamin,

          (CreateWebTouchEventFromMotionEvent is actually implemented is chromium/src/ui/events/blink/blink_event_util.cc and is the same code that used by chromium and in non osr mode and that too is working as expected. So the issue likely lies elsewhere.)

          Pinch to zoom on maps.google.fr seems to be working fine in sample CefClient (please make sure you pass touch-events=enabled command line flag). Can you please confirm if this is working in sample Cef client.