Commit b13aa2ae authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

[LayoutNG] Mark LayoutSelection::LayoutSelectionStartEndForNG const.

This patch marks LayoutSelection::LayoutSelectionStartEndForNG
and FrameSelection::LayoutSelectionStartEndForNG const because of
the function constness.

Bug: 708452
Change-Id: I462fa178a9c656f184f43aac62eedff552290219
Reviewed-on: https://chromium-review.googlesource.com/892943Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533171}
parent 3437aff4
...@@ -1255,7 +1255,7 @@ void FrameSelection::ClearLayoutSelection() { ...@@ -1255,7 +1255,7 @@ void FrameSelection::ClearLayoutSelection() {
} }
std::pair<unsigned, unsigned> FrameSelection::LayoutSelectionStartEndForNG( std::pair<unsigned, unsigned> FrameSelection::LayoutSelectionStartEndForNG(
const NGPhysicalTextFragment& text_fragment) { const NGPhysicalTextFragment& text_fragment) const {
return layout_selection_->SelectionStartEndForNG(text_fragment); return layout_selection_->SelectionStartEndForNG(text_fragment);
} }
......
...@@ -225,7 +225,7 @@ class CORE_EXPORT FrameSelection final ...@@ -225,7 +225,7 @@ class CORE_EXPORT FrameSelection final
WTF::Optional<unsigned> LayoutSelectionEnd() const; WTF::Optional<unsigned> LayoutSelectionEnd() const;
void ClearLayoutSelection(); void ClearLayoutSelection();
std::pair<unsigned, unsigned> LayoutSelectionStartEndForNG( std::pair<unsigned, unsigned> LayoutSelectionStartEndForNG(
const NGPhysicalTextFragment&); const NGPhysicalTextFragment&) const;
void Trace(blink::Visitor*); void Trace(blink::Visitor*);
......
...@@ -662,7 +662,7 @@ static unsigned ClampOffset(unsigned offset, ...@@ -662,7 +662,7 @@ static unsigned ClampOffset(unsigned offset,
} }
std::pair<unsigned, unsigned> LayoutSelection::SelectionStartEndForNG( std::pair<unsigned, unsigned> LayoutSelection::SelectionStartEndForNG(
const NGPhysicalTextFragment& text_fragment) { const NGPhysicalTextFragment& text_fragment) const {
// FrameSelection holds selection offsets in layout block flow at // FrameSelection holds selection offsets in layout block flow at
// LayoutSelection::Commit() if selection starts/ends within Text that // LayoutSelection::Commit() if selection starts/ends within Text that
// each LayoutObject::SelectionState indicates. // each LayoutObject::SelectionState indicates.
......
...@@ -110,7 +110,7 @@ class LayoutSelection final : public GarbageCollected<LayoutSelection> { ...@@ -110,7 +110,7 @@ class LayoutSelection final : public GarbageCollected<LayoutSelection> {
// (text_fragment.StartOffset(), text_fragment.EndOffset()). // (text_fragment.StartOffset(), text_fragment.EndOffset()).
// If first equals second, it indicates "no selection in fragment". // If first equals second, it indicates "no selection in fragment".
std::pair<unsigned, unsigned> SelectionStartEndForNG( std::pair<unsigned, unsigned> SelectionStartEndForNG(
const NGPhysicalTextFragment&); const NGPhysicalTextFragment&) const;
void OnDocumentShutdown(); void OnDocumentShutdown();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment