Closed poire-z closed 5 months ago
There's a whole bunch of margin collapse test cases over here btw. "8.3.1 collapsing margins"
http://test.csswg.org/suites/css21_dev/20110323/xhtml1/chapter-8.xht http://test.csswg.org/suites/css21_dev/20110323/html4/chapter-8.html
NOT passing in the current version:
9, 10, 11 (about overflow)
29
33, 34, 35, 37, 38
101 (it passes but is meaningless without 106)
102
103
104
105 (meaningless without 106)
possibly 106 (font required)
107, 108, 109
113
114
115
116
117
and, um, probably all following but I got bored. :-)
The ones that fail are related to overflow, position:absolute
, floats inside empty div (that I know there are tricky interactions we don't handle well), and some with imbricated tables with empty cells (that may be our code to compute table cells widths from their content don't handle well, but they really look like torture tests :))
Pretty happy with the many not failing ones anyway :)
EPUB: avoid crash when
@font-face
in<head><style>
Assertions in
LVFontCache::_removeDocumentFonts()
would fail (when DEBUG enabled). Noticed and investigated at https://github.com/koreader/crengine/pull/536#issuecomment-2002142872.FB2: fix block images sizing and centering
Followup to 1544bcfb, where we made an image self container's width adjust to the image width, so
text-align:center
no longer does what was expected. Switch tomargin-left/right:auto
to get them centered again. See https://github.com/koreader/koreader/issues/11623#issuecomment-2040436412. Also, for standalone block images, set the strut and line-height to 0 (as we do for HTML) so they their block is adjusted to the page height when the image itself exceeds it, to avoid such images to be truncated and sliced on two pages. Noticed and investigated in https://github.com/koreader/crengine/pull/562. Should allow closing https://github.com/koreader/koreader/issues/11623.lvrend: fix positionning of bottom border on empty block elements
Fix some possible issues with empty block elements having some bottom border (included in padding_bottom) when previous vertical margins are collapsing. (Not 100% certain this is the right fix that won't cause side effects...) Should allow closing https://github.com/koreader/koreader/issues/11594.
This change is![Reviewable](https://reviewable.io/review_button.svg)