tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit bfd03fe6ef59dd43ddfaec248300e703cdbcfe19
parent 4e9f34a98955e4c2d6751175bfb8f955afc4516a
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Fri, 17 Oct 2025 21:03:00 +0000

Bug 1981995 - add a CSS webcompat intervention for www.mygeha.com; r=webcompat-reviewers,ksenia

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 17+++++++++++++++++
Abrowser/extensions/webcompat/injections/css/1981995_www.mygeha.com-fix-location-layout.css | 15+++++++++++++++
Atesting/webcompat/interventions/tests/test_1981995_mygeha_com.py | 31+++++++++++++++++++++++++++++++
3 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -5222,6 +5222,23 @@ } ] }, + "1981995": { + "label": "mygeha.com", + "bugs": { + "1981995": { + "issue": "broken-layout", + "matches": ["*://www.mygeha.com/tpa-ap-web/*"] + } + }, + "interventions": [ + { + "platforms": ["all"], + "content_scripts": { + "css": ["1981995_www.mygeha.com-fix-location-layout.css"] + } + } + ] + }, "1982295": { "label": "hall.ssjj.cn", "bugs": { diff --git a/browser/extensions/webcompat/injections/css/1981995_www.mygeha.com-fix-location-layout.css b/browser/extensions/webcompat/injections/css/1981995_www.mygeha.com-fix-location-layout.css @@ -0,0 +1,15 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/** + * www.mygeha.com - location section is laid out incorrectly. + * Bug #1981995 - https://bugzilla.mozilla.org/show_bug.cgi?id=1981995 + * WebCompat issue #167933 - https://github.com/webcompat/web-bugs/issues/167933 + * + * The site seems to be using display:ruby-text in a strange way to lay their + * location section in a specific way. Using display:flex works just as well. + */ +.allign_location { + display: flex; +} diff --git a/testing/webcompat/interventions/tests/test_1981995_mygeha_com.py b/testing/webcompat/interventions/tests/test_1981995_mygeha_com.py @@ -0,0 +1,31 @@ +import pytest + +URL = "https://www.mygeha.com/tpa-ap-web/?navDeepDive=ProvDirPublicGEHADental&viewDefaultLayout=false" +CITY_OR_ZIPCODE_CSS = "#zipCode" +STATE_CSS = "select#state" + + +async def is_state_beside_zip(client): + await client.navigate(URL, wait="none") + city = client.await_css(CITY_OR_ZIPCODE_CSS, is_displayed=True) + state = client.await_css(STATE_CSS, is_displayed=True) + return client.execute_script( + """ + const [city, state] = [...arguments].map(arg => arg.getBoundingClientRect()); + return city.right < state.left && state.top == city.top; + """, + city, + state, + ) + + +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + assert await is_state_beside_zip(client) + + +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + assert not await is_state_beside_zip(client)