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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/core/frame/History.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 setHasHorizontalScrollbar(false); // Remove native scrollbars now before we lose the connection to the HostWindow. 180 setHasHorizontalScrollbar(false); // Remove native scrollbars now before we lose the connection to the HostWindow.
181 setHasVerticalScrollbar(false); 181 setHasVerticalScrollbar(false);
182 182
183 ASSERT(!m_scrollCorner); 183 ASSERT(!m_scrollCorner);
184 184
185 ASSERT(m_frame); 185 ASSERT(m_frame);
186 ASSERT(m_frame->view() != this || !m_frame->contentRenderer()); 186 ASSERT(m_frame->view() != this || !m_frame->contentRenderer());
187 RenderPart* renderer = m_frame->ownerRenderer(); 187 RenderPart* renderer = m_frame->ownerRenderer();
188 if (renderer && renderer->widget() == this) 188 if (renderer && renderer->widget() == this)
189 renderer->setWidget(0); 189 renderer->setWidget(nullptr);
190 } 190 }
191 191
192 void FrameView::reset() 192 void FrameView::reset()
193 { 193 {
194 m_cannotBlitToWindow = false; 194 m_cannotBlitToWindow = false;
195 m_isOverlapped = false; 195 m_isOverlapped = false;
196 m_contentIsOpaque = false; 196 m_contentIsOpaque = false;
197 m_hasPendingLayout = false; 197 m_hasPendingLayout = false;
198 m_layoutSubtreeRoot = 0; 198 m_layoutSubtreeRoot = 0;
199 m_doFullRepaint = false; 199 m_doFullRepaint = false;
(...skipping 14 matching lines...) Expand all
214 m_lastZoomFactor = 1.0f; 214 m_lastZoomFactor = 1.0f;
215 m_isTrackingRepaints = false; 215 m_isTrackingRepaints = false;
216 m_trackedRepaintRects.clear(); 216 m_trackedRepaintRects.clear();
217 m_lastPaintTime = 0; 217 m_lastPaintTime = 0;
218 m_paintBehavior = PaintBehaviorNormal; 218 m_paintBehavior = PaintBehaviorNormal;
219 m_isPainting = false; 219 m_isPainting = false;
220 m_visuallyNonEmptyCharacterCount = 0; 220 m_visuallyNonEmptyCharacterCount = 0;
221 m_visuallyNonEmptyPixelCount = 0; 221 m_visuallyNonEmptyPixelCount = 0;
222 m_isVisuallyNonEmpty = false; 222 m_isVisuallyNonEmpty = false;
223 m_firstVisuallyNonEmptyLayoutCallbackPending = true; 223 m_firstVisuallyNonEmptyLayoutCallbackPending = true;
224 m_maintainScrollPositionAnchor = 0; 224 m_maintainScrollPositionAnchor = nullptr;
225 m_partialLayout.reset(); 225 m_partialLayout.reset();
226 m_viewportConstrainedObjects.clear(); 226 m_viewportConstrainedObjects.clear();
227 } 227 }
228 228
229 void FrameView::removeFromAXObjectCache() 229 void FrameView::removeFromAXObjectCache()
230 { 230 {
231 if (AXObjectCache* cache = axObjectCache()) 231 if (AXObjectCache* cache = axObjectCache())
232 cache->remove(this); 232 cache->remove(this);
233 } 233 }
234 234
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1602
1603 LayoutRect bounds = element->boundingBox(); 1603 LayoutRect bounds = element->boundingBox();
1604 int centeringOffsetX = (rect.width() - bounds.width()) / 2; 1604 int centeringOffsetX = (rect.width() - bounds.width()) / 2;
1605 int centeringOffsetY = (rect.height() - bounds.height()) / 2; 1605 int centeringOffsetY = (rect.height() - bounds.height()) / 2;
1606 setScrollPosition(IntPoint(bounds.x() - centeringOffsetX - rect.x(), bounds. y() - centeringOffsetY - rect.y())); 1606 setScrollPosition(IntPoint(bounds.x() - centeringOffsetX - rect.x(), bounds. y() - centeringOffsetY - rect.y()));
1607 } 1607 }
1608 1608
1609 void FrameView::setScrollPosition(const IntPoint& scrollPoint) 1609 void FrameView::setScrollPosition(const IntPoint& scrollPoint)
1610 { 1610 {
1611 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e); 1611 TemporaryChange<bool> changeInProgrammaticScroll(m_inProgrammaticScroll, tru e);
1612 m_maintainScrollPositionAnchor = 0; 1612 m_maintainScrollPositionAnchor = nullptr;
1613 1613
1614 IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint); 1614 IntPoint newScrollPosition = adjustScrollPositionWithinRange(scrollPoint);
1615 1615
1616 if (newScrollPosition == scrollPosition()) 1616 if (newScrollPosition == scrollPosition())
1617 return; 1617 return;
1618 1618
1619 ScrollView::setScrollPosition(newScrollPosition); 1619 ScrollView::setScrollPosition(newScrollPosition);
1620 } 1620 }
1621 1621
1622 void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint ) 1622 void FrameView::setScrollPositionNonProgrammatically(const IntPoint& scrollPoint )
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 2635
2636 bool FrameView::wasScrolledByUser() const 2636 bool FrameView::wasScrolledByUser() const
2637 { 2637 {
2638 return m_wasScrolledByUser; 2638 return m_wasScrolledByUser;
2639 } 2639 }
2640 2640
2641 void FrameView::setWasScrolledByUser(bool wasScrolledByUser) 2641 void FrameView::setWasScrolledByUser(bool wasScrolledByUser)
2642 { 2642 {
2643 if (m_inProgrammaticScroll) 2643 if (m_inProgrammaticScroll)
2644 return; 2644 return;
2645 m_maintainScrollPositionAnchor = 0; 2645 m_maintainScrollPositionAnchor = nullptr;
2646 m_wasScrolledByUser = wasScrolledByUser; 2646 m_wasScrolledByUser = wasScrolledByUser;
2647 } 2647 }
2648 2648
2649 void FrameView::paintContents(GraphicsContext* p, const IntRect& rect) 2649 void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
2650 { 2650 {
2651 Document* document = m_frame->document(); 2651 Document* document = m_frame->document();
2652 2652
2653 #ifndef NDEBUG 2653 #ifndef NDEBUG
2654 bool fillWithRed; 2654 bool fillWithRed;
2655 if (document->printing()) 2655 if (document->printing())
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3207 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3208 { 3208 {
3209 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3209 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3210 if (AXObjectCache* cache = axObjectCache()) { 3210 if (AXObjectCache* cache = axObjectCache()) {
3211 cache->remove(scrollbar); 3211 cache->remove(scrollbar);
3212 cache->handleScrollbarUpdate(this); 3212 cache->handleScrollbarUpdate(this);
3213 } 3213 }
3214 } 3214 }
3215 3215
3216 } // namespace WebCore 3216 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/core/frame/History.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698