Closed
Bug 1141928
Opened 9 years ago
Closed 9 years ago
Ruby annotation is not placed correctly for RTL content
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: xidorn, Assigned: xidorn)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 4 obsolete files)
2.23 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
5.07 KB,
patch
|
roc
:
review+
xidorn
:
feedback+
|
Details | Diff | Splinter Review |
2.90 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
9.33 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
Testcase: data:text/html,<body dir="rtl"><ruby>base<rt>text</ruby>
Assignee | ||
Comment 1•9 years ago
|
||
Please note that the testcase in comment 0 could crash debug build because of violation of an assertion.
Assignee | ||
Comment 2•9 years ago
|
||
Assignee: nobody → quanxunzhen
Attachment #8575939 -
Flags: review?(jfkthame)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8575940 -
Flags: review?(jfkthame)
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8575942 -
Flags: review?(jfkthame)
Assignee | ||
Comment 5•9 years ago
|
||
Actually, these patches are not enough for fixing ruby in RTL content. I plan to fix the left parts in bug 1141931.
Comment 6•9 years ago
|
||
Comment on attachment 8575942 [details] [diff] [review] patch 3 - reftest Review of attachment 8575942 [details] [diff] [review]: ----------------------------------------------------------------- Look OK. I notice that without color:transparent, the "text" annotation is actually misplaced (doing Select All also reveals this, with the highlight being offset from the expected rect). I assume this is part of what you're expecting to handle in bug 1141931, and will add more tests at that time.
Attachment #8575942 -
Flags: review?(jfkthame) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8575939 [details] [diff] [review] patch 1 - correct ruby text containers Review of attachment 8575939 [details] [diff] [review]: ----------------------------------------------------------------- r=me, with a minor suggested change (if you agree that it makes sense). ::: layout/generic/nsLineLayout.cpp @@ +2982,5 @@ > + // It is necessary to set the rect again because the container > + // width was unknown, and zero was used instead when we reflow > + // them. The corresponding base containers were repositioned in > + // VerticalAlignFrames and PlaceTopBottomFrames. > + annotation->mFrame->SetRect(lineWM, annotation->mBounds, aContainerWidth); If I'm understanding things, this should only ever change the annotation frame's position, not size; so how about adding annotation->mFrame->GetLogicalSize(lineWM) == annotation->mBounds.Size(lineWM) to the assertion, and using SetPosition rather than SetRect. (Or are there cases where the size might be changing as well?)
Attachment #8575939 -
Flags: review?(jfkthame) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8575940 [details] [diff] [review] patch 2 - correct ruby text Review of attachment 8575940 [details] [diff] [review]: ----------------------------------------------------------------- Holding off on review here for now; the patch appears to work, but the end result feels a bit hacky to me. I've tried putting together an alternative approach that IMO results in cleaner code overall, which I'll post as a separate patch for you to consider, then let's decide how to go forward.
Comment 9•9 years ago
|
||
Here's my alternative suggestion for patch 2; seems to work in my local testing so far. See what you think...
Attachment #8576828 -
Flags: review?(quanxunzhen)
Assignee | ||
Comment 10•9 years ago
|
||
Comment on attachment 8576828 [details] [diff] [review] part 2 (alternative) - Correct the position of ruby text frames Review of attachment 8576828 [details] [diff] [review]: ----------------------------------------------------------------- Yes, I agree your patch is better than mine. But I wonder whether I can review this. This is not a trivial patch, and I'm not a peer. If I can, I'll grant it, though.
Attachment #8576828 -
Flags: review?(quanxunzhen) → feedback+
Assignee | ||
Updated•9 years ago
|
Attachment #8575940 -
Attachment is obsolete: true
Attachment #8575940 -
Flags: review?(jfkthame)
Assignee | ||
Updated•9 years ago
|
Attachment #8576828 -
Flags: review?(roc)
Assignee | ||
Comment 11•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7c904971c430
Attachment #8576828 -
Flags: review?(roc) → review+
Assignee | ||
Comment 12•9 years ago
|
||
Attachment #8577081 -
Flags: review?(jfkthame)
Assignee | ||
Comment 13•9 years ago
|
||
I just realized that I did the wrong change. We cannot get rid of line relative dir mapping code there, because logical side and line relative dir are different.
Attachment #8575939 -
Attachment is obsolete: true
Attachment #8577082 -
Flags: review?(jfkthame)
Assignee | ||
Comment 14•9 years ago
|
||
The previous one causes bustage on non-Win platforms
Attachment #8577081 -
Attachment is obsolete: true
Attachment #8577081 -
Flags: review?(jfkthame)
Attachment #8577090 -
Flags: review?(jfkthame)
Assignee | ||
Comment 15•9 years ago
|
||
Attachment #8577082 -
Attachment is obsolete: true
Attachment #8577082 -
Flags: review?(jfkthame)
Attachment #8577091 -
Flags: review?(jfkthame)
Updated•9 years ago
|
Attachment #8577090 -
Flags: review?(jfkthame) → review+
Updated•9 years ago
|
Attachment #8577091 -
Flags: review?(jfkthame) → review+
Assignee | ||
Comment 16•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d3a264f6f8a0
Assignee | ||
Comment 17•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1960dcae7b66 https://hg.mozilla.org/integration/mozilla-inbound/rev/e053df8878c3 https://hg.mozilla.org/integration/mozilla-inbound/rev/61aaf94f5e2f https://hg.mozilla.org/integration/mozilla-inbound/rev/4b963aa0ade1
Comment 18•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1960dcae7b66 https://hg.mozilla.org/mozilla-central/rev/e053df8878c3 https://hg.mozilla.org/mozilla-central/rev/61aaf94f5e2f https://hg.mozilla.org/mozilla-central/rev/4b963aa0ade1
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•