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

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

Issue 23516012: Rename StyleSheetCollections to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBR.cpp ('k') | Source/core/rendering/RenderInline.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 6000 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 6011
6012 LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 6012 LayoutUnit RenderBlock::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const
6013 { 6013 {
6014 // Inline blocks are replaced elements. Otherwise, just pass off to 6014 // Inline blocks are replaced elements. Otherwise, just pass off to
6015 // the base class. If we're being queried as though we're the root line 6015 // the base class. If we're being queried as though we're the root line
6016 // box, then the fact that we're an inline-block is irrelevant, and we behav e 6016 // box, then the fact that we're an inline-block is irrelevant, and we behav e
6017 // just like a block. 6017 // just like a block.
6018 if (isReplaced() && linePositionMode == PositionOnContainingLine) 6018 if (isReplaced() && linePositionMode == PositionOnContainingLine)
6019 return RenderBox::lineHeight(firstLine, direction, linePositionMode); 6019 return RenderBox::lineHeight(firstLine, direction, linePositionMode);
6020 6020
6021 if (firstLine && document().styleSheetCollections()->usesFirstLineRules()) { 6021 if (firstLine && document().styleEngine()->usesFirstLineRules()) {
6022 RenderStyle* s = style(firstLine); 6022 RenderStyle* s = style(firstLine);
6023 if (s != style()) 6023 if (s != style())
6024 return s->computedLineHeight(view()); 6024 return s->computedLineHeight(view());
6025 } 6025 }
6026 6026
6027 if (m_lineHeight == -1) 6027 if (m_lineHeight == -1)
6028 m_lineHeight = style()->computedLineHeight(view()); 6028 m_lineHeight = style()->computedLineHeight(view());
6029 6029
6030 return m_lineHeight; 6030 return m_lineHeight;
6031 } 6031 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 RenderTextFragment* letter = 6350 RenderTextFragment* letter =
6351 new RenderTextFragment(remainingText->node() ? remainingText->node() : & remainingText->document(), oldText.impl(), 0, length); 6351 new RenderTextFragment(remainingText->node() ? remainingText->node() : & remainingText->document(), oldText.impl(), 0, length);
6352 letter->setStyle(pseudoStyle); 6352 letter->setStyle(pseudoStyle);
6353 firstLetter->addChild(letter); 6353 firstLetter->addChild(letter);
6354 6354
6355 textObj->destroy(); 6355 textObj->destroy();
6356 } 6356 }
6357 6357
6358 void RenderBlock::updateFirstLetter() 6358 void RenderBlock::updateFirstLetter()
6359 { 6359 {
6360 if (!document().styleSheetCollections()->usesFirstLetterRules()) 6360 if (!document().styleEngine()->usesFirstLetterRules())
6361 return; 6361 return;
6362 // Don't recur 6362 // Don't recur
6363 if (style()->styleType() == FIRST_LETTER) 6363 if (style()->styleType() == FIRST_LETTER)
6364 return; 6364 return;
6365 6365
6366 // FIXME: We need to destroy the first-letter object if it is no longer the first child. Need to find 6366 // FIXME: We need to destroy the first-letter object if it is no longer the first child. Need to find
6367 // an efficient way to check for that situation though before implementing a nything. 6367 // an efficient way to check for that situation though before implementing a nything.
6368 RenderObject* firstLetterBlock = findFirstLetterBlock(this); 6368 RenderObject* firstLetterBlock = findFirstLetterBlock(this);
6369 if (!firstLetterBlock) 6369 if (!firstLetterBlock)
6370 return; 6370 return;
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
7673 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 7673 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
7674 { 7674 {
7675 showRenderObject(); 7675 showRenderObject();
7676 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 7676 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
7677 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 7677 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
7678 } 7678 }
7679 7679
7680 #endif 7680 #endif
7681 7681
7682 } // namespace WebCore 7682 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBR.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698