Age | Commit message (Collapse) | Author |
|
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.
|
|
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
|
|
noticed-by: eocene
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By moving buildUserAgentStyle and buildUserStyle from css.cc to
styleengine.cc we can avoid the circular dependency between css.hh
and cssparser.hh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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" />).
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|