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

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

Issue 176953008: Include the outline into the visual overflow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed dumb bug caught by Mac. Created 6 years, 9 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/rendering/RenderView.h ('k') | no next file » | 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) 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 namespace WebCore { 48 namespace WebCore {
49 49
50 RenderView::RenderView(Document* document) 50 RenderView::RenderView(Document* document)
51 : RenderBlockFlow(document) 51 : RenderBlockFlow(document)
52 , m_frameView(document->view()) 52 , m_frameView(document->view())
53 , m_selectionStart(0) 53 , m_selectionStart(0)
54 , m_selectionEnd(0) 54 , m_selectionEnd(0)
55 , m_selectionStartPos(-1) 55 , m_selectionStartPos(-1)
56 , m_selectionEndPos(-1) 56 , m_selectionEndPos(-1)
57 , m_maximalOutlineSize(0)
58 , m_pageLogicalHeight(0) 57 , m_pageLogicalHeight(0)
59 , m_pageLogicalHeightChanged(false) 58 , m_pageLogicalHeightChanged(false)
60 , m_layoutState(0) 59 , m_layoutState(0)
61 , m_layoutStateDisableCount(0) 60 , m_layoutStateDisableCount(0)
62 , m_renderQuoteHead(0) 61 , m_renderQuoteHead(0)
63 , m_renderCounterCount(0) 62 , m_renderCounterCount(0)
64 { 63 {
65 // init RenderObject attributes 64 // init RenderObject attributes
66 setInline(false); 65 setInline(false);
67 66
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 571
573 // Blocks are responsible for painting line gaps and margin gaps. They m ust be examined as well. 572 // Blocks are responsible for painting line gaps and margin gaps. They m ust be examined as well.
574 for (RenderBlock* block = o->containingBlock(); block && !block->isRende rView(); block = block->containingBlock()) { 573 for (RenderBlock* block = o->containingBlock(); block && !block->isRende rView(); block = block->containingBlock()) {
575 if (!processedBlocks.add(block).isNewEntry) 574 if (!processedBlocks.add(block).isNewEntry)
576 break; 575 break;
577 RenderSelectionInfo(block, true).repaint(); 576 RenderSelectionInfo(block, true).repaint();
578 } 577 }
579 } 578 }
580 } 579 }
581 580
582 // Compositing layer dimensions take outline size into account, so we have to re compute layer
583 // bounds when it changes.
584 // FIXME: This is ugly; it would be nice to have a better way to do this.
585 void RenderView::setMaximalOutlineSize(int o)
586 {
587 if (o != m_maximalOutlineSize) {
588 m_maximalOutlineSize = o;
589
590 // maximalOutlineSize affects compositing layer dimensions.
591 compositor()->setCompositingLayersNeedRebuild(); // FIXME: this reall y just needs to be a geometry update.
592 }
593 }
594
595 // When exploring the RenderTree looking for the nodes involved in the Selection , sometimes it's 581 // When exploring the RenderTree looking for the nodes involved in the Selection , sometimes it's
596 // required to change the traversing direction because the "start" position is b elow the "end" one. 582 // required to change the traversing direction because the "start" position is b elow the "end" one.
597 static inline RenderObject* getNextOrPrevRenderObjectBasedOnDirection(const Rend erObject* o, const RenderObject* stop, bool& continueExploring, bool& exploringB ackwards) 583 static inline RenderObject* getNextOrPrevRenderObjectBasedOnDirection(const Rend erObject* o, const RenderObject* stop, bool& continueExploring, bool& exploringB ackwards)
598 { 584 {
599 RenderObject* next; 585 RenderObject* next;
600 if (exploringBackwards) { 586 if (exploringBackwards) {
601 next = o->previousInPreOrder(); 587 next = o->previousInPreOrder();
602 continueExploring = next && !(next)->isRenderView(); 588 continueExploring = next && !(next)->isRenderView();
603 } else { 589 } else {
604 next = o->nextInPreOrder(); 590 next = o->nextInPreOrder();
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 return viewWidth(IncludeScrollbars) / scale; 969 return viewWidth(IncludeScrollbars) / scale;
984 } 970 }
985 971
986 double RenderView::layoutViewportHeight() const 972 double RenderView::layoutViewportHeight() const
987 { 973 {
988 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 974 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
989 return viewHeight(IncludeScrollbars) / scale; 975 return viewHeight(IncludeScrollbars) / scale;
990 } 976 }
991 977
992 } // namespace WebCore 978 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698