Last Comment Bug 676245 - Make unicode-bidi:isolate the default for block elements instead of unicode-bidi:embed
: Make unicode-bidi:isolate the default for block elements instead of unicode-b...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Simon Montagu :smontagu
:
:
Mentors:
Depends on: 613149
Blocks: html5bidi
  Show dependency treegraph
 
Reported: 2011-08-03 07:15 PDT by Aharon (Vladimir) Lanin
Modified: 2012-10-13 10:10 PDT (History)
7 users (show)
smontagu: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
block-as-inline.html (664 bytes, text/html)
2011-08-03 07:15 PDT, Aharon (Vladimir) Lanin
no flags Details
Patch (2.28 KB, patch)
2011-11-17 07:55 PST, Simon Montagu :smontagu
no flags Details | Diff | Splinter Review
Attachment 550374 as reftest (3.31 KB, patch)
2011-11-17 07:57 PST, Simon Montagu :smontagu
no flags Details | Diff | Splinter Review
Attachment 550374 as reftest, updated (1.88 KB, patch)
2011-11-17 08:00 PST, Simon Montagu :smontagu
dbaron: review+
Details | Diff | Splinter Review
Patch v.2 (3.12 KB, patch)
2011-11-30 03:05 PST, Simon Montagu :smontagu
no flags Details | Diff | Splinter Review
Patch v.2a (3.14 KB, patch)
2011-11-30 03:08 PST, Simon Montagu :smontagu
no flags Details | Diff | Splinter Review
Patch v.2b (3.14 KB, patch)
2011-11-30 03:12 PST, Simon Montagu :smontagu
dbaron: review+
Details | Diff | Splinter Review

Description Aharon (Vladimir) Lanin 2011-08-03 07:15:04 PDT
Created attachment 550374 [details]
block-as-inline.html

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30




Expected results:

When a block element is set to display:inline, it is desirable for it to behave bidi-wise as it would if it were display:inline-block. Under CSS2.1, there was no way to accomplish this, and unicode-bidi:embed was used for lack of a better choice. Now that we have unicode-bidi:isolate, it should be the default instead, as the HTML5 spec (http://dev.w3.org/html5/spec/Overview.html#non-replaced-elements) says it should be.
Comment 1 Simon Montagu :smontagu 2011-08-04 05:35:45 PDT
This is included in the patch for bug 613149 at https://bugzilla.mozilla.org/attachment.cgi?id=525116&action=diff#a/layout/style/html.css_sec2
Comment 2 Simon Montagu :smontagu 2011-10-19 06:14:16 PDT
The testcase is NOT fixed by bug 613149 -- I'll look into it.
Comment 3 Aharon (Vladimir) Lanin 2011-11-17 02:11:14 PST
The change needs to be effective for "block" elements whether or not they have a dir attribute. The change already made in the stylesheet is not sufficient because the generic [dir] {unicode-bidi:embed;} is considered more specific and overrides it for "block" elements with a dir attribute. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=14850.
Comment 4 Simon Montagu :smontagu 2011-11-17 07:55:11 PST
Created attachment 575189 [details] [diff] [review]
Patch

(In reply to Aharon (Vladimir) Lanin from comment #3)
> The change needs to be effective for "block" elements whether or not they
> have a dir attribute. The change already made in the stylesheet is not
> sufficient because the generic [dir] {unicode-bidi:embed;} is considered
> more specific and overrides it for "block" elements with a dir attribute.
> See http://www.w3.org/Bugs/Public/show_bug.cgi?id=14850.

Great catch! In spite of discussing this exact issue with Aharon a few days ago, the penny didn't drop for me that it was the cause of this bug.

The patch also adds unicode-bidi: -moz-isolate for a few elements from http://dev.w3.org/html5/spec/Overview.html#flow-content-1,
http://dev.w3.org/html5/spec/Overview.html#sections-and-headings,
http://dev.w3.org/html5/spec/Overview.html#lists, and
http://dev.w3.org/html5/spec/Overview.html#tables which didn't have it before: <figcaption>, <figure>, <legend>, and <summary>,
Comment 5 Simon Montagu :smontagu 2011-11-17 07:57:33 PST
Created attachment 575190 [details] [diff] [review]
Attachment 550374 [details] as reftest
Comment 6 Simon Montagu :smontagu 2011-11-17 08:00:48 PST
Created attachment 575192 [details] [diff] [review]
Attachment 550374 [details] as reftest, updated
Comment 7 Simon Montagu :smontagu 2011-11-30 03:05:57 PST
Created attachment 577909 [details] [diff] [review]
Patch v.2

I found a bug in the patch through rniwa's tests in bug 706194: the rule for pre[dir] was overriding the rule for pre[dir="auto"] earlier in the file.
Comment 8 Simon Montagu :smontagu 2011-11-30 03:08:56 PST
Created attachment 577910 [details] [diff] [review]
Patch v.2a
Comment 9 Simon Montagu :smontagu 2011-11-30 03:12:14 PST
Created attachment 577911 [details] [diff] [review]
Patch v.2b

*sigh*
Comment 10 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2011-12-02 16:34:51 PST
Comment on attachment 577911 [details] [diff] [review]
Patch v.2b

r=dbaron, but perhaps update the spec quote to cite HTML5?
Comment 11 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2011-12-02 16:36:01 PST
Comment on attachment 575192 [details] [diff] [review]
Attachment 550374 [details] as reftest, updated

r=dbaron

Note You need to log in before you can comment on or make changes to this bug.