Bug 195087 - [ContentChangeObserver] Move style recalc handling from global to ContentChangeObserver class
Summary: [ContentChangeObserver] Move style recalc handling from global to ContentChan...
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-02-26 19:14 PST by zalan
Modified: 2019-02-27 15:29 PST (History)
5 users (show)

See Also:


Attachments
Patch (6.32 KB, patch)
2019-02-26 19:19 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (6.04 KB, patch)
2019-02-27 14:56 PST, zalan
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2019-02-26 19:14:37 PST
ssia
Comment 1 zalan 2019-02-26 19:19:16 PST
Created attachment 363059 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-02-26 19:19:42 PST
<rdar://problem/48425308>
Comment 3 Tim Horton 2019-02-26 23:17:00 PST
Comment on attachment 363059 [details]
Patch

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

red patch

> Source/WebCore/page/ios/ContentChangeObserver.mm:185
> +    m_observingStyleRecalScheduling = true;

"Recal"?

> Source/WebCore/page/ios/ContentChangeObserver.mm:190
> +    m_observingStyleRecalScheduling = false;

"Recal"?

> Source/WebCore/page/ios/ContentChangeObserver.mm:195
> +    return m_observingStyleRecalScheduling;

"Recal"?
Comment 4 zalan 2019-02-27 09:05:46 PST
(In reply to Tim Horton from comment #3)
> Comment on attachment 363059 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=363059&action=review
> 
> red patch
Happens when you make patches faster than you land them.

> 
> > Source/WebCore/page/ios/ContentChangeObserver.mm:185
> > +    m_observingStyleRecalScheduling = true;
> 
> "Recal"?
> 
> > Source/WebCore/page/ios/ContentChangeObserver.mm:190
> > +    m_observingStyleRecalScheduling = false;
> 
> "Recal"?
> 
> > Source/WebCore/page/ios/ContentChangeObserver.mm:195
> > +    return m_observingStyleRecalScheduling;
> 
> "Recal"?
Yeah, it's actually a thing ->

bool inStyleRecalc();
void scheduleStyleRecalc();
void unscheduleStyleRecalc();
bool hasPendingStyleRecalc() const;
void startTrackingStyleRecalcs(); (!even plural)
unsigned styleRecalcCount() const;
...
Comment 5 Tim Horton 2019-02-27 10:22:23 PST
(In reply to zalan from comment #4)
> (In reply to Tim Horton from comment #3)
> > Comment on attachment 363059 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=363059&action=review
> > 
> > red patch
> Happens when you make patches faster than you land them.
> 
> > 
> > > Source/WebCore/page/ios/ContentChangeObserver.mm:185
> > > +    m_observingStyleRecalScheduling = true;
> > 
> > "Recal"?
> > 
> > > Source/WebCore/page/ios/ContentChangeObserver.mm:190
> > > +    m_observingStyleRecalScheduling = false;
> > 
> > "Recal"?
> > 
> > > Source/WebCore/page/ios/ContentChangeObserver.mm:195
> > > +    return m_observingStyleRecalScheduling;
> > 
> > "Recal"?
> Yeah, it's actually a thing ->
> 
> bool inStyleRecalc();
> void scheduleStyleRecalc();
> void unscheduleStyleRecalc();
> bool hasPendingStyleRecalc() const;
> void startTrackingStyleRecalcs(); (!even plural)
> unsigned styleRecalcCount() const;
> ...
Those are recalc, not recal!
Comment 6 zalan 2019-02-27 10:23:02 PST
(In reply to Tim Horton from comment #5)
> (In reply to zalan from comment #4)
> > (In reply to Tim Horton from comment #3)
> > > Comment on attachment 363059 [details]
> > > Patch
> > > 
> > > View in context:
> > > https://bugs.webkit.org/attachment.cgi?id=363059&action=review
> > > 
> > > red patch
> > Happens when you make patches faster than you land them.
> > 
> > > 
> > > > Source/WebCore/page/ios/ContentChangeObserver.mm:185
> > > > +    m_observingStyleRecalScheduling = true;
> > > 
> > > "Recal"?
> > > 
> > > > Source/WebCore/page/ios/ContentChangeObserver.mm:190
> > > > +    m_observingStyleRecalScheduling = false;
> > > 
> > > "Recal"?
> > > 
> > > > Source/WebCore/page/ios/ContentChangeObserver.mm:195
> > > > +    return m_observingStyleRecalScheduling;
> > > 
> > > "Recal"?
> > Yeah, it's actually a thing ->
> > 
> > bool inStyleRecalc();
> > void scheduleStyleRecalc();
> > void unscheduleStyleRecalc();
> > bool hasPendingStyleRecalc() const;
> > void startTrackingStyleRecalcs(); (!even plural)
> > unsigned styleRecalcCount() const;
> > ...
> Those are recalc, not recal!
lol
Comment 7 zalan 2019-02-27 14:56:28 PST
Created attachment 363136 [details]
Patch
Comment 8 Simon Fraser (smfr) 2019-02-27 15:15:52 PST
Comment on attachment 363136 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Add m_observingNextStyleRecalc/m_observingStyleRecalScheduling to ContentChangeObserver and move the related code over from WK functions.

m_observingStyleRecalcScheduling
Comment 9 zalan 2019-02-27 15:29:11 PST
Committed r242167: <https://trac.webkit.org/changeset/242167>