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

483 Коммитов

Автор SHA1 Сообщение Дата
Mats Palmgren 7028877238 Bug 1679682 - Deal with the ::file-selector-button pseudo having no frame. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98111
2020-11-29 17:18:32 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Emilio Cobos Álvarez 03baee9d8a Bug 1662478 - Rename ::file-chooser-button to ::file-selector-button, and enable it in all channels. r=jwatt
See https://github.com/w3c/csswg-drafts/issues/5049

Differential Revision: https://phabricator.services.mozilla.com/D88995
2020-09-01 22:58:10 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Emilio Cobos Álvarez b68f73c01a Bug 1635675 - Implement the ::file-chooser-button pseudo-element. r=jwatt
As per https://github.com/w3c/csswg-drafts/issues/5049.

Don't enable it unconditionally just yet, as the name may change.

I had to move some rules in forms.css because otherwise you get
specificity conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D76214
2020-05-25 23:54:10 +00:00
Narcis Beleuzu 973d9eb6a0 Backed out changeset 82df6f70ec60 (bug 1635675) for lint failure on file-chooser-button-001.tentative.html . CLOSED TREE 2020-05-25 13:49:39 +03:00
Emilio Cobos Álvarez a39a3a3807 Bug 1635675 - Implement the ::file-chooser-button pseudo-element. r=jwatt
As per https://github.com/w3c/csswg-drafts/issues/5049.

Don't enable it unconditionally just yet, as the name may change.

I had to move some rules in forms.css because otherwise you get
specificity conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D76214
2020-05-21 12:27:54 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Emilio Cobos Álvarez bc0214cf17 Bug 1625809 - Remove nsFileControlFrame::AttributeChanged. r=smaug
Syncing tabindex in that attribute callback was wrong since bug 505355.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 16:49:56 +00:00
Bogdan Tara bf73bb90b1 Backed out changeset 39e8040f10f2 (bug 1625809) for reftest failures CLOSED TREE 2020-03-30 17:55:34 +03:00
Emilio Cobos Álvarez 675035d9f5 Bug 1625809 - Remove nsIFrame::ContentStatesChanged. r=smaug
The only user is nsFileControlFrame, which can just use the attribute change
callback instead to sync the disabled attribute value with the button.

Syncing tabindex in that attribute callback was wrong since bug 505355.

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

--HG--
extra : moz-landing-system : lando
2020-03-30 12:58:09 +00:00
Sean Feng 908efe692e Bug 1377999 - Make TextNode to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62353

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:54 +00:00
Masayuki Nakano 25e931d406 Bug 1609603 - Optimize the callers of `DataTransfer::GetTypes()` r=smaug
In C++ code, `DataTransfer::GetTypes()` are used for checking whether the
`DataTransfer` instance has specific type `DataTransferItem` or not.  Therefore,
it does not make sense to retrieve all item types nor compare some types
looking for with the retrieved item types.

This patch adds `DataTransfer::HasType()` and `DataTransfer::HasFile()` for
the current C++ users.  They don't take `CallerType` since all C++ users use
`GetTypes()` as `CallertType::System`.  And they just call a corresponding
method of `DataTransferItemList`.

Then, `DataTransferItemList` methods compares given type with every items
simply.

Note that this patch moves `DataTransfer::GetTypes()` to `DataTransferItemList`
too because new methods and `GetTypes()` should be maintained at every logic
changes.

The reason why there is no `DataTransfer::HasAnyOfTypes()` method is,
`DataTransfer.h` cannot include `DataTransferItemList.h` due to their
dependency but parameter pack requires inline methods.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 09:46:48 +00:00
Alex Catarineu 08a431f34e Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 16:56:27 +00:00
Mihai Alexandru Michis d19c1272ca Backed out changeset 1d87c269da8a (bug 1581537) for causing bc failures in browser_misused_characters_in_strings.js CLOSED TREE
--HG--
extra : rebase_source : b9f2da6650a4213a4a9284d6dbe7ecfd97761501
extra : amend_source : b7ca833a091419a2de5904eccb2d3ce9d0fcd337
2019-11-04 16:06:37 +02:00
Alex Catarineu ea206b140d Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:59 +00:00
Andrea Marchesini 6797e45278 Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49392

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:33 +00:00
Alex Catarineu 536fd2e65f Bug 1561322 - Allow spoofing strings in HTML forms r=baku,Pike
When privacy.spoof_english = 2, we should hide the user's
locale in content. So we use en-US default strings for HTML
form elements, such as a Submit button.

We also force GetLocalizedEllipsis() to always return the
ellipsis used by en-US.

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

--HG--
extra : moz-landing-system : lando
2019-07-24 13:22:22 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Gerald Squelart 2f31b3fef4 Bug 1474771 - Propagate NS_FRAME_IS_DIRTY to descendants when marking as dirty rather than during reflow. r=dholbert
This simplifies dealing with frames that are pushed/pulled between
continuations during reflow, allows us to avoid the complexity of the
fix to 1459937, and hopefully fixes some of the regressions from bug
1308876.

This disables the changes from bug 1459937 by commenting out a single
line in ReparentFrameInternal in nsBlockFrame.cpp, but all the added
code will be removed in the following patch.

Co-authored-by: Gerald Squelart <gsquelart@mozilla.com>
Co-authored-by: L. David Baron <dbaron@dbaron.org>

Depends on D36423

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

--HG--
extra : moz-landing-system : lando
2019-07-01 21:56:43 +00:00
Peter Van der Beken 8b00dd9ff2 Bug 1490044 - Move all prefs used in WebIDL to StaticPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33507

--HG--
extra : moz-landing-system : lando
2019-06-13 09:00:59 +00:00
Ting-Yu Lin 1f0e04063a Bug 1548673 Part 4 - Fix the display macro usage in nsFileControlFrame::GetPrefISize(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D29749

--HG--
extra : moz-landing-system : lando
2019-05-03 17:35:00 +00:00
Ting-Yu Lin 7a98dbcd3e Bug 1548673 Part 3 - Rename nsBlockFrame's mPrefWidth to mCachedPrefISize. r=jfkthame
Like Part 2, I choose mCachedPrefISize because grid and flex container
are using it.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:55 +00:00
Ting-Yu Lin 050bf09694 Bug 1548673 Part 2 - Rename nsBlockFrame's mMinWidth to mCachedMinISize. r=jfkthame
Instead of renaming it to mMinISize, I choose mCachedMinISize because
both grid and flex container frames use mCachedMinISize for similar
purpose.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:46 +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
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
Emilio Cobos Álvarez 3dd5ef8fd1 Bug 505355 - Simplify focus handling for file inputs. r=smaug
This is closer to what other UAs do, it's simpler, and fixes the bug.

It looks like the complexity of multiple buttons or what not is related to
bug 1188880, which is WONTFIX. We no longer have multiple buttons in the same
file input, so this is better IMO.

Differential Revision: https://phabricator.services.mozilla.com/D26825
2019-04-10 22:52:03 +02:00
Emilio Cobos Álvarez 08173e4af8 Bug 1543161 - Simplify some rules used for file inputs. r=mats
There's only one button in a file input. This used to be an
input[type="button"].

There's no point in using more specific rules or such, the regular UA rules just
work, and content can't style this button so it can't be overriden.

This should be an idempotent patch.

Differential Revision: https://phabricator.services.mozilla.com/D26753
2019-04-10 22:51:47 +02:00
Jeff Gilbert 373563b0ec Bug 1540357 - Fix implicit int conversions in dom/canvas's layout/* includes. r=dholbert
nsUnicodeProperties.h includes into ICU, which has implicit int
truncation, so quarantine this include out of problematic headers.

Depends on D25498

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

--HG--
extra : moz-landing-system : lando
2019-04-02 17:00:49 +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
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
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
Masayuki Nakano abe138f771 Bug 1504911 - part 1: Make all "input" event dispatcher in C++ use new utility method r=smaug
Currently, a lot of code dispatch "input" event and some of them dispatch
"input" event with wrong interface and/or values.  Therefore this patch
creates nsContentUtils::DispatchInputEvent() to make all of them dispatch
correct event.

Unfortunately, due to bug 1506439, we cannot set pointer to refcountable
classes of MOZ_CAN_RUN_SCRIPT method to nullptr.  Therefore, this patch
creates temporary RefPtr<TextEditor> a lot even though it makes damage to
the performance if it's in a hot path.

This patch makes eEditorInput event dispatched with
InternalEditorInputEvent when "input" event should be dispatched with
dom::InputEvent.  However, this patch uses WidgetEvent whose message is
eUnidentifiedEvent and setting WidgetEvent::mSpecifiedEventType to
nsGkAtoms::oninput when "input" event should be dispatched with
dom::Event because we need to keep that eEditorInput and
InternalEditorInputEvent are mapped each other.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 03:59:02 +00:00
Mats Palmgren 0feccf9fd7 Bug 1500530 - Make the anonymous child <label> have display:inline-block so that it applies its min-inline-size. r=jfkthame 2018-10-25 16:51:45 +02:00
Mats Palmgren 4ebe60371d Bug 1495153 part 2 - Implement cropping the filename for <input type=file>. r=emilio,jfkthame 2018-10-07 10:08:45 +02:00
Mats Palmgren 5cf920d8be Bug 1495153 part 1 - Replace the XUL label in <input type=file> with an HTML label. r=emilio 2018-10-07 09:44:51 +02:00
Narcis Beleuzu 5786b9be9f Backed out 2 changesets (bug 1495153) for causing perma failures on dynamic-max-width.html
Backed out changeset 6d95f0e0cc76 (bug 1495153)
Backed out changeset 6800eb348ebe (bug 1495153)
2018-10-07 05:14:44 +03:00
Mats Palmgren 3eec51d6b3 Bug 1495153 part 2 - Implement cropping the filename for <input type=file>. r=emilio,jfkthame 2018-10-06 19:31:51 +02:00
Mats Palmgren 771d50381e Bug 1495153 part 1 - Replace the XUL label in <input type=file> with an HTML label. r=emilio 2018-10-06 19:31:51 +02:00
Zhang Junzhi e081858ecc Bug 1490611 - physical to logical name refactor: DISPLAY_*_WIDTH to DISPLAY_*_INLINE_SIZE(as well as the relevant struct in the macro contents) r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D5657

--HG--
extra : moz-landing-system : lando
2018-09-12 12:35:47 +00:00
Andrea Marchesini c47168b4b7 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 15 - dom.webkitBlink.dirPicker.enabled, r=ehsan 2018-09-10 20:36:16 +02: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
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
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
Timothy Guan-tin Chien 49faa579a0 Bug 1451576 - Set dir=auto on [Browse...] button of <input type=file> r=Ehsan
The label of the button comes from the UI; it's direction should be independent
of the web content directionality. As there is no access to :-moz-locale-dir()
selectors in HTML, we'll have to rely on auto-direction here.

The alternative (or, addition to the fix here) would be adding the value of
the dir attribute to HtmlForm.properties, allowing the localizers to set
the directionality explicitly. I however don't know if that's necessary.

MozReview-Commit-ID: 5NXeLtxLXVH

--HG--
extra : rebase_source : 724eb60ccd841d2355fc17ba31af3cf4792962ef
extra : source : 91d8903ab19812f36aa1732d35d0dc203b0f6281
2018-04-17 18:04:39 +08:00
Boris Zbarsky bac3f2e054 Bug 1455055 part 3. Clean up HandleEvent implementations in layout. r=masayuki
MozReview-Commit-ID: 7Irm8aAmeIt
2018-04-20 00:49:29 -04:00