Bug 204902 - Add CSS parser support for the highlight pseudoelement
Summary: Add CSS parser support for the highlight pseudoelement
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: 204903
  Show dependency treegraph
 
Reported: 2019-12-05 11:12 PST by Simon Fraser (smfr)
Modified: 2019-12-06 15:24 PST (History)
14 users (show)

See Also:


Attachments
Patch (5.23 KB, patch)
2019-12-05 11:13 PST, Simon Fraser (smfr)
koivisto: 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-12-05 11:12:27 PST
Add CSS parser support for the highlight pseudoelement
Comment 1 Simon Fraser (smfr) 2019-12-05 11:13:39 PST
Created attachment 384924 [details]
Patch
Comment 2 Simon Fraser (smfr) 2019-12-05 11:29:54 PST
https://trac.webkit.org/changeset/253158/webkit
Comment 3 Radar WebKit Bug Importer 2019-12-05 11:30:27 PST
<rdar://problem/57670974>
Comment 4 Darin Adler 2019-12-06 12:04:54 PST
Comment on attachment 384924 [details]
Patch

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

> Source/WebCore/rendering/style/RenderStyleConstants.h:85
> -enum class PseudoId : uint8_t {
> +enum class PseudoId : uint16_t {

What’s the rationale for this change?
Comment 5 Simon Fraser (smfr) 2019-12-06 13:45:01 PST
(In reply to Darin Adler from comment #4)
> Comment on attachment 384924 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=384924&action=review
> 
> > Source/WebCore/rendering/style/RenderStyleConstants.h:85
> > -enum class PseudoId : uint8_t {
> > +enum class PseudoId : uint16_t {
> 
> What’s the rationale for this change?

Compiler was telling me that uint8_t wasn't big enough at the:
PublicPseudoIdMask = ((1 << FirstInternalPseudoId) - 1) & ~((1 << FirstPublicPseudoId) - 1)
line, but maybe I need to fix that bitmasking instead.
Comment 6 Darin Adler 2019-12-06 13:51:44 PST
Comment on attachment 384924 [details]
Patch

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

>>> Source/WebCore/rendering/style/RenderStyleConstants.h:85
>>> +enum class PseudoId : uint16_t {
>> 
>> What’s the rationale for this change?
> 
> Compiler was telling me that uint8_t wasn't big enough at the:
> PublicPseudoIdMask = ((1 << FirstInternalPseudoId) - 1) & ~((1 << FirstPublicPseudoId) - 1)
> line, but maybe I need to fix that bitmasking instead.

Looks to me like the issue is that PublicPseudoIdMask should not be a PseudoId value. It’s mask for use when these PseudoId values are used as bit numbers, not one of the PseudoId values. So we should move it out of the enum class.
Comment 7 Simon Fraser (smfr) 2019-12-06 15:24:01 PST
Yeah I'll do that.