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

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

Issue 2352333002: Add more use counters for document.createTouch (Closed)
Patch Set: back out Touch changes Created 4 years, 2 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 5503 matching lines...) Expand 10 before | Expand all | Expand 10 after
5514 screenY = 0; 5514 screenY = 0;
5515 if (!std::isfinite(radiusX)) 5515 if (!std::isfinite(radiusX))
5516 radiusX = 0; 5516 radiusX = 0;
5517 if (!std::isfinite(radiusY)) 5517 if (!std::isfinite(radiusY))
5518 radiusY = 0; 5518 radiusY = 0;
5519 if (!std::isfinite(rotationAngle)) 5519 if (!std::isfinite(rotationAngle))
5520 rotationAngle = 0; 5520 rotationAngle = 0;
5521 if (!std::isfinite(force)) 5521 if (!std::isfinite(force))
5522 force = 0; 5522 force = 0;
5523 5523
5524 if (radiusX || radiusY || rotationAngle || force)
5525 UseCounter::count(*this, UseCounter::DocumentCreateTouchMoreThanSevenArg uments);
5526
5524 // FIXME: It's not clear from the documentation at 5527 // FIXME: It's not clear from the documentation at
5525 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html 5528 // http://developer.apple.com/library/safari/#documentation/UserExperience/R eference/DocumentAdditionsReference/DocumentAdditions/DocumentAdditions.html
5526 // when this method should throw and nor is it by inspection of iOS behavior . It would be nice to verify any cases where it throws under iOS 5529 // when this method should throw and nor is it by inspection of iOS behavior . It would be nice to verify any cases where it throws under iOS
5527 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9 5530 // and implement them here. See https://bugs.webkit.org/show_bug.cgi?id=4781 9
5528 LocalFrame* frame = window && window->isLocalDOMWindow() ? blink::toLocalDOM Window(window)->frame() : this->frame(); 5531 LocalFrame* frame = window && window->isLocalDOMWindow() ? blink::toLocalDOM Window(window)->frame() : this->frame();
5529 return Touch::create(frame, target, identifier, FloatPoint(screenX, screenY) , FloatPoint(pageX, pageY), FloatSize(radiusX, radiusY), rotationAngle, force, S tring()); 5532 return Touch::create(frame, target, identifier, FloatPoint(screenX, screenY) , FloatPoint(pageX, pageY), FloatSize(radiusX, radiusY), rotationAngle, force, S tring());
5530 } 5533 }
5531 5534
5532 TouchList* Document::createTouchList(HeapVector<Member<Touch>>& touches) const 5535 TouchList* Document::createTouchList(HeapVector<Member<Touch>>& touches) const
5533 { 5536 {
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
6099 } 6102 }
6100 6103
6101 void showLiveDocumentInstances() 6104 void showLiveDocumentInstances()
6102 { 6105 {
6103 WeakDocumentSet& set = liveDocumentSet(); 6106 WeakDocumentSet& set = liveDocumentSet();
6104 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6107 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6105 for (Document* document : set) 6108 for (Document* document : set)
6106 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6109 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6107 } 6110 }
6108 #endif 6111 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698