Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2392773002: Reenable framebusting deprecation, change it to allow navigation if iframe has ever had a user gestu (Closed)
Patch Set: TODOs and TouchEventmanager Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 referrerDocument = frame->document(); 3380 referrerDocument = frame->document();
3380 } 3381 }
3381 return referrerDocument->m_url.strippedForUseAsReferrer(); 3382 return referrerDocument->m_url.strippedForUseAsReferrer();
3382 } 3383 }
3383 3384
3384 MouseEventWithHitTestResults Document::performMouseEventHitTest( 3385 MouseEventWithHitTestResults Document::performMouseEventHitTest(
3385 const HitTestRequest& request, 3386 const HitTestRequest& request,
3386 const LayoutPoint& documentPoint, 3387 const LayoutPoint& documentPoint,
3387 const PlatformMouseEvent& event) { 3388 const PlatformMouseEvent& event) {
3388 DCHECK(layoutViewItem().isNull() || layoutViewItem().isLayoutView()); 3389 DCHECK(layoutViewItem().isNull() || layoutViewItem().isLayoutView());
3390 // TODO(japhet): UserGestureIndicator should setHasReceivedUserGesture()
3391 // on the Document.
3392 if (UserGestureIndicator::processingUserGesture())
3393 m_hasReceivedUserGesture = true;
3389 3394
3390 // LayoutView::hitTest causes a layout, and we don't want to hit that until 3395 // LayoutView::hitTest causes a layout, and we don't want to hit that until
3391 // the first layout because until then, there is nothing shown on the screen - 3396 // the first layout because until then, there is nothing shown on the screen -
3392 // the user can't have intentionally clicked on something belonging to this 3397 // the user can't have intentionally clicked on something belonging to this
3393 // page. Furthermore, mousemove events before the first layout should not 3398 // page. Furthermore, mousemove events before the first layout should not
3394 // lead to a premature layout() happening, which could show a flash of white. 3399 // lead to a premature layout() happening, which could show a flash of white.
3395 // See also the similar code in EventHandler::hitTestResultAtPoint. 3400 // See also the similar code in EventHandler::hitTestResultAtPoint.
3396 if (layoutViewItem().isNull() || !view() || !view()->didFirstLayout()) 3401 if (layoutViewItem().isNull() || !view() || !view()->didFirstLayout())
3397 return MouseEventWithHitTestResults(event, 3402 return MouseEventWithHitTestResults(event,
3398 HitTestResult(request, LayoutPoint())); 3403 HitTestResult(request, LayoutPoint()));
(...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after
6388 } 6393 }
6389 6394
6390 void showLiveDocumentInstances() { 6395 void showLiveDocumentInstances() {
6391 WeakDocumentSet& set = liveDocumentSet(); 6396 WeakDocumentSet& set = liveDocumentSet();
6392 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6397 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6393 for (Document* document : set) 6398 for (Document* document : set)
6394 fprintf(stderr, "- Document %p URL: %s\n", document, 6399 fprintf(stderr, "- Document %p URL: %s\n", document,
6395 document->url().getString().utf8().data()); 6400 document->url().getString().utf8().data());
6396 } 6401 }
6397 #endif 6402 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698