Commit Graph
1344 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez bdf1376152 Bug 1603313 - Remove some silly patterns. r=bzbarsky
foo ? true : false

or:

  foo ? false : true

Have always a nicer way to be written.

Differential Revision: https://phabricator.services.mozilla.com/D56842
2019-12-14 05:05:01 +00:00
jeffin143 daf9859748 Bug 1601856 : convert NS_STYLE_VISIBILITY_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56140
2019-12-13 05:34:38 +00:00
jeffin143 d3b5feefb7 Bug 1601990 : convert NS_STYLE_POINTER_EVENTS_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D56203
2019-12-12 10:24:16 +00:00
Emilio Cobos Álvarez 64471622e1 Bug 1602317 - Update cbindgen to 0.11.1. r=jrmuizel
This includes more bitflag operators, which means we can remove some slightly
ugly code.

Differential Revision: https://phabricator.services.mozilla.com/D56308
2019-12-09 03:20:53 +00:00
Emilio Cobos Álvarez 1fccbabe09 Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

Differential Revision: https://phabricator.services.mozilla.com/D56306
2019-12-09 03:32:28 +00:00
Gabriele Svelto eeb9bfc398 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443
2019-12-06 09:16:44 +00:00
jeffin143 608491cf62 Bug 1600481 : convert NS_STYLE_ISOLATION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55378
2019-12-06 04:42:18 +00:00
Jonathan Kew bb537c5c4d Bug 1601025 - Optimize changehint for modifications to underline-offset or skip-ink rendering; a full reflow should not be needed. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55705
2019-12-03 20:29:55 +00:00
Jonathan Kew 70fc8742b6 Bug 770780 - Add support for parsing of the CSS text-underline-position property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54722
2019-12-04 11:39:15 +00:00
Timothy Nikkel ff9364e0eb Bug 1490571. Pointer events changes need to schedule a paint because they can change the event regions override on layers. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D55603
2019-12-04 08:00:25 +00:00
jeffin143 b81d2ec1a7 Bug 1600482 : convert NS_STYLE_RUBY_POSITION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55379
2019-12-02 17:22:42 +00:00
jeffin143 f0fe02928c Bug 1600484 : convert NS_STYLE_TEXT_SIZE_ADJUST_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55382
2019-12-02 05:09:33 +00:00
jeffin143 c22724cc14 Bug 1600483 : convert NS_STYLE_RUBY_ALIGN_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55380
2019-12-01 13:08:49 +00:00
jeffin143 fbb2ed37ee Bug 1600476 : convert NS_STYLE_TOP_LAYER_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D55377
2019-12-01 13:05:55 +00:00
jeffin143 f27c98bf48 Bug 1598528 : convert NS_STYLE_TEXT_ORIENTATION_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54252
2019-11-26 04:50:04 +00:00
jeffin143 6683febbc1 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920
2019-11-25 16:00:23 +00:00
jeffin143 96580d1c30 Bug 1598348 : convert NS_STYLE_OBJECT_FIT_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54153
2019-11-25 15:40:50 +00:00
jeffin143 942a5d6175 Bug 1598539 : convert NS_STYLE_IME_MODE_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54255
2019-11-25 15:41:18 +00:00
Noemi Erli e8d68a23fd Backed out changeset 8cdae49ab472 (bug 1598539) for causing build bustages in EditorBase.cpp CLOSED TREE 2019-11-22 22:04:00 +02:00
jeffin143 1ec0ffcc3c Bug 1598539 : convert NS_STYLE_IME_MODE_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54255
2019-11-22 13:33:59 +00:00
Razvan Maries 458216ffa6 Backed out changeset dce49f743139 (bug 1597893) for build bustages on nsCocoaWindow.mm. CLOSED TREE 2019-11-22 14:50:12 +02:00
jeffin143 362e54c349 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920
2019-11-21 16:52:06 +00:00
Bogdan Tara 38dced0a56 Backed out changeset 726c8aa10d1a (bug 1597893) for bustages complaining about nsCocoaWindow.h CLOSED TREE 2019-11-21 15:35:09 +02:00
jeffin143 9c6aa04500 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920
2019-11-21 12:09:03 +00:00
jeffin143 0af79764e3 Bug 1597979 : convert NS_STYLE_TEXT_ANCHOR_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53956
2019-11-21 08:48:19 +00:00
jeffin143 a031243d4d Bug 1597881 : convert NS_STYLE_STROKE_LINECAP_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53908
2019-11-21 06:07:30 +00:00
Emilio Cobos Álvarez 3f9cab940b Bug 1597160 - Remove nsChangeHint_UpdateWidgetProperties. r=mstange
:ntim was about to add another widget-affecting property (pointer-events) to
menupopups to replace the mousethrough attribute, see bug 1597120.

But pointer-events is inherited, and thus changing pointer-events on any element
would cause a change list of length == the number of descendants of the element,
which is not amazing.

So I suggested using DidSetComputedStyle instead, as this is fairly
popup-specific, but we may as well be consistent and do the same everywhere.

This removes the code to handle the -moz-window-* properties on the root frame,
as I haven't seen any usage of them (we always set them in panel or menupopup).

Differential Revision: https://phabricator.services.mozilla.com/D53377
2019-11-20 02:37:06 +00:00
jeffin143 b143dfb33a Bug 1597741 : use Enum class for NS_STYLE_SHAPE_RENDERING instead of #define r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53840
2019-11-20 00:49:19 +00:00
Emilio Cobos Álvarez 2aec88f30b Bug 1593951 - Use MaybeUninit in style struct clone impls / constructors. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D51788
2019-11-12 20:30:42 +00:00
Tim Nguyen 1da29fc40a Bug 1576946 - Remove nsStackFrame platform code. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D49487
2019-11-12 19:50:19 +00:00
Razvan Maries 79c29de8bb Backed out changeset 6cd92affba42 (bug 1593951) for Valgrind build bustages. CLOSED TREE 2019-11-12 19:18:42 +02:00
Emilio Cobos Álvarez cb192f89a4 Bug 1593951 - Use MaybeUninit in style struct clone impls / constructors. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D51788
2019-11-12 11:49:40 +00:00
Emilio Cobos Álvarez 46c961d4ae Bug 1591297 - Remove -moz-binding, nsStyleDisplay::mBinding and similar. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D50556
2019-10-26 11:37:33 +00:00
Daniel Holbert 9430a58263 Bug 1590639 part 4: Fix non-unified build issues in layout/style. r=emilio
This patch:

- Gives layout/generic/AnonymousContentKey.h an include for `<stdint.h>` to
  provide the uint8_t type, and TypedEnumBits.h to provide the
  MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS macro. (This is a change in another
  directory, but it's needed in order for layout/style/ServoStyleSet.cpp to
  build successfully.)
- Adds a missing "nsINode" forward-decl to dom/base/IdentifierMapEntry.h,
  because it uses that type in function declarations.  (This change is needed
  in order for layout/style/CachedInheritingStyles.cpp to build successfully.)
- Gives CSSStyleRule.cpp an include for PseudoStyleType.h,
  nsCSSPseudoElements.h, and CSSEnabledState.h because it uses those types.
- Gives GeckoBindings.cpp an include for gfxTextRun.h, to provide the definition
  of type gfxFontGroup (so GeckoBindings can call GetFirstValidFont() on an
  object of that type).
- Gives Loader.h an include for nsIContentInlines.h, to provide the inline
  function IsInUAWidget().
- Gives Rule.cpp an include for HoldDropJSObjects.h, to provide DropJSObjects().
- Gives nsImageLoader.cpp an include for DocumentInlines.h (and Document.h for
  good measure), to provide the inline function GetPresContext().
- Gives nsStyleStruct.cpp an include for DocumentInlines.h, to provide inline
  function Document::GetPresContext().
- Gives nsStyleTransformMatrix.h an include for Units.h (instead of gfxPoint.h,
  which isn't useful) to provide the CSSPoint type.
- Gives nsStyleTransformMatrix.h an include for ServoStyleConsts.h, to provide
  LengthPercentage and the various StyleRotate/StyleScale/StyleTransform/etc
  types. (These can't be easily forward-declared, because some of them are
  legitimate types whereas others are type aliases. We could theoretically
  forward-declare all of the underlying types and then repeat the type aliases,
  but that'd be verbose and unmaintainable.)

Depends on D50165

Differential Revision: https://phabricator.services.mozilla.com/D50166
2019-10-23 08:14:54 +00:00
Emilio Cobos Álvarez 5018c8c679 Bug 1590357 - Update overflow areas for visible -> unscrollable clip changes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D50049
2019-10-22 19:02:36 +00:00
Emilio Cobos Álvarez 8d187de717 Bug 1590273 - Remove useless early-outs in nsStyle{Padding,Margin}::CalcDifference. r=hiro
Best-case they're redundant.

Differential Revision: https://phabricator.services.mozilla.com/D50021
2019-10-22 02:34:20 +00:00
Emilio Cobos Álvarez c944f97d50 Bug 1590203 - Handle overflow changes more gracefully when possible. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D49987
2019-10-21 23:47:31 +00:00
Savo 1dafeac1b5 Bug 1586068 - Replace #define NS_STYLE_FLEX_WRAP with enum class. r=emilio
MANUAL PUSH: Rebasing contributor patch.

Differential Revision: https://phabricator.services.mozilla.com/D48166
2019-10-07 00:42:12 +02:00
Cameron McCormack 9ebc9eed78 Bug 1578147 - Align the Rust and C++ representations of WritingMode. r=emilio,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D44412
2019-09-09 04:49:55 +00:00
Emilio Cobos Álvarez 967c914a9a Bug 1578295 - Use cbindgen for counters. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D44403
2019-09-02 23:11:26 +00:00
Emilio Cobos Álvarez 3ff0d3f0af Bug 1576703 - Update cbindgen. r=boris
This cleans up the pattern of "Use a private dtor so that the helper functions
do the right thing" by enabling it everywhere using:

  https://github.com/eqrion/cbindgen/pull/377

It also caught some uninitialized value issues.

I think they're mostly harmless since we zero-initialize our structs:

https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/servo/components/style/properties/gecko.mako.rs#632

And since we override the clip rect, which is the other bit of code that was
failing to build with this change.

Differential Revision: https://phabricator.services.mozilla.com/D43491
2019-08-26 23:18:46 +00:00
Emilio Cobos Álvarez 0324b0f1c5 Bug 1576666 - Use cbindgen for clip / -moz-image-region. r=boris
This also fixes some of the issues with -moz-image-region, where we just minted
an auto out of the blue.

Depends on D43472

Differential Revision: https://phabricator.services.mozilla.com/D43474
2019-08-26 23:09:47 +00:00
Emilio Cobos Álvarez 32ba63e317 Bug 1575608 - Simplify -x-span property. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D42914
2019-08-21 20:02:13 +00:00
Emilio Cobos Álvarez ffb949c2b1 Bug 1575608 - Avoid manual paint-order glue code. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D42913
2019-08-21 19:47:53 +00:00
Emilio Cobos Álvarez ccfb3df9a5 Bug 1554777 - Use SIZE_AVAILABLE rather than loaded to figure out whether to try to draw a border image. r=tnikkel
The current code needs to handle incomplete draws already due to async decoding,
and this prevents the race condition where we paint between the size-available
and load notifications, as the CSS image loader only invalidates for the first.

Once we try to decode the image at least once, then we'd repaint properly from
ImageLoader::OnFrameComplete.

Differential Revision: https://phabricator.services.mozilla.com/D41006
2019-08-15 19:03:06 +00:00
Mats Palmgren 7183051087 Bug 1105868 part 1 - Use nsStyleDisplay::IsListItem() in a few places to prepare for inline list-items. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D39830
2019-08-14 14:36:18 +00:00
Connor Brewster e428453709 Bug 1178765 - Part 3: Add backdrop-filter display items to Gecko r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D39099
2019-08-13 22:02:57 +00:00
Charlie Marlow d296699b8d Bug 1558929: adding from-font support to text-underline-offset and text-decoration-thickness r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D41476
2019-08-13 17:43:25 +00:00
Emilio Cobos Álvarez 3e0f527c21 Bug 1572805 - Use cbindgen for text-emphasis-style. r=boris
I sent https://github.com/eqrion/cbindgen/pull/377 since I got sick of
copy-pasting the private default constructor stuff :)

Differential Revision: https://phabricator.services.mozilla.com/D41419
2019-08-10 18:11:31 +00:00
Daniel Varga ead7b8c5f2 Backed out 2 changesets (bug 1572805) for build-rusttests failure. On a CLOSED TREE
Backed out changeset 849ca4b3f9de (bug 1572805)
Backed out changeset 81b56d76505a (bug 1572805)
2019-08-10 21:07:03 +03:00