Bug 77992 - Initial upstreaming of input handling for BlackBerry port
Summary: Initial upstreaming of input handling for BlackBerry port
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nima Ghanavatian
URL:
Keywords:
Depends on:
Blocks: 73144
  Show dependency treegraph
 
Reported: 2012-02-07 08:35 PST by Nima Ghanavatian
Modified: 2012-02-08 09:01 PST (History)
3 users (show)

See Also:


Attachments
Patch (71.30 KB, patch)
2012-02-07 11:54 PST, Nima Ghanavatian
no flags Details | Formatted Diff | Diff
Patch (71.29 KB, patch)
2012-02-07 16:50 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-02-07 08:35:24 PST
This is the initial upstreaming of InputHandler.cpp and InputHandler.h for the BlackBerry port.
Comment 1 Nima Ghanavatian 2012-02-07 08:38:05 PST
blocks master bug 73144
Comment 2 Rob Buis 2012-02-07 08:54:49 PST
Assign to Nima.
Comment 3 Nima Ghanavatian 2012-02-07 11:54:42 PST
Created attachment 125892 [details]
Patch
Comment 4 Rob Buis 2012-02-07 12:57:51 PST
Comment on attachment 125892 [details]
Patch

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

Looks good, but still needs some cleanup.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:2
> + * Copyright (C) 2009, 2010, 2011 Research In Motion Limited. All rights reserved.

Need to add 2012.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:176
> +

Don't need the empty line.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:218
> +        return InputTypeTextArea;

This looks a bit strange since right after we always return InputTypeTextArea. Maybe better to update the comment below and remove the if.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:368
> +

Extra empty line maybe not needed.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:371
> +    textInField = textInField.substring(std::max(0, (int)textInField.length() - MaxLearnTextDataSize), textInField.length());

can use static_cast<int> here.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:388
> +

Why the empty line?

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:583
> +    WebCore::IntRect actualScreenRect = WebCore::IntRect(mainFrameView->scrollPosition(), m_webPage->actualVisibleSize());

Can be moved into the if section.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:1154
> +        bool* selecteds = 0;

Strange name again.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:1405
> +    extractedText->text = spannableTextInRange(0, elementText().length(), flags);

Too many empty lines IMHO.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:1501
> +    // Remove all markers.

Maybe not needed.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp:1677
> +        // the start of the inserted texted.

texted?

> Source/WebKit/blackberry/WebKitSupport/InputHandler.h:2
> + * Copyright (C) 2009, 2010, 2011 Research In Motion Limited. All rights reserved.

Need to add 2012

> Source/WebKit/blackberry/WebKitSupport/InputHandler.h:41
> +class VisibleSelection;

I dont think you need the above two.

> Source/WebKit/blackberry/WebKitSupport/InputHandler.h:96
> +    void setPopupListIndexes(int size, bool* selecteds);

Not so nice param name selecteds
Comment 5 Nima Ghanavatian 2012-02-07 16:50:10 PST
Created attachment 125955 [details]
Patch
Comment 6 Rob Buis 2012-02-08 08:41:51 PST
Comment on attachment 125955 [details]
Patch

Looks great.
Comment 7 WebKit Review Bot 2012-02-08 09:01:50 PST
Comment on attachment 125955 [details]
Patch

Clearing flags on attachment: 125955

Committed r107095: <http://trac.webkit.org/changeset/107095>
Comment 8 WebKit Review Bot 2012-02-08 09:01:56 PST
All reviewed patches have been landed.  Closing bug.