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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1980133002: Implement pointer lock API for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing one more override Created 4 years, 7 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 5298 matching lines...) Expand 10 before | Expand all | Expand 10 after
5309 return toHTMLDialogElement(m_topLayerElements.last().get()); 5309 return toHTMLDialogElement(m_topLayerElements.last().get());
5310 } 5310 }
5311 5311
5312 void Document::exitPointerLock() 5312 void Document::exitPointerLock()
5313 { 5313 {
5314 if (!page()) 5314 if (!page())
5315 return; 5315 return;
5316 if (Element* target = page()->pointerLockController().element()) { 5316 if (Element* target = page()->pointerLockController().element()) {
5317 if (target->document() != this) 5317 if (target->document() != this)
5318 return; 5318 return;
5319 page()->pointerLockController().requestPointerUnlock();
5319 } 5320 }
5320 page()->pointerLockController().requestPointerUnlock();
5321 } 5321 }
5322 5322
5323 Element* Document::pointerLockElement() const 5323 Element* Document::pointerLockElement() const
5324 { 5324 {
5325 if (!page() || page()->pointerLockController().lockPending()) 5325 if (!page() || page()->pointerLockController().lockPending())
5326 return 0; 5326 return 0;
5327 if (Element* element = page()->pointerLockController().element()) { 5327 if (Element* element = page()->pointerLockController().element()) {
5328 if (element->document() == this) 5328 if (element->document() == this)
5329 return element; 5329 return element;
5330 } 5330 }
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
6012 #ifndef NDEBUG 6012 #ifndef NDEBUG
6013 using namespace blink; 6013 using namespace blink;
6014 void showLiveDocumentInstances() 6014 void showLiveDocumentInstances()
6015 { 6015 {
6016 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6016 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6017 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6017 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6018 for (Document* document : set) 6018 for (Document* document : set)
6019 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6019 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6020 } 6020 }
6021 #endif 6021 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698