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

32 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
Emilio Cobos Álvarez 664a546418 Bug 1618260 - Fix number input so that it honors overflow-clip-box-block. r=mats
This never worked, but it's more visible with the new form controls which have
more padding.

Make the anonymous div and co a pseudo-element, so that they inherit from the
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, but it doesn't for number inputs
because there's a flex wrapper in between.

This way overflow-clip-box: inherit does what we want. Reset the padding in the
inline direction, as the padding for <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.

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

--HG--
extra : moz-landing-system : lando
2020-03-18 09:21:44 +00:00
Masayuki Nakano ec3fa36450 Bug 1583135 - Disable scroll-anchoring at all editable elements r=emilio
This patch disables scroll-anchoring of all editable elements including editable
and scrollable elements in editing host because users don't want to scroll down
when they insert new line and new line can be in the scrolled area.

Unfortunately, the bug is not reproducible with simple testcase with
synthesized keyboard events.  Therefore, this patch does not include automated
tests.

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

--HG--
extra : moz-landing-system : lando
2020-01-17 01:31:37 +00:00
Emilio Cobos Álvarez 6d8c0d26b1 Bug 1582398 - Remove user-select: all for editable labels. r=masayuki
This seems to go back to our initial contenteditable implementation, and I don't
think there's a reason <label> should work differently from anything else.

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

--HG--
extra : moz-landing-system : lando
2019-10-23 09:30:03 +00:00
Emilio Cobos Álvarez f041512168 Bug 1492739 - Unprefix usage of -moz-user-select from UA stylesheets. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D31154

--HG--
extra : moz-landing-system : lando
2019-05-17 13:16:35 +00:00
Timothy Guan-tin Chien f1367fab83 Bug 1507895 - Part III, Remove the marquee binding r=smaug
This patch removes the XBL marquee binding and always uses
UA Widget for the internal "gut" of the marquee element.

Depends on D17572

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

--HG--
extra : moz-landing-system : lando
2019-01-25 14:24:43 +00:00
Emilio Cobos Álvarez 9ed36d7ba6 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 09:21:37 +00:00
Brindusan Cristian 31f0c21cca Backed out changeset 1575904619b5 (bug 1506547) for mochitest failures on test_reftests_with_caret.html. 2018-11-26 03:03:14 +02:00
Emilio Cobos Álvarez b74c31e4d9 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-25 20:01:07 +00:00
Timothy Guan-tin Chien a685c05ea5 Bug 1504343 - Convert xbl-marquee to UA Widget r=bgrins,bzbarsky
This patch moves the marquee bindings from xbl-marquee.xml to marquee.js and converts them to a UA Widget.

The contenteditable bindings are dropped, replaced with a styling rule that will fix the position of the scrolling text.

Inline styles have been moved to the stylesheet so usage of display: -moz-box can continue to be parsed.

test_bug840098.html is deleted because it is only valid under the context of in-content XBL bindings.

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

--HG--
rename : layout/style/xbl-marquee/xbl-marquee.css => toolkit/content/widgets/marquee.css
rename : layout/style/xbl-marquee/xbl-marquee.xml => toolkit/content/widgets/marquee.js
extra : moz-landing-system : lando
2018-11-18 01:23:52 +00:00
Ciure Andrei 52f5cabbdf Backed out changeset 85963f594697 (bug 1504343) for HTMLMarqueeElement.cpp build bustages CLOSED TREE 2018-11-17 10:43:14 +02:00
Timothy Guan-tin Chien 451f3371c4 Bug 1504343 - Convert xbl-marquee to UA Widget r=bgrins,bzbarsky
This patch moves the marquee bindings from xbl-marquee.xml to marquee.js and converts them to a UA Widget.

The contenteditable bindings are dropped, replaced with a styling rule that will fix the position of the scrolling text.

Inline styles have been moved to the stylesheet so usage of display: -moz-box can continue to be parsed.

test_bug840098.html is deleted because it is only valid under the context of in-content XBL bindings.

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

--HG--
rename : layout/style/xbl-marquee/xbl-marquee.css => toolkit/content/widgets/marquee.css
rename : layout/style/xbl-marquee/xbl-marquee.xml => toolkit/content/widgets/marquee.js
extra : moz-landing-system : lando
2018-11-17 06:29:41 +00:00
Xidorn Quan d8c29760a1 Bug 1355734 - Remove text-decoration-line: -moz-anchor-decoration. r=heycam,masayuki
MozReview-Commit-ID: 4TmVncV1K5G

--HG--
extra : rebase_source : 568218d415642f1088c82d4b2e03d5885067b162
2017-04-13 16:17:03 +08:00
Thomas Wisniewski 051c21928e Bug 843579 - Unprefix -moz-any-link. r=bz
--HG--
extra : rebase_source : d5ad8227cc118491f130e1fef01829c594cc9477
2016-07-19 23:13:13 -04:00
Ehsan Akhgari 999beb4acd Bug 1181130 - Part 2: Mark editable regions inside non-editable regions as -moz-user-select: -moz-text; r=dbaron 2015-08-14 10:52:33 -07:00
Ehsan Akhgari 49cd9f3da4 Bug 1097242 - Make sure contenteditable -moz-user-select styles can be overridden by web pages; r=dbaron 2015-03-05 09:55:37 -05:00
Ehsan Akhgari f5032448f3 Bug 1132768 - Consider non-editable regions in contenteditable elements as user-select:all even if the editable region doesn't have the focus; r=roc 2015-02-26 09:18:27 -05:00
Carsten "Tomcat" Book fac9e15494 Backed out changeset ed12a3822cb9 (bug 1132768) for mochitest-oop-1 test failures
--HG--
extra : rebase_source : 25acbb70ac1aadeeaef466974c2a0f16de7a5fb1
2015-02-25 15:49:55 +01:00
Ehsan Akhgari 2f1041889b Bug 1132768 - Consider non-editable regions in contenteditable elements as user-select:all even if the editable region doesn't have the focus; r=roc 2015-02-25 07:35:33 -05:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jonas Sicking 7abc217fd4 Bug 664061: Remove isindex code from layout. r=dbaron 2011-07-19 17:22:01 -07:00
Ehsan Akhgari c740c0cd64 Bug 620906 - Back out part of bug 289384 to make sure that scrollbars work in CKEditor fields again; r=roc a=blocking-final+ 2011-01-11 16:00:44 -05:00
Mounir Lamouri 80505c82b2 Bug 557087 (3/6) - Make layout aware of the new disabled state rule. r=dbaron a=sicking
--HG--
extra : rebase_source : 9e7d0a515c3f1bcacdcccc906c611849654ab484
2010-09-19 03:43:15 +02:00
Ehsan Akhgari 28c6c438ba Bug 289384 - Midas Editor: Shortcut command + left/right should go to beginning/end of line; r=masayuki,bzbarsky 2010-07-11 17:48:46 -04:00
Ehsan Akhgari 599142a072 Backout bug 289384 because of crashtest assertion failures 2010-07-11 17:43:27 -04:00
Ehsan Akhgari 921c7faf01 Bug 289384 - Midas Editor: Shortcut command + left/right should go to beginning/end of line; r=masayuki,bzbarsky
--HG--
extra : rebase_source : d533ad700d2e3e5d50dc0f03b57b14723e12c7eb
2010-06-25 14:58:25 -04:00
Ehsan Akhgari dd43739b68 Bug 528686 - xf:select doesn't work if contenteditable element is presented within the document; r=dbaron 2010-05-06 20:33:31 -04:00
Zack Weinberg a13afe8ba0 Bug 480582 - contenteditable=true breaks mouse pointer hover style for unrelated image links. r+sr=peterv 2009-03-16 12:55:03 +01:00
reed@reedloden.com fad15ee5ce Bug 391429 - "Editor caret is hidden in XULRunner applications, but visible in Firefox" [p=matt@songbirdnest.com (Matt Crocker) r+sr=peterv aM9=beltzner] 2007-10-31 11:51:49 -07:00
jwalden@mit.edu 19f3d4de8a Bug 374635 - [Midas] Visited links are black, not purple. Patch by Mathieu Fenniak <mfenniak-moz@mathieu.fenniak.net>, r=neil, sr=peterv, a=dbaron 2007-08-03 11:02:17 -07:00
martijn.martijn@gmail.com 9c1dcef796 Bug 386470 - <marquee contentEditable> should stop, r=peterv, sr=bzbarsky 2007-07-23 15:02:57 -07:00
peterv@propagandism.org 7bf2741259 Fix for bug 237964 (Allow editable areas in browser (contentEditable)). r/sr=sicking. 2007-06-27 15:29:45 -07:00