Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-tables] Ignorable whitespace and tables. #8358

Closed
emilio opened this issue Jan 25, 2023 · 4 comments
Closed

[css-tables] Ignorable whitespace and tables. #8358

emilio opened this issue Jan 25, 2023 · 4 comments
Labels
css-tables-3 Current Work

Comments

@emilio
Copy link
Collaborator

emilio commented Jan 25, 2023

It seems WebKit and Blink ignore whitespace text nodes in tables unconditionally, see this test-case. I found the Blink code, I didn't dig into the WebKit one.

I don't think the spec mandates this, and it's not super-hard to support in Firefox, but is it intentional? It definitely seems weird.

It should either be specified or tested. This broke a diff page in Firefox, see bug 1811353.

cc @bfgeek @FremyCompany @tabatkins @jrmuizel

@FremyCompany
Copy link
Contributor

You are correct that Webkit/Blink behavior is not what is described in the spec.
I have always considered it as a bug.

The spec is in fact quite clear that this is not the correct behavior.

image
In this case, the space between the inline blocks should not be removed because inline-block is not a (non-root) table box.

However, the grouping of these two elements in the same cell is described here:

image

Per spec, gecko has the correct behavior. We could of course always change the spec, but what we have now is intentional (some of the discussion being recorded in #467).

@FremyCompany
Copy link
Contributor

I would note that CSS 2.1 already specified the same behavior as the current spec, the current spec only tried to make the behavior more explicit.

@emilio
Copy link
Collaborator Author

emilio commented Jan 25, 2023

Ah, I see. Yeah, I had missed that bit of the spec. I agree the Gecko behavior is more consistent over-all. I'll file bugs in chromium / webkit.

@emilio emilio closed this as completed Jan 25, 2023
@emilio
Copy link
Collaborator Author

emilio commented Jan 25, 2023

https://bugs.chromium.org/p/chromium/issues/detail?id=1410345 / https://bugs.webkit.org/show_bug.cgi?id=251178

@astearns astearns removed the Agenda+ label Apr 6, 2023
Ahmad-S792 added a commit to Ahmad-S792/WebKit that referenced this issue May 20, 2023
https://bugs.webkit.org/show_bug.cgi?id=251178
rdar://problem/104934417

Reviewed by NOBODY (OOPS!).

This patch aligns WebKit to Gecko / Firefox by removing 'isTable', where WebKit was
suppressing 'whitespace' incorrectly inside table leading to incorrect behavior being
against web-specification as highlighted in below issue link [*]:

[*] w3c/csswg-drafts#8358

* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(RenderTreeUpdater::textRendererIsNeeded): Remove 'isTable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-tables-3 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants