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

Side by Side Diff: Source/core/page/DOMSelection.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 7 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
« no previous file with comments | « Source/core/page/DOMSelection.h ('k') | Source/core/page/FocusController.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) 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
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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 return node->document() == m_frame->document(); 550 return node->document() == m_frame->document();
551 } 551 }
552 552
553 void DOMSelection::addConsoleError(const String& message) 553 void DOMSelection::addConsoleError(const String& message)
554 { 554 {
555 if (m_treeScope) 555 if (m_treeScope)
556 m_treeScope->document().addConsoleMessage(JSMessageSource, ErrorMessageL evel, message); 556 m_treeScope->document().addConsoleMessage(JSMessageSource, ErrorMessageL evel, message);
557 } 557 }
558 558
559 } // namespace WebCore 559 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/DOMSelection.h ('k') | Source/core/page/FocusController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698