Changeset 21602 in webkit
- Timestamp:
- May 19, 2007 4:09:17 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r21601 r21602 1 2007-05-19 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Darin. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=13774 6 REGRESSION: Crash emailing blog entry using Google Reader 7 8 * fast/table/stale-grid-crash-expected.checksum: Added. 9 * fast/table/stale-grid-crash-expected.png: Added. 10 * fast/table/stale-grid-crash-expected.txt: Added. 11 * fast/table/stale-grid-crash.html: Added. 12 1 13 2007-05-19 Mitz Pettel <mitz@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r21601 r21602 1 2007-05-19 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Darin. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=13774 6 REGRESSION: Crash emailing blog entry using Google Reader 7 8 Test: fast/table/stale-grid-crash.html 9 10 * rendering/RenderTable.cpp: 11 (WebCore::RenderTable::recalcSections): Made const and replaced 12 setNeedsLayout(true) with an assertion that the table is already 13 marked for layout. 14 (WebCore::RenderTable::sectionAbove): Added call to recalcSectionsIfNeeded(). 15 (WebCore::RenderTable::sectionBelow): Ditto. 16 (WebCore::RenderTable::cellAbove): Ditto. 17 (WebCore::RenderTable::cellBelow): Ditto. 18 (WebCore::RenderTable::cellBefore): Ditto. 19 (WebCore::RenderTable::cellAfter): Ditto. 20 * rendering/RenderTable.h: 21 Made some private member variables which are used in section recalc mutable. 22 (WebCore::RenderTable::setNeedsSectionRecalc): Moved the call to 23 setNeedsLayout() from recalcSections() into here, because I made 24 recalcSections() const. 25 (WebCore::RenderTable::recalcSectionsIfNeeded): Made const. 26 1 27 2007-05-19 Mitz Pettel <mitz@webkit.org> 2 28 -
trunk/WebCore/rendering/RenderTable.cpp
r21520 r21602 603 603 } 604 604 605 void RenderTable::recalcSections() 605 void RenderTable::recalcSections() const 606 606 { 607 607 m_caption = 0; … … 670 670 m_columns.resize(maxCols); 671 671 m_columnPos.resize(maxCols + 1); 672 672 673 ASSERT(selfNeedsLayout()); 674 673 675 m_needsSectionRecalc = false; 674 setNeedsLayout(true);675 676 } 676 677 … … 935 936 RenderTableSection* RenderTable::sectionAbove(const RenderTableSection* section, bool skipEmptySections) const 936 937 { 938 recalcSectionsIfNeeded(); 939 937 940 if (section == m_head) 938 941 return 0; 942 939 943 RenderObject* prevSection = section == m_foot ? lastChild() : section->previousSibling(); 940 944 while (prevSection) { … … 950 954 RenderTableSection* RenderTable::sectionBelow(const RenderTableSection* section, bool skipEmptySections) const 951 955 { 956 recalcSectionsIfNeeded(); 957 952 958 if (section == m_foot) 953 959 return 0; 960 954 961 RenderObject* nextSection = section == m_head ? firstChild() : section->nextSibling(); 955 962 while (nextSection) { … … 965 972 RenderTableCell* RenderTable::cellAbove(const RenderTableCell* cell) const 966 973 { 974 recalcSectionsIfNeeded(); 975 967 976 // Find the section and row to look in 968 977 int r = cell->row(); … … 995 1004 RenderTableCell* RenderTable::cellBelow(const RenderTableCell* cell) const 996 1005 { 1006 recalcSectionsIfNeeded(); 1007 997 1008 // Find the section and row to look in 998 1009 int r = cell->row() + cell->rowSpan() - 1; … … 1025 1036 RenderTableCell* RenderTable::cellBefore(const RenderTableCell* cell) const 1026 1037 { 1038 recalcSectionsIfNeeded(); 1039 1027 1040 RenderTableSection* section = cell->section(); 1028 1041 int effCol = colToEffCol(cell->col()); … … 1041 1054 RenderTableCell* RenderTable::cellAfter(const RenderTableCell* cell) const 1042 1055 { 1056 recalcSectionsIfNeeded(); 1057 1043 1058 int effCol = colToEffCol(cell->col() + cell->colSpan()); 1044 1059 if (effCol >= numEffCols()) -
trunk/WebCore/rendering/RenderTable.h
r21093 r21602 164 164 165 165 bool needsSectionRecalc() const { return m_needsSectionRecalc; } 166 void setNeedsSectionRecalc() { m_needsSectionRecalc = true; } 166 void setNeedsSectionRecalc() 167 { 168 if (documentBeingDestroyed()) 169 return; 170 m_needsSectionRecalc = true; 171 setNeedsLayout(true); 172 } 167 173 168 174 virtual RenderObject* removeChildNode(RenderObject*, bool fullRemove = true); … … 182 188 virtual IntRect getOverflowClipRect(int tx, int ty); 183 189 184 void recalcSectionsIfNeeded() 190 void recalcSectionsIfNeeded() const 185 191 { 186 192 if (m_needsSectionRecalc) … … 193 199 194 200 private: 195 void recalcSections() ;196 197 Vector<int> m_columnPos;198 Vector<ColumnStruct> m_columns;199 200 RenderBlock* m_caption;201 RenderTableSection* m_head;202 RenderTableSection* m_foot;203 RenderTableSection* m_firstBody;201 void recalcSections() const; 202 203 mutable Vector<int> m_columnPos; 204 mutable Vector<ColumnStruct> m_columns; 205 206 mutable RenderBlock* m_caption; 207 mutable RenderTableSection* m_head; 208 mutable RenderTableSection* m_foot; 209 mutable RenderTableSection* m_firstBody; 204 210 205 211 TableLayout* m_tableLayout; … … 210 216 unsigned m_rules : 4; // Rules 211 217 212 bool m_hasColElements : 1;218 mutable bool m_hasColElements : 1; 213 219 unsigned m_padding : 22; 214 bool m_needsSectionRecalc : 1;220 mutable bool m_needsSectionRecalc : 1; 215 221 216 222 short m_hSpacing;
Note: See TracChangeset
for help on using the changeset viewer.