| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 WebNode WebDocument::focusedNode() const | 199 WebNode WebDocument::focusedNode() const |
| 200 { | 200 { |
| 201 return WebNode(constUnwrap<Document>()->focusedElement()); | 201 return WebNode(constUnwrap<Document>()->focusedElement()); |
| 202 } | 202 } |
| 203 | 203 |
| 204 WebDocumentType WebDocument::doctype() const | 204 WebDocumentType WebDocument::doctype() const |
| 205 { | 205 { |
| 206 return WebDocumentType(constUnwrap<Document>()->doctype()); | 206 return WebDocumentType(constUnwrap<Document>()->doctype()); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev
el) | |
| 210 { | |
| 211 insertStyleSheet(sourceCode); | |
| 212 } | |
| 213 | |
| 214 void WebDocument::insertStyleSheet(const WebString& sourceCode) | 209 void WebDocument::insertStyleSheet(const WebString& sourceCode) |
| 215 { | 210 { |
| 216 RefPtr<Document> document = unwrap<Document>(); | 211 RefPtr<Document> document = unwrap<Document>(); |
| 217 ASSERT(document); | 212 ASSERT(document); |
| 218 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse
rContext(*document.get(), 0)); | 213 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse
rContext(*document.get(), 0)); |
| 219 parsedSheet->parseString(sourceCode); | 214 parsedSheet->parseString(sourceCode); |
| 220 document->styleEngine()->addAuthorSheet(parsedSheet); | 215 document->styleEngine()->addAuthorSheet(parsedSheet); |
| 221 } | 216 } |
| 222 | 217 |
| 223 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) | 218 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 m_private = elem; | 310 m_private = elem; |
| 316 return *this; | 311 return *this; |
| 317 } | 312 } |
| 318 | 313 |
| 319 WebDocument::operator PassRefPtr<Document>() const | 314 WebDocument::operator PassRefPtr<Document>() const |
| 320 { | 315 { |
| 321 return toDocument(m_private.get()); | 316 return toDocument(m_private.get()); |
| 322 } | 317 } |
| 323 | 318 |
| 324 } // namespace blink | 319 } // namespace blink |
| OLD | NEW |