@@ -36,14 +36,14 @@ public static IStyleCollection GetStyleCollection(this IWindow window)
3636 /// Computes the declarations for the given element in the context of
3737 /// the specified styling rules.
3838 /// </summary>
39- /// <param name="rules ">The styles to use.</param>
39+ /// <param name="styles ">The styles to use.</param>
4040 /// <param name="element">The element that is questioned.</param>
4141 /// <param name="pseudoSelector">The optional pseudo selector to use.</param>
4242 /// <returns>The style declaration containing all the declarations.</returns>
43- public static ICssStyleDeclaration ComputeDeclarations ( this IEnumerable < ICssStyleRule > rules , IElement element , String pseudoSelector = null )
43+ public static ICssStyleDeclaration ComputeDeclarations ( this IStyleCollection styles , IElement element , String pseudoSelector = null )
4444 {
4545 var ctx = element . Owner ? . Context ;
46- var device = ctx ? . GetService < IRenderDevice > ( ) ;
46+ var device = styles . Device ;
4747 var computedStyle = new CssStyleDeclaration ( ctx ) ;
4848 var nodes = element . GetAncestors ( ) . OfType < IElement > ( ) ;
4949
@@ -57,11 +57,11 @@ public static ICssStyleDeclaration ComputeDeclarations(this IEnumerable<ICssStyl
5757 }
5858 }
5959
60- computedStyle . SetDeclarations ( rules . ComputeCascadedStyle ( element ) ) ;
60+ computedStyle . SetDeclarations ( styles . ComputeCascadedStyle ( element ) ) ;
6161
6262 foreach ( var node in nodes )
6363 {
64- computedStyle . UpdateDeclarations ( rules . ComputeCascadedStyle ( node ) ) ;
64+ computedStyle . UpdateDeclarations ( styles . ComputeCascadedStyle ( node ) ) ;
6565 }
6666
6767 if ( device is not null )
@@ -77,14 +77,14 @@ public static ICssStyleDeclaration ComputeDeclarations(this IEnumerable<ICssStyl
7777 /// Two rules with the same specificity are ordered according to their appearance. The more
7878 /// recent declaration wins. Inheritance is not taken into account.
7979 /// </summary>
80- /// <param name="styleCollection ">The style rules to apply.</param>
80+ /// <param name="rules ">The style rules to apply.</param>
8181 /// <param name="element">The element to compute the cascade for.</param>
8282 /// <param name="parent">The potential parent for the cascade.</param>
8383 /// <returns>Returns the cascaded read-only style declaration.</returns>
84- public static ICssStyleDeclaration ComputeCascadedStyle ( this IEnumerable < ICssStyleRule > styleCollection , IElement element , ICssStyleDeclaration parent = null )
84+ public static ICssStyleDeclaration ComputeCascadedStyle ( this IStyleCollection styles , IElement element , ICssStyleDeclaration parent = null )
8585 {
8686 var computedStyle = new CssStyleDeclaration ( element . Owner ? . Context ) ;
87- var rules = styleCollection . SortBySpecificity ( element ) ;
87+ var rules = styles . SortBySpecificity ( element ) ;
8888
8989 foreach ( var rule in rules )
9090 {
0 commit comments