Bug 1186972 - Use correct coordinates when comparing mouse position with menu anchor rectangle so that select element popups close properly. r=tn, a=sledru

--HG--
extra : transplant_source : %FD%0E%81e%C5%0F%8BX%E5%0DY%B7%AB%B6%29%CD%B6%2B%EBr
This commit is contained in:
Neil Deakin 2015-08-10 08:31:37 -04:00
Родитель e013298ef0
Коммит fce0c09c8d
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -263,7 +263,10 @@ nsXULPopupManager::Rollup(uint32_t aCount, bool aFlush,
// position, but the only thing that would happen is that the mouse
// event will get consumed, so here only a quick coordinates check is
// done rather than a slower complete check of what is at that location.
if (anchorRect.Contains(*pos)) {
nsPresContext* presContext = item->Frame()->PresContext();
nsIntPoint posCSSPixels(presContext->DevPixelsToIntCSSPixels(pos->x),
presContext->DevPixelsToIntCSSPixels(pos->y));
if (anchorRect.Contains(posCSSPixels)) {
if (consumeResult == ConsumeOutsideClicks_ParentOnly) {
consume = true;
}