Fennec/NativeUI/Viewport: Difference between revisions

Line 27: Line 27:
* Th painted area must be provided to Java synchronously every time Gecko draws (this is accomplished by JNI invocations in the widget code). This will be used for determining if we need to draw again, and by how much touch events need to be translated by.
* Th painted area must be provided to Java synchronously every time Gecko draws (this is accomplished by JNI invocations in the widget code). This will be used for determining if we need to draw again, and by how much touch events need to be translated by.
* When the browser displayed document changes (e.g. tab switch, page load), java must be told of updated viewport properties (offset, zoom, page size) via the compositor when the first frame of the new content is composited.
* When the browser displayed document changes (e.g. tab switch, page load), java must be told of updated viewport properties (offset, zoom, page size) via the compositor when the first frame of the new content is composited.
* When the composition-related properties (offset, zoom, page size) of the selected tab change without the document changing (e.g. a meta viewport tag is added that changes the zoom, or javascript on the page calling ScrollTo), java must be told synchronously from browser.js.
* When the composition-related properties (offset, zoom, page size) of the selected tab change without the document changing (e.g. a meta viewport tag is added that changes the zoom, or javascript on the page calling ScrollTo), java must be told synchronously from browser.js. Java must return an updated display port when this happens, such that the updated display port is used for the draw that will happen.
* When the user performs pan/zoom actions, Java should send updated properties (offset, zoom, display port margins) to browser.js. (These may be throttled, such as when we know the newly visible area is still inside the display port, or in the middle of a pinch zoom.)
* When the user performs pan/zoom actions, Java should send updated properties (offset, zoom, display port) to browser.js. (These may be throttled, such as when we know the newly visible area is still inside the display port, or in the middle of a pinch zoom.)
* browser.js must ignore viewport-dependent events (including clicks, double-taps, and viewport updates) from java during the period where the browser content document is different from the browser displayed document. Likewise, browser.js must not send any property updates to Java (e.g. resulting from user JS calling scrollTo) during this period. Java may still update its own viewport properties for the compositor's benefit.
* browser.js must ignore viewport-dependent events (including clicks, double-taps, and viewport updates) from java during the period where the browser content document is different from the browser displayed document. Likewise, browser.js must not send any property updates to Java (e.g. resulting from user JS calling scrollTo) during this period. Java may still update its own viewport properties for the compositor's benefit.
* If the viewport size changes, Java must first send a resize notification. browser.js must, upon processing the resize, synchronously notify Java of receiving this event, along with any updated properties (offset, zoom, page size). While processing this event (still on the gecko thread), Java may recalculate properties (offset, zoom, display port margins) and may queue an event back on the gecko thread with the new properties. Drawing should be suppressed between the handling of the initial resize notification and handling of the final property update event, if there is one.
* If the viewport size changes, Java must first send a resize notification. browser.js must, upon processing the resize, synchronously notify Java of receiving this event, along with any updated properties (offset, zoom, page size). While processing this event (still on the gecko thread), Java may recalculate properties (offset, zoom, display port margins) and may queue an event back on the gecko thread with the new properties. Drawing should be suppressed between the handling of the initial resize notification and handling of the final property update event, if there is one.
Confirmed users
586

edits