Bug 196483 - [ContentChangeObserver] Ignore reconstructed renderers when checking for visibility change
Summary: [ContentChangeObserver] Ignore reconstructed renderers when checking for visi...
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: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-01 21:19 PDT by zalan
Modified: 2019-04-02 12:43 PDT (History)
4 users (show)

See Also:


Attachments
Patch (12.09 KB, patch)
2019-04-02 08:12 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (17.29 KB, patch)
2019-04-02 11:35 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2019-04-01 21:19:42 PDT
when the renderer is destroyed and reconstructed, the newly created renderer is (mistakenly)considered a visible change.
Comment 1 zalan 2019-04-01 21:20:53 PDT
<rdar://problem/49288174>
Comment 2 zalan 2019-04-02 08:12:41 PDT
Created attachment 366494 [details]
Patch
Comment 3 Simon Fraser (smfr) 2019-04-02 10:48:18 PDT
Comment on attachment 366494 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        as "visible change" -> hover.

-> to "thereby triggering"

> Source/WebCore/page/ios/ContentChangeObserver.cpp:321
> +    if (!isConsideredHidden(element))
> +        m_elementsWithDestroyedVisibleRenderer.add(&element);

Maybe add a test for this code path.

> Source/WebCore/page/ios/ContentChangeObserver.cpp:510
> +    auto needsObserving = m_contentChangeObserver.isObservingContentChanges() 
> +        && !m_contentChangeObserver.hasVisibleChangeState()
> +        && !m_contentChangeObserver.visibleRendererWasDestroyed(m_element);

Maybe move into a private function

> Source/WebCore/page/ios/ContentChangeObserver.cpp:512
> +        if (needsObserving)
> +            m_wasHidden = isConsideredHidden(m_element);

Indentation!
Comment 4 zalan 2019-04-02 11:35:17 PDT
Created attachment 366511 [details]
Patch
Comment 5 WebKit Commit Bot 2019-04-02 12:43:56 PDT
Comment on attachment 366511 [details]
Patch

Clearing flags on attachment: 366511

Committed r243752: <https://trac.webkit.org/changeset/243752>
Comment 6 WebKit Commit Bot 2019-04-02 12:43:58 PDT
All reviewed patches have been landed.  Closing bug.