Bug 175936

Summary: Weird getComputedStyle behavior for pseudo-elements on layout-dependent properties.
Product: WebKit Reporter: Emilio Cobos Álvarez (:emilio) <emilio>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ecobos, koivisto, 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=37835
https://bugs.chromium.org/p/chromium/issues/detail?id=758596
Attachments:
Description Flags
testcase
none
Patch
none
Patch none

Description Emilio Cobos Álvarez (:emilio) 2017-08-24 08:07:16 PDT
Created attachment 318985 [details]
testcase

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]
Patch
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?

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

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]
Patch
Comment 6 WebKit Commit Bot 2017-09-01 15:16:05 PDT
Comment on attachment 319644 [details]
Patch

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
<rdar://problem/34694264>