[webkit-dev] Qt 4.4 Embedded with WebKit

Jay Tucker jay.tucker at gmail.com
Thu May 22 12:47:45 PDT 2008


Hi Maciej,

Yes, I already suspected that WebKit supports CSS, which is why I was
so surprised when it appeared that it didn't. :-)

Here are my two test files:

test.html
**************************
<html>
<body>
<head>
<title>HTML Div Test</title>
<link rel="stylesheet" type="text/css" href="test.css"></link>
<style type="text/css">
#embedded {
        width:50px;
        height:50px;
        color:red;
        background-color:blue;
        border: thin solid black;
        position: absolute;
        top:50px;
        left:0px;
}
</style>
</head>
<body>
<div id="external">External</div>
<div id="embedded">Embedded</div>
<div id="inline" style="position:absolute; top:100px; left:0px;
width:50px;height:50px;color:blue;background-color:red;border:thin
solid black">Inline</div>
</body>
</html>
**************************


test.css
**************************
#external {
        width:50px;
        height:50px;
        color:yellow;
        background-color:black;
        border:thin solid red;
        position:absolute;
        top:0px;
        left:0px;
}
**************************

The expected result -- which is what I see in my normal desktop
browser -- is a black box with "External" in yellow letters, and
beneath that a blue box with "Embedded" in red letters, and beneath
that a red box with "Inline" in blue letters.

What I see on the device is the text "External" in yellow letters, the
text "Embedded" in red letters, and the text "Inline" in blue letters,
but all of them are positioned at (0,0) and are thus on top of each
other, and the background is white without any indication of either
colors for either background or borders.

If you like, I can send you a photo of the device's screen.

I hope that this helps you and that you have some idea of what may be
going on here.

Thanks again,
Jay


On Thu, May 22, 2008 at 3:15 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>
> On May 22, 2008, at 11:57 AM, Jay Tucker wrote:
>
>> Hi Maciej,
>>
>> Thanks very much for the prompt response.
>>
>> How should I post the test case? Is it sufficient just to paste the
>> contents of my HTML file and associated CSS file into an e-mail and
>> explain what I think should happen and what does happen?
>
> That would be fine. Normally I'd say to do this in a bug report, but I
> suspect there is not a real bug here since WebKit obviously supports CSS,
> and would hardly be able to browse the web if it didn't.
>
>  - Maciej
>
>>
>>
>> Jay
>>
>> On Thu, May 22, 2008 at 2:29 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>>>
>>> On May 22, 2008, at 11:19 AM, Jay Tucker wrote:
>>>
>>>> Hi all,
>>>>
>>>> This might not be the right forum for this question, but I'll ask it
>>>> here all the same. If it's not the appropriate forum for this
>>>> question, I'd be grateful if somebody could let me know where a better
>>>> place to try asking it is.
>>>>
>>>> I've just cross-compiled and installed Qt 4.4 Embedded on a prototype
>>>> ARM-based device. Both the build and the install seemed to go OK. I'm
>>>> particularly interested in using the new integrated WebKit offered by
>>>> Qt 4.4. I started up webviewer, the little demo browser app that comes
>>>> with Qt 4.4 Embedded, and pointed it at some HTML files I had on the
>>>> local file system (using file:///).
>>>>
>>>> In short, the rendering is really bad. WebKit seems to parse HTML and
>>>> display its content, but it doesn't seem to understand or apply even
>>>> the simplest CSS rules. I've tried external, embedded, and inline
>>>> style sheets for simple things like setting the size, position, and
>>>> background color of <div> elements, and nothing seems to work. I can't
>>>> believe that WebKit doesn't have CSS support.
>>>>
>>>> Has anybody else seen anything like this? Any ideas on what's
>>>> happening or how to make this work?
>>>
>>> Please post a test case that does not do what you expect.
>>>
>>> - Maciej
>>>
>>>
>
>


More information about the webkit-dev mailing list