gecko-dev/layout
Robert O'Callahan 39217b370a Bug 1048752. Part 22: Factor out SelectionLanguageChange call to run early in nsCaret::GetPaintGeometry. r=tn
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
2014-08-06 17:19:28 +12:00
..
analysis
base Bug 1048752. Part 22: Factor out SelectionLanguageChange call to run early in nsCaret::GetPaintGeometry. r=tn 2014-08-06 17:19:28 +12:00
build Bug 1048752. Part 9: Remove nsCaret.h from nsDisplayList.h. r=tn 2014-08-06 17:19:25 +12:00
doc Bug 968029 - Use unprefixed box-sizing in content/, dom/, layout/, and widget/. r=dbaron 2014-02-06 12:32:05 -07:00
forms Bug 1048752. Part 17: Rename Get/SetCaretDOMSelection to Get/SetSelection. r=tn 2014-08-06 17:19:27 +12:00
generic Bug 1048752. Part 19: Create nsCaret::GetPaintGeometry to call during painting. r=tn 2014-08-06 17:19:28 +12:00
inspector Bug 1048780 - Call the standard matches() rather than the proprietary mozMatchesSelector(); r=jst 2014-08-12 14:30:59 +02:00
ipc Bug 1048752. Part 10: Remove FrameLayerBuilder.h from nsDisplayList.h. r=tn 2014-08-06 17:19:25 +12:00
mathml Bug 981924 - Update ReportToConsole calls in layout code to use the right category. r=dbaron 2014-08-11 16:52:01 -07:00
media Bug 1051592 - Clip DrawTargetCairo's context to the surface bound to prevent massive mask allocations within cairo. r=jrmuizel 2014-08-15 14:23:22 +12:00
printing Bug 1048246 - Fix more bad implicit constructors in layout; r=roc 2014-08-07 19:48:38 -04:00
reftests Bug 1030993 followup - Annotate ruby reftests directory as skip-if(B2G), pending investigation on followup bug. 2014-08-15 10:34:20 -07:00
style Backed out changeset f4b101378a07 (bug 1021527) by request 2014-08-15 16:14:42 +01:00
svg Bug 1048752. Part 19: Create nsCaret::GetPaintGeometry to call during painting. r=tn 2014-08-06 17:19:28 +12:00
tables Bug 1048752. Part 9: Remove nsCaret.h from nsDisplayList.h. r=tn 2014-08-06 17:19:25 +12:00
tools Bug 1052907 - Make --this-chunk and --total-chunks arguments to mach reftest-remote work by coercing them to ints, which they need to be. r=ahal 2014-08-13 15:39:03 -07:00
xul Bug 1048752. Part 16: Move nsFrameSelection::HINT to CaretAssociationHint.h. r=tn 2014-08-06 17:19:27 +12:00
moz.build Bug 1043820 - Remove PARALLEL_DIRS. r=gps 2014-07-29 08:57:59 +09:00