The optimization avoided a 10ms delay in generating synthesized mouse events
after a touch tap, if the tapped element wasn't styled differently when in
the |:active| state.
This dates back to the B2G days when the delay was in the critical path of
app startup times. It's less important today, and determining whether the
element is styled differently is an expensive operation in the style engine,
so we are removing it.
MozReview-Commit-ID: FYO1GlCR3gS
--HG--
extra : rebase_source : 1b7ce6eec77d0260b153bfcd93e81bccb3558107
Since NoFocusState is am empty struct used in the |mData| variant in
FocusTarget, we need to add a Reader and a Writer for IPC for NoFocusState so we
can properly read and write the |mData| variant. The NoFocusState Read and Write
methods do not read or write anything, since NoFocusState does not contain any
data. This is done by creating a helper class EmptyStructSerliazer and
inheritting from EmptyStructSerializer for the NoFocusState specialization.
The |Read| and |Write| methods for FocusTarget are updated by removing the read
and write code for the individual types of |mData| and instead makes use of the
IPC read and write methods for Variant.
MozReview-Commit-ID: 3159sp6FLek
--HG--
extra : rebase_source : ff82797c26abffbd8bbcc465dc40c621be3257d0
Updates FocusState::Update to use a matcher on the the mData variant. This
replaces a switch statement that was used to unpack the mData union, prior to
making mData a variant.
FocusTargetDataMatcher has three match methods, which are largely unmodified
from the three cases of the original switch statement. The constructor takes two
arguments: a reference to |this| (FocusState) and a copy of the
|sequenceNumber|. |sequenceNumber| was added to the constructor to avoid passing
in a reference to |target|, since we only needed the |sequenceNumber| property
from |target|.
MozReview-Commit-ID: FkjQm8oGysM
--HG--
extra : rebase_source : 4ef8da00fe0925ed5a477063449e83bf601f49ee
FocusTarget.h
* Adds Variant property to FocusTarget
* Adds RefLayerId typedef for uint64_t
* Adds empty struct for the case where there is no focus target
* Adds operator== for ScrollTargets struct
* Updates mData from union to mozilla::variant
* Removes FocusTargetType enum
* Removes FocusTargetData union
* Removes mType property
FocusTarget.cpp
* Updates methods using mData to use proper variant methods
* Removes references to mType, instead using the appropriate
variant methods
MozReview-Commit-ID: BAarVxSGDtJ
--HG--
extra : rebase_source : 47ca7243619a756408cf1ee406b94890d083da3b
When CompositorBridgeChild::Destroy is called from ShutDown, it will
only call AfterDestroy if it has not been previously destroyed, and if
ActorDestroy has not been called by the IPDL code. AfterDestroy is
always necessary to allow ShutDown to return because it is what clears
the static reference used as a event loop spinning condition in
ShutDown. Now, AfterDestroy is safe to call multiple times, and even
if ActorDestroy was already called, we will try it from Destroy before
returning early.
snprintf returns the number of bytes it would have written when it runs out of
space. This patch makes sure we properly handle this unlikely event in
FPSCounter. This patch also makes sure we don't print out the contents of an
uninitialized buffer.
--HG--
extra : rebase_source : 3b0efdc90aeb1ee17e10a75493af51f2878bfcda