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

Side by Side Diff: sky/engine/core/dom/Node.cpp

Issue 1076353003: Remove -webkit-user-drag (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: First patch didn't seem to appear? Created 5 years, 8 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
OLDNEW
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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 return 0; 812 return 0;
813 } 813 }
814 814
815 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques tions about HTML in the core DOM class 815 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques tions about HTML in the core DOM class
816 // is obviously misplaced. 816 // is obviously misplaced.
817 bool Node::canStartSelection() const 817 bool Node::canStartSelection() const
818 { 818 {
819 if (hasEditableStyle()) 819 if (hasEditableStyle())
820 return true; 820 return true;
821 821
822 if (renderer()) {
823 RenderStyle* style = renderer()->style();
824 // We allow selections to begin within an element that has -webkit-user- select: none set,
825 // but if the element is draggable then dragging should take priority ov er selection.
826 if (style->userDrag() == DRAG_ELEMENT && style->userSelect() == SELECT_N ONE)
827 return false;
828 }
829 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio n() : true; 822 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio n() : true;
830 } 823 }
831 824
832 Element* Node::shadowHost() const 825 Element* Node::shadowHost() const
833 { 826 {
834 if (ShadowRoot* root = containingShadowRoot()) 827 if (ShadowRoot* root = containingShadowRoot())
835 return root->host(); 828 return root->host();
836 return 0; 829 return 0;
837 } 830 }
838 831
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 node->showTreeForThis(); 1655 node->showTreeForThis();
1663 } 1656 }
1664 1657
1665 void showNodePath(const blink::Node* node) 1658 void showNodePath(const blink::Node* node)
1666 { 1659 {
1667 if (node) 1660 if (node)
1668 node->showNodePathForThis(); 1661 node->showNodePathForThis();
1669 } 1662 }
1670 1663
1671 #endif 1664 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/BisonCSSParser-in.cpp ('k') | sky/engine/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698