Changeset 64092 in webkit
- Timestamp:
- Jul 26, 2010 5:01:07 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 1 added
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r64042 r64092 1 2010-07-26 Dominic Mazzoni <dmazzoni@google.com> 2 3 Reviewed by Chris Fleizach. 4 5 Add accessor to get the doctype of a WebDocument, needed to 6 implement Windows accessibility. 7 8 https://bugs.webkit.org/show_bug.cgi?id=43003 9 10 * WebKit.gyp: 11 * public/WebDocument.h: 12 * public/WebDocumentType.h: Added. 13 (WebKit::WebDocumentType::WebDocumentType): 14 (WebKit::WebDocumentType::operator=): 15 (WebKit::WebDocumentType::assign): 16 * src/WebDocument.cpp: 17 (WebKit::WebDocument::doctype): 18 * src/WebDocumentType.cpp: Added. 19 (WebKit::WebDocumentType::name): 20 (WebKit::WebDocumentType::WebDocumentType): 21 (WebKit::WebDocumentType::operator=): 22 (WebKit::WebDocumentType::operator PassRefPtr<DocumentType>): 23 1 24 2010-07-26 Satish Sampath <satish@chromium.org> 2 25 -
trunk/WebKit/chromium/WebKit.gyp
r64042 r64092 145 145 'public/WebDevToolsMessageTransport.h', 146 146 'public/WebDocument.h', 147 'public/WebDocumentType.h', 147 148 'public/WebDragData.h', 148 149 'public/WebEditingAction.h', … … 376 377 'src/WebDevToolsFrontendImpl.h', 377 378 'src/WebDocument.cpp', 379 'src/WebDocumentType.cpp', 378 380 'src/WebDragData.cpp', 379 381 'src/WebElement.cpp', -
trunk/WebKit/chromium/public/WebDocument.h
r60377 r64092 35 35 36 36 #if WEBKIT_IMPLEMENTATION 37 namespace WebCore { class Document; } 37 namespace WebCore { 38 class Document; 39 class DocumentType; 40 } 38 41 namespace WTF { template <typename T> class PassRefPtr; } 39 42 #endif 40 43 41 44 namespace WebKit { 45 class WebDocumentType; 42 46 class WebElement; 43 47 class WebFrame; … … 75 79 WEBKIT_API WebElement getElementById(const WebString&) const; 76 80 WEBKIT_API WebNode focusedNode() const; 81 WEBKIT_API WebDocumentType doctype() const; 77 82 78 83 #if WEBKIT_IMPLEMENTATION -
trunk/WebKit/chromium/public/WebDocumentType.h
r64088 r64092 1 1 /* 2 * Copyright (C) 20 09Google Inc. All rights reserved.2 * Copyright (C) 2010 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 */ 30 30 31 #ifndef WebDocument _h32 #define WebDocument _h31 #ifndef WebDocumentType_h 32 #define WebDocumentType_h 33 33 34 34 #include "WebNode.h" 35 35 36 36 #if WEBKIT_IMPLEMENTATION 37 namespace WebCore { class Document ; }37 namespace WebCore { class DocumentType; } 38 38 namespace WTF { template <typename T> class PassRefPtr; } 39 39 #endif 40 40 41 41 namespace WebKit { 42 class WebElement;43 class WebFrame;44 class WebNodeCollection;45 class WebNodeList;46 42 class WebString; 47 class WebURL;48 43 49 // Provides readonly access to some properties of a DOM document .50 class WebDocument : public WebNode {44 // Provides readonly access to some properties of a DOM document type. 45 class WebDocumentType : public WebNode { 51 46 public: 52 WebDocument () { }53 WebDocument (const WebDocument& e) : WebNode(e) { }47 WebDocumentType() { } 48 WebDocumentType(const WebDocumentType& e) : WebNode(e) { } 54 49 55 WebDocument & operator=(const WebDocument& e)50 WebDocumentType& operator=(const WebDocumentType& e) 56 51 { 57 52 WebNode::assign(e); 58 53 return *this; 59 54 } 60 void assign(const WebDocument & e) { WebNode::assign(e); }55 void assign(const WebDocumentType& e) { WebNode::assign(e); } 61 56 62 // Returns the frame the document belongs to or 0 if the document is frameless. 63 WEBKIT_API WebFrame* frame() const; 64 WEBKIT_API bool isHTMLDocument() const; 65 WEBKIT_API bool isXHTMLDocument() const; 66 WEBKIT_API bool isPluginDocument() const; 67 WEBKIT_API WebURL baseURL() const; 68 WEBKIT_API WebURL firstPartyForCookies() const; 69 WEBKIT_API WebElement documentElement() const; 70 WEBKIT_API WebElement body() const; 71 WEBKIT_API WebElement head(); 72 WEBKIT_API WebString title() const; 73 WEBKIT_API WebNodeCollection all(); 74 WEBKIT_API WebURL completeURL(const WebString&) const; 75 WEBKIT_API WebElement getElementById(const WebString&) const; 76 WEBKIT_API WebNode focusedNode() const; 57 WEBKIT_API WebString name() const; 77 58 78 59 #if WEBKIT_IMPLEMENTATION 79 WebDocument (const WTF::PassRefPtr<WebCore::Document>&);80 WebDocument & operator=(const WTF::PassRefPtr<WebCore::Document>&);81 operator WTF::PassRefPtr<WebCore::Document >() const;60 WebDocumentType(const WTF::PassRefPtr<WebCore::DocumentType>&); 61 WebDocumentType& operator=(const WTF::PassRefPtr<WebCore::DocumentType>&); 62 operator WTF::PassRefPtr<WebCore::DocumentType>() const; 82 63 #endif 83 64 }; -
trunk/WebKit/chromium/src/WebDocument.cpp
r60377 r64092 33 33 34 34 #include "Document.h" 35 #include "DocumentType.h" 35 36 #include "Element.h" 36 37 #include "HTMLAllCollection.h" … … 41 42 #include "NodeList.h" 42 43 44 #include "WebDocumentType.h" 43 45 #include "WebElement.h" 44 46 #include "WebFrameImpl.h" … … 123 125 } 124 126 127 WebDocumentType WebDocument::doctype() const 128 { 129 return WebDocumentType(constUnwrap<Document>()->doctype()); 130 } 131 125 132 WebDocument::WebDocument(const PassRefPtr<Document>& elem) 126 133 : WebNode(elem)
Note: See TracChangeset
for help on using the changeset viewer.