RESOLVED WORKSFORME 133256
Caret's screen position does not update during an overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=133256
Summary Caret's screen position does not update during an overflow scroll
Myles C. Maxfield
Reported 2014-05-23 22:13:54 PDT
Caret's screen position does not update during a scroll
Attachments
Patch (6.12 KB, patch)
2014-05-23 22:15 PDT, Myles C. Maxfield
no flags
Patch (6.19 KB, patch)
2014-05-27 12:30 PDT, Myles C. Maxfield
no flags
Patch (6.03 KB, patch)
2014-05-28 20:16 PDT, Myles C. Maxfield
no flags
Myles C. Maxfield
Comment 1 2014-05-23 22:15:39 PDT
Myles C. Maxfield
Comment 2 2014-05-23 22:16:32 PDT
Simon Fraser (smfr)
Comment 3 2014-05-23 22:59:05 PDT
Comment on attachment 232017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232017&action=review > Source/WebCore/ChangeLog:3 > + Caret's screen position does not update during a scroll This should say "overflow scroll" since this doesn't apply to document scrolling. > Source/WebCore/rendering/RenderLayer.cpp:2305 > frame.selection().setCaretRectNeedsUpdate(); > + frame.selection().invalidateCaretRect(); Is setCaretRectNeedsUpdate() a no-op then? Why isn't calling it enough to get the caret rect to be updated?
Myles C. Maxfield
Comment 4 2014-05-24 01:08:38 PDT
setCaretRectNeedsUpdate just sets a boolean to true. Recalculating the caret's rect is guarded by this boolean.
Tim Horton
Comment 5 2014-05-24 01:12:21 PDT
(In reply to comment #4) > setCaretRectNeedsUpdate just sets a boolean to true. Recalculating the caret's rect is guarded by this boolean. invalidateCaretRect *also* sets that boolean. Really I'd expect the names "invalidateX" and "setXNeedsUpdate" to be interchangeable, but I realize that's not your fault.
Darin Adler
Comment 6 2014-05-24 20:22:29 PDT
Comment on attachment 232017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232017&action=review >> Source/WebCore/rendering/RenderLayer.cpp:2305 >> + frame.selection().invalidateCaretRect(); > > Is setCaretRectNeedsUpdate() a no-op then? Why isn't calling it enough to get the caret rect to be updated? These names are admittedly unclear and confusing, but: - setCaretRectNeedsUpdate causes the caret rect’s coordinates to be recomputed - invalidateCaretRect causes pixels where the caret is drawn to be marked dirty so they will be repainted
Myles C. Maxfield
Comment 7 2014-05-27 12:26:53 PDT
Comment on attachment 232017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232017&action=review >> Source/WebCore/ChangeLog:3 >> + Caret's screen position does not update during a scroll > > This should say "overflow scroll" since this doesn't apply to document scrolling. Done.
Myles C. Maxfield
Comment 8 2014-05-27 12:28:23 PDT
(In reply to comment #5) > invalidateCaretRect *also* sets that boolean. Yep. New patch incoming.
Myles C. Maxfield
Comment 9 2014-05-27 12:30:38 PDT
Myles C. Maxfield
Comment 10 2014-05-27 14:15:19 PDT
WebKit Commit Bot
Comment 12 2014-05-27 15:53:51 PDT
Re-opened since this is blocked by bug 133326
Mark Lam
Comment 13 2014-05-27 15:58:14 PDT
(In reply to comment #12) > Re-opened since this is blocked by bug 133326 Rolled out in r169402: <http://trac.webkit.org/changeset/169402>.
Myles C. Maxfield
Comment 14 2014-05-28 20:16:25 PDT
Simon Fraser (smfr)
Comment 15 2014-05-28 20:45:58 PDT
Comment on attachment 232229 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=232229&action=review > Source/WebCore/page/EventHandler.cpp:2605 > + m_frame.selection().invalidateCaretRect(); Hrm not sure about this. What about other kinds of scrolling (scrollbar, programmatic)? What ensures that layout is up-to-date when calling invalidateCaretRect()?
Michael Catanzaro
Comment 16 2016-09-17 07:14:52 PDT
Comment on attachment 232229 [details] Patch Hi, Apologies that your patch was not reviewed in a timely manner. Since it's now quite old, I am removing it from the review request queue. Please consider rebasing it on trunk and resubmitting. To increase the chances of getting a review, consider using 'Tools/Scripts/webkit-patch upload --suggest-reviewers' to CC reviewers who might be interested in this bug.
Simon Fraser (smfr)
Comment 17 2017-11-14 15:36:23 PST
I can't reproduce this any more (testing in this very textarea).
Note You need to log in before you can comment on or make changes to this bug.