Commit 440ed979 authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Rename rendered_position to compute_layer_selection

Since "rendered position" is ambiguous, this patch renames it to
simply the function name implemented in the file.

Bug: 789870
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I98d310b092edc0983ec03012f32c81f60224d2e0
Reviewed-on: https://chromium-review.googlesource.com/1160070Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580803}
parent c40c2982
...@@ -105,6 +105,8 @@ blink_core_sources("editing") { ...@@ -105,6 +105,8 @@ blink_core_sources("editing") {
"commands/unlink_command.h", "commands/unlink_command.h",
"commands/wrap_contents_in_dummy_span_command.cc", "commands/wrap_contents_in_dummy_span_command.cc",
"commands/wrap_contents_in_dummy_span_command.h", "commands/wrap_contents_in_dummy_span_command.h",
"compute_layer_selection.cc",
"compute_layer_selection.h",
"dom_selection.cc", "dom_selection.cc",
"dom_selection.h", "dom_selection.h",
"drag_caret.cc", "drag_caret.cc",
...@@ -237,8 +239,6 @@ blink_core_sources("editing") { ...@@ -237,8 +239,6 @@ blink_core_sources("editing") {
"position_with_affinity.h", "position_with_affinity.h",
"relocatable_position.cc", "relocatable_position.cc",
"relocatable_position.h", "relocatable_position.h",
"rendered_position.cc",
"rendered_position.h",
"reveal_selection_scope.cc", "reveal_selection_scope.cc",
"reveal_selection_scope.h", "reveal_selection_scope.h",
"selection_adjuster.cc", "selection_adjuster.cc",
...@@ -351,6 +351,7 @@ jumbo_source_set("unit_tests") { ...@@ -351,6 +351,7 @@ jumbo_source_set("unit_tests") {
"commands/set_character_data_command_test.cc", "commands/set_character_data_command_test.cc",
"commands/split_text_node_command_test.cc", "commands/split_text_node_command_test.cc",
"commands/typing_command_test.cc", "commands/typing_command_test.cc",
"compute_layer_selection_test.cc",
"editing_strategy_test.cc", "editing_strategy_test.cc",
"editing_style_test.cc", "editing_style_test.cc",
"editing_utilities_test.cc", "editing_utilities_test.cc",
...@@ -394,7 +395,6 @@ jumbo_source_set("unit_tests") { ...@@ -394,7 +395,6 @@ jumbo_source_set("unit_tests") {
"position_test.cc", "position_test.cc",
"position_with_affinity_test.cc", "position_with_affinity_test.cc",
"relocatable_position_test.cc", "relocatable_position_test.cc",
"rendered_position_test.cc",
"selection_adjuster_test.cc", "selection_adjuster_test.cc",
"selection_controller_test.cc", "selection_controller_test.cc",
"selection_modifier_character_test.cc", "selection_modifier_character_test.cc",
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "third_party/blink/renderer/core/editing/rendered_position.h" #include "third_party/blink/renderer/core/editing/compute_layer_selection.h"
#include "cc/layers/picture_layer.h" #include "cc/layers/picture_layer.h"
#include "third_party/blink/renderer/core/editing/editing_utilities.h" #include "third_party/blink/renderer/core/editing/editing_utilities.h"
......
...@@ -28,10 +28,8 @@ ...@@ -28,10 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_RENDERED_POSITION_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_COMPUTE_LAYER_SELECTION_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_RENDERED_POSITION_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_COMPUTE_LAYER_SELECTION_H_
// TODO(editing-dev): Consider rename/move this file.
#include "cc/input/layer_selection_bound.h" #include "cc/input/layer_selection_bound.h"
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
...@@ -40,9 +38,10 @@ namespace blink { ...@@ -40,9 +38,10 @@ namespace blink {
class FrameSelection; class FrameSelection;
// Compute coodinates to paint selection handles on touch devices.
CORE_EXPORT cc::LayerSelection ComputeLayerSelection( CORE_EXPORT cc::LayerSelection ComputeLayerSelection(
const FrameSelection& frame_selection); const FrameSelection& frame_selection);
} // namespace blink } // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_RENDERED_POSITION_H_ #endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_COMPUTE_LAYER_SELECTION_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "third_party/blink/renderer/core/editing/rendered_position.h" #include "third_party/blink/renderer/core/editing/compute_layer_selection.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h" #include "third_party/blink/renderer/core/editing/frame_selection.h"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
namespace blink { namespace blink {
class RenderedPositionTest : public EditingTestBase { class ComputeLayerSelectionTest : public EditingTestBase {
public: public:
void SetUp() override { void SetUp() override {
EditingTestBase::SetUp(); EditingTestBase::SetUp();
...@@ -45,7 +45,7 @@ class RenderedPositionTest : public EditingTestBase { ...@@ -45,7 +45,7 @@ class RenderedPositionTest : public EditingTestBase {
UseMockScrollbarSettings mock_scrollbars_; UseMockScrollbarSettings mock_scrollbars_;
}; };
TEST_F(RenderedPositionTest, ComputeLayerSelection) { TEST_F(ComputeLayerSelectionTest, ComputeLayerSelection) {
SetBodyContent(R"HTML( SetBodyContent(R"HTML(
<!DOCTYPE html> <!DOCTYPE html>
input { input {
...@@ -65,7 +65,7 @@ TEST_F(RenderedPositionTest, ComputeLayerSelection) { ...@@ -65,7 +65,7 @@ TEST_F(RenderedPositionTest, ComputeLayerSelection) {
EXPECT_TRUE(composited_selection.end.hidden); EXPECT_TRUE(composited_selection.end.hidden);
} }
TEST_F(RenderedPositionTest, PositionInScrollableRoot) { TEST_F(ComputeLayerSelectionTest, PositionInScrollableRoot) {
SetBodyContent(R"HTML( SetBodyContent(R"HTML(
<!DOCTYPE html> <!DOCTYPE html>
<style> <style>
...@@ -107,7 +107,7 @@ TEST_F(RenderedPositionTest, PositionInScrollableRoot) { ...@@ -107,7 +107,7 @@ TEST_F(RenderedPositionTest, PositionInScrollableRoot) {
EXPECT_EQ(gfx::Point(1369, 915), composited_selection.end.edge_bottom); EXPECT_EQ(gfx::Point(1369, 915), composited_selection.end.edge_bottom);
} }
TEST_F(RenderedPositionTest, PositionInScroller) { TEST_F(ComputeLayerSelectionTest, PositionInScroller) {
SetBodyContent(R"HTML( SetBodyContent(R"HTML(
<!DOCTYPE html> <!DOCTYPE html>
<style> <style>
...@@ -171,7 +171,7 @@ TEST_F(RenderedPositionTest, PositionInScroller) { ...@@ -171,7 +171,7 @@ TEST_F(RenderedPositionTest, PositionInScroller) {
} }
// crbug.com/807930 // crbug.com/807930
TEST_F(RenderedPositionTest, ContentEditableLinebreak) { TEST_F(ComputeLayerSelectionTest, ContentEditableLinebreak) {
SetBodyContent( SetBodyContent(
"<div style='font: 10px/10px Ahem;' contenteditable>" "<div style='font: 10px/10px Ahem;' contenteditable>"
"test<br><br></div>"); "test<br><br></div>");
...@@ -186,7 +186,7 @@ TEST_F(RenderedPositionTest, ContentEditableLinebreak) { ...@@ -186,7 +186,7 @@ TEST_F(RenderedPositionTest, ContentEditableLinebreak) {
} }
// crbug.com/807930 // crbug.com/807930
TEST_F(RenderedPositionTest, TextAreaLinebreak) { TEST_F(ComputeLayerSelectionTest, TextAreaLinebreak) {
SetBodyContent( SetBodyContent(
"<textarea style='font: 10px/10px Ahem;'>" "<textarea style='font: 10px/10px Ahem;'>"
"test\n</textarea>"); "test\n</textarea>");
...@@ -200,7 +200,7 @@ TEST_F(RenderedPositionTest, TextAreaLinebreak) { ...@@ -200,7 +200,7 @@ TEST_F(RenderedPositionTest, TextAreaLinebreak) {
} }
// crbug.com/815099 // crbug.com/815099
TEST_F(RenderedPositionTest, CaretBeforeSoftWrap) { TEST_F(ComputeLayerSelectionTest, CaretBeforeSoftWrap) {
SetBodyContent( SetBodyContent(
"<div style='font: 10px/10px Ahem; width:20px;' " "<div style='font: 10px/10px Ahem; width:20px;' "
"contenteditable>foo</div>"); "contenteditable>foo</div>");
...@@ -222,7 +222,7 @@ TEST_F(RenderedPositionTest, CaretBeforeSoftWrap) { ...@@ -222,7 +222,7 @@ TEST_F(RenderedPositionTest, CaretBeforeSoftWrap) {
EXPECT_EQ(composited_selection.end.edge_bottom, gfx::Point(27, 18)); EXPECT_EQ(composited_selection.end.edge_bottom, gfx::Point(27, 18));
} }
TEST_F(RenderedPositionTest, CaretAfterSoftWrap) { TEST_F(ComputeLayerSelectionTest, CaretAfterSoftWrap) {
SetBodyContent( SetBodyContent(
"<div style='font: 10px/10px Ahem; width:20px;' " "<div style='font: 10px/10px Ahem; width:20px;' "
"contenteditable>foo</div>"); "contenteditable>foo</div>");
...@@ -245,7 +245,7 @@ TEST_F(RenderedPositionTest, CaretAfterSoftWrap) { ...@@ -245,7 +245,7 @@ TEST_F(RenderedPositionTest, CaretAfterSoftWrap) {
} }
// crbug.com/834686 // crbug.com/834686
TEST_F(RenderedPositionTest, RangeBeginAtBlockEnd) { TEST_F(ComputeLayerSelectionTest, RangeBeginAtBlockEnd) {
const SelectionInDOMTree& selection = SetSelectionTextToBody( const SelectionInDOMTree& selection = SetSelectionTextToBody(
"<div style='font: 10px/10px Ahem;'>" "<div style='font: 10px/10px Ahem;'>"
"<div>foo\n^</div><div>ba|r</div></div>"); "<div>foo\n^</div><div>ba|r</div></div>");
......
...@@ -42,10 +42,10 @@ ...@@ -42,10 +42,10 @@
#include "third_party/blink/renderer/core/css/style_change_reason.h" #include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/dom/element_visibility_observer.h" #include "third_party/blink/renderer/core/dom/element_visibility_observer.h"
#include "third_party/blink/renderer/core/dom/static_node_list.h" #include "third_party/blink/renderer/core/dom/static_node_list.h"
#include "third_party/blink/renderer/core/editing/compute_layer_selection.h"
#include "third_party/blink/renderer/core/editing/drag_caret.h" #include "third_party/blink/renderer/core/editing/drag_caret.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h" #include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h" #include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h"
#include "third_party/blink/renderer/core/editing/rendered_position.h"
#include "third_party/blink/renderer/core/events/error_event.h" #include "third_party/blink/renderer/core/events/error_event.h"
#include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h" #include "third_party/blink/renderer/core/exported/web_plugin_container_impl.h"
#include "third_party/blink/renderer/core/frame/browser_controls.h" #include "third_party/blink/renderer/core/frame/browser_controls.h"
......
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