Closed
Bug 537230
Opened 15 years ago
Closed 12 years ago
Modifying spellchecked text may lead to discontinuity in the misspelling marker
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: smaug, Assigned: masayuki)
References
Details
Attachments
(4 files, 3 obsolete files)
290 bytes,
text/html
|
Details | |
24.11 KB,
image/png
|
Details | |
33.59 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
60.96 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
See the testcase.
Not yet sure if this is a layout/painting issue or a problem in spellchecker.
Reporter | ||
Comment 1•15 years ago
|
||
Doesn't seem to be spellchecker problem, since it recognizes two text nodes
as one word.
Painting seems to start at the beginning of a textframe/node. It should probably
check if the previous frame has the misspelling marker.
Reporter | ||
Comment 2•15 years ago
|
||
(Not that it matters, but other browsers seem to have the same problem.)
What exactly are the steps to reproduce? If I insert text into that testcase, then first the spellcheck marker goes away, and then if I click outside the text, the whole word is marked again.
Reporter | ||
Comment 4•15 years ago
|
||
Just load the testcase. You may need to zoom in a bit to see the problem.
Ah, so this is because there are two text nodes and we restart painting of the decoration.
Pretty minor bug :-)
Maybe we want to make the waviness of wavy text decorations relative to the origin of the window?
Reporter | ||
Comment 7•15 years ago
|
||
Spellchecking marker is different on other platforms. On OSX it is dots.
But still, the bug is visible there too.
Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #6)
> Maybe we want to make the waviness of wavy text decorations relative to the
> origin of the window?
I think that it's better especially when we implement CSS3 text-decoration-style. And also dotted and dashed style.
Making it relative to the origin of the window wouldn't work well for scrolling. Maybe relative to the origin of the nearest enclosing block.
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 10•14 years ago
|
||
Works fine for me for normal rendering, however, its shadow isn't rendered as I expected. I'll check the text-shadow rendering code.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Assignee | ||
Comment 11•14 years ago
|
||
Oops, it doesn't work fine with the testcase...
Assignee | ||
Comment 12•14 years ago
|
||
looks fine for me, I'll add some tests.
Attachment #523543 -
Attachment is obsolete: true
Comment 13•14 years ago
|
||
(In reply to comment #12)
> Created attachment 523548 [details] [diff] [review]
> Patch v0.2 (WIP)
>
> looks fine for me, I'll add some tests.
is there a try-server build available with this patch landed?
Assignee | ||
Comment 14•12 years ago
|
||
This patch paints decoration lines relative to the nearest ancestor block frame.
And also, at painting decoration lines in text-shadow or relative positioned box, this patch paints them with the offset from original (static) position.
Attachment #523548 -
Attachment is obsolete: true
Attachment #638624 -
Flags: review?(roc)
Assignee | ||
Comment 15•12 years ago
|
||
CSS3 text-decoration has been implemented and same methods are used for layouting/painting the CSS3 decoration lines and selection underlines.
And also, the selection underlines test uses canvas and paints with ported methods in decoration_line_rendering.js from nsCSSRendering. So, when we change the code ins nsCSSRendering, we need to change decoration_line_rendering.js too. I think that it doesn't make sense.
Additionally, it works only on Windows with GDI rendering.
So, we should now remake the tests with CSS3 text-decoration. However, unfortunately, there are some difference between selection underline and CSS3 text-decoration. If font doesn't have enough descender for painting underline, CSS3 text-decoration may overlap it on the text. However, selection underline may overflow from the descender. Therefore, this patch may fail on Windows and Mac at testing "double" or "wavy". However, fortunately, all tests pass on Linux. So, the new tests can check new regressions perfectly by running on all platforms.
Attachment #638626 -
Flags: review?(roc)
Attachment #638624 -
Flags: review?(roc) → review+
Why do the tests pass on Linux but not Windows or Mac?
Assignee | ||
Comment 17•12 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #16)
> Why do the tests pass on Linux but not Windows or Mac?
On Mac, all tests with mplus passed. And on Windows, all tests for double and wavy are not passed on tryserver but all tests with mplus passed on my machine.
According to these facts, I guess that it depends on how to compute the descender height. If higher descender font is included in the font group, it can expand the descender. Then, CSS text-decoration and selection underline become same result. And also the difference of native font APIs may cause it too.
I don't think we should have a test that depends on the way the descender height is computed. We might want to change Linux to match the other platforms.
Assignee | ||
Comment 19•12 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #18)
> I don't think we should have a test that depends on the way the descender
> height is computed. We might want to change Linux to match the other
> platforms.
Hmm, okay.
Assignee | ||
Comment 20•12 years ago
|
||
Attachment #638626 -
Attachment is obsolete: true
Attachment #638626 -
Flags: review?(roc)
Attachment #638935 -
Flags: review?(roc)
Assignee | ||
Comment 21•12 years ago
|
||
Er, kIsWin and kIsMac are not necessary, please ignore them.
Attachment #638935 -
Flags: review?(roc) → review+
Assignee | ||
Comment 22•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b58f095b4107
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c4f67197980
Target Milestone: --- → mozilla16
Comment 23•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/5c4f67197980
https://hg.mozilla.org/mozilla-central/rev/b58f095b4107
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•