Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # | 1 # |
| 2 # WebKit IDL parser | 2 # WebKit IDL parser |
| 3 # | 3 # |
| 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> | 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> |
| 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 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) 2013 Samsung Electronics. All rights reserved. | |
| 9 # | 10 # |
| 10 # This library is free software; you can redistribute it and/or | 11 # This library is free software; you can redistribute it and/or |
| 11 # modify it under the terms of the GNU Library General Public | 12 # modify it under the terms of the GNU Library General Public |
| 12 # License as published by the Free Software Foundation; either | 13 # License as published by the Free Software Foundation; either |
| 13 # version 2 of the License, or (at your option) any later version. | 14 # version 2 of the License, or (at your option) any later version. |
| 14 # | 15 # |
| 15 # This library is distributed in the hope that it will be useful, | 16 # This library is distributed in the hope that it will be useful, |
| 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 # Library General Public License for more details. | 19 # Library General Public License for more details. |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 639 $functionName = "setIntegralAttribute"; | 640 $functionName = "setIntegralAttribute"; |
| 640 } elsif ($attribute->signature->type eq "unsigned long") { | 641 } elsif ($attribute->signature->type eq "unsigned long") { |
| 641 $functionName = "setUnsignedIntegralAttribute"; | 642 $functionName = "setUnsignedIntegralAttribute"; |
| 642 } else { | 643 } else { |
| 643 $functionName = "setAttribute"; | 644 $functionName = "setAttribute"; |
| 644 } | 645 } |
| 645 | 646 |
| 646 return ($functionName, $contentAttributeName); | 647 return ($functionName, $contentAttributeName); |
| 647 } | 648 } |
| 648 | 649 |
| 650 sub IsCallbackInterfaceFromFile | |
| 651 { | |
| 652 my $object = shift; | |
| 653 my $interfaceName = shift; | |
| 654 | |
| 655 my $idlFile = $object->IDLFileForInterface($interfaceName) | |
| 656 or die("Could NOT find IDL file for interface \"$interfaceName\"!\n"); | |
| 657 | |
| 658 open my $fh, "<", $idlFile; | |
| 659 while (<$fh>) { | |
| 660 return 1 if /callback\s+interface\s+\w+/s; | |
| 661 } | |
|
haraken
2013/04/26 18:03:36
This is a bit weak for whitespaces. Let's use the
do-not-use
2013/04/26 18:15:57
Meaning add the 'g' modifier, right?
| |
| 662 return 0; | |
| 663 } | |
| 664 | |
| 649 sub GenerateConditionalString | 665 sub GenerateConditionalString |
| 650 { | 666 { |
| 651 my $generator = shift; | 667 my $generator = shift; |
| 652 my $node = shift; | 668 my $node = shift; |
| 653 | 669 |
| 654 my $conditional = $node->extendedAttributes->{"Conditional"}; | 670 my $conditional = $node->extendedAttributes->{"Conditional"}; |
| 655 if ($conditional) { | 671 if ($conditional) { |
| 656 return $generator->GenerateConditionalStringFromAttributeValue($conditio nal); | 672 return $generator->GenerateConditionalStringFromAttributeValue($conditio nal); |
| 657 } else { | 673 } else { |
| 658 return ""; | 674 return ""; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 778 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
| 763 $found = 1; | 779 $found = 1; |
| 764 } | 780 } |
| 765 return 1 if $found; | 781 return 1 if $found; |
| 766 }, 0); | 782 }, 0); |
| 767 | 783 |
| 768 return $found; | 784 return $found; |
| 769 } | 785 } |
| 770 | 786 |
| 771 1; | 787 1; |
| OLD | NEW |