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

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

Issue 332543002: Rename Repaint to Paint Invalidation Part 4 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/RenderRubyBase.cpp ('k') | Source/core/rendering/RenderTable.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 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
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 24 matching lines...) Expand all
35 public: 35 public:
36 RenderSelectionInfoBase() 36 RenderSelectionInfoBase()
37 : m_object(0) 37 : m_object(0)
38 , m_repaintContainer(0) 38 , m_repaintContainer(0)
39 , m_state(RenderObject::SelectionNone) 39 , m_state(RenderObject::SelectionNone)
40 { 40 {
41 } 41 }
42 42
43 RenderSelectionInfoBase(RenderObject* o) 43 RenderSelectionInfoBase(RenderObject* o)
44 : m_object(o) 44 : m_object(o)
45 , m_repaintContainer(o->containerForRepaint()) 45 , m_repaintContainer(o->containerForPaintInvalidation())
46 , m_state(o->selectionState()) 46 , m_state(o->selectionState())
47 { 47 {
48 } 48 }
49 49
50 RenderObject* object() const { return m_object; } 50 RenderObject* object() const { return m_object; }
51 const RenderLayerModelObject* repaintContainer() const { return m_repaintCon tainer; } 51 const RenderLayerModelObject* repaintContainer() const { return m_repaintCon tainer; }
52 RenderObject::SelectionState state() const { return m_state; } 52 RenderObject::SelectionState state() const { return m_state; }
53 53
54 protected: 54 protected:
55 RenderObject* m_object; 55 RenderObject* m_object;
56 const RenderLayerModelObject* m_repaintContainer; 56 const RenderLayerModelObject* m_repaintContainer;
57 RenderObject::SelectionState m_state; 57 RenderObject::SelectionState m_state;
58 }; 58 };
59 59
60 // This struct is used when the selection changes to cache the old and new state of the selection for each RenderObject. 60 // This struct is used when the selection changes to cache the old and new state of the selection for each RenderObject.
61 class RenderSelectionInfo : public RenderSelectionInfoBase { 61 class RenderSelectionInfo : public RenderSelectionInfoBase {
62 public: 62 public:
63 RenderSelectionInfo(RenderObject* o, bool clipToVisibleContent) 63 RenderSelectionInfo(RenderObject* o, bool clipToVisibleContent)
64 : RenderSelectionInfoBase(o) 64 : RenderSelectionInfoBase(o)
65 , m_rect(o->canUpdateSelectionOnRootLineBoxes() ? o->selectionRectForRep aint(m_repaintContainer, clipToVisibleContent) : LayoutRect()) 65 , m_rect(o->canUpdateSelectionOnRootLineBoxes() ? o->selectionRectForPai ntInvalidation(m_repaintContainer, clipToVisibleContent) : LayoutRect())
66 { 66 {
67 } 67 }
68 68
69 void repaint() 69 void repaint()
70 { 70 {
71 m_object->invalidatePaintUsingContainer(m_repaintContainer, enclosingInt Rect(m_rect), InvalidationSelection); 71 m_object->invalidatePaintUsingContainer(m_repaintContainer, enclosingInt Rect(m_rect), InvalidationSelection);
72 } 72 }
73 73
74 LayoutRect rect() const { return m_rect; } 74 LayoutRect rect() const { return m_rect; }
75 75
(...skipping 20 matching lines...) Expand all
96 GapRects rects() const { return m_rects; } 96 GapRects rects() const { return m_rects; }
97 97
98 private: 98 private:
99 GapRects m_rects; // relative to repaint container 99 GapRects m_rects; // relative to repaint container
100 }; 100 };
101 101
102 } // namespace WebCore 102 } // namespace WebCore
103 103
104 104
105 #endif // RenderSelectionInfo_h 105 #endif // RenderSelectionInfo_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderRubyBase.cpp ('k') | Source/core/rendering/RenderTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698