// Save away the current values of the path, parent value and device
// styles as they may change during the body of this but need
// resetting afterwards.
PseudoStylePath oldPath = pseudoStylePath;
StyleValues oldParentValues = parentValues;
DeviceStyles oldDeviceStyles = deviceStyles;
PseudoStyleEntity entity = nestedStyles.getPseudoStyleEntity();
boolean valid = false;
if (entity instanceof PseudoElement) {