mirror of
https://github.com/servo/servo.git
synced 2025-07-16 03:43:38 +01:00
use less repetitive name
This commit is contained in:
parent
3fa0dca3a3
commit
46cadfdd2c
6 changed files with 162 additions and 162 deletions
|
@ -377,7 +377,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(&bounds,
|
||||
&clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
display_list_section);
|
||||
state.add_display_item(
|
||||
DisplayItem::SolidColorClass(box SolidColorDisplayItem {
|
||||
|
@ -569,7 +569,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(&bounds,
|
||||
&clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
display_list_section);
|
||||
state.add_display_item(DisplayItem::ImageClass(box ImageDisplayItem {
|
||||
base: base,
|
||||
|
@ -697,7 +697,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(absolute_bounds,
|
||||
&clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
display_list_section);
|
||||
let gradient_display_item = DisplayItem::GradientClass(box GradientDisplayItem {
|
||||
base: base,
|
||||
|
@ -727,7 +727,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(&bounds,
|
||||
&clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
display_list_section);
|
||||
state.add_display_item(DisplayItem::BoxShadowClass(box BoxShadowDisplayItem {
|
||||
base: base,
|
||||
|
@ -799,7 +799,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(&bounds,
|
||||
&clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
display_list_section);
|
||||
state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
|
||||
base: base,
|
||||
|
@ -842,7 +842,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(&bounds,
|
||||
&clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Outlines);
|
||||
state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
|
||||
base: base,
|
||||
|
@ -867,7 +867,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(stacking_relative_border_box,
|
||||
clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
|
||||
base: base,
|
||||
|
@ -888,7 +888,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(&baseline,
|
||||
clip,
|
||||
self.node,
|
||||
style.get_cursor(Cursor::DefaultCursor),
|
||||
style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
state.add_display_item(DisplayItem::LineClass(box LineDisplayItem {
|
||||
base: base,
|
||||
|
@ -905,7 +905,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(stacking_relative_border_box,
|
||||
clip,
|
||||
self.node,
|
||||
self.style.get_cursor(Cursor::DefaultCursor),
|
||||
self.style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
state.add_display_item(DisplayItem::BorderClass(box BorderDisplayItem {
|
||||
base: base,
|
||||
|
@ -956,7 +956,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let base = state.create_base_display_item(stacking_relative_border_box,
|
||||
&clip,
|
||||
self.node,
|
||||
self.style.get_cursor(Cursor::DefaultCursor),
|
||||
self.style.get_cursor(Cursor::Default),
|
||||
display_list_section);
|
||||
state.add_display_item(
|
||||
DisplayItem::SolidColorClass(box SolidColorDisplayItem {
|
||||
|
@ -981,14 +981,14 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
stacking_relative_border_box.origin.y),
|
||||
Size2D::new(INSERTION_POINT_LOGICAL_WIDTH,
|
||||
stacking_relative_border_box.size.height));
|
||||
cursor = Cursor::TextCursor;
|
||||
cursor = Cursor::Text;
|
||||
} else {
|
||||
insertion_point_bounds =
|
||||
Rect::new(Point2D::new(stacking_relative_border_box.origin.x,
|
||||
stacking_relative_border_box.origin.y + advance),
|
||||
Size2D::new(stacking_relative_border_box.size.width,
|
||||
INSERTION_POINT_LOGICAL_WIDTH));
|
||||
cursor = Cursor::VerticalTextCursor;
|
||||
cursor = Cursor::VerticalText;
|
||||
};
|
||||
|
||||
let base = state.create_base_display_item(&insertion_point_bounds,
|
||||
|
@ -1208,7 +1208,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
&stacking_relative_content_box,
|
||||
clip,
|
||||
self.node,
|
||||
self.style.get_cursor(Cursor::DefaultCursor),
|
||||
self.style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
let item = DisplayItem::IframeClass(box IframeDisplayItem {
|
||||
base: base,
|
||||
|
@ -1235,7 +1235,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
&stacking_relative_content_box,
|
||||
clip,
|
||||
self.node,
|
||||
self.style.get_cursor(Cursor::DefaultCursor),
|
||||
self.style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
state.add_display_item(DisplayItem::ImageClass(box ImageDisplayItem {
|
||||
base: base,
|
||||
|
@ -1271,7 +1271,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
&stacking_relative_content_box,
|
||||
clip,
|
||||
self.node,
|
||||
self.style.get_cursor(Cursor::DefaultCursor),
|
||||
self.style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
let display_item = match canvas_data {
|
||||
CanvasData::Pixels(canvas_data) => {
|
||||
|
@ -1545,12 +1545,12 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
// Determine the orientation and cursor to use.
|
||||
let (orientation, cursor) = if self.style.writing_mode.is_vertical() {
|
||||
if self.style.writing_mode.is_sideways_left() {
|
||||
(TextOrientation::SidewaysLeft, Cursor::VerticalTextCursor)
|
||||
(TextOrientation::SidewaysLeft, Cursor::VerticalText)
|
||||
} else {
|
||||
(TextOrientation::SidewaysRight, Cursor::VerticalTextCursor)
|
||||
(TextOrientation::SidewaysRight, Cursor::VerticalText)
|
||||
}
|
||||
} else {
|
||||
(TextOrientation::Upright, Cursor::TextCursor)
|
||||
(TextOrientation::Upright, Cursor::Text)
|
||||
};
|
||||
|
||||
// Compute location of the baseline.
|
||||
|
@ -1649,7 +1649,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
&shadow_bounds(&stacking_relative_box, blur_radius, Au(0)),
|
||||
clip,
|
||||
self.node,
|
||||
self.style.get_cursor(Cursor::DefaultCursor),
|
||||
self.style.get_cursor(Cursor::Default),
|
||||
DisplayListSection::Content);
|
||||
state.add_display_item(DisplayItem::BoxShadowClass(box BoxShadowDisplayItem {
|
||||
base: base,
|
||||
|
|
|
@ -74,7 +74,7 @@ impl LayoutRPC for LayoutRPCImpl {
|
|||
if update_cursor {
|
||||
// Compute the new cursor.
|
||||
let cursor = match *result {
|
||||
None => Cursor::DefaultCursor,
|
||||
None => Cursor::Default,
|
||||
Some(dim) => dim.pointing.unwrap(),
|
||||
};
|
||||
rw_data.constellation_chan.send(ConstellationMsg::SetCursor(cursor)).unwrap();
|
||||
|
|
|
@ -35,39 +35,39 @@ macro_rules! define_cursor {
|
|||
|
||||
|
||||
define_cursor! {
|
||||
"none" => NoCursor = 0,
|
||||
"default" => DefaultCursor = 1,
|
||||
"pointer" => PointerCursor = 2,
|
||||
"context-menu" => ContextMenuCursor = 3,
|
||||
"help" => HelpCursor = 4,
|
||||
"progress" => ProgressCursor = 5,
|
||||
"wait" => WaitCursor = 6,
|
||||
"cell" => CellCursor = 7,
|
||||
"crosshair" => CrosshairCursor = 8,
|
||||
"text" => TextCursor = 9,
|
||||
"vertical-text" => VerticalTextCursor = 10,
|
||||
"alias" => AliasCursor = 11,
|
||||
"copy" => CopyCursor = 12,
|
||||
"move" => MoveCursor = 13,
|
||||
"no-drop" => NoDropCursor = 14,
|
||||
"not-allowed" => NotAllowedCursor = 15,
|
||||
"grab" => GrabCursor = 16,
|
||||
"grabbing" => GrabbingCursor = 17,
|
||||
"e-resize" => EResizeCursor = 18,
|
||||
"n-resize" => NResizeCursor = 19,
|
||||
"ne-resize" => NeResizeCursor = 20,
|
||||
"nw-resize" => NwResizeCursor = 21,
|
||||
"s-resize" => SResizeCursor = 22,
|
||||
"se-resize" => SeResizeCursor = 23,
|
||||
"sw-resize" => SwResizeCursor = 24,
|
||||
"w-resize" => WResizeCursor = 25,
|
||||
"ew-resize" => EwResizeCursor = 26,
|
||||
"ns-resize" => NsResizeCursor = 27,
|
||||
"nesw-resize" => NeswResizeCursor = 28,
|
||||
"nwse-resize" => NwseResizeCursor = 29,
|
||||
"col-resize" => ColResizeCursor = 30,
|
||||
"row-resize" => RowResizeCursor = 31,
|
||||
"all-scroll" => AllScrollCursor = 32,
|
||||
"zoom-in" => ZoomInCursor = 33,
|
||||
"zoom-out" => ZoomOutCursor = 34,
|
||||
"none" => None = 0,
|
||||
"default" => Default = 1,
|
||||
"pointer" => Pointer = 2,
|
||||
"context-menu" => ContextMenu = 3,
|
||||
"help" => Help = 4,
|
||||
"progress" => Progress = 5,
|
||||
"wait" => Wait = 6,
|
||||
"cell" => Cell = 7,
|
||||
"crosshair" => Crosshair = 8,
|
||||
"text" => Text = 9,
|
||||
"vertical-text" => VerticalText = 10,
|
||||
"alias" => Alias = 11,
|
||||
"copy" => Copy = 12,
|
||||
"move" => Move = 13,
|
||||
"no-drop" => NoDrop = 14,
|
||||
"not-allowed" => NotAllowed = 15,
|
||||
"grab" => Grab = 16,
|
||||
"grabbing" => Grabbing = 17,
|
||||
"e-resize" => EResize = 18,
|
||||
"n-resize" => NResize = 19,
|
||||
"ne-resize" => NeResize = 20,
|
||||
"nw-resize" => NwResize = 21,
|
||||
"s-resize" => SResize = 22,
|
||||
"se-resize" => SeResize = 23,
|
||||
"sw-resize" => SwResize = 24,
|
||||
"w-resize" => WResize = 25,
|
||||
"ew-resize" => EwResize = 26,
|
||||
"ns-resize" => NsResize = 27,
|
||||
"nesw-resize" => NeswResize = 28,
|
||||
"nwse-resize" => NwseResize = 29,
|
||||
"col-resize" => ColResize = 30,
|
||||
"row-resize" => RowResize = 31,
|
||||
"all-scroll" => AllScroll = 32,
|
||||
"zoom-in" => ZoomIn = 33,
|
||||
"zoom-out" => ZoomOut = 34,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue