| OLD | NEW |
| 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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); | 1303 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); |
| 1304 if (!touchHandlers) | 1304 if (!touchHandlers) |
| 1305 return 0; | 1305 return 0; |
| 1306 | 1306 |
| 1307 unsigned count = 0; | 1307 unsigned count = 0; |
| 1308 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | 1308 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) |
| 1309 count += iter->value; | 1309 count += iter->value; |
| 1310 return count; | 1310 return count; |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 #if ENABLE(TOUCH_EVENT_TRACKING) | |
| 1314 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu
ment, ExceptionCode& ec) | 1313 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu
ment, ExceptionCode& ec) |
| 1315 { | 1314 { |
| 1316 if (!document || !document->view() || !document->page()) { | 1315 if (!document || !document->view() || !document->page()) { |
| 1317 ec = INVALID_ACCESS_ERR; | 1316 ec = INVALID_ACCESS_ERR; |
| 1318 return 0; | 1317 return 0; |
| 1319 } | 1318 } |
| 1320 if (!document->page()->scrollingCoordinator()) | 1319 if (!document->page()->scrollingCoordinator()) |
| 1321 return ClientRectList::create(); | 1320 return ClientRectList::create(); |
| 1322 | 1321 |
| 1323 document->updateLayoutIgnorePendingStylesheets(); | 1322 document->updateLayoutIgnorePendingStylesheets(); |
| 1324 | 1323 |
| 1325 Vector<IntRect> absoluteRects; | 1324 Vector<IntRect> absoluteRects; |
| 1326 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec
ts(document, absoluteRects); | 1325 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec
ts(document, absoluteRects); |
| 1327 Vector<FloatQuad> absoluteQuads(absoluteRects.size()); | 1326 Vector<FloatQuad> absoluteQuads(absoluteRects.size()); |
| 1328 | 1327 |
| 1329 for (size_t i = 0; i < absoluteRects.size(); ++i) | 1328 for (size_t i = 0; i < absoluteRects.size(); ++i) |
| 1330 absoluteQuads[i] = FloatQuad(absoluteRects[i]); | 1329 absoluteQuads[i] = FloatQuad(absoluteRects[i]); |
| 1331 | 1330 |
| 1332 return ClientRectList::create(absoluteQuads); | 1331 return ClientRectList::create(absoluteQuads); |
| 1333 } | 1332 } |
| 1334 #endif | |
| 1335 | 1333 |
| 1336 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y,
unsigned topPadding, unsigned rightPadding, | 1334 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y,
unsigned topPadding, unsigned rightPadding, |
| 1337 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const | 1335 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const |
| 1338 { | 1336 { |
| 1339 if (!document || !document->frame() || !document->frame()->view()) { | 1337 if (!document || !document->frame() || !document->frame()->view()) { |
| 1340 ec = INVALID_ACCESS_ERR; | 1338 ec = INVALID_ACCESS_ERR; |
| 1341 return 0; | 1339 return 0; |
| 1342 } | 1340 } |
| 1343 | 1341 |
| 1344 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT
estRequest::Active; | 1342 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT
estRequest::Active; |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 | 1966 |
| 1969 RenderObject* renderer = select->renderer(); | 1967 RenderObject* renderer = select->renderer(); |
| 1970 if (!renderer->isMenuList()) | 1968 if (!renderer->isMenuList()) |
| 1971 return false; | 1969 return false; |
| 1972 | 1970 |
| 1973 RenderMenuList* menuList = toRenderMenuList(renderer); | 1971 RenderMenuList* menuList = toRenderMenuList(renderer); |
| 1974 return menuList->popupIsVisible(); | 1972 return menuList->popupIsVisible(); |
| 1975 } | 1973 } |
| 1976 | 1974 |
| 1977 } | 1975 } |
| OLD | NEW |