OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2793 else if (equalIgnoringCase(policy, "always")) | 2793 else if (equalIgnoringCase(policy, "always")) |
2794 m_referrerPolicy = ReferrerPolicyAlways; | 2794 m_referrerPolicy = ReferrerPolicyAlways; |
2795 else if (equalIgnoringCase(policy, "origin")) | 2795 else if (equalIgnoringCase(policy, "origin")) |
2796 m_referrerPolicy = ReferrerPolicyOrigin; | 2796 m_referrerPolicy = ReferrerPolicyOrigin; |
2797 } | 2797 } |
2798 | 2798 |
2799 MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r
equest, const LayoutPoint& documentPoint, const PlatformMouseEvent& event) | 2799 MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r
equest, const LayoutPoint& documentPoint, const PlatformMouseEvent& event) |
2800 { | 2800 { |
2801 ASSERT(!renderer() || renderer()->isRenderView()); | 2801 ASSERT(!renderer() || renderer()->isRenderView()); |
2802 | 2802 |
2803 // RenderView::hitTest causes a layout, and we don't want to hit that until
the first | 2803 if (!renderer()) |
2804 // layout because until then, there is nothing shown on the screen - the use
r can't | |
2805 // have intentionally clicked on something belonging to this page. Furthermo
re, | |
2806 // mousemove events before the first layout should not lead to a premature l
ayout() | |
2807 // happening, which could show a flash of white. | |
2808 // See also the similar code in EventHandler::hitTestResultAtPoint. | |
2809 if (!renderer() || !view() || !view()->didFirstLayout()) | |
2810 return MouseEventWithHitTestResults(event, HitTestResult(LayoutPoint()))
; | 2804 return MouseEventWithHitTestResults(event, HitTestResult(LayoutPoint()))
; |
2811 | 2805 |
2812 HitTestResult result(documentPoint); | 2806 HitTestResult result(documentPoint); |
2813 renderView()->hitTest(request, result); | 2807 renderView()->hitTest(request, result); |
2814 | 2808 |
2815 if (!request.readOnly()) | 2809 if (!request.readOnly()) |
2816 updateHoverActiveState(request, result.innerElement()); | 2810 updateHoverActiveState(request, result.innerElement()); |
2817 | 2811 |
2818 return MouseEventWithHitTestResults(event, result); | 2812 return MouseEventWithHitTestResults(event, result); |
2819 } | 2813 } |
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5638 return; | 5632 return; |
5639 | 5633 |
5640 Vector<RefPtr<Element> > associatedFormControls; | 5634 Vector<RefPtr<Element> > associatedFormControls; |
5641 copyToVector(m_associatedFormControls, associatedFormControls); | 5635 copyToVector(m_associatedFormControls, associatedFormControls); |
5642 | 5636 |
5643 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); | 5637 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); |
5644 m_associatedFormControls.clear(); | 5638 m_associatedFormControls.clear(); |
5645 } | 5639 } |
5646 | 5640 |
5647 } // namespace WebCore | 5641 } // namespace WebCore |
OLD | NEW |