Bug 149702 - Implement the CSS4 'revert' keyword (including inside the "all" property)
: Implement the CSS4 'revert' keyword (including inside the "all" property)
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: CSS
: WebKit Nightly Build
: Unspecified Unspecified
: P2 Normal
Assigned To: Dave Hyatt
: InRadar, WebExposed
Depends on:
Blocks: 148695
  Show dependency treegraph
 
Reported: 2015-10-01 02:25 PDT by Ryosuke Niwa
Modified: 2015-12-13 23:12 PST (History)
10 users (show)

See Also:


Attachments
Patch (61.78 KB, patch)
2015-10-17 14:36 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (63.65 KB, patch)
2015-10-17 14:41 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (63.62 KB, patch)
2015-10-17 14:46 PDT, Dave Hyatt
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 Ryosuke Niwa 2015-10-01 02:25:42 PDT
In order to reset all properties back to UA-stylesheet at the shadow boundary,
we need the support for `all: revert`.
Comment 1 Dave Hyatt 2015-10-17 14:36:29 PDT
Created attachment 263386 [details]
Patch
Comment 2 Dave Hyatt 2015-10-17 14:41:04 PDT
Created attachment 263387 [details]
Patch
Comment 3 WebKit Commit Bot 2015-10-17 14:43:43 PDT
Attachment 263387 [details] did not pass style-queue:


ERROR: Source/WebCore/css/StyleResolver.cpp:1854:  An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/WebCore/css/StyleResolver.h:309:  The parameter name "id" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/css/StyleResolver.h:535:  The parameter name "linkMatchMask" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/css/StyleResolver.h:535:  The parameter name "matchResult" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/css/CSSValue.h:50:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/css/CSSValue.h:51:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 6 in 31 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dave Hyatt 2015-10-17 14:46:04 PDT
Created attachment 263390 [details]
Patch
Comment 5 WebKit Commit Bot 2015-10-17 14:48:49 PDT
Attachment 263390 [details] did not pass style-queue:


ERROR: Source/WebCore/css/CSSValue.h:50:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/css/CSSValue.h:51:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 2 in 31 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Simon Fraser (smfr) 2015-10-17 14:55:17 PDT
Comment on attachment 263390 [details]
Patch

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

> Source/WebCore/WebCore.xcodeproj/project.pbxproj:5503
>  		BC7D8FF01BD03B6400FFE540 /* CSSUnsetValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FEE1BD03B6400FFE540 /* CSSUnsetValue.h */; };
> +		BC7D8FF31BD1A47900FFE540 /* CSSRevertValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC7D8FF11BD1A47900FFE540 /* CSSRevertValue.cpp */; settings = {ASSET_TAGS = (); }; };
> +		BC7D8FF41BD1A47900FFE540 /* CSSRevertValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC7D8FF21BD1A47900FFE540 /* CSSRevertValue.h */; settings = {ASSET_TAGS = (); }; };

Please run ./Tools/Scripts/sort-Xcode-project-file on this file.

> Source/WebCore/css/StyleResolver.cpp:1858
> +        authorRollback = new CascadedProperties(direction, writingMode);

unique_ptr?

> Source/WebCore/css/StyleResolver.h:425
> -
> +        

whitespace

> Source/WebCore/css/StyleResolver.h:457
> +        void setAuthorRollback(CascadedProperties* rollback) { m_authorRollback.reset(rollback); }

Should take a std::unique_ptr<CascadedProperties>&& and the caller should std::move I think.
Comment 7 Dave Hyatt 2015-10-17 16:14:39 PDT
Fixed in r191252.
Comment 8 Radar WebKit Bug Importer 2015-12-04 18:16:13 PST
<rdar://problem/23771199>
Comment 9 yisibl 2015-12-13 23:12:39 PST
http://trac.webkit.org/changeset/191252