Bug 681192. Part 0.1: Add BaseRect::ClampPoint. r=bas

--HG--
extra : rebase_source : 32e086725d450d8867a4b5978cd76a2f03609572
Bug 681192. Part 0.2: Use FuzzyEqual to check whether we need to invalidate ThebesLayers when subpixel offsets have changed. r=mattwoodrow

--HG--
extra : rebase_source : d0f8464aea9a436214d394123b1399105ccd0f66
Bug 681192. Part 0.3: Add FrameLayerBuilder::GetThebesLayerResolutionForFrame. r=mattwoodrow

--HG--
extra : rebase_source : eea4dee6d081de5c288e295f3549fc88b10e6c39
Bug 681192. Part 1: Add "allowed scroll destination range" to nsIScrollableFrame::ScrollTo and nsGfxScrollFrame implementation. r=roc,matspal

--HG--
extra : rebase_source : 51d04f7e7db35c02de3401a3481d4cc3827c19ec
Bug 681192. Part 2: Make nsIScrollableFrame::ScrollBy automatically set a generous allowed destination range. r=roc

--HG--
extra : rebase_source : 392359b325ca0435031e8f31a47154a82943c2b4
Bug 681192. Part 3: Make nsListControlFrame::ScrollToFrame use ScrollFrameRectIntoView. r=roc

--HG--
extra : rebase_source : c9e0fbbd024e9fe15ca0e2dc0bad1ef90aa51edd
Bug 681192. Part 4: Make ScrollFrameRectIntoView compute a generous allowed scroll destination range. r=roc,matspal

--HG--
extra : rebase_source : 524add7c1080994dd1bc2345cbd6f54c15653d27
Bug 681192. Part 5: Make various DOM scroll APIs --- scrollTop, scrollLeft, window.scrollTo, scrollBox.scrollTo, scrollBox.scrollToLine, scrollBox.scrollBy --- use an appropriate allowed scroll destination range. r=roc,r=matspal

--HG--
extra : rebase_source : 83ee44530c67229686ec0dce3628da83e0e93438
Bug 681192. Part 6: Test that various scrolling operations inside scaled transforms don't trigger unnecessary repainting. r=matspal

--HG--
extra : rebase_source : a72afaa7ebb5e9b59cf574cd973f966eee5c7f45
Bug 681192. Part 7: nsTypedSelection should be scrolling a 0,0 size into view to get a particular coordinate into view, not 1,1. r=matspal
When asked to scroll a 1,1 appunit rectangle into view, ScrollFrameRectIntoView will now actually
succeed!
For example if the window is 6000 appunits high and we ask to scroll a 1x1 rect at 0,6000 into view,
before bug 681192 was fixed we'd actually fail to do so. We'd compute a desired scroll destination of 0,1,
and ScrollTo would round that to 0,0 and we wouldn't scroll at all.
Now, we compute a desired scroll destination of 0,1 but also an allowed scroll range for y of
"1 to <someting large>", so ScrollFrameRectIntoView will scroll down by a full pixel to 0,60. This is correct ---
it gets the subpixel area into view, which the previous code didn't --- but it's not really what DoAutoScroll
wants, at least the way test_mousecapture.xul is written. test_mousecapture.xul expects DoAutoScroll to scroll
windowheight+N into view by scrolling down by exactly N pixels, so the desired point is exactly at the bottom
edge of the window rect. Using a zero-sized rect achieves this.

--HG--
extra : rebase_source : 5d3d8cc4417c35dc88ad296a4f13e01d2c1c9233
Bug 681192. Part 8: Use a generous allowed range when scrolling in CurPosAttributeChanged. r=matspal
There was a subtle reftest failure on Mac in RTL text-overflow tests.
I tracked it down to RTL overflow:auto areas being automatically scrolled by a subpixel amount.
This was because we try to set scrollbar "curpos" attributes to an integer number of CSS pixels representing
the scroll amount, relative to the top-left of GetScrolledRect, which is a noninteger number of CSS pixels
in this case. Then in ReflowFinished() we scroll to the saved curpos values plus the top-left of GetScrolledRect.
This patch fixes the problem by making CurPosAttributeChanged pass an allowed scroll range to
ScrollToWithOrigin. We allow any scroll destination that, when rounded to CSS pixels, would give the same
value as "curpos".
This fixes the bug, ensuring that ReflowFinished's call to CurPosAttributeChanged will not normally need
to scroll because the current position will be in the acceptable range. Also, it means that code that
scrolls by setting the "curpos" attribute will be optimized to try to hit a layer pixel boundary.

--HG--
extra : rebase_source : 3a768883feee4ff2b88fe3c729ea1058e911f2ea
Bug 681192. Part 9: Adjust assertion counts downward. r=mats

--HG--
extra : rebase_source : 5cb44d6572d19d462897b1b50037946d5d8edf67
Bug 681192. Part 10: Control rounding direction of scaledOffset to try to make the residual be close to mActiveScrolledRootPosition. r=tnikkel

--HG--
extra : rebase_source : f27fb737f8956ed117df0be3a71da847cc2048c0
Bug 681192. Part 11: Don't snap scrollrange endpoints to device pixels anymore. r=matspal

--HG--
extra : rebase_source : a4ad5072fbb1a9e1e8d0fcf31268fee8812be41e
Bug 681192. Part 12: more fixes to remove unnecessary rounding to pixels. r=matspal

--HG--
extra : rebase_source : 39f2c0ef3220b3f0d4f6bc2564a86daa2112dc3b
Bug 681192. Part 13: Make nsDOMWindowUtils event coordinate calculations more accurate. r=matspal

--HG--
extra : rebase_source : fef4ef568baf1a67038aeb0e187511771fe0d565
Bug 681192. Part 14: Fix test to avoid failure due to event coordinate rounding. r=matspal

--HG--
extra : rebase_source : 487873fb423400f15ea7f1dfe424075b0f402574
Bug 681192. Part 15: Fix test now that scrollbox scrollWidth/Heights isn't special. r=matspal

--HG--
extra : rebase_source : d77548c8b7b2c62a66070a4cd8414cdf1f7819e6
Bug 681192. Part 16: Reduce assertion counts some more. r=matspal

--HG--
extra : rebase_source : 48cdef6c9792d6e35dcdfaecae3e3982c37171fd
Bug 681192. Part 17: Disable test_transformed_scrolling_repaints_2.html on Mac. r=matspal

--HG--
extra : rebase_source : 6af0be8370c0e07e55954245f6a6305d04eb2a2b