Closed Bug 480447 Opened 15 years ago Closed 15 years ago

clear outstanding paint events when repainting the whole canvas

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: taras.mozilla, Assigned: taras.mozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Blocks: 459117
Attached patch less qi +clear pending events (obsolete) — Splinter Review
Assignee: nobody → tglek
Attachment #364423 - Flags: review?(gavin.sharp)
Attachment #364423 - Flags: review?(gavin.sharp) → review-
Comment on attachment 364423 [details] [diff] [review]
less qi +clear pending events

need to clear the cached reference in setCurrentBrowser, since _browser changes then.

typo: redudent
Attached patch fixedSplinter Review
Attachment #364423 - Attachment is obsolete: true
Attachment #364425 - Flags: review?(gavin.sharp)
Comment on attachment 364425 [details] [diff] [review]
fixed

>diff --git a/chrome/content/CanvasBrowser.js b/chrome/content/CanvasBrowser.js

>+  get contentDOMWindowUtils() {
>+    if (!this._contentDOMWindowUtils) {

It might be better to add a getter for this on <browser>s, and have it do the caching at some point. Means changing toolkit and another dependency on a recent mozilla-central changeset, though, so I guess we can do this for now. 

>   setCurrentBrowser: function(browser, skipZoom) {
>     let currentBrowser = this._browser;
>     if (currentBrowser) {

>+      this._contentDOMWindowUtils = null;

I think you should clear it each time you set _browser, regardless of whether there was a previous value (i.e. move it outside of the if (currentBrowser) check).

>   elementFromPoint: function(aX, aY) {

>+    let element = this.contentDOMWindowUtils
>+      .elementFromPoint(x, y,
>+                        true,   /* ignore root scroll frame*/
>+                        false); /* don't flush layout */

This indentation is kind of weird, I'd just leave the cwu variable.

r=me with those addressed.
Attachment #364425 - Flags: review?(gavin.sharp) → review+
> It might be better to add a getter for this on <browser>s, and have it do the
> caching at some point. Means changing toolkit and another dependency on a
> recent mozilla-central changeset, though, so I guess we can do this for now. 

Yeah I considered that, but making any change to that file is a pain as you described, didn't seem worth it.

pushed http://hg.mozilla.org/mobile-browser/rev/a77e5f6e7ed7
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: