Bug 194423 - PseudoElement created for any ::before/::after selector regardless of whether a content property exists
Summary: PseudoElement created for any ::before/::after selector regardless of whether...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-07 18:32 PST by Devin Rousso
Modified: 2019-02-07 22:51 PST (History)
6 users (show)

See Also:


Attachments
Patch (7.94 KB, patch)
2019-02-07 18:35 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-02-07 18:32:11 PST
If a page has a rule with ::before/::after but without a `content` property, we still create a `PseuedoElement` and attach it to the parent, and then we will immediately destroy it as there is no `content` and therefore nothing to display.  We should only be creating `PseudoElement`s when we have `content` (and *not* `display: none;`).
Comment 1 Devin Rousso 2019-02-07 18:33:18 PST
<rdar://problem/46787260>
Comment 2 Devin Rousso 2019-02-07 18:35:28 PST
Created attachment 361484 [details]
Patch
Comment 3 Antti Koivisto 2019-02-07 22:23:56 PST
Comment on attachment 361484 [details]
Patch

Good find, r=me
Comment 4 WebKit Commit Bot 2019-02-07 22:51:57 PST
Comment on attachment 361484 [details]
Patch

Clearing flags on attachment: 361484

Committed r241189: <https://trac.webkit.org/changeset/241189>
Comment 5 WebKit Commit Bot 2019-02-07 22:51:59 PST
All reviewed patches have been landed.  Closing bug.