Repository navigation
Fix issue #14: OSR mouse wheel scroll direction is inverted - #37
Merged
Merged
Conversation
This was referenced Sep 5, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #37 +/- ##
============================================
+ Coverage 38.01% 38.25% +0.24%
- Complexity 735 736 +1
============================================
Files 243 244 +1
Lines 14863 14902 +39
Branches 2449 2453 +4
============================================
+ Hits 5650 5701 +51
+ Misses 8011 7983 -28
- Partials 1202 1218 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3 tasks done
N_SendMouseWheelEvent passed the raw AWT MouseWheelEvent.getWheelRotation()/ getUnitsToScroll() value straight through as CefMouseEvent's deltaX/deltaY with no sign adjustment. AWT's convention (positive rotation/units = scroll content down/right) is the opposite of CefMouseEvent's deltaX/ deltaY convention for the same gesture. Negate delta before assigning it to deltaX/deltaY, covering both the vertical (WHEEL_UNIT_SCROLL/ WHEEL_BLOCK_SCROLL) and Shift-held horizontal paths. Adds OsrMouseWheelDirectionTest, a minimal standalone regression test (master has no shared-browser test harness, so this uses TestFrame directly rather than depending on that infrastructure): dispatches a synthetic AWT wheel event with a positive rotation against an OSR browser and asserts window.scrollY increases. Verified against a full local suite run (124/124 passing). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq
CodeQL flagged both Double.parseDouble() calls in the onTitleChange callback as an uncaught-NumberFormatException risk (chromiumembedded#263, chromiumembedded#264). An exception there would escape on CEF's native callback thread instead of failing the test cleanly. Catch it and leave the corresponding flag unset so the existing post-awaitCompletion assertions report a normal test failure instead. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq
Thrameos
force-pushed
the
backport/osr-wheel-direction
branch
from
September 5, 2026 21:23
17baafc to
47c4bb9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14 (matches upstream chromiumembedded#26)
Summary
N_SendMouseWheelEvent(native/CefBrowser_N.cpp) passed the raw AWTMouseWheelEvent.getWheelRotation()/getUnitsToScroll()value straight through asCefMouseEvent'sdeltaX/deltaYwith no sign adjustment.CefMouseEvent'sdeltaX/deltaYconvention for the same gesture.deltabefore assigning it, covering both the vertical (WHEEL_UNIT_SCROLL/WHEEL_BLOCK_SCROLL) and Shift-held horizontal paths.Test plan
OsrMouseWheelDirectionTest: dispatches a synthetic AWT wheel event with a positive rotation against an OSR browser and assertswindow.scrollYincreases.masterhas no shared-browser test harness, so this is a minimal standalone test built directly onTestFramerather than depending on that infrastructure.libjcef.socleanly (ninja jcef), zero compile errors.Small, focused backport of a single self-contained fix (no other changes bundled in), following the same shape as PR #1 and #36.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HBFmQs6JDypYP5qdC99yDq