Closed Bug 1238403 Opened 4 years ago Closed 4 years ago

fix inconsistent indenting in layout/style/

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: heycam, Assigned: heycam)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
There are some bits of layout/style/ that are formatted with four space indents (mainly nsCSSDataBlock.cpp), which has annoyed me for a long time.  Here I fix that plus, on the files I touch, update the modeline and move any same-line-braces in a class/struct definition to a new line.
Attachment #8706169 - Flags: review?(quanxunzhen)
Comment on attachment 8706169 [details] [diff] [review]
patch

Review of attachment 8706169 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thanks for doing this. Some of the code also annoyed me before.

FWIW, MozReview could make reviewing whitespace changes much easier than Splinter, because it can display finer-grained difference and detect indent change.

::: layout/style/nsCSSDataBlock.h
@@ +175,5 @@
>                "nsCSSCompressedDataBlock's size has changed");
>  static_assert(NS_ALIGNMENT_OF(nsCSSValue) == 4 || NS_ALIGNMENT_OF(nsCSSValue) == 8,
>                "nsCSSValue doesn't align with nsCSSCompressedDataBlock"); 
>  static_assert(NS_ALIGNMENT_OF(nsCSSCompressedDataBlock::CompressedCSSProperty) == 2,
>                "CompressedCSSProperty doesn't align with nsCSSValue"); 

As far as this is a cosmetic fix, could you also remove the tailing spaces after these two static_asserts?

@@ +291,5 @@
> +   * result of |Compress|.
> +   */
> +  void ComputeNumProps(uint32_t* aNumPropsNormal,
> +                       uint32_t* aNumPropsImportant);
> +  

And tailing spaces here.

::: layout/style/nsStyleStruct.cpp
@@ +820,5 @@
>  
>  // --------------------
>  // nsStyleSVG
>  //
>  nsStyleSVG::nsStyleSVG() 

Tailing spaces here

@@ +859,3 @@
>  }
>  
>  nsStyleSVG::~nsStyleSVG() 

here

@@ +1240,5 @@
>  
>  // --------------------
>  // nsStyleSVGReset
>  //
>  nsStyleSVGReset::nsStyleSVGReset() 

here

@@ +1256,3 @@
>  }
>  
>  nsStyleSVGReset::~nsStyleSVGReset() 

and here.
Attachment #8706169 - Flags: review?(quanxunzhen) → review+
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #1)
> FWIW, MozReview could make reviewing whitespace changes much easier than
> Splinter, because it can display finer-grained difference and detect indent
> change.

Thanks, I'll consider that next time.
https://hg.mozilla.org/mozilla-central/rev/ecafedaedd09
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.