Changeset 207692 in webkit
- Timestamp:
- Oct 21, 2016 12:10:41 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207683 r207692 1 2016-10-20 Dean Jackson <dino@apple.com> 2 3 SVG should not paint selection within a mask 4 https://bugs.webkit.org/show_bug.cgi?id=163772 5 <rdar://problem/28705129> 6 7 Reviewed by Simon Fraser. 8 9 * svg/masking/mask-should-not-paint-selection-expected.html: Added. 10 * svg/masking/mask-should-not-paint-selection.html: Added. 11 1 12 2016-10-21 Zalan Bujtas <zalan@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r207690 r207692 1 2016-10-20 Dean Jackson <dino@apple.com> 2 3 SVG should not paint selection within a mask 4 https://bugs.webkit.org/show_bug.cgi?id=163772 5 <rdar://problem/28705129> 6 7 Reviewed by Simon Fraser. 8 9 When masking content, we shouldn't paint the text 10 selection as we are rendering into the masking 11 offscreen buffer. 12 13 Test: svg/masking/mask-should-not-paint-selection.html 14 15 * rendering/PaintPhase.h: Add a new behavior - PaintBehaviorSkipSelectionHighlight. 16 * rendering/svg/SVGInlineTextBox.cpp: 17 (WebCore::SVGInlineTextBox::paint): Don't update the selectionStyle if 18 PaintBehaviorSkipSelectionHighlight is true. 19 * rendering/svg/SVGRenderingContext.cpp: 20 (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Add PaintBehaviorSkipSelectionHighlight 21 to the PaintInfo. 22 1 23 2016-10-21 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebCore/rendering/PaintPhase.h
r186956 r207692 55 55 56 56 enum PaintBehaviorFlags { 57 PaintBehaviorNormal = 0, 58 PaintBehaviorSelectionOnly = 1 << 0, 59 PaintBehaviorForceBlackText = 1 << 1, 60 PaintBehaviorForceWhiteText = 1 << 2, 61 PaintBehaviorFlattenCompositingLayers = 1 << 3, 62 PaintBehaviorRenderingSVGMask = 1 << 4, 63 PaintBehaviorSkipRootBackground = 1 << 5, 64 PaintBehaviorRootBackgroundOnly = 1 << 6, 65 PaintBehaviorSelectionAndBackgroundsOnly = 1 << 7, 57 PaintBehaviorNormal = 0, 58 PaintBehaviorSelectionOnly = 1 << 0, 59 PaintBehaviorSkipSelectionHighlight = 1 << 1, 60 PaintBehaviorForceBlackText = 1 << 2, 61 PaintBehaviorForceWhiteText = 1 << 3, 62 PaintBehaviorFlattenCompositingLayers = 1 << 4, 63 PaintBehaviorRenderingSVGMask = 1 << 5, 64 PaintBehaviorSkipRootBackground = 1 << 6, 65 PaintBehaviorRootBackgroundOnly = 1 << 7, 66 PaintBehaviorSelectionAndBackgroundsOnly = 1 << 8, 66 67 }; 67 68 -
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
r205282 r207692 248 248 249 249 bool paintSelectedTextOnly = paintInfo.phase == PaintPhaseSelection; 250 bool shouldPaintSelectionHighlight = !(paintInfo.paintBehavior & PaintBehaviorSkipSelectionHighlight); 250 251 bool hasSelection = !parentRenderer.document().printing() && selectionState() != RenderObject::SelectionNone; 251 252 if (!hasSelection && paintSelectedTextOnly) … … 263 264 264 265 const RenderStyle* selectionStyle = &style; 265 if (hasSelection ) {266 if (hasSelection && shouldPaintSelectionHighlight) { 266 267 selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION); 267 268 if (selectionStyle) { -
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp
r202927 r207692 296 296 ASSERT(image); 297 297 298 PaintInfo info(image->context(), LayoutRect::infiniteRect(), PaintPhaseForeground, PaintBehaviorNormal); 298 // Rendering into a buffer implies we're being used for masking, clipping, patterns or filters. In each of these 299 // cases we don't want to paint the selection. 300 PaintInfo info(image->context(), LayoutRect::infiniteRect(), PaintPhaseForeground, PaintBehaviorSkipSelectionHighlight); 299 301 300 302 AffineTransform& contentTransformation = currentContentTransformation(); -
trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
r192020 r207692 54 54 bool isPrinting = renderSVGText().document().printing(); 55 55 bool hasSelection = !isPrinting && selectionState() != RenderObject::SelectionNone; 56 bool shouldPaintSelectionHighlight = !(paintInfo.paintBehavior & PaintBehaviorSkipSelectionHighlight); 56 57 57 58 PaintInfo childPaintInfo(paintInfo); 58 if (hasSelection ) {59 if (hasSelection && shouldPaintSelectionHighlight) { 59 60 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { 60 61 if (is<SVGInlineTextBox>(*child))
Note: See TracChangeset
for help on using the changeset viewer.