Bug 175936 - Weird getComputedStyle behavior for pseudo-elements on layout-dependent properties.
Summary: Weird getComputedStyle behavior for pseudo-elements on layout-dependent prope...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2017-08-24 08:07 PDT by Emilio Cobos Álvarez (:emilio)
Modified: 2017-09-27 12:55 PDT (History)
4 users (show)

See Also:

testcase (102 bytes, text/html)
2017-08-24 08:07 PDT, Emilio Cobos Álvarez (:emilio)
no flags Details
Patch (7.14 KB, patch)
2017-08-24 11:01 PDT, Emilio Cobos Álvarez (:emilio)
no flags Details | Formatted Diff | Diff
Patch (8.68 KB, patch)
2017-09-01 14:15 PDT, Emilio Cobos Álvarez (:emilio)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emilio Cobos Álvarez (:emilio) 2017-08-24 08:07:16 PDT
Created attachment 318985 [details]

See the test-case. The width of the actual element is reported. I'd expect "auto" to be alerted, given it's the default value for the "width" property.
Comment 1 Emilio Cobos Álvarez (:emilio) 2017-08-24 11:01:28 PDT
Created attachment 318997 [details]
Comment 2 Emilio Cobos Álvarez (:emilio) 2017-08-24 11:02:36 PDT
Antti, could you review this?

Also, I don't know what the deal is with wpt, do the tests get auto-exported? Or do I need to submit a PR manually?

Comment 3 Antti Koivisto 2017-08-25 05:17:05 PDT
Comment on attachment 318997 [details]

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2386
> +RenderObject* ComputedStyleExtractor::styledRenderObject() const

styledRenderer() would be a better name. Also this can return RenderElement*
Comment 4 Emilio Cobos Álvarez 2017-08-27 12:59:48 PDT
Per https://www.mail-archive.com/webkit-dev@lists.webkit.org/msg27587.html I submitted tests to https://github.com/w3c/web-platform-tests/pull/7020.

Will upload a patch with the review comments addressed when that is merged.

Thanks for the review Antti!
Comment 5 Emilio Cobos Álvarez (:emilio) 2017-09-01 14:15:38 PDT
Created attachment 319644 [details]
Comment 6 WebKit Commit Bot 2017-09-01 15:16:05 PDT
Comment on attachment 319644 [details]

Clearing flags on attachment: 319644

Committed r221501: <http://trac.webkit.org/changeset/221501>
Comment 7 WebKit Commit Bot 2017-09-01 15:16:06 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2017-09-27 12:55:07 PDT