mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 08:51:57 +00:00
LibWeb: Draw text even if it needs to go into a 0-size inline box
This commit is contained in:
parent
096eed35cc
commit
91159df0dd
Notes:
github-actions[bot]
2025-05-12 08:50:46 +00:00
Author: https://github.com/Psychpsyo
Commit: 91159df0dd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4695
Reviewed-by: https://github.com/gmta ✅
4 changed files with 5 additions and 4 deletions
|
@ -46,8 +46,6 @@ struct DrawGlyphRun {
|
|||
Color color;
|
||||
Gfx::Orientation orientation { Gfx::Orientation::Horizontal };
|
||||
|
||||
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }
|
||||
|
||||
void translate_by(Gfx::IntPoint const& offset);
|
||||
};
|
||||
|
||||
|
|
|
@ -253,8 +253,6 @@ void DisplayListRecorder::draw_text(Gfx::IntRect const& rect, String raw_text, G
|
|||
|
||||
void DisplayListRecorder::draw_text_run(Gfx::FloatPoint baseline_start, Gfx::GlyphRun const& glyph_run, Color color, Gfx::IntRect const& rect, double scale, Orientation orientation)
|
||||
{
|
||||
if (rect.is_empty())
|
||||
return;
|
||||
append(DrawGlyphRun {
|
||||
.glyph_run = glyph_run,
|
||||
.scale = scale,
|
||||
|
|
2
Tests/LibWeb/Ref/expected/css/line-height-zero-ref.html
Normal file
2
Tests/LibWeb/Ref/expected/css/line-height-zero-ref.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<div style="line-height:100px; transform: translateY(-50px);">Hello!</div>
|
3
Tests/LibWeb/Ref/input/css/line-height-zero.html
Normal file
3
Tests/LibWeb/Ref/input/css/line-height-zero.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="match" href="../../expected/css/line-height-zero-ref.html">
|
||||
<div style="line-height:0">Hello!</div>
|
Loading…
Add table
Add a link
Reference in a new issue