Re: [webkit-dev] Pattern for singleton classes instance getters

2015-01-28 Thread Yong Li
"Class::unique()" is one of the known names for singletons Yong Li From: Maciej Stachowiak<mailto:m...@apple.com> Sent: ‎1/‎28/‎2015 9:11 PM To: Darin Adler<mailto:da...@apple.com> Cc: WebKit Development<mailto:webkit-dev@lists.webkit.org&

Re: [webkit-dev] Type checking / casting helpers

2014-10-02 Thread Yong Li
Downcast is the old good name. "cast" is so vague. I would assume cast(B) means: { return (A)B; } Yong Li From: Darin Adler<mailto:da...@apple.com> Sent: ‎10/‎3/‎2014 3:16 AM To: WebKit Development<mailto:webkit-dev@lists.webkit.org> Su

Re: [webkit-dev] Subject: Windows CE port in WebKit: status, future work

2014-08-29 Thread Yong Li
I can also help if needed. Yong Li From: Patrick Gansterer<mailto:par...@paroga.com> Sent: ‎8/‎29/‎2014 10:56 AM To: Osztrogonác Csaba<mailto:o...@inf.u-szeged.hu> Cc: WebKit Development<mailto:webkit-dev@lists.webkit.org> Subject: Re: [w

Re: [webkit-dev] ftlopt merge - basically done

2014-08-18 Thread Yong Li
Thanks a lot:) Yong Li From: Osztrogonác Csaba<mailto:o...@inf.u-szeged.hu> Sent: ‎8/‎18/‎2014 3:51 PM To: WebKit Development<mailto:webkit-dev@lists.webkit.org> Subject: Re: [webkit-dev] ftlopt merge - basically done It works fine with EFL port on

Re: [webkit-dev] ftlopt merge - basically done

2014-08-18 Thread Yong Li
Has anyone managed to make an FTL build on Linux? Yong Li From: Sergio Villar Senin<mailto:svil...@igalia.com> Sent: ‎8/‎7/‎2014 11:58 AM To: webkit-dev@lists.webkit.org<mailto:webkit-dev@lists.webkit.org> Subject: Re: [webkit-dev] ftlopt merge - ba

Re: [webkit-dev] Type cast by using toFoo()

2013-09-30 Thread Yong Li
Bottom line is turning on RTTI in debug build? From: Darin Adler<mailto:da...@apple.com> Sent: ‎2013-‎09-‎30 1:50 PM To: Yong Li<mailto:yong.li.web...@outlook.com> Cc: Gyuyoung Kim<mailto:gyuyoung@webkit.org>; Sam Weinig<mailto:wei.

Re: [webkit-dev] Type cast by using toFoo()

2013-09-30 Thread Yong Li
I think it can be done by checking the vtable pointer if the classes are virtual. From: Sam Weinig Sent: ‎Monday‎, ‎September‎ ‎30‎, ‎2013 ‎12‎:‎53‎ ‎PM To: Gyuyoung Kim Cc: Webkit Development List On Sep 30, 2013, at 3:39 AM, Gyuyoung Kim wrote: > Hello WebKittens, > > I have focused on

Re: [webkit-dev] FrameLoader::stopAllLoaders and sync XHR

2013-04-22 Thread Yong Li
Hi Joe, From what I remembered and understood, actions like FrameLoader::stopAllLoaders is not safe to be executed in a nested event loop. I would try to find a way to exit all nested event loops first and then close the page if it has to be done gracefully. In EventLoopBlackBerry.cpp, the

Re: [webkit-dev] r- your own patches [was: Re: RenderArena: Teaching an old dog new tricks]

2012-11-16 Thread Yong Li
2012/11/16 Julien Chaffraix : >> Seconded. I also think only the one who submitted the patch can clear >> the r? flag. Others should NOT do that, please, even you are a >> reviewer. You can r- the patch if you believe it is bad. > > I disagree with that. You seem to think that patches falls into ei

Re: [webkit-dev] r- your own patches [was: Re: RenderArena: Teaching an old dog new tricks]

2012-11-16 Thread Yong Li
2012/11/15 Ryosuke Niwa : > On Thu, Nov 15, 2012 at 4:28 PM, Mike Lawther > wrote: >> >> On 16 November 2012 09:59, Ryosuke Niwa wrote: >>> >>> >>> While I don’t want to further agitate the issue or go off on a tangent, >>> and agree that we must address the security aspect before getting rid of

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-25 Thread Yong Li
2012/7/19 Brady Eidson : > > On Jul 19, 2012, at 10:53 AM, Andreas Kling wrote: > > On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: >> >> >> On Jul 10, 2012, at 5:25 AM, Alexis Menard >> wrote: >> >> > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: >> >> >> >> On Jul 9, 2012, at 2:43

Re: [webkit-dev] Why does PositionIterator iterates until the end of the document when selecting?

2012-03-30 Thread Yong Li
I tried skipping hidden nodes bug didn't finish the task (https://bugs.webkit.org/show_bug.cgi?id=65377). It would be very nice we can skip entire nodes when possible. 2012/3/30 Sergiy Byelozyorov : > I see now. However, this creates a problem if the nearest position is really > far. In my case

Re: [webkit-dev] Removing ENABLE_SINGLE_THREADED and ENABLE_JSC_MULTIPLE_THREADS

2011-09-14 Thread Yong Li
eems the only use of ENABLE_JSC_MULTIPLE_THREADS is to use JS API from another thread. Is this correct? Thanks, Yong Li 2011/9/8 Geoffrey Garen : > Hi folks. > > To help move WebKit and JavaScriptCore forward, I'd like to remove old > platform cruft that creates particular pain

Re: [webkit-dev] Slow idioms with WTF::String

2011-07-12 Thread Yong Li
How about using RopeImpl as JSString does to boost operator+=? Not sure how bad it affects simple strings. Then another idea is to introduce a LargeString implemented with ropes for special purposes like parsers. Another slow case is converting a const C string to WTF::String every time. For examp

Re: [webkit-dev] Do we have a style preference about const member functions?

2011-06-02 Thread Yong Li
Similar thing: doc->frame()->document(). The solution should be defining both const and non-const members: const Frame* frame() const { reutrn m_frame; } Frame* frame() { return m_frame; } 2011/6/2 Yong Li : > I think we should add a rule like "a const member function should >

Re: [webkit-dev] Do we have a style preference about const member functions?

2011-06-02 Thread Yong Li
I think we should add a rule like "a const member function should never return non-const pointer/reference". I have seen the problem in many places that you can get non-const reference on a const object. For example, InlineTextBox has InlineTextBox* prevTextBox() const; InlineTextBox* nextTextBo

[webkit-dev] How much does webkit rely on non-recursive mutex?

2010-05-28 Thread Yong Li
pened a bug for ThreadingPthread to explicitly use PTHREAD_MUTEX_NORMAL: https://bugs.webkit.org/show_bug.cgi?id=39893 Best regards, Yong Li ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Re: [webkit-dev] currentTime() and UTC time

2010-04-16 Thread Yong Li
. https://bugs.webkit.org/show_bug.cgi?id=37743 2010/4/16 Yong Li > Hi All > > The default implementation of JS Date is calling currentTime() (by > jsCurrentTime()), so it assumes currentTime() returns current UTC time, and > system UTC time can be changed. However, currentTime

[webkit-dev] currentTime() and UTC time

2010-04-16 Thread Yong Li
Hi All The default implementation of JS Date is calling currentTime() (by jsCurrentTime()), so it assumes currentTime() returns current UTC time, and system UTC time can be changed. However, currentTime() is also used in most cases as a system tick count, which means it should always be monotonica

[webkit-dev] cannot receive e-mail from webkit bugzilla

2010-01-26 Thread Yong Li
I cannot receive any e-mail notification from webkit bugzilla since I unsubscribed from list webkit-unassigned. And when I tried to subscribe to webkit-unassigned again, I got "you hit a bug" message. Can anyone help me? -Yong ___ webkit-dev mailing list

[webkit-dev] "statement is unreachable" warnings

2010-01-22 Thread Yong Li
RVCT reports a "statement is unreachable" warning in this case: while (true) { // no break in the loop ... return someValue; ... return someValue; } ASSERT_NOT_REACHED(); return someValue; I understand that if we remove the last return statement, some compilers will complain

Re: [webkit-dev] WebKit style for switch statement

2010-01-20 Thread Yong Li
Thanks, Eric, Darin. I get it. -Yong ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

[webkit-dev] WebKit style for switch statement

2010-01-20 Thread Yong Li
As everyone may know, current webkit style (at least for most source code) for a switch statement is like this: switch (var) { case valueFirst: ... break; ... case valueLast: ... break; default: ASSERT_NOT_REACHED() } This looks good. But some compilers may give a warning like: "statem

Re: [webkit-dev] global new/delete operator in WebKit

2010-01-13 Thread Yong Li
2010/1/13 Zoltan Horvath > > First, Darin thanks for the summary! > > On Wednesday 13 January 2010, at 20:23, Yong Li wrote: > > Darin, thank you very much for writing this for my questions. I have > > another question for "new int[10]", but I guess the answer

Re: [webkit-dev] global new/delete operator in WebKit

2010-01-13 Thread Yong Li
hould just be empty or redirect to global new/delete in my opinion. -Yong 2010/1/13 Darin Adler > In the discussion in bug 32831, Yong Li asked me why we are planning, in > the future, to remove the global new/delete operator in the Mac OS X WebKit. > > I decided it was worth answeri

[webkit-dev] String 4-byte alignment issue

2009-11-13 Thread Yong Li
Hi, Please take a look at bug 31475 https://bugs.webkit.org/show_bug.cgi?id=31475 There're 2 ways to fix this: 1. let StringImpl::create(UString...) create new copy if UString::data() is not aligned to 4 bytes. 2. remove dependencies on 4-byte aligment of String::characters(), probably just wi

[webkit-dev] MutationEvent

2009-11-02 Thread Yong Li
Hi, All, Why there are #if 0 here? First, I'm told "#if 0" is not webkit style. Second, the disabled code seems useful. void Element::dispatchAttrRemovalEvent(Attribute*) { ASSERT(!eventDispatchForbidden()); #if 0 if (!document()->hasListenerType(Document::DOMATTRMODIFIED_LISTENER))

[webkit-dev] DEFINE_STATIC_LOCAL

2009-10-29 Thread Yong Li
I just noticed the following code: #else #define DEFINE_STATIC_LOCAL(type, name, arguments) \ static type& name = *new type arguments #endif Is there any reason of doing this? For example, we want to prevent dtors of all static objects from being called? Best regards, Yon

Re: [webkit-dev] virtual functions in ChromeClient and other clients

2009-10-22 Thread Yong Li
Ha, never mind, then. -yong - Original Message - From: "Eric Seidel" To: "Yong Li" Cc: "WebKit Development" Sent: Thursday, October 22, 2009 3:52 PM Subject: Re: [webkit-dev] virtual functions in ChromeClient and other clients On Thu, Oct 22, 20

Re: [webkit-dev] virtual functions in ChromeClient and other clients

2009-10-22 Thread Yong Li
Oops, even m_page is a data member. Hm... I need to think more about it. -Yong - Original Message - From: "Yong Li" To: "Adam Barth" Cc: "WebKit Development" Sent: Thursday, October 22, 2009 3:28 PM Subject: Re: [webkit-dev] virtual functions in C

Re: [webkit-dev] virtual functions in ChromeClient and other clients

2009-10-22 Thread Yong Li
Usually, those clients call WebPage or WebFrame to access the data members. For example: ChromeClient::doSomething() { m_page->doSomething(); } -Yong - Original Message - From: "Adam Barth" To: "Yong Li" Cc: "WebKit Development" Sent: Thursday,

[webkit-dev] virtual functions in ChromeClient and other clients

2009-10-22 Thread Yong Li
Hi All, ChromeClient and other clients defined in webkit are using a lot of WebCore objects. So it seems impossible to provide a ChromeClient from another binary other than webkit itself. In other words, ChromeClient is almost always implemented in a static lib that's linked with WebCore togeth

Re: [webkit-dev] Calling all committers: The pending-commit list isoverflowing

2009-10-19 Thread Yong Li
I'm able to do it now. Thanks. -Yong - Original Message - From: "Eric Seidel" To: "Yong Li" Cc: "Adam Barth" ; Sent: Monday, October 19, 2009 11:33 AM Subject: Re: [webkit-dev] Calling all committers: The pending-commit list isoverflowing y

Re: [webkit-dev] Calling all committers: The pending-commit list isoverflowing

2009-10-19 Thread Yong Li
- Original Message - From: "Adam Barth" To: Sent: Monday, October 19, 2009 3:21 AM Subject: Re: [webkit-dev] Calling all committers: The pending-commit list isoverflowing If you're a committer, you can help drive that number to zero. Here's what you can do: 1) If you have a patc

[webkit-dev] Single threaded database solution

2009-09-11 Thread Yong Li
Would any reviewer want to review this patch? https://bugs.webkit.org/show_bug.cgi?id=28019 It has been hanging there for a while, after I modified the patch according to Jeremy's suggestions. (Many thanks to Jeremy) Best regards, Yong Li___ webkit-d

Re: [webkit-dev] unwritten rules of webkit style

2009-09-03 Thread Yong Li
I guess gcc complains if file doesn end with new line? -Yong - Original Message - From: Darin Adler To: Brent Fulgham Cc: WebKit Development Sent: Thursday, September 03, 2009 1:11 PM Subject: Re: [webkit-dev] unwritten rules of webkit style On Sep 2, 2009, at 11:18 PM,

Re: [webkit-dev] static const

2009-09-02 Thread Yong Li
MSDN also has such statement: "const" global variables in C++ is implicitly static, where it's implicitly extern in C. For "extern const", the module that contains a initializer "extern const int bar = foo;" is the owner of the object. re: Albert J. Wong: I also use "static const" for functio

Re: [webkit-dev] unwritten rules of webkit style

2009-09-02 Thread Yong Li
For multi-line condition, the following style is most readable to me. if (condition1 && condition2) { // code... } - Original Message - From: Yong Li To: David Levin Cc: WebKit Development Sent: Wednesday, September 02, 2009 3:05 PM Subject: Re: [we

Re: [webkit-dev] unwritten rules of webkit style

2009-09-02 Thread Yong Li
on) { // Some comment doIt(); } if (condition) { myFunction(reallyLongParam1, reallyLongParam2, ... reallyLongParam5); } - Original Message - From: David Levin To: Yong Li Cc: WebKit Development Sent: Wednesday, September 02, 2009 2:56 PM Subject: Re: [webki

Re: [webkit-dev] unwritten rules of webkit style

2009-09-02 Thread Yong Li
{} should be added in this case: if (condition1 && condition2) statement; ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Re: [webkit-dev] unwritten rules of webkit style

2009-09-02 Thread Yong Li
Fraser To: Yong Li Cc: David Levin ; WebKit Development Sent: Wednesday, September 02, 2009 1:36 PM Subject: Re: [webkit-dev] unwritten rules of webkit style On Sep 2, 2009, at 9:59 AM, Yong Li wrote: I think global variables should start with "g_". -Yong I actu

Re: [webkit-dev] unwritten rules of webkit style

2009-09-02 Thread Yong Li
I think global variables should start with "g_". -Yong - Original Message - From: David Levin To: Yong Li Cc: WebKit Development Sent: Wednesday, September 02, 2009 12:30 PM Subject: Re: [webkit-dev] unwritten rules of webkit style On Wed, Sep 2, 2009

Re: [webkit-dev] unwritten rules of webkit style

2009-09-02 Thread Yong Li
Personally I don't like most of these. Too many coding rules makes C++ programming a painful job. Some basic rules are necessary though. I think coding rules should be minimized, but not maximized. BTW, a very basic thing not defined yet: what's the webkit pattern for global variables? g_xxx? g

Re: [webkit-dev] Review Queue

2009-09-02 Thread Yong Li
encoder of skia can definitely be shared by other ports, but the files were still committed to image-encoders\skia. Why are people requiring so much for brand-new wince port? Thanks a lot. -Yong - Original Message ----- From: "Adam Barth" To: "Yong Li" Cc: "

Re: [webkit-dev] Review Queue

2009-09-02 Thread Yong Li
Thanks a lot for spending time on reviewing. As a developer, I hope I can have more constructive comments for r-. I understand it's a hard work and truly appreciate all of you who spend time on it. -Yong - Original Message - From: Eric Seidel To: WebKit Development Sent: Wedne

Re: [webkit-dev] Building release on Windows Vista

2009-08-21 Thread Yong Li
I guess you've enabled link time optimization. The lib file is too big. The solution suggested by MS is to split the project. - Original Message - From: "Anton Muhin" To: "webkit-dev Development" Sent: Friday, August 21, 2009 12:03 PM Subject: [webkit-dev] Building release on Windows

Re: [webkit-dev] [webkit-changes] [47592] trunk/JavaScriptCore

2009-08-21 Thread Yong Li
I remember it happens to VC6. Seems VS2005 doesn't have this problem. -Yong - Original Message - From: "Darin Adler" To: "Yong Li" Cc: "WebKit Development" Sent: Thursday, August 20, 2009 6:12 PM Subject: Re: [webkit-changes] [47592] trunk/JavaScr

[webkit-dev] renaming namespace ARM to ARMRegisters

2009-08-19 Thread Yong Li
Would anyone please take a look at https://bugs.webkit.org/show_bug.cgi?id=28428 ? It's very simple and clear change: namespace ARM => ARMRegisters. The reason of this change is "ARM" can be used as a macro. -Yong___ webkit-dev mailing list webkit-dev

Re: [webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread Yong Li
-- From: Jeremy Orlow To: Yong Li Cc: laszlo.1.gom...@nokia.com ; stai...@kde.org ; webkit-dev@lists.webkit.org Sent: Tuesday, August 18, 2009 5:33 PM Subject: Re: [webkit-dev] Single-threaded database/storage solution On Tue, Aug 18, 2009 at 1:52 PM, Yong Li wrote: It has be

Re: [webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread Yong Li
It has been broken for many times :) If you guys change it very much or very often, probably it's good to create another StorageAreaSync.cpp in storage\single-threaded as you suggested. -Yong - Original Message - From: Jeremy Orlow To: Yong Li Cc: laszlo.1.gom...@noki

Re: [webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread Yong Li
August 18, 2009 10:36 PM To: WebKit Development Subject: Re: [webkit-dev] Single-threaded database/storage solution On 18-Aug-09, at 1:44 PM, Yong Li wrote: Hi, All, The current webkit database/storage is implemented with creating new threads. But not all platform/products support mulple- threa

[webkit-dev] Single-threaded database/storage solution

2009-08-18 Thread Yong Li
There's a macro ENABLE_JSC_MULTIPLE_THREADS used in JSC. Probably there should also be a macro ENABLE_WEBCORE_MULTIPLE_THREADS. Or just use ENABLE_MULTIPLE_THREADS for all multi-threading code. Best regards to everyone, Yong Li ___ webkit-d

Re: [webkit-dev] JSC without Dependencies

2009-08-18 Thread Yong Li
We used Active Perl and other tools for building wince port with VS. But it requires extra work for keeping up with upstream changes. So finally we switch to use cygwin totally. I like this way, because webkit is a platform-crossing project, we should avoid unnecessary changes for any specific