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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 1307523002: Move nodeIsUserSelectAll() out from PositionAlgorithm template class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-20T14:22:40 Created 5 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
« no previous file with comments | « no previous file | Source/core/editing/EditingUtilities.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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return false; 537 return false;
538 538
539 // Ideally we'd call ASSERT(!needsStyleRecalc()) here, but 539 // Ideally we'd call ASSERT(!needsStyleRecalc()) here, but
540 // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion 540 // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion
541 // would fire in the middle of Document::setFocusedNode(). 541 // would fire in the middle of Document::setFocusedNode().
542 542
543 for (const Node* node = this; node; node = node->parentNode()) { 543 for (const Node* node = this; node; node = node->parentNode()) {
544 if ((node->isHTMLElement() || node->isDocumentNode()) && node->layoutObj ect()) { 544 if ((node->isHTMLElement() || node->isDocumentNode()) && node->layoutObj ect()) {
545 // Elements with user-select: all style are considered atomic 545 // Elements with user-select: all style are considered atomic
546 // therefore non editable. 546 // therefore non editable.
547 if (Position::nodeIsUserSelectAll(node) && treatment == UserSelectAl lIsAlwaysNonEditable) 547 if (nodeIsUserSelectAll(node) && treatment == UserSelectAllIsAlwaysN onEditable)
548 return false; 548 return false;
549 switch (node->layoutObject()->style()->userModify()) { 549 switch (node->layoutObject()->style()->userModify()) {
550 case READ_ONLY: 550 case READ_ONLY:
551 return false; 551 return false;
552 case READ_WRITE: 552 case READ_WRITE:
553 return true; 553 return true;
554 case READ_WRITE_PLAINTEXT_ONLY: 554 case READ_WRITE_PLAINTEXT_ONLY:
555 return editableLevel != RichlyEditable; 555 return editableLevel != RichlyEditable;
556 } 556 }
557 ASSERT_NOT_REACHED(); 557 ASSERT_NOT_REACHED();
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 2391
2392 void showNodePath(const blink::Node* node) 2392 void showNodePath(const blink::Node* node)
2393 { 2393 {
2394 if (node) 2394 if (node)
2395 node->showNodePathForThis(); 2395 node->showNodePathForThis();
2396 else 2396 else
2397 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2397 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2398 } 2398 }
2399 2399
2400 #endif 2400 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/EditingUtilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698