add FIX comments

This commit is contained in:
HyunJune Kim 2013-12-12 14:40:02 +09:00
parent a7865495f6
commit cf537469b1
5 changed files with 11 additions and 0 deletions

View file

@ -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,

View file

@ -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)),

View file

@ -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) }),

View file

@ -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.)),
@ -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:
@ -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() {
@ -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),

View file

@ -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.
@ -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),
@ -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),
@ -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