[chromium-dev] Re: Does Chromium MacOSX always create NSButtonCell for each html input submit button
You found it. At the beginning of the function you see: *static* NSButtonCell *buttonCell; //... if (!buttonCell) { There is only one cell created ever, and it's reused. Avi On Fri, Oct 9, 2009 at 4:20 PM, hap 497 hap...@gmail.com wrote: Hi, Does Chromium MacOSX always create NSButtonCell for each html input submit button? I put a printf() statement in ThemeChromiumMac.mm: static NSButtonCell* button(ControlPart part, ControlStates states, const IntRect zoomedRect, float zoomFactor). It gets called and create a NSButtonCell for a input submit button when i load this test page: htmlbodyform input type=submit value=button1 text=button1 /form/body/html But when I load www.google.com (which has 2 input buttons), I don't see the same button() function gets called to create NSButtonCell. Can you please tell me where is the code which create native gui widget for input submit button for the case of www.google.com? Thank you. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Does Chromium MacOSX always create NSButtonCell for each html input submit button
Oh, and google.com has custom buttons which may or may not go through that function at all (I haven't checked). Avi On Fri, Oct 9, 2009 at 4:44 PM, Avi Drissman a...@chromium.org wrote: You found it. At the beginning of the function you see: *static* NSButtonCell *buttonCell; //... if (!buttonCell) { There is only one cell created ever, and it's reused. Avi On Fri, Oct 9, 2009 at 4:20 PM, hap 497 hap...@gmail.com wrote: Hi, Does Chromium MacOSX always create NSButtonCell for each html input submit button? I put a printf() statement in ThemeChromiumMac.mm: static NSButtonCell* button(ControlPart part, ControlStates states, const IntRect zoomedRect, float zoomFactor). It gets called and create a NSButtonCell for a input submit button when i load this test page: htmlbodyform input type=submit value=button1 text=button1 /form/body/html But when I load www.google.com (which has 2 input buttons), I don't see the same button() function gets called to create NSButtonCell. Can you please tell me where is the code which create native gui widget for input submit button for the case of www.google.com? Thank you. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Does Chromium MacOSX always create NSButtonCell for each html input submit button
Sorry, maybe I used a wrong term in asking my question. I think I am looking for the code which chormium create a native UI widget for each html input submit button in the html source. I assume chromium needs to use 1 native UI widget for each input submit button so that each one of them can respond to user clicking. I think I should have asked for 'NSButton' instead? Regarding www.google.com, it think it does use input submit button, so why I am not see chromium calling ThemeChromiumMac.mm's paintButton() or button() functions for www.google.com? input name=btnG type=submit value=Google Search class=lsbinput name=btnI type=submit value=I'm Feeling Lucky class=lsb Thank you. On Fri, Oct 9, 2009 at 2:20 PM, Avi Drissman a...@chromium.org wrote: Oh, and google.com has custom buttons which may or may not go through that function at all (I haven't checked). Avi On Fri, Oct 9, 2009 at 4:44 PM, Avi Drissman a...@chromium.org wrote: You found it. At the beginning of the function you see: static NSButtonCell *buttonCell; //... if (!buttonCell) { There is only one cell created ever, and it's reused. Avi On Fri, Oct 9, 2009 at 4:20 PM, hap 497 hap...@gmail.com wrote: Hi, Does Chromium MacOSX always create NSButtonCell for each html input submit button? I put a printf() statement in ThemeChromiumMac.mm: static NSButtonCell* button(ControlPart part, ControlStates states, const IntRect zoomedRect, float zoomFactor). It gets called and create a NSButtonCell for a input submit button when i load this test page: htmlbodyform input type=submit value=button1 text=button1 /form/body/html But when I load www.google.com (which has 2 input buttons), I don't see the same button() function gets called to create NSButtonCell. Can you please tell me where is the code which create native gui widget for input submit button for the case of www.google.com? Thank you. --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Does Chromium MacOSX always create NSButtonCell for each html input submit button
Google.com uses custom styling, so chances are a NSButton is not being created since you can't style OS X widgets (without considerable resource hacking, at least). It would be better if you just made a local HTML test page for this. On Fri, Oct 9, 2009 at 5:02 PM, hap 497 hap...@gmail.com wrote: Sorry, maybe I used a wrong term in asking my question. I think I am looking for the code which chormium create a native UI widget for each html input submit button in the html source. I assume chromium needs to use 1 native UI widget for each input submit button so that each one of them can respond to user clicking. I think I should have asked for 'NSButton' instead? Regarding www.google.com, it think it does use input submit button, so why I am not see chromium calling ThemeChromiumMac.mm's paintButton() or button() functions for www.google.com? input name=btnG type=submit value=Google Search class=lsbinput name=btnI type=submit value=I'm Feeling Lucky class=lsb Thank you. On Fri, Oct 9, 2009 at 2:20 PM, Avi Drissman a...@chromium.org wrote: Oh, and google.com has custom buttons which may or may not go through that function at all (I haven't checked). Avi On Fri, Oct 9, 2009 at 4:44 PM, Avi Drissman a...@chromium.org wrote: You found it. At the beginning of the function you see: static NSButtonCell *buttonCell; //... if (!buttonCell) { There is only one cell created ever, and it's reused. Avi On Fri, Oct 9, 2009 at 4:20 PM, hap 497 hap...@gmail.com wrote: Hi, Does Chromium MacOSX always create NSButtonCell for each html input submit button? I put a printf() statement in ThemeChromiumMac.mm: static NSButtonCell* button(ControlPart part, ControlStates states, const IntRect zoomedRect, float zoomFactor). It gets called and create a NSButtonCell for a input submit button when i load this test page: htmlbodyform input type=submit value=button1 text=button1 /form/body/html But when I load www.google.com (which has 2 input buttons), I don't see the same button() function gets called to create NSButtonCell. Can you please tell me where is the code which create native gui widget for input submit button for the case of www.google.com? Thank you. -- Stefan Nuxoll ste...@nuxoll.eu.org --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Does Chromium MacOSX always create NSButtonCell for each html input submit button
Thank you. I did test it with a local test page which just 1 input submit button. But for the case of button with custom styling (like google.com), what kind of widget, which respond to mouse clicking, chromium will create to put that on the page during renderering? Thank you for any more pointer. On Fri, Oct 9, 2009 at 4:55 PM, Stefan Nuxoll ste...@nuxoll.eu.org wrote: Google.com uses custom styling, so chances are a NSButton is not being created since you can't style OS X widgets (without considerable resource hacking, at least). It would be better if you just made a local HTML test page for this. On Fri, Oct 9, 2009 at 5:02 PM, hap 497 hap...@gmail.com wrote: Sorry, maybe I used a wrong term in asking my question. I think I am looking for the code which chormium create a native UI widget for each html input submit button in the html source. I assume chromium needs to use 1 native UI widget for each input submit button so that each one of them can respond to user clicking. I think I should have asked for 'NSButton' instead? Regarding www.google.com, it think it does use input submit button, so why I am not see chromium calling ThemeChromiumMac.mm's paintButton() or button() functions for www.google.com? input name=btnG type=submit value=Google Search class=lsbinput name=btnI type=submit value=I'm Feeling Lucky class=lsb Thank you. On Fri, Oct 9, 2009 at 2:20 PM, Avi Drissman a...@chromium.org wrote: Oh, and google.com has custom buttons which may or may not go through that function at all (I haven't checked). Avi On Fri, Oct 9, 2009 at 4:44 PM, Avi Drissman a...@chromium.org wrote: You found it. At the beginning of the function you see: static NSButtonCell *buttonCell; //... if (!buttonCell) { There is only one cell created ever, and it's reused. Avi On Fri, Oct 9, 2009 at 4:20 PM, hap 497 hap...@gmail.com wrote: Hi, Does Chromium MacOSX always create NSButtonCell for each html input submit button? I put a printf() statement in ThemeChromiumMac.mm: static NSButtonCell* button(ControlPart part, ControlStates states, const IntRect zoomedRect, float zoomFactor). It gets called and create a NSButtonCell for a input submit button when i load this test page: htmlbodyform input type=submit value=button1 text=button1 /form/body/html But when I load www.google.com (which has 2 input buttons), I don't see the same button() function gets called to create NSButtonCell. Can you please tell me where is the code which create native gui widget for input submit button for the case of www.google.com? Thank you. -- Stefan Nuxoll ste...@nuxoll.eu.org --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---
[chromium-dev] Re: Does Chromium MacOSX always create NSButtonCell for each html input submit button
On Fri, Oct 9, 2009 at 7:02 PM, hap 497 hap...@gmail.com wrote: Sorry, maybe I used a wrong term in asking my question. I think I am looking for the code which chormium create a native UI widget for each html input submit button in the html source. I assume chromium needs to use 1 native UI widget for each input submit button so that each one of them can respond to user clicking. Chromium does not create any native UI widgets for input submit buttons. Neither does Safari. On the Mac they both use an NSButtonCell to help draw buttons that are not highly styled with CSS, but it's not a full featured native UI element (and as Avi noted, there's only one NSButtonCell, which is used to draw all unstyled buttons. --Amanda --~--~-~--~~~---~--~~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~--~~~~--~~--~--~---