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

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

Issue 452293004: Fix crash when node is moved in a selection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Forgot to upload the test Created 6 years, 4 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 3341 matching lines...) Expand 10 before | Expand all | Expand 10 after
3352 { 3352 {
3353 return SetCursorBasedOnStyle; 3353 return SetCursorBasedOnStyle;
3354 } 3354 }
3355 3355
3356 bool RenderObject::canUpdateSelectionOnRootLineBoxes() 3356 bool RenderObject::canUpdateSelectionOnRootLineBoxes()
3357 { 3357 {
3358 if (needsLayout()) 3358 if (needsLayout())
3359 return false; 3359 return false;
3360 3360
3361 RenderBlock* containingBlock = this->containingBlock(); 3361 RenderBlock* containingBlock = this->containingBlock();
3362 return containingBlock ? !containingBlock->needsLayout() : true; 3362 return containingBlock ? !containingBlock->needsLayout() : false;
3363 } 3363 }
3364 3364
3365 // We only create "generated" child renderers like one for first-letter if: 3365 // We only create "generated" child renderers like one for first-letter if:
3366 // - the firstLetterBlock can have children in the DOM and 3366 // - the firstLetterBlock can have children in the DOM and
3367 // - the block doesn't have any special assumption on its text children. 3367 // - the block doesn't have any special assumption on its text children.
3368 // This correctly prevents form controls from having such renderers. 3368 // This correctly prevents form controls from having such renderers.
3369 bool RenderObject::canHaveGeneratedChildren() const 3369 bool RenderObject::canHaveGeneratedChildren() const
3370 { 3370 {
3371 return canHaveChildren(); 3371 return canHaveChildren();
3372 } 3372 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 { 3475 {
3476 if (object1) { 3476 if (object1) {
3477 const blink::RenderObject* root = object1; 3477 const blink::RenderObject* root = object1;
3478 while (root->parent()) 3478 while (root->parent())
3479 root = root->parent(); 3479 root = root->parent();
3480 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3480 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3481 } 3481 }
3482 } 3482 }
3483 3483
3484 #endif 3484 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698