Closed Bug 1305253 Opened 9 years ago Closed 9 years ago

In nsSVGIntegrationUtils::PaintMaskAndClipPath, manually pop up clip-path

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: u459114, Assigned: u459114)

Details

Attachments

(2 files)

For now, we save the context before push clip-path, and restore that context after blending. Compare with gfxContext::Save/Restore, using gfxContext::PopClip to remove the pushed clip-paths is more efficient.
Attachment #8805567 - Flags: review?(mstange)
Attachment #8805509 - Flags: review?(mstange)
Comment on attachment 8805567 [details] Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when clip-path type is basic-shape or geometry-box. https://reviewboard.mozilla.org/r/89332/#review88974 ::: layout/svg/nsSVGIntegrationUtils.cpp:750 (Diff revision 3) > + case StyleShapeSourceType::Shape: > + case StyleShapeSourceType::Box: > + shouldApplyBasicShape = true; > + break; > + case StyleShapeSourceType::None: double space after case
Comment on attachment 8805567 [details] Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when clip-path type is basic-shape or geometry-box. https://reviewboard.mozilla.org/r/89332/#review88982
Attachment #8805567 - Flags: review?(mstange) → review+
Comment on attachment 8805509 [details] Bug 1305253 - Part 2. Replace gfxContext::Save/Restore by gfxContext::PopClip. https://reviewboard.mozilla.org/r/89260/#review88984
Attachment #8805509 - Flags: review?(mstange) → review+
(In reply to C.J. Ku[:cjku](UTC+8) from comment #2) > Created attachment 8805567 [details] > Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when > clip-path type is basic-shape or geometry-box. > > shouldApplyBasicShape will be set as true when the url of a clip-path is not > valid, for example: > clip-path: url("#non-exist-id"); > > So, we calls ApplyBasicShapeClip and early returns in that function even if > the clip-path's type is StyleShapeSourceType::URL. Did this cause wrong rendering?
(In reply to Markus Stange [:mstange] from comment #11) > (In reply to C.J. Ku[:cjku](UTC+8) from comment #2) > > Created attachment 8805567 [details] > > Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when > > clip-path type is basic-shape or geometry-box. > > > > shouldApplyBasicShape will be set as true when the url of a clip-path is not > > valid, for example: > > clip-path: url("#non-exist-id"); > > > > So, we calls ApplyBasicShapeClip and early returns in that function even if > > the clip-path's type is StyleShapeSourceType::URL. > > Did this cause wrong rendering? Actually not. Originally, we do need this early return, since we call the function(ApplyBasicShapeClip) with wrong clip-path type(StyleShapeSourceType::URL).
https://hg.mozilla.org/integration/mozilla-inbound/rev/be245d1bb68a300ed82e42e2042b72f7aa11f014 Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when clip-path type is basic-shape or geometry-box. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/adc65475e590daeab1e208077be561fc7a431e13 Bug 1305253 - Part 2. Replace gfxContext::Save/Restore by gfxContext::PopClip. r=mstange
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
No longer depends on: 1529590
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: