WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
251178
Whitespace incorrectly suppressed inside table.
https://bugs.webkit.org/show_bug.cgi?id=251178
Summary
Whitespace incorrectly suppressed inside table.
Emilio Cobos Álvarez (:emilio)
Reported
2023-01-25 15:11:09 PST
In
https://bug1811353.bmoattachments.org/attachment.cgi?id=9314059
, Blink and WebKit render tables inconsistently from Gecko and the spec. See also
https://github.com/w3c/csswg-drafts/issues/8358
and
https://bugs.chromium.org/p/chromium/issues/detail?id=1410345
for context, spec references, and equivalent Chromium bug.
Attachments
Add attachment
proposed patch, testcase, etc.
Karl Dubost
Comment 1
2023-01-25 17:45:09 PST
would it be
https://searchfox.org/wubkat/rev/1c8b29ff201022e3a20578244e85d25d1b7706c4/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp#429-431
Emilio Cobos Álvarez (:emilio)
Comment 2
2023-01-25 18:20:26 PST
Yep that looks exactly like it.
Radar WebKit Bug Importer
Comment 3
2023-02-01 15:12:25 PST
<
rdar://problem/104934417
>
Ahmad Saleem
Comment 4
2023-03-09 05:12:47 PST
(In reply to Karl Dubost from
comment #1
)
> would it be >
https://searchfox.org/wubkat/rev/1c8b29ff201022e3a20578244e85d25d1b7706c4/
> Source/WebCore/rendering/updating/RenderTreeUpdater.cpp#429-431
I tested locally by removing just "parentRenderer.isTable()" make us pass "WPT" test, if we remove other bits, it makes tables go haywire. If you want to do PR, you can do so or if you want me to do, I am happy to do it as well. Thanks!
Karl Dubost
Comment 5
2023-03-09 07:24:21 PST
Ahmad, feel free to give it a go.
Karl Dubost
Comment 6
2025-06-24 23:21:02 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/47169
Ahmad Saleem
Comment 7
2025-11-24 00:20:22 PST
auto* previousRenderer = renderingParent.previousChildRenderer; if (parentRenderer.isRenderTableRow() || parentRenderer.isRenderTableSection() || parentRenderer.isRenderTableCol() || parentRenderer.isRenderFrameSet() || parentRenderer.isRenderGrid() || (parentRenderer.isRenderFlexibleBox() && !parentRenderer.isRenderButton())) return false; if (parentRenderer.isRenderTable()) { if (!previousRenderer) return false; // Suppress whitespace after table-internal or block-level elements if (previousRenderer->isRenderTableRow() || previousRenderer->isRenderTableSection() || previousRenderer->isRenderTableCol() || previousRenderer->isRenderTableCaption()) return false; // Preserve whitespace only if previous is inline-block or inline-table // (not regular table-cells or blocks) if (previousRenderer->isNonReplacedAtomicInlineLevelBox()) return true; // Keep the whitespace // Otherwise suppress (covers table-cells, blocks, etc.) return false; } This takes us to closet to our progress but still fails:
https://jsfiddle.net/6Lbjd3qu/
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug