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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/NodeComputedStyle.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) 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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 { 1045 {
1046 Node* node = nextNodeConsideringAtomicNodes(); 1046 Node* node = nextNodeConsideringAtomicNodes();
1047 while (node) { 1047 while (node) {
1048 if (isAtomicNode(node)) 1048 if (isAtomicNode(node))
1049 return node; 1049 return node;
1050 node = node->nextNodeConsideringAtomicNodes(); 1050 node = node->nextNodeConsideringAtomicNodes();
1051 } 1051 }
1052 return nullptr; 1052 return nullptr;
1053 } 1053 }
1054 1054
1055 const LayoutStyle* Node::virtualComputedStyle(PseudoId pseudoElementSpecifier) 1055 const ComputedStyle* Node::virtualEnsureComputedStyle(PseudoId pseudoElementSpec ifier)
1056 { 1056 {
1057 return parentOrShadowHostNode() ? parentOrShadowHostNode()->computedStyle(ps eudoElementSpecifier) : nullptr; 1057 return parentOrShadowHostNode() ? parentOrShadowHostNode()->ensureComputedSt yle(pseudoElementSpecifier) : nullptr;
1058 } 1058 }
1059 1059
1060 int Node::maxCharacterOffset() const 1060 int Node::maxCharacterOffset() const
1061 { 1061 {
1062 ASSERT_NOT_REACHED(); 1062 ASSERT_NOT_REACHED();
1063 return 0; 1063 return 0;
1064 } 1064 }
1065 1065
1066 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques tions about HTML in the core DOM class 1066 // FIXME: Shouldn't these functions be in the editing code? Code that asks ques tions about HTML in the core DOM class
1067 // is obviously misplaced. 1067 // is obviously misplaced.
1068 bool Node::canStartSelection() const 1068 bool Node::canStartSelection() const
1069 { 1069 {
1070 if (hasEditableStyle()) 1070 if (hasEditableStyle())
1071 return true; 1071 return true;
1072 1072
1073 if (layoutObject()) { 1073 if (layoutObject()) {
1074 const LayoutStyle& style = layoutObject()->styleRef(); 1074 const ComputedStyle& style = layoutObject()->styleRef();
1075 // We allow selections to begin within an element that has -webkit-user- select: none set, 1075 // We allow selections to begin within an element that has -webkit-user- select: none set,
1076 // but if the element is draggable then dragging should take priority ov er selection. 1076 // but if the element is draggable then dragging should take priority ov er selection.
1077 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NON E) 1077 if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NON E)
1078 return false; 1078 return false;
1079 } 1079 }
1080 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio n() : true; 1080 return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelectio n() : true;
1081 } 1081 }
1082 1082
1083 bool Node::canParticipateInComposedTree() const 1083 bool Node::canParticipateInComposedTree() const
1084 { 1084 {
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2493 node->showTreeForThis(); 2493 node->showTreeForThis();
2494 } 2494 }
2495 2495
2496 void showNodePath(const blink::Node* node) 2496 void showNodePath(const blink::Node* node)
2497 { 2497 {
2498 if (node) 2498 if (node)
2499 node->showNodePathForThis(); 2499 node->showNodePathForThis();
2500 } 2500 }
2501 2501
2502 #endif 2502 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/NodeComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698