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

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2780313002: [WIP] Refactor DocumentMarker (Closed)
Patch Set: Move accessor methods into derived classes Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
index 56e5a794c030a752a0bc07c3157aeeb80d4cc160..1ff28137ac8bac5c11d0f34333019f624388c084 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -4,8 +4,10 @@
#include "core/paint/SVGInlineTextBoxPainter.h"
+#include <memory>
#include "core/editing/Editor.h"
#include "core/editing/markers/DocumentMarkerController.h"
+#include "core/editing/markers/TextMatchMarker.h"
#include "core/frame/LocalFrame.h"
#include "core/layout/LayoutTheme.h"
#include "core/layout/api/LineLayoutAPIShim.h"
@@ -22,7 +24,6 @@
#include "core/style/AppliedTextDecoration.h"
#include "core/style/ShadowList.h"
#include "platform/graphics/GraphicsContextStateSaver.h"
-#include <memory>
namespace blink {
@@ -545,14 +546,9 @@ void SVGInlineTextBoxPainter::paintText(const PaintInfo& paintInfo,
}
Vector<SVGTextFragmentWithRange> SVGInlineTextBoxPainter::collectTextMatches(
- const DocumentMarker& marker) const {
+ const TextMatchMarker& marker) const {
const Vector<SVGTextFragmentWithRange> emptyTextMatchList;
- // SVG does not support grammar or spellcheck markers, so skip anything but
- // TextMatch.
- if (marker.type() != DocumentMarker::TextMatch)
- return emptyTextMatchList;
-
if (!inlineLayoutObject().frame()->editor().markedTextMatchesAreHighlighted())
return emptyTextMatchList;
@@ -590,7 +586,7 @@ SVGInlineTextBoxPainter::collectFragmentsInRange(int startPosition,
void SVGInlineTextBoxPainter::paintTextMatchMarkerForeground(
const PaintInfo& paintInfo,
const LayoutPoint& point,
- const DocumentMarker& marker,
+ const TextMatchMarker& marker,
const ComputedStyle& style,
const Font& font) {
const Vector<SVGTextFragmentWithRange> textMatchInfoList =
@@ -632,7 +628,7 @@ void SVGInlineTextBoxPainter::paintTextMatchMarkerForeground(
void SVGInlineTextBoxPainter::paintTextMatchMarkerBackground(
const PaintInfo& paintInfo,
const LayoutPoint& point,
- const DocumentMarker& marker,
+ const TextMatchMarker& marker,
const ComputedStyle& style,
const Font& font) {
const Vector<SVGTextFragmentWithRange> textMatchInfoList =

Powered by Google App Engine
This is Rietveld 408576698