| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 11 * | 11 * |
| 12 * This library is free software; you can redistribute it and/or | 12 * This library is free software; you can redistribute it and/or |
| 13 * modify it under the terms of the GNU Library General Public | 13 * modify it under the terms of the GNU Library General Public |
| 14 * License as published by the Free Software Foundation; either | 14 * License as published by the Free Software Foundation; either |
| 15 * version 2 of the License, or (at your option) any later version. | 15 * version 2 of the License, or (at your option) any later version. |
| 16 * | 16 * |
| 17 * This library is distributed in the hope that it will be useful, | 17 * This library is distributed in the hope that it will be useful, |
| 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 20 * Library General Public License for more details. | 20 * Library General Public License for more details. |
| 21 * | 21 * |
| 22 * You should have received a copy of the GNU Library General Public License | 22 * You should have received a copy of the GNU Library General Public License |
| 23 * along with this library; see the file COPYING.LIB. If not, write to | 23 * along with this library; see the file COPYING.LIB. If not, write to |
| 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 25 * Boston, MA 02110-1301, USA. | 25 * Boston, MA 02110-1301, USA. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "config.h" | 28 #include "sky/engine/config.h" |
| 29 #include "core/css/SelectorChecker.h" | 29 #include "sky/engine/core/css/SelectorChecker.h" |
| 30 | 30 |
| 31 #include "core/css/CSSSelectorList.h" | 31 #include "sky/engine/core/css/CSSSelectorList.h" |
| 32 #include "core/dom/Document.h" | 32 #include "sky/engine/core/dom/Document.h" |
| 33 #include "core/dom/shadow/ShadowRoot.h" | 33 #include "sky/engine/core/dom/shadow/ShadowRoot.h" |
| 34 #include "core/editing/FrameSelection.h" | 34 #include "sky/engine/core/editing/FrameSelection.h" |
| 35 #include "core/frame/LocalFrame.h" | 35 #include "sky/engine/core/frame/LocalFrame.h" |
| 36 #include "core/html/parser/HTMLParserIdioms.h" | 36 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" |
| 37 #include "core/page/FocusController.h" | 37 #include "sky/engine/core/page/FocusController.h" |
| 38 #include "core/rendering/style/RenderStyle.h" | 38 #include "sky/engine/core/rendering/style/RenderStyle.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 SelectorChecker::SelectorChecker(Document& document, Mode mode) | 42 SelectorChecker::SelectorChecker(Document& document, Mode mode) |
| 43 : m_mode(mode) | 43 : m_mode(mode) |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 static bool scopeContainsLastMatchedElement(const SelectorChecker::SelectorCheck
ingContext& context) | 47 static bool scopeContainsLastMatchedElement(const SelectorChecker::SelectorCheck
ingContext& context) |
| 48 { | 48 { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 return false; | 306 return false; |
| 307 LocalFrame* frame = element.document().frame(); | 307 LocalFrame* frame = element.document().frame(); |
| 308 if (!frame) | 308 if (!frame) |
| 309 return false; | 309 return false; |
| 310 if (!frame->selection().isFocusedAndActive()) | 310 if (!frame->selection().isFocusedAndActive()) |
| 311 return false; | 311 return false; |
| 312 return true; | 312 return true; |
| 313 } | 313 } |
| 314 | 314 |
| 315 } | 315 } |
| OLD | NEW |