Changeset 49225 in webkit
- Timestamp:
- Oct 6, 2009 11:20:02 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r49214 r49225 1 2009-10-07 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Dual lines in css2.1 layout tests do not match: 6 https://bugs.webkit.org/show_bug.cgi?id=23262 7 8 Now we can put a counter node as the next sibling of a reset node. 9 Re-layout the counter content when the count is updated. 10 11 * fast/css/counters/t1204-increment-00-c-o.html: Added. 12 * fast/css/counters/t1204-increment-01-c-o.html: Added. 13 * platform/mac/fast/css/counters/t1204-increment-00-c-o-expected.checksum: Added. 14 * platform/mac/fast/css/counters/t1204-increment-00-c-o-expected.png: Added. 15 * platform/mac/fast/css/counters/t1204-increment-00-c-o-expected.txt: Added. 16 * platform/mac/fast/css/counters/t1204-increment-01-c-o-expected.checksum: Added. 17 * platform/mac/fast/css/counters/t1204-increment-01-c-o-expected.png: Added. 18 * platform/mac/fast/css/counters/t1204-increment-01-c-o-expected.txt: Added. 19 1 20 2009-10-05 Oliver Hunt <oliver@apple.com> 2 21 -
trunk/WebCore/ChangeLog
r49223 r49225 1 2009-10-07 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Dual lines in css2.1 layout tests do not match: 6 https://bugs.webkit.org/show_bug.cgi?id=23262 7 8 Now we can put a counter node as the next sibling of a reset node. 9 Re-layout the counter content when the count is updated. 10 11 Tests: fast/css/counters/t1204-increment-00-c-o.html 12 fast/css/counters/t1204-increment-01-c-o.html 13 14 * rendering/CounterNode.cpp: 15 (WebCore::CounterNode::recount): 16 * rendering/RenderCounter.cpp: 17 (WebCore::findPlaceForCounter): 18 1 19 2009-10-06 Xan Lopez <xlopez@igalia.com> 2 20 -
trunk/WebCore/rendering/CounterNode.cpp
r47583 r49225 64 64 int oldCount = c->m_countInParent; 65 65 int newCount = c->computeCountInParent(); 66 c->m_countInParent = newCount;67 66 if (oldCount == newCount) 68 67 break; 69 if (c->m_renderer->isCounter()) 70 c->m_renderer->setNeedsLayoutAndPrefWidthsRecalc(); 68 c->m_countInParent = newCount; 69 // m_renderer contains the parent of the render node 70 // corresponding to a CounterNode. Let's find the counter 71 // child and make this re-layout. 72 for (RenderObject* o = c->m_renderer->firstChild(); o; o = o->nextSibling()) 73 if (!o->documentBeingDestroyed() && o->isCounter()) { 74 o->setNeedsLayoutAndPrefWidthsRecalc(); 75 break; 76 } 71 77 } 72 78 } -
trunk/WebCore/rendering/RenderCounter.cpp
r46815 r49225 144 144 RenderObject* prevCounterCandidate = object; 145 145 CounterNode* candidateCounter = 0; 146 // When a reset counter is chosen as candidateCounter, we'll 147 // decide the new node should be a child of the reset node or a 148 // sibling or the reset node. This flag controls it. 149 bool createChildForReset = true; 146 150 while ((prevCounterCandidate = prevCounterCandidate->previousInPreOrder())) { 147 151 CounterNode* c = counter(prevCounterCandidate, counterName, false); 148 152 if (prevCounterCandidate == resetCandidate) { 149 if (!candidateCounter) 153 if (!candidateCounter) { 150 154 candidateCounter = c; 155 createChildForReset = true; 156 } 151 157 if (candidateCounter) { 152 if (c andidateCounter->isReset()) {158 if (createChildForReset && candidateCounter->isReset()) { 153 159 parent = candidateCounter; 154 160 previousSibling = 0; … … 161 167 resetCandidate = previousSiblingOrParent(resetCandidate); 162 168 } else if (c) { 163 if (c->isReset()) 164 candidateCounter = 0; 165 else if (!candidateCounter) 169 if (c->isReset()) { 170 if (c->parent()) { 171 // The new node may be the next sibling of this reset node. 172 createChildForReset = false; 173 candidateCounter = c; 174 } else { 175 createChildForReset = true; 176 candidateCounter = 0; 177 } 178 } else if (!candidateCounter) { 179 createChildForReset = true; 166 180 candidateCounter = c; 181 } 167 182 } 168 183 }
Note: See TracChangeset
for help on using the changeset viewer.