Closed
Bug 1420026
Opened 8 years ago
Closed 8 years ago
replace one more use of nsCSSParser::ParseColor with ServoCSSParser::ComputeColor
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla60
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(5 files, 5 obsolete files)
59 bytes,
text/x-review-board-request
|
TYLin
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
TYLin
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
TYLin
:
review+
|
Details |
41 bytes,
text/x-github-pull-request
|
Details | Review | |
2.39 KB,
patch
|
xidorn
:
review+
|
Details | Diff | Splinter Review |
I missed one in bug 1408312.
Comment hidden (obsolete) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8931205 [details]
geckolib: Return from Servo_ComputeColor whether the value was currentcolor.
https://reviewboard.mozilla.org/r/202302/#review207662
C/C++ static analysis found 1 defect in this patch.
You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
::: dom/canvas/CanvasRenderingContext2D.cpp:1198
(Diff revision 1)
> - Unused << nsRuleNode::ComputeColor(
> + Unused << nsRuleNode::ComputeColor(
> - value, presShell ? presShell->GetPresContext() : nullptr, parentContext,
> + value, presShell ? presShell->GetPresContext() : nullptr, parentContext,
> - *aColor);
> + *aColor);
> - }
> + }
> - return true;
> + return true;
> + } else {
Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return]
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8931205 [details]
geckolib: Return from Servo_ComputeColor whether the value was currentcolor.
https://reviewboard.mozilla.org/r/202302/#review207664
C/C++ static analysis found 1 defect in this patch.
You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
::: dom/canvas/CanvasRenderingContext2D.cpp:1183
(Diff revision 2)
> + currentColor = canvasFrame->StyleColor()->mColor;
> + }
> + }
> +
> + return ServoCSSParser::ComputeColor(set, currentColor, aString, aColor);
> + } else {
Warning: Do not use 'else' after 'return' [clang-tidy: readability-else-after-return]
Assignee | ||
Updated•8 years ago
|
Attachment #8931205 -
Flags: review?(tlin)
Assignee | ||
Comment 7•8 years ago
|
||
Some test failures, cancelling review for now.
Assignee | ||
Comment 8•8 years ago
|
||
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8931205 -
Flags: review?(tlin)
Comment 12•8 years ago
|
||
mozreview-review |
Comment on attachment 8931205 [details]
geckolib: Return from Servo_ComputeColor whether the value was currentcolor.
https://reviewboard.mozilla.org/r/202302/#review208078
::: servo/ports/geckolib/glue.rs:4599
(Diff revision 3)
> Some(computed_color) => {
> let rgba = computed_color.to_rgba(current_color);
> *result_color = gecko::values::convert_rgba_to_nscolor(&rgba);
> + if !was_current_color.is_null() {
> + unsafe {
> + *was_current_color = !computed_color.is_numeric();
Should this be computed_color.is_currentcolor()?
Attachment #8931205 -
Flags: review?(tlin) → review+
Comment 13•8 years ago
|
||
mozreview-review |
Comment on attachment 8931582 [details]
geckolib: Return from Servo_ComputeColor whether the value was currentcolor.
https://reviewboard.mozilla.org/r/202712/#review208080
Attachment #8931582 -
Flags: review?(tlin) → review+
Comment 14•8 years ago
|
||
mozreview-review |
Comment on attachment 8931583 [details]
Bug 1420026 - Part 2: Replace one more use of nsCSSParser::ParseColor with ServoCSSParser::ComputeColor.
https://reviewboard.mozilla.org/r/202714/#review208082
Attachment #8931583 -
Flags: review?(tlin) → review+
Assignee | ||
Comment 15•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8931205 [details]
geckolib: Return from Servo_ComputeColor whether the value was currentcolor.
https://reviewboard.mozilla.org/r/202302/#review208078
> Should this be computed_color.is_currentcolor()?
Yeah, I should probably change it to is_currentcolor(). Both will work, since here we never have a complex color with a non-zero-or-one foreground ratio (which should only ever result from animations, and can't be specified in the color string). But is_currentcolor() looks more sensible...
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8931205 -
Attachment is obsolete: true
Comment 18•8 years ago
|
||
Pushed by philringnalda@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/75636e9e1d13
Part 1: Add aWasCurrentColor outparam to ServoCSSParser::ComputeColor. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/7ef37ebdf7b2
Part 2: Replace one more use of nsCSSParser::ParseColor with ServoCSSParser::ComputeColor. r=TYLin
Comment 19•8 years ago
|
||
Backout by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/47453904f1f8
Backed out 2 changesets for failing devtools webconsole/test/browser_webconsole_bug_595934_message_categories.js on Windows 7 debug without e10s. r=backout on a CLOSED TREE
Comment 20•8 years ago
|
||
Backed out for failing devtools webconsole/test/browser_webconsole_bug_595934_message_categories.js on Windows 7 debug without e10s
back out: https://hg.mozilla.org/integration/autoland/rev/8de465953e20c1332f94c1b0bc268be423790048
https://hg.mozilla.org/integration/autoland/rev/47453904f1f837febc8e12e02f110b9ea25bbaa0
pushes backed out: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=077ce85c466b9b05e425f97952f877d0965e36c9
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=7ef37ebdf7b26a77493bb83eb61ccd6d6e931c1d
Failure log - https://treeherder.mozilla.org/logviewer.html#?job_id=147670041&repo=autoland&lineNumber=8664
Flags: needinfo?(cam)
Updated•8 years ago
|
Priority: -- → P3
Assignee | ||
Comment 21•8 years ago
|
||
Flags: needinfo?(cam)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8934051 -
Flags: review?(tlin)
Attachment #8934052 -
Flags: review?(tlin)
Attachment #8934053 -
Flags: review?(tlin)
Assignee | ||
Comment 29•8 years ago
|
||
Part 1 didn't change, though mozreview decided to ask you for review again...
Comment 30•8 years ago
|
||
mozreview-review |
Comment on attachment 8934051 [details]
geckolib: Allow an ErrorReporter to be created with null URL data.
https://reviewboard.mozilla.org/r/204990/#review210452
Attachment #8934051 -
Flags: review?(tlin) → review+
Comment 31•8 years ago
|
||
mozreview-review |
Comment on attachment 8934052 [details]
style: Add a new CSS error type for lone value parsing errors.
https://reviewboard.mozilla.org/r/204992/#review210454
Attachment #8934052 -
Flags: review?(tlin) → review+
Comment 32•8 years ago
|
||
mozreview-review |
Comment on attachment 8934053 [details]
geckolib: Allow Servo_ComputeColor to report errors to the console.
https://reviewboard.mozilla.org/r/204994/#review210456
Attachment #8934053 -
Flags: review?(tlin) → review+
Comment 33•8 years ago
|
||
mozreview-review |
Comment on attachment 8934054 [details]
Bug 1420026 - Part 1: Add aWasCurrentColor outparam to ServoCSSParser::ComputeColor.
https://reviewboard.mozilla.org/r/204996/#review210460
Attachment #8934054 -
Flags: review?(tlin) → review+
Comment 34•8 years ago
|
||
mozreview-review |
Comment on attachment 8934055 [details]
Bug 1420026 - Part 3: Report canvas color parsing errors to the console.
https://reviewboard.mozilla.org/r/204998/#review210466
Attachment #8934055 -
Flags: review?(tlin) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8931582 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8934051 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8934052 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8934053 -
Attachment is obsolete: true
Assignee | ||
Comment 38•8 years ago
|
||
Comment 39•8 years ago
|
||
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14359477d5da
Part 1: Add aWasCurrentColor outparam to ServoCSSParser::ComputeColor. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/c9c3ce217c3d
Part 2: Replace one more use of nsCSSParser::ParseColor with ServoCSSParser::ComputeColor. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/e68d4aa659c6
Part 3: Report canvas color parsing errors to the console. r=TYLin
Comment 40•8 years ago
|
||
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/10d466f59108
Disable this code path for now for permafailure. r=me
Comment 41•8 years ago
|
||
This was permafailing a devtools test (devtools/client/webconsole/test/browser_webconsole_bug_595934_message_categories.js):
https://treeherder.mozilla.org/logviewer.html#?job_id=149942062&repo=autoland&lineNumber=16203
So I landed the change above to avoid backing out.
Flags: needinfo?(cam)
Keywords: leave-open
Comment 42•8 years ago
|
||
bugherder |
Assignee | ||
Comment 43•8 years ago
|
||
Hmm, perhaps I messed something up when rebasing, since that's the exact test failure that I initially hit and fixed before relanding. Thanks for landing the patch to avoid this getting backed out.
Assignee | ||
Comment 44•8 years ago
|
||
Oh, this test is disabled on e10s (bug 1243979), which is why it didn't show up in my try run. :-/
Comment 45•8 years ago
|
||
For half a day, push from comment 39 caused this regression:
== Change summary for alert #10882 (as of Tue, 05 Dec 2017 05:03:25 GMT) ==
Regressions:
6% tcanvasmark linux64 opt e10s 10,658.62 -> 9,977.88
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=10882
Comment 46•8 years ago
|
||
:emilio's fix from comment 41 fixed it:
== Change summary for alert #10887 (as of Tue, 05 Dec 2017 17:11:06 GMT) ==
Improvements:
8% tcanvasmark linux64 opt e10s 9,877.00 -> 10,625.46
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=10887
Comment 47•8 years ago
|
||
Looks like we need to finish up this before landing bug 1430014.
Comment 48•8 years ago
|
||
The talos regression is also concerning... Sounds like Servo's color parsing is slower?
Comment 49•8 years ago
|
||
It looks like tcanvasmark has been removed in bug 1426682, so maybe we don't need to care about it... Although I'm a bit concerned about regressing performance there...
Comment 50•8 years ago
|
||
Weird that I cannot reproduce the failure on browser_webconsole_message_categories.js locally like what I saw in my try push for bug 1430014...
Comment 51•8 years ago
|
||
A try push with just enabling the new code path also shows the test failure: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fbfafbaa9fc1e12841586d98c1e3b351406ffaa6
But I still have no luck to reproduce it locally :/
Comment 52•8 years ago
|
||
I couldn't repro either (didn't try too hard), but I suspect it times out because it's missing a couple null-checks (the original code for `document`, the code you write for `mCanvasElement` in the color case).
Also there's no need to hold a strong reference to a shell given we don't use it after the only potential flush, I hope that helps with the perf regression.
Comment 53•8 years ago
|
||
Let's see what try thinks: https://treeherder.mozilla.org/#/jobs?repo=try&revision=250cc26a81559d5f15b662af0f149d4aec4f9893
Comment 54•8 years ago
|
||
Ok, so no such luck, but I managed to reproduce the error. Basically you need to load:
devtools/client/webconsole/new-console-output/test/mochitest/test-message-categories-canvas-css.html
Locally.
In the patched build or with stylo disabled, you don't see the error message in the console (beware that CSS errors don't get reported by default, so you need to "filter output" to see them)
I don't know if I'll have time to investigate this evening, but hope it helps.
Comment 55•8 years ago
|
||
Ok, found it: https://github.com/servo/servo/pull/19915
Flags: needinfo?(cam)
Comment 56•8 years ago
|
||
Attachment #8947154 -
Flags: review?(xidorn+moz)
Updated•8 years ago
|
Attachment #8947154 -
Flags: review?(xidorn+moz) → review+
Comment 57•8 years ago
|
||
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be78627933ff
followup: Enable Servo CSS color parsing in canvas. r=xidorn
Updated•8 years ago
|
Keywords: leave-open
Comment 58•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•