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

Side by Side Diff: Source/core/rendering/RenderBlockFlow.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 if (!m_floatingObjects) 2167 if (!m_floatingObjects)
2168 return; 2168 return;
2169 2169
2170 markSiblingsWithFloatsForLayout(); 2170 markSiblingsWithFloatsForLayout();
2171 2171
2172 m_floatingObjects->clear(); 2172 m_floatingObjects->clear();
2173 } 2173 }
2174 2174
2175 LayoutPoint RenderBlockFlow::flipFloatForWritingModeForChild(const FloatingObjec t* child, const LayoutPoint& point) const 2175 LayoutPoint RenderBlockFlow::flipFloatForWritingModeForChild(const FloatingObjec t* child, const LayoutPoint& point) const
2176 { 2176 {
2177 if (!style()->isFlippedBlocksWritingMode()) 2177 if (!style()->slowIsFlippedBlocksWritingMode())
2178 return point; 2178 return point;
2179 2179
2180 // This is similar to RenderBox::flipForWritingModeForChild. We have to subt ract out our left/top offsets twice, since 2180 // This is similar to RenderBox::flipForWritingModeForChild. We have to subt ract out our left/top offsets twice, since
2181 // it's going to get added back in. We hide this complication here so that t he calling code looks normal for the unflipped 2181 // it's going to get added back in. We hide this complication here so that t he calling code looks normal for the unflipped
2182 // case. 2182 // case.
2183 if (isHorizontalWritingMode()) 2183 if (isHorizontalWritingMode())
2184 return LayoutPoint(point.x(), point.y() + height() - child->renderer()-> height() - 2 * yPositionForFloatIncludingMargin(child)); 2184 return LayoutPoint(point.x(), point.y() + height() - child->renderer()-> height() - 2 * yPositionForFloatIncludingMargin(child));
2185 return LayoutPoint(point.x() + width() - child->renderer()->width() - 2 * xP ositionForFloatIncludingMargin(child), point.y()); 2185 return LayoutPoint(point.x() + width() - child->renderer()->width() - 2 * xP ositionForFloatIncludingMargin(child), point.y());
2186 } 2186 }
2187 2187
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2858 FrameView* frameView = document().view(); 2858 FrameView* frameView = document().view();
2859 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 2859 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
2860 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 2860 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
2861 if (height() < visibleHeight) 2861 if (height() < visibleHeight)
2862 top += (visibleHeight - height()) / 2; 2862 top += (visibleHeight - height()) / 2;
2863 setY(top); 2863 setY(top);
2864 dialog->setCentered(top); 2864 dialog->setCentered(top);
2865 } 2865 }
2866 2866
2867 } // namespace blink 2867 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698