OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |