| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 WebElement WebDocument::focusedElement() const | 207 WebElement WebDocument::focusedElement() const |
| 208 { | 208 { |
| 209 return WebElement(constUnwrap<Document>()->focusedElement()); | 209 return WebElement(constUnwrap<Document>()->focusedElement()); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void WebDocument::insertStyleSheet(const WebString& sourceCode) | 212 void WebDocument::insertStyleSheet(const WebString& sourceCode) |
| 213 { | 213 { |
| 214 RawPtr<Document> document = unwrap<Document>(); | 214 RawPtr<Document> document = unwrap<Document>(); |
| 215 ASSERT(document); | 215 DCHECK(document); |
| 216 RawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse
rContext(*document, 0)); | 216 RawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse
rContext(*document, 0)); |
| 217 parsedSheet->parseString(sourceCode); | 217 parsedSheet->parseString(sourceCode); |
| 218 document->styleEngine().injectAuthorSheet(parsedSheet); | 218 document->styleEngine().injectAuthorSheet(parsedSheet); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) | 221 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) |
| 222 { | 222 { |
| 223 RawPtr<Document> document = unwrap<Document>(); | 223 RawPtr<Document> document = unwrap<Document>(); |
| 224 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document); | 224 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document); |
| 225 if (!watch && webSelectors.isEmpty()) | 225 if (!watch && webSelectors.isEmpty()) |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 m_private = elem; | 340 m_private = elem; |
| 341 return *this; | 341 return *this; |
| 342 } | 342 } |
| 343 | 343 |
| 344 WebDocument::operator RawPtr<Document>() const | 344 WebDocument::operator RawPtr<Document>() const |
| 345 { | 345 { |
| 346 return toDocument(m_private.get()); | 346 return toDocument(m_private.get()); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |