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

7520 Коммитов

Автор SHA1 Сообщение Дата
Brindusan Cristian 338aeb2777 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-15 06:41:22 +02:00
Eitan Isaacson 7c31734192 Bug 1519922 - Call ProxyEvent for scrolling events on non-Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D16484

--HG--
extra : moz-landing-system : lando
2019-01-14 23:46:57 +00:00
Eitan Isaacson ce8d13e455 Bug 1518247 - Pass name in viewport cache. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D15857

--HG--
extra : moz-landing-system : lando
2019-01-14 20:04:58 +00:00
James Teh 5dc4d81ca1 Bug 1514687 - Allow accessibility code to focus XUL radio buttons without selecting them. r=bgrins,smaug,MarcoZ,paolo
1. This requires exposing radiogroup's focusedItem property to C++.
Unfortunately, there's no existing equivalent in nsIDOMXULSelectControlItemElement.
radiogroup is the only element that needs this, so a new interface has been created for it.

2. Accessibility uses focusedItem instead of selectedItem when setting focus.

3. When an item is focused, accessibility needs to be notified.
This is done using a DOMMenuItemActive event.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 04:52:50 +00:00
Eitan Isaacson e708455671 Bug 1518805 - Don't update bounds on gone or defunct accessibles. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D16064

--HG--
extra : moz-landing-system : lando
2019-01-10 06:59:16 +00:00
Marco Zehe b4ebbe90ae Bug 1515186 - Always calculate group position for all children of an accessible after a tree mutation, r=Jamie
Previously, if we had children a, b, c, and d, then removed b, the group position for c and d would potentially be marked as dirty, but a would not. This caused the check for the availability of previous group info to return outdated information.

This patch now always forces the update of all children's group position when a children move has occurred, since it potentially affects all the children, not just the ones after it. In addition, accGroupInfo::Update() now checks if the previous and next siblings that are being used as shortcuts have dirty group info, and are being used only if they do not.

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

--HG--
extra : moz-landing-system : lando
2019-01-10 05:59:01 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Ehsan Akhgari 06c3d29113 Bug 1521000 - Part 1: Reformat the tree to ensure everything is formatted correctly with clang-format r=sylvestre
Summary: # ignore-this-changeset

Reviewers: sylvestre

Reviewed By: sylvestre

Subscribers: reviewbot, emilio, jandem, bbouvier, karlt, jya

Bug #: 1521000

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

--HG--
extra : histedit_source : 4add583bfa729ccc1aef934629ed45ff095189b0
2019-01-18 10:12:56 +01:00
Tim Nguyen 34cebfc0b6 Bug 1437641 - Remove numberbox binding and convert usages to input[type=number]. r=bgrins,dao
Differential Revision: https://phabricator.services.mozilla.com/D15882

--HG--
rename : toolkit/themes/shared/numberbox.css => toolkit/themes/shared/numberinput.css
extra : moz-landing-system : lando
2019-01-09 08:51:32 +00:00
Kris Maglione eb14dd1d2c Bug 1478124: Part 8b - Update DocShell module to use a static component manifest. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15040

--HG--
extra : rebase_source : d89ac470241cb6f6a43c29c6e90b1c0e4fc78028
extra : source : b0444e0bc801f828b49f9953a73498cf5ff5024b
2018-12-16 17:27:58 -08:00
Eitan Isaacson dfa5c93420 Bug 1518253 - Add accessibles to focus path hash table in non-e10s. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D15858

--HG--
extra : moz-landing-system : lando
2019-01-08 06:08:43 +00:00
Neil Deakin d30462861e Bug 1482389, remove methods of XULTreeElement that return unused nsresults. In addition, change GetView to return the nsITreeView instead of using an out-parameter, r=paolo 2018-12-04 11:25:41 -05:00
Neil Deakin cb10352f4b Bug 1482389, replace TreeBoxObject with XULTreeElement inherited from XULElement, r=peterv,paolo
--HG--
rename : dom/webidl/TreeBoxObject.webidl => dom/chrome-webidl/XULTreeElement.webidl
rename : layout/xul/tree/TreeBoxObject.cpp => dom/xul/XULTreeElement.cpp
rename : layout/xul/tree/TreeBoxObject.h => dom/xul/XULTreeElement.h
2018-12-04 11:25:30 -05:00
Timothy Guan-tin Chien bd38b39f8a Bug 1512048 - Convert tabmodalprompt binding to JSM module r=Gijs
This converts the tabmodalprompt binding to a class, to be constructed along side with the element
by TabModalPromptBox.

TabModalPromptBox will keep the instances in a map and pass it to the callers, instead of the element.
The tests and callers can access the class instance by passing the element reference to the map.

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

--HG--
rename : toolkit/components/prompts/content/tabprompts.xml => toolkit/components/prompts/content/tabprompts.jsm
extra : moz-landing-system : lando
2019-01-04 19:29:34 +00:00
Paolo Amadini a61bfb98fb Bug 1472558 - Convert "richlistbox" to Custom Element. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D15502

--HG--
rename : toolkit/content/widgets/richlistbox.xml => toolkit/content/widgets/richlistbox.js
extra : rebase_source : 7517e9d0760589a3df426aef4fa1c9c33f5355aa
2018-12-31 07:54:10 +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
James Teh 850ee9ea2b Bug 1515294: Only use SendSyncTextChangeEvent for live regions. r=MarcoZ
In order to support IA2 live regions with e10s (bug 1322532), text change events sent from the child process to the parent process use sync IPC.
That comes at a slight performance cost: the content process is blocked until the parent returns from sending and handling the event.
However, there is no reason to do this if the event is not for an accessible inside a live region; current clients don't need the sync behaviour outside of live regions.

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

--HG--
extra : source : 415f827cb9ce211c48b0c6625e917582bc81fd3a
2018-12-21 09:16:38 +00:00
Hiroyuki Ikezoe f36f418011 Bug 1516307 - Make nsIDOMWindowUtils.getResolution return the result value. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D15318

--HG--
extra : moz-landing-system : lando
2018-12-30 01:15:27 +00:00
Vedant Nevetia 327f6bb31a Bug 1514175 - Remove macOS fallback styling for the bookmarking panel tag selector checkboxes r=dao
Differential Revision: https://phabricator.services.mozilla.com/D15468

--HG--
extra : moz-landing-system : lando
2018-12-28 15:22:49 +00:00
Jacek Caban 8409db9e3c Bug 1430149 - Don't define INITGUID when not needed. r=aklotz
On mingw this causes IIDs to be defined in headers. Those definitions conflict with _i.c files that are included as well. Since we include _i.c anyway, INITGUID is simply not needed.
2018-12-25 18:49:39 +01:00
Jacek Caban 2957a4743d Bug 1430149 - widl compatibility fixes. r=aklotz
widl can't handle generating the typelib without explicit importlib() in this case. This should be fixed in widl as well, but using importlib() in this case looks right anyway.
2018-12-25 18:49:23 +01:00
Jacek Caban 5b9bc7c151 Bug 1430149 - Fix NtUndoc.h on mingw. r=aklotz
mingw headers declare both ObjectNameInformation and OBJECT_NAME_INFORMATION, which conflicts with local definitions.
2018-12-25 18:48:59 +01:00
arthur.iakab 70a4778dd8 Backed out changeset 415f827cb9ce (bug 1515294) on suspicion of causing content process hangs a=backout CLOSED TREE 2018-12-23 00:04:39 +02:00
Emilio Cobos Álvarez 99521806a2 Bug 1513749 - Modernize a bit nsLayoutUtils::GetFrameForPoint / GetFrameForArea. r=mats
Also add an IsElement check in GetElementFromPoint in the APZ code since I think
the element cast is unsound in presence of Shadow DOM.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 11:22:07 +00:00
James Teh f9cba89c57 Bug 1515294: Only use SendSyncTextChangeEvent for live regions. r=MarcoZ
In order to support IA2 live regions with e10s (bug 1322532), text change events sent from the child process to the parent process use sync IPC.
That comes at a slight performance cost: the content process is blocked until the parent returns from sending and handling the event.
However, there is no reason to do this if the event is not for an accessible inside a live region; current clients don't need the sync behaviour outside of live regions.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 09:16:38 +00:00
Jeff Walden ed23151bd7 Bug 1492937 - Make the JS subscript loader load scripts exclusively as UTF-8, with no way to specify any other encoding, and adjust a bunch of existing tests to use UTF-8 directly, rather than Unicode escape sequences or similar. (This also changes the encoding of .sjs scripts and all mochitest-browser tests in the tree from Latin-1 to UTF-8.) r=yzen, r=MattN, r=jimb, r=kmag 2018-12-19 13:46:20 -08:00
Neil Deakin 0e5b436454 Bug 1513332, add some null-pointer checks on elements in XULListboxAccessible, r=marcoz 2018-12-17 20:02:11 -05:00
Dorel Luca 32bb40cfd8 Backed out 2 changesets (bug 1513332, bug 1445942) for browser-chrome failures in browser/base/content/test/permissions/browser_reservedkey.js
Backed out changeset 648648a60190 (bug 1445942)
Backed out changeset 003adae62f33 (bug 1513332)
2018-12-18 00:01:19 +02:00
Neil Deakin 49daaf7581 Bug 1513332, add some null-pointer checks on elements in XULListboxAccessible, r=marcoz 2018-12-17 15:43:51 -05:00
Marco Zehe 47edbd91c4 Bug 1510476 - Don't expose the keyboard accelerator in IAccessible::get_accKeyboardShortcut if a XUL menu item does not have an access key, r=Jamie
The default implementation of get_accKeyboardShortcut falls back to using the keyboard accelerator if an access key is not available. For XUL menu items, this is not appropriate since the accelerator gets exposed as part of the accessible name already.

The result was a double announcement of the keyboard accelerator on menu items that did not have an access key (underlined letter).

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

--HG--
extra : moz-landing-system : lando
2018-12-17 06:09:48 +00:00
Marco Zehe 0a23cd946b Bug 1512411 - Don't expose broken label children accessibles on a XUL toolbarbutton which specifies the label attribute, r=Jamie
In bug 1507365, we introduced the ability of nested label children of toolbar buttons to provide the accessible name for a xul:toolbarbutton element. However, the XBL of xul:toolbarbutton causes the creation of a label accessible even if no xul:label child is present, and only the label attribute is being used. The nsIAccessibleText interface on such labels is, however, completely broken. This causes NVDA's mouse tracking, which always uses the deepest nested child, to fail. As a result, when hovering over Hamburger menu items, the announcement would be wrong, e. g., lag one behind the actual button the mouse is hovering over.

To fix this, we only accept xul:label children if they come from real XUL markup, not from the label attribute and the XBL creating the label. This means that some of the test changes from bug 1507365 have to be reverted to accommodate the new old behavior. But the new test for an actual label child still passes.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 08:20:02 +00:00
Mark Banner 0304564ac7 Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13754

--HG--
extra : moz-landing-system : lando
2018-12-11 21:39:40 +00:00
Mark Banner e2234d6da6 Bug 1415483 - Extend reject-importGlobalProperties to reject any priviliged items already in scope. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13753

--HG--
extra : moz-landing-system : lando
2018-12-11 21:39:38 +00:00
Csoregi Natalia 9e970681f2 Backed out 2 changesets (bug 1415483) for multiple failures e.g. on test_message_manager_ipc.html. CLOSED TREE
Backed out changeset d00748de66fc (bug 1415483)
Backed out changeset 8dea94258f54 (bug 1415483)
2018-12-11 19:30:57 +02:00
Mark Banner 1abdc8687f Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13754

--HG--
extra : moz-landing-system : lando
2018-12-11 14:09:44 +00:00
Mark Banner 4d543888a6 Bug 1415483 - Extend reject-importGlobalProperties to reject any priviliged items already in scope. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13753

--HG--
extra : moz-landing-system : lando
2018-12-11 14:09:24 +00:00
Brindusan Cristian 989d78f3d0 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-12-11 00:10:08 +02:00
Neil Deakin 9397165b4e Bug 1492326, use Element helper methods in accessibility instead of QueryInterface to get interface implementations that might be implemented by custom elements, r=surkov 2018-12-04 11:32:15 -05:00
Neil Deakin d2ed932b7c Bug 1492326, change methods of nsIDOMXUL* interfaces so that they return Elements to reduce usages as most callers want the return values as elements, r=peterv 2018-12-04 11:25:41 -05:00
Eitan Isaacson fd62b95c18 Bug 1511955 - Don't traverse into children without hypertext interfaces. r=Jamie
This prevents an infinite loop where we go into a child only to find the
nearest hypertext accessible being its parent.

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

--HG--
extra : moz-landing-system : lando
2018-12-10 03:30:21 +00:00
Sylvestre Ledru ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Eitan Isaacson 9045d6bab7 Bug 1511398 - Check if the retrieved accessible child is actually valid when filling the bundle's data, r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13611

--HG--
extra : moz-landing-system : lando
2018-12-06 15:43:23 +00:00
Eitan Isaacson e027ad57e6 Bug 1507713 - Provide heading level in roleDescription. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13504

--HG--
extra : moz-landing-system : lando
2018-12-05 20:13:07 +00:00
Narcis Beleuzu ec8e87d9fc Backed out changeset 4ad8241eb92a (bug 1511398) gv-junit2 crashes on [@ mozilla::a11y::Accessible::IsDefunct() const] . CLOSED TREE 2018-12-05 22:06:21 +02:00
Eitan Isaacson ec33fda472 Bug 1511759 - Null-check focus path cached accessible. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13729

--HG--
extra : moz-landing-system : lando
2018-12-05 19:14:54 +00:00
Eitan Isaacson e5975f34ba Bug 1511398 - Check if the retrieved accessible child is actually valid when filling the bundle's data, r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13611

--HG--
extra : moz-landing-system : lando
2018-12-05 19:06:40 +00:00
Eitan Isaacson 2cd7977288 Bug 1510794 - Implement AccessibilityNodeInfo.ACTION_CLICK natively. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13321

--HG--
extra : moz-landing-system : lando
2018-12-05 16:08:01 +00:00
Eitan Isaacson 8e0b1240c1 Bug 1510791 - Add action count to BatchData and set isClickable correctly in Android. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13320

--HG--
extra : moz-landing-system : lando
2018-12-05 15:37:24 +00:00
Ehsan Akhgari 0dcf936804 Bug 1510911 - Part 2: Backout changeset f8849239da42 (bug 1493563 - Part 5) for regressing performance 2018-12-03 14:27:53 -05:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09: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
Eitan Isaacson 00ea13b8d5 Bug 1502061 - Check if origTargetNode still exists in ProcessDOMEvent. r=Jamie 2018-11-29 09:35:00 +02:00
Gabriele Svelto 19e52bebd4 Bug 1510582 - Remove useless inclusions of Services.h r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13240

--HG--
extra : moz-landing-system : lando
2018-11-28 17:25:23 +00:00
Narcis Beleuzu fbd301ecde Merge mozilla-central to inbound. CLOSED TREE 2018-11-28 12:02:34 +02:00
Andrea Marchesini f399725b04 Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me 2018-11-28 08:22:06 +01:00
Brindusan Cristian 025923e8bc Backed out 3 changesets (bug 1503681) for geckoview failures on org.mozilla.geckoview.test.GeckoSessionTestRuleTest.waitForChromeJS. CLOSED TREE
Backed out changeset 211c7dfdc408 (bug 1503681)
Backed out changeset 076cc5bece1d (bug 1503681)
Backed out changeset 7a19fe6be68c (bug 1503681)
2018-11-28 11:10:48 +02:00
Andrea Marchesini d69ebc1ae7 Bug 1503681 - rel=noopener implicit for target=_blank in anchor and area elements when no rel attribute is set - fix tests, r=me 2018-11-28 08:22:06 +01:00
Kyle Machulis c241567f0f Bug 1505601 - Turn nsIDocShell XPIDL const lists into cenums; r=bzbarsky
Turn all const lists and related attributes into cenums, to provide a
vague sense of type safety.

Depends on D11715

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

--HG--
extra : moz-landing-system : lando
2018-11-28 03:30:56 +00:00
Razvan Maries 99a5f987b3 Merge mozilla-inbound to mozilla-central a=merge 2018-11-27 19:32:31 +02:00
Ehsan Akhgari 6099c9f67b Bug 1508472 - Part 1: First batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 10:08:58 +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
Marco Zehe 4ae01a5d49 Bug 1380451 - create HTML table caption accessible unconditionally, r=Jamie
Creates the HTML Caption accessible from the markup map, but only if it's the first caption. Other caption elements are ignored as before.

This also creates caption accessibles for those captions that have been collapsed to zero height and width via CSS.

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

--HG--
extra : moz-landing-system : lando
2018-11-25 23:39:52 +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
Marco Zehe 36b5ca6aa6 Bug 1509222 - XUL toolbarbutton with checked="true' but not type="checkbox" doesn't get the pressed state, r=Jamie
Simply decouple the check for the checked attribute from the one for the type attribute.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 22:39:51 +00:00
Marco Zehe f86d40d773 Bug 1508935 - Create more accessibles from the HTML markup map rather than layout frame types, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D12639

--HG--
extra : moz-landing-system : lando
2018-11-23 06:49:00 +00:00
Tim Nguyen 044d8ca731 Bug 1508142 - Remove remains of tree cell-based selection code. r=bzbarsky,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D12225

--HG--
extra : moz-landing-system : lando
2018-11-22 09:59:02 +00:00
Marco Zehe ccd63db4b3 Bug 1508870 - Make a distinction between an empty returned string versus a null pointer, r=Jamie
When determining if an author provided an empty alt attribute versus no alt attribute at all, our image accessible name is either an empty string or a null string. Screen readers can then choose to guess the name from the source if the author did not explicitly provide an empty alt text and thus marked the image as decorative.

The accessible handler for the Windows remote processes did not account for this distinction, always returning what appeared to be an empty string. This was found while determining why NVDA wasn't guessing the SRC from a non-labelled graphical link. NVDA checks to see if the name returned by the link accessible is null, and then decides to look for the graphical children if that is the case.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 06:09:31 +00:00
Marco Zehe 2d841c76b1 Bug 1507365 - Allow labels inside toolbarbuttons to participate in accessible name calculation, r=Jamie
Toolbar buttons in XUL can now have labels inside them to provide the actual caption for the button. Adjust the accessibility module to allow label elements as acceptable children for the toolbarbutton element so the algorithm can pick up their text for the button's name.

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

--HG--
extra : moz-landing-system : lando
2018-11-22 05:57:48 +00:00
Eitan Isaacson 30fe7d0849 Bug 1509111 - Populate viewIdResourceName correctly. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D12583

--HG--
extra : moz-landing-system : lando
2018-11-21 21:07:20 +00:00
Paolo Amadini 37ad34fc88 Bug 1429940 - Null-check the GetContent call on the parent. r=Jamie
--HG--
extra : rebase_source : 1f2692152b608d9283990a6051091410ad0f6fea
2018-11-21 15:24:13 +00:00
Jonathan Watt 181d407b43 Bug 1510167. Mark some nsGkAtom* arguments as const in DOM code. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D13049

--HG--
extra : rebase_source : 66db700ce58e88ab95c24e9dbc70ba4815e94df1
2018-11-13 12:48:21 +00:00
Gerald Squelart 1bd6a1fd4e Bug 1435091 - p4. Use profiler_thread_is_being_profiled() instead of profiler_is_active() around profiler_add_marker()s - r=mstange
(Unless there were other profiler actions, as I'm not sure yet whether it would
be safe to skip them when the profiler is paused; another bug should
investigate that.)

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

--HG--
extra : moz-landing-system : lando
2018-11-19 06:29:15 +00:00
shindli 95b9b72836 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-11-20 23:50:05 +02:00
Tom Schuster 5a9d2a428c Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
Depends on D11200

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

--HG--
extra : moz-landing-system : lando
2018-11-20 16:59:56 +00:00
Csoregi Natalia df7483024d Backed out 6 changesets (bug 1493292) for bustage on /nsTransferable.cpp. CLOSED TREE
Backed out changeset f198bf91320b (bug 1493292)
Backed out changeset 6487aa307123 (bug 1493292)
Backed out changeset f2cabd69c568 (bug 1493292)
Backed out changeset 71430fceb4a3 (bug 1493292)
Backed out changeset 3a9b6d65d8c7 (bug 1493292)
Backed out changeset 55769869037c (bug 1493292)
2018-11-20 17:13:18 +02:00
Tom Schuster b292ec7c2c Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
Depends on D11200

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

--HG--
extra : moz-landing-system : lando
2018-11-20 14:47:02 +00:00
Paolo Amadini 4d52da3cb2 Bug 1429940 - Part 1 - Use the first "label" element instead of the one inside "caption" to describe the "groupbox" element. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D11793

--HG--
extra : rebase_source : eec887ae45eb1a2b1356cef2f6cbbf24a5427f39
2018-11-15 12:05:09 +00:00
Paolo Amadini b2a83ffc85 Bug 1499947 - Part 1 - Remove XULProgressMeterAccessible and its base template class. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D12144

--HG--
extra : rebase_source : 81275b233770a7e9716a2b811a08060fc5006e1b
2018-11-20 14:10:38 +00:00
Boris Zbarsky 47f81c215b Bug 1507540 part 7. Use notxpcom more in dom/. r=mccr8 2018-11-19 20:20:17 -05:00
Lina Cambridge 994f3a458c Bug 1494713 - Add `nsWindow::From`. r=jchen
Differential Revision: https://phabricator.services.mozilla.com/D11289

--HG--
extra : moz-landing-system : lando
2018-11-16 17:31:58 +00:00
Timothy Guan-tin Chien 2b5881e46b Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 06:51:07 +00:00
Andreea Pavel d51566f085 Backed out 2 changesets (bug 1503019) for failing crashtests at dom/base/crashtests/1505811.html on a CLOSED TREE
Backed out changeset 06b12fd41ff1 (bug 1503019)
Backed out changeset 7b845eac9dd7 (bug 1503019)
2018-11-15 01:52:30 +02:00
Andreea Pavel 9cabbb0b47 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-11-15 00:35:07 +02:00
Cristina Coroiu 60654b0cda Bug 1503084 - disable browser_caching_name.js for frequent failures r=gbrown
--HG--
extra : histedit_source : 71daa8098bf1d42a05c479f9bb708925b1bbfced
2018-11-14 07:21:00 +02:00
Timothy Guan-tin Chien c0cc4f74e7 Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 19:34:52 +00:00
rosston 8f54bcb47f Bug 1501904 - Fire accessibility focus events when using readline nav in url bar r=dao,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D10058

--HG--
extra : moz-landing-system : lando
2018-11-08 14:14:57 +00:00
Eitan Isaacson 413fe38c65 Bug 1479039 - Update SessionAccessibility cache and state from events. r=snorp,yzen
Differential Revision: https://phabricator.services.mozilla.com/D11217

--HG--
extra : moz-landing-system : lando
2018-11-12 16:42:37 +00:00
Eitan Isaacson f312bc912b Bug 1479039 - Update cached focus path bounds on scroll. r=snorp,yzen
Differential Revision: https://phabricator.services.mozilla.com/D11216

--HG--
extra : moz-landing-system : lando
2018-11-12 16:42:03 +00:00
Eitan Isaacson 956b93179f Bug 1479039 - Implement java portion of focus path cache. r=snorp,yzen
Differential Revision: https://phabricator.services.mozilla.com/D11215

--HG--
extra : moz-landing-system : lando
2018-11-12 16:41:40 +00:00
Eitan Isaacson 970933ad81 Bug 1479039 - Extend BatchData struct and added focus path cache. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D11214

--HG--
extra : moz-landing-system : lando
2018-11-12 16:41:38 +00:00
Eitan Isaacson 5b5349d41f Bug 1479039 - Refactor ToBundle to have a multiple argument version. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D11213

--HG--
extra : moz-landing-system : lando
2018-11-12 16:41:33 +00:00
Eitan Isaacson 3e98aa79f5 Bug 1479039 - Move PersistentPropertiesToArray to nsAccUtils. r=Jamie
In order to send send attributes in BatchData we will need to convert
them to an array. Here we factor out the private function that does that
and put it in nsAccUtils.

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

--HG--
extra : moz-landing-system : lando
2018-11-12 16:41:31 +00:00
Marco Zehe ab92f98230 Bug 1506041 - Code cleanup: Convert more static functions to lambdas in the markup map, r=Jamie
All static functions from nsAccessibilityService that were either only called once from the markup map, or are simple one-liners that were only called up to three times, were converted to lambdas in the markup map.

the static function that creates HyperTextAccessibleWrap has remained untouched because it is called a lot from the markup map, even though its implementation is actually just a one-liner.

The other untouched static function is the templated one for html:dt or html:dd.

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

--HG--
extra : moz-landing-system : lando
2018-11-11 23:13:35 +00:00
Emilio Cobos Álvarez ea43a5393a Bug 1196668 - Make images without alt generate a replaced box regardless of src. r=bz
Behavior-wise this only removes the HasAttr(src) check, and adds the IsEmpty()
check to the alt attribute value, since this function is only called for <img>
and <input>.

But it also cleans up a bit.

Differential Revision: https://phabricator.services.mozilla.com/D11194
2018-11-09 18:10:14 +01:00
Gurzau Raul 139c9b897f Backed out 2 changesets (bug 1196668) for assertion count failures at child-constraints/available-size-for-percentages-vrl-htb.https.html
Backed out changeset ff03b0b8ed81 (bug 1196668)
Backed out changeset 8e423aa1c94e (bug 1196668)
2018-11-09 06:33:16 +02:00
Emilio Cobos Álvarez 54599e6187 Bug 1196668 - Make images without alt generate a replaced box regardless of src. r=bz
Behavior-wise this only removes the HasAttr(src) check, and adds the IsEmpty()
check to the alt attribute value, since this function is only called for <img>
and <input>.

But it also cleans up a bit.

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

--HG--
extra : source : 803b224d52a0940b4fb4b3b9cffc6a1fa6e5d4ee
2018-11-07 18:26:17 +01:00
Gurzau Raul ecadb55316 Backed out changeset 803b224d52a0 (bug 1196668) for failures at dom/html/reftests/468263-2.html on a CLOSED TREE 2018-11-09 05:00:56 +02:00
Emilio Cobos Álvarez b0577a5771 Bug 1196668 - Make images without alt generate a replaced box regardless of src. r=bz
Behavior-wise this only removes the HasAttr(src) check, and adds the IsEmpty()
check to the alt attribute value, since this function is only called for <img>
and <input>.

But it also cleans up a bit.

Differential Revision: https://phabricator.services.mozilla.com/D11194
2018-11-09 02:56:56 +01:00
Bogdan Tara 388d7c8b5a Merge inbound to mozilla-central. a=merge 2018-11-08 20:48:31 +02:00