Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 669123002: Fixed Shadow blur for transparent objects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/SVGInlineTextBoxPainter.h" 6 #include "core/paint/SVGInlineTextBoxPainter.h"
7 7
8 #include "core/dom/DocumentMarkerController.h" 8 #include "core/dom/DocumentMarkerController.h"
9 #include "core/dom/RenderedDocumentMarker.h" 9 #include "core/dom/RenderedDocumentMarker.h"
10 #include "core/editing/Editor.h" 10 #include "core/editing/Editor.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 additionalPaintServerTransform = &paintServerTransform; 318 additionalPaintServerTransform = &paintServerTransform;
319 } 319 }
320 320
321 // FIXME: Non-scaling stroke is not applied here. 321 // FIXME: Non-scaling stroke is not applied here.
322 322
323 if (!SVGRenderSupport::updateGraphicsContext(stateSaver, style, m_svgInlineT extBox.parent()->renderer(), resourceMode, additionalPaintServerTransform)) 323 if (!SVGRenderSupport::updateGraphicsContext(stateSaver, style, m_svgInlineT extBox.parent()->renderer(), resourceMode, additionalPaintServerTransform))
324 return; 324 return;
325 325
326 if (hasShadow) { 326 if (hasShadow) {
327 stateSaver.saveIfNeeded(); 327 stateSaver.saveIfNeeded();
328 context->clearShadow();
Stephen White 2014/10/23 19:08:48 I wouldn't bother with this call. If someone has l
sugoi1 2014/10/23 20:25:14 Done.
328 context->setDrawLooper(shadowList->createDrawLooper(DrawLooperBuilder::S hadowRespectsAlpha)); 329 context->setDrawLooper(shadowList->createDrawLooper(DrawLooperBuilder::S hadowRespectsAlpha));
329 } 330 }
330 331
331 context->setTextDrawingMode(resourceMode == ApplyToFillMode ? TextModeFill : TextModeStroke); 332 context->setTextDrawingMode(resourceMode == ApplyToFillMode ? TextModeFill : TextModeStroke);
332 333
333 if (scalingFactor != 1 && resourceMode == ApplyToStrokeMode) 334 if (scalingFactor != 1 && resourceMode == ApplyToStrokeMode)
334 context->setStrokeThickness(context->strokeThickness() * scalingFactor); 335 context->setStrokeThickness(context->strokeThickness() * scalingFactor);
335 336
336 TextRunPaintInfo textRunPaintInfo(textRun); 337 TextRunPaintInfo textRunPaintInfo(textRun);
337 textRunPaintInfo.from = startPosition; 338 textRunPaintInfo.from = startPosition;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 439
439 fragmentRect = fragmentTransform.mapRect(fragmentRect); 440 fragmentRect = fragmentTransform.mapRect(fragmentRect);
440 markerRect.unite(fragmentRect); 441 markerRect.unite(fragmentRect);
441 } 442 }
442 } 443 }
443 444
444 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer.localToAbsolu teQuad(markerRect).enclosingBoundingBox()); 445 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer.localToAbsolu teQuad(markerRect).enclosingBoundingBox());
445 } 446 }
446 447
447 } // namespace blink 448 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698