Changeset 89052 in webkit


Ignore:
Timestamp:
Jun 16, 2011 11:39:48 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-06-16 Adam Barth <abarth@webkit.org>

Reviewed by Darin Fisher.

[Chromium] Prepare to move some APIs from WebFrame to WebDocument
https://bugs.webkit.org/show_bug.cgi?id=62781

This patch adds a WEBKIT_FRAME_TO_DOCUMENT_API_MOVE ifdef to prepare
for moving a number of Document-specific APIs from WebFrame to
WebDocument. This ifdef will allow us to move these APIs without
disrupting the consumers of the APIs (too much).

  • public/WebFrame.h:
  • src/WebFrameImpl.cpp:
  • src/WebFrameImpl.h:
Location:
trunk/Source/WebKit/chromium
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r89044 r89052  
     12011-06-16  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Chromium] Prepare to move some APIs from WebFrame to WebDocument
     6        https://bugs.webkit.org/show_bug.cgi?id=62781
     7
     8        This patch adds a WEBKIT_FRAME_TO_DOCUMENT_API_MOVE ifdef to prepare
     9        for moving a number of Document-specific APIs from WebFrame to
     10        WebDocument.  This ifdef will allow us to move these APIs without
     11        disrupting the consumers of the APIs (too much).
     12
     13        * public/WebFrame.h:
     14        * src/WebFrameImpl.cpp:
     15        * src/WebFrameImpl.h:
     16
    1172011-06-16  Sheriff Bot  <webkit.review.bot@gmail.com>
    218
  • trunk/Source/WebKit/chromium/public/WebFrame.h

    r88844 r89052  
    129129    virtual long long identifier() const = 0;
    130130
     131#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    131132    // The url of the document loaded in this frame.
    132133    virtual WebURL url() const = 0;
     134#endif
    133135
    134136    // The urls of the given combination types of favicon (if any) specified by
     
    138140    virtual WebVector<WebIconURL> iconURLs(int iconTypes) const = 0;
    139141
     142#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    140143    // The url of the OpenSearch Desription Document (if any) specified by
    141144    // the document loaded in this frame.
     
    144147    // Return the frame's encoding.
    145148    virtual WebString encoding() const = 0;
     149#endif
    146150
    147151
     
    216220    virtual WebDocument document() const = 0;
    217221
     222#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    218223    virtual void forms(WebVector<WebFormElement>&) const = 0;
     224#endif
    219225
    220226    virtual WebAnimationController* animationController() = 0;
     
    225231    // Scripting ----------------------------------------------------------
    226232
     233#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    227234    // Returns the security origin of the current document.
    228235    virtual WebSecurityOrigin securityOrigin() const = 0;
     
    232239    // revoked when a new document is loaded into this frame.
    233240    virtual void grantUniversalAccess() = 0;
     241#endif
    234242
    235243    // Returns a NPObject corresponding to this frame's DOMWindow.
     
    290298    // Styling -------------------------------------------------------------
    291299
     300#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    292301    // Insert the given text as a STYLE element at the beginning of the
    293302    // document. |elementId| can be empty, but if specified then it is used
     
    296305    virtual bool insertStyleText(const WebString& styleText,
    297306                                 const WebString& elementId) = 0;
     307#endif
    298308
    299309
     
    566576    // Utility -------------------------------------------------------------
    567577
     578#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    568579    // Returns the contents of this frame as a string.  If the text is
    569580    // longer than maxChars, it will be clipped to that length.  WARNING:
     
    579590    // from the DOM.
    580591    virtual WebString contentAsMarkup() const = 0;
     592#endif
    581593
    582594    // Returns a text representation of the render tree.  This method is used
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp

    r88844 r89052  
    519519}
    520520
     521#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    521522WebURL WebFrameImpl::url() const
    522523{
    523524    return m_frame->document()->url();
    524525}
     526#endif
    525527
    526528WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypes) const
     
    534536}
    535537
     538#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    536539WebURL WebFrameImpl::openSearchDescriptionURL() const
    537540{
     
    560563    return frame()->document()->loader()->writer()->encoding();
    561564}
     565#endif
    562566
    563567WebSize WebFrameImpl::scrollOffset() const
     
    703707}
    704708
     709#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    705710void WebFrameImpl::forms(WebVector<WebFormElement>& results) const
    706711{
     
    720725    results.assign(temp);
    721726}
     727#endif
    722728
    723729WebAnimationController* WebFrameImpl::animationController()
     
    734740}
    735741
     742#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    736743WebSecurityOrigin WebFrameImpl::securityOrigin() const
    737744{
     
    748755        m_frame->document()->securityOrigin()->grantUniversalAccess();
    749756}
     757#endif
    750758
    751759NPObject* WebFrameImpl::windowObject() const
     
    878886#endif
    879887
     888#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    880889bool WebFrameImpl::insertStyleText(
    881890    const WebString& css, const WebString& id) {
     
    910919    return success;
    911920}
     921#endif
    912922
    913923void WebFrameImpl::reload(bool ignoreCache)
     
    18071817}
    18081818
     1819#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    18091820WebString WebFrameImpl::contentAsText(size_t maxChars) const
    18101821{
     
    18211832    return createFullMarkup(m_frame->document());
    18221833}
     1834#endif
    18231835
    18241836WebString WebFrameImpl::renderTreeAsText(bool showDebugInfo) const
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.h

    r88105 r89052  
    7070    virtual void setName(const WebString&);
    7171    virtual long long identifier() const;
     72#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    7273    virtual WebURL url() const;
     74#endif
    7375    virtual WebVector<WebIconURL> iconURLs(int iconTypes) const;
     76#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    7477    virtual WebURL openSearchDescriptionURL() const;
    7578    virtual WebString encoding() const;
     79#endif
    7680    virtual WebSize scrollOffset() const;
    7781    virtual void setScrollOffset(const WebSize&);
     
    9498    virtual WebFrame* findChildByExpression(const WebString&) const;
    9599    virtual WebDocument document() const;
     100#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    96101    virtual void forms(WebVector<WebFormElement>&) const;
     102#endif
    97103    virtual WebAnimationController* animationController();
    98104    virtual WebPerformance performance() const;
     105#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    99106    virtual WebSecurityOrigin securityOrigin() const;
    100107    virtual void grantUniversalAccess();
     108#endif
    101109    virtual NPObject* windowObject() const;
    102110    virtual void bindToWindowObject(const WebString& name, NPObject*);
     
    121129                                                  bool isDirectory);
    122130#endif
     131#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    123132    virtual bool insertStyleText(const WebString& css, const WebString& id);
     133#endif
    124134    virtual void reload(bool ignoreCache);
    125135    virtual void loadRequest(const WebURLRequest&);
     
    196206        const WebInputElement&);
    197207
     208#if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE)
    198209    virtual WebString contentAsText(size_t maxChars) const;
    199210    virtual WebString contentAsMarkup() const;
     211#endif
    200212    virtual WebString renderTreeAsText(bool showDebugInfo = false) const;
    201213    virtual WebString counterValueForElementById(const WebString& id) const;
Note: See TracChangeset for help on using the changeset viewer.