| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "core/rendering/svg/SVGInlineTextBox.h" | 23 #include "core/rendering/svg/SVGInlineTextBox.h" |
| 24 | 24 |
| 25 #include "core/dom/DocumentMarkerController.h" | 25 #include "core/dom/DocumentMarkerController.h" |
| 26 #include "core/dom/RenderedDocumentMarker.h" | 26 #include "core/dom/RenderedDocumentMarker.h" |
| 27 #include "core/editing/Editor.h" | 27 #include "core/editing/Editor.h" |
| 28 #include "core/frame/FrameView.h" | 28 #include "core/frame/FrameView.h" |
| 29 #include "core/frame/LocalFrame.h" | 29 #include "core/frame/LocalFrame.h" |
| 30 #include "core/rendering/HitTestResult.h" | 30 #include "core/rendering/HitTestResult.h" |
| 31 #include "core/rendering/InlineFlowBox.h" | 31 #include "core/rendering/InlineFlowBox.h" |
| 32 #include "core/rendering/PointerEventsHitRules.h" | 32 #include "core/rendering/PointerEventsHitRules.h" |
| 33 #include "core/rendering/RenderInline.h" |
| 33 #include "core/rendering/RenderTheme.h" | 34 #include "core/rendering/RenderTheme.h" |
| 34 #include "core/rendering/style/ShadowList.h" | 35 #include "core/rendering/style/ShadowList.h" |
| 35 #include "core/rendering/svg/RenderSVGInlineText.h" | 36 #include "core/rendering/svg/RenderSVGInlineText.h" |
| 36 #include "core/rendering/svg/RenderSVGResource.h" | 37 #include "core/rendering/svg/RenderSVGResource.h" |
| 37 #include "core/rendering/svg/RenderSVGResourceSolidColor.h" | 38 #include "core/rendering/svg/RenderSVGResourceSolidColor.h" |
| 38 #include "core/rendering/svg/SVGResourcesCache.h" | 39 #include "core/rendering/svg/SVGResourcesCache.h" |
| 39 #include "core/rendering/svg/SVGTextRunRenderingContext.h" | 40 #include "core/rendering/svg/SVGTextRunRenderingContext.h" |
| 40 #include "platform/FloatConversion.h" | 41 #include "platform/FloatConversion.h" |
| 41 #include "platform/fonts/FontCache.h" | 42 #include "platform/fonts/FontCache.h" |
| 42 #include "platform/graphics/DrawLooperBuilder.h" | 43 #include "platform/graphics/DrawLooperBuilder.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 if (hasSelection) { | 280 if (hasSelection) { |
| 280 selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION); | 281 selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION); |
| 281 if (selectionStyle) { | 282 if (selectionStyle) { |
| 282 const SVGRenderStyle* svgSelectionStyle = selectionStyle->svgStyle()
; | 283 const SVGRenderStyle* svgSelectionStyle = selectionStyle->svgStyle()
; |
| 283 ASSERT(svgSelectionStyle); | 284 ASSERT(svgSelectionStyle); |
| 284 | 285 |
| 285 if (!hasFill) | 286 if (!hasFill) |
| 286 hasFill = svgSelectionStyle->hasFill(); | 287 hasFill = svgSelectionStyle->hasFill(); |
| 287 if (!hasVisibleStroke) | 288 if (!hasVisibleStroke) |
| 288 hasVisibleStroke = svgSelectionStyle->hasVisibleStroke(); | 289 hasVisibleStroke = svgSelectionStyle->hasVisibleStroke(); |
| 289 } else | 290 } else { |
| 290 selectionStyle = style; | 291 selectionStyle = style; |
| 292 } |
| 291 } | 293 } |
| 292 | 294 |
| 293 if (textRenderer.frame() && textRenderer.frame()->view() && textRenderer.fra
me()->view()->paintBehavior() & PaintBehaviorRenderingSVGMask) { | 295 if (textRenderer.frame() && textRenderer.frame()->view() && textRenderer.fra
me()->view()->paintBehavior() & PaintBehaviorRenderingSVGMask) { |
| 294 hasFill = true; | 296 hasFill = true; |
| 295 hasVisibleStroke = false; | 297 hasVisibleStroke = false; |
| 296 } | 298 } |
| 297 | 299 |
| 298 AffineTransform fragmentTransform; | 300 AffineTransform fragmentTransform; |
| 299 unsigned textFragmentsSize = m_textFragments.size(); | 301 unsigned textFragmentsSize = m_textFragments.size(); |
| 300 for (unsigned i = 0; i < textFragmentsSize; ++i) { | 302 for (unsigned i = 0; i < textFragmentsSize; ++i) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 ASSERT_NOT_REACHED(); | 340 ASSERT_NOT_REACHED(); |
| 339 break; | 341 break; |
| 340 } | 342 } |
| 341 } | 343 } |
| 342 | 344 |
| 343 // Spec: Line-through should be drawn after the text is filled and strok
ed; thus, the line-through is rendered on top of the text. | 345 // Spec: Line-through should be drawn after the text is filled and strok
ed; thus, the line-through is rendered on top of the text. |
| 344 if (decorations & TextDecorationLineThrough) | 346 if (decorations & TextDecorationLineThrough) |
| 345 paintDecoration(paintInfo.context, TextDecorationLineThrough, fragme
nt); | 347 paintDecoration(paintInfo.context, TextDecorationLineThrough, fragme
nt); |
| 346 } | 348 } |
| 347 | 349 |
| 350 // finally, paint the outline if any |
| 351 if (style->hasOutline() && parentRenderer.isRenderInline()) |
| 352 toRenderInline(parentRenderer).paintOutline(paintInfo, paintOffset); |
| 353 |
| 348 ASSERT(!m_paintingResource); | 354 ASSERT(!m_paintingResource); |
| 349 } | 355 } |
| 350 | 356 |
| 351 bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float
scalingFactor, | 357 bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float
scalingFactor, |
| 352 RenderObject* renderer, RenderStyle* style, RenderSVGResourceModeFlags resou
rceMode) | 358 RenderObject* renderer, RenderStyle* style, RenderSVGResourceModeFlags resou
rceMode) |
| 353 { | 359 { |
| 354 // Callers must save the context state before calling when scalingFactor is
not 1. | 360 // Callers must save the context state before calling when scalingFactor is
not 1. |
| 355 ASSERT(scalingFactor); | 361 ASSERT(scalingFactor); |
| 356 ASSERT(renderer); | 362 ASSERT(renderer); |
| 357 ASSERT(style); | 363 ASSERT(style); |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 renderer().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); | 809 renderer().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); |
| 804 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ
est, locationInContainer, rect)) | 810 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ
est, locationInContainer, rect)) |
| 805 return true; | 811 return true; |
| 806 } | 812 } |
| 807 } | 813 } |
| 808 } | 814 } |
| 809 return false; | 815 return false; |
| 810 } | 816 } |
| 811 | 817 |
| 812 } // namespace WebCore | 818 } // namespace WebCore |
| OLD | NEW |