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

Side by Side Diff: Source/core/rendering/RenderListMarker.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 { 1113 {
1114 return m_image && !m_image->errorOccurred(); 1114 return m_image && !m_image->errorOccurred();
1115 } 1115 }
1116 1116
1117 LayoutRect RenderListMarker::localSelectionRect() 1117 LayoutRect RenderListMarker::localSelectionRect()
1118 { 1118 {
1119 InlineBox* box = inlineBoxWrapper(); 1119 InlineBox* box = inlineBoxWrapper();
1120 if (!box) 1120 if (!box)
1121 return LayoutRect(LayoutPoint(), size()); 1121 return LayoutRect(LayoutPoint(), size());
1122 RootInlineBox& root = inlineBoxWrapper()->root(); 1122 RootInlineBox& root = inlineBoxWrapper()->root();
1123 LayoutUnit newLogicalTop = root.block().style()->isFlippedBlocksWritingMode( ) ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.selectio nTop() - inlineBoxWrapper()->logicalTop(); 1123 LayoutUnit newLogicalTop = root.block().style()->slowIsFlippedBlocksWritingM ode() ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.sele ctionTop() - inlineBoxWrapper()->logicalTop();
1124 if (root.block().style()->isHorizontalWritingMode()) 1124 if (root.block().style()->isHorizontalWritingMode())
1125 return LayoutRect(0, newLogicalTop, width(), root.selectionHeight()); 1125 return LayoutRect(0, newLogicalTop, width(), root.selectionHeight());
1126 return LayoutRect(newLogicalTop, 0, root.selectionHeight(), height()); 1126 return LayoutRect(newLogicalTop, 0, root.selectionHeight(), height());
1127 } 1127 }
1128 1128
1129 void RenderListMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse t) 1129 void RenderListMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffse t)
1130 { 1130 {
1131 ListMarkerPainter(*this).paint(paintInfo, paintOffset); 1131 ListMarkerPainter(*this).paint(paintInfo, paintOffset);
1132 } 1132 }
1133 1133
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 if (style()) { 1642 if (style()) {
1643 // Reuse the current margins. Otherwise resetting the margins to initial values 1643 // Reuse the current margins. Otherwise resetting the margins to initial values
1644 // would trigger unnecessary layout. 1644 // would trigger unnecessary layout.
1645 newStyle->setMarginStart(style()->marginStart()); 1645 newStyle->setMarginStart(style()->marginStart());
1646 newStyle->setMarginEnd(style()->marginRight()); 1646 newStyle->setMarginEnd(style()->marginRight());
1647 } 1647 }
1648 setStyle(newStyle.release()); 1648 setStyle(newStyle.release());
1649 } 1649 }
1650 1650
1651 } // namespace blink 1651 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698