Closed Bug 1121473 Opened 9 years ago Closed 9 years ago

Why do we have duplicated "is void" lists of HTML tag names?

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: bzbarsky, Assigned: smaug)

References

Details

Attachments

(2 files)

Specifically the older nsContentUtils::IsHTMLVoid and the newer IsVoidTag() in FragmentOrElement.  Looks like the latter was added in bug 744830.  Henri, Olli, why didn't we just use the existing implementation, or update it if that was desired?
Flags: needinfo?(hsivonen)
Flags: needinfo?(bugs)
(In reply to Boris Zbarsky [:bz] from comment #0)
> Specifically the older nsContentUtils::IsHTMLVoid and the newer IsVoidTag()
> in FragmentOrElement.  Looks like the latter was added in bug 744830. 
> Henri, Olli, why didn't we just use the existing implementation, or update
> it if that was desired?

I don't recall/know. FragmentOrElement needs a high-performance implementation, which may have caused a bias towards writing something specifically for that case. I'm not sure if at the time of bug 744830 either of us realized that nsContentUtils had a method for this.
Flags: needinfo?(hsivonen)
IIRC I didn't want to change the behavior of plaintextserializer, but just make
innerHTML to follow the spec better. So, to decrease the risk for regressions.
Flags: needinfo?(bugs)
OK, but the two lists are identical, right?  So there should be no behavior change I can see...
Flags: needinfo?(bugs)
Oh, so they are. Somehow managed to look that wrong earlier today. Then my memory was wrong.
I do recall the version in FragmentOrElement was all about micro-optimizing.

But ok, need to merge those too.
Flags: needinfo?(bugs)
Assignee: nobody → bugs
I guess IsVoidTag is inline, and keeping that will be a bit of a pain...

Also, I think we can nix nsPlainTextSerializer::GetIdForContent while we're here.
Blocks: 1121475
Attached patch patchSplinter Review
https://tbpl.mozilla.org/?tree=Try&rev=69ceabba6b5c

This should be pretty much the minimal possible patch while keeping the
stuff inlined, I think
Attachment #8550959 - Flags: review?(hsivonen)
Attachment #8550959 - Flags: review?(hsivonen) → review+
https://hg.mozilla.org/mozilla-central/rev/b178fc355421
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: