Bug 46531 - Autocorrection panel is shown at incorrect location when WebView is scrolled.
Summary: Autocorrection panel is shown at incorrect location when WebView is scrolled.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-09-24 15:32 PDT by Jia Pu
Modified: 2010-09-28 11:48 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (v1) (3.27 KB, patch)
2010-09-27 12:56 PDT, Jia Pu
mitz: review-
Details | Formatted Diff | Diff
Proposed patch (v2) (2.56 KB, patch)
2010-09-28 10:24 PDT, Jia Pu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jia Pu 2010-09-24 15:32:24 PDT
<rdar://problem/8455376>

When the size of WebView is larger than the containing view (i.e. the scroll bar is shown). The correction panel ends up showing the bubble outside of the window. Because the coordinate used for displaying the panel is in the page's system not the view's.
Comment 1 Jia Pu 2010-09-27 12:56:31 PDT
Created attachment 68945 [details]
Proposed patch (v1)
Comment 2 mitz 2010-09-27 22:31:20 PDT
Comment on attachment 68945 [details]
Proposed patch (v1)

View in context: https://bugs.webkit.org/attachment.cgi?id=68945&action=review

> WebCore/editing/Editor.cpp:2719
> +                        RefPtr<ClientRect> clientRect = rangeToReplace->getBoundingClientRect();

I don’t think getBoundingClientRect() is appropriate here. It is high-level DOM API which calls updateLayoutIgnorePendingStylesheets() and creates a DOM object (ClientRect) which you don’t need for the client interface. I think you should call getBorderAndTextQuads() directly to get a vector of quads in view coordinates.
Comment 3 Jia Pu 2010-09-28 10:24:52 PDT
Created attachment 69067 [details]
Proposed patch (v2)

Revised per comment #2.
Comment 4 WebKit Commit Bot 2010-09-28 11:48:20 PDT
Comment on attachment 69067 [details]
Proposed patch (v2)

Clearing flags on attachment: 69067

Committed r68547: <http://trac.webkit.org/changeset/68547>
Comment 5 WebKit Commit Bot 2010-09-28 11:48:26 PDT
All reviewed patches have been landed.  Closing bug.