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

Side by Side Diff: sky/engine/core/page/Page.cpp

Issue 654693004: Remove meta viewport and @viewport CSS rules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // willBeDestroyed() must be called before Page destruction. 127 // willBeDestroyed() must be called before Page destruction.
128 ASSERT(!m_mainFrame); 128 ASSERT(!m_mainFrame);
129 } 129 }
130 130
131 void Page::makeOrdinary() 131 void Page::makeOrdinary()
132 { 132 {
133 ASSERT(!ordinaryPages().contains(this)); 133 ASSERT(!ordinaryPages().contains(this));
134 ordinaryPages().add(this); 134 ordinaryPages().add(this);
135 } 135 }
136 136
137 ViewportDescription Page::viewportDescription() const
138 {
139 return mainFrame() && mainFrame()->document() ? mainFrame()->document()->vie wportDescription() : ViewportDescription();
140 }
141
142 ScrollingCoordinator* Page::scrollingCoordinator() 137 ScrollingCoordinator* Page::scrollingCoordinator()
143 { 138 {
144 if (!m_scrollingCoordinator) 139 if (!m_scrollingCoordinator)
145 m_scrollingCoordinator = ScrollingCoordinator::create(this); 140 m_scrollingCoordinator = ScrollingCoordinator::create(this);
146 141
147 return m_scrollingCoordinator.get(); 142 return m_scrollingCoordinator.get();
148 } 143 }
149 144
150 String Page::mainThreadScrollingReasonsAsText() 145 String Page::mainThreadScrollingReasonsAsText()
151 { 146 {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 { 288 {
294 m_multisamplingChangedObservers.remove(observer); 289 m_multisamplingChangedObservers.remove(observer);
295 } 290 }
296 291
297 void Page::settingsChanged(SettingsDelegate::ChangeType changeType) 292 void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
298 { 293 {
299 switch (changeType) { 294 switch (changeType) {
300 case SettingsDelegate::StyleChange: 295 case SettingsDelegate::StyleChange:
301 setNeedsRecalcStyleInAllFrames(); 296 setNeedsRecalcStyleInAllFrames();
302 break; 297 break;
303 case SettingsDelegate::ViewportDescriptionChange:
304 if (mainFrame() && mainFrame()->document())
305 mainFrame()->document()->updateViewportDescription();
306 break;
307 case SettingsDelegate::MediaTypeChange: 298 case SettingsDelegate::MediaTypeChange:
308 if (mainFrame()) { 299 if (mainFrame()) {
309 mainFrame()->view()->setMediaType(AtomicString(settings().mediaTypeO verride())); 300 mainFrame()->view()->setMediaType(AtomicString(settings().mediaTypeO verride()));
310 setNeedsRecalcStyleInAllFrames(); 301 setNeedsRecalcStyleInAllFrames();
311 } 302 }
312 break; 303 break;
313 case SettingsDelegate::MultisamplingChange: { 304 case SettingsDelegate::MultisamplingChange: {
314 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > ::iterator stop = m_multisamplingChangedObservers.end(); 305 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > ::iterator stop = m_multisamplingChangedObservers.end();
315 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserv er> >::iterator it = m_multisamplingChangedObservers.begin(); it != stop; ++it) 306 for (WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserv er> >::iterator it = m_multisamplingChangedObservers.begin(); it != stop; ++it)
316 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled() ); 307 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled() );
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 , editorClient(0) 398 , editorClient(0)
408 , spellCheckerClient(0) 399 , spellCheckerClient(0)
409 { 400 {
410 } 401 }
411 402
412 Page::PageClients::~PageClients() 403 Page::PageClients::~PageClients()
413 { 404 {
414 } 405 }
415 406
416 } // namespace blink 407 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698