| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 196 } |
| 197 | 197 |
| 198 WebDocumentType WebDocument::doctype() const | 198 WebDocumentType WebDocument::doctype() const |
| 199 { | 199 { |
| 200 return WebDocumentType(constUnwrap<Document>()->doctype()); | 200 return WebDocumentType(constUnwrap<Document>()->doctype()); |
| 201 } | 201 } |
| 202 | 202 |
| 203 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev
el styleLevel) | 203 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev
el styleLevel) |
| 204 { | 204 { |
| 205 RefPtr<Document> document = unwrap<Document>(); | 205 RefPtr<Document> document = unwrap<Document>(); |
| 206 | 206 ASSERT(document); |
| 207 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document
.get()); | 207 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*documen
t.get()); |
| 208 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel); | 208 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel); |
| 209 parsedSheet->parseString(sourceCode); | 209 parsedSheet->parseString(sourceCode); |
| 210 if (parsedSheet->isUserStyleSheet()) | 210 if (parsedSheet->isUserStyleSheet()) |
| 211 document->styleSheetCollections()->addUserSheet(parsedSheet); | 211 document->styleSheetCollections()->addUserSheet(parsedSheet); |
| 212 else | 212 else |
| 213 document->styleSheetCollections()->addAuthorSheet(parsedSheet); | 213 document->styleSheetCollections()->addAuthorSheet(parsedSheet); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void WebDocument::cancelFullScreen() | 216 void WebDocument::cancelFullScreen() |
| 217 { | 217 { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 m_private = elem; | 302 m_private = elem; |
| 303 return *this; | 303 return *this; |
| 304 } | 304 } |
| 305 | 305 |
| 306 WebDocument::operator PassRefPtr<Document>() const | 306 WebDocument::operator PassRefPtr<Document>() const |
| 307 { | 307 { |
| 308 return toDocument(m_private.get()); | 308 return toDocument(m_private.get()); |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace WebKit | 311 } // namespace WebKit |
| OLD | NEW |