Last Comment Bug 722639 - Needs some automated tests for bug 692145
: Needs some automated tests for bug 692145
Status: RESOLVED FIXED
: inputmethod
Product: Core
Classification: Components
Component: Event Handling (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla13
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
Mentors:
Depends on:
Blocks: 692145
  Show dependency treegraph
 
Reported: 2012-01-31 01:01 PST by Masayuki Nakano [:masayuki] (Mozilla Japan)
Modified: 2012-02-14 18:21 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (6.26 KB, patch)
2012-01-31 22:24 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
ehsan: review+
Details | Diff | Splinter Review

Description Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-01-31 01:01:56 PST
I have no idea to test the actual cause of bug 692145 directly.

However, I think that we can test something related of the bug:

1. Add NS_ABORT_IF_FALSE() into the CountNewlinesIn*().
2. Insert a lot of lines in <textarea>
3. Do query the text rect of each line's start.

Then, between the each line's y should be same distance (might be different 1px by subpixel positioning though).
Comment 1 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-01-31 22:24:11 PST
Created attachment 593319 [details] [diff] [review]
Patch
Comment 2 :Ehsan Akhgari 2012-02-02 11:13:25 PST
Comment on attachment 593319 [details] [diff] [review]
Patch

Review of attachment 593319 [details] [diff] [review]:
-----------------------------------------------------------------

The 1px tolerance is fragile.  Can't you just store the last item's .top+.height, and verify that the .top of the next element is greater than that value?
Comment 3 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-02-03 22:44:53 PST
(In reply to Ehsan Akhgari [:ehsan] from comment #2)
> The 1px tolerance is fragile.  Can't you just store the last item's
> .top+.height, and verify that the .top of the next element is greater than
> that value?

Hmm, no, it isn't. On Linux, lines may be overlapped each other. Actually, lines overlap each other 2px on tryserver. It's valid for CSS and not a problem for composition.
Comment 4 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-02-03 22:45:39 PST
Comment on attachment 593319 [details] [diff] [review]
Patch

requesting r again for my previous comment.
Comment 5 :Ehsan Akhgari 2012-02-06 11:25:10 PST
Comment on attachment 593319 [details] [diff] [review]
Patch

OK, fair enough!
Comment 6 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-02-06 18:35:22 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/08b3c9d38e32
Comment 7 Ed Morley [:emorley] 2012-02-07 12:01:21 PST
https://hg.mozilla.org/mozilla-central/rev/08b3c9d38e32

Note You need to log in before you can comment on or make changes to this bug.