aboutsummaryrefslogtreecommitdiff
path: root/src/css.hh
AgeCommit message (Collapse)Author
2011-06-07support !important in style attributesJohannes Hofmann
2010-11-24trim some spacescorvid
2010-10-17no need to inline CssPropertyList copy constructorJohannes Hofmann
2010-10-12implement optional deep copy for CssPropertyListJohannes Hofmann
2010-10-11allow to apply CssContext to an arbitrary node in the docTreeJohannes Hofmann
2010-10-11rework nonCssHints API of StyleEngineJohannes Hofmann
* Instead of passing the nonCssHints as a CssPropertyList, set the hints separately and create the list in StyleEngine. * The CssPropertyList holding the nonCssHints is now completely managed by StyleEngine and kept on the stack. * Replace the table_cell_props mechanic in html.cc/table.cc with a new method inheritNonCssHints() in StyleEngine.
2010-08-23add lout::misc::roundInt() for double -> int conversionJohannes Hofmann
Add lout::misc::roundInt() and use it for double -> int conversion instead of doing the + 0.5 trick all over the place. It was wrong for negative values and we might even replace roundInt() with rint() from libm in the future. Reported-by: corvid
2010-04-23use CSS rule position when specificity is equalJohannes Hofmann
When two CSS rules have the same specificity make sure they are applied in the order as they appear in the stylesheets (see [1]). Testcase: <html><head><style> A:link {color: red} A.foo {color: green} </style></head><body> <a class="foo" href=http://www.dillo.org>should be green</a> </body></html> Reported by: corvid [1] http://www.w3.org/TR/CSS2/cascade.html#cascading-order
2010-04-20css word-spacing propertycorvid
2010-04-02add CSS_TYPE_LENGTH_PERCENTAGE_NUMBERJohannes Hofmann
* Add an additional CssValueType CSS_TYPE_LENGTH_PERCENTAGE_NUMBER which can be a length, a percentage, or a number without unit. * Numbers without units are represented as CssLength of type CSS_LENGTH_TYPE_NONE. * Properly detect numbers without unit in cases where they are not allowed (see testcase below). For lengths only '0' can be specified without unit. Testcase: <html> <head> <style tyoe="text/css"> div {border: solid black 2px} </style> </head> <body> <!-- correct - border-width should be set to 0 -> no border --> <div style="border-width: 0">foo bar</div> <!-- false - border-width should be left untouched -> 2px border --> <div style="border-width: 40">foo bar</div> <!-- false - border-width should be left untouched -> 2px border --> <div style="border-width: 40 px">foo bar</div> </body> </html>
2009-12-18support border-width: thin | medium | thickJohannes Hofmann
2009-10-18represent millimeter values as fractions in CssLengthJohannes Hofmann
E.g. for letter-spacing sub-millimeter values actually make a difference. The maximum value that is representable is now 65535 mm which should be enough in most cases.
2009-10-17add letter-spacing support to CSS subsystemJohannes Hofmann
The implementation in the fltk backend is still missing.
2009-07-17Fix an implicit int cast error when int != int32_tJorge Arellano Cid
2009-07-11allow multiple class strings in CssSimpleSelectorJohannes Hofmann
2009-07-11make CssSimpleSelector members privateJohannes Hofmann
2009-07-07Added parenthesis to math expressionJorge Arellano Cid
2009-07-06adjust CssLengthJohannes Hofmann
CssLength now stores px and mm values as pure integers similar to what dw::core::style::Length does.
2009-04-23commentsJohannes Hofmann
2009-03-23allow negative values for specific CSS properties onlyJohannes Hofmann
This needs to be done at parser level, so that alternative settings can overrule a faulty negative one. Testcase: <html> <head> <style type="text/css" > #foo {padding: -1px; background-color: green} .bar {padding: 10px} </style> </head> <body> <div id="foo" class="bar">should be green and have 10px padding</div> </body> </html>
2009-03-15move CssOrigin definition to css.hhJohannes Hofmann
2009-03-12replace CSS_LENGTH_* macros with inline functionsJohannes Hofmann
2009-02-09whitespace cleanup: 's/ +$//g'Jorge Arellano Cid
2009-02-08's/if(/if (/g' 's/for(/for (/g' 's/while(/while (/g', and indentation.Jorge Arellano Cid
2009-02-07free CSS values based on typeJohannes Hofmann
2009-02-06support font-size enum valuesJohannes Hofmann
2009-02-06switch font-weight handling to new multi type systemJohannes Hofmann
2009-02-06add type to CSS propertiesJohannes Hofmann
2009-02-05move CssProperty::Name and CssProperty::Value out of CssProperty classJohannes Hofmann
2009-02-05add CssProperty::typeJohannes Hofmann
2009-01-30insert rules in correct orderJohannes Hofmann
2009-01-30add CssRule::specificityJohannes Hofmann
2009-01-30add CssSelector::specificity()Johannes Hofmann
2009-01-30inline some CSS methodsJohannes Hofmann
2009-01-30CssContext::addRule(): only add rules with nonempty property listJohannes Hofmann
2009-01-30remove unused methodJohannes Hofmann
2009-01-29free font names when replacing themJohannes Hofmann
2009-01-28make sure strings from CSS parser are freedJohannes Hofmann
2009-01-28descendent -> descendant (noticed by corvid)Johannes Hofmann
2009-01-25allocate/deallocate CssSimpleSelector properlyJohannes Hofmann
2009-01-21don't call docTree->top() over and overJohannes Hofmann
2009-01-21move assert from CssSelector::match() to CssRule constructorJohannes Hofmann
2009-01-21simplify CssSelector a bitJohannes Hofmann
2009-01-13mergeJohannes Hofmann
2009-01-13initial implementation of a CSS selector matching optimizationJohannes Hofmann
The idea is to avoid repeated checks of CssSimpleSelector against the same part of the doctree. E.g .navigation * { background-color:green } Would result in checking for class="navigation" all the way down to the document root for all elements. The optimization shortcuts this, for parts of the doctree that have been checked before.
2009-01-12whitespaceJohannes Hofmann
2009-01-12add RuleList class to implement proper memory managementJohannes Hofmann
2009-01-12String -> ConstStringJohannes Hofmann
2009-01-12remove CssRule reference countingJohannes Hofmann
2009-01-12initial implementation of hashmap based CSS selector matchingJohannes Hofmann