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

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

Issue 18374008: Propagate writing-mode from the first region to the flow thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address minor issues raised together with the LGTM. Created 7 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool hasChildren() const { return !m_flowThreadChildList.isEmpty(); } 61 bool hasChildren() const { return !m_flowThreadChildList.isEmpty(); }
62 #ifndef NDEBUG 62 #ifndef NDEBUG
63 bool hasChild(RenderObject* child) const { return m_flowThreadChildList.cont ains(child); } 63 bool hasChild(RenderObject* child) const { return m_flowThreadChildList.cont ains(child); }
64 #endif 64 #endif
65 65
66 void pushDependencies(RenderNamedFlowThreadList&); 66 void pushDependencies(RenderNamedFlowThreadList&);
67 67
68 virtual void addRegionToThread(RenderRegion*) OVERRIDE; 68 virtual void addRegionToThread(RenderRegion*) OVERRIDE;
69 virtual void removeRegionFromThread(RenderRegion*) OVERRIDE; 69 virtual void removeRegionFromThread(RenderRegion*) OVERRIDE;
70 70
71 virtual void regionChangedWritingMode(RenderRegion*) OVERRIDE;
72
71 bool overset() const { return m_overset; } 73 bool overset() const { return m_overset; }
72 void computeOversetStateForRegions(LayoutUnit oldClientAfterEdge); 74 void computeOversetStateForRegions(LayoutUnit oldClientAfterEdge);
73 75
74 void registerNamedFlowContentNode(Node*); 76 void registerNamedFlowContentNode(Node*);
75 void unregisterNamedFlowContentNode(Node*); 77 void unregisterNamedFlowContentNode(Node*);
76 const NamedFlowContentNodes& contentNodes() const { return m_contentNodes; } 78 const NamedFlowContentNodes& contentNodes() const { return m_contentNodes; }
77 bool hasContentNode(Node* contentNode) const { ASSERT(contentNode); return m _contentNodes.contains(contentNode); } 79 bool hasContentNode(Node* contentNode) const { ASSERT(contentNode); return m _contentNodes.contains(contentNode); }
78 bool isMarkedForDestruction() const; 80 bool isMarkedForDestruction() const;
79 void getRanges(Vector<RefPtr<Range> >&, const RenderRegion*) const; 81 void getRanges(Vector<RefPtr<Range> >&, const RenderRegion*) const;
80 82
(...skipping 16 matching lines...) Expand all
97 void removeDependencyOnFlowThread(RenderNamedFlowThread*); 99 void removeDependencyOnFlowThread(RenderNamedFlowThread*);
98 100
99 void addRegionToNamedFlowThread(RenderRegion*); 101 void addRegionToNamedFlowThread(RenderRegion*);
100 102
101 void checkInvalidRegions(); 103 void checkInvalidRegions();
102 104
103 bool canBeDestroyed() const { return m_invalidRegionList.isEmpty() && m_regi onList.isEmpty() && m_contentNodes.isEmpty(); } 105 bool canBeDestroyed() const { return m_invalidRegionList.isEmpty() && m_regi onList.isEmpty() && m_contentNodes.isEmpty(); }
104 void regionLayoutUpdateEventTimerFired(Timer<RenderNamedFlowThread>*); 106 void regionLayoutUpdateEventTimerFired(Timer<RenderNamedFlowThread>*);
105 void regionOversetChangeEventTimerFired(Timer<RenderNamedFlowThread>*); 107 void regionOversetChangeEventTimerFired(Timer<RenderNamedFlowThread>*);
106 void clearContentNodes(); 108 void clearContentNodes();
109 void updateWritingMode();
107 110
108 private: 111 private:
109 // Observer flow threads have invalid regions that depend on the state of th is thread 112 // Observer flow threads have invalid regions that depend on the state of th is thread
110 // to re-validate their regions. Keeping a set of observer threads make it e asy 113 // to re-validate their regions. Keeping a set of observer threads make it e asy
111 // to notify them when a region was removed from this flow. 114 // to notify them when a region was removed from this flow.
112 RenderNamedFlowThreadCountedSet m_observerThreadsSet; 115 RenderNamedFlowThreadCountedSet m_observerThreadsSet;
113 116
114 // Some threads need to have a complete layout before we layout this flow. 117 // Some threads need to have a complete layout before we layout this flow.
115 // That's because they contain a RenderRegion that should display this threa d. The set makes it 118 // That's because they contain a RenderRegion that should display this threa d. The set makes it
116 // easy to sort the order of threads layout. 119 // easy to sort the order of threads layout.
(...skipping 28 matching lines...) Expand all
145 return static_cast<const RenderNamedFlowThread*>(object); 148 return static_cast<const RenderNamedFlowThread*>(object);
146 } 149 }
147 150
148 // This will catch anyone doing an unnecessary cast. 151 // This will catch anyone doing an unnecessary cast.
149 void toRenderNamedFlowThread(const RenderNamedFlowThread*); 152 void toRenderNamedFlowThread(const RenderNamedFlowThread*);
150 153
151 } // namespace WebCore 154 } // namespace WebCore
152 155
153 #endif // RenderNamedFlowThread_h 156 #endif // RenderNamedFlowThread_h
154 157
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlowThread.cpp ('k') | Source/core/rendering/RenderNamedFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698