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

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

Issue 23628004: Tables with display:inline rendered in wrong position. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 | « Source/core/rendering/RenderInline.cpp ('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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 updateHitTestResult(result, flipForWritingMode(locationInContainer.point () - toLayoutSize(adjustedLocation))); 1415 updateHitTestResult(result, flipForWritingMode(locationInContainer.point () - toLayoutSize(adjustedLocation)));
1416 if (!result.addNodeToRectBasedTestResult(node(), request, locationInCont ainer, boundsRect)) 1416 if (!result.addNodeToRectBasedTestResult(node(), request, locationInCont ainer, boundsRect))
1417 return true; 1417 return true;
1418 } 1418 }
1419 1419
1420 return false; 1420 return false;
1421 } 1421 }
1422 1422
1423 RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent) 1423 RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent)
1424 { 1424 {
1425 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE); 1425 RefPtr<RenderStyle> newStyle;
1426 if (parent->isInline() && !parent->isReplaced())
1427 newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), INLINE_TABLE);
1428 else
1429 newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE);
1426 RenderTable* newTable = new RenderTable(0); 1430 RenderTable* newTable = new RenderTable(0);
1427 newTable->setDocumentForAnonymous(&parent->document()); 1431 newTable->setDocumentForAnonymous(&parent->document());
1428 newTable->setStyle(newStyle.release()); 1432 newTable->setStyle(newStyle.release());
1429 return newTable; 1433 return newTable;
1430 } 1434 }
1431 1435
1432 const BorderValue& RenderTable::tableStartBorderAdjoiningCell(const RenderTableC ell* cell) const 1436 const BorderValue& RenderTable::tableStartBorderAdjoiningCell(const RenderTableC ell* cell) const
1433 { 1437 {
1434 ASSERT(cell->isFirstOrLastCellInRow()); 1438 ASSERT(cell->isFirstOrLastCellInRow());
1435 if (hasSameDirectionAs(cell->row())) 1439 if (hasSameDirectionAs(cell->row()))
1436 return style()->borderStart(); 1440 return style()->borderStart();
1437 1441
1438 return style()->borderEnd(); 1442 return style()->borderEnd();
1439 } 1443 }
1440 1444
1441 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1445 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1442 { 1446 {
1443 ASSERT(cell->isFirstOrLastCellInRow()); 1447 ASSERT(cell->isFirstOrLastCellInRow());
1444 if (hasSameDirectionAs(cell->row())) 1448 if (hasSameDirectionAs(cell->row()))
1445 return style()->borderEnd(); 1449 return style()->borderEnd();
1446 1450
1447 return style()->borderStart(); 1451 return style()->borderStart();
1448 } 1452 }
1449 1453
1450 } 1454 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698