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

Unified Diff: Source/core/editing/markers/DocumentMarker.h

Issue 1325563002: Avoid style clobbering in setCompositionFromExistingText. (2nd land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Release Range on document detach and remove selectionStart/End Created 5 years, 3 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
« no previous file with comments | « Source/core/editing/InputMethodController.cpp ('k') | Source/core/editing/markers/DocumentMarker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markers/DocumentMarker.h
diff --git a/Source/core/editing/markers/DocumentMarker.h b/Source/core/editing/markers/DocumentMarker.h
index a7b5dccd3dbbeadf53a495d50a6e916e86b707f5..7dde907d1d0eda6a537bc2149e85949858be2356 100644
--- a/Source/core/editing/markers/DocumentMarker.h
+++ b/Source/core/editing/markers/DocumentMarker.h
@@ -24,6 +24,7 @@
#define DocumentMarker_h
#include "core/CoreExport.h"
+#include "platform/graphics/Color.h"
#include "platform/heap/Handle.h"
#include "wtf/VectorTraits.h"
#include "wtf/text/WTFString.h"
@@ -43,6 +44,7 @@ public:
GramarMarkerIndex,
TextMatchMarkerIndex,
InvisibleSpellcheckMarkerIndex,
+ CompositionMarkerIndex,
MarkerTypeIndexesCount
};
@@ -50,7 +52,8 @@ public:
Spelling = 1 << SpellingMarkerIndex,
Grammar = 1 << GramarMarkerIndex,
TextMatch = 1 << TextMatchMarkerIndex,
- InvisibleSpellcheck = 1 << InvisibleSpellcheckMarkerIndex
+ InvisibleSpellcheck = 1 << InvisibleSpellcheckMarkerIndex,
+ Composition = 1 << CompositionMarkerIndex,
};
class MarkerTypes {
@@ -72,7 +75,7 @@ public:
class AllMarkers : public MarkerTypes {
public:
AllMarkers()
- : MarkerTypes(Spelling | Grammar | TextMatch | InvisibleSpellcheck)
+ : MarkerTypes(Spelling | Grammar | TextMatch | InvisibleSpellcheck | Composition)
{
}
};
@@ -95,6 +98,8 @@ public:
DocumentMarker(MarkerType, unsigned startOffset, unsigned endOffset, const String& description, uint32_t hash);
DocumentMarker(unsigned startOffset, unsigned endOffset, bool activeMatch);
+ DocumentMarker(unsigned startOffset, unsigned endOffset, Color underlineColor, bool thick, Color backgroundColor);
+
DocumentMarker(const DocumentMarker&);
MarkerType type() const { return m_type; }
@@ -104,6 +109,9 @@ public:
const String& description() const;
bool activeMatch() const;
+ Color underlineColor() const;
+ bool thick() const;
+ Color backgroundColor() const;
DocumentMarkerDetails* details() const;
void setActiveMatch(bool);
@@ -148,6 +156,7 @@ public:
virtual ~DocumentMarkerDetails();
virtual bool isDescription() const { return false; }
virtual bool isTextMatch() const { return false; }
+ virtual bool isComposition() const { return false; }
DEFINE_INLINE_VIRTUAL_TRACE() { }
};
« no previous file with comments | « Source/core/editing/InputMethodController.cpp ('k') | Source/core/editing/markers/DocumentMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698