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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase. Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); 1305 const TouchEventTargetSet* touchHandlers = document->touchEventTargets();
1306 if (!touchHandlers) 1306 if (!touchHandlers)
1307 return 0; 1307 return 0;
1308 1308
1309 unsigned count = 0; 1309 unsigned count = 0;
1310 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter) 1310 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter != touchHandlers->end(); ++iter)
1311 count += iter->value; 1311 count += iter->value;
1312 return count; 1312 return count;
1313 } 1313 }
1314 1314
1315 #if ENABLE(TOUCH_EVENT_TRACKING)
1316 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu ment, ExceptionCode& ec) 1315 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu ment, ExceptionCode& ec)
1317 { 1316 {
1318 if (!document || !document->view() || !document->page()) { 1317 if (!document || !document->view() || !document->page()) {
1319 ec = INVALID_ACCESS_ERR; 1318 ec = INVALID_ACCESS_ERR;
1320 return 0; 1319 return 0;
1321 } 1320 }
1322 if (!document->page()->scrollingCoordinator()) 1321 if (!document->page()->scrollingCoordinator())
1323 return ClientRectList::create(); 1322 return ClientRectList::create();
1324 1323
1325 document->updateLayoutIgnorePendingStylesheets(); 1324 document->updateLayoutIgnorePendingStylesheets();
1326 1325
1327 Vector<IntRect> absoluteRects; 1326 Vector<IntRect> absoluteRects;
1328 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec ts(document, absoluteRects); 1327 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec ts(document, absoluteRects);
1329 Vector<FloatQuad> absoluteQuads(absoluteRects.size()); 1328 Vector<FloatQuad> absoluteQuads(absoluteRects.size());
1330 1329
1331 for (size_t i = 0; i < absoluteRects.size(); ++i) 1330 for (size_t i = 0; i < absoluteRects.size(); ++i)
1332 absoluteQuads[i] = FloatQuad(absoluteRects[i]); 1331 absoluteQuads[i] = FloatQuad(absoluteRects[i]);
1333 1332
1334 return ClientRectList::create(absoluteQuads); 1333 return ClientRectList::create(absoluteQuads);
1335 } 1334 }
1336 #endif
1337 1335
1338 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y, unsigned topPadding, unsigned rightPadding, 1336 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y, unsigned topPadding, unsigned rightPadding,
1339 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo wShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const 1337 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo wShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const
1340 { 1338 {
1341 if (!document || !document->frame() || !document->frame()->view()) { 1339 if (!document || !document->frame() || !document->frame()->view()) {
1342 ec = INVALID_ACCESS_ERR; 1340 ec = INVALID_ACCESS_ERR;
1343 return 0; 1341 return 0;
1344 } 1342 }
1345 1343
1346 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT estRequest::Active; 1344 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT estRequest::Active;
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 1968
1971 RenderObject* renderer = select->renderer(); 1969 RenderObject* renderer = select->renderer();
1972 if (!renderer->isMenuList()) 1970 if (!renderer->isMenuList())
1973 return false; 1971 return false;
1974 1972
1975 RenderMenuList* menuList = toRenderMenuList(renderer); 1973 RenderMenuList* menuList = toRenderMenuList(renderer);
1976 return menuList->popupIsVisible(); 1974 return menuList->popupIsVisible();
1977 } 1975 }
1978 1976
1979 } 1977 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698