mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b1e6bddb83
This code is somewhat tricky. nsCaret::ComputeCaretRects was checking to see if we have a bidi keyboard, and if so, what direction it's set to. If the direction changed from the last direction seen for *this caret*, we fired a SelectionLanguageChange notification on the caret's current Selection. This looked bogus because the caret can be switched between selections so it would seem some selections won't get a notification when they should, but that's how it was. Also, when the SelectionLanguageChange notification fired we then didn't draw the caret in that iteration, which seems even more bogus. This patch fixes all that by moving the logic to fire SelectionLanguageChange out to GetPaintGeometry and firing the notification every single time without trying to detect whether the state has changed or not. I carefully examined the implementation of SelectionLanguageChange and I'm pretty sure it's idempotent so this should be correct. That doesn't look like an expensive function, and runs at most once per window paint, so I'm not worried about perf. Because we now fire SelectionLanguageChange before reading selection or frame state, it should be fine to carry on after calling SelectionLanguageChange and drawing the caret based on whatever changes SelectionLanguageChange has performed. This also lets us remove mKeyboardRTL, which as noted above seems inherently bogus. --HG-- extra : rebase_source : 3ddfd10f6f30033e090e72b4bb43f2695218752e |
||
---|---|---|
.. | ||
analysis | ||
base | ||
build | ||
doc | ||
forms | ||
generic | ||
inspector | ||
ipc | ||
mathml | ||
media | ||
printing | ||
reftests | ||
style | ||
svg | ||
tables | ||
tools | ||
xul | ||
moz.build |