Closed Bug 1310117 Opened 8 years ago Closed 8 years ago

Stylo: implement filter

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: shinglyu, Assigned: shinglyu)

References

Details

Attachments

(3 files)

Implement CSS Filters except url (blocked) and drop-shadow (difficult)
Attachment #8801000 - Flags: review?(manishearth)
Assignee: nobody → slyu
Status: NEW → ASSIGNED
Attached image cat photo (firefox)
Filters in action.
Comment on attachment 8801000 [details]
Bug 1310117 - Implement Stylo CSS filter except url and drop-shadow.

https://reviewboard.mozilla.org/r/85800/#review84442

Overall lgtm. Do you intend to add shadow support in this bug?

::: layout/style/ServoBindings.cpp:853
(Diff revision 1)
> +void
> +Gecko_ResetFilters(nsStyleEffects* effects, size_t new_len)
> +{
> +  effects->mFilters.Clear();
> +  effects->mFilters.SetCapacity(new_len);
> +  effects->mFilters.SetLengthAndRetainStorage(new_len);

I *think* `SetLength()` just does the right thing here? No need to `SetCapacity` and then `SetLength`

::: servo/components/style/properties/gecko.mako.rs:1464
(Diff revision 1)
> +
> +        fn fill_filter(m_type: u32, value: CoordDataValue, gecko_filter: &mut nsStyleFilter){
> +            gecko_filter.mType = m_type;
> +            let mut coord = nsStyleCoord::null();
> +            coord.set_value(value);
> +            gecko_filter.mFilterParameter.copy_from(&coord);

Why not `gecko_filter.mFilterParameter.set_value(value)`?
Attachment #8801000 - Flags: review?(manishearth) → review+
Attached image cat photo (stylo)
Attachment #8801002 - Attachment description: cat photo → cat photo (firefox)
Keywords: checkin-needed
Pushed by manishearth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/60f9486949af
Implement Stylo CSS filter except url and drop-shadow. r=manishearth
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/60f9486949af
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: