-
Notifications
You must be signed in to change notification settings - Fork 434
JavaScript port: real DOM text, incremental semantics, and native-resolution rendering #5552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
a3343a1
js port: make the semantic DOM overlay incremental
shai-almog 95b6921
js port: render text as real DOM above the canvas
shai-almog a90cfd5
js port: read browser and OS state on the main thread, not in the worker
shai-almog 097fca0
js port: assert the overlay layers directly, and document them
shai-almog 7cfd4dc
js port: render at the display's real pixel ratio
shai-almog ac72ca7
js port: give the native editor the attributes browsers act on
shai-almog 9ffdd8b
js port: capture the composited page for screenshot goldens
shai-almog e157713
js port: address review on the text layer and screenshot capture
shai-almog 94f5e72
js port: return the composited capture instead of writing it
shai-almog 7fcccf5
js port: rebaseline screenshot goldens for device-pixel rendering and…
shai-almog f210351
js port: bound the composited capture, and four more review fixes
shai-almog 175a9b2
js port: restore animation settling, and five more review fixes
shai-almog 1394f38
js port: return text to the canvas once the app reads pixels back
shai-almog 61b39a6
js port: rebaseline goldens against the settled rendering
shai-almog 9752877
js port: restore the capture settle, and two more review fixes
shai-almog 3b29e62
js port: three more review fixes
shai-almog 4c406f3
js port: do not force a paint from inside the screenshot read
shai-almog f69e25d
js port: finish the stacking, history and screenshot review items
shai-almog 40b025f
js port: do not traverse history twice, and restore find after a read…
shai-almog 5ff35df
js port: only assert history growth when the app navigated
shai-almog 0d39c70
js port: refresh semantics after a readback, and follow framework focus
shai-almog 42f0bc0
js port: clear cached focus on prune, and keep Forward in step
shai-almog 0a802b1
js port: check ancestor visibility, and re-resolve styles on scheme c…
shai-almog a4e0139
js port: never expose an obscured field's content, and name dialogs
shai-almog 66ca7f9
js port: consume every skipped entry, and follow a changing pixel ratio
shai-almog 22a2684
js port: four review fixes around pixel ratio, history and obscured l…
shai-almog 74721c1
js port: stop semantic keys dispatching twice, and project collection…
shai-almog 44142a5
js port: keep custom-action buttons from triggering their parent
shai-almog b7eb11e
js port: gate arrow keys, fix nested bounds, expose scroll actions
shai-almog b7f6377
js port: recognise inferred labels properly, rebuild density on a rat…
shai-almog 8fa4825
js port: one popstate listener, and keep text through clipped repaints
shai-almog b8b302f
js port: correct a stale note about the screenshot goldens
shai-almog 6482d61
js port: compare clips in absolute coordinates, and carry Back outwards
shai-almog 8d4ca3b
js port: take the navigation direction from the framework
shai-almog 767fda3
js port: carry direction on the form, and refresh cached forms on a s…
shai-almog 4968903
js port: keep run identity through clipped paints, focus attached nod…
shai-almog 2878afd
js port: keep hit testing intact with peers, and mirror every visible…
shai-almog abbf917
js port: do not lose a first clipped paint, and unwind the whole history
shai-almog 7f9c513
js port: reset the derived PPI with the density, and count entries un…
shai-almog f5e9e57
js port: reconcile clipped runs, and keep labels in the semantic tree
shai-almog b7c1cfa
js port: match clipped runs by position first, and honour multi-entry…
shai-almog 5a7b440
js port: take multi-entry back steps one at a time
shai-almog d566687
js port: hold popstate ownership until the back transition lands
shai-almog 52fa0ce
js port: drop the rest of a history jump once a step is refused
shai-almog 753c60d
js port: publish a typing field's contents as its accessible value
shai-almog 1c6a8d8
js port: claim runs per paint, and hold action controls outside the w…
shai-almog 56de0a1
core: keep a dialog's title when its theme is refreshed
shai-almog 051ebdc
js port: leave the document when a form has nowhere to go back to
shai-almog 907db72
js port: return the whole traversal when a back step is refused
shai-almog 474afe3
js port: draw down a jump by the forms each back command leaves
shai-almog 964260d
js port: stamp history entries as this port's own
shai-almog 7490151
js port: keep font sizes with the density, and name the username field
shai-almog 7b3be74
js port: join a second Back to the walk in flight, and follow a renam…
shai-almog 26dc453
js port: give up on a traversal the browser never made
shai-almog 9013a2f
js port: leave a host page's own history entries alone
shai-almog a76686d
js port: take the screenshot on a frame boundary
shai-almog 75096ff
js port: keep decorated text whole on the canvas
shai-almog 2f55aeb
js port: give text back to the canvas when the canvas draws over it
shai-almog 2cc6f85
js port: measure what a promoted run actually covers
shai-almog eaf7fa0
js port: match a clipped run by both coordinates, and follow the tran…
shai-almog bdad398
js port: repaint the form when the text layer hides, and press toggle…
shai-almog 3c2822c
js port: decide coverage by which component is drawing
shai-almog c208a0a
core: queue a form's navigation directions instead of keeping one
shai-almog 5543dd3
js port: rebaseline the goldens the layering fixes moved
shai-almog e268ed1
js port: wait out the pauses between paints before capturing
shai-almog 1ce20ec
core: use the import the file already has
shai-almog 5bd335d
js port: keep the popstate handler behind the lifecycle coordinator
shai-almog 1ed83a8
js port: record the occlusion rule in STATUS.md
shai-almog 61556f6
js port: outlast the pauses between cell paints before capturing
shai-almog 04d7034
js port: hold a blitted image until its batch has been shipped
shai-almog 07d8a32
Answer eleven review findings across the overlay, the port and the core
shai-almog 5f0de7d
js port: count an ancestor drawing over its children as coverage
shai-almog 217b5f7
js port: keep a clip only when the repaint region is what narrowed it
shai-almog 79212f9
js port: wait for Back on the clock, and keep a font's identity still
shai-almog 51a2b60
js port: read what a Back owes before the command runs
shai-almog fea96b4
js port: ask a shape what it covers, not its bounding box
shai-almog 6e39776
js port: ask a shape whether it meets the text at all
shai-almog baa9858
js port: ask a filled arc about its sector, not its bounding box
shai-almog 7cdb028
js port: finish asking every draw what it really covers
shai-almog b596959
js port: clip before projecting, respect winding, and queue our own t…
shai-almog 1f88a1b
Restore two goldens the narrower coverage rule brought back
shai-almog 5eb0935
Say that leaving a menu goes backwards, and hold semantics on the clock
shai-almog bed8212
js port: trace a rounded rectangle once round its perimeter
shai-almog 8c08ddc
js port: leave a run's place in the order alone during a partial repaint
shai-almog 0cd49d3
js port: stop asking a document that refuses history, and queue captures
shai-almog c8208d4
Report stroked draws as coverage, and let a folding menu go first
shai-almog 38de50e
js port: report clears and lens draws as coverage
shai-almog 8d26cc6
js port: glass and clears count too, and a disabled node acts on nothing
shai-almog 11e72a9
js port: a disabled node offers no custom actions either
shai-almog c6bb79e
Rebaseline two charts whose labels now rasterize on the canvas
shai-almog b933516
Keep the title area's theme UIID, and never publish invisible text
shai-almog afb458c
js port: build a round-rect outline from the radius that is drawn
shai-almog 75199a4
js port: record why the text layer takes no pointer events
shai-almog 6e4fc3a
js port: a backdrop effect counts whatever the alpha says
shai-almog 7dddd2a
core: keep every queued navigation direction
shai-almog 04e6f2d
js port: walk a shape's curves instead of its control points
shai-almog 5d81c77
js port: sweep a filled arc the short way round
shai-almog 825e997
js port: rebaseline graphics-fill-arc on the corrected sweep
shai-almog a793ab7
js port: let a shape clip protect the text it covers
shai-almog 9a0c209
docs: record what the clip contributes to text coverage
shai-almog e29abd7
js port: claim the entry a reload lands on as the session root
shai-almog 61f5dcb
js port: give a screen reader a way to type into a field
shai-almog 28205f2
js port: keep the draw's shape when text coverage crosses a transform
shai-almog fe86f01
js port: follow a field between masked and revealed
shai-almog 6fa533e
js port: drop text a partial repaint stopped drawing
shai-almog 3a65503
js port: edit a multiline field through a control that holds lines
shai-almog 65e5898
js port: do not push an entry for the form already on screen
shai-almog bbb85f6
tests: count a multiline field's control in the overlay check
shai-almog 898aadc
js port: decide listbox and option together
shai-almog 38ad81c
js port: ask the draw and the clip only about text the clip can reach
shai-almog e5e7190
js port: put action controls behind the form they act on
shai-almog 30fafde
js port: let every waiting capture have its frame
shai-almog 437089f
js port: compare a clip and a draw where the canvas applies them
shai-almog c969097
js port: stop closing outlines the draw left open
shai-almog 7ddd6b0
js port: do not leave a password in the document after the edit
shai-almog 9d61d43
js port: read a foreign history id instead of overwriting it
shai-almog f3942f2
js port: read the screen back once the painting has stopped
shai-almog 5360177
js port: hold a SET_TEXT control to the field's own limit
shai-almog bff5396
js port: keep the length limit current for every control
shai-almog da70c05
js port: sweep a radial gradient the short way, and count it whatever…
shai-almog a5cf094
js port: count an opaque blit, and stop counting a sweep of nothing
shai-almog 691c44f
js port: rebaseline graphics-draw-gradient on the corrected sweep
shai-almog 54459a3
js port: read popstate state as whatever the page put there
shai-almog eb61786
js port: configure a set-text control from the field constraints
shai-almog 454fafe
js port: give an edited field one tab stop, not two
shai-almog 1196351
js port: tell the framework when focus lands on an editing control
shai-almog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
36 changes: 36 additions & 0 deletions
36
Ports/JavaScriptPort/src/main/java/com/codename1/html5/js/browser/MediaQueryList.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Codename One designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Codename One through http://www.codenameone.com/ if you | ||
| * need additional information or have any questions. | ||
| */ | ||
| package com.codename1.html5.js.browser; | ||
|
|
||
| import com.codename1.html5.js.JSObject; | ||
|
|
||
| /** | ||
| * Interface for the JavaScript MediaQueryList object. | ||
| * https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList | ||
| */ | ||
| public interface MediaQueryList extends JSObject { | ||
| boolean getMatches(); | ||
| String getMedia(); | ||
| void addEventListener(String type, Object listener); | ||
| void removeEventListener(String type, Object listener); | ||
| } |
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
38 changes: 38 additions & 0 deletions
38
Ports/JavaScriptPort/src/main/java/com/codename1/html5/js/dom/PopStateEvent.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* | ||
| * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved. | ||
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| * This code is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU General Public License version 2 only, as | ||
| * published by the Free Software Foundation. Codename One designates this | ||
| * particular file as subject to the "Classpath" exception as provided | ||
| * by Oracle in the LICENSE file that accompanied this code. | ||
| * | ||
| * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| * version 2 for more details (a copy is included in the LICENSE file that | ||
| * accompanied this code). | ||
| * | ||
| * You should have received a copy of the GNU General Public License version | ||
| * 2 along with this work; if not, write to the Free Software Foundation, | ||
| * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| * | ||
| * Please contact Codename One through http://www.codenameone.com/ if you | ||
| * need additional information or have any questions. | ||
| */ | ||
| package com.codename1.html5.js.dom; | ||
|
|
||
| /** | ||
| * Interface for the JavaScript PopStateEvent object. | ||
| * https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent | ||
| * | ||
| * <p>The state is read because popstate fires for forward traversal as well as backward, and | ||
| * the two are only distinguishable by comparing the state the browser restored against the one | ||
| * currently displayed. It is typed as Object rather than String: history state is any | ||
| * structured-cloneable value, and a page that embeds this canvas may keep its router's own | ||
| * object there. Binding it as a String would put that entry through a conversion it cannot | ||
| * satisfy, when all the port needs is to see that the value is not one of its own.</p> | ||
| */ | ||
| public interface PopStateEvent extends Event { | ||
| Object getState(); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.