Bug 210017

Summary: 'currentcolor' doesn't need setHasExplicitlyInheritedProperties marking anymore
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, kondapallykalyan, macpherson, menard, pdr, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=193171
Attachments:
Description Flags
patch
none
wip
none
patch
none
patch
none
patch
darin: review+
patch none

Description Antti Koivisto 2020-04-04 22:13:06 PDT
Remove it.
Comment 1 Antti Koivisto 2020-04-04 22:14:41 PDT
Created attachment 395482 [details]
patch
Comment 2 Antti Koivisto 2020-04-05 03:18:46 PDT
Created attachment 395497 [details]
wip
Comment 3 Antti Koivisto 2020-04-06 02:09:45 PDT
Created attachment 395555 [details]
patch
Comment 4 Antti Koivisto 2020-04-06 02:49:29 PDT
Created attachment 395556 [details]
patch
Comment 5 Antti Koivisto 2020-04-06 10:00:04 PDT
Created attachment 395579 [details]
patch
Comment 6 Darin Adler 2020-04-06 10:09:25 PDT
Comment on attachment 395579 [details]
patch

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2169
> +            // While most color properties are not inherited the value 'currentcolor' resolves to the value of the inherited 'color' property.

Needs a comma after the word "inherited".

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2200
> +            for (size_t i = 0; i < shorthand.length(); ++i) {
> +                if (!hasValidStyleForProperty(element, shorthand.properties()[i]))
> +                    return false;
> +            }

Seems like StylePropertyShorthand could use a way to use a for loop without writing it out. Since length() returns unsigned it’s not clear it’s helpful to use size_t for the loop, but that question only arises because we can’t use a modern for loop.

Wish the standard library offered a way to return a pointer and length as a for-loop-compatible range. I’m sure it’s coming in C++20.
Comment 7 Antti Koivisto 2020-04-06 10:12:31 PDT
> Seems like StylePropertyShorthand could use a way to use a for loop without
> writing it out. Since length() returns unsigned it’s not clear it’s helpful
> to use size_t for the loop, but that question only arises because we can’t
> use a modern for loop.

Yeah, noticed that too. I'll fix it separately.
Comment 8 Antti Koivisto 2020-04-06 10:58:46 PDT
Created attachment 395586 [details]
patch
Comment 9 EWS 2020-04-06 11:54:14 PDT
Committed r259585: <https://trac.webkit.org/changeset/259585>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395586 [details].
Comment 10 Radar WebKit Bug Importer 2020-04-06 11:55:12 PDT
<rdar://problem/61352490>