nsBidiPresUtils should use the "nsBidiLevel" typedef (instead of uint8_t) more consistently

RESOLVED FIXED in mozilla36

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla36
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
nsBidiPresUtils represents bidi embedding-level as nsBidiLevel, which is a typdef for uint8_t.

There are a few stray spots where it uses uint8_t directly, though. Filing this bug on fixing those.
(Assignee)

Comment 1

4 years ago
Created attachment 8522479 [details] [diff] [review]
fix

This patch changes to capture the result of GetFrameEmbeddingLevel(frame) & aBpd->GetParaLevel() in a nsBidiLevel. This is the type that these functions return, per code-quotes below:

> 274   /**
> 275    * Get the bidi embedding level of the given (inline) frame.
> 276    */
> 277   static nsBidiLevel GetFrameEmbeddingLevel(nsIFrame* aFrame);
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsBidiPresUtils.h#274

and
> 54 struct BidiParagraphData {
[...]
> 165   nsBidiLevel GetParaLevel()
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsBidiPresUtils.cpp#165

(Again, this is a typedef for uint8_t, so it doesn't really matter, but better to be consistent.)
Attachment #8522479 - Flags: review?(smontagu)
(Assignee)

Updated

4 years ago
Component: Graphics → Layout
Comment on attachment 8522479 [details] [diff] [review]
fix

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

Good catch!
Attachment #8522479 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/ee366f6b2d3e
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.