This patch implements a derived class of gfxPlatformFontList and a set of associated objects that uses fontconfig. It's a replacement for the existing gfxPangoFontGroup and gfxFontconfigUtils code. The fontconfig API is used to lookup all fonts on the system, which are grouped by family name.
Changes due to this patch:
- font style matching, the mapping of style attributes to a specific font, is now handled by the same Gecko code that is used on other plaforms. fontconfig substitutions are handled but fontconfig style matching no longer used.
- downloadable fonts using unicode-range are now supported
- local fullname lookups are only done with the English name of the font, as per the CSS3 Fonts spec, and not only other localized fullnames
- size-specific bitmap fonts are no longer supported
- fonts lacking a Unicode character map are no longer supported
This patch implements a derived class of gfxPlatformFontList and a set of associated objects that uses fontconfig. It's a replacement for the existing gfxPangoFontGroup and gfxFontconfigUtils code. The fontconfig API is used to lookup all fonts on the system, which are grouped by family name.
Changes due to this patch:
- font style matching, the mapping of style attributes to a specific font, is now handled by the same Gecko code that is used on other plaforms. fontconfig substitutions are handled but fontconfig style matching no longer used.
- downloadable fonts using unicode-range are now supported
- local fullname lookups are only done with the English name of the font, as per the CSS3 Fonts spec, and not only other localized fullnames
- size-specific bitmap fonts are no longer supported
- fonts lacking a Unicode character map are no longer supported
AccessibleCaret should behave like TouchCaret and SelectionCarets. I
refactor the setUp() to support both the old and new preferences.
Rename test_selectioncarets_multiplerange.py to test_selectioncarets2.py
since it now contains more than just multirange tests.
_test_handle_tilt_when_carets_overlap_to_each_other() is modified
because AccessibleCaret does not inflate the caret hit rectangle as
TouchCaret/SelectionCarets did. The point for tilt caret edges need to
shrink a bit.
In test_touchcaret.py, instead of setting _large_expiration_time, I just
disable caret timeout by default for every test. For those timeout
tests, use one second timeout to reduce test running time, and allow
1.5x margin to prevent intermittent failures.
Refine test case that move touch caret to front by using the real
position at the front rather than (0, 0).
Use skip_if_not_rotatable decorator for better log message.
--HG--
rename : layout/base/tests/marionette/test_selectioncarets_multiplerange.py => layout/base/tests/marionette/test_selectioncarets2.py
The necessary modifications are the same as SelectionCarets. For
convenience, Touch/SelectionCarets will be disabled whenever
AccessibleCaret preference is enabled.
See AccessibleCaretEventHub.h for the class description.
Both TouchCaret and SelectionCarets have their event handling mechanism,
which lead to a lot of code duplication. Now AccessibleCaretEventHub
serves as the single entry point for all events and callbacks.
We also encountered performance issues in SelectionCarets because many
unnecessary events might be dispatched to Gaia driven by the selection
changed events. SelectionCarets did not have clear internal states to
avoid this. To solve it, AccessibleCaretEventHub implements state
classes, and rely on the current states to call the CopyPasteManager's
handler only when it's needed.
For example, when dragging a caret, we do not interest in
NotifySelectionChanged() for updating the carets. Since we've known a
caret is being dragging, we can call UpdateCarets() directly. Hence
DragCaretState does not override OnSelectionChanged().
See AccessibleCaretManager.h for the class description.
AccessibleCaretManager uses two AccessibleCarets to unify the
functionality provided by TouchCaret and SelectionCarets. It has
"cursor" mode and "selection" mode, which corresponds to TouchCaret and
SelectionCarets, respectively.
See AccessibleCaret.h for the class description.
Technical difference between AccessibleCaret and Touch/SelectionCarets:
The anonymous dom element containing a caret image will be created by
AccessibleCaret by using the API landed in bug 1020244 instead of being
created by nsCanvasFrame.
ClampRectToScrollFrames generalizes IsRectVisibleInScrollFrames by
returning the clamped rect in scroll frames. IsRectVisibleInScrollFrames
could be implemented by checking whether the clamped rect is empty or
not.
This patch implements a derived class of gfxPlatformFontList and a set of associated objects that uses fontconfig. It's a replacement for the existing gfxPangoFontGroup and gfxFontconfigUtils code. The fontconfig API is used to lookup all fonts on the system, which are grouped by family name.
Changes due to this patch:
- font style matching, the mapping of style attributes to a specific font, is now handled by the same Gecko code that is used on other plaforms. fontconfig substitutions are handled but fontconfig style matching no longer used.
- downloadable fonts using unicode-range are now supported
- local fullname lookups are only done with the English name of the font, as per the CSS3 Fonts spec, and not only other localized fullnames
- size-specific bitmap fonts are no longer supported
- fonts lacking a Unicode character map are no longer supported
This refixes bug 947753 in a way that leads to fewer complications,
since we don't need to predict what kind of layer manager an element's
layer will have before the layer is actually created. It has the
disadvantage that
AnimationPlayerCollection::CanPerformOnCompositorThread isn't really
telling the truth in cases where we won't have an layer that does
off-main-thread compositing. This means that we will force the creation
of a layer to receive the animations (which might actually be good),
although it may have some disadvantages.
It also means that the additional (unlanded) patch in bug 947753 still
isn't needed, since we never set the animation generation on the layer,
so we will never try to throttle (suppress main thread execution) of
animations.
This fixes bug 1153539 with the Firefox download arrow being pixellated
(verified by testing locally).
I also confirmed what happens on a flame device with the transform
unlocking the Firefox OS homescreen (bug 945082 / bug 972310). For that
transform (which had a maximum scale of 2), I see four calls to
GetSuitableScale:
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000000
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000586
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000000
GetSuitableScale: aMaxScale=2.000000, displayVisibleRatio=1.000586
(Presumably the first and third are for width, and the second and fourth
are for height.) I believe this shows that bug 972310 will remain fixed
with this patch.
I chose to use the pres context's visible area rather than the screen
size because it seemed more appropriate, and also because (if memory
serves correctly) it's much cheaper to get.