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

Side by Side Diff: sky/engine/core/dom/Element.cpp

Issue 1200233002: Use the baseline information exposed by C++ to pipe baseline data through RenderBox. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | sky/engine/core/rendering/RenderBlock.h » ('j') | 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) 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 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 968
969 void Element::setMaxContentWidth(double width) 969 void Element::setMaxContentWidth(double width)
970 { 970 {
971 if (RenderBox* box = renderBox()) 971 if (RenderBox* box = renderBox())
972 return box->setMaxPreferredLogicalWidth(width); 972 return box->setMaxPreferredLogicalWidth(width);
973 } 973 }
974 974
975 double Element::alphabeticBaseline() const 975 double Element::alphabeticBaseline() const
976 { 976 {
977 if (RenderBox* box = renderBox()) 977 if (RenderBox* box = renderBox())
978 return box->baselinePosition(AlphabeticBaseline, true, HorizontalLine, P ositionOfInteriorLineBoxes); 978 return box->firstLineBoxBaseline(FontBaselineOrAuto(AlphabeticBaseline)) ;
979 return 0; 979 return 0;
980 } 980 }
981 981
982 double Element::ideographicBaseline() const 982 double Element::ideographicBaseline() const
983 { 983 {
984 if (RenderBox* box = renderBox()) 984 if (RenderBox* box = renderBox())
985 return box->baselinePosition(IdeographicBaseline, true, HorizontalLine, PositionOfInteriorLineBoxes); 985 return box->firstLineBoxBaseline(FontBaselineOrAuto(IdeographicBaseline) );
986 return 0; 986 return 0;
987 } 987 }
988 988
989 void Element::setNeedsLayout() 989 void Element::setNeedsLayout()
990 { 990 {
991 if (RenderBox* box = renderBox()) 991 if (RenderBox* box = renderBox())
992 box->setNeedsLayout(); 992 box->setNeedsLayout();
993 } 993 }
994 994
995 void Element::layout() 995 void Element::layout()
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 GraphicsContext context(canvas->skCanvas()); 1708 GraphicsContext context(canvas->skCanvas());
1709 1709
1710 // Very simplified painting to allow painting an arbitrary (layer-less) subt ree. 1710 // Very simplified painting to allow painting an arbitrary (layer-less) subt ree.
1711 Vector<RenderBox*> layers; 1711 Vector<RenderBox*> layers;
1712 PaintInfo paintInfo(&context, box->absoluteBoundingBoxRect(), box); 1712 PaintInfo paintInfo(&context, box->absoluteBoundingBoxRect(), box);
1713 box->paint(paintInfo, LayoutPoint(), layers); 1713 box->paint(paintInfo, LayoutPoint(), layers);
1714 // Note we're ignoring any layers encountered. 1714 // Note we're ignoring any layers encountered.
1715 } 1715 }
1716 1716
1717 } // namespace blink 1717 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698