Add basic gtest to ensure AccessibleCaret and AccessibleCaretManager are
both testable. More tests to come.
Allow -Winconsistent-missing-override warning in gtest since MOCK_METHOD
does not have 'override' keyword. See bug 1169974.
We need to extract statements that touch PresShell, access frame trees,
or call other utility functions into functions so that we could mock or
stub them in gtest.
Inline GetFocusedContent since it's only used once.
Rename mCaretMode to mLastUpdateCaretsMode to make it clear that this
variable track the caret mode since last update. This also avoid the
confusion that GetCaretMode() returns mCaretMode.
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.
- Add an additional item for each top frame extending 3D context to
separate consequence contexts.
- Effective transform of a layer is the accumulation of ancestors in
the same 3D context.
- The layers creating new context and extended by children need a
temporary buffer if it's effective transform is not 2D.
- Clip rects are accumulated along the context chain.
- Visible rects of items are computed from dirty regions of the frame
creating the context and accumulated transforms.
- Bounds of items are computed from accumulated transforms and
accumulated bounds of the descent frames.
- Backface hidden is handled by compositor and BasicLayerManager.
The print engine used to directly cause a prompt to be displayed in the most
recent window in the event of an error. This patch causes the print engine to
fire an event instead so that the front-end can choose to display or ignore
the error.
The old SelectionStateChangedEvent dispatched by SelectionChanged had
this field, but it has not being ported to CaretStateChangedEvent. We
should include selected text in the event so that Gaia could have a
chance to enhance user experience.
This patch also reworks the dispatch of events in nsRefreshDriver. Previously
the refresh driver would dispatch the transition events for all subdocuments
then the animation events. This arrangement is complicated and not obviously
necessary. This patch simplifies this arrangement by dispatching transition
events and animation events for each document before proceeding to
subdocuments.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)
Make the FrameLayerBuilder remember for what region it has calculated
display item visibility, then recompute the visibility whenever the
dirty region it is passed to DrawPaintedLayer changes.
This means that the caller does not have to know the entire dirty region
that will be drawn for the transaction, but we can still optimise cases
where it knows some of the dirty region in advance.
This fixes a regression where MultiTiledContentClient's low-res display
port would not be painted if a smaller region of its high-res buffer had
already been painted that transaction, since the FrameLayerBuilder
had decided that most of the larger low-res region was invisible.
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.
- Add an additional item for each top frame extending 3D context to
separate consequence contexts.
- Effective transform of a layer is the accumulation of ancestors in
the same 3D context.
- The layers creating new context and extended by children need a
temporary buffer if it's effective transform is not 2D.
- Clip rects are accumulated along the context chain.
- Visible rects of items are computed from dirty regions of the frame
creating the context and accumulated transforms.
- Bounds of items are computed from accumulated transforms and
accumulated bounds of the descent frames.
- Backface hidden is handled by compositor and BasicLayerManager.
When a TEXTAREA element is focused it returns the cursor to the last
position was at, or places it last. INPUT @type="text" (or any other
textual input element) places the caret at the beginning. Because of
this we move the caret to the end of the input field. The next time
the element is focussed, the cursor should move to the end.
The layout touch caret tests relied on the caret being left in its
previous position. This patch addresses that by using the advanced user
interaction API for these test cases.
r=jgriffin
This ensures that regions beyond the clip are painted, and async scrolling can reveal them by moving the layer-level clip.
This patch also ensures that we continue creating mask layers for fixed background layers correctly, where appropriate.