Bug 188445 - Update IDL for IntersectionObserverEntry and IntersectionObserverEntryInit
Summary: Update IDL for IntersectionObserverEntry and IntersectionObserverEntryInit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ali Juma
URL:
Keywords: InRadar
Depends on:
Blocks: 159475
  Show dependency treegraph
 
Reported: 2018-08-09 11:03 PDT by Ali Juma
Modified: 2018-08-09 12:37 PDT (History)
9 users (show)

See Also:


Attachments
Patch (8.34 KB, patch)
2018-08-09 11:09 PDT, Ali Juma
no flags Details | Formatted Diff | Diff
Patch for landing (8.31 KB, patch)
2018-08-09 11:26 PDT, Ali Juma
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2018-08-09 11:03:22 PDT
Update IntersectionObserverEntry by adding |isIntersecting| and making |rootBounds| nullable. Make the same changes to IntersectionObserverEntryInit, and also add intersectionRatio.
Comment 1 Ali Juma 2018-08-09 11:09:42 PDT
Created attachment 346847 [details]
Patch
Comment 2 Simon Fraser (smfr) 2018-08-09 11:15:28 PDT
Comment on attachment 346847 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=346847&action=review

> Source/WebCore/page/IntersectionObserverEntry.h:51
> +        std::optional<DOMRectInit> rootBounds;
>          DOMRectInit boundingClientRect;
>          DOMRectInit intersectionRect;
> +        bool isIntersecting;
> +        double intersectionRatio;
>          RefPtr<Element> target;

This would pack better if you put the bool at the end

> Source/WebCore/page/IntersectionObserverEntry.h:77
> +    bool m_isIntersecting { false };
>      double m_intersectionRatio { 0 };
>      RefPtr<Element> m_target;

Ditto
Comment 3 Ali Juma 2018-08-09 11:26:29 PDT
Created attachment 346851 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2018-08-09 12:36:45 PDT
Comment on attachment 346851 [details]
Patch for landing

Clearing flags on attachment: 346851

Committed r234732: <https://trac.webkit.org/changeset/234732>
Comment 5 WebKit Commit Bot 2018-08-09 12:36:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-08-09 12:37:19 PDT
<rdar://problem/43106234>