Closed
Bug 1400777
Opened 8 years ago
Closed 8 years ago
Slim down nsElementTable.h
Categories
(Core :: DOM: HTML Parser, enhancement, P3)
Tracking
()
RESOLVED
FIXED
mozilla58
| Tracking | Status | |
|---|---|---|
| firefox58 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(5 files)
|
3.93 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
6.34 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
1.68 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
3.92 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
3.72 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
It has way more stuff exposed than necessary.
Updated•8 years ago
|
Priority: -- → P3
| Assignee | ||
Comment 1•8 years ago
|
||
It's just a too-cute-by-half typedef for nsHTMLTag.
Attachment #8909554 -
Flags: review?(mrbkap)
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•8 years ago
|
||
The patch also removes some low-value comments.
Attachment #8909555 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8909556 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 4•8 years ago
|
||
This patch splits out most of nsHTMLElement into a new type HTMLElement within
nsElementTable.cpp. Only the static methods IsContainer() and IsBlock() need to
remain exposed via nsHTMLElement. The patch moves TestBits() into
nsElementTable.cpp as well.
Attachment #8909557 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 5•8 years ago
|
||
This patch makes some style fixes and other minor improvements.
Attachment #8909558 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 6•8 years ago
|
||
Updated•8 years ago
|
Attachment #8909554 -
Flags: review?(mrbkap) → review+
Comment 7•8 years ago
|
||
Comment on attachment 8909555 [details] [diff] [review]
(part 2) - De-expose HTML group constants[]
Review of attachment 8909555 [details] [diff] [review]:
-----------------------------------------------------------------
::: parser/htmlparser/nsElementTable.cpp
@@ +13,5 @@
> +static const int kHTMLContent = 0x0001; // HEAD, (FRAMESET | BODY)
> +static const int kHeadContent = 0x0002; // Elements that *must* be in the head.
> +static const int kHeadMisc = 0x0004; // Elements that *can* be in the head.
> +
> +static const int kSpecial = 0x0008; // A, IMG, APPLET, OBJECT, FONT, BASEFONT, BR, SCRIPT,
Nit: a couple of these lines came with trailing whitespace.
Attachment #8909555 -
Flags: review?(mrbkap) → review+
Updated•8 years ago
|
Attachment #8909556 -
Flags: review?(mrbkap) → review+
Comment 8•8 years ago
|
||
Comment on attachment 8909557 [details] [diff] [review]
(part 4) - Split nsHTMLElement
Review of attachment 8909557 [details] [diff] [review]:
-----------------------------------------------------------------
::: parser/htmlparser/nsElementTable.cpp
@@ +52,2 @@
>
> +struct HTMLElement
Is it worth it to stick this in an anonymous namespace to make it "static"?
Attachment #8909557 -
Flags: review?(mrbkap) → review+
Updated•8 years ago
|
Attachment #8909558 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 9•8 years ago
|
||
> > +struct HTMLElement
>
> Is it worth it to stick this in an anonymous namespace to make it "static"?
What effect do anonymous namespace have on struct definitions? I tried to look this up but got inconclusive info.
Flags: needinfo?(mrbkap)
Comment 10•8 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #9)
> What effect do anonymous namespace have on struct definitions? I tried to
> look this up but got inconclusive info.
They have the effect of not exporting the name into the global namespace (so act as "static" for the struct name) ensuring no name clashes and one symbol less for the linker to care about [1].
[1] http://en.cppreference.com/w/cpp/language/namespace#Unnamed_namespaces
Flags: needinfo?(mrbkap)
| Assignee | ||
Comment 11•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5835c5943a4881567e2d1e9ce1a8a6b0f97cf200
Bug 1400777 (part 1) - Remove eHTMLTags. r=mrbkap.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2b23e3f158dd747de9c40c068d4e9a5da583cf98
Bug 1400777 (part 2) - De-expose HTML group constants[]. r=mrbkap.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2de6882645603af89ea672180239825dce408918
Bug 1400777 (part 3) - De-expose gHTMLElements[]. r=mrbkap.
https://hg.mozilla.org/integration/mozilla-inbound/rev/50d9715e7b0ada2111baa0d51fa888135f78d1d7
Bug 1400777 (part 4) - Split nsHTMLElement. r=mrbkap.
https://hg.mozilla.org/integration/mozilla-inbound/rev/84bde7821021d9661c841e7d40bfb7e3a18393ee
Bug 1400777 (part 5) - Clean up nsElementTable.{cpp,h}. r=mrbkap.
Comment 12•8 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5835c5943a48
https://hg.mozilla.org/mozilla-central/rev/2b23e3f158dd
https://hg.mozilla.org/mozilla-central/rev/2de688264560
https://hg.mozilla.org/mozilla-central/rev/50d9715e7b0a
https://hg.mozilla.org/mozilla-central/rev/84bde7821021
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•