Remove ENABLE(WCSS) and associated code
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Sep 2011 22:03:05 +0000 (22:03 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Sep 2011 22:03:05 +0000 (22:03 +0000)
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

30 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/wcss/wap-input-format-expected.txt [deleted file]
LayoutTests/fast/wcss/wap-input-format.xhtml [deleted file]
LayoutTests/fast/wcss/wap-input-required-expected.txt [deleted file]
LayoutTests/fast/wcss/wap-input-required.xhtml [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/CodeGenerators.pri
Source/WebCore/GNUmakefile.am
Source/WebCore/WebCore.pro
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/WCSSPropertyNames.in [deleted file]
Source/WebCore/css/WCSSValueKeywords.in [deleted file]
Source/WebCore/features.pri
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Tools/ChangeLog
Tools/Scripts/build-webkit
Tools/Scripts/old-run-webkit-tests
Tools/Scripts/webkitperl/features.pm
Tools/Scripts/webkitpy/layout_tests/port/webkit.py
Tools/Scripts/webkitpy/layout_tests/port/webkit_unittest.py
configure.ac

index 3586398..1969f95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
index 2607659..141a84b 100644 (file)
@@ -1,3 +1,16 @@
+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.
diff --git a/LayoutTests/fast/wcss/wap-input-format-expected.txt b/LayoutTests/fast/wcss/wap-input-format-expected.txt
deleted file mode 100644 (file)
index bf1b486..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-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"
-        
diff --git a/LayoutTests/fast/wcss/wap-input-format.xhtml b/LayoutTests/fast/wcss/wap-input-format.xhtml
deleted file mode 100644 (file)
index 51ee503..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?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>
diff --git a/LayoutTests/fast/wcss/wap-input-required-expected.txt b/LayoutTests/fast/wcss/wap-input-required-expected.txt
deleted file mode 100644 (file)
index 949e076..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-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
diff --git a/LayoutTests/fast/wcss/wap-input-required.xhtml b/LayoutTests/fast/wcss/wap-input-required.xhtml
deleted file mode 100644 (file)
index d1c210f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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>
index b0dd04b..8d7d1b1 100644 (file)
@@ -1,3 +1,38 @@
+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
index 18c3952..b0d00b5 100644 (file)
@@ -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 \
index 24ee19e..6f21985 100644 (file)
@@ -435,14 +435,6 @@ 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
 # ----
 if ENABLE_FILTERS
index 7e991ce..711b7e0 100644 (file)
@@ -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 \    
index d55b4aa..5435dc6 100644 (file)
@@ -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) {
index 979383f..e9bfa55 100644 (file)
@@ -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>&);
index 59d3956..478b1bd 100644 (file)
@@ -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;
index 8d4d537..182770d 100644 (file)
@@ -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: {
diff --git a/Source/WebCore/css/WCSSPropertyNames.in b/Source/WebCore/css/WCSSPropertyNames.in
deleted file mode 100644 (file)
index 66be83b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
--wap-input-format
--wap-input-required
--wap-marquee-dir
--wap-marquee-loop
--wap-marquee-speed
--wap-marquee-style
diff --git a/Source/WebCore/css/WCSSValueKeywords.in b/Source/WebCore/css/WCSSValueKeywords.in
deleted file mode 100644 (file)
index cbf6fc1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-// place holder for all WCSS specific CSS value keywords
index c7d4a3d..dd679c3 100644 (file)
@@ -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
index 6ea00f0..3a7e6dc 100644 (file)
@@ -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':
-        ok = isASCIIDigit(inChar);
-        break;
-    case 'n':
-        ok = !isASCIIAlpha(inChar) && isASCIIPrintable(inChar);
-        break;
-    case 'X':
-        ok = !isASCIILower(inChar) && isASCIIPrintable(inChar);
-        break;
-    case 'x':
-        ok = !isASCIIUpper(inChar) && isASCIIPrintable(inChar);
-        break;
-    case 'M':
-    case 'm':
-        ok = isASCIIPrintable(inChar);
-        break;
-    default:
-        ok = (mask == inChar);
-        break;
-    }
-
-    return ok;
-}
-
-String HTMLInputElement::validateInputMask(String& inputMask)
-{
-    inputMask.replace("\\\\", "\\");
-
-    bool isValid = true;
-    bool hasWildcard = false;
-    unsigned escapeCharCount = 0;
-    unsigned maskLength = inputMask.length();
-    UChar formatCode;
-    for (unsigned i = 0; i < maskLength; ++i) {
-        formatCode = inputMask[i];
-        if (formatCodes().find(formatCode) == -1) {
-            if (formatCode == '*' || (isASCIIDigit(formatCode) && formatCode != '0')) {
-                // Validate codes which ends with '*f' or 'nf'
-                formatCode = inputMask[++i];
-                if ((i + 1 != maskLength) || formatCodes().find(formatCode) == -1) {
-                    isValid = false;
-                    break;
-                }
-                hasWildcard = true;
-            } else if (formatCode == '\\') {
-                // skip over the next mask character
-                ++i;
-                ++escapeCharCount;
-            } else {
-                isValid = false;
-                break;
-            }
-        }
-    }
-
-    if (!isValid)
-        return String();
-    // calculate the number of characters allowed to be entered by input mask
-    unsigned allowedLength = maskLength;
-    if (escapeCharCount)
-        allowedLength -= escapeCharCount;
-
-    if (hasWildcard) {
-        formatCode = inputMask[maskLength - 2];
-        if (formatCode == '*')
-            allowedLength = m_maxInputCharsAllowed;
-        else {
-            unsigned leftLen = String(&formatCode).toInt();
-            allowedLength = leftLen + allowedLength - 2;
-        }
-    }
-
-    if (allowedLength < m_maxInputCharsAllowed)
-        m_maxInputCharsAllowed = allowedLength;
-
-    return inputMask;
-}
-
-void HTMLInputElement::setWapInputFormat(String& mask)
-{
-    String validateMask = validateInputMask(mask);
-    if (!validateMask.isEmpty())
-        m_inputFormatMask = validateMask;
-}
-
-#endif
-
 #if ENABLE(INPUT_SPEECH)
 
 bool HTMLInputElement::isSpeechEnabled() const
index 9dea0eb..4ffd642 100644 (file)
@@ -218,18 +218,11 @@ public:
     HTMLOptionElement* selectedOption() const;
 #endif
 
-#if ENABLE(WCSS)
-    void setWapInputFormat(String& mask);
-#endif
-
     // These functions are public so they can be used in InputType classes.
     // Otherwise, they would be private.
     CheckedRadioButtons& checkedRadioButtons() const;
     void updateCheckedRadioButtons();
     void setValueInternal(const String&, bool sendChangeEvent);
-#if ENABLE(WCSS)
-    bool isConformToInputMask(const String&) const;
-#endif
 
     void cacheSelectionInResponseToSetValue(int caretOffset) { cacheSelection(caretOffset, caretOffset, SelectionHasNoDirection); }
 
@@ -336,20 +329,12 @@ private:
 #endif
     void parseMaxLengthAttribute(Attribute*);
     void updateValueIfNeeded();
-#if ENABLE(WCSS)
-    bool isConformToInputMask(UChar, unsigned) const;
-    String validateInputMask(String&);
-#endif
 
     AtomicString m_name;
     String m_valueIfDirty;
     String m_suggestedValue;
     int m_size;
     int m_maxLength;
-#if ENABLE(WCSS)
-    String m_inputFormatMask;
-    unsigned m_maxInputCharsAllowed;
-#endif
     short m_maxResults;
     bool m_isChecked : 1;
     bool m_reflectsCheckedAttribute : 1;
index e0222ef..075ac3b 100644 (file)
@@ -301,13 +301,6 @@ static String limitLength(const String& string, int maxLength)
 
 String TextFieldInputType::sanitizeValue(const String& proposedValue)
 {
-#if ENABLE(WCSS)
-    if (!element()->isConformToInputMask(proposedValue)) {
-        if (isConformToInputMask(element()->value()))
-            return element->value();
-        return String();
-    }
-#endif
     return limitLength(proposedValue.removeCharacters(isASCIILineBreak), HTMLInputElement::maximumLength);
 }
 
@@ -334,19 +327,6 @@ void TextFieldInputType::handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*
     unsigned appendableLength = maxLength > baseLength ? maxLength - baseLength : 0;
 
     // Truncate the inserted text to avoid violating the maxLength and other constraints.
-#if ENABLE(WCSS)
-    RefPtr<Range> range = element()->document()->frame()->selection()->selection().toNormalizedRange();
-    String candidateString = toRenderTextControlSingleLine(element()->renderer())->text();
-    if (selectionLength)
-        candidateString.replace(range->startOffset(), range->endOffset(), event->text());
-    else
-        candidateString.insert(event->text(), range->startOffset());
-    if (!element()->isConformToInputMask(candidateString)) {
-        event->setText("");
-        return;
-    }
-#endif
-
     String eventText = event->text();
     eventText.replace("\r\n", " ");
     eventText.replace('\r', ' ');
index 6f59340..a5ac49c 100644 (file)
@@ -156,11 +156,7 @@ int RenderMarquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge
 
 void RenderMarquee::start()
 {
-    if (m_timer.isActive() || m_layer->renderer()->style()->marqueeIncrement().isZero()
-#if ENABLE(WCSS) && ENABLE(XHTMLMP)
-        || (m_layer->renderer()->document()->isXHTMLMPDocument() && !m_layer->renderer()->style()->marqueeLoopCount())
-#endif
-       )
+    if (m_timer.isActive() || m_layer->renderer()->style()->marqueeIncrement().isZero())
         return;
 
     // We may end up propagating a scroll event. It is important that we suspend events until 
index be4fad8..07a77a8 100644 (file)
@@ -159,12 +159,6 @@ RenderObject* RenderObject::createObject(Node* node, RenderStyle* style)
         case TABLE_CELL:
             return new (arena) RenderTableCell(node);
         case TABLE_CAPTION:
-#if ENABLE(WCSS)
-        // As per the section 17.1 of the spec WAP-239-WCSS-20011026-a.pdf, 
-        // the marquee box inherits and extends the characteristics of the 
-        // principal block box ([CSS2] section 9.2.1).
-        case WAP_MARQUEE:
-#endif
             return new (arena) RenderBlock(node);
         case BOX:
         case INLINE_BOX:
index 7986db9..77d9d1c 100644 (file)
@@ -402,9 +402,6 @@ enum EDisplay {
     TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW,
     TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL,
     TABLE_CAPTION, BOX, INLINE_BOX, 
-#if ENABLE(WCSS)
-    WAP_MARQUEE,
-#endif
 #if ENABLE(CSS3_FLEXBOX)
     FLEXBOX, INLINE_FLEXBOX,
 #endif
index 5871d2b..e7afc43 100644 (file)
@@ -1,3 +1,17 @@
+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.
+
+        * 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:
+
 2011-09-24  Alejandro G. Castro  <alex@igalia.com>
 
         Fixed GTK compilation after r95878, the operator== was defined
index af6a70d..50717ec 100755 (executable)
@@ -117,7 +117,6 @@ my (
     $touchEventsSupport,
     $touchIconLoadingSupport,
     $videoSupport,
-    $wcssSupport,
     $webAudioSupport,
     $webInspectorSupport,
     $webSocketsSupport,
@@ -288,9 +287,6 @@ my @features = (
     { option => "video", desc => "Toggle Video support",
       define => "ENABLE_VIDEO", default => (isAppleWebKit() || isGtk()), value => \$videoSupport },
 
-    { option => "wcss", desc => "Toggle WCSS support",
-      define => "ENABLE_WCSS", default => 0, value => \$wcssSupport },
-
     { option => "web-audio", desc => "Toggle Web Audio support",
       define => "ENABLE_WEB_AUDIO", default => 0, value=> \$webAudioSupport },
 
index ed5d852..7f53435 100755 (executable)
@@ -618,10 +618,6 @@ if (!checkWebCoreFeatureSupport("3D Canvas", 0)) {
     $ignoredDirectories{'http/tests/canvas/webgl'} = 1;
 }
 
-if (!checkWebCoreFeatureSupport("WCSS", 0)) {
-    $ignoredDirectories{'fast/wcss'} = 1;
-}
-
 if (!checkWebCoreFeatureSupport("XHTMLMP", 0)) {
     $ignoredDirectories{'fast/xhtmlmp'} = 1;
 }
index fceda38..468dc78 100644 (file)
@@ -71,7 +71,6 @@ sub hasFeature($$)
         "Accelerated Compositing" => "GraphicsLayer",
         "3D Rendering" => "WebCoreHas3DRendering",
         "3D Canvas" => "WebGLShader",
-        "WCSS" => "parseWCSSInputProperty",
         "XHTMLMP" => "isXHTMLMPDocument",
         "MHTML" => "MHTMLArchive"
     );
index bd21acd..0b94d13 100644 (file)
@@ -266,7 +266,6 @@ class WebKitPort(Port):
             "GraphicsLayer": ["compositing"],
             "WebCoreHas3DRendering": ["animations/3d", "transforms/3d"],
             "WebGLShader": ["fast/canvas/webgl", "compositing/webgl", "http/tests/canvas/webgl"],
-            "parseWCSSInputProperty": ["fast/wcss"],
             "isXHTMLMPDocument": ["fast/xhtmlmp"],
             "MHTMLArchive": ["mhtml"],
         }
index b36ca52..9d0ef52 100755 (executable)
@@ -97,7 +97,7 @@ class WebKitPortTest(port_testcase.PortTestCase):
 
     def test_skipped_directories_for_symbols(self):
         supported_symbols = ["GraphicsLayer", "WebCoreHas3DRendering", "isXHTMLMPDocument", "fooSymbol"]
-        expected_directories = set(["mathml", "fast/canvas/webgl", "compositing/webgl", "http/tests/canvas/webgl", "fast/wcss", "mhtml"])
+        expected_directories = set(["mathml", "fast/canvas/webgl", "compositing/webgl", "http/tests/canvas/webgl", "mhtml"])
         result_directories = set(TestWebKitPort(supported_symbols, None)._skipped_tests_for_unsupported_features())
         self.assertEqual(result_directories, expected_directories)
 
index a668c54..6fdb647 100644 (file)
@@ -651,14 +651,6 @@ AC_ARG_ENABLE(svg,
               [],[enable_svg="yes"])
 AC_MSG_RESULT([$enable_svg])
 
-# check whether to enable WCSS support
-AC_MSG_CHECKING([whether to enable WCSS support])
-AC_ARG_ENABLE(wcss,
-              AC_HELP_STRING([--enable-wcss],
-                             [enable support for WCSS [default=no]]),
-              [],[enable_wcss="no"])
-AC_MSG_RESULT([$enable_wcss])
-
 # check whether to enable SharedWorkers support
 AC_MSG_CHECKING([whether to enable SharedWorkers support])
 AC_ARG_ENABLE(shared_workers,
@@ -1171,7 +1163,6 @@ AM_CONDITIONAL([ENABLE_SVG],[test "$enable_svg" = "yes"])
 AM_CONDITIONAL([ENABLE_SVG_FONTS],[test "$enable_svg_fonts" = "yes"])
 AM_CONDITIONAL([ENABLE_COVERAGE],[test "$enable_coverage" = "yes"])
 AM_CONDITIONAL([ENABLE_FAST_MALLOC],[test "$enable_fast_malloc" = "yes"])
-AM_CONDITIONAL([ENABLE_WCSS],[test "$enable_wcss" = "yes"])
 AM_CONDITIONAL([ENABLE_WORKERS],[test "$enable_workers" = "yes"])
 AM_CONDITIONAL([ENABLE_SHARED_WORKERS],[test "$enable_shared_workers" = "yes"])
 AM_CONDITIONAL([SVG_FLAGS],[test "$svg_flags" = "yes"])
@@ -1277,7 +1268,6 @@ Features:
  Speech input support                                     : $enable_input_speech
  SVG support                                              : $enable_svg
  SVG fonts support                                        : $enable_svg_fonts
- WCSS support                                             : $enable_wcss
  Web Audio support                                        : $enable_web_audio
  Web Sockets support                                      : $enable_web_sockets
  Web Timing support                                       : $enable_web_timing