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

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

Issue 7048016: Merge 86781 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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 | « LayoutTests/fast/table/table-captions-child-visible-crash-expected.txt ('k') | no next file » | 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 (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 694
695 return 0; 695 return 0;
696 } 696 }
697 697
698 void RenderTable::recalcCaption(RenderBlock* caption) const 698 void RenderTable::recalcCaption(RenderBlock* caption) const
699 { 699 {
700 if (!m_caption) { 700 if (!m_caption) {
701 m_caption = caption; 701 m_caption = caption;
702 m_caption->setNeedsLayout(true); 702 m_caption->setNeedsLayout(true);
703 } else { 703 } else {
704 // Detach the child from the table.
705 const RenderBlock* block = static_cast<const RenderBlock*>(this);
706 const_cast<RenderBlock*>(block)->removeChild(caption);
707
708 // Make sure to null out the child's renderer. 704 // Make sure to null out the child's renderer.
709 if (Node* node = caption->node()) 705 if (Node* node = caption->node())
710 node->setRenderer(0); 706 node->setRenderer(0);
711 707
712 // Destroy the child now. 708 // Destroy the child now.
713 caption->destroy(); 709 caption->destroy();
714 } 710 }
715 } 711 }
716 712
717 void RenderTable::recalcSections() const 713 void RenderTable::recalcSections() const
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) { 1217 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
1222 updateHitTestResult(result, flipForWritingMode(IntPoint(xPos - tx, yPos - ty))); 1218 updateHitTestResult(result, flipForWritingMode(IntPoint(xPos - tx, yPos - ty)));
1223 if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect) ) 1219 if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect) )
1224 return true; 1220 return true;
1225 } 1221 }
1226 1222
1227 return false; 1223 return false;
1228 } 1224 }
1229 1225
1230 } 1226 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/table-captions-child-visible-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698