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

65 Коммитов

Автор SHA1 Сообщение Дата
James Teh c68c3ca8b3 Bug 1844238 part 1: Change includes of Role.h to mozilla/a11y/Role.h. r=eeejay
Role.h will soon be generated, but it is generated within the obj dir, so local includes won't work.
Our C++ style guide says we should prefer exported includes wherever possible anyway.

This was done with this shell command inside the accessible/ directory:

```
sed -i 's,#include "Role.h",#include "mozilla/a11y/Role.h",' `git grep -l '#include "Role.h"'`
```

Differential Revision: https://phabricator.services.mozilla.com/D183940
2023-07-26 02:19:41 +00:00
James Teh 4ff50c7676 Bug 1765968: Call QueueCacheUpdate instead of SendCache wherever possible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D183950
2023-07-21 02:24:44 +00:00
Nathan LaPre 957de6a77f Bug 1840732 Part 3: Remove unnecessary includes from accessible/generic, r=Jamie
This revision removes unnecessary include directives from cpp files in the
accessible/generic directory. These suggestions came from the Include What You
Use tool.

Depends on D182397

Differential Revision: https://phabricator.services.mozilla.com/D182398
2023-07-07 03:22:07 +00:00
Emilio Cobos Álvarez 4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Emilio Cobos Álvarez a228002bd2 Bug 1815229 - Remove nsImageBoxFrame. r=tnikkel,layout-reviewers
nsImageFrame has support for displaying style URIs / an owned image
request, so use it.

The main behavior difference is that we don't fire `load` / `error`
events for those images anymore, but I don't see any event listener for
those around, so I think they can go.

Differential Revision: https://phabricator.services.mozilla.com/D168958
2023-02-21 17:36:11 +00:00
Robert Longson 88d6e6fbaa Bug 1817075 - Use nsIFrame::HasAnyStateBits() whenever possible instead of GetStateBits() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170006
2023-02-16 08:10:28 +00:00
Nathan LaPre ce54599766 Bug 1748585: Remove img elements with alt="" from the a11y tree, r=Jamie
This revision changes the logic for creation and updating of accessibles
corresponding to elements that produce image accessibles, such that alt=""
(without click listeners or any other aria attributes that force an accessible)
will effectively remove that element's accessible from the accessibility tree.
Next, this revision removes the concept of eNoNameOnPurpose from accessible name
handling, since it's now unnecessary now that alt="" means "don't create an
accessible" in most cases. This revision also adds tests to verify the
functionality and updates existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D160706
2022-11-09 20:05:01 +00:00
Marian-Vasile Laza f0f79d68f1 Backed out changeset e521fea384c5 (bug 1748585) for causing accessibility crashes (bug 1799208). 2022-11-05 23:52:36 +02:00
Razvan Cojocaru 1629218702 Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
Nathan LaPre 8c8a637b75 Bug 1748585: Remove img elements with alt="" from the a11y tree, r=Jamie
This revision changes the logic for creation and updating of accessibles
corresponding to img elements such that alt="" (without click listeners or any
other aria attribute that forces an accessible) will effectively remove that
img's accessible from the accessibility tree. Next, this revision removes the
concept of eNoNameOnPurpose from accessible name handling, since it's now
unnecessary now that alt="" means "don't create an accessible" in most cases.
This revision also adds tests to verify the functionality and updates existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D160706
2022-11-03 19:28:49 +00:00
Eitan Isaacson a9bc6f0257 Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-31 23:10:51 +00:00
Cosmin Sabou ef48e09b4e Backed out 6 changesets (bug 1743967, bug 1748749, bug 1749828) for causing bc failures on browser_PBMCookieBehavior.js.
Backed out changeset afda8c72ba29 (bug 1749828)
Backed out changeset 8b5356f3d50d (bug 1743967)
Backed out changeset 04f178d71ae6 (bug 1748749)
Backed out changeset cd2e76de3d18 (bug 1748749)
Backed out changeset 4190c5e44b32 (bug 1748749)
Backed out changeset 8e23acc969d2 (bug 1748749)
2022-02-01 03:05:11 +02:00
Eitan Isaacson 01dced264b Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-31 23:10:51 +00:00
Butkovits Atila c6b99e8ff7 Backed out 5 changesets (bug 1743967, bug 1748749) for causing failures at browser_caching_actions.js. CLOSED TREE
Backed out changeset 6f15d287ecd8 (bug 1743967)
Backed out changeset fce9d3a2500d (bug 1748749)
Backed out changeset 9d405f9475b3 (bug 1748749)
Backed out changeset 9dccfcc00718 (bug 1748749)
Backed out changeset f1be79d75c5d (bug 1748749)
2022-01-28 07:07:56 +02:00
Eitan Isaacson 6732b10718 Bug 1748749 - P2: Cache has long desc. r=Jamie
We only need to cache the existance of a longdesc in an image.
This increments the action count.

Differential Revision: https://phabricator.services.mozilla.com/D135906
2022-01-28 00:09:03 +00:00
Morgan Reschenberg 57c2acce79 Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135272
2022-01-18 23:31:21 +00:00
Butkovits Atila e5a82d2e01 Backed out changeset 6c3a672524b7 (bug 1748878) for causing accessibility crashes. a=backout 2022-01-20 17:24:17 +02:00
Morgan Reschenberg ac66a0e8a8 Bug 1748878: Use LayoutDeviceInt types for points, rects, sizes in dev pixels r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D135272
2022-01-18 23:31:21 +00:00
James Teh e02052c2cc Bug 1742595: Don't throw an assertion when calling ImageAccessible::NativeState on a XUL image. r=eeejay
XUL images use nsImageBoxFrame, not nsImageFrame.
AccessibleType() returns eNoType on nsImageBoxFrame.
Changing this to return eImageType seems a bit risky and adding a new type just for an assertion seems pointless.
Therefore, we just check the frame type.

Differential Revision: https://phabricator.services.mozilla.com/D132051
2021-11-29 18:23:48 +00:00
Eitan Isaacson 6f380d42dd Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-12 15:46:39 +00:00
Eitan Isaacson bc023a74f1 Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-12 15:46:38 +00:00
Narcis Beleuzu 908970e8a5 Backed out 3 changesets (bug 1733238) for Bp-hybrid bustages on ImageAccessible . CLOSED TREE
Backed out changeset af8436178a49 (bug 1733238)
Backed out changeset 910aebecda65 (bug 1733238)
Backed out changeset c5d218eb6acb (bug 1733238)
2021-10-12 00:53:23 +03:00
Eitan Isaacson 61d62bdfb5 Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-11 19:43:19 +00:00
Eitan Isaacson 4bd2d11bcb Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-11 19:43:19 +00:00
Cristian Tuns a373e25460 Backed out 3 changesets (bug 1733238) for causing hybrid build bustages. CLOSED TREE
Backed out changeset 7753b03a092a (bug 1733238)
Backed out changeset 352c6a7ae5cd (bug 1733238)
Backed out changeset 9c132ebfabb2 (bug 1733238)
2021-10-08 19:17:37 -04:00
Eitan Isaacson b9bdd79ca9 Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-08 20:20:58 +00:00
Eitan Isaacson 306495fc6c Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-08 20:20:58 +00:00
Eitan Isaacson 1de5b0abcd Bug 1731374 - Add string storage to AccAttributes with move semantics. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D126012
2021-09-28 22:01:35 +00:00
Eitan Isaacson 62d0cdcad4 Bug 1714390 - P2: Use AccAttributes for accessible and text attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116783
2021-06-10 23:07:05 +00:00
Eitan Isaacson 6e49732365 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105670
2021-02-19 23:14:32 +00:00
Eitan Isaacson f48f468cb7 Bug 1693607 - [Linux] Add braces around statements. r=morgan
This is a collaboration between clang-tidy and clang-format.

clang-tidy uses compiled code paths, so this patch is linux specific.

Differential Revision: https://phabricator.services.mozilla.com/D105669
2021-02-19 23:14:32 +00:00
Andi-Bogdan Postelnicu 8de41d8d26 Bug 1683561 - Make `accessibility` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100212
2021-01-05 09:47:12 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
James Teh ac0a51e32c Bug 1596007: Fire an a11y state change event when an image's size becomes available. r=eeejay,emilio
Differential Revision: https://phabricator.services.mozilla.com/D62871

--HG--
extra : moz-landing-system : lando
2020-02-18 17:22:35 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Kris Maglione 22592538f5 Bug 1561015: Part 1 - Use BrowsingContext in window provider APIs. r=bzbarsky,mossop
This is the first step in making it possible to return remote WindowProxy
objects from window.open() and related APIs.

This patch also incidentally fixes a bug where getContentWindowOrOpenURI
returned the top-level browser window rather than the new content window when
passed OPEN_NEWWINDOW for the `aWhere` parameter. This was not the expected
behavior, and was a potentially major footgun for any new users who expected
to always get the content window for the URL they were loading, rather than
sometimes getting a chrome browser window instead.

For now, that case just returns null, which is only a minor footgun, rather
than the major one we had before.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 20:48:33 +00:00
Boris Zbarsky 374137e8d8 Bug 1565767 part 5. Remove some unnecesary refcounting at nsIContent::GetBaseURI callsites. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D37973

--HG--
extra : moz-landing-system : lando
2019-07-15 18:29:05 +00:00
Masayuki Nakano 5e41233499 Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 00:19:48 +00:00
Razvan Maries 1cd564b971 Backed out changeset 3b94c20ba873 (bug 1540990) for build bustages. CLOSED TREE 2019-04-04 02:44:00 +03:00
Masayuki Nakano b2bba953cc Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 23:29:38 +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 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
Alexander Surkov af50d56f28 Bug 1491742 - UBSan: load of value which is not a valid value for type 'bool' in ImageAccessible.cpp, r=jamie 2018-09-21 13:52:50 +08:00
Tokio Kajitsuka 55c94aedca Bug 1438193 - part11-9: NativeState r=surkov
turn NativeState into const functions
2018-05-16 03:04:50 +09:00
Tokio Kajitsuka 2b0e583f32 Bug 1438193 - part11-8: DoAction r=surkov
turn DoAction & ActionCount into const functions
2018-05-16 02:40:22 +09:00
Tokio Kajitsuka 0f609dc771 Bug 1438193 - part11-4: Name r=surkov
turn Name & ARIAName & NativeName into const functions
2018-05-16 01:13:02 +09:00
Tokio Kajitsuka 9b9c3780fe Bug 1438193 - part7: NativeRole r=surkov
turn NativeRole into const functions
2018-05-08 04:05:50 +09:00
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Milan Sreckovic 6cf51345e7 Bug 1423541: Use BaseRect access methods instead of member variables in accessible/ r=surkov
MozReview-Commit-ID: KRfgYEW7aWY

--HG--
extra : rebase_source : b88fcdb3095ac9bfa82ae6a596070d80c1c482fd
2018-01-12 12:07:29 -05:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00