Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1150)

Side by Side Diff: Source/web/WebDocument.cpp

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Omit split CLs Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698