Bug 1359603 - Extra spec comments for style adjustments. r=heycam draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 26 Apr 2017 10:41:07 -0500
changeset 568933 78dfe1937ff587f1e398b963c22d40544e4d529e
parent 568932 2553f996afefe4276aef86c61ec99e6b7fd62242
child 568934 98a46e899c128893db3a65ce5f04797d2a39c666
push id56024
push userbmo:jryans@gmail.com
push dateWed, 26 Apr 2017 19:05:54 +0000
reviewersheycam
bugs1359603
milestone55.0a1
Bug 1359603 - Extra spec comments for style adjustments. r=heycam MozReview-Commit-ID: J6qxBpQ43Ax
servo/components/style/style_adjuster.rs
--- a/servo/components/style/style_adjuster.rs
+++ b/servo/components/style/style_adjuster.rs
@@ -48,16 +48,18 @@ impl<'a> StyleAdjuster<'a> {
     ///    value of 'float' is 'none'.
     ///
     fn adjust_for_position(&mut self) {
         if self.style.out_of_flow_positioned() && self.style.floated() {
             self.style.mutate_box().set_float(float::none);
         }
     }
 
+    /// Apply the blockification rules based on the table in CSS 2.2 section 9.7.
+    /// https://drafts.csswg.org/css2/visuren.html#dis-pos-flo
     fn blockify_if_necessary(&mut self,
                              layout_parent_style: &ComputedValues,
                              skip_root_and_element_display_fixup: bool) {
         let mut blockify = false;
         macro_rules! blockify_if {
             ($if_what:expr) => {
                 if !blockify {
                     blockify = $if_what;
@@ -242,16 +244,17 @@ impl<'a> StyleAdjuster<'a> {
            overflow_y != original_overflow_y {
             let mut box_style = self.style.mutate_box();
             box_style.set_overflow_x(overflow_x);
             box_style.set_overflow_y(overflow_y);
         }
     }
 
     /// Adjusts the style to account for various fixups the don't fit naturally into the cascade.
+    /// When comparing to Gecko, this is similar to the work done by `nsStyleContext::ApplyStyleFixups`.
     pub fn adjust(mut self,
                   layout_parent_style: &ComputedValues,
                   skip_root_and_element_display_fixup: bool) {
         #[cfg(feature = "gecko")]
         {
             self.adjust_for_text_combine_upright(layout_parent_style);
         }
         self.adjust_for_top_layer();