Bug 111733

Summary: [BlackBerry] Prevent text selection inside Colour and Date/Time input fields
Product: WebKit Reporter: Mike Fenton <mifenton>
Component: WebKit BlackBerryAssignee: Mike Fenton <mifenton>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, gmak, rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
rwlbuis: review+
Patch with reviewers denoted.
none
Additional Patch.
none
Replacement patch.
none
Fix compilation error none

Description Mike Fenton 2013-03-07 08:17:14 PST
BlackBerry port uses button rendering and popups for input, text selection should not be allowed.
Comment 1 Mike Fenton 2013-03-07 08:27:30 PST
Created attachment 192004 [details]
Patch
Comment 2 gmak 2013-03-07 10:52:35 PST
Internal Reviewer: Me r+. Looks good.
Comment 3 Rob Buis 2013-03-07 11:06:00 PST
Comment on attachment 192004 [details]
Patch

LGTM.
Comment 4 Mike Fenton 2013-03-07 11:31:56 PST
Created attachment 192055 [details]
Patch with reviewers denoted.
Comment 5 WebKit Review Bot 2013-03-07 12:57:34 PST
Comment on attachment 192055 [details]
Patch with reviewers denoted.

Clearing flags on attachment: 192055

Committed r145121: <http://trac.webkit.org/changeset/145121>
Comment 6 WebKit Review Bot 2013-03-07 12:57:37 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Mike Fenton 2013-03-12 10:45:31 PDT
Created attachment 192764 [details]
Additional Patch.
Comment 8 Mike Fenton 2013-03-12 10:45:55 PDT
Re-opening for additional case.
Comment 9 gmak 2013-03-12 10:57:33 PDT
I prefer not to do nested if statements but the logic is sound whatever way you do it.
r+ with style improved.
Comment 10 Mike Fenton 2013-03-12 10:58:10 PDT
Created attachment 192769 [details]
Replacement patch.
Comment 11 Rob Buis 2013-03-12 11:03:09 PDT
Comment on attachment 192769 [details]
Replacement patch.

LGTM.
Comment 12 WebKit Review Bot 2013-03-12 11:40:46 PDT
Comment on attachment 192769 [details]
Replacement patch.

Clearing flags on attachment: 192769

Committed r145571: <http://trac.webkit.org/changeset/145571>
Comment 13 WebKit Review Bot 2013-03-12 11:40:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Alberto Garcia 2013-03-14 04:33:03 PDT
Created attachment 193105 [details]
Fix compilation error

+    if (Node* focusedNode = frame->document()->focusedNode()
+        && (focusedNode->hasTagName(HTMLNames::selectTag) || (focusedNode->isElementNode() && DOMSupport::isPopupInputField(toElement(focusedNode))))) {
+            SelectionLog(Platform::LogLevelInfo, "SelectionHandler::selectionPositionChanged selection is on a popup control, skipping rendering.");
+            return;
+        }
+    }

Uh, oh, there's one brace missing, this won't compile.
Comment 15 Rob Buis 2013-03-14 07:23:23 PDT
Comment on attachment 193105 [details]
Fix compilation error

Well spotted.
Comment 16 Alberto Garcia 2013-03-14 09:59:50 PDT
Do we need to reopen this bug in order to commit the patch?
Comment 17 Rob Buis 2013-03-15 09:40:00 PDT
(In reply to comment #16)
> Do we need to reopen this bug in order to commit the patch?

Let's try without.
Comment 18 Alberto Garcia 2013-03-18 10:50:49 PDT
(In reply to comment #17)
> (In reply to comment #16)
> > Do we need to reopen this bug in order to commit the patch?
> 
> Let's try without.

It didn't seem to work :)
Comment 19 Mike Fenton 2013-03-18 11:15:44 PDT
Re-opening to land patch.
Comment 20 WebKit Review Bot 2013-03-18 11:35:54 PDT
Comment on attachment 193105 [details]
Fix compilation error

Clearing flags on attachment: 193105

Committed r146092: <http://trac.webkit.org/changeset/146092>
Comment 21 WebKit Review Bot 2013-03-18 11:35:59 PDT
All reviewed patches have been landed.  Closing bug.