Firefox selecting whole silverlight area causing browser scroll bars to become enabled - silverlight

This only seems to be a problem now with firefox 3.6
When you click anywhere on the page which is one big embedded silverlight object the little broken outline appears, the same as when you say click on a link. This is causing the page to go one pixel over horizontally and vertically which is causing scroll bars to appear.
Any idea?

Try setting outline-width:0 for your object tag either in your CSS file or directly inline on the object tag for the plugin:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="outline-width:0">
Seems to be the side effect of some kind of focus ring usability bug that was fixed for 3.6, which is causing this with Silverlight, Flash, Java Applets, etc.
http://www.blog.lessrain.com/firefox-36-draws-one-pixel-border/

Related

Distortion in webpage due to change in DPI in Windows settings in Chromium

Running the CefSharp/WinForms/MinimalExample on Win 10 machine with display setting set to 125% causes a weird distortion in the website as I hover my mouse over the DOM element.
Here is how it looks,
As you can see, as I hover over the address text box, the text box jumps. I tried to then switch to html5test.com and it still has the same issue.
This only occurs when the display setting is set to anything other than 100%. Is this a bug, or I need to change something?
Ok, so it is really simple. It has nothing to do with CefSharp but you need to make your WinForm DPIAware and the easiest way to do that is,
Right-Click on your project and select Add -> New Item
Select Application Manifest File
If you are using VS 2015, search for dpiaware term. Uncomment the code and rebuild and you are set.
In case, you don't have VS 2015, copy this code,
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
and paste it inside the <assembly> tag. Save and rebuild and your WinForm is DPI Aware.

CEFsharp & Cefglue (chromium embedded) media player plugins not working in WPF controls. (NPAPI)

I'm using javascript to replace html5 video tag's with references to VLC or Windows Media Player browser plugins in order to be able to play h.264 video's in a chromium embedded WPF control.
For example:
<object type="application/x-vlc-plugin" width="300px" height="150px" spellcheck="true" uimode="full"><param name="autostart" value="true"><param name="url" value="http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4"></object>
This technique works in cefclient.exe and in CEFsharp and Cefglue Winforms controls. However when doing this in either CEFsharp WPF control or Cefglue WPF control, the screen just stays blank and the console shows no errors. Even debugging on level verbose shows no errors. I've tried referencing the paths to the plugins:
CefRuntime.AddWebPluginPath(#"C:\Program Files (x86)\VideoLAN\VLC\npvlc.dll");
CefRuntime.AddWebPluginDirectory(#"C:\Program Files (x86)\VideoLAN\VLC");
But the players (VLC and WMP) still don't show.
I got a feeling that WPF is somehow not allowed to access the plugins.
I really hope you can help me with this one, because using Winforms is not an option for me as I need to be able to perform a rotatetransform on the control.
UPDATE:
Just realised that this probably has something to do with CEF3 offscreen rendering. Is it possible to disable OSR in CEF3, and will this impact performance much?

Windowless Silverlight (and Flash?) app on Firefox: wrong mouse positions reported

When I create a windowless Silverlight app and run it on Firefox, wrong mouse positions are reported. There is a vertical offset between the actual mouse position and what the application responds to.
I also tagged this question with Flash because my research shows that this problem also occurs with Flash (see links below).
To reproduce:
Step 1: Create a new Silverlight application.
Step 2: Inside the grid of MainApp.xaml add the following:
<HyperlinkButton NavigateUri="http://google.com" VerticalAlignment="Center" HorizontalAlignment="Center">GOOGLE</HyperlinkButton>
Step 3: In SilverApplicationXTestPage.aspx (in the web project) add the following parameter to the Silverlight object:
<param name="windowless" value="true" />
Now run the silverlight application. When you hover the link it doesn't get underlined. Now slowly move the mouse up until at a certain offset above the link it will get highlighted.
This problem doesn't happen if you do one of the following:
Switch Firefox into full screen mode (it seems that the top bar is the cause for the offset, so when it's not visible there is no offset).
Do not use Silverlight in a windowless mode.
Use any other browser.
I'm using Silverlight 4 on Firefox 8.0 on Windows 7.
This seems like an old problem that affects not just Silverlight, but also Flash.
In my research I came across the following suggested workarounds, non of which worked for me:
Do not use overflow in css.
Use css to set html margin of 1px.
Do not use iframe (but the reproduction steps above do not use an iframe anyway).
As I mentioned none of the above workarounds seem to work.
Here are some references to mentions of this problem or similar:
http://forums.silverlight.net/t/161640.aspx/1/10
https://bugzilla.mozilla.org/show_bug.cgi?id=362193
http://forums.silverlight.net/t/94583.aspx/2/10#
https://bugzilla.mozilla.org/show_bug.cgi?id=536429
Does anyone know how to overcome this? Any workaround? I'm desperate!
I found this: http://support.mozilla.org/en-US/questions/795168.
"Enabling the plugin-container.exe in about:config (dom.ipc.plugins.enabled) fixes the mouse issue but then Silverlight plugin pop-ups (webcam/microphone permission for example) freeze the browser."
I didn't see the problem with the popup (a copy permissions) after changing the config.
Making it full-screen also helped before I made this config change.
This requires the user to change their browser setting, which is not ideal.
This is similar to this question: Silverlight- bad mouse position when embedded in html page when Firefox has zoom

Issue with z-order in IE7

Z-index problem.
div class="menu"...
-----contain----
div...
div class="flash"...
-----contain----
div...
In firefox the menu is over the flash contain. it's good.
but in IE7 the flash is over the menu. when menu is open(display).
This is because Flash is embedded as a plugin into a web-site. Some browsers on some platforms (like newer Firefoxes, Safari) can handle z-indexes on plugin-tags (like object or embed), others can't (like older Firefoxes, IE). This is because for the browser the plugin is an external process, which is not a real part of the DOM of the web-site.
Short answer: you can't do anything about this, except of not using flash.
Set wmode="transparent" on both the object and embed tags. Then ensure your menu has a higher z-index than the flash file.
If IE7/IE6 is is the issue, you might be dealing with the very common IE7 z-index bug.

Silverlight- bad mouse position when embedded in html page when Firefox has zoom

We have a Silverlight control embedded in an html page. When I zoom the html page in FireFox 3.5 (ctrl - +) and then try to click on something in the Silverlight control the mouse input is not taken at the correct place.
I have to click above the control to get it. This behavior can be seen here:
http://silverlight.codeplex.com/
Any idea how to fix this?
There are numerous reports of the issue and some possible fixes.
See these links:
http://forums.silverlight.net/p/227806/614938.aspx
"I decided to try uninstalling and reinstalling firefox and that did the trick."
https://support.mozilla.org/en-US/questions/795168
"Enabling the plugin-container.exe in about:config (dom.ipc.plugins.enabled) fixes the mouse issue but then Silverlight plugin pop-ups (webcam/microphone permission for example) freeze the browser."
Windowless Silverlight (and Flash?) app on Firefox: wrong mouse positions reported
"This problem doesn't happen if you do one of the following:
Switch Firefox into full screen mode (it seems that the top bar is the cause for the offset, so when it's not visible there is no offset).
Do not use Silverlight in a windowless mode.
Use any other browser.
...
In my research I came across the following suggested workarounds...:
Do not use overflow in css.
Use css to set html margin of 1px.
Do not use iframe"

Resources