Chromium Code Reviews| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 | 201 |
| 202 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document .get()); | 202 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document .get()); |
| 203 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel); | 203 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel); |
| 204 parsedSheet->parseString(sourceCode); | 204 parsedSheet->parseString(sourceCode); |
| 205 if (parsedSheet->isUserStyleSheet()) | 205 if (parsedSheet->isUserStyleSheet()) |
| 206 document->styleSheetCollection()->addUserSheet(parsedSheet); | 206 document->styleSheetCollection()->addUserSheet(parsedSheet); |
| 207 else | 207 else |
| 208 document->styleSheetCollection()->addAuthorSheet(parsedSheet); | 208 document->styleSheetCollection()->addAuthorSheet(parsedSheet); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void WebDocument::watchCssSelectors(const WebVector<WebString>& selectors) | |
|
abarth-chromium
2013/07/12 23:44:11
selectors -> webSelectors
Jeffrey Yasskin
2013/07/16 00:38:51
Done.
| |
| 212 { | |
| 213 RefPtr<Document> document = unwrap<Document>(); | |
| 214 Vector<String> wtfSelectors; | |
|
abarth-chromium
2013/07/12 23:44:11
wtfSelectors -> selectors
Jeffrey Yasskin
2013/07/16 00:38:51
Done.
| |
| 215 wtfSelectors.append(selectors.data(), selectors.size()); | |
| 216 document->watchCssSelectors(wtfSelectors); | |
| 217 } | |
| 218 | |
| 211 void WebDocument::cancelFullScreen() | 219 void WebDocument::cancelFullScreen() |
| 212 { | 220 { |
| 213 if (FullscreenController* fullscreen = FullscreenController::fromIfExists(un wrap<Document>())) | 221 if (FullscreenController* fullscreen = FullscreenController::fromIfExists(un wrap<Document>())) |
| 214 fullscreen->webkitCancelFullScreen(); | 222 fullscreen->webkitCancelFullScreen(); |
| 215 } | 223 } |
| 216 | 224 |
| 217 WebElement WebDocument::fullScreenElement() const | 225 WebElement WebDocument::fullScreenElement() const |
| 218 { | 226 { |
| 219 Element* fullScreenElement = 0; | 227 Element* fullScreenElement = 0; |
| 220 if (FullscreenController* fullscreen = FullscreenController::fromIfExists(co nst_cast<WebDocument*>(this)->unwrap<Document>())) | 228 if (FullscreenController* fullscreen = FullscreenController::fromIfExists(co nst_cast<WebDocument*>(this)->unwrap<Document>())) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 m_private = elem; | 293 m_private = elem; |
| 286 return *this; | 294 return *this; |
| 287 } | 295 } |
| 288 | 296 |
| 289 WebDocument::operator PassRefPtr<Document>() const | 297 WebDocument::operator PassRefPtr<Document>() const |
| 290 { | 298 { |
| 291 return toDocument(m_private.get()); | 299 return toDocument(m_private.get()); |
| 292 } | 300 } |
| 293 | 301 |
| 294 } // namespace WebKit | 302 } // namespace WebKit |
| OLD | NEW |