When a row is displayed with dark background, the text color used for the row is white. When a cell from the row is selected, the text color remains white in the selected cell and in the whole line. This makes reading the text from any cell of the selected row easy.
When a row is displayed with light color, the text color is black. When this row is selected, the text color for the row is changed to white and the text of the selected cell is kept black. Reading the text from the selected row, that is outside the selected cell is hard, as there is no contrast.
With this change, the cells are displayed always with contrasting color.