Navigation Menu

Skip to content

Commit

Permalink
add FIX comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunjunekim committed Dec 12, 2013
1 parent a786549 commit cf53746
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/script/dom/htmliframeelement.rs
Expand Up @@ -116,6 +116,7 @@ impl HTMLIFrameElement {
if "sandbox" == name {
let mut modes = AllowNothing as u8;
for word in value.split_iter(' ') {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let word_lower = word.to_ascii_lower();
modes |= match word_lower.as_slice() {
"allow-same-origin" => AllowSameOrigin,
Expand Down
1 change: 1 addition & 0 deletions src/components/style/common_types.rs
Expand Up @@ -50,6 +50,7 @@ pub mod specified {
Length::parse_internal(input, /* negative_ok = */ false)
}
pub fn parse_dimension(value: CSSFloat, unit: &str) -> Option<Length> {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let unit_lower = unit.to_ascii_lower();
match unit_lower.as_slice() {
"px" => Some(Length::from_px(value)),
Expand Down
1 change: 1 addition & 0 deletions src/components/style/media_queries.rs
Expand Up @@ -82,6 +82,7 @@ pub fn parse_media_query_list(input: &[ComponentValue]) -> MediaQueryList {
loop {
let mq = match next {
Some(&Ident(ref value)) => {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let value_lower = value.to_ascii_lower();
match value_lower.as_slice() {
"screen" => Some(MediaQuery{ media_type: MediaType(Screen) }),
Expand Down
4 changes: 4 additions & 0 deletions src/components/style/properties.rs.mako
Expand Up @@ -190,6 +190,7 @@ pub mod longhands {
pub fn parse_border_width(component_value: &ComponentValue) -> Option<specified::Length> {
match component_value {
&Ident(ref value) => {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let value_lower = value.to_ascii_lower();
match value_lower.as_slice() {
"thin" => Some(specified::Length::from_px(1.)),
Expand Down Expand Up @@ -336,6 +337,7 @@ pub mod longhands {
pub fn from_component_value(input: &ComponentValue) -> Option<SpecifiedValue> {
match input {
&Ident(ref value) => {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let value_lower = value.to_ascii_lower();
match value_lower.as_slice() {
% for keyword in vertical_align_keywords:
Expand Down Expand Up @@ -460,6 +462,7 @@ pub mod longhands {
// TODO: avoid copying strings?
Some(&String(ref value)) => add!(FamilyName(value.to_owned())),
Some(&Ident(ref value)) => {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let value = value.as_slice();
let value_lower = value.to_ascii_lower();
match value_lower.as_slice() {
Expand Down Expand Up @@ -511,6 +514,7 @@ pub mod longhands {
pub fn from_component_value(input: &ComponentValue) -> Option<SpecifiedValue> {
match input {
&Ident(ref value) => {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let value_lower = value.to_ascii_lower();
match value_lower.as_slice() {
"bold" => Some(SpecifiedWeight700),
Expand Down
4 changes: 4 additions & 0 deletions src/components/style/selectors.rs
Expand Up @@ -309,6 +309,7 @@ fn parse_one_simple_selector(iter: &mut Iter, namespaces: &NamespaceMap, inside_
match iter.next() {
Some(Ident(name)) => match parse_simple_pseudo_class(name) {
None => {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let name_lower = name.to_ascii_lower();
match name_lower.as_slice() {
// Supported CSS 2.1 pseudo-elements only.
Expand Down Expand Up @@ -446,6 +447,7 @@ fn parse_attribute_selector(content: ~[ComponentValue], namespaces: &NamespaceMa


fn parse_simple_pseudo_class(name: &str) -> Option<SimpleSelector> {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let name_lower = name.to_ascii_lower();
match name_lower.as_slice() {
"any-link" => Some(AnyLink),
Expand All @@ -467,6 +469,7 @@ fn parse_simple_pseudo_class(name: &str) -> Option<SimpleSelector> {
fn parse_functional_pseudo_class(name: ~str, arguments: ~[ComponentValue],
namespaces: &NamespaceMap, inside_negation: bool)
-> Option<SimpleSelector> {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let name_lower = name.to_ascii_lower();
match name_lower.as_slice() {
// "lang" => parse_lang(arguments),
Expand All @@ -481,6 +484,7 @@ fn parse_functional_pseudo_class(name: ~str, arguments: ~[ComponentValue],


fn parse_pseudo_element(name: ~str) -> Option<PseudoElement> {
// FIXME: Workaround for https://github.com/mozilla/rust/issues/10683
let name_lower = name.to_ascii_lower();
match name_lower.as_slice() {
// All supported pseudo-elements
Expand Down

5 comments on commit cf53746

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging hyunjunekim/servo/cssissues = cf53746 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hyunjunekim/servo/cssissues = cf53746 merged ok, testing candidate = c5d81f1

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = c5d81f1

Please sign in to comment.