Bug 77992

Summary: Initial upstreaming of input handling for BlackBerry port
Product: WebKit Reporter: Nima Ghanavatian <nima.ghanavatian>
Component: New BugsAssignee: Nima Ghanavatian <nima.ghanavatian>
Status: RESOLVED FIXED    
Severity: Normal CC: rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 73144    
Attachments:
Description Flags
Patch
none
Patch none

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.