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

3469 Коммитов

Автор SHA1 Сообщение Дата
Doug Thayer a848222b53 Bug 1441308 - Split out document pieces of WebRenderLayerManager r=jrmuizel
Per our discussion, this patch splits out the state management bits of
WebRenderLayerManager, allowing for them to be maintained per-document.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 21:33:10 +00:00
Timothy Guan-tin Chien 28b5c3416c Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug
The XBL binding implementation relied on nsDateTimeControlFrame to call into
its nsIDateTimeInputArea implementation. This is correct because the XBL binding
is only constructed when the element has a frame. If the value is set while the
element is hidden, the XBL binding will pick up the correct value during construction.

That is not the case for UA Widget. As it is constructed when the DOM is attached,
relying on nsDateTimeControlFrame to send an event when attributes change means
the event won't be sent to the already constructed UA Widget.

This patch fixes that by moving the event dispatching calls originating from
HTMLInputElement out of nsDateTimeControlFrame, so they will behave correctly in
the absence of the frame.

I've also moved the gut of nsDateTimeControlFrame::HasBadInput() to
DateTimeInputTypeBase::HasBadInput(). Content script should be allowed to validate
the input without the frame.

Sadly this means the XBL implementation and the UA Widget implementation
have further diverged. The complexity should go away when we could finally
remove the XBL implementation.

nsDateTimeControlFrame still dispatches a few events to UA Widget, in
AttributeChanged() and SyncDisabledState(), as they are originated from the layout.

The name of the events in AttributeChanged() are incorrect though -- I am correcting
that in this patch too.

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

--HG--
extra : moz-landing-system : lando
2019-01-04 21:53:51 +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
Sylvestre Ledru cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Sylvestre Ledru ext:(%20and%20Karl%20Tomlinson%20%3Ckarlt%2B%40karlt.net%3E) c7b59395f2 Bug 1515556 comment fix-ups for the tree reformat (layout/) r=Ehsan,heycam
Differential Revision: https://phabricator.services.mozilla.com/D13125

--HG--
extra : moz-landing-system : lando
2018-12-21 03:07:05 +00:00
Mats Palmgren 40bed6405a Bug 1513959 - Make <input type=range> deal with "percentage inline-size implies zero min-content size" properly. r=dholbert 2018-12-20 02:01:01 +01:00
Dorel Luca 137799b838 Backed out 2 changesets (bug 1513959) for wpt failure in css/css-sizing/range-percent-intrinsic-size-1.html. CLOSED TREE
Backed out changeset 24d7c1d1ea09
Backed out changeset 094ae6e3e717 (bug 1513959)
2018-12-18 04:37:15 +02:00
Mats Palmgren ecdcceaf6a Bug 1513959 - Make <input type=range> deal with "percentage inline-size implies zero min-content size" properly. r=dholbert 2018-12-18 01:09:02 +01:00
Emilio Cobos Álvarez 7204b38327 Bug 1514338 - Remove unneeded special case in nsHTMLButtonControlFrame. r=bzbarsky
This is a followup to bug 1089326.

The other kind of elements other than <button> that use this frame are
input[type="reset|submit|button"], via nsGfxButtonControlFrame. And that frame
is a leaf, so it can only contain anonymous content (which is chromeonly
content and thus doesn't show up in event.target and co.).

This changes behavior for event.originalTarget, I suppose, but that's what we
do elsewhere as well, and that's a Gecko-specific thing.

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

--HG--
extra : moz-landing-system : lando
2018-12-16 22:17:44 +00:00
Olli Pettay b977d23eb2 Bug 1089326, make <button> hit testing similar to other elements which may have some content, and for click target find the common (interactive) ancestor, r=masayuki
--HG--
extra : rebase_source : 80caab4e074d552c38b62842fe3102fb6735dfd9
2018-12-11 23:35:40 +02:00
Coroiu Cristina 59f79d44b0 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-12-12 00:01:36 +02:00
Mats Palmgren d62eb86e96 Bug 1512066 - Make <input type=range> min-content size the same as its max-content size (not zero). r=jwatt 2018-12-11 22:56:00 +01:00
Mats Palmgren 02d066656d Bug 947690 - Make the <select> wider to avoid any overlay scrollbar messing with the mouse events in the test. (TEST-ONLY) r=philor 2018-12-11 22:56:00 +01:00
Mark Banner 8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Emilio Cobos Álvarez 4591031b65 Bug 1513012 - Move overflow to use cbindgen. r=heycam
It's one of the most annoying / hacky mako bits we have.

Differential Revision: https://phabricator.services.mozilla.com/D14084
2018-12-11 03:07:08 +01:00
Emilio Cobos Álvarez 26110eea9b Bug 1513015 - Remove unneeded inherit-scroll-behavior class. r=botond
Use a more general rule instead, since we add the class unconditionally.

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

--HG--
extra : moz-landing-system : lando
2018-12-10 18:03:44 +00: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
Miko Mynttinen aafa85ee9d Bug 1512251 - Remove unused render only selection code r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D13829

--HG--
extra : moz-landing-system : lando
2018-12-06 19:40:50 +00:00
Daniel Holbert 7c3b31a25d Bug 1512112: Remove redundant includes from source files in layout. r=TYLin
All of the removed includes are redundant (i.e. they're #included elsewhere in
the same file).

In most cases, I'm removing the second (redundant) copy of the
#include, except when that copy makes more sense (i.e. if it's in better sorted
order, or if it's paired alongside a closely-associated header while the
earlier copy is not).

Here's the script that I used to generate candidates here -- I ran this in
every subdirectory of layout, on my linux machine (warning, this writes two
files to your /tmp directory):

for FILE in *.h *.cpp; do
  nonunique=$(grep \#include $FILE | grep -v List\.h | cut -f2 -d'"'  | cut -f2- -d'/'| cut -f2- -d'/' | sort | wc -l)
  unique=$(   grep \#include $FILE | grep -v List\.h | cut -f2 -d'"'  | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq | wc -l)
  if [[ "$unique" != "$nonunique" ]]; then
    echo "$FILE: $nonunique / $unique"
    grep \#include $FILE | cut -f2 -d'"'  | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort  > /tmp/nonunique.txt
    grep \#include $FILE | cut -f2 -d'"'  | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq  > /tmp/unique.txt
    diff /tmp/nonunique.txt /tmp/unique.txt
    echo
  fi
done

Depends on D13773

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

--HG--
extra : moz-landing-system : lando
2018-12-05 18:55:59 +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
Ciure Andrei ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner 8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +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
Olli Pettay 700f0f1e89 Bug 1510471 - Avoid useless FrameNeedsReflow call. r=emilio 2018-11-28 12:48:03 -05:00
Jonathan Watt 4c1b207664 Bug 1510116. Fix some unified build issues in layout code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13039

--HG--
extra : rebase_source : f0b6516484ed97ed52b92e04617f89e4ee8189ff
2018-11-12 22:20:52 +00:00
Kristen Wright f22175b197 Bug 1460439 - Conversion from NS_STYLE_BORDER_STYLE_* macro to StyleBorderStyle::* enum class r=emilio
Converted NS_STYLE_BORDER_STYLE_* consts to enum class. Updated corresponding values to enum class. reduced BCCornerInfo struct values to fit StyleBorderStyle values inside struct. Added defaults to switches that do not fully cover all instances of StyleBorderStyle.
2018-11-07 11:56:17 -08: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 505d7f9d3c Bug 1317870 - Make intrinsic sizing for <input type=range> work properly and make its default margin/padding compatible with Chrome/Safari. r=jwatt 2018-11-15 20:47:33 +01:00
Mats Palmgren 977a22a9c2 Bug 1481593 - Make <input type=range> layout more compatible with WebKit/Blink. r=jwatt
In particular:
-webkit-appearance:none inhibits the range track.
An author-specified 'border' or 'background' does NOT disable the theme.
The default non-themed background-color is opaque.
2018-11-15 20:47:33 +01:00
Mats Palmgren 754a89bb89 Bug 1501506 - Add -webkit-appearance:progress-bar and make that the default for <progress> for compatibility with other UAs. r=jwatt
Keep our old 'progressbar' as an alias for now, but unship
'progresschunk' by restricting it to UA/chrome sheets only.
Unship 'progresschunk-vertical' by removing it since it's
not used internally for anything.
2018-11-09 04:25:56 +01:00
Mats Palmgren 2882783137 Bug 1501483 - Add -webkit-appearance:meter and make that the default for <meter> for compatibility with other UAs. r=jwatt
Keep our old value 'meterbar' as an alias for now, but unship 'meterchunk'
by restricting it to UA/chrome sheets only.
2018-11-09 04:25:56 +01:00
Timothy Guan-tin Chien 720f2da242 Bug 1496242 - Part II, Convert datetimebox to UA Widget r=dholbert,jaws,smaug
This patch converts datetimebox.xml to datetimebox.js and loads it as a UA Widget,
while touches things here and there to make it work.

In HTMLInputElement manages the lifecycle of the datetimebox UA Widget.
It is loaded when in <input> has type date or time, or have its type switch to date or time.

nsDateTimeControlFrame is changed so that when UA Widget is enabled,
it would not generate <xul:datetimebox>.

Like bug 1483972, a check is added in nsCSSFrameConstructor::CreateGeneratedContentItem()
to make sure we don't generate pseudo content inside <input>.

Assertions in IntlUtils is changed to allow UAWidget to call the methods.

Depends on D9056

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

--HG--
rename : toolkit/content/widgets/datetimebox.xml => toolkit/content/widgets/datetimebox.js
extra : moz-landing-system : lando
2018-11-03 05:31:05 +00:00
Timothy Guan-tin Chien 3856b5e646 Bug 1496242 - Part I, Simplify nsIDateTimeInputArea interface r=mconley,smaug
This patch simplifies the nsIDateTimeInputArea interface, implemented by the
datetimebox bindings, to a point that is easier to convert it to dispatch events,
by doing the following:

- hasBadInput() is re-implemented in C++ in nsIDateTimeControlFrame since
  C++ needs the return value synchronously.
- SetValueFromPicker() and SetPickerState() are avoided completed since they
  are simply called by HTMLInputElement methods exposed to the frame
  script. They are avoided by having the frame script access the NAC and call
  the nsIDateTimeInputArea methods directly.
- Merge setEditAttribute() and removeEditAttribute() to updateEditAttributes()
  which takes no arguments, and have the method access the attribute values by
  reading the values from <input>.

This patch is a scaled-down version of the patch proposed in bug 1456833.
The event approach is only usable in UA Widget version of datetimebox because
there is no way to avoid leaking events to the document without Shadow DOM.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 23:29:42 +00:00
Bryce Van Dyk 6a62789cd7 Bug 893331 - Add crashtest to verify assertion doesn't unexpectedly fire. r=TYLin
Depends on D10648

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:31:37 +00:00
Bryce Van Dyk 2f64c0934b Bug 893331 - Relax assert checking if value is within range for nsRangeFrame. r=TYLin
GetValueAsFractionOfRange asserts that input == minimum if the range has maximum
<= minimum. This assert is sane at face value, but floating point rounding
issues can cause it to be triggered when input is essentially minimum.

This changeset relaxes the assertion to check the input is within an epsilon
value of minimum.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:30:49 +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 960944e003 Bug 1499578 - Make one line-height the intrinsic block-size for <select> comboboxes. r=emilio
Also, remove the !important on 'line-height' on <select> since other
UAs allows authors to change it.
2018-10-22 00:54:56 +02:00
Mats Palmgren 4ff1bdbeb2 Bug 1498769 - Also require a frame for an <option> to be interactively selectable. r=enndeakin 2018-10-17 00:13:06 +02:00
Mats Palmgren b3ce8ada8c Bug 1499127 - Only consider <option>/<optgroup> elements that has a frame when determining the default row size, and use a fallback value if there are none. r=emilio 2018-10-16 16:35:04 +02:00
Mats Palmgren 8bc5e99207 Bug 1490747 part 1 - Center the <legend> border-box (not its margin-box) within the <fieldset> border area. r=dholbert 2018-10-12 21:36:03 +02:00
Manuel Rego Casasnovas d9ecddc9fa Bug 1491235: [css-contain] Make 'contain:layout' (not 'contain:size') suppress baseline measurements r=dholbert
The CSSWG has recently resolved that layout containment
suppress baseline alignment, while size containment does not:
https://github.com/w3c/csswg-drafts/issues/2995

Spec text (https://drafts.csswg.org/css-contain/#containment-layout):
  "7. For the purpose of the vertical-align property,
   or any other property whose effects need to relate
   the position of the containing element's baseline
   to something other than its descendants,
   the containing element is treated as having no baseline."

And a note in (https://drafts.csswg.org/css-contain/#containment-size):
  "Note: size containment does not suppress baseline alignment.
   See layout containment for that."

This patch does this change just switching IsContainSize()
by IsLayoutSize() in several places related to baseline alignment
in the source code.

With the patch several WPT tests start to pass. Apart from that,
some of the tests under vendor-imports are updated to follow
the new behavior.

--HG--
extra : amend_source : 05dc9a320afeb1d58981e2bd8bc47b435999f2f9
2018-10-09 14:13:13 -07: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
Neil Deakin 0a19485e1f Bug 326944, remove nsIComboboxControlFrame interface, r=mats 2018-09-26 10:41:12 -04:00
Neil Deakin 5c44db8004 Bug 328680, remove nsIListControlFrame interface, r=mats 2018-09-26 10:41:01 -04:00
Bogdan Tara 9b4a1c1a7e Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-09-20 07:17:01 +03:00
Emilio Cobos Álvarez e39bf77494 Bug 1492567 - Back out bug 1481866. r=dbaron
Summary:
The behavior the WG proposed is way more subtle than what that bug implements,
including:

 * Implementing two logical overflow longhands.
 * Expanding the overflow shorthand to different longhands depending on the
   syntax of that.

Meanwhile, Blink hasn't done the swap and will ship the same behavior that we
shipped in Firefox 61 (bug 1453148), that is, overflow-x, then overflow-y.

So I think lacking a clear way forward we should revert this change and preserve
our shipped behavior.

Reviewers: dbaron!

Tags: #secure-revision

Bug #: 1492567

Differential Revision: https://phabricator.services.mozilla.com/D6317
2018-09-20 01:27:55 +02:00