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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderView.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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
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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 int width = 0; 612 int width = 0;
613 if (!printing() && m_frameView) { 613 if (!printing() && m_frameView) {
614 width = m_frameView->layoutWidth(); 614 width = m_frameView->layoutWidth();
615 width = m_frameView->useFixedLayout() ? ceilf(style()->effectiveZoom() * float(width)) : width; 615 width = m_frameView->useFixedLayout() ? ceilf(style()->effectiveZoom() * float(width)) : width;
616 } 616 }
617 return width; 617 return width;
618 } 618 }
619 619
620 // The idea here is to take into account what object is moving the pagination po int, and 620 // The idea here is to take into account what object is moving the pagination po int, and
621 // thus choose the best place to chop it. 621 // thus choose the best place to chop it.
622 void RenderView::setBestTruncatedAt(int y, RenderBox* forRenderer, bool forcedBr eak) 622 void RenderView::setBestTruncatedAt(int y, RenderBoxModelObject* forRenderer, bo ol forcedBreak)
623 { 623 {
624 // Nobody else can set a page break once we have a forced break. 624 // Nobody else can set a page break once we have a forced break.
625 if (m_forcedPageBreak) 625 if (m_forcedPageBreak)
626 return; 626 return;
627 627
628 // Forced breaks always win over unforced breaks. 628 // Forced breaks always win over unforced breaks.
629 if (forcedBreak) { 629 if (forcedBreak) {
630 m_forcedPageBreak = true; 630 m_forcedPageBreak = true;
631 m_bestTruncatedAt = y; 631 m_bestTruncatedAt = y;
632 return; 632 return;
633 } 633 }
634 634
635 // prefer the widest object who tries to move the pagination point 635 // Prefer the widest object that tries to move the pagination point
636 if (forRenderer->width() > m_truncatorWidth) { 636 IntRect boundingBox = forRenderer->borderBoundingBox();
637 m_truncatorWidth = forRenderer->width(); 637 if (boundingBox.width() > m_truncatorWidth) {
638 m_truncatorWidth = boundingBox.width();
638 m_bestTruncatedAt = y; 639 m_bestTruncatedAt = y;
639 } 640 }
640 } 641 }
641 642
642 void RenderView::pushLayoutState(RenderObject* root) 643 void RenderView::pushLayoutState(RenderObject* root)
643 { 644 {
644 ASSERT(!doingFullRepaint()); 645 ASSERT(!doingFullRepaint());
645 ASSERT(m_layoutStateDisableCount == 0); 646 ASSERT(m_layoutStateDisableCount == 0);
646 ASSERT(m_layoutState == 0); 647 ASSERT(m_layoutState == 0);
647 648
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 void RenderView::willMoveOffscreen() 689 void RenderView::willMoveOffscreen()
689 { 690 {
690 #if USE(ACCELERATED_COMPOSITING) 691 #if USE(ACCELERATED_COMPOSITING)
691 if (m_compositor) 692 if (m_compositor)
692 m_compositor->willMoveOffscreen(); 693 m_compositor->willMoveOffscreen();
693 #endif 694 #endif
694 } 695 }
695 696
696 } // namespace WebCore 697 } // namespace WebCore
697 698
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderView.h ('k') | third_party/WebKit/WebCore/rendering/SVGCharacterLayoutInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698