Open Bug 1946639 Opened 16 days ago Updated 16 days ago

`MouseEvent` should cache `offsetX` and `offsetY` when they are retrieved first time

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

People

(Reporter: masayuki, Unassigned)

References

Details

Currently, we compute offsetX and offsetY each time when they are retrieved. However, Chromium and Safari cache the values when one of them is retrieved first time. Therefore, we should follow their faster behavior.

However, there are some unclear issues.

  1. Should we not cache until first retrieve from the web content script? Referred by addon may cause caching offset values when web apps do not expect.
  2. What should we return if the target is moved out from the DOM?
  3. What should we return if the target is in the tree but hidden?
Summary: `MouseEvent` should cache `offsetX` and `offsetY` when they are retrived first time → `MouseEvent` should cache `offsetX` and `offsetY` when they are retrieved first time
You need to log in before you can comment on or make changes to this bug.