aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.hh
AgeCommit message (Collapse)Author
2024-10-05Define CssLength as struct instead of intRodrigo Arias Mallo
The int type doesn't have a fixed size, and is only guarantee to hold 16 bits. The current implementation assumes a size of at least 32 bits, an uses three bits to encode the type of information stored in the rest. To add more types of lengths we would need to take more bits from the value itself. A simpler approach is just to use a enumeration to take care of the type of length and a union to encapsulate the different lengths values.
2024-06-25Add support for zoom factorRodrigo Arias Mallo
Allows zooming in and out of pages by changing the size of all elements, including font size, images and tables. The initial zoom is specified in the "zoom_factor" option of dillorc. Use the new shortcuts Ctrl+ and Ctrl- to adjust the zoom of the current page and Ctrl 0 to reset it to 100%. When a new tab or window is opened, the current zoom factor is inherited. Each tab retains its own zoom factor. Fixes: https://github.com/dillo-browser/dillo/issues/21
2014-07-25avoid requesting background images if an ancestor has display:noneJohannes Hofmann
noticed-by: eocene
2014-07-02make dpmm a proper member of StyleEngineJohannes Hofmann
2014-04-02fix crash and use proper requester URL for CSS imagesJohannes Hofmann
2014-04-01resolve CSS background-image URLs relative to styleheet URLJohannes Hofmann
2014-02-15share user agent style between CssContext'sJohannes Hofmann
2013-10-07View(port) background now set by HTML parser.Sebastian Geerken
2013-09-20Added BrowserWindow and DilloURL (base URL) to StyleEngine::apply and related.Sebastian Geerken
2012-11-04some style engine refactoringJohannes Hofmann
2011-12-30move buildUserAgentStyle and buildUserStyle to styleengine.ccJohannes Hofmann
By moving buildUserAgentStyle and buildUserStyle from css.cc to styleengine.cc we can avoid the circular dependency between css.hh and cssparser.hh.
2011-06-07support !important in style attributesJohannes Hofmann
2010-11-24trim some spacescorvid
2010-10-17fix Style leaks in StyleEngineJohannes Hofmann
2010-10-14inline setNonCssHint()Johannes Hofmann
2010-10-11use background-color on <html>-elementJohannes Hofmann
2010-10-11add StyleEngine::restyle()Johannes 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-10-11store style attribute as CssPropertyList instead of a stringJohannes Hofmann
2010-10-11make StyleEngine::Node a struct - it's just that anywayJohannes Hofmann
2010-10-01fix last commitJohannes Hofmann
dw::core::style::Style must always hold the computed values of CSS properties, as those are inherited. The computed value of border-width is 0 if border-style is 'none', so avoid the combination of border-width != 0 and border-style 'none'. Refactor StyleEngine a bit.
2010-01-07make Doctree a non-virtual classJohannes Hofmann
Doctree now is a proper class with it's own implementation. StyleEngine no longer needs to provide the Doctree interface itself. This hopefully make the code easier to understand and should also be a bit faster as no virtual methods are involved.
2009-12-18support border-width: thin | medium | thickJohannes Hofmann
2009-05-08spellingcorvid
2009-04-23commentsJohannes Hofmann
2009-04-19wrap long lines in src/ css codecorvid
2009-04-08support CSS @import directiveJohannes Hofmann
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-02-17fix missing background color for ComplexButton (noticed by corvid)Johannes Hofmann
2009-02-09whitespace cleanup: 's/ +$//g'Jorge Arellano Cid
2009-02-06fix check for name/id mismatch (noticed by corvid)Johannes 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-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.
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-14inherit pseudo classes "link" and "visited"Johannes Hofmann
2008-12-09add comment about inheritBackgroundColor()Johannes 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-04add wordStyle() method to StyleEngineJohannes Hofmann
2008-12-04hook up <style>...</style> parsingJohannes Hofmann
2008-12-01fix DocTree implementation in StyleEngineJohannes Hofmann
2008-11-28add workaround for table row coloringJohannes Hofmann
2008-11-14fix id, class, style attribute handlingJohannes Hofmann
2008-11-14setNonCssProperties() -> setNonCssHints()Johannes Hofmann
2008-11-14call StyleEngine::startElement() in Html_force_push_tag() to fix assertionsJohannes Hofmann
2008-11-13start implementing resolution of relative CSS valuesJohannes Hofmann
2008-11-13use CssLength in computeValueJohannes Hofmann
2008-11-13compute relative valuesJohannes Hofmann
2008-11-08set CSS pseudo class in Html_tag_open_a()Johannes Hofmann