Closed
Bug 611103
Opened 14 years ago
Closed 10 years ago
Don't depend on the editor in nsDocumentEncoder
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox35 | --- | unaffected |
firefox36 | --- | unaffected |
firefox37 | + | fixed |
firefox38 | + | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
(Depends on 1 open bug)
Details
Attachments
(3 files)
(deleted),
patch
|
bzbarsky
:
review+
lmandel
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
lmandel
:
approval-mozilla-aurora+
ehsan.akhgari
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
lmandel
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
nsIHTMLEditor::IsVisBreak should be a static method on nsContentUtils. Currently a lot of the stuff which happens under it depend on the HTML editor, but I believe that there is nothing inherently depending on it.
I'm filing this as a followup to bug 551704, once we have this method on nsContentUtils, we should start using it in nsHTMLContentSerializer::AppendElementStart.
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Updated•10 years ago
|
Summary: Move nsIHTMLEditor::IsVisBreak to nsContentUtils → Don't depend on the editor in nsDocumentEncoder
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Updated•10 years ago
|
Whiteboard: [post-2.0]
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8553251 -
Flags: review?(bzbarsky)
Comment 3•10 years ago
|
||
Comment on attachment 8553251 [details] [diff] [review]
Don't depend on the editor in nsDocumentEncoder
Oh, right, we don't coalesce adjacent <br>. Yeah, this makes sense.
Attachment #8553251 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•10 years ago
|
||
I just realized that this check doesn't work for this edge case:
<div><br></div>
I'm submitting a second patch to fix that part, but I already landed the first patch on inbound.
Keywords: leave-open
Assignee | ||
Comment 5•10 years ago
|
||
The test for bug 1119503 examines this edge case.
Attachment #8553480 -
Flags: review?(bzbarsky)
Comment 6•10 years ago
|
||
Comment on attachment 8553480 [details] [diff] [review]
Part 2: Handle the edge case where the BR element is the only child of a block element
r=me
Attachment #8553480 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8553480 [details] [diff] [review]
Part 2: Handle the edge case where the BR element is the only child of a block element
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ac041f32eee
Attachment #8553480 -
Flags: checkin+
Assignee | ||
Updated•10 years ago
|
Keywords: leave-open
Assignee | ||
Comment 8•10 years ago
|
||
And we need yet another special case for cases such as <div><br><br></div>. Basically, if the prev sibling is a br, we can ignore it...
Keywords: leave-open
Assignee | ||
Comment 9•10 years ago
|
||
The test for bug 1119503 examines this edge case.
Attachment #8553770 -
Flags: review?(bzbarsky)
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Comment on attachment 8553770 [details] [diff] [review]
Part 3: Handle the edge case where the br element appears immediately after another br
r=me, though this is getting complicated. Can't we just clam that nonzero height == visible?
Attachment #8553770 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #11)
> r=me, though this is getting complicated. Can't we just clam that nonzero
> height == visible?
Unfortunately not, the BR frame in this case <div>a<br>b</div> for example has both height and width set to 0. It seems like it only gets a non-zero height when it is the only frame on a line, presumably in order to reserve enough vertical space for the line...
Assignee | ||
Comment 13•10 years ago
|
||
Keywords: leave-open
Comment 14•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment 15•10 years ago
|
||
Comment on attachment 8553251 [details] [diff] [review]
Don't depend on the editor in nsDocumentEncoder
Approval Request Comment
[Feature/regressing bug #]: related to bug 1119503
[User impact if declined]: none for this particular patch AFAICT but it's part of the set of patches for bug 1119503 which regresses pasting pre-formatted text
[Describe test coverage new/current, TreeHerder]: just TreeHerder and nightly since the landing
[Risks and why]: elsewhere as part of this set, Ehsan said:
"The risk on this patch set is moderate. We have tried to not change the existing behavior except for only the well known cases, but this code is really old and not very well understood. I (ehsan) would like these fixes to be backported on Aurora as soon as we can to get broader testing, and will be on the hook for fixing any regressions found."
[String/UUID change made/needed]: UUID change in nsIHTMLEditor (removing BreakIsVisible method)
Attachment #8553251 -
Flags: approval-mozilla-aurora?
Comment 16•10 years ago
|
||
Comment on attachment 8553480 [details] [diff] [review]
Part 2: Handle the edge case where the BR element is the only child of a block element
Approval Request Comment
[Feature/regressing bug #]: bug 1119503
[User impact if declined]: edge case from bug 1119503 will be handled and that bug deals with copy/pasting pre-formatted text
[Describe test coverage new/current, TreeHerder]: try and the time this has been on central
[Risks and why]: this particular patch follows up another one on this bug and handles the case where a <br> is the only child of a block element. Elsewhere, Ehsan said:
"The risk on this patch set is moderate. We have tried to not change the existing behavior except for only the well known cases, but this code is really old and not very well understood. I (ehsan) would like these fixes to be backported on Aurora as soon as we can to get broader testing, and will be on the hook for fixing any regressions found."
[String/UUID change made/needed]: none
Attachment #8553480 -
Flags: approval-mozilla-aurora?
Comment 17•10 years ago
|
||
Comment on attachment 8553770 [details] [diff] [review]
Part 3: Handle the edge case where the br element appears immediately after another br
Approval Request Comment
[Feature/regressing bug #]: bug 1119503
[User impact if declined]: another edge case from bug 1119503 will be handled and that bug deals with copy/pasting pre-formatted text
[Describe test coverage new/current, TreeHerder]: try and the time this has been on central
[Risks and why]: this particular patch follows up the other two on this bug for another edge case. Elsewhere, Ehsan said:
"The risk on this patch set is moderate. We have tried to not change the existing behavior except for only the well known cases, but this code is really old and not very well understood. I (ehsan) would like these fixes to be backported on Aurora as soon as we can to get broader testing, and will be on the hook for fixing any regressions found."
[String/UUID change made/needed]: none
Attachment #8553770 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
status-firefox35:
--- → unaffected
status-firefox36:
--- → unaffected
status-firefox37:
--- → affected
status-firefox38:
--- → fixed
tracking-firefox37:
--- → +
tracking-firefox38:
--- → +
Comment 18•10 years ago
|
||
Comment on attachment 8553251 [details] [diff] [review]
Don't depend on the editor in nsDocumentEncoder
Prereq required for bug 1119503. Aurora+
Attachment #8553251 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•10 years ago
|
Attachment #8553480 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•10 years ago
|
Attachment #8553770 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 19•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/f76c1b5753c6
https://hg.mozilla.org/releases/mozilla-aurora/rev/05d65b2c6a3d
https://hg.mozilla.org/releases/mozilla-aurora/rev/e0de9ceed8b3
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•