| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 WebElement WebDocument::focusedElement() const { | 181 WebElement WebDocument::focusedElement() const { |
| 182 return WebElement(constUnwrap<Document>()->focusedElement()); | 182 return WebElement(constUnwrap<Document>()->focusedElement()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void WebDocument::insertStyleSheet(const WebString& sourceCode) { | 185 void WebDocument::insertStyleSheet(const WebString& sourceCode) { |
| 186 Document* document = unwrap<Document>(); | 186 Document* document = unwrap<Document>(); |
| 187 DCHECK(document); | 187 DCHECK(document); |
| 188 StyleSheetContents* parsedSheet = | 188 StyleSheetContents* parsedSheet = |
| 189 StyleSheetContents::create(CSSParserContext(*document, nullptr)); | 189 StyleSheetContents::create(CSSParserContext::create(*document)); |
| 190 parsedSheet->parseString(sourceCode); | 190 parsedSheet->parseString(sourceCode); |
| 191 document->styleEngine().injectAuthorSheet(parsedSheet); | 191 document->styleEngine().injectAuthorSheet(parsedSheet); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) { | 194 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) { |
| 195 Document* document = unwrap<Document>(); | 195 Document* document = unwrap<Document>(); |
| 196 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document); | 196 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document); |
| 197 if (!watch && webSelectors.isEmpty()) | 197 if (!watch && webSelectors.isEmpty()) |
| 198 return; | 198 return; |
| 199 Vector<String> selectors; | 199 Vector<String> selectors; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 WebDocument& WebDocument::operator=(Document* elem) { | 296 WebDocument& WebDocument::operator=(Document* elem) { |
| 297 m_private = elem; | 297 m_private = elem; |
| 298 return *this; | 298 return *this; |
| 299 } | 299 } |
| 300 | 300 |
| 301 WebDocument::operator Document*() const { | 301 WebDocument::operator Document*() const { |
| 302 return toDocument(m_private.get()); | 302 return toDocument(m_private.get()); |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace blink | 305 } // namespace blink |
| OLD | NEW |