Lines Matching refs:focusedElement
147 if (!focused && document->focusedElement()) {
148 RefPtrWillBeRawPtr<Element> focusedElement(document->focusedElement());
149 focusedElement->setFocus(false);
150 focusedElement->dispatchBlurEvent(0);
151 if (focusedElement == document->focusedElement()) {
152 focusedElement->dispatchFocusOutEvent(EventTypeNames::focusout, 0);
153 if (focusedElement == document->focusedElement())
154 focusedElement->dispatchFocusOutEvent(EventTypeNames::DOMFocusOut, 0);
160 if (focused && document->focusedElement()) {
161 RefPtrWillBeRawPtr<Element> focusedElement(document->focusedElement());
162 focusedElement->setFocus(true);
163 focusedElement->dispatchFocusEvent(0, FocusTypePage);
164 if (focusedElement == document->focusedElement()) {
165 document->focusedElement()->dispatchFocusInEvent(EventTypeNames::focusin, 0, FocusTypePage);
166 if (focusedElement == document->focusedElement())
167 document->focusedElement()->dispatchFocusInEvent(EventTypeNames::DOMFocusIn, 0, FocusTypePage);
276 Element* focusedElement = document ? document->focusedElement() : 0;
277 if (focusedElement) {
278 focusedElement->dispatchBlurEvent(0);
279 if (focusedElement == document->focusedElement()) {
280 focusedElement->dispatchFocusOutEvent(EventTypeNames::focusout, 0);
281 if (focusedElement == document->focusedElement())
282 focusedElement->dispatchFocusOutEvent(EventTypeNames::DOMFocusOut, 0);
290 Element* focusedElement = document ? document->focusedElement() : 0;
291 if (focusedElement) {
292 focusedElement->dispatchFocusEvent(0, FocusTypePage);
293 if (focusedElement == document->focusedElement()) {
294 document->focusedElement()->dispatchFocusInEvent(EventTypeNames::focusin, 0, FocusTypePage);
295 if (focusedElement == document->focusedElement())
296 document->focusedElement()->dispatchFocusInEvent(EventTypeNames::DOMFocusIn, 0, FocusTypePage);
402 Node* currentNode = document->focusedElement();
434 if (node == document->focusedElement())
683 Element* oldFocusedElement = oldDocument ? oldDocument->focusedElement() : 0;
699 if (newDocument && oldDocument == newDocument && newDocument->focusedElement() == element)
790 Element* focusedElement = (focusedFrame() && toLocalFrame(focusedFrame())->document()) ? toLocalFrame(focusedFrame())->document()->focusedElement() : 0;
795 current.focusableNode = focusedElement;
796 current.visibleNode = focusedElement;
801 if (element == focusedElement)
849 Element* focusedElement = toLocalFrame(focusedOrMainFrame())->document()->focusedElement();
850 if (focusedElement && !hasOffscreenRect(focusedElement))
851 rect = nodeRectInAbsoluteCoordinates(focusedElement, true /* ignore border */);
867 Element* focusedElement = toLocalFrame(focusedOrMainFrame())->document()->focusedElement();
868 if (focusedElement && !hasOffscreenRect(focusedElement))
869 startingRect = nodeRectInAbsoluteCoordinates(focusedElement, true);
898 Element* focusedElement = focusedDocument->focusedElement();
906 if (focusedElement) {
907 if (!hasOffscreenRect(focusedElement)) {
908 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(type, focusedElement);
909 startingRect = nodeRectInAbsoluteCoordinates(focusedElement, true /* ignore border */);
910 } else if (isHTMLAreaElement(*focusedElement)) {
911 HTMLAreaElement& area = toHTMLAreaElement(*focusedElement);