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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 &Document::updateFocusAppearanceTimerFired), | 458 &Document::updateFocusAppearanceTimerFired), |
459 m_cssTarget(nullptr), | 459 m_cssTarget(nullptr), |
460 m_loadEventProgress(LoadEventNotRun), | 460 m_loadEventProgress(LoadEventNotRun), |
461 m_startTime(currentTime()), | 461 m_startTime(currentTime()), |
462 m_scriptRunner(ScriptRunner::create(this)), | 462 m_scriptRunner(ScriptRunner::create(this)), |
463 m_xmlVersion("1.0"), | 463 m_xmlVersion("1.0"), |
464 m_xmlStandalone(StandaloneUnspecified), | 464 m_xmlStandalone(StandaloneUnspecified), |
465 m_hasXMLDeclaration(0), | 465 m_hasXMLDeclaration(0), |
466 m_designMode(false), | 466 m_designMode(false), |
467 m_isRunningExecCommand(false), | 467 m_isRunningExecCommand(false), |
468 m_hasReceivedUserGesture(false), | |
468 m_hasAnnotatedRegions(false), | 469 m_hasAnnotatedRegions(false), |
469 m_annotatedRegionsDirty(false), | 470 m_annotatedRegionsDirty(false), |
470 m_useSecureKeyboardEntryWhenActive(false), | 471 m_useSecureKeyboardEntryWhenActive(false), |
471 m_documentClasses(documentClasses), | 472 m_documentClasses(documentClasses), |
472 m_isViewSource(false), | 473 m_isViewSource(false), |
473 m_sawElementsInKnownNamespaces(false), | 474 m_sawElementsInKnownNamespaces(false), |
474 m_isSrcdocDocument(false), | 475 m_isSrcdocDocument(false), |
475 m_isMobileDocument(false), | 476 m_isMobileDocument(false), |
476 m_layoutView(0), | 477 m_layoutView(0), |
477 m_contextDocument(initializer.contextDocument()), | 478 m_contextDocument(initializer.contextDocument()), |
(...skipping 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3361 referrerDocument = frame->document(); | 3362 referrerDocument = frame->document(); |
3362 } | 3363 } |
3363 return referrerDocument->m_url.strippedForUseAsReferrer(); | 3364 return referrerDocument->m_url.strippedForUseAsReferrer(); |
3364 } | 3365 } |
3365 | 3366 |
3366 MouseEventWithHitTestResults Document::prepareMouseEvent( | 3367 MouseEventWithHitTestResults Document::prepareMouseEvent( |
3367 const HitTestRequest& request, | 3368 const HitTestRequest& request, |
3368 const LayoutPoint& documentPoint, | 3369 const LayoutPoint& documentPoint, |
3369 const PlatformMouseEvent& event) { | 3370 const PlatformMouseEvent& event) { |
3370 DCHECK(layoutViewItem().isNull() || layoutViewItem().isLayoutView()); | 3371 DCHECK(layoutViewItem().isNull() || layoutViewItem().isLayoutView()); |
3372 m_hasReceivedUserGesture = true; | |
Rick Byers
2016/10/05 20:32:31
This means that Document::m_hasReceivedUserGesture
Nate Chapin
2016/10/05 21:43:56
Ah, I'd missed the subtlety that a PlatfromEvent d
| |
3371 | 3373 |
3372 // LayoutView::hitTest causes a layout, and we don't want to hit that until | 3374 // LayoutView::hitTest causes a layout, and we don't want to hit that until |
3373 // the first layout because until then, there is nothing shown on the screen - | 3375 // the first layout because until then, there is nothing shown on the screen - |
3374 // the user can't have intentionally clicked on something belonging to this | 3376 // the user can't have intentionally clicked on something belonging to this |
3375 // page. Furthermore, mousemove events before the first layout should not | 3377 // page. Furthermore, mousemove events before the first layout should not |
3376 // lead to a premature layout() happening, which could show a flash of white. | 3378 // lead to a premature layout() happening, which could show a flash of white. |
3377 // See also the similar code in EventHandler::hitTestResultAtPoint. | 3379 // See also the similar code in EventHandler::hitTestResultAtPoint. |
3378 if (layoutViewItem().isNull() || !view() || !view()->didFirstLayout()) | 3380 if (layoutViewItem().isNull() || !view() || !view()->didFirstLayout()) |
3379 return MouseEventWithHitTestResults(event, | 3381 return MouseEventWithHitTestResults(event, |
3380 HitTestResult(request, LayoutPoint())); | 3382 HitTestResult(request, LayoutPoint())); |
(...skipping 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6369 } | 6371 } |
6370 | 6372 |
6371 void showLiveDocumentInstances() { | 6373 void showLiveDocumentInstances() { |
6372 WeakDocumentSet& set = liveDocumentSet(); | 6374 WeakDocumentSet& set = liveDocumentSet(); |
6373 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6375 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6374 for (Document* document : set) | 6376 for (Document* document : set) |
6375 fprintf(stderr, "- Document %p URL: %s\n", document, | 6377 fprintf(stderr, "- Document %p URL: %s\n", document, |
6376 document->url().getString().utf8().data()); | 6378 document->url().getString().utf8().data()); |
6377 } | 6379 } |
6378 #endif | 6380 #endif |
OLD | NEW |