Closed Bug 847127 Opened 8 years ago Closed 8 years ago

Assertion failure: "AncestorHasDirAuto set on node but not its children" with nested dir=auto, RLE

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jruderman, Assigned: smontagu)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file testcase
Assertion failure: !aElement->AncestorHasDirAuto() || child->AncestorHasDirAuto() (AncestorHasDirAuto set on node but not its children), at content/base/src/DirectionalityUtils.cpp:677
Attached patch PatchSplinter Review
This is an improved version of the patch in bug 836890: setting AncestorHasDirAuto in SetAncestorDirectionIfAuto meant we were only setting it for text nodes that determined the direction of their dir=auto ancestors. The flag should be set for all text node descendants of elements with dir=auto.
Attachment #722299 - Flags: review?(ehsan)
Assignee: nobody → smontagu
Comment on attachment 722299 [details] [diff] [review]
Patch

Review of attachment 722299 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/src/DirectionalityUtils.cpp
@@ +815,5 @@
>    if (!NodeAffectsDirAutoAncestor(aTextNode)) {
>      return;
>    }
>  
> +  Element* parent = static_cast<nsINode * >(aTextNode)->GetParentElement();

Not sure why we need the cast here.  If we really do, please fix the spacing.
Attachment #722299 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/916cfe5fa711
https://hg.mozilla.org/mozilla-central/rev/e81b56f0c689
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.