Closed Bug 508819 Opened 15 years ago Closed 15 years ago

linkedPanel consumers rely on buggy getElementById behavior

Categories

(Toolkit :: UI Widgets, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2b1
Tracking Status
status1.9.2 --- beta1-fixed
blocking1.9.1 --- .4+
status1.9.1 --- .4-fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: fixed1.9.0.15)

Attachments

(3 files, 1 obsolete file)

There are certain cases in which getElementById on the document will return anonymous nodes. We need to fix that, but the linkedPanel setup in tabbox (also used by session store) relies on it. Patch coming up. The blocking noms are because this blocks bug 489925.
Flags: blocking1.9.2?
Flags: blocking1.9.0.14?
Attached patch Fix (obsolete) — Splinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #392951 - Flags: review?(gavin.sharp)
Attachment #392951 - Flags: review?(dietrich)
Might this affect accessibility's link between a tabbrowser tab and browser?
Hmm. Looks like it will (or rather, that accessibility is depending on the same bug); that's apparently not tested by our unit tests... I have no idea how to quickly restructure that code to work correctly. Do we need a separate bug on that?
Comment on attachment 392951 [details] [diff] [review] Fix session restore part looks ok. this code is also well covered w/ tests, so not necessary here.
Attachment #392951 - Flags: review?(dietrich) → review+
Yeah, tests (for the session store code, not the other!) were how I discovered this issue to start with. ;)
Attachment #392951 - Flags: review?(gavin.sharp) → review+
Comment on attachment 392951 [details] [diff] [review] Fix >diff --git a/toolkit/content/widgets/tabbox.xml b/toolkit/content/widgets/tabbox.xml >+ } else { >+ linkedPanel = ownerDoc.getElementById(linkedPanelId); >+ } >+ } else { >+ linkedPanel = null; >+ } style: no brackets around single lines, else on a new line either way (we don't use this style anywhere in this file. Otherwise, looks great, thanks for fixing!
Comment on attachment 392951 [details] [diff] [review] Fix >diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js >+ } else { >+ tabpanel = ownerDoc.getElementById(panelID); >+ } No need for this fallback here, this code is tabbrowser specific and we'll always hit the first case. >diff --git a/toolkit/content/widgets/tabbox.xml b/toolkit/content/widgets/tabbox.xml >+ let linkedPanel; >+ } else { >+ linkedPanel = null; >+ } Just initialize to null and drop this block?
Or just leave it undefined, even - don't need null specifically.
And for accessibility, can't you just special-case nsAccessibilityAtoms::linkedPanel in nsRelUtils::AddTargetFromIDRefAttr, and add the binding parent fallback as in that patch?
blocking1.9.1: ? → .4+
Flags: wanted1.9.0.x+
Flags: blocking1.9.0.15+
Flags: blocking1.9.0.14?
Attachment #393238 - Flags: review? → review?(bolterbugz)
Attachment #392951 - Attachment is obsolete: true
Comment on attachment 393238 [details] [diff] [review] With those comments addressed, accessibility fixed r=me. Looks good to me, and still passes our a11y mochitests locally. Thanks. BTW, I'm curious about bug 489925 but don't have access...
Attachment #393238 - Flags: review?(bolterbugz) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2b1
Comment on attachment 393238 [details] [diff] [review] With those comments addressed, accessibility fixed Requesting branch approvals.
Attachment #393238 - Flags: approval1.9.1.4?
Attachment #393238 - Flags: approval1.9.0.15?
Comment on attachment 393238 [details] [diff] [review] With those comments addressed, accessibility fixed Approved for 1.9.1.4 and 1.9.0.15, a=dveditz for release-drivers
Attachment #393238 - Flags: approval1.9.1.4?
Attachment #393238 - Flags: approval1.9.1.4+
Attachment #393238 - Flags: approval1.9.0.15?
Attachment #393238 - Flags: approval1.9.0.15+
Keywords: fixed1.9.2
Checking in accessible/src/xul/nsXULTabAccessible.cpp; /cvsroot/mozilla/accessible/src/xul/nsXULTabAccessible.cpp,v <-- nsXULTabAccessible.cpp new revision: 1.39; previous revision: 1.38 done Checking in browser/components/sessionstore/src/nsSessionStore.js; /cvsroot/mozilla/browser/components/sessionstore/src/nsSessionStore.js,v <-- nsSessionStore.js new revision: 1.109; previous revision: 1.108 done Checking in toolkit/content/widgets/tabbox.xml; /cvsroot/mozilla/toolkit/content/widgets/tabbox.xml,v <-- tabbox.xml new revision: 1.54; previous revision: 1.53 done
Keywords: fixed1.9.0.15
Blocks: 513588
The changes to nsSessionStore.js need to be ported to SeaMonkey.
blocking1.9.1: .4+ → ---
(In reply to comment #19) > The changes to nsSessionStore.js need to be ported to SeaMonkey. What you really want to do is request blocking in bug 513588 rather than removing it here.
blocking1.9.1: --- → .4+
Uh, I could have sworn that I didn't touch the status fields (I know better than that).
blocking1.9.1: .4+ → ---
Note that comment 21 clobbered the blocking flag _again_. It's almost like there's no collision detection on that field...
blocking1.9.1: --- → ?
Philip, i did port, even port of bug Bug 509625, which is not in 1.9.1 yet for Firefox.
Blocks: 514360
blocking1.9.1: ? → .4+
We have tests which cover this specific area? If yes can we trust them or how can we manually verify the fix?
Flags: in-testsuite?
We have tests for the toolkit/browser parts. No idea about the accessibility parts (and I bet we don't).
Oh, and the reason this bug existed was to fix the issues that caused test failures if the fix for bug 489925 was checked in. Since that's checked in and the tree is green, I think we're good.
Flags: blocking1.9.2? → blocking1.9.2+
Is there a particular way to verify this fix? I noted that I can't verify the fix for bug 489925 as well (it doesn't reproduce in 1.9.0 or 1.9.1 for me).
> Is there a particular way to verify this fix? I checked in the fix for bug 489925 and the tree is still green... ;)
I love you, Boris. Have my children.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: