WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
19490
caret is not displayed in proper location when non-wrappable-word exceeds the boundary of its container.
https://bugs.webkit.org/show_bug.cgi?id=19490
Summary
caret is not displayed in proper location when non-wrappable-word exceeds the...
Anantha Keesara
Reported
2008-06-11 12:34:09 PDT
I. Steps: ----------- 1. Launch Safari 2. Open the test case 3. Hold down the j key (until scrollbars appear) 4. Hold down the k key II. Issue: ----------------- The frame should scroll to keep your caret visible (and you should see k's). Instead it shows a line of j's with the caret (not flashing) 2 letters from the right edge of the frame. III. Other browsers: ----------------------- FF3 : Ok Opera 9.27: Ok IV. Safari nightly tested: version 3.1.1(525.17 )-
r34278
. Not working properly on Safari. V. Safari screenshot : Avalible
Attachments
Screenshot
(23.91 KB, image/png)
2008-06-11 12:34 PDT
,
Anantha Keesara
no flags
Details
reduction
(505 bytes, text/plain)
2008-06-11 13:13 PDT
,
Anantha Keesara
no flags
Details
Proposed Patch
(116.15 KB, patch)
2009-10-08 10:04 PDT
,
Victor Wang
no flags
Details
Formatted Diff
Diff
Update proposed patch
(62.70 KB, patch)
2009-10-13 13:19 PDT
,
Victor Wang
hyatt
: review-
Details
Formatted Diff
Diff
Updated patch
(62.68 KB, patch)
2009-10-14 10:09 PDT
,
Victor Wang
hyatt
: review-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Anantha Keesara
Comment 1
2008-06-11 12:34:11 PDT
Created
attachment 21631
[details]
Screenshot
Anantha Keesara
Comment 2
2008-06-11 13:13:47 PDT
Created
attachment 21641
[details]
reduction
Victor Wang
Comment 3
2009-10-08 10:02:22 PDT
Change the title as this could happen to other editable contents. The problem is the calculation of caret location in RenderText::localCaretRect is incorrect when non-wrappable word typed exceeds the boundary of its container and the editable content is set to no word break. When typing new chars in this case, the container does not scroll and the caret stops moving, so the caret is not in the position where the new chars are added and the new chars added may not be visible. IE and Firefox work fine in this case.
Victor Wang
Comment 4
2009-10-08 10:04:12 PDT
Created
attachment 40886
[details]
Proposed Patch
Eric Seidel (no email)
Comment 5
2009-10-08 12:03:34 PDT
Comment on
attachment 40886
[details]
Proposed Patch Do these tests need rendering tree dumps and pixel results or can we cover this code with a dumpAsText test?
Victor Wang
Comment 6
2009-10-08 13:07:38 PDT
I was trying to just use DumpAsText, but can't find ways to get the caret location in test. The selection location and size are correct and the issue here is the caret's position. Seems to me we have to use the rendering dump tree and pixel results.
Victor Wang
Comment 7
2009-10-13 13:19:17 PDT
Created
attachment 41119
[details]
Update proposed patch Remove Win baselines from the patch. The Win baselines are same as mac versions if the fonts are installed correctly.
Dave Hyatt
Comment 8
2009-10-14 09:14:57 PDT
Comment on
attachment 41119
[details]
Update proposed patch The line in this test: window.getSelection().setPosition(body, body.offsetLeft + body.offsetWidth); makes no sense. setPosition takes a range offset and not a pixel offset.
Victor Wang
Comment 9
2009-10-14 10:09:55 PDT
Created
attachment 41164
[details]
Updated patch Fixed setPosition in caret-scroll-iframe-designmode.html.
Dave Hyatt
Comment 10
2009-11-03 10:50:57 PST
Comment on
attachment 41164
[details]
Updated patch My own opinion (and I could be wrong) is that the entire if statement is wrong, and that the else code should just run all the time.
Enrica Casucci
Comment 11
2009-11-03 11:24:44 PST
I agree with David's comment. The entire if block can be removed and execute always the block in the else branch. I've verified that your test case passes.
Ryosuke Niwa
Comment 12
2010-10-27 09:43:21 PDT
This bug is causing editing/selection/designmode-no-caret.html to fail on chromium port.
Victor Wang
Comment 13
2010-10-27 11:40:05 PDT
I recall that Enrica said there are some tests fail on snow leopard. Not clear to me whether they are related to the change...
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug