| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |