Doing it off a runnable makes the flattened tree inconsistent until that
runnable runs.
Also add an assert in frame construction that would've caught the first
only-unbind patch.
MozReview-Commit-ID: Hnua3aWSMHi
--HG--
extra : rebase_source : 2781e3b0a3f28b6b6a620902e7414dfe682fba51
Expose the API to get/set inherited scale from stacking context and we can
use these APIs to calculate correct scale for OMTA
MozReview-Commit-ID: DZEkodHTy8v
--HG--
extra : rebase_source : be3c978c8f48c9b1bfcd01cff6bb8200092b5e60
Multi-color shadow is not allowed in spec. We could use the same color
of the text as the color of the decoration line when we paint the
shadow.
MozReview-Commit-ID: AK9NoseSE0h
--HG--
extra : rebase_source : 48a84e73a7ee76b615c255a440cbe119fa8f56f0
The old code doesn't work because mScriptHandlingObject is a nsWeakPtr,
which cannot be casted to nsPIDOMWindowInner directly.
Since scriptHandlingObject is a strong reference to the same object, we
can just try casting that.
MozReview-Commit-ID: JRBs5N6xxc0
--HG--
extra : rebase_source : cd0237553198182b00ff9c667a17271b23464567
There are two callers of nsFilterInstance::PaintFilteredFrame:
1. nsSVGUtils::PaintFrameWithEffects at [1]
This function is used while painting a filtered element on a path which
display item painting is not supported yet, such as drawing elements inside a
indirect painted SVG object, such as a mask, a clipPath or a gradient object.
Let's say we have a masked element, which refers to an SVG mask, and there is
a filtered element inside that SVG mask.
Using nsFilterInstance::PaintFilteredFrame to paint that filtered frame in
the mask, we have to pass a gfxContext and a transform matrix to it. The
transform of the gfxContext 'target' that we pass in consists of a transform
from the referenced frame, of the masked frame, to the masked frame. We also
pass in a transform matrix 'aTransform', this matrix contains a transform
from the the masked frame to the filtered frame in *device units*, which
means it contains css-to-dev-px scaling factor.
2. nsSVGIntegrationUtils::PaintFilter at [2]
This function is used by normal display item painting.
The same, we pass a gfxContext 'context' and a transform matrix 'tm' into
nsFilterInstance::PaintFilteredFrame. The transform matrix of 'context'
consists of a transform from the referenced frame, of the filtered frame,
to this filtered frame, but the scale factor was taken out . The transform
matrix 'tm' we pass in contains scale transform from the referenced frame to
the filtered frame in *device unit*.
Inside nsFilterInstance::PaintFilteredFrame, we treat the transform matrix of
'aCtx' and 'aTransform' as parameters we pass in in #2 caller. So it can be
failed in #1. For example, if the filtered frame inside a masked frame has a
translation transform applied, since that translation was put in 'aTransfrom',
but we only use the scale factor of 'aTransform' in
nsFilterInstance::PaintFilteredFrame, translation factor disappears.
In this patch, I unified the definition of parameters of
nsFilterInstance::PaintFilteredFrame:
1. nsFilterInstance::PaintFilteredFrame(aCtx): the transform matrix of aCtx
should be a transform from the referenced frame to the filtered frame in
*css units*. Originally, the aCtx we passed in #1 is in device units, which
should be fixed; the aCtx we passed in #2 does not even include css scaling
factor, need be fixed too.
2. nsFilterInstance::PaintFilteredFrame(aTransform): this transform matrix
should contain only scaling factor in device units. And I removed it in the
end since I found we can get this value easily right inside the callee.
[1]
https://hg.mozilla.org/mozilla-central/file/ef585ac7c476/layout/svg/nsSVGUtils.cpp#l857
[2]
https://hg.mozilla.org/mozilla-central/file/ef585ac7c476/layout/svg/nsSVGIntegrationUtils.cpp#l1114
MozReview-Commit-ID: gRV128NyQv
--HG--
extra : rebase_source : 15d130babd07734c3c36e24e9ea8b5c4e5f7dbbf
This change makes the next patch free of doing Matrix to gfxMatrix conversion.
MozReview-Commit-ID: 8K9RNgjZPTw
--HG--
extra : rebase_source : 190a80c2580622b7866ddb4d80a161311e97a2f5
I noticed this error message on fixing dom/workers/test/test_suspend.html:
WARNING: NS_ENSURE_TRUE(mDocViewer) failed:
file layout/base/nsDocumentViewer.cpp, line 3863
It happens when a nsDocumentViewer::Close() is followed by a
nsDocumentViewer::Open(), the viewer would have been disconnected. Since it
takes only one-line change to fix I just include it in this bug.
MozReview-Commit-ID: LMT2PJkUqi1
--HG--
extra : rebase_source : 3cd2a554cec3210ec97f0da8fea00780b3fa44bc
do_QueryFrame from one frame type to another frame type
can compare mClass first, and if successful just downcast
the pointer to the target frame type. If unsuccessful,
or for do_QueryFrame calls involving other types, we must
still call QueryFrame.
MozReview-Commit-ID: 5MVfmuOYwdE
A single transition value that includes 'none' for transition-property is
valid, so we should store whole specified values (if it's valid). Whereas,
the spec [1] clearly says for the case where there are multiple entries;
If there is more than one <single-transition> in the shorthand, and any of
the transitions has none as the <single-transition-property>, then the
declaration is invalid.
'none 2s linear 2s' is a test case for the former, '1s width, 2s none' is a
test case for the latter.
Note that with this patch, 'transition: none' is serialized as 'none 0s ease 0s'
instead of 'none' but it matches Gecko.
[1] https://drafts.csswg.org/css-transitions/#single-transition
MozReview-Commit-ID: 3o3z5GFyMqh
--HG--
extra : rebase_source : c553af804124c0c76554fb8ad007e78e2813d321
"fileNameStr = fileName;" will be fileNameStr.Assign(fileName), so this causes small memory leak. We should use Adopt, getter_copies, or AString parameter instead.
MozReview-Commit-ID: 5VTgttj2LdK
--HG--
extra : rebase_source : b372f04b210655e754b35fe4ebb2b8a32a19d6bf
This is just simplifying things by eliminating a layer of now-unnecessary
abstraction.
MozReview-Commit-ID: 1MBagjYXbCD
--HG--
extra : rebase_source : a0e7e78ef4925efd00eac969ae126d1ba3f4f607
These functions are now dead code. And really, they were already dead code
even before this patch-stack -- they were only called in never-evaluated
(and now-deleted) #else clauses.
MozReview-Commit-ID: AeY6Z3ybmsv
--HG--
extra : rebase_source : deb51373f4d32580ab2ffb71c5c078132e4a76a6
This patch drops all MOZILLA_INTERNAL_API checks (and the bodies of any
associated "#else" clauses) from these files. The basic assumption here is
that MOZILLA_INTERNAL_API is #defined in all (supported) compilation units that
#include these files, so the checks are superfluous and the #else clauses are
dead code.
(If this assumption is mistaken and there is some .cpp file in our codebase
that #includes this header and yet does not have MOZILLA_INTERNAL_API, we will
find out via bustage on treeherder.)
MozReview-Commit-ID: 8dHJFBDVHwT
--HG--
extra : rebase_source : 476a6e2de8468dea2e26e11f415c3868326126e5