| OLD | NEW |
| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 using namespace HTMLNames; | 96 using namespace HTMLNames; |
| 97 | 97 |
| 98 double FrameView::s_currentFrameTimeStamp = 0.0; | 98 double FrameView::s_currentFrameTimeStamp = 0.0; |
| 99 | 99 |
| 100 // The maximum number of updateWidgets iterations that should be done before ret
urning. | 100 // The maximum number of updateWidgets iterations that should be done before ret
urning. |
| 101 static const unsigned maxUpdateWidgetsIterations = 2; | 101 static const unsigned maxUpdateWidgetsIterations = 2; |
| 102 static const double resourcePriorityUpdateDelayAfterScroll = 0.250; | 102 static const double resourcePriorityUpdateDelayAfterScroll = 0.250; |
| 103 | 103 |
| 104 FrameView::FrameView(LocalFrame* frame) | 104 FrameView::FrameView(LocalFrame* frame) |
| 105 : m_frame(frame) | 105 : m_frame(frame) |
| 106 , m_displayMode(WebDisplayModeBrowser) |
| 106 , m_canHaveScrollbars(true) | 107 , m_canHaveScrollbars(true) |
| 107 , m_slowRepaintObjectCount(0) | 108 , m_slowRepaintObjectCount(0) |
| 108 , m_hasPendingLayout(false) | 109 , m_hasPendingLayout(false) |
| 109 , m_layoutSubtreeRoot(0) | 110 , m_layoutSubtreeRoot(0) |
| 110 , m_inSynchronousPostLayout(false) | 111 , m_inSynchronousPostLayout(false) |
| 111 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) | 112 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) |
| 112 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) | 113 , m_updateWidgetsTimer(this, &FrameView::updateWidgetsTimerFired) |
| 113 , m_isTransparent(false) | 114 , m_isTransparent(false) |
| 114 , m_baseBackgroundColor(Color::white) | 115 , m_baseBackgroundColor(Color::white) |
| 115 , m_mediaType(MediaTypeNames::screen) | 116 , m_mediaType(MediaTypeNames::screen) |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 ASSERT(isInPerformLayout()); | 1179 ASSERT(isInPerformLayout()); |
| 1179 // Tell the DOM element that it needs a widget update. | 1180 // Tell the DOM element that it needs a widget update. |
| 1180 Node* node = object.node(); | 1181 Node* node = object.node(); |
| 1181 ASSERT(node); | 1182 ASSERT(node); |
| 1182 if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node)) | 1183 if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node)) |
| 1183 toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true); | 1184 toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true); |
| 1184 | 1185 |
| 1185 m_partUpdateSet.add(&object); | 1186 m_partUpdateSet.add(&object); |
| 1186 } | 1187 } |
| 1187 | 1188 |
| 1189 void FrameView::setDisplayMode(WebDisplayMode mode) |
| 1190 { |
| 1191 m_displayMode = mode; |
| 1192 m_frame->document()->mediaQueryAffectingValueChanged(); |
| 1193 } |
| 1194 |
| 1188 void FrameView::setMediaType(const AtomicString& mediaType) | 1195 void FrameView::setMediaType(const AtomicString& mediaType) |
| 1189 { | 1196 { |
| 1190 ASSERT(m_frame->document()); | 1197 ASSERT(m_frame->document()); |
| 1191 m_frame->document()->mediaQueryAffectingValueChanged(); | 1198 m_frame->document()->mediaQueryAffectingValueChanged(); |
| 1192 m_mediaType = mediaType; | 1199 m_mediaType = mediaType; |
| 1193 } | 1200 } |
| 1194 | 1201 |
| 1195 AtomicString FrameView::mediaType() const | 1202 AtomicString FrameView::mediaType() const |
| 1196 { | 1203 { |
| 1197 // See if we have an override type. | 1204 // See if we have an override type. |
| (...skipping 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4019 return; | 4026 return; |
| 4020 | 4027 |
| 4021 ScrollableArea::setScrollOrigin(origin); | 4028 ScrollableArea::setScrollOrigin(origin); |
| 4022 | 4029 |
| 4023 // Update if the scroll origin changes, since our position will be different
if the content size did not change. | 4030 // Update if the scroll origin changes, since our position will be different
if the content size did not change. |
| 4024 if (updatePositionAtAll && updatePositionSynchronously) | 4031 if (updatePositionAtAll && updatePositionSynchronously) |
| 4025 updateScrollbars(scrollOffsetDouble()); | 4032 updateScrollbars(scrollOffsetDouble()); |
| 4026 } | 4033 } |
| 4027 | 4034 |
| 4028 } // namespace blink | 4035 } // namespace blink |
| OLD | NEW |