Commit 546aea6d authored by abarth@webkit.org's avatar abarth@webkit.org

Remove ENABLE(WCSS) and associated code

https://bugs.webkit.org/show_bug.cgi?id=68759

Reviewed by Darin Adler.

.:

* configure.ac:

Source/WebCore:

As discussed on webkit-dev, we are removing this feature from trunk to
reduce the number of different configurations.

* CodeGenerators.pri:
* GNUmakefile.am:
* WebCore.pro:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/WCSSPropertyNames.in: Removed.
* css/WCSSValueKeywords.in: Removed.
* features.pri:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
* html/HTMLInputElement.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::sanitizeValue):
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::start):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/style/RenderStyleConstants.h:

Tools:

* Scripts/build-webkit:
* Scripts/old-run-webkit-tests:
* Scripts/webkitperl/features.pm:
(hasFeature):
* Scripts/webkitpy/layout_tests/port/webkit.py:
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:

LayoutTests:

* fast/wcss: Removed.
* fast/wcss/wap-input-format-expected.txt: Removed.
* fast/wcss/wap-input-format.xhtml: Removed.
* fast/wcss/wap-input-required-expected.txt: Removed.
* fast/wcss/wap-input-required.xhtml: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e48133c7
2011-09-24 Adam Barth <abarth@webkit.org>
Remove ENABLE(WCSS) and associated code
https://bugs.webkit.org/show_bug.cgi?id=68759
Reviewed by Darin Adler.
* configure.ac:
2011-09-23 Yuqiang Xian <yuqiang.xian@intel.com>
Add JSVALUE32_64 support to DFG JIT
......
2011-09-24 Adam Barth <abarth@webkit.org>
Remove ENABLE(WCSS) and associated code
https://bugs.webkit.org/show_bug.cgi?id=68759
Reviewed by Darin Adler.
* fast/wcss: Removed.
* fast/wcss/wap-input-format-expected.txt: Removed.
* fast/wcss/wap-input-format.xhtml: Removed.
* fast/wcss/wap-input-required-expected.txt: Removed.
* fast/wcss/wap-input-required.xhtml: Removed.
2011-09-24 Dan Bernstein <mitz@apple.com>
Added Snow Leopard-specific expected results.
Assume the user input the following "AaBbCcDdEeFfGg123456!@#$%^,.;" to each of the input elements
{-wap-input-format:"*A";} only takes upper letters, symbols, punctuations
PASS domValueOf("star_upA") is "ABCDEFG!@#$%^,.;"
PASS visibleValueOf("star_upA") is "ABCDEFG!@#$%^,.;"
{-wap-input-format:"*a";} only takes lower letters, symbols, punctuations
PASS domValueOf("star_lowa") is "abcdefg!@#$%^,.;"
PASS visibleValueOf("star_lowa") is "abcdefg!@#$%^,.;"
{-wap-input-format:"*N";} only takes numbers
PASS domValueOf("star_upN") is "123456"
PASS visibleValueOf("star_upN") is "123456"
{-wap-input-format:"*n";} only takes numbers , symbals and punctuations
PASS domValueOf("star_lown") is "123456!@#$%^,.;"
PASS visibleValueOf("star_lown") is "123456!@#$%^,.;"
{-wap-input-format:"*X";} takes upper letters,numbers,symbals and punctuations
PASS domValueOf("star_upX") is "ABCDEFG123456!@#$%^,.;"
PASS visibleValueOf("star_upX") is "ABCDEFG123456!@#$%^,.;"
{-wap-input-format:"*x";} takes lower letters,numbers,symbals and punctuations
PASS domValueOf("star_lowx") is "abcdefg123456!@#$%^,.;"
PASS visibleValueOf("star_lowx") is "abcdefg123456!@#$%^,.;"
{-wap-input-format:"*M";} takes any character
PASS domValueOf("star_upM") is "AaBbCcDdEeFfGg123456!@#$%^,.;"
PASS visibleValueOf("star_upM") is "AaBbCcDdEeFfGg123456!@#$%^,.;"
{-wap-input-format:"*m";} takes any character
PASS domValueOf("star_lowm") is "AaBbCcDdEeFfGg123456!@#$%^,.;"
PASS visibleValueOf("star_lowm") is "AaBbCcDdEeFfGg123456!@#$%^,.;"
{-wap-input-format:"3N";} takes 3 numbers
PASS domValueOf("three_N") is "123"
PASS visibleValueOf("three_N") is "123"
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM/DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
.star_upA {-wap-input-format: "*A" ; } /* upper letter, symbol, punctuation, NO number */
.star_lowa {-wap-input-format: "*a" ; } /* lower letter, symbol, punctuation, NO number */
.star_upN {-wap-input-format: "*N" ; } /* number only */
.star_lown {-wap-input-format: "*n" ; } /* number , symbol, punctuation, no letter */
.star_upX {-wap-input-format: "*X" ; } /* upper letter, number, symbol, punctuation, no lower letter */
.star_lowx {-wap-input-format: "*x" ; } /* lower letter, number, symbol, punctuation, no upper letter */
.star_upM {-wap-input-format: "*M" ; } /* anything, with upper as the default input */
.star_lowm {-wap-input-format: "*m" ; } /* anything, with lower as the default input */
.three_N {-wap-input-format: "3N" ; } /* up to 3 digit number */
</style>
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<input type="text" id="star_upA" class="star_upA" />
<input type="text" id="star_lowa" class="star_lowa" />
<input type="text" id="star_upN" class="star_upN" />
<input type="text" id="star_lown" class="star_lown" />
<input type="text" id="star_upX" class="star_upX" />
<input type="text" id="star_lowx" class="star_lowx" />
<input type="text" id="star_upM" class="star_upM" />
<input type="text" id="star_lowm" class="star_lowm" />
<input type="text" id="three_N" class="three_N" />
<script type="text/javascript">
function domValueOf(id) {
return document.getElementById(id).value;
}
function visibleValueOf(id) {
var el = document.getElementById(id);
el.focus();
document.execCommand('SelectAll');
return document.getSelection().toString();
}
function inputKeys(str) {
if(!window.eventSender)
return;
for(i = 0; i != str.length; i++) {
eventSender.keyDown(str.charAt(i));
}
}
if (window.layoutTestController) {
layoutTestController.dumpAsText();
}
var str = "AaBbCcDdEeFfGg123456!@#$%^,.;";
debug("Assume the user input the following \"" + str + "\" to each of the input elements<br/><br/>");
debug('<br/>{-wap-input-format:"*A";} only takes upper letters, symbols, punctuations<br/>');
document.getElementById("star_upA").focus();
inputKeys(str);
shouldBe('domValueOf("star_upA")','"ABCDEFG!@#$%^,.;"');
shouldBe('visibleValueOf("star_upA")','"ABCDEFG!@#$%^,.;"');
debug('<br/>{-wap-input-format:"*a";} only takes lower letters, symbols, punctuations<br /><br />');
document.getElementById("star_lowa").focus();
inputKeys(str);
shouldBe('domValueOf("star_lowa")', '"abcdefg!@#$%^,.;"');
shouldBe('visibleValueOf("star_lowa")', '"abcdefg!@#$%^,.;"');
debug('<br/>{-wap-input-format:"*N";} only takes numbers <br />');
document.getElementById("star_upN").focus();
inputKeys(str);
shouldBe('domValueOf("star_upN")', '"123456"');
shouldBe('visibleValueOf("star_upN")', '"123456"');
debug('<br/>{-wap-input-format:"*n";} only takes numbers , symbals and punctuations <br />');
document.getElementById("star_lown").focus();
inputKeys(str);
shouldBe('domValueOf("star_lown")', '"123456!@#$%^,.;"');
shouldBe('visibleValueOf("star_lown")', '"123456!@#$%^,.;"');
debug('<br/>{-wap-input-format:"*X";} takes upper letters,numbers,symbals and punctuations <br />');
document.getElementById("star_upX").focus();
inputKeys(str);
shouldBe('domValueOf("star_upX")', '"ABCDEFG123456!@#$%^,.;"');
shouldBe('visibleValueOf("star_upX")', '"ABCDEFG123456!@#$%^,.;"');
debug('<br/>{-wap-input-format:"*x";} takes lower letters,numbers,symbals and punctuations <br />');
document.getElementById("star_lowx").focus();
inputKeys(str);
shouldBe('domValueOf("star_lowx")', '"abcdefg123456!@#$%^,.;"');
shouldBe('visibleValueOf("star_lowx")', '"abcdefg123456!@#$%^,.;"');
debug('<br/>{-wap-input-format:"*M";} takes any character <br />');
document.getElementById("star_upM").focus();
inputKeys(str);
shouldBe('domValueOf("star_upM")', '"AaBbCcDdEeFfGg123456!@#$%^,.;"');
shouldBe('visibleValueOf("star_upM")', '"AaBbCcDdEeFfGg123456!@#$%^,.;"');
debug('<br/>{-wap-input-format:"*m";} takes any character <br />');
document.getElementById("star_lowm").focus();
inputKeys(str);
shouldBe('domValueOf("star_lowm")', '"AaBbCcDdEeFfGg123456!@#$%^,.;"');
shouldBe('visibleValueOf("star_lowm")', '"AaBbCcDdEeFfGg123456!@#$%^,.;"');
debug('<br/>{-wap-input-format:"3N";} takes 3 numbers <br />');
document.getElementById("three_N").focus();
inputKeys(str);
shouldBe('domValueOf("three_N")', '"123"');
shouldBe('visibleValueOf("three_N")', '"123"');
</script>
</body>
</html>
There are three form control elements below, the first one is required and blank,validity.valueMissing should be true, the other two either don't have -wap-input-required applied, or the -wap-input-required indicates false, and are not required .
SUCCESS SUCCESS SUCCESS
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM/DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>required and basic valueMissing</title>
</head>
<body>
<p>There are three form control elements below, the first one is required and blank,validity.valueMissing should be true, the other two either don't have -wap-input-required applied, or the -wap-input-required indicates false, and are not required .</p>
<input name="required" style="-wap-input-required:true;" />
<input name="not_specified" />
<textarea name="not_required" style="-wap-input-required:false;"></textarea>
<p id="console"> </p>
<script language="JavaScript" type="text/javascript">
function log(message) {
document.getElementById("console").innerHTML += message + " \n";
}
if (window.layoutTestController)
layoutTestController.dumpAsText();
v = document.getElementsByName("required");
log(v[0].validity.valueMissing ? "SUCCESS" : "FAILURE");
v = document.getElementsByName("not_specified");
log((!v[0].validity.valueMissing) ? "SUCCESS" : "FAILURE");
v = document.getElementsByName("not_required");
log((!v[0].validity.valueMissing) ? "SUCCESS" : "FAILURE");
</script>
</body>
</html>
2011-09-24 Adam Barth <abarth@webkit.org>
Remove ENABLE(WCSS) and associated code
https://bugs.webkit.org/show_bug.cgi?id=68759
Reviewed by Darin Adler.
As discussed on webkit-dev, we are removing this feature from trunk to
reduce the number of different configurations.
* CodeGenerators.pri:
* GNUmakefile.am:
* WebCore.pro:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/WCSSPropertyNames.in: Removed.
* css/WCSSValueKeywords.in: Removed.
* features.pri:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
* html/HTMLInputElement.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::sanitizeValue):
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::start):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/style/RenderStyleConstants.h:
2011-09-24 Young Han Lee <joybro@company100.net>
SVGAnimation does not support 'values' for from-to animations
......@@ -59,11 +59,6 @@ contains(DEFINES, ENABLE_SVG=1) {
EXTRACSSVALUES += $$PWD/css/SVGCSSValueKeywords.in
}
contains(DEFINES, ENABLE_WCSS=1) {
EXTRACSSPROPERTIES += $$PWD/css/WCSSPropertyNames.in
EXTRACSSVALUES += $$PWD/css/WCSSValueKeywords.in
}
STYLESHEETS_EMBED = \
$$PWD/css/html.css \
$$PWD/css/quirks.css \
......
......@@ -434,14 +434,6 @@ FEATURE_DEFINES += ENABLE_SHARED_WORKERS=1
webcore_cppflags += -DENABLE_SHARED_WORKERS=1
endif
# ----
# WCSS Support
# ----
if ENABLE_WCSS
FEATURE_DEFINES += ENABLE_WCSS=1
webcore_cppflags += -DENABLE_WCSS=1
endif # END ENABLE_WCSS
# ----
# Filters
# ----
......
......@@ -27,11 +27,6 @@ contains(DEFINES, ENABLE_SVG=1) {
EXTRACSSVALUES += $$PWD/css/SVGCSSValueKeywords.in
}
contains(DEFINES, ENABLE_WCSS=1) {
EXTRACSSPROPERTIES += $$PWD/css/WCSSPropertyNames.in
EXTRACSSVALUES += $$PWD/css/WCSSValueKeywords.in
}
SOURCES += \
accessibility/AccessibilityImageMapLink.cpp \
accessibility/AccessibilityMediaControls.cpp \
......
......@@ -976,11 +976,7 @@ bool CSSParser::parseValue(int propId, bool important)
// inline | block | list-item | run-in | inline-block | table |
// inline-table | table-row-group | table-header-group | table-footer-group | table-row |
// table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit
#if ENABLE(WCSS)
if ((id >= CSSValueInline && id <= CSSValueWapMarquee) || id == CSSValueNone)
#else
if ((id >= CSSValueInline && id <= CSSValueWebkitInlineBox) || id == CSSValueNone)
#endif
validPrimitive = true;
#if ENABLE(CSS3_FLEXBOX)
if (id == CSSValueWebkitFlexbox || id == CSSValueWebkitInlineFlexbox)
......@@ -1640,29 +1636,6 @@ bool CSSParser::parseValue(int propId, bool important)
else
validPrimitive = validUnit(value, FTime | FInteger | FNonNeg, m_strict);
break;
#if ENABLE(WCSS)
case CSSPropertyWapMarqueeDir:
if (id == CSSValueLtr || id == CSSValueRtl)
validPrimitive = true;
break;
case CSSPropertyWapMarqueeStyle:
if (id == CSSValueNone || id == CSSValueSlide || id == CSSValueScroll || id == CSSValueAlternate)
validPrimitive = true;
break;
case CSSPropertyWapMarqueeLoop:
if (id == CSSValueInfinite)
validPrimitive = true;
else
validPrimitive = validUnit(value, FInteger | FNonNeg, m_strict);
break;
case CSSPropertyWapMarqueeSpeed:
if (id == CSSValueNormal || id == CSSValueSlow || id == CSSValueFast)
validPrimitive = true;
else
validPrimitive = validUnit(value, FTime | FInteger | FNonNeg, m_strict);
break;
#endif
case CSSPropertyWebkitFlow:
return parseFlowThread(propId, important);
case CSSPropertyWebkitContentOrder:
......@@ -2124,15 +2097,6 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyTextOverline:
case CSSPropertyTextUnderline:
return false;
#if ENABLE(WCSS)
case CSSPropertyWapInputFormat:
validPrimitive = true;
break;
case CSSPropertyWapInputRequired:
parsedValue = parseWCSSInputProperty();
break;
#endif
// CSS Text Layout Module Level 3: Vertical writing support
case CSSPropertyWebkitWritingMode:
if (id >= CSSValueHorizontalTb && id <= CSSValueHorizontalBt)
......@@ -2202,27 +2166,6 @@ bool CSSParser::parseValue(int propId, bool important)
return false;
}
#if ENABLE(WCSS)
PassRefPtr<CSSValue> CSSParser::parseWCSSInputProperty()
{
RefPtr<CSSValue> parsedValue = 0;
CSSParserValue* value = m_valueList->current();
String inputProperty;
if (value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_IDENT)
inputProperty = String(value->string);
if (!inputProperty.isEmpty())
parsedValue = primitiveValueCache()->createValue(inputProperty, CSSPrimitiveValue::CSS_STRING);
while (m_valueList->next()) {
// pass all other values, if any. If we don't do this,
// the parser will think that it's not done and won't process this property
}
return parsedValue;
}
#endif
void CSSParser::addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval)
{
if (lval) {
......
......@@ -160,10 +160,6 @@ public:
PassRefPtr<CSSValue> parseSVGStrokeDasharray();
#endif
#if ENABLE(WCSS)
PassRefPtr<CSSValue> parseWCSSInputProperty();
#endif
// CSS3 Parsing Routines (for properties specific to CSS3)
bool parseShadow(int propId, bool important);
bool parseBorderImage(int propId, RefPtr<CSSValue>&);
......
......@@ -1004,11 +1004,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e)
case TABLE_CAPTION:
m_value.ident = CSSValueTableCaption;
break;
#if ENABLE(WCSS)
case WAP_MARQUEE:
m_value.ident = CSSValueWapMarquee;
break;
#endif
case BOX:
m_value.ident = CSSValueWebkitBox;
break;
......
......@@ -2353,21 +2353,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSPropertyDisplay: {
SVGDisplayPropertyGuard guard(m_element, m_style.get());
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(display, Display)
#if ENABLE(WCSS)
if (primitiveValue && primitiveValue->getIdent() == CSSValueWapMarquee) {
// Initialize WAP Marquee style
m_style->setOverflowX(OMARQUEE);
m_style->setOverflowY(OMARQUEE);
m_style->setWhiteSpace(NOWRAP);
m_style->setMarqueeDirection(MLEFT);
m_style->setMarqueeSpeed(85); // Normal speed
m_style->setMarqueeLoopCount(1);
m_style->setMarqueeBehavior(MSCROLL);
if (m_parentStyle)
m_style->setDisplay(m_parentStyle->display());
}
#endif
return;
}
case CSSPropertyEmptyCells:
......@@ -3276,9 +3261,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_style->setMarqueeLoopCount(m_parentStyle->marqueeLoopCount());
m_style->setMarqueeBehavior(m_parentStyle->marqueeBehavior());
return;
#if ENABLE(WCSS)
case CSSPropertyWapMarqueeLoop:
#endif
case CSSPropertyWebkitMarqueeRepetition: {
HANDLE_INHERIT_AND_INITIAL(marqueeLoopCount, MarqueeLoopCount)
if (!primitiveValue)
......@@ -3289,9 +3271,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_style->setMarqueeLoopCount(primitiveValue->getIntValue());
return;
}
#if ENABLE(WCSS)
case CSSPropertyWapMarqueeSpeed:
#endif
case CSSPropertyWebkitMarqueeSpeed: {
HANDLE_INHERIT_AND_INITIAL(marqueeSpeed, MarqueeSpeed)
if (!primitiveValue)
......@@ -3342,31 +3321,9 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
}
return;
}
#if ENABLE(WCSS)
case CSSPropertyWapMarqueeStyle:
#endif
case CSSPropertyWebkitMarqueeStyle:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeBehavior, MarqueeBehavior)
return;
#if ENABLE(WCSS)
case CSSPropertyWapMarqueeDir:
HANDLE_INHERIT_AND_INITIAL(marqueeDirection, MarqueeDirection)
if (primitiveValue && primitiveValue->getIdent()) {
switch (primitiveValue->getIdent()) {
case CSSValueLtr:
m_style->setMarqueeDirection(MRIGHT);
break;
case CSSValueRtl:
m_style->setMarqueeDirection(MLEFT);
break;
default:
m_style->setMarqueeDirection(*primitiveValue);
break;
}
}
return;
#endif
case CSSPropertyWebkitFlow:
if (isInitial)
HANDLE_INITIAL_COND(CSSPropertyWebkitFlow, FlowThread);
......@@ -3652,22 +3609,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSPropertyWebkitTextStroke:
case CSSPropertyWebkitTextEmphasis:
return;
#if ENABLE(WCSS)
case CSSPropertyWapInputFormat:
if (primitiveValue && m_element->hasTagName(WebCore::inputTag)) {
String mask = primitiveValue->getStringValue();
static_cast<HTMLInputElement*>(m_element)->setWapInputFormat(mask);
}
return;
case CSSPropertyWapInputRequired:
if (primitiveValue && m_element->isFormControlElement()) {
HTMLFormControlElement* element = static_cast<HTMLFormControlElement*>(m_element);
bool required = primitiveValue->getStringValue() == "true";
element->setRequired(required);
}
return;
#endif
// CSS Text Layout Module Level 3: Vertical writing support
case CSSPropertyWebkitWritingMode: {
......
-wap-input-format
-wap-input-required
-wap-marquee-dir
-wap-marquee-loop
-wap-marquee-speed
-wap-marquee-style
// place holder for all WCSS specific CSS value keywords
......@@ -68,7 +68,6 @@ isEmpty(HAVE_QRAWFONT) {
!contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=.): DEFINES += ENABLE_DASHBOARD_SUPPORT=0
!contains(DEFINES, ENABLE_FILTERS=.): DEFINES += ENABLE_FILTERS=1
!contains(DEFINES, ENABLE_XPATH=.): DEFINES += ENABLE_XPATH=1
!contains(DEFINES, ENABLE_WCSS=.): DEFINES += ENABLE_WCSS=0
!contains(DEFINES, ENABLE_SHARED_WORKERS=.): DEFINES += ENABLE_SHARED_WORKERS=1
!contains(DEFINES, ENABLE_WORKERS=.): DEFINES += ENABLE_WORKERS=1
!contains(DEFINES, ENABLE_XHTMLMP=.): DEFINES += ENABLE_XHTMLMP=0
......@@ -198,13 +197,6 @@ webkit2 {
!contains(DEFINES, ENABLE_FULLSCREEN_API=.): DEFINES += ENABLE_FULLSCREEN_API=1
}
contains(DEFINES, ENABLE_WCSS=1) {
contains(DEFINES, ENABLE_XHTMLMP=0) {
DEFINES -= ENABLE_XHTMLMP=0
DEFINES += ENABLE_XHTMLMP=1
}
}
## Forward enabled feature macros to JavaScript enabled features macros
FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
v8: FEATURE_DEFINES_JAVASCRIPT += V8_BINDING=1
......@@ -220,7 +212,6 @@ contains(DEFINES, ENABLE_VIDEO=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
contains(DEFINES, ENABLE_XPATH=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
contains(DEFINES, ENABLE_XSLT=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XSLT=1
contains(DEFINES, ENABLE_FILTERS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_FILTERS=1
contains(DEFINES, ENABLE_WCSS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_WCSS=1
contains(DEFINES, ENABLE_XHTMLMP=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_XHTMLMP=1
contains(DEFINES, ENABLE_SVG=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG=1
contains(DEFINES, ENABLE_SVG_FONTS=1): FEATURE_DEFINES_JAVASCRIPT += ENABLE_SVG_FONTS=1
......
......@@ -83,10 +83,6 @@ HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* docum
: HTMLTextFormControlElement(tagName, document, form)
, m_size(defaultSize)
, m_maxLength(maximumLength)
#if ENABLE(WCSS)
, m_inputFormatMask("*m")
, m_maxInputCharsAllowed(maximumLength)
#endif
, m_maxResults(-1)
, m_isChecked(false)
, m_reflectsCheckedAttribute(true)
......@@ -1656,146 +1652,6 @@ void HTMLInputElement::stepUpFromRenderer(int n)
}
}
#if ENABLE(WCSS)
static inline const AtomicString& formatCodes()
{
DEFINE_STATIC_LOCAL(AtomicString, codes, ("AaNnXxMm"));
return codes;
}
static unsigned cursorPositionToMaskIndex(const String& inputFormatMask, unsigned cursorPosition)
{
UChar mask;
int index = -1;
do {
mask = inputFormatMask[++index];
if (mask == '\\')
++index;
else if (mask == '*' || (isASCIIDigit(mask) && mask != '0')) {
index = inputFormatMask.length() - 1;
break;
}
} while (cursorPosition--);
return index;
}
bool HTMLInputElement::isConformToInputMask(const String& inputChars) const
{
for (unsigned i = 0; i < inputChars.length(); ++i) {
if (!isConformToInputMask(inputChars[i], i))
return false;
}
return true;
}
bool HTMLInputElement::isConformToInputMask(UChar inChar, unsigned cursorPosition) const
{
if (m_inputFormatMask.isEmpty() || m_inputFormatMask == "*M" || m_inputFormatMask == "*m")
return true;
if (cursorPosition >= m_maxInputCharsAllowed())
return false;
unsigned maskIndex = cursorPositionToMaskIndex(m_inputFormatMask, cursorPosition);
bool ok = true;
UChar mask = m_inputFormatMask[maskIndex];
// Match the inputed character with input mask
switch (mask) {
case 'A':
ok = !isASCIIDigit(inChar) && !isASCIILower(inChar) && isASCIIPrintable(inChar);
break;
case 'a':
ok = !isASCIIDigit(inChar) && !isASCIIUpper(inChar) && isASCIIPrintable(inChar);
break;
case 'N'