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

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 157553002: Remove the Pagination struct, clean up viewport scroll policy propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 377 }
378 378
379 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout Point&) const 379 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout Point&) const
380 { 380 {
381 // Record the entire size of the contents of the frame. Note that we don't j ust 381 // Record the entire size of the contents of the frame. Note that we don't j ust
382 // use the viewport size (containing block) here because we want to ensure t his includes 382 // use the viewport size (containing block) here because we want to ensure t his includes
383 // all children (so we can avoid walking them explicitly). 383 // all children (so we can avoid walking them explicitly).
384 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize())); 384 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize()));
385 } 385 }
386 386
387 bool RenderView::requiresColumns(int desiredColumnCount) const
388 {
389 if (m_frameView)
390 return m_frameView->pagination().mode != Pagination::Unpaginated;
391
392 return RenderBlock::requiresColumns(desiredColumnCount);
393 }
394
395 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 387 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
396 { 388 {
397 // If we ever require layout but receive a paint anyway, something has gone horribly wrong. 389 // If we ever require layout but receive a paint anyway, something has gone horribly wrong.
398 ASSERT(!needsLayout()); 390 ASSERT(!needsLayout());
399 // RenderViews should never be called to paint with an offset not on device pixels. 391 // RenderViews should never be called to paint with an offset not on device pixels.
400 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse t); 392 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse t);
401 393
402 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); 394 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
403 395
404 // This avoids painting garbage between columns if there is a column gap. 396 // This avoids painting garbage between columns if there is a column gap.
405 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated ) 397 if (m_frameView && style()->isOverflowPaged())
406 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC olor()); 398 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC olor());
407 399
408 paintObject(paintInfo, paintOffset); 400 paintObject(paintInfo, paintOffset);
409 } 401 }
410 402
411 static inline bool rendererObscuresBackground(RenderBox* rootBox) 403 static inline bool rendererObscuresBackground(RenderBox* rootBox)
412 { 404 {
413 ASSERT(rootBox); 405 ASSERT(rootBox);
414 RenderStyle* style = rootBox->style(); 406 RenderStyle* style = rootBox->style();
415 if (style->visibility() != VISIBLE 407 if (style->visibility() != VISIBLE
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 return true; 1128 return true;
1137 if (childStyle->top().isPercent() || childStyle->height().isPercent( ) || childStyle->minHeight().isPercent() || childStyle->maxHeight().isPercent() || !childStyle->bottom().isAuto()) 1129 if (childStyle->top().isPercent() || childStyle->height().isPercent( ) || childStyle->minHeight().isPercent() || childStyle->maxHeight().isPercent() || !childStyle->bottom().isAuto())
1138 return true; 1130 return true;
1139 } 1131 }
1140 } 1132 }
1141 1133
1142 return false; 1134 return false;
1143 } 1135 }
1144 1136
1145 } // namespace WebCore 1137 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698