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

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

Issue 564133003: Make better use of MediaTypeNames (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add more Created 6 years, 3 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 10 matching lines...) Expand all
21 * You should have received a copy of the GNU Library General Public License 21 * You should have received a copy of the GNU Library General Public License
22 * along with this library; see the file COPYING.LIB. If not, write to 22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/frame/FrameView.h" 28 #include "core/frame/FrameView.h"
29 29
30 #include "core/HTMLNames.h" 30 #include "core/HTMLNames.h"
31 #include "core/MediaTypeNames.h"
31 #include "core/accessibility/AXObjectCache.h" 32 #include "core/accessibility/AXObjectCache.h"
32 #include "core/css/FontFaceSet.h" 33 #include "core/css/FontFaceSet.h"
33 #include "core/css/resolver/StyleResolver.h" 34 #include "core/css/resolver/StyleResolver.h"
34 #include "core/dom/DocumentMarkerController.h" 35 #include "core/dom/DocumentMarkerController.h"
35 #include "core/editing/FrameSelection.h" 36 #include "core/editing/FrameSelection.h"
36 #include "core/events/OverflowEvent.h" 37 #include "core/events/OverflowEvent.h"
37 #include "core/fetch/ResourceFetcher.h" 38 #include "core/fetch/ResourceFetcher.h"
38 #include "core/fetch/ResourceLoadPriorityOptimizer.h" 39 #include "core/fetch/ResourceLoadPriorityOptimizer.h"
39 #include "core/frame/FrameHost.h" 40 #include "core/frame/FrameHost.h"
40 #include "core/frame/LocalFrame.h" 41 #include "core/frame/LocalFrame.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 : m_frame(frame) 99 : m_frame(frame)
99 , m_canHaveScrollbars(true) 100 , m_canHaveScrollbars(true)
100 , m_slowRepaintObjectCount(0) 101 , m_slowRepaintObjectCount(0)
101 , m_hasPendingLayout(false) 102 , m_hasPendingLayout(false)
102 , m_layoutSubtreeRoot(0) 103 , m_layoutSubtreeRoot(0)
103 , m_inSynchronousPostLayout(false) 104 , m_inSynchronousPostLayout(false)
104 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) 105 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
105 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) 106 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired)
106 , m_isTransparent(false) 107 , m_isTransparent(false)
107 , m_baseBackgroundColor(Color::white) 108 , m_baseBackgroundColor(Color::white)
108 , m_mediaType("screen") 109 , m_mediaType(MediaTypeNames::screen)
109 , m_overflowStatusDirty(true) 110 , m_overflowStatusDirty(true)
110 , m_viewportRenderer(0) 111 , m_viewportRenderer(0)
111 , m_wasScrolledByUser(false) 112 , m_wasScrolledByUser(false)
112 , m_inProgrammaticScroll(false) 113 , m_inProgrammaticScroll(false)
113 , m_safeToPropagateScrollToParent(true) 114 , m_safeToPropagateScrollToParent(true)
114 , m_isTrackingPaintInvalidations(false) 115 , m_isTrackingPaintInvalidations(false)
115 , m_scrollCorner(nullptr) 116 , m_scrollCorner(nullptr)
116 , m_visibleContentScaleFactor(1) 117 , m_visibleContentScaleFactor(1)
117 , m_inputEventsScaleFactorForEmulation(1) 118 , m_inputEventsScaleFactorForEmulation(1)
118 , m_layoutSizeFixedToFrameSize(true) 119 , m_layoutSizeFixedToFrameSize(true)
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 if (!overrideType.isNull()) 1099 if (!overrideType.isNull())
1099 return AtomicString(overrideType); 1100 return AtomicString(overrideType);
1100 return m_mediaType; 1101 return m_mediaType;
1101 } 1102 }
1102 1103
1103 void FrameView::adjustMediaTypeForPrinting(bool printing) 1104 void FrameView::adjustMediaTypeForPrinting(bool printing)
1104 { 1105 {
1105 if (printing) { 1106 if (printing) {
1106 if (m_mediaTypeWhenNotPrinting.isNull()) 1107 if (m_mediaTypeWhenNotPrinting.isNull())
1107 m_mediaTypeWhenNotPrinting = mediaType(); 1108 m_mediaTypeWhenNotPrinting = mediaType();
1108 setMediaType("print"); 1109 setMediaType(MediaTypeNames::print);
1109 } else { 1110 } else {
1110 if (!m_mediaTypeWhenNotPrinting.isNull()) 1111 if (!m_mediaTypeWhenNotPrinting.isNull())
1111 setMediaType(m_mediaTypeWhenNotPrinting); 1112 setMediaType(m_mediaTypeWhenNotPrinting);
1112 m_mediaTypeWhenNotPrinting = nullAtom; 1113 m_mediaTypeWhenNotPrinting = nullAtom;
1113 } 1114 }
1114 } 1115 }
1115 1116
1116 bool FrameView::contentsInCompositedLayer() const 1117 bool FrameView::contentsInCompositedLayer() const
1117 { 1118 {
1118 RenderView* renderView = this->renderView(); 1119 RenderView* renderView = this->renderView();
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 2977 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
2977 { 2978 {
2978 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 2979 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
2979 if (AXObjectCache* cache = axObjectCache()) { 2980 if (AXObjectCache* cache = axObjectCache()) {
2980 cache->remove(scrollbar); 2981 cache->remove(scrollbar);
2981 cache->handleScrollbarUpdate(this); 2982 cache->handleScrollbarUpdate(this);
2982 } 2983 }
2983 } 2984 }
2984 2985
2985 } // namespace blink 2986 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698