// Copyright 2017 The Chromium Authors // 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_EDITING_TESTING_SELECTION_SAMPLE_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_TESTING_SELECTION_SAMPLE_H_ #include <string> #include "third_party/blink/renderer/core/editing/forward.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/forward.h" namespace blink { class ContainerNode; class HTMLElement; // |SelectionSample| provides parsing HTML text with selection markers and // serializes DOM tree with selection markers. // Selection markers are represents by "^" for selection base and "|" for // selection extent like "assert_selection.js" in web test. // // To set selection at before children or after children instead of start or // end of |Text| node, we should use selection marker only |Comment| node like: // <span><!--^-->foo<!--|--></span> // This notation yields selection of base=SPAN@0 and extent=SPAN@1. class SelectionSample final { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_TESTING_SELECTION_SAMPLE_H_