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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 years, 10 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after
3708 int adjustedRadiusY = lroundf(point.radiusY() / scaleFactor); 3708 int adjustedRadiusY = lroundf(point.radiusY() / scaleFactor);
3709 3709
3710 RefPtr<Touch> touch = Touch::create(targetFrame, touchTarget.get(), poin t.id(), 3710 RefPtr<Touch> touch = Touch::create(targetFrame, touchTarget.get(), poin t.id(),
3711 point.screenPos().x(), point.screenP os().y(), 3711 point.screenPos().x(), point.screenP os().y(),
3712 adjustedPageX, adjustedPageY, 3712 adjustedPageX, adjustedPageY,
3713 adjustedRadiusX, adjustedRadiusY, 3713 adjustedRadiusX, adjustedRadiusY,
3714 point.rotationAngle(), point.force() ); 3714 point.rotationAngle(), point.force() );
3715 3715
3716 // Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below. 3716 // Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below.
3717 TargetTouchesMap::iterator targetTouchesIterator = touchesByTarget.find( touchTarget.get()); 3717 TargetTouchesMap::iterator targetTouchesIterator = touchesByTarget.find( touchTarget.get());
3718 if (targetTouchesIterator == touchesByTarget.end()) 3718 if (targetTouchesIterator == touchesByTarget.end()) {
3719 targetTouchesIterator = touchesByTarget.set(touchTarget.get(), Touch List::create()).iterator; 3719 touchesByTarget.set(touchTarget.get(), TouchList::create());
3720 targetTouchesIterator = touchesByTarget.find(touchTarget.get());
3721 }
3720 3722
3721 // touches and targetTouches should only contain information about touch es still on the screen, so if this point is 3723 // touches and targetTouches should only contain information about touch es still on the screen, so if this point is
3722 // released or cancelled it will only appear in the changedTouches list. 3724 // released or cancelled it will only appear in the changedTouches list.
3723 if (pointState != PlatformTouchPoint::TouchReleased && pointState != Pla tformTouchPoint::TouchCancelled) { 3725 if (pointState != PlatformTouchPoint::TouchReleased && pointState != Pla tformTouchPoint::TouchCancelled) {
3724 touches->append(touch); 3726 touches->append(touch);
3725 targetTouchesIterator->value->append(touch); 3727 targetTouchesIterator->value->append(touch);
3726 } 3728 }
3727 3729
3728 // Now build up the correct list for changedTouches. 3730 // Now build up the correct list for changedTouches.
3729 // Note that any touches that are in the TouchStationary state (e.g. if 3731 // Note that any touches that are in the TouchStationary state (e.g. if
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4014 unsigned EventHandler::accessKeyModifiers() 4016 unsigned EventHandler::accessKeyModifiers()
4015 { 4017 {
4016 #if OS(MACOSX) 4018 #if OS(MACOSX)
4017 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4019 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4018 #else 4020 #else
4019 return PlatformEvent::AltKey; 4021 return PlatformEvent::AltKey;
4020 #endif 4022 #endif
4021 } 4023 }
4022 4024
4023 } // namespace WebCore 4025 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/TraceEventDispatcher.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698