Bug 12691 - Generated content and display: table-cell duplicates content on font size change
Summary: Generated content and display: table-cell duplicates content on font size change
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL: http://enfinitystudios.thaposse.net/p...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-02-08 00:24 PST by Elliott Sprehn
Modified: 2007-04-30 22:11 PDT (History)
2 users (show)

See Also:


Attachments
Test Case (379 bytes, text/html)
2007-02-08 11:14 PST, Elliott Sprehn
no flags Details
Patch to fix the problem. (28.21 KB, patch)
2007-04-30 20:40 PDT, Dave Hyatt
hyatt: review-
Details | Formatted Diff | Diff
Better version of patch. (28.50 KB, patch)
2007-04-30 20:57 PDT, Dave Hyatt
oliver: review+
Details | Formatted Diff | Diff
Fix issues with table display types (32.42 KB, patch)
2007-04-30 21:52 PDT, Dave Hyatt
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Sprehn 2007-02-08 00:24:30 PST
An element that has display: table-cell and generated content (with :before or :after) will regenerate this content after a font size change.

Using Apple++ or Apple+- to increase and decrease the font size on the linked page the content specified in the css will be generated again with each increase or decrease in the font size.

This occurs when font is changed by Javascript or the User.

Reproducible with both Konqueror and Safari, official 2.0.4 (419.3) and latest nightly (Thu Feb 8 6:10:29 GMT 2007) builds.
Comment 1 Elliott Sprehn 2007-02-08 11:14:47 PST
Created attachment 13061 [details]
Test Case
Comment 2 Dave Hyatt 2007-04-30 20:40:21 PDT
Created attachment 14282 [details]
Patch to fix the problem.

This patch fixes the problem by making sure we drill into anonymous containers to find generated content that may have been wrapped.
Comment 3 Dave Hyatt 2007-04-30 20:42:01 PDT
Comment on attachment 14282 [details]
Patch to fix the problem.

There's a minor problem.  Need to fix.
Comment 4 Dave Hyatt 2007-04-30 20:57:48 PDT
Created attachment 14283 [details]
Better version of patch.

Fixed a mistake made later in the function where the innermost container was incorrectly used when doing the insertion of the content.  Go layout tests.
Comment 5 Dave Hyatt 2007-04-30 21:52:04 PDT
Created attachment 14284 [details]
Fix issues with table display types

Even though layout tests passed (and the reduction passed), my own further testing before landing caught some additional issues with table display types and generated content.  We weren't making the right kind of anonymous container for generated content even though we kept the table display type.
Comment 6 Darin Adler 2007-04-30 22:01:10 PDT
Comment on attachment 14284 [details]
Fix issues with table display types

+    bool oldContentPresent = child;

For MSVC that needs to be !!child instead of just child used as a boolean.

r=me
Comment 7 Dave Hyatt 2007-04-30 22:11:15 PDT
Fixed.