Auto merge of #14821 - servo:docs-in-style, r=emilio

More docs in style.

Follow up to #14802.

r? @emilio

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14821)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-02 02:08:01 -08:00 committed by GitHub
commit 32eca899e6
2 changed files with 9 additions and 3 deletions

View file

@ -12,7 +12,7 @@ use euclid::point::Point2D;
const NEWTON_METHOD_ITERATIONS: u8 = 8;
/// A Bézier curve.
/// A unit cubic Bézier curve, used for timing functions in CSS transitions and animations.
pub struct Bezier {
ax: f64,
bx: f64,
@ -23,7 +23,13 @@ pub struct Bezier {
}
impl Bezier {
/// Create a Bézier curve from two control points.
/// Create a unit cubic Bézier curve from the two middle control points.
///
/// X coordinate is time, Y coordinate is function advancement.
/// The nominal range for both is 0 to 1.
///
/// The start and end points are always (0, 0) and (1, 1) so that a transition or animation
/// starts at 0% and ends at 100%.
#[inline]
pub fn new(p1: Point2D<f64>, p2: Point2D<f64>) -> Bezier {
let cx = 3.0 * p1.x;

View file

@ -492,7 +492,7 @@ pub fn parse_style_attribute(input: &str,
}
/// Parse a given property declaration. Can result in multiple
/// `PropertyDeclaration`s when expanding a longhand, for example.
/// `PropertyDeclaration`s when expanding a shorthand, for example.
pub fn parse_one_declaration(id: PropertyId,
input: &str,
base_url: &ServoUrl,