Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp |
| index 9b757ed1062f8cba951446d8722095d832c1b9d5..2ba62a026192c6208ff623ddadc68ff5791d5e41 100644 |
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp |
| @@ -34,52 +34,15 @@ |
| namespace blink { |
| -DocumentMarkerDetails::~DocumentMarkerDetails() {} |
| - |
| -class DocumentMarkerDescription final : public DocumentMarkerDetails { |
| - public: |
| - static DocumentMarkerDescription* Create(const String&); |
| - |
| - const String& Description() const { return description_; } |
| - bool IsDescription() const override { return true; } |
| - |
| - private: |
| - explicit DocumentMarkerDescription(const String& description) |
| - : description_(description) {} |
| - |
| - String description_; |
| -}; |
| - |
| -DocumentMarkerDescription* DocumentMarkerDescription::Create( |
| - const String& description) { |
| - return new DocumentMarkerDescription(description); |
| -} |
| - |
| -inline DocumentMarkerDescription* ToDocumentMarkerDescription( |
| - DocumentMarkerDetails* details) { |
| - if (details && details->IsDescription()) |
| - return static_cast<DocumentMarkerDescription*>(details); |
| - return 0; |
| -} |
| +DocumentMarker::~DocumentMarker() = default; |
| DocumentMarker::DocumentMarker(MarkerType type, |
| unsigned start_offset, |
| unsigned end_offset) |
| : type_(type), start_offset_(start_offset), end_offset_(end_offset) { |
| - DCHECK_LT(start_offset, end_offset); |
| + DCHECK_LT(start_offset_, end_offset_); |
|
Xiaocheng
2017/05/31 22:17:16
Redundant change.
|
| } |
| -DocumentMarker::DocumentMarker(MarkerType type, |
| - unsigned start_offset, |
| - unsigned end_offset, |
| - const String& description) |
| - : type_(type), |
| - start_offset_(start_offset), |
| - end_offset_(end_offset), |
| - details_(description.IsEmpty() |
| - ? nullptr |
| - : DocumentMarkerDescription::Create(description)) {} |
| - |
| Optional<DocumentMarker::MarkerOffsets> |
| DocumentMarker::ComputeOffsetsAfterShift(unsigned offset, |
| unsigned old_length, |
| @@ -131,15 +94,4 @@ void DocumentMarker::ShiftOffsets(int delta) { |
| end_offset_ += delta; |
| } |
| -const String& DocumentMarker::Description() const { |
| - if (DocumentMarkerDescription* details = |
| - ToDocumentMarkerDescription(details_.Get())) |
| - return details->Description(); |
| - return g_empty_string; |
| -} |
| - |
| -DEFINE_TRACE(DocumentMarker) { |
| - visitor->Trace(details_); |
| -} |
| - |
| } // namespace blink |