aboutsummaryrefslogtreecommitdiff
path: root/src/css.cc
AgeCommit message (Collapse)Author
2011-09-06remove trailing whitespaceJorge Arellano Cid
2011-08-28fix doctree leakJohannes Hofmann
HTML like <div>hello</div> </body> </html> <div>hello</div> currently causes the document tree to be a forest with two root nodes. To ensure we don't leak the first tree, an additional root node is introduced to hold all document trees. Catched by: Jeremy's valgrind logs Reported by: corvid <corvid@lavabit.com>
2011-08-24add support for CSS adjacent sibling selectorsJohannes Hofmann
2011-08-02don't reuse user- and useragent-stylesheetJohannes Hofmann
The notMatchingBefore variable in CssSelector is modified as a page is styled. Thererfore we can't share a single copy of the user- and useragent-stylesheets between CssContexts. Testcase: <html> <body> <a href=whatever.html> <img alt=test src=whatever.jpg> </a> <div> <img src=something.jpg> </div> </body> </html> On reload the first image looses it's border. Tests with gettimeofday showed times below 1ms to create user- and useragent-styles on a Pentium-M 1.8 GHz laptop. reported-by: corvid <corvid@lavabit.com>
2011-06-07support !important in style attributesJohannes Hofmann
2010-11-13Full CSS border-style implementationJorge Arellano Cid
The drawBorder{Top,Bottom,Left,Right} functions are similar. They use a trapezium as draw polygon, or drawTypedLine() for dots and dashes. Although the concept is simple, achieving pixel accuracy is laborious [1]. [1] http://www.dillo.org/css_compat/tests/border-style.html
2010-10-17no need to inline CssPropertyList copy constructorJohannes Hofmann
2010-10-11allow to apply CssContext to an arbitrary node in the docTreeJohannes Hofmann
2010-10-11mergeJohannes Hofmann
2010-10-01rework border-width handlingJohannes Hofmann
The initial value of border-width-* is "medium" not 0 (see http://www.w3.org/TR/CSS2/box.html#border-width-properties). Redo the border handling for tables to deal with this.
2010-09-24call layout->setBgColor() from web.ccJohannes Hofmann
2010-09-17set font and color on <html> tag, so authors can override itJohannes Hofmann
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-01-11add quirk to reset font properties in tables (fixes e.g. gmail)Johannes Hofmann
2009-12-18Changed the default background color when allow_white_bg=NOJorge Arellano Cid
2009-11-27fix nested <ul> handling in user agent styleJohannes Hofmann
Originally I hoped that <ul> elements would be nested like this: <ul> <li>foo</li> <ul> <li>bar</li> </ul> </ul> in which case we could use ul > ul. But instead it seems to be common to use: <ul> <li>foo</li> <li> <ul> <li>bar</li> </ul> </li> </ul> The child selector ('>') is slightly more efficient than the general descendant (' ') selector, but it doesn't seem to matter much anyway.
2009-11-07adjust user-agent style for thJohannes Hofmann
Make th look like td, but with bold and centering added. Submitted by: Jeremy Henty
2009-09-20trim some spacescorvid
2009-07-23properly count multiple classes in CssSimpleSelector::specificity ()Johannes Hofmann
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-11cleanupsJohannes Hofmann
2009-07-11support multiple classes per doctree nodeJohannes Hofmann
2009-06-22remove system includescorvid
2009-06-11make <var> italic (noticed by corvid)Johannes Hofmann
2009-04-23commentsJohannes Hofmann
2009-04-19wrap long lines in src/ css codecorvid
2009-04-08support CSS @import directiveJohannes Hofmann
2009-03-15move CssPropertyInfo definition to cssparser.ccJohannes Hofmann
2009-03-15replace a_Css_parse(), a_Css_parse_declaration() with static methodsJohannes Hofmann
2009-03-09needn't include prefs.hcorvid
2009-02-15fix leak in CssStyleSheet::addRule()Johannes Hofmann
2009-02-09whitespace cleanup: 's/ +$//g'Jorge Arellano Cid
2009-02-07minor cleanupJohannes Hofmann
2009-02-06set type in CssPropertyList::set()Johannes 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-02-02remove unused order_count parameterJohannes Hofmann
It seems that in dillo-0.8.0-css-3 it was used to make sure that later definitions of the same CSS property have more weight than previous ones. If for example a first stylesheet sets background-color to black, and a second stylesheet sets it to green, green should win. But as we currently parese everything in order (throughing away all parsed CSS data when a new CSS stylesheet has arrived), we don't need to remember the original ordering of stylesheets.
2009-01-31remove debugging codeJohannes Hofmann
2009-01-31remove unnecessary initializationJohannes Hofmann
2009-01-31optimize CssStyleSheet::apply() a bitJohannes Hofmann
2009-01-31fix cascading orderJohannes Hofmann
CSS data given in style="" attributes can be overruled by AUTHOR_IMPORTANT style data. This fixes http://www.w3.org/Style/CSS/Test/CSS2.1/current/html4/t060402-c31-important-00-b.htm
2009-01-31commentJohannes Hofmann
2009-01-30commentJohannes Hofmann
2009-01-30apply CSS rules ordered by their specificityJohannes Hofmann
2009-01-30simplify CssSimpleSelector::specificity()Johannes Hofmann
2009-01-30insert rules in correct orderJohannes Hofmann
2009-01-30add CssRule::specificityJohannes Hofmann