Changeset 13372 in webkit
- Timestamp:
- Mar 18, 2006 1:39:14 AM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r13371 r13372 1 2006-03-18 David Hyatt <hyatt@apple.com> 2 3 Fix for bug 7841, tables, table rows, and table row groups should 4 all support overflow:hidden. 5 6 Reviewed by eric 7 8 * css/cssstyleselector.cpp: 9 (WebCore::CSSStyleSelector::adjustRenderStyle): 10 * rendering/RenderTable.cpp: 11 (WebCore::RenderTable::layout): 12 (WebCore::RenderTable::paint): 13 (WebCore::RenderTable::getOverflowClipRect): 14 * rendering/RenderTable.h: 15 * rendering/RenderTableCol.h: 16 (WebCore::RenderTableCol::requiresLayer): 17 * rendering/RenderTableRow.h: 18 (WebCore::RenderTableRow::requiresLayer): 19 * rendering/render_box.cpp: 20 (WebCore::RenderBox::setStyle): 21 * rendering/render_layer.cpp: 22 (WebCore::RenderLayer::paintLayer): 23 1 24 2006-03-17 Alice Liu <alice.liu@apple.com> 2 25 -
trunk/WebCore/css/cssstyleselector.cpp
r13369 r13372 1002 1002 style->addToTextDecorationsInEffect(style->textDecoration()); 1003 1003 1004 // Table rows, sections and the table itself will support overflow:hidden and will ignore scroll/auto. 1005 // FIXME: Eventually table sections will support auto and scroll. 1006 if (style->overflow() != OVISIBLE && style->overflow() != OHIDDEN && 1007 (style->display() == TABLE || style->display() == INLINE_TABLE || 1008 style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW)) 1009 style->setOverflow(OVISIBLE); 1010 1004 1011 // Cull out any useless layers and also repeat patterns into additional layers. 1005 1012 style->adjustBackgroundLayers(); -
trunk/WebCore/rendering/RenderTable.cpp
r13358 r13372 265 265 266 266 RenderObject *child = firstChild(); 267 while (child) {267 while (child) { 268 268 // FIXME: What about a form that has a display value that makes it a table section? 269 269 if (child->needsLayout() && !(child->element() && child->element()->hasTagName(formTag))) … … 387 387 if (paintAction == PaintActionBlockBackground) 388 388 return; 389 389 390 // We don't paint our own background, but we do let the kids paint their backgrounds. 390 391 if (paintAction == PaintActionChildBlockBackgrounds) … … 771 772 } 772 773 774 IntRect RenderTable::getOverflowClipRect(int tx, int ty) 775 { 776 IntRect rect = RenderBlock::getOverflowClipRect(tx, ty); 777 778 // If we have a caption, expand the clip to include the caption. 779 // FIXME: Technically this is wrong, but it's virtually impossible to fix this 780 // for real until captions have been re-written. 781 // FIXME: This code assumes (like all our other caption code) that only top/bottom are 782 // supported. When we actually support left/right and stop mapping them to top/bottom, 783 // we might have to hack this code first (depending on what order we do these bug fixes in). 784 if (tCaption) { 785 rect.setHeight(height()); 786 rect.setY(ty); 787 } 788 789 return rect; 790 } 791 773 792 #ifndef NDEBUG 774 793 void RenderTable::dump(QTextStream *stream, QString ind) const -
trunk/WebCore/rendering/RenderTable.h
r13149 r13372 159 159 bool hasSections() const { return head || foot || firstBody; } 160 160 161 virtual IntRect getOverflowClipRect(int tx, int ty); 162 161 163 private: 162 164 void recalcSections(); -
trunk/WebCore/rendering/RenderTableCol.h
r12298 r13372 42 42 virtual void updateFromElement(); 43 43 virtual bool canHaveChildren() const; 44 virtual bool requiresLayer() { return false; } 44 45 45 46 #ifndef NDEBUG -
trunk/WebCore/rendering/RenderTableRow.h
r13366 r13372 49 49 50 50 // The only time rows get a layer is when they have transparency. 51 virtual bool requiresLayer() { return isTransparent() ; }51 virtual bool requiresLayer() { return isTransparent() || hasOverflowClip(); } 52 52 53 53 virtual void paint(PaintInfo& i, int tx, int ty); -
trunk/WebCore/rendering/render_box.cpp
r13346 r13372 94 94 } 95 95 96 // FIXME: Note that we restrict overflow to blocks for now. One day table bodies97 // will need to support overflow.98 96 // We also handle <body> and <html>, whose overflow applies to the viewport. 99 if (_style->overflow() != OVISIBLE && isBlockFlow() && !isRoot() && (!isBody() || !document()->isHTMLDocument())) 97 if (_style->overflow() != OVISIBLE && !isRoot() && (!isBody() || !document()->isHTMLDocument()) && 98 (isRenderBlock() || isTableRow() || isTableSection())) 100 99 setHasOverflowClip(); 101 100 -
trunk/WebCore/rendering/render_layer.cpp
r13369 r13372 1105 1105 // Paint the background. 1106 1106 RenderObject::PaintInfo info(p, damageRect, PaintActionBlockBackground, paintingRootForRenderer); 1107 renderer()->paint(info, x - renderer()->xPos(), y - renderer()->yPos() + renderer()->borderTopExtra()); 1107 renderer()->paint(info, x - renderer()->xPos(), y - renderer()->yPos() + renderer()->borderTopExtra()); 1108 1108 1109 // Our scrollbar widgets paint exactly when we tell them to, so that they work properly with 1109 1110 // z-index. We paint after we painted the background/border, so that the scrollbars will
Note: See TracChangeset
for help on using the changeset viewer.