Bug 217338 - ChromeClient::needsImmediateRenderingUpdate() only exists to work around a WebKit1 bug
Summary: ChromeClient::needsImmediateRenderingUpdate() only exists to work around a We...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-05 14:36 PDT by Simon Fraser (smfr)
Modified: 2020-10-05 17:54 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.29 KB, patch)
2020-10-05 14:38 PDT, Simon Fraser (smfr)
sabouhallawa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2020-10-05 14:36:25 PDT
ChromeClient::needsImmediateRenderingUpdate() only existing to work around a WebKit1 bug
Comment 1 Simon Fraser (smfr) 2020-10-05 14:38:31 PDT
Created attachment 410563 [details]
Patch
Comment 2 Said Abou-Hallawa 2020-10-05 14:55:34 PDT
Comment on attachment 410563 [details]
Patch

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

> Source/WebCore/ChangeLog:9
> +        because the RunLoopObserver was always invalidate at the end of the callback.

invalidating? or calling invalidate()?

> Source/WebKitLegacy/mac/WebView/WebViewData.h:125
> +    bool m_insideCallback { false };
> +    bool m_rescheduledInsideCallback { false };

I think using two booleans can be a little bit difficult to understand. Can't we use enum for the states of these two members?

    enum class SchedulingState { None, InsideCallback, AlreadyRescheduled } // Maybe the names need to be changed.

> Source/WebKitLegacy/mac/WebView/WebViewData.mm:129
> +        SetForScope<bool> insideCallbackScope(m_insideCallback, true);
> +        m_rescheduledInsideCallback = false;

This can be changed to 
    SetForScope<SchedulingState> change(m_schedulingState, SchedulingState::InsideCallback);
Comment 3 Simon Fraser (smfr) 2020-10-05 17:53:43 PDT
https://trac.webkit.org/changeset/268022/webkit
Comment 4 Radar WebKit Bug Importer 2020-10-05 17:54:17 PDT
<rdar://problem/69979228>