Skip to content

Commit

Permalink
HTMLQuoteElement quote delimiters should be based on lang of parent
Browse files Browse the repository at this point in the history
Following the resolution of WHATWG HTML standard [1] and
existing CSS issue [2], it has been decided that the
auto (default) lang for <q> element should be based on the parent
language, and not the language of the element itself.

This CL makes sure to skip reading the lang attribute for <q>.
Instead, its locale is calculated in
CollectExtraStyleForPresentationAttribute(), using the parent's locale.

[1] whatwg/html#3636
[2] w3c/csswg-drafts#5478

Change-Id: Ief17dd1e7f5a40112899ce898fa672a6fef6e834
Fixed: 1290851
Bug: 753671
  • Loading branch information
dizhang168 authored and chromium-wpt-export-bot committed Jun 21, 2022
1 parent 4dcca14 commit 31a1c3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion css/css-content/quotes-030.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
body { font: 32px Arial, Helvetica, Noto Sans, DejaVu Sans, FreeSans, sans-serif; quotes: auto; }
</style>
<body>
<p>Test passes if the quote marks in both lines match:
<p>Test passes if the quote marks in each pair of lines match:
<p>One <q>two <q lang="ja">three <q lang="fr">four</q></q></q>
<p>One “two <span lang="ja">‘three <span lang="fr">『four』</span></span>

<p>One <q>two <q lang="ja">three <q>four</q></q></q>
<p>One “two <span lang="ja">‘three 『four』’</span>
5 changes: 4 additions & 1 deletion css/css-content/reference/quotes-030-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
body { font: 32px Arial, Helvetica, Noto Sans, DejaVu Sans, FreeSans, sans-serif; quotes: auto; }
</style>
<body>
<p>Test passes if the quote marks in both lines match:
<p>Test passes if the quote marks in each pair of lines match:
<p>One “two <span lang="ja">‘three <span lang="fr">『four』</span></span>
<p>One “two <span lang="ja">‘three <span lang="fr">『four』</span></span>

<p>One “two <span lang="ja">‘three 『four』’</span>
<p>One “two <span lang="ja">‘three 『four』’</span>

0 comments on commit 31a1c3b

Please sign in to comment.