CSS_DISPLAY_GRID
, CSS_DISPLAY_INLINE_GRID
, and CSS_POSITION_STICKY
.flex-flow
, list-style
, and outline
property shorthands.Support for CSS media queries. This is an incompatibility change.
DefaultMedia
property is a RawByteString
.Media
is a css_media
record.OnImportNotification
and DoImportNotification
: The Media
parameter is removed.NextPendingImport
: The Media
parameter is removed.css_stylesheet_next_pending_import
and css_import_notification_fn
: The Media
parameter is removed.css_select_ctx_append_sheet
and css_select_ctx_insert_sheet
: The Media
parameter is a #0 terminated string.css_select_style
and css_select_font_faces
: The Media
parameter is css_media_ptr
, a pointer to a css_media
record.css_rule
has the following new fields. They replace the old bit fields. The respective bit field getter and setter functions are removed.index
items
type_
ptype
UNIT_TURN
UNIT_RESOLUTION
UNIT_DPI
UNIT_DPCM
UNIT_DPPX
TYuHtmlParser
descendents. Declarations like <meta content=“text/html charset=utf-8”>
are generated by some programs like Apple Mail and recognized by Chrome.TYuCss
improvements:box-sizing
property support.align-content
align-items
align-self
flex
flex-basis
flex-direction
flex-flow
flex-grow
flex-shrink
flex-wrap
justify-content
order
cap
, ch
, ic
, rem
, lh
, rlh
, vh
, vw
, vi
, vb
, vmin
, vmax
, q
.Incompatibility Change:
Optimize the way to handle CSS presentational hints: Previously, the CSS selection engine iterated over all properties not either in a UA stylesheet or a user stylesheet with !important set. It asked the client if there were any presentational hints for that node, once for each property. This triggered up to N_PROPERTIES * N_NODES calls to the client.
The new API asks the client to supply a list of all the presentational hints that apply to node, which is 0 for most nodes. This triggers at most N_NODES calls to the client. css_hint
has been changed to include the property which the hint applies to.
Wrapper classes have been adjusted as well:
TYuSimpleCss.OnNodePresentationalHint
TYuLibXml2Css.OnNodePresentationalHint
Because of this incompatible API change, the YuNetSurf major version incremented to 3.
New Functions:
lwc_string_tolower
API.TYuCss
and TYuCssSheet
classes:AddImport
.TYuCss
and descendands have all events of all their Sheets. Assign once, use everywhere.TYuCss
has sheet propertiy defaults. Sheets are initialized with these values and can be modified: DefaultCharSet
, DefaultLanguageLevel
, DefaultMedia
, DefaultOrigin
, DefaultQuirksAllowed
.TYuCss
owns all Sheets
, including imported sheets to other sheets.TYuCss.Sheets
collection to organize sheets. The old TYuCss.AppendSheet() is no longer needed and removed.TYuCss.DoComputeFontSize
virtual method as common CSS compute_font_size
callback for all descendants. This fixes a bug where TYuCSS
was not calculating the font size when composing computed styles.css_font_face_count_srcs
, css_font_face_get_font_family
, css_font_face_src_get_location
, css_font_face_get_src
.DataDone
/ css_stylesheet_data_done
is omitted.Unfortunately, the above changes were possible only by breaking backwards compatibility. Adjustments to existing code might be necessary, hence the major version increase. The demo projects have been adjusted for reference.
TYuSimpleTreeWalker
class, with support for WhatToShow
and Filter
.TYuSimpleNodeIterator
supports WhatToShow
, Filter
, and PreviousNode.TYuSimpleNode.Contains
function.TYuSimpleDocument.DocumentElement
property and TYuSimpleDocument.GetElementById
method.TYuCss.Options
property:coComposeStyles
replaces the Compose
argument of SelectStyle
methods.coInlineStyles
controls weather to apply inline styles.