Lines 534-550
class WritingMode {
Link Here
|
534 |
* the rtl-ness doesn't match), then we correct the direction by flipping the |
534 |
* the rtl-ness doesn't match), then we correct the direction by flipping the |
535 |
* same bits that get flipped in the constructor's CSS 'direction'-based |
535 |
* same bits that get flipped in the constructor's CSS 'direction'-based |
536 |
* chunk. |
536 |
* chunk. |
537 |
* |
537 |
* |
538 |
* XXX change uint8_t to UBiDiLevel after bug 924851 |
538 |
* XXX change uint8_t to UBiDiLevel after bug 924851 |
539 |
*/ |
539 |
*/ |
540 |
void SetDirectionFromBidiLevel(uint8_t level) { |
540 |
void SetDirectionFromBidiLevel(uint8_t level) { |
541 |
if (IS_LEVEL_RTL(level) == IsBidiLTR()) { |
541 |
if (IS_LEVEL_RTL(level) == IsBidiLTR()) { |
542 |
mWritingMode ^= StyleWritingMode_RTL | StyleWritingMode_INLINE_REVERSED; |
542 |
mWritingMode.bits ^= static_cast<uint8_t>( |
|
|
543 |
(StyleWritingMode_RTL | StyleWritingMode_INLINE_REVERSED).bits); |
543 |
} |
544 |
} |
544 |
} |
545 |
} |
545 |
|
546 |
|
546 |
/** |
547 |
/** |
547 |
* Compare two WritingModes for equality. |
548 |
* Compare two WritingModes for equality. |
548 |
*/ |
549 |
*/ |
549 |
bool operator==(const WritingMode& aOther) const { |
550 |
bool operator==(const WritingMode& aOther) const { |
550 |
return mWritingMode == aOther.mWritingMode; |
551 |
return mWritingMode == aOther.mWritingMode; |