Bug 161695 - Add CSSAtRule id info for new parser
Summary: Add CSSAtRule id info for new parser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks: 46591
  Show dependency treegraph
 
Reported: 2016-09-07 09:39 PDT by Dave Hyatt
Modified: 2016-09-22 13:37 PDT (History)
0 users

See Also:


Attachments
Patch (11.00 KB, patch)
2016-09-07 09:41 PDT, Dave Hyatt
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2016-09-07 09:39:42 PDT
Add CSSAtRule id info for new parser
Comment 1 Dave Hyatt 2016-09-07 09:41:15 PDT
Created attachment 288149 [details]
Patch
Comment 2 Sam Weinig 2016-09-07 09:53:14 PDT
Comment on attachment 288149 [details]
Patch

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

> Source/WebCore/css/parser/CSSAtRuleID.h:31
> +#ifndef CSSAtRuleID_h
> +#define CSSAtRuleID_h

You can replace this with #pragma once

> Source/WebCore/css/parser/CSSAtRuleID.h:33
> +#include <wtf/text/StringView.h>

This can be replaced with <wtf/Forward.h>

> Source/WebCore/css/parser/CSSAtRuleID.h:54
> +enum CSSAtRuleID {
> +    CSSAtRuleInvalid = 0,
> +
> +    CSSAtRuleCharset = 1,
> +    CSSAtRuleFontFace = 2,
> +    CSSAtRuleImport = 3,
> +    CSSAtRuleKeyframes = 4,
> +    CSSAtRuleMedia = 5,
> +    CSSAtRuleNamespace = 6,
> +    CSSAtRulePage = 7,
> +    CSSAtRuleSupports = 8,
> +    CSSAtRuleViewport = 9,
> +
> +    CSSAtRuleWebkitKeyframes = 10,
> +    CSSAtRuleApply = 11,
> +};
> +
> +CSSAtRuleID cssAtRuleID(StringView name);

We don't really have a style rule on this, but you could use enum class here to make this something like:

enum class CSSAtRule {
    Invalid ,
    Charset,
   ...
};

Up to you.
Comment 3 Dave Hyatt 2016-09-07 09:56:39 PDT
Landed in r205550.