Closed
Bug 742170
Opened 13 years ago
Closed 13 years ago
CGCreateInterfaceObjectsMethod should probably use CGThings for the CreateInterfaceObjects calls.
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
7.03 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
Instead of manually munging whitespace.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → bzbarsky
Attachment #613362 -
Flags: review?(peterv)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [need review]
Assignee | ||
Updated•13 years ago
|
Priority: -- → P2
Comment 2•13 years ago
|
||
Comment on attachment 613362 [details] [diff] [review]
Like so
Review of attachment 613362 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/Codegen.py
@@ +824,2 @@
> if len(idsToInit) > 1:
> + initIds = CGWrapper(initIds, pre="(", post=")", reindent=True)
I wonder if it'd make sense to add support for this to CGList (pre and post for len > 1).
@@ +863,5 @@
> + ourList = CGList([CGGeneric(getParentProto)], "\n\n")
> + if initIds is not None:
> + ourList.prepend(initIds)
> + if chrome is not None:
> + ourList.append(chrome)
Would it make sense to make CGList skip None values?
Attachment #613362 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 3•13 years ago
|
||
> I wonder if it'd make sense to add support for this to CGList (pre and post for len > 1).
We'd need to add the reindent thing there too... We could do that, I guess. Want me to?
> Would it make sense to make CGList skip None values?
Yes, absolutely. I'll do that instead.
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #613362 -
Attachment is obsolete: true
Attachment #613644 -
Flags: review?(peterv)
Comment 5•13 years ago
|
||
Comment on attachment 613644 [details] [diff] [review]
With that change
Review of attachment 613644 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/Codegen.py
@@ +251,4 @@
> def declare(self):
> + decl = self.child.declare()
> + if self.reindent:
> + decl = decl.replace("\n", "\n" + (" " * len(self.declarePre)))
Should these .rstrip(" ") to avoid trailing whitespace?
Attachment #613644 -
Flags: review?(peterv) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Hmm. Long-term, we should never have trailing whitespace in cgitems, imo.
But you raise another interesting question. We don't really want to add whitespace to blank lines. So perhaps this should do something more like what CGIndenter does, in terms of the regexp?
Assignee | ||
Comment 7•13 years ago
|
||
> Long-term, we should never have trailing whitespace in cgitems, imo.
That includes trailing newlines, which are the case rstrip() would help with.
Assignee | ||
Comment 8•13 years ago
|
||
Per discussion with peter, I'll just smack this with stripTrailingWhitespace().
Assignee | ||
Comment 9•13 years ago
|
||
Flags: in-testsuite-
Whiteboard: [need review] → [need birch merge]
Target Milestone: --- → mozilla15
Comment 10•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [need birch merge]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•