Bug 166674 - Add some missing longhand properties to CSSComputedStyleDeclaration and fix default values
Summary: Add some missing longhand properties to CSSComputedStyleDeclaration and fix d...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-03 20:10 PST by Joseph Pecoraro
Modified: 2017-01-13 20:07 PST (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (16.32 KB, patch)
2017-01-03 20:13 PST, Joseph Pecoraro
bburg: review-
Details | Formatted Diff | Diff
[PATCH] Proposed Fix (32.53 KB, patch)
2017-01-05 13:42 PST, Joseph Pecoraro
darin: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (32.72 KB, patch)
2017-01-06 11:27 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-01-03 20:10:41 PST
Summary:
Add some missing longhand properties to CSSComputedStyleDeclaration and fix default values

Test:
<style>
body { counter-reset: my-counter; }
#x { counter-increment: object; }
#x:before {
    content: "Before (" counter(my-counter) ") ";
    counter-increment: my-counter;
}
#x:after {
	content: " After (" counter(my-counter) ")";
    counter-increment: my-counter;
}
</style>
<div id="x">Test</div>

Steps to Reproduce:
1. Inspect div#x on test page
2. Show computed styles
  => "counter-increment" does not show up, but it is expected

Notes:
- This is because "counter-increment" doesn't show up in the numeric list of all longhand properties in: getComputedStyle(elem)
- Adding it to that list makes it show up in the inspector
- Auditing all our longhand properties there are plenty that could be in this list that are not.
Comment 1 Joseph Pecoraro 2017-01-03 20:10:58 PST
<rdar://problem/6026159>
Comment 2 Joseph Pecoraro 2017-01-03 20:13:50 PST
Created attachment 297989 [details]
[PATCH] Proposed Fix
Comment 3 BJ Burg 2017-01-03 21:05:52 PST
Comment on attachment 297989 [details]
[PATCH] Proposed Fix

Looks like one SVG test still needs fixing.
Comment 4 Joseph Pecoraro 2017-01-05 13:20:21 PST
(In reply to comment #3)
> Comment on attachment 297989 [details]
> [PATCH] Proposed Fix
> 
> Looks like one SVG test still needs fixing.

How can I see what that one SVG test was? =/
Comment 5 Joseph Pecoraro 2017-01-05 13:20:43 PST
Got it:

Regressions: Unexpected text-only failures (1)
  svg/css/getComputedStyle-basic.xhtml [ Failure ]
Comment 6 Joseph Pecoraro 2017-01-05 13:42:33 PST
Created attachment 298130 [details]
[PATCH] Proposed Fix
Comment 7 Darin Adler 2017-01-05 23:55:05 PST
Comment on attachment 298130 [details]
[PATCH] Proposed Fix

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1865
> +        return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);

Given this function no longer ever returns null, its return type should be changed from RefPtr to Ref.
Comment 8 Joseph Pecoraro 2017-01-06 11:27:17 PST
Created attachment 298218 [details]
[PATCH] For Landing
Comment 9 WebKit Commit Bot 2017-01-06 12:03:44 PST
Comment on attachment 298218 [details]
[PATCH] For Landing

Clearing flags on attachment: 298218

Committed r210449: <http://trac.webkit.org/changeset/210449>