Changeset 89052 in webkit
- Timestamp:
- Jun 16, 2011 11:39:48 AM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r89044 r89052 1 2011-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 1 17 2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> 2 18 -
trunk/Source/WebKit/chromium/public/WebFrame.h
r88844 r89052 129 129 virtual long long identifier() const = 0; 130 130 131 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 131 132 // The url of the document loaded in this frame. 132 133 virtual WebURL url() const = 0; 134 #endif 133 135 134 136 // The urls of the given combination types of favicon (if any) specified by … … 138 140 virtual WebVector<WebIconURL> iconURLs(int iconTypes) const = 0; 139 141 142 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 140 143 // The url of the OpenSearch Desription Document (if any) specified by 141 144 // the document loaded in this frame. … … 144 147 // Return the frame's encoding. 145 148 virtual WebString encoding() const = 0; 149 #endif 146 150 147 151 … … 216 220 virtual WebDocument document() const = 0; 217 221 222 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 218 223 virtual void forms(WebVector<WebFormElement>&) const = 0; 224 #endif 219 225 220 226 virtual WebAnimationController* animationController() = 0; … … 225 231 // Scripting ---------------------------------------------------------- 226 232 233 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 227 234 // Returns the security origin of the current document. 228 235 virtual WebSecurityOrigin securityOrigin() const = 0; … … 232 239 // revoked when a new document is loaded into this frame. 233 240 virtual void grantUniversalAccess() = 0; 241 #endif 234 242 235 243 // Returns a NPObject corresponding to this frame's DOMWindow. … … 290 298 // Styling ------------------------------------------------------------- 291 299 300 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 292 301 // Insert the given text as a STYLE element at the beginning of the 293 302 // document. |elementId| can be empty, but if specified then it is used … … 296 305 virtual bool insertStyleText(const WebString& styleText, 297 306 const WebString& elementId) = 0; 307 #endif 298 308 299 309 … … 566 576 // Utility ------------------------------------------------------------- 567 577 578 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 568 579 // Returns the contents of this frame as a string. If the text is 569 580 // longer than maxChars, it will be clipped to that length. WARNING: … … 579 590 // from the DOM. 580 591 virtual WebString contentAsMarkup() const = 0; 592 #endif 581 593 582 594 // Returns a text representation of the render tree. This method is used -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r88844 r89052 519 519 } 520 520 521 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 521 522 WebURL WebFrameImpl::url() const 522 523 { 523 524 return m_frame->document()->url(); 524 525 } 526 #endif 525 527 526 528 WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypes) const … … 534 536 } 535 537 538 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 536 539 WebURL WebFrameImpl::openSearchDescriptionURL() const 537 540 { … … 560 563 return frame()->document()->loader()->writer()->encoding(); 561 564 } 565 #endif 562 566 563 567 WebSize WebFrameImpl::scrollOffset() const … … 703 707 } 704 708 709 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 705 710 void WebFrameImpl::forms(WebVector<WebFormElement>& results) const 706 711 { … … 720 725 results.assign(temp); 721 726 } 727 #endif 722 728 723 729 WebAnimationController* WebFrameImpl::animationController() … … 734 740 } 735 741 742 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 736 743 WebSecurityOrigin WebFrameImpl::securityOrigin() const 737 744 { … … 748 755 m_frame->document()->securityOrigin()->grantUniversalAccess(); 749 756 } 757 #endif 750 758 751 759 NPObject* WebFrameImpl::windowObject() const … … 878 886 #endif 879 887 888 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 880 889 bool WebFrameImpl::insertStyleText( 881 890 const WebString& css, const WebString& id) { … … 910 919 return success; 911 920 } 921 #endif 912 922 913 923 void WebFrameImpl::reload(bool ignoreCache) … … 1807 1817 } 1808 1818 1819 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 1809 1820 WebString WebFrameImpl::contentAsText(size_t maxChars) const 1810 1821 { … … 1821 1832 return createFullMarkup(m_frame->document()); 1822 1833 } 1834 #endif 1823 1835 1824 1836 WebString WebFrameImpl::renderTreeAsText(bool showDebugInfo) const -
trunk/Source/WebKit/chromium/src/WebFrameImpl.h
r88105 r89052 70 70 virtual void setName(const WebString&); 71 71 virtual long long identifier() const; 72 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 72 73 virtual WebURL url() const; 74 #endif 73 75 virtual WebVector<WebIconURL> iconURLs(int iconTypes) const; 76 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 74 77 virtual WebURL openSearchDescriptionURL() const; 75 78 virtual WebString encoding() const; 79 #endif 76 80 virtual WebSize scrollOffset() const; 77 81 virtual void setScrollOffset(const WebSize&); … … 94 98 virtual WebFrame* findChildByExpression(const WebString&) const; 95 99 virtual WebDocument document() const; 100 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 96 101 virtual void forms(WebVector<WebFormElement>&) const; 102 #endif 97 103 virtual WebAnimationController* animationController(); 98 104 virtual WebPerformance performance() const; 105 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 99 106 virtual WebSecurityOrigin securityOrigin() const; 100 107 virtual void grantUniversalAccess(); 108 #endif 101 109 virtual NPObject* windowObject() const; 102 110 virtual void bindToWindowObject(const WebString& name, NPObject*); … … 121 129 bool isDirectory); 122 130 #endif 131 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 123 132 virtual bool insertStyleText(const WebString& css, const WebString& id); 133 #endif 124 134 virtual void reload(bool ignoreCache); 125 135 virtual void loadRequest(const WebURLRequest&); … … 196 206 const WebInputElement&); 197 207 208 #if !defined(WEBKIT_FRAME_TO_DOCUMENT_API_MOVE) 198 209 virtual WebString contentAsText(size_t maxChars) const; 199 210 virtual WebString contentAsMarkup() const; 211 #endif 200 212 virtual WebString renderTreeAsText(bool showDebugInfo = false) const; 201 213 virtual WebString counterValueForElementById(const WebString& id) const;
Note: See TracChangeset
for help on using the changeset viewer.