If A has to do that before B puts up any money, then doesn't that give B a chance to blackmail him?
That is, instead of proceeding with the transaction, B says, "Your coins are now inaccessible without my co-operation. You can get half back and give half to me, or get none back. Your choice."
No, it could be done trustlessly with SIGHASH_ANYONECANPAY. The deposit TX wouldn't be valid until both parties put in their inputs and sign it (they are both paying in the same TX). I'm not yet 100% convinced that scheme can work, and it's an inconvenience to users since they have to have collateral to be able to trade, but intuitively it seems like it could help.