forked from mirrors/gecko-dev
		
	 5b6ce8a6e2
			
		
	
	
		5b6ce8a6e2
		
	
	
	
	
		
			
			This is a follow-up to bug 1783500. The existing expansion for the screen area works great on Windows and so on, but on macOS it can conceptually cause a menulist to go off-screen, because of this margin used to move menulists to the left: https://searchfox.org/mozilla-central/rev/f655bdf6b4bf01b42609750ab94fc37635397260/toolkit/themes/osx/global/popup.css#85 Instead we should do the same as that bug did, and use the input-region-margin, which is the amount of space that has no content (that is, that contains the shadow and so on) and is zero on macOS (because shadows on macOS are drawn by the OS unlike on Windows / Linux). This required extra test changes so it was worth getting it reviewed separately. Differential Revision: https://phabricator.services.mozilla.com/D154401
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <?xml version="1.0"?>
 | |
| <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 | |
| <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 | |
| 
 | |
| <window title="Popup Attribute Tests"
 | |
|   onload="setTimeout(runTest, 0);"
 | |
|   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 | |
| 
 | |
| <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 | |
| 
 | |
| <script>
 | |
| SimpleTest.waitForExplicitFinish();
 | |
| async function runTest()
 | |
| {
 | |
|   // This test exercises non-native menu code. So disable native context menus for this test.
 | |
|   // If we ever get to a point where we don't use any non-native menus on macOS any more, we can
 | |
|   // disable this test on macOS.
 | |
|   await SpecialPowers.pushPrefEnv({ set: [["widget.macos.native-context-menus", false]] });
 | |
| 
 | |
|   window.open("window_popup_attribute.xhtml", "_blank", "width=600,height=800");
 | |
| }
 | |
| </script>
 | |
| 
 | |
| <body xmlns="http://www.w3.org/1999/xhtml">
 | |
| <p id="display">
 | |
| </p>
 | |
| <div id="content" style="display: none">
 | |
| </div>
 | |
| <pre id="test">
 | |
| </pre>
 | |
| </body>
 | |
| 
 | |
| </window>
 |