[webkit-dev] opening webkit in new window

2009-02-09 Thread nina08

I want to open WebKit for some URLs in a new window, I found some discussions
in the mailinglist,
but I can't do it ,
I look at the code of FrameLoader.cpp and FrameLoaderClientGtk.cpp,


Also I applied the Proposed patch  
http://bugs.webkit.org/attachment.cgi?id=19530action=view  .

After applying this patch, i see that the function
FrameLoaderClient::dispatchDecidePolicyForNewWindowAction is still not being
called,
when i try to open the link in new window by clicking on it whith the right
button, I still see any changement.

dispatchDecidePolicyForNewWindowAction function allows to do this?
Please, if yes,how it can be done ?

can you help me?
Thanks
-- 
View this message in context: 
http://www.nabble.com/opening-webkit-in-new-window-tp21909250p21909250.html
Sent from the Webkit mailing list archive at Nabble.com.

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


[webkit-dev] Cookies in GTK

2009-02-09 Thread Veerabhadra Sheelavant

Hi ,

I have written simple browser application using Webkit on linux.
The browser is up and running.

Now I want to enhance it , I want enable/disable Cookies. I want also to show 
the list of Cookies.
Please tell mw how can I achive this feature...

thanks in advance..


Regards,
Veeru

DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in 
error,please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] Grammer for html parsing

2009-02-09 Thread Nilesh Patil
Hi

I need to know where does grammer for html Parser has been defined in
webkit. Is it a string based comparison directly with tags or done any
other way?

Thanks in advance

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


[webkit-dev] Why does this code crash (jsString() call)

2009-02-09 Thread Alexander Vassilev
Hi all,

Can someone please tell me why this code crashes (Qt 4.5, platform
win32-g++, Windows XP SP2):

 JSC::JSLock lock(false);

 QWebFrame* frame = qobject_castQWebFrame*(webView-page()-mainFrame());

//QWebFrame::getWebCoreFrame() is added by me to access webkit directly, the 
implementation of that method
//returns d-frame
 WebCore::Frame* f = frame-getWebCoreFrame(); 

 WebCore::JSDOMWindow *window = toJSDOMWindow(f);

 if (!window) 

 {

  printf(Warning: couldn't get window object);

  return;

 }

 JSC::ExecState* exec = window-globalExec();

JSC::JSString* p =  jsString(exec, JSC::UString(test));  //=== CRASH HERE




I execute this code when a button is pressed, and i press it when the
page is completely loaded (which happens quite immediately since its a
few lines of test html). Using this code to create properties of the
globalObject, and also to define  custom class with JSClassCreate() and
JSObjectMakeConstructor() works flawlessly, I can access objects crated
from C++ code and create instances from javascript. But when I needed to
call jsString() I had this crash.
The crash report says invalid read access to memory at 0x04ba. I
tried to debug it, but GDB behaves strangely, so I cannot trust it.
Putting breakpoints and logging statements just before my call to
jsString, they are never executed, and the backtrace shows a path that
is completely different. Still when i comment out my call to jsString()
there is not crash and everything works perfectly. Also, putting an
exit() statement just before the sjString() call and running under gdb
causes no crash, the app exists cleanly, and now I am able to put a
breakpoint before the exit. This is why I cannot trust gdb for debugging
this. Maybe it would be easier if someone can note an obvious error in
my code if such exists.  Here is the gdb output anyway:

Program received signal SIGSEGV, Segmentation fault.
0x01b7fe91 in JSC::ExecState::globalData (this=0x6ff38bc)
at 
/work/qt-4.5new/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h:68
68  return *scopeChain()-globalData;
Current language:  auto; currently c++
(gdb) call scopeChain()
$1 = (ScopeChainNode *) 0x0
(gdb) bt
#0  0x01b7fe91 in JSC::ExecState::globalData (this=0x6ff38bc)
at 
/work/qt-4.5new/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h:68
#1  0x01798a35 in JSC::ExecState::heap ()
#2  0x00439181 in JSC::JSCell::operator new ()
#3  0x0059d1b4 in JSC::JSGlobalObject::reset ()
#4  0x0059cee8 in JSC::JSGlobalObject::init ()
#5  0x01768d2a in JSC::JSGlobalObject::JSGlobalObject ()
#6  0x0059851d in WebCore::JSDOMGlobalObject::JSDOMGlobalObject ()
#7  0x00455de1 in WebCore::JSDOMWindowBase::JSDOMWindowBase ()
#8  0x006777eb in WebCore::JSDOMWindow::JSDOMWindow ()
#9  0x00599da6 in WebCore::JSDOMWindowShell::setWindow ()
#10 0x00599969 in WebCore::JSDOMWindowShell::JSDOMWindowShell ()
#11 0x00447018 in WebCore::ScriptController::initScript ()
#12 0x01a45008 in WebCore::ScriptController::initScriptIfNeeded ()
#13 0x01a44f91 in WebCore::ScriptController::windowShell ()
#14 0x0045b7b2 in WebCore::toJSDOMWindow ()
#15 0x0043fbf4 in QWebFrame::addToJavaScriptWindowObject ()
#16 0x00401d3c in qMain (argc=1, argv=0x35640) at main.cpp:239
#17 0x00402f83 in WinMain (instance=0x40, prevInstance=0x0, cmdShow=10)
at qtmain_win.cpp:133
#18 0x00402a2a in main ()
(gdb) 



Thanks for any help
Best regards
Alex


begin:vcard
fn:Alexander Vassilev
n:Vassilev;Alexander
org:VoipGATE S.A.
title:Senior Software Engineer
version:2.1
end:vcard

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


[webkit-dev] Curl Cookie Handling

2009-02-09 Thread mwas
Hi,

I have Integrated the patch given in
https://bugs.webkit.org/show_bug.cgi?id=14730  on webkit r36766 with
additions on SQLITE db calls

The patch does not work on www.facebook.com and results an inconsistent
crashes / memory corruptions. Here is the snapshot of what valgrind has:

 833 ==30082== by 0x4898C94:
JSC::JSActivation::argumentsGetter(JSC::ExecState*, JSC::Identifier const,
JSC::PropertySl ot const) (in /usr/local/lib/libwebkit-1.0.so.1.0.0)
 834 ==30082== by 0x487BA26: JSC::resolve(JSC::ExecState*,
JSC::Instruction*, JSC::Register*, JSC::ScopeChainNode*, JSC: :CodeBlock*,
JSC::JSValue*) (in /usr/local/lib/libwebkit-1.0.so.1.0.0)
 835 ==30082== by 0x487FF2C:
JSC::Machine::privateExecute(JSC::Machine::ExecutionFlag, JSC::ExecState*,
JSC::RegisterFil e*, JSC::Register*, JSC::ScopeChainNode*, JSC::CodeBlock*,
JSC::JSValue**) (in /usr/local/lib/libwebkit-1.0.so.1.0.0)
 836 ==30082== by 0x4889889: JSC::Machine::execute(JSC::FunctionBodyNode*,
JSC::ExecState*, JSC::JSFunction*, JSC::JSObj ect*, JSC::ArgList const,
JSC::ScopeChainNode*, JSC::JSValue**) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 837 ==30082== by 0x47EFB10: JSC::functionProtoFuncApply(JSC::ExecState*,
JSC::JSObject*, JSC::JSValue*, JSC::ArgList co nst) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 838 ==30082== by 0x4881C4A:
JSC::Machine::privateExecute(JSC::Machine::ExecutionFlag, JSC::ExecState*,
JSC::RegisterFil e*, JSC::Register*, JSC::ScopeChainNode*, JSC::CodeBlock*,
JSC::JSValue**) (in /usr/local/lib/libwebkit-1.0.so.1.0.0)
 839 ==30082== by 0x4889889: JSC::Machine::execute(JSC::FunctionBodyNode*,
JSC::ExecState*, JSC::JSFunction*, JSC::JSObj ect*, JSC::ArgList const,
JSC::ScopeChainNode*, JSC::JSValue**) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 840 ==30082== by 0x47EFB10: JSC::functionProtoFuncApply(JSC::ExecState*,
JSC::JSObject*, JSC::JSValue*, JSC::ArgList co nst) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 841 ==30082==
 842 ==30082== Invalid read of size 4
 845 ==30082== by 0x44CCEF2:
WebCore::CookieManager::removeCookieFromDatabase(WebCore::Cookie const*) (in
/usr/local/lib /libwebkit-1.0.so.1.0.0)
 846 ==30082== by 0x44CDECA:
WebCore::CookieManager::getCookies(WebCore::KURL const) (in /usr/local/lib/
libwebkit-1.0.so .1.0.0)
 847 ==30082== by 0x44CA5C5: WebCore::cookies(WebCore::Document const*,
WebCore::KURL const) (in /usr/local/lib/libwebk it-1.0.so.1.0.0)
 848 ==30082== by 0x41EBDB2: WebCore::Document::cookie() const (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 849 ==30082== by 0x4655903:
WebCore::JSDocument::getValueProperty(JSC::ExecState*, int) const (in
/usr/local/lib/libweb kit-1.0.so.1.0.0)
 850 ==30082== by 0x48806F0:
JSC::Machine::privateExecute(JSC::Machine::ExecutionFlag, JSC::ExecState*,
JSC::RegisterFil e*, JSC::Register*, JSC::ScopeChainNode*, JSC::CodeBlock*,
JSC::JSValue**) (in /usr/local/lib/libwebkit-1.0.so.1.0.0)
 851 ==30082== by 0x4889889: JSC::Machine::execute(JSC::FunctionBodyNode*,
JSC::ExecState*, JSC::JSFunction*, JSC::JSObj ect*, JSC::ArgList const,
JSC::ScopeChainNode*, JSC::JSValue**) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 852 ==30082== by 0x47EFB10: JSC::functionProtoFuncApply(JSC::ExecState*,
JSC::JSObject*, JSC::JSValue*, JSC::ArgList co nst) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 853 ==30082== by 0x4881C4A:
JSC::Machine::privateExecute(JSC::Machine::ExecutionFlag, JSC::ExecState*,
JSC::RegisterFil e*, JSC::Register*, JSC::ScopeChainNode*, JSC::CodeBlock*,
JSC::JSValue**) (in /usr/local/lib/libwebkit-1.0.so.1.0.0)
 854 ==30082== by 0x4889889: JSC::Machine::execute(JSC::FunctionBodyNode*,
JSC::ExecState*, JSC::JSFunction*, JSC::JSObj ect*, JSC::ArgList const,
JSC::ScopeChainNode*, JSC::JSValue**) (in
/usr/local/lib/libwebkit-1.0.so.1.0.0)
 855 ==30082== Address 0xe is not stack'd, malloc'd or (recently) free'd
 demangling stack gives the following

WebCore::String::append(WebCore::String const)
free+332
WebCore::operator+(WebCore::String const, WebCore::String const)

WebCore::CookieManager::getCookie(WebCore::KURL const)

Pls. suggest any way out.

Thanks

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


Re: [webkit-dev] Why does this code crash (jsString() call)

2009-02-09 Thread Alexander Vassilev
Here are some more clues :

  JSC::JSLock lock(false);

  QWebFrame* frame = 
 qobject_castQWebFrame*(webView-page()-mainFrame());

 //QWebFrame::getWebCoreFrame() is added by me to access webkit directly, the 
 implementation of that method
 //returns d-frame
  WebCore::Frame* f = frame-getWebCoreFrame();

  WebCore::JSDOMWindow *window = toJSDOMWindow(f);

  if (!window)

  {

   printf(Warning: couldn't get window object);

   return;

  }

  JSC::ExecState* exec = window-globalExec();

 JSC::JSString* p =  jsString(exec, JSC::UString(test));  //=== CRASH 
 HERE
   
...

 Program received signal SIGSEGV, Segmentation fault.
 0x01b7fe91 in JSC::ExecState::globalData (this=0x6ff38bc)
 at 
 /work/qt-4.5new/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h:68
 68  return *scopeChain()-globalData;
 Current language:  auto; currently c++
 (gdb) call scopeChain()
 $1 = (ScopeChainNode *) 0x0
 (gdb) bt
 #0  0x01b7fe91 in JSC::ExecState::globalData (this=0x6ff38bc)
 at 
 /work/qt-4.5new/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h:6

Indeed, when I log exec-scopeChain() just before the call to
jsString(), it is often (but not always) NULL. In these cases, I the
crash message from Windows says that the invalid access is to address
0x0008. In other cases exec-scopeChain() is not NULL and then the
crash message says invalid access to address 0x04ba. Interestingly,
when I load a heavy web page from internet (no problem with this at all,
everything works normal and the page is displayed), and query
exec-scopeChain() i also often get NULL, so it seems that it is normal
for this to be NULL. Still i'm shooting in the dark, I will dig more
deeply in the webkit code, but I will be very thankful if someone can
give me a hint.

Cheers
Alex
begin:vcard
fn:Alexander Vassilev
n:Vassilev;Alexander
org:VoipGATE S.A.
title:Senior Software Engineer
version:2.1
end:vcard

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


Re: [webkit-dev] Cookies in GTK

2009-02-09 Thread Gustavo Noronha
On Mon, 2009-02-09 at 17:13 +0530, Veerabhadra Sheelavant wrote:
 Now I want to enhance it , I want enable/disable Cookies. I want also to show 
 the list of Cookies.
 Please tell mw how can I achive this feature...

Cookies are handled by Soup for the GTK+ port. You will want to track
this needed enhancement:

https://bugs.webkit.org/show_bug.cgi?id=22624

You will then be able to get Soup's cookie jar, and implement your
needs.

See you,

-- 
Gustavo Noronha g...@gnome.org
GNOME contributor

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


Re: [webkit-dev] Curl Cookie Handling

2009-02-09 Thread Julien Chaffraix
Hi,

 I have Integrated the patch given in
 https://bugs.webkit.org/show_bug.cgi?id=14730  on webkit r36766 with
 additions on SQLITE db calls

As you have seen this patch is not integrated and is a year old. As a
result, it may have rotten (the code has changed and some assertions I
made are not true anymore) and it was not tested much outside myself
and a few people like you. So it is likely that there are some bugs
(one was already mentioned on the bugzilla).

 The patch does not work on www.facebook.com and results an inconsistent
 crashes / memory corruptions. Here is the snapshot of what valgrind has:
[removed the backtrace]

After a quick look at the code, it is likely that you are manipulating
a deleted pointer. The cookie is taken directly from a cookieMap,
which means that the cookieMap is not updated at some point when we
release one of its pointer. However without further information, I
cannot say more and you will have to debug yourself. Have you tried a
DEBUG build as there are some assertions that could catch it earlier
and help you tie the crash to one area of code? Also look at the
different LOG information as they can help you.

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


Re: [webkit-dev] webkit-dev Digest, Vol 45, Issue 9

2009-02-09 Thread Veerabhadra Sheelavant
Hi,

The back end I am using is not Soup. I am using CURL



rgds,
Veer

Message: 9
Date: Mon, 09 Feb 2009 12:23:10 -0200
From: Gustavo Noronha g...@gnome.org
Subject: Re: [webkit-dev] Cookies in GTK
To: webkit-dev@lists.webkit.org webkit-dev@lists.webkit.org
Message-ID: 1234189390.5036.11.ca...@abacate.horta
Content-Type: text/plain

On Mon, 2009-02-09 at 17:13 +0530, Veerabhadra Sheelavant wrote:
 Now I want to enhance it , I want enable/disable Cookies. I want also to show 
 the list of Cookies.
 Please tell mw how can I achive this feature...

Cookies are handled by Soup for the GTK+ port. You will want to track
this needed enhancement:

https://bugs.webkit.org/show_bug.cgi?id=22624

You will then be able to get Soup's cookie jar, and implement your
needs.

See you,

--
Gustavo Noronha g...@gnome.org
GNOME contributor



DISCLAIMER: This message is proprietary to Aricent and is intended solely for 
the use of the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be circulated or used for any purpose 
other than for what it is intended. If you have received this message in 
error,please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly prohibited from using, 
copying, altering, or disclosing the contents of this message. Aricent accepts 
no responsibility for loss or damage arising from the use of the information 
transmitted by this email including damage from virus.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Keyboard shortcuts in Web Inspector?

2009-02-09 Thread Daniel Gackle
Thank you for the reply. I filed a bug as you suggested.

By the way, the debugger works great otherwise. I've been having all kinds
of trouble with Firebug's, and if it weren't for the keyboard shortcuts I'd
switch altogether.


On Mon, Feb 9, 2009 at 7:58 AM, Adam Roben aro...@apple.com wrote:

 Hi Daniel-

 On Feb 8, 2009, at 4:02 PM, Daniel Gackle wrote:

  (I haven't posted before, and am not sure this is the right place for my
 question. If it isn't, please direct me elsewhere.)


 This mailing list is an OK place for a question such as this.

  I'm getting familiar with the debugger in Web Inspector. I can't find
 keyboard shortcuts for the basic commands (step into, step over, and so on).
 Do they exist, or is there a way to make one's own bindings?


 I think the only keyboard shortcuts in the Inspector currently are
 Ctrl/Cmd-F to focus the search field and [Shift-]Ctrl/Cmd-G to move through
 the search results. Please feel free to file a bug at 
 http://webkit.org/new-bug for any keyboard shortcuts you'd like to see
 added.

 -Adam


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


Re: [webkit-dev] Grammer for html parsing

2009-02-09 Thread Nilesh Patil
Hi

Yeah But still have a doubt. Doesn't  it need to compare tags with
what ever has come as response? i mean if some data comes then webkit
must be identifying it in terms of HTML tags or other type of data. So
is there no need of string comparison of actual HTML tags ?

THanks  Regards
Niilesh
On 2/9/09, Darin Adler da...@apple.com wrote:
 On Feb 9, 2009, at 3:58 AM, Nilesh Patil wrote:

 I need to know where does grammer for html Parser has been defined
 in webkit. Is it a string based comparison directly with tags or
 done any other way?

 The source files are HTMLTokenizer.cpp and HTMLParser.cpp. It doesn't
 use a parser generator such as yacc or bison or a lexer generator such
 as lex or flex, if that's what you're asking.

  -- Darin


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


Re: [webkit-dev] Grammer for html parsing

2009-02-09 Thread Shariq Rizvi
On Mon, Feb 9, 2009 at 12:23 PM, Nilesh Patil vni...@gmail.com wrote:

 Hi

 Yeah But still have a doubt. Doesn't  it need to compare tags with
 what ever has come as response? i mean if some data comes then webkit
 must be identifying it in terms of HTML tags or other type of data. So
 is there no need of string comparison of actual HTML tags ?


It is the job of the tokenizer (HTMLTokenizer.cpp) to read the HTML tags
in the document and collect them into tokens (class Token). Once a Token
has been created, the tokenizer calls the parser (HTMLParser.cpp) to create
a DOM node and put it in the right place in the DOM tree.
Hence, the string comparison that you mention is going on inside the
tokenizer (during its reading of a tag to create a Token).





 THanks  Regards
 Niilesh
 On 2/9/09, Darin Adler da...@apple.com wrote:
  On Feb 9, 2009, at 3:58 AM, Nilesh Patil wrote:
 
  I need to know where does grammer for html Parser has been defined
  in webkit. Is it a string based comparison directly with tags or
  done any other way?
 
  The source files are HTMLTokenizer.cpp and HTMLParser.cpp. It doesn't
  use a parser generator such as yacc or bison or a lexer generator such
  as lex or flex, if that's what you're asking.
 
   -- Darin
 
 
 ___
 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] Curl Cookie Handling

2009-02-09 Thread Kevin Ollivier

Hi Julien,

On Feb 9, 2009, at 7:23 AM, Julien Chaffraix wrote:


Hi,


I have Integrated the patch given in
https://bugs.webkit.org/show_bug.cgi?id=14730  on webkit r36766 with
additions on SQLITE db calls


As you have seen this patch is not integrated and is a year old. As a
result, it may have rotten (the code has changed and some assertions I
made are not true anymore) and it was not tested much outside myself
and a few people like you. So it is likely that there are some bugs
(one was already mentioned on the bugzilla).


Is this patch still valid, i.e. not made obsolete by another approach?  
Also, was it a complete patch (sans any bugs, of course) for cookie  
support using SQLite? I could only test it using wx right now but I  
would definitely be interested in using the SQLite approach.


I know someone a while back proposed a strategy for dealing with port  
enhancements that end up bit rotting in the review tree, whatever  
happened to that? Sometimes new feature patches cannot be broken down  
into smaller pieces, and I realize large patches tend to be  
intimidating especially to people who can't test them themselves, but  
there has to be some strategy for dealing with that so that important  
new stuff doesn't just sit in a patch tracker for months or years...


Regards,

Kevin



The patch does not work on www.facebook.com and results an  
inconsistent
crashes / memory corruptions. Here is the snapshot of what valgrind  
has:

[removed the backtrace]

After a quick look at the code, it is likely that you are manipulating
a deleted pointer. The cookie is taken directly from a cookieMap,
which means that the cookieMap is not updated at some point when we
release one of its pointer. However without further information, I
cannot say more and you will have to debug yourself. Have you tried a
DEBUG build as there are some assertions that could catch it earlier
and help you tie the crash to one area of code? Also look at the
different LOG information as they can help you.

Regards,
Julien
___
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] Grammer for html parsing

2009-02-09 Thread Darin Adler

On Feb 9, 2009, at 12:23 PM, Nilesh Patil wrote:

Yeah But still have a doubt. Doesn't  it need to compare tags  
with what ever has come as response? i mean if some data comes then  
webkit must be identifying it in terms of HTML tags or other type of  
data. So is there no need of string comparison of actual HTML tags ?


This doesn’t answer your entire question, but I think it gets to the  
core of what you’re asking:


The code that figures out what kind of element to create based on the  
HTML tag is HTMLElementFactory::createHTMLElement in  
HTMLEventFactory.cpp. It’s called by HTMLParser::getNode.


-- Darin

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


[webkit-dev] How to set a string element in an array from C++

2009-02-09 Thread Alexander Vassilev
Hi all,
I am trying to add a string to a js array in C++, like this:

n-arr-setIndex(0, jsString(globalExec, test));

where arr is of type JSC::JSArray*
and initialized with JSC::constructEmptyArray();

The javascript code sees the array as a sequence of characters: arr[0]
becomes 't', arr[1] becomes 'e', arr[2] becomes 's', etc.
The js code that is used to observe this is:
alert('myobj.arr[0] = '+myobj.arr[0]);
alert('myobj.arr[1] = '+myobj.arr[1]);
alert('myobj.arr[2] = '+myobj.arr[2]);

How can I set arr[0] to contain the whole  string 'test' instead of
spreading this string over the array elements. I hope this is something
trivial, but I have no clue at the moment.

Regards
Alex
begin:vcard
fn:Alexander Vassilev
n:Vassilev;Alexander
org:VoipGATE S.A.
title:Senior Software Engineer
version:2.1
end:vcard

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


Re: [webkit-dev] How to set a string element in an array from C++

2009-02-09 Thread Alexander Vassilev
Alexander Vassilev wrote:
 Hi all,
 I am trying to add a string to a js array in C++, like this:

 n-arr-setIndex(0, jsString(globalExec, test));

 where arr is of type JSC::JSArray*
 and initialized with JSC::constructEmptyArray();

 The javascript code sees the array as a sequence of characters: arr[0]
 becomes 't', arr[1] becomes 'e', arr[2] becomes 's', etc.
 The js code that is used to observe this is:
 alert('myobj.arr[0] = '+myobj.arr[0]);
 alert('myobj.arr[1] = '+myobj.arr[1]);
 alert('myobj.arr[2] = '+myobj.arr[2]);

 How can I set arr[0] to contain the whole  string 'test' instead of
 spreading this string over the array elements. I hope this is something
 trivial, but I have no clue at the moment.
   
I'm sorry, it seems that the problem is related to some memory
corruption, and nothing to do with the api.

Cheers
Alex

begin:vcard
fn:Alexander Vassilev
n:Vassilev;Alexander
org:VoipGATE S.A.
title:Senior Software Engineer
version:2.1
end:vcard

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


Re: [webkit-dev] Grammer for html parsing

2009-02-09 Thread Nilesh Patil
HI

So  When exactly RenderStyle and RenderObject will get associated
with - say img - element or with any HTML element
Does WebCore/rendering handles it ?

Thanks  Regards
Niilesh

On Tue, Feb 10, 2009 at 1:57 AM, Shariq Rizvi sha...@rizvi.org wrote:


 On Mon, Feb 9, 2009 at 12:23 PM, Nilesh Patil vni...@gmail.com wrote:

 Hi

 Yeah But still have a doubt. Doesn't  it need to compare tags with
 what ever has come as response? i mean if some data comes then webkit
 must be identifying it in terms of HTML tags or other type of data. So
 is there no need of string comparison of actual HTML tags ?

 It is the job of the tokenizer (HTMLTokenizer.cpp) to read the HTML tags
 in the document and collect them into tokens (class Token). Once a Token
 has been created, the tokenizer calls the parser (HTMLParser.cpp) to create
 a DOM node and put it in the right place in the DOM tree.
 Hence, the string comparison that you mention is going on inside the
 tokenizer (during its reading of a tag to create a Token).




 THanks  Regards
 Niilesh
 On 2/9/09, Darin Adler da...@apple.com wrote:
  On Feb 9, 2009, at 3:58 AM, Nilesh Patil wrote:
 
  I need to know where does grammer for html Parser has been defined
  in webkit. Is it a string based comparison directly with tags or
  done any other way?
 
  The source files are HTMLTokenizer.cpp and HTMLParser.cpp. It doesn't
  use a parser generator such as yacc or bison or a lexer generator such
  as lex or flex, if that's what you're asking.
 
   -- Darin
 
 
 ___
 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 reduce the size of my dll

2009-02-09 Thread cui . yuan2
Hi all:

Currently I'm trying to build webkit in my own VS2005 project. (Makeing a 
new project ,then adding the source file to it and doing  some necessary 
changes) The size of webkit.dll I got is 107m,and seems too large. I 
observe the same dll in safari for windows is less than 5m. So, I want to 
know how I can reduce the size of my dll file, need some settings or 
change the platform?

Any help from you will be appreciated.



Thanks  best regards
Cui Yuan





ZTE Information Security Notice: The information contained in this mail is 
solely property of the sender's organization. This mail communication is 
confidential. Recipients named above are obligated to maintain secrecy and are 
not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the originator of the 
message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev