mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement getComputedStyle
This commit is contained in:
parent
416931f4be
commit
e484d6b5e3
24 changed files with 886 additions and 152 deletions
|
@ -2,6 +2,8 @@
|
|||
* 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 cssparser::ToCss;
|
||||
|
||||
use euclid::length::Length;
|
||||
use euclid::point::Point2D;
|
||||
use euclid::rect::Rect;
|
||||
|
@ -122,7 +124,14 @@ impl Encodable for Au {
|
|||
impl fmt::Debug for Au {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}px", self.to_f64_px())
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for Au {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
write!(dest, "{}px", self.to_f64_px())
|
||||
}
|
||||
}
|
||||
|
||||
impl Add for Au {
|
||||
type Output = Au;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue