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

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

Issue 295513003: add 'slow' prefix to RenderObject's firstChild() / lastChild() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/RenderBoxModelObject.h ('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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 if (remainingText) { 2636 if (remainingText) {
2637 if (!firstLetterRemainingTextMap) 2637 if (!firstLetterRemainingTextMap)
2638 firstLetterRemainingTextMap = new FirstLetterRemainingTextMap; 2638 firstLetterRemainingTextMap = new FirstLetterRemainingTextMap;
2639 firstLetterRemainingTextMap->set(this, remainingText); 2639 firstLetterRemainingTextMap->set(this, remainingText);
2640 } else if (firstLetterRemainingTextMap) 2640 } else if (firstLetterRemainingTextMap)
2641 firstLetterRemainingTextMap->remove(this); 2641 firstLetterRemainingTextMap->remove(this);
2642 } 2642 }
2643 2643
2644 LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset) 2644 LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset)
2645 { 2645 {
2646 ASSERT(!firstChild()); 2646 ASSERT(!slowFirstChild());
2647 2647
2648 // FIXME: This does not take into account either :first-line or :first-lette r 2648 // FIXME: This does not take into account either :first-line or :first-lette r
2649 // However, as soon as some content is entered, the line boxes will be 2649 // However, as soon as some content is entered, the line boxes will be
2650 // constructed and this kludge is not called any more. So only the caret siz e 2650 // constructed and this kludge is not called any more. So only the caret siz e
2651 // of an empty :first-line'd block is wrong. I think we can live with that. 2651 // of an empty :first-line'd block is wrong. I think we can live with that.
2652 RenderStyle* currentStyle = firstLineStyle(); 2652 RenderStyle* currentStyle = firstLineStyle();
2653 LayoutUnit height = lineHeight(true, currentStyle->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); 2653 LayoutUnit height = lineHeight(true, currentStyle->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
2654 2654
2655 enum CaretAlignment { alignLeft, alignRight, alignCenter }; 2655 enum CaretAlignment { alignLeft, alignRight, alignCenter };
2656 2656
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2824 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2824 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2825 for (RenderObject* child = startChild; child && child != endChild; ) { 2825 for (RenderObject* child = startChild; child && child != endChild; ) {
2826 // Save our next sibling as moveChildTo will clear it. 2826 // Save our next sibling as moveChildTo will clear it.
2827 RenderObject* nextSibling = child->nextSibling(); 2827 RenderObject* nextSibling = child->nextSibling();
2828 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2828 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2829 child = nextSibling; 2829 child = nextSibling;
2830 } 2830 }
2831 } 2831 }
2832 2832
2833 } // namespace WebCore 2833 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698