f016da18b8990d8b051d7338e2e9282755d1130e: Bug 1048752. Part 39: Call SelectionLanguageChange even when bidi keyboard is not available, for consistency, and fix broken tests. r=jfkthame
Robert O'Callahan <robert@ocallahan.org> - Wed, 13 Aug 2014 01:27:02 +1200 - rev 199976
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 39: Call SelectionLanguageChange even when bidi keyboard is not available, for consistency, and fix broken tests. r=jfkthame
0f357d9f3cdd40b02bac7524ab22e31051ec2e73: Bug 1048752. Part 38: Adjust test annotation for fixed assertion. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:32 +1200 - rev 199975
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 38: Adjust test annotation for fixed assertion. r=tn This test used to assert because we tried to get frame geometry during a caret update while the frame was dirty. That no longer happens since now we only try to get frame geometry during a paint. During a paint, frames can still be dirty so this assertion could still be triggered, and we should probably fix that eventually, but it would only happen during an interrupted layout which is quite rare.
9ebca84edc238335818194baf802d0102647f1f6: Bug 1048752. Part 37: GetGeometryForFrame should return a rect instead of an nsresult. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:32 +1200 - rev 199974
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 37: GetGeometryForFrame should return a rect instead of an nsresult. r=tn
e732e0b3a059595d14a52f911d957e4e98b25c2b: Bug 1048752. Part 36: Remove ancient horizontal rules. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:31 +1200 - rev 199973
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 36: Remove ancient horizontal rules. r=tn
3181703ca8a97f0edbb3bc736d06477b5edfb8ca: Bug 1048752. Part 35: Remove GetFrameSelection (unused). r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:31 +1200 - rev 199972
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 35: Remove GetFrameSelection (unused). r=tn
6b2a05a50eec42a1b0c0aa983930a48d0f0a7c86: Bug 1048752. Part 34: Handle null selection returned by GetSelection(). r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:31 +1200 - rev 199971
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 34: Handle null selection returned by GetSelection(). r=tn Previous changes broke this. Tests caught it.
b2ab5b511d882e373f7d64ec73458d9e82007471: Bug 1048752. Part 33: A zero blink rate should mean the caret is always on. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:31 +1200 - rev 199970
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 33: A zero blink rate should mean the caret is always on. r=tn Previous changes broke this.
e1857632271dc932a5a3b8246ebc67be0c7d37b0: Bug 1048752. Part 32: Rename DrawAtPosition to SetCaretPosition and don't make it turn off blinking. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:31 +1200 - rev 199969
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 32: Rename DrawAtPosition to SetCaretPosition and don't make it turn off blinking. r=tn There's no need for this method to turn off blinking anymore. Its only caller already calls SetCaretReadOnly to achieve the same effect. That means we don't actually need the mIsBlinking flag after all.
b948d2bfea70d0d214b2c54a1293365804aa12c0: Bug 1048752. Part 31: nsCaret.h must be the first #include in nsCaret.cpp. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:30 +1200 - rev 199968
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 31: nsCaret.h must be the first #include in nsCaret.cpp. r=tn Also cleans up a couple of other ordering issues.
bd9c04a9200b0bba6fc35205291b9a002ed755b4: Bug 1048752. Part 30: Simplify caret blinking logic. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:30 +1200 - rev 199967
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 30: Simplify caret blinking logic. r=tn A few things got mashed together here: -- Inline KillTimer/PrimeTimer into their callers. -- Instead of having to call StopBlinking and StartBlinking together, change StartBlinking to ResetBlinking and have it set up the correct blink state and reset the blink cycle. -- nsCaret::NotifySelectionChange needs a SchedulePaint -- nsCaret::DrawAtPosition needs a ResetBlinking
82b040c9158f45d79ce23820a3050a4175ec56cc: Bug 1048752. Part 29: mVisible is never true in nsCaret::Init. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:30 +1200 - rev 199966
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 29: mVisible is never true in nsCaret::Init. r=tn
399e64e0c4bad74a5cec1e6be62ee85c0cc4b7e4: Bug 1048752. Part 28: Remove unused fields and rename mLast* to mOverride*. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:30 +1200 - rev 199965
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 28: Remove unused fields and rename mLast* to mOverride*. r=tn
b0c6ddbb251974adab41831d4fe8f1fb8f175606: Bug 1048752. Part 27: Remove obsolete caret state logic and just SchedulePaint as needed. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:29 +1200 - rev 199964
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 27: Remove obsolete caret state logic and just SchedulePaint as needed. r=tn This is the core of the whole patch set. Now GetPaintGeometry/PaintCaret figure out on their own almost all the state they need every time we paint. So when caret flags change, all we need to do is SchedulePaint. We don't need to fiddle with mDrawn and most of the logic in DrawCaret is obsolete. (In fact, it was duplicated by GetGeometry and friends, and we're removing that duplication.) EraseCaret, CheckCaretState and UpdateCaretPosition are also obsolete. We need to have GetPaintGeometry/PaintCaret choose the correct content node and offset, either getting them from the Selection or using specific data set by DrawAtPosition. This logic, plus a bit of other code shared between them, is put into the helper GetFrameAndOffset.
760ba706ad904c99b05d6d30aebc4b6da491ae62: Bug 1048752. Part 26: Move all "should draw caret" responsibility to GetPaintGeometry. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:29 +1200 - rev 199963
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 26: Move all "should draw caret" responsibility to GetPaintGeometry. r=tn Instead of checking the mysterious mDrawn state (which is evil and will be removed), let nsCaret::GetPaintGeometry take sole responsibilty for deciding whether to draw. It takes the nsStyleUserInterface checks. It also needs to check blink state, which is made possible by separating blink state into the mIsBlinkOn flag.
ed02962f30ebfa007db51d597ec11976f93a4aa6: Bug 1048752. Part 25: Inline MustDrawCaret into IsVisible. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:29 +1200 - rev 199962
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 25: Inline MustDrawCaret into IsVisible. r=tn This also fixes what appears to be a bug. MustDrawCaret returned true when mShowDuringSelection is set even if the caret would otherwise be hidden due a popup showing. That doesn't make sense.
e1a7988dcbe95e8f9dd87308e59cf7a3a23f8f4b: Bug 1048752. Part 24: Rename and deCOM Set/GetCaretVisible. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:29 +1200 - rev 199961
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 24: Rename and deCOM Set/GetCaretVisible. r=tn
d5693a24f45a6ac4edb173480661a386202e4f89: Bug 1048752. Part 23: Remove aIgnoreDrawnState from MustDrawCaret. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:28 +1200 - rev 199960
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 23: Remove aIgnoreDrawnState from MustDrawCaret. r=tn
ea929ba6a8fcfc9727d213fb3331d6b80867c7d6: Bug 1048752. Part 22: Factor out SelectionLanguageChange call to run early in nsCaret::GetPaintGeometry. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:28 +1200 - rev 199959
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
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.
359d7c9c767ad9e2ca4f92cc6e5423d88ab5f269: Bug 1048752. Part 21: Instead of storing mCaretRect/mHookRect, recompute them whenever they're needed. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:28 +1200 - rev 199958
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 21: Instead of storing mCaretRect/mHookRect, recompute them whenever they're needed. r=tn Also, moves the "If the offset falls outside of the frame" check from PaintCaret to GetPaintGeometry so we do less work in that case. UpdateCaretRects is no longer needed.
c550ff16a9a2dfbc2e1077a39f2f528a24749106: Bug 1048752. Part 20: Inline GetCaretFrame into its callers. r=tn
Robert O'Callahan <robert@ocallahan.org> - Wed, 06 Aug 2014 17:19:28 +1200 - rev 199957
Push 27326 by ryanvm@gmail.com at Sat, 16 Aug 2014 21:43:28 +0000
Bug 1048752. Part 20: Inline GetCaretFrame into its callers. r=tn This duplicates some code, but later patches will modify the callers and then eventually we'll re-share common code.
(0) -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 +300000 tip