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

140 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez bba367ec8f Bug 1613349 - Rename nsIFrame::RemoveProperty to nsIFrame::TakeProperty. r=dholbert
This is hopefully clearer naming.

Differential Revision: https://phabricator.services.mozilla.com/D61755

--HG--
extra : moz-landing-system : lando
2020-02-06 00:13:38 +00:00
Gabriele Svelto 69790bc62e 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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Brian Grinstead f19f38776b Bug 1593119 - unifdef MOZ_XBL r=bzbarsky
This was generated with:

```
rg -l -g '*.{cpp,h}' MOZ_XBL . | while read FILE ; do
   echo $FILE
   unifdef -m -UMOZ_XBL $FILE
done
```

After this, I manually removed the directive in nsContentUtils.cpp due to:

  unifdef: ./dom/base/nsContentUtils.cpp: 4630: Unterminated string literal
  unifdef: Output may be truncated

Differential Revision: https://phabricator.services.mozilla.com/D51337

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:13 +00:00
Brendan Dahl c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

Differential Revision: https://phabricator.services.mozilla.com/D45613

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Edgar Chen 5bc0854d2b Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 20:51:25 +00:00
Daniel Varga bc19cdb06d Backed out 3 changesets (bug 1578355) for build bustage at build/src/dom/base/nsSyncLoadService.h:48:21. On a CLOSED TREE
Backed out changeset d50ad759f129 (bug 1578355)
Backed out changeset 339ab54ca471 (bug 1578355)
Backed out changeset 284299dac42c (bug 1578355)
2019-09-20 14:05:12 +03:00
Edgar Chen 5b6fe53148 Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 10:31:55 +00:00
L. David Baron ce547cd6f5 Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert
For now, always pass null, except when passing it through from one
overload to another.

Differential Revision: https://phabricator.services.mozilla.com/D38389

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:45 +00:00
Andrew Swan c98f8ba33c Bug 1519577 Remove support for unused toolbarbutton anchor attribute r=NeilDeakin
This code contains an undesirable dependency between the layout code and
the implementation of toolbarbutton.  Since it isn't actually used anywhere
by the firefox UI, remove it here.

Differential Revision: https://phabricator.services.mozilla.com/D31939

--HG--
extra : rebase_source : 663776a71d658e782650e85c6c27716f0c8736d8
2019-05-14 13:08:53 -07:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

Differential Revision: https://phabricator.services.mozilla.com/D28606

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +00:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

Differential Revision: https://phabricator.services.mozilla.com/D25325

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

Differential Revision: https://phabricator.services.mozilla.com/D25309

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Masayuki Nakano 2f9688c14e Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

Differential Revision: https://phabricator.services.mozilla.com/D27476

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

Differential Revision: https://phabricator.services.mozilla.com/D26388

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00
Mats Palmgren 8166e09775 Bug 1540198 - [DEBUG] Assert that the child frames have the correct parent pointer in SetInitialChildList. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D25434

--HG--
extra : rebase_source : defd00e62dc90e316cb12c67521951a1e5892489
2019-03-29 18:34:17 +01:00
Neil Deakin 68ec31a473 Bug 1530594, generate frames before setting the active child in a menulist, so that menulists with sizetopopup='none' will still allow keyboard navigation when the menulist has not yet been opened, updated to get popup type earlier to avoid possible crash, r=tnikkel
--HG--
extra : rebase_source : 953446ea44e48966fa41f8623aae259aed032ca0
2019-03-05 04:32:40 -05:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Timothy Guan-tin Chien 23f97d18fe Bug 1519917 - Consider <menulist> with sizetopopup unset equal to sizetopopup="pref" r=NeilDeakin
sizetopopup is set to "pref" by default by the menulist XBL binding, however
when converting the binding to custom element, it did not set the attribute value
at a time that is early enough.

This patch updates nsMenuPopupFrame and nsMenuFrame so that it considers
<menulist> with unset sizetopopup attribute as equal to "pref" to avoid
the problem above.

This reftest
layout/reftests/xul/menulist-shrinkwrap-2.xul
can detect this failure.

The sizetopopup attribute is never meant to be set dynamically;
the fix here does not allow us to do so.

Differential Revision: https://phabricator.services.mozilla.com/D16410

--HG--
extra : moz-landing-system : lando
2019-01-16 16:30:45 +00:00
Paolo Amadini 2a67f25fbd Bug 1454360 - Use "arrowscrollbox" in the "popup-scrollbars" binding. r=NeilDeakin
This prepares this binding for the unification with the "popup" binding, and removes the last consumer of the scrollByIndex method of XULScrollElement.

Because some code paths in "arrowscrollbox" are optimized using requestAnimationFrame, the related scrolling tests are now asynchronous.

Differential Revision: https://phabricator.services.mozilla.com/D15276

--HG--
extra : rebase_source : f5d26df106785f2c0d158b8a23a648a71ab06b2d
2019-01-04 15:07:12 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Cameron McCormack 1db3f9da78 Bug 1512716 - Re-indent NS_QUERYFRAME macros after clang-format. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D13995

--HG--
extra : moz-landing-system : lando
2018-12-07 20:00:18 +00:00
Cameron McCormack 1ea7c3efc9 Bug 1511854 - Part 2: Fix some more formatting oddities in layout/ after the clang-format. r=TYLin
Depends on D13686

Differential Revision: https://phabricator.services.mozilla.com/D13775

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:05 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Neil Deakin e109ab758e Bug 1499964, remove nsMenuListType and have nsMenuFrame::GetParentMenuListType return bool, r=paolo 2018-11-07 14:22:29 -05:00
Nicholas Nethercote 36c48819d1 Bug 1451169 - Use `nsStaticAtom*` instead of `nsStaticAtom**` in Element.h. r=baku
--HG--
extra : rebase_source : db09f7ab93a1c41ace03a645623f78a27ecfff8c
2018-04-03 13:21:06 +10:00
Paolo Amadini bfef02108d Bug 1457216 - Remove support for editable menulists. r=surkov,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D4306

--HG--
extra : rebase_source : e8b4946c8f657e2283bc96cb08de802493e3a826
2018-08-24 15:44:38 +01:00
Sahil Bhosale d0196f98ff Bug 1479605 - Remove ENSURE_TRUE in nsFrame.h, and replace it with NS_ENSURE_TRUE_VOID. r=TYLin 2018-08-13 12:42:00 +03:00
Neil Deakin 5d96e7d4d3 Bug 1444920, remove the debug='true' flag from xul elements and the corresponding debug frame flags, r=dholbert 2018-05-02 10:32:54 -04:00
Boris Zbarsky 93af0eea13 Bug 1455674 part 14. Remove use of nsIDOMElement in layout. r=qdot 2018-04-26 23:37:33 -04:00
Ciure Andrei 873d562bc3 Backed out 8 changesets (bug 1451169) on request from njn a=backout
Backed out changeset b92f856e15a8 (bug 1451169)
Backed out changeset 348e825756fa (bug 1451169)
Backed out changeset 624d82428726 (bug 1451169)
Backed out changeset 4d51610ca08e (bug 1451169)
Backed out changeset bb76a9589717 (bug 1451169)
Backed out changeset c145fbd03947 (bug 1451169)
Backed out changeset 6d36289e0f54 (bug 1451169)
Backed out changeset 914fb7cd9fc3 (bug 1451169)

--HG--
extra : histedit_source : 94de6631919f895dec422bc0e564f5baf885ba4a%2C18f52c6c11d3064d3137a6847575effb7d407894
2018-04-11 11:22:05 +03:00
Nicholas Nethercote a560608963 Bug 1451169 - Use `nsStaticAtom*` instead of `nsStaticAtom**` in Element.h. r=baku
And then fix up everything else that needs to change as well.

MozReview-Commit-ID: GDMfERqdQAc

--HG--
extra : rebase_source : 01fe06c3182245a409099a53383d92bf4fa0155c
2018-04-03 13:21:06 +10:00
Neil Deakin 6a995d0462 Bug 1448018, remove ContainerBoxObject which is only used to access the docshell, but bug 1448018 made the docshell accessible from the frameloader instead so the container box object is no longer being used. Change some editor tests which just access the docShell directly rather than through the box object, r=bz 2018-03-29 10:44:52 -04: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
Boris Zbarsky 7e7ef3c600 Bug 1436508 part 6. Switch layout/xul from nsIDOMKeyEvent to KeyboardEvent. r=masayuki
MozReview-Commit-ID: Cp4krHgxXzQ
2018-02-09 11:17:09 -05:00
Thomas Duellmann 022433e985 Bug 106327 - Change shortcut label of VK_RETURN to "Enter" on Win/Unix. r=enndeakin, r=Gijs
--HG--
extra : rebase_source : 693918abc095cfca4f80e07855f56b203d65f55e
2018-01-04 13:50:30 +02:00
Andreea Pavel b88f05e893 Backed out changeset 3a55b10a6974 (bug 106327) for build bustage on
/builds/worker/workspace/build/src/layout/xul/nsMenuFrame.cpp r=backout a=backout on a CLOSED TREE

--HG--
extra : amend_source : e09bf154093728898ad2c27dd185108f9ff3b009
2018-01-05 04:46:46 +02:00
Thomas Duellmann c27f04ab20 Bug 106327 - Change shortcut label of VK_RETURN to "Enter" on Win/Unix. r=enndeakin, r=Gijs 2018-01-04 13:50:30 +02:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Emilio Cobos Álvarez 74b31155f7 Bug 1423167: Move most attribute-related methods from nsIContent to Element. r=bz
MozReview-Commit-ID: 6WXqNiODttD
2017-12-06 16:05:59 +01:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +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
Matt Woodrow d8a662f0d2 Bug 1406727. r=mstange,froydnj a=abillings
--HG--
extra : rebase_source : a9932eb10d3ca451e1ce3a424cd48e957801f593
2017-10-17 15:19:44 +13:00
Kris Maglione 663e9cb7fa Bug 1404198: Part 2e - Switch to NS_NewTimer* in layout. r=njn
MozReview-Commit-ID: 2WxyAXpJ3Fg

--HG--
extra : rebase_source : 4166c82c86558f79a4b41566a9997584e5fc94cf
2017-10-15 23:13:31 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00