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

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

Issue 1824143003: [All-In-One] Introduce BackspaceStateMachine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to HEAD Created 4 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
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 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after
3238 3238
3239 int LayoutObject::caretMaxOffset() const 3239 int LayoutObject::caretMaxOffset() const
3240 { 3240 {
3241 if (isAtomicInlineLevel()) 3241 if (isAtomicInlineLevel())
3242 return node() ? std::max(1U, node()->countChildren()) : 1; 3242 return node() ? std::max(1U, node()->countChildren()) : 1;
3243 if (isHR()) 3243 if (isHR())
3244 return 1; 3244 return 1;
3245 return 0; 3245 return 0;
3246 } 3246 }
3247 3247
3248 int LayoutObject::previousOffsetForBackwardDeletion(int current) const
3249 {
3250 return current - 1;
3251 }
3252
3253 bool LayoutObject::isInert() const 3248 bool LayoutObject::isInert() const
3254 { 3249 {
3255 const LayoutObject* layoutObject = this; 3250 const LayoutObject* layoutObject = this;
3256 while (!layoutObject->node()) 3251 while (!layoutObject->node())
3257 layoutObject = layoutObject->parent(); 3252 layoutObject = layoutObject->parent();
3258 return layoutObject->node()->isInert(); 3253 return layoutObject->node()->isInert();
3259 } 3254 }
3260 3255
3261 void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect) 3256 void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect)
3262 { 3257 {
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3727 const blink::LayoutObject* root = object1; 3722 const blink::LayoutObject* root = object1;
3728 while (root->parent()) 3723 while (root->parent())
3729 root = root->parent(); 3724 root = root->parent();
3730 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3725 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3731 } else { 3726 } else {
3732 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3727 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3733 } 3728 }
3734 } 3729 }
3735 3730
3736 #endif 3731 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698