Re: [webkit-dev] Rendering for small screen

2009-04-22 Thread Graffine

Hi xunxin:

Thanks for your reply in first. Because of I adapt the GTK+/webkit, I 
couldn't find same functions in GTK+ port. I found a function named 
FrameView::adjustViewSize which use setContentSize to set the content 
size. If I alter the width and height parameters, the scroll bar won't 
shon in browser window. But the whole page contents still overflow the 
window size.


For example, I set the window size is 800*400, and the web page contents 
are 781*488. In this case, we will have a vertical scroll bar. Now I 
want to render the web page contents in proportion to window size, and 
we can see the whole page contents in the browser window. To achieve 
this goal, what should I do? Do I need to set the width and height for 
different htnl tag or there is a global variable to control it in webkit?


And I have another question. I found a function named Frame::createView 
which has a viewportSize parameter, but I didn't know where this 
function be called. Do you have any suggestions?


Thanks,
Graffine.

xunxin ??:


Hi, Graffine:
 
  In QtWebKit, you may use:
page-mainFrame()-setScrollBarPolicy(Qt::Horizontal, 
Qt::ScrollBarAlwaysOff);
page-mainFrame()-setScrollBarPolicy(Qt::Vertical, 
Qt::ScrollBarAlwaysOff);


page-setViewportSize( mainFrame-contentsSize() );

On Mon, Apr 20, 2009 at 5:21 PM, Graffine graff...@gmail.com 
mailto:graff...@gmail.com wrote:


Hello:

I want to render the web page content to small screen size. The
goal is
to adjust viewport size to render whole
web content without scroll bar. I think it might start from Frame or
Render class, but I don't find any feature
or function to do this. Where can I find this?

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




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


[webkit-dev] about hashmap staticDOMObjects

2009-04-22 Thread ZHOU Xiao-bo
hi all:
 I still don't understand the purpose of the HashMap:

static DOMObjectMap domObjects()
{
// Don't use malloc here. Calling malloc from a mark function can
deadlock.
static DOMObjectMap staticDOMObjects;
return staticDOMObjects;
}

what kind of DOMObjects should be stored in it? And why?
I searched the source codes and I found that these classes below will do
that:

Document, Event, HTMLCollection, XMLHttpRequest, CanvasGradient,
CanvasPattern, CanvasRenderingContext2D, DOMCoreException,
DOMImplementation, DOMParser, EventException, History, NamedNodeMap,
NodeFilter, NodeIterator, NodeList, Range, RangeException, TreeWalker,
XMLHttpRequestException, XMLSerializer, Clipboard

but what's the reason? Is it because these classes are essentially simple
and just acting as a tool?

thanks a lot
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] about hashmap staticDOMObjects

2009-04-22 Thread ZHOU Xiao-bo
oh, I got an idea:
Is it because these domobjects doesn't belong to a Document, so they can't
be
stored in

static NodePerDocMap domNodesPerDocument()
{
ASSERT(JSLock::lockCount());
static NodePerDocMap staticDOMNodesPerDocument;
return staticDOMNodesPerDocument;
}




2009/4/22 ZHOU Xiao-bo zhxb.u...@gmail.com

 hi all:
  I still don't understand the purpose of the HashMap:

 static DOMObjectMap domObjects()
 {
 // Don't use malloc here. Calling malloc from a mark function can
 deadlock.
 static DOMObjectMap staticDOMObjects;
 return staticDOMObjects;
 }

 what kind of DOMObjects should be stored in it? And why?
 I searched the source codes and I found that these classes below will do
 that:

 Document, Event, HTMLCollection, XMLHttpRequest, CanvasGradient,
 CanvasPattern, CanvasRenderingContext2D, DOMCoreException,
 DOMImplementation, DOMParser, EventException, History, NamedNodeMap,
 NodeFilter, NodeIterator, NodeList, Range, RangeException, TreeWalker,
 XMLHttpRequestException, XMLSerializer, Clipboard

 but what's the reason? Is it because these classes are essentially simple
 and just acting as a tool?

 thanks a lot

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


Re: [webkit-dev] Rendering for small screen

2009-04-22 Thread xunxin
Hi, Graffine:
you may try this fuction to ajust  viewport size.
  Frame::setZoomFactor(float percent, bool isTextOnly)

where the function Frame::createView is called?  you may try this
command
 ack createView */gtk/*
 and you will find
   WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
   941:frame-createView(size, backgroundColor, transparent,
IntSize(), false);
enjoy

On Wed, Apr 22, 2009 at 9:09 AM, xunxin wanxun...@gmail.com wrote:

 Hi, Graffine:

   In QtWebKit, you may use:
 page-mainFrame()-setScrollBarPolicy(Qt::Horizontal,
 Qt::ScrollBarAlwaysOff);
 page-mainFrame()-setScrollBarPolicy(Qt::Vertical,
 Qt::ScrollBarAlwaysOff);

 page-setViewportSize( mainFrame-contentsSize() );


 On Mon, Apr 20, 2009 at 5:21 PM, Graffine graff...@gmail.com wrote:

 Hello:

 I want to render the web page content to small screen size. The goal is
 to adjust viewport size to render whole
 web content without scroll bar. I think it might start from Frame or
 Render class, but I don't find any feature
 or function to do this. Where can I find this?

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



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


[webkit-dev] print file name and line number while executing javascript

2009-04-22 Thread Jérôme Lebel

Hi,

I'm working a very specific platform built on top of Mac OS X. On my  
own platform I need to use WebKit. In order to have WebKit, I've  
redone my own webkit framework (in c++) and my own webkit uses webcore  
framework (almost unchanged) and javascxript core (totally unchanged).


Everything works... almost... I can even display the google map in my  
own platform. I can zoom in, move the map. The only bug is as soon as  
I resize my window, the google map becomes gray. According to my tests  
(using innerHTML), the javascript from google doesn't produce the  
right html. So it doesn't seem to be a display problem. I suspect some  
javascript events are not triggered or may too much javascript events  
are triggered, and then the google map code is confused.


So my question is : Is there a way to do printf in javascript core,  
somewhere, to display all the javascript command executed and also to  
display the file name and the line number where they are?
To solve my problem I wish to compare  a google map being resized  
using the regular webkit (in objective-c for appkit) with my own  
webkit (in c++ for my platform).




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


[webkit-dev] Writing a new interface, hit a snag

2009-04-22 Thread Michael Simms
Greetings all...

I have spent the last few weeks writing what is effectively a null
interface, so I can use WebKit as a backend system for retrieving
webpages on a headless X11-less gtk-less machine.

This isnt for spamming, mail harvesting or other nefarious activities,
dont worry :-) It's so we can process certain requests from our
website so when people go there, it looks like an integrated system
instead of a half dozen disparate packages!

So, I have an issue that I have been pulling my hair out on for over a
week now, Ive been single stepping through code for days trying to
find what can cause this.

The entire null interface works fine, as long as Javascript is turned
off. It loads all the items it needs and I can access them. Great,
just what I needed. As soon as Javascript is turned on, it blows up.

Now, Ive been coding for a LONG time and Ive never seen an error from
gdb quite like this...

#0  0x00e6ee37 in ctiTrampoline ()
   from /home/michael/webkit_rejig/webkit/.libs/libwebkit-1.0.so.1
#1  0xb7fd4b40 in ?? ()
#2  0xbf8a7428 in ?? ()
#3  0x0056a4e0 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#4  0x00eceeeb in JSC::CTI::execute (code=0xb7fbc300, registerFile=0xb7ff8da8,
callFrame=0xb7c48024, globalData=0xb7f97100, exception=0xbf8a74f8)
at JavaScriptCore/VM/CTI.h:352
#5  0x00eadc35 in JSC::Machine::execute (this=0xb7ff8d80,
programNode=0xb7fd4b40, callFrame=0xb7fb8ac4, scopeChain=0xb7ffd108,
thisObj=0xb7c3, exception=0xbf8a74f8)
at JavaScriptCore/VM/Machine.cpp:934
#6  0x00f2bd15 in JSC::Interpreter::evaluate (exec=0xb7fb8ac4,
scopecha...@0xb7fb8aa0, sour...@0xbf8a7564, thisValue=0xb7c3)
at JavaScriptCore/runtime/Interpreter.cpp:68
#7  0x008ec0d1 in WebCore::ScriptController::evaluate (this=0xb7f97928,
sourceu...@0xbf8a777c, baseLine=1, s...@0xbf8a77ec)
at WebCore/bindings/js/ScriptController.cpp:111
#8  0x00b3b006 in WebCore::FrameLoader::executeScript (this=0xb7f976a4,
u...@0xbf8a777c, baseLine=1, scri...@0xbf8a77ec)
at WebCore/loader/FrameLoader.cpp:792
 ( I dont think it is important what the outer 20 or so frames
are, but if you need them)...

So, it seems that it crashes while loading ctiTrampoline, but this is
an asm routine (I dont know asm) and so the error could be in the
call() that it makes within this function.

Now, I am assuming that the error is that I have stubbed or missed
something in the GTK handler when porting to the null handler. Some
initialisation call to something in the Javascript engine, I honestly
don't know. I am hoping that this mail reaches someone who knows the
js engine inside out and can say 'ohhh yeah thats cos you missed X'
and then I can go do X :-)

Crossed fingers

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


Re: [webkit-dev] Interact with DOM Elements using WebKit

2009-04-22 Thread Prema Arya
Hi,
Following the C# code:

view = new WebViewClass();


  view.setHostWindow(this.panel1.Handle.ToInt32());

  WebKit.tagRECT rect;
  rect.bottom = rect.top = rect.left = rect.right = 0;
  view.initWithFrame(rect, null, null);
  WebKit.WebURLRequestClass req = new WebKit.WebURLRequestClass();
  req.initWithURL(http://login.live.com;,
WebKit._WebURLRequestCachePolicy.WebURLRequestUseProtocolCachePolicy, 60);
  view.mainFrame().loadRequest(req);

  WebKit.IDOMHTMLInputElement element = (IDOMHTMLInputElement)
view.mainFrameDocument().getElementById(i0116);
  element.setValue(username);

  element = (IDOMHTMLInputElement)
view.mainFrameDocument().getElementById(i0118);
  element.setValue(password);

  element = (IDOMHTMLInputElement)
view.mainFrameDocument().getElementById(i0011);

  // This statement throws the error.
  element.click();

I am new to WebKit let me know if my approach is correct? My goal is to
browser website do some operations on it so that it would be helpful in
testing.

Thanks,
Prema Arya
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] print file name and line number while executing javascript

2009-04-22 Thread Jérôme Lebel
I found my solution : the user agent... Since I created my own webkit,  
I didn't take the time to create the right user agent. Now that I  
created one (with the right webkit version), google map works correctly.


Thanks,

Le 22 avr. 09 à 11:58, Jérôme Lebel a écrit :


Hi,

I'm working a very specific platform built on top of Mac OS X. On my  
own platform I need to use WebKit. In order to have WebKit, I've  
redone my own webkit framework (in c++) and my own webkit uses  
webcore framework (almost unchanged) and javascxript core (totally  
unchanged).


Everything works... almost... I can even display the google map in  
my own platform. I can zoom in, move the map. The only bug is as  
soon as I resize my window, the google map becomes gray. According  
to my tests (using innerHTML), the javascript from google doesn't  
produce the right html. So it doesn't seem to be a display problem.  
I suspect some javascript events are not triggered or may too much  
javascript events are triggered, and then the google map code is  
confused.


So my question is : Is there a way to do printf in javascript core,  
somewhere, to display all the javascript command executed and also  
to display the file name and the line number where they are?
To solve my problem I wish to compare  a google map being resized  
using the regular webkit (in objective-c for appkit) with my own  
webkit (in c++ for my platform).




Thanks


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


Re: [webkit-dev] want to port JIT to MIPS - cti_op_mod(STUB_ARGS) seg fault

2009-04-22 Thread x yz

this part of code has been ever tested or not? any body can tell me?
#else  //non X86
void JIT::compileFastArith_op_mod(unsigned result, unsigned op1, unsigned op2)
{
emitPutJITStubArgFromVirtualRegister(op1, 1, regT2);
emitPutJITStubArgFromVirtualRegister(op2, 2, regT2);
emitCTICall(JITStubs::cti_op_mod);
emitPutVirtualRegister(result);
}

thanks alot,
joe

--- On Wed, 4/22/09, x yz last...@yahoo.com wrote:

 From: x yz last...@yahoo.com
 Subject: Re: [webkit-dev] want to port JIT to MIPS - cti_op_mod(STUB_ARGS) 
 seg fault
 To: WebKit Development webkit-dev@lists.webkit.org, Gavin Barraclough 
 barraclo...@apple.com
 Date: Wednesday, April 22, 2009, 8:31 AM
 I use MIPS32EL, VA_LIST call, MIPS pushes function argument
 from left to right. I wrote a simple VA_LIST test it works
 on my box.
 
 BEGIN_STUB_FUNCTION() cause seg fault due to MIPS uses gp
 reg to read sth.
 I treied to rewrite the code like that:
 JSObject* JITStubs::cti_op_new_func_exp(STUB_ARGS)
 {
 va_list vl_args; 
 va_start(vl_args, args);
 StackHack stackHack(STUB_RETURN_ADDRESS_SLOT);
 JSValuePtr dividendValue = va_arg(vl_args, JSC::JSCell*
 );
 JSValuePtr divisorValue = va_arg(vl_args, JSC::JSCell*
 );
 ...
 }
 
 Still fail in stackHack(), if I comment out stackHack()
 then fails at va_arg.
 
 gp is a global register for common/public variables, the
 same usage before I call cti_op_mod() works fine.
 
 I also tried not use VA_LIST but REGISTER calling
 convention, still fail:
 (gdb) x/2i $at
 0x6ab500
 _ZN3JSC8JITStubs10cti_op_modEPPv:   lui gp,0xf96
 0x6ab504
 _ZN3JSC8JITStubs10cti_op_modEPPv+4: addiu   gp,gp,9008
 (gdb) x/20i $at
 0x6ab500
 _ZN3JSC8JITStubs10cti_op_modEPPv:   lui gp,0xf96
 0x6ab504
 _ZN3JSC8JITStubs10cti_op_modEPPv+4: addiu   gp,gp,9008
 0x6ab508
 _ZN3JSC8JITStubs10cti_op_modEPPv+8: addugp,gp,t9
 0x6ab50c
 _ZN3JSC8JITStubs10cti_op_modEPPv+12:addiu   sp,sp,-80
 0x6ab510
 _ZN3JSC8JITStubs10cti_op_modEPPv+16:sw  ra,72(sp)
 0x6ab514
 _ZN3JSC8JITStubs10cti_op_modEPPv+20:sw  s8,68(sp)
 0x6ab518
 _ZN3JSC8JITStubs10cti_op_modEPPv+24:sw  s0,64(sp)
 0x6ab51c
 _ZN3JSC8JITStubs10cti_op_modEPPv+28:moves8,sp
 0x6ab520
 _ZN3JSC8JITStubs10cti_op_modEPPv+32:sw  gp,16(sp)
 0x6ab524
 _ZN3JSC8JITStubs10cti_op_modEPPv+36:sw  a0,80(s8)
 0x6ab528
 _ZN3JSC8JITStubs10cti_op_modEPPv+40:lw  v0,80(s8)
 0x6ab52c
 _ZN3JSC8JITStubs10cti_op_modEPPv+44:addiu   v0,v0,-4
 0x6ab530
 _ZN3JSC8JITStubs10cti_op_modEPPv+48:addiu   a0,s8,24
 0x6ab534
 _ZN3JSC8JITStubs10cti_op_modEPPv+52:movea1,v0
 0x6ab538
 _ZN3JSC8JITStubs10cti_op_modEPPv+56:lw  t9,-19012(gp)
 0x6ab53c
 _ZN3JSC8JITStubs10cti_op_modEPPv+60:jalrt9
 0x6ab540 _ZN3JSC8JITStubs10cti_op_modEPPv+64:   nop
 0x6ab544
 _ZN3JSC8JITStubs10cti_op_modEPPv+68:lw  gp,16(s8)
 0x6ab548
 _ZN3JSC8JITStubs10cti_op_modEPPv+72:addiu   v0,s8,32
 0x6ab54c
 _ZN3JSC8JITStubs10cti_op_modEPPv+76:lw  v1,80(s8)
 (gdb) stepi 14
 
 Program received signal SIGSEGV, Segmentation fault.
 0x006ab538 in JSC::JITStubs::cti_op_mod (args=0x2aac9500)
 at
 /home/jdai/depot/mp/mediabase/head/libs/webkit-1.1.1/JavaScriptCore/jit/JITStubs.cpp:1685
 1685  BEGIN_STUB_FUNCTION();
 
 another question is that there is no matched va_end() and
 it is a bug.
 thanks a lot for help,
 joe


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


Re: [webkit-dev] SharedWorker design doc

2009-04-22 Thread Drew Wilson
That's an excellent point about HTTP auth.
I'm not sure that the let's just go find an open frame associated with this
worker solution will work - the reason is that with the ability to
create/pass around message ports, you can end up with the worker associated
with a frame from a different domain (window A creates worker B, then passes
worker B's MessagePort to window C which is running under a different domain
- once window A closes, worker B can't load through window C because it's a
different domain).

Clearly being able to pass MessagePorts around is a bad idea :)

-atw

2009/4/21 Alexey Proskuryakov a...@webkit.org


 22.04.2009, в 2:31, Drew Wilson написал(а):

  David's take is that long term we'll need to change the loader code so it
 is not dependent on a specific frame - his upcoming refactoring may
 facilitate this, but there will still be a significant amount of work to
 achieve this in WebKit. Over the short term, he suggested that we might be
 able to suspend the parent frame, such that it still exists for the purposes
 of allowing associated workers to perform network loads, but it itself no
 longer has an open window and its active DOM objects are shutdown. When the
 last child worker exits, the parent frame can be completely discarded.


 A problem with this approach is communicating to the user - e.g. asking for
 HTTP authentication credentials. Without an open window, it won't be
 possible to display a sheet, and if we were to display a dialog window
 instead, the user wouldn't know which site needs the credentials.

 We do need to make loading work for frameless documents (e.g. to support
 XSLT document() function), but in other cases I'm aware of, we can rely on a
 parent window being visible.

 - WBR, Alexey Proskuryakov



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


[webkit-dev] Using DocLoader vs SubresourceLoader for loading a (worker) script

2009-04-22 Thread David Levin
You're basically switching from DocLoader to SubresourceLoader for loading a
script for workers.  DocLoader uses CachedResource and SubresourceLoader
doesn't.

So another way to state your question is:

   - What benefit does one get from using the cache (CachedResource) for
   loading worker scripts?
   - If one switched to using SubresourceLoader, is it useful or necessary
   to add support (under a flag) for CachedResource to SubresourceLoader?

Anyone?

Thanks,
Dave



On Fri, Apr 17, 2009 at 1:28 PM, Jian Li jia...@chromium.org wrote:

 To make script loading in nested worker work, I plan to change the use of
 CachedResource machinery to ThreadableLoader, as in bug 25215 (
 https://bugs.webkit.org/show_bug.cgi?id=25215).
 Can anyone who is an expert on loading design advise if this switch has any
 problem or not?

 Thanks a lot,

 Jian


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


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


Re: [webkit-dev] drag'n'drop file uploads

2009-04-22 Thread Darin Adler

On Apr 22, 2009, at 3:47 AM, Philip Orr wrote:

Does anyone have any pointers on drag and drop files from the finder  
directly into a web page or section of a web page. I've got examples  
in Firefox for this but sadly lacking in WebKit knowledge.


Maybe if you pointed to the examples “in Firefox” we could get a  
better idea of what you’re talking about. If they are based on web  
standards and don’t depend on Firefox-specific features, then there’s  
a good chance they can be made to work in WebKit-based browsers as  
well. Perhaps there are bugs getting in the way.


-- Darin

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


Re: [webkit-dev] SharedWorker design doc

2009-04-22 Thread Drew Wilson
Following up on this - is using a dialog for HTTP auth for worker requests
really such a bad thing? What if we only do this as a fallback, in the case
that the initiating window is closed?
It seems more like a UX issue that the application itself could manage (if
you want to use HTTP Auth from your workers, then be sure to force the auth
to happen before your window closes).

-atw

2009/4/22 Drew Wilson atwil...@google.com

 That's an excellent point about HTTP auth.
 I'm not sure that the let's just go find an open frame associated with
 this worker solution will work - the reason is that with the ability to
 create/pass around message ports, you can end up with the worker associated
 with a frame from a different domain (window A creates worker B, then passes
 worker B's MessagePort to window C which is running under a different domain
 - once window A closes, worker B can't load through window C because it's a
 different domain).

 Clearly being able to pass MessagePorts around is a bad idea :)

 -atw

 2009/4/21 Alexey Proskuryakov a...@webkit.org


 22.04.2009, в 2:31, Drew Wilson написал(а):

  David's take is that long term we'll need to change the loader code so it
 is not dependent on a specific frame - his upcoming refactoring may
 facilitate this, but there will still be a significant amount of work to
 achieve this in WebKit. Over the short term, he suggested that we might be
 able to suspend the parent frame, such that it still exists for the purposes
 of allowing associated workers to perform network loads, but it itself no
 longer has an open window and its active DOM objects are shutdown. When the
 last child worker exits, the parent frame can be completely discarded.


 A problem with this approach is communicating to the user - e.g. asking
 for HTTP authentication credentials. Without an open window, it won't be
 possible to display a sheet, and if we were to display a dialog window
 instead, the user wouldn't know which site needs the credentials.

 We do need to make loading work for frameless documents (e.g. to support
 XSLT document() function), but in other cases I'm aware of, we can rely on a
 parent window being visible.

 - WBR, Alexey Proskuryakov




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


Re: [webkit-dev] want to port JIT to MIPS - cti_op_mod(STUB_ARGS) seg fault

2009-04-22 Thread x yz

The cause details are below:
1. original C funtion:
JSValueEncodedAsPointer* JITStubs::cti_op_mod(STUB_ARGS)
{
BEGIN_STUB_FUNCTION();   //causes seg fault

JSValuePtr dividendValue = ARG_src1;
JSValuePtr divisorValue = ARG_src2;

CallFrame* callFrame = ARG_callFrame;
double d = dividendValue.toNumber(callFrame);
JSValuePtr result = jsNumber(ARG_globalData, fmod(d, 
divisorValue.toNumber(callFrame)));
CHECK_FOR_EXCEPTION_AT_END();
return JSValuePtr::encode(result);
}
2. On X86:
Dump of assembler code for function _ZN3JSC8JITStubs10cti_op_modEPvz:
0x08141b12 _ZN3JSC8JITStubs10cti_op_modEPvz+0:push   %ebp
0x08141b13 _ZN3JSC8JITStubs10cti_op_modEPvz+1:mov%esp,%ebp
0x08141b15 _ZN3JSC8JITStubs10cti_op_modEPvz+3:push   %esi
0x08141b16 _ZN3JSC8JITStubs10cti_op_modEPvz+4:push   %ebx
0x08141b17 _ZN3JSC8JITStubs10cti_op_modEPvz+5:sub$0x70,%esp
0x08141b1a _ZN3JSC8JITStubs10cti_op_modEPvz+8:call   0x80577bc 
__i686.get_pc_thunk.bx   //this system call is not exist in MIPS compiled code
0x08141b1f _ZN3JSC8JITStubs10cti_op_modEPvz+13:   add$0xee049,%ebx
0x08141b25 _ZN3JSC8JITStubs10cti_op_modEPvz+19:   lea0xc(%ebp),%eax   
//1677  BEGIN_STUB_FUNCTION();
0x08141b28 _ZN3JSC8JITStubs10cti_op_modEPvz+22:   mov%eax,-0x1c(%ebp)
0x08141b2b _ZN3JSC8JITStubs10cti_op_modEPvz+25:   mov-0x1c(%ebp),%eax
0x08141b2e _ZN3JSC8JITStubs10cti_op_modEPvz+28:   sub$0x8,%eax
0x08141b31 _ZN3JSC8JITStubs10cti_op_modEPvz+31:   mov%eax,0x4(%esp)
0x08141b35 _ZN3JSC8JITStubs10cti_op_modEPvz+35:   lea-0x24(%ebp),%eax
0x08141b38 _ZN3JSC8JITStubs10cti_op_modEPvz+38:   mov%eax,(%esp)
0x08141b3b _ZN3JSC8JITStubs10cti_op_modEPvz+41:   call   0x8148e76 
StackHack//242   ALWAYS_INLINE StackHack(void** location), MIPS 
disasm has no symbols at all
3. On MIPS
Dump of assembler code for function _ZN3JSC8JITStubs10cti_op_modEPvz:
0x006abdb8 _ZN3JSC8JITStubs10cti_op_modEPvz+0:lui gp,0xf96
//this segment used on other routines and works
0x006abdbc _ZN3JSC8JITStubs10cti_op_modEPvz+4:addiu   gp,gp,6776
0x006abdc0 _ZN3JSC8JITStubs10cti_op_modEPvz+8:addugp,gp,t9
0x006abdc4 _ZN3JSC8JITStubs10cti_op_modEPvz+12:   addiu   sp,sp,-88
0x006abdc8 _ZN3JSC8JITStubs10cti_op_modEPvz+16:   sw  ra,80(sp)
0x006abdcc _ZN3JSC8JITStubs10cti_op_modEPvz+20:   sw  s8,76(sp)
0x006abdd0 _ZN3JSC8JITStubs10cti_op_modEPvz+24:   sw  s0,72(sp)
0x006abdd4 _ZN3JSC8JITStubs10cti_op_modEPvz+28:   moves8,sp
0x006abdd8 _ZN3JSC8JITStubs10cti_op_modEPvz+32:   sw  gp,16(sp)
0x006abddc _ZN3JSC8JITStubs10cti_op_modEPvz+36:   sw  a1,92(s8)
0x006abde0 _ZN3JSC8JITStubs10cti_op_modEPvz+40:   sw  a2,96(s8)
0x006abde4 _ZN3JSC8JITStubs10cti_op_modEPvz+44:   sw  a3,100(s8)
0x006abde8 _ZN3JSC8JITStubs10cti_op_modEPvz+48:   sw  a0,88(s8)
0x006abdec _ZN3JSC8JITStubs10cti_op_modEPvz+52:   addiu   v0,s8,92
0x006abdf0 _ZN3JSC8JITStubs10cti_op_modEPvz+56:   sw  v0,24(s8)
0x006abdf4 _ZN3JSC8JITStubs10cti_op_modEPvz+60:   addiu   v1,s8,32
0x006abdf8 _ZN3JSC8JITStubs10cti_op_modEPvz+64:   lw  v0,24(s8)
0x006abdfc _ZN3JSC8JITStubs10cti_op_modEPvz+68:   addiu   v0,v0,-8
0x006abe00 _ZN3JSC8JITStubs10cti_op_modEPvz+72:   movea0,v1
0x006abe04 _ZN3JSC8JITStubs10cti_op_modEPvz+76:   movea1,v0
0x006abe08 _ZN3JSC8JITStubs10cti_op_modEPvz+80:   lw  t9,-19028(gp)   
  //seg fault here, -19028(gp) not accesible
0x006abe0c _ZN3JSC8JITStubs10cti_op_modEPvz+84:   jalrt9
... no label in MIPS. StackHack label shown on X86 but on mips are all 
xxx(gp), may be compiler/gdb not as good as X86 version?

thanks for look at it,
joe


--- On Wed, 4/22/09, x yz last...@yahoo.com wrote:

 From: x yz last...@yahoo.com
 Subject: Re: [webkit-dev] want to port JIT to MIPS - cti_op_mod(STUB_ARGS) 
 seg fault
 To: WebKit Development webkit-dev@lists.webkit.org, Gavin Barraclough 
 barraclo...@apple.com
 Date: Wednesday, April 22, 2009, 8:31 AM
 I use MIPS32EL, VA_LIST call, MIPS pushes function argument
 from left to right. I wrote a simple VA_LIST test it works
 on my box.
 
 BEGIN_STUB_FUNCTION() cause seg fault due to MIPS uses gp
 reg to read sth.
 I treied to rewrite the code like that:
 JSObject* JITStubs::cti_op_new_func_exp(STUB_ARGS)
 {
 va_list vl_args; 
 va_start(vl_args, args);
 StackHack stackHack(STUB_RETURN_ADDRESS_SLOT);
 JSValuePtr dividendValue = va_arg(vl_args, JSC::JSCell*
 );
 JSValuePtr divisorValue = va_arg(vl_args, JSC::JSCell*
 );
 ...
 }
 
 Still fail in stackHack(), if I comment out stackHack()
 then fails at va_arg.
 
 gp is a global register for common/public variables, the
 same usage before I call cti_op_mod() works fine.
 
 I also tried not use VA_LIST but REGISTER calling
 convention, still fail:
 (gdb) x/2i $at
 0x6ab500
 

Re: [webkit-dev] drag'n'drop file uploads

2009-04-22 Thread Philip Orr

  Does anyone have any pointers on drag and drop files from the finder  
  directly into a web page or section of a web page. I've got examples  
  in Firefox for this but sadly lacking in WebKit knowledge.
 
 Maybe if you pointed to the examples “in Firefox” we could get a  
 better idea of what you’re talking about. If they are based on web  
 standards and don’t depend on Firefox-specific features, then there’s  
 a good chance they can be made to work in WebKit-based browsers as  
 well. Perhaps there are bugs getting in the way.
 
  -- Darin
 

Unfortunately the Firefox version uses the XPConnect bridge to get permissions 
handling and the XPCOM for the low level stuff.

Here is a link to the source:

http://straxus.javadevelopersjournal.com/creating_a_mozillafirefox_drag_and_drop_file_upload_script_p.htm

I'm looking to create web applications in HTML5 and CSS3.0 that allow a user to 
drag either individual files or a folder of files into the application and are 
then manipulated and stored with reference to the actual files in the database. 
Once completed all files are then fired off to the server to final composition.

I remember looking into this a while ago and finally gave up, only now we 
actually could really do with the ease of use and was hoping the Webkit nightly 
builds could have helped to provide the goods.

Philip

_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] SharedWorker design doc

2009-04-22 Thread Maciej Stachowiak


On Apr 22, 2009, at 11:54 AM, Drew Wilson wrote:

Following up on this - is using a dialog for HTTP auth for worker  
requests really such a bad thing? What if we only do this as a  
fallback, in the case that the initiating window is closed?


It seems more like a UX issue that the application itself could  
manage (if you want to use HTTP Auth from your workers, then be sure  
to force the auth to happen before your window closes).


It's not only a problem for the Web application but also a problem for  
the browser:


1) We don't want the UI to be confusing even if a Web application is  
written without sufficient caution.


2) We don't want to create a phishing risk via SharedWorkers throwing  
up auth dialogs that appear to belong to another window.


One possible solution is that if the frame that created the  
SharedWorker originally is now gone, then any network request that  
would lead to an authentication prompt or other kind of prompt fails.  
That allows the solution you propose for Web apps, but prevents  
confusion and abuse in the case of malicious or poorly written Web apps.


Regards,
Maciej




-atw

2009/4/22 Drew Wilson atwil...@google.com
That's an excellent point about HTTP auth.

I'm not sure that the let's just go find an open frame associated  
with this worker solution will work - the reason is that with the  
ability to create/pass around message ports, you can end up with the  
worker associated with a frame from a different domain (window A  
creates worker B, then passes worker B's MessagePort to window C  
which is running under a different domain - once window A closes,  
worker B can't load through window C because it's a different domain).


Clearly being able to pass MessagePorts around is a bad idea :)

-atw

2009/4/21 Alexey Proskuryakov a...@webkit.org


22.04.2009, в 2:31, Drew Wilson написал(а):


David's take is that long term we'll need to change the loader code  
so it is not dependent on a specific frame - his upcoming  
refactoring may facilitate this, but there will still be a  
significant amount of work to achieve this in WebKit. Over the short  
term, he suggested that we might be able to suspend the parent  
frame, such that it still exists for the purposes of allowing  
associated workers to perform network loads, but it itself no longer  
has an open window and its active DOM objects are shutdown. When the  
last child worker exits, the parent frame can be completely discarded.


A problem with this approach is communicating to the user - e.g.  
asking for HTTP authentication credentials. Without an open window,  
it won't be possible to display a sheet, and if we were to display a  
dialog window instead, the user wouldn't know which site needs the  
credentials.


We do need to make loading work for frameless documents (e.g. to  
support XSLT document() function), but in other cases I'm aware of,  
we can rely on a parent window being visible.


- WBR, Alexey Proskuryakov




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


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


Re: [webkit-dev] about hashmap staticDOMObjects

2009-04-22 Thread Maciej Stachowiak


On Apr 22, 2009, at 12:27 AM, ZHOU Xiao-bo wrote:


hi all:
 I still don't understand the purpose of the HashMap:

static DOMObjectMap domObjects()
{
// Don't use malloc here. Calling malloc from a mark function  
can deadlock.

static DOMObjectMap staticDOMObjects;
return staticDOMObjects;
}

what kind of DOMObjects should be stored in it? And why?
I searched the source codes and I found that these classes below  
will do that:


Document, Event, HTMLCollection, XMLHttpRequest, CanvasGradient,  
CanvasPattern, CanvasRenderingContext2D, DOMCoreException,  
DOMImplementation, DOMParser, EventException, History, NamedNodeMap,  
NodeFilter, NodeIterator, NodeList, Range, RangeException,  
TreeWalker, XMLHttpRequestException, XMLSerializer, Clipboard


but what's the reason? Is it because these classes are essentially  
simple and just acting as a tool?


The hash map is to ensure that DOM wrappers are unique but created on  
demand, without consuming a pointer in the underlying C++ object. For  
DOM Nodes, we use a hash table in the Node's owner document, but in  
the case of non-Node objects and the Document itself (which has no  
owner document), we need this global hash table.


Regards,
Maciej

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


Re: [webkit-dev] SharedWorker design doc

2009-04-22 Thread Drew Wilson
That's also a reasonable option - so we'd just return a 401 error to the
caller if the initiating window is unable to gather credentials.
-atw

2009/4/22 Maciej Stachowiak m...@apple.com


 On Apr 22, 2009, at 11:54 AM, Drew Wilson wrote:

 Following up on this - is using a dialog for HTTP auth for worker requests
 really such a bad thing? What if we only do this as a fallback, in the case
 that the initiating window is closed?
 It seems more like a UX issue that the application itself could manage (if
 you want to use HTTP Auth from your workers, then be sure to force the auth
 to happen before your window closes).


 It's not only a problem for the Web application but also a problem for the
 browser:

 1) We don't want the UI to be confusing even if a Web application is
 written without sufficient caution.

 2) We don't want to create a phishing risk via SharedWorkers throwing up
 auth dialogs that appear to belong to another window.

 One possible solution is that if the frame that created the SharedWorker
 originally is now gone, then any network request that would lead to an
 authentication prompt or other kind of prompt fails. That allows the
 solution you propose for Web apps, but prevents confusion and abuse in the
 case of malicious or poorly written Web apps.

 Regards,
 Maciej



 -atw

 2009/4/22 Drew Wilson atwil...@google.com

 That's an excellent point about HTTP auth.
 I'm not sure that the let's just go find an open frame associated with
 this worker solution will work - the reason is that with the ability to
 create/pass around message ports, you can end up with the worker associated
 with a frame from a different domain (window A creates worker B, then passes
 worker B's MessagePort to window C which is running under a different domain
 - once window A closes, worker B can't load through window C because it's a
 different domain).

 Clearly being able to pass MessagePorts around is a bad idea :)

 -atw

 2009/4/21 Alexey Proskuryakov a...@webkit.org


 22.04.2009, в 2:31, Drew Wilson написал(а):

  David's take is that long term we'll need to change the loader code so
 it is not dependent on a specific frame - his upcoming refactoring may
 facilitate this, but there will still be a significant amount of work to
 achieve this in WebKit. Over the short term, he suggested that we might be
 able to suspend the parent frame, such that it still exists for the 
 purposes
 of allowing associated workers to perform network loads, but it itself no
 longer has an open window and its active DOM objects are shutdown. When the
 last child worker exits, the parent frame can be completely discarded.


 A problem with this approach is communicating to the user - e.g. asking
 for HTTP authentication credentials. Without an open window, it won't be
 possible to display a sheet, and if we were to display a dialog window
 instead, the user wouldn't know which site needs the credentials.

 We do need to make loading work for frameless documents (e.g. to support
 XSLT document() function), but in other cases I'm aware of, we can rely on a
 parent window being visible.

 - WBR, Alexey Proskuryakov




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



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


[webkit-dev] How to make the size of QtWebKit4.dll or libQtWetKit.so smaller?

2009-04-22 Thread alex
Hi all:
I found that the qt-win-opensource-4.5.0-mingw.exe source code to build qt with 
webkit under windows, and found the release version size is following:

QtCore4.dll 2.61M
QtGui4.dll 10.9M
QtNetwork4.dll 1.32M
QtWebKit4.dll 18.8M

But I installed the qt-sdk-win-opensource-2009.01.1.exe provided by official 
site. And I found the dlls are smaller than that I builded.
QtCore4.dll 1.97M
QtGui4.dll 7.14M
QtNetwork4.dll 852K
QtWebKit4.dll 8M

Why so different on the size, Whether there are some other compile options to 
be set? 


Anyone know how to get smaller WebKit library? We want to use it in a Embedded 
environment.






--

alex ding

Email:bupt...@163.com
msn:bupt...@msn.com
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] drag'n'drop file uploads

2009-04-22 Thread Adam Barth
You can drag and drop a file onto the file input control, which you
can create using input type=file.  I'm not sure if that addresses
your use case.

Adam


On Wed, Apr 22, 2009 at 1:45 PM, Philip Orr philip_...@hotmail.com wrote:
  Does anyone have any pointers on drag and drop files from the finder
  directly into a web page or section of a web page. I've got examples
  in Firefox for this but sadly lacking in WebKit knowledge.

 Maybe if you pointed to the examples “in Firefox” we could get a
 better idea of what you’re talking about. If they are based on web
 standards and don’t depend on Firefox-specific features, then there’s
 a good chance they can be made to work in WebKit-based browsers as
 well. Perhaps there are bugs getting in the way.

 -- Darin


 Unfortunately the Firefox version uses the XPConnect bridge to get
 permissions handling and the XPCOM for the low level stuff.

 Here is a link to the source:

 http://straxus.javadevelopersjournal.com/creating_a_mozillafirefox_drag_and_drop_file_upload_script_p.htm

 I'm looking to create web applications in HTML5 and CSS3.0 that allow a user
 to drag either individual files or a folder of files into the application
 and are then manipulated and stored with reference to the actual files in
 the database. Once completed all files are then fired off to the server to
 final composition.

 I remember looking into this a while ago and finally gave up, only now we
 actually could really do with the ease of use and was hoping the Webkit
 nightly builds could have helped to provide the goods.

 Philip

 
 Surfing the web just got more rewarding. Download the New Internet Explorer
 8
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


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