nodeName().string();
applyRule( prop->m_id, prop->value() );
}
if ( fontDirty ) {
#ifdef APPLE_CHANGES
checkForGenericFamilyChange(style, parentStyle);
#endif
CSSStyleSelector::style->htmlFont().update( logicalDpiY );
}
}
// Clean up our style object's display and text decorations (among other fixups).
adjustRenderStyle(style, e);
if ( numPseudoProps ) {
fontDirty = false;
//qDebug("%d applying %d pseudo props", e->cssTagId(), pseudoProps->count() );
for (unsigned int i = 0; i < numPseudoProps; ++i) {
if ( fontDirty && pseudoProps[i]->priority >= (1 << 30) ) {
// we are past the font properties, time to update to the
// correct font
//We have to do this for all pseudo styles
RenderStyle *pseudoStyle = style->pseudoStyle;
while ( pseudoStyle ) {
pseudoStyle->htmlFont().update( logicalDpiY );
pseudoStyle = pseudoStyle->pseudoStyle;
}
fontDirty = false;
}
RenderStyle *pseudoStyle;
pseudoStyle = style->getPseudoStyle(pseudoProps[i]->pseudoId);
if (!pseudoStyle)
{
pseudoStyle = style->addPseudoStyle(pseudoProps[i]->pseudoId);
if (pseudoStyle)
pseudoStyle->inheritFrom( style );
}
RenderStyle* oldStyle = style;
RenderStyle* oldParentStyle = parentStyle;
parentStyle = style;
style = pseudoStyle;
if ( pseudoStyle ) {
DOM::CSSProperty *prop = pseudoProps[i]->prop;
applyRule( prop->m_id, prop->value() );
}
style = oldStyle;
parentStyle = oldParentStyle;
}
if ( fontDirty ) {
RenderStyle *pseudoStyle = style->pseudoStyle;
while ( pseudoStyle ) {
pseudoStyle->htmlFont().update( logicalDpiY );
pseudoStyle = pseudoStyle->pseudoStyle;
}
}
}
}
// Now adjust all our pseudo-styles.
RenderStyle *pseudoStyle = style->pseudoStyle;
while (pseudoStyle) {
adjustRenderStyle(pseudoStyle, 0);
pseudoStyle = pseudoStyle->pseudoStyle;
}
// Now return the style.
return style;
}
void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, DOM::ElementImpl *e)
{
// Cache our original display.
style->setOriginalDisplay(style->display());
if (style->display() != NONE) {
// If we have a that specifies a float property, in quirks mode we just drop the float
// property.
// Sites also commonly use display:inline/block on | s and s. In quirks mode we force
// these tags to retain their display types.
if (!strictParsing && e) {
if (e->id() == ID_TD) {
style->setDisplay(TABLE_CELL);
style->setFloating(FNONE);
}
else if (e->id() == ID_TABLE)
style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE);
}
// Table headers with a text-align of auto will change the text-align to center.
if (e && e->id() == ID_TH && style->textAlign() == TAAUTO)
style->setTextAlign(CENTER);
// Mutate the display to BLOCK or TABLE for certain cases, e.g., if someone attempts to
// position or float an inline, compact, or run-in. Cache the original display, since it
// may be needed for positioned elements that have to compute their static normal flow
// positions. We also force inline-level roots to be block-level.
if (style->display() != BLOCK && style->display() != TABLE /*&& style->display() != BOX*/ &&
(style->position() == ABSOLUTE || style->position() == FIXED || style->floating() != FNONE ||
(e && e->getDocument()->documentElement() == e))) {
if (style->display() == INLINE_TABLE)
style->setDisplay(TABLE);
// else if (style->display() == INLINE_BOX)
// style->setDisplay(BOX);
else if (style->display() == LIST_ITEM) {
// It is a WinIE bug that floated list items lose their bullets, so we'll emulate the quirk,
// but only in quirks mode.
if (!strictParsing && style->floating() != FNONE)
style->setDisplay(BLOCK);
}
else
style->setDisplay(BLOCK);
}
// After performing the display mutation, check our position. We do not honor position:relative on
// table rows and some other table displays. This is undefined behaviour in CSS2.1 (cf. 9.3.1)
if (style->position() == RELATIVE) {
switch (style->display()) {
case TABLE_ROW_GROUP:
case TABLE_HEADER_GROUP:
case TABLE_FOOTER_GROUP:
case TABLE_ROW:
style->setPosition(STATIC);
default:
break;
}
}
}
// Frames and framesets never honor position:relative or position:absolute. This is necessary to
// fix a crash where a site tries to position these objects.
if ( e ) {
// ignore display: none for
if ( e->id() == ID_FRAME ) {
style->setPosition( STATIC );
style->setDisplay( BLOCK );
}
else if ( e->id() == ID_FRAMESET ) {
style->setPosition( STATIC );
}
}
// Finally update our text decorations in effect, but don't allow text-decoration to percolate through
// tables, inline blocks, inline tables, or run-ins.
if (style->display() == TABLE || style->display() == INLINE_TABLE || style->display() == RUN_IN
|| style->display() == INLINE_BLOCK /*|| style->display() == INLINE_BOX*/)
style->setTextDecorationsInEffect(style->textDecoration());
else
style->addToTextDecorationsInEffect(style->textDecoration());
// If either overflow value is not visible, change to auto.
if (style->overflowX() == OMARQUEE && style->overflowY() != OMARQUEE)
style->setOverflowY(OMARQUEE);
else if (style->overflowY() == OMARQUEE && style->overflowX() != OMARQUEE)
style->setOverflowX(OMARQUEE);
else if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE)
style->setOverflowX(OAUTO);
else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
style->setOverflowY(OAUTO);
// Table rows, sections and the table itself will support overflow:hidden and will ignore scroll/auto.
// FIXME: Eventually table sections will support auto and scroll.
if (style->display() == TABLE || style->display() == INLINE_TABLE ||
style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW) {
if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN)
style->setOverflowX(OVISIBLE);
if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN)
style->setOverflowY(OVISIBLE);
}
// Cull out any useless layers and also repeat patterns into additional layers.
style->adjustBackgroundLayers();
// Only use slow repaints if we actually have a background image.
// FIXME: We only need to invalidate the fixed regions when scrolling. It's total overkill to
// prevent the entire view from blitting on a scroll.
if (style->hasFixedBackgroundImage() && view)
view->setHasStaticBackground();
}
unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e,
unsigned int numProps)
{
CSSStyleDeclarationImpl* inlineDecls = e->inlineStyleDecls();
CSSStyleDeclarationImpl* nonCSSDecls = e->nonCSSStyleDecls();
if (!inlineDecls && !nonCSSDecls)
return numProps;
QList* values = inlineDecls ? inlineDecls->values() : 0;
QList* nonCSSValues = nonCSSDecls ? nonCSSDecls->values() : 0;
if (!values && !nonCSSValues)
return numProps;
int firstLen = values ? values->count() : 0;
int secondLen = nonCSSValues ? nonCSSValues->count() : 0;
uint totalLen = firstLen + secondLen;
if ((unsigned)inlineProps.size() < totalLen)
{
inlineProps.resize(totalLen + 1);
}
if (numProps + totalLen >= propsToApplySize ) {
propsToApplySize += propsToApplySize;
propsToApply = (CSSOrderedProperty **)realloc( propsToApply, propsToApplySize*sizeof( CSSOrderedProperty * ) );
}
bool inNonCSSDecls = false;
CSSOrderedProperty *array = (CSSOrderedProperty *)inlineProps.data();
for(int i = 0; i < (int)totalLen; i++)
{
if (i == firstLen) {
values = nonCSSValues;
inNonCSSDecls = true;
}
CSSProperty *prop = values->at(i >= firstLen ? i - firstLen : i);
Source source = Inline;
if( prop->m_important ) source = InlineImportant;
if( inNonCSSDecls ) source = NonCSSHint;
bool first;
// give special priority to font-xxx, color properties
switch(prop->m_id)
{
case CSS_PROP_FONT_STYLE:
case CSS_PROP_FONT_SIZE:
case CSS_PROP_FONT_WEIGHT:
case CSS_PROP_FONT_FAMILY:
case CSS_PROP_FONT_VARIANT:
case CSS_PROP_FONT:
case CSS_PROP_COLOR:
case CSS_PROP_DIRECTION:
case CSS_PROP_DISPLAY:
// these have to be applied first, because other properties use the computed
// values of these properties.
first = true;
break;
default:
first = false;
break;
}
array->prop = prop;
array->pseudoId = RenderStyle::NOPSEUDO;
array->selector = 0;
array->position = i;
array->priority = (!first << 30) | (source << 24);
propsToApply[numProps++] = array++;
}
return numProps;
}
// modified version of the one in kurl.cpp
static void cleanpath(QString &path)
{
int pos;
while ( (pos = path.indexOf( "/../" )) != -1 ) {
int prev = 0;
if ( pos > 0 )
prev = path.lastIndexOf( "/", pos -1 );
// don't remove the host, i.e. http://foo.org/../foo.html
if (prev < 0 || (prev > 3 && path.lastIndexOf("://", prev-1) == prev-2))
path.remove( pos, 3);
else
// matching directory found ?
path.remove( prev, pos- prev + 3 );
}
pos = 0;
// Don't remove "//" from an anchor identifier. -rjw
// Set refPos to -2 to mean "I haven't looked for the anchor yet".
// We don't want to waste a function call on the search for the anchor
// in the vast majority of cases where there is no "//" in the path.
int refPos = -2;
while ( (pos = path.indexOf( "//", pos )) != -1) {
if (refPos == -2)
refPos = path.indexOf("#", 0);
if (refPos > 0 && pos >= refPos)
break;
if ( pos == 0 || path[pos-1] != ':' )
path.remove( pos, 1 );
else
pos += 2;
}
while ( (pos = path.indexOf( "/./" )) != -1)
path.remove( pos, 2 );
//kDebug() << "checkPseudoState " << path;
}
static PseudoState checkPseudoState( const CSSStyleSelector::Encodedurl& encodedurl, DOM::ElementImpl *e )
{
if( e->id() != ID_A ) {
return PseudoNone;
}
DOMString attr = e->getAttribute(ATTR_HREF);
if( attr.isNull() ) {
return PseudoNone;
}
QString u = QString::fromRawData(attr.unicode(), attr.length());
if ( !u.contains("://") ) {
if ( u[0] == '/' )
u = encodedurl.host + u;
else if ( u[0] == '#' )
u = encodedurl.file + u;
else
u = encodedurl.path + u;
cleanpath( u );
}
//completeURL( attr.string() );
bool contains = KHTMLGlobal::vLinks()->contains( u );
if ( !contains && u.count('/')==2 )
contains = KHTMLGlobal::vLinks()->contains( u+'/' );
return contains ? PseudoVisited : PseudoLink;
}
// a helper function for parsing nth-arguments
static bool matchNth(int count, const QString& nth)
{
if (nth.isEmpty()) return false;
int a = 0;
int b = 0;
if (nth == "odd") {
a = 2;
b = 1;
}
else if (nth == "even") {
a = 2;
b = 0;
}
else {
int n = nth.indexOf('n');
if (n != -1) {
if (nth[0] == '-')
if (n==1)
a = -1;
else
a = nth.mid(1,n-1).toInt();
else
if (n==0)
a = 1;
else
a = nth.left(n).toInt();
int p = nth.indexOf('+');
if (p != -1)
b = nth.mid(p+1).toInt();
else {
p = nth.indexOf('-');
b = -nth.mid(p+1).toInt();
}
}
else {
b = nth.toInt();
}
}
if (a == 0)
return count == b;
else if (a > 0)
if (count < b)
return false;
else
return (count - b) % a == 0;
else if (a < 0) {
if (count > b)
return false;
else
return (b - count) % (-a) == 0;
}
return false;
}
// Recursively work the combinator to compute static attribute dependency, similar to
//structure of checkSubSelectors
static void precomputeAttributeDependenciesAux(DOM::DocumentImpl* doc, DOM::CSSSelector* sel, bool isAncestor, bool isSubject)
{
if(sel->attr)
{
// Sets up global dependencies of attributes
if (isSubject)
doc->dynamicDomRestyler().addDependency(sel->attr, PersonalDependency);
else if (isAncestor)
doc->dynamicDomRestyler().addDependency(sel->attr, AncestorDependency);
else
doc->dynamicDomRestyler().addDependency(sel->attr, PredecessorDependency);
}
if(sel->match == CSSSelector::PseudoClass)
{
switch (sel->pseudoType()) {
case CSSSelector::PseudoNot:
precomputeAttributeDependenciesAux(doc, sel->simpleSelector, isAncestor, true);
break;
default:
break;
}
}
CSSSelector::Relation relation = KDE_CAST_BF_ENUM(CSSSelector::Relation, sel->relation);
sel = sel->tagHistory;
if (!sel) return;
switch(relation)
{
case CSSSelector::Descendant:
case CSSSelector::Child:
precomputeAttributeDependenciesAux(doc, sel, true, false);
break;
case CSSSelector::IndirectAdjacent:
case CSSSelector::DirectAdjacent:
precomputeAttributeDependenciesAux(doc, sel, false, false);
break;
case CSSSelector::SubSelector:
precomputeAttributeDependenciesAux(doc, sel, isAncestor, isSubject);
break;
}
}
void CSSStyleSelector::precomputeAttributeDependencies(DOM::DocumentImpl* doc, DOM::CSSSelector* sel)
{
precomputeAttributeDependenciesAux(doc, sel, false, true);
}
// Recursive check of selectors and combinators
// It can return 3 different values:
// * SelectorMatches - the selector is match for the node e
// * SelectorFailsLocal - the selector fails for the node e
// * SelectorFails - the selector fails for e and any sibling or ancestor of e
CSSStyleSelector::SelectorMatch CSSStyleSelector::checkSelector(DOM::CSSSelector *sel, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector)
{
// The simple selector has to match
if(!checkSimpleSelector(sel, e, isAncestor, isSubSelector)) return SelectorFailsLocal;
// The rest of the selectors has to match
CSSSelector::Relation relation = KDE_CAST_BF_ENUM(CSSSelector::Relation, sel->relation);
// Prepare next sel
sel = sel->tagHistory;
if (!sel) return SelectorMatches;
switch(relation) {
case CSSSelector::Descendant:
{
while(true)
{
DOM::NodeImpl* n = e->parentNode();
if(!n || !n->isElementNode()) return SelectorFails;
e = static_cast(n);
SelectorMatch match = checkSelector(sel, e, true);
if (match != SelectorFailsLocal)
return match;
}
break;
}
case CSSSelector::Child:
{
DOM::NodeImpl* n = e->parentNode();
if (!strictParsing)
while (n && n->implicitNode()) n = n->parentNode();
if(!n || !n->isElementNode()) return SelectorFails;
e = static_cast(n);
return checkSelector(sel, e, true);
}
case CSSSelector::IndirectAdjacent:
{
// Sibling selectors always generate structural dependencies
// because newly inserted element might fullfill them.
if (e->parentNode()->isElementNode())
addDependency(StructuralDependency, static_cast(e->parentNode()));
while(true)
{
DOM::NodeImpl* n = e->previousSibling();
while( n && !n->isElementNode() )
n = n->previousSibling();
if( !n ) return SelectorFailsLocal;
e = static_cast(n);
SelectorMatch match = checkSelector(sel, e, false);
if (match != SelectorFailsLocal)
return match;
};
break;
}
case CSSSelector::DirectAdjacent:
{
if (e->parentNode()->isElementNode())
addDependency(StructuralDependency, static_cast(e->parentNode()));
DOM::NodeImpl* n = e->previousSibling();
while( n && !n->isElementNode() )
n = n->previousSibling();
if( !n ) return SelectorFailsLocal;
e = static_cast(n);
return checkSelector(sel, e, false);
}
case CSSSelector::SubSelector:
return checkSelector(sel, e, isAncestor, true);
}
assert(false); // never reached
return SelectorFails;
}
void CSSStyleSelector::checkSelector(int selIndex, DOM::ElementImpl * e)
{
assert(e == element); // yes, actually
dynamicPseudo = RenderStyle::NOPSEUDO;
selectorCache[ selIndex ].state = Invalid;
CSSSelector *sel = selectors[ selIndex ];
// Check the selector
SelectorMatch match = checkSelector(sel, e, true);
if(match != SelectorMatches) return;
if ( dynamicPseudo != RenderStyle::NOPSEUDO ) {
selectorCache[selIndex].state = AppliesPseudo;
selectors[ selIndex ]->pseudoId = dynamicPseudo;
} else
selectorCache[ selIndex ].state = Applies;
//qDebug( "selector %d applies", selIndex );
//selectors[ selIndex ]->print();
return;
}
void CSSStyleSelector::addDependency(StructuralDependencyType dependencyType, ElementImpl* dependency)
{
element->getDocument()->dynamicDomRestyler().addDependency(element, dependency, dependencyType);
}
bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector)
{
if(!e)
return false;
if (sel->tag != anyQName) {
int eltID = e->id();
quint16 localName = localNamePart(eltID);
quint16 ns = namespacePart(eltID);
quint16 selLocalName = localNamePart(sel->tag);
quint16 selNS = namespacePart(sel->tag);
if (localName <= ID_LAST_TAG && ns == defaultNamespace) {
assert(e->isHTMLElement());
ns = xhtmlNamespace;
}
// match on local
if (selLocalName != anyLocalName && localName != selLocalName) return false;
// match on namespace
if (selNS != anyNamespace && ns != selNS) return false;
}
if(sel->attr)
{
quint16 selLocalName = localNamePart(sel->attr);
quint16 selNS = namespacePart(sel->attr);
bool nsAware = (selNS != anyNamespace);
if (selNS == emptyNamespace)
selNS = defaultNamespace;
DOMStringImpl* value = e->getAttributeImpl(makeId(selNS, selLocalName), nsAware);
if(!value) return false; // attribute is not set
// attributes are always case-sensitive in XHTML
// attributes are sometimes case-sensitive in HTML
// we only treat id and class selectors as case-sensitive in HTML strict
// for compatibility reasons
bool caseSensitive = e->getDocument()->htmlMode() == DocumentImpl::XHtml;
bool caseSensitive_alt = strictParsing || caseSensitive;
caseSensitive |= (sel->attr > ATTR_LAST_CI_ATTR);
switch(sel->match)
{
case CSSSelector::Set:
// True if we make it this far
break;
case CSSSelector::Id:
caseSensitive = caseSensitive_alt;
// no break
case CSSSelector::Exact:
return (caseSensitive && !strcmp(sel->value, value)) ||
(!caseSensitive && !strcasecmp(sel->value, value));
break;
case CSSSelector::Class:
caseSensitive = caseSensitive_alt;
// no break
case CSSSelector::List:
{
int sel_len = sel->value.length();
int val_len = value->length();
// Be smart compare on length first
if (sel_len > val_len) return false;
// Selector string may not contain spaces
if ((sel->attr != ATTR_CLASS || e->hasClassList()) && sel->value.find(' ') != -1) return false;
if (sel_len == val_len)
return (caseSensitive && !strcmp(sel->value, value)) ||
(!caseSensitive && !strcasecmp(sel->value, value));
// else the value is longer and can be a list
if ( sel->match == CSSSelector::Class && !e->hasClassList() ) return false;
QChar* sel_uc = sel->value.unicode();
QChar* val_uc = value->unicode();
QString sel_str = QString::fromRawData(sel_uc, sel_len);
QString val_str = QString::fromRawData(val_uc, val_len);
int pos = 0;
for ( ;; ) {
pos = val_str.indexOf(sel_str, pos, strictParsing?Qt::CaseSensitive:Qt::CaseInsensitive);
if ( pos == -1 ) return false;
if ( pos == 0 || val_uc[pos-1].isSpace() ) {
int endpos = pos + sel_len;
if ( endpos >= val_len || val_uc[endpos].isSpace() )
break; // We have a match.
}
++pos;
}
break;
}
case CSSSelector::Contain:
{
//kDebug( 6080 ) << "checking for contains match";
QString val_str = QString::fromRawData(value->unicode(), value->length());
QString sel_str = QString::fromRawData(sel->value.unicode(), sel->value.length());
return val_str.contains(sel_str, caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
}
case CSSSelector::Begin:
{
//kDebug( 6080 ) << "checking for beginswith match";
QString val_str = QString::fromRawData(value->unicode(), value->length());
QString sel_str = QString::fromRawData(sel->value.unicode(), sel->value.length());
return val_str.startsWith(sel_str, caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
}
case CSSSelector::End:
{
//kDebug( 6080 ) << "checking for endswith match";
QString val_str = QString::fromRawData(value->unicode(), value->length());
QString sel_str = QString::fromRawData(sel->value.unicode(), sel->value.length());
return val_str.endsWith(sel_str, caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive);
}
case CSSSelector::Hyphen:
{
//kDebug( 6080 ) << "checking for hyphen match";
QString val_str = QString::fromRawData(value->unicode(), value->length());
QString sel_str = QString::fromRawData(sel->value.unicode(), sel->value.length());
const QString& str = val_str;
const QString& selStr = sel_str;
if(str.length() < selStr.length()) return false;
// Check if str begins with selStr:
if(str.indexOf(selStr, 0, (caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive)) != 0) return false;
// It does. Check for exact match or following '-':
if(str.length() != selStr.length()
&& str[selStr.length()] != '-') return false;
break;
}
case CSSSelector::PseudoClass:
case CSSSelector::PseudoElement:
case CSSSelector::None:
break;
}
}
if(sel->match == CSSSelector::PseudoClass || sel->match == CSSSelector::PseudoElement)
{
switch (sel->pseudoType()) {
// Pseudo classes:
case CSSSelector::PseudoEmpty:
addDependency(BackwardsStructuralDependency, e);
// If e is not closed yet we don't know the number of children
if (!e->closed()) {
return false;
}
if (!e->firstChild())
return true;
else {
NodeImpl *t = e->firstChild();
// check for empty text nodes and comments
while (t && (t->nodeType() == Node::COMMENT_NODE ||
(t->isTextNode() && static_cast(t)->length() == 0)))
t = t->nextSibling();
if (t == 0)
return true;
else
return false;
}
break;
case CSSSelector::PseudoFirstChild: {
// first-child matches the first child that is an element!
if (e->parentNode() && e->parentNode()->isElementNode()) {
// Handle dynamic DOM changes
addDependency(StructuralDependency, static_cast(e->parentNode()));
DOM::NodeImpl* n = e->previousSibling();
while ( n && !n->isElementNode() )
n = n->previousSibling();
if ( !n )
return true;
}
break;
}
case CSSSelector::PseudoLastChild: {
// last-child matches the last child that is an element!
if (e->parentNode() && e->parentNode()->isElementNode()) {
// Handle unfinished parsing and dynamic DOM changes
addDependency(BackwardsStructuralDependency, static_cast(e->parentNode()));
if (!e->parentNode()->closed()) {
// kDebug(6080) << e->nodeName().string() << "::last-child: Parent unclosed";
return false;
}
DOM::NodeImpl* n = e->nextSibling();
while ( n && !n->isElementNode() )
n = n->nextSibling();
if ( !n )
return true;
}
break;
}
case CSSSelector::PseudoOnlyChild: {
// If both first-child and last-child apply, then only-child applies.
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(BackwardsStructuralDependency, static_cast(e->parentNode()));
if (!e->parentNode()->closed()) {
return false;
}
DOM::NodeImpl* n = e->previousSibling();
while ( n && !n->isElementNode() )
n = n->previousSibling();
if ( !n ) {
n = e->nextSibling();
while ( n && !n->isElementNode() )
n = n->nextSibling();
if ( !n )
return true;
}
}
break;
}
case CSSSelector::PseudoNthChild: {
// nth-child matches every (a*n+b)th element!
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(StructuralDependency, static_cast(e->parentNode()));
int count = 1;
DOM::NodeImpl* n = e->previousSibling();
while ( n ) {
if (n->isElementNode()) count++;
n = n->previousSibling();
}
// kDebug(6080) << "NthChild " << count << "=" << sel->string_arg;
if (matchNth(count,sel->string_arg.string()))
return true;
}
break;
}
case CSSSelector::PseudoNthLastChild: {
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(BackwardsStructuralDependency, static_cast(e->parentNode()));
if (!e->parentNode()->closed()) {
return false;
}
int count = 1;
DOM::NodeImpl* n = e->nextSibling();
while ( n ) {
if (n->isElementNode()) count++;
n = n->nextSibling();
}
// kDebug(6080) << "NthLastChild " << count << "=" << sel->string_arg;
if (matchNth(count,sel->string_arg.string()))
return true;
}
break;
}
case CSSSelector::PseudoFirstOfType: {
// first-of-type matches the first element of its type!
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(StructuralDependency, static_cast(e->parentNode()));
const DOMString& type = e->tagName();
DOM::NodeImpl* n = e->previousSibling();
while ( n ) {
if (n->isElementNode())
if (static_cast(n)->tagName() == type) break;
n = n->previousSibling();
}
if ( !n )
return true;
}
break;
}
case CSSSelector::PseudoLastOfType: {
// last-child matches the last child that is an element!
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(BackwardsStructuralDependency, static_cast(e->parentNode()));
if (!e->parentNode()->closed()) {
return false;
}
const DOMString& type = e->tagName();
DOM::NodeImpl* n = e->nextSibling();
while ( n ) {
if (n->isElementNode())
if (static_cast(n)->tagName() == type) break;
n = n->nextSibling();
}
if ( !n )
return true;
}
break;
}
case CSSSelector::PseudoOnlyOfType: {
// If both first-of-type and last-of-type apply, then only-of-type applies.
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(BackwardsStructuralDependency, static_cast(e->parentNode()));
if (!e->parentNode()->closed()) {
return false;
}
const DOMString& type = e->tagName();
DOM::NodeImpl* n = e->previousSibling();
while ( n && !(n->isElementNode() && static_cast(n)->tagName() == type))
n = n->previousSibling();
if ( !n ) {
n = e->nextSibling();
while ( n && !(n->isElementNode() && static_cast(n)->tagName() == type))
n = n->nextSibling();
if ( !n )
return true;
}
}
break;
}
case CSSSelector::PseudoNthOfType: {
// nth-of-type matches every (a*n+b)th element of this type!
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(StructuralDependency, static_cast(e->parentNode()));
int count = 1;
const DOMString& type = e->tagName();
DOM::NodeImpl* n = e->previousSibling();
while ( n ) {
if (n->isElementNode() && static_cast(n)->tagName() == type) count++;
n = n->previousSibling();
}
// kDebug(6080) << "NthOfType " << count << "=" << sel->string_arg;
if (matchNth(count,sel->string_arg.string()))
return true;
}
break;
}
case CSSSelector::PseudoNthLastOfType: {
if (e->parentNode() && e->parentNode()->isElementNode()) {
addDependency(BackwardsStructuralDependency, static_cast(e->parentNode()));
if (!e->parentNode()->closed()) {
return false;
}
int count = 1;
const DOMString& type = e->tagName();
DOM::NodeImpl* n = e->nextSibling();
while ( n ) {
if (n->isElementNode() && static_cast(n)->tagName() == type) count++;
n = n->nextSibling();
}
// kDebug(6080) << "NthLastOfType " << count << "=" << sel->string_arg;
if (matchNth(count,sel->string_arg.string()))
return true;
}
break;
}
case CSSSelector::PseudoTarget:
if (e == e->getDocument()->getCSSTarget())
return true;
break;
case CSSSelector::PseudoRoot:
if (e == e->getDocument()->documentElement())
return true;
break;
case CSSSelector::PseudoLink:
if (e == element) {
// cache pseudoState
if ( pseudoState == PseudoUnknown )
pseudoState = checkPseudoState( encodedurl, e );
if ( pseudoState == PseudoLink )
return true;
} else
return checkPseudoState( encodedurl, e ) == PseudoLink;
break;
case CSSSelector::PseudoVisited:
if (e == element) {
// cache pseudoState
if ( pseudoState == PseudoUnknown )
pseudoState = checkPseudoState( encodedurl, e );
if ( pseudoState == PseudoVisited )
return true;
} else
return checkPseudoState( encodedurl, e ) == PseudoVisited;
break;
case CSSSelector::PseudoHover: {
// If we're in quirks mode, then *:hover should only match focusable elements.
if (strictParsing || (sel->tag != anyQName) || isSubSelector || e->isFocusable() ) {
addDependency(HoverDependency, e);
if (e->hovered())
return true;
}
break;
}
case CSSSelector::PseudoActive:
// If we're in quirks mode, then *:active should only match focusable elements
if (strictParsing || (sel->tag != anyQName) || isSubSelector || e->isFocusable()) {
addDependency(ActiveDependency, e);
if (e->active())
return true;
}
break;
case CSSSelector::PseudoFocus:
if (e != element && e->isFocusable()) {
// *:focus is a default style, no need to track it.
addDependency(OtherStateDependency, e);
}
if (e->focused()) return true;
break;
case CSSSelector::PseudoLang: {
// Set dynamic attribute dependency
if (e == element) {
e->getDocument()->dynamicDomRestyler().addDependency(ATTR_LANG, PersonalDependency);
e->getDocument()->dynamicDomRestyler().addDependency(ATTR_LANG, AncestorDependency);
}
else if (isAncestor)
e->getDocument()->dynamicDomRestyler().addDependency(ATTR_LANG, AncestorDependency);
else
e->getDocument()->dynamicDomRestyler().addDependency(ATTR_LANG, PredecessorDependency);
// ### check xml:lang attribute in XML and XHTML documents
DOMString value = e->getAttribute(ATTR_LANG);
// The LANG attribute is inherited like a property
NodeImpl *n = e->parent();;
while (n && value.isEmpty()) {
if (n->isElementNode()) {
value = static_cast(n)->getAttribute(ATTR_LANG);
} else
if (n->isDocumentNode()) {
value = static_cast(n)->contentLanguage();
}
n = n->parent();
}
if (value.isEmpty()) return false;
QString langAttr = value.string();
QString langSel = sel->string_arg.string();
if(langAttr.length() < langSel.length()) return false;
langAttr = langAttr.toLower();
langSel = langSel.toLower();
// kDebug(6080) << ":lang " << langAttr << "=" << langSel << "?";
return (langAttr == langSel || langAttr.startsWith(langSel+'-'));
}
case CSSSelector::PseudoNot: {
// check the simple selector
for (CSSSelector* subSel = sel->simpleSelector; subSel;
subSel = subSel->tagHistory) {
// :not cannot nest. I don't really know why this is a restriction in CSS3,
// but it is, so let's honor it.
if (subSel->simpleSelector)
break;
if (!checkSimpleSelector(subSel, e, isAncestor, true))
return true;
}
break;
}
case CSSSelector::PseudoEnabled: {
if (e->isGenericFormElement()) {
addDependency(OtherStateDependency, e);
HTMLGenericFormElementImpl *form;
form = static_cast(e);
return !form->disabled();
}
break;
}
case CSSSelector::PseudoDisabled: {
if (e->isGenericFormElement()) {
addDependency(OtherStateDependency, e);
HTMLGenericFormElementImpl *form;
form = static_cast(e);
return form->disabled();
}
break;
}
case CSSSelector::PseudoContains: {
if (e->isHTMLElement()) {
addDependency(BackwardsStructuralDependency, e);
if (!e->closed()) {
return false;
}
HTMLElementImpl *elem;
elem = static_cast(e);
DOMString s = elem->innerText();
QString selStr = sel->string_arg.string();
// kDebug(6080) << ":contains(\"" << selStr << "\")" << " on \"" << s << "\"";
return s.string().contains(selStr);
}
break;
}
case CSSSelector::PseudoChecked: {
if (e->isHTMLElement() && e->id() == ID_INPUT) {
addDependency(OtherStateDependency, e);
return (static_cast(e)->checked());
}
return false;
}
case CSSSelector::PseudoIndeterminate: {
#if 0
if (e->isHTMLElement() && e->id() == ID_INPUT) {
return (static_cast(e)->indeterminate() &&
!static_cast(e)->checked());
}
return false;
#endif
}
case CSSSelector::PseudoOther:
break;
// Pseudo-elements:
case CSSSelector::PseudoFirstLine:
case CSSSelector::PseudoFirstLetter:
case CSSSelector::PseudoSelection:
case CSSSelector::PseudoBefore:
case CSSSelector::PseudoAfter:
case CSSSelector::PseudoMarker:
case CSSSelector::PseudoReplaced:
// Pseudo-elements can only apply to subject
if ( e == element ) {
// Pseudo-elements has to be the last sub-selector on subject
if (sel->tagHistory && sel->relation == CSSSelector::SubSelector) return false;
assert(dynamicPseudo == RenderStyle::NOPSEUDO);
switch (sel->pseudoType()) {
case CSSSelector::PseudoFirstLine:
dynamicPseudo = RenderStyle::FIRST_LINE;
break;
case CSSSelector::PseudoFirstLetter:
dynamicPseudo = RenderStyle::FIRST_LETTER;
break;
case CSSSelector::PseudoSelection:
dynamicPseudo = RenderStyle::SELECTION;
break;
case CSSSelector::PseudoBefore:
dynamicPseudo = RenderStyle::BEFORE;
break;
case CSSSelector::PseudoAfter:
dynamicPseudo = RenderStyle::AFTER;
break;
case CSSSelector::PseudoMarker:
dynamicPseudo = RenderStyle::MARKER;
break;
case CSSSelector::PseudoReplaced:
dynamicPseudo = RenderStyle::REPLACED;
break;
default:
assert(false);
}
return true;
}
break;
case CSSSelector::PseudoNotParsed:
assert(false);
break;
}
return false;
}
// ### add the rest of the checks...
return true;
}
void CSSStyleSelector::clearLists()
{
delete [] selectors;
if ( selectorCache ) {
for ( unsigned int i = 0; i < selectors_size; i++ )
delete [] selectorCache[i].props;
delete [] selectorCache;
}
if ( properties ) {
CSSOrderedProperty **prop = properties;
while ( *prop ) {
delete (*prop);
prop++;
}
delete [] properties;
}
selectors = 0;
properties = 0;
selectorCache = 0;
}
void CSSStyleSelector::buildLists()
{
clearLists();
// collect all selectors and Properties in lists. Then transfer them to the array for faster lookup.
QList selectorList;
CSSOrderedPropertyList propertyList;
if(m_medium == "print" && defaultPrintStyle)
defaultPrintStyle->collect( &selectorList, &propertyList, Default,
Default );
else if(defaultStyle) defaultStyle->collect( &selectorList, &propertyList,
Default, Default );
if (!strictParsing && defaultQuirksStyle)
defaultQuirksStyle->collect( &selectorList, &propertyList, Default, Default );
if(userStyle) userStyle->collect(&selectorList, &propertyList, User, UserImportant );
if (defaultNonCSSHintsStyle)
defaultNonCSSHintsStyle->collect(&selectorList, &propertyList, NonCSSHint, NonCSSHint);
// Implicit styles are gathered from hidden, dynamically generated, implicit stylesheets.
// They have the same priority as presentational attributes.
if (implicitStyle) implicitStyle->collect(&selectorList, &propertyList, NonCSSHint, NonCSSHint);
if (authorStyle) authorStyle->collect(&selectorList, &propertyList, Author, AuthorImportant );
selectors_size = selectorList.count();
selectors = new CSSSelector *[selectors_size];
CSSSelector **sel = selectors;
for (QListIterator sit(selectorList); sit.hasNext(); ++sel)
*sel = sit.next();
selectorCache = new SelectorCache[selectors_size];
for ( unsigned int i = 0; i < selectors_size; i++ ) {
selectorCache[i].state = Unknown;
selectorCache[i].props_size = 0;
selectorCache[i].props = 0;
}
// presort properties. Should make the sort() calls in styleForElement faster.
qSort(propertyList.begin(), propertyList.end(), CSSOrderedPropertyList::compareItems);
properties_size = propertyList.count() + 1;
properties = new CSSOrderedProperty *[ properties_size ];
CSSOrderedProperty **prop = properties;
for (QListIterator pit(propertyList); pit.hasNext(); ++prop)
*prop = pit.next();
*prop = 0;
unsigned int* offsets = new unsigned int[selectors_size];
if(properties[0])
offsets[properties[0]->selector] = 0;
for(unsigned int p = 1; p < properties_size; ++p) {
if(!properties[p] || (properties[p]->selector != properties[p - 1]->selector)) {
unsigned int sel = properties[p - 1]->selector;
int* newprops = new int[selectorCache[sel].props_size+2];
for ( unsigned int i=0; i < selectorCache[sel].props_size; i++ )
newprops[i] = selectorCache[sel].props[i];
newprops[selectorCache[sel].props_size] = offsets[sel];
newprops[selectorCache[sel].props_size+1] = p - offsets[sel];
delete [] selectorCache[sel].props;
selectorCache[sel].props = newprops;
selectorCache[sel].props_size += 2;
if(properties[p]) {
sel = properties[p]->selector;
offsets[sel] = p;
}
}
}
delete [] offsets;
}
// ----------------------------------------------------------------------
CSSOrderedRule::CSSOrderedRule(DOM::CSSStyleRuleImpl *r, DOM::CSSSelector *s, int _index)
{
rule = r;
if(rule) r->ref();
index = _index;
selector = s;
}
CSSOrderedRule::~CSSOrderedRule()
{
if(rule) rule->deref();
}
// -----------------------------------------------------------------
CSSStyleSelectorList::CSSStyleSelectorList()
: QList()
{
}
CSSStyleSelectorList::~CSSStyleSelectorList()
{
qDeleteAll(*this);
clear();
}
void CSSStyleSelectorList::append( CSSStyleSheetImpl *sheet,
const DOMString &medium )
{
if(!sheet || !sheet->isCSSStyleSheet()) return;
// No media implies "all", but if a medialist exists it must
// contain our current medium
if( sheet->media() && !sheet->media()->contains( medium ) )
return; // style sheet not applicable for this medium
int len = sheet->length();
for(int i = 0; i< len; i++)
{
StyleBaseImpl *item = sheet->item(i);
if(item->isStyleRule())
{
CSSStyleRuleImpl *r = static_cast(item);
QList *s = r->selector();
for(int j = 0; j < (int)s->count(); j++)
{
CSSOrderedRule *rule = new CSSOrderedRule(r, s->at(j), count());
QList::append(rule);
//kDebug( 6080 ) << "appending StyleRule!";
}
}
else if(item->isImportRule())
{
CSSImportRuleImpl *import = static_cast(item);
//kDebug( 6080 ) << "@import: Media: "
// << import->media()->mediaText().string() << endl;
if( !import->media() || import->media()->contains( medium ) )
{
CSSStyleSheetImpl *importedSheet = import->styleSheet();
append( importedSheet, medium );
}
}
else if( item->isMediaRule() )
{
CSSMediaRuleImpl *r = static_cast( item );
CSSRuleListImpl *rules = r->cssRules();
//DOMString mediaText = media->mediaText();
//kDebug( 6080 ) << "@media: Media: "
// << r->media()->mediaText().string() << endl;
if( ( !r->media() || r->media()->contains( medium ) ) && rules)
{
// Traverse child elements of the @import rule. Since
// many elements are not allowed as child we do not use
// a recursive call to append() here
for( unsigned j = 0; j < rules->length(); j++ )
{
//kDebug( 6080 ) << "*** Rule #" << j;
CSSRuleImpl *childItem = rules->item( j );
if( childItem->isStyleRule() )
{
// It is a StyleRule, so append it to our list
CSSStyleRuleImpl *styleRule =
static_cast( childItem );
QList *s = styleRule->selector();
for( int j = 0; j < ( int ) s->count(); j++ )
{
CSSOrderedRule *orderedRule = new CSSOrderedRule(
styleRule, s->at( j ), count() );
QList::append( orderedRule );
}
}
else
{
//kDebug( 6080 ) << "Ignoring child rule of "
// "ImportRule: rule is not a StyleRule!" << endl;
}
} // for rules
} // if rules
else
{
//kDebug( 6080 ) << "CSSMediaRule not rendered: "
// << "rule empty or wrong medium!" << endl;
}
}
// ### include other rules
}
}
void CSSStyleSelectorList::collect( QList *selectorList, CSSOrderedPropertyList *propList,
Source regular, Source important )
{
CSSOrderedRule *r;
QListIterator tIt(*this);
CSSSelector *sel;
while( tIt.hasNext() ) {
r = tIt.next();
int selectorNum = 0;
sel = 0;
bool found = false;
// already in list?
QListIterator it(*selectorList);
while( it.hasNext() ) {
sel = it.next();
if ( *sel == *(r->selector) ) {
found = true;
break;
}
selectorNum++;
}
if ( !found )
// nope.
selectorList->append( r->selector );
propList->append(r->rule->declaration(), selectorNum, r->selector->specificity(), regular, important );
}
}
// -------------------------------------------------------------------------
bool CSSOrderedPropertyList::compareItems(const CSSOrderedProperty * i1, const CSSOrderedProperty *i2)
{
return *i1 < *i2;
}
void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, uint selector, uint specificity,
Source regular, Source important )
{
QList *values = decl->values();
if(!values) return;
int len = values->count();
for(int i = 0; i < len; i++)
{
CSSProperty *prop = values->at(i);
Source source = regular;
if( prop->m_important ) source = important;
bool first = false;
// give special priority to font-xxx, color properties
switch(prop->m_id)
{
case CSS_PROP_FONT_STYLE:
case CSS_PROP_FONT_SIZE:
case CSS_PROP_FONT_WEIGHT:
case CSS_PROP_FONT_FAMILY:
case CSS_PROP_FONT_VARIANT:
case CSS_PROP_FONT:
case CSS_PROP_COLOR:
case CSS_PROP_DIRECTION:
case CSS_PROP_DISPLAY:
// these have to be applied first, because other properties use the computed
// values of these porperties.
first = true;
break;
default:
break;
}
QList::append(new CSSOrderedProperty(prop, selector,
first, source, specificity,
count() ));
}
}
// -------------------------------------------------------------------------------------
// this is mostly boring stuff on how to apply a certain rule to the renderstyle...
static Length convertToLength( CSSPrimitiveValueImpl *primitiveValue, RenderStyle *style, int logicalDpiY, bool *ok = 0 )
{
Length l;
if ( !primitiveValue ) {
if ( ok )
*ok = false;
} else {
int type = primitiveValue->primitiveType();
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
l = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed);
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE)), Percent);
else if(type == CSSPrimitiveValue::CSS_NUMBER)
l = Length(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER)*100), Percent);
else if (type == CSSPrimitiveValue::CSS_HTML_RELATIVE)
l = Length(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_HTML_RELATIVE)), Relative);
else if ( ok )
*ok = false;
}
return l;
}
static inline int nextFontSize(const QVector& a, int v, bool smaller)
{
// return the nearest bigger/smaller value in scale a, when v is in range.
// otherwise increase/decrease value using a 1.2 fixed ratio
int m, l = 0, r = a.count()-1;
while (l <= r) {
m = (l+r)/2;
if (a[m] == v)
return smaller ? ( m ? a[m-1] : (v*5)/6 ) :
( m+1isPrimitiveValue()) primitiveValue = static_cast(value);
Length l;
bool apply = false;
bool isInherit = (parentNode && value->cssValueType() == CSSValue::CSS_INHERIT);
bool isInitial = (value->cssValueType() == CSSValue::CSS_INITIAL) ||
(!parentNode && value->cssValueType() == CSSValue::CSS_INHERIT);
// These properties are used to set the correct margins/padding on RTL lists.
if (id == CSS_PROP__KHTML_MARGIN_START)
id = style->direction() == LTR ? CSS_PROP_MARGIN_LEFT : CSS_PROP_MARGIN_RIGHT;
else if (id == CSS_PROP__KHTML_PADDING_START)
id = style->direction() == LTR ? CSS_PROP_PADDING_LEFT : CSS_PROP_PADDING_RIGHT;
// What follows is a list that maps the CSS properties into their corresponding front-end
// RenderStyle values. Shorthands (e.g. border, background) occur in this list as well and
// are only hit when mapping "inherit" or "initial" into front-end values.
switch(id)
{
// ident only properties
case CSS_PROP_BACKGROUND_ATTACHMENT:
HANDLE_BACKGROUND_VALUE(backgroundAttachment, BackgroundAttachment, value)
break;
case CSS_PROP__KHTML_BACKGROUND_CLIP:
HANDLE_BACKGROUND_VALUE(backgroundClip, BackgroundClip, value)
break;
case CSS_PROP__KHTML_BACKGROUND_ORIGIN:
HANDLE_BACKGROUND_VALUE(backgroundOrigin, BackgroundOrigin, value)
break;
case CSS_PROP_BACKGROUND_REPEAT:
HANDLE_BACKGROUND_VALUE(backgroundRepeat, BackgroundRepeat, value)
break;
case CSS_PROP__KHTML_BACKGROUND_SIZE:
HANDLE_BACKGROUND_VALUE(backgroundSize, BackgroundSize, value)
break;
case CSS_PROP_BORDER_COLLAPSE:
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(borderCollapse, BorderCollapse)
if(!primitiveValue) break;
switch(primitiveValue->getIdent())
{
case CSS_VAL_COLLAPSE:
style->setBorderCollapse(true);
break;
case CSS_VAL_SEPARATE:
style->setBorderCollapse(false);
break;
default:
return;
}
break;
case CSS_PROP_BORDER_TOP_STYLE:
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderTopStyle, BorderTopStyle, BorderStyle)
if (!primitiveValue) return;
style->setBorderTopStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE));
break;
case CSS_PROP_BORDER_RIGHT_STYLE:
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderRightStyle, BorderRightStyle, BorderStyle)
if (!primitiveValue) return;
style->setBorderRightStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE));
break;
case CSS_PROP_BORDER_BOTTOM_STYLE:
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderBottomStyle, BorderBottomStyle, BorderStyle)
if (!primitiveValue) return;
style->setBorderBottomStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE));
break;
case CSS_PROP_BORDER_LEFT_STYLE:
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(borderLeftStyle, BorderLeftStyle, BorderStyle)
if (!primitiveValue) return;
style->setBorderLeftStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE));
break;
case CSS_PROP_OUTLINE_STYLE:
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(outlineStyle, OutlineStyle, BorderStyle)
if (!primitiveValue) return;
style->setOutlineStyle((EBorderStyle)(primitiveValue->getIdent() - CSS_VAL__KHTML_NATIVE));
break;
case CSS_PROP_CAPTION_SIDE:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(captionSide, CaptionSide)
if(!primitiveValue) break;
ECaptionSide c = RenderStyle::initialCaptionSide();
switch(primitiveValue->getIdent())
{
case CSS_VAL_LEFT:
c = CAPLEFT; break;
case CSS_VAL_RIGHT:
c = CAPRIGHT; break;
case CSS_VAL_TOP:
c = CAPTOP; break;
case CSS_VAL_BOTTOM:
c = CAPBOTTOM; break;
default:
return;
}
style->setCaptionSide(c);
return;
}
case CSS_PROP_CLEAR:
{
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(clear, Clear)
if(!primitiveValue) break;
EClear c = CNONE;
switch(primitiveValue->getIdent())
{
case CSS_VAL_LEFT:
c = CLEFT; break;
case CSS_VAL_RIGHT:
c = CRIGHT; break;
case CSS_VAL_BOTH:
c = CBOTH; break;
case CSS_VAL_NONE:
c = CNONE; break;
default:
return;
}
style->setClear(c);
return;
}
case CSS_PROP_DIRECTION:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(direction, Direction)
if(!primitiveValue) break;
style->setDirection( (EDirection) (primitiveValue->getIdent() - CSS_VAL_LTR) );
return;
}
case CSS_PROP_DISPLAY:
{
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(display, Display)
if(!primitiveValue) break;
int id = primitiveValue->getIdent();
style->setDisplay( id == CSS_VAL_NONE ? NONE : EDisplay(id - CSS_VAL_INLINE) );
break;
}
case CSS_PROP_EMPTY_CELLS:
{
HANDLE_INHERIT_ON_INHERITED_PROPERTY(emptyCells, EmptyCells);
if (!primitiveValue) break;
int id = primitiveValue->getIdent();
if (id == CSS_VAL_SHOW)
style->setEmptyCells(SHOW);
else if (id == CSS_VAL_HIDE)
style->setEmptyCells(HIDE);
break;
}
case CSS_PROP_FLOAT:
{
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(floating, Floating)
if(!primitiveValue) return;
EFloat f;
switch(primitiveValue->getIdent())
{
case CSS_VAL__KHTML_LEFT:
f = FLEFT_ALIGN; break;
case CSS_VAL_LEFT:
f = FLEFT; break;
case CSS_VAL__KHTML_RIGHT:
f = FRIGHT_ALIGN; break;
case CSS_VAL_RIGHT:
f = FRIGHT; break;
case CSS_VAL_NONE:
case CSS_VAL_CENTER: //Non standart CSS-Value
f = FNONE; break;
default:
return;
}
if (f!=FNONE && style->display()==LIST_ITEM)
style->setDisplay(BLOCK);
style->setFloating(f);
break;
}
case CSS_PROP_FONT_STYLE:
{
FontDef fontDef = style->htmlFont().fontDef;
if (isInherit)
fontDef.italic = parentStyle->htmlFont().fontDef.italic;
else if (isInitial)
fontDef.italic = false;
else {
if(!primitiveValue) return;
switch(primitiveValue->getIdent()) {
case CSS_VAL_OBLIQUE:
// ### oblique is the same as italic for the moment...
case CSS_VAL_ITALIC:
fontDef.italic = true;
break;
case CSS_VAL_NORMAL:
fontDef.italic = false;
break;
default:
return;
}
}
fontDirty |= style->setFontDef( fontDef );
break;
}
case CSS_PROP_FONT_VARIANT:
{
FontDef fontDef = style->htmlFont().fontDef;
if (isInherit)
fontDef.smallCaps = parentStyle->htmlFont().fontDef.smallCaps;
else if (isInitial)
fontDef.smallCaps = false;
else {
if(!primitiveValue) return;
int id = primitiveValue->getIdent();
if ( id == CSS_VAL_NORMAL )
fontDef.smallCaps = false;
else if ( id == CSS_VAL_SMALL_CAPS )
fontDef.smallCaps = true;
else
return;
}
fontDirty |= style->setFontDef( fontDef );
break;
}
case CSS_PROP_FONT_WEIGHT:
{
FontDef fontDef = style->htmlFont().fontDef;
if (isInherit)
fontDef.weight = parentStyle->htmlFont().fontDef.weight;
else if (isInitial)
fontDef.weight = QFont::Normal;
else {
if(!primitiveValue) return;
if(primitiveValue->getIdent())
{
switch(primitiveValue->getIdent()) {
// ### we just support normal and bold fonts at the moment...
// setWeight can actually accept values between 0 and 99...
case CSS_VAL_BOLD:
case CSS_VAL_BOLDER:
case CSS_VAL_600:
case CSS_VAL_700:
case CSS_VAL_800:
case CSS_VAL_900:
fontDef.weight = QFont::Bold;
break;
case CSS_VAL_NORMAL:
case CSS_VAL_LIGHTER:
case CSS_VAL_100:
case CSS_VAL_200:
case CSS_VAL_300:
case CSS_VAL_400:
case CSS_VAL_500:
fontDef.weight = QFont::Normal;
break;
default:
return;
}
}
else
{
// ### fix parsing of 100-900 values in parser, apply them here
}
}
fontDirty |= style->setFontDef( fontDef );
break;
}
case CSS_PROP_LIST_STYLE_POSITION:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(listStylePosition, ListStylePosition)
if (!primitiveValue) return;
if (primitiveValue->getIdent())
style->setListStylePosition( (EListStylePosition) (primitiveValue->getIdent() - CSS_VAL_OUTSIDE) );
return;
}
case CSS_PROP_LIST_STYLE_TYPE:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(listStyleType, ListStyleType)
if (!primitiveValue) return;
if (primitiveValue->getIdent())
{
EListStyleType t;
int id = primitiveValue->getIdent();
if ( id == CSS_VAL_NONE) { // important!!
t = LNONE;
} else {
t = EListStyleType(id - CSS_VAL_DISC);
}
style->setListStyleType(t);
}
return;
}
case CSS_PROP_OVERFLOW:
{
if (isInherit) {
style->setOverflowX(parentStyle->overflowX());
style->setOverflowY(parentStyle->overflowY());
style->setInheritedNoninherited(true);
return;
}
if (isInitial) {
style->setOverflowX(RenderStyle::initialOverflowX());
style->setOverflowY(RenderStyle::initialOverflowY());
return;
}
if (!primitiveValue) return;
EOverflow o;
switch(primitiveValue->getIdent())
{
case CSS_VAL_VISIBLE:
o = OVISIBLE; break;
case CSS_VAL_HIDDEN:
o = OHIDDEN; break;
case CSS_VAL_SCROLL:
o = OSCROLL; break;
case CSS_VAL_AUTO:
o = OAUTO; break;
case CSS_VAL_MARQUEE:
o = OMARQUEE; break;
default:
return;
}
style->setOverflowX(o);
style->setOverflowY(o);
return;
}
case CSS_PROP_OVERFLOW_X:
{
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(overflowX, OverflowX)
if (!primitiveValue) return;
EOverflow o;
switch(primitiveValue->getIdent())
{
case CSS_VAL_VISIBLE:
o = OVISIBLE; break;
case CSS_VAL_HIDDEN:
o = OHIDDEN; break;
case CSS_VAL_SCROLL:
o = OSCROLL; break;
case CSS_VAL_AUTO:
o = OAUTO; break;
default:
return;
}
style->setOverflowX(o);
return;
}
case CSS_PROP_OVERFLOW_Y:
{
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(overflowY, OverflowY)
if (!primitiveValue) return;
EOverflow o;
switch(primitiveValue->getIdent())
{
case CSS_VAL_VISIBLE:
o = OVISIBLE; break;
case CSS_VAL_HIDDEN:
o = OHIDDEN; break;
case CSS_VAL_SCROLL:
o = OSCROLL; break;
case CSS_VAL_AUTO:
o = OAUTO; break;
default:
return;
}
style->setOverflowY(o);
return;
}
case CSS_PROP_PAGE_BREAK_BEFORE:
{
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(pageBreakBefore, PageBreakBefore, PageBreak)
if (!primitiveValue) return;
switch (primitiveValue->getIdent()) {
case CSS_VAL_AUTO:
style->setPageBreakBefore(PBAUTO);
break;
case CSS_VAL_LEFT:
case CSS_VAL_RIGHT:
// CSS2.1: "Conforming user agents may map left/right to always."
case CSS_VAL_ALWAYS:
style->setPageBreakBefore(PBALWAYS);
break;
case CSS_VAL_AVOID:
style->setPageBreakBefore(PBAVOID);
break;
}
break;
}
case CSS_PROP_PAGE_BREAK_AFTER:
{
HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(pageBreakAfter, PageBreakAfter, PageBreak)
if (!primitiveValue) return;
switch (primitiveValue->getIdent()) {
case CSS_VAL_AUTO:
style->setPageBreakAfter(PBAUTO);
break;
case CSS_VAL_LEFT:
case CSS_VAL_RIGHT:
// CSS2.1: "Conforming user agents may map left/right to always."
case CSS_VAL_ALWAYS:
style->setPageBreakAfter(PBALWAYS);
break;
case CSS_VAL_AVOID:
style->setPageBreakAfter(PBAVOID);
break;
}
break;
}
case CSS_PROP_PAGE_BREAK_INSIDE: {
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(pageBreakInside, PageBreakInside)
if (!primitiveValue) return;
if (primitiveValue->getIdent() == CSS_VAL_AUTO)
style->setPageBreakInside(true);
else if (primitiveValue->getIdent() == CSS_VAL_AVOID)
style->setPageBreakInside(false);
return;
}
// case CSS_PROP_PAUSE_AFTER:
// case CSS_PROP_PAUSE_BEFORE:
break;
case CSS_PROP_POSITION:
{
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(position, Position)
if (!primitiveValue) return;
EPosition p;
switch(primitiveValue->getIdent())
{
case CSS_VAL_STATIC:
p = STATIC; break;
case CSS_VAL_RELATIVE:
p = RELATIVE; break;
case CSS_VAL_ABSOLUTE:
p = ABSOLUTE; break;
case CSS_VAL_FIXED:
{
view->setHasStaticBackground();
p = FIXED;
break;
}
default:
return;
}
style->setPosition(p);
return;
}
case CSS_PROP_TABLE_LAYOUT: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(tableLayout, TableLayout)
if ( !primitiveValue )
return;
ETableLayout l = RenderStyle::initialTableLayout();
switch( primitiveValue->getIdent() ) {
case CSS_VAL_FIXED:
l = TFIXED;
// fall through
case CSS_VAL_AUTO:
style->setTableLayout( l );
default:
break;
}
break;
}
case CSS_PROP_UNICODE_BIDI: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(unicodeBidi, UnicodeBidi)
if(!primitiveValue) break;
switch (primitiveValue->getIdent()) {
case CSS_VAL_NORMAL:
style->setUnicodeBidi(UBNormal);
break;
case CSS_VAL_EMBED:
style->setUnicodeBidi(Embed);
break;
case CSS_VAL_BIDI_OVERRIDE:
style->setUnicodeBidi(Override);
break;
default:
return;
}
break;
}
case CSS_PROP_TEXT_TRANSFORM: {
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(textTransform, TextTransform)
if(!primitiveValue) break;
if(!primitiveValue->getIdent()) return;
ETextTransform tt;
switch(primitiveValue->getIdent()) {
case CSS_VAL_CAPITALIZE: tt = CAPITALIZE; break;
case CSS_VAL_UPPERCASE: tt = UPPERCASE; break;
case CSS_VAL_LOWERCASE: tt = LOWERCASE; break;
case CSS_VAL_NONE:
default: tt = TTNONE; break;
}
style->setTextTransform(tt);
break;
}
case CSS_PROP_VISIBILITY:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(visibility, Visibility)
if(!primitiveValue) break;
switch( primitiveValue->getIdent() ) {
case CSS_VAL_HIDDEN:
style->setVisibility( HIDDEN );
break;
case CSS_VAL_VISIBLE:
style->setVisibility( VISIBLE );
break;
case CSS_VAL_COLLAPSE:
style->setVisibility( COLLAPSE );
default:
break;
}
break;
}
case CSS_PROP_WHITE_SPACE:
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(whiteSpace, WhiteSpace)
if(!primitiveValue) break;
if(!primitiveValue->getIdent()) return;
EWhiteSpace s;
switch(primitiveValue->getIdent()) {
case CSS_VAL__KHTML_NOWRAP:
s = KHTML_NOWRAP;
break;
case CSS_VAL_NOWRAP:
s = NOWRAP;
break;
case CSS_VAL_PRE:
s = PRE;
break;
case CSS_VAL_PRE_WRAP:
s = PRE_WRAP;
break;
case CSS_VAL_PRE_LINE:
s = PRE_LINE;
break;
case CSS_VAL_NORMAL:
default:
s = NORMAL;
break;
}
style->setWhiteSpace(s);
break;
case CSS_PROP_BACKGROUND_POSITION:
HANDLE_BACKGROUND_INHERIT_AND_INITIAL(backgroundXPosition, BackgroundXPosition);
HANDLE_BACKGROUND_INHERIT_AND_INITIAL(backgroundYPosition, BackgroundYPosition);
break;
case CSS_PROP_BACKGROUND_POSITION_X: {
HANDLE_BACKGROUND_VALUE(backgroundXPosition, BackgroundXPosition, value)
break;
}
case CSS_PROP_BACKGROUND_POSITION_Y: {
HANDLE_BACKGROUND_VALUE(backgroundYPosition, BackgroundYPosition, value)
break;
}
case CSS_PROP_BORDER_SPACING: {
if(value->cssValueType() != CSSValue::CSS_INHERIT || !parentNode) return;
style->setBorderHorizontalSpacing(parentStyle->borderHorizontalSpacing());
style->setBorderVerticalSpacing(parentStyle->borderVerticalSpacing());
break;
}
case CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(borderHorizontalSpacing, BorderHorizontalSpacing)
if (!primitiveValue) break;
short spacing = primitiveValue->computeLength(style, logicalDpiY);
style->setBorderHorizontalSpacing(spacing);
break;
}
case CSS_PROP__KHTML_BORDER_VERTICAL_SPACING: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(borderVerticalSpacing, BorderVerticalSpacing)
if (!primitiveValue) break;
short spacing = primitiveValue->computeLength(style, logicalDpiY);
style->setBorderVerticalSpacing(spacing);
break;
}
case CSS_PROP_CURSOR:
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(cursor, Cursor)
- if(primitiveValue)
- style->setCursor( (ECursor) (primitiveValue->getIdent() - CSS_VAL_AUTO) );
+ if (!primitiveValue) break;
+ ECursor cursor;
+ switch(primitiveValue->getIdent()) {
+ case CSS_VAL_NONE:
+ cursor = CURSOR_NONE;
+ break;
+ default:
+ cursor = (ECursor) (primitiveValue->getIdent() - CSS_VAL_AUTO);
+ }
+ style->setCursor(cursor);
break;
// colors || inherit
case CSS_PROP_BACKGROUND_COLOR:
case CSS_PROP_BORDER_TOP_COLOR:
case CSS_PROP_BORDER_RIGHT_COLOR:
case CSS_PROP_BORDER_BOTTOM_COLOR:
case CSS_PROP_BORDER_LEFT_COLOR:
case CSS_PROP_COLOR:
case CSS_PROP_OUTLINE_COLOR:
// this property is an extension used to get HTML4 right.
case CSS_PROP_SCROLLBAR_BASE_COLOR:
case CSS_PROP_SCROLLBAR_FACE_COLOR:
case CSS_PROP_SCROLLBAR_SHADOW_COLOR:
case CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR:
case CSS_PROP_SCROLLBAR_3DLIGHT_COLOR:
case CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR:
case CSS_PROP_SCROLLBAR_TRACK_COLOR:
case CSS_PROP_SCROLLBAR_ARROW_COLOR:
{
QColor col;
if (isInherit) {
if (id != CSS_PROP_COLOR)
style->setInheritedNoninherited(true);
HANDLE_INHERIT_COND(CSS_PROP_BACKGROUND_COLOR, backgroundColor, BackgroundColor)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_TOP_COLOR, borderTopColor, BorderTopColor)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_BOTTOM_COLOR, borderBottomColor, BorderBottomColor)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_RIGHT_COLOR, borderRightColor, BorderRightColor)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_LEFT_COLOR, borderLeftColor, BorderLeftColor)
HANDLE_INHERIT_COND(CSS_PROP_COLOR, color, Color)
HANDLE_INHERIT_COND(CSS_PROP_OUTLINE_COLOR, outlineColor, OutlineColor)
return;
} else if (isInitial) {
// The border/outline colors will just map to the invalid color |col| above. This will have the
// effect of forcing the use of the currentColor when it comes time to draw the borders (and of
// not painting the background since the color won't be valid).
if (id == CSS_PROP_COLOR)
col = RenderStyle::initialColor();
} else {
if(!primitiveValue )
return;
int ident = primitiveValue->getIdent();
if ( ident ) {
if ( ident == CSS_VAL__KHTML_TEXT )
col = element->getDocument()->textColor();
else
col = colorForCSSValue( ident );
} else if ( primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR ) {
col.setRgba(primitiveValue->getRGBColorValue());
} else {
return;
}
}
//kDebug( 6080 ) << "applying color " << col.isValid();
switch(id)
{
case CSS_PROP_BACKGROUND_COLOR:
style->setBackgroundColor(col); break;
case CSS_PROP_BORDER_TOP_COLOR:
style->setBorderTopColor(col); break;
case CSS_PROP_BORDER_RIGHT_COLOR:
style->setBorderRightColor(col); break;
case CSS_PROP_BORDER_BOTTOM_COLOR:
style->setBorderBottomColor(col); break;
case CSS_PROP_BORDER_LEFT_COLOR:
style->setBorderLeftColor(col); break;
case CSS_PROP_COLOR:
style->setColor(col); break;
case CSS_PROP_OUTLINE_COLOR:
style->setOutlineColor(col); break;
#ifndef APPLE_CHANGES
case CSS_PROP_SCROLLBAR_FACE_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Button, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Button, col);
break;
case CSS_PROP_SCROLLBAR_SHADOW_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Shadow, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Shadow, col);
break;
case CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Light, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Light, col);
break;
case CSS_PROP_SCROLLBAR_3DLIGHT_COLOR:
break;
case CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Dark, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Dark, col);
break;
case CSS_PROP_SCROLLBAR_TRACK_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Mid, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Mid, col);
style->setPaletteColor(QPalette::Active, QPalette::Background, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Background, col);
// fall through
case CSS_PROP_SCROLLBAR_BASE_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::Base, col);
style->setPaletteColor(QPalette::Inactive, QPalette::Base, col);
break;
case CSS_PROP_SCROLLBAR_ARROW_COLOR:
style->setPaletteColor(QPalette::Active, QPalette::ButtonText, col);
style->setPaletteColor(QPalette::Inactive, QPalette::ButtonText, col);
break;
#endif
default:
return;
}
return;
}
break;
// uri || inherit
case CSS_PROP_BACKGROUND_IMAGE:
HANDLE_BACKGROUND_VALUE(backgroundImage, BackgroundImage, value)
break;
case CSS_PROP_LIST_STYLE_IMAGE:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(listStyleImage, ListStyleImage)
if (!primitiveValue) return;
style->setListStyleImage(static_cast(primitiveValue)->image());
//kDebug( 6080 ) << "setting image in list to " << image->image();
break;
}
// length
case CSS_PROP_BORDER_TOP_WIDTH:
case CSS_PROP_BORDER_RIGHT_WIDTH:
case CSS_PROP_BORDER_BOTTOM_WIDTH:
case CSS_PROP_BORDER_LEFT_WIDTH:
case CSS_PROP_OUTLINE_WIDTH:
{
if (isInherit) {
style->setInheritedNoninherited(true);
HANDLE_INHERIT_COND(CSS_PROP_BORDER_TOP_WIDTH, borderTopWidth, BorderTopWidth)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_RIGHT_WIDTH, borderRightWidth, BorderRightWidth)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_BOTTOM_WIDTH, borderBottomWidth, BorderBottomWidth)
HANDLE_INHERIT_COND(CSS_PROP_BORDER_LEFT_WIDTH, borderLeftWidth, BorderLeftWidth)
HANDLE_INHERIT_COND(CSS_PROP_OUTLINE_WIDTH, outlineWidth, OutlineWidth)
return;
}
else if (isInitial) {
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_BORDER_TOP_WIDTH, BorderTopWidth, BorderWidth)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_BORDER_RIGHT_WIDTH, BorderRightWidth, BorderWidth)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_BORDER_BOTTOM_WIDTH, BorderBottomWidth, BorderWidth)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_BORDER_LEFT_WIDTH, BorderLeftWidth, BorderWidth)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_OUTLINE_WIDTH, OutlineWidth, BorderWidth)
return;
}
if(!primitiveValue) break;
short width = 3;
switch(primitiveValue->getIdent())
{
case CSS_VAL_THIN:
width = 1;
break;
case CSS_VAL_MEDIUM:
width = 3;
break;
case CSS_VAL_THICK:
width = 5;
break;
case CSS_VAL_INVALID:
{
double widthd = primitiveValue->computeLengthFloat(style, logicalDpiY);
width = (int)widthd;
// somewhat resemble Mozilla's granularity
// this makes border-width: 0.5pt borders visible
if (width == 0 && widthd >= 0.025) width++;
break;
}
default:
return;
}
if(width < 0) return;
switch(id)
{
case CSS_PROP_BORDER_TOP_WIDTH:
style->setBorderTopWidth(width);
break;
case CSS_PROP_BORDER_RIGHT_WIDTH:
style->setBorderRightWidth(width);
break;
case CSS_PROP_BORDER_BOTTOM_WIDTH:
style->setBorderBottomWidth(width);
break;
case CSS_PROP_BORDER_LEFT_WIDTH:
style->setBorderLeftWidth(width);
break;
case CSS_PROP_OUTLINE_WIDTH:
style->setOutlineWidth(width);
break;
default:
return;
}
return;
}
case CSS_PROP_LETTER_SPACING:
case CSS_PROP_WORD_SPACING:
{
if (isInherit) {
HANDLE_INHERIT_COND(CSS_PROP_LETTER_SPACING, letterSpacing, LetterSpacing)
HANDLE_INHERIT_COND(CSS_PROP_WORD_SPACING, wordSpacing, WordSpacing)
return;
} else if (isInitial) {
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_LETTER_SPACING, LetterSpacing, LetterWordSpacing)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_WORD_SPACING, WordSpacing, LetterWordSpacing)
return;
}
if(!primitiveValue) return;
int width = 0;
if (primitiveValue->getIdent() != CSS_VAL_NORMAL)
width = primitiveValue->computeLength(style, logicalDpiY);
switch(id)
{
case CSS_PROP_LETTER_SPACING:
style->setLetterSpacing(width);
break;
case CSS_PROP_WORD_SPACING:
style->setWordSpacing(width);
break;
// ### needs the definitions in renderstyle
default: break;
}
return;
}
// length, percent
case CSS_PROP_MAX_WIDTH:
// +none +inherit
if(primitiveValue && primitiveValue->getIdent() == CSS_VAL_NONE) {
apply = true;
l = Length(UNDEFINED, Fixed);
}
case CSS_PROP_TOP:
case CSS_PROP_LEFT:
case CSS_PROP_RIGHT:
case CSS_PROP_BOTTOM:
case CSS_PROP_WIDTH:
case CSS_PROP_MIN_WIDTH:
case CSS_PROP_MARGIN_TOP:
case CSS_PROP_MARGIN_RIGHT:
case CSS_PROP_MARGIN_BOTTOM:
case CSS_PROP_MARGIN_LEFT:
// +inherit +auto
if(id != CSS_PROP_MAX_WIDTH && primitiveValue &&
primitiveValue->getIdent() == CSS_VAL_AUTO)
{
//kDebug( 6080 ) << "found value=auto";
apply = true;
}
case CSS_PROP_PADDING_TOP:
case CSS_PROP_PADDING_RIGHT:
case CSS_PROP_PADDING_BOTTOM:
case CSS_PROP_PADDING_LEFT:
case CSS_PROP_TEXT_INDENT:
// +inherit
{
if (isInherit) {
if (id != CSS_PROP_TEXT_INDENT)
style->setInheritedNoninherited(true);
HANDLE_INHERIT_COND(CSS_PROP_MAX_WIDTH, maxWidth, MaxWidth)
HANDLE_INHERIT_COND(CSS_PROP_BOTTOM, bottom, Bottom)
HANDLE_INHERIT_COND(CSS_PROP_TOP, top, Top)
HANDLE_INHERIT_COND(CSS_PROP_LEFT, left, Left)
HANDLE_INHERIT_COND(CSS_PROP_RIGHT, right, Right)
HANDLE_INHERIT_COND(CSS_PROP_WIDTH, width, Width)
HANDLE_INHERIT_COND(CSS_PROP_MIN_WIDTH, minWidth, MinWidth)
HANDLE_INHERIT_COND(CSS_PROP_PADDING_TOP, paddingTop, PaddingTop)
HANDLE_INHERIT_COND(CSS_PROP_PADDING_RIGHT, paddingRight, PaddingRight)
HANDLE_INHERIT_COND(CSS_PROP_PADDING_BOTTOM, paddingBottom, PaddingBottom)
HANDLE_INHERIT_COND(CSS_PROP_PADDING_LEFT, paddingLeft, PaddingLeft)
HANDLE_INHERIT_COND(CSS_PROP_MARGIN_TOP, marginTop, MarginTop)
HANDLE_INHERIT_COND(CSS_PROP_MARGIN_RIGHT, marginRight, MarginRight)
HANDLE_INHERIT_COND(CSS_PROP_MARGIN_BOTTOM, marginBottom, MarginBottom)
HANDLE_INHERIT_COND(CSS_PROP_MARGIN_LEFT, marginLeft, MarginLeft)
HANDLE_INHERIT_COND(CSS_PROP_TEXT_INDENT, textIndent, TextIndent)
return;
} else if (isInitial) {
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MAX_WIDTH, MaxWidth, MaxSize)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_BOTTOM, Bottom, Offset)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_TOP, Top, Offset)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_LEFT, Left, Offset)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_RIGHT, Right, Offset)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_WIDTH, Width, Size)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MIN_WIDTH, MinWidth, MinSize)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_PADDING_TOP, PaddingTop, Padding)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_PADDING_RIGHT, PaddingRight, Padding)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_PADDING_BOTTOM, PaddingBottom, Padding)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_PADDING_LEFT, PaddingLeft, Padding)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MARGIN_TOP, MarginTop, Margin)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MARGIN_RIGHT, MarginRight, Margin)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MARGIN_BOTTOM, MarginBottom, Margin)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MARGIN_LEFT, MarginLeft, Margin)
HANDLE_INITIAL_COND(CSS_PROP_TEXT_INDENT, TextIndent)
return;
}
if (primitiveValue && !apply) {
int type = primitiveValue->primitiveType();
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
// Handle our quirky margin units if we have them.
l = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed,
primitiveValue->isQuirkValue());
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
else if (type == CSSPrimitiveValue::CSS_HTML_RELATIVE)
l = Length(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_HTML_RELATIVE)), Relative);
else
return;
apply = true;
}
if(!apply) return;
switch(id)
{
case CSS_PROP_MAX_WIDTH:
style->setMaxWidth(l); break;
case CSS_PROP_BOTTOM:
style->setBottom(l); break;
case CSS_PROP_TOP:
style->setTop(l); break;
case CSS_PROP_LEFT:
style->setLeft(l); break;
case CSS_PROP_RIGHT:
style->setRight(l); break;
case CSS_PROP_WIDTH:
style->setWidth(l); break;
case CSS_PROP_MIN_WIDTH:
style->setMinWidth(l); break;
case CSS_PROP_PADDING_TOP:
style->setPaddingTop(l); break;
case CSS_PROP_PADDING_RIGHT:
style->setPaddingRight(l); break;
case CSS_PROP_PADDING_BOTTOM:
style->setPaddingBottom(l); break;
case CSS_PROP_PADDING_LEFT:
style->setPaddingLeft(l); break;
case CSS_PROP_MARGIN_TOP:
style->setMarginTop(l); break;
case CSS_PROP_MARGIN_RIGHT:
style->setMarginRight(l); break;
case CSS_PROP_MARGIN_BOTTOM:
style->setMarginBottom(l); break;
case CSS_PROP_MARGIN_LEFT:
style->setMarginLeft(l); break;
case CSS_PROP_TEXT_INDENT:
style->setTextIndent(l); break;
default: break;
}
return;
}
case CSS_PROP_MAX_HEIGHT:
if(primitiveValue && primitiveValue->getIdent() == CSS_VAL_NONE) {
apply = true;
l = Length(UNDEFINED, Fixed);
}
case CSS_PROP_HEIGHT:
case CSS_PROP_MIN_HEIGHT:
if(id != CSS_PROP_MAX_HEIGHT && primitiveValue &&
primitiveValue->getIdent() == CSS_VAL_AUTO)
apply = true;
if (isInherit) {
style->setInheritedNoninherited(true);
HANDLE_INHERIT_COND(CSS_PROP_MAX_HEIGHT, maxHeight, MaxHeight)
HANDLE_INHERIT_COND(CSS_PROP_HEIGHT, height, Height)
HANDLE_INHERIT_COND(CSS_PROP_MIN_HEIGHT, minHeight, MinHeight)
return;
}
else if (isInitial) {
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MAX_HEIGHT, MaxHeight, MaxSize)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_HEIGHT, Height, Size)
HANDLE_INITIAL_COND_WITH_VALUE(CSS_PROP_MIN_HEIGHT, MinHeight, MinSize)
return;
}
if (primitiveValue && !apply)
{
int type = primitiveValue->primitiveType();
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
l = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed);
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
else
return;
apply = true;
}
if(!apply) return;
switch(id)
{
case CSS_PROP_MAX_HEIGHT:
style->setMaxHeight(l); break;
case CSS_PROP_HEIGHT:
style->setHeight(l); break;
case CSS_PROP_MIN_HEIGHT:
style->setMinHeight(l); break;
default:
return;
}
return;
break;
case CSS_PROP_VERTICAL_ALIGN:
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(verticalAlign, VerticalAlign)
if (!primitiveValue) return;
if (primitiveValue->getIdent()) {
khtml::EVerticalAlign align;
switch(primitiveValue->getIdent())
{
case CSS_VAL_TOP:
align = TOP; break;
case CSS_VAL_BOTTOM:
align = BOTTOM; break;
case CSS_VAL_MIDDLE:
align = MIDDLE; break;
case CSS_VAL_BASELINE:
align = BASELINE; break;
case CSS_VAL_TEXT_BOTTOM:
align = TEXT_BOTTOM; break;
case CSS_VAL_TEXT_TOP:
align = TEXT_TOP; break;
case CSS_VAL_SUB:
align = SUB; break;
case CSS_VAL_SUPER:
align = SUPER; break;
case CSS_VAL__KHTML_BASELINE_MIDDLE:
align = BASELINE_MIDDLE; break;
default:
return;
}
style->setVerticalAlign(align);
return;
} else {
int type = primitiveValue->primitiveType();
Length l;
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
l = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed );
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length( int( primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE) ), Percent );
style->setVerticalAlign( LENGTH );
style->setVerticalAlignLength( l );
}
break;
case CSS_PROP_FONT_SIZE:
{
FontDef fontDef = style->htmlFont().fontDef;
int oldSize;
int size = 0;
float toPix = logicalDpiY/72.0f;
if (toPix < 96.0f/72.0f)
toPix = 96.0f/72.0f;
int minFontSize = int(settings->minFontSize() * toPix);
if(parentNode) {
oldSize = parentStyle->font().pixelSize();
} else
oldSize = m_fontSizes[3];
if (isInherit )
size = oldSize;
else if (isInitial)
size = m_fontSizes[3];
else if(primitiveValue->getIdent()) {
// keywords are being used. Pick the correct default
// based off the font family.
#ifdef APPLE_CHANGES
const QVector& fontSizes = (fontDef.genericFamily == FontDef::eMonospace) ?
m_fixedFontSizes : m_fontSizes;
#else
const QVector& fontSizes = m_fontSizes;
#endif
switch(primitiveValue->getIdent())
{
case CSS_VAL_XX_SMALL: size = int( fontSizes[0] ); break;
case CSS_VAL_X_SMALL: size = int( fontSizes[1] ); break;
case CSS_VAL_SMALL: size = int( fontSizes[2] ); break;
case CSS_VAL_MEDIUM: size = int( fontSizes[3] ); break;
case CSS_VAL_LARGE: size = int( fontSizes[4] ); break;
case CSS_VAL_X_LARGE: size = int( fontSizes[5] ); break;
case CSS_VAL_XX_LARGE: size = int( fontSizes[6] ); break;
case CSS_VAL__KHTML_XXX_LARGE: size = int( fontSizes[7] ); break;
case CSS_VAL_LARGER:
size = nextFontSize(fontSizes, oldSize, false);
break;
case CSS_VAL_SMALLER:
size = nextFontSize(fontSizes, oldSize, true);
break;
default:
return;
}
} else {
int type = primitiveValue->primitiveType();
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG) {
if ( !khtml::printpainter && type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS &&
view && view->part())
size = int( primitiveValue->computeLengthFloat(parentStyle, logicalDpiY) *
view->part()->fontScaleFactor() ) / 100;
else
size = int( primitiveValue->computeLengthFloat(parentStyle, logicalDpiY) );
}
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
size = int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE)
* parentStyle->font().pixelSize()) / 100;
else
return;
}
if (size < 0) return;
// we never want to get smaller than the minimum font size to keep fonts readable
// do not however maximize zero as that is commonly used for fancy layouting purposes
if (size && size < minFontSize) size = minFontSize;
//kDebug( 6080 ) << "computed raw font size: " << size;
fontDef.size = size;
fontDirty |= style->setFontDef( fontDef );
return;
}
case CSS_PROP_Z_INDEX:
{
HANDLE_INHERIT_ON_NONINHERITED_PROPERTY(zIndex, ZIndex)
else if (isInitial) {
style->setHasAutoZIndex();
return;
}
if (!primitiveValue)
return;
if (primitiveValue->getIdent() == CSS_VAL_AUTO) {
style->setHasAutoZIndex();
return;
}
if (primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
return; // Error case.
style->setZIndex((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER));
return;
}
case CSS_PROP_WIDOWS:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(widows, Widows)
if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
return;
style->setWidows((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER));
break;
}
case CSS_PROP_ORPHANS:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(orphans, Orphans)
if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
return;
style->setOrphans((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER));
break;
}
// length, percent, number
case CSS_PROP_LINE_HEIGHT:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(lineHeight, LineHeight)
if(!primitiveValue) return;
Length lineHeight;
int type = primitiveValue->primitiveType();
if (primitiveValue->getIdent() == CSS_VAL_NORMAL)
lineHeight = Length( -100, Percent );
else if (type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG) {
// Scale for the font zoom factor only for types other than "em" and "ex", since those are
// already based on the font size.
if ( !khtml::printpainter && type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS &&
view && view->part())
lineHeight = Length(primitiveValue->computeLength(style, logicalDpiY) *
view->part()->fontScaleFactor()/100, Fixed );
else
lineHeight = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed );
} else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
lineHeight = Length( ( style->font().pixelSize() * int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE)) ) / 100, Fixed );
else if (type == CSSPrimitiveValue::CSS_NUMBER)
lineHeight = Length(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER)*100), Percent);
else
return;
style->setLineHeight(lineHeight);
return;
}
// string
case CSS_PROP_TEXT_ALIGN:
{
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(textAlign, TextAlign)
if (!primitiveValue) return;
if (primitiveValue->getIdent())
style->setTextAlign( (ETextAlign) (primitiveValue->getIdent() - CSS_VAL__KHTML_AUTO) );
return;
}
// rect
case CSS_PROP_CLIP:
{
Length top = Length();
Length right = Length();
Length bottom = Length();
Length left = Length();
bool hasClip = false;
if (isInherit && parentStyle->hasClip()) {
hasClip = true;
top = parentStyle->clipTop();
right = parentStyle->clipRight();
bottom = parentStyle->clipBottom();
left = parentStyle->clipLeft();
} else if (primitiveValue && primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) {
RectImpl *rect = primitiveValue->getRectValue();
if (rect) {
hasClip = true;
top = convertToLength( rect->top(), style, logicalDpiY );
right = convertToLength( rect->right(), style, logicalDpiY );
bottom = convertToLength( rect->bottom(), style, logicalDpiY );
left = convertToLength( rect->left(), style, logicalDpiY );
}
}
style->setClip(top, right, bottom, left);
style->setHasClip(hasClip);
// rect, ident
break;
}
// lists
case CSS_PROP_CONTENT:
// list of string, uri, counter, attr, i
{
// FIXME: In CSS3, it will be possible to inherit content. In CSS2 it is not. This
// note is a reminder that eventually "inherit" needs to be supported.
// not allowed on non-generated pseudo-elements:
if ( style->styleType()==RenderStyle::FIRST_LETTER ||
style->styleType()==RenderStyle::FIRST_LINE ||
style->styleType()==RenderStyle::SELECTION )
break;
if (isInitial) {
style->setContentNormal();
return;
}
if (primitiveValue && primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT) {
// normal | none
if (primitiveValue->getIdent() == CSS_VAL_NORMAL)
style->setContentNormal();
else
if (primitiveValue->getIdent() == CSS_VAL_NONE)
style->setContentNone();
else
assert(false);
return;
}
if(!value->isValueList()) return;
CSSValueListImpl *list = static_cast(value);
int len = list->length();
style->setContentNormal(); // clear the content
for(int i = 0; i < len; i++) {
CSSValueImpl *item = list->item(i);
if(!item->isPrimitiveValue()) continue;
CSSPrimitiveValueImpl *val = static_cast(item);
if(val->primitiveType()==CSSPrimitiveValue::CSS_STRING)
{
style->addContent(val->getStringValue());
}
else if (val->primitiveType()==CSSPrimitiveValue::CSS_ATTR)
{
// TODO: setup dynamic attribute dependencies
int attrID = element->getDocument()->getId(NodeImpl::AttributeId, val->getStringValue(), false, true);
if (attrID)
style->addContent(element->getAttribute(attrID).implementation());
else
kDebug(6080) << "Attribute \"" << val->getStringValue() << "\" not found";
}
else if (val->primitiveType()==CSSPrimitiveValue::CSS_URI)
{
CSSImageValueImpl *image = static_cast(val);
style->addContent(image->image());
}
else if (val->primitiveType()==CSSPrimitiveValue::CSS_COUNTER)
{
style->addContent(val->getCounterValue());
}
else if (val->primitiveType()==CSSPrimitiveValue::CSS_IDENT)
{
EQuoteContent quote;
switch (val->getIdent()) {
case CSS_VAL_OPEN_QUOTE:
quote = OPEN_QUOTE;
break;
case CSS_VAL_NO_OPEN_QUOTE:
quote = NO_OPEN_QUOTE;
break;
case CSS_VAL_CLOSE_QUOTE:
quote = CLOSE_QUOTE;
break;
case CSS_VAL_NO_CLOSE_QUOTE:
quote = NO_CLOSE_QUOTE;
break;
default:
assert(false);
}
style->addContent(quote);
} else
kDebug(6080) << "Unrecognized CSS content";
}
break;
}
case CSS_PROP_COUNTER_INCREMENT: {
if(!value->isValueList()) return;
CSSValueListImpl *list = static_cast(value);
style->setCounterIncrement(list);
break;
}
case CSS_PROP_COUNTER_RESET: {
if(!value->isValueList()) return;
CSSValueListImpl *list = static_cast(value);
style->setCounterReset(list);
break;
}
case CSS_PROP_FONT_FAMILY:
// list of strings and ids
{
if (isInherit) {
FontDef parentFontDef = parentStyle->htmlFont().fontDef;
FontDef fontDef = style->htmlFont().fontDef;
fontDef.family = parentFontDef.family;
if (style->setFontDef(fontDef))
fontDirty = true;
return;
}
else if (isInitial) {
FontDef fontDef = style->htmlFont().fontDef;
FontDef initialDef = FontDef();
#ifdef APPLE_CHANGES
fontDef.family = initialDef.firstFamily();
#else
fontDef.family.clear();
#endif
if (style->setFontDef(fontDef))
fontDirty = true;
return;
}
if(!value->isValueList()) return;
FontDef fontDef = style->htmlFont().fontDef;
CSSValueListImpl *list = static_cast(value);
int len = list->length();
for(int i = 0; i < len; i++) {
CSSValueImpl *item = list->item(i);
if(!item->isPrimitiveValue()) continue;
CSSPrimitiveValueImpl *val = static_cast(item);
QString face;
if( val->primitiveType() == CSSPrimitiveValue::CSS_STRING )
face = static_cast(val)->fontName();
else if ( val->primitiveType() == CSSPrimitiveValue::CSS_IDENT ) {
switch( val->getIdent() ) {
case CSS_VAL_SERIF:
face = settings->serifFontName();
break;
case CSS_VAL_SANS_SERIF:
face = settings->sansSerifFontName();
break;
case CSS_VAL_CURSIVE:
face = settings->cursiveFontName();
break;
case CSS_VAL_FANTASY:
face = settings->fantasyFontName();
break;
case CSS_VAL_MONOSPACE:
face = settings->fixedFontName();
break;
default:
return;
}
} else {
return;
}
if ( !face.isEmpty() ) {
fontDef.family = face;
fontDirty |= style->setFontDef( fontDef );
return;
}
}
break;
}
case CSS_PROP_QUOTES:
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(quotes, Quotes)
if(primitiveValue && primitiveValue->getIdent() == CSS_VAL_NONE) {
// set a set of empty quotes
QuotesValueImpl* quotes = new QuotesValueImpl();
style->setQuotes(quotes);
} else {
QuotesValueImpl* quotes = static_cast(value);
style->setQuotes(quotes);
}
break;
case CSS_PROP_SIZE:
// ### look up
break;
case CSS_PROP_TEXT_DECORATION: {
// list of ident
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(textDecoration, TextDecoration)
int t = RenderStyle::initialTextDecoration();
if(primitiveValue && primitiveValue->getIdent() == CSS_VAL_NONE) {
// do nothing
} else {
if(!value->isValueList()) return;
CSSValueListImpl *list = static_cast(value);
int len = list->length();
for(int i = 0; i < len; i++)
{
CSSValueImpl *item = list->item(i);
if(!item->isPrimitiveValue()) continue;
primitiveValue = static_cast(item);
switch(primitiveValue->getIdent())
{
case CSS_VAL_NONE:
t = TDNONE; break;
case CSS_VAL_UNDERLINE:
t |= UNDERLINE; break;
case CSS_VAL_OVERLINE:
t |= OVERLINE; break;
case CSS_VAL_LINE_THROUGH:
t |= LINE_THROUGH; break;
case CSS_VAL_BLINK:
t |= BLINK; break;
default:
return;
}
}
}
style->setTextDecoration(t);
break;
}
case CSS_PROP__KHTML_FLOW_MODE:
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(flowAroundFloats, FlowAroundFloats)
if (!primitiveValue) return;
if (primitiveValue->getIdent()) {
style->setFlowAroundFloats( primitiveValue->getIdent() == CSS_VAL__KHTML_AROUND_FLOATS );
return;
}
break;
case CSS_PROP__KHTML_USER_INPUT: {
if(value->cssValueType() == CSSValue::CSS_INHERIT)
{
if(!parentNode) return;
style->setUserInput(parentStyle->userInput());
// kDebug() << "UI erm";
return;
}
if(!primitiveValue) return;
int id = primitiveValue->getIdent();
if (id == CSS_VAL_NONE)
style->setUserInput(UI_NONE);
else
style->setUserInput(EUserInput(id - CSS_VAL_ENABLED));
// kDebug(6080) << "userInput: " << style->userEdit();
return;
}
// shorthand properties
case CSS_PROP_BACKGROUND:
if (isInitial) {
style->setBackgroundColor(QColor());
return;
}
else if (isInherit) {
style->inheritBackgroundLayers(*parentStyle->backgroundLayers());
style->setBackgroundColor(parentStyle->backgroundColor());
}
break;
case CSS_PROP_BORDER:
case CSS_PROP_BORDER_STYLE:
case CSS_PROP_BORDER_WIDTH:
case CSS_PROP_BORDER_COLOR:
if (isInherit)
style->setInheritedNoninherited(true);
if(id == CSS_PROP_BORDER || id == CSS_PROP_BORDER_COLOR)
{
if (isInherit) {
style->setBorderTopColor(parentStyle->borderTopColor());
style->setBorderBottomColor(parentStyle->borderBottomColor());
style->setBorderLeftColor(parentStyle->borderLeftColor());
style->setBorderRightColor(parentStyle->borderRightColor());
}
else if (isInitial) {
style->setBorderTopColor(QColor()); // Reset to invalid color so currentColor is used instead.
style->setBorderBottomColor(QColor());
style->setBorderLeftColor(QColor());
style->setBorderRightColor(QColor());
}
}
if (id == CSS_PROP_BORDER || id == CSS_PROP_BORDER_STYLE)
{
if (isInherit) {
style->setBorderTopStyle(parentStyle->borderTopStyle());
style->setBorderBottomStyle(parentStyle->borderBottomStyle());
style->setBorderLeftStyle(parentStyle->borderLeftStyle());
style->setBorderRightStyle(parentStyle->borderRightStyle());
}
else if (isInitial) {
style->setBorderTopStyle(RenderStyle::initialBorderStyle());
style->setBorderBottomStyle(RenderStyle::initialBorderStyle());
style->setBorderLeftStyle(RenderStyle::initialBorderStyle());
style->setBorderRightStyle(RenderStyle::initialBorderStyle());
}
}
if (id == CSS_PROP_BORDER || id == CSS_PROP_BORDER_WIDTH)
{
if (isInherit) {
style->setBorderTopWidth(parentStyle->borderTopWidth());
style->setBorderBottomWidth(parentStyle->borderBottomWidth());
style->setBorderLeftWidth(parentStyle->borderLeftWidth());
style->setBorderRightWidth(parentStyle->borderRightWidth());
}
else if (isInitial) {
style->setBorderTopWidth(RenderStyle::initialBorderWidth());
style->setBorderBottomWidth(RenderStyle::initialBorderWidth());
style->setBorderLeftWidth(RenderStyle::initialBorderWidth());
style->setBorderRightWidth(RenderStyle::initialBorderWidth());
}
}
return;
case CSS_PROP_BORDER_TOP:
if ( isInherit ) {
style->setInheritedNoninherited(true);
style->setBorderTopColor(parentStyle->borderTopColor());
style->setBorderTopStyle(parentStyle->borderTopStyle());
style->setBorderTopWidth(parentStyle->borderTopWidth());
} else if (isInitial)
style->resetBorderTop();
return;
case CSS_PROP_BORDER_RIGHT:
if (isInherit) {
style->setInheritedNoninherited(true);
style->setBorderRightColor(parentStyle->borderRightColor());
style->setBorderRightStyle(parentStyle->borderRightStyle());
style->setBorderRightWidth(parentStyle->borderRightWidth());
}
else if (isInitial)
style->resetBorderRight();
return;
case CSS_PROP_BORDER_BOTTOM:
if (isInherit) {
style->setInheritedNoninherited(true);
style->setBorderBottomColor(parentStyle->borderBottomColor());
style->setBorderBottomStyle(parentStyle->borderBottomStyle());
style->setBorderBottomWidth(parentStyle->borderBottomWidth());
}
else if (isInitial)
style->resetBorderBottom();
return;
case CSS_PROP_BORDER_LEFT:
if (isInherit) {
style->setInheritedNoninherited(true);
style->setBorderLeftColor(parentStyle->borderLeftColor());
style->setBorderLeftStyle(parentStyle->borderLeftStyle());
style->setBorderLeftWidth(parentStyle->borderLeftWidth());
}
else if (isInitial)
style->resetBorderLeft();
return;
case CSS_PROP_MARGIN:
if (isInherit) {
style->setInheritedNoninherited(true);
style->setMarginTop(parentStyle->marginTop());
style->setMarginBottom(parentStyle->marginBottom());
style->setMarginLeft(parentStyle->marginLeft());
style->setMarginRight(parentStyle->marginRight());
}
else if (isInitial)
style->resetMargin();
return;
case CSS_PROP_PADDING:
if (isInherit) {
style->setInheritedNoninherited(true);
style->setPaddingTop(parentStyle->paddingTop());
style->setPaddingBottom(parentStyle->paddingBottom());
style->setPaddingLeft(parentStyle->paddingLeft());
style->setPaddingRight(parentStyle->paddingRight());
}
else if (isInitial)
style->resetPadding();
return;
case CSS_PROP_FONT:
if ( isInherit ) {
FontDef fontDef = parentStyle->htmlFont().fontDef;
style->setLineHeight( parentStyle->lineHeight() );
fontDirty |= style->setFontDef( fontDef );
} else if (isInitial) {
FontDef fontDef;
style->setLineHeight(RenderStyle::initialLineHeight());
if (style->setFontDef( fontDef ))
fontDirty = true;
} else if ( value->isFontValue() ) {
FontValueImpl *font = static_cast(value);
if ( !font->style || !font->variant || !font->weight ||
!font->size || !font->lineHeight || !font->family )
return;
applyRule( CSS_PROP_FONT_STYLE, font->style );
applyRule( CSS_PROP_FONT_VARIANT, font->variant );
applyRule( CSS_PROP_FONT_WEIGHT, font->weight );
applyRule( CSS_PROP_FONT_SIZE, font->size );
// Line-height can depend on font().pixelSize(), so we have to update the font
// before we evaluate line-height, e.g., font: 1em/1em. FIXME: Still not
// good enough: style="font:1em/1em; font-size:36px" should have a line-height of 36px.
if (fontDirty)
CSSStyleSelector::style->htmlFont().update( logicalDpiY );
applyRule( CSS_PROP_LINE_HEIGHT, font->lineHeight );
applyRule( CSS_PROP_FONT_FAMILY, font->family );
}
return;
case CSS_PROP_LIST_STYLE:
if (isInherit) {
style->setListStyleType(parentStyle->listStyleType());
style->setListStyleImage(parentStyle->listStyleImage());
style->setListStylePosition(parentStyle->listStylePosition());
}
else if (isInitial) {
style->setListStyleType(RenderStyle::initialListStyleType());
style->setListStyleImage(RenderStyle::initialListStyleImage());
style->setListStylePosition(RenderStyle::initialListStylePosition());
}
break;
case CSS_PROP_OUTLINE:
if (isInherit) {
style->setOutlineWidth(parentStyle->outlineWidth());
style->setOutlineColor(parentStyle->outlineColor());
style->setOutlineStyle(parentStyle->outlineStyle());
}
else if (isInitial)
style->resetOutline();
break;
/* CSS3 properties */
case CSS_PROP_BOX_SIZING:
HANDLE_INHERIT_ON_NONINHERITED_PROPERTY(boxSizing, BoxSizing)
if (!primitiveValue) return;
if (primitiveValue->getIdent() == CSS_VAL_CONTENT_BOX)
style->setBoxSizing(CONTENT_BOX);
else
if (primitiveValue->getIdent() == CSS_VAL_BORDER_BOX)
style->setBoxSizing(BORDER_BOX);
break;
case CSS_PROP_OUTLINE_OFFSET: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(outlineOffset, OutlineOffset)
int offset = primitiveValue->computeLength(style, logicalDpiY);
if (offset < 0) return;
style->setOutlineOffset(offset);
break;
}
case CSS_PROP_TEXT_SHADOW: {
if (isInherit) {
style->setTextShadow(parentStyle->textShadow() ? new ShadowData(*parentStyle->textShadow()) : 0);
return;
}
else if (isInitial) {
style->setTextShadow(0);
return;
}
if (primitiveValue) { // none
style->setTextShadow(0);
return;
}
if (!value->isValueList()) return;
CSSValueListImpl *list = static_cast(value);
int len = list->length();
for (int i = 0; i < len; i++) {
ShadowValueImpl *item = static_cast(list->item(i));
int x = item->x->computeLength(style, logicalDpiY);
int y = item->y->computeLength(style, logicalDpiY);
int blur = item->blur ? item->blur->computeLength(style, logicalDpiY) : 0;
QColor col = khtml::transparentColor;
if (item->color) {
int ident = item->color->getIdent();
if (ident)
col = colorForCSSValue( ident );
else if (item->color->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR)
col.setRgb(item->color->getRGBColorValue());
}
ShadowData* shadowData = new ShadowData(x, y, blur, col);
style->setTextShadow(shadowData, i != 0);
}
break;
}
case CSS_PROP_OPACITY:
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(opacity, Opacity)
if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER)
return; // Error case.
// Clamp opacity to the range 0-1
style->setOpacity(qMin(1.0f, qMax(0.0f, (float)primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER))));
break;
case CSS_PROP__KHTML_MARQUEE:
if (value->cssValueType() != CSSValue::CSS_INHERIT || !parentNode) return;
style->setMarqueeDirection(parentStyle->marqueeDirection());
style->setMarqueeIncrement(parentStyle->marqueeIncrement());
style->setMarqueeSpeed(parentStyle->marqueeSpeed());
style->setMarqueeLoopCount(parentStyle->marqueeLoopCount());
style->setMarqueeBehavior(parentStyle->marqueeBehavior());
break;
case CSS_PROP__KHTML_MARQUEE_REPETITION: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(marqueeLoopCount, MarqueeLoopCount)
if (!primitiveValue) return;
if (primitiveValue->getIdent() == CSS_VAL_INFINITE)
style->setMarqueeLoopCount(-1); // -1 means repeat forever.
else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER)
style->setMarqueeLoopCount((int)(primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER)));
break;
}
case CSS_PROP__KHTML_MARQUEE_SPEED: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(marqueeSpeed, MarqueeSpeed)
if (!primitiveValue) return;
if (primitiveValue->getIdent()) {
switch (primitiveValue->getIdent())
{
case CSS_VAL_SLOW:
style->setMarqueeSpeed(500); // 500 msec.
break;
case CSS_VAL_NORMAL:
style->setMarqueeSpeed(85); // 85msec. The WinIE default.
break;
case CSS_VAL_FAST:
style->setMarqueeSpeed(10); // 10msec. Super fast.
break;
}
}
else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S)
style->setMarqueeSpeed(int(1000*primitiveValue->floatValue(CSSPrimitiveValue::CSS_S)));
else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_MS)
style->setMarqueeSpeed(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_MS)));
else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) // For scrollamount support.
style->setMarqueeSpeed(int(primitiveValue->floatValue(CSSPrimitiveValue::CSS_NUMBER)));
break;
}
case CSS_PROP__KHTML_MARQUEE_INCREMENT: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(marqueeIncrement, MarqueeIncrement)
if (!primitiveValue) return;
if (primitiveValue->getIdent()) {
switch (primitiveValue->getIdent())
{
case CSS_VAL_SMALL:
style->setMarqueeIncrement(Length(1, Fixed)); // 1px.
break;
case CSS_VAL_NORMAL:
style->setMarqueeIncrement(Length(6, Fixed)); // 6px. The WinIE default.
break;
case CSS_VAL_LARGE:
style->setMarqueeIncrement(Length(36, Fixed)); // 36px.
break;
}
}
else {
bool ok = true;
Length l = convertToLength(primitiveValue, style, logicalDpiY, &ok);
if (ok)
style->setMarqueeIncrement(l);
}
break;
}
case CSS_PROP__KHTML_MARQUEE_STYLE: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(marqueeBehavior, MarqueeBehavior)
if (!primitiveValue || !primitiveValue->getIdent()) return;
switch (primitiveValue->getIdent())
{
case CSS_VAL_NONE:
style->setMarqueeBehavior(MNONE);
break;
case CSS_VAL_SCROLL:
style->setMarqueeBehavior(MSCROLL);
break;
case CSS_VAL_SLIDE:
style->setMarqueeBehavior(MSLIDE);
break;
case CSS_VAL_ALTERNATE:
style->setMarqueeBehavior(MALTERNATE);
break;
case CSS_VAL_UNFURL:
style->setMarqueeBehavior(MUNFURL);
break;
}
break;
}
case CSS_PROP__KHTML_MARQUEE_DIRECTION: {
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(marqueeDirection, MarqueeDirection)
if (!primitiveValue || !primitiveValue->getIdent()) return;
switch (primitiveValue->getIdent())
{
case CSS_VAL_FORWARDS:
style->setMarqueeDirection(MFORWARD);
break;
case CSS_VAL_BACKWARDS:
style->setMarqueeDirection(MBACKWARD);
break;
case CSS_VAL_AUTO:
style->setMarqueeDirection(MAUTO);
break;
case CSS_VAL_AHEAD:
case CSS_VAL_UP: // We don't support vertical languages, so AHEAD just maps to UP.
style->setMarqueeDirection(MUP);
break;
case CSS_VAL_REVERSE:
case CSS_VAL_DOWN: // REVERSE just maps to DOWN, since we don't do vertical text.
style->setMarqueeDirection(MDOWN);
break;
case CSS_VAL_LEFT:
style->setMarqueeDirection(MLEFT);
break;
case CSS_VAL_RIGHT:
style->setMarqueeDirection(MRIGHT);
break;
}
break;
case CSS_PROP_TEXT_OVERFLOW: {
// This property is supported by WinIE, and so we leave off the "-khtml-" in order to
// work with WinIE-specific pages that use the property.
HANDLE_INITIAL_AND_INHERIT_ON_NONINHERITED_PROPERTY(textOverflow, TextOverflow)
if (!primitiveValue || !primitiveValue->getIdent())
return;
style->setTextOverflow(primitiveValue->getIdent() == CSS_VAL_ELLIPSIS);
break;
}
}
default:
return;
}
}
void CSSStyleSelector::mapBackgroundAttachment(BackgroundLayer* layer, DOM::CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundAttachment(RenderStyle::initialBackgroundAttachment());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
switch (primitiveValue->getIdent()) {
case CSS_VAL_FIXED:
layer->setBackgroundAttachment(false);
break;
case CSS_VAL_SCROLL:
layer->setBackgroundAttachment(true);
break;
default:
return;
}
}
void CSSStyleSelector::mapBackgroundClip(BackgroundLayer* layer, CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundClip(RenderStyle::initialBackgroundClip());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
switch (primitiveValue->getIdent()) {
case CSS_VAL_BORDER:
layer->setBackgroundClip(BGBORDER);
break;
case CSS_VAL_PADDING:
layer->setBackgroundClip(BGPADDING);
break;
default: // CSS_VAL_CONTENT
layer->setBackgroundClip(BGCONTENT);
break;
}
}
void CSSStyleSelector::mapBackgroundOrigin(BackgroundLayer* layer, CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundOrigin(RenderStyle::initialBackgroundOrigin());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
switch (primitiveValue->getIdent()) {
case CSS_VAL_BORDER:
layer->setBackgroundOrigin(BGBORDER);
break;
case CSS_VAL_PADDING:
layer->setBackgroundOrigin(BGPADDING);
break;
default: // CSS_VAL_CONTENT
layer->setBackgroundOrigin(BGCONTENT);
break;
}
}
void CSSStyleSelector::mapBackgroundImage(BackgroundLayer* layer, DOM::CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundImage(RenderStyle::initialBackgroundImage());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
layer->setBackgroundImage(static_cast(primitiveValue)->image());
}
void CSSStyleSelector::mapBackgroundRepeat(BackgroundLayer* layer, DOM::CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundRepeat(RenderStyle::initialBackgroundRepeat());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
switch(primitiveValue->getIdent()) {
case CSS_VAL_REPEAT:
layer->setBackgroundRepeat(REPEAT);
break;
case CSS_VAL_REPEAT_X:
layer->setBackgroundRepeat(REPEAT_X);
break;
case CSS_VAL_REPEAT_Y:
layer->setBackgroundRepeat(REPEAT_Y);
break;
case CSS_VAL_NO_REPEAT:
layer->setBackgroundRepeat(NO_REPEAT);
break;
default:
return;
}
}
void CSSStyleSelector::mapBackgroundSize(BackgroundLayer* layer, CSSValueImpl* value)
{
LengthSize b = RenderStyle::initialBackgroundSize();
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundSize(b);
return;
}
if (!value->isPrimitiveValue())
return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
PairImpl* pair = primitiveValue->getPairValue();
if (!pair)
return;
CSSPrimitiveValueImpl* first = static_cast(pair->first());
CSSPrimitiveValueImpl* second = static_cast(pair->second());
if (!first || !second)
return;
Length firstLength, secondLength;
int firstType = first->primitiveType();
int secondType = second->primitiveType();
if (firstType == CSSPrimitiveValue::CSS_UNKNOWN)
firstLength = Length(Variable);
else if (firstType > CSSPrimitiveValue::CSS_PERCENTAGE && firstType < CSSPrimitiveValue::CSS_DEG)
firstLength = Length(first->computeLength(style, logicalDpiY), Fixed);
else if (firstType == CSSPrimitiveValue::CSS_PERCENTAGE)
firstLength = Length((int)first->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
else
return;
if (secondType == CSSPrimitiveValue::CSS_UNKNOWN)
secondLength = Length(Variable);
else if (secondType > CSSPrimitiveValue::CSS_PERCENTAGE && secondType < CSSPrimitiveValue::CSS_DEG)
secondLength = Length(second->computeLength(style, logicalDpiY), Fixed);
else if (secondType == CSSPrimitiveValue::CSS_PERCENTAGE)
secondLength = Length((int)second->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
else
return;
b.width = firstLength;
b.height = secondLength;
layer->setBackgroundSize(b);
}
void CSSStyleSelector::mapBackgroundXPosition(BackgroundLayer* layer, DOM::CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundXPosition(RenderStyle::initialBackgroundXPosition());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
Length l;
int type = primitiveValue->primitiveType();
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
l = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed);
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
else
return;
layer->setBackgroundXPosition(l);
}
void CSSStyleSelector::mapBackgroundYPosition(BackgroundLayer* layer, DOM::CSSValueImpl* value)
{
if (value->cssValueType() == CSSValue::CSS_INITIAL) {
layer->setBackgroundYPosition(RenderStyle::initialBackgroundYPosition());
return;
}
if (!value->isPrimitiveValue()) return;
CSSPrimitiveValueImpl* primitiveValue = static_cast(value);
Length l;
int type = primitiveValue->primitiveType();
if(type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG)
l = Length(primitiveValue->computeLength(style, logicalDpiY), Fixed);
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length((int)primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
else
return;
layer->setBackgroundYPosition(l);
}
#ifdef APPLE_CHANGES
void CSSStyleSelector::checkForGenericFamilyChange(RenderStyle* aStyle, RenderStyle* aParentStyle)
{
const FontDef& childFont = aStyle->htmlFont().fontDef;
if (childFont.sizeSpecified || !aParentStyle)
return;
const FontDef& parentFont = aParentStyle->htmlFont().fontDef;
if (childFont.genericFamily == parentFont.genericFamily)
return;
// For now, lump all families but monospace together.
if (childFont.genericFamily != FontDef::eMonospace &&
parentFont.genericFamily != FontDef::eMonospace)
return;
// We know the parent is monospace or the child is monospace, and that font
// size was unspecified. We want to alter our font size to use the correct
// "medium" font for our family.
float size = 0;
int minFontSize = settings->minFontSize();
size = (childFont.genericFamily == FontDef::eMonospace) ? m_fixedFontSizes[3] : m_fontSizes[3];
int isize = (int)size;
if (isize < minFontSize)
isize = minFontSize;
FontDef newFontDef(childFont);
newFontDef.size = isize;
aStyle->setFontDef(newFontDef);
}
#endif
} // namespace khtml
// kate: space-indent on; indent-width 4; tab-width 8;
diff --git a/khtml/css/cssvalues.c b/khtml/css/cssvalues.c
index 03e5fa6c7c..45beff59aa 100644
--- a/khtml/css/cssvalues.c
+++ b/khtml/css/cssvalues.c
@@ -1,1359 +1,1263 @@
-/* ANSI-C code produced by gperf version 3.0.1 */
+/* ANSI-C code produced by gperf version 3.0.2 */
/* Command-line: gperf -L ANSI-C -E -c -C -n -o -t -k '*' -NfindValue -Hhash_val -Wwordlist_value -D cssvalues.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
#error "gperf generated tables don't work with this execution character set. Please report a bug to ."
#endif
#line 1 "cssvalues.gperf"
/* This file is automatically generated from cssvalues.in by makevalues, do not edit */
/* Copyright 1999 W. Bastian */
#include "cssvalues.h"
#line 6 "cssvalues.gperf"
struct css_value {
const char *name;
int id;
};
static const css_value * findValue (register const char *str, register unsigned int len);
-/* maximum key range = 3056, duplicates = 0 */
+/* maximum key range = 1680, duplicates = 0 */
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
hash_val (register const char *str, register unsigned int len)
{
static const unsigned short asso_values[] =
{
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 420, 225, 3056, 0, 0,
- 105, 100, 40, 35, 20, 15, 10, 5, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 175, 60, 0,
- 20, 45, 235, 380, 270, 5, 113, 65, 0, 35,
- 0, 5, 265, 465, 100, 20, 5, 195, 223, 13,
- 3, 68, 10, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056, 3056,
- 3056, 3056, 3056, 3056, 3056, 3056, 3056
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 70, 378, 1680, 0, 0,
+ 160, 80, 55, 50, 35, 30, 20, 5, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 0, 55, 10,
+ 95, 5, 190, 435, 3, 80, 113, 70, 0, 5,
+ 130, 20, 0, 16, 5, 0, 120, 105, 166, 238,
+ 38, 290, 390, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680, 1680,
+ 1680, 1680, 1680, 1680, 1680, 1680, 1680
};
register int hval = 0;
switch (len)
{
default:
hval += asso_values[(unsigned char)str[27]];
/*FALLTHROUGH*/
case 27:
hval += asso_values[(unsigned char)str[26]];
/*FALLTHROUGH*/
case 26:
hval += asso_values[(unsigned char)str[25]];
/*FALLTHROUGH*/
case 25:
hval += asso_values[(unsigned char)str[24]];
/*FALLTHROUGH*/
case 24:
hval += asso_values[(unsigned char)str[23]];
/*FALLTHROUGH*/
case 23:
hval += asso_values[(unsigned char)str[22]];
/*FALLTHROUGH*/
case 22:
hval += asso_values[(unsigned char)str[21]];
/*FALLTHROUGH*/
case 21:
hval += asso_values[(unsigned char)str[20]];
/*FALLTHROUGH*/
case 20:
hval += asso_values[(unsigned char)str[19]];
/*FALLTHROUGH*/
case 19:
hval += asso_values[(unsigned char)str[18]];
/*FALLTHROUGH*/
case 18:
hval += asso_values[(unsigned char)str[17]];
/*FALLTHROUGH*/
case 17:
hval += asso_values[(unsigned char)str[16]];
/*FALLTHROUGH*/
case 16:
hval += asso_values[(unsigned char)str[15]];
/*FALLTHROUGH*/
case 15:
hval += asso_values[(unsigned char)str[14]];
/*FALLTHROUGH*/
case 14:
hval += asso_values[(unsigned char)str[13]];
/*FALLTHROUGH*/
case 13:
hval += asso_values[(unsigned char)str[12]];
/*FALLTHROUGH*/
case 12:
hval += asso_values[(unsigned char)str[11]];
/*FALLTHROUGH*/
case 11:
hval += asso_values[(unsigned char)str[10]];
/*FALLTHROUGH*/
case 10:
hval += asso_values[(unsigned char)str[9]];
/*FALLTHROUGH*/
case 9:
hval += asso_values[(unsigned char)str[8]];
/*FALLTHROUGH*/
case 8:
hval += asso_values[(unsigned char)str[7]];
/*FALLTHROUGH*/
case 7:
hval += asso_values[(unsigned char)str[6]];
/*FALLTHROUGH*/
case 6:
hval += asso_values[(unsigned char)str[5]];
/*FALLTHROUGH*/
case 5:
hval += asso_values[(unsigned char)str[4]];
/*FALLTHROUGH*/
case 4:
- hval += asso_values[(unsigned char)str[3]];
+ hval += asso_values[(unsigned char)str[3]+1];
/*FALLTHROUGH*/
case 3:
hval += asso_values[(unsigned char)str[2]+1];
/*FALLTHROUGH*/
case 2:
hval += asso_values[(unsigned char)str[1]];
/*FALLTHROUGH*/
case 1:
hval += asso_values[(unsigned char)str[0]];
break;
}
return hval;
}
#ifdef __GNUC__
__inline
#endif
const struct css_value *
findValue (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 274,
+ TOTAL_KEYWORDS = 288,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 28,
MIN_HASH_VALUE = 0,
- MAX_HASH_VALUE = 3055
+ MAX_HASH_VALUE = 1679
};
static const struct css_value wordlist_value[] =
{
#line 40 "cssvalues.gperf"
{"100", CSS_VAL_100},
#line 48 "cssvalues.gperf"
{"900", CSS_VAL_900},
+#line 53 "cssvalues.gperf"
+ {"large", CSS_VAL_LARGE},
+#line 272 "cssvalues.gperf"
+ {"scroll", CSS_VAL_SCROLL},
+#line 58 "cssvalues.gperf"
+ {"larger", CSS_VAL_LARGER},
+#line 89 "cssvalues.gperf"
+ {"red", CSS_VAL_RED},
+#line 204 "cssvalues.gperf"
+ {"progress", CSS_VAL_PROGRESS},
#line 47 "cssvalues.gperf"
{"800", CSS_VAL_800},
+#line 206 "cssvalues.gperf"
+ {"cell", CSS_VAL_CELL},
+#line 258 "cssvalues.gperf"
+ {"hand", CSS_VAL_HAND},
+#line 202 "cssvalues.gperf"
+ {"help", CSS_VAL_HELP},
#line 46 "cssvalues.gperf"
{"700", CSS_VAL_700},
+#line 254 "cssvalues.gperf"
+ {"crop", CSS_VAL_CROP},
#line 45 "cssvalues.gperf"
{"600", CSS_VAL_600},
-#line 216 "cssvalues.gperf"
- {"ltr", CSS_VAL_LTR},
-#line 276 "cssvalues.gperf"
- {"down", CSS_VAL_DOWN},
-#line 146 "cssvalues.gperf"
- {"disc", CSS_VAL_DISC},
+#line 291 "cssvalues.gperf"
+ {"slow", CSS_VAL_SLOW},
+#line 262 "cssvalues.gperf"
+ {"landscape", CSS_VAL_LANDSCAPE},
+#line 274 "cssvalues.gperf"
+ {"show", CSS_VAL_SHOW},
+#line 236 "cssvalues.gperf"
+ {"collapse", CSS_VAL_COLLAPSE},
#line 44 "cssvalues.gperf"
{"500", CSS_VAL_500},
#line 43 "cssvalues.gperf"
{"400", CSS_VAL_400},
-#line 258 "cssvalues.gperf"
- {"scroll", CSS_VAL_SCROLL},
-#line 83 "cssvalues.gperf"
- {"lime", CSS_VAL_LIME},
-#line 17 "cssvalues.gperf"
- {"none", CSS_VAL_NONE},
-#line 19 "cssvalues.gperf"
- {"inset", CSS_VAL_INSET},
-#line 118 "cssvalues.gperf"
- {"window", CSS_VAL_WINDOW},
-#line 286 "cssvalues.gperf"
- {"content", CSS_VAL_CONTENT},
-#line 147 "cssvalues.gperf"
- {"circle", CSS_VAL_CIRCLE},
-#line 33 "cssvalues.gperf"
- {"italic", CSS_VAL_ITALIC},
-#line 145 "cssvalues.gperf"
- {"inside", CSS_VAL_INSIDE},
-#line 25 "cssvalues.gperf"
- {"solid", CSS_VAL_SOLID},
-#line 183 "cssvalues.gperf"
- {"inline", CSS_VAL_INLINE},
-#line 261 "cssvalues.gperf"
- {"static", CSS_VAL_STATIC},
-#line 204 "cssvalues.gperf"
- {"move", CSS_VAL_MOVE},
-#line 42 "cssvalues.gperf"
- {"300", CSS_VAL_300},
-#line 249 "cssvalues.gperf"
- {"level", CSS_VAL_LEVEL},
-#line 41 "cssvalues.gperf"
- {"200", CSS_VAL_200},
-#line 254 "cssvalues.gperf"
- {"mix", CSS_VAL_MIX},
-#line 91 "cssvalues.gperf"
- {"teal", CSS_VAL_TEAL},
+#line 73 "cssvalues.gperf"
+ {"monospace", CSS_VAL_MONOSPACE},
#line 51 "cssvalues.gperf"
{"small", CSS_VAL_SMALL},
-#line 120 "cssvalues.gperf"
- {"windowtext", CSS_VAL_WINDOWTEXT},
+#line 112 "cssvalues.gperf"
+ {"scrollbar", CSS_VAL_SCROLLBAR},
+#line 57 "cssvalues.gperf"
+ {"smaller", CSS_VAL_SMALLER},
+#line 42 "cssvalues.gperf"
+ {"300", CSS_VAL_300},
#line 37 "cssvalues.gperf"
{"bold", CSS_VAL_BOLD},
-#line 213 "cssvalues.gperf"
- {"text", CSS_VAL_TEXT},
-#line 149 "cssvalues.gperf"
- {"box", CSS_VAL_BOX},
-#line 217 "cssvalues.gperf"
- {"rtl", CSS_VAL_RTL},
-#line 242 "cssvalues.gperf"
- {"embed", CSS_VAL_EMBED},
+#line 299 "cssvalues.gperf"
+ {"border", CSS_VAL_BORDER},
+#line 38 "cssvalues.gperf"
+ {"bolder", CSS_VAL_BOLDER},
+#line 21 "cssvalues.gperf"
+ {"ridge", CSS_VAL_RIDGE},
#line 128 "cssvalues.gperf"
{"middle", CSS_VAL_MIDDLE},
-#line 252 "cssvalues.gperf"
- {"lower", CSS_VAL_LOWER},
-#line 236 "cssvalues.gperf"
- {"below", CSS_VAL_BELOW},
-#line 63 "cssvalues.gperf"
- {"condensed", CSS_VAL_CONDENSED},
-#line 14 "cssvalues.gperf"
- {"inherit", CSS_VAL_INHERIT},
-#line 93 "cssvalues.gperf"
- {"yellow", CSS_VAL_YELLOW},
-#line 247 "cssvalues.gperf"
- {"invert", CSS_VAL_INVERT},
-#line 76 "cssvalues.gperf"
- {"black", CSS_VAL_BLACK},
-#line 89 "cssvalues.gperf"
- {"red", CSS_VAL_RED},
-#line 280 "cssvalues.gperf"
- {"slide", CSS_VAL_SLIDE},
-#line 139 "cssvalues.gperf"
- {"center", CSS_VAL_CENTER},
-#line 59 "cssvalues.gperf"
- {"wider", CSS_VAL_WIDER},
+#line 289 "cssvalues.gperf"
+ {"up", CSS_VAL_UP},
+#line 28 "cssvalues.gperf"
+ {"icon", CSS_VAL_ICON},
#line 129 "cssvalues.gperf"
{"sub", CSS_VAL_SUB},
+#line 230 "cssvalues.gperf"
+ {"ltr", CSS_VAL_LTR},
+#line 294 "cssvalues.gperf"
+ {"slide", CSS_VAL_SLIDE},
+#line 267 "cssvalues.gperf"
+ {"marquee", CSS_VAL_MARQUEE},
+#line 88 "cssvalues.gperf"
+ {"purple", CSS_VAL_PURPLE},
+#line 231 "cssvalues.gperf"
+ {"rtl", CSS_VAL_RTL},
+#line 255 "cssvalues.gperf"
+ {"cross", CSS_VAL_CROSS},
+#line 297 "cssvalues.gperf"
+ {"clip", CSS_VAL_CLIP},
#line 189 "cssvalues.gperf"
{"table", CSS_VAL_TABLE},
-#line 269 "cssvalues.gperf"
- {"enabled", CSS_VAL_ENABLED},
-#line 36 "cssvalues.gperf"
- {"normal", CSS_VAL_NORMAL},
-#line 238 "cssvalues.gperf"
- {"blink", CSS_VAL_BLINK},
+#line 35 "cssvalues.gperf"
+ {"small-caps", CSS_VAL_SMALL_CAPS},
+#line 139 "cssvalues.gperf"
+ {"center", CSS_VAL_CENTER},
#line 84 "cssvalues.gperf"
{"maroon", CSS_VAL_MAROON},
-#line 251 "cssvalues.gperf"
+#line 133 "cssvalues.gperf"
+ {"top", CSS_VAL_TOP},
+#line 41 "cssvalues.gperf"
+ {"200", CSS_VAL_200},
+#line 96 "cssvalues.gperf"
+ {"appworkspace", CSS_VAL_APPWORKSPACE},
+#line 210 "cssvalues.gperf"
+ {"alias", CSS_VAL_ALIAS},
+#line 290 "cssvalues.gperf"
+ {"down", CSS_VAL_DOWN},
+#line 260 "cssvalues.gperf"
+ {"higher", CSS_VAL_HIGHER},
+#line 91 "cssvalues.gperf"
+ {"teal", CSS_VAL_TEAL},
+#line 241 "cssvalues.gperf"
+ {"nowrap", CSS_VAL_NOWRAP},
+#line 147 "cssvalues.gperf"
+ {"circle", CSS_VAL_CIRCLE},
+#line 265 "cssvalues.gperf"
{"loud", CSS_VAL_LOUD},
-#line 285 "cssvalues.gperf"
- {"border", CSS_VAL_BORDER},
-#line 85 "cssvalues.gperf"
- {"navy", CSS_VAL_NAVY},
-#line 57 "cssvalues.gperf"
- {"smaller", CSS_VAL_SMALLER},
-#line 38 "cssvalues.gperf"
- {"bolder", CSS_VAL_BOLDER},
-#line 28 "cssvalues.gperf"
- {"icon", CSS_VAL_ICON},
-#line 78 "cssvalues.gperf"
- {"crimson", CSS_VAL_CRIMSON},
+#line 242 "cssvalues.gperf"
+ {"pre", CSS_VAL_PRE},
#line 29 "cssvalues.gperf"
{"menu", CSS_VAL_MENU},
-#line 23 "cssvalues.gperf"
- {"dotted", CSS_VAL_DOTTED},
-#line 277 "cssvalues.gperf"
- {"slow", CSS_VAL_SLOW},
-#line 151 "cssvalues.gperf"
- {"decimal", CSS_VAL_DECIMAL},
-#line 15 "cssvalues.gperf"
- {"initial", CSS_VAL_INITIAL},
-#line 134 "cssvalues.gperf"
- {"bottom", CSS_VAL_BOTTOM},
-#line 214 "cssvalues.gperf"
- {"wait", CSS_VAL_WAIT},
-#line 69 "cssvalues.gperf"
- {"serif", CSS_VAL_SERIF},
-#line 77 "cssvalues.gperf"
- {"blue", CSS_VAL_BLUE},
-#line 270 "cssvalues.gperf"
- {"disabled", CSS_VAL_DISABLED},
-#line 127 "cssvalues.gperf"
- {"baseline", CSS_VAL_BASELINE},
-#line 111 "cssvalues.gperf"
- {"menutext", CSS_VAL_MENUTEXT},
-#line 221 "cssvalues.gperf"
- {"visible", CSS_VAL_VISIBLE},
-#line 26 "cssvalues.gperf"
- {"double", CSS_VAL_DOUBLE},
-#line 52 "cssvalues.gperf"
- {"medium", CSS_VAL_MEDIUM},
-#line 245 "cssvalues.gperf"
- {"hide", CSS_VAL_HIDE},
-#line 274 "cssvalues.gperf"
- {"reverse", CSS_VAL_REVERSE},
-#line 243 "cssvalues.gperf"
- {"fixed", CSS_VAL_FIXED},
-#line 283 "cssvalues.gperf"
- {"clip", CSS_VAL_CLIP},
-#line 112 "cssvalues.gperf"
- {"scrollbar", CSS_VAL_SCROLLBAR},
+#line 298 "cssvalues.gperf"
+ {"ellipsis", CSS_VAL_ELLIPSIS},
+#line 273 "cssvalues.gperf"
+ {"separate", CSS_VAL_SEPARATE},
+#line 199 "cssvalues.gperf"
+ {"auto", CSS_VAL_AUTO},
+#line 184 "cssvalues.gperf"
+ {"block", CSS_VAL_BLOCK},
+#line 207 "cssvalues.gperf"
+ {"crosshair", CSS_VAL_CROSSHAIR},
+#line 197 "cssvalues.gperf"
+ {"table-cell", CSS_VAL_TABLE_CELL},
#line 18 "cssvalues.gperf"
{"hidden", CSS_VAL_HIDDEN},
-#line 86 "cssvalues.gperf"
- {"olive", CSS_VAL_OLIVE},
-#line 263 "cssvalues.gperf"
+#line 25 "cssvalues.gperf"
+ {"solid", CSS_VAL_SOLID},
+#line 75 "cssvalues.gperf"
+ {"aqua", CSS_VAL_AQUA},
+#line 52 "cssvalues.gperf"
+ {"medium", CSS_VAL_MEDIUM},
+#line 148 "cssvalues.gperf"
+ {"square", CSS_VAL_SQUARE},
+#line 266 "cssvalues.gperf"
+ {"lower", CSS_VAL_LOWER},
+#line 277 "cssvalues.gperf"
{"thin", CSS_VAL_THIN},
-#line 184 "cssvalues.gperf"
- {"block", CSS_VAL_BLOCK},
-#line 220 "cssvalues.gperf"
- {"lowercase", CSS_VAL_LOWERCASE},
-#line 284 "cssvalues.gperf"
- {"ellipsis", CSS_VAL_ELLIPSIS},
-#line 241 "cssvalues.gperf"
- {"cross", CSS_VAL_CROSS},
-#line 278 "cssvalues.gperf"
- {"fast", CSS_VAL_FAST},
-#line 90 "cssvalues.gperf"
- {"silver", CSS_VAL_SILVER},
-#line 137 "cssvalues.gperf"
- {"left", CSS_VAL_LEFT},
-#line 264 "cssvalues.gperf"
- {"underline", CSS_VAL_UNDERLINE},
-#line 82 "cssvalues.gperf"
- {"indigo", CSS_VAL_INDIGO},
+#line 252 "cssvalues.gperf"
+ {"blink", CSS_VAL_BLINK},
+#line 253 "cssvalues.gperf"
+ {"both", CSS_VAL_BOTH},
+#line 161 "cssvalues.gperf"
+ {"hebrew", CSS_VAL_HEBREW},
#line 234 "cssvalues.gperf"
- {"always", CSS_VAL_ALWAYS},
-#line 279 "cssvalues.gperf"
- {"infinite", CSS_VAL_INFINITE},
-#line 92 "cssvalues.gperf"
- {"white", CSS_VAL_WHITE},
-#line 110 "cssvalues.gperf"
- {"infotext", CSS_VAL_INFOTEXT},
-#line 187 "cssvalues.gperf"
- {"compact", CSS_VAL_COMPACT},
-#line 262 "cssvalues.gperf"
- {"thick", CSS_VAL_THICK},
-#line 60 "cssvalues.gperf"
- {"narrower", CSS_VAL_NARROWER},
-#line 275 "cssvalues.gperf"
- {"up", CSS_VAL_UP},
-#line 49 "cssvalues.gperf"
- {"xx-small", CSS_VAL_XX_SMALL},
-#line 207 "cssvalues.gperf"
- {"nw-resize", CSS_VAL_NW_RESIZE},
-#line 22 "cssvalues.gperf"
- {"outset", CSS_VAL_OUTSET},
-#line 244 "cssvalues.gperf"
- {"hand", CSS_VAL_HAND},
-#line 161 "cssvalues.gperf"
- {"hebrew", CSS_VAL_HEBREW},
-#line 133 "cssvalues.gperf"
- {"top", CSS_VAL_TOP},
-#line 210 "cssvalues.gperf"
- {"sw-resize", CSS_VAL_SW_RESIZE},
-#line 144 "cssvalues.gperf"
- {"outside", CSS_VAL_OUTSIDE},
-#line 233 "cssvalues.gperf"
- {"absolute", CSS_VAL_ABSOLUTE},
-#line 206 "cssvalues.gperf"
- {"ne-resize", CSS_VAL_NE_RESIZE},
-#line 162 "cssvalues.gperf"
- {"armenian", CSS_VAL_ARMENIAN},
-#line 71 "cssvalues.gperf"
- {"cursive", CSS_VAL_CURSIVE},
-#line 209 "cssvalues.gperf"
- {"se-resize", CSS_VAL_SE_RESIZE},
-#line 101 "cssvalues.gperf"
- {"buttontext", CSS_VAL_BUTTONTEXT},
-#line 185 "cssvalues.gperf"
- {"list-item", CSS_VAL_LIST_ITEM},
-#line 239 "cssvalues.gperf"
- {"both", CSS_VAL_BOTH},
-#line 202 "cssvalues.gperf"
+ {"lowercase", CSS_VAL_LOWERCASE},
+#line 281 "cssvalues.gperf"
+ {"border-box", CSS_VAL_BORDER_BOX},
+#line 76 "cssvalues.gperf"
+ {"black", CSS_VAL_BLACK},
+#line 259 "cssvalues.gperf"
+ {"hide", CSS_VAL_HIDE},
+#line 36 "cssvalues.gperf"
+ {"normal", CSS_VAL_NORMAL},
+#line 203 "cssvalues.gperf"
{"pointer", CSS_VAL_POINTER},
-#line 24 "cssvalues.gperf"
- {"dashed", CSS_VAL_DASHED},
-#line 222 "cssvalues.gperf"
- {"collapse", CSS_VAL_COLLAPSE},
-#line 227 "cssvalues.gperf"
- {"nowrap", CSS_VAL_NOWRAP},
-#line 268 "cssvalues.gperf"
- {"content-box", CSS_VAL_CONTENT_BOX},
-#line 73 "cssvalues.gperf"
- {"monospace", CSS_VAL_MONOSPACE},
-#line 208 "cssvalues.gperf"
- {"n-resize", CSS_VAL_N_RESIZE},
-#line 260 "cssvalues.gperf"
- {"show", CSS_VAL_SHOW},
-#line 199 "cssvalues.gperf"
- {"auto", CSS_VAL_AUTO},
-#line 21 "cssvalues.gperf"
- {"ridge", CSS_VAL_RIDGE},
-#line 212 "cssvalues.gperf"
- {"w-resize", CSS_VAL_W_RESIZE},
+#line 138 "cssvalues.gperf"
+ {"right", CSS_VAL_RIGHT},
+#line 63 "cssvalues.gperf"
+ {"condensed", CSS_VAL_CONDENSED},
+#line 39 "cssvalues.gperf"
+ {"lighter", CSS_VAL_LIGHTER},
+#line 26 "cssvalues.gperf"
+ {"double", CSS_VAL_DOUBLE},
+#line 246 "cssvalues.gperf"
+ {"above", CSS_VAL_ABOVE},
+#line 283 "cssvalues.gperf"
+ {"enabled", CSS_VAL_ENABLED},
+#line 250 "cssvalues.gperf"
+ {"below", CSS_VAL_BELOW},
#line 256 "cssvalues.gperf"
+ {"embed", CSS_VAL_EMBED},
+#line 187 "cssvalues.gperf"
+ {"compact", CSS_VAL_COMPACT},
+#line 69 "cssvalues.gperf"
+ {"serif", CSS_VAL_SERIF},
+#line 134 "cssvalues.gperf"
+ {"bottom", CSS_VAL_BOTTOM},
+#line 151 "cssvalues.gperf"
+ {"decimal", CSS_VAL_DECIMAL},
+#line 130 "cssvalues.gperf"
+ {"super", CSS_VAL_SUPER},
+#line 34 "cssvalues.gperf"
+ {"oblique", CSS_VAL_OBLIQUE},
+#line 173 "cssvalues.gperf"
+ {"lower-alpha", CSS_VAL_LOWER_ALPHA},
+#line 270 "cssvalues.gperf"
{"portrait", CSS_VAL_PORTRAIT},
-#line 211 "cssvalues.gperf"
- {"s-resize", CSS_VAL_S_RESIZE},
-#line 271 "cssvalues.gperf"
+#line 233 "cssvalues.gperf"
+ {"uppercase", CSS_VAL_UPPERCASE},
+#line 90 "cssvalues.gperf"
+ {"silver", CSS_VAL_SILVER},
+#line 123 "cssvalues.gperf"
+ {"repeat", CSS_VAL_REPEAT},
+#line 287 "cssvalues.gperf"
+ {"ahead", CSS_VAL_AHEAD},
+#line 285 "cssvalues.gperf"
{"forwards", CSS_VAL_FORWARDS},
-#line 87 "cssvalues.gperf"
- {"orange", CSS_VAL_ORANGE},
-#line 228 "cssvalues.gperf"
- {"pre", CSS_VAL_PRE},
-#line 80 "cssvalues.gperf"
- {"gray", CSS_VAL_GRAY},
-#line 205 "cssvalues.gperf"
- {"e-resize", CSS_VAL_E_RESIZE},
-#line 255 "cssvalues.gperf"
- {"overline", CSS_VAL_OVERLINE},
-#line 215 "cssvalues.gperf"
- {"help", CSS_VAL_HELP},
-#line 53 "cssvalues.gperf"
- {"large", CSS_VAL_LARGE},
-#line 140 "cssvalues.gperf"
- {"justify", CSS_VAL_JUSTIFY},
-#line 240 "cssvalues.gperf"
- {"crop", CSS_VAL_CROP},
-#line 257 "cssvalues.gperf"
- {"relative", CSS_VAL_RELATIVE},
+#line 33 "cssvalues.gperf"
+ {"italic", CSS_VAL_ITALIC},
#line 50 "cssvalues.gperf"
{"x-small", CSS_VAL_X_SMALL},
-#line 188 "cssvalues.gperf"
- {"inline-block", CSS_VAL_INLINE_BLOCK},
-#line 64 "cssvalues.gperf"
- {"semi-condensed", CSS_VAL_SEMI_CONDENSED},
-#line 272 "cssvalues.gperf"
- {"backwards", CSS_VAL_BACKWARDS},
-#line 138 "cssvalues.gperf"
- {"right", CSS_VAL_RIGHT},
-#line 119 "cssvalues.gperf"
- {"windowframe", CSS_VAL_WINDOWFRAME},
+#line 17 "cssvalues.gperf"
+ {"none", CSS_VAL_NONE},
#line 27 "cssvalues.gperf"
{"caption", CSS_VAL_CAPTION},
-#line 132 "cssvalues.gperf"
- {"text-bottom", CSS_VAL_TEXT_BOTTOM},
-#line 103 "cssvalues.gperf"
- {"graytext", CSS_VAL_GRAYTEXT},
-#line 106 "cssvalues.gperf"
- {"inactiveborder", CSS_VAL_INACTIVEBORDER},
-#line 72 "cssvalues.gperf"
- {"fantasy", CSS_VAL_FANTASY},
-#line 235 "cssvalues.gperf"
+#line 149 "cssvalues.gperf"
+ {"box", CSS_VAL_BOX},
+#line 275 "cssvalues.gperf"
+ {"static", CSS_VAL_STATIC},
+#line 249 "cssvalues.gperf"
{"avoid", CSS_VAL_AVOID},
-#line 197 "cssvalues.gperf"
- {"table-cell", CSS_VAL_TABLE_CELL},
-#line 39 "cssvalues.gperf"
- {"lighter", CSS_VAL_LIGHTER},
+#line 268 "cssvalues.gperf"
+ {"mix", CSS_VAL_MIX},
+#line 86 "cssvalues.gperf"
+ {"olive", CSS_VAL_OLIVE},
#line 248 "cssvalues.gperf"
- {"landscape", CSS_VAL_LANDSCAPE},
-#line 102 "cssvalues.gperf"
- {"captiontext", CSS_VAL_CAPTIONTEXT},
-#line 58 "cssvalues.gperf"
- {"larger", CSS_VAL_LARGER},
-#line 186 "cssvalues.gperf"
- {"run-in", CSS_VAL_RUN_IN},
-#line 267 "cssvalues.gperf"
- {"border-box", CSS_VAL_BORDER_BOX},
-#line 281 "cssvalues.gperf"
- {"alternate", CSS_VAL_ALTERNATE},
-#line 174 "cssvalues.gperf"
- {"lower-latin", CSS_VAL_LOWER_LATIN},
-#line 81 "cssvalues.gperf"
- {"green", CSS_VAL_GREEN},
-#line 194 "cssvalues.gperf"
- {"table-row", CSS_VAL_TABLE_ROW},
-#line 232 "cssvalues.gperf"
- {"above", CSS_VAL_ABOVE},
+ {"always", CSS_VAL_ALWAYS},
+#line 175 "cssvalues.gperf"
+ {"upper-alpha", CSS_VAL_UPPER_ALPHA},
+#line 146 "cssvalues.gperf"
+ {"disc", CSS_VAL_DISC},
+#line 24 "cssvalues.gperf"
+ {"dashed", CSS_VAL_DASHED},
+#line 60 "cssvalues.gperf"
+ {"narrower", CSS_VAL_NARROWER},
+#line 83 "cssvalues.gperf"
+ {"lime", CSS_VAL_LIME},
+#line 276 "cssvalues.gperf"
+ {"thick", CSS_VAL_THICK},
+#line 247 "cssvalues.gperf"
+ {"absolute", CSS_VAL_ABSOLUTE},
+#line 78 "cssvalues.gperf"
+ {"crimson", CSS_VAL_CRIMSON},
+#line 300 "cssvalues.gperf"
+ {"content", CSS_VAL_CONTENT},
+#line 77 "cssvalues.gperf"
+ {"blue", CSS_VAL_BLUE},
+#line 292 "cssvalues.gperf"
+ {"fast", CSS_VAL_FAST},
+#line 229 "cssvalues.gperf"
+ {"all-scroll", CSS_VAL_ALL_SCROLL},
+#line 154 "cssvalues.gperf"
+ {"-khtml-lao", CSS_VAL__KHTML_LAO},
+#line 23 "cssvalues.gperf"
+ {"dotted", CSS_VAL_DOTTED},
+#line 178 "cssvalues.gperf"
+ {"katakana", CSS_VAL_KATAKANA},
+#line 263 "cssvalues.gperf"
+ {"level", CSS_VAL_LEVEL},
+#line 211 "cssvalues.gperf"
+ {"copy", CSS_VAL_COPY},
#line 66 "cssvalues.gperf"
{"expanded", CSS_VAL_EXPANDED},
+#line 271 "cssvalues.gperf"
+ {"relative", CSS_VAL_RELATIVE},
+#line 124 "cssvalues.gperf"
+ {"repeat-x", CSS_VAL_REPEAT_X},
+#line 288 "cssvalues.gperf"
+ {"reverse", CSS_VAL_REVERSE},
+#line 212 "cssvalues.gperf"
+ {"move", CSS_VAL_MOVE},
+#line 205 "cssvalues.gperf"
+ {"wait", CSS_VAL_WAIT},
#line 74 "cssvalues.gperf"
{"transparent", CSS_VAL_TRANSPARENT},
-#line 121 "cssvalues.gperf"
- {"grey", CSS_VAL_GREY},
-#line 88 "cssvalues.gperf"
- {"purple", CSS_VAL_PURPLE},
-#line 190 "cssvalues.gperf"
- {"inline-table", CSS_VAL_INLINE_TABLE},
-#line 107 "cssvalues.gperf"
- {"inactivecaption", CSS_VAL_INACTIVECAPTION},
-#line 34 "cssvalues.gperf"
- {"oblique", CSS_VAL_OBLIQUE},
-#line 131 "cssvalues.gperf"
- {"text-top", CSS_VAL_TEXT_TOP},
-#line 201 "cssvalues.gperf"
- {"default", CSS_VAL_DEFAULT},
-#line 130 "cssvalues.gperf"
- {"super", CSS_VAL_SUPER},
-#line 123 "cssvalues.gperf"
- {"repeat", CSS_VAL_REPEAT},
-#line 108 "cssvalues.gperf"
- {"inactivecaptiontext", CSS_VAL_INACTIVECAPTIONTEXT},
-#line 114 "cssvalues.gperf"
- {"threedface", CSS_VAL_THREEDFACE},
-#line 126 "cssvalues.gperf"
- {"no-repeat", CSS_VAL_NO_REPEAT},
-#line 282 "cssvalues.gperf"
- {"unfurl", CSS_VAL_UNFURL},
-#line 273 "cssvalues.gperf"
- {"ahead", CSS_VAL_AHEAD},
+#line 183 "cssvalues.gperf"
+ {"inline", CSS_VAL_INLINE},
+#line 92 "cssvalues.gperf"
+ {"white", CSS_VAL_WHITE},
+#line 237 "cssvalues.gperf"
+ {"close-quote", CSS_VAL_CLOSE_QUOTE},
+#line 194 "cssvalues.gperf"
+ {"table-row", CSS_VAL_TABLE_ROW},
+#line 22 "cssvalues.gperf"
+ {"outset", CSS_VAL_OUTSET},
+#line 111 "cssvalues.gperf"
+ {"menutext", CSS_VAL_MENUTEXT},
#line 196 "cssvalues.gperf"
{"table-column", CSS_VAL_TABLE_COLUMN},
-#line 218 "cssvalues.gperf"
- {"capitalize", CSS_VAL_CAPITALIZE},
#line 159 "cssvalues.gperf"
{"lower-roman", CSS_VAL_LOWER_ROMAN},
-#line 287 "cssvalues.gperf"
- {"padding", CSS_VAL_PADDING},
-#line 117 "cssvalues.gperf"
- {"threedshadow", CSS_VAL_THREEDSHADOW},
-#line 98 "cssvalues.gperf"
- {"buttonface", CSS_VAL_BUTTONFACE},
+#line 71 "cssvalues.gperf"
+ {"cursive", CSS_VAL_CURSIVE},
+#line 286 "cssvalues.gperf"
+ {"backwards", CSS_VAL_BACKWARDS},
+#line 70 "cssvalues.gperf"
+ {"sans-serif", CSS_VAL_SANS_SERIF},
+#line 31 "cssvalues.gperf"
+ {"small-caption", CSS_VAL_SMALL_CAPTION},
+#line 284 "cssvalues.gperf"
+ {"disabled", CSS_VAL_DISABLED},
+#line 15 "cssvalues.gperf"
+ {"initial", CSS_VAL_INITIAL},
+#line 32 "cssvalues.gperf"
+ {"status-bar", CSS_VAL_STATUS_BAR},
+#line 59 "cssvalues.gperf"
+ {"wider", CSS_VAL_WIDER},
+#line 208 "cssvalues.gperf"
+ {"text", CSS_VAL_TEXT},
+#line 144 "cssvalues.gperf"
+ {"outside", CSS_VAL_OUTSIDE},
+#line 235 "cssvalues.gperf"
+ {"visible", CSS_VAL_VISIBLE},
+#line 87 "cssvalues.gperf"
+ {"orange", CSS_VAL_ORANGE},
+#line 145 "cssvalues.gperf"
+ {"inside", CSS_VAL_INSIDE},
+#line 137 "cssvalues.gperf"
+ {"left", CSS_VAL_LEFT},
+#line 160 "cssvalues.gperf"
+ {"upper-roman", CSS_VAL_UPPER_ROMAN},
#line 79 "cssvalues.gperf"
{"fuchsia", CSS_VAL_FUCHSIA},
-#line 55 "cssvalues.gperf"
- {"xx-large", CSS_VAL_XX_LARGE},
-#line 200 "cssvalues.gperf"
- {"crosshair", CSS_VAL_CROSSHAIR},
-#line 246 "cssvalues.gperf"
- {"higher", CSS_VAL_HIGHER},
-#line 100 "cssvalues.gperf"
- {"buttonshadow", CSS_VAL_BUTTONSHADOW},
+#line 295 "cssvalues.gperf"
+ {"alternate", CSS_VAL_ALTERNATE},
+#line 213 "cssvalues.gperf"
+ {"no-drop", CSS_VAL_NO_DROP},
+#line 279 "cssvalues.gperf"
+ {"-khtml-normal", CSS_VAL__KHTML_NORMAL},
+#line 93 "cssvalues.gperf"
+ {"yellow", CSS_VAL_YELLOW},
+#line 240 "cssvalues.gperf"
+ {"open-quote", CSS_VAL_OPEN_QUOTE},
+#line 198 "cssvalues.gperf"
+ {"table-caption", CSS_VAL_TABLE_CAPTION},
+#line 49 "cssvalues.gperf"
+ {"xx-small", CSS_VAL_XX_SMALL},
+#line 127 "cssvalues.gperf"
+ {"baseline", CSS_VAL_BASELINE},
#line 94 "cssvalues.gperf"
{"activeborder", CSS_VAL_ACTIVEBORDER},
-#line 253 "cssvalues.gperf"
- {"marquee", CSS_VAL_MARQUEE},
-#line 31 "cssvalues.gperf"
- {"small-caption", CSS_VAL_SMALL_CAPTION},
-#line 35 "cssvalues.gperf"
- {"small-caps", CSS_VAL_SMALL_CAPS},
-#line 122 "cssvalues.gperf"
- {"-khtml-text", CSS_VAL__KHTML_TEXT},
+#line 185 "cssvalues.gperf"
+ {"list-item", CSS_VAL_LIST_ITEM},
+#line 67 "cssvalues.gperf"
+ {"extra-expanded", CSS_VAL_EXTRA_EXPANDED},
+#line 269 "cssvalues.gperf"
+ {"overline", CSS_VAL_OVERLINE},
+#line 282 "cssvalues.gperf"
+ {"content-box", CSS_VAL_CONTENT_BOX},
+#line 118 "cssvalues.gperf"
+ {"window", CSS_VAL_WINDOW},
+#line 157 "cssvalues.gperf"
+ {"-khtml-thai", CSS_VAL__KHTML_THAI},
+#line 72 "cssvalues.gperf"
+ {"fantasy", CSS_VAL_FANTASY},
+#line 180 "cssvalues.gperf"
+ {"katakana-iroha", CSS_VAL_KATAKANA_IROHA},
#line 20 "cssvalues.gperf"
{"groove", CSS_VAL_GROOVE},
-#line 97 "cssvalues.gperf"
- {"background", CSS_VAL_BACKGROUND},
-#line 178 "cssvalues.gperf"
- {"katakana", CSS_VAL_KATAKANA},
-#line 148 "cssvalues.gperf"
- {"square", CSS_VAL_SQUARE},
-#line 259 "cssvalues.gperf"
- {"separate", CSS_VAL_SEPARATE},
-#line 75 "cssvalues.gperf"
- {"aqua", CSS_VAL_AQUA},
-#line 70 "cssvalues.gperf"
- {"sans-serif", CSS_VAL_SANS_SERIF},
-#line 32 "cssvalues.gperf"
- {"status-bar", CSS_VAL_STATUS_BAR},
+#line 54 "cssvalues.gperf"
+ {"x-large", CSS_VAL_X_LARGE},
+#line 114 "cssvalues.gperf"
+ {"threedface", CSS_VAL_THREEDFACE},
+#line 155 "cssvalues.gperf"
+ {"-khtml-persian", CSS_VAL__KHTML_PERSIAN},
+#line 201 "cssvalues.gperf"
+ {"context-menu", CSS_VAL_CONTEXT_MENU},
+#line 19 "cssvalues.gperf"
+ {"inset", CSS_VAL_INSET},
+#line 102 "cssvalues.gperf"
+ {"captiontext", CSS_VAL_CAPTIONTEXT},
+#line 136 "cssvalues.gperf"
+ {"-khtml-auto", CSS_VAL__KHTML_AUTO},
+#line 68 "cssvalues.gperf"
+ {"ultra-expanded", CSS_VAL_ULTRA_EXPANDED},
+#line 278 "cssvalues.gperf"
+ {"underline", CSS_VAL_UNDERLINE},
+#line 174 "cssvalues.gperf"
+ {"lower-latin", CSS_VAL_LOWER_LATIN},
+#line 301 "cssvalues.gperf"
+ {"padding", CSS_VAL_PADDING},
+#line 126 "cssvalues.gperf"
+ {"no-repeat", CSS_VAL_NO_REPEAT},
+#line 162 "cssvalues.gperf"
+ {"armenian", CSS_VAL_ARMENIAN},
+#line 143 "cssvalues.gperf"
+ {"-khtml-center", CSS_VAL__KHTML_CENTER},
+#line 122 "cssvalues.gperf"
+ {"-khtml-text", CSS_VAL__KHTML_TEXT},
+#line 14 "cssvalues.gperf"
+ {"inherit", CSS_VAL_INHERIT},
#line 65 "cssvalues.gperf"
{"semi-expanded", CSS_VAL_SEMI_EXPANDED},
-#line 230 "cssvalues.gperf"
- {"pre-line", CSS_VAL_PRE_LINE},
-#line 237 "cssvalues.gperf"
+#line 188 "cssvalues.gperf"
+ {"inline-block", CSS_VAL_INLINE_BLOCK},
+#line 125 "cssvalues.gperf"
+ {"repeat-y", CSS_VAL_REPEAT_Y},
+#line 177 "cssvalues.gperf"
+ {"hiragana", CSS_VAL_HIRAGANA},
+#line 251 "cssvalues.gperf"
{"bidi-override", CSS_VAL_BIDI_OVERRIDE},
#line 62 "cssvalues.gperf"
{"extra-condensed", CSS_VAL_EXTRA_CONDENSED},
-#line 95 "cssvalues.gperf"
- {"activecaption", CSS_VAL_ACTIVECAPTION},
-#line 198 "cssvalues.gperf"
- {"table-caption", CSS_VAL_TABLE_CAPTION},
-#line 154 "cssvalues.gperf"
- {"-khtml-lao", CSS_VAL__KHTML_LAO},
-#line 143 "cssvalues.gperf"
- {"-khtml-center", CSS_VAL__KHTML_CENTER},
-#line 54 "cssvalues.gperf"
- {"x-large", CSS_VAL_X_LARGE},
-#line 30 "cssvalues.gperf"
- {"message-box", CSS_VAL_MESSAGE_BOX},
-#line 203 "cssvalues.gperf"
- {"progress", CSS_VAL_PROGRESS},
-#line 177 "cssvalues.gperf"
- {"hiragana", CSS_VAL_HIRAGANA},
-#line 171 "cssvalues.gperf"
- {"lower-greek", CSS_VAL_LOWER_GREEK},
-#line 150 "cssvalues.gperf"
- {"-khtml-diamond", CSS_VAL__KHTML_DIAMOND},
+#line 156 "cssvalues.gperf"
+ {"-khtml-urdu", CSS_VAL__KHTML_URDU},
+#line 190 "cssvalues.gperf"
+ {"inline-table", CSS_VAL_INLINE_TABLE},
#line 141 "cssvalues.gperf"
{"-khtml-left", CSS_VAL__KHTML_LEFT},
+#line 176 "cssvalues.gperf"
+ {"upper-latin", CSS_VAL_UPPER_LATIN},
+#line 186 "cssvalues.gperf"
+ {"run-in", CSS_VAL_RUN_IN},
+#line 209 "cssvalues.gperf"
+ {"vertical-text", CSS_VAL_VERTICAL_TEXT},
+#line 98 "cssvalues.gperf"
+ {"buttonface", CSS_VAL_BUTTONFACE},
+#line 131 "cssvalues.gperf"
+ {"text-top", CSS_VAL_TEXT_TOP},
+#line 232 "cssvalues.gperf"
+ {"capitalize", CSS_VAL_CAPITALIZE},
+#line 219 "cssvalues.gperf"
+ {"s-resize", CSS_VAL_S_RESIZE},
+#line 215 "cssvalues.gperf"
+ {"e-resize", CSS_VAL_E_RESIZE},
+#line 85 "cssvalues.gperf"
+ {"navy", CSS_VAL_NAVY},
+#line 95 "cssvalues.gperf"
+ {"activecaption", CSS_VAL_ACTIVECAPTION},
+#line 261 "cssvalues.gperf"
+ {"invert", CSS_VAL_INVERT},
+#line 117 "cssvalues.gperf"
+ {"threedshadow", CSS_VAL_THREEDSHADOW},
#line 61 "cssvalues.gperf"
{"ultra-condensed", CSS_VAL_ULTRA_CONDENSED},
-#line 158 "cssvalues.gperf"
- {"-khtml-tibetan", CSS_VAL__KHTML_TIBETAN},
-#line 124 "cssvalues.gperf"
- {"repeat-x", CSS_VAL_REPEAT_X},
-#line 265 "cssvalues.gperf"
- {"-khtml-normal", CSS_VAL__KHTML_NORMAL},
-#line 113 "cssvalues.gperf"
- {"threeddarkshadow", CSS_VAL_THREEDDARKSHADOW},
-#line 219 "cssvalues.gperf"
- {"uppercase", CSS_VAL_UPPERCASE},
-#line 125 "cssvalues.gperf"
- {"repeat-y", CSS_VAL_REPEAT_Y},
-#line 136 "cssvalues.gperf"
- {"-khtml-auto", CSS_VAL__KHTML_AUTO},
-#line 163 "cssvalues.gperf"
- {"georgian", CSS_VAL_GEORGIAN},
-#line 109 "cssvalues.gperf"
- {"infobackground", CSS_VAL_INFOBACKGROUND},
-#line 16 "cssvalues.gperf"
- {"-khtml-native", CSS_VAL__KHTML_NATIVE},
-#line 157 "cssvalues.gperf"
- {"-khtml-thai", CSS_VAL__KHTML_THAI},
-#line 224 "cssvalues.gperf"
- {"no-close-quote", CSS_VAL_NO_CLOSE_QUOTE},
-#line 173 "cssvalues.gperf"
- {"lower-alpha", CSS_VAL_LOWER_ALPHA},
-#line 156 "cssvalues.gperf"
- {"-khtml-urdu", CSS_VAL__KHTML_URDU},
-#line 223 "cssvalues.gperf"
- {"close-quote", CSS_VAL_CLOSE_QUOTE},
+#line 182 "cssvalues.gperf"
+ {"-khtml-close-quote", CSS_VAL__KHTML_CLOSE_QUOTE},
+#line 82 "cssvalues.gperf"
+ {"indigo", CSS_VAL_INDIGO},
+#line 244 "cssvalues.gperf"
+ {"pre-line", CSS_VAL_PRE_LINE},
+#line 245 "cssvalues.gperf"
+ {"-khtml-nowrap", CSS_VAL__KHTML_NOWRAP},
+#line 101 "cssvalues.gperf"
+ {"buttontext", CSS_VAL_BUTTONTEXT},
#line 104 "cssvalues.gperf"
{"highlight", CSS_VAL_HIGHLIGHT},
-#line 231 "cssvalues.gperf"
- {"-khtml-nowrap", CSS_VAL__KHTML_NOWRAP},
-#line 67 "cssvalues.gperf"
- {"extra-expanded", CSS_VAL_EXTRA_EXPANDED},
-#line 105 "cssvalues.gperf"
- {"highlighttext", CSS_VAL_HIGHLIGHTTEXT},
-#line 155 "cssvalues.gperf"
- {"-khtml-persian", CSS_VAL__KHTML_PERSIAN},
-#line 116 "cssvalues.gperf"
- {"threedlightshadow", CSS_VAL_THREEDLIGHTSHADOW},
-#line 229 "cssvalues.gperf"
+#line 119 "cssvalues.gperf"
+ {"windowframe", CSS_VAL_WINDOWFRAME},
+#line 64 "cssvalues.gperf"
+ {"semi-condensed", CSS_VAL_SEMI_CONDENSED},
+#line 200 "cssvalues.gperf"
+ {"default", CSS_VAL_DEFAULT},
+#line 243 "cssvalues.gperf"
{"pre-wrap", CSS_VAL_PRE_WRAP},
-#line 96 "cssvalues.gperf"
- {"appworkspace", CSS_VAL_APPWORKSPACE},
-#line 226 "cssvalues.gperf"
- {"open-quote", CSS_VAL_OPEN_QUOTE},
-#line 68 "cssvalues.gperf"
- {"ultra-expanded", CSS_VAL_ULTRA_EXPANDED},
-#line 176 "cssvalues.gperf"
- {"upper-latin", CSS_VAL_UPPER_LATIN},
+#line 150 "cssvalues.gperf"
+ {"-khtml-diamond", CSS_VAL__KHTML_DIAMOND},
+#line 296 "cssvalues.gperf"
+ {"unfurl", CSS_VAL_UNFURL},
+#line 171 "cssvalues.gperf"
+ {"lower-greek", CSS_VAL_LOWER_GREEK},
+#line 257 "cssvalues.gperf"
+ {"fixed", CSS_VAL_FIXED},
#line 225 "cssvalues.gperf"
+ {"nesw-resize", CSS_VAL_NESW_RESIZE},
+#line 220 "cssvalues.gperf"
+ {"se-resize", CSS_VAL_SE_RESIZE},
+#line 216 "cssvalues.gperf"
+ {"n-resize", CSS_VAL_N_RESIZE},
+#line 30 "cssvalues.gperf"
+ {"message-box", CSS_VAL_MESSAGE_BOX},
+#line 100 "cssvalues.gperf"
+ {"buttonshadow", CSS_VAL_BUTTONSHADOW},
+#line 179 "cssvalues.gperf"
+ {"hiragana-iroha", CSS_VAL_HIRAGANA_IROHA},
+#line 120 "cssvalues.gperf"
+ {"windowtext", CSS_VAL_WINDOWTEXT},
+#line 80 "cssvalues.gperf"
+ {"gray", CSS_VAL_GRAY},
+#line 181 "cssvalues.gperf"
+ {"-khtml-open-quote", CSS_VAL__KHTML_OPEN_QUOTE},
+#line 227 "cssvalues.gperf"
+ {"col-resize", CSS_VAL_COL_RESIZE},
+#line 16 "cssvalues.gperf"
+ {"-khtml-native", CSS_VAL__KHTML_NATIVE},
+#line 55 "cssvalues.gperf"
+ {"xx-large", CSS_VAL_XX_LARGE},
+#line 158 "cssvalues.gperf"
+ {"-khtml-tibetan", CSS_VAL__KHTML_TIBETAN},
+#line 106 "cssvalues.gperf"
+ {"inactiveborder", CSS_VAL_INACTIVEBORDER},
+#line 228 "cssvalues.gperf"
+ {"row-resize", CSS_VAL_ROW_RESIZE},
+#line 110 "cssvalues.gperf"
+ {"infotext", CSS_VAL_INFOTEXT},
+#line 132 "cssvalues.gperf"
+ {"text-bottom", CSS_VAL_TEXT_BOTTOM},
+#line 113 "cssvalues.gperf"
+ {"threeddarkshadow", CSS_VAL_THREEDDARKSHADOW},
+#line 97 "cssvalues.gperf"
+ {"background", CSS_VAL_BACKGROUND},
+#line 165 "cssvalues.gperf"
+ {"-khtml-japanese-formal", CSS_VAL__KHTML_JAPANESE_FORMAL},
+#line 81 "cssvalues.gperf"
+ {"green", CSS_VAL_GREEN},
+#line 192 "cssvalues.gperf"
+ {"table-header-group", CSS_VAL_TABLE_HEADER_GROUP},
+#line 222 "cssvalues.gperf"
+ {"w-resize", CSS_VAL_W_RESIZE},
+#line 238 "cssvalues.gperf"
+ {"no-close-quote", CSS_VAL_NO_CLOSE_QUOTE},
+#line 224 "cssvalues.gperf"
+ {"ns-resize", CSS_VAL_NS_RESIZE},
+#line 214 "cssvalues.gperf"
+ {"not-allowed", CSS_VAL_NOT_ALLOWED},
+#line 217 "cssvalues.gperf"
+ {"ne-resize", CSS_VAL_NE_RESIZE},
+#line 239 "cssvalues.gperf"
{"no-open-quote", CSS_VAL_NO_OPEN_QUOTE},
-#line 250 "cssvalues.gperf"
- {"line-through", CSS_VAL_LINE_THROUGH},
-#line 142 "cssvalues.gperf"
- {"-khtml-right", CSS_VAL__KHTML_RIGHT},
-#line 164 "cssvalues.gperf"
- {"cjk-ideographic", CSS_VAL_CJK_IDEOGRAPHIC},
-#line 160 "cssvalues.gperf"
- {"upper-roman", CSS_VAL_UPPER_ROMAN},
-#line 135 "cssvalues.gperf"
- {"-khtml-baseline-middle", CSS_VAL__KHTML_BASELINE_MIDDLE},
+#line 140 "cssvalues.gperf"
+ {"justify", CSS_VAL_JUSTIFY},
#line 153 "cssvalues.gperf"
{"-khtml-arabic-indic", CSS_VAL__KHTML_ARABIC_INDIC},
-#line 152 "cssvalues.gperf"
- {"decimal-leading-zero", CSS_VAL_DECIMAL_LEADING_ZERO},
-#line 115 "cssvalues.gperf"
- {"threedhighlight", CSS_VAL_THREEDHIGHLIGHT},
-#line 180 "cssvalues.gperf"
- {"katakana-iroha", CSS_VAL_KATAKANA_IROHA},
-#line 99 "cssvalues.gperf"
- {"buttonhighlight", CSS_VAL_BUTTONHIGHLIGHT},
+#line 121 "cssvalues.gperf"
+ {"grey", CSS_VAL_GREY},
+#line 135 "cssvalues.gperf"
+ {"-khtml-baseline-middle", CSS_VAL__KHTML_BASELINE_MIDDLE},
#line 56 "cssvalues.gperf"
{"-khtml-xxx-large", CSS_VAL__KHTML_XXX_LARGE},
+#line 142 "cssvalues.gperf"
+ {"-khtml-right", CSS_VAL__KHTML_RIGHT},
+#line 264 "cssvalues.gperf"
+ {"line-through", CSS_VAL_LINE_THROUGH},
+#line 167 "cssvalues.gperf"
+ {"-khtml-simp-chinese-formal", CSS_VAL__KHTML_SIMP_CHINESE_FORMAL},
+#line 163 "cssvalues.gperf"
+ {"georgian", CSS_VAL_GEORGIAN},
+#line 105 "cssvalues.gperf"
+ {"highlighttext", CSS_VAL_HIGHLIGHTTEXT},
+#line 107 "cssvalues.gperf"
+ {"inactivecaption", CSS_VAL_INACTIVECAPTION},
+#line 293 "cssvalues.gperf"
+ {"infinite", CSS_VAL_INFINITE},
+#line 221 "cssvalues.gperf"
+ {"sw-resize", CSS_VAL_SW_RESIZE},
+#line 223 "cssvalues.gperf"
+ {"ew-resize", CSS_VAL_EW_RESIZE},
+#line 172 "cssvalues.gperf"
+ {"-khtml-upper-greek", CSS_VAL__KHTML_UPPER_GREEK},
#line 191 "cssvalues.gperf"
{"table-row-group", CSS_VAL_TABLE_ROW_GROUP},
-#line 182 "cssvalues.gperf"
- {"-khtml-close-quote", CSS_VAL__KHTML_CLOSE_QUOTE},
-#line 179 "cssvalues.gperf"
- {"hiragana-iroha", CSS_VAL_HIRAGANA_IROHA},
#line 195 "cssvalues.gperf"
{"table-column-group", CSS_VAL_TABLE_COLUMN_GROUP},
-#line 266 "cssvalues.gperf"
+#line 166 "cssvalues.gperf"
+ {"-khtml-japanese-informal", CSS_VAL__KHTML_JAPANESE_INFORMAL},
+#line 280 "cssvalues.gperf"
{"-khtml-around-floats", CSS_VAL__KHTML_AROUND_FLOATS},
-#line 175 "cssvalues.gperf"
- {"upper-alpha", CSS_VAL_UPPER_ALPHA},
-#line 181 "cssvalues.gperf"
- {"-khtml-open-quote", CSS_VAL__KHTML_OPEN_QUOTE},
+#line 103 "cssvalues.gperf"
+ {"graytext", CSS_VAL_GRAYTEXT},
#line 193 "cssvalues.gperf"
{"table-footer-group", CSS_VAL_TABLE_FOOTER_GROUP},
-#line 192 "cssvalues.gperf"
- {"table-header-group", CSS_VAL_TABLE_HEADER_GROUP},
-#line 165 "cssvalues.gperf"
- {"-khtml-japanese-formal", CSS_VAL__KHTML_JAPANESE_FORMAL},
-#line 166 "cssvalues.gperf"
- {"-khtml-japanese-informal", CSS_VAL__KHTML_JAPANESE_INFORMAL},
-#line 172 "cssvalues.gperf"
- {"-khtml-upper-greek", CSS_VAL__KHTML_UPPER_GREEK},
#line 169 "cssvalues.gperf"
{"-khtml-trad-chinese-formal", CSS_VAL__KHTML_TRAD_CHINESE_FORMAL},
+#line 218 "cssvalues.gperf"
+ {"nw-resize", CSS_VAL_NW_RESIZE},
+#line 226 "cssvalues.gperf"
+ {"nwse-resize", CSS_VAL_NWSE_RESIZE},
+#line 164 "cssvalues.gperf"
+ {"cjk-ideographic", CSS_VAL_CJK_IDEOGRAPHIC},
+#line 168 "cssvalues.gperf"
+ {"-khtml-simp-chinese-informal", CSS_VAL__KHTML_SIMP_CHINESE_INFORMAL},
+#line 108 "cssvalues.gperf"
+ {"inactivecaptiontext", CSS_VAL_INACTIVECAPTIONTEXT},
+#line 116 "cssvalues.gperf"
+ {"threedlightshadow", CSS_VAL_THREEDLIGHTSHADOW},
#line 170 "cssvalues.gperf"
{"-khtml-trad-chinese-informal", CSS_VAL__KHTML_TRAD_CHINESE_INFORMAL},
-#line 167 "cssvalues.gperf"
- {"-khtml-simp-chinese-formal", CSS_VAL__KHTML_SIMP_CHINESE_FORMAL},
-#line 168 "cssvalues.gperf"
- {"-khtml-simp-chinese-informal", CSS_VAL__KHTML_SIMP_CHINESE_INFORMAL}
+#line 109 "cssvalues.gperf"
+ {"infobackground", CSS_VAL_INFOBACKGROUND},
+#line 115 "cssvalues.gperf"
+ {"threedhighlight", CSS_VAL_THREEDHIGHLIGHT},
+#line 152 "cssvalues.gperf"
+ {"decimal-leading-zero", CSS_VAL_DECIMAL_LEADING_ZERO},
+#line 99 "cssvalues.gperf"
+ {"buttonhighlight", CSS_VAL_BUTTONHIGHLIGHT}
};
static const short lookup[] =
{
- 0, -1, -1, -1, -1, 1, -1, -1, -1, -1,
- 2, -1, -1, -1, -1, 3, -1, -1, -1, -1,
- 4, -1, -1, -1, -1, 5, -1, -1, 6, -1,
- 7, -1, -1, -1, -1, 8, -1, -1, -1, -1,
- 9, -1, -1, -1, -1, 10, -1, -1, -1, -1,
- 11, -1, -1, -1, -1, 12, -1, -1, -1, -1,
- 13, 14, -1, -1, -1, 15, -1, -1, -1, -1,
- 16, -1, -1, -1, -1, 17, -1, -1, -1, -1,
+ 0, -1, -1, -1, -1, 1, -1, -1, 2, -1,
+ 3, -1, -1, 4, -1, 5, -1, -1, 6, -1,
+ 7, -1, -1, -1, -1, 8, -1, -1, 9, 10,
+ 11, 12, -1, -1, -1, 13, -1, -1, 14, -1,
+ 15, 16, -1, -1, -1, 17, -1, -1, -1, -1,
18, -1, -1, -1, -1, 19, -1, -1, -1, -1,
- 20, -1, -1, -1, -1, 21, -1, -1, 22, -1,
- 23, -1, -1, 24, -1, 25, -1, -1, 26, -1,
- 27, -1, -1, -1, -1, 28, -1, -1, -1, 29,
- 30, -1, -1, 31, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 32, -1, -1, -1, -1, -1, -1,
- 33, -1, -1, -1, -1, 34, -1, -1, -1, -1,
- 35, -1, -1, 36, -1, -1, -1, -1, 37, -1,
- 38, -1, -1, -1, -1, 39, 40, -1, 41, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 42, -1, -1, -1, -1,
- 43, -1, -1, -1, -1, -1, -1, -1, 44, -1,
- 45, -1, -1, -1, -1, -1, -1, -1, 46, -1,
- -1, -1, -1, -1, -1, 47, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 48, -1, -1, -1, -1,
- 49, -1, -1, -1, -1, 50, -1, -1, 51, -1,
- 52, -1, -1, -1, -1, -1, -1, -1, 53, -1,
- 54, -1, -1, -1, -1, -1, 55, -1, -1, -1,
- 56, -1, -1, -1, -1, 57, -1, -1, -1, -1,
- 58, -1, -1, 59, -1, -1, -1, -1, -1, -1,
- 60, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 61, -1, -1, -1, -1, -1, -1, -1, 62, -1,
- 63, -1, -1, 64, -1, 65, 66, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 67, -1, -1, 68, -1,
- 69, -1, -1, -1, -1, 70, -1, -1, 71, -1,
- -1, -1, -1, 72, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 73, -1, -1, -1, -1, -1, -1,
- 74, -1, -1, -1, -1, 75, -1, -1, 76, -1,
- -1, -1, -1, 77, -1, -1, -1, -1, 78, -1,
- 79, -1, -1, -1, -1, 80, 81, -1, 82, -1,
- 83, -1, -1, 84, -1, 85, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 86, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 87, -1, -1, -1, -1, -1, -1, -1, 88, -1,
- 89, -1, -1, -1, -1, 90, -1, -1, -1, -1,
- 91, 92, -1, -1, -1, 93, 94, -1, 95, -1,
- 96, -1, -1, 97, -1, -1, -1, -1, 98, -1,
- 99, 100, -1, 101, -1, 102, -1, -1, -1, -1,
- 103, -1, -1, 104, -1, 105, -1, -1, -1, -1,
- -1, -1, -1, 106, -1, 107, -1, -1, -1, -1,
- 108, -1, -1, -1, -1, 109, -1, -1, -1, -1,
- 110, -1, -1, -1, -1, -1, -1, -1, 111, -1,
- -1, -1, -1, -1, -1, 112, -1, -1, 113, -1,
- -1, -1, -1, -1, -1, 114, -1, -1, -1, -1,
- 115, -1, -1, 116, -1, 117, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 118, -1, -1, 119, -1,
- -1, -1, -1, 120, -1, 121, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 122, -1, -1, 123, -1,
- 124, -1, -1, -1, -1, 125, -1, -1, 126, -1,
- 127, -1, -1, -1, -1, 128, -1, -1, 129, -1,
- 130, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 131, -1, -1, -1, -1, -1, -1, -1, 132, -1,
- 133, -1, -1, 134, -1, 135, -1, -1, -1, -1,
- 136, -1, -1, -1, -1, -1, 137, -1, -1, -1,
- 138, -1, -1, 139, -1, -1, -1, -1, 140, -1,
- 141, -1, -1, -1, -1, 142, -1, -1, 143, -1,
- 144, 145, -1, -1, -1, 146, -1, -1, 147, -1,
- -1, -1, -1, -1, -1, -1, 148, -1, -1, -1,
- -1, -1, -1, 149, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 150, -1, -1, -1, -1, 151, -1,
- 152, -1, -1, -1, -1, 153, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 154, -1, -1, -1, -1,
- -1, -1, -1, 155, -1, -1, -1, -1, -1, -1,
- 156, -1, -1, -1, -1, 157, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 158, -1,
- 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 160, -1,
- 161, -1, -1, 162, -1, -1, -1, -1, 163, -1,
- -1, -1, -1, 164, -1, 165, -1, -1, -1, -1,
- -1, -1, -1, 166, -1, -1, -1, -1, -1, -1,
- 167, -1, -1, -1, -1, 168, -1, -1, 169, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 170, -1, -1, -1, -1, -1, -1, -1, 171, -1,
- 172, -1, -1, -1, -1, 173, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 174, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 175, -1, -1, -1,
- 176, -1, -1, -1, -1, 177, -1, -1, -1, -1,
- 178, -1, -1, -1, -1, 179, -1, -1, -1, -1,
- 180, -1, -1, -1, -1, 181, -1, -1, 182, -1,
- 183, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 184, -1,
- -1, -1, -1, -1, -1, 185, -1, -1, -1, -1,
- 186, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 187, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 20, -1, -1, -1, -1, 21, -1, -1, -1, -1,
+ 22, -1, -1, -1, -1, 23, -1, -1, -1, -1,
+ 24, -1, -1, -1, -1, 25, -1, -1, -1, -1,
+ 26, -1, -1, -1, -1, 27, -1, -1, 28, -1,
+ 29, -1, -1, -1, -1, 30, -1, -1, -1, -1,
+ 31, -1, -1, -1, -1, 32, -1, -1, -1, -1,
+ 33, -1, -1, 34, -1, 35, 36, -1, -1, -1,
+ 37, -1, -1, -1, -1, 38, -1, -1, -1, 39,
+ 40, -1, -1, -1, -1, 41, -1, -1, -1, -1,
+ 42, -1, -1, -1, -1, 43, 44, -1, -1, -1,
+ 45, -1, -1, -1, 46, -1, -1, -1, 47, -1,
+ -1, -1, -1, 48, -1, -1, 49, -1, -1, -1,
+ -1, -1, -1, -1, -1, 50, -1, -1, 51, -1,
+ 52, 53, -1, -1, -1, 54, 55, -1, -1, -1,
+ -1, -1, -1, 56, -1, -1, 57, -1, -1, -1,
+ 58, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 59, -1, -1, 60, -1, 61, -1, -1, 62, -1,
+ -1, -1, -1, 63, -1, -1, -1, 64, 65, -1,
+ -1, -1, -1, -1, -1, -1, -1, 66, -1, -1,
+ -1, -1, -1, 67, -1, -1, 68, -1, 69, -1,
+ 70, 71, -1, -1, -1, -1, -1, -1, 72, -1,
+ -1, -1, -1, 73, -1, 74, -1, -1, 75, -1,
+ 76, -1, -1, 77, -1, -1, -1, -1, 78, -1,
+ 79, -1, -1, 80, -1, -1, 81, -1, 82, -1,
+ 83, -1, -1, 84, -1, 85, 86, -1, 87, -1,
+ 88, -1, -1, 89, -1, -1, 90, -1, -1, 91,
+ -1, -1, -1, -1, -1, -1, 92, -1, -1, -1,
+ 93, 94, -1, 95, -1, -1, 96, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, -1, -1, 98, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, 100, -1,
+ 101, 102, -1, -1, -1, 103, -1, -1, -1, -1,
+ 104, -1, -1, -1, 105, 106, 107, -1, -1, -1,
+ -1, -1, -1, 108, -1, -1, -1, -1, -1, 109,
+ 110, -1, -1, -1, -1, 111, -1, -1, 112, -1,
+ 113, 114, -1, -1, -1, 115, -1, -1, 116, -1,
+ 117, 118, -1, -1, -1, 119, -1, -1, 120, -1,
+ 121, -1, -1, -1, -1, 122, -1, -1, -1, -1,
+ 123, -1, -1, 124, -1, -1, 125, -1, -1, 126,
+ -1, 127, -1, -1, 128, -1, -1, -1, 129, -1,
+ -1, -1, -1, 130, -1, -1, 131, -1, -1, -1,
+ 132, -1, -1, 133, 134, -1, -1, -1, -1, -1,
+ -1, 135, -1, 136, -1, 137, -1, -1, -1, 138,
+ 139, -1, -1, 140, -1, -1, 141, -1, 142, -1,
+ 143, -1, -1, -1, -1, 144, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 145, -1, -1, 146, -1,
+ -1, -1, -1, -1, -1, 147, -1, -1, 148, -1,
+ 149, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 150, -1, -1, -1, -1, -1, -1, -1, -1, 151,
+ 152, -1, -1, 153, -1, 154, 155, -1, -1, -1,
+ 156, -1, -1, -1, -1, 157, -1, -1, 158, -1,
+ 159, -1, -1, 160, -1, -1, 161, -1, -1, -1,
+ 162, -1, -1, -1, -1, -1, -1, -1, -1, 163,
+ 164, -1, -1, -1, 165, 166, 167, -1, -1, -1,
+ -1, 168, -1, 169, -1, -1, -1, -1, -1, -1,
+ -1, 170, -1, 171, -1, 172, -1, -1, 173, -1,
+ -1, 174, -1, 175, -1, -1, -1, -1, 176, -1,
+ 177, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 178, -1, -1, -1, -1, -1, -1,
+ 179, -1, -1, -1, 180, 181, -1, -1, 182, -1,
+ 183, -1, -1, 184, -1, 185, -1, -1, 186, -1,
+ -1, -1, -1, -1, -1, 187, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
- 189, -1, -1, 190, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 191, -1, -1, -1, -1, -1, -1,
- 192, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 193, -1, -1, -1, -1, 194, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 196, -1,
- 197, -1, -1, -1, -1, 198, -1, -1, 199, -1,
- 200, -1, -1, -1, -1, -1, -1, -1, 201, -1,
- -1, -1, -1, -1, -1, 202, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 203, -1, -1, 204, -1, -1, -1, -1, -1, -1,
- 205, -1, -1, -1, -1, -1, -1, -1, 206, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 207, -1, -1, -1, -1, 208, -1,
- 209, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 210, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 211, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 212, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 213, -1, 214, -1, -1, -1, -1,
- 215, -1, -1, -1, -1, -1, -1, -1, 216, -1,
- 217, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 218, -1, -1, -1, -1,
- 219, -1, -1, -1, -1, 220, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 221, -1,
- -1, -1, -1, -1, -1, 222, -1, -1, 223, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 224, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 225, -1, -1, -1, -1, -1, -1,
- 226, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 227, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 228, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 229, -1, 230, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 231, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 232, -1,
- 233, -1, -1, -1, -1, 234, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 235, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 236, -1,
- -1, 237, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 238, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 239, -1, -1, -1, -1, -1, -1, -1, 240, -1,
- -1, -1, -1, 241, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 242, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 243, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 244, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 245, -1, -1, -1, -1,
- 246, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 247, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 248, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 249, -1, 250, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 251, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 252, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 253, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 254, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 255, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 189, -1, 190, 191, -1, 192, -1,
+ -1, -1, -1, -1, -1, -1, 193, -1, -1, -1,
+ -1, -1, -1, 194, 195, -1, -1, -1, 196, -1,
+ 197, -1, -1, 198, -1, 199, 200, -1, 201, 202,
+ -1, -1, -1, -1, -1, 203, -1, -1, -1, -1,
+ 204, -1, -1, -1, 205, 206, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 208, 209,
+ -1, -1, -1, 210, -1, -1, -1, -1, -1, 211,
+ 212, 213, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 214, -1, -1, -1, -1, 215, -1,
+ -1, -1, -1, 216, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 217, 218, -1, 219, -1, 220, -1,
+ -1, -1, -1, -1, -1, 221, 222, -1, -1, -1,
+ -1, -1, -1, -1, -1, 223, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 224, -1, 225, -1, 226, -1, -1, 227, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 228, -1, 229, -1, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, 231, -1, -1, -1,
+ -1, 232, -1, -1, 233, 234, -1, -1, -1, -1,
+ -1, 235, -1, -1, -1, -1, -1, -1, 236, -1,
+ -1, 237, -1, -1, 238, -1, -1, -1, -1, -1,
+ 239, -1, -1, -1, -1, -1, 240, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, 242, -1,
+ 243, -1, -1, -1, -1, -1, -1, -1, -1, 244,
+ 245, -1, -1, 246, -1, -1, -1, -1, -1, -1,
+ 247, -1, -1, -1, -1, -1, -1, -1, 248, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 249, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 250, -1, -1, -1, 251, -1,
+ -1, 252, -1, 253, -1, -1, -1, -1, -1, 254,
+ -1, -1, -1, 255, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 256, -1, -1, -1, -1,
+ 257, -1, -1, -1, -1, 258, -1, -1, -1, 259,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 260, -1, -1, -1, -1, -1, -1,
+ -1, 261, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 257,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 258, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 259, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 260, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 261, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 262, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 262, -1,
+ -1, -1, -1, -1, -1, 263, -1, 264, -1, -1,
+ -1, 265, -1, 266, -1, -1, 267, -1, -1, -1,
+ -1, 268, -1, -1, -1, 269, -1, -1, 270, -1,
+ -1, -1, -1, -1, -1, 271, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 263, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 272, -1, 273, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 274, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 264, -1, -1, -1, -1, 265, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 275, -1, -1, -1, -1,
+ -1, -1, -1, 276, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 277, -1, -1, -1,
+ -1, -1, -1, 278, 279, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 280, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 281, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 282, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 283, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 266, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 284, -1, 285, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 267, -1,
- -1, -1, -1, 268, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 286, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 269, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 270, -1, -1, -1, -1,
- 271, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 272, -1, -1, -1, -1, 273
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 287
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = hash_val (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register int index = lookup[key];
if (index >= 0)
{
register const char *s = wordlist_value[index].name;
if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
return &wordlist_value[index];
}
}
}
return 0;
}
-#line 288 "cssvalues.gperf"
+#line 302 "cssvalues.gperf"
static const char * const valueList[] = {
"",
"inherit",
"initial",
"-khtml-native",
"none",
"hidden",
"inset",
"groove",
"ridge",
"outset",
"dotted",
"dashed",
"solid",
"double",
"caption",
"icon",
"menu",
"message-box",
"small-caption",
"status-bar",
"italic",
"oblique",
"small-caps",
"normal",
"bold",
"bolder",
"lighter",
"100",
"200",
"300",
"400",
"500",
"600",
"700",
"800",
"900",
"xx-small",
"x-small",
"small",
"medium",
"large",
"x-large",
"xx-large",
"-khtml-xxx-large",
"smaller",
"larger",
"wider",
"narrower",
"ultra-condensed",
"extra-condensed",
"condensed",
"semi-condensed",
"semi-expanded",
"expanded",
"extra-expanded",
"ultra-expanded",
"serif",
"sans-serif",
"cursive",
"fantasy",
"monospace",
"transparent",
"aqua",
"black",
"blue",
"crimson",
"fuchsia",
"gray",
"green",
"indigo",
"lime",
"maroon",
"navy",
"olive",
"orange",
"purple",
"red",
"silver",
"teal",
"white",
"yellow",
"activeborder",
"activecaption",
"appworkspace",
"background",
"buttonface",
"buttonhighlight",
"buttonshadow",
"buttontext",
"captiontext",
"graytext",
"highlight",
"highlighttext",
"inactiveborder",
"inactivecaption",
"inactivecaptiontext",
"infobackground",
"infotext",
"menutext",
"scrollbar",
"threeddarkshadow",
"threedface",
"threedhighlight",
"threedlightshadow",
"threedshadow",
"window",
"windowframe",
"windowtext",
"grey",
"-khtml-text",
"repeat",
"repeat-x",
"repeat-y",
"no-repeat",
"baseline",
"middle",
"sub",
"super",
"text-top",
"text-bottom",
"top",
"bottom",
"-khtml-baseline-middle",
"-khtml-auto",
"left",
"right",
"center",
"justify",
"-khtml-left",
"-khtml-right",
"-khtml-center",
"outside",
"inside",
"disc",
"circle",
"square",
"box",
"-khtml-diamond",
"decimal",
"decimal-leading-zero",
"-khtml-arabic-indic",
"-khtml-lao",
"-khtml-persian",
"-khtml-urdu",
"-khtml-thai",
"-khtml-tibetan",
"lower-roman",
"upper-roman",
"hebrew",
"armenian",
"georgian",
"cjk-ideographic",
"-khtml-japanese-formal",
"-khtml-japanese-informal",
"-khtml-simp-chinese-formal",
"-khtml-simp-chinese-informal",
"-khtml-trad-chinese-formal",
"-khtml-trad-chinese-informal",
"lower-greek",
"-khtml-upper-greek",
"lower-alpha",
"lower-latin",
"upper-alpha",
"upper-latin",
"hiragana",
"katakana",
"hiragana-iroha",
"katakana-iroha",
"-khtml-open-quote",
"-khtml-close-quote",
"inline",
"block",
"list-item",
"run-in",
"compact",
"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",
"auto",
-"crosshair",
"default",
+"context-menu",
+"help",
"pointer",
"progress",
+"wait",
+"cell",
+"crosshair",
+"text",
+"vertical-text",
+"alias",
+"copy",
"move",
+"no-drop",
+"not-allowed",
"e-resize",
+"n-resize",
"ne-resize",
"nw-resize",
-"n-resize",
+"s-resize",
"se-resize",
"sw-resize",
-"s-resize",
"w-resize",
-"text",
-"wait",
-"help",
+"ew-resize",
+"ns-resize",
+"nesw-resize",
+"nwse-resize",
+"col-resize",
+"row-resize",
+"all-scroll",
"ltr",
"rtl",
"capitalize",
"uppercase",
"lowercase",
"visible",
"collapse",
"close-quote",
"no-close-quote",
"no-open-quote",
"open-quote",
"nowrap",
"pre",
"pre-wrap",
"pre-line",
"-khtml-nowrap",
"above",
"absolute",
"always",
"avoid",
"below",
"bidi-override",
"blink",
"both",
"crop",
"cross",
"embed",
"fixed",
"hand",
"hide",
"higher",
"invert",
"landscape",
"level",
"line-through",
"loud",
"lower",
"marquee",
"mix",
"overline",
"portrait",
"relative",
"scroll",
"separate",
"show",
"static",
"thick",
"thin",
"underline",
"-khtml-normal",
"-khtml-around-floats",
"border-box",
"content-box",
"enabled",
"disabled",
"forwards",
"backwards",
"ahead",
"reverse",
"up",
"down",
"slow",
"fast",
"infinite",
"slide",
"alternate",
"unfurl",
"clip",
"ellipsis",
"border",
"content",
"padding",
0
};
DOMString getValueName(unsigned short id)
{
if(id >= CSS_VAL_TOTAL || id == 0)
return DOMString();
else
return DOMString(valueList[id]);
}
diff --git a/khtml/css/cssvalues.h b/khtml/css/cssvalues.h
index e185502956..45954fb2cf 100644
--- a/khtml/css/cssvalues.h
+++ b/khtml/css/cssvalues.h
@@ -1,288 +1,302 @@
/* This file is automatically generated from cssvalues.in by makevalues, do not edit */
/* Copyright 1998 W. Bastian */
#ifndef CSSVALUES_H
#define CSSVALUES_H
DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT;
#define CSS_VAL_INVALID 0
#define CSS_VAL_MIN 1
#define CSS_VAL_INHERIT 1
#define CSS_VAL_INITIAL 2
#define CSS_VAL__KHTML_NATIVE 3
#define CSS_VAL_NONE 4
#define CSS_VAL_HIDDEN 5
#define CSS_VAL_INSET 6
#define CSS_VAL_GROOVE 7
#define CSS_VAL_RIDGE 8
#define CSS_VAL_OUTSET 9
#define CSS_VAL_DOTTED 10
#define CSS_VAL_DASHED 11
#define CSS_VAL_SOLID 12
#define CSS_VAL_DOUBLE 13
#define CSS_VAL_CAPTION 14
#define CSS_VAL_ICON 15
#define CSS_VAL_MENU 16
#define CSS_VAL_MESSAGE_BOX 17
#define CSS_VAL_SMALL_CAPTION 18
#define CSS_VAL_STATUS_BAR 19
#define CSS_VAL_ITALIC 20
#define CSS_VAL_OBLIQUE 21
#define CSS_VAL_SMALL_CAPS 22
#define CSS_VAL_NORMAL 23
#define CSS_VAL_BOLD 24
#define CSS_VAL_BOLDER 25
#define CSS_VAL_LIGHTER 26
#define CSS_VAL_100 27
#define CSS_VAL_200 28
#define CSS_VAL_300 29
#define CSS_VAL_400 30
#define CSS_VAL_500 31
#define CSS_VAL_600 32
#define CSS_VAL_700 33
#define CSS_VAL_800 34
#define CSS_VAL_900 35
#define CSS_VAL_XX_SMALL 36
#define CSS_VAL_X_SMALL 37
#define CSS_VAL_SMALL 38
#define CSS_VAL_MEDIUM 39
#define CSS_VAL_LARGE 40
#define CSS_VAL_X_LARGE 41
#define CSS_VAL_XX_LARGE 42
#define CSS_VAL__KHTML_XXX_LARGE 43
#define CSS_VAL_SMALLER 44
#define CSS_VAL_LARGER 45
#define CSS_VAL_WIDER 46
#define CSS_VAL_NARROWER 47
#define CSS_VAL_ULTRA_CONDENSED 48
#define CSS_VAL_EXTRA_CONDENSED 49
#define CSS_VAL_CONDENSED 50
#define CSS_VAL_SEMI_CONDENSED 51
#define CSS_VAL_SEMI_EXPANDED 52
#define CSS_VAL_EXPANDED 53
#define CSS_VAL_EXTRA_EXPANDED 54
#define CSS_VAL_ULTRA_EXPANDED 55
#define CSS_VAL_SERIF 56
#define CSS_VAL_SANS_SERIF 57
#define CSS_VAL_CURSIVE 58
#define CSS_VAL_FANTASY 59
#define CSS_VAL_MONOSPACE 60
#define CSS_VAL_TRANSPARENT 61
#define CSS_VAL_AQUA 62
#define CSS_VAL_BLACK 63
#define CSS_VAL_BLUE 64
#define CSS_VAL_CRIMSON 65
#define CSS_VAL_FUCHSIA 66
#define CSS_VAL_GRAY 67
#define CSS_VAL_GREEN 68
#define CSS_VAL_INDIGO 69
#define CSS_VAL_LIME 70
#define CSS_VAL_MAROON 71
#define CSS_VAL_NAVY 72
#define CSS_VAL_OLIVE 73
#define CSS_VAL_ORANGE 74
#define CSS_VAL_PURPLE 75
#define CSS_VAL_RED 76
#define CSS_VAL_SILVER 77
#define CSS_VAL_TEAL 78
#define CSS_VAL_WHITE 79
#define CSS_VAL_YELLOW 80
#define CSS_VAL_ACTIVEBORDER 81
#define CSS_VAL_ACTIVECAPTION 82
#define CSS_VAL_APPWORKSPACE 83
#define CSS_VAL_BACKGROUND 84
#define CSS_VAL_BUTTONFACE 85
#define CSS_VAL_BUTTONHIGHLIGHT 86
#define CSS_VAL_BUTTONSHADOW 87
#define CSS_VAL_BUTTONTEXT 88
#define CSS_VAL_CAPTIONTEXT 89
#define CSS_VAL_GRAYTEXT 90
#define CSS_VAL_HIGHLIGHT 91
#define CSS_VAL_HIGHLIGHTTEXT 92
#define CSS_VAL_INACTIVEBORDER 93
#define CSS_VAL_INACTIVECAPTION 94
#define CSS_VAL_INACTIVECAPTIONTEXT 95
#define CSS_VAL_INFOBACKGROUND 96
#define CSS_VAL_INFOTEXT 97
#define CSS_VAL_MENUTEXT 98
#define CSS_VAL_SCROLLBAR 99
#define CSS_VAL_THREEDDARKSHADOW 100
#define CSS_VAL_THREEDFACE 101
#define CSS_VAL_THREEDHIGHLIGHT 102
#define CSS_VAL_THREEDLIGHTSHADOW 103
#define CSS_VAL_THREEDSHADOW 104
#define CSS_VAL_WINDOW 105
#define CSS_VAL_WINDOWFRAME 106
#define CSS_VAL_WINDOWTEXT 107
#define CSS_VAL_GREY 108
#define CSS_VAL__KHTML_TEXT 109
#define CSS_VAL_REPEAT 110
#define CSS_VAL_REPEAT_X 111
#define CSS_VAL_REPEAT_Y 112
#define CSS_VAL_NO_REPEAT 113
#define CSS_VAL_BASELINE 114
#define CSS_VAL_MIDDLE 115
#define CSS_VAL_SUB 116
#define CSS_VAL_SUPER 117
#define CSS_VAL_TEXT_TOP 118
#define CSS_VAL_TEXT_BOTTOM 119
#define CSS_VAL_TOP 120
#define CSS_VAL_BOTTOM 121
#define CSS_VAL__KHTML_BASELINE_MIDDLE 122
#define CSS_VAL__KHTML_AUTO 123
#define CSS_VAL_LEFT 124
#define CSS_VAL_RIGHT 125
#define CSS_VAL_CENTER 126
#define CSS_VAL_JUSTIFY 127
#define CSS_VAL__KHTML_LEFT 128
#define CSS_VAL__KHTML_RIGHT 129
#define CSS_VAL__KHTML_CENTER 130
#define CSS_VAL_OUTSIDE 131
#define CSS_VAL_INSIDE 132
#define CSS_VAL_DISC 133
#define CSS_VAL_CIRCLE 134
#define CSS_VAL_SQUARE 135
#define CSS_VAL_BOX 136
#define CSS_VAL__KHTML_DIAMOND 137
#define CSS_VAL_DECIMAL 138
#define CSS_VAL_DECIMAL_LEADING_ZERO 139
#define CSS_VAL__KHTML_ARABIC_INDIC 140
#define CSS_VAL__KHTML_LAO 141
#define CSS_VAL__KHTML_PERSIAN 142
#define CSS_VAL__KHTML_URDU 143
#define CSS_VAL__KHTML_THAI 144
#define CSS_VAL__KHTML_TIBETAN 145
#define CSS_VAL_LOWER_ROMAN 146
#define CSS_VAL_UPPER_ROMAN 147
#define CSS_VAL_HEBREW 148
#define CSS_VAL_ARMENIAN 149
#define CSS_VAL_GEORGIAN 150
#define CSS_VAL_CJK_IDEOGRAPHIC 151
#define CSS_VAL__KHTML_JAPANESE_FORMAL 152
#define CSS_VAL__KHTML_JAPANESE_INFORMAL 153
#define CSS_VAL__KHTML_SIMP_CHINESE_FORMAL 154
#define CSS_VAL__KHTML_SIMP_CHINESE_INFORMAL 155
#define CSS_VAL__KHTML_TRAD_CHINESE_FORMAL 156
#define CSS_VAL__KHTML_TRAD_CHINESE_INFORMAL 157
#define CSS_VAL_LOWER_GREEK 158
#define CSS_VAL__KHTML_UPPER_GREEK 159
#define CSS_VAL_LOWER_ALPHA 160
#define CSS_VAL_LOWER_LATIN 161
#define CSS_VAL_UPPER_ALPHA 162
#define CSS_VAL_UPPER_LATIN 163
#define CSS_VAL_HIRAGANA 164
#define CSS_VAL_KATAKANA 165
#define CSS_VAL_HIRAGANA_IROHA 166
#define CSS_VAL_KATAKANA_IROHA 167
#define CSS_VAL__KHTML_OPEN_QUOTE 168
#define CSS_VAL__KHTML_CLOSE_QUOTE 169
#define CSS_VAL_INLINE 170
#define CSS_VAL_BLOCK 171
#define CSS_VAL_LIST_ITEM 172
#define CSS_VAL_RUN_IN 173
#define CSS_VAL_COMPACT 174
#define CSS_VAL_INLINE_BLOCK 175
#define CSS_VAL_TABLE 176
#define CSS_VAL_INLINE_TABLE 177
#define CSS_VAL_TABLE_ROW_GROUP 178
#define CSS_VAL_TABLE_HEADER_GROUP 179
#define CSS_VAL_TABLE_FOOTER_GROUP 180
#define CSS_VAL_TABLE_ROW 181
#define CSS_VAL_TABLE_COLUMN_GROUP 182
#define CSS_VAL_TABLE_COLUMN 183
#define CSS_VAL_TABLE_CELL 184
#define CSS_VAL_TABLE_CAPTION 185
#define CSS_VAL_AUTO 186
-#define CSS_VAL_CROSSHAIR 187
-#define CSS_VAL_DEFAULT 188
-#define CSS_VAL_POINTER 189
-#define CSS_VAL_PROGRESS 190
-#define CSS_VAL_MOVE 191
-#define CSS_VAL_E_RESIZE 192
-#define CSS_VAL_NE_RESIZE 193
-#define CSS_VAL_NW_RESIZE 194
-#define CSS_VAL_N_RESIZE 195
-#define CSS_VAL_SE_RESIZE 196
-#define CSS_VAL_SW_RESIZE 197
-#define CSS_VAL_S_RESIZE 198
-#define CSS_VAL_W_RESIZE 199
-#define CSS_VAL_TEXT 200
-#define CSS_VAL_WAIT 201
-#define CSS_VAL_HELP 202
-#define CSS_VAL_LTR 203
-#define CSS_VAL_RTL 204
-#define CSS_VAL_CAPITALIZE 205
-#define CSS_VAL_UPPERCASE 206
-#define CSS_VAL_LOWERCASE 207
-#define CSS_VAL_VISIBLE 208
-#define CSS_VAL_COLLAPSE 209
-#define CSS_VAL_CLOSE_QUOTE 210
-#define CSS_VAL_NO_CLOSE_QUOTE 211
-#define CSS_VAL_NO_OPEN_QUOTE 212
-#define CSS_VAL_OPEN_QUOTE 213
-#define CSS_VAL_NOWRAP 214
-#define CSS_VAL_PRE 215
-#define CSS_VAL_PRE_WRAP 216
-#define CSS_VAL_PRE_LINE 217
-#define CSS_VAL__KHTML_NOWRAP 218
-#define CSS_VAL_ABOVE 219
-#define CSS_VAL_ABSOLUTE 220
-#define CSS_VAL_ALWAYS 221
-#define CSS_VAL_AVOID 222
-#define CSS_VAL_BELOW 223
-#define CSS_VAL_BIDI_OVERRIDE 224
-#define CSS_VAL_BLINK 225
-#define CSS_VAL_BOTH 226
-#define CSS_VAL_CROP 227
-#define CSS_VAL_CROSS 228
-#define CSS_VAL_EMBED 229
-#define CSS_VAL_FIXED 230
-#define CSS_VAL_HAND 231
-#define CSS_VAL_HIDE 232
-#define CSS_VAL_HIGHER 233
-#define CSS_VAL_INVERT 234
-#define CSS_VAL_LANDSCAPE 235
-#define CSS_VAL_LEVEL 236
-#define CSS_VAL_LINE_THROUGH 237
-#define CSS_VAL_LOUD 238
-#define CSS_VAL_LOWER 239
-#define CSS_VAL_MARQUEE 240
-#define CSS_VAL_MIX 241
-#define CSS_VAL_OVERLINE 242
-#define CSS_VAL_PORTRAIT 243
-#define CSS_VAL_RELATIVE 244
-#define CSS_VAL_SCROLL 245
-#define CSS_VAL_SEPARATE 246
-#define CSS_VAL_SHOW 247
-#define CSS_VAL_STATIC 248
-#define CSS_VAL_THICK 249
-#define CSS_VAL_THIN 250
-#define CSS_VAL_UNDERLINE 251
-#define CSS_VAL__KHTML_NORMAL 252
-#define CSS_VAL__KHTML_AROUND_FLOATS 253
-#define CSS_VAL_BORDER_BOX 254
-#define CSS_VAL_CONTENT_BOX 255
-#define CSS_VAL_ENABLED 256
-#define CSS_VAL_DISABLED 257
-#define CSS_VAL_FORWARDS 258
-#define CSS_VAL_BACKWARDS 259
-#define CSS_VAL_AHEAD 260
-#define CSS_VAL_REVERSE 261
-#define CSS_VAL_UP 262
-#define CSS_VAL_DOWN 263
-#define CSS_VAL_SLOW 264
-#define CSS_VAL_FAST 265
-#define CSS_VAL_INFINITE 266
-#define CSS_VAL_SLIDE 267
-#define CSS_VAL_ALTERNATE 268
-#define CSS_VAL_UNFURL 269
-#define CSS_VAL_CLIP 270
-#define CSS_VAL_ELLIPSIS 271
-#define CSS_VAL_BORDER 272
-#define CSS_VAL_CONTENT 273
-#define CSS_VAL_PADDING 274
+#define CSS_VAL_DEFAULT 187
+#define CSS_VAL_CONTEXT_MENU 188
+#define CSS_VAL_HELP 189
+#define CSS_VAL_POINTER 190
+#define CSS_VAL_PROGRESS 191
+#define CSS_VAL_WAIT 192
+#define CSS_VAL_CELL 193
+#define CSS_VAL_CROSSHAIR 194
+#define CSS_VAL_TEXT 195
+#define CSS_VAL_VERTICAL_TEXT 196
+#define CSS_VAL_ALIAS 197
+#define CSS_VAL_COPY 198
+#define CSS_VAL_MOVE 199
+#define CSS_VAL_NO_DROP 200
+#define CSS_VAL_NOT_ALLOWED 201
+#define CSS_VAL_E_RESIZE 202
+#define CSS_VAL_N_RESIZE 203
+#define CSS_VAL_NE_RESIZE 204
+#define CSS_VAL_NW_RESIZE 205
+#define CSS_VAL_S_RESIZE 206
+#define CSS_VAL_SE_RESIZE 207
+#define CSS_VAL_SW_RESIZE 208
+#define CSS_VAL_W_RESIZE 209
+#define CSS_VAL_EW_RESIZE 210
+#define CSS_VAL_NS_RESIZE 211
+#define CSS_VAL_NESW_RESIZE 212
+#define CSS_VAL_NWSE_RESIZE 213
+#define CSS_VAL_COL_RESIZE 214
+#define CSS_VAL_ROW_RESIZE 215
+#define CSS_VAL_ALL_SCROLL 216
+#define CSS_VAL_LTR 217
+#define CSS_VAL_RTL 218
+#define CSS_VAL_CAPITALIZE 219
+#define CSS_VAL_UPPERCASE 220
+#define CSS_VAL_LOWERCASE 221
+#define CSS_VAL_VISIBLE 222
+#define CSS_VAL_COLLAPSE 223
+#define CSS_VAL_CLOSE_QUOTE 224
+#define CSS_VAL_NO_CLOSE_QUOTE 225
+#define CSS_VAL_NO_OPEN_QUOTE 226
+#define CSS_VAL_OPEN_QUOTE 227
+#define CSS_VAL_NOWRAP 228
+#define CSS_VAL_PRE 229
+#define CSS_VAL_PRE_WRAP 230
+#define CSS_VAL_PRE_LINE 231
+#define CSS_VAL__KHTML_NOWRAP 232
+#define CSS_VAL_ABOVE 233
+#define CSS_VAL_ABSOLUTE 234
+#define CSS_VAL_ALWAYS 235
+#define CSS_VAL_AVOID 236
+#define CSS_VAL_BELOW 237
+#define CSS_VAL_BIDI_OVERRIDE 238
+#define CSS_VAL_BLINK 239
+#define CSS_VAL_BOTH 240
+#define CSS_VAL_CROP 241
+#define CSS_VAL_CROSS 242
+#define CSS_VAL_EMBED 243
+#define CSS_VAL_FIXED 244
+#define CSS_VAL_HAND 245
+#define CSS_VAL_HIDE 246
+#define CSS_VAL_HIGHER 247
+#define CSS_VAL_INVERT 248
+#define CSS_VAL_LANDSCAPE 249
+#define CSS_VAL_LEVEL 250
+#define CSS_VAL_LINE_THROUGH 251
+#define CSS_VAL_LOUD 252
+#define CSS_VAL_LOWER 253
+#define CSS_VAL_MARQUEE 254
+#define CSS_VAL_MIX 255
+#define CSS_VAL_OVERLINE 256
+#define CSS_VAL_PORTRAIT 257
+#define CSS_VAL_RELATIVE 258
+#define CSS_VAL_SCROLL 259
+#define CSS_VAL_SEPARATE 260
+#define CSS_VAL_SHOW 261
+#define CSS_VAL_STATIC 262
+#define CSS_VAL_THICK 263
+#define CSS_VAL_THIN 264
+#define CSS_VAL_UNDERLINE 265
+#define CSS_VAL__KHTML_NORMAL 266
+#define CSS_VAL__KHTML_AROUND_FLOATS 267
+#define CSS_VAL_BORDER_BOX 268
+#define CSS_VAL_CONTENT_BOX 269
+#define CSS_VAL_ENABLED 270
+#define CSS_VAL_DISABLED 271
+#define CSS_VAL_FORWARDS 272
+#define CSS_VAL_BACKWARDS 273
+#define CSS_VAL_AHEAD 274
+#define CSS_VAL_REVERSE 275
+#define CSS_VAL_UP 276
+#define CSS_VAL_DOWN 277
+#define CSS_VAL_SLOW 278
+#define CSS_VAL_FAST 279
+#define CSS_VAL_INFINITE 280
+#define CSS_VAL_SLIDE 281
+#define CSS_VAL_ALTERNATE 282
+#define CSS_VAL_UNFURL 283
+#define CSS_VAL_CLIP 284
+#define CSS_VAL_ELLIPSIS 285
+#define CSS_VAL_BORDER 286
+#define CSS_VAL_CONTENT 287
+#define CSS_VAL_PADDING 288
-#define CSS_VAL_TOTAL 275
+#define CSS_VAL_TOTAL 289
#endif
diff --git a/khtml/css/cssvalues.in b/khtml/css/cssvalues.in
index 86db776708..48703fedcb 100644
--- a/khtml/css/cssvalues.in
+++ b/khtml/css/cssvalues.in
@@ -1,473 +1,487 @@
# These are all values accepted for CSS2.
#
# WARNING:
# --------
#
# The Values are sorted according to the properties they belong to,
# and have to be in the same order as the enums in render_style.h.
#
# If not, the optimizations in the cssparser and style selector will fail,
# and produce incorrect results.
#
inherit
initial
#
# CSS_PROP_OUTLINE_STYLE
# CSS_PROP_BORDER_TOP_STYLE
# CSS_PROP_BORDER_BOTTOM_STYLE
# CSS_PROP_BORDER_LEFT_STYLE
-khtml-native
none
hidden
inset
groove
ridge
outset
dotted
dashed
solid
double
#
# CSS_PROP_FONT:
#
caption
icon
menu
message-box
small-caption
status-bar
#
# CSS_PROP_FONT_STYLE:
#
#normal
italic
oblique
#
# CSS_PROP_FONT_VARIANT:
#
#normal
small-caps
#
# CSS_PROP_FONT_WEIGHT:
#
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
#
# CSS_PROP_FONT_SIZE:
#
xx-small
x-small
small
medium
large
x-large
xx-large
-khtml-xxx-large
smaller
larger
#
# CSS_PROP_FONT_STRETCH:
#
#normal
wider
narrower
ultra-condensed
extra-condensed
condensed
semi-condensed
semi-expanded
expanded
extra-expanded
ultra-expanded
#
# CSS_PROP_GENERIC_FONT_FAMILY:
#
serif
sans-serif
cursive
fantasy
monospace
#
#
# CSS_PROP_BACKGROUND_COLOR:
#
transparent
#
#
# CSS_PROP_*_COLOR
#
aqua
black
blue
crimson
fuchsia
gray
green
indigo
lime
maroon
navy
olive
orange
purple
red
silver
teal
white
yellow
activeborder
activecaption
appworkspace
background
buttonface
buttonhighlight
buttonshadow
buttontext
captiontext
graytext
highlight
highlighttext
inactiveborder
inactivecaption
inactivecaptiontext
infobackground
infotext
menutext
scrollbar
threeddarkshadow
threedface
threedhighlight
threedlightshadow
threedshadow
window
windowframe
windowtext
#
# colors in non strict mode
grey
-khtml-text
#
# CSS_PROP_BACKGROUND_REPEAT:
#
repeat
repeat-x
repeat-y
no-repeat
#
# CSS_PROP_VERTICAL_ALIGN:
#
baseline
middle
sub
super
text-top
text-bottom
top
bottom
# HTML alignment MIDDLE has no corresponding CSS alignment
-khtml-baseline-middle
#
# CSS_PROP_TEXT_ALIGN:
#
-khtml-auto
left
right
center
justify
-khtml-left
-khtml-right
-khtml-center
#
# CSS_PROP_LIST_STYLE_POSITION:
#
outside
inside
#
# CSS_PROP_LIST_STYLE_TYPE:
#
disc
circle
square
box
-khtml-diamond
decimal
decimal-leading-zero
-khtml-arabic-indic
-khtml-lao
-khtml-persian
-khtml-urdu
-khtml-thai
-khtml-tibetan
lower-roman
upper-roman
hebrew
armenian
georgian
cjk-ideographic
-khtml-japanese-formal
-khtml-japanese-informal
-khtml-simp-chinese-formal
-khtml-simp-chinese-informal
-khtml-trad-chinese-formal
-khtml-trad-chinese-informal
lower-greek
-khtml-upper-greek
lower-alpha
lower-latin
upper-alpha
upper-latin
hiragana
katakana
hiragana-iroha
katakana-iroha
-khtml-open-quote
-khtml-close-quote
#none
#
# CSS_PROP_DISPLAY:
#
inline
block
list-item
run-in
compact
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
#none
#
# CSS_PROP_CURSOR:
#
auto
-crosshair
default
+context-menu
+help
pointer
progress
+wait
+cell
+crosshair
+text
+vertical-text
+alias
+copy
move
+no-drop
+not-allowed
e-resize
+n-resize
ne-resize
nw-resize
-n-resize
+s-resize
se-resize
sw-resize
-s-resize
w-resize
-text
-wait
-help
+ew-resize
+ns-resize
+nesw-resize
+nwse-resize
+col-resize
+row-resize
+all-scroll
#
# CSS_PROP_DIRECTION:
#
ltr
rtl
#
# CSS_PROP_TEXT_TRANSFORM:
#
capitalize
uppercase
lowercase
#none
#
# CSS_PROP_VISIBILITY:
#
visible
#hidden
collapse
#
# CSS_PROP_CONTENT:
#
close-quote
no-close-quote
no-open-quote
open-quote
#
# CSS_PROP_WHITE_SPACE:
#
#normal
nowrap
pre
pre-wrap
pre-line
-khtml-nowrap
#
# Unordered rest
#
above
absolute
always
avoid
below
bidi-override
blink
both
crop
cross
embed
fixed
hand
hide
higher
invert
landscape
level
line-through
loud
lower
marquee
mix
overline
portrait
relative
scroll
separate
show
static
thick
thin
underline
#
# CSS_PROP__KHTML_FLOW_MODE
-khtml-normal
-khtml-around-floats
# CSS3 Values
# CSS_PROP__KHTML_BOX_SIZING
border-box
content-box
# CSS_PROP__KHTML_USER_INPUT
enabled
disabled
#none
# CSS_PROP_MARQUEE_DIRECTION
forwards
backwards
ahead
reverse
# left
# right
up
down
# auto
# CSS_PROP_MARQUEE_SPEED
slow
# normal
fast
# CSS_PROP_MARQUEE_REPETITION
infinite
# CSS_PROP_MARQUEE_STYLE
# none
slide
# scroll
alternate
unfurl
#
# CSS_PROP_TEXT_OVERFLOW
#
clip
ellipsis
#
# CSS_PROP_BACKGROUND_CLIP/ORIGIN
#
border
content
padding
#
# Not supported:
#
# CSS_PROP_BORDER_IMAGE
#
# stretch
# repeat
# round
#
# CSS_PROP_AZIMUTH:
#
#A left-side
#A far-left
#A #left
#A center-left
#A #center
#A center-right
#A right
#A far-right
#A right-side
#A behind
#A leftwards
#A rightwards
#
# CSS_PROP_SPEECH_RATE:
#
#A x-slow
#A slow
#A #medium
#A x-fast
#A fast
#A faster
#A slower
#
# CSS_PROP_VOLUME:
#
#A silent
#A x-soft
#A soft
#A #medium
#A high
#A x-high
#A x-loud
#
# CSS_PROP_PITCH:
#
#A x-low
#A low
#A #medium
#A #high
#A #x-high
#
# CSS_PROP_SPEAK:
#
#A #normal
#A #none
#A spell-out
#
# CSS_PROP_SPEAK_HEADER:
#
#A #once
#A always
#
# CSS_PROP_SPEAK_NUMERAL:
#
#A digits
#A continuous
#
# CSS_PROP_SPEAK_PUNCTUATION:
#
#A code
#A #none
diff --git a/khtml/css/parser.cpp b/khtml/css/parser.cpp
index 6320457fce..01dbc4ef22 100644
--- a/khtml/css/parser.cpp
+++ b/khtml/css/parser.cpp
@@ -1,3223 +1,3223 @@
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 1
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse cssyyparse
#define yylex cssyylex
#define yyerror cssyyerror
#define yylval cssyylval
#define yychar cssyychar
#define yydebug cssyydebug
#define yynerrs cssyynerrs
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
UNIMPORTANT_TOK = 258,
S = 259,
SGML_CD = 260,
INCLUDES = 261,
DASHMATCH = 262,
BEGINSWITH = 263,
ENDSWITH = 264,
CONTAINS = 265,
STRING = 266,
IDENT = 267,
NTH = 268,
HASH = 269,
IMPORT_SYM = 270,
PAGE_SYM = 271,
MEDIA_SYM = 272,
FONT_FACE_SYM = 273,
CHARSET_SYM = 274,
NAMESPACE_SYM = 275,
KHTML_RULE_SYM = 276,
KHTML_DECLS_SYM = 277,
KHTML_VALUE_SYM = 278,
IMPORTANT_SYM = 279,
QEMS = 280,
EMS = 281,
EXS = 282,
PXS = 283,
CMS = 284,
MMS = 285,
INS = 286,
PTS = 287,
PCS = 288,
DEGS = 289,
RADS = 290,
GRADS = 291,
MSECS = 292,
SECS = 293,
HERZ = 294,
KHERZ = 295,
DIMEN = 296,
PERCENTAGE = 297,
FLOAT = 298,
INTEGER = 299,
URI = 300,
FUNCTION = 301,
NOTFUNCTION = 302,
UNICODERANGE = 303
};
#endif
/* Tokens. */
#define UNIMPORTANT_TOK 258
#define S 259
#define SGML_CD 260
#define INCLUDES 261
#define DASHMATCH 262
#define BEGINSWITH 263
#define ENDSWITH 264
#define CONTAINS 265
#define STRING 266
#define IDENT 267
#define NTH 268
#define HASH 269
#define IMPORT_SYM 270
#define PAGE_SYM 271
#define MEDIA_SYM 272
#define FONT_FACE_SYM 273
#define CHARSET_SYM 274
#define NAMESPACE_SYM 275
#define KHTML_RULE_SYM 276
#define KHTML_DECLS_SYM 277
#define KHTML_VALUE_SYM 278
#define IMPORTANT_SYM 279
#define QEMS 280
#define EMS 281
#define EXS 282
#define PXS 283
#define CMS 284
#define MMS 285
#define INS 286
#define PTS 287
#define PCS 288
#define DEGS 289
#define RADS 290
#define GRADS 291
#define MSECS 292
#define SECS 293
#define HERZ 294
#define KHERZ 295
#define DIMEN 296
#define PERCENTAGE 297
#define FLOAT 298
#define INTEGER 299
#define URI 300
#define FUNCTION 301
#define NOTFUNCTION 302
#define UNICODERANGE 303
/* Copy the first part of user declarations. */
/*
* This file is part of the KDE libraries
* Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
* Copyright (c) 2003 Apple Computer
* Copyright (C) 2003 Dirk Mueller (mueller@kde.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "cssparser.h"
#include
#include
//#define CSS_DEBUG
using namespace DOM;
//
// The following file defines the function
// const struct props *findProp(const char *word, int len)
//
// with 'props->id' a CSS property in the range from CSS_PROP_MIN to
// (and including) CSS_PROP_TOTAL-1
// turn off inlining to void warning with newer gcc
#undef __inline
#define __inline
#include "cssproperties.c"
#include "cssvalues.c"
#undef __inline
int DOM::getPropertyID(const char *tagStr, int len)
{
{ // HTML CSS Properties
const struct css_prop *prop = findProp(tagStr, len);
if (!prop)
return 0;
return prop->id;
}
}
int DOM::getValueID(const char *tagStr, int len)
{
{ // HTML CSS Values
const struct css_value *val = findValue(tagStr, len);
if (!val)
return 0;
return val->id;
}
}
#define YYDEBUG 0
#undef YYMAXDEPTH
#define YYPARSE_PARAM parser
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
CSSRuleImpl *rule;
CSSSelector *selector;
QList *selectorList;
bool ok;
MediaListImpl *mediaList;
CSSMediaRuleImpl *mediaRule;
CSSRuleListImpl *ruleList;
ParseString string;
float val;
int prop_id;
unsigned int attribute;
unsigned int element;
unsigned int ns;
CSSSelector::Relation relation;
CSSSelector::Match match;
bool b;
char tok;
Value value;
ValueList *valueList;
}
-/* Line 193 of yacc.c. */
+/* Line 187 of yacc.c. */
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
static inline int cssyyerror(const char *x )
{
#ifdef CSS_DEBUG
qDebug( "%s", x );
#else
Q_UNUSED( x );
#endif
return 1;
}
static int cssyylex( YYSTYPE *yylval ) {
return CSSParser::current()->lex( yylval );
}
#define null 1
/* Line 216 of yacc.c. */
#ifdef short
# undef short
#endif
#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned int
# endif
#endif
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
# if YYENABLE_NLS
# if ENABLE_NLS
# include /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
#else
static int
YYID (i)
int i;
#endif
{
return i;
}
#endif
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# elif defined __BUILTIN_VA_ARG_INCR
# include /* INFRINGES ON USER NAME SPACE */
# elif defined _AIX
# define YYSTACK_ALLOC __alloca
# elif defined _MSC_VER
# include /* INFRINGES ON USER NAME SPACE */
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yytype_int16 yyss;
YYSTYPE yyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 17
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 477
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 67
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 56
/* YYNRULES -- Number of rules. */
#define YYNRULES 165
/* YYNRULES -- Number of states. */
#define YYNSTATES 308
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 303
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 64, 18, 58, 57, 61, 16, 65, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 15, 56,
2, 63, 60, 2, 66, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 17, 2, 62, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 54, 19, 55, 59, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53
};
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 9, 12, 15, 18, 20, 22, 29,
32, 38, 39, 42, 43, 46, 49, 50, 52, 58,
62, 66, 67, 71, 78, 82, 86, 87, 91, 98,
102, 106, 107, 110, 111, 115, 117, 119, 121, 123,
125, 127, 130, 132, 134, 135, 137, 139, 144, 147,
155, 156, 160, 163, 167, 171, 175, 179, 182, 185,
188, 189, 191, 193, 196, 198, 203, 206, 208, 212,
215, 217, 220, 223, 226, 230, 233, 237, 242, 246,
248, 250, 252, 255, 258, 260, 262, 264, 266, 269,
272, 277, 286, 292, 302, 304, 306, 308, 310, 312,
314, 316, 318, 321, 325, 330, 335, 340, 345, 351,
356, 361, 366, 372, 378, 382, 386, 391, 396, 402,
405, 408, 411, 412, 414, 418, 421, 424, 425, 427,
430, 433, 436, 439, 442, 445, 447, 449, 452, 455,
458, 461, 464, 467, 470, 473, 476, 479, 482, 485,
488, 491, 494, 497, 500, 503, 506, 512, 516, 519,
523, 527, 530, 536, 540, 542
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
68, 0, -1, 75, 74, 77, 79, 82, -1, 70,
73, -1, 71, 73, -1, 72, 73, -1, 94, -1,
78, -1, 26, 54, 73, 69, 73, 55, -1, 27,
108, -1, 28, 54, 73, 113, 55, -1, -1, 73,
4, -1, -1, 74, 5, -1, 74, 4, -1, -1,
76, -1, 24, 73, 11, 73, 56, -1, 24, 1,
121, -1, 24, 1, 56, -1, -1, 77, 78, 74,
-1, 20, 73, 84, 73, 85, 56, -1, 20, 1,
121, -1, 20, 1, 56, -1, -1, 79, 80, 74,
-1, 25, 73, 81, 84, 73, 56, -1, 25, 1,
121, -1, 25, 1, 56, -1, -1, 12, 4, -1,
-1, 82, 83, 74, -1, 94, -1, 87, -1, 90,
-1, 91, -1, 120, -1, 119, -1, 78, 1, -1,
11, -1, 50, -1, -1, 86, -1, 89, -1, 86,
57, 73, 89, -1, 86, 1, -1, 22, 73, 86,
54, 73, 88, 55, -1, -1, 88, 94, 73, -1,
12, 73, -1, 21, 1, 121, -1, 21, 1, 56,
-1, 23, 1, 121, -1, 23, 1, 56, -1, 58,
73, -1, 59, 73, -1, 60, 73, -1, -1, 61,
-1, 58, -1, 95, 108, -1, 96, -1, 95, 57,
73, 96, -1, 95, 1, -1, 98, -1, 96, 92,
98, -1, 96, 1, -1, 19, -1, 18, 19, -1,
12, 19, -1, 99, 73, -1, 99, 100, 73, -1,
100, 73, -1, 97, 99, 73, -1, 97, 99, 100,
73, -1, 97, 100, 73, -1, 12, -1, 18, -1,
101, -1, 100, 101, -1, 100, 1, -1, 14, -1,
102, -1, 104, -1, 107, -1, 16, 12, -1, 12,
73, -1, 17, 73, 103, 62, -1, 17, 73, 103,
105, 73, 106, 73, 62, -1, 17, 73, 97, 103,
62, -1, 17, 73, 97, 103, 105, 73, 106, 73,
62, -1, 63, -1, 6, -1, 7, -1, 8, -1,
9, -1, 10, -1, 12, -1, 11, -1, 15, 12,
-1, 15, 15, 12, -1, 15, 51, 13, 64, -1,
15, 51, 49, 64, -1, 15, 51, 12, 64, -1,
15, 51, 11, 64, -1, 15, 52, 73, 98, 64,
-1, 54, 73, 110, 55, -1, 54, 73, 1, 55,
-1, 54, 73, 109, 55, -1, 54, 73, 109, 110,
55, -1, 54, 73, 109, 1, 55, -1, 110, 56,
73, -1, 1, 56, 73, -1, 109, 110, 56, 73,
-1, 109, 1, 56, 73, -1, 111, 15, 73, 113,
112, -1, 1, 121, -1, 12, 73, -1, 29, 73,
-1, -1, 115, -1, 113, 114, 115, -1, 65, 73,
-1, 57, 73, -1, -1, 116, -1, 93, 116, -1,
46, 73, -1, 11, 73, -1, 12, 73, -1, 50,
73, -1, 53, 73, -1, 118, -1, 117, -1, 49,
73, -1, 48, 73, -1, 47, 73, -1, 33, 73,
-1, 34, 73, -1, 35, 73, -1, 36, 73, -1,
37, 73, -1, 38, 73, -1, 39, 73, -1, 40,
73, -1, 41, 73, -1, 42, 73, -1, 43, 73,
-1, 44, 73, -1, 45, 73, -1, 31, 73, -1,
30, 73, -1, 32, 73, -1, 51, 73, 113, 64,
73, -1, 51, 73, 1, -1, 14, 73, -1, 66,
1, 121, -1, 66, 1, 56, -1, 1, 121, -1,
54, 1, 122, 1, 55, -1, 54, 1, 55, -1,
121, -1, 122, 1, 121, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 263, 263, 264, 265, 266, 270, 271, 275, 282,
288, 313, 314, 317, 319, 320, 323, 325, 328, 339,
342, 347, 349, 360, 370, 373, 379, 380, 384, 392,
393, 397, 398, 401, 403, 414, 415, 416, 417, 418,
419, 420, 424, 425, 429, 432, 437, 441, 446, 453,
467, 468, 478, 500, 503, 509, 512, 518, 519, 520,
521, 525, 526, 530, 552, 565, 583, 592, 595, 609,
616, 617, 618, 622, 626, 631, 636, 643, 652, 664,
680, 686, 689, 699, 706, 712, 713, 714, 718, 727,
751, 756, 762, 770, 782, 785, 788, 791, 794, 797,
803, 804, 808, 814, 820, 827, 834, 841, 848, 857,
860, 863, 866, 871, 877, 881, 884, 889, 895, 917,
923, 930, 931, 935, 939, 955, 958, 961, 967, 968,
970, 971, 972, 978, 979, 980, 982, 988, 989, 990,
991, 992, 993, 994, 995, 996, 997, 998, 999, 1000,
1001, 1002, 1003, 1004, 1005, 1006, 1011, 1019, 1035, 1042,
1048, 1057, 1083, 1084, 1088, 1089
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "UNIMPORTANT_TOK", "S", "SGML_CD",
"INCLUDES", "DASHMATCH", "BEGINSWITH", "ENDSWITH", "CONTAINS", "STRING",
"IDENT", "NTH", "HASH", "':'", "'.'", "'['", "'*'", "'|'", "IMPORT_SYM",
"PAGE_SYM", "MEDIA_SYM", "FONT_FACE_SYM", "CHARSET_SYM", "NAMESPACE_SYM",
"KHTML_RULE_SYM", "KHTML_DECLS_SYM", "KHTML_VALUE_SYM", "IMPORTANT_SYM",
"QEMS", "EMS", "EXS", "PXS", "CMS", "MMS", "INS", "PTS", "PCS", "DEGS",
"RADS", "GRADS", "MSECS", "SECS", "HERZ", "KHERZ", "DIMEN", "PERCENTAGE",
"FLOAT", "INTEGER", "URI", "FUNCTION", "NOTFUNCTION", "UNICODERANGE",
"'{'", "'}'", "';'", "','", "'+'", "'~'", "'>'", "'-'", "']'", "'='",
"')'", "'/'", "'@'", "$accept", "stylesheet", "ruleset_or_import",
"khtml_rule", "khtml_decls", "khtml_value", "maybe_space", "maybe_sgml",
"maybe_charset", "charset", "import_list", "import", "namespace_list",
"namespace", "maybe_ns_prefix", "rule_list", "rule", "string_or_uri",
"maybe_media_list", "media_list", "media", "ruleset_list", "medium",
"page", "font_face", "combinator", "unary_operator", "ruleset",
"selector_list", "selector", "namespace_selector", "simple_selector",
"element_name", "specifier_list", "specifier", "class", "attrib_id",
"attrib", "match", "ident_or_string", "pseudo", "declaration_block",
"declaration_list", "declaration", "property", "prio", "expr",
"operator", "term", "unary_term", "function", "hexcolor", "invalid_at",
"invalid_rule", "invalid_block", "invalid_block_list", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 58, 46, 91, 42, 124,
270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
300, 301, 302, 303, 123, 125, 59, 44, 43, 126,
62, 45, 93, 61, 41, 47, 64
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 67, 68, 68, 68, 68, 69, 69, 70, 71,
72, 73, 73, 74, 74, 74, 75, 75, 76, 76,
76, 77, 77, 78, 78, 78, 79, 79, 80, 80,
80, 81, 81, 82, 82, 83, 83, 83, 83, 83,
83, 83, 84, 84, 85, 85, 86, 86, 86, 87,
88, 88, 89, 90, 90, 91, 91, 92, 92, 92,
92, 93, 93, 94, 95, 95, 95, 96, 96, 96,
97, 97, 97, 98, 98, 98, 98, 98, 98, 99,
99, 100, 100, 100, 101, 101, 101, 101, 102, 103,
104, 104, 104, 104, 105, 105, 105, 105, 105, 105,
106, 106, 107, 107, 107, 107, 107, 107, 107, 108,
108, 108, 108, 108, 109, 109, 109, 109, 110, 110,
111, 112, 112, 113, 113, 114, 114, 114, 115, 115,
115, 115, 115, 115, 115, 115, 115, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 117, 117, 118, 119,
119, 120, 121, 121, 122, 122
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 5, 2, 2, 2, 1, 1, 6, 2,
5, 0, 2, 0, 2, 2, 0, 1, 5, 3,
3, 0, 3, 6, 3, 3, 0, 3, 6, 3,
3, 0, 2, 0, 3, 1, 1, 1, 1, 1,
1, 2, 1, 1, 0, 1, 1, 4, 2, 7,
0, 3, 2, 3, 3, 3, 3, 2, 2, 2,
0, 1, 1, 2, 1, 4, 2, 1, 3, 2,
1, 2, 2, 2, 3, 2, 3, 4, 3, 1,
1, 1, 2, 2, 1, 1, 1, 1, 2, 2,
4, 8, 5, 9, 1, 1, 1, 1, 1, 1,
1, 1, 2, 3, 4, 4, 4, 4, 5, 4,
4, 4, 5, 5, 3, 3, 4, 4, 5, 2,
2, 2, 0, 1, 3, 2, 2, 0, 1, 2,
2, 2, 2, 2, 2, 1, 1, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 5, 3, 2, 3,
3, 2, 5, 3, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
16, 0, 0, 0, 0, 0, 11, 11, 11, 13,
17, 0, 0, 11, 11, 9, 11, 1, 3, 4,
5, 21, 0, 20, 19, 12, 11, 0, 0, 0,
15, 14, 26, 0, 0, 79, 84, 0, 0, 11,
80, 70, 0, 11, 7, 6, 0, 0, 0, 67,
11, 0, 81, 85, 86, 87, 0, 11, 0, 0,
0, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 62, 61, 0,
127, 123, 128, 136, 135, 13, 33, 163, 164, 0,
18, 72, 102, 0, 0, 11, 88, 0, 71, 0,
0, 0, 66, 11, 63, 69, 11, 11, 11, 0,
79, 80, 11, 0, 73, 0, 83, 75, 82, 110,
11, 119, 120, 0, 111, 0, 109, 11, 11, 131,
132, 158, 154, 153, 155, 140, 141, 142, 143, 144,
145, 146, 147, 148, 149, 150, 151, 152, 130, 139,
138, 137, 133, 0, 134, 129, 10, 11, 11, 0,
22, 0, 13, 0, 0, 103, 0, 0, 0, 0,
0, 11, 0, 0, 0, 25, 24, 42, 43, 11,
8, 0, 57, 58, 59, 68, 76, 0, 78, 74,
115, 113, 11, 112, 11, 114, 0, 157, 127, 126,
125, 124, 0, 31, 27, 0, 0, 11, 0, 0,
0, 13, 36, 37, 38, 35, 40, 39, 162, 165,
107, 106, 104, 105, 0, 89, 11, 0, 95, 96,
97, 98, 99, 90, 94, 11, 44, 0, 77, 117,
116, 127, 11, 30, 29, 0, 0, 161, 0, 0,
0, 0, 41, 34, 108, 92, 11, 0, 11, 0,
0, 46, 11, 118, 156, 32, 11, 54, 53, 0,
56, 55, 160, 159, 0, 101, 100, 11, 52, 23,
48, 11, 121, 0, 11, 11, 0, 0, 28, 50,
0, 91, 47, 0, 93, 49, 11, 51
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 5, 43, 6, 7, 8, 235, 21, 9, 10,
32, 44, 96, 172, 256, 173, 221, 189, 269, 270,
222, 303, 271, 223, 224, 119, 89, 45, 46, 47,
48, 49, 50, 51, 52, 53, 184, 54, 245, 287,
55, 15, 58, 59, 60, 273, 90, 169, 91, 92,
93, 94, 226, 227, 131, 99
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -172
static const yytype_int16 yypact[] =
{
235, 18, -44, -27, 59, 23, -172, -172, -172, -172,
-172, 135, 0, -172, -172, -172, -172, -172, 119, 119,
119, 32, 134, -172, -172, -172, -172, 340, 20, 335,
-172, -172, 121, 47, 53, 127, -172, 195, 156, -172,
173, -172, 189, -172, -172, -172, 38, 168, 459, -172,
317, 160, -172, -172, -172, -172, 186, -172, 102, 103,
180, -172, -172, -172, -172, -172, -172, -172, -172, -172,
-172, -172, -172, -172, -172, -172, -172, -172, -172, -172,
-172, -172, -172, -172, -172, -172, -172, -172, -172, 413,
63, -172, -172, -172, -172, -172, 177, -172, -172, 197,
-172, -172, -172, 203, 114, -172, -172, 16, -172, 152,
94, 126, -172, -172, -172, -172, -172, -172, -172, 451,
-172, -172, 317, 160, 119, 160, -172, 119, -172, -172,
-172, -172, 119, 194, -172, 213, -172, -172, -172, 119,
119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
119, 119, 119, 277, 119, -172, -172, -172, -172, 378,
32, 193, -172, 133, 219, -172, 181, 192, 196, 206,
383, 127, 173, 241, 37, -172, -172, -172, -172, -172,
-172, 383, 119, 119, 119, -172, 119, 160, 119, 119,
119, -172, -172, -172, -172, 119, 335, -172, 74, 119,
119, -172, 157, 107, 32, 222, 276, -172, 278, 279,
281, -172, -172, -172, -172, -172, -172, -172, -172, -172,
-172, -172, -172, -172, 221, 119, -172, 45, -172, -172,
-172, -172, -172, -172, -172, -172, 161, 283, 119, 119,
119, 377, -172, -172, -172, 288, -2, -172, 167, 161,
198, 210, -172, 32, -172, -172, -172, 226, -172, 227,
2, -172, -172, -172, 119, -172, -172, -172, -172, 39,
-172, -172, -172, -172, 226, -172, -172, -172, 119, -172,
-172, -172, 119, 106, -172, -172, 27, 161, -172, 119,
29, -172, -172, 217, -172, -172, -172, 119
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-172, -172, -172, -172, -172, -172, -1, -78, -172, -172,
-172, -31, -172, -172, -172, -172, -172, 31, -172, 44,
-172, -172, 7, -172, -172, -172, -172, -171, -172, 105,
199, -93, 297, -32, -37, -172, 146, -172, 99, 64,
-172, 304, -172, 293, -172, -172, -66, -172, 184, 272,
-172, -172, -172, -172, -3, -172
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -123
static const yytype_int16 yytable[] =
{
12, 95, 225, 290, 25, 18, 19, 20, 24, 187,
13, 26, 27, 28, 128, 29, 123, 170, 125, 11,
25, 56, -11, 17, 25, 34, 195, 14, 181, -11,
98, 25, 57, 25, 182, 41, 30, 31, 107, 112,
290, 110, 111, 238, 239, 240, 241, 242, 188, 124,
127, 238, 239, 240, 241, 242, 132, 25, -45, 291,
139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
159, 160, 161, 162, 163, 164, 128, 234, 128, 301,
197, 304, 14, 294, 214, 113, 291, 208, 25, 243,
244, 22, 97, 133, 180, 187, 186, 265, 244, 100,
25, 25, 191, 16, 57, 192, 193, 194, 166, 255,
167, 196, 198, 25, 199, 176, 177, 178, 168, 200,
25, 167, 306, -2, 215, 33, 205, 206, 252, 168,
251, 42, 220, 263, 188, 35, 101, 36, 37, 38,
39, 40, 41, 42, 216, 217, 218, 134, 136, 137,
128, 126, 298, 179, -11, 25, 209, 210, 106, 115,
213, 229, -11, 268, 36, 37, 38, 39, -11, -11,
-60, 190, -60, -60, -60, -60, -60, -60, 246, 22,
109, 23, 108, -11, 212, 138, 248, -11, 174, 219,
-11, 249, 171, 250, -11, -11, 22, 102, 185, 254,
103, 22, 257, 253, -11, 175, 259, -11, -11, -11,
-11, 22, -64, 277, -11, -64, 116, 117, 118, 35,
25, 36, 37, 38, 39, 40, 41, 285, 286, -11,
22, 129, 130, -11, 267, 230, 104, 105, 22, 201,
202, 274, 22, 236, 280, 278, 231, 281, 283, 1,
232, 2, 3, 4, 22, 284, 282, 288, 203, 204,
233, 292, 305, 22, 228, 293, 22, 258, 207, 260,
261, 25, 262, 289, 115, 264, 296, 276, 61, 62,
297, 63, 275, 299, 300, -60, 247, -60, -60, -60,
-60, -60, -60, 279, 302, 307, 183, 64, 65, 66,
67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 237,
86, 36, 37, 38, 39, 87, 266, -65, 88, 25,
-65, 116, 117, 118, 25, 122, 61, 62, 295, 63,
114, 135, 35, 211, 36, 37, 38, 39, 40, 41,
42, 165, 0, 0, 0, 64, 65, 66, 67, 68,
69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83, 84, 85, 25, 86, 61,
62, 0, 63, 87, 0, 35, 88, 36, 37, 38,
39, 40, 41, 0, 0, 0, 272, 0, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
0, 86, -122, -122, 167, 0, 87, 0, 0, 88,
0, 0, 168, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 0,
81, 82, 83, 35, 0, 36, 37, 38, 39, 40,
41, 120, 0, 36, 37, 38, 39, 121
};
static const yytype_int16 yycheck[] =
{
1, 32, 173, 1, 4, 6, 7, 8, 11, 11,
54, 11, 13, 14, 51, 16, 48, 95, 50, 1,
4, 1, 4, 0, 4, 26, 119, 54, 12, 11,
33, 4, 12, 4, 18, 19, 4, 5, 39, 1,
1, 42, 43, 6, 7, 8, 9, 10, 50, 50,
51, 6, 7, 8, 9, 10, 57, 4, 56, 57,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 123, 180, 125, 62,
122, 62, 54, 54, 172, 57, 57, 163, 4, 62,
63, 54, 55, 1, 105, 11, 109, 62, 63, 56,
4, 4, 113, 54, 12, 116, 117, 118, 55, 12,
57, 122, 123, 4, 125, 11, 12, 13, 65, 130,
4, 57, 303, 0, 1, 1, 137, 138, 64, 65,
206, 20, 173, 221, 50, 12, 19, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 55, 55, 56,
197, 1, 56, 49, 4, 4, 167, 168, 12, 1,
171, 174, 12, 12, 14, 15, 16, 17, 18, 19,
12, 55, 14, 15, 16, 17, 18, 19, 189, 54,
1, 56, 19, 4, 1, 15, 197, 4, 1, 66,
11, 202, 25, 204, 11, 12, 54, 12, 56, 212,
15, 54, 215, 56, 54, 12, 217, 57, 58, 59,
60, 54, 54, 56, 64, 57, 58, 59, 60, 12,
4, 14, 15, 16, 17, 18, 19, 11, 12, 50,
54, 55, 56, 50, 245, 64, 51, 52, 54, 55,
56, 252, 54, 12, 56, 258, 64, 260, 261, 24,
64, 26, 27, 28, 54, 266, 56, 268, 55, 56,
64, 272, 55, 54, 55, 276, 54, 1, 1, 1,
1, 4, 1, 56, 1, 64, 287, 256, 11, 12,
291, 14, 4, 294, 295, 12, 191, 14, 15, 16,
17, 18, 19, 259, 297, 306, 107, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 183,
53, 14, 15, 16, 17, 58, 237, 54, 61, 4,
57, 58, 59, 60, 4, 48, 11, 12, 284, 14,
46, 58, 12, 169, 14, 15, 16, 17, 18, 19,
20, 89, -1, -1, -1, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 4, 53, 11,
12, -1, 14, 58, -1, 12, 61, 14, 15, 16,
17, 18, 19, -1, -1, -1, 29, -1, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
-1, 53, 55, 56, 57, -1, 58, -1, -1, 61,
-1, -1, 65, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, -1,
47, 48, 49, 12, -1, 14, 15, 16, 17, 18,
19, 12, -1, 14, 15, 16, 17, 18
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 24, 26, 27, 28, 68, 70, 71, 72, 75,
76, 1, 73, 54, 54, 108, 54, 0, 73, 73,
73, 74, 54, 56, 121, 4, 11, 73, 73, 73,
4, 5, 77, 1, 73, 12, 14, 15, 16, 17,
18, 19, 20, 69, 78, 94, 95, 96, 97, 98,
99, 100, 101, 102, 104, 107, 1, 12, 109, 110,
111, 11, 12, 14, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 53, 58, 61, 93,
113, 115, 116, 117, 118, 78, 79, 55, 121, 122,
56, 19, 12, 15, 51, 52, 12, 73, 19, 1,
73, 73, 1, 57, 108, 1, 58, 59, 60, 92,
12, 18, 99, 100, 73, 100, 1, 73, 101, 55,
56, 121, 73, 1, 55, 110, 55, 56, 15, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 116, 55, 57, 65, 114,
74, 25, 80, 82, 1, 12, 11, 12, 13, 49,
73, 12, 18, 97, 103, 56, 121, 11, 50, 84,
55, 73, 73, 73, 73, 98, 73, 100, 73, 73,
73, 55, 56, 55, 56, 73, 73, 1, 113, 73,
73, 115, 1, 73, 74, 1, 21, 22, 23, 66,
78, 83, 87, 90, 91, 94, 119, 120, 55, 121,
64, 64, 64, 64, 98, 73, 12, 103, 6, 7,
8, 9, 10, 62, 63, 105, 73, 96, 73, 73,
73, 113, 64, 56, 121, 12, 81, 121, 1, 73,
1, 1, 1, 74, 64, 62, 105, 73, 12, 85,
86, 89, 29, 112, 73, 4, 84, 56, 121, 86,
56, 121, 56, 121, 73, 11, 12, 106, 73, 56,
1, 57, 73, 73, 54, 106, 73, 73, 56, 73,
73, 62, 89, 88, 62, 55, 94, 73
};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#endif
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval)
#endif
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
#endif
{
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
YYUSE (yyoutput);
# endif
switch (yytype)
{
default:
break;
}
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
#endif
{
if (yytype < YYNTOKENS)
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep);
YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
yy_stack_print (bottom, top)
yytype_int16 *bottom;
yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
# define YY_STACK_PRINT(Bottom, Top) \
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
static void
yy_reduce_print (yyvsp, yyrule)
YYSTYPE *yyvsp;
int yyrule;
#endif
{
int yynrhs = yyr2[yyrule];
int yyi;
unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
fprintf (stderr, "\n");
}
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
yy_reduce_print (yyvsp, Rule); \
} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
#if YYERROR_VERBOSE
# ifndef yystrlen
# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
const char *yystr;
#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
continue;
return yylen;
}
# endif
# endif
# ifndef yystpcpy
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
#endif
{
char *yyd = yydest;
const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
contains an apostrophe, a comma, or backslash (other than
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
YYSIZE_T yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
case '"':
if (yyres)
yyres[yyn] = '\0';
return yyn;
}
do_not_strip_quotes: ;
}
if (! yyres)
return yystrlen (yystr);
return yystpcpy (yyres, yystr) - yyres;
}
# endif
/* Copy into YYRESULT an error message about the unexpected token
YYCHAR while in state YYSTATE. Return the number of bytes copied,
including the terminating null byte. If YYRESULT is null, do not
copy anything; just return the number of bytes that would be
copied. As a special case, return 0 if an ordinary "syntax error"
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
size calculation. */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
return 0;
else
{
int yytype = YYTRANSLATE (yychar);
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx;
# if 0
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s");
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
char *yyfmt;
char const *yyf;
static char const yyunexpected[] = "syntax error, unexpected %s";
static char const yyexpecting[] = ", expecting %s";
static char const yyor[] = " or %s";
char yyformat[sizeof yyunexpected
+ sizeof yyexpecting - 1
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
* (sizeof yyor - 1))];
char const *yyprefix = yyexpecting;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 1;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
}
yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
if (yysize_overflow)
return YYSIZE_MAXIMUM;
if (yyresult)
{
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
char *yyp = yyresult;
int yyi = 0;
while ((*yyp = *yyf) != '\0')
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
}
}
}
return yysize;
}
}
#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yymsg, yytype, yyvaluep)
const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
{
YYUSE (yyvaluep);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
case 85: /* "maybe_media_list" */
{ delete (yyvaluep->mediaList); (yyvaluep->mediaList) = 0; };
break;
case 86: /* "media_list" */
{ delete (yyvaluep->mediaList); (yyvaluep->mediaList) = 0; };
break;
case 88: /* "ruleset_list" */
{ delete (yyvaluep->ruleList); (yyvaluep->ruleList) = 0; };
break;
case 95: /* "selector_list" */
{ if ((yyvaluep->selectorList)) qDeleteAll(*(yyvaluep->selectorList)); delete (yyvaluep->selectorList); (yyvaluep->selectorList) = 0; };
break;
case 96: /* "selector" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 98: /* "simple_selector" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 100: /* "specifier_list" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 101: /* "specifier" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 102: /* "class" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 104: /* "attrib" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 107: /* "pseudo" */
{ delete (yyvaluep->selector); (yyvaluep->selector) = 0; };
break;
case 113: /* "expr" */
{ delete (yyvaluep->valueList); (yyvaluep->valueList) = 0; };
break;
default:
break;
}
}
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/*----------.
| yyparse. |
`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
int
yyparse ()
#endif
#endif
{
/* The look-ahead symbol. */
int yychar;
/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
int yystate;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. Read a
look-ahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
if (yychar <= YYEOF)
{
yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yytoken = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 8:
{
CSSParser *p = static_cast(parser);
p->rule = (yyvsp[(4) - (6)].rule);
;}
break;
case 9:
{
/* can be empty */
;}
break;
case 10:
{
CSSParser *p = static_cast(parser);
if ( (yyvsp[(4) - (5)].valueList) ) {
p->valueList = (yyvsp[(4) - (5)].valueList);
#ifdef CSS_DEBUG
kDebug( 6080 ) << " got property for " << p->id <<
(p->important?" important":"");
bool ok =
#endif
p->parseValue( p->id, p->important );
#ifdef CSS_DEBUG
if ( !ok )
kDebug( 6080 ) << " couldn't parse value!";
#endif
}
#ifdef CSS_DEBUG
else
kDebug( 6080 ) << " no value found!";
#endif
delete p->valueList;
p->valueList = 0;
;}
break;
case 18:
{
#ifdef CSS_DEBUG
kDebug( 6080 ) << "charset rule: " << qString((yyvsp[(3) - (5)].string));
#endif
CSSParser* p = static_cast(parser);
if ((yyval.rule) && p->styleElement && p->styleElement->isCSSStyleSheet()) {
(yyval.rule) = new CSSCharsetRuleImpl(p->styleElement, domString((yyvsp[(3) - (5)].string)));
p->styleElement->append((yyval.rule));
} else
(yyval.rule) = 0;
;}
break;
case 19:
{
(yyval.rule) = 0;
;}
break;
case 20:
{
(yyval.rule) = 0;
;}
break;
case 22:
{
CSSParser *p = static_cast(parser);
if ( (yyvsp[(2) - (3)].rule) && p->styleElement && p->styleElement->isCSSStyleSheet() ) {
p->styleElement->append( (yyvsp[(2) - (3)].rule) );
} else {
delete (yyvsp[(2) - (3)].rule);
}
;}
break;
case 23:
{
#ifdef CSS_DEBUG
kDebug( 6080 ) << "@import: " << qString((yyvsp[(3) - (6)].string));
#endif
CSSParser *p = static_cast(parser);
if ( (yyvsp[(5) - (6)].mediaList) && p->styleElement && p->styleElement->isCSSStyleSheet() )
(yyval.rule) = new CSSImportRuleImpl( p->styleElement, domString((yyvsp[(3) - (6)].string)), (yyvsp[(5) - (6)].mediaList) );
else
(yyval.rule) = 0;
;}
break;
case 24:
{
(yyval.rule) = 0;
;}
break;
case 25:
{
(yyval.rule) = 0;
;}
break;
case 28:
{
#ifdef CSS_DEBUG
kDebug( 6080 ) << "@namespace: " << qString((yyvsp[(4) - (6)].string));
#endif
CSSParser *p = static_cast(parser);
if (p->styleElement && p->styleElement->isCSSStyleSheet())
static_cast(p->styleElement)->addNamespace(p, domString((yyvsp[(3) - (6)].string)), domString((yyvsp[(4) - (6)].string)));
;}
break;
case 31:
{ (yyval.string).string = 0; ;}
break;
case 32:
{ (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
case 34:
{
CSSParser *p = static_cast(parser);
if ( (yyvsp[(2) - (3)].rule) && p->styleElement && p->styleElement->isCSSStyleSheet() ) {
p->styleElement->append( (yyvsp[(2) - (3)].rule) );
} else {
delete (yyvsp[(2) - (3)].rule);
}
;}
break;
case 41:
{ delete (yyvsp[(1) - (2)].rule); (yyval.rule) = 0; ;}
break;
case 44:
{
(yyval.mediaList) = new MediaListImpl();
;}
break;
case 46:
{
(yyval.mediaList) = new MediaListImpl();
(yyval.mediaList)->appendMedium( domString((yyvsp[(1) - (1)].string)).lower() );
;}
break;
case 47:
{
(yyval.mediaList) = (yyvsp[(1) - (4)].mediaList);
if ((yyval.mediaList))
(yyval.mediaList)->appendMedium( domString((yyvsp[(4) - (4)].string)).lower() );
;}
break;
case 48:
{
delete (yyvsp[(1) - (2)].mediaList);
(yyval.mediaList) = 0;
;}
break;
case 49:
{
CSSParser *p = static_cast(parser);
if ( (yyvsp[(3) - (7)].mediaList) && (yyvsp[(6) - (7)].ruleList) &&
p->styleElement && p->styleElement->isCSSStyleSheet() ) {
(yyval.rule) = new CSSMediaRuleImpl( static_cast(p->styleElement), (yyvsp[(3) - (7)].mediaList), (yyvsp[(6) - (7)].ruleList) );
} else {
(yyval.rule) = 0;
delete (yyvsp[(3) - (7)].mediaList);
delete (yyvsp[(6) - (7)].ruleList);
}
;}
break;
case 50:
{ (yyval.ruleList) = 0; ;}
break;
case 51:
{
(yyval.ruleList) = (yyvsp[(1) - (3)].ruleList);
if ( (yyvsp[(2) - (3)].rule) ) {
if ( !(yyval.ruleList) ) (yyval.ruleList) = new CSSRuleListImpl();
(yyval.ruleList)->append( (yyvsp[(2) - (3)].rule) );
}
;}
break;
case 52:
{
(yyval.string) = (yyvsp[(1) - (2)].string);
;}
break;
case 53:
{
(yyval.rule) = 0;
;}
break;
case 54:
{
(yyval.rule) = 0;
;}
break;
case 55:
{
(yyval.rule) = 0;
;}
break;
case 56:
{
(yyval.rule) = 0;
;}
break;
case 57:
{ (yyval.relation) = CSSSelector::DirectAdjacent; ;}
break;
case 58:
{ (yyval.relation) = CSSSelector::IndirectAdjacent; ;}
break;
case 59:
{ (yyval.relation) = CSSSelector::Child; ;}
break;
case 60:
{ (yyval.relation) = CSSSelector::Descendant; ;}
break;
case 61:
{ (yyval.val) = -1; ;}
break;
case 62:
{ (yyval.val) = 1; ;}
break;
case 63:
{
#ifdef CSS_DEBUG
kDebug( 6080 ) << "got ruleset" << endl << " selector:";
#endif
CSSParser *p = static_cast(parser);
if ( (yyvsp[(1) - (2)].selectorList) && (yyvsp[(2) - (2)].ok) && p->numParsedProperties ) {
CSSStyleRuleImpl *rule = new CSSStyleRuleImpl( p->styleElement );
CSSStyleDeclarationImpl *decl = p->createStyleDeclaration( rule );
rule->setSelector( (yyvsp[(1) - (2)].selectorList) );
rule->setDeclaration(decl);
(yyval.rule) = rule;
} else {
(yyval.rule) = 0;
if ((yyvsp[(1) - (2)].selectorList)) qDeleteAll(*(yyvsp[(1) - (2)].selectorList));
delete (yyvsp[(1) - (2)].selectorList);
(yyvsp[(1) - (2)].selectorList) = 0;
p->clearProperties();
}
;}
break;
case 64:
{
if ( (yyvsp[(1) - (1)].selector) ) {
(yyval.selectorList) = new QList;
#ifdef CSS_DEBUG
kDebug( 6080 ) << " got simple selector:";
(yyvsp[(1) - (1)].selector)->print();
#endif
(yyval.selectorList)->append( (yyvsp[(1) - (1)].selector) );
khtml::CSSStyleSelector::precomputeAttributeDependencies(static_cast(parser)->document(), (yyvsp[(1) - (1)].selector));
} else {
(yyval.selectorList) = 0;
}
;}
break;
case 65:
{
if ( (yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector) ) {
(yyval.selectorList) = (yyvsp[(1) - (4)].selectorList);
(yyval.selectorList)->append( (yyvsp[(4) - (4)].selector) );
khtml::CSSStyleSelector::precomputeAttributeDependencies(static_cast(parser)->document(), (yyvsp[(4) - (4)].selector));
#ifdef CSS_DEBUG
kDebug( 6080 ) << " got simple selector:";
(yyvsp[(4) - (4)].selector)->print();
#endif
} else {
if ((yyvsp[(1) - (4)].selectorList)) qDeleteAll(*(yyvsp[(1) - (4)].selectorList));
delete (yyvsp[(1) - (4)].selectorList);
(yyvsp[(1) - (4)].selectorList)=0;
delete (yyvsp[(4) - (4)].selector);
(yyval.selectorList) = 0;
}
;}
break;
case 66:
{
if ((yyvsp[(1) - (2)].selectorList)) qDeleteAll(*(yyvsp[(1) - (2)].selectorList));
delete (yyvsp[(1) - (2)].selectorList);
(yyvsp[(1) - (2)].selectorList) = 0;
(yyval.selectorList) = 0;
;}
break;
case 67:
{
(yyval.selector) = (yyvsp[(1) - (1)].selector);
;}
break;
case 68:
{
if ( !(yyvsp[(1) - (3)].selector) || !(yyvsp[(3) - (3)].selector) ) {
delete (yyvsp[(1) - (3)].selector);
delete (yyvsp[(3) - (3)].selector);
(yyval.selector) = 0;
} else {
(yyval.selector) = (yyvsp[(3) - (3)].selector);
CSSSelector *end = (yyvsp[(3) - (3)].selector);
while( end->tagHistory )
end = end->tagHistory;
end->relation = (yyvsp[(2) - (3)].relation);
end->tagHistory = (yyvsp[(1) - (3)].selector);
}
;}
break;
case 69:
{
delete (yyvsp[(1) - (2)].selector);
(yyval.selector) = 0;
;}
break;
case 70:
{ (yyval.string).string = 0; (yyval.string).length = 0; ;}
break;
case 71:
{ static unsigned short star = '*'; (yyval.string).string = ☆ (yyval.string).length = 1; ;}
break;
case 72:
{ (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
case 73:
{
(yyval.selector) = new CSSSelector();
(yyval.selector)->tag = (yyvsp[(1) - (2)].element);
;}
break;
case 74:
{
(yyval.selector) = (yyvsp[(2) - (3)].selector);
if ( (yyval.selector) )
(yyval.selector)->tag = (yyvsp[(1) - (3)].element);
;}
break;
case 75:
{
(yyval.selector) = (yyvsp[(1) - (2)].selector);
if ( (yyval.selector) )
(yyval.selector)->tag = makeId(static_cast |