[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

dbates at webkit.org dbates at webkit.org
Thu Apr 8 00:47:27 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 267a5c8818625cdb51c4cee1e7bfe8f04581d657
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 23 07:28:54 2009 +0000

    2009-12-22  Daniel Bates  <dbates at webkit.org>
    
            Reviewed by Eric Seidel.
    
            https://bugs.webkit.org/show_bug.cgi?id=32799
    
            Renames enums in RenderStyleConstants::EListStyleType to conform to
            the WebKit Code Style Guidelines.
    
            No functionality was changed. So, no new tests.
    
            * css/CSSPrimitiveValueMappings.h:
            (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
            (WebCore::CSSPrimitiveValue::operator EListStyleType):
            * rendering/RenderListItem.cpp:
            (WebCore::RenderListItem::styleDidChange):
            * rendering/RenderListMarker.cpp:
            (WebCore::listMarkerText):
            (WebCore::RenderListMarker::paint):
            (WebCore::RenderListMarker::calcPrefWidths):
            (WebCore::RenderListMarker::updateMargins):
            (WebCore::RenderListMarker::getRelativeMarkerRect):
            * rendering/style/RenderStyle.h:
            (WebCore::InheritedFlags::initialListStyleType):
            * rendering/style/RenderStyleConstants.h:
            (WebCore::):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ea94c18..5e08d7f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2009-12-22  Daniel Bates  <dbates at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        https://bugs.webkit.org/show_bug.cgi?id=32799
+
+        Renames enums in RenderStyleConstants::EListStyleType to conform to
+        the WebKit Code Style Guidelines.
+
+        No functionality was changed. So, no new tests.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator EListStyleType):
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::styleDidChange):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::listMarkerText):
+        (WebCore::RenderListMarker::paint):
+        (WebCore::RenderListMarker::calcPrefWidths):
+        (WebCore::RenderListMarker::updateMargins):
+        (WebCore::RenderListMarker::getRelativeMarkerRect):
+        * rendering/style/RenderStyle.h:
+        (WebCore::InheritedFlags::initialListStyleType):
+        * rendering/style/RenderStyleConstants.h:
+        (WebCore::):
+
 2009-12-22  James Su  <suzhe at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index b9cc06f..79f323e 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -936,67 +936,67 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
     : m_type(CSS_IDENT)
 {
     switch (e) {
-        case LNONE:
+        case NoneListStyle:
             m_value.ident = CSSValueNone;
             break;
-        case DISC:
+        case Disc:
             m_value.ident = CSSValueDisc;
             break;
-        case CIRCLE:
+        case Circle:
             m_value.ident = CSSValueCircle;
             break;
-        case SQUARE:
+        case Square:
             m_value.ident = CSSValueSquare;
             break;
-        case LDECIMAL:
+        case DecimalListStyle:
             m_value.ident = CSSValueDecimal;
             break;
-        case DECIMAL_LEADING_ZERO:
+        case DecimalLeadingZero:
             m_value.ident = CSSValueDecimalLeadingZero;
             break;
-        case LOWER_ROMAN:
+        case LowerRoman:
             m_value.ident = CSSValueLowerRoman;
             break;
-        case UPPER_ROMAN:
+        case UpperRoman:
             m_value.ident = CSSValueUpperRoman;
             break;
-        case LOWER_GREEK:
+        case LowerGreek:
             m_value.ident = CSSValueLowerGreek;
             break;
-        case LOWER_ALPHA:
+        case LowerAlpha:
             m_value.ident = CSSValueLowerAlpha;
             break;
-        case LOWER_LATIN:
+        case LowerLatin:
             m_value.ident = CSSValueLowerLatin;
             break;
-        case UPPER_ALPHA:
+        case UpperAlpha:
             m_value.ident = CSSValueUpperAlpha;
             break;
-        case UPPER_LATIN:
+        case UpperLatin:
             m_value.ident = CSSValueUpperLatin;
             break;
-        case HEBREW:
+        case Hebrew:
             m_value.ident = CSSValueHebrew;
             break;
-        case ARMENIAN:
+        case Armenian:
             m_value.ident = CSSValueArmenian;
             break;
-        case GEORGIAN:
+        case Georgian:
             m_value.ident = CSSValueGeorgian;
             break;
-        case CJK_IDEOGRAPHIC:
+        case CJKIdeographic:
             m_value.ident = CSSValueCjkIdeographic;
             break;
-        case HIRAGANA:
+        case Hiragana:
             m_value.ident = CSSValueHiragana;
             break;
-        case KATAKANA:
+        case Katakana:
             m_value.ident = CSSValueKatakana;
             break;
-        case HIRAGANA_IROHA:
+        case HiraganaIroha:
             m_value.ident = CSSValueHiraganaIroha;
             break;
-        case KATAKANA_IROHA:
+        case KatakanaIroha:
             m_value.ident = CSSValueKatakanaIroha;
             break;
     }
@@ -1006,7 +1006,7 @@ template<> inline CSSPrimitiveValue::operator EListStyleType() const
 {
     switch (m_value.ident) {
         case CSSValueNone:
-            return LNONE;
+            return NoneListStyle;
         default:
             return static_cast<EListStyleType>(m_value.ident - CSSValueDisc);
     }
diff --git a/WebCore/rendering/RenderListItem.cpp b/WebCore/rendering/RenderListItem.cpp
index 539b8c7..5a4f307 100644
--- a/WebCore/rendering/RenderListItem.cpp
+++ b/WebCore/rendering/RenderListItem.cpp
@@ -51,8 +51,8 @@ void RenderListItem::styleDidChange(StyleDifference diff, const RenderStyle* old
 {
     RenderBlock::styleDidChange(diff, oldStyle);
 
-    if (style()->listStyleType() != LNONE ||
-        (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) {
+    if (style()->listStyleType() != NoneListStyle
+        || (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) {
         RefPtr<RenderStyle> newStyle = RenderStyle::create();
         // The marker always inherits from the list item, regardless of where it might end
         // up (e.g., in some deeply nested line box). See CSS3 spec.
diff --git a/WebCore/rendering/RenderListMarker.cpp b/WebCore/rendering/RenderListMarker.cpp
index eab4404..ec99ec2 100644
--- a/WebCore/rendering/RenderListMarker.cpp
+++ b/WebCore/rendering/RenderListMarker.cpp
@@ -340,46 +340,46 @@ static String toCJKIdeographic(int number, const UChar table[16])
 String listMarkerText(EListStyleType type, int value)
 {
     switch (type) {
-        case LNONE:
+        case NoneListStyle:
             return "";
 
         // We use the same characters for text security.
         // See RenderText::setInternalString.
-        case CIRCLE:
+        case Circle:
             return String(&whiteBullet, 1);
-        case DISC:
+        case Disc:
             return String(&bullet, 1);
-        case SQUARE:
+        case Square:
             // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE
             // instead, but I think this looks better.
             return String(&blackSquare, 1);
 
-        case LDECIMAL:
+        case DecimalListStyle:
             return String::number(value);
-        case DECIMAL_LEADING_ZERO:
+        case DecimalLeadingZero:
             if (value < -9 || value > 9)
                 return String::number(value);
             if (value < 0)
                 return "-0" + String::number(-value); // -01 to -09
             return "0" + String::number(value); // 00 to 09
 
-        case LOWER_ALPHA:
-        case LOWER_LATIN: {
+        case LowerAlpha:
+        case LowerLatin: {
             static const UChar lowerLatinAlphabet[26] = {
                 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
                 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
             };
             return toAlphabetic(value, lowerLatinAlphabet, 26);
         }
-        case UPPER_ALPHA:
-        case UPPER_LATIN: {
+        case UpperAlpha:
+        case UpperLatin: {
             static const UChar upperLatinAlphabet[26] = {
                 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
                 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
             };
             return toAlphabetic(value, upperLatinAlphabet, 26);
         }
-        case LOWER_GREEK: {
+        case LowerGreek: {
             static const UChar lowerGreekAlphabet[24] = {
                 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8,
                 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0,
@@ -388,7 +388,7 @@ String listMarkerText(EListStyleType type, int value)
             return toAlphabetic(value, lowerGreekAlphabet, 24);
         }
 
-        case HIRAGANA: {
+        case Hiragana: {
             // FIXME: This table comes from the CSS3 draft, and is probably
             // incorrect, given the comments in that draft.
             static const UChar hiraganaAlphabet[48] = {
@@ -401,7 +401,7 @@ String listMarkerText(EListStyleType type, int value)
             };
             return toAlphabetic(value, hiraganaAlphabet, 48);
         }
-        case HIRAGANA_IROHA: {
+        case HiraganaIroha: {
             // FIXME: This table comes from the CSS3 draft, and is probably
             // incorrect, given the comments in that draft.
             static const UChar hiraganaIrohaAlphabet[47] = {
@@ -414,7 +414,7 @@ String listMarkerText(EListStyleType type, int value)
             };
             return toAlphabetic(value, hiraganaIrohaAlphabet, 47);
         }
-        case KATAKANA: {
+        case Katakana: {
             // FIXME: This table comes from the CSS3 draft, and is probably
             // incorrect, given the comments in that draft.
             static const UChar katakanaAlphabet[48] = {
@@ -427,7 +427,7 @@ String listMarkerText(EListStyleType type, int value)
             };
             return toAlphabetic(value, katakanaAlphabet, 48);
         }
-        case KATAKANA_IROHA: {
+        case KatakanaIroha: {
             // FIXME: This table comes from the CSS3 draft, and is probably
             // incorrect, given the comments in that draft.
             static const UChar katakanaIrohaAlphabet[47] = {
@@ -441,7 +441,7 @@ String listMarkerText(EListStyleType type, int value)
             return toAlphabetic(value, katakanaIrohaAlphabet, 47);
         }
 
-        case CJK_IDEOGRAPHIC: {
+        case CJKIdeographic: {
             static const UChar traditionalChineseInformalTable[16] = {
                 0x842C, 0x5104, 0x5146,
                 0x5341, 0x767E, 0x5343,
@@ -451,19 +451,19 @@ String listMarkerText(EListStyleType type, int value)
             return toCJKIdeographic(value, traditionalChineseInformalTable);
         }
 
-        case LOWER_ROMAN:
+        case LowerRoman:
             return toRoman(value, false);
-        case UPPER_ROMAN:
+        case UpperRoman:
             return toRoman(value, true);
 
-        case ARMENIAN:
+        case Armenian:
             // CSS3 says "armenian" means "lower-armenian".
             // But the CSS2.1 test suite contains uppercase test results for "armenian",
             // so we'll match the test suite.
             return toArmenian(value, true);
-        case GEORGIAN:
+        case Georgian:
             return toGeorgian(value);
-        case HEBREW:
+        case Hebrew:
             return toHebrew(value);
     }
 
@@ -571,35 +571,35 @@ void RenderListMarker::paint(PaintInfo& paintInfo, int tx, int ty)
     context->setFillColor(color, style()->colorSpace());
 
     switch (style()->listStyleType()) {
-        case DISC:
+        case Disc:
             context->drawEllipse(marker);
             return;
-        case CIRCLE:
+        case Circle:
             context->setFillColor(Color::transparent, DeviceColorSpace);
             context->drawEllipse(marker);
             return;
-        case SQUARE:
+        case Square:
             context->drawRect(marker);
             return;
-        case LNONE:
+        case NoneListStyle:
             return;
-        case ARMENIAN:
-        case CJK_IDEOGRAPHIC:
-        case DECIMAL_LEADING_ZERO:
-        case GEORGIAN:
-        case HEBREW:
-        case HIRAGANA:
-        case HIRAGANA_IROHA:
-        case KATAKANA:
-        case KATAKANA_IROHA:
-        case LDECIMAL:
-        case LOWER_ALPHA:
-        case LOWER_GREEK:
-        case LOWER_LATIN:
-        case LOWER_ROMAN:
-        case UPPER_ALPHA:
-        case UPPER_LATIN:
-        case UPPER_ROMAN:
+        case Armenian:
+        case CJKIdeographic:
+        case DecimalLeadingZero:
+        case Georgian:
+        case Hebrew:
+        case Hiragana:
+        case HiraganaIroha:
+        case Katakana:
+        case KatakanaIroha:
+        case DecimalListStyle:
+        case LowerAlpha:
+        case LowerGreek:
+        case LowerLatin:
+        case LowerRoman:
+        case UpperAlpha:
+        case UpperLatin:
+        case UpperRoman:
             break;
     }
     if (m_text.isEmpty())
@@ -693,31 +693,31 @@ void RenderListMarker::calcPrefWidths()
     int width = 0;
     EListStyleType type = style()->listStyleType();
     switch (type) {
-        case LNONE:
+        case NoneListStyle:
             break;
-        case CIRCLE:
-        case DISC:
-        case SQUARE:
+        case Circle:
+        case Disc:
+        case Square:
             m_text = listMarkerText(type, 0); // value is ignored for these types
             width = (font.ascent() * 2 / 3 + 1) / 2 + 2;
             break;
-        case ARMENIAN:
-        case CJK_IDEOGRAPHIC:
-        case DECIMAL_LEADING_ZERO:
-        case GEORGIAN:
-        case HEBREW:
-        case HIRAGANA:
-        case HIRAGANA_IROHA:
-        case KATAKANA:
-        case KATAKANA_IROHA:
-        case LDECIMAL:
-        case LOWER_ALPHA:
-        case LOWER_GREEK:
-        case LOWER_LATIN:
-        case LOWER_ROMAN:
-        case UPPER_ALPHA:
-        case UPPER_LATIN:
-        case UPPER_ROMAN:
+        case Armenian:
+        case CJKIdeographic:
+        case DecimalLeadingZero:
+        case Georgian:
+        case Hebrew:
+        case Hiragana:
+        case HiraganaIroha:
+        case Katakana:
+        case KatakanaIroha:
+        case DecimalListStyle:
+        case LowerAlpha:
+        case LowerGreek:
+        case LowerLatin:
+        case LowerRoman:
+        case UpperAlpha:
+        case UpperLatin:
+        case UpperRoman:
             m_text = listMarkerText(type, m_listItem->value());
             if (m_text.isEmpty())
                 width = 0;
@@ -752,9 +752,9 @@ void RenderListMarker::updateMargins()
             else
                 marginLeft = cMarkerPadding;
         } else switch (style()->listStyleType()) {
-            case DISC:
-            case CIRCLE:
-            case SQUARE:
+            case Disc:
+            case Circle:
+            case Square:
                 if (style()->direction() == LTR) {
                     marginLeft = -1;
                     marginRight = font.ascent() - minPrefWidth() + 1;
@@ -773,12 +773,12 @@ void RenderListMarker::updateMargins()
             else {
                 int offset = font.ascent() * 2 / 3;
                 switch (style()->listStyleType()) {
-                    case DISC:
-                    case CIRCLE:
-                    case SQUARE:
+                    case Disc:
+                    case Circle:
+                    case Square:
                         marginLeft = -offset - cMarkerPadding - 1;
                         break;
-                    case LNONE:
+                    case NoneListStyle:
                         break;
                     default:
                         marginLeft = m_text.isEmpty() ? 0 : -minPrefWidth() - offset / 2;
@@ -790,12 +790,12 @@ void RenderListMarker::updateMargins()
             else {
                 int offset = font.ascent() * 2 / 3;
                 switch (style()->listStyleType()) {
-                    case DISC:
-                    case CIRCLE:
-                    case SQUARE:
+                    case Disc:
+                    case Circle:
+                    case Square:
                         marginLeft = offset + cMarkerPadding + 1 - minPrefWidth();
                         break;
-                    case LNONE:
+                    case NoneListStyle:
                         break;
                     default:
                         marginLeft = m_text.isEmpty() ? 0 : offset / 2;
@@ -836,34 +836,34 @@ IntRect RenderListMarker::getRelativeMarkerRect()
         return IntRect(x(), y(), m_image->imageSize(this, style()->effectiveZoom()).width(), m_image->imageSize(this, style()->effectiveZoom()).height());
 
     switch (style()->listStyleType()) {
-        case DISC:
-        case CIRCLE:
-        case SQUARE: {
+        case Disc:
+        case Circle:
+        case Square: {
             // FIXME: Are these particular rounding rules necessary?
             const Font& font = style()->font();
             int ascent = font.ascent();
             int bulletWidth = (ascent * 2 / 3 + 1) / 2;
             return IntRect(x() + 1, y() + 3 * (ascent - ascent * 2 / 3) / 2, bulletWidth, bulletWidth);
         }
-        case LNONE:
+        case NoneListStyle:
             return IntRect();
-        case ARMENIAN:
-        case CJK_IDEOGRAPHIC:
-        case DECIMAL_LEADING_ZERO:
-        case GEORGIAN:
-        case HEBREW:
-        case HIRAGANA:
-        case HIRAGANA_IROHA:
-        case KATAKANA:
-        case KATAKANA_IROHA:
-        case LDECIMAL:
-        case LOWER_ALPHA:
-        case LOWER_GREEK:
-        case LOWER_LATIN:
-        case LOWER_ROMAN:
-        case UPPER_ALPHA:
-        case UPPER_LATIN:
-        case UPPER_ROMAN:
+        case Armenian:
+        case CJKIdeographic:
+        case DecimalLeadingZero:
+        case Georgian:
+        case Hebrew:
+        case Hiragana:
+        case HiraganaIroha:
+        case Katakana:
+        case KatakanaIroha:
+        case DecimalListStyle:
+        case LowerAlpha:
+        case LowerGreek:
+        case LowerLatin:
+        case LowerRoman:
+        case UpperAlpha:
+        case UpperLatin:
+        case UpperRoman:
             if (m_text.isEmpty())
                 return IntRect();
             const Font& font = style()->font();
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 40cf1cd..da434ea 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -1106,7 +1106,7 @@ public:
     static EEmptyCell initialEmptyCells() { return SHOW; }
     static EFloat initialFloating() { return FNONE; }
     static EListStylePosition initialListStylePosition() { return OUTSIDE; }
-    static EListStyleType initialListStyleType() { return DISC; }
+    static EListStyleType initialListStyleType() { return Disc; }
     static EOverflow initialOverflowX() { return OVISIBLE; }
     static EOverflow initialOverflowY() { return OVISIBLE; }
     static EPageBreak initialPageBreak() { return PBAUTO; }
diff --git a/WebCore/rendering/style/RenderStyleConstants.h b/WebCore/rendering/style/RenderStyleConstants.h
index 7b632f7..585f9a8 100644
--- a/WebCore/rendering/style/RenderStyleConstants.h
+++ b/WebCore/rendering/style/RenderStyleConstants.h
@@ -204,11 +204,11 @@ enum EResize {
 };
 
 enum EListStyleType {
-     DISC, CIRCLE, SQUARE, LDECIMAL, DECIMAL_LEADING_ZERO,
-     LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK,
-     LOWER_ALPHA, LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN,
-     HEBREW, ARMENIAN, GEORGIAN, CJK_IDEOGRAPHIC,
-     HIRAGANA, KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA, LNONE
+     Disc, Circle, Square, DecimalListStyle, DecimalLeadingZero,
+     LowerRoman, UpperRoman, LowerGreek,
+     LowerAlpha, LowerLatin, UpperAlpha, UpperLatin,
+     Hebrew, Armenian, Georgian, CJKIdeographic,
+     Hiragana, Katakana, HiraganaIroha, KatakanaIroha, NoneListStyle
 };
 
 enum StyleContentType {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list