So, does that mean, as long as probe directly with 10x, the device under test and oscilloscope won't be damaged, regardless of grounded or not?
Don't bet on it, not even with someone else's scope and someone else's money!
Clipping a scope non-isolated probe ground to anything other than a floating node of a fully isolated circuit, or to a node at true earth ground potential can blow up your scope.
Even if you *think* its a ground node, if there's a large area ground loop, there can be enough voltage offset at a low enough impedance to drive a large enough current through your probe ground clip to melt your probe or burn ground tracks off the scope PCB! Mains Neutral is a particular hazard as the voltage offset between it and ground can vary unexpectedly due to switching of high current loads at other consumers in your neibourhood.
Misguidedly floating your scope to try to get around this limitation can kill you and has killed other experienced engineers who should have known better.
Bdunham's suggestion of two probes on two channels then using MATH to display CH1-CH2 (or visa versa) is safe enough if you are using identical x100 HV probes with their ground clip leads removed. If you are using fixed x10 probes its fairly risky due to mains supply spikes that may exceed the probe voltage rating. Keep tests brief (to minimize exposure) and use a known good surge suppressor in line with the mains supply. Do *NOT* handle any connections with the mains supply present. With cheap switchable x1/x10 probes, you are playing Russian roulette with your scope, and if you handle them with power on, with your life.
Get an isolated differential probe with a Cat II or better rating for your mains voltage, its cheaper than a new scope or a funeral.