Changeset 58301 in webkit


Ignore:
Timestamp:
Apr 27, 2010 3:54:45 AM (14 years ago)
Author:
yuzo@google.com
Message:

2010-04-27 Yuzo Fujishima <yuzo@google.com>

Unreviewed, fix build breakage by reverting r58299.

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

  • fast/css/parsing-page-rule-expected.txt: Removed.
  • fast/css/parsing-page-rule.html: Removed.

2010-04-27 Yuzo Fujishima <yuzo@google.com>

Unreviewed, fix build breakage by reverting r58299.

  • css/CSSGrammar.y:
  • css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::clearProperties):
  • css/CSSParser.h:
  • css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType):
  • css/CSSSelector.h: (WebCore::CSSSelector::):
  • css/tokenizer.flex:
Location:
trunk
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r58299 r58301  
     12010-04-27  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Unreviewed, fix build breakage by reverting r58299.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=35329
     6
     7        * fast/css/parsing-page-rule-expected.txt: Removed.
     8        * fast/css/parsing-page-rule.html: Removed.
     9
    1102010-04-27  Yuzo Fujishima  <yuzo@google.com>
    211
  • trunk/WebCore/ChangeLog

    r58300 r58301  
     12010-04-27  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Unreviewed, fix build breakage by reverting r58299.
     4
     5        * css/CSSGrammar.y:
     6        * css/CSSParser.cpp:
     7        (WebCore::CSSParser::CSSParser):
     8        (WebCore::CSSParser::clearProperties):
     9        * css/CSSParser.h:
     10        * css/CSSSelector.cpp:
     11        (WebCore::CSSSelector::pseudoId):
     12        (WebCore::nameToPseudoTypeMap):
     13        (WebCore::CSSSelector::extractPseudoType):
     14        * css/CSSSelector.h:
     15        (WebCore::CSSSelector::):
     16        * css/tokenizer.flex:
     17
    1182010-04-27  Yuzo Fujishima  <yuzo@google.com>
    219
  • trunk/WebCore/css/CSSGrammar.y

    r58299 r58301  
    7171    CSSSelector* selector;
    7272    Vector<CSSSelector*>* selectorList;
    73     CSSSelector::MarginBoxType marginBox;
    7473    CSSSelector::Relation relation;
    7574    MediaList* mediaList;
     
    9998%}
    10099
    101 %expect 55
     100%expect 54
    102101
    103102%nonassoc LOWEST_PREC
     
    144143%token VARIABLES_FOR
    145144%token WEBKIT_VARIABLES_DECLS_SYM
    146 %token <marginBox> TOPLEFTCORNER_SYM
    147 %token <marginBox> TOPLEFT_SYM
    148 %token <marginBox> TOPCENTER_SYM
    149 %token <marginBox> TOPRIGHT_SYM
    150 %token <marginBox> TOPRIGHTCORNER_SYM
    151 %token <marginBox> BOTTOMLEFTCORNER_SYM
    152 %token <marginBox> BOTTOMLEFT_SYM
    153 %token <marginBox> BOTTOMCENTER_SYM
    154 %token <marginBox> BOTTOMRIGHT_SYM
    155 %token <marginBox> BOTTOMRIGHTCORNER_SYM
    156 %token <marginBox> LEFTTOP_SYM
    157 %token <marginBox> LEFTMIDDLE_SYM
    158 %token <marginBox> LEFTBOTTOM_SYM
    159 %token <marginBox> RIGHTTOP_SYM
    160 %token <marginBox> RIGHTMIDDLE_SYM
    161 %token <marginBox> RIGHTBOTTOM_SYM
    162 
    163145%token ATKEYWORD
    164146
     
    207189%type <rule> namespace
    208190%type <rule> page
    209 %type <rule> margin_box
    210191%type <rule> font_face
    211192%type <rule> keyframes
     
    229210%type <string> medium
    230211%type <string> hexcolor
    231 %type <marginBox> margin_sym
    232212
    233213%type <string> media_feature
     
    258238%type <selector> attrib
    259239%type <selector> pseudo
    260 %type <selector> page_selector
    261240
    262241%type <boolean> declaration_list
     
    751730    ;
    752731
     732/*
    753733page:
    754     PAGE_SYM maybe_space page_selector maybe_space
    755     '{' maybe_space declarations_and_margins closing_brace {
    756         CSSParser* p = static_cast<CSSParser*>(parser);
    757         $$ = p->createPageRule(p->sinkFloatingSelector($3));
    758     }
    759     | PAGE_SYM error invalid_block {
     734    PAGE_SYM maybe_space IDENT? pseudo_page? maybe_space
     735    '{' maybe_space declaration [ ';' maybe_space declaration ]* '}' maybe_space
     736  ;
     737
     738pseudo_page
     739  : ':' IDENT
     740  ;
     741*/
     742
     743page:
     744    PAGE_SYM error invalid_block {
    760745      $$ = 0;
    761746    }
    762     | PAGE_SYM error ';' {
     747  | PAGE_SYM error ';' {
    763748      $$ = 0;
    764     }
    765     ;
    766 
    767 page_selector:
    768     IDENT {
    769         CSSParser* p = static_cast<CSSParser*>(parser);
    770         $$ = p->createFloatingSelector();
    771         $$->m_tag = QualifiedName(nullAtom, $1, p->m_defaultNamespace);
    772     }
    773     | IDENT pseudo {
    774         CSSParser* p = static_cast<CSSParser*>(parser);
    775         $$ = $2;
    776         if ($$)
    777             $$->m_tag = QualifiedName(nullAtom, $1, p->m_defaultNamespace);
    778     }
    779     | pseudo {
    780         $$ = $1;
    781     }
    782     | /* empty */ {
    783         CSSParser* p = static_cast<CSSParser*>(parser);
    784         $$ = p->createFloatingSelector();
    785     }
    786     ;
    787 
    788 declarations_and_margins:
    789     declaration_list
    790     | declarations_and_margins margin_box maybe_space declaration_list
    791     ;
    792 
    793 margin_box:
    794     margin_sym {
    795         static_cast<CSSParser*>(parser)->startDeclarationsForMarginBox();
    796     } maybe_space '{' maybe_space declaration_list closing_brace {
    797         $$ = static_cast<CSSParser*>(parser)->createMarginAtRule($1);
    798     }
    799     ;
    800 
    801 margin_sym :
    802     TOPLEFTCORNER_SYM {
    803         $$ = CSSSelector::TopLeftCornerMarginBox;
    804     }
    805     | TOPLEFT_SYM {
    806         $$ = CSSSelector::TopLeftMarginBox;
    807     }
    808     | TOPCENTER_SYM {
    809         $$ = CSSSelector::TopCenterMarginBox;
    810     }
    811     | TOPRIGHT_SYM {
    812         $$ = CSSSelector::TopRightMarginBox;
    813     }
    814     | TOPRIGHTCORNER_SYM {
    815         $$ = CSSSelector::TopRightCornerMarginBox;
    816     }
    817     | BOTTOMLEFTCORNER_SYM {
    818         $$ = CSSSelector::BottomLeftCornerMarginBox;
    819     }
    820     | BOTTOMLEFT_SYM {
    821         $$ = CSSSelector::BottomLeftMarginBox;
    822     }
    823     | BOTTOMCENTER_SYM {
    824         $$ = CSSSelector::BottomCenterMarginBox;
    825     }
    826     | BOTTOMRIGHT_SYM {
    827         $$ = CSSSelector::BottomRightMarginBox;
    828     }
    829     | BOTTOMRIGHTCORNER_SYM {
    830         $$ = CSSSelector::BottomRightCornerMarginBox;
    831     }
    832     | LEFTTOP_SYM {
    833         $$ = CSSSelector::LeftTopMarginBox;
    834     }
    835     | LEFTMIDDLE_SYM {
    836         $$ = CSSSelector::LeftMiddleMarginBox;
    837     }
    838     | LEFTBOTTOM_SYM {
    839         $$ = CSSSelector::LeftBottomMarginBox;
    840     }
    841     | RIGHTTOP_SYM {
    842         $$ = CSSSelector::RightTopMarginBox;
    843     }
    844     | RIGHTMIDDLE_SYM {
    845         $$ = CSSSelector::RightMiddleMarginBox;
    846     }
    847     | RIGHTBOTTOM_SYM {
    848         $$ = CSSSelector::RightBottomMarginBox;
    849749    }
    850750    ;
  • trunk/WebCore/css/CSSParser.cpp

    r58299 r58301  
    7070#include "WebKitCSSKeyframesRule.h"
    7171#include "WebKitCSSTransformValue.h"
    72 #include <limits.h>
    7372#include <wtf/dtoa.h>
    7473
     
    9291
    9392namespace WebCore {
    94 
    95 static const unsigned INVALID_NUM_PARSED_PROPERTIES = UINT_MAX;
    9693
    9794static bool equal(const CSSParserString& a, const char* b)
     
    139136    , m_numParsedProperties(0)
    140137    , m_maxParsedProperties(32)
    141     , m_numParsedPropertiesBeforeMarginBox(INVALID_NUM_PARSED_PROPERTIES)
    142138    , m_inParseShorthand(0)
    143139    , m_currentShorthand(0)
     
    401397        delete m_parsedProperties[i];
    402398    m_numParsedProperties = 0;
    403     m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
    404399    m_hasFontFaceOnlyValues = false;
    405400}
     
    51995194#endif
    52005195
    5201 CSSRule* CSSParser::createPageRule(CSSSelector* /* pageSelector */)
    5202 {
    5203     // FIXME: Create page rule here, using:
    5204     //        - pageSelector->pseudoType(): the page pseudo-class, i.e., :left, :right, or :first
    5205     //        - pageSelector->m_tag:  the page name
    5206     //        - m_parsedProperties: the page properties
    5207 
    5208     clearProperties();
    5209     return 0; // until this method is implemented.
    5210 }
    5211 
    5212 CSSRule* CSSParser::createMarginAtRule(CSSSelector::MarginBoxType /* marginBox */)
    5213 {
    5214     // FIXME: Implement margin at-rule here, using:
    5215     //        - marginBox: margin box
    5216     //        - m_parsedProperties: properties at [m_numParsedPropertiesBeforeMarginBox, m_numParsedProperties) are for this at-rule.
    5217 
    5218     endDeclarationsForMarginBox();
    5219     return 0; // until this method is implemented.
    5220 }
    5221 
    5222 void CSSParser::startDeclarationsForMarginBox()
    5223 {
    5224     m_numParsedPropertiesBeforeMarginBox = m_numParsedProperties;
    5225 }
    5226 
    5227 void CSSParser::endDeclarationsForMarginBox()
    5228 {
    5229     ASSERT(m_numParsedPropertiesBeforeMarginBox != INVALID_NUM_PARSED_PROPERTIES);
    5230     rollbackLastProperties(m_numParsedProperties - m_numParsedPropertiesBeforeMarginBox);
    5231     m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
    5232 }
    5233 
    52345196void CSSParser::clearVariables()
    52355197{
  • trunk/WebCore/css/CSSParser.h

    r58299 r58301  
    180180        CSSRule* createFontFaceRule();
    181181        CSSRule* createVariablesRule(MediaList*, bool variablesKeyword);
    182         CSSRule* createPageRule(CSSSelector* pageSelector);
    183         CSSRule* createMarginAtRule(CSSSelector::MarginBoxType marginBox);
    184         void startDeclarationsForMarginBox();
    185         void endDeclarationsForMarginBox();
    186182
    187183        MediaQueryExp* createFloatingMediaQueryExp(const AtomicString&, CSSParserValueList*);
     
    217213        unsigned m_numParsedProperties;
    218214        unsigned m_maxParsedProperties;
    219         unsigned m_numParsedPropertiesBeforeMarginBox;
    220215
    221216        int m_inParseShorthand;
  • trunk/WebCore/css/CSSSelector.cpp

    r58300 r58301  
    204204    case PseudoSingleButton:
    205205    case PseudoNoButton:
    206     case PseudoFirstPage:
    207     case PseudoLeftPage:
    208     case PseudoRightPage:
    209206        return NOPSEUDO;
    210207    case PseudoNotParsed:
     
    309306    DEFINE_STATIC_LOCAL(AtomicString, noButton, ("no-button"));
    310307    DEFINE_STATIC_LOCAL(AtomicString, cornerPresent, ("corner-present"));
    311     // Paged Media pseudo-classes
    312     DEFINE_STATIC_LOCAL(AtomicString, firstPage, ("first"));
    313     DEFINE_STATIC_LOCAL(AtomicString, leftPage, ("left"));
    314     DEFINE_STATIC_LOCAL(AtomicString, rightPage, ("right"));
    315308
    316309    static HashMap<AtomicStringImpl*, CSSSelector::PseudoType>* nameToPseudoType = 0;
     
    407400        nameToPseudoType->set(target.impl(), CSSSelector::PseudoTarget);
    408401        nameToPseudoType->set(visited.impl(), CSSSelector::PseudoVisited);
    409         nameToPseudoType->set(firstPage.impl(), CSSSelector::PseudoFirstPage);
    410         nameToPseudoType->set(leftPage.impl(), CSSSelector::PseudoLeftPage);
    411         nameToPseudoType->set(rightPage.impl(), CSSSelector::PseudoRightPage);
    412402    }
    413403    return nameToPseudoType;
     
    526516    case PseudoNoButton:
    527517    case PseudoNotParsed:
    528     case PseudoFirstPage:
    529     case PseudoLeftPage:
    530     case PseudoRightPage:
    531518        break;
    532519    }
  • trunk/WebCore/css/CSSSelector.h

    r58299 r58301  
    189189            PseudoOuterSpinButton,
    190190            PseudoProgressBarValue,
    191             PseudoLeftPage,
    192             PseudoRightPage,
    193             PseudoFirstPage,
    194         };
    195 
    196         enum MarginBoxType {
    197             TopLeftCornerMarginBox,
    198             TopLeftMarginBox,
    199             TopCenterMarginBox,
    200             TopRightMarginBox,
    201             TopRightCornerMarginBox,
    202             BottomLeftCornerMarginBox,
    203             BottomLeftMarginBox,
    204             BottomCenterMarginBox,
    205             BottomRightMarginBox,
    206             BottomRightCornerMarginBox,
    207             LeftTopMarginBox,
    208             LeftMiddleMarginBox,
    209             LeftBottomMarginBox,
    210             RightTopMarginBox,
    211             RightMiddleMarginBox,
    212             RightBottomMarginBox,
    213191        };
    214192
  • trunk/WebCore/css/tokenizer.flex

    r58299 r58301  
    5454"@import"               {BEGIN(mediaquery); yyTok = IMPORT_SYM; return yyTok;}
    5555"@page"                 {yyTok = PAGE_SYM; return yyTok;}
    56 "@top-left-corner"      {yyTok = TOPLEFTCORNER_SYM; return yyTok;}
    57 "@top-left"             {yyTok = TOPLEFT_SYM; return yyTok;}
    58 "@top-center"           {yyTok = TOPCENTER_SYM; return yyTok;}
    59 "@top-right"            {yyTok = TOPRIGHT_SYM; return yyTok;}
    60 "@top-right-corner"     {yyTok = TOPRIGHTCORNER_SYM; return yyTok;}
    61 "@bottom-left-corner"   {yyTok = BOTTOMLEFTCORNER_SYM; return yyTok;}
    62 "@bottom-left"          {yyTok = BOTTOMLEFT_SYM; return yyTok;}
    63 "@bottom-center"        {yyTok = BOTTOMCENTER_SYM; return yyTok;}
    64 "@bottom-right"         {yyTok = BOTTOMRIGHT_SYM; return yyTok;}
    65 "@bottom-right-corner"  {yyTok = BOTTOMRIGHTCORNER_SYM; return yyTok;}
    66 "@left-top"             {yyTok = LEFTTOP_SYM; return yyTok;}
    67 "@left-middle"          {yyTok = LEFTMIDDLE_SYM; return yyTok;}
    68 "@left-bottom"          {yyTok = LEFTBOTTOM_SYM; return yyTok;}
    69 "@right-top"            {yyTok = RIGHTTOP_SYM; return yyTok;}
    70 "@right-middle"         {yyTok = RIGHTMIDDLE_SYM; return yyTok;}
    71 "@right-bottom"         {yyTok = RIGHTBOTTOM_SYM; return yyTok;}
    7256"@media"                {BEGIN(mediaquery); yyTok = MEDIA_SYM; return yyTok;}
    7357"@font-face"            {yyTok = FONT_FACE_SYM; return yyTok;}
Note: See TracChangeset for help on using the changeset viewer.