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

417 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen d9d09bb0ea Bug 1519090 - Part 3: nsFocusManager::GetNextTabbableContentInScope should also check slot if aSkipOwner is false; r=smaug
Slot element could be also focusable.

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

--HG--
extra : moz-landing-system : lando
2019-01-22 08:15:02 +00:00
Edgar Chen 2b9f6f6196 Bug 1519090 - Part 2: Skip the node under slot scope in frame traversal; r=smaug
The nodes under slot scope is already being traversed in
GetNextTabbableContentIn*Scope.

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

--HG--
extra : moz-landing-system : lando
2019-01-22 08:11:56 +00:00
Edgar Chen f502ff0c72 Bug 1519090 - Part 1: Some minor nsFocusManager cleanup; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D16848

--HG--
extra : moz-landing-system : lando
2019-01-22 07:41:36 +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
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
Emilio Cobos Álvarez 63814207cb Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498

--HG--
extra : moz-landing-system : lando
2018-12-31 14:10:19 +00:00
Emilio Cobos Álvarez f131713362 Bug 1516366 - Move base classes from nsDocument to nsIDocument. r=smaug
This is a big step in order to merge both.

Also allows to remove some very silly casts, though it causes us to add some
ToSupports around to deal with ambiguity of casts from nsIDocument to
nsISupports, and add a dummy nsISupports implementation that will go away later
in the series.

Differential Revision: https://phabricator.services.mozilla.com/D15352
2018-12-29 20:41:28 +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
Edgar Chen 9941a58c1c Bug 1512457 - Part 3: Ensure GetNextTabbableContentInScope returns only elements which have a frame; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D14865

--HG--
extra : moz-landing-system : lando
2018-12-20 14:47:39 +00:00
Edgar Chen f0c04529af Bug 1512457 - Part 2: Enter into frameless shadow host scope during tree traversal; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D14809

--HG--
extra : moz-landing-system : lando
2018-12-19 13:37:46 +00:00
Edgar Chen f2a996b941 Bug 1512457 - Part 1: Correctly handle the case that FocusManager could not find next content has frame in tree; r=smaug
In this case we should look for next highest tabindex or do end searching
handling, instead of just check the root content.

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

--HG--
extra : moz-landing-system : lando
2018-12-19 13:23:20 +00:00
Edgar Chen 7f5019defb Bug 1512043 - Ensure traverse all nodes owned by the top level shadow host; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D14143

--HG--
extra : moz-landing-system : lando
2018-12-14 18:14:52 +00:00
Edgar Chen 9c53a575d3 Bug 1500273 - Ensure backward focus navigation works in Shadow DOM; r=smaug
When entering into a Shadow DOM in backward navigation, the frame still points
to the last frame in Shadow DOM which could be a non-focusable frame, so move
the handling of backward navigation for Shadow DOM upward.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 20:43:51 +00:00
Emilio Cobos Álvarez 10e4c5c339 Bug 1513141 - Really minor nsFocusManager cleanup. r=edgar
I was skimming over the patch in bug 1512043 and wrote this. I think it should
not really affect that patch in any meaningful way, so I may as well land it.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 11:25:02 +00:00
Neil Deakin ef24d6e37e Bug 1492326, use Element helper methods in dom/layout instead of QueryInterface to get interface implementations that might be implemented by custom elements, r=paolo 2018-12-04 11:33:05 -05:00
Gijs Kruitbosch 0ad3fd36fa Bug 1503887 - clear focused window when Blur() is called and there's no docshell, presshell, or the focused element is no longer in the composed document r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D13655

--HG--
extra : moz-landing-system : lando
2018-12-07 09:00:28 +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
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 82956adc4f Bug 1507101 - Use StyleChildrenIterator instead of custom frame tree walking code to handle NAC inside shadow dom. r=smaug
There are lots of frames which create anonymous content (like scrollframes,
which generate scrollbars) but for which this code was wrong.

Use StyleChildrenIterator which has a defined order between NAC and flattened
tree. I've verified this doesn't break tabbing through input type="date" with
UA widget disabled, fwiw.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 20:31:50 +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
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
Timothy Guan-tin Chien 76056b7a72 Bug 1496242 - Part III, nsFocusManager should account for UA Widget when deciding to traverse into NAC r=smaug
In bug 1430692, a special case was added in nsFocusManager::GetNextTabbableContentInScope()
that traverse into the element when the primany frame implements nsIAnonymousContentCreator,
assuming there will be NAC to focus within.

This is not the case when UA Widget is turned on, where the focusable inner inputs will
be put in the UA Widget Shadow DOM.

The change here account this fact.

Depends on D9057

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

--HG--
extra : moz-landing-system : lando
2018-10-29 19:51:17 +00:00
Brendan Dahl 33c8c0f582 Bug 1501833 - Allow the retargetdocumentfocus attribute to be used in any chrome document. r=smaug
Fixes test browser/base/content/test/general/browser_documentnavigation.js
for browser.xhtml.

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

--HG--
extra : moz-landing-system : lando
2018-10-24 21:10:37 +00:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Olli Pettay d44e63a9b4 Bug 1490820, elements without frames shouldn't be focusable in shadow DOM, r=ehsan 2018-09-21 21:46:17 +03:00
Henrik Skupin 80fec61f82 Bug 1489967 - Keep active state when Firefox is moved to background and focusmanager test mode is enabled. r=enndeakin
The test mode can be used to virtually give a Chrome window the
focus even with Firefox being in the background.

Currently when such a window has the focus and another application
is moved to the foreground, the active state is lost. This means that
for example Selenium tests which are run in parallel and using
different instances of Firefox will not receive the expected
"focus" and "blur" events.

This patch checks for the test mode and if enabled doesn't
lower the window, which will keep the focused state.

--HG--
extra : rebase_source : 2ee3a9c66327875628aa62d629582ee403fc090b
2018-09-10 15:03:04 +02:00
Masayuki Nakano 9c349ade9b Bug 1487591 - Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener r=smaug
AccessibleCaretEventHub is an nsISelectionListener of Selection whose type is
"normal".  This is added only when nsFrameSelection::Init() is called and
accessible caret is enabled.  Additionally, nsFrameSelection::Init() is
always called immediately after creating nsFrameSelection.

Therefore, when AccessibleCaretEventHub is installed to Selection, this is
always second selection listener and won't be installed multiple times.  So,
Selection can store pointer of AccessibleCaretEventHub directly only when
it's enabled and the Selection needs to notify it of selection change.

This patch makes Selection stores AccessibleCaretEventHub with RefPtr, then,
makes Selection::NotifySelectionListeners() call its OnSelectionChange()
immediately after AutoCopyListener.

Unfortunately, this patch includes making of MOZ_CAN_RUN_SCRIPT_BOUNDARY and
MOZ_CAN_RUN_SCRIPT a lot since some methods of AccessibleCaretEventHub are
marked as MOZ_CAN_RUN_SCRIPT and including AccessibleCaretEventHub.h into
Selection.h causes compile the compile errors.

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

--HG--
extra : moz-landing-system : lando
2018-08-31 21:19:44 +00:00
Xidorn Quan 33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Olli Pettay 2b7b8b9b62 bug 1482820, fix a small typo in nsFocusManager.cpp, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3193

--HG--
extra : moz-landing-system : lando
2018-08-13 09:43:05 +00:00
Olli Pettay d4b83a4a08 bug 1481079, Shadow DOM hosts should be focusable, r=mrbkap 2018-08-11 02:58:23 +03:00
Olli Pettay bbb7acc3c6 Bug 1476301, try to ensure sequential focusing can leave shadow trees, r=mrbkap
--HG--
extra : rebase_source : 59816c1db5fa5a3ff71e0cbeeca6bb99f4a4fed6
2018-08-09 20:02:43 +03:00
Olli Pettay f3c3cde4c7 bug 1430701, remove now unused nsLightFrameIterator, r=mrbkap
--HG--
extra : rebase_source : 875b320c75414c3911a252e39267d1a424a51f37
2018-07-20 19:32:22 +03:00
Olli Pettay d2c6da0786 bug 1430701, contents of frameless shadow hosts should be focusable, r=mrbkap
--HG--
extra : rebase_source : 1f36c2958048a02498ba1b41587b552cc1559ab4
2018-07-20 19:29:52 +03:00
Kris Maglione a16a23e56f Bug 1473631: Part 4 - Replace pref observers with callbacks in FocusManager. r=njn
MozReview-Commit-ID: 533Qz2nIkmX

--HG--
extra : rebase_source : 71e32db787b150b8ef3cee3163953c0adb893c92
2018-07-05 13:36:07 -07:00
Olli Pettay 942718eef1 Bug 1466581, handle sequential focus also in nested shadow DOM, r=mrbkap 2018-07-10 01:56:42 +03:00
Olli Pettay 34620de771 bug 1472427, <img usemap> should work in shadow DOM, r=baku 2018-07-04 20:26:09 +03: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
Paolo Amadini 372336c621 Bug 1448126 - Part 2 - Remove the "scale" binding and its supporting platform code. r=bgrins
MozReview-Commit-ID: ETmUuosYxeG

--HG--
extra : rebase_source : 1a39207887f2c55f5d2cd31990209809dbb97ba9
2018-06-24 17:19:25 +01:00
Olli Pettay 31baedeb6b bug 1466998, because of XUL panels, sequential focusing needs to handle also non-document-roots as roots, r=mrbkap
--HG--
extra : rebase_source : 39f7898fc2c43ec2c0497fd336bb1a501f39b269
2018-06-19 21:28:34 +03:00
Henrik Skupin a7ac3da64d Bug 1334981 - Backed out changeset d6ca24ba3673 for regression caused by bug 887718. r=enndeakin+6102
MozReview-Commit-ID: 9hIcRVRseO1

--HG--
extra : rebase_source : e7899b4dc74c20a6204583fbaf371eb69b2d9405
2018-06-07 15:48:48 +02:00
Boris Zbarsky bea3100e53 Bug 1455676 part 14. Remove most use of nsIDOMNode in dom/. r=qdot 2018-05-29 22:58:49 -04:00
Boris Zbarsky 4ef13b9076 Bug 1455676 part 2. Remove nsIDOMNode usage from accessible/. r=surkov 2018-05-29 22:58:47 -04:00
Boris Zbarsky 2e09ba1f75 Bug 1377980 part 2. Remove most C++ use of nsIDOMRange. r=mccr8 2018-05-17 12:01:38 -04:00
Adrian Wielgosik c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
Boris Zbarsky b47b72dae9 Bug 1387143 part 23. Remove nsISelection collapse* methods. r=mats 2018-05-08 13:52:41 -04:00
Boris Zbarsky 0efb178bc2 Bug 1387143 part 11. Support non-XPCOM weakreference on Selection. r=mats
This way we don't have to deal with QI to get a Selection out of a weakref.

mfbt weakrefs don't have a SizeOfOnlyThis.  In any case, the memory used by the
weakref itself is pretty minor...
2018-05-08 13:52:37 -04:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Olli Pettay 30938bcddd Bug 1430020, let sequential focus navigation in shadow DOM enter iframes, r=mrbkap
--HG--
extra : rebase_source : 0ca436dfc8b28a680bdb393f0f9ce8ae0632bd9a
2018-04-28 16:07:06 +03:00
Cosmin Sabou db4c6f9696 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-04-27 13:13:54 +03:00