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

Side by Side Diff: Source/core/layout/LayoutBlock.cpp

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/layout/LayoutBR.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after
3146 3146
3147 LayoutUnit LayoutBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 3147 LayoutUnit LayoutBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
3148 { 3148 {
3149 // Inline blocks are replaced elements. Otherwise, just pass off to 3149 // Inline blocks are replaced elements. Otherwise, just pass off to
3150 // the base class. If we're being queried as though we're the root line 3150 // the base class. If we're being queried as though we're the root line
3151 // box, then the fact that we're an inline-block is irrelevant, and we behav e 3151 // box, then the fact that we're an inline-block is irrelevant, and we behav e
3152 // just like a block. 3152 // just like a block.
3153 if (isReplaced() && linePositionMode == PositionOnContainingLine) 3153 if (isReplaced() && linePositionMode == PositionOnContainingLine)
3154 return LayoutBox::lineHeight(firstLine, direction, linePositionMode); 3154 return LayoutBox::lineHeight(firstLine, direction, linePositionMode);
3155 3155
3156 const LayoutStyle& style = styleRef(firstLine && document().styleEngine()->u sesFirstLineRules()); 3156 const LayoutStyle& style = styleRef(firstLine && document().styleEngine().us esFirstLineRules());
3157 return style.computedLineHeight(); 3157 return style.computedLineHeight();
3158 } 3158 }
3159 3159
3160 int LayoutBlock::beforeMarginInLineDirection(LineDirectionMode direction) const 3160 int LayoutBlock::beforeMarginInLineDirection(LineDirectionMode direction) const
3161 { 3161 {
3162 return direction == HorizontalLine ? marginTop() : marginRight(); 3162 return direction == HorizontalLine ? marginTop() : marginRight();
3163 } 3163 }
3164 3164
3165 int LayoutBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin eDirectionMode direction, LinePositionMode linePositionMode) const 3165 int LayoutBlock::baselinePosition(FontBaseline baselineType, bool firstLine, Lin eDirectionMode direction, LinePositionMode linePositionMode) const
3166 { 3166 {
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 3922 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
3923 { 3923 {
3924 showLayoutObject(); 3924 showLayoutObject();
3925 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3925 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3926 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3926 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3927 } 3927 }
3928 3928
3929 #endif 3929 #endif
3930 3930
3931 } // namespace blink 3931 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBR.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698