Commit Graph

3408 Commits

Author SHA1 Message Date
Andreea Pavel
746993f3e1 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-06 07:37:40 +03:00
Gerald Squelart
b099eab802 Bug 1488684 - Made nsIFrame-derived classes and some others 'final' where possible - r=dbaron
All classes deriving from nsIFrame that did not have any subclasses themselves
(at the time of writing this patch) have been marked with `final`.
Some other Layout classes have also been made final, but this was opportunistic
while working on nsIFrame subclasses, and is definitely not exhaustive, further
patches welcome; refer to bug 1332680.

Advantages of marking a class final include:
- Allowing the compiler to devirtualize some method calls (i.e., calling
  virtual functions directly instead of going through the vtable),
- Indicating that the class is not currently subclassed,
- Preventing subclassing without being aware that this would remove the
  finalization benefits of the parent class.
`final` does not signify that these classes should *never* be subclassed, this
is left for developers to decide.

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

--HG--
extra : moz-landing-system : lando
2018-09-06 01:23:14 +00:00
Ting-Yu Lin
90fffcd256 Bug 1488219 - Mark nsDateTimeControlFrame as a leaf frame. r=dholbert
nsDateTimeControlFrame should be a leaf like all the other <input> frames
like nsTextControlFrame, nsCheckboxRadioFrame, etc.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 00:27:43 +00:00
Mats Palmgren
1bc8a36033 Bug 1488301 - Use the parent's content size as the available size for the rendered legend so we calculate auto-margins correctly. r=emilio
The reason we use ComputedSizeWithPadding for the inner
anonymous block (innerAvailSize) is that it inherits the padding:
https://searchfox.org/mozilla-central/source/layout/style/res/forms.css#22
so we artificially inflate it.
2018-09-05 20:27:20 +02:00
Margareta Eliza Balazs
9b4034d1f9 Backed out changeset 69faa23050d9 (bug 1412179) for landing without first patch 2018-08-24 18:32:02 +03:00
Alexis Beingessner
99ab5a469f Bug 1412179 - Implement non-empty legends for wr. r=jrmuizel
MozReview-Commit-ID: 1QqgRcSN1K3

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

--HG--
extra : moz-landing-system : lando
2018-08-24 13:21:28 +00:00
Mats Palmgren
2c96a060ef Bug 1279185 - Make sure we clip all of the fieldset border behind the legend, also when the legend is smaller than the border. r=dholbert 2018-08-23 21:04:35 +02:00
Emilio Cobos Álvarez
27275d8181 Bug 1461706: Sync disabled state of number control regardless of appearance. r=jwatt
I noticed this bug while fixing bug 1478069, but it goes back way earlier.

Differential Revision: https://phabricator.services.mozilla.com/D3867
2018-08-22 13:06:35 +02:00
Mihir Iyer
ce5bd50ad2 Bug 1397768 part 1: Make 'display: flex/grid' in a button take up all the available space. r=dholbert
--HG--
extra : rebase_source : 15b1dc83b9b8b76a839be4455dc42b7a6be8f841
2018-08-17 07:36:50 -07:00
dvarga
87db76ae1a Merge mozilla-central to mozilla-inbound on a CLOSED TREE
--HG--
extra : rebase_source : c9e6b9edae9ecf064d1318fa15d5d57ea42c102a
2018-08-16 01:22:36 +03:00
Daniel Holbert
0878eb4d7e Bug 1483394: Remove unneeded #includes of nsContentUtils.h in /layout. r=TYLin
For each file touched in this patch, the file had an #include for nsContentUtils.h, but no other mentions of the string "nsContentUtils", nor any mention of its "ScriptBlocker"-related types. So these files likely don't need their nsContentUtils.h include anymore, and we can remove it to get a marginal win on build time/complexity.

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

--HG--
extra : moz-landing-system : lando
2018-08-15 07:04:43 +00:00
Cameron McCormack
99d9013b12 Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Narcis Beleuzu
d20e8e7674 Backed out 8 changesets (bug 1483121, bug 1482782) for build bustages on nsDirectoryService.cpp. CLOSED TREE
Backed out changeset 0a8334bbcf45 (bug 1483121)
Backed out changeset cb2dcb859071 (bug 1482782)
Backed out changeset c834d4ca2eef (bug 1482782)
Backed out changeset 887de0efbb67 (bug 1482782)
Backed out changeset 018fdb50a6be (bug 1482782)
Backed out changeset 33a8aa8096c9 (bug 1482782)
Backed out changeset e3632354f16e (bug 1482782)
Backed out changeset 46f8319bee82 (bug 1482782)
2018-08-15 09:14:41 +03:00
Cameron McCormack
d9edae8bde Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
Summary: Depends On D3283

Reviewers: njn!, emilio!

Tags: #secure-revision

Bug #: 1482782

Differential Revision: https://phabricator.services.mozilla.com/D3284
2018-08-15 15:46:39 +10:00
Andreea Pavel
5d75e43adc Merge mozilla-inbound to mozilla-central. a=merge 2018-08-14 19:15:33 +03: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
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
L. David Baron
09f62c0e05 Bug 1481866: Swap order of values in 'overflow' shorthand property. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3069

--HG--
extra : moz-landing-system : lando
2018-08-10 02:20:53 +00:00
Xidorn Quan
346661e6fd Bug 1481125 - Put overflow: -moz-scrollbar-* behind pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D2845

--HG--
extra : moz-landing-system : lando
2018-08-07 13:57:45 +00:00
Xidorn Quan
8421040c69 Bug 1479995 - Rename ScrollbarStyles to ScrollStyles. r=mstange
This change also renames several related functions, as well as fields,
and the header is moved into EXPORTS.mozilla given it is defined under
mozilla namespace.

MozReview-Commit-ID: LqCdcW8fmUN

--HG--
rename : layout/base/ScrollbarStyles.cpp => layout/base/ScrollStyles.cpp
rename : layout/base/ScrollbarStyles.h => layout/base/ScrollStyles.h
extra : rebase_source : 8933f3bca88d5db4b9508e3947f695ecf7511b3e
2018-08-01 16:14:26 +10:00
Kris Maglione
031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00
Kris Maglione
02ba563399 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : source : 0d69b4fb1ed43751cfcbc0b4f2fe3b6a49bc0494
extra : histedit_source : d0ce31513ffaae2fd7f01f6567a97b6d2d96b797%2Cfff837de7a00fa90809d2c3e755097180dfd56d8
2018-05-20 18:10:16 -07:00
Narcis Beleuzu
561ccb2ceb Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione
cb1ee1e34d Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : rebase_source : a13c59d1a5ed000187c7fd8e7339408ad6e2dee6
2018-05-21 16:58:23 -07:00
Kris Maglione
636f1839e5 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : rebase_source : 36565ef5e74360aad14062005e5bdab2939e888b
2018-05-20 18:10:16 -07:00
Morgan Rae Reschenberg
8c326e567e Bug 1470176 - Implement contain:size for fieldset objects. r=dholbert
MozReview-Commit-ID: ImkclemDA9o

--HG--
extra : rebase_source : cc6fc798f8b2daffaa53da4d2cec4e4d20632e2f
2018-07-17 13:14:39 -07:00
Emilio Cobos Álvarez
517256e365 Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

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

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00
Emilio Cobos Álvarez
e1af3b4e1c Bug 1478069: Remove ContentInfo::mChildren. r=bz
It's not needed anymore, since we tag the pseudo-elements at creation time for
styling.

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

MozReview-Commit-ID: 7j4DVEHXYIC
2018-07-25 11:31:23 +02:00
Emilio Cobos Álvarez
26b508d03c Bug 1478069: Trivial frame constructor cleanup. r=TYLin
Using references helps to see when stuff can and cannot be null.

I removed useless aTag / aNamespaceId arguments which are useless now that XBL
can't override them (bug 1450617), so FindXULData is the only one that keeps
them alive.

Also, I took the liberty of renaming a few fooComputedStyle variables to just
fooStyle, and clarify naming in some pseudo-element-related functions to say
originating element (the spec term) and avoid confusing it with the generated
_moz_generated_content_before / _moz_generated_content_after element.

Note that this is a partial state, more stuff will come in the future.

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

MozReview-Commit-ID: 39B30doREUH
2018-07-25 11:31:18 +02:00
Andi-Bogdan Postelnicu
5e3e0d4498 Bug 1453795 - Layout - Initialize member fields in classes/ structures. r=dbaron 2018-07-12 09:42:14 +03:00
Morgan Rae Reschenberg
d7195a66a7 Bug 1467209 - Implement contain:size for HTMLButtonControlFrame. r=dholbert
MozReview-Commit-ID: Jsjs3jxy4z3

--HG--
extra : rebase_source : 2532d959dbcf4e062f50a00e05a512d549357116
2018-06-29 10:27:55 -07:00
Boris Zbarsky
faaf43f77b Bug 1471157. Fix null-deref crash when a drop event has no DataTransfer. r=nika
https://hg.mozilla.org/mozilla-central/rev/41d99ad7144f removed a null-check
that shouldn't have been removed: the datatransfer argument might actually be
null here.
2018-06-27 12:04:26 -04:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Daniel Holbert
53cb368be9 Bug 1468663 part 1: Fill in missing mozilla:: namespaces in layout headers that are referenced by files in layout/generic. r=emilio
This fixes some of the build-bustage that occurs when we disable unification in layout/generic.

Differential Revision: https://phabricator.services.mozilla.com/D1649
2018-06-15 16:14:29 +00:00
Noemi Erli
31fa4e1ccf Bug 1468200 - remove references to 'mulet' in manifest files. r=jmaher
--HG--
extra : rebase_source : d233138d248a4d3a826dc7666e13bd30ceafb496
2018-06-13 05:53:00 +03:00
Emilio Cobos Álvarez
b5a8cf3e7c Revert three changesets (Bug 1451576) for causing bug 1467964 and since it's not generally sound. r=me
MozReview-Commit-ID: CZaLUNlGkX8
2018-06-12 16:52:52 -07:00
Cameron McCormack
3cd117ed4f Bug 1466448 - Part 2: Remove unused ReflowOutput::mFlags. r=mats
--HG--
extra : rebase_source : 41f141ad1f9830c45a4a11cab825ea3d956051ea
2018-06-04 16:22:10 +10:00
Boris Zbarsky
c7f378d7ab Bug 1465875 part 1. Eliminate pointless QIs to nsIDOMNSEditableElement. r=qdot
We expose the relevant APIs on textarea and input elements anyway
(chromeonly).  The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
2018-06-01 22:35:22 -04:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Mihir Iyer
a06dd567c4 Bug 1464165 - Relax assertion for isize not being nscoord_MAX in nsListControlFrame. r=dholbert
MozReview-Commit-ID: A9PRG3uI2h

--HG--
extra : rebase_source : e823da407c01152de112df6f8b8f18c7d3526b39
2018-05-29 17:14:27 -07:00
Boris Zbarsky
9748db120d Bug 1455676 part 8. Remove nsIDOMNode usage from layout/. r=qdot 2018-05-29 22:58:48 -04:00
Yusuf Sermet
3b2bfe587d Bug 1460787 - Change fatal assertion to warning for extremely large sized pages. r=dholbert
MozReview-Commit-ID: 8MpvqbecU2k

--HG--
extra : rebase_source : a4d4552780e916a3fde0a454238fc069722b5604
2018-05-23 10:06:57 -07:00
Emilio Cobos Álvarez
10ce8b38a0 Bug 1463511: Remove useless form.css rule and nsTextControlFrame anon class. r=heycam
Only <textarea> has GetWrapRows() > 0, and the rule for textarea disappeared in
bug 82711.

MozReview-Commit-ID: ERcoLVcufbH

--HG--
extra : rebase_source : 687ae89ce94e0e7f3682f434264661f7b9554819
2018-05-22 19:52:41 +02:00
Emilio Cobos Álvarez
0406fe1464 Bug 1463138: Remove unused nsIFrame::GetPseudoElement. r=mats
MozReview-Commit-ID: 4LFZibUS9DP
2018-05-21 20:03:36 +02:00
Boris Zbarsky
a02a40bdb5 Bug 1462737. Make AsElement() not compile when called on Element or some subclass. r=mccr8
It's just noise if we already have an Element.
2018-05-18 23:37:56 -04:00
Matt Woodrow
0d65266918 Bug 1460491 - Part 1: Split nsDisplayItem::mVisibleRect into two members, one for each stated purpose. Gets rid of the save/restore since we no longer modify the building rect. r=jnicol
MozReview-Commit-ID: 5wcsSoZRN44

--HG--
extra : rebase_source : 1bf7d655b048a972e392514542aee171e20afe82
2018-05-16 15:56:32 +12:00
Emilio Cobos Álvarez
d9ba61f166 Bug 1461299: Ensure the editor root node is marked as NAC even if BindToFrame fails. r=smaug
We do the following:

  CreateRootNode();
  nsresult rv = BindToFrame(this);
  NS_ENSURE_SUCCESS(rv, rv);
  aElements.AppendElement(mRootNode);

That means that if BindToFrame fails, mRootNode will never be appended to
aElements, and thus will never get the native anonymous bits in [1].

BindToFrame should assert, but it indeed can fail due to it being bound to a
different frame in print preview, because nsCSSFrameConstructor's
ReplicateFixedFrames is a massive hack. :(

Just ensure the NAC bit is properly set for now...

[1]: https://searchfox.org/mozilla-central/rev/a85db9e29eb3f022dbaf8b9a6390ecbacf51e7dd/layout/base/nsCSSFrameConstructor.cpp#4193

MozReview-Commit-ID: 6sE8iUk4PCG
2018-05-15 10:43:40 +02:00
Brindusan Cristian
1ff93ba361 Backed out 3 changesets (bug 1461299, bug 1460101) for reftest failures on events/EventStateManager.cpp CLOSED TREE
Backed out changeset fe2b8fcd7a47 (bug 1461299)
Backed out changeset 9a0ca81ddbce (bug 1461299)
Backed out changeset 783cf8b58ba4 (bug 1460101)
2018-05-15 03:13:29 +03:00
Emilio Cobos Álvarez
9f13d43733 Bug 1461299: Ensure the editor root node is marked as NAC even if BindToFrame fails. r=smaug
We do the following:

  CreateRootNode();
  nsresult rv = BindToFrame(this);
  NS_ENSURE_SUCCESS(rv, rv);
  aElements.AppendElement(mRootNode);

That means that if BindToFrame fails, mRootNode will never be appended to
aElements, and thus will never get the native anonymous bits in [1].

BindToFrame should assert, but it indeed can fail due to it being bound to a
different frame in print preview, because nsCSSFrameConstructor's
ReplicateFixedFrames is a massive hack. :(

Just ensure the NAC bit is properly set for now...

[1]: https://searchfox.org/mozilla-central/rev/a85db9e29eb3f022dbaf8b9a6390ecbacf51e7dd/layout/base/nsCSSFrameConstructor.cpp#4193

MozReview-Commit-ID: 6sE8iUk4PCG
2018-05-15 01:17:07 +02:00