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

Table related IDL alignments? #166

Open
bkardell opened this issue Sep 2, 2022 · 3 comments
Open

Table related IDL alignments? #166

bkardell opened this issue Sep 2, 2022 · 3 comments
Labels

Comments

@bkardell
Copy link
Collaborator

bkardell commented Sep 2, 2022

A lot of the co-evolutionary features of MathML are aligned in Core L1, and at least we have basic IDL support - but differences remain. Math tables are very similar to HTML tables in many ways - but not in terms of IDL. HTML provides some special table-oriented IDL which it ?might make sense to align in MathML eventually too - for example, some reflecting attributes and access to things like which row index it is, and so on... These are in the spec as, for example

https://html.spec.whatwg.org/#the-tr-element
https://html.spec.whatwg.org/#the-td-element

I suppose the question is "how portable is similar knowledge" across the platform

@fred-wang
Copy link
Contributor

I think one of the question to address first is "how much tabular support we want in MathML Core?". The full spec has a lot of other attributes/elements:

https://w3c.github.io/mathml/#presm_tabmat

I can see the point of using a dedicated MathML element to represent matrices or column vectors for example, but I suspect many use cases are not semantic-related but layout-related, like aligning a succession of equalities, grouping equations, labeling a formula, etc In that case, it seems more appropriate to rely on CSS features than introducing new attributes/elements. I guess we have a similar story with HTML where tables were used in the past for layout purpose and new CSS features were introduced to address these use cases.

My concern is that if we start introducing an IDL for the simple thing we have now in MathML Core, it's likely people will want to extend it for all the tabular attributes/elements in MathML Full in the future...

@fred-wang
Copy link
Contributor

More comments:

  • MathML uses the name columnspan instead of colspan so I guess that diff will be in the IDL too.
  • We likely need the same clamping for columnspan/rowspan IDL attributes. See also Parsing of columnspan/rowspan #180

@fred-wang
Copy link
Contributor

I'm copying here some tests for parsing of colspan/rowspan from #180. These are quite tedious to write & read and would benefit from having a simple IDL.

<!DOCTYPE html>
<math>
  <mtable id="largeColumnSpan">
    <mtr><mtd></mtd></mtr>
    <mtr></mtr>
  </mtable>
</math>
<math>
  <mtable id="largeRowSpan">
    <mtr><mtd></mtd></mtr>
  </mtable>
</math>
<script>
  const mathmlNamespace = 'http://www.w3.org/1998/Math/MathML';
  function createCell() {
    let mtd = document.createElementNS(mathmlNamespace, 'mtd');
    let mspace = document.createElementNS(mathmlNamespace, 'mspace');
    mspace.setAttribute('width', '10px');
    mspace.setAttribute('height', '10px');
    mtd.appendChild(mspace);
    return mtd;  
  }

  /* Testing columnspan */
  const maxColumnSpan = 1000;
  let mtd1 = largeColumnSpan.children[0].firstElementChild;
  mtd1.setAttribute("columnspan", `${maxColumnSpan+1}`);
  for (let i = 0; i < maxColumnSpan+1; i++) {
      largeColumnSpan.children[1].appendChild(createCell());
  }
  let mtd2 = largeColumnSpan.children[1].lastElementChild.previousElementSibling;
  console.error(mtd1.getBoundingClientRect().right);
  console.error(mtd2.getBoundingClientRect().right);

  /* Testing rowspan */
  const maxRowSpan = 65534;
  let mtr1 = largeRowSpan.children[0];
  mtr1.firstElementChild.setAttribute("rowspan", `${maxRowSpan+1}`);
  let mtr2 = mtr1;
  mtr2.appendChild(createCell())
  for (let i = 0; i < maxRowSpan; i++) {
      mtr2 = document.createElementNS(mathmlNamespace, 'mtr');
      mtr2.appendChild(createCell());
      largeRowSpan.appendChild(mtr2);
  }
  console.error(mtr1.firstElementChild.getBoundingClientRect().bottom);
  console.error(mtr2.previousElementSibling.lastElementChild.getBoundingClientRect().bottom);
</script>

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 1, 2023
This CL implements the colspan and rowspan attributes from MathML, which
have same syntax and semantics as the HTML attributes [1]. New WPT tests
are added to check table layout with these attributes. However, parsing
tests are written as internal ones until MathML as a proper IDL [2].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

TODO: send I2S.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 3, 2023
This CL implements the colspan and rowspan attributes from MathML, which
have same syntax and semantics as the HTML attributes [1]. New WPT tests
are added to check table layout with these attributes. However, parsing
tests are written as internal ones until MathML as a proper IDL [2].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

TODO: send I2S.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Mar 10, 2023
This CL implements the colspan and rowspan attributes from MathML, which
have same syntax and semantics as the HTML attributes [1]. New WPT tests
are added to check table layout with these attributes. However, parsing
tests are written as internal ones until MathML as a proper IDL [2].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

TODO: send I2S.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 12, 2023
This CL implements the colspan and rowspan attributes from MathML, which
have same syntax and semantics as the HTML attributes [1]. New WPT tests
are added to check table layout with these attributes. However, parsing
tests are written as internal ones until MathML as a proper IDL [2].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

TODO: send I2S.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 12, 2023
This CL implements the colspan and rowspan attributes from MathML, which
have same syntax and semantics as the HTML attributes [1]. New WPT tests
are added to check table layout with these attributes. However, parsing
tests are written as internal ones until MathML as a proper IDL [2].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

TODO: send I2S.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 12, 2023
This CL implements the colspan and rowspan attributes from MathML, which
have same syntax and semantics as the HTML attributes [1]. New WPT tests
are added to check table layout with these attributes. However, parsing
tests are written as internal ones until MathML as a proper IDL [2].
Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 12, 2023
This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 12, 2023
This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1169551}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 12, 2023
This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1169551}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 22, 2023
…tributes, a=testonly

Automatic update from web-platform-tests
[mathml] Implement columnspan/rowspan attributes

This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1169551}

--

wpt-commits: 2d62964773ab36924d29c924ee6e0dc2b30fe49f
wpt-pr: 38296
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Jul 24, 2023
…tributes, a=testonly

Automatic update from web-platform-tests
[mathml] Implement columnspan/rowspan attributes

This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwangigalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrickchromium.org>
Cr-Commit-Position: refs/heads/main{#1169551}

--

wpt-commits: 2d62964773ab36924d29c924ee6e0dc2b30fe49f
wpt-pr: 38296

UltraBlame original commit: 8b7d38c432983d7bf759ccb09953309f37c11c95
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Jul 24, 2023
…tributes, a=testonly

Automatic update from web-platform-tests
[mathml] Implement columnspan/rowspan attributes

This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwangigalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrickchromium.org>
Cr-Commit-Position: refs/heads/main{#1169551}

--

wpt-commits: 2d62964773ab36924d29c924ee6e0dc2b30fe49f
wpt-pr: 38296

UltraBlame original commit: 8b7d38c432983d7bf759ccb09953309f37c11c95
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Jul 24, 2023
…tributes, a=testonly

Automatic update from web-platform-tests
[mathml] Implement columnspan/rowspan attributes

This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwangigalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrickchromium.org>
Cr-Commit-Position: refs/heads/main{#1169551}

--

wpt-commits: 2d62964773ab36924d29c924ee6e0dc2b30fe49f
wpt-pr: 38296

UltraBlame original commit: 8b7d38c432983d7bf759ccb09953309f37c11c95
ErichDonGubler pushed a commit to ErichDonGubler/firefox that referenced this issue Jul 24, 2023
…tributes, a=testonly

Automatic update from web-platform-tests
[mathml] Implement columnspan/rowspan attributes

This CL implements the columnspan and rowspan attributes from MathML,
which have same syntax and semantics as corresponding HTML
attributes [1]. New WPT tests are added to check table layout with these
attributes. However, parsing tests are written as internal ones until
MathML as a proper IDL [2]. Intent to ship thread is at [3].

To help with that implementation, a new MathMLTableCellElement class is
introduced for the <mtd> element. This also simplifies other places
where MathML table cells are handled specially.

[1] https://w3c.github.io/mathml-core/#entry-in-table-or-matrix-mtd
[2] w3c/mathml-core#166
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/SqIQf6nKxxk

Bug: 1371806
Change-Id: I389e60becf8956fc30ab4043b261982a2813f890
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4061476
Commit-Queue: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1169551}

--

wpt-commits: 2d62964773ab36924d29c924ee6e0dc2b30fe49f
wpt-pr: 38296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants