Source Code (Use browser search to find items of interest.)
Class Index
kdelibs'CSSOrderedPropertyList (./kdelibs/khtml/css/cssstyleselector.h:130)
class CSSOrderedPropertyList : public QList<CSSOrderedProperty>
{
public:
CSSOrderedPropertyList();
virtual int compareItems(QCollection::Item i1, QCollection::Item i2);
void append(DOM::CSSStyleDeclarationImpl *decl, int offset, int important);
void append(DOM::CSSProperty *prop, int priority);
};
kdelibs'CSSOrderedPropertyList::CSSOrderedPropertyList() (./kdelibs/khtml/css/cssstyleselector.cpp:426)
CSSOrderedPropertyList::CSSOrderedPropertyList()
{
setAutoDelete(true);
}
kdelibs'CSSOrderedPropertyList::compareItems() (./kdelibs/khtml/css/cssstyleselector.cpp:431)
int CSSOrderedPropertyList::compareItems(QCollection::Item i1, QCollection::Item i2)
{
return static_cast<CSSOrderedProperty *>(i1)->priority
- static_cast<CSSOrderedProperty *>(i2)->priority;
}
kdelibs'CSSOrderedPropertyList::append() (./kdelibs/khtml/css/cssstyleselector.cpp:437)
void CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *decl, int offset, int important)
{
QList<CSSProperty> *values = decl->values();
if(!values) return;
int len = values->count();
for(int i = 0; i < len; i++)
{
int thisOffset = offset;
CSSProperty *prop = values->at(i);
if(prop->m_bImportant) thisOffset += important;
// give special priority to font-xxx, color properties
switch(prop->m_id)
{
case CSS_PROP_FONT_SIZE:
case CSS_PROP_FONT:
case CSS_PROP_COLOR:
// these have to be applied first, because other properties use the computed
// values of these porperties.
break;
default:
// don't use 0x80000000, that is negative usually
thisOffset += 0x40000000;
break;
}
append(prop, thisOffset);
}
}
kdelibs'CSSOrderedPropertyList::append() (./kdelibs/khtml/css/cssstyleselector.cpp:466)
void CSSOrderedPropertyList::append(DOM::CSSProperty *prop, int priority)
{
QList<CSSOrderedProperty>::append(new CSSOrderedProperty(prop, priority));
}
// -------------------------------------------------------------------------------------
// this is mostly boring stuff on how to apply a certain rule to the renderstyle...