| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 DOMSelection::DOMSelection(const TreeScope* treeScope) | 62 DOMSelection::DOMSelection(const TreeScope* treeScope) |
| 63 : DOMWindowProperty(treeScope->rootNode().document().frame()) | 63 : DOMWindowProperty(treeScope->rootNode().document().frame()) |
| 64 , m_treeScope(treeScope) | 64 , m_treeScope(treeScope) |
| 65 { | 65 { |
| 66 ScriptWrappable::init(this); | 66 ScriptWrappable::init(this); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void DOMSelection::clearTreeScope() | 69 void DOMSelection::clearTreeScope() |
| 70 { | 70 { |
| 71 m_treeScope = 0; | 71 m_treeScope = nullptr; |
| 72 } | 72 } |
| 73 | 73 |
| 74 const VisibleSelection& DOMSelection::visibleSelection() const | 74 const VisibleSelection& DOMSelection::visibleSelection() const |
| 75 { | 75 { |
| 76 ASSERT(m_frame); | 76 ASSERT(m_frame); |
| 77 return m_frame->selection().selection(); | 77 return m_frame->selection().selection(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 static Position anchorPosition(const VisibleSelection& selection) | 80 static Position anchorPosition(const VisibleSelection& selection) |
| 81 { | 81 { |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 return node->document() == m_frame->document(); | 553 return node->document() == m_frame->document(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 void DOMSelection::addConsoleError(const String& message) | 556 void DOMSelection::addConsoleError(const String& message) |
| 557 { | 557 { |
| 558 if (m_treeScope) | 558 if (m_treeScope) |
| 559 m_treeScope->document().addConsoleMessage(JSMessageSource, ErrorMessageL
evel, message); | 559 m_treeScope->document().addConsoleMessage(JSMessageSource, ErrorMessageL
evel, message); |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace WebCore | 562 } // namespace WebCore |
| OLD | NEW |