Skip to content

Commit

Permalink
Make Internals computed style lookup take Element
Browse files Browse the repository at this point in the history
Prepare for CSSComputedStyleDeclaration to take Element

Change-Id: Ib31a33e45fb548377b0d5067faa27f99cd2d4028
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4116802
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1085489}
  • Loading branch information
lilles authored and Chromium LUCI CQ committed Dec 20, 2022
1 parent f0c7215 commit 67c3d2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions third_party/blink/renderer/core/testing/internals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1103,10 +1103,10 @@ String Internals::elementLayoutTreeAsText(Element* element,
}

CSSStyleDeclaration* Internals::computedStyleIncludingVisitedInfo(
Node* node) const {
DCHECK(node);
Element* element) const {
DCHECK(element);
bool allow_visited_style = true;
return MakeGarbageCollected<CSSComputedStyleDeclaration>(node,
return MakeGarbageCollected<CSSComputedStyleDeclaration>(element,
allow_visited_style);
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/core/testing/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Internals final : public ScriptWrappable {

bool doesWindowHaveUrlFragment(DOMWindow*);

CSSStyleDeclaration* computedStyleIncludingVisitedInfo(Node*) const;
CSSStyleDeclaration* computedStyleIncludingVisitedInfo(Element*) const;

void setBrowserControlsState(float top_height,
float bottom_height,
Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/core/testing/internals.idl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

boolean doesWindowHaveUrlFragment(Window window);

CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);

ShadowRoot createUserAgentShadowRoot(Element host);

Expand Down

0 comments on commit 67c3d2a

Please sign in to comment.