Skip to content

Commit

Permalink
fix: compact with main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Dec 28, 2023
1 parent 25e9cac commit 0511737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bridge/core/dom/element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ BoundingClientRect* Element::getBoundingClientRect(ExceptionState& exception_sta
}

std::vector<BoundingClientRect*> Element::getClientRects(ExceptionState& exception_state) {
GetExecutingContext()->FlushUICommand();
NativeValue result = InvokeBindingMethod(binding_call_methods::kgetClientRects, 0, nullptr, exception_state);
NativeValue result = InvokeBindingMethod(binding_call_methods::kgetClientRects, 0, nullptr, FlushUICommandReason::kDependentsOnElement | FlushUICommandReason::kDependentsOnLayout, exception_state);
if (exception_state.HasException()) {
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/specs/dom/elements/custom-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ describe('custom html element', () => {
it('dart implements getAllBindingPropertyNames works', async () => {
let sampleElement = document.createElement('sample-element');
let attributes = Object.keys(sampleElement);
expect(attributes).toEqual(['offsetTop', 'offsetLeft', 'offsetWidth', 'offsetHeight', 'scrollTop', 'scrollLeft', 'scrollWidth', 'scrollHeight', 'clientTop', 'clientLeft', 'clientWidth', 'clientHeight', 'className', 'classList', 'dir', 'ping', 'fake', 'getBoundingClientRect', 'scroll', 'scrollBy', 'scrollTo', 'click', 'getElementsByClassName', 'getElementsByTagName', 'querySelectorAll', 'querySelector', 'matches', 'closest', 'fn', 'asyncFn', 'asyncFnFailed', 'asyncFnNotComplete']);
expect(attributes).toEqual(['offsetTop', 'offsetLeft', 'offsetWidth', 'offsetHeight', 'scrollTop', 'scrollLeft', 'scrollWidth', 'scrollHeight', 'clientTop', 'clientLeft', 'clientWidth', 'clientHeight', 'className', 'classList', 'dir', 'ping', 'fake', 'getBoundingClientRect', 'getClientRects', 'scroll', 'scrollBy', 'scrollTo', 'click', 'getElementsByClassName', 'getElementsByTagName', 'querySelectorAll', 'querySelector', 'matches', 'closest', 'fn', 'asyncFn', 'asyncFnFailed', 'asyncFnNotComplete']);
});

it('support custom properties in dart directly', () => {
Expand Down

0 comments on commit 0511737

Please sign in to comment.