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

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

Issue 669803002: Optimize for horizontal writing mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: w compile fix Created 6 years, 2 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
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, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs et) 621 void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffs et)
622 { 622 {
623 TablePainter(*this).paintObject(paintInfo, paintOffset); 623 TablePainter(*this).paintObject(paintInfo, paintOffset);
624 } 624 }
625 625
626 void RenderTable::subtractCaptionRect(LayoutRect& rect) const 626 void RenderTable::subtractCaptionRect(LayoutRect& rect) const
627 { 627 {
628 for (unsigned i = 0; i < m_captions.size(); i++) { 628 for (unsigned i = 0; i < m_captions.size(); i++) {
629 LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() + m_cap tions[i]->marginBefore() + m_captions[i]->marginAfter(); 629 LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() + m_cap tions[i]->marginBefore() + m_captions[i]->marginAfter();
630 bool captionIsBefore = (m_captions[i]->style()->captionSide() != CAPBOTT OM) ^ style()->isFlippedBlocksWritingMode(); 630 bool captionIsBefore = (m_captions[i]->style()->captionSide() != CAPBOTT OM) ^ style()->slowIsFlippedBlocksWritingMode();
631 if (style()->isHorizontalWritingMode()) { 631 if (style()->isHorizontalWritingMode()) {
632 rect.setHeight(rect.height() - captionLogicalHeight); 632 rect.setHeight(rect.height() - captionLogicalHeight);
633 if (captionIsBefore) 633 if (captionIsBefore)
634 rect.move(0, captionLogicalHeight); 634 rect.move(0, captionLogicalHeight);
635 } else { 635 } else {
636 rect.setWidth(rect.width() - captionLogicalHeight); 636 rect.setWidth(rect.width() - captionLogicalHeight);
637 if (captionIsBefore) 637 if (captionIsBefore)
638 rect.move(captionLogicalHeight, 0); 638 rect.move(captionLogicalHeight, 0);
639 } 639 }
640 } 640 }
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1344 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1345 { 1345 {
1346 ASSERT(cell->isFirstOrLastCellInRow()); 1346 ASSERT(cell->isFirstOrLastCellInRow());
1347 if (hasSameDirectionAs(cell->row())) 1347 if (hasSameDirectionAs(cell->row()))
1348 return style()->borderEnd(); 1348 return style()->borderEnd();
1349 1349
1350 return style()->borderStart(); 1350 return style()->borderStart();
1351 } 1351 }
1352 1352
1353 } 1353 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698