ui/Tooltip.js overrides the HTMLElement prototype to override the
title property. Rather than using this property, we shoul be
calling Tooltip.install directly. This makes sure that new
components are not relying on the behavior of the legacy
prototype patching.
These usages have been manually audited using the following regexes:
Search: ([\S]+)\.title = ([^;]+);
Replace: UI.Tooltip.Tooltip.install($1, $2);
Note that there are classes in DevTools that also have a title
property. Most notably `TreeElement`. We should not be replacing
these, as they do not inherit from HTMLElement. Luckily, we are
running TypeScript to make sure we don't call `Tooltip.install`
with a non-HTMLElement.
A follow-up CL will clean up the getters.
R=jacktfranklin@chromium.org
Bug: 1150762
No-presubmit: True
Change-Id: I5928e75c70293531849e0576f4fb2a2a8b3e02d2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2555060
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.
This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.
Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.
Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
webmasters.googleblog.com/2019/10/updating-user-agent-of-googlebot.html
describes that Google is updating their Googlebot User-Agent to report
the Chrome/%s version used (which will roughly update at the same time
as Chrome stable).
So devtools' Googlebot UA shouldn't used a fixed version either. Replace
it with %s so it matches the version number Chrome was built with.
This won't always exactly match the UA used by Google, but is probably
the closest we can reasonably get.
While I'm here I also add a third "Googlebot Desktop" User Agent
to mirror the smartphone one. (See "Googlebot user agents today" in the
above link)
Note that I plan to submit this change without coordinating the timing
with the internal UA change rollout. This means there will be a period
of time where the UA in devtools doesn't match the UA used by google.
Bug: 984733
Change-Id: I68a0d5549fab70d0ce8e37e9f518b5a0aead68eb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1949544
Commit-Queue: Zoe Clifford <zoeclifford@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
In the Network condition tools, user facing strings in the dropdown menu
of user agent options are not localized.
https://imgur.com/ZDp4j8D
In this change:
- adds ls() calls to those strings in NetworkConfigView.js.
- GRDP changes are generated automatically, with manually written descriptions
- Placeholders (<ph name="LOCKED_1">) are added in the grdp to prevent
translations of the branding related strings.
Bug: 941561
Change-Id: Ib274dd425733d0ef4f4199ff6334810f113ade27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816184
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#699434}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0f8efb4dd92869f559add716ff959724ed799ae5
Update the list of devices for Microsoft Edge. This includes:
- Adding Microsoft Edge for all supported platforms
- Clarified which ones are based upon EdgeHTML vs Chromium
- Ensured that appVersion and Chromium version are patched similar to Chrome.
Change-Id: I59c5287799c6e9bd6950c76323a867c012951323
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1709693
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#685388}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a0ed6f98a6fff9954d7ca823af149a6b5b56caf
Network Conditions drawer had following issues:
- Form controls like Network Throttling, User Agent combox box and input box was missing labels for screen reader users.
This change addresses that issue by adding aria-label to them.
Additionally, axe test is added for Network Conditions.
Tested keyboard navigation
- navigate up/down drop-down items using arrow keys
- Checkbox is checked/unchecked using space bar
- Tab into/out (no tab traps)
Tested screen reader
- reads checkbox label
- reads items selected from the drop down list
Bug: 963183
Change-Id: I7dec31f1c476f7c63ce4fff9a3b73c1b5377bfc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614138
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Chandani Shrestha <chshrest@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#666479}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b1245ec9fbba1922502c22e50eb70648a8b33b6