Bug 1289007 - part0: remove redundant codes in ParsePropertyByFunction. r=heycam
authorJeremy Chen <jeremychen@mozilla.com>
Thu, 28 Jul 2016 15:23:36 +0800
changeset 346917 bc66bb60d83dd5f52e0d7143928fc4bada71ad48
parent 346916 705ce7870772b7d68b771edc924111cff49e3a60
child 346918 0aa0956567fc0178126434c013070332eb3a6fd7
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1289007
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289007 - part0: remove redundant codes in ParsePropertyByFunction. r=heycam CSS align and CSS justify share same parsing function under some conditions. Let's make these switch branches stick together, so we can remove a bit redundant codes. MozReview-Commit-ID: 49IKvqhLSt4
layout/style/nsCSSParser.cpp
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -11558,27 +11558,25 @@ CSSParserImpl::ParsePropertyByFunction(n
                               eCSSProperty_grid_row_end);
   case eCSSProperty_grid_area:
     return ParseGridArea();
   case eCSSProperty_grid_gap:
     return ParseGridGap();
   case eCSSProperty_image_region:
     return ParseRect(eCSSProperty_image_region);
   case eCSSProperty_align_content:
+  case eCSSProperty_justify_content:
     return ParseAlignJustifyContent(aPropID);
   case eCSSProperty_align_items:
     return ParseAlignItems();
   case eCSSProperty_align_self:
+  case eCSSProperty_justify_self:
     return ParseAlignJustifySelf(aPropID);
-  case eCSSProperty_justify_content:
-    return ParseAlignJustifyContent(aPropID);
   case eCSSProperty_justify_items:
     return ParseJustifyItems();
-  case eCSSProperty_justify_self:
-    return ParseAlignJustifySelf(aPropID);
   case eCSSProperty_list_style:
     return ParseListStyle();
   case eCSSProperty_margin:
     return ParseMargin();
   case eCSSProperty_object_position:
     return ParseObjectPosition();
   case eCSSProperty_outline:
     return ParseOutline();