Closed
Bug 1277154
Opened 7 years ago
Closed 7 years ago
stop using bitfields in nsStyleSVG
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(1 file, 2 obsolete files)
20.93 KB,
patch
|
Details | Diff | Splinter Review |
The bitfields in nsStyleSVG are confusing the rust bindgen tool used for stylo. Let's change it to a uint and some bit operations.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8758545 -
Flags: review?(bugzilla)
Assignee | ||
Comment 2•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=75b241fea968
Comment 3•7 years ago
|
||
Comment on attachment 8758545 [details] [diff] [review] patch Review of attachment 8758545 [details] [diff] [review]: ----------------------------------------------------------------- I'm not a fan of replacing bitfields with bit operations... But if it makes things easier for stylo to handle, that's probably fine. ::: layout/style/nsStyleStruct.h @@ +3283,5 @@ > + STROKE_WIDTH_CONTEXT = 0x40, // stroke-width: context-value > + FILL_OPACITY_SOURCE_SHIFT = 0, > + STROKE_OPACITY_SOURCE_SHIFT = 2, > + }; > + uint8_t mContextFlags; // [inherited] Could we make this field as well as the enum above private?
Attachment #8758545 -
Flags: review?(bugzilla) → review+
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Xidorn Quan [:xidorn] (UTC+10) from comment #3) > I'm not a fan of replacing bitfields with bit operations... But if it makes > things easier for stylo to handle, that's probably fine. Yeah, unfortunately bitfield layout and alignment is not portable. :( > ::: layout/style/nsStyleStruct.h > > + uint8_t mContextFlags; // [inherited] > > Could we make this field as well as the enum above private? Yes, good idea.
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8758545 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 6•7 years ago
|
||
has problems to apply : renamed 1277154 -> a.patch applying a.patch patching file layout/style/nsStyleStruct.cpp Hunk #2 FAILED at 868 1 out of 3 hunks FAILED -- saving rejects to file layout/style/nsStyleStruct.cpp.rej patch failed, unable to continue (try -v) patch failed, rejects left in working directory errors during apply, please fix and qrefresh a.patch
Flags: needinfo?(cam)
Keywords: checkin-needed
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bb39628ebe69 Remove bitfields from nsStyleSVG to help with rust bindgen. r=xidorn
Comment 8•7 years ago
|
||
Looks like you'll need to have a talk with svg-glyph-objectvalue.svg before you can do that, e.g. https://treeherder.mozilla.org/logviewer.html#?job_id=29374382&repo=mozilla-inbound Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/f565e74077ba
Comment 9•7 years ago
|
||
Comment on attachment 8758597 [details] [diff] [review] patch r=xidorn Review of attachment 8758597 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/style/nsRuleNode.cpp @@ +9388,5 @@ > > case eCSSUnit_Inherit: > case eCSSUnit_Unset: > conditions.SetUncacheable(); > + svg->SetStrokeDashoffsetFromObject(parentSVG->StrokeDashoffsetFromObject()); Looks like this is where the issue is... It should be Dasharray rather than Dashoffset. Sorry that I didn't catch this... @@ +9396,5 @@ > case eCSSUnit_Enumerated: > MOZ_ASSERT(strokeDasharrayValue->GetIntValue() == > NS_STYLE_STROKE_PROP_CONTEXT_VALUE, > "Unknown keyword for stroke-dasharray"); > + svg->SetStrokeDashoffsetFromObject(true); Same here. @@ +9402,5 @@ > break; > > case eCSSUnit_Initial: > case eCSSUnit_None: > + svg->SetStrokeDashoffsetFromObject(false); Same here. @@ +9408,5 @@ > break; > > case eCSSUnit_List: > case eCSSUnit_ListDep: { > + svg->SetStrokeDashoffsetFromObject(false); Same here.
Comment 10•7 years ago
|
||
I'd suggest using MozReview next time. I believe this kind of mistakes are easier to catch with MozReview, since it has inline change highlight on top of line changes.
Assignee | ||
Comment 11•7 years ago
|
||
Thanks, yes MozReview's inter-line change highlighting is good.
Flags: needinfo?(cam)
Assignee | ||
Comment 12•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=38b4c55ff429
Assignee | ||
Comment 13•7 years ago
|
||
Attachment #8758597 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 14•7 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/14c8ec387dd2 Remove bitfields from nsStyleSVG to help with rust bindgen. r=xidorn
Keywords: checkin-needed
I think this patch is what caused a bunch of reftest bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=29447290&repo=mozilla-inbound I see it being green in the try run, but maybe there's something newer that caused this to make the conflict? Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/3c5f1c93108c
Flags: needinfo?(cam)
Comment 16•7 years ago
|
||
That was just because heycam forgot to fold the fix into the patch, and uploaded the problematic patch again :)
Comment 17•7 years ago
|
||
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d10039dcf721 Remove bitfields from nsStyleSVG to help with rust bindgen. r=xidorn
Assignee | ||
Comment 18•7 years ago
|
||
Third time lucky. :( https://treeherder.mozilla.org/#/jobs?repo=try&revision=f66eb360e055
Flags: needinfo?(cam)
Comment 19•7 years ago
|
||
Pushed by philringnalda@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9adc60621a4a followup, actually fix the bustage
Assignee | ||
Comment 20•7 years ago
|
||
Thank you philor.
Comment 21•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d10039dcf721 https://hg.mozilla.org/mozilla-central/rev/9adc60621a4a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•