Skip to content

[js] Remove the WebSQL and AppCache atoms - #18137

Merged
AutomatedTester merged 1 commit into
trunkfrom
copse/look-in-javascript-atoms-and-see-if-07a5ee
Oct 8, 2026
Merged

AutomatedTester merged 1 commit into
trunkfrom
copse/look-in-javascript-atoms-and-see-if-07a5ee

Conversation

@AutomatedTester

@AutomatedTester AutomatedTester commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🔗 Related Issues

None filed. Follow-on from the Java AppCacheStatus removal (#15973) and the earlier ApplicationCache / LocationContext cleanups.

💥 What does this PR do?

Deletes the WebSQL and AppCache atoms and their Bazel wiring.

Removed

  • bot.storage.database (javascript/atoms/html5/database.js) and the execute-sql fragment
  • bot.appcache (javascript/atoms/html5/appcache.js), webdriver.atoms.storage.appcache and the get-appcache-status fragment
  • the webdriver.atoms.inject appcache / sql_database wrappers, their closure_js_library rules, and the get-appcache-status inject fragment
  • the matching closure test pages and .appcache test fixtures
  • :execute-sql-chrome and :get-appcache-status-chrome from the chrome-driver ATOMS list

Changed

bot.html5 loses its now-unreachable APPCACHE and DATABASE enum members and switch arms, along with the IS_SAFARI4_OR_EARLIER_ and IS_ANDROID_FROYO_OR_EARLIER_ constants that only those arms used.

Net: 17 files, −857 lines.

🔧 Implementation Notes

Why this is safe:

  • The platform removed the features. AppCache is gone from Chrome 95, Firefox 85 and Safari 15; WebSQL is gone from Chrome 123. bot.html5.isSupported() returns false for both in every browser in the support matrix, so these are permanently dead code paths.
  • The commands are not W3C. getAppCache / getStatus / clearAppCache / executeSQL survive only in the legacy javascript/webdriver/command.js enum.
  • The bindings already dropped them. No live consumer in java/src, py/selenium, rb/lib, dotnet/src or javascript/selenium-webdriver.
  • The only referencing targets have no in-repo consumer. Both fragments were reachable only from //javascript/chrome-driver's ATOMS list, which feeds atoms.h / atoms.cc. Nothing here compiles those — cpp/iedriver uses //javascript/ie-driver:header, whose dep list contains neither fragment.

bot.ErrorCode.SQL_DATABASE_ERROR is deliberately left in place. It is a numeric wire-protocol code rather than a feature, so removing it would be a gratuitous API break.

bot.html5 itself survives this PR — storage.js and location.js still call it. Shrinking it further is follow-up work (see below).

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s): Claude Code (Opus 5)
    • What was generated: the deletions and Bazel edits, the dependency analysis behind them, and this description
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

One thing grep cannot answer — please sanity-check me here. //javascript/chrome-driver:header and :source have no consumer inside this repo; the generated atoms.h / atoms.cc existed for the legacy C++ ChromeDriver, which lives in Chromium. If anything outside this repo still consumes those targets, it would notice these two fragments disappearing. Worth a second opinion from anyone closer to ChromeDriver.

Follow-ups, intentionally not folded in:

  • //javascript/atoms/fragments:get-location is already orphaned (chrome-driver uses its own local :get-location-chrome) and can go next, together with html5/location.js.
  • After that, bot.html5's last caller is storage.js; inlining its two checks lets html5_browser.js and all the remaining IE8 version sniffing go.
  • dotnet/src/webdriver/CapabilityType.cs still has a public SupportsApplicationCache constant — deprecation policy applies, so a separate change.
  • Worth deciding whether common/src/web/html5Page.html, common/src/web/html5/ and the appcache-MIME assertion in AppServerTestBase.java still earn their keep.
  • The legacy AppCache/SQL entries in javascript/webdriver/command.js.

🔄 Types of changes

  • Cleanup (formatting, renaming)

✅ Validation

Check Result
bazel query 'rdeps(//javascript/..., //javascript/atoms:html5)' 327 targets, zero appcache/sql/database survivors
bazel build //javascript/chrome-driver:{header,source} //javascript/ie-driver:header //javascript/atoms/... //javascript/webdriver/... 608 targets, success
bazel test //java/test/org/openqa/selenium/atoms:all 5/5 pass
./scripts/format.sh --pre-push passed

The closure suites (//javascript/atoms:closure-test, //javascript/webdriver:closure-test) discover *_test.html by glob, so the deleted pages simply stop being picked up — no suite wiring to update.

Both features are gone from every browser Selenium supports: AppCache
was removed in Chrome 95, Firefox 85 and Safari 15, and WebSQL was
removed in Chrome 123. Neither has a W3C WebDriver command, the
bindings have already dropped their client-side APIs, and the only
targets referencing these fragments were the chrome-driver atoms.h /
atoms.cc generators, which have no consumer in this repository.

Removes:

- bot.storage.database (html5/database.js) and the execute-sql fragment
- bot.appcache (html5/appcache.js), webdriver.atoms.storage.appcache and
  the get-appcache-status fragment
- the webdriver.atoms.inject appcache and sql_database wrappers, their
  closure_js_library rules and the get-appcache-status inject fragment
- the matching closure test pages and .appcache test fixtures
- the execute-sql-chrome and get-appcache-status-chrome entries in the
  chrome-driver ATOMS list

bot.html5 loses its now-unreachable APPCACHE and DATABASE enum members
and switch arms, along with the Safari 4 and Android Froyo version
checks that only those arms used.

bot.ErrorCode.SQL_DATABASE_ERROR is left in place: it is a numeric wire
protocol code rather than a feature, so removing it would be a
gratuitous API break.
@selenium-ci selenium-ci added B-atoms JavaScript chunks generated by Google closure B-build Includes scripting, bazel and CI integrations labels Oct 8, 2026
@AutomatedTester
AutomatedTester merged commit 8272c3b into trunk Oct 8, 2026
105 of 107 checks passed
@AutomatedTester
AutomatedTester deleted the copse/look-in-javascript-atoms-and-see-if-07a5ee branch October 8, 2026 13:47
This was referenced Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-atoms JavaScript chunks generated by Google closure B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants