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

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

Issue 2417683002: Disable scroll anchoring when in printing mode (Closed)
Patch Set: Add comment 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 : ContainerNode(0, CreateDocument), 421 : ContainerNode(0, CreateDocument),
422 TreeScope(*this), 422 TreeScope(*this),
423 m_hasNodesWithPlaceholderStyle(false), 423 m_hasNodesWithPlaceholderStyle(false),
424 m_evaluateMediaQueriesOnStyleRecalc(false), 424 m_evaluateMediaQueriesOnStyleRecalc(false),
425 m_pendingSheetLayout(NoLayoutWithPendingSheets), 425 m_pendingSheetLayout(NoLayoutWithPendingSheets),
426 m_frame(initializer.frame()), 426 m_frame(initializer.frame()),
427 m_domWindow(m_frame ? m_frame->localDOMWindow() : 0), 427 m_domWindow(m_frame ? m_frame->localDOMWindow() : 0),
428 m_importsController(initializer.importsController()), 428 m_importsController(initializer.importsController()),
429 m_contextFeatures(ContextFeatures::defaultSwitch()), 429 m_contextFeatures(ContextFeatures::defaultSwitch()),
430 m_wellFormed(false), 430 m_wellFormed(false),
431 m_printing(false), 431 m_printing(NotPrinting),
432 m_wasPrinting(false),
433 m_paginatedForScreen(false), 432 m_paginatedForScreen(false),
434 m_compatibilityMode(NoQuirksMode), 433 m_compatibilityMode(NoQuirksMode),
435 m_compatibilityModeLocked(false), 434 m_compatibilityModeLocked(false),
436 m_executeScriptsWaitingForResourcesTask(CancellableTaskFactory::create( 435 m_executeScriptsWaitingForResourcesTask(CancellableTaskFactory::create(
437 this, 436 this,
438 &Document::executeScriptsWaitingForResources)), 437 &Document::executeScriptsWaitingForResources)),
439 m_hasAutofocused(false), 438 m_hasAutofocused(false),
440 m_clearFocusedElementTimer(this, 439 m_clearFocusedElementTimer(this,
441 &Document::clearFocusedElementTimerFired), 440 &Document::clearFocusedElementTimerFired),
442 m_domTreeVersion(++s_globalTreeVersion), 441 m_domTreeVersion(++s_globalTreeVersion),
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 1928
1930 view()->recalcOverflowAfterStyleChange(); 1929 view()->recalcOverflowAfterStyleChange();
1931 1930
1932 // Only retain the HashMap for the duration of StyleRecalc and 1931 // Only retain the HashMap for the duration of StyleRecalc and
1933 // LayoutTreeConstruction. 1932 // LayoutTreeConstruction.
1934 m_nonAttachedStyle.clear(); 1933 m_nonAttachedStyle.clear();
1935 clearChildNeedsStyleRecalc(); 1934 clearChildNeedsStyleRecalc();
1936 1935
1937 resolver.clearStyleSharingList(); 1936 resolver.clearStyleSharingList();
1938 1937
1939 m_wasPrinting = m_printing;
1940
1941 DCHECK(!needsStyleRecalc()); 1938 DCHECK(!needsStyleRecalc());
1942 DCHECK(!childNeedsStyleRecalc()); 1939 DCHECK(!childNeedsStyleRecalc());
1943 DCHECK(inStyleRecalc()); 1940 DCHECK(inStyleRecalc());
1944 DCHECK_EQ(styleResolver(), &resolver); 1941 DCHECK_EQ(styleResolver(), &resolver);
1945 DCHECK(m_nonAttachedStyle.isEmpty()); 1942 DCHECK(m_nonAttachedStyle.isEmpty());
1946 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean); 1943 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean);
1947 if (shouldRecordStats) { 1944 if (shouldRecordStats) {
1948 TRACE_EVENT_END2("blink,blink_style", "Document::updateStyle", 1945 TRACE_EVENT_END2("blink,blink_style", "Document::updateStyle",
1949 "resolverAccessCount", 1946 "resolverAccessCount",
1950 styleEngine().styleForElementCount() - initialElementCount, 1947 styleEngine().styleForElementCount() - initialElementCount,
(...skipping 4450 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 } 6398 }
6402 6399
6403 void showLiveDocumentInstances() { 6400 void showLiveDocumentInstances() {
6404 WeakDocumentSet& set = liveDocumentSet(); 6401 WeakDocumentSet& set = liveDocumentSet();
6405 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6402 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6406 for (Document* document : set) 6403 for (Document* document : set)
6407 fprintf(stderr, "- Document %p URL: %s\n", document, 6404 fprintf(stderr, "- Document %p URL: %s\n", document,
6408 document->url().getString().utf8().data()); 6405 document->url().getString().utf8().data());
6409 } 6406 }
6410 #endif 6407 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698