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

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

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderButton.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) 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 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after
2557 2557
2558 LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset) 2558 LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset)
2559 { 2559 {
2560 ASSERT(!slowFirstChild()); 2560 ASSERT(!slowFirstChild());
2561 2561
2562 // FIXME: This does not take into account either :first-line or :first-lette r 2562 // FIXME: This does not take into account either :first-line or :first-lette r
2563 // However, as soon as some content is entered, the line boxes will be 2563 // However, as soon as some content is entered, the line boxes will be
2564 // constructed and this kludge is not called any more. So only the caret siz e 2564 // constructed and this kludge is not called any more. So only the caret siz e
2565 // of an empty :first-line'd block is wrong. I think we can live with that. 2565 // of an empty :first-line'd block is wrong. I think we can live with that.
2566 RenderStyle* currentStyle = firstLineStyle(); 2566 RenderStyle* currentStyle = firstLineStyle();
2567 LayoutUnit height = lineHeight(true, currentStyle->isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); 2567 LayoutUnit height = lineHeight(FirstLineStyle, currentStyle->isHorizontalWri tingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
2568 2568
2569 enum CaretAlignment { alignLeft, alignRight, alignCenter }; 2569 enum CaretAlignment { alignLeft, alignRight, alignCenter };
2570 2570
2571 CaretAlignment alignment = alignLeft; 2571 CaretAlignment alignment = alignLeft;
2572 2572
2573 switch (currentStyle->textAlign()) { 2573 switch (currentStyle->textAlign()) {
2574 case LEFT: 2574 case LEFT:
2575 case WEBKIT_LEFT: 2575 case WEBKIT_LEFT:
2576 break; 2576 break;
2577 case CENTER: 2577 case CENTER:
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2730 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2731 for (RenderObject* child = startChild; child && child != endChild; ) { 2731 for (RenderObject* child = startChild; child && child != endChild; ) {
2732 // Save our next sibling as moveChildTo will clear it. 2732 // Save our next sibling as moveChildTo will clear it.
2733 RenderObject* nextSibling = child->nextSibling(); 2733 RenderObject* nextSibling = child->nextSibling();
2734 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2734 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2735 child = nextSibling; 2735 child = nextSibling;
2736 } 2736 }
2737 } 2737 }
2738 2738
2739 } // namespace WebCore 2739 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderButton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698