RESOLVED FIXED 163772
SVG should not paint selection within a mask
https://bugs.webkit.org/show_bug.cgi?id=163772
Summary SVG should not paint selection within a mask
Dean Jackson
Reported 2016-10-20 19:04:19 PDT
SVG should not paint selection within a mask
Attachments
Patch (6.63 KB, patch)
2016-10-20 19:07 PDT, Dean Jackson
no flags
Patch (8.28 KB, patch)
2016-10-21 12:00 PDT, Dean Jackson
simon.fraser: review+
Dean Jackson
Comment 1 2016-10-20 19:07:53 PDT
Simon Fraser (smfr)
Comment 2 2016-10-20 19:13:20 PDT
Comment on attachment 292308 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=292308&action=review > Source/WebCore/rendering/PaintPhase.h:66 > + PaintBehaviorDoNotPaintSelection = 1 << 8, I would call this PaintBehaviorSkipSelection and put it after PaintBehaviorSelectionOnly, adjusting the bit shifts accordingly. I think PaintBehaviorSelectionOnly could use a rename too, since it doesn't mean "paint the selection", it means "paint the selected content". Either that or rename yours to "PaintBehaviorSkipSelectionHighlight". > Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:266 > - if (hasSelection) { > + if (hasSelection && shouldPaintSelection) { If you introduce this flag, you need to make to work for all painting, not just SVG text painting.
Dean Jackson
Comment 3 2016-10-21 12:00:04 PDT
Simon Fraser (smfr)
Comment 4 2016-10-21 12:01:39 PDT
Comment on attachment 292379 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=292379&action=review > Source/WebCore/rendering/PaintPhase.h:66 > + PaintBehaviorSkipSelectionHighlight = 1 << 1, > + PaintBehaviorForceBlackText = 1 << 2, > + PaintBehaviorForceWhiteText = 1 << 3, > + PaintBehaviorFlattenCompositingLayers = 1 << 4, > + PaintBehaviorRenderingSVGMask = 1 << 5, > + PaintBehaviorSkipRootBackground = 1 << 6, > + PaintBehaviorRootBackgroundOnly = 1 << 7, > + PaintBehaviorSelectionAndBackgroundsOnly = 1 << 8, I've taken to lining up the = 1 << ... to make it easier to edit them, and to spot errors.
Dean Jackson
Comment 5 2016-10-21 12:14:20 PDT
Note You need to log in before you can comment on or make changes to this bug.