haikuwebkit/LayoutTests/animations/text-underline-offset-expec...

6 lines
297 B
Plaintext
Raw Permalink Normal View History

Implement text-underline-offset and text-decoration-thickness https://bugs.webkit.org/show_bug.cgi?id=190774 Reviewed by Dean Jackson. Source/WebCore: Because of our existing infrastructure for text decorations, adding support for these is fairly simple. This patch updates our existing functions to handle thick & placed underlines, as well as updating our repaint code to correcly handle repainting them. It also handles animations. Tests: animations/text-decoration-thickness.html animations/text-underline-offset.html fast/css3-text/css3-text-decoration/text-decoration-offset-2.html fast/css3-text/css3-text-decoration/text-decoration-offset-3.html fast/css3-text/css3-text-decoration/text-decoration-offset-auto-length.html fast/css3-text/css3-text-decoration/text-decoration-offset-baseline.html fast/css3-text/css3-text-decoration/text-decoration-offset-from-font-auto.html fast/css3-text/css3-text-decoration/text-decoration-offset-from-font-length.html fast/css3-text/css3-text-decoration/text-decoration-offset-repaint.html fast/css3-text/css3-text-decoration/text-decoration-offset-under-auto.html fast/css3-text/css3-text-decoration/text-decoration-offset-under-length.html fast/css3-text/css3-text-decoration/text-decoration-offset.html fast/css3-text/css3-text-decoration/text-decoration-thickness-length.html fast/css3-text/css3-text-decoration/text-decoration-thickness-repaint.html * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFunc): (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * platform/graphics/FontMetrics.h: (WebCore::FontMetrics::underlinePosition const): (WebCore::FontMetrics::setUnderlinePosition): (WebCore::FontMetrics::underlineThickness const): (WebCore::FontMetrics::setUnderlineThickness): * platform/graphics/cocoa/FontCocoa.mm: (WebCore::Font::platformInit): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine): * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseForStyle): * rendering/TextDecorationPainter.cpp: (WebCore::TextDecorationPainter::paintTextDecoration): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeAffectsVisualOverflow const): * rendering/style/TextDecorationThickness.h: (WebCore::TextDecorationThickness::resolve const): * style/InlineTextBoxStyle.cpp: (WebCore::computeUnderlineOffset): (WebCore::visualOverflowForDecorations): * style/InlineTextBoxStyle.h: (WebCore::textDecorationStrokeThickness): Deleted. LayoutTests: * animations/text-decoration-thickness-expected.txt: Added. * animations/text-decoration-thickness.html: Added. * animations/text-underline-offset-expected.txt: Added. * animations/text-underline-offset.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-2-expected-mismatch.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-2.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-3-expected-mismatch.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-3.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-auto-length-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-auto-length.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-baseline-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-baseline.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-expected-mismatch.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-from-font-auto-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-from-font-auto.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-from-font-length-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-from-font-length.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-repaint-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-repaint.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-under-auto-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-under-auto.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-under-length-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset-under-length.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-offset.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-thickness-length-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-thickness-length.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-thickness-repaint-expected.html: Added. * fast/css3-text/css3-text-decoration/text-decoration-thickness-repaint.html: Added. Canonical link: https://commits.webkit.org/206142@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-07 01:22:41 +00:00
Hello
PASS - "text-underline-offset" property for "box" element at 0.5s saw something close to: 16.6666
PASS - "text-underline-offset" property for "box" element at 1s saw something close to: 33.3333
PASS - "text-underline-offset" property for "box" element at 2s saw something close to: 66.6666