webkit

iPhone <button> padding unchangeable?

A HTML5 <button> in Mobile Safari seems to have fixed, unchangeable left and right padding. Here's a demo plus how it looks in Safari 5 and iOS4. How can I get rid of that padding? ...

Accessing XHR (XMLHTTPRequest) content when using WebKit in Objective C.

I've been trying for hours with all the different delegate methods to access the content of an XHR request that is automatically requested when a page is loaded. I have used the following which has shown that WebKit is seeing the request in the first place (as the URL that's displayed is the correct one). - (void)webView:(WebView *)sen...

How to read individual '-webkit-transform' values in JavaScript?

Webkit's blog post from last year on 3D transforms explains the various transform 'functions' that can be used in the -webkit-transform property. For example: #myDiv { -webkit-transform: scale(1.1) rotateY(7deg) translateZ(-1px); } My question: how do you access individual values in JavaScript? When you read the webkitTransform prop...

WebKitGTK message passing

I've been playing with WebKitGTK+ recently, in Vala and C. I want to create an application that could use a WebKit instance for the front end, but all logic and information retrieval in the backend, using Vala or C. My question is, if it is possible, how could one pass a message or bubble an event back up to the parent application throu...

How to detect a specific build of webkit in a client browser?

Because of WebSocket protocol changes in WebKit nightly build r59903, I need to know whether I should run additional scripts. That depends on WebKit build number. I'm using jQuery as a platform, so assume $.browser.webkit is true. Then how do I check whether client WebKit build is 59903 or higher? $.browser.version tells something like 5...

problem using HTML5 for Cross-origin resource sharing

Hi, I am new to this site and had been successfully using the "HTML5" Cross-origin resource sharing (CORS) to POST data to my server. I just recently tried to include GETs in that as we are trying to have all of our communications be non-reliant on a JavaScript library. In doing so I have run into an odd issue that seems somewhat fixable...

Better Understanding Memory Release

I am new to Objective-C and as my first application I am writing I will be starting off with a simple WebKit based browser. So far I have done good and am able to load websites but after a while of usage memory usage tends to get high. I have read the documentation on retain, release, autorelease management and I just had one question. I...

How to extract the webkit transformation syntax in Javascript

Hi all! I would like to extract the individual elements of a composite webkit transformation in Javascript. For example: var act_transform = element.style.webkitTransform gives me: scale(0.6) translate(0px, 2236px) rotate(12deg) What is good human readable, but terrible to parse programmatically. I'm interested on all 4 numerical ...

Adobe AIR default browser action

I am working on air project based on html/javascript support. I have created undo/redo system on javascript classes, but it is interfered by browser (webkit) own undo(ctr+z) action (it focuses on last modified input element). Can I somhow turn off browser default behavior? ...

Separate background-image and webkit-gradient into two separate css declarations

Currently, I have the following class: #btnHelp { background: url(images/btnHelp.png) center no-repeat, -webkit-gradient(linear, left top, left bottom, from(#9adc6d), to(#6eba3a)); } I'd like to separate out the background image part from the gradient part into 2 separate classes, like this: #btnHelp { background-image: url(images/...

performance problem with WebKit which gets 50.000 POIs via webservice

Hi, I've got a lot of POIs (compare MKAnnotation Protocol) in a backend on a webserver. I don't want to have a complete dump of all those in an iPhone database since normally you only need the POIs around your area. So my idea was a webservice which gets the actual shown region as paramters and gives back all relevant POIs. So far so goo...

WebKit vertical scrollbar issue on <pre>

I am not able to figure out why this does happen. On all non-webkit browsers I tested the code below with (IE8, FFx 3.x, Opera 10.x) there is no scrollbar on the <pre> area. For both Chrome and Safari vertical scrollbar appears. Of course I do not want it to appear. The code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//...

What is WebKit and how is it related to CSS?

More recently, I have been seeing questions with the tag "webkit". Such questions usually tend to be web-based questions relating to CSS, jQuery, layouts, cross-browers compatibility issues, etc... So what is this "webkit" and how does it relate to CSS? I have also noticed a lot of -webkit-... properties in the source code for various w...

HowTo - Test JS Touch Events on a Mac

I'm working to build a web app that uses the WebKit Touch Events JS API. How can I QA this app on my mac with touch events, and not be forced to swap between developing on a mac and testing on an iPhone. Ideas? ...

What exactly am I embedding when using WebKit in C#?

As I understand it, both Safari and Chrome use WebKit. There are many projects that allow you to embed WebKit, but want I actually want is to embed Chrome (for Windows) in a C# app so that my application renders identically to Chrome on Windows. So when I embed, say, AwesomiumDotNet, will the rendering, CSS support, Javascript engine, f...

WebKit TouchEvents - Not accurate?

I'm using the following to capture Touch Events on an Iphone. document.addEventListener('touchmove', function(event) { event.preventDefault(); var touch = event.touches[0]; $('#touchPosition').text("Touch x:" + touch.pageX + ", y:" + touch.pageY); }, false); Strangely, I'm finding that the positions are wrong...

CSS: why does setting margin-top only work in Webkit?

Here is a test case/live example. Summary of problem: This only works in WebKit: Y.one('#container').setStyle('margin-top', 100); This works in all browsers: Y.one('#container').setStyle('margin', 100); Why does setting margin-top work only in WebKit? EDIT: the fix is shown below in one of the answers. You need to have marginTop ...

CSS3, how to make my Gradient WebKit Background Transparent?

I have the following line of CSS: background: -webkit-gradient(linear, left top, left bottom, from(#243d63), to(#1a2638)); How can I make the background transparent, ie an opacity of .9, so the user can see what's under the div that has this style? Just for WebKit only concern... Thanks ...

how do I make content scroll dynamically in a DIV on Iphone's safari or android's webkit?

my code: for(var myLine = 0; myLine < 100; myLine++) document.getElementById("myDiv").innerHTML += "line " + myLine + "<br>"; ............... <div style="position:...etc; overflow:auto;" id="myDiv"></div> this works without a glitch in every browser on all non mobile platforms. However... when this is implemented on iPhone (...

Firefox and Safari stylesheet loading time, firing JavaScript event when loaded

We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on the dimensions of a parent <div/> element, specifically the height and width of the parent we use in the calculation. The parent div height and width is defined in a external CSS file, and <link> is used to include the stylesheet...