diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-24 11:40:17 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-24 12:42:11 +0000 |
commit | 5d87695f37678f96492b258bbab36486c59866b4 (patch) | |
tree | be9783bbaf04fb930c4d74ca9c00b5e7954c8bc6 /chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h | |
parent | 6c11fb357ec39bf087b8b632e2b1e375aef1b38b (diff) | |
download | qtwebengine-chromium-5d87695f37678f96492b258bbab36486c59866b4.tar.gz |
BASELINE: Update Chromium to 75.0.3770.56
Change-Id: I86d2007fd27a45d5797eee06f4c9369b8b50ac4f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h b/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h new file mode 100644 index 00000000000..a10d0cf9124 --- /dev/null +++ b/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h @@ -0,0 +1,41 @@ +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCROLLING_TEXT_FRAGMENT_SELECTOR_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCROLLING_TEXT_FRAGMENT_SELECTOR_H_ + +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + +namespace blink { + +// TextFragmentSelector represents a single targetText=... selector of a +// TextFragmentAnchor, parsed into its components. +class CORE_EXPORT TextFragmentSelector final { + public: + static TextFragmentSelector Create(const String& target_text); + + enum SelectorType { + // An exact selector on the string start_. + kExact, + // A range selector on a text range start_ to end_. + kRange, + }; + + TextFragmentSelector(SelectorType type, String start, String end); + ~TextFragmentSelector() = default; + + SelectorType Type() const { return type_; } + String Start() const { return start_; } + String End() const { return end_; } + + private: + const SelectorType type_; + String start_; + String end_; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_SCROLLING_TEXT_FRAGMENT_SELECTOR_H_ |