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

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

Issue 1043643002: Switch line layout to LayoutUnit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline Created 5 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
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 namespace { 99 namespace {
100 100
101 static bool gModifyLayoutTreeStructureAnyState = false; 101 static bool gModifyLayoutTreeStructureAnyState = false;
102 102
103 static bool gDisablePaintInvalidationStateAsserts = false; 103 static bool gDisablePaintInvalidationStateAsserts = false;
104 104
105 } // namespace 105 } // namespace
106 106
107 using namespace HTMLNames; 107 using namespace HTMLNames;
108 108
109 const LayoutUnit& caretWidth()
eae 2015/05/26 18:56:31 I'm curious, why did you switch this to me a funct
szager1 2015/05/27 05:59:42 Previously, this was a global static variable, but
110 {
111 static LayoutUnit gCaretWidth(1);
112 return gCaretWidth;
113 }
114
109 #if ENABLE(ASSERT) 115 #if ENABLE(ASSERT)
110 116
111 LayoutObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(Layou tObject& layoutObject) 117 LayoutObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(Layou tObject& layoutObject)
112 : m_layoutObject(layoutObject) 118 : m_layoutObject(layoutObject)
113 , m_preexistingForbidden(m_layoutObject.isSetNeedsLayoutForbidden()) 119 , m_preexistingForbidden(m_layoutObject.isSetNeedsLayoutForbidden())
114 { 120 {
115 m_layoutObject.setNeedsLayoutIsForbidden(true); 121 m_layoutObject.setNeedsLayoutIsForbidden(true);
116 } 122 }
117 123
118 LayoutObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope() 124 LayoutObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope()
(...skipping 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 const blink::LayoutObject* root = object1; 3306 const blink::LayoutObject* root = object1;
3301 while (root->parent()) 3307 while (root->parent())
3302 root = root->parent(); 3308 root = root->parent();
3303 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3309 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3304 } else { 3310 } else {
3305 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3311 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3306 } 3312 }
3307 } 3313 }
3308 3314
3309 #endif 3315 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698