-
Notifications
You must be signed in to change notification settings - Fork 36
Add some text around asynchronous mouse events and hover state. #2
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,9 @@ This is what the spec says: | |
| updateStyle(); | ||
| updateLayout(); | ||
| } | ||
| if (updatedLayout) { | ||
| scheduleAsyncHoverUpdate(); | ||
| } | ||
| paint(); | ||
| } | ||
| } | ||
|
|
@@ -142,6 +145,14 @@ of the event loop. If a discrete event is received, all continuous events | |
| in the task queue should run immediately to prevent the discrete event | ||
| from being delayed. | ||
|
|
||
| ## Asynchronously Update Hover State | ||
|
|
||
| After a layout has occurred the user agent will update the hover state of the | ||
| current node since during a layout the position may have shifted from the | ||
| previous hover state. If the hover state changes the CSS hover rule will | ||
| be updated as well mouseout, mouseleave, mouseenter, mouseover will be | ||
| dispatched to the relevant nodes. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Event dispatch in general needs its own better written section. It is so underspecified in the spec, I've stayed away from trying to describe it. The "Pending UI events" section was added after I wrote my doc, and now you are adding one more section. I do not feel like they really fit in well with the rest of the doc, but I can't think of a better place to put them. Maybe merge these two sections together as: Event dispatch detailsEvent dispatch is underspecified, this section needs more work. Pending UI events...... Asynchronously Update Hover StateAfter a layout has occurred the user agent will update the hover state of the What do you think about: Event loop hover state updateLayout performed inside render() might cause the current hover target to change. I am trying to make this wording friendly to webdevs... |
||
|
|
||
| ## What really happens | ||
|
|
||
| We've built a [test page]( https://rawgit.com/atotic/event-loop/master/shell.html). The page simultaneously generates (listed in order): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the original as: "send hover updates every time layout has been updated"
What you mean is "send hover updates if hover state has changed"
it might be clearer to webdevs to write it as:
if (hoverTargetChanged) {
queueHoverUpdateTask();
queueHoverMouseEventTasks();
}
This lets developers know that