Normally a frame being destroyed would do this via PresShell::NotifyDestroyingFrame -> ImageLoader::DropRequestsForFrame but when we are tearing down the whole frame tree we skip per frame notifications like that for perf reasons. So we now make sure to do it when clearing out frames wholesale.
We also need to pass a prescontext pointer to ClearFrames because the ImageLoader only has a document pointer, and by that point in the presshell destruction sequence the presshell pointer on the document has been cleared.
- Updated ScrollTo method in nsGlobalWindow to accept a
mozilla::dom::ScrollOptions parameter to select between the instant
and smooth MSD motion.
- Updated WebIDL binding boilerplate scrolling functions in nsGlobalWindow
to pass the correct value of mozilla::dom::ScrollBehavior to the
implementation and functions, activating smooth scrolling.
- These functions will need to be updated again to support the scroll-behavior
CSS property in Bug 1010538.
--HG--
extra : rebase_source : 7c9ce94d09fed5c4aea63442d683876c0a9a2e50
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.
--HG--
extra : rebase_source : e777605dd2507ae043e9f82d0a30e23aa06e0c12
The forward declaration of Selection in nsCaret.h will be used in later patches.
--HG--
extra : rebase_source : d1b749adac983c04d3365bb6bfb76a50101beeb5
This patch started an attempt to remove nsFrameSelection.h from nsCaret.h
and metastasized into a rather large refactoring patch that removed it
from some other header files as well, and changed nsFrameSelection::HINT
into a global-scope enum with better names. I also converted bools
into CaretAssociationHint in a few places where that was appropriate,
but there are still some more places (GetChildFrameContainingOffset)
where bools need to be converted. I figured this patch was big enough already.
--HG--
extra : rebase_source : cc618ef60e707e1360644340a2648de389383da0
GetGeometry is used in two different ways. Sometimes it's used to get
information about a particular caret. Sometimes it's used to get
information about a particular selection that's not associated with
a caret. Splitting GetGeometry into a non-static version for the former
and a static version for the latter makes this more clear. Also it saves
code since for the latter version we don't have to get an nsCaret first.
--HG--
extra : rebase_source : b7730dac56b308a82b79b175749234c9a92b6f59
* Refactor UpdateTouchCaret() into smaller functions.
* Update touch caret in PresShell::DidDoReflow() and
PresShell::UnsuppressAndInvalidate() if needed.