[webkit-dev] Refactoring activex object converting to plugin code?

2007-12-13 Thread Rui Jiang

Hi all,

Right now webkit will automatically convert some well known ActiveX objects 
(flash, wmp, realplayer etc) to corresponding plugins. (see code in 
RenderPartObject.cpp, mapClassIdToServiceType etc). However, this may not be 
always favorable. I've seen webpages just want the browser bail out if it 
can not support the ActiveX object, and display alternative instructions on 
how to view the page.


Does it make sense to refactor the code, so that with some customization we 
can decide whether to support conversion or not?


Another problem I've seen with the conversion is, if there is an embed tag 
inside an object, converted object type will override the type of the embed 
object. e.g.:


OBJECT id=MediaPlayer codeBase=...  height=250 width=350
  classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6
 PARAM NAME=URL VALUE=bt9.wma
 embed height=250 width=350 src=midflash.swf/
/OBJECT

The outer object specifies a windows media player. WebKit uses converted 
type application/x-mplayer2 to create the plugin. However, it uses the 
internal embed tag's src etc to init the plugin, which fails to render 
correctly.


To fix this, I think we should either use everything of the embed tag (if it 
exists) or everything of the object tag (params) etc to do conversion. Does 
that sound a good approach?


Thanks,
Rui 


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Layout test failure

2007-12-12 Thread Rui Jiang

Hi all,

Pardon me for this newbie problem. I just followed instructions on 
webkit.org, got a clean svn checkout yesterday, did a build and all 
successful. However, when I ran the layout test, they all failed.


I could run safari, it works mostly when browsing webpages, however, 
whenever I type in the address bar, it crashes.


I build and run on WinXP SP2. I tried to make it work numerous times before 
but still couldn't get it right...


I have put sample output below, and attached diffs of first 3 tests in 
css1/basic.


Thanks and I appreciate your help!
Rui


Sample output:

$ run-webkit-tests css1/basic
Building results into: /cygdrive/c/code/webkit/WebKit/WebKitBuild
WEBKITOUTPUTDIR is set to: c:\code\webkit\WebKit\WebKitBuild
WEBKITLIBRARIESDIR is set to: c:\code\webkit\WebKit\WebKitLibraries\win
/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.com 
DumpRenderTree.sln /build Release


Microsoft (R) Visual Studio Version 8.0.50727.762.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
== Build: 0 succeeded, 0 failed, 4 up-to-date, 0 skipped ==
Running tests from /cygdrive/c/code/webkit/WebKit/LayoutTests
Testing 6 test cases.
css1/basic .
css1/basic/class_as_selector.html - failed
.
css1/basic/comments.html - failed
.
css1/basic/containment.html - failed
.
css1/basic/grouping.html - failed
.
css1/basic/id_as_selector.html - failed
.
css1/basic/inheritance.html - failed

1.42s total testing time

6 test cases (100%) had incorrect layout

--- /tmp/layout-test-results/css1/basic/class_as_selector-expected.txt  
2007-12-12 11:11:50.52075 -0800
+++ /tmp/layout-test-results/css1/basic/class_as_selector-actual.txt
2007-12-12 11:11:50.52075 -0800
@@ -1,12 +1,12 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-RenderBody {BODY} at (8,8) size 784x584 [bgcolor=#CC]
-  RenderBlock {P} at (0,0) size 784x18
-RenderText {#text} at (0,0) size 355x18
+layer at (0,0) size 785x615
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x615
+  RenderBlock {HTML} at (0,0) size 785x615
+RenderBody {BODY} at (8,8) size 769x599 [bgcolor=#CC]
+  RenderBlock {P} at (0,0) size 769x21
+RenderText {#text} at (0,0) size 355x20
  text run at (0,0) width 355: The style declarations which apply to the 
text below are:
-  RenderBlock {PRE} at (0,34) size 784x60
+  RenderBlock {PRE} at (0,37) size 769x60
RenderText {#text} at (0,0) size 176x60
  text run at (0,0) width 160: .one {color: green;}
  text run at (160,0) width 0:  
@@ -16,58 +16,58 @@
  text run at (152,30) width 0:  
  text run at (0,45) width 176: P.two {color: purple;}
  text run at (176,45) width 0:  
-  RenderBlock {HR} at (0,107) size 784x2 [border: (1px inset #00)]
-  RenderBlock {P} at (0,125) size 784x18 [color=#008000]
-RenderText {#text} at (0,0) size 194x18
+  RenderBlock {HR} at (0,110) size 769x2 [border: (1px inset #00)]
+  RenderBlock {P} at (0,128) size 769x21 [color=#008000]
+RenderText {#text} at (0,0) size 194x20
  text run at (0,0) width 194: This sentence should be green.
-  RenderBlock {P} at (0,159) size 784x18
-RenderText {#text} at (0,0) size 559x18
+  RenderBlock {P} at (0,165) size 769x21
+RenderText {#text} at (0,0) size 559x20
  text run at (0,0) width 559: This sentence should be black, not red-- 
class selectors cannot begin with digits in CSS1.
-  RenderBlock {P} at (0,193) size 784x18 [color=#008000]
-RenderText {#text} at (0,0) size 194x18
+  RenderBlock {P} at (0,202) size 769x21 [color=#008000]
+RenderText {#text} at (0,0) size 194x20
  text run at (0,0) width 194: This sentence should be green.
-  RenderBlock {P} at (0,227) size 784x18 [color=#800080]
-RenderText {#text} at (0,0) size 199x18
+  RenderBlock {P} at (0,239) size 769x21 [color=#800080]
+RenderText {#text} at (0,0) size 199x20
  text run at (0,0) width 199: This sentence should be purple.
-  RenderBlock {PRE} at (0,261) size 784x15
+  RenderBlock {PRE} at (0,276) size 769x15
RenderText {#text} at (0,0) size 280x15
  text run at (0,0) width 280: This sentence should NOT be purple.
  text run at (280,0) width 0:  
-  RenderBlock {UL} at (0,292) size 784x18
-RenderListItem {LI} at (40,0) size 744x18
-  RenderListMarker at (-17,0) size 7x18: bullet
-  RenderText {#text} at (0,0) size 237x18
+  RenderBlock {UL} at (0,307) size 769x21
+RenderListItem {LI} at (40,0) size 729x21
+  RenderListMarker at (-19,0) size 8x20: bullet
+  RenderText {#text} at (0,0) size 237x20
text run at (0,0) width 237: This sentence should NOT be purple.
-  RenderTable {TABLE} at (0,326) size