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 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 */ | 20 */ |
21 | 21 |
22 #include "config.h" | 22 #include "config.h" |
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/paint/InlinePainter.h" |
30 #include "core/rendering/HitTestResult.h" | 31 #include "core/rendering/HitTestResult.h" |
31 #include "core/rendering/InlineFlowBox.h" | 32 #include "core/rendering/InlineFlowBox.h" |
32 #include "core/rendering/PaintInfo.h" | 33 #include "core/rendering/PaintInfo.h" |
33 #include "core/rendering/PointerEventsHitRules.h" | 34 #include "core/rendering/PointerEventsHitRules.h" |
34 #include "core/rendering/RenderInline.h" | 35 #include "core/rendering/RenderInline.h" |
35 #include "core/rendering/RenderTheme.h" | 36 #include "core/rendering/RenderTheme.h" |
36 #include "core/rendering/style/ShadowList.h" | 37 #include "core/rendering/style/ShadowList.h" |
37 #include "core/rendering/svg/RenderSVGInlineText.h" | 38 #include "core/rendering/svg/RenderSVGInlineText.h" |
38 #include "core/rendering/svg/RenderSVGResource.h" | 39 #include "core/rendering/svg/RenderSVGResource.h" |
39 #include "core/rendering/svg/RenderSVGResourceSolidColor.h" | 40 #include "core/rendering/svg/RenderSVGResourceSolidColor.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 334 } |
334 } | 335 } |
335 | 336 |
336 // 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. | 337 // 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. |
337 if (decorations & TextDecorationLineThrough) | 338 if (decorations & TextDecorationLineThrough) |
338 paintDecoration(paintInfo.context, TextDecorationLineThrough, fragme
nt); | 339 paintDecoration(paintInfo.context, TextDecorationLineThrough, fragme
nt); |
339 } | 340 } |
340 | 341 |
341 // finally, paint the outline if any | 342 // finally, paint the outline if any |
342 if (style->hasOutline() && parentRenderer.isRenderInline()) | 343 if (style->hasOutline() && parentRenderer.isRenderInline()) |
343 toRenderInline(parentRenderer).paintOutline(paintInfo, paintOffset); | 344 InlinePainter(toRenderInline(parentRenderer)).paintOutline(paintInfo, pa
intOffset); |
344 } | 345 } |
345 | 346 |
346 class PaintingResourceScope { | 347 class PaintingResourceScope { |
347 public: | 348 public: |
348 PaintingResourceScope(RenderObject& renderer) | 349 PaintingResourceScope(RenderObject& renderer) |
349 : m_renderer(renderer) | 350 : m_renderer(renderer) |
350 , m_paintingResource(0) | 351 , m_paintingResource(0) |
351 { | 352 { |
352 } | 353 } |
353 ~PaintingResourceScope() { ASSERT(!m_paintingResource); } | 354 ~PaintingResourceScope() { ASSERT(!m_paintingResource); } |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 renderer().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); | 774 renderer().updateHitTestResult(result, locationInContainer.point
() - toLayoutSize(accumulatedOffset)); |
774 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ
est, locationInContainer, rect)) | 775 if (!result.addNodeToRectBasedTestResult(renderer().node(), requ
est, locationInContainer, rect)) |
775 return true; | 776 return true; |
776 } | 777 } |
777 } | 778 } |
778 } | 779 } |
779 return false; | 780 return false; |
780 } | 781 } |
781 | 782 |
782 } // namespace blink | 783 } // namespace blink |
OLD | NEW |