Closed Bug 822723 Opened 12 years ago Closed 12 years ago

Assertion failure: "Strong directional characters before aStartAfterNode" with dynamic dir=auto

Categories

(Core :: Layout: Text and Fonts, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: jruderman, Assigned: smontagu)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files)

Assertion failure: GetDirectionFromText(child->GetText()) == eDir_NotSet (Strong directional characters before aStartAfterNode), at content/base/src/DirectionalityUtils.cpp:375
Attached file stack (deleted) —
Attached patch Patch (deleted) — Splinter Review
We need to be consistent about which text nodes we look at in the loop in WalkDescendantsSetDirectionFromText and the #ifdef DEBUG pre-loop which looks for text nodes with strong directional characters before aStartAfterNode. Otherwise we get false positives like this. In the testcase there *is* a strong directional character before aStartAfterNode, but it's a descendant of a node with dir=ltr, so it doesn't set the direction of the ancestor div with dir="auto".
Assignee: nobody → smontagu
Attachment #693782 - Flags: review?(ehsan)
Comment on attachment 693782 [details] [diff] [review] Patch Review of attachment 693782 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/base/src/DirectionalityUtils.cpp @@ +382,5 @@ > + // of their ancestors > + if (child->IsElement() && > + (DoesNotParticipateInAutoDirection(child->AsElement()) || > + child->NodeInfo()->Equals(nsGkAtoms::bdi) || > + child->HasFixedDir())) { Hmm, I think we need to add a utility method for this. Can you please file a follow-up?
Attachment #693782 - Flags: review?(ehsan) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: