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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2431613002: Initial viewport is not the same as FrameView rect. (Closed)
Patch Set: DCHECK that initial viewport size is read from main frame only. 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 4462 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 return canThrottleRendering() && lifecycle().throttlingAllowed(); 4473 return canThrottleRendering() && lifecycle().throttlingAllowed();
4474 } 4474 }
4475 4475
4476 bool FrameView::canThrottleRendering() const { 4476 bool FrameView::canThrottleRendering() const {
4477 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4477 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4478 return false; 4478 return false;
4479 return m_subtreeThrottled || 4479 return m_subtreeThrottled ||
4480 (m_hiddenForThrottling && m_crossOriginForThrottling); 4480 (m_hiddenForThrottling && m_crossOriginForThrottling);
4481 } 4481 }
4482 4482
4483 void FrameView::setInitialViewportSize(const IntSize& viewportSize) {
4484 if (viewportSize == m_initialViewportSize)
4485 return;
4486
4487 m_initialViewportSize = viewportSize;
4488 // TODO(rune@opera.com): Notify the viewport style resolver about the changed
4489 // initial viewport:
4490 //
4491 // if (Document* document = m_frame->document())
4492 // document->styleEngine().initialViewportChanged();
4493 }
4494
4495 int FrameView::initialViewportWidth() const {
4496 DCHECK(m_frame->isMainFrame());
4497 return m_initialViewportSize.width();
4498 }
4499
4500 int FrameView::initialViewportHeight() const {
4501 DCHECK(m_frame->isMainFrame());
4502 return m_initialViewportSize.height();
4503 }
4504
4483 } // namespace blink 4505 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698