Bug 102236 - [BlackBerry] Use mispelled-marker offsets relative to the element
Summary: [BlackBerry] Use mispelled-marker offsets relative to the element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nima Ghanavatian
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 07:53 PST by Nima Ghanavatian
Modified: 2012-11-14 09:05 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.13 KB, patch)
2012-11-14 07:59 PST, Nima Ghanavatian
no flags Details | Formatted Diff | Diff
Patch (3.13 KB, patch)
2012-11-14 08:26 PST, Nima Ghanavatian
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nima Ghanavatian 2012-11-14 07:53:14 PST
We were using node-relative offsets which do not work correctly with respect to IMF in content editable since a new node is created with every new line.
Comment 1 Nima Ghanavatian 2012-11-14 07:59:47 PST
Created attachment 174159 [details]
Patch
Comment 2 WebKit Review Bot 2012-11-14 08:03:18 PST
Attachment 174159 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/blackberry/ChangeLog', u'Sou..." exit_code: 1
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:762:  Omit int when using unsigned  [runtime/unsigned] [1]
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:763:  Omit int when using unsigned  [runtime/unsigned] [1]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Rob Buis 2012-11-14 08:09:08 PST
Comment on attachment 174159 [details]
Patch

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

Looks good but style errors need to be fixed.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:759
> +    VisiblePosition caretPosition = m_currentFocusElement->document()->frame()->selection()->selection().visibleStart();

Scary. Also selection().selection() looks weird.

>> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:763
>> +    if (!rangeSelection)
> 
> Omit int when using unsigned  [runtime/unsigned] [1]

Style queue bug? I assume it means the unsigned int below....
This is the second time in a week we are hitting style queue problems. Doesn't it like our IMF code? :)

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:767
> +    unsigned int length = 0;

I think the warnings are about these lines.
Comment 4 Nima Ghanavatian 2012-11-14 08:26:34 PST
Created attachment 174166 [details]
Patch
Comment 5 Rob Buis 2012-11-14 08:30:14 PST
Comment on attachment 174166 [details]
Patch

Looks good.
Comment 6 WebKit Review Bot 2012-11-14 09:05:03 PST
Comment on attachment 174166 [details]
Patch

Clearing flags on attachment: 174166

Committed r134616: <http://trac.webkit.org/changeset/134616>
Comment 7 WebKit Review Bot 2012-11-14 09:05:07 PST
All reviewed patches have been landed.  Closing bug.