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

Side by Side Diff: Source/core/rendering/RenderObject.h

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.cpp ('k') | Source/core/rendering/RenderReplaced.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 914
915 // The current selection state for an object. For blocks, the state refers to the state of the leaf 915 // The current selection state for an object. For blocks, the state refers to the state of the leaf
916 // descendants (as described above in the SelectionState enum declaration). 916 // descendants (as described above in the SelectionState enum declaration).
917 SelectionState selectionState() const { return m_bitfields.selectionState(); } 917 SelectionState selectionState() const { return m_bitfields.selectionState(); }
918 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect ionState(state); } 918 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect ionState(state); }
919 inline void setSelectionStateIfNeeded(SelectionState); 919 inline void setSelectionStateIfNeeded(SelectionState);
920 bool canUpdateSelectionOnRootLineBoxes(); 920 bool canUpdateSelectionOnRootLineBoxes();
921 921
922 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest 922 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest
923 // possible bounding box for the selection. The rect returned is in the coor dinate space of the paint invalidation container's backing. 923 // possible bounding box for the selection. The rect returned is in the coor dinate space of the paint invalidation container's backing.
924 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* /*paintInvalidationContainer*/, bool /*clipToVisibleContent*/ = true) { r eturn LayoutRect(); } 924 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* /*paintInvalidationContainer*/, bool /*clipToVisibleContent*/ = true) con st { return LayoutRect(); }
925 925
926 virtual bool canBeSelectionLeaf() const { return false; } 926 virtual bool canBeSelectionLeaf() const { return false; }
927 bool hasSelectedChildren() const { return selectionState() != SelectionNone; } 927 bool hasSelectedChildren() const { return selectionState() != SelectionNone; }
928 928
929 bool isSelectable() const; 929 bool isSelectable() const;
930 // Obtains the selection colors that should be used when painting a selectio n. 930 // Obtains the selection colors that should be used when painting a selectio n.
931 Color selectionBackgroundColor() const; 931 Color selectionBackgroundColor() const;
932 Color selectionForegroundColor() const; 932 Color selectionForegroundColor() const;
933 Color selectionEmphasisMarkColor() const; 933 Color selectionEmphasisMarkColor() const;
934 934
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 void showTree(const blink::RenderObject*); 1562 void showTree(const blink::RenderObject*);
1563 void showLineTree(const blink::RenderObject*); 1563 void showLineTree(const blink::RenderObject*);
1564 void showRenderTree(const blink::RenderObject* object1); 1564 void showRenderTree(const blink::RenderObject* object1);
1565 // We don't make object2 an optional parameter so that showRenderTree 1565 // We don't make object2 an optional parameter so that showRenderTree
1566 // can be called from gdb easily. 1566 // can be called from gdb easily.
1567 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1567 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1568 1568
1569 #endif 1569 #endif
1570 1570
1571 #endif // RenderObject_h 1571 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListMarker.cpp ('k') | Source/core/rendering/RenderReplaced.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698