Skip to content

Commit

Permalink
Use black on blue color for default selection color
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed Mar 28, 2016
1 parent 63a0851 commit 2bbf35f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions components/layout/display_list_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ impl<'a> DisplayListBuildState<'a> {
const INSERTION_POINT_LOGICAL_WIDTH: Au = Au(1 * AU_PER_PX);

// Colors for selected text. TODO (#8077): Use the ::selection pseudo-element to set these.
const SELECTION_FOREGROUND_COLOR: RGBA = RGBA { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 };
#[cfg(target_os="linux")]
const SELECTION_BACKGROUND_COLOR: RGBA = RGBA { red: 1.0, green: 0.5, blue: 0.0, alpha: 1.0 };
#[cfg(not(target_os="linux"))]
const SELECTION_FOREGROUND_COLOR: RGBA = RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 };
const SELECTION_BACKGROUND_COLOR: RGBA = RGBA { red: 0.69, green: 0.84, blue: 1.0, alpha: 1.0 };

// TODO(gw): The transforms spec says that perspective length must
Expand Down
4 changes: 2 additions & 2 deletions tests/wpt/mozilla/tests/css/input_selection_a.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
padding: 0;
}
::selection {
color: white;
background: rgba(255, 127, 0, 1.0);
color: black;
background: rgba(176, 214, 255, 1.0);
}
</style>
</head>
Expand Down
4 changes: 2 additions & 2 deletions tests/wpt/mozilla/tests/css/input_selection_ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<style>
span {
font: 16px sans-serif;
color: white;
background: rgba(255, 128, 0, 1.0);
color: black;
background: rgba(176, 214, 255, 1.0);
}
</style>
</head>
Expand Down

0 comments on commit 2bbf35f

Please sign in to comment.