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

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

Issue 566973002: Constify the rendering/ selection code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/RenderListMarker.h ('k') | Source/core/rendering/RenderObject.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 1808
1809 void RenderListMarker::setSelectionState(SelectionState state) 1809 void RenderListMarker::setSelectionState(SelectionState state)
1810 { 1810 {
1811 // The selection state for our containing block hierarchy is updated by the base class call. 1811 // The selection state for our containing block hierarchy is updated by the base class call.
1812 RenderBox::setSelectionState(state); 1812 RenderBox::setSelectionState(state);
1813 1813
1814 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes()) 1814 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes())
1815 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone ); 1815 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone );
1816 } 1816 }
1817 1817
1818 LayoutRect RenderListMarker::selectionRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, bool clipToVisibleContent) 1818 LayoutRect RenderListMarker::selectionRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, bool clipToVisibleContent) const
1819 { 1819 {
1820 ASSERT(!needsLayout()); 1820 ASSERT(!needsLayout());
1821 1821
1822 if (selectionState() == SelectionNone || !inlineBoxWrapper()) 1822 if (selectionState() == SelectionNone || !inlineBoxWrapper())
1823 return LayoutRect(); 1823 return LayoutRect();
1824 1824
1825 RootInlineBox& root = inlineBoxWrapper()->root(); 1825 RootInlineBox& root = inlineBoxWrapper()->root();
1826 LayoutRect rect(0, root.selectionTop() - y(), width(), root.selectionHeight( )); 1826 LayoutRect rect(0, root.selectionTop() - y(), width(), root.selectionHeight( ));
1827 1827
1828 if (clipToVisibleContent) 1828 if (clipToVisibleContent)
1829 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); 1829 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0);
1830 else 1830 else
1831 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer) .enclosingBoundingBox(); 1831 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer) .enclosingBoundingBox();
1832 1832
1833 return rect; 1833 return rect;
1834 } 1834 }
1835 1835
1836 } // namespace blink 1836 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListMarker.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698