aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.cc
AgeCommit message (Collapse)Author
2009-06-22remove system includescorvid
2009-04-19wrap long lines in src/ css codecorvid
2009-04-08support CSS @import directiveJohannes Hofmann
2009-03-23disable negative margins for nowJohannes Hofmann
dw::Textblock does not handle them properly yet.
2009-03-15replace a_Css_parse(), a_Css_parse_declaration() with static methodsJohannes Hofmann
2009-03-11whitespaceJorge Arellano Cid
2009-03-11fix allow_white_bg=NO caseJohannes Hofmann
This is not perfect, as the replacement color is hardcoded to 0xdcd1ba.
2009-03-09whitespaceJohannes Hofmann
2009-03-06remove bg_color dillorc optionJohannes Hofmann
To set a custom background color add a line like: body {background-color: white} to your ~/.dillo/style.css file. This also works for plain text display and image viewing.
2009-03-05reduce number of styleEngine::style0() callsJohannes Hofmann
Rearrange code, so that for each new element, StyleEngine::setNonCssHints() is called before the first call to StyleEngine::style() or StyleEngine::wordStyle(). This avoids unnecessary CSS style computations which are expensive. Add an assertion to ensure this.
2009-02-17fix missing background color for ComplexButton (noticed by corvid)Johannes Hofmann
2009-02-17add font_max_size dillorc optionJohannes Hofmann
2009-02-16check base font against font_min_sizeJohannes Hofmann
2009-02-15clean StyleEngine::stack on deletionJohannes Hofmann
2009-02-11add "font_min_size" dillorc optionJohannes Hofmann
2009-02-09whitespace cleanup: 's/ +$//g'Jorge Arellano Cid
2009-02-08mergeJohannes Hofmann
2009-02-07inherit valign when inheritBackgroundColor is setJohannes Hofmann
This fixes <sup><u> not up </u> up </sup>, but is not the real solution. Things like <sup> up <sup> upper </sup></sup> still don't work, but they didn't work in dillo-2.0 either. Noticed by: corvid
2009-02-06support font-size enum valuesJohannes Hofmann
2009-02-06switch font-weight handling to new multi type systemJohannes Hofmann
2009-02-05move CssProperty::Name and CssProperty::Value out of CssProperty classJohannes 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-30remove todoJohannes Hofmann
2009-01-29free font names from style="" attributes (found by Jeremy)Johannes Hofmann
2009-01-26adapt font-family preferences to match CSSJohannes Hofmann
CSS 2.1 uses the following predefined font names: 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'. Add preferences so that the user can set real font names for these. Basically the new "font_sans_serif" option is what "vw_fontame" used to be and "font_monospace" is equivalent to "fw_fontname". The other two options are new.
2009-01-22improve font handlingJohannes Hofmann
The vw_fontname and fw_fontname preferences are now used to define the CSS fontanmes "sans" and "monospace".
2009-01-21start supporting "auto" value in CSSJohannes Hofmann
2009-01-19switch default font size to 14Johannes Hofmann
2009-01-17add parse_embedded_css optionJohannes Hofmann
2009-01-17implement parsing of CSS data from style attributeJohannes Hofmann
E.g. <body style="background-color: red; font-family: arial; font-size: 30mm"> Hello World </body>
2009-01-16update copyrightJohannes Hofmann
2009-01-15use prefs.font_factor to scale base fontJohannes Hofmann
2009-01-15mergeJohannes Hofmann
2009-01-13pass valign property from base style into wordStyleJohannes Hofmann
This fixes rendering of <sub>, <sup> elements.
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-06initialize styleAttribute and inheritBackgroundColor (by Jorge)Johannes Hofmann
2009-01-04backout 14ce954d98c0Johannes Hofmann
Inheriting the pseudo class breaks things like <a><font color="black"><small>test</small></font></a> The style for the :link pseudo class (blue color in this case) would overwrite the black color set by <font>. This happens on http://www.freshmeat.net
2009-01-03reduce rounding errors when casting float to intJohannes Hofmann
2008-12-19make StyleEngine::computeValue() and computeLength() return boolJohannes Hofmann
StyleEngine::computeValue now returns whether the value was actually set. This information is now used in computeLength to avoid setting of random length values in case of an unrecognized CSS_LENGTH_TYPE. This fixes crashes with images that have invalid width or height attributes (e.g. <img src="foo.jpg" width="10px" />).
2008-12-15initialize wordStyleJohannes Hofmann
2008-12-14inherit pseudo classes "link" and "visited"Johannes Hofmann
2008-12-11always use shaded colorsJohannes Hofmann
This makes things much simpler and improves sharing of colors. If computing two more shades really proves to be a performance issue, we can shade on demand without exposing this optimization to the interface.
2008-12-11use shaded colors for bordersJohannes Hofmann
2008-12-09remove duplicate breakJohannes Hofmann
2008-12-09support white-space propertyJohannes Hofmann
2008-12-09whitespaceJohannes Hofmann
2008-12-09use output parameter in StyleEngine::computeValue()Johannes Hofmann
This way an assignment is avoided in case of an invalid or unsupported value for the given property. E.g. it is not allowed to specify a percentage for border-width.
2008-12-09use CssLength typeJohannes Hofmann
2008-12-08partly revert ed5ea857edc6 to fix coloring of <tr> elementsJohannes Hofmann
2008-12-04adjust inheritBackgroundColor() handling to new wordStyle() stuffJohannes Hofmann