1/* 2 * This file is part of the WebKit open source project. 3 * This file has been generated by generate-bindings.pl. DO NOT MODIFY! 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21#include "config.h" 22#include "WebDOMTestObj.h" 23 24#include "Dictionary.h" 25#include "Document.h" 26#include "HTMLNames.h" 27#include "KURL.h" 28#include "Node.h" 29#include "SVGPoint.h" 30#include "SerializedScriptValue.h" 31#include "TestEnumType.h" 32#include "TestNode.h" 33#include "TestObj.h" 34#include "WebDOMDictionary.h" 35#include "WebDOMDocument.h" 36#include "WebDOMNode.h" 37#include "WebDOMObject.h" 38#include "WebDOMSVGPoint.h" 39#include "WebDOMString.h" 40#include "WebDOMTestEnumType.h" 41#include "WebDOMTestNode.h" 42#include "WebDOMbool.h" 43#include "WebExceptionHandler.h" 44#include "WebNativeEventListener.h" 45#include "bool.h" 46#include <wtf/GetPtr.h> 47#include <wtf/RefPtr.h> 48#include <wtf/text/AtomicString.h> 49 50struct WebDOMTestObj::WebDOMTestObjPrivate { 51 WebDOMTestObjPrivate(WebCore::TestObj* object = 0) 52 : impl(object) 53 { 54 } 55 56 RefPtr<WebCore::TestObj> impl; 57}; 58 59WebDOMTestObj::WebDOMTestObj() 60 : WebDOMObject() 61 , m_impl(0) 62{ 63} 64 65WebDOMTestObj::WebDOMTestObj(WebCore::TestObj* impl) 66 : WebDOMObject() 67 , m_impl(new WebDOMTestObjPrivate(impl)) 68{ 69} 70 71WebDOMTestObj::WebDOMTestObj(const WebDOMTestObj& copy) 72 : WebDOMObject() 73{ 74 m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0; 75} 76 77WebDOMTestObj& WebDOMTestObj::operator=(const WebDOMTestObj& copy) 78{ 79 delete m_impl; 80 m_impl = copy.impl() ? new WebDOMTestObjPrivate(copy.impl()) : 0; 81 return *this; 82} 83 84WebCore::TestObj* WebDOMTestObj::impl() const 85{ 86 return m_impl ? WTF::getPtr(m_impl->impl) : 0; 87} 88 89WebDOMTestObj::~WebDOMTestObj() 90{ 91 delete m_impl; 92 m_impl = 0; 93} 94 95int WebDOMTestObj::readOnlyLongAttr() const 96{ 97 if (!impl()) 98 return 0; 99 100 return impl()->readOnlyLongAttr(); 101} 102 103WebDOMString WebDOMTestObj::readOnlyStringAttr() const 104{ 105 if (!impl()) 106 return WebDOMString(); 107 108 return static_cast<const WTF::String&>(impl()->readOnlyStringAttr()); 109} 110 111WebDOMTestObj WebDOMTestObj::readOnlyTestObjAttr() const 112{ 113 if (!impl()) 114 return WebDOMTestObj(); 115 116 return toWebKit(WTF::getPtr(impl()->readOnlyTestObjAttr())); 117} 118 119char WebDOMTestObj::byteAttr() const 120{ 121 if (!impl()) 122 return char(); 123 124 return impl()->byteAttr(); 125} 126 127void WebDOMTestObj::setByteAttr(char newByteAttr) 128{ 129 if (!impl()) 130 return; 131 132 impl()->setByteAttr(newByteAttr); 133} 134 135unsigned char WebDOMTestObj::octetAttr() const 136{ 137 if (!impl()) 138 return unsigned char(); 139 140 return impl()->octetAttr(); 141} 142 143void WebDOMTestObj::setOctetAttr(unsigned char newOctetAttr) 144{ 145 if (!impl()) 146 return; 147 148 impl()->setOctetAttr(newOctetAttr); 149} 150 151short WebDOMTestObj::shortAttr() const 152{ 153 if (!impl()) 154 return 0; 155 156 return impl()->shortAttr(); 157} 158 159void WebDOMTestObj::setShortAttr(short newShortAttr) 160{ 161 if (!impl()) 162 return; 163 164 impl()->setShortAttr(newShortAttr); 165} 166 167unsigned short WebDOMTestObj::unsignedShortAttr() const 168{ 169 if (!impl()) 170 return 0; 171 172 return impl()->unsignedShortAttr(); 173} 174 175void WebDOMTestObj::setUnsignedShortAttr(unsigned short newUnsignedShortAttr) 176{ 177 if (!impl()) 178 return; 179 180 impl()->setUnsignedShortAttr(newUnsignedShortAttr); 181} 182 183int WebDOMTestObj::longAttr() const 184{ 185 if (!impl()) 186 return 0; 187 188 return impl()->longAttr(); 189} 190 191void WebDOMTestObj::setLongAttr(int newLongAttr) 192{ 193 if (!impl()) 194 return; 195 196 impl()->setLongAttr(newLongAttr); 197} 198 199long long WebDOMTestObj::longLongAttr() const 200{ 201 if (!impl()) 202 return 0; 203 204 return impl()->longLongAttr(); 205} 206 207void WebDOMTestObj::setLongLongAttr(long long newLongLongAttr) 208{ 209 if (!impl()) 210 return; 211 212 impl()->setLongLongAttr(newLongLongAttr); 213} 214 215unsigned long long WebDOMTestObj::unsignedLongLongAttr() const 216{ 217 if (!impl()) 218 return 0; 219 220 return impl()->unsignedLongLongAttr(); 221} 222 223void WebDOMTestObj::setUnsignedLongLongAttr(unsigned long long newUnsignedLongLongAttr) 224{ 225 if (!impl()) 226 return; 227 228 impl()->setUnsignedLongLongAttr(newUnsignedLongLongAttr); 229} 230 231WebDOMString WebDOMTestObj::stringAttr() const 232{ 233 if (!impl()) 234 return WebDOMString(); 235 236 return static_cast<const WTF::String&>(impl()->stringAttr()); 237} 238 239void WebDOMTestObj::setStringAttr(const WebDOMString& newStringAttr) 240{ 241 if (!impl()) 242 return; 243 244 impl()->setStringAttr(newStringAttr); 245} 246 247WebDOMTestObj WebDOMTestObj::testObjAttr() const 248{ 249 if (!impl()) 250 return WebDOMTestObj(); 251 252 return toWebKit(WTF::getPtr(impl()->testObjAttr())); 253} 254 255void WebDOMTestObj::setTestObjAttr(const WebDOMTestObj& newTestObjAttr) 256{ 257 if (!impl()) 258 return; 259 260 impl()->setTestObjAttr(toWebCore(newTestObjAttr)); 261} 262 263WebDOMTestObj WebDOMTestObj::XMLObjAttr() const 264{ 265 if (!impl()) 266 return WebDOMTestObj(); 267 268 return toWebKit(WTF::getPtr(impl()->xmlObjAttr())); 269} 270 271void WebDOMTestObj::setXMLObjAttr(const WebDOMTestObj& newXMLObjAttr) 272{ 273 if (!impl()) 274 return; 275 276 impl()->setXMLObjAttr(toWebCore(newXMLObjAttr)); 277} 278 279bool WebDOMTestObj::create() const 280{ 281 if (!impl()) 282 return false; 283 284 return impl()->isCreate(); 285} 286 287void WebDOMTestObj::setCreate(bool newCreate) 288{ 289 if (!impl()) 290 return; 291 292 impl()->setCreate(newCreate); 293} 294 295WebDOMString WebDOMTestObj::reflectedStringAttr() const 296{ 297 if (!impl()) 298 return WebDOMString(); 299 300 return static_cast<const WTF::String&>(impl()->fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr)); 301} 302 303void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr) 304{ 305 if (!impl()) 306 return; 307 308 impl()->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr); 309} 310 311int WebDOMTestObj::reflectedIntegralAttr() const 312{ 313 if (!impl()) 314 return 0; 315 316 return impl()->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr); 317} 318 319void WebDOMTestObj::setReflectedIntegralAttr(int newReflectedIntegralAttr) 320{ 321 if (!impl()) 322 return; 323 324 impl()->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr); 325} 326 327unsigned WebDOMTestObj::reflectedUnsignedIntegralAttr() const 328{ 329 if (!impl()) 330 return unsigned(); 331 332 return impl()->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr); 333} 334 335void WebDOMTestObj::setReflectedUnsignedIntegralAttr(unsigned newReflectedUnsignedIntegralAttr) 336{ 337 if (!impl()) 338 return; 339 340 impl()->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr); 341} 342 343bool WebDOMTestObj::reflectedBooleanAttr() const 344{ 345 if (!impl()) 346 return false; 347 348 return impl()->fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr); 349} 350 351void WebDOMTestObj::setReflectedBooleanAttr(bool newReflectedBooleanAttr) 352{ 353 if (!impl()) 354 return; 355 356 impl()->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr); 357} 358 359WebDOMString WebDOMTestObj::reflectedURLAttr() const 360{ 361 if (!impl()) 362 return WebDOMString(); 363 364 return static_cast<const WTF::String&>(impl()->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr)); 365} 366 367void WebDOMTestObj::setReflectedURLAttr(const WebDOMString& newReflectedURLAttr) 368{ 369 if (!impl()) 370 return; 371 372 impl()->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr); 373} 374 375WebDOMString WebDOMTestObj::reflectedStringAttr() const 376{ 377 if (!impl()) 378 return WebDOMString(); 379 380 return static_cast<const WTF::String&>(impl()->fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr)); 381} 382 383void WebDOMTestObj::setReflectedStringAttr(const WebDOMString& newReflectedStringAttr) 384{ 385 if (!impl()) 386 return; 387 388 impl()->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr); 389} 390 391int WebDOMTestObj::reflectedCustomIntegralAttr() const 392{ 393 if (!impl()) 394 return 0; 395 396 return impl()->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr); 397} 398 399void WebDOMTestObj::setReflectedCustomIntegralAttr(int newReflectedCustomIntegralAttr) 400{ 401 if (!impl()) 402 return; 403 404 impl()->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr); 405} 406 407bool WebDOMTestObj::reflectedCustomBooleanAttr() const 408{ 409 if (!impl()) 410 return false; 411 412 return impl()->fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr); 413} 414 415void WebDOMTestObj::setReflectedCustomBooleanAttr(bool newReflectedCustomBooleanAttr) 416{ 417 if (!impl()) 418 return; 419 420 impl()->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr); 421} 422 423WebDOMString WebDOMTestObj::reflectedCustomURLAttr() const 424{ 425 if (!impl()) 426 return WebDOMString(); 427 428 return static_cast<const WTF::String&>(impl()->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr)); 429} 430 431void WebDOMTestObj::setReflectedCustomURLAttr(const WebDOMString& newReflectedCustomURLAttr) 432{ 433 if (!impl()) 434 return; 435 436 impl()->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedCustomURLAttr); 437} 438 439int WebDOMTestObj::attrWithGetterException() const 440{ 441 if (!impl()) 442 return 0; 443 444 WebCore::ExceptionCode ec = 0; 445 int result = impl()->attrWithGetterException(ec); 446 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 447 return result; 448} 449 450void WebDOMTestObj::setAttrWithGetterException(int newAttrWithGetterException) 451{ 452 if (!impl()) 453 return; 454 455 impl()->setAttrWithGetterException(newAttrWithGetterException); 456} 457 458int WebDOMTestObj::attrWithSetterException() const 459{ 460 if (!impl()) 461 return 0; 462 463 return impl()->attrWithSetterException(); 464} 465 466void WebDOMTestObj::setAttrWithSetterException(int newAttrWithSetterException) 467{ 468 if (!impl()) 469 return; 470 471 WebCore::ExceptionCode ec = 0; 472 impl()->setAttrWithSetterException(newAttrWithSetterException, ec); 473 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 474} 475 476WebDOMString WebDOMTestObj::stringAttrWithGetterException() const 477{ 478 if (!impl()) 479 return WebDOMString(); 480 481 WebCore::ExceptionCode ec = 0; 482 WebDOMString result = impl()->stringAttrWithGetterException(ec); 483 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 484 return static_cast<const WTF::String&>(result); 485} 486 487void WebDOMTestObj::setStringAttrWithGetterException(const WebDOMString& newStringAttrWithGetterException) 488{ 489 if (!impl()) 490 return; 491 492 impl()->setStringAttrWithGetterException(newStringAttrWithGetterException); 493} 494 495WebDOMString WebDOMTestObj::stringAttrWithSetterException() const 496{ 497 if (!impl()) 498 return WebDOMString(); 499 500 return static_cast<const WTF::String&>(impl()->stringAttrWithSetterException()); 501} 502 503void WebDOMTestObj::setStringAttrWithSetterException(const WebDOMString& newStringAttrWithSetterException) 504{ 505 if (!impl()) 506 return; 507 508 WebCore::ExceptionCode ec = 0; 509 impl()->setStringAttrWithSetterException(newStringAttrWithSetterException, ec); 510 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 511} 512 513#if ENABLE(Condition1) 514int WebDOMTestObj::conditionalAttr1() const 515{ 516 if (!impl()) 517 return 0; 518 519 return impl()->conditionalAttr1(); 520} 521 522void WebDOMTestObj::setConditionalAttr1(int newConditionalAttr1) 523{ 524 if (!impl()) 525 return; 526 527 impl()->setConditionalAttr1(newConditionalAttr1); 528} 529 530#endif 531#if ENABLE(Condition1) && ENABLE(Condition2) 532int WebDOMTestObj::conditionalAttr2() const 533{ 534 if (!impl()) 535 return 0; 536 537 return impl()->conditionalAttr2(); 538} 539 540void WebDOMTestObj::setConditionalAttr2(int newConditionalAttr2) 541{ 542 if (!impl()) 543 return; 544 545 impl()->setConditionalAttr2(newConditionalAttr2); 546} 547 548#endif 549#if ENABLE(Condition1) || ENABLE(Condition2) 550int WebDOMTestObj::conditionalAttr3() const 551{ 552 if (!impl()) 553 return 0; 554 555 return impl()->conditionalAttr3(); 556} 557 558void WebDOMTestObj::setConditionalAttr3(int newConditionalAttr3) 559{ 560 if (!impl()) 561 return; 562 563 impl()->setConditionalAttr3(newConditionalAttr3); 564} 565 566#endif 567WebDOMObject WebDOMTestObj::anyAttribute() const 568{ 569 if (!impl()) 570 return WebDOMObject(); 571 572 return toWebKit(WTF::getPtr(impl()->anyAttribute())); 573} 574 575void WebDOMTestObj::setAnyAttribute(const WebDOMObject& newAnyAttribute) 576{ 577 if (!impl()) 578 return; 579 580 impl()->setAnyAttribute(toWebCore(newAnyAttribute)); 581} 582 583WebDOMDocument WebDOMTestObj::contentDocument() const 584{ 585 if (!impl()) 586 return WebDOMDocument(); 587 588 return toWebKit(WTF::getPtr(impl()->contentDocument())); 589} 590 591WebDOMSVGPoint WebDOMTestObj::mutablePoint() const 592{ 593 if (!impl()) 594 return WebDOMSVGPoint(); 595 596 return toWebKit(WTF::getPtr(impl()->mutablePoint())); 597} 598 599void WebDOMTestObj::setMutablePoint(const WebDOMSVGPoint& newMutablePoint) 600{ 601 if (!impl()) 602 return; 603 604 impl()->setMutablePoint(toWebCore(newMutablePoint)); 605} 606 607WebDOMSVGPoint WebDOMTestObj::immutablePoint() const 608{ 609 if (!impl()) 610 return WebDOMSVGPoint(); 611 612 return toWebKit(WTF::getPtr(impl()->immutablePoint())); 613} 614 615void WebDOMTestObj::setImmutablePoint(const WebDOMSVGPoint& newImmutablePoint) 616{ 617 if (!impl()) 618 return; 619 620 impl()->setImmutablePoint(toWebCore(newImmutablePoint)); 621} 622 623int WebDOMTestObj::strawberry() const 624{ 625 if (!impl()) 626 return 0; 627 628 return impl()->blueberry(); 629} 630 631void WebDOMTestObj::setStrawberry(int newStrawberry) 632{ 633 if (!impl()) 634 return; 635 636 impl()->setBlueberry(newStrawberry); 637} 638 639float WebDOMTestObj::strictFloat() const 640{ 641 if (!impl()) 642 return 0; 643 644 return impl()->strictFloat(); 645} 646 647void WebDOMTestObj::setStrictFloat(float newStrictFloat) 648{ 649 if (!impl()) 650 return; 651 652 impl()->setStrictFloat(newStrictFloat); 653} 654 655int WebDOMTestObj::description() const 656{ 657 if (!impl()) 658 return 0; 659 660 return impl()->description(); 661} 662 663int WebDOMTestObj::id() const 664{ 665 if (!impl()) 666 return 0; 667 668 return impl()->id(); 669} 670 671void WebDOMTestObj::setId(int newId) 672{ 673 if (!impl()) 674 return; 675 676 impl()->setId(newId); 677} 678 679WebDOMString WebDOMTestObj::hash() const 680{ 681 if (!impl()) 682 return WebDOMString(); 683 684 return static_cast<const WTF::String&>(impl()->hash()); 685} 686 687int WebDOMTestObj::replaceableAttribute() const 688{ 689 if (!impl()) 690 return 0; 691 692 return impl()->replaceableAttribute(); 693} 694 695double WebDOMTestObj::nullableDoubleAttribute() const 696{ 697 if (!impl()) 698 return 0; 699 700 bool isNull = false; 701 return impl()->nullableDoubleAttribute(isNull); 702} 703 704int WebDOMTestObj::nullableLongAttribute() const 705{ 706 if (!impl()) 707 return 0; 708 709 bool isNull = false; 710 return impl()->nullableLongAttribute(isNull); 711} 712 713bool WebDOMTestObj::nullableBooleanAttribute() const 714{ 715 if (!impl()) 716 return false; 717 718 bool isNull = false; 719 return impl()->nullableBooleanAttribute(isNull); 720} 721 722WebDOMString WebDOMTestObj::nullableStringAttribute() const 723{ 724 if (!impl()) 725 return WebDOMString(); 726 727 bool isNull = false; 728 return static_cast<const WTF::String&>(impl()->nullableStringAttribute(isNull)); 729} 730 731int WebDOMTestObj::nullableLongSettableAttribute() const 732{ 733 if (!impl()) 734 return 0; 735 736 bool isNull = false; 737 return impl()->nullableLongSettableAttribute(isNull); 738} 739 740void WebDOMTestObj::setNullableLongSettableAttribute(int newNullableLongSettableAttribute) 741{ 742 if (!impl()) 743 return; 744 745 impl()->setNullableLongSettableAttribute(newNullableLongSettableAttribute); 746} 747 748int WebDOMTestObj::nullableStringValue() const 749{ 750 if (!impl()) 751 return 0; 752 753 bool isNull = false; 754 WebCore::ExceptionCode ec = 0; 755 int result = impl()->nullableStringValue(isNull, ec); 756 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 757 return result; 758} 759 760void WebDOMTestObj::setNullableStringValue(int newNullableStringValue) 761{ 762 if (!impl()) 763 return; 764 765 impl()->setNullableStringValue(newNullableStringValue); 766} 767 768void WebDOMTestObj::voidMethod() 769{ 770 if (!impl()) 771 return; 772 773 impl()->voidMethod(); 774} 775 776void WebDOMTestObj::voidMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg) 777{ 778 if (!impl()) 779 return; 780 781 impl()->voidMethodWithArgs(longArg, strArg, toWebCore(objArg)); 782} 783 784char WebDOMTestObj::byteMethod() 785{ 786 if (!impl()) 787 return char(); 788 789 return impl()->byteMethod(); 790} 791 792char WebDOMTestObj::byteMethodWithArgs(char byteArg, const WebDOMString& strArg, const WebDOMTestObj& objArg) 793{ 794 if (!impl()) 795 return char(); 796 797 return impl()->byteMethodWithArgs(byteArg, strArg, toWebCore(objArg)); 798} 799 800unsigned char WebDOMTestObj::octetMethod() 801{ 802 if (!impl()) 803 return unsigned char(); 804 805 return impl()->octetMethod(); 806} 807 808unsigned char WebDOMTestObj::octetMethodWithArgs(unsigned char octetArg, const WebDOMString& strArg, const WebDOMTestObj& objArg) 809{ 810 if (!impl()) 811 return unsigned char(); 812 813 return impl()->octetMethodWithArgs(octetArg, strArg, toWebCore(objArg)); 814} 815 816int WebDOMTestObj::longMethod() 817{ 818 if (!impl()) 819 return 0; 820 821 return impl()->longMethod(); 822} 823 824int WebDOMTestObj::longMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg) 825{ 826 if (!impl()) 827 return 0; 828 829 return impl()->longMethodWithArgs(longArg, strArg, toWebCore(objArg)); 830} 831 832WebDOMTestObj WebDOMTestObj::objMethod() 833{ 834 if (!impl()) 835 return WebDOMTestObj(); 836 837 return toWebKit(WTF::getPtr(impl()->objMethod())); 838} 839 840WebDOMTestObj WebDOMTestObj::objMethodWithArgs(int longArg, const WebDOMString& strArg, const WebDOMTestObj& objArg) 841{ 842 if (!impl()) 843 return WebDOMTestObj(); 844 845 return toWebKit(WTF::getPtr(impl()->objMethodWithArgs(longArg, strArg, toWebCore(objArg)))); 846} 847 848void WebDOMTestObj::methodWithEnumArg(const WebDOMTestEnumType& enumArg) 849{ 850 if (!impl()) 851 return; 852 853 impl()->methodWithEnumArg(toWebCore(enumArg)); 854} 855 856WebDOMTestObj WebDOMTestObj::methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg) 857{ 858 if (!impl()) 859 return WebDOMTestObj(); 860 861 WebCore::ExceptionCode ec = 0; 862 WebDOMTestObj result = toWebKit(WTF::getPtr(impl()->methodThatRequiresAllArgsAndThrows(strArg, toWebCore(objArg), ec))); 863 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 864 return result; 865} 866 867void WebDOMTestObj::serializedValue(const WebDOMString& serializedArg) 868{ 869 if (!impl()) 870 return; 871 872 impl()->serializedValue(WebCore::SerializedScriptValue::create(WTF::String(serializedArg))); 873} 874 875void WebDOMTestObj::optionsObject(const WebDOMDictionary& oo, const WebDOMDictionary& ooo) 876{ 877 if (!impl()) 878 return; 879 880 impl()->optionsObject(toWebCore(oo), toWebCore(ooo)); 881} 882 883void WebDOMTestObj::methodWithException() 884{ 885 if (!impl()) 886 return; 887 888 WebCore::ExceptionCode ec = 0; 889 impl()->methodWithException(ec); 890 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 891} 892 893void WebDOMTestObj::addEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture) 894{ 895 if (!impl()) 896 return; 897 898 impl()->addEventListener(type, toWebCore(listener), useCapture); 899} 900 901void WebDOMTestObj::removeEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture) 902{ 903 if (!impl()) 904 return; 905 906 impl()->removeEventListener(type, toWebCore(listener), useCapture); 907} 908 909void WebDOMTestObj::methodWithOptionalArg(int opt) 910{ 911 if (!impl()) 912 return; 913 914 impl()->methodWithOptionalArg(opt); 915} 916 917void WebDOMTestObj::methodWithNonOptionalArgAndOptionalArg(int nonOpt, int opt) 918{ 919 if (!impl()) 920 return; 921 922 impl()->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); 923} 924 925void WebDOMTestObj::methodWithNonOptionalArgAndTwoOptionalArgs(int nonOpt, int opt1, int opt2) 926{ 927 if (!impl()) 928 return; 929 930 impl()->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); 931} 932 933void WebDOMTestObj::methodWithOptionalString(const WebDOMString& str) 934{ 935 if (!impl()) 936 return; 937 938 impl()->methodWithOptionalString(str); 939} 940 941void WebDOMTestObj::methodWithOptionalStringIsUndefined(const WebDOMString& str) 942{ 943 if (!impl()) 944 return; 945 946 impl()->methodWithOptionalStringIsUndefined(str); 947} 948 949void WebDOMTestObj::methodWithOptionalStringIsNullString(const WebDOMString& str) 950{ 951 if (!impl()) 952 return; 953 954 impl()->methodWithOptionalStringIsNullString(str); 955} 956 957 958#if ENABLE(Condition1) 959WebDOMString WebDOMTestObj::conditionalMethod1() 960{ 961 if (!impl()) 962 return WebDOMString(); 963 964 return impl()->conditionalMethod1(); 965} 966 967#endif 968 969 970#if ENABLE(Condition1) && ENABLE(Condition2) 971void WebDOMTestObj::conditionalMethod2() 972{ 973 if (!impl()) 974 return; 975 976 impl()->conditionalMethod2(); 977} 978 979#endif 980 981 982#if ENABLE(Condition1) || ENABLE(Condition2) 983void WebDOMTestObj::conditionalMethod3() 984{ 985 if (!impl()) 986 return; 987 988 impl()->conditionalMethod3(); 989} 990 991#endif 992 993void WebDOMTestObj::classMethod() 994{ 995 if (!impl()) 996 return; 997 998 impl()->classMethod(); 999} 1000 1001int WebDOMTestObj::classMethodWithOptional(int arg) 1002{ 1003 if (!impl()) 1004 return 0; 1005 1006 return impl()->classMethodWithOptional(arg); 1007} 1008 1009 1010#if ENABLE(Condition1) 1011void WebDOMTestObj::overloadedMethod1(int arg) 1012{ 1013 if (!impl()) 1014 return; 1015 1016 impl()->overloadedMethod1(arg); 1017} 1018 1019#endif 1020 1021 1022#if ENABLE(Condition1) 1023void WebDOMTestObj::overloadedMethod1(const WebDOMString& type) 1024{ 1025 if (!impl()) 1026 return; 1027 1028 impl()->overloadedMethod1(type); 1029} 1030 1031#endif 1032 1033void WebDOMTestObj::convert1(const WebDOMTestNode& value) 1034{ 1035 if (!impl()) 1036 return; 1037 1038 impl()->convert1(toWebCore(value)); 1039} 1040 1041void WebDOMTestObj::convert2(const WebDOMTestNode& value) 1042{ 1043 if (!impl()) 1044 return; 1045 1046 impl()->convert2(toWebCore(value)); 1047} 1048 1049void WebDOMTestObj::convert4(const WebDOMTestNode& value) 1050{ 1051 if (!impl()) 1052 return; 1053 1054 impl()->convert4(toWebCore(value)); 1055} 1056 1057void WebDOMTestObj::convert5(const WebDOMTestNode& value) 1058{ 1059 if (!impl()) 1060 return; 1061 1062 impl()->convert5(toWebCore(value)); 1063} 1064 1065WebDOMSVGPoint WebDOMTestObj::mutablePointFunction() 1066{ 1067 if (!impl()) 1068 return WebDOMSVGPoint(); 1069 1070 return toWebKit(WTF::getPtr(impl()->mutablePointFunction())); 1071} 1072 1073WebDOMSVGPoint WebDOMTestObj::immutablePointFunction() 1074{ 1075 if (!impl()) 1076 return WebDOMSVGPoint(); 1077 1078 return toWebKit(WTF::getPtr(impl()->immutablePointFunction())); 1079} 1080 1081void WebDOMTestObj::orange() 1082{ 1083 if (!impl()) 1084 return; 1085 1086 impl()->orange(); 1087} 1088 1089WebDOMbool WebDOMTestObj::strictFunction(const WebDOMString& str, float a, int b) 1090{ 1091 if (!impl()) 1092 return WebDOMbool(); 1093 1094 WebCore::ExceptionCode ec = 0; 1095 WebDOMbool result = toWebKit(WTF::getPtr(impl()->strictFunction(str, a, b, ec))); 1096 webDOMRaiseError(static_cast<WebDOMExceptionCode>(ec)); 1097 return result; 1098} 1099 1100void WebDOMTestObj::variadicStringMethod(const WebDOMString& head, const WebDOMString& tail) 1101{ 1102 if (!impl()) 1103 return; 1104 1105 impl()->variadicStringMethod(head, tail); 1106} 1107 1108void WebDOMTestObj::variadicDoubleMethod(double head, double tail) 1109{ 1110 if (!impl()) 1111 return; 1112 1113 impl()->variadicDoubleMethod(head, tail); 1114} 1115 1116void WebDOMTestObj::variadicNodeMethod(const WebDOMNode& head, const WebDOMNode& tail) 1117{ 1118 if (!impl()) 1119 return; 1120 1121 impl()->variadicNodeMethod(toWebCore(head), toWebCore(tail)); 1122} 1123 1124WebCore::TestObj* toWebCore(const WebDOMTestObj& wrapper) 1125{ 1126 return wrapper.impl(); 1127} 1128 1129WebDOMTestObj toWebKit(WebCore::TestObj* value) 1130{ 1131 return WebDOMTestObj(value); 1132} 1133