Commit Graph

2820 Commits

Author SHA1 Message Date
Xidorn Quan
c3a97dac83 Bug 1417220 - Force re-resolve style for doc element when binding requires so. r=emilio
MozReview-Commit-ID: DdbpZnk7tCZ
2017-11-15 15:39:29 -08:00
Chris Peterson
c5d0841695 Bug 1416164 - Replace NS_POSTCONDITION with MOZ_ASSERT. r=froydnj
MozReview-Commit-ID: 9K3Ksf36uxr
2017-11-04 22:48:48 -07:00
Emilio Cobos Álvarez
c5e6b1e66c Bug 1415538: Remove dead frame construction code (InsertFirstLineFrames). r=mats
InsertFirstLineFrames has been dead for a long time, and I don't think it's
worth to keep it around. It's in the VCS history anyway.

MozReview-Commit-ID: FetYB6nf38D
2017-11-08 11:57:39 +01:00
Emilio Cobos Álvarez
8e80489f3a Bug 1415149: Simplify nsCSSFrameConstructor::GetRangeInsertionPoint. r=bz
MozReview-Commit-ID: HsICs5TvhGU
2017-11-06 19:08:08 +01:00
Emilio Cobos Álvarez
856d499357 Bug 1415152: No need for AdjustAppendForAfter, since ::after is handled in FindNextSibling. r=mats
MozReview-Commit-ID: 5jfJul3cJj3
2017-11-06 18:56:00 +01:00
Mats Palmgren
26c8be1e23 Bug 1400618 part 2 - Remove the nsIFrame::GenConProperty property and make aPostDestroyData deal with unbinding it. r=bz
MozReview-Commit-ID: HJ5OTJ4v4Y1
2017-11-07 01:20:34 +01:00
Emilio Cobos Álvarez
a289950f9f Bug 1413619: Fix insertion point computation when display: contents pseudos are involved. r=mats,bz
This is a significant rework of how do we compute the insertion point of a
node.

We handle pseudos in the same function instead of out of band, and also recurse
up when the parent has display: contents, which simplifies the code IMO.

MozReview-Commit-ID: 1rSfv1Tq5gO
2017-11-04 11:58:16 +01:00
Ryan VanderMeulen
6735413a2e Backed out changeset ee243422ed36 (bug 1413619) for test failures. 2017-11-01 17:29:10 -04:00
Emilio Cobos Álvarez
04fb712a4c Bug 1413619: Fix insertion point computation when display: contents pseudos are involved. r=mats
This actually fixes bug 1251799, and bug 1359656. Turns out the bug it was
hiding was this one! :)

MozReview-Commit-ID: KCSsu4T0PER
2017-11-01 18:56:13 +01:00
Emilio Cobos Álvarez
8a66e27965 Bug 1413361: EnsureFrameForTextNode shouldn't reconstruct synchronously without up-to-date styles. r=bz
MozReview-Commit-ID: IzpcdCdcPjr
2017-11-01 20:06:28 +01:00
Emilio Cobos Álvarez
1ead7999d9 Bug 979782: Enable lazy frame construction for display: contents direct descendants. r=mats
There's no reason I can think of this wouldn't work, and try is totally green
without it.

MozReview-Commit-ID: K9QXbAOFu3A
2017-10-31 09:21:59 +01:00
Emilio Cobos Álvarez
e894349700 Bug 979782: Fixup FindFrameForContentSibling to don't duplicate work and trigger assertions for display: contents. r=mats
MozReview-Commit-ID: HAZh0RYY76x
2017-11-01 16:40:09 +01:00
Daniel Holbert
8fea3c215f 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
2017-10-27 10:33:53 -07:00
Kris Maglione
0951de1842 Bug 1411817: Add do_AddRef overloads for nsCOMPtr<T> and nsRevocableEventPtr<T>. r=froydnj
MozReview-Commit-ID: gEU7whtNHc
2017-10-25 19:46:50 -07:00
Xidorn Quan
162531ffac Bug 1408293 - Eagerly style new children inserted in XUL listbox. r=bz
MozReview-Commit-ID: HLATTkLd1X8
2017-10-25 18:00:54 +11:00
Emilio Cobos Álvarez
be07c8b3d4 Bug 1410895: Multiple cleanups on top. r=bz
MozReview-Commit-ID: GX3dfmWL083
2017-10-23 16:06:50 +02:00
Emilio Cobos Álvarez
1f5b74dd8f Bug 1410226: Properly compute the insertion point for a display: contents child in an XBL binding. r=mats
MozReview-Commit-ID: DzuGDHZEc1A
2017-10-20 13:42:15 +02:00
Sebastian Hengst
5aa7782308 Backed out changeset f8703e5ad323 (bug 1410226) for failing reftests layout/reftests/forms/legend/shadow-dom.html and layout/reftests/css-display/display-contents-generated-content-2.html. r=backout on a CLOSED TREE 2017-10-20 20:40:01 +02:00
Emilio Cobos Álvarez
9a52a39644 Bug 1410226: Properly compute the insertion point for a display: contents child in an XBL binding. r=mats
MozReview-Commit-ID: DzuGDHZEc1A
2017-10-20 13:42:15 +02:00
Emilio Cobos Álvarez
cc13fe1e02 Bug 1404789: Get the insertion point right when reconstructing direct children of a shadow root. r=bz
MozReview-Commit-ID: 2Xlke5ujt2Q
2017-10-18 19:41:17 +02:00
Emilio Cobos Álvarez
ebc5c657e2 Bug 1404789: Do not assume that we're part of the flattened tree when we get notified in the frame constructor. r=bz
This really also fixes bug 1409136.

MozReview-Commit-ID: 1yL93mgajmS
2017-10-18 14:22:40 +02:00
Emilio Cobos Álvarez
f79b9c95a2 Bug 1404789: Remove shadow tree hacks in the frame constructor. r=bz
Turns out that the patches in bug 1398448 fixed most of the layout stuff.

There's a GeckoRestyleManager assertion in test_shadowroot_style.html about
document mismatches while restyling, which looks scary, but I haven't
investigated (nor plan to, since that code is hopefully going away soon).

MozReview-Commit-ID: 4km5NCr5xp2
2017-10-11 13:51:05 +02:00
Daniel Holbert
3556d55a6b Bug 1373767 part 1: Always make nsMathMLmathBlockFrame a block formatting context. r=bz
(This makes it behave a bit more like a normal CSS block, and it ensures that
it can provide a float manager to its descendants.)

MozReview-Commit-ID: FmnQYjzD2eD
2017-07-13 15:34:20 -07:00
Jim Chen
0fa6e3ebb6 Bug 1357191 - 1. Use Gecko controls for Fennec date/time fields; r=jessica r=nechen
Right now, date/time fields in Fennec appear as regular text fields,
which display the date/time values without formatting. This patch makes
the fields use the Gecko controls, which do support formatting. This
only changes the appearance of the fields; we still display the native
date/time pickers when the fields are tapped on. The reset button is
hidden in the controls because the Fennec date/time picker provides
a separate "clear" button.

MozReview-Commit-ID: 75QyKmolNuf
2017-10-12 12:20:14 -04:00
Mats Palmgren
3c0eeea532 Bug 1381134 - Ensure we're using the correct frame for the :after/:before references. r=emilio
MozReview-Commit-ID: BwoRNsXLbPS
2017-10-11 20:21:26 +02:00
Sebastian Hengst
8c189ff51a Backed out 2 changesets (bug 1357191) for frequently failing mochitest dom/html/test/forms/test_input_sanitization.html on Android 4.3 API16+ debug. r=backout
Backed out changeset c6ba568874b0 (bug 1357191)
Backed out changeset 562e7fc9a839 (bug 1357191)
2017-10-10 23:27:21 +02:00
Jim Chen
2b0b2a7f9f Bug 1357191 - 1. Use Gecko controls for Fennec date/time fields; r=jessica r=nechen
Right now, date/time fields in Fennec appear as regular text fields,
which display the date/time values without formatting. This patch makes
the fields use the Gecko controls, which do support formatting. This
only changes the appearance of the fields; we still display the native
date/time pickers when the fields are tapped on. The reset button is
hidden in the controls because the Fennec date/time picker provides
a separate "clear" button.

MozReview-Commit-ID: EBE2U1zL74Q
2017-10-10 12:15:50 -04:00
Nicholas Nethercote
7dbfdaf890 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
2017-10-03 09:05:19 +11:00
Emilio Cobos Álvarez
2429634849 Bug 1402442: Properly remove display: contents pseudo-frames. r=mats
MozReview-Commit-ID: 4pjVLQfv3YR
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 18:25:29 +02:00
Emilio Cobos Álvarez
709ea27b56 Bug 1404324: Use the placeholder state to remove out-of-flows that aren't real descendants of the destruction root. r=bz
Using the style of the frame can mess things up when we reparent them due to
::first-line before removing them.

MozReview-Commit-ID: 3Dt0wF2XRAH
2017-10-04 10:49:41 +02:00
Sebastian Hengst
bc77eea8a5 Backed out changeset cb247c8a0fe5 (bug 1404324) for landing with wrong commit message. r=backout 2017-10-04 10:48:14 +02:00
Emilio Cobos Álvarez
dcb5efedb7 Bug 1404324: Always remove out of flows from the placeholder frame, using its info. r=bz
MozReview-Commit-ID: 3Dt0wF2XRAH
2017-10-04 10:38:34 +02:00
Wes Kocher
cbba752608 Merge inbound to m-c a=merge CLOSED TREE
MozReview-Commit-ID: 3pMHYV9oXLm
2017-09-27 16:51:49 -07:00
Mats Palmgren
feaa9c8873 Bug 1398520 part 4 - Rename nsFormControlFrame to nsCheckboxRadioFrame. r=dholbert
MozReview-Commit-ID: 9nwikVD1cd9
2017-09-27 14:12:00 +02:00
Mats Palmgren
dfec014051 Bug 1398520 part 2 - Remove nsGfxCheckboxControlFrame and nsGfxRadioControlFrame; use nsFormControlFrame instead. r=dholbert
MozReview-Commit-ID: GxnZZXxHDyC
2017-09-27 14:12:00 +02:00
Nicholas Nethercote
9fda5528d2 Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ
2017-09-26 08:33:21 +10:00
Boris Zbarsky
611ff65071 Bug 1401840. Make sure to not end up with infinite recursion when reframing a <body> that has a table pseudo parent coming from the root <html>. r=dholbert
MozReview-Commit-ID: EJiO8Nq5Frb
2017-09-22 23:32:49 -04:00
Boris Zbarsky
6d3f7c19c2 Bug 1400599. Make sure to properly handle removal of the root when the body propagates scrollbar styles to the viewport. r=dholbert
MozReview-Commit-ID: FixsFFtNOfQ
2017-09-18 21:27:23 -04:00
Boris Zbarsky
e48bc77cd9 Bug 1398500 part 2. Make sure that if we start propagating scroll to viewport from a new body element we reframe it as needed. r=dholbert
MozReview-Commit-ID: K54u9NmAlpn
2017-09-15 23:45:06 -04:00
Emilio Cobos Álvarez
6eeff31694 Bug 1397983: Synchronously bind/unbind XBL anonymous content from the bound content's Bind/UnbindFromTree. r=smaug
Doing it off a runnable makes the flattened tree inconsistent until that
runnable runs.

Also add an assert in frame construction that would've caught the first
only-unbind patch.

MozReview-Commit-ID: Hnua3aWSMHi
2017-09-08 14:59:04 +02:00
Emilio Cobos Álvarez
bc608eec3f Bug 1398448: Always insert async when reconstructing ancestors to avoid pathological frame construction cases. r=bz
MozReview-Commit-ID: 5ARTWW9dt7X
2017-09-11 20:41:43 +02:00
Emilio Cobos Álvarez
c8bdb05d35 Bug 1398581: Address followup comments. r=me
MozReview-Commit-ID: CymOOl4VLPj
2017-09-11 17:19:05 +02:00
Emilio Cobos Álvarez
1863a745a8 Bug 1398581: Ensure a first-letter doesn't incorrectly inherit from a first-line. r=heycam
This approach kinda sucks, because we woefully throw away the style context
computed in the case it inherited from a first-line, but it's the easiest thing
I could think of without either making it more inefficient, or threading a
parent style ignoring first-line through ResolvePseudoElementStyle and related
functions.

MozReview-Commit-ID: 3uGuU7dHEnE
2017-09-11 11:15:30 +02:00
Mats Palmgren
4f7c68ce0b Bug 1374112 part 3 - Use AllocateFCItem/FreeFCItem exclusively for allocating FrameConstructionItems. r=dholbert
MozReview-Commit-ID: 7TqWZeTV91J
2017-09-11 00:27:12 +02:00
Mats Palmgren
b96ec795ee Bug 1374112 part 2 - Introduce nsCSSFrameConstructor::AllocateFCItem/FreeFCItem for allocating FrameConstructionItems from an arena/free list. r=dholbert
MozReview-Commit-ID: 5VVhEQOZMlU
2017-09-11 00:27:12 +02:00
Mats Palmgren
f2abf2c852 Bug 1380749 - Retry AdjustAppendParentForAfterContent in case |parentAfterFrame| was a :first-letter frame that we deleted. r=dholbert
MozReview-Commit-ID: 7uIxm4NLHPN
2017-09-09 22:00:54 +02:00
Emilio Cobos Álvarez
ae086b07df Bug 1398041: Make WipeContainingBlock consistent about reconstructing sync or async. r=bz
MozReview-Commit-ID: 1PL3cqfnarB
2017-09-08 09:29:04 +02:00
Emilio Cobos Álvarez
765d70bab1 Bug 1397091: Remove aForReconstruct. r=bz
It's only used to know whether we may potentially need to sync-style the
subtree.

Given with these patches we guarantee that when inserting sync, we have the
style tree up-to-date, we can just check aInsertionKind for the same effect.

MozReview-Commit-ID: ADvcjkGq5hi
2017-09-08 08:56:41 +02:00
Emilio Cobos Álvarez
4ad6950bf0 Bug 1397091: Merge InsertionKind and LazyConstructionAllowed. r=bz
They now map 1-to-1, so there's no reason to keep them separate.

MozReview-Commit-ID: A2Wqa3QNdw8
2017-09-08 08:56:40 +02:00
Emilio Cobos Álvarez
b2106832ac Bug 1397091: Allow calling RecreateFramesForContent with async insertion for non-elements. r=bz
Using the lazy frame construction path instead of the PostRestyleEvent path.

It'd be nice to unify those though...

MozReview-Commit-ID: CwDHZQUBm8e
2017-09-08 08:56:39 +02:00