HRH being the style “His/Her Royal Highness” of course.
My understanding is that the following people are allowed to use the style HRH according to the current rules:
Sons/daughters of the sovereign (and the wives of those sons)
Children of the sons of the sovereign (i.e. grandchildren from sons) (and the wives of those grandsons).
The eldest son of the eldest son of the Prince of Wales (and, presumably, his wife).
Anyone else to whom the sovereign grants the style (i.e. Prince Phillip).
Prince Harry is, of course, styled HRH because he falls into category#2 – he is the son of the son of Queen Elizabeth. His children, however, won’t be HRH while Queen Elizabeth is still alive, since they are great-grandchildren of the sovereign.
Of course, once Charles ascends the throne, they then become male-line grandchildren of the King and acquire the HRH title.
But what would happen if Charles predeceases the Queen (or otherwise become ineligible to ascent the throne)? The next King would then be William. If William becomes King immediately after Elizabeth, then Prince Harry’s kids will never meet the criteria for HRH. Does that mean that, in that circumstance, they would never be HRH (absent some special proclamation by the King, of course)? Can they really lose the title just based on the order of death?
They wouldn’t be losing anything if Charles predeceases Liz. They never had the style in the first place, and Charles going before his mother doesn’t change that. It just makes it a permanent condition rather than a temporary one.
How is it handled if Charles does ascend and then at some future point dies? Do Harry’s kids remain RHes or do they lose the style then?
I believe they keep them. After all, the Dukes of Glouchester and Kent and Prince Michael (as well as Princess Alexandra) are all male line grandchildren of George V who died in 1936 – and they are still styled as HRH even though the grandfather who was the sovereign died long ago.
Note that these putative children (or their parents on their behalf) may choose not to use the title HRH even if they are entitled to do so. The two children of TRH the Earl and Countess of Wessex (formerly Prince Edward and Sophie Rhys-Jones) are male line grandchildren of a monarch. HRH is not used in referring to them.
The chances are that, on becoming king, William would grant Harry’s children the right to call themselves HRH as a special case. It’s not as if changing the rules involves any great difficulties.
There is also an obvious parallel with some peerages, as it is not unknown for the younger children of the heir to a peerage who died before inheriting to be given the right by royal licence to style themselves as if their father had held the peerage.
Zev is correct, IMO: once you get the title, you have it for life – with one exception: if you inherit the throne, at which point, of course, His/Her Majesty replaces it. The point that it replaces rather than just masking the HRH title can be proven by the original person covered by point #3 of the OP, the quondam King Edward VIII, who was during Victoria’s reign eldest son of the eldest living son of the Prince of Wales, moving up as first his grandfather and then his father took the throne and still HRH. When he himself took the throne, he became HM the King. When he abdicated, George VI created him Duke of Windsor and ordered that he, but not his wife, be entitled to use the style HRH – meaning it has lapsed when he took the throne, and had to be restored by Royal Warrant (point #4 in the OP).
Note that it’s son/grandson of a monarch, not necessarily the current monarch.
Another execption is in case of divorce. An ex-wife of an HRH does not remain an HRH herself. At the time of her death, Diana was still a princess but no longer an HRH. I believe this is a new rule instituted about the time of Charles and Diana’s divorce.
On the other hand, widows who recieve the HRH style by marriage to an HRH can keep it in widowhood. Princess Alice provides a recent example.