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

Side by Side Diff: Source/WebCore/rendering/RenderFlowThread.cpp

Issue 9546037: Merge 107622 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/rendering/RenderFlowThread.h ('k') | Source/WebCore/rendering/RenderObject.cpp » ('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 2011 Adobe Systems Incorporated. All Rights Reserved. 2 * Copyright 2011 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 m_flowThreadChildList.insertBefore(beforeChild, newChild); 130 m_flowThreadChildList.insertBefore(beforeChild, newChild);
131 else 131 else
132 m_flowThreadChildList.add(newChild); 132 m_flowThreadChildList.add(newChild);
133 } 133 }
134 134
135 void RenderFlowThread::removeFlowChild(RenderObject* child) 135 void RenderFlowThread::removeFlowChild(RenderObject* child)
136 { 136 {
137 m_flowThreadChildList.remove(child); 137 m_flowThreadChildList.remove(child);
138 } 138 }
139 139
140 void RenderFlowThread::removeFlowChildInfo(RenderObject* child)
141 {
142 if (child->isBox()) {
143 removeRenderBoxRegionInfo(toRenderBox(child));
144 if (child->canHaveRegionStyle())
145 clearRenderBoxCustomStyle(toRenderBox(child));
146 }
147 }
148
140 // Compare two regions to determine in which one the content should flow first. 149 // Compare two regions to determine in which one the content should flow first.
141 // The function returns true if the first passed region is "less" than the secon d passed region. 150 // The function returns true if the first passed region is "less" than the secon d passed region.
142 // If the first region appears before second region in DOM, 151 // If the first region appears before second region in DOM,
143 // the first region is "less" than the second region. 152 // the first region is "less" than the second region.
144 // If the first region is "less" than the second region, the first region receiv es content before second region. 153 // If the first region is "less" than the second region, the first region receiv es content before second region.
145 static bool compareRenderRegions(const RenderRegion* firstRegion, const RenderRe gion* secondRegion) 154 static bool compareRenderRegions(const RenderRegion* firstRegion, const RenderRe gion* secondRegion)
146 { 155 {
147 ASSERT(firstRegion); 156 ASSERT(firstRegion);
148 ASSERT(secondRegion); 157 ASSERT(secondRegion);
149 158
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 783
775 if (oldEndRegion == region) 784 if (oldEndRegion == region)
776 insideOldRegionRange = false; 785 insideOldRegionRange = false;
777 if (newEndRegion == region) 786 if (newEndRegion == region)
778 insideNewRegionRange = false; 787 insideNewRegionRange = false;
779 } 788 }
780 } 789 }
781 790
782 void RenderFlowThread::setRegionRangeForBox(const RenderBox* box, LayoutUnit off setFromLogicalTopOfFirstPage) 791 void RenderFlowThread::setRegionRangeForBox(const RenderBox* box, LayoutUnit off setFromLogicalTopOfFirstPage)
783 { 792 {
793 if (!hasRegions())
794 return;
795
784 // FIXME: Not right for differing writing-modes. 796 // FIXME: Not right for differing writing-modes.
785 RenderRegion* startRegion = renderRegionForLine(offsetFromLogicalTopOfFirstP age, true); 797 RenderRegion* startRegion = renderRegionForLine(offsetFromLogicalTopOfFirstP age, true);
786 RenderRegion* endRegion = renderRegionForLine(offsetFromLogicalTopOfFirstPag e + box->logicalHeight(), true); 798 RenderRegion* endRegion = renderRegionForLine(offsetFromLogicalTopOfFirstPag e + box->logicalHeight(), true);
787 RenderRegionRangeMap::iterator it = m_regionRangeMap.find(box); 799 RenderRegionRangeMap::iterator it = m_regionRangeMap.find(box);
788 if (it == m_regionRangeMap.end()) { 800 if (it == m_regionRangeMap.end()) {
789 m_regionRangeMap.set(box, RenderRegionRange(startRegion, endRegion)); 801 m_regionRangeMap.set(box, RenderRegionRange(startRegion, endRegion));
790 return; 802 return;
791 } 803 }
792 804
793 // If nothing changed, just bail. 805 // If nothing changed, just bail.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 841
830 WebKitNamedFlow* RenderFlowThread::ensureNamedFlow() 842 WebKitNamedFlow* RenderFlowThread::ensureNamedFlow()
831 { 843 {
832 if (!m_namedFlow) 844 if (!m_namedFlow)
833 m_namedFlow = WebKitNamedFlow::create(); 845 m_namedFlow = WebKitNamedFlow::create();
834 846
835 return m_namedFlow.get(); 847 return m_namedFlow.get();
836 } 848 }
837 849
838 } // namespace WebCore 850 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderFlowThread.h ('k') | Source/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698