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

268 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 0f84d86e05 Bug 1552287 part 2: [css-contain] Adjust various reflow & baseline methods so that layout-contained frames behave as if they have no baseline. r=TYLin
We previously (in bug 1491235) adjusted some utility code to make
layout-contained frames behave as if they have no baseline.

But that's not sufficient. To make frames fully report lack-of-a-baseline,
we now do the following for layout-contained frames, as of this patch:

 (a) We now leave the ReflowOutput outparam's BlockStartAscent member at its
     default value (which is what we do for frames without a baseline like
     e.g. nsCheckboxRadioFrame and nsHTMLCanvasFrame). And if the parent cares
     about the baseline, it'll then ask directly, using a baseline getter.

 (b) We now return 'false' in more implementations of bool-returning
     baseline-getter-methods (where 'false' indicates 'no baseline').

 (c) We now return the margin-box-bottom edge, in the nscoord-returning
     'GetLogicalBaseline()' getter method. (We typically do this by deferring
     to the inherited method, which ultimately comes from nsFrame's
     implementation). It's appropriate to use the margin-box-bottom edge when
     there's no baseline, per the definition of 'vertical-align: baseline',
     here: https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align

Depends on D32182

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

--HG--
extra : moz-landing-system : lando
2019-05-24 04:46:17 +00:00
Andreea Pavel 9ea3c5f4bf Backed out 2 changesets (bug 1552287) for failing contain-layout-suppress-baseline-002.html on a CLOSED TREE
Backed out changeset 815c6657d164 (bug 1552287)
Backed out changeset 888c32d2a32e (bug 1552287)
2019-05-24 03:34:03 +03:00
Daniel Holbert b15f05575d Bug 1552287 part 2: [css-contain] Adjust various reflow & baseline methods so that layout-contained frames behave as if they have no baseline. r=TYLin
We previously (in bug 1491235) adjusted some utility code to make
layout-contained frames behave as if they have no baseline.

But that's not sufficient. To make frames fully report lack-of-a-baseline,
we now do the following for layout-contained frames, as of this patch:

 (a) We now leave the ReflowOutput outparam's BlockStartAscent member at its
     default value (which is what we do for frames without a baseline like
     e.g. nsCheckboxRadioFrame and nsHTMLCanvasFrame). And if the parent cares
     about the baseline, it'll then ask directly, using a baseline getter.

 (b) We now return 'false' in more implementations of bool-returning
     baseline-getter-methods (where 'false' indicates 'no baseline').

 (c) We now return the margin-box-bottom edge, in the nscoord-returning
     'GetLogicalBaseline()' getter method. (We typically do this by deferring
     to the inherited method, which ultimately comes from nsFrame's
     implementation). It's appropriate to use the margin-box-bottom edge when
     there's no baseline, per the definition of 'vertical-align: baseline',
     here: https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align

Depends on D32182

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

--HG--
extra : moz-landing-system : lando
2019-05-23 21:41:35 +00:00
Ting-Yu Lin 63457d2b61 Bug 1548673 Part 1 - Rename NS_INTRINSIC_WIDTH_UNKNOWN to NS_INTRINSIC_ISIZE_UNKNOWN. r=jfkthame
This patch is generated by running the following script under layout/,
and then manually delete the FIXME comment in LayoutConstants.h

  #!/bin/bash
  function rename() {
      find .\
           -type f\
           ! -path "./obj*"\
           ! -path "./.git"\
           ! -path "./.hg"\
           \( -name "*.cpp" -or\
              -name "*.h" \)\
              -exec sed -i -e "s/$1/$2/g" "{}" \;
  }
  rename NS_INTRINSIC_WIDTH_UNKNOWN NS_INTRINSIC_ISIZE_UNKNOWN

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:36 +00:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Emilio Cobos Álvarez dad3a20b22 Bug 1525955 - Include anon boxes in CSSPseudoElementType, to remove ComputedStyle::mPseudoTag. r=heycam
This is more consistent with what the Rust bits of the style system do, and
removes a pointer from ComputedStyle which is always nice.

This also aligns the Rust bits with the C++ bits re. not treating xul pseudos as
anonymous boxes. See the comment in nsTreeStyleCache.cpp regarding those.

Can't wait for XUL trees to die.

Depends on D19001

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

--HG--
extra : moz-landing-system : lando
2019-02-19 13:44:33 +00: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
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
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
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 f82660f831 Bug 1456169 part 2. Remove the now-unnecessary nsITextControlElement::GetPlaceholderNode. r=emilio
MozReview-Commit-ID: FcVbeHEwkMz
2018-04-24 02:17:17 -04:00
Boris Zbarsky ca622386bd Bug 1456169 part 1. Remove the now-unnecessary nsITextControlElement::GetRootEditorNode. r=emilio
MozReview-Commit-ID: 6DYEtQMTCRF
2018-04-24 02:17:17 -04:00
Nika Layzell 242c9ce313 Bug 1438026 - Part 3: Replace nsPresState with the new PresState type, r=baku 2018-04-10 17:49:44 -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 87cd3b385a Bug 1432186 part 14. Remove nsIDOMNode's childNodes attribute. r=mccr8
MozReview-Commit-ID: JyQjEYngKAT
2018-01-29 23:10:51 -05: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
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
Kyle Machulis be815f3caf Bug 1412437 - Remove nsIDOMHTMLTextAreaElement; r=bz
MozReview-Commit-ID: JAON7Rd7IAo
2017-11-01 14:28:22 -07: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
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
Emilio Cobos Álvarez 72b20cdc50 Bug 1401706: Remove redundant boolean members from nsTextControlFrame. r=Ehsan
MozReview-Commit-ID: Ka81vlPMa88
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 281ab4635b1395c133c8ad7c74b8b82bfb21d383
2017-09-22 07:33:41 +02:00
Emilio Cobos Álvarez a79c0b5eae Bug 1401706: Remove unused macro. r=Ehsan
MozReview-Commit-ID: EsvdnJkapgP
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : c681c4393051916aeffa6adc947fb267b88225c8
2017-09-22 07:33:30 +02:00
Emilio Cobos Álvarez b4949a9204 Bug 1401706: Move ownership of editor anon content to nsTextControlFrame. r=Ehsan
MozReview-Commit-ID: 4QpbarX5dvf
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : f2bd73c696bc3e7937a8e6c365c9ef31a6888524
2017-09-22 02:18:30 +02:00
Masayuki Nakano b3c33d13ad Bug 1395146 - part1: Get rid of nsITextControlElement::IsPlainTextControl() and nsTextEditorState::IsPlainTextEditor() r=smaug
nsTextEditorState::GetValue() refers nsITextControlElement::IsPlainTextControl()
via nsTextEditorState::IsPlainTextEditor().  However, it always returns true and
virtual call with QI.  So, we should get rid of these unnecessary methods.

MozReview-Commit-ID: 3gHdGrzlys4

--HG--
extra : rebase_source : a1be33a18e93e64b8cc87e4f12d5e494b14520bf
2017-08-30 18:57:55 +09:00
Matt Woodrow 40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst 8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Masayuki Nakano 5af13a8f29 Bug 1374207 - part5: nsTextControlFrame should use TextEditor instead of nsIEditor r=smaug
MozReview-Commit-ID: Eh6Cp546bXT

--HG--
extra : rebase_source : 1bb83361b72af61434a91eb08aba09e79a1dd976
2017-06-19 23:47:02 +09:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Jonathan Kew a849e7423b Bug 1368250 - Give the TextControlInitializer property a dtor to automatically call Revoke when the property is deleted. r=mats 2017-05-28 11:22:29 +01:00
Jonathan Kew a8f81efd8e Bug 1365982 - Attach frame properties to each frame instead of looking them up in a hashtable on the prescontext. r=mats
--HG--
rename : layout/base/FramePropertyTable.cpp => layout/base/FrameProperties.cpp
rename : layout/base/FramePropertyTable.h => layout/base/FrameProperties.h
2017-05-27 12:36:00 +01:00
Mats Palmgren 154f4890bf Bug 1362886 part 2 - Devirtualize the IsLeaf() method by doing an array lookup instead. r=jfkthame
MozReview-Commit-ID: 1zm9rFhRVZ3
2017-05-26 12:11:12 +02:00
Mats Palmgren ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
Masayuki Nakano b56195251f Bug 1363278 Get rid of nsIPhonetic and HTMLInputElement.phonetic r=smaug
Nobody uses them anymore.  Therefore, we can remove them from the tree.

MozReview-Commit-ID: KTqCeI2eeFW

--HG--
extra : rebase_source : f3fc274f39c135af51245efd4c4aebbc4c49a61f
2017-05-09 16:27:08 +09: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
Ray Lin f50d5b5b45 Bug 1340483 - Part 3. Enable preview function only when input is marked as autofill field. r=heycam
MozReview-Commit-ID: FFqYJ3icRd7

--HG--
extra : rebase_source : 2ba1caff6676a3af769e8aac58a19e9d9de81254
2017-03-22 16:55:56 +08:00
Boris Zbarsky f80dd7a663 Bug 1345237. Propagate uint32_t deeper into the editor state and text control frame code. r=mystor
MozReview-Commit-ID: KeUo8My6eBJ
2017-03-09 14:44:45 -05:00
Boris Zbarsky d9d35a58a0 Bug 1343037 part 10. Remove the unused SetSelectionStart/SetSelectionEnd bits on text control frame. r=ehsan
MozReview-Commit-ID: G7ODMdAjzxV
2017-03-09 14:44:05 -05:00
Mats Palmgren d13aaf9ce0 Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Boris Zbarsky d2afbdd254 Bug 1342197 part 4. Move GetSelectionRange from nsTextControlFrame to the editor state. r=ehsan
At this point, all this method does is ensure editor initialization and then ask
the editor state for various information.  Let's cut out the middleman.

MozReview-Commit-ID: p491umScJO
2017-02-28 12:41:37 -05:00
Boris Zbarsky 5649e18813 Bug 1342197 part 2. Use nsITextControlElement::GetRootEditorNode to get the root editor node in nsTextControlFrame::GetSelectionRange. r=ehsan
MozReview-Commit-ID: 7ncJVNVGF78
2017-02-28 12:41:37 -05:00