| OLD | NEW |
| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 if (node->getNodeType() == TEXT_NODE) | 439 if (node->getNodeType() == TEXT_NODE) |
| 440 node = toText(node)->mergeNextSiblingNodesIfPossible(); | 440 node = toText(node)->mergeNextSiblingNodesIfPossible(); |
| 441 else | 441 else |
| 442 node = NodeTraversal::nextPostOrder(*node); | 442 node = NodeTraversal::nextPostOrder(*node); |
| 443 } | 443 } |
| 444 } | 444 } |
| 445 | 445 |
| 446 bool Node::isContentEditable(UserSelectAllTreatment treatment) const | 446 bool Node::isContentEditable(UserSelectAllTreatment treatment) const |
| 447 { | 447 { |
| 448 document().updateLayoutTree(); | 448 document().updateStyleAndLayoutTree(); |
| 449 return hasEditableStyle(Editable, treatment); | 449 return hasEditableStyle(Editable, treatment); |
| 450 } | 450 } |
| 451 | 451 |
| 452 bool Node::isContentRichlyEditable() const | 452 bool Node::isContentRichlyEditable() const |
| 453 { | 453 { |
| 454 document().updateLayoutTree(); | 454 document().updateStyleAndLayoutTree(); |
| 455 return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable); | 455 return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable); |
| 456 } | 456 } |
| 457 | 457 |
| 458 bool Node::hasEditableStyle(EditableLevel editableLevel, UserSelectAllTreatment
treatment) const | 458 bool Node::hasEditableStyle(EditableLevel editableLevel, UserSelectAllTreatment
treatment) const |
| 459 { | 459 { |
| 460 if (isPseudoElement()) | 460 if (isPseudoElement()) |
| 461 return false; | 461 return false; |
| 462 | 462 |
| 463 // Ideally we'd call DCHECK(!needsStyleRecalc()) here, but | 463 // Ideally we'd call DCHECK(!needsStyleRecalc()) here, but |
| 464 // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion | 464 // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion |
| (...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 | 2332 |
| 2333 void showNodePath(const blink::Node* node) | 2333 void showNodePath(const blink::Node* node) |
| 2334 { | 2334 { |
| 2335 if (node) | 2335 if (node) |
| 2336 node->showNodePathForThis(); | 2336 node->showNodePathForThis(); |
| 2337 else | 2337 else |
| 2338 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2338 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2339 } | 2339 } |
| 2340 | 2340 |
| 2341 #endif | 2341 #endif |
| OLD | NEW |