Bug 201284 - Avoid running the outline painting phase if no renderers have outlines
Summary: Avoid running the outline painting phase if no renderers have outlines
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: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-28 21:08 PDT by Simon Fraser (smfr)
Modified: 2019-08-29 19:38 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.12 KB, patch)
2019-08-28 21:13 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (5.12 KB, patch)
2019-08-29 08:08 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews210 for win-future (13.65 MB, application/zip)
2019-08-29 09:44 PDT, EWS Watchlist
no flags Details
Patch (5.46 KB, patch)
2019-08-29 15:34 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) 2019-08-28 21:08:11 PDT
Avoid running the outline painting phase if no renderers have outlines
Comment 1 Simon Fraser (smfr) 2019-08-28 21:13:57 PDT
Created attachment 377544 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-08-29 08:08:48 PDT
Created attachment 377584 [details]
Patch
Comment 3 EWS Watchlist 2019-08-29 09:44:36 PDT
Comment on attachment 377584 [details]
Patch

Attachment 377584 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12980576

New failing tests:
fast/borders/hidpi-outline-on-subpixel-position.html
fast/replaced/outline-replaced-elements-offset.html
svg/custom/rgba-color-outline.svg
svg/text/text-outline-rgba.html
transforms/2d/preserve3d-not-fixed-container.html
svg/text/tspan-multiple-outline.svg
transforms/2d/perspective-not-fixed-container.html
fast/block/block-only/block-replaced-with-vertical-margins.html
fast/repaint/layer-child-outline.html
fast/css/sticky/sticky-side-margins.html
Comment 4 EWS Watchlist 2019-08-29 09:44:39 PDT
Created attachment 377594 [details]
Archive of layout-test-results from ews210 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews210  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 5 Simon Fraser (smfr) 2019-08-29 15:34:36 PDT
Created attachment 377636 [details]
Patch
Comment 6 Said Abou-Hallawa 2019-08-29 16:21:13 PDT
Comment on attachment 377636 [details]
Patch

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

> Source/WebCore/rendering/RenderView.h:153
> +    void addRenderWithOutline() { m_renderersWithOutlineCount++; }

This name is a little bit confusing. This function does not add a renderer with outline to the RenderView. How about didAddOutlineToRenderer() or something similar? Also can we use the pre increment ++ operator?

> Source/WebCore/rendering/RenderView.h:154
> +    void removeRenderWithOutline() { ASSERT(m_renderersWithOutlineCount > 0); m_renderersWithOutlineCount--; }

This ASSERT will not prevent the overflow in the release build. Can we add an if statement to ensure m_renderersWithOutlineCount will not overflow?
Comment 7 Simon Fraser (smfr) 2019-08-29 17:30:00 PDT
(In reply to Said Abou-Hallawa from comment #6)
> Comment on attachment 377636 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=377636&action=review
> 
> > Source/WebCore/rendering/RenderView.h:153
> > +    void addRenderWithOutline() { m_renderersWithOutlineCount++; }
> 
> This name is a little bit confusing. This function does not add a renderer
> with outline to the RenderView. How about didAddOutlineToRenderer() or
> something similar? Also can we use the pre increment ++ operator?

I'll call them incrementRendersWithOutline/decrementRendersWithOutline

> > Source/WebCore/rendering/RenderView.h:154
> > +    void removeRenderWithOutline() { ASSERT(m_renderersWithOutlineCount > 0); m_renderersWithOutlineCount--; }
> 
> This ASSERT will not prevent the overflow in the release build. Can we add
> an if statement to ensure m_renderersWithOutlineCount will not overflow?

Underflow is benign in this case; we'll just do a bit more painting.
Comment 8 Simon Fraser (smfr) 2019-08-29 19:37:16 PDT
https://trac.webkit.org/changeset/249309/webkit
Comment 9 Radar WebKit Bug Importer 2019-08-29 19:38:21 PDT
<rdar://problem/54866678>