OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // FIXME: We need to find a way to set up overflow properly. Our flow thread
hasn't gotten a layout | 112 // FIXME: We need to find a way to set up overflow properly. Our flow thread
hasn't gotten a layout |
113 // yet, so we can't look to it for correct information. It's possible we cou
ld wait until after the RenderFlowThread | 113 // yet, so we can't look to it for correct information. It's possible we cou
ld wait until after the RenderFlowThread |
114 // gets a layout, and then try to propagate overflow information back to the
region, and then mark for a second layout. | 114 // gets a layout, and then try to propagate overflow information back to the
region, and then mark for a second layout. |
115 // That second layout would then be able to use the information from the Ren
derFlowThread to set up overflow. | 115 // That second layout would then be able to use the information from the Ren
derFlowThread to set up overflow. |
116 // | 116 // |
117 // The big problem though is that overflow needs to be region-specific. We c
an't simply use the RenderFlowThread's global | 117 // The big problem though is that overflow needs to be region-specific. We c
an't simply use the RenderFlowThread's global |
118 // overflow values, since then we'd always think any narrow region had huge
overflow (all the way to the width of the | 118 // overflow values, since then we'd always think any narrow region had huge
overflow (all the way to the width of the |
119 // RenderFlowThread itself). | 119 // RenderFlowThread itself). |
120 } | 120 } |
121 | 121 |
122 void RenderRegion::paintInvalidationOfFlowThreadContentRectangle(const LayoutRec
t& paintInvalidationRect, const LayoutRect& flowThreadPortionRect, const LayoutR
ect& flowThreadPortionOverflowRect, const LayoutPoint& regionLocation) | |
123 { | |
124 ASSERT(isValid()); | |
125 | |
126 // We only have to issue a paint invalidation in this region if the region r
ect intersects the paint invalidation rect. | |
127 LayoutRect flippedFlowThreadPortionRect(flowThreadPortionRect); | |
128 LayoutRect flippedFlowThreadPortionOverflowRect(flowThreadPortionOverflowRec
t); | |
129 flowThread()->flipForWritingMode(flippedFlowThreadPortionRect); // Put the r
egion rects into physical coordinates. | |
130 flowThread()->flipForWritingMode(flippedFlowThreadPortionOverflowRect); | |
131 | |
132 LayoutRect clippedRect(paintInvalidationRect); | |
133 clippedRect.intersect(flippedFlowThreadPortionOverflowRect); | |
134 if (clippedRect.isEmpty()) | |
135 return; | |
136 | |
137 // Put the region rect into the region's physical coordinate space. | |
138 clippedRect.setLocation(regionLocation + (clippedRect.location() - flippedFl
owThreadPortionRect.location())); | |
139 | |
140 // Now switch to the region's writing mode coordinate space and let it issue
paint invalidations itself. | |
141 flipForWritingMode(clippedRect); | |
142 | |
143 invalidatePaintRectangle(clippedRect); | |
144 } | |
145 | |
146 void RenderRegion::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La
youtUnit& maxLogicalWidth) const | 122 void RenderRegion::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La
youtUnit& maxLogicalWidth) const |
147 { | 123 { |
148 if (!isValid()) { | 124 if (!isValid()) { |
149 RenderBlockFlow::computeIntrinsicLogicalWidths(minLogicalWidth, maxLogic
alWidth); | 125 RenderBlockFlow::computeIntrinsicLogicalWidths(minLogicalWidth, maxLogic
alWidth); |
150 return; | 126 return; |
151 } | 127 } |
152 | 128 |
153 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); | 129 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); |
154 maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth(); | 130 maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth(); |
155 } | 131 } |
156 | 132 |
157 } // namespace blink | 133 } // namespace blink |
OLD | NEW |