aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/logical_geometry.rs
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-11-05 12:33:11 -0700
committerGlenn Watson <gw@intuitionlibrary.com>2014-11-13 11:17:43 +1000
commitd1b433a3b3bab353f320b2f39fa953ce326d2d55 (patch)
treed7a197abb65827b36c47e6b5c3adcce9071643d3 /components/util/logical_geometry.rs
parent26045d7fcbab8851fbefe2851cd904203f8fd8dd (diff)
downloadservo-d1b433a3b3bab353f320b2f39fa953ce326d2d55.tar.gz
servo-d1b433a3b3bab353f320b2f39fa953ce326d2d55.zip
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
Diffstat (limited to 'components/util/logical_geometry.rs')
-rw-r--r--components/util/logical_geometry.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/util/logical_geometry.rs b/components/util/logical_geometry.rs
index 2faa6400e1a..fd30c6c07cb 100644
--- a/components/util/logical_geometry.rs
+++ b/components/util/logical_geometry.rs
@@ -12,39 +12,39 @@ use std::num::Zero;
bitflags!(
#[deriving(Encodable)]
flags WritingMode: u8 {
- static FlagRTL = 1 << 0,
- static FlagVertical = 1 << 1,
- static FlagVerticalLR = 1 << 2,
- static FlagSidewaysLeft = 1 << 3
+ const FLAG_RTL = 1 << 0,
+ const FLAG_VERTICAL = 1 << 1,
+ const FLAG_VERTICAL_LR = 1 << 2,
+ const FLAG_SIDEWAYS_LEFT = 1 << 3
}
)
impl WritingMode {
#[inline]
pub fn is_vertical(&self) -> bool {
- self.intersects(FlagVertical)
+ self.intersects(FLAG_VERTICAL)
}
/// Asuming .is_vertical(), does the block direction go left to right?
#[inline]
pub fn is_vertical_lr(&self) -> bool {
- self.intersects(FlagVerticalLR)
+ self.intersects(FLAG_VERTICAL_LR)
}
/// Asuming .is_vertical(), does the inline direction go top to bottom?
#[inline]
pub fn is_inline_tb(&self) -> bool {
- !(self.intersects(FlagSidewaysLeft) ^ self.intersects(FlagRTL))
+ !(self.intersects(FLAG_SIDEWAYS_LEFT) ^ self.intersects(FLAG_RTL))
}
#[inline]
pub fn is_bidi_ltr(&self) -> bool {
- !self.intersects(FlagRTL)
+ !self.intersects(FLAG_RTL)
}
#[inline]
pub fn is_sideways_left(&self) -> bool {
- self.intersects(FlagSidewaysLeft)
+ self.intersects(FLAG_SIDEWAYS_LEFT)
}
}
@@ -57,7 +57,7 @@ impl Show for WritingMode {
} else {
try!(write!(formatter, " RL"));
}
- if self.intersects(FlagSidewaysLeft) {
+ if self.intersects(FLAG_SIDEWAYS_LEFT) {
try!(write!(formatter, " SidewaysL"));
}
} else {