Last Comment Bug 746987 - unicode-bidi:plaintext is supposed to work on inline elements
: unicode-bidi:plaintext is supposed to work on inline elements
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Simon Montagu :smontagu
:
Mentors:
Depends on:
Blocks: html5bidi
  Show dependency treegraph
 
Reported: 2012-04-19 07:38 PDT by Aharon (Vladimir) Lanin
Modified: 2012-12-11 10:09 PST (History)
3 users (show)
smontagu: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Test case 1 (479 bytes, text/html)
2012-04-19 08:10 PDT, Aharon (Vladimir) Lanin
no flags Details
Patch (6.30 KB, patch)
2012-04-19 10:02 PDT, Simon Montagu :smontagu
no flags Details | Diff | Review
The test as reftest (1.71 KB, patch)
2012-04-19 10:02 PDT, Simon Montagu :smontagu
roc: review+
Details | Diff | Review
Patch (2.33 KB, patch)
2012-04-19 10:03 PDT, Simon Montagu :smontagu
roc: review+
Details | Diff | Review
Test case 2 (1014 bytes, text/html)
2012-04-19 12:40 PDT, Aharon (Vladimir) Lanin
no flags Details
Test case 3 (1.21 KB, text/html)
2012-04-19 12:41 PDT, Aharon (Vladimir) Lanin
no flags Details
Test case 4 (1.10 KB, text/html)
2012-04-19 12:44 PDT, Aharon (Vladimir) Lanin
no flags Details

Description Aharon (Vladimir) Lanin 2012-04-19 07:38:01 PDT
When unicode-bidi:-moz-plaintext was originally implemented, the CSS Writing Modes Level 3 spec said that the plaintext value was not supposed to have any effect on inline elements. However, that changed some time ago. It currently states as follows:

This value behaves as ‘isolate’ except that for the purposes of the Unicode bidirectional algorithm, the base directionality of each bidi paragraph immediately contained by the element is determined not by the element's computed ‘direction’ as usual, but by following the heuristic in rules P2 and P3 of the Unicode bidirectional algorithm. An element immediately contains a bidi paragraph if the element itself, but none of its descendants, both contains the entire bidi paragraph and is either a block container or a bidi-isolating inline.

In other words, plaintext is supposed to bidi-isolate inline elements just like unicode-bidi:isolate, while giving each bidi paragraph bounded by the element its own base direction by the usual plaintext algorithm (just like it does for non-inline elements).
Comment 1 Aharon (Vladimir) Lanin 2012-04-19 08:10:09 PDT
Created attachment 616581 [details]
Test case 1
Comment 2 Simon Montagu :smontagu 2012-04-19 10:02:03 PDT
Created attachment 616639 [details] [diff] [review]
Patch
Comment 3 Simon Montagu :smontagu 2012-04-19 10:02:57 PDT
Created attachment 616640 [details] [diff] [review]
The test as reftest
Comment 4 Simon Montagu :smontagu 2012-04-19 10:03:55 PDT
Created attachment 616641 [details] [diff] [review]
Patch

The right diff this time
Comment 5 Aharon (Vladimir) Lanin 2012-04-19 12:40:09 PDT
Created attachment 616701 [details]
Test case 2
Comment 6 Aharon (Vladimir) Lanin 2012-04-19 12:41:33 PDT
Created attachment 616702 [details]
Test case 3
Comment 7 Aharon (Vladimir) Lanin 2012-04-19 12:44:48 PDT
Created attachment 616703 [details]
Test case 4
Comment 8 Aharon (Vladimir) Lanin 2012-04-19 12:46:41 PDT
BTW, plaintext is only supposed to affect alignment when it is on a containing block.

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