Closed Bug 472322 Opened 13 years ago Closed 13 years ago

[FIX]listboxbody and listitem not in XUL namespace treated specially when given XUL display

Categories

(Core :: XUL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

We have code like this:

      else if (display->mDisplay == NS_STYLE_DISPLAY_GRID_GROUP) {
        nsCOMPtr<nsIBoxLayout> layout;
      
        if (aTag == nsGkAtoms::listboxbody) {
          NS_NewListBoxLayout(mPresShell, layout);
          newFrame = NS_NewListBoxBodyFrame(mPresShell, aStyleContext, PR_FALSE, layout);
        }
        else
        {
          NS_NewGridRowGroupLayout(mPresShell, getter_AddRefs(layout));
          newFrame = NS_NewGridRowGroupFrame(mPresShell, aStyleContext, PR_FALSE, layout);
        }

in ConstructXULFrame.  This isn't checking the namespace, so a <mathml:listboxbody>, say, with the right display type, will get a list box body frame, not a grid row group frame.
Attached patch FixSplinter Review
Attachment #355592 - Flags: superreview?(roc)
Attachment #355592 - Flags: review?(enndeakin)
Attachment #355592 - Flags: review?(enndeakin) → review+
Attachment #355592 - Flags: superreview?(roc) → superreview+
Pushed http://hg.mozilla.org/mozilla-central/rev/612f2c665b1e
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.