| 1556 | } |
| 1557 | |
| 1558 | bool Element::IsLocationInViewPort(const LocationInfo location, const bool document_contains_frames) { |
| 1559 | LOG(TRACE) << "Entering Element::IsLocationInViewPort"; |
| 1560 | |
| 1561 | LocationInfo clickable_viewport = {}; |
| 1562 | bool result = this->GetClickableViewPortLocation(document_contains_frames, &clickable_viewport); |
| 1563 | if (!result) { |
| 1564 | // problem is already logged, so just return |
| 1565 | return false; |
| 1566 | } |
| 1567 | |
| 1568 | if (location.x < 0 || location.x >= clickable_viewport.width) { |
| 1569 | LOG(WARN) << "X coordinate is out of element area"; |
| 1570 | return false; |
| 1571 | } |
| 1572 | |
| 1573 | // And in the Y? |
| 1574 | if (location.y < 0 || location.y >= clickable_viewport.height) { |
| 1575 | LOG(WARN) << "Y coordinate is out of element area"; |
| 1576 | return false; |
| 1577 | } |
| 1578 | |
| 1579 | return true; |
| 1580 | } |
| 1581 | |
| 1582 | int Element::GetContainingDocument(const bool use_dom_node, |
| 1583 | IHTMLDocument2** doc) { |
no test coverage detected