tests/cefclient/browser/osr_accessibility_node_win.cc
// Check if the coordinates provided are within our element or child items.
Check if the coordinates provided are within our element or child items.
Check if the coordinates provided are within our element or child items .
STDMETHODIMP CefIAccessible::accHitTest(long xLeft,
                                        long yTop,
                                        VARIANT* pvarChild) {
  HRESULT retCode = DATACHECK(node_);
  if (SUCCEEDED(retCode)) {
    if (pvarChild) {
      pvarChild->vt = VT_EMPTY;
      CefRect loc = node_->AxLocation();
      RECT rcItem = {loc.x, loc.y, loc.x + loc.width, loc.y + loc.height};
      POINT pt = {xLeft, yTop};
      ClientToScreen(node_->GetWindowHandle(), &rcItem);
      if (PtInRect(&rcItem, pt)) {
        pvarChild->vt = VT_I4;
        pvarChild->lVal = 1;
      }
    } else {
      retCode = E_INVALIDARG;
    }
  }
  return retCode;
}
STDMETHODIMP CefIAccessible :: accHitTest ( long xLeft , long yTop , VARIANT * pvarChild ) { HRESULT retCode = DATACHECK ( node_ ) ; if ( SUCCEEDED ( retCode ) ) { if ( pvarChild ) { pvarChild -> vt = VT_EMPTY ; CefRect loc = node_ -> AxLocation ( ) ; RECT rcItem = { loc . x , loc . y , loc . x + loc . width , loc . y + loc . height } ; POINT pt = { xLeft , yTop } ; ClientToScreen ( node_ -> GetWindowHandle ( ) , & rcItem ) ; if ( PtInRect ( & rcItem , pt ) ) { pvarChild -> vt = VT_I4 ; pvarChild -> lVal = 1 ; } } else { retCode = E_INVALIDARG ; } } return retCode ; }
Check if the coordinates provided are within our element or child items.
Check if the coordinates provided are within our element or child items .