For regular, display list based, hit testing viewport frames never add any items to the display list. So are never "hit". Layer event regions should follow this same path.
The code that this replaces was a partial, incorrect, fix for this problem (from bug 1121033).
nsContentUtils::CallOnAllRemoteChildren calls a callback on all tabs
connected to a given window but it has only worked in Firefox e10s tabs.
This patch adds a list of (weak) references to each top-level document's
WindowRoot so that e.g. the nsPresContext can access them instead of
using nsContentUtils. This provides a solution to the problem of finding remote PBrowsers generally.
When connecting a lowdpi external monitor on hidpi mac, TabChild gets an
UpdateDimensions call, followed by a UIResolutionChanged call. After
the UpdateDimensions call, the content process is in an incorrect state
where it has the dimensions of the new display and scale of the old one.
After the UIResolutionChanged message, the values are again consistent.
In the interim, reflow resizes layers based on the incorrect (old) scale
and subsequently uses those incorrect values when the new scale comes
in. This patch normalizes the message parameters by dividing by scale
(the result is what OS X calls point coordinates) so that this doesn't happen.
We should not dispatch an event if it is not safe to run script since
the event handlers might be implemented by Javascript.
To fix this, we always use AsyncEventDispatcher to dispatch the event.
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
PR_LOG_ERROR -> LogLevel::Error
PR_LOG_WARNING -> LogLevel::Warning
PR_LOG_WARN -> LogLevel::Warning
PR_LOG_INFO -> LogLevel::Info
PR_LOG_DEBUG -> LogLevel::Debug
PR_LOG_NOTICE -> LogLevel::Debug
PR_LOG_VERBOSE -> LogLevel::Verbose
Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.
Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
PR_LOG_ERROR -> LogLevel::Error
PR_LOG_WARNING -> LogLevel::Warning
PR_LOG_WARN -> LogLevel::Warning
PR_LOG_INFO -> LogLevel::Info
PR_LOG_DEBUG -> LogLevel::Debug
PR_LOG_NOTICE -> LogLevel::Debug
PR_LOG_VERBOSE -> LogLevel::Verbose
Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.
Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
PR_LOG_ERROR -> LogLevel::Error
PR_LOG_WARNING -> LogLevel::Warning
PR_LOG_WARN -> LogLevel::Warning
PR_LOG_INFO -> LogLevel::Info
PR_LOG_DEBUG -> LogLevel::Debug
PR_LOG_NOTICE -> LogLevel::Debug
PR_LOG_VERBOSE -> LogLevel::Verbose
Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.
Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
This field tells us if this frame metrics should be considered the root APZC for its layers id. Without this there doesn't seem to be a way to compute this from just the layers tree.
We do this by looking at the layer tree after it has been made to see if the root metrics are in it already.
This is needed to ensure that there is always a root AZPC in a process.
When nsDisplayListBuilder doesn't build caret, we need to skip building
AccessibleCaret frames. We check that the content of the frame has
"moz-accessiblecaret" class.
CLOSED TREE
Backed out changeset 12ce98475c6e (bug 1119980)
Backed out changeset bdb8d05f8870 (bug 1119980)
Backed out changeset a68a18840492 (bug 1119980)
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary. It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
We want AccessibleCaret be of the same size regardless of the zoom
level. We simply divide the caret's width, height, margin-left, and the
text selection bar's margin-left by current zoom level.
The margin-left of the caret is adjusted from -23px to -23.5px for better
looking.
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.
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.
Specifically on Windows nsIWidget::SetTransparencyMode can result in sync painting.
So we give nsContainerFrame::SyncWindowProperties a sync or async option and use the view manager post pending update infrastructure to flush SyncWindowProperties calls async.
This commit deals with the situation where there's no scrollable element
on a fennec's page. It uses the Top Most root element (Xul viewport)
instead.
So this fixes the situation when the tap/click was not being send to the
correct dom element.
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
Since bug 960465 patch 14, we've retained finished transitions in order
to handle the issues described in
https://lists.w3.org/Archives/Public/www-style/2015Jan/0444.html . The
code that did this made the assumption that the transition manager is
notified of the full sequence of style changes that happen to an
element. However, when an element becomes part of a display:none
subtree and then later becomes displayed again, the transition manager
is not notified of a style change when it becomes displayed again (when
we do not have the old style context).
This patch introduces code to prune the finished transitions when that
happens.
This really fixes only part of the set of problems described in bug
1158431, which also affect running transitions. However, it's the part
of that set that was a regression from bug 960465, which introduced the
retention of finished transitions, and which makes these issues
substantially easier to hit.
I'd like to fix this part quickly because it's a regression and we
should backport the fix.
Without the patch, I confirmed that the following two tests fail:
INFO TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_dynamic_changes.html | bug 1144410 test - opacity after starting second transition - got 0, expected 1
INFO TEST-UNEXPECTED-FAIL | layout/style/test/test_transitions_dynamic_changes.html | bug 1144410 test - opacity during second transition - got 0, expected 0.5
With the patch, all the added tests pass.
This avoids accumulating floating point error from conversion, so that
when we switch to doubles at the start of
nsCSSValue::GetAngleValueInRadians we're using the original unit, rather
than a different one that will round differently.
This patch is a fairly minimal rename of the AnimationPlayer interface. It
leaves a bunch of local variables and helper classes still using the word
"player". These will be addressed in subsequent patches that don't require DOM
peer review.
This patch also tightens up a one or two references to 'target effect' replacing
them with just 'effect'. This is because 'target effect' is longer and easily
confused with 'target element'. 'effect' should be sufficient. 'target element'
is a term from the Web Animations specification and in that context, simply
referring to the 'effect' would sound a little odd.
There are still some other references to "source" in AnimationPlayer such as
HasInPlayerSource and UpdateSourceContent. These are renamed in a subsequent
patch (that doesn't require DOM peer review).
We define KeyframeEffectReadonly in KeyframeEffect.cpp since Web Animations also
defines KeyframeEffect and when we come to implement that I expect we'll define
it in the same class, maybe even using the same object.
This patch also adds a few missing includes in places where
KeyframeEffectReadonly is used so that we're not just cargo-culting it in.
Change interface of getter/setter for mClipRect,
also necessary modification for codes that use these resources.
* * *
Bundle mUseClipRect and mClipRect as Maybe<ParentLayerIntRect> mClipRect
This is more likely to be correct, and a necessary step in case we ever want
to move to Object.is.
This keeps ise as an alias for is, and introduces is_loosely for the old
behaviour.