OLD | NEW |
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
(...skipping 5751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5762 } | 5762 } |
5763 | 5763 |
5764 sub FirstLetterToUpperCase | 5764 sub FirstLetterToUpperCase |
5765 { | 5765 { |
5766 my $param = shift; | 5766 my $param = shift; |
5767 my $ret = ucfirst($param); | 5767 my $ret = ucfirst($param); |
5768 # xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang. | 5768 # xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang. |
5769 $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/; | 5769 $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/; |
5770 $ret =~ s/Css/CSS/ if $ret =~ /^Css[^T]/; # css -> setCSS, except setCssTex
t. | 5770 $ret =~ s/Css/CSS/ if $ret =~ /^Css[^T]/; # css -> setCSS, except setCssTex
t. |
5771 $ret =~ s/Ime/IME/ if $ret =~ /^Ime/; # ime -> setIME | 5771 $ret =~ s/Ime/IME/ if $ret =~ /^Ime/; # ime -> setIME |
| 5772 $ret =~ s/Svg/SVG/ if $ret =~ /^Svg/; # svg -> setSVG |
5772 return $ret; | 5773 return $ret; |
5773 } | 5774 } |
5774 | 5775 |
5775 # URL becomes url, but SetURL becomes setURL. | 5776 # URL becomes url, but SetURL becomes setURL. |
5776 sub ToMethodName | 5777 sub ToMethodName |
5777 { | 5778 { |
5778 my $param = shift; | 5779 my $param = shift; |
5779 my $ret = lcfirst($param); | 5780 my $ret = lcfirst($param); |
5780 $ret =~ s/hTML/html/ if $ret =~ /^hTML/; | 5781 $ret =~ s/hTML/html/ if $ret =~ /^hTML/; |
5781 $ret =~ s/uRL/url/ if $ret =~ /^uRL/; | 5782 $ret =~ s/uRL/url/ if $ret =~ /^uRL/; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5818 sub AttributeNameForGetterAndSetter | 5819 sub AttributeNameForGetterAndSetter |
5819 { | 5820 { |
5820 my $attribute = shift; | 5821 my $attribute = shift; |
5821 | 5822 |
5822 my $attributeName = GetImplName($attribute); | 5823 my $attributeName = GetImplName($attribute); |
5823 if ($attribute->extendedAttributes->{"ImplementedAs"}) { | 5824 if ($attribute->extendedAttributes->{"ImplementedAs"}) { |
5824 $attributeName = $attribute->extendedAttributes->{"ImplementedAs"}; | 5825 $attributeName = $attribute->extendedAttributes->{"ImplementedAs"}; |
5825 } | 5826 } |
5826 my $attributeType = $attribute->type; | 5827 my $attributeType = $attribute->type; |
5827 | 5828 |
5828 # Avoid clash with C++ keyword. | |
5829 $attributeName = "_operator" if $attributeName eq "operator"; | |
5830 | |
5831 return $attributeName; | 5829 return $attributeName; |
5832 } | 5830 } |
5833 | 5831 |
5834 sub ContentAttributeName | 5832 sub ContentAttributeName |
5835 { | 5833 { |
5836 my ($interfaceName, $attribute) = @_; | 5834 my ($interfaceName, $attribute) = @_; |
5837 | 5835 |
5838 my $contentAttributeName = $attribute->extendedAttributes->{"Reflect"}; | 5836 my $contentAttributeName = $attribute->extendedAttributes->{"Reflect"}; |
5839 return undef if !$contentAttributeName; | 5837 return undef if !$contentAttributeName; |
5840 | 5838 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6003 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 6001 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
6004 $found = 1; | 6002 $found = 1; |
6005 } | 6003 } |
6006 return 1 if $found; | 6004 return 1 if $found; |
6007 }, 0); | 6005 }, 0); |
6008 | 6006 |
6009 return $found; | 6007 return $found; |
6010 } | 6008 } |
6011 | 6009 |
6012 1; | 6010 1; |
OLD | NEW |