Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into master.lion
Browse files Browse the repository at this point in the history
  • Loading branch information
blueboxd committed May 21, 2024
2 parents a0aadff + bead720 commit bb6d1f3
Show file tree
Hide file tree
Showing 181 changed files with 2,890 additions and 1,992 deletions.
12 changes: 6 additions & 6 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling Skia
# and whatever else without interference from each other.
'skia_revision': 'e0881f06f94a1bc31e0a5ecd4618090002f61c28',
'skia_revision': 'ca98796cc19e4ea0ecc32914f2967f003046a282',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling V8
# and whatever else without interference from each other.
'v8_revision': '54fbb5fc84ec83a32b25e6746db942e0aaca02af',
'v8_revision': '7d50244cc4fdf617bf0a940830b92146c8afc711',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
Expand Down Expand Up @@ -359,7 +359,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling freetype
# and whatever else without interference from each other.
'freetype_revision': '4ccdc9f98291fe40c2e32cc9914e327810d845ec',
'freetype_revision': '347276c1f6dcbc0eed3f0880b3695167a91c205d',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling freetype
# and whatever else without interference from each other.
Expand Down Expand Up @@ -1004,7 +1004,7 @@ deps = {

'src/clank': {
'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' +
'b34fd76317a01da56fc86d37882ca27fe55859ca',
'2cffdf40d0973f4fad8cbe455e916c46f1ec64f5',
'condition': 'checkout_android and checkout_src_internal',
},

Expand Down Expand Up @@ -1956,7 +1956,7 @@ deps = {
Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'),

'src/third_party/perfetto':
Var('android_git') + '/platform/external/perfetto.git' + '@' + '3ce5202ceef95d02a826c13c516a8485ef26237a',
Var('android_git') + '/platform/external/perfetto.git' + '@' + '9ac50d25a24563cd24268c1a5c6561c8595b4647',

'src/third_party/perl': {
'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '8ef97ff3b7332e38e61b347a2fbed425a4617151',
Expand Down Expand Up @@ -2296,7 +2296,7 @@ deps = {
'packages': [
{
'package': 'chromeos_internal/apps/help_app/app',
'version': '6FwohtL9JxTjoHpDqhB1LFIzwbcPwzcwKsPQrs3kRBEC',
'version': '3S_vch9BVEqwxlGe0IC6rd6LBxn7XN9zQENaXTo-30QC',
},
],
'condition': 'checkout_chromeos and checkout_src_internal',
Expand Down
19 changes: 9 additions & 10 deletions ash/accessibility/mouse_keys/mouse_keys_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,8 @@ bool MouseKeysController::RewriteEvent(const ui::Event& event) {
!(key_event->flags() & ui::EF_IS_REPEAT)) {
paused_ = !paused_;
if (paused_) {
// TODO(259372916): Move this to a helper function.
// Reset everything when pausing.
speed_ = 0;
if (update_timer_.IsRunning()) {
update_timer_.Stop();
}
Reset();
}
return true;
}
Expand Down Expand Up @@ -332,12 +328,8 @@ void MouseKeysController::RefreshVelocity() {
move_direction_ = gfx::Vector2d(x_direction, y_direction);

if (x_direction == 0 && y_direction == 0) {
// TODO(259372916): Move this to a helper function.
// Reset everything if there is no movement.
speed_ = 0;
if (update_timer_.IsRunning()) {
update_timer_.Stop();
}
Reset();
return;
}

Expand All @@ -364,4 +356,11 @@ void MouseKeysController::UpdateState() {
speed_ = std::clamp(speed_ + acceleration, 0.0, max_speed_);
}

void MouseKeysController::Reset() {
speed_ = 0;
if (update_timer_.IsRunning()) {
update_timer_.Stop();
}
}

} // namespace ash
1 change: 1 addition & 0 deletions ash/accessibility/mouse_keys/mouse_keys_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class ASH_EXPORT MouseKeysController : public ui::EventHandler {
void SelectNextButton();
void RefreshVelocity();
void UpdateState();
void Reset();

bool enabled_ = false;
bool paused_ = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ TEST_F(NotificationGestureUpdateTest, TrackPadGestureSlideOut) {

ui::test::EventGenerator generator(
(notification_view()->GetWidget()->GetNativeWindow()->GetRootWindow()));
generator.ScrollSequence(gfx::Point(), base::TimeDelta(), /*x_offset=*/20,
generator.ScrollSequence(gfx::Point(), base::TimeDelta(), /*x_offset=*/200,
/*y_offset=*/0, /*steps=*/1, /*num_fingers=*/2);
EXPECT_TRUE(IsPopupRemovedAfterIdle(kDefaultNotificationId));
}
Expand Down
65 changes: 41 additions & 24 deletions ash/resources/vector_icons/picker_caps_lock_off.icon
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,48 @@
// found in the LICENSE file.

CANVAS_DIMENSIONS, 20,
MOVE_TO, 13.59f, 11.31f,
R_H_LINE_TO, 3.62f,
LINE_TO, 10, 1.83f,
R_LINE_TO, -2.54f, 3.34f,
R_LINE_TO, 6.13f, 6.14f,
FILL_RULE_NONZERO,
R_MOVE_TO, 10, 4,
R_LINE_TO, 3.67f, 4.58f,
R_H_LINE_TO, -1.56f,
R_LINE_TO, 1.65f, 1.65f,
R_H_LINE_TO, 1.64f,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 0, 0.65f, -1.35f,
R_LINE_TO, -5.4f, -6.75f,
R_ARC_TO, 0.85f, 0.85f, 0, 0, 0, -1.3f, 0,
LINE_TO, 7.7f, 4.2f,
R_LINE_TO, 1.19f, 1.19f,
LINE_TO, 10, 4,
CLOSE,
R_MOVE_TO, -0.49f, 1.74f,
R_CUBIC_TO, -2.05f, -2.04f, -4.31f, -4.3f, -6.61f, -6.61f,
R_LINE_TO, -3.7f, 4.87f,
R_H_LINE_TO, 4.1f,
R_V_LINE_TO, 3.79f,
R_H_LINE_TO, 6.21f,
R_V_LINE_TO, -2.05f,
R_MOVE_TO, 3, 7.89f,
R_LINE_TO, -1.66f, -1.66f,
R_LINE_TO, -3.5f, -3.53f,
R_LINE_TO, -1.18f, -1.19f,
LINE_TO, 3, 1.85f,
LINE_TO, 1.81f, 3,
R_LINE_TO, 3.8f, 3.79f,
LINE_TO, 4, 8.9f,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 0, 0.65f, 1.35f,
H_LINE_TO, 7,
R_V_LINE_TO, 3,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 0, 0.83f, 0.83f,
R_H_LINE_TO, 4.42f,
R_ARC_TO, 0.82f, 0.82f, 0, 0, 0, 0.46f, -0.16f,
R_LINE_TO, 1.79f, 1.79f,
H_LINE_TO, 3.75f,
R_V_LINE_TO, 1.66f,
R_H_LINE_TO, 12.5f,
R_V_LINE_TO, -0.27f,
R_LINE_TO, 1, -1,
LINE_TO, 13, 11.89f,
CLOSE,
R_MOVE_TO, -9.27f, 3.51f,
R_V_LINE_TO, 1.73f,
R_H_LINE_TO, 12.33f,
R_V_LINE_TO, -1.73f,
H_LINE_TO, 3.83f,
MOVE_TO, 6.33f, 8.58f,
LINE_TO, 6.79f, 8,
R_LINE_TO, 0.58f, 0.57f,
R_LINE_TO, -1.04f, 0.01f,
CLOSE,
NEW_PATH,
FILL_RULE_NONZERO,
MOVE_TO, 17.19f, 19.33f,
CUBIC_TO, 13.29f, 15.43f, 6.67f, 8.88f, 0.67f, 2.79f,
LINE_TO, 1.77f, 1.69f,
R_LINE_TO, 16.52f, 16.54f,
R_LINE_TO, -1.1f, 1.1f,
R_MOVE_TO, 2.29f, 3.8f,
V_LINE_TO, 9.84f,
R_LINE_TO, 2.55f, 2.54f,
H_LINE_TO, 8.62f,
CLOSE
41 changes: 28 additions & 13 deletions ash/resources/vector_icons/picker_caps_lock_on.icon
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,33 @@

CANVAS_DIMENSIONS, 20,
FILL_RULE_NONZERO,
MOVE_TO, 6.9f, 15.1f,
R_V_LINE_TO, -3.79f,
H_LINE_TO, 2.79f,
LINE_TO, 10, 1.83f,
R_LINE_TO, 7.21f, 9.48f,
R_H_LINE_TO, -4.1f,
R_V_LINE_TO, 3.79f,
H_LINE_TO, 6.9f,
MOVE_TO, 3.75f, 17.33f,
R_V_LINE_TO, -1.66f,
R_H_LINE_TO, 12.5f,
R_V_LINE_TO, 1.66f,
H_LINE_TO, 3.75f,
CLOSE,
R_MOVE_TO, -3.06f, 3.19f,
R_V_LINE_TO, -1.73f,
R_H_LINE_TO, 12.33f,
R_V_LINE_TO, 1.73f,
H_LINE_TO, 3.83f,
MOVE_TO, 12.21f, 14,
H_LINE_TO, 7.79f,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 1, -0.83f, -0.83f,
R_V_LINE_TO, -3,
H_LINE_TO, 4.6f,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 1, -0.75f, -0.47f,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 1, 0.15f, -0.8f,
R_LINE_TO, 5.4f, -6.75f,
R_ARC_TO, 0.85f, 0.85f, 0, 0, 1, 1.3f, 0,
R_LINE_TO, 5.4f, 6.75f,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 1, -0.65f, 1.35f,
H_LINE_TO, 13,
R_V_LINE_TO, 3,
R_ARC_TO, 0.83f, 0.83f, 0, 0, 1, -0.79f, 0.75f,
CLOSE,
R_MOVE_TO, -3.58f, -1.66f,
R_H_LINE_TO, 2.74f,
V_LINE_TO, 8.58f,
R_H_LINE_TO, 2.3f,
LINE_TO, 10, 4,
LINE_TO, 6.33f, 8.58f,
R_H_LINE_TO, 2.3f,
R_V_LINE_TO, 3.76f,
CLOSE
6 changes: 6 additions & 0 deletions ash/webui/common/resources/accessibility/macro_names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ export enum MacroName {
// Generates a synthetic down arrow key event.
KEY_PRESS_DOWN = 42,

// Shows/hides the overview of the user's active desktops.
KEY_PRESS_TOGGLE_OVERVIEW = 43,

// Pauses/plays active media.
KEY_PRESS_MEDIA_PLAY_PAUSE = 44,

// Any new actions should match with Voice Access's semantic tags where
// possible.
}
13 changes: 7 additions & 6 deletions base/files/scoped_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@
#include "base/posix/eintr_wrapper.h"
#endif

namespace base {
namespace internal {
namespace base::internal {

#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)

// static
void ScopedFDCloseTraits::Free(int fd) {
// It's important to crash here.
// It's important to crash here if something goes wrong.
//
// There are security implications to not closing a file descriptor
// properly. As file descriptors are "capabilities", keeping them open
// would make the current process keep access to a resource. Much of
// Chrome relies on being able to "drop" such access.
//
// It's especially problematic on Linux with the setuid sandbox, where
// a single open directory would bypass the entire security model.
int ret = IGNORE_EINTR(close(fd));
Expand All @@ -36,14 +37,14 @@ void ScopedFDCloseTraits::Free(int fd) {
// filesystems such as NFS and Linux input devices. On Linux, macOS, and
// Fuchsia's POSIX layer, errors from close other than EBADF do not indicate
// failure to actually close the fd.
if (ret != 0 && errno != EBADF)
if (ret != 0 && errno != EBADF) {
ret = 0;
}
#endif

PCHECK(0 == ret);
}

#endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)

} // namespace internal
} // namespace base
} // namespace base::internal
45 changes: 22 additions & 23 deletions base/files/scoped_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,37 @@ namespace base {

namespace internal {

#if BUILDFLAG(IS_ANDROID)
// Use fdsan on android.
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
// Platforms for which it is possible to track ownership of file descriptors.
//
// On Android, fdsan is used.
//
// On ChromeOS and Linux, file descriptor lifetime is guarded with a global
// table and a hook into libc close().
struct BASE_EXPORT ScopedFDCloseTraits : public ScopedGenericOwnershipTracking {
static int InvalidValue() { return -1; }
static void Free(int);
static void Acquire(const ScopedGeneric<int, ScopedFDCloseTraits>&, int);
static void Release(const ScopedGeneric<int, ScopedFDCloseTraits>&, int);
static void Free(int fd);
static void Acquire(const ScopedGeneric<int, ScopedFDCloseTraits>& owner,
int fd);
static void Release(const ScopedGeneric<int, ScopedFDCloseTraits>& owner,
int fd);
};

#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
// On ChromeOS and Linux we guard FD lifetime with a global table and hook into
// libc close() to perform checks.
struct BASE_EXPORT ScopedFDCloseTraits : public ScopedGenericOwnershipTracking {
#else

struct BASE_EXPORT ScopedFDCloseTraits {
#endif
static int InvalidValue() {
return -1;
}
static int InvalidValue() { return -1; }
static void Free(int fd);
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
static void Acquire(const ScopedGeneric<int, ScopedFDCloseTraits>&, int);
static void Release(const ScopedGeneric<int, ScopedFDCloseTraits>&, int);
#endif
};

#endif

// Functor for |ScopedFILE| (below).
// Functor for `ScopedFILE` (below).
struct ScopedFILECloser {
inline void operator()(FILE* x) const {
if (x)
if (x) {
fclose(x);
}
}
};

Expand Down Expand Up @@ -98,11 +97,11 @@ void BASE_EXPORT ResetFDOwnership();
// should generally use base::File instead which can be constructed with a
// handle, and in addition to handling ownership, has convenient cross-platform
// file manipulation functions on it.
typedef ScopedGeneric<int, internal::ScopedFDCloseTraits> ScopedFD;
using ScopedFD = ScopedGeneric<int, internal::ScopedFDCloseTraits>;
#endif

// Automatically closes |FILE*|s.
typedef std::unique_ptr<FILE, internal::ScopedFILECloser> ScopedFILE;
// Automatically closes `FILE*`s.
using ScopedFILE = std::unique_ptr<FILE, internal::ScopedFILECloser>;

#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
// Queries the ownership status of an FD, i.e. whether it is currently owned by
Expand Down
5 changes: 5 additions & 0 deletions build/android/pylib/junit/junit_test_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def __init__(self, args, _):
self._robolectric_runtime_deps_dir = args.robolectric_runtime_deps_dir
self._runner_filter = args.runner_filter
self._json_config = args.json_config
self._shadows_allowlist = args.shadows_allowlist
self._shards = args.shards
self._shard_filter = None
if args.shard_filter:
Expand Down Expand Up @@ -72,6 +73,10 @@ def robolectric_runtime_deps_dir(self):
def runner_filter(self):
return self._runner_filter

@property
def shadows_allowlist(self):
return self._shadows_allowlist

@property
def test_filters(self):
return self._test_filters
Expand Down
Loading

0 comments on commit bb6d1f3

Please sign in to comment.