Bug 1541500 - Apply Android ::selection styling to SVG as well as HTML content. r=snorp
authorJonathan Kew <jkew@mozilla.com>
Wed, 10 Apr 2019 10:44:30 +0000
changeset 468749 ae91888401d2440827c20fa094a4454344148aac
parent 468748 35e35da9ae0ef007456cb049b6a4973684710601
child 468750 d12fd897acb7a385fa6baa0e0032ff3965aa5d45
push id35850
push userdvarga@mozilla.com
push dateWed, 10 Apr 2019 21:52:56 +0000
treeherdermozilla-central@9d3dbe3fef26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1541500
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1541500 - Apply Android ::selection styling to SVG as well as HTML content. r=snorp Differential Revision: https://phabricator.services.mozilla.com/D25980
layout/reftests/svg/text/reftest.list
mobile/android/themes/geckoview/content.css
--- a/layout/reftests/svg/text/reftest.list
+++ b/layout/reftests/svg/text/reftest.list
@@ -191,15 +191,15 @@ fuzzy-if(skiaContent&&winWidget,0-126,0-
 # vertical text
 fuzzy-if(skiaContent,0-1,0-80) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == textpath-vertical-dx.svg textpath-vertical-dx-ref.svg # Bug 1392106
 
 # selection
 needs-focus == deselectAll.svg deselectAll-ref.svg
 fuzzy-if(skiaContent,0-1,0-250) needs-focus == selectSubString.svg selectSubString-ref.svg
 fuzzy-if(skiaContent,0-1,0-600) needs-focus == selectSubString-2.svg selectSubString-2-ref.svg
 fuzzy-if(skiaContent,0-1,0-250) needs-focus == selectSubString-3.svg selectSubString-3-ref.svg
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy-if(webrender,1-1,237-237) needs-focus fuzzy-if(webrender&&!gtkWidget,127-148,221-254) fails-if(Android) == simple-selection.svg simple-selection-ref.html # Bug 1392106 # Bug 1541500
-fuzzy-if(skiaContent,0-1,0-100) fuzzy-if(webrender,1-1,575-575) needs-focus fuzzy-if(webrender&&!gtkWidget,134-148,261-318) fails-if(Android) == simple-bidi-selection.svg simple-bidi-selection-ref.html # Bug 1541500
-fuzzy-if(skiaContent,0-1,0-50) fuzzy-if(webrender,1-1,237-237) needs-focus fuzzy-if(webrender&&!gtkWidget,127-148,221-254) fails-if(Android) == simple-fill-color-selection.svg simple-fill-color-selection-ref.html # Bug 1541500
-fuzzy-if(skiaContent,0-1,0-150) fuzzy-if(webrender,1-1,222-222) needs-focus fuzzy-if(webrender&&!gtkWidget,127-148,221-254) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(Android) == simple-underline-selection.svg simple-underline-selection-ref.html # Bug 1392106 # Bug 1541500
-fuzzy-if(skiaContent,0-1,0-300) fuzzy-if(webrender,1-1,934-934) needs-focus fuzzy-if(webrender&&!gtkWidget,134-152,432-501) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(Android) == multiple-text-selection.svg multiple-text-selection-ref.html # Bug 1392106 # Bug 1541500
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fuzzy-if(webrender,1-1,237-237) needs-focus fuzzy-if(webrender&&!gtkWidget,127-148,221-254) == simple-selection.svg simple-selection-ref.html # Bug 1392106
+fuzzy-if(skiaContent,0-1,0-100) fuzzy-if(webrender,1-1,575-575) needs-focus fuzzy-if(webrender&&!gtkWidget,134-148,261-318) == simple-bidi-selection.svg simple-bidi-selection-ref.html
+fuzzy-if(skiaContent,0-1,0-50) fuzzy-if(webrender,1-1,237-237) needs-focus fuzzy-if(webrender&&!gtkWidget,127-148,221-254) == simple-fill-color-selection.svg simple-fill-color-selection-ref.html
+fuzzy-if(skiaContent,0-1,0-150) fuzzy-if(webrender,1-1,222-222) needs-focus fuzzy-if(webrender&&!gtkWidget,127-148,221-254) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == simple-underline-selection.svg simple-underline-selection-ref.html # Bug 1392106
+fuzzy-if(skiaContent,0-1,0-300) fuzzy-if(webrender,1-1,934-934) needs-focus fuzzy-if(webrender&&!gtkWidget,134-152,432-501) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == multiple-text-selection.svg multiple-text-selection-ref.html # Bug 1392106
 needs-focus == multiple-chunks-selection.svg multiple-chunks-selection-ref.svg
 fuzzy-if(skiaContent,0-1,0-200) needs-focus == textpath-selection.svg textpath-selection-ref.svg
--- a/mobile/android/themes/geckoview/content.css
+++ b/mobile/android/themes/geckoview/content.css
@@ -2,18 +2,19 @@
  * 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/. */
 
 @import "defines.css";
 @import "scrollbar.css";
 
 @namespace url("http://www.w3.org/1999/xhtml");
 @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+@namespace svg url("http://www.w3.org/2000/svg");
 
-::-moz-selection {
+*|*::selection {
   background-color: var(--color_background_highlight);
   color: var(--color_text_highlight);
 }
 
 /* Style the scrollbars */
 xul|scrollbar[root="true"] {
   position: relative;
   z-index: 2147483647;