Skip to content

Commit

Permalink
update ComputeDeclarations and ComputeCascadedStyle to take IEnumerab…
Browse files Browse the repository at this point in the history
…le<ICssStyleRule>
  • Loading branch information
The-Nutty committed May 4, 2020
1 parent 496da0b commit d8c4d4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AngleSharp.Css/Extensions/StyleCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static IStyleCollection GetStyleCollection(this IWindow window)
/// <param name="element">The element that is questioned.</param>
/// <param name="pseudoSelector">The optional pseudo selector to use.</param>
/// <returns>The style declaration containing all the declarations.</returns>
public static ICssStyleDeclaration ComputeDeclarations(this IStyleCollection rules, IElement element, String pseudoSelector = null)
public static ICssStyleDeclaration ComputeDeclarations(this IEnumerable<ICssStyleRule> rules, IElement element, String pseudoSelector = null)
{
var computedStyle = new CssStyleDeclaration(element.Owner?.Context);
var nodes = element.GetAncestors().OfType<IElement>();
Expand Down Expand Up @@ -74,7 +74,7 @@ public static ICssStyleDeclaration ComputeDeclarations(this IStyleCollection rul
/// <param name="element">The element to compute the cascade for.</param>
/// <param name="parent">The potential parent for the cascade.</param>
/// <returns>Returns the cascaded read-only style declaration.</returns>
public static ICssStyleDeclaration ComputeCascadedStyle(this IStyleCollection styleCollection, IElement element, ICssStyleDeclaration parent = null)
public static ICssStyleDeclaration ComputeCascadedStyle(this IEnumerable<ICssStyleRule> styleCollection, IElement element, ICssStyleDeclaration parent = null)
{
var computedStyle = new CssStyleDeclaration(element.Owner?.Context);
var rules = styleCollection.SortBySpecificity(element);
Expand Down

0 comments on commit d8c4d4b

Please sign in to comment.