Changeset 29913 in webkit


Ignore:
Timestamp:
Feb 1, 2008 1:35:00 AM (16 years ago)
Author:
eric@webkit.org
Message:

Reviewed by Oliver.

Add getSVGDocument to frame and iframe.

Test: svg/custom/frame-getSVGDocument.html

  • html/HTMLEmbedElement.cpp:
  • html/HTMLEmbedElement.h:
  • html/HTMLFrameElement.idl:
  • html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::getSVGDocument):
  • html/HTMLFrameOwnerElement.h:
  • html/HTMLIFrameElement.idl:
  • html/HTMLObjectElement.cpp:
  • html/HTMLObjectElement.h:
Location:
trunk
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r29905 r29913  
     12008-02-01  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Oliver.
     4
     5        Add test for getSVGDocument() on object, embed, frame and iframe.
     6
     7        * svg/custom/frame-getSVGDocument.html: Added.
     8        * svg/custom/frame-getSVGDocument-expected.txt: Added.
     9        * svg/custom/resources/TEMPLATE.html: Added.
     10
    1112008-01-31  Kevin McCullough  <kmccullough@apple.com>
    212
  • trunk/WebCore/ChangeLog

    r29910 r29913  
     12008-02-01  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Oliver.
     4
     5        Add getSVGDocument to frame and iframe.
     6
     7        Test: svg/custom/frame-getSVGDocument.html
     8
     9        * html/HTMLEmbedElement.cpp:
     10        * html/HTMLEmbedElement.h:
     11        * html/HTMLFrameElement.idl:
     12        * html/HTMLFrameOwnerElement.cpp:
     13        (WebCore::HTMLFrameOwnerElement::getSVGDocument):
     14        * html/HTMLFrameOwnerElement.h:
     15        * html/HTMLIFrameElement.idl:
     16        * html/HTMLObjectElement.cpp:
     17        * html/HTMLObjectElement.h:
     18
    1192008-01-30  Eric Seidel  <eric@webkit.org>
    220
  • trunk/WebCore/html/HTMLEmbedElement.cpp

    r27982 r29913  
    3434#include "HTMLNames.h"
    3535#include "RenderPartObject.h"
    36 
    37 #if ENABLE(SVG)
    38 #include "ExceptionCode.h"
    39 #include "SVGDocument.h"
    40 #endif
    4136
    4237namespace WebCore {
     
    246241}
    247242
    248 #if ENABLE(SVG)
    249 SVGDocument* HTMLEmbedElement::getSVGDocument(ExceptionCode& ec) const
    250 {
    251     Document* doc = contentDocument();
    252     if (doc && doc->isSVGDocument())
    253         return static_cast<SVGDocument*>(doc);
    254     // Spec: http://www.w3.org/TR/SVG/struct.html#InterfaceGetSVGDocument
    255     ec = NOT_SUPPORTED_ERR;
    256     return 0;
    257 }
    258 #endif
    259 
    260 }
     243}
  • trunk/WebCore/html/HTMLEmbedElement.h

    r27982 r29913  
    3434namespace WebCore {
    3535
    36 class SVGDocument;
    37 
    3836class HTMLEmbedElement : public HTMLPlugInElement {
    3937public:
     
    6967    String type() const;
    7068    void setType(const String&);
    71    
    72 #if ENABLE(SVG)
    73     SVGDocument* getSVGDocument(ExceptionCode&) const;
    74 #endif
    7569
    7670    DeprecatedString url;
  • trunk/WebCore/html/HTMLFrameElement.idl

    r29672 r29913  
    4242        // Extensions
    4343        readonly attribute DOMWindow contentWindow;
     44
     45#if ENABLE_SVG
     46        [SVGCheckSecurityDocument] SVGDocument getSVGDocument()
     47            raises(DOMException);
     48#endif
    4449#endif
    4550
  • trunk/WebCore/html/HTMLFrameOwnerElement.cpp

    r27125 r29913  
    2525#include "Frame.h"
    2626#include "FrameLoader.h"
     27
     28#if ENABLE(SVG)
     29#include "ExceptionCode.h"
     30#include "SVGDocument.h"
     31#endif
    2732
    2833namespace WebCore {
     
    6166}
    6267
     68#if ENABLE(SVG)
     69SVGDocument* HTMLFrameOwnerElement::getSVGDocument(ExceptionCode& ec) const
     70{
     71    Document* doc = contentDocument();
     72    if (doc && doc->isSVGDocument())
     73        return static_cast<SVGDocument*>(doc);
     74    // Spec: http://www.w3.org/TR/SVG/struct.html#InterfaceGetSVGDocument
     75    ec = NOT_SUPPORTED_ERR;
     76    return 0;
     77}
     78#endif
     79
    6380} // namespace WebCore
  • trunk/WebCore/html/HTMLFrameOwnerElement.h

    r29722 r29913  
    3030class KeyboardEvent;
    3131
     32#if ENABLE(SVG)
     33class SVGDocument;
     34#endif
     35
    3236class HTMLFrameOwnerElement : public HTMLElement {
    3337protected:
     
    5155    virtual ScrollbarMode scrollingMode() const { return ScrollbarAuto; }
    5256
     57#if ENABLE(SVG)
     58    SVGDocument* getSVGDocument(ExceptionCode&) const;
     59#endif
     60
    5361private:
    5462    friend class Frame;
  • trunk/WebCore/html/HTMLIFrameElement.idl

    r29672 r29913  
    4444        // Extensions
    4545        readonly attribute DOMWindow contentWindow;
     46
     47#if ENABLE_SVG
     48        [SVGCheckSecurityDocument] SVGDocument getSVGDocument()
     49            raises(DOMException);
     50#endif
    4651#endif
    4752
  • trunk/WebCore/html/HTMLObjectElement.cpp

    r27982 r29913  
    4343#include "Text.h"
    4444
    45 #if ENABLE(SVG)
    46 #include "SVGDocument.h"
    47 #endif
    48 
    4945namespace WebCore {
    5046
     
    492488}
    493489
    494 #if ENABLE(SVG)
    495 SVGDocument* HTMLObjectElement::getSVGDocument(ExceptionCode& ec) const
    496 {
    497     Document* doc = contentDocument();
    498     if (doc && doc->isSVGDocument())
    499         return static_cast<SVGDocument*>(doc);
    500     // Spec: http://www.w3.org/TR/SVG/struct.html#InterfaceGetSVGDocument
    501     ec = NOT_SUPPORTED_ERR;
    502     return 0;
    503 }
    504 #endif
    505 
    506 }
     490}
  • trunk/WebCore/html/HTMLObjectElement.h

    r27982 r29913  
    3030
    3131class HTMLImageLoader;
    32 
    33 #if ENABLE(SVG)
    34 class SVGDocument;
    35 #endif
    3632
    3733class HTMLObjectElement : public HTMLPlugInElement {
     
    114110    bool containsJavaApplet() const;
    115111
    116 #if ENABLE(SVG)
    117     SVGDocument* getSVGDocument(ExceptionCode&) const;
    118 #endif
    119 
    120112    String m_serviceType;
    121113    String m_url;
  • trunk/WebKitTools/ChangeLog

    r29899 r29913  
     12008-02-01  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Oliver.
     4
     5        Also search LayoutTests/svg for js-based tests.
     6
     7        * Scripts/make-js-test-wrappers:
     8
    192008-01-31  Alp Toker  <alp@atoker.com>
    210
  • trunk/WebKitTools/Scripts/make-js-test-wrappers

    r28848 r29913  
    4141chdirWebKit();
    4242
    43 my @templates = `find LayoutTests/fast -name "TEMPLATE.html"`;
     43my @templates = `find LayoutTests/fast LayoutTests/svg -name "TEMPLATE.html"`;
    4444
    4545for my $tfile (@templates) {
Note: See TracChangeset for help on using the changeset viewer.