Граф коммитов

73 Коммитов

Автор SHA1 Сообщение Дата
Ryan Hunt 3bb5661553 Bug 1508789 - Force 'pointer-events: auto' used value for root content. r=mstange
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
2018-11-22 14:16:14 +00:00
Xidorn Quan 33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Morgan Rae Reschenberg f72ce47c36 Bug 1472919 - Establish stacking context, containing block, independent formatting context for contain:layout. r=dbaron
MozReview-Commit-ID: H36HpePX29C

--HG--
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-absolute-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-containing-block-absolute-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-fixed-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-containing-block-fixed-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-formatting-context-float-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-formatting-context-float-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-formatting-context-margin-001-ref.html => layout/reftests/w3c-css/submitted/contain/contain-layout-formatting-context-margin-001-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-formatting-context-margin-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-formatting-context-margin-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-no-principal-box-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-001.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-absolute-001-ref.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-002-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-absolute-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-002.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-fixed-001-ref.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-003-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-paint-containing-block-fixed-001.html => layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-no-principal-box-003.html
extra : rebase_source : d6e53cd496c98949b0b4ecfb96d6a8a5eb4d6635
2018-07-20 10:57:22 -07:00
L. David Baron 5933830a47 Bug 1479859 patch 4 - Test becoming a containing block for contain:paint only for those frames that support it. r=dholbert
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
2018-08-07 15:02:08 -07:00
L. David Baron 552f835723 Bug 1479859 patch 2 - Send nsChangeHint_UpdateContainingBlock when containing block-ness changes due to one property change, while another property that might trigger containing block-ness doesn't do so because of the frame type. r=emilio
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
2018-08-07 15:02:07 -07:00
Emilio Cobos Álvarez de6fa5fd09 Bug 1464060: Remove some unused templating and arguments. r=xidorn
Also don't rely on 'using namespace mozilla' in the cpp files that include
nsStyleStructInlines.h.

MozReview-Commit-ID: DLZiMpSzIFn
2018-05-28 10:40:00 +02:00
Matt Woodrow 95856dac21 Bug 1462412 - Correctly ignore the perspective property for frames that aren't transformable. r=dbaron 2018-05-23 10:41:19 +12:00
Kristen Wright 031610cc8e Bug 1459367 - Convert NS_STYLE_IMAGELAYER_ATTACHMENT_* to enum class. r=manishearth
Converted NS_STYLE_IMAGELAYER_ATTATCHMENT_* vals to enum class, StyleImageLayerAttachment.
2018-05-08 15:05:33 -07:00
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
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
2018-03-29 22:15:46 +11:00
Xidorn Quan 3c6f12cb3a Bug 1449039 part 5 - Remove CSS_PROPERTY_{ABS,FIX}POS_CB constants. r=emilio
MozReview-Commit-ID: 9QZyI1EsJ6l

--HG--
extra : rebase_source : 75aa10ede53d2dd4d6014dfdf6b56b9d13b6d2a5
2018-03-27 11:05:05 +11:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
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
2017-10-27 10:33:53 -07:00
Emilio Cobos Álvarez e44543aad4 Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
MozReview-Commit-ID: 5Nzhyta5Hle

--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
cku a52259bf72 Bug 1349462 - Part 1. Rename IsSVGText as IsInSVGTextSubtree. r=heycam
MozReview-Commit-ID: LTo6c8tTtaf

--HG--
extra : rebase_source : bc6913c42cca141d7a3098fdd4dcc72fbf146b5a
2017-03-23 15:29:11 +08:00
Bobby Holley 5400209ff6 Bug 1343388 - Use threadsafe style struct accessor in assertion. r=emilio
MozReview-Commit-ID: 5DdcKgyADbE
2017-02-28 18:07:49 -08:00
Bobby Holley d05a45802c Bug 1340339 - Generalize the mechanism for accessing servo style structs without side effects and use it in CalcStyleDifferenceInternal. r=heycam
MozReview-Commit-ID: 54cL2ePc0OF
2017-02-16 21:57:48 -08:00
Bobby Holley 37398f991c Bug 1335317 - Avoid calling StyleEffects() during the parallel traversal. r=heycam 2017-02-08 17:04:46 -08:00
Manish Goregaokar aad318e17a Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT

--HG--
extra : rebase_source : 232f90b8b107f7fb49f47a29a4e493660b8a7d87
2016-09-04 00:16:58 +05:30
Emilio Cobos Álvarez 619cb14d87 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
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
2016-09-01 20:41:17 -07:00
L. David Baron 155cf7f9b8 Bug 1251075 - Split out the parts of nsStyleDisplay::Is{Abs,Fixed}PosContainingBlock that don't depend on the frame. r=bz
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
2016-08-29 11:43:29 -07:00
Kevin Chen eac3fc0e13 Bug 1285320 - Part 1: Add struct "CachedBorderImageData" to keep cached data for border in nsStyleImage. r=dholbert 2016-07-31 20:23:00 -04:00
Kartikaya Gupta 504b319a29 Bug 1287185 - Disable paint skipping for scrollframes with background-attachment:local. r=mstange
MozReview-Commit-ID: GMgIyxUd20c

--HG--
extra : rebase_source : 2fec3dd0a02aa0ab6eab69e9e6ee6229863be10e
2016-07-15 15:56:39 -04:00
Xidorn Quan 67093c6823 Bug 1268347 - Forbid break opportunities inside horizontal-in-vertical. r=jfkthame
MozReview-Commit-ID: K8ao3D0IE93

--HG--
extra : rebase_source : dbdd0ec230181468cacd6aec83dcf12275bd2815
2016-05-03 14:39:24 +10:00
Cameron McCormack 6b84ca3abb Bug 1261754 - Part 12: Move filter from nsStyleSVGReset to nsStyleEffects. r=dholbert 2016-04-12 15:52:43 +10:00
Cameron McCormack 6f4ce86293 Bug 1261754 - Part 7: Move pointer-events from nsStyleVisibility to nsStyleUserInterface. r=dholbert 2016-04-12 15:52:41 +10:00
L. David Baron d588bfd40b Bug 1230701 - Make will-change:position create a containing block for absolutely-positioned elements. r=dholbert
--HG--
extra : commitid : 99HuPIkGhg5
2015-12-07 18:39:41 -05:00
L. David Baron af419fa7ec Bug 1227766 patch 3 - Make will-change cause creation of a containing block for fixed and absolutely positioned elements when needed. r=dholbert
--HG--
extra : commitid : 8VbTSvfxslI
2015-11-30 15:46:44 -08:00
L. David Baron 9ae470dda0 Bug 1227766 patch 1 - Add flag for CSS properties that establish a containing block for fixed positioned elements. r=dholbert
--HG--
extra : commitid : HBDy7CHmdvg
2015-11-30 15:46:44 -08:00
Kyle Zentner f478a9bc3f Bug 1170781 - Patch 1: Implement CSS 'contain: paint'. r=dholbert 2015-11-09 13:32:00 +01:00
L. David Baron 8109f0861d Bug 1187851 patch 2 - Cleanup to prepare for making dynamic changes to filter and perspective change fixed position containing block for descendants. r=roc
--HG--
extra : commitid : BOKbXL5V3Bw
2015-08-03 20:18:00 -07:00
L. David Baron 7bf9f07a6e Backed out changeset f24dbdeeaef1 (Bug 1187851 patch 1) for reflow counting failures in Gaia integration tests apps/system/test/marionette/edges_gesture_test.js and apps/system/test/marionette/homescreen_navigation_test.js .
--HG--
extra : commitid : A94PEds11qA
2015-08-02 22:35:28 -07:00
L. David Baron e78b42c1b2 Bug 1187851 patch 1 - Make dynamic changes to filter and perspective change fixed position containing block for descendants. r=roc
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
2015-08-02 21:03:09 -07:00
Xidorn Quan 21b619291a Bug 1149009 - Suppress line break inside text frame if it is directly contained by ruby content box. r=dbaron
--HG--
extra : source : 27743ccd4b9be84847c7eb6590adcf96fb424999
2015-05-04 09:52:53 +12:00
Xidorn Quan c9ec579ba2 Backout a6dbd23da598 (bug 1139283) since it is currently not needed.
--HG--
extra : source : 3acc263e7d18fc2946bd043edcf7ae865e3874fe
2015-03-20 15:12:17 +11:00
Xidorn Quan 25df7941eb Bug 1143558 part 1 - Fix line break suppression when newline is significant. r=roc
--HG--
extra : source : c700ba786622769700d740c6761ca5a66879b761
2015-03-17 19:10:15 +11:00
Robert O'Callahan 0eaf4ed6de Bug 1125767. CSS/SVG filters on an element should make it a containing block for fixed-pos and abs-pos descendants. r=mats
--HG--
extra : rebase_source : 0ff5c8df669024ad487ff6360fef38519830ee64
extra : histedit_source : 2166fc8916cf44001e0b9344153d7bba8dcd10ac
2015-03-09 23:44:49 +13:00
Robert O'Callahan c7d1538273 Bug 1125767. Centralize code into nsStylePosition::IsFixedPosContainingBlock. r=mats
Also renames IsPositioned to IsAbsPosContainingBlock.

--HG--
extra : rebase_source : b412f6291d34e30e8d57e054645bd1e04f43593f
extra : histedit_source : 01a2bd57de4eec4ecf3f3712ee609d70ca14cda4
2015-03-12 16:21:01 +13:00
Xidorn Quan d4289c7714 Bug 1139283 - Move some properties from nsStyleDisplay to nsStylePosition. r=dbaron
The moved properties are:
* clip
* transform-style
* transform-origin
* backface-visibility
* perspective
* perspective-origin
* will-change

--HG--
extra : source : 42bbf0328b450d1094250159fe9f7f0d07622290
2015-03-08 18:43:22 +11:00
Aryeh Gregor 60fbc97021 Bug 1053190 - Reduce unnecessary inclusion of nsINode.h in headers; r=ehsan 2014-08-18 17:44:50 +03:00
Daniel Holbert 86232178d1 Bug 985336: Remove unnecessary #includes from headers in layout/style. r=dbaron 2014-05-09 08:23:14 -07:00
Matt Woodrow be161f1c7c Bug 976365 - Make 'perspective' create a containing block for absolute and fixed positioned children. r=dbaron 2014-03-25 11:45:43 +13:00
Nicholas Cameron f3ead74e4f Bug 700926. Use nsStyleImage and nsRenderingContext to draw border-images. r=roc 2014-01-31 16:36:41 +13:00
Robert Longson dc06f6d670 Bug 889235 - Make text-shadow work on SVG text. r=cam 2014-01-13 12:21:42 +00:00
Ehsan Akhgari b1e52dbb47 Bug 908778 - Don't #include nsIContent.h in nsIFrame.h; r=mats 2013-08-23 18:15:45 -04:00
Cameron McCormack 5c2f7b821d Bug 848973 - Make nsStyleDisplay::IsBlockInside() and friends work only on style structs for the passed in frame and document them. r=roc
--HG--
extra : rebase_source : a8559b62124bec058f2857d50cf7f65f176c3727
2013-04-07 09:40:07 +10:00
Phil Ringnalda 0ecf218a04 Back out c04824522d46 (bug 848973) for (at least) 10.8 and Android reftest failures
CLOSED TREE
2013-03-26 23:31:57 -07:00
Cameron McCormack eb903ad1da Bug 848973 - Document what aFrame means in nsStyleDisplay::IsBlockInside() and friends. r=roc 2013-03-27 15:49:56 +11:00
Cameron McCormack ca4d21a415 Bug 842142 - Prevent odd text wrapping in SVG text. r=roc 2013-03-25 14:50:59 +11:00