Bug 35961

Summary: Implement render style selection for pages
Product: WebKit Reporter: Yuzo Fujishima <yuzo>
Component: CSSAssignee: Yuzo Fujishima <yuzo>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, douglas, eric, gustavo, hamaji, hayato, hyatt, jamesr, peter.linss, tkent, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://dev.w3.org/csswg/css3-page/#page-selector-and-context
Bug Depends on: 35853    
Bug Blocks: 15548, 37538    
Attachments:
Description Flags
Implement render style selection for pages to support CSS3 Paged Media.
none
Implement render style selection for pages to support CSS3 Paged Media.
none
Implement render style selection for pages to support CSS3 Paged Media.
none
Implement render style selection for pages to support CSS3 Paged Media.
none
Implement render style selection for pages to support CSS3 Paged Media.
none
trivial build and style fixes
none
Add a test for line height.
none
Add a test for user style sheet.
none
Add a test for zoom, to confirm the necessity of calling updateFont(). hamaji: review+

Yuzo Fujishima
Reported 2010-03-10 02:04:33 PST
We need a mechanism to select render style for pages to implement http://dev.w3.org/csswg/css3-page/#page-selector-and-context
Attachments
Implement render style selection for pages to support CSS3 Paged Media. (6.03 KB, patch)
2010-03-10 02:08 PST, Yuzo Fujishima
no flags
Implement render style selection for pages to support CSS3 Paged Media. (9.89 KB, patch)
2010-03-10 22:51 PST, Yuzo Fujishima
no flags
Implement render style selection for pages to support CSS3 Paged Media. (9.68 KB, patch)
2010-03-24 23:22 PDT, Yuzo Fujishima
no flags
Implement render style selection for pages to support CSS3 Paged Media. (10.02 KB, patch)
2010-05-12 00:10 PDT, Yuzo Fujishima
no flags
Implement render style selection for pages to support CSS3 Paged Media. (30.69 KB, patch)
2010-05-31 03:21 PDT, Yuzo Fujishima
no flags
trivial build and style fixes (32.17 KB, patch)
2010-06-01 00:45 PDT, Shinichiro Hamaji
no flags
Add a test for line height. (32.80 KB, patch)
2010-06-09 02:47 PDT, Yuzo Fujishima
no flags
Add a test for user style sheet. (33.87 KB, patch)
2010-06-09 03:04 PDT, Yuzo Fujishima
no flags
Add a test for zoom, to confirm the necessity of calling updateFont(). (34.57 KB, patch)
2010-06-09 23:36 PDT, Yuzo Fujishima
hamaji: review+
Yuzo Fujishima
Comment 1 2010-03-10 02:08:06 PST
Created attachment 50381 [details] Implement render style selection for pages to support CSS3 Paged Media.
Yuzo Fujishima
Comment 2 2010-03-10 02:10:00 PST
The first patch above is still work-in-progress but I'd appreciate early feedbacks.
WebKit Review Bot
Comment 3 2010-03-10 02:11:53 PST
Attachment 50381 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/css/CSSStyleSelector.cpp:1482: Place brace on its own line for function definitions. [whitespace/braces] [4] WebCore/css/CSSStyleSelector.cpp:3027: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] WebCore/css/CSSStyleSelector.h:185: More than one command on the same line [whitespace/newline] [4] Total errors found: 3 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 4 2010-03-10 02:14:05 PST
Eric Seidel (no email)
Comment 5 2010-03-10 02:17:28 PST
Yuzo Fujishima
Comment 6 2010-03-10 02:22:59 PST
Hi, Eric, Thank you for your attention. For successful compilation, this patch requires all the patches in the dependence chain, i.e., 35853, 35851, ... Yuzo
WebKit Review Bot
Comment 7 2010-03-10 03:43:02 PST
WebKit Review Bot
Comment 8 2010-03-10 03:48:50 PST
Yuzo Fujishima
Comment 9 2010-03-10 22:51:17 PST
Created attachment 50474 [details] Implement render style selection for pages to support CSS3 Paged Media.
Yuzo Fujishima
Comment 10 2010-03-24 23:22:06 PDT
Created attachment 51598 [details] Implement render style selection for pages to support CSS3 Paged Media.
James Robinson
Comment 11 2010-04-15 12:41:25 PDT
Is there any way to test this? Some bits (like left/right determination, etc) seem really fiddly and easy to regress.
Yuzo Fujishima
Comment 12 2010-05-12 00:10:28 PDT
Created attachment 55811 [details] Implement render style selection for pages to support CSS3 Paged Media.
Yuzo Fujishima
Comment 13 2010-05-12 00:12:57 PDT
Reviewers, Please hold off reviewing the patch. It is not finished yet. I uploaded it only because to keep the patch applicable to the current HEAD.
James Robinson
Comment 14 2010-05-12 00:25:03 PDT
Comment on attachment 55811 [details] Implement render style selection for pages to support CSS3 Paged Media. Clearing r? flag since it's not ready for review. Yuzo, you can upload with the --no-review flag to avoid setting r?. This will keep it out of the review queue.
Yuzo Fujishima
Comment 15 2010-05-31 03:21:43 PDT
Created attachment 57448 [details] Implement render style selection for pages to support CSS3 Paged Media.
Yuzo Fujishima
Comment 16 2010-05-31 03:25:47 PDT
Hi, Reviewers, I'd appreciate it if you could resume reviewing the patch. I've extended layoutTestController and added tests. I'll add stubs for non-Mac platforms once the core part of the patch looks good. Yuzo PS James, thank you for the comment. I'll use --no-review next time I need it.
WebKit Review Bot
Comment 17 2010-05-31 05:51:36 PDT
WebKit Review Bot
Comment 18 2010-05-31 06:56:16 PDT
Shinichiro Hamaji
Comment 19 2010-06-01 00:45:47 PDT
Created attachment 57522 [details] trivial build and style fixes
Shinichiro Hamaji
Comment 20 2010-06-01 00:58:56 PDT
Comment on attachment 57522 [details] trivial build and style fixes I did trivial fixes as Yuzo is out of office. WebCore/css/CSSStyleSelector.cpp:1561 + matchPageRules(m_userStyle, isLeft, isFirst, page); Does this mean we can use @page with user stylesheet? If so, I think we should add a layout test to check this. I think we can remove this for now and put FIXME? WebCore/css/html.css:689 + margin: 1in; I think this is a temporal value and needs FIXME. For example, chromium-linux is using Left = 0.25 in, Right = 0.25 in, Top = 0.25 in, Bottom = 0.56 in.
Yuzo Fujishima
Comment 21 2010-06-09 02:47:15 PDT
Created attachment 58227 [details] Add a test for line height.
Yuzo Fujishima
Comment 22 2010-06-09 03:04:44 PDT
Created attachment 58228 [details] Add a test for user style sheet.
Yuzo Fujishima
Comment 23 2010-06-09 03:07:21 PDT
Thank you for the review. Can you take another look? (In reply to comment #20) > (From update of attachment 57522 [details]) > I did trivial fixes as Yuzo is out of office. > > > WebCore/css/CSSStyleSelector.cpp:1561 > + matchPageRules(m_userStyle, isLeft, isFirst, page); > Does this mean we can use @page with user stylesheet? If so, I think we should add a layout test to check this. I think we can remove this for now and put FIXME? I think user stylesheet can contain @page rules. Any reasons it can't? I added a test. > > > WebCore/css/html.css:689 > + margin: 1in; > I think this is a temporal value and needs FIXME. For example, chromium-linux is using Left = 0.25 in, Right = 0.25 in, Top = 0.25 in, Bottom = 0.56 in. Added a FIXME comment.
Yuzo Fujishima
Comment 24 2010-06-09 23:36:00 PDT
Created attachment 58333 [details] Add a test for zoom, to confirm the necessity of calling updateFont().
Shinichiro Hamaji
Comment 25 2010-06-09 23:51:02 PDT
Comment on attachment 58333 [details] Add a test for zoom, to confirm the necessity of calling updateFont(). This change looks good to me. Please wait for a while before landing this. Other reviewers might have some opinions. LayoutTests/printing/page-rule-selection.html:22 + if (window.layoutTestController) { Unnecessary?
Yuzo Fujishima
Comment 26 2010-06-15 20:23:30 PDT
Note You need to log in before you can comment on or make changes to this bug.