It seems that other browsers don't allow 'pointer-events: none' on the root content,
and this can cause us interoperability issues.
Differential Revision: https://phabricator.services.mozilla.com/D12500
--HG--
extra : moz-landing-system : lando
This fixes the regression of three web-platform-test reftests:
testing/web-platform/tests/css/css-contain/contain-paint-002.html
testing/web-platform/tests/css/css-contain/contain-paint-011.html
testing/web-platform/tests/css/css-contain/contain-paint-012.html
that was caused by patch 1, but it's written on top of the code in
patches 2 and 3 so it's easier to fix afterwards.
Differential Revision: https://phabricator.services.mozilla.com/D2812
--HG--
extra : rebase_source : 030c72d1f2945795afe8a81112cd6cb7035d9d6b
This fixes a rather subtle bug. What the underlying code here is trying
to do is remove nsChangeHint_UpdateContainingBlock when some properties
that influence whether a frame is a containing block for absolutely
positioned or fixed positioned elements have changed, but the final
calculation of being a containing block has not changed. However, the
old code was using a function that tested whether the style could
*possibly* lead to a frame being a containing block. Some of the
properties (like the transform properties) that lead to being a
containing block, for example, don't apply to non-replaced inlines.
Some, however, do (such as 'filter'). So if there's a dynamic change
adding or removing a filter, on an inline that also has an *ignored*
transform property (like 'transform' or 'perspective') set, then the
code prior to this patch causes us to remove the UpdateContainingBlock
hint.
This patch fixes things by testing whether being a containing block
could have changed for *any* type of frame, by separately testing the
changes.
The added tests fail without the patch and pass with the patch, viewed
in isolation. However, without the previous patch, test 003 passes.
Test 003 also fails in Chrome (but 001 and 002 pass).
Differential Revision: https://phabricator.services.mozilla.com/D2814
--HG--
extra : rebase_source : 0a5dbb15a058cf4a43d989bf53f042c5b718e24d
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet
Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
many places call into the methods with StyleSheet, so there are many
->AsServo() added to sheets
MozReview-Commit-ID: K4zYnuhOurA
--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py
For every file that is modified in this patch, the changes are as follows:
(1) The patch changes the file to use the exact C++ mode lines from the
Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line
(2) The patch deletes any blank lines between the mode line & the MPL
boilerplate comment.
(3) If the file previously had the mode lines and MPL boilerplate in a
single contiguous C++ comment, then the patch splits them into
separate C++ comments, to match the boilerplate in the coding style.
MozReview-Commit-ID: EuRsDue63tK
--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
The main renaming was generated with the following python script:
```
import sys
import re
CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")
def to_camel_case(ident):
return re.sub(CAMEL_CASE_REGEX,
lambda m: m.group(2) + m.group(3).lower(), ident)
def constant_to_enum(constant):
return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")
def process_line(line):
return re.sub(DISPLAY_REGEX,
lambda m: constant_to_enum(m.group(1)), line)
lines = []
with open(sys.argv[1], "r") as f:
for line in f:
lines.append(process_line(line))
with open(sys.argv[1], "w") as f:
for line in lines:
f.write(line)
```
And the following shell commands:
```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```
MozReview-Commit-ID: 91xYCbLC2Vf
The fact that HasTransform() depends on the frame requires the *Internal
functions rather than simply having the public function that takes a
frame call the public function that takes a style context.
MozReview-Commit-ID: CcWZjDTIr52
Note that this now uses AddAndRemoveTransform hints for changes that are
other than adding and removing a transform. Since there's still a
little bit of transform-related stuff there too (which I did make
conditional), I figure it's probably best to leave the name as-is,
although I'd be open to renaming it as well.
As expected, without the patch, the filter and perspective tests fail,
but the added transform test passes. All the tests pass locally with
the patch.
--HG--
extra : commitid : 3ZfnPHG701V
Also renames IsPositioned to IsAbsPosContainingBlock.
--HG--
extra : rebase_source : b412f6291d34e30e8d57e054645bd1e04f43593f
extra : histedit_source : 01a2bd57de4eec4ecf3f3712ee609d70ca14cda4