Bug 50684 - Default styling rules for the figure and figcaption elements
Summary: Default styling rules for the figure and figcaption elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.whatwg.org/specs/web-apps/...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 06:34 PST by Peter Beverloo
Modified: 2010-12-09 08:41 PST (History)
3 users (show)

See Also:


Attachments
Patch (8.92 KB, patch)
2010-12-08 06:35 PST, Peter Beverloo
mjs: review-
mjs: commit-queue-
Details | Formatted Diff | Diff
Revised patch (10.16 KB, patch)
2010-12-09 03:04 PST, Peter Beverloo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Beverloo 2010-12-08 06:34:51 PST
This patch adds default styling rules for the <figure> and <figcaption> elements to html.css.

The elements themselfes were added by Adam Barth during work on the tree-builder.
Comment 1 Peter Beverloo 2010-12-08 06:35:38 PST
Created attachment 75896 [details]
Patch
Comment 2 Adam Barth 2010-12-09 01:09:06 PST
Comment on attachment 75896 [details]
Patch

Looks reasonable to me.
Comment 3 Maciej Stachowiak 2010-12-09 01:47:46 PST
Comment on attachment 75896 [details]
Patch

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

Also it looks like the test cases don't test the styles.

> WebCore/css/html.css:90
>      margin: 1__qem 40px 1em 40px

I don't think this rule is right for figure. The 1__qem invokes a quirk in quirks mode that is needed for historical reasons for blockquote, but there is no need to have the same quirk for figure.
Comment 4 Peter Beverloo 2010-12-09 03:04:53 PST
Created attachment 76035 [details]
Revised patch

Thank you for the review. I have addressed your points, figure now has its own definition in html.css and I've added testing of the default styles.

I'd appreciate it if you could check whether my approach with the "emSize" variable in the tests is correct.
Comment 5 Maciej Stachowiak 2010-12-09 08:15:36 PST
Comment on attachment 76035 [details]
Revised patch

r=me
Comment 6 WebKit Commit Bot 2010-12-09 08:41:07 PST
Comment on attachment 76035 [details]
Revised patch

Clearing flags on attachment: 76035

Committed r73613: <http://trac.webkit.org/changeset/73613>
Comment 7 WebKit Commit Bot 2010-12-09 08:41:13 PST
All reviewed patches have been landed.  Closing bug.