Bug 1366434 - Part 1. Automatically repeat mask-mode and mask-composite to match the number of mask layers. draft
authorcku <cku@mozilla.com>
Tue, 23 May 2017 15:47:14 +0800
changeset 582981 c293049f68889570d0286f3fb6384665d8512672
parent 582730 5bc1c758ab57c1885dceab4e7837e58af27b998c
child 582982 0a7bcd2ebdd994dfcdaceaeca455818be7990909
child 582990 e7823c3275d5259c0a00c874bf35d5cb44bf5c05
child 582991 4df9e93a2be64831ea986d2a9a831a5f9817a76f
push id60249
push userbmo:cku@mozilla.com
push dateTue, 23 May 2017 12:57:15 +0000
bugs1366434
milestone55.0a1
Bug 1366434 - Part 1. Automatically repeat mask-mode and mask-composite to match the number of mask layers. To do this, we simply need to add them into nsRuleNode::FillAllBackgroundLists. It's gecko only bug, stylist in stylo handle it correctly. MozReview-Commit-ID: 6GkuMZnNEqt
layout/style/nsRuleNode.cpp
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -7298,16 +7298,22 @@ nsRuleNode::FillAllBackgroundLists(nsSty
                                   &Position::mXPosition,
                                   aImage.mPositionXCount, fillCount);
   FillImageLayerPositionCoordList(aImage.mLayers,
                                   &Position::mYPosition,
                                   aImage.mPositionYCount, fillCount);
   FillImageLayerList(aImage.mLayers,
                      &nsStyleImageLayers::Layer::mSize,
                      aImage.mSizeCount, fillCount);
+  FillImageLayerList(aImage.mLayers,
+                     &nsStyleImageLayers::Layer::mMaskMode,
+                     aImage.mMaskModeCount, fillCount);
+  FillImageLayerList(aImage.mLayers,
+                     &nsStyleImageLayers::Layer::mComposite,
+                     aImage.mCompositeCount, fillCount);
 }
 
 const void*
 nsRuleNode::ComputeBackgroundData(void* aStartStruct,
                                   const nsRuleData* aRuleData,
                                   nsStyleContext* aContext,
                                   nsRuleNode* aHighestNode,
                                   const RuleDetail aRuleDetail,