FAQ Database Discussion Community


inject CSS to a site with webview in android

android,css,webview,webkit
For example I want to change the background-color of www.google.comto red. I have used webview, and my style.cssfile is in assest folder. I want to inject this style.css file to www.google.com. What is wrong with my codes? Please write the correct codes for me. Thanks. My MainActitviy.java file : package...

What WebKit version is Qt 5.4.1 using on OSX?

qt,webkit,qtwebkit,capybara-webkit
How could I inspect this from the terminal? I have already tried qmake -v but that only gives › qmake -v QMake version 3.0 Using Qt version 5.4.1 in /usr/local/Cellar/qt5/5.4.1/lib ...

Using backface-visibility on * elements

css,performance,css3,webkit
I was doing some work on a website with a fixed sidenav that scrolls with the page. Now I noticed that there are some problems with position: fixed elements in the webkit rendering engine (see this) and to solve those - as seen in the post, I used -webkit-backface-visibility: hidden;....

CSS3 webkit-progress-bar animate background-position

css,html5,css3,webkit,blink
I am looking for a working solution, to animate the background-position property of an html5 progress element in webkit/blink. HTML: <progress max="100" value="0"></progress> CSS: progress[value]::-webkit-progress-bar { -webkit-animation: moveBackground 2s steps(30) infinite; background-image: repeating-linear-gradient(to right, green 0%, orange 50%, blue 100%); background-size: 30rem; } @-webkit-keyframes moveBackground { 0% { background-position: 0...

PHP sort not working in Chrome and Safari

php,google-chrome,safari,webkit,bxslider
I am not sure if it is the sort that isn't working or the way that I am outputting the information. But it would seem that the order that these "li" elements are being made is wrong sometimes. The images in the folder are named something like A-Mike-groomsman-topRight-light.jpg B-James-groomsman-topRight-light.jpg C-Jared-groomsman-topRight-light.jpg...

Open a color input with display:none via a label (webkit)

html,css,html5,webkit,html-input
I want to hide an input element and trigger it with an associated label. Usually that's not a problem. I can simply set display:none on the input like this input { display: none; } <input id="upload" type="file" /> <label for="upload">Upload a file</label> For some reason in Chrome (Firefox works), this...

Is there priority for box shadow of different browsers? (CSS)

css,webkit,vendor-prefix,box-shadow
I just met a problem of box shadow. 1. Is there any priority of box-shadow? for example: box-shadow: 0px 1px 1px 0px #292929; -moz-box-shadow: 0px 1px 1px 0px #292929; -webkit-box-shadow: 0px 1px 1px 0px #292929; and -moz-box-shadow: 0px 1px 1px 0px #292929; -webkit-box-shadow: 0px 1px 1px 0px #292929; box-shadow: 0px...

offset().top -XX gives different result in Webkit v Firefox/IE

javascript,jquery,firefox,scroll,webkit
I'm trying to implement smooth scrolling to internal anchors on a site with a fixed header. If I do this: scrollTop: $target.offset().top I get the same results in all browsers, but if I do: scrollTop: $target.offset().top - 100 it's fine in Webkit browsers, but in Firefox and IE, after scrolling...

XSLT processing gives different result on Firefox and Chrome

xml,google-chrome,xslt,xml-parsing,webkit
I have an XML processed by an XSLT, but Mozilla Firefox 24 ESR parses my XML correctly while Google Chrome 42 is failing to get the node from XML. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script> var xslInput = "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\"> <xsl:output method=\"xml\"/> <xsl:variable name=\"outcome\"...

CSS: Full width flex column doesn't stack on top of each other on webkit

html,css,webkit,flexbox
I have two divs in a container like this: <div class="container"> <div class="div-a"> Hello </div> <div class="div-b"> Lorem </div> </div> And I have set the container to display:flex and flex-direction to column. I aim to align the 2 divs on top of each other. This works fine on Firefox but...

CentOS: QtWebKit is missing and Anki won't start

python,qt,webkit,centos,pyqt4
I'm trying to run anki on CentOS and get the following error: Traceback (most recent call last): File "/usr/bin/anki", line 5, in <module> import aqt File "/usr/share/anki/aqt/__init__.py", line 5, in <module> from aqt.qt import * File "/usr/share/anki/aqt/qt.py", line 13, in <module> from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings ImportError: No module...

Node Webkit - How to force URL in loaded iframe page to open users default browser

iframe,webkit
Using Node webkit for some school related software. The software opens some URL's from external servers and do have access to those external iframed pages. Is there any tags (maybe in href areas) that can be placed into loaded iframe page to force URL to open in users default browser?...

Printing page with multiple embedded Google Maps in WebKit produces tile errors

google-maps,google-chrome,google-maps-api-3,printing,webkit
Printing the following example page in either Chrome or Safari on Mac (i.e., WebKit) produces misplaced map tiles in the printed output from the second map onwards. It works on the webpage itself, and printing it does also seem to work in Firefox. Need it to work in Chrome or...

How to make CSS animation happen the moment the website loads

css,webkit,motion,divider
Alright, so what I have is an image I want to move and stay in its final position once its there. I currently have programming that makes the image do an animation when its hovered over. HTML: <html> <head> <link href="stylesheet.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="wrapper"> <div class="move"></div> </div>...

Firefox equivalent of moz-media-controls

webkit,html5-video,fullscreen
I working on a project that involves a video player. I'm using the native tag on HTML. I want to have an image shown in the fullscreen mode. I can do so with the following CSS selector, but it only works on Chrome: ::-webkit-media-controls { /*display:none !important;*/ background-repeat: no-repeat; background-position:...

The underlying magic of -webkit-backface-visibility

css,html5,css3,webkit,flicker
I'd like to know why webkit-backface-visibility is like that all-purpose aspirin that solves or makes worse all kinds of heterogeneous problems, mostly related to artifacts and flickering. I have read and understand what really backface-visibility is for: It controls wether 3D rotated objects are visible when not facing the screen....

How do I use the latest Webkit version for Capybara specs using PhantomJS?

rspec,webkit,capybara,phantomjs,headless-browser
A fellow developer told me that PhantomJS uses an old version of Webkit, and that this prevents him from always trusting the results he gets from running Capybara specs using PhantomJS. To my knowledge, PhantomJS is the best headless browser available for running Capybara specs. The only alternatives I've found...

Best option for converting a JSP website to Android app?

android,cordova,webkit,native,hybrid-mobile-app
I have set up a JSP website on a Tomcat 6.0 server. Now I want to create an Android app to fetch the web's data and view it on the phone. I have considered three possible plans for this: Rewrite the website into WAP version and use a Webview to...

Multi-line CSS gradient text not working

html,css,webkit
I'm writing a theme for WordPress and am making use of Webkit text gradients for links. It's working so far, but as soon as the link wraps around to the next line, only the top half of the link is visible. Example code: #page a:link { background: -webkit-repeating-linear-gradient(top, #cade43, #8a953e)...

Getting void android.webkit.WebView.loadUrl while loading webview in dialog in Android?

android,nullpointerexception,dialog,webkit
I am getting this error Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.webkit.WebView.loadUrl when I try to load a webview inside a dialog in android.I have attached the log and code and I have used below. Kindly provide your knowledge to solve it. 02-06 18:07:41.605: E/AndroidRuntime(1492): java.lang.RuntimeException: Unable...

Webkit Scrollbar Width Change

css,webkit,scrollbar
I am trying to change the width of the scrollbar through -webkit-scrollbar property but Chrome rejects it saying that it is an unknown property. Any idea why ?

How to enable/disable WebKit features when compiling as part of Qt5 library

c++,qt,webkit,qt5,qtwebkit
When you compile QtWebKit separately from Qt5, you have access to a bunch of compilation options, like --no-webkit2, --no-3d-rendering, --no-video and others. It seems that when you compile WebKit as part of the Qt5 library, you get stuck with predefined feature configuration which you cannot modify. Is it possible to...

Background image zooms in using -webkit?

javascript,jquery,css,webkit
Can anyone help with this? I'm not sure if I posted the correct code for a test on here but basically I'm using a background image on body with this code, it works good but when I click on any other pages the background image zooms in? #1a2a40 url(images/deluxe/hmid.jpg) no-repeat...

document.styleSheets removes Webkit specific CSS rules

javascript,html,css,webkit
Take a look at this HTML, CSS and JavaScript: <html> <head> <style type="text/css"> body { -webkit-text-size-adjust: none; font-size: 14px; } html{ padding: 0; } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $.each(document.styleSheets, function () { var cssRules = this.cssRules; if (cssRules && cssRules.length && this.href === null) { var css =...

How do I style JUST the reflection of the content without affecting its original source?

html,css,webkit
I’m using -webkit-box-reflect to reflect a div and everything inside it. However I would like to know how can I reflect the content AND be able to fiddle with just the reflection in CSS. So let's say I want change the opacity of just the reflection, how would I go...

IE does, but Chrome/Firefox do not render SVG embedded image in “img” element

html,google-chrome,svg,webkit
I'm trying to reference an SVG file using the "img" tag: <img width="200" height="100" src="test.svg" onerror="this.onerror = null; alert('error');" /> Generally this works, but if "test.svg" has an embedded .jpg image, then the image does not render. This is true in Chrome and Firefox -- IE does render the image...

Building an older version of the webkit source?

svn,webkit
So I have grabbed a copy of the latest webkit svn and managed to debug/build it. However, I now want to debug a version a little older. Is there any way to download a copy of the source of an old webkit version? I can't find it anywhere =(. Thanks...

Inject javascript file to my site with webview in android

javascript,android,webview,webkit
I want to inject javascript file to my site. My site is a simple html page that is on server. I have injected css file. (with Manish's help) So I can manage my simple html site with CSS now. But I want to manage it with javascript too. My jscript.js...

Make yellow autocomplete transparent in Google Chrome [duplicate]

html,css,webkit
This question already has an answer here: Google Chrome form autofill and its yellow background 22 answers This is the textarea This is the textarea that is clicked on and has text in it When Google chrome's autocomplete hijacks the textarea I've tried fixing it by putting in this...

Qt and Webkit not showing all CSS 3, HTML 5 effects

c++,css3,qt,webkit
I am a beginner. I am creating a web browser with Qt and webkit (simply added a webview). I am using the latest version of Ubuntu. The problem is after builidng the browser, when I open websites there are not working all CSS3, HTML5 effects (ie: when I open Google...

Safari svg gaussian blur (feGaussianBlur) wont render stdDeviation less than 1?

svg,safari,webkit,svg-filters
A complex logo I'm rendering shows artifacts between the different shapes. These are not gaps in the artwork, but aliasing artifacts. I found a good solution for removing these artifacts, being to mask the object and apply a very slight gaussian blur (feGaussianBlur) with a low stdDeviation value (0.125). Chrome,...

Change the tint color of the ActionSheet that appears when you long tap on a link in a WKWebView

swift,ios8,webkit,uiactionsheet,wkwebview
I'm writing an iOS 8 app and this problem is driving me crazy... I've set the tint color of my window in white (because I've got colored toolbar and navigation bar) but now, when in my WKWebView I long press on a Link, the actions titles of the Action Sheet...

Chrome/Webkit UI repaint issue when showing a modal window (ngDialog)

google-chrome,webkit,ng-dialog
I'm working on a hybrid app using Cordova, Bootstrap and Angular JS (1.3.x) and testing it in a Chrome desktop browser and on a Android device (lollipop, 5.0.2). In a particular view, I open a modal window using ngDialog. The content in this dialog can exceed the height of a...

Enable Application cache in WKWebView

ios,objective-c,webkit,wkwebview,application-cache
I am aware that offline application cache is not supported in iOS WKWebView. This is enabled in Safari, so I searched webkit project for the responsible code & found this WKPreferences - (void)_setOfflineApplicationCacheIsEnabled:(BOOL)offlineApplicationCacheIsEnabled; Anyone familiar with this method? is it possible to enable app cache in iOS by accessing this...

how to do to receive a push notification when admin publish something new?

ios,objective-c,xcode,webkit
I have a web site made with word-press. I would like to make an app of this web site, it would be a simple web view which will load the web site. The meaning of making an app is because I would like that my users receives push notifications every...

Disable pinch zoom in webkit (or electron)

javascript,html,css,webkit,electron
Is there any way to disable pinch zoom in an electron app? I can't get it to work from inside the web-view with normal javascript methods as described here: http://stackoverflow.com/a/23510108/665261 It seems the --disable-pinch flag is not supported by electron. I have experimented with various methods using: event.preventDefault() on javascript...

Opentype features cross-browser compatibility

css,css3,firefox,webkit,opentype
I am trying to utilise the opentype features of 'Plantin MT Pro' from myfonts. More specifically, I am hoping to use 'true' small-caps and old-style numbering. By 'true' small-caps, I mean i'd prefer not to mimic small-caps via the font-variant selector if possible. The below css is achieving success in...

Getting X Cursor in WebKit GTK2+ widget if run by startx

webkit,debian,xorg,gtk2,gdk
I try to write kiosk web browser and run it automaticly after system boot. It's simple GTK2+ application, with WebKit used as browser. It starts from ~/.xinitrc: exec /home/kiosk-user/bin/browser 'http://localhost/' Source code browser.c: #include <stdio.h> #include <signal.h> #include <stdio.h> #include <gtk/gtk.h> #include <gdk/gdk.h> #include <gdk/gdkkeysyms.h> #include <webkit/webkit.h> int main( int...

Alternative for -webkit-filter in Mozilla Firefox

css,google-chrome,firefox,webkit
I was reading this page on stackoverflow: Change color of PNG image via CSS?. I was reading the reply by ravitadi, and he said you could change your pictures color with -webkit-filter. My question is how could I use -webkit-filter in Mozilla Firefox. As you know -webkit-filter would not work...

CSS 3d transform animates under other elements in webkit only

html,css3,webkit,transform
I have a fairly simple 3d transform which is essentially a bunch of flip cards which can be flipped front to back and vice versa. When they are flipped I want the animation to overlap the other cards. This works perfectly in Firefox however the animation occurs underneath the other...

OS X WebView scrollbar redrawing/flickering/flashing issue

osx,cocoa,webkit,scrollbar
I'm having an issue with scrollbar of an WebView on OS X Yosemite. The WebView is setup in a XIB file, kept default settings. And then load the content with: [self.webView.mainFrame loadHTMLString:html baseURL:nil]; But when scrolling I see redrawing/flickering/flashing issue of the scrollbar: example video. (This happens with all kind...

What is @-webkit-viewport?

html,css,webkit
I came across this webkit CSS selector @-webkit-viewport today and trying to understand what it does ? There does not seem to be any documentation on this. I tried @-webkit-viewport { max-height: 100px; min-height: 100px; } and @media all { @-webkit-viewport { max-height: 100px; min-height: 100px; } } but both...

CSS: Problems when using object-fit and transform together on webkit

css,css3,webkit,transform,scale
I'm trying to use both the css property object-fit: cover on an img element to have my image filling its containing div and transform: scale(xx) to have the image zooming out on hover. Here is a sample fiddle: https://jsfiddle.net/96kbuncq/ Edit: sample with real images: https://jsfiddle.net/96kbuncq/3/ HTML: <div> <div class="category"> <img...

Node-webkit run .js file only?

javascript,node.js,webkit,node-webkit
Is it possible for node-webkit to run a js file, and not a .html file? I have a small app that is supposed to open a external url (and capture it to image), and I don't see the point of creating a html file with my script. I just want...

HTML img tag does not render source image in WebKit.NET browser in C#

c#,html,image,webkit,htmltextwriter
I'm trying to set my WebKitBrowser DocumentText to an HTML string containing a local SVG file path as image source. Actually I want to show the SVG file in a web browser. Here is my code: string SVGPath = "file:///D:/MySVGFiles 1/SVGSample01.svg"; StringWriter stringWriter = new StringWriter(); using (HtmlTextWriter writer =...