Bug 106611

Summary: getComputedStyle().width wrong after text changed
Product: WebKit Reporter: Bill Keese <bill>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, ap, buildbot, commit-queue, dino, esprehn+autocc, glenn, mitz, rniwa, webkit-bug-importer, yuki.sekiguchi
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: All   
Attachments:
Description Flags
see console; final getComputedStyle() call should width=50 but returns width=0
none
Patch
dino: review+
Patch
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
none
Patch none

Description Bill Keese 2013-01-10 15:32:12 PST
Created attachment 182219 [details]
see console; final getComputedStyle() call should width=50 but returns width=0

With certain font-family's, adjusting a node's innerHTML and CSS will make getComputedStyle() return a width of 0px (as though the text isn't there), rather than the correct value.   See attached reduced.html example file.

Alternately, see http://bill.dojotoolkit.org/1.8/vertical_tooltip.html.   Hovering the input the second time displays the problem; the incorrect width reporting from getComputedStyle() breaks the display of the tooltip.
Comment 1 Bill Keese 2013-01-10 15:33:47 PST
Cross reference: http://bugs.dojotoolkit.org/ticket/16549
Comment 2 Radar WebKit Bug Importer 2013-01-15 12:49:03 PST
<rdar://problem/13018216>
Comment 3 Yuki Sekiguchi 2013-06-24 22:50:01 PDT
Created attachment 205368 [details]
Patch
Comment 4 Dean Jackson 2013-06-25 12:40:23 PDT
Comment on attachment 205368 [details]
Patch

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

There is a typo in the name of the test: transcording should be transcoding.

> LayoutTests/ChangeLog:9
> +        * fast/dynamic/empty-absolute-innerhtml-transcording-text-expected.html: Added.
> +        * fast/dynamic/empty-absolute-innerhtml-transcording-text.html: Added.

Typo in name.
Comment 5 Yuki Sekiguchi 2013-06-25 21:34:02 PDT
Created attachment 205446 [details]
Patch
Comment 6 Build Bot 2013-06-26 01:23:00 PDT
Comment on attachment 205446 [details]
Patch

Attachment 205446 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/917169

New failing tests:
http/tests/security/cross-origin-plugin-private-browsing-toggled.html
Comment 7 Build Bot 2013-06-26 01:23:02 PDT
Created attachment 205462 [details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-09  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.3
Comment 8 Yuki Sekiguchi 2013-06-26 02:27:10 PDT
Created attachment 205464 [details]
Patch
Comment 9 WebKit Commit Bot 2013-06-26 12:39:33 PDT
Comment on attachment 205464 [details]
Patch

Clearing flags on attachment: 205464

Committed r152005: <http://trac.webkit.org/changeset/152005>
Comment 10 Ahmad Saleem 2022-09-03 14:52:55 PDT
(In reply to WebKit Commit Bot from comment #9)
> Comment on attachment 205464 [details]
> Patch
> 
> Clearing flags on attachment: 205464
> 
> Committed r152005: <http://trac.webkit.org/changeset/152005>

It seems that this landed in above commit and also can verify by searching for Bug ID on Webkit Github that it was not backed out:

Webkit Commit:

https://github.com/WebKit/WebKit/commit/b9c5b5809332e467e31d5b38faa2a6b388b0e7d9

Going to mark this as "RESOLVED FIXED". Thanks!