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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); | 1293 const TouchEventTargetSet* touchHandlers = document->touchEventTargets(); |
1294 if (!touchHandlers) | 1294 if (!touchHandlers) |
1295 return 0; | 1295 return 0; |
1296 | 1296 |
1297 unsigned count = 0; | 1297 unsigned count = 0; |
1298 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) | 1298 for (TouchEventTargetSet::const_iterator iter = touchHandlers->begin(); iter
!= touchHandlers->end(); ++iter) |
1299 count += iter->value; | 1299 count += iter->value; |
1300 return count; | 1300 return count; |
1301 } | 1301 } |
1302 | 1302 |
| 1303 #if ENABLE(TOUCH_EVENT_TRACKING) |
1303 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu
ment, ExceptionCode& ec) | 1304 PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* docu
ment, ExceptionCode& ec) |
1304 { | 1305 { |
1305 if (!document || !document->view() || !document->page()) { | 1306 if (!document || !document->view() || !document->page()) { |
1306 ec = INVALID_ACCESS_ERR; | 1307 ec = INVALID_ACCESS_ERR; |
1307 return 0; | 1308 return 0; |
1308 } | 1309 } |
1309 if (!document->page()->scrollingCoordinator()) | 1310 if (!document->page()->scrollingCoordinator()) |
1310 return ClientRectList::create(); | 1311 return ClientRectList::create(); |
1311 | 1312 |
1312 document->updateLayoutIgnorePendingStylesheets(); | 1313 document->updateLayoutIgnorePendingStylesheets(); |
1313 | 1314 |
1314 Vector<IntRect> absoluteRects; | 1315 Vector<IntRect> absoluteRects; |
1315 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec
ts(document, absoluteRects); | 1316 document->page()->scrollingCoordinator()->computeAbsoluteTouchEventTargetRec
ts(document, absoluteRects); |
1316 Vector<FloatQuad> absoluteQuads(absoluteRects.size()); | 1317 Vector<FloatQuad> absoluteQuads(absoluteRects.size()); |
1317 | 1318 |
1318 for (size_t i = 0; i < absoluteRects.size(); ++i) | 1319 for (size_t i = 0; i < absoluteRects.size(); ++i) |
1319 absoluteQuads[i] = FloatQuad(absoluteRects[i]); | 1320 absoluteQuads[i] = FloatQuad(absoluteRects[i]); |
1320 | 1321 |
1321 return ClientRectList::create(absoluteQuads); | 1322 return ClientRectList::create(absoluteQuads); |
1322 } | 1323 } |
| 1324 #endif |
1323 | 1325 |
1324 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y,
unsigned topPadding, unsigned rightPadding, | 1326 PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int x, int y,
unsigned topPadding, unsigned rightPadding, |
1325 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const | 1327 unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allo
wShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const |
1326 { | 1328 { |
1327 if (!document || !document->frame() || !document->frame()->view()) { | 1329 if (!document || !document->frame() || !document->frame()->view()) { |
1328 ec = INVALID_ACCESS_ERR; | 1330 ec = INVALID_ACCESS_ERR; |
1329 return 0; | 1331 return 0; |
1330 } | 1332 } |
1331 | 1333 |
1332 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT
estRequest::Active; | 1334 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT
estRequest::Active; |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 | 1927 |
1926 RenderObject* renderer = select->renderer(); | 1928 RenderObject* renderer = select->renderer(); |
1927 if (!renderer->isMenuList()) | 1929 if (!renderer->isMenuList()) |
1928 return false; | 1930 return false; |
1929 | 1931 |
1930 RenderMenuList* menuList = toRenderMenuList(renderer); | 1932 RenderMenuList* menuList = toRenderMenuList(renderer); |
1931 return menuList->popupIsVisible(); | 1933 return menuList->popupIsVisible(); |
1932 } | 1934 } |
1933 | 1935 |
1934 } | 1936 } |
OLD | NEW |