From ab0d62002516562829151ec207c1c5bb9a7d6d6d Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 23 Oct 2013 14:47:39 +0200 Subject: [PATCH] Remove the 'border-width: 0' hack. This was to work-around a netsurfcss quirk. --- src/components/main/css/select.rs | 32 ++----------------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/src/components/main/css/select.rs b/src/components/main/css/select.rs index b458895e806..a3e055a8e91 100644 --- a/src/components/main/css/select.rs +++ b/src/components/main/css/select.rs @@ -2,41 +2,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use extra::url::Url; use style::Stylesheet; use style::Stylist; use style::selector_matching::UserAgentOrigin; pub fn new_stylist() -> Stylist { let mut stylist = Stylist::new(); - stylist.add_stylesheet(html4_default_style(), UserAgentOrigin); - stylist.add_stylesheet(servo_default_style(), UserAgentOrigin); + let ua_stylesheet = Stylesheet::from_str(include_str!("user-agent.css")); + stylist.add_stylesheet(ua_stylesheet, UserAgentOrigin); stylist } - -fn html4_default_style() -> Stylesheet { - Stylesheet::from_str(html4_default_style_str()) -} - -fn servo_default_style() -> Stylesheet { - Stylesheet::from_str(servo_default_style_str()) -} - -fn default_url(name: &str) -> Url { - FromStr::from_str(fmt!("http://%s", name)).unwrap() -} - -fn html4_default_style_str() -> &'static str { - include_str!("user-agent.css") -} - - -// FIXME: this shouldn’t be needed. -// The initial value of border-*-width is 'medium' (for which 2px is ok.) -// It’s the *computed values* that is set to 0 when the corresponding -// border-*-style is 'none' (the initial value) or 'hidden'. -// This should be taken care of when removing libcss. -fn servo_default_style_str() -> &'static str { - // libcss want's this to default to 2px.. - "* { border-width: 0px; }" -}