From f72ef77dc0501c97156c1b3673cc4a4c50754cdd Mon Sep 17 00:00:00 2001 From: "mifenton@rim.com" Date: Thu, 12 Apr 2012 15:09:33 +0000 Subject: [PATCH] Pattern matching for hexadecimal should include * as an allowable count. https://bugs.webkit.org/show_bug.cgi?id=83779 Reviewed by Rob Buis. Update pattern matching check to allow wildcard for number of characters allowed. PR 148907. Reviewed Internally by Gen Mak. * WebKitSupport/DOMSupport.cpp: (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113980 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit/blackberry/ChangeLog | 17 +++++++++++++++++ Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog index 0c6a0de..27e4fbf 100644 --- a/Source/WebKit/blackberry/ChangeLog +++ b/Source/WebKit/blackberry/ChangeLog @@ -1,3 +1,20 @@ +2012-04-12 Mike Fenton + + Pattern matching for hexadecimal should include * as an allowable count. + https://bugs.webkit.org/show_bug.cgi?id=83779 + + Reviewed by Rob Buis. + + Update pattern matching check to allow wildcard for number + of characters allowed. + + PR 148907. + + Reviewed Internally by Gen Mak. + + * WebKitSupport/DOMSupport.cpp: + (BlackBerry::WebKit::DOMSupport::elementPatternIndicatesHexadecimal): + 2012-04-11 Joe Mason [BlackBerry] Update to the thread-safe GuardedPointer API diff --git a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp index 9ace5df..98638a0 100644 --- a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp +++ b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp @@ -408,6 +408,10 @@ bool elementPatternIndicatesHexadecimal(const HTMLInputElement* inputElement) if (patternAttribute.length() == 11) return true; + // Check for * + if (patternAttribute.length() == 12 && patternAttribute[11] == '*') + return true; + // Is the regex specifying a character count? if (patternAttribute[11] != '{' || !patternAttribute.endsWith("}")) return false; -- 2.7.4