@@ -130,4 +130,45 @@ public void OutlineOffset_PushesTheRingFurtherFromTheBorderBox()
130130
131131 Assert . AreEqual ( borderBox . Y - 10 - 5 , top . Y , 0.1 ) ;
132132 }
133+
134+ [ TestMethod ]
135+ public void OutlineColorInvert_FallsBackToCurrentColor ( )
136+ {
137+ var ( _, container ) = PaintHarness . Layout ( PaintHarness . Wrap (
138+ "<div style='width:100px;height:50px;color:rgb(51,51,51);outline:5px solid invert'></div>" ) ) ;
139+
140+ var g = PaintHarness . PaintPage ( container ) ;
141+ var rects = g . Log . OfType < RecordingGraphics . DrawRectCall > ( )
142+ . Where ( r => r . Color == RColor . FromArgb ( 51 , 51 , 51 ) ) . ToList ( ) ;
143+
144+ Assert . AreEqual ( 4 , rects . Count ) ;
145+ }
146+
147+ [ TestMethod ]
148+ [ DataRow ( "<img id='e' style='width:20px;height:20px;outline:5px solid rgb(51,51,51)'>" ) ]
149+ [ DataRow ( "<hr id='e' style='outline:5px solid rgb(51,51,51)'>" ) ]
150+ public void ReplacedAndRuleElements_PaintTheirOutline ( string element )
151+ {
152+ var ( _, container ) = PaintHarness . Layout ( PaintHarness . Wrap ( element ) ) ;
153+
154+ var g = PaintHarness . PaintPage ( container ) ;
155+ var rects = g . Log . OfType < RecordingGraphics . DrawRectCall > ( )
156+ . Where ( r => r . Color == RColor . FromArgb ( 51 , 51 , 51 ) ) . ToList ( ) ;
157+
158+ Assert . AreEqual ( 4 , rects . Count ) ;
159+ }
160+
161+ [ TestMethod ]
162+ public void InlineSplitAroundABlock_KeepsTheOutlineOnEveryPart ( )
163+ {
164+ // The span gets split into a part before and a part after the block, and both parts are copies.
165+ var ( _, container ) = PaintHarness . Layout ( PaintHarness . Wrap (
166+ "<span style='outline:2px solid rgb(51,51,51)'>before<div>block</div>after</span>" ) ) ;
167+
168+ var g = PaintHarness . PaintPage ( container ) ;
169+ var rects = g . Log . OfType < RecordingGraphics . DrawRectCall > ( )
170+ . Where ( r => r . Color == RColor . FromArgb ( 51 , 51 , 51 ) ) . ToList ( ) ;
171+
172+ Assert . IsGreaterThanOrEqualTo ( 8 , rects . Count , "both the part before and the part after the block need a ring" ) ;
173+ }
133174}
0 commit comments