Chromium Code Reviews

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEventManager.cpp

Issue 1665763002: Use std::isnan instead of isnan in global ns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/events/PointerEventManager.h" 5 #include "core/events/PointerEventManager.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 namespace { 9 namespace {
10 10
(...skipping 23 matching lines...)
34 const PointerEventManager::MappedId PointerEventManager::s_mouseId = 1; 34 const PointerEventManager::MappedId PointerEventManager::s_mouseId = 1;
35 35
36 EventTarget* PointerEventManager::getCapturingNode(PassRefPtrWillBeRawPtr<Pointe rEvent> pointerEvent) 36 EventTarget* PointerEventManager::getCapturingNode(PassRefPtrWillBeRawPtr<Pointe rEvent> pointerEvent)
37 { 37 {
38 // TODO(nzolghadr): Add APIs to set the capturing nodes and return the corre ct node here 38 // TODO(nzolghadr): Add APIs to set the capturing nodes and return the corre ct node here
39 return nullptr; 39 return nullptr;
40 } 40 }
41 41
42 float getPointerEventPressure(float force, int buttons) 42 float getPointerEventPressure(float force, int buttons)
43 { 43 {
44 if (isnan(force)) 44 if (std::isnan(force))
45 return buttons ? 0.5 : 0; 45 return buttons ? 0.5 : 0;
46 return force; 46 return force;
47 } 47 }
48 48
49 void PointerEventManager::setIdAndType(PointerEventInit &pointerEventInit, 49 void PointerEventManager::setIdAndType(PointerEventInit &pointerEventInit,
50 const WebPointerProperties &pointerProperties) 50 const WebPointerProperties &pointerProperties)
51 { 51 {
52 const WebPointerProperties::PointerType pointerType = pointerProperties.poin terType; 52 const WebPointerProperties::PointerType pointerType = pointerProperties.poin terType;
53 MappedId pointerId = add(PointerEventManager::IncomingId(toInt(pointerType), pointerProperties.id)); 53 MappedId pointerId = add(PointerEventManager::IncomingId(toInt(pointerType), pointerProperties.id));
54 pointerEventInit.setPointerId(pointerId); 54 pointerEventInit.setPointerId(pointerId);
(...skipping 151 matching lines...)
206 if (!m_idReverseMapping.contains(mappedId)) 206 if (!m_idReverseMapping.contains(mappedId))
207 return false; 207 return false;
208 208
209 IncomingId p = m_idReverseMapping.get(mappedId); 209 IncomingId p = m_idReverseMapping.get(mappedId);
210 int type = p.first; 210 int type = p.first;
211 return m_primaryId[type] == mappedId; 211 return m_primaryId[type] == mappedId;
212 } 212 }
213 213
214 214
215 } // namespace blink 215 } // namespace blink
OLDNEW
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine