/* * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_FRAME_SELECTION_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_FRAME_SELECTION_H_ #include <memory> #include "base/check_op.h" #include "base/dcheck_is_on.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/dom/synchronous_mutation_observer.h" #include "third_party/blink/renderer/core/editing/ephemeral_range.h" #include "third_party/blink/renderer/core/editing/forward.h" #include "third_party/blink/renderer/core/editing/set_selection_options.h" #include "third_party/blink/renderer/core/editing/visible_units.h" #include "third_party/blink/renderer/core/scroll/scroll_alignment.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "ui/gfx/geometry/rect.h" namespace blink { class EffectPaintPropertyNode; class Element; class FrameCaret; class GranularityStrategy; class GraphicsContext; class InlineCursor; class InlineCursorPosition; class LayoutBlock; class LayoutSelection; class LayoutText; class LocalFrame; class PhysicalBoxFragment; class Range; class SelectionEditor; class TextIteratorBehavior; enum class SelectionModifyAlteration; enum class SelectionModifyDirection; enum class SelectionState; struct PaintInvalidatorContext; struct PhysicalOffset; struct PhysicalRect; enum RevealExtentOption { … }; enum class CaretVisibility; enum class HandleVisibility { … }; enum class ContextMenuVisibility { … }; enum class SelectSoftLineBreak { … }; // This is return type of ComputeLayoutSelectionStatus(cursor). // This structure represents how the fragment is selected. // |start|, |end| : Selection start/end offset. This offset is based on // the text of InlineNode of a parent block thus // |fragemnt.StartOffset <= start <= end <= fragment.EndOffset|. // |start| == |end| means this fragment is not selected. // |line_break| : This value represents If this fragment is selected and // selection wraps soft line break. struct LayoutSelectionStatus { … }; enum class SelectionIncludeEnd { … }; struct LayoutTextSelectionStatus { … }; class CORE_EXPORT FrameSelection final : public GarbageCollected<FrameSelection>, public SynchronousMutationObserver { … }; } // namespace blink #if DCHECK_IS_ON() // Outside the blink namespace for ease of invocation from gdb. void ShowTree(const blink::FrameSelection&); void ShowTree(const blink::FrameSelection*); #endif #endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_FRAME_SELECTION_H_