WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152786
Factor free standing tree style resolve functions into a class
https://bugs.webkit.org/show_bug.cgi?id=152786
Summary
Factor free standing tree style resolve functions into a class
Antti Koivisto
Reported
2016-01-06 07:19:41 PST
Add a class for resolving style for a document tree. This will enable future features and optimizations.
Attachments
patch
(27.37 KB, patch)
2016-01-06 08:01 PST
,
Antti Koivisto
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-yosemite
(3.84 MB, application/zip)
2016-01-06 08:49 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-yosemite-wk2
(3.06 MB, application/zip)
2016-01-06 08:52 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews114 for mac-yosemite
(3.95 MB, application/zip)
2016-01-06 08:54 PST
,
Build Bot
no flags
Details
patch
(28.55 KB, patch)
2016-01-06 12:52 PST
,
Antti Koivisto
sam
: review+
Details
Formatted Diff
Diff
now including file renames due to popular demand
(116.15 KB, patch)
2016-01-06 13:52 PST
,
Antti Koivisto
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2016-01-06 08:01:55 PST
Created
attachment 268367
[details]
patch
Build Bot
Comment 2
2016-01-06 08:49:01 PST
Comment on
attachment 268367
[details]
patch
Attachment 268367
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/657930
New failing tests: printing/compositing-layer-printing.html printing/setPrinting.html printing/simple-lines-break.html printing/width-overflow.html printing/page-rule-in-media-query.html
Build Bot
Comment 3
2016-01-06 08:49:05 PST
Created
attachment 268368
[details]
Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 4
2016-01-06 08:52:48 PST
Comment on
attachment 268367
[details]
patch
Attachment 268367
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/657932
New failing tests: printing/page-rule-in-media-query.html fast/css/scrollbar-dynamic-style-change.html printing/simple-lines-break.html printing/width-overflow.html printing/setPrinting.html printing/compositing-layer-printing.html
Build Bot
Comment 5
2016-01-06 08:52:51 PST
Created
attachment 268369
[details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 6
2016-01-06 08:54:00 PST
Comment on
attachment 268367
[details]
patch
Attachment 268367
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/657920
New failing tests: printing/compositing-layer-printing.html printing/page-rule-in-media-query.html printing/simple-lines-break.html printing/width-overflow.html printing/setPrinting.html
Build Bot
Comment 7
2016-01-06 08:54:04 PST
Created
attachment 268370
[details]
Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Simon Fraser (smfr)
Comment 8
2016-01-06 10:34:54 PST
Comment on
attachment 268367
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268367&action=review
> Source/WebCore/style/StyleResolveTree.h:50 > +class TreeResolver {
It's odd that the filename and class name don't match. It think you should rename one of them.
> Source/WebCore/style/StyleResolveTree.h:59 > + void resolveShadowTree(Change, RenderStyle& inheritedStyle);
Unclear from the signature whether inheritedStyle is 'in' or 'out'.
> Source/WebCore/style/StyleResolveTree.h:61 > + Ref<RenderStyle> styleForElement(Element&, RenderStyle& inheritedStyle);
Ditto. Can inheritedStyle be const? Can Element& be const? Same for most of the other functions.
Antti Koivisto
Comment 9
2016-01-06 11:49:55 PST
> It's odd that the filename and class name don't match. It think you should > rename one of them.
I'm going to do renames separately.
> Ditto. Can inheritedStyle be const? Can Element& be const? Same for most of > the other functions.
They should probably be const but that will require lots of changes (without introducing const_cast). It's better done separately.
Antti Koivisto
Comment 10
2016-01-06 12:52:18 PST
Created
attachment 268392
[details]
patch
Dave Hyatt
Comment 11
2016-01-06 13:07:05 PST
Weird that the file name is StyleResolveTree, but the class name is TreeResolver. These should match. I also don't think a Style namespace adds anything here. Just calling the class StyleTreeResolver is fine IMO.
Simon Fraser (smfr)
Comment 12
2016-01-06 13:09:14 PST
(In reply to
comment #9
)
> > It's odd that the filename and class name don't match. It think you should > > rename one of them. > > I'm going to do renames separately. > > > Ditto. Can inheritedStyle be const? Can Element& be const? Same for most of > > the other functions. > > They should probably be const but that will require lots of changes (without > introducing const_cast). It's better done separately.
These seem like two good changes to make before doing this one.
Antti Koivisto
Comment 13
2016-01-06 13:18:09 PST
> These seem like two good changes to make before doing this one.
Does the order really matter? There are many many things to improve here. I'd like to make progress.
Sam Weinig
Comment 14
2016-01-06 13:50:54 PST
Comment on
attachment 268392
[details]
patch I think either order is fine.
Antti Koivisto
Comment 15
2016-01-06 13:52:53 PST
Created
attachment 268401
[details]
now including file renames due to popular demand
WebKit Commit Bot
Comment 16
2016-01-06 13:55:41 PST
Attachment 268401
[details]
did not pass style-queue: ERROR: Source/WebCore/style/StyleTreeResolver.cpp:56: "CSSFontSelector.h" already included at Source/WebCore/style/StyleTreeResolver.cpp:32 [build/include] [4] ERROR: Source/WebCore/style/StyleTreeResolver.cpp:221: Multi line control clauses should use braces. [whitespace/braces] [4] ERROR: Source/WebCore/style/StyleTreeResolver.cpp:858: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/style/StyleTreeResolver.cpp:860: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/style/StyleTreeResolver.cpp:864: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/style/StyleTreeResolver.cpp:878: Missing space before { [whitespace/braces] [5] ERROR: Source/WebCore/style/StyleTreeResolver.h:26: #ifndef header guard has wrong style, please use: StyleTreeResolver_h [build/header_guard] [5] ERROR: Source/WebCore/style/StyleTreeResolver.h:92: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 8 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 17
2016-01-07 00:21:44 PST
https://trac.webkit.org/r194691
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug