зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1764512 - Find in page should ignore content skipped via `content-visibility` r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143573
This commit is contained in:
Родитель
f9f0d556a7
Коммит
c2e4c343e0
|
@ -143,6 +143,10 @@ static bool IsVisibleNode(const nsINode* aNode) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (frame->IsContentHidden() || frame->AncestorHidesContent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return frame->StyleVisibility()->IsVisible();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
[test_bug499115.html]
|
||||
[test_nsFind.html]
|
||||
prefs =
|
||||
layout.css.content-visibility.enabled=true
|
||||
|
|
|
@ -269,6 +269,10 @@ async function runTests() {
|
|||
assertFound(nullcharsinjected, NULL_CHARACTER);
|
||||
assertFound(nullcharsinjected, INJECTED_NULL_TEXT);
|
||||
|
||||
// Content skipped via content-visibility can't be found.
|
||||
assertNotFound(quotes, "Tardigrade");
|
||||
assertNotFound(quotes, "Amoeba");
|
||||
|
||||
// Do these test at the end since they trigger failure screenshots in
|
||||
// the test harness, and we want as much information as possible about
|
||||
// any OTHER tests that may have already failed.
|
||||
|
@ -337,6 +341,10 @@ async function runTests() {
|
|||
<p id="guarani">G̃uahe</p>
|
||||
<p id="deseret">𐐐𐐯𐑊𐐬 𐐶𐐯𐑉𐑊𐐼!</p>
|
||||
<p id="ruby"><ruby>東<rt>とう</rt></ruby><ruby>京<rt>きょう</ruby>駅</p>
|
||||
<div id="content-visibility-hidden" style="content-visibility: hidden">
|
||||
Tardigrade
|
||||
<div>Amoeba</div>
|
||||
</div>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче