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

Side by Side Diff: third_party/WebKit/Source/core/page/TouchAdjustment.cpp

Issue 1741073002: Rename enums/functions that collide in chromium style in core/layout/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-6
Patch Set: get-names-7: rebase Created 4 years, 9 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) 2012 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (node->layoutObject()->isImage()) 123 if (node->layoutObject()->isImage())
124 return true; 124 return true;
125 if (node->layoutObject()->isMedia()) 125 if (node->layoutObject()->isMedia())
126 return true; 126 return true;
127 if (node->layoutObject()->canBeSelectionLeaf()) { 127 if (node->layoutObject()->canBeSelectionLeaf()) {
128 // If the context menu gesture will trigger a selection all selectable n odes are valid targets. 128 // If the context menu gesture will trigger a selection all selectable n odes are valid targets.
129 if (node->layoutObject()->frame()->editor().behavior().shouldSelectOnCon textualMenuClick()) 129 if (node->layoutObject()->frame()->editor().behavior().shouldSelectOnCon textualMenuClick())
130 return true; 130 return true;
131 // Only the selected part of the layoutObject is a valid target, but thi s will be corrected in 131 // Only the selected part of the layoutObject is a valid target, but thi s will be corrected in
132 // appendContextSubtargetsForNode. 132 // appendContextSubtargetsForNode.
133 if (node->layoutObject()->selectionState() != SelectionNone) 133 if (node->layoutObject()->getSelectionState() != SelectionNone)
134 return true; 134 return true;
135 } 135 }
136 return false; 136 return false;
137 } 137 }
138 138
139 static inline void appendQuadsToSubtargetList(Vector<FloatQuad>& quads, Node* no de, SubtargetGeometryList& subtargets) 139 static inline void appendQuadsToSubtargetList(Vector<FloatQuad>& quads, Node* no de, SubtargetGeometryList& subtargets)
140 { 140 {
141 Vector<FloatQuad>::const_iterator it = quads.begin(); 141 Vector<FloatQuad>::const_iterator it = quads.begin();
142 const Vector<FloatQuad>::const_iterator end = quads.end(); 142 const Vector<FloatQuad>::const_iterator end = quads.end();
143 for (; it != end; ++it) 143 for (; it != end; ++it)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 int offset; 177 int offset;
178 while ((offset = wordIterator->next()) != -1) { 178 while ((offset = wordIterator->next()) != -1) {
179 if (isWordTextBreak(wordIterator)) { 179 if (isWordTextBreak(wordIterator)) {
180 Vector<FloatQuad> quads; 180 Vector<FloatQuad> quads;
181 textLayoutObject->absoluteQuadsForRange(quads, lastOffset, offse t); 181 textLayoutObject->absoluteQuadsForRange(quads, lastOffset, offse t);
182 appendQuadsToSubtargetList(quads, textNode, subtargets); 182 appendQuadsToSubtargetList(quads, textNode, subtargets);
183 } 183 }
184 lastOffset = offset; 184 lastOffset = offset;
185 } 185 }
186 } else { 186 } else {
187 if (textLayoutObject->selectionState() == SelectionNone) 187 if (textLayoutObject->getSelectionState() == SelectionNone)
188 return appendBasicSubtargetsForNode(node, subtargets); 188 return appendBasicSubtargetsForNode(node, subtargets);
189 // If selected, make subtargets out of only the selected part of the tex t. 189 // If selected, make subtargets out of only the selected part of the tex t.
190 int startPos, endPos; 190 int startPos, endPos;
191 switch (textLayoutObject->selectionState()) { 191 switch (textLayoutObject->getSelectionState()) {
192 case SelectionInside: 192 case SelectionInside:
193 startPos = 0; 193 startPos = 0;
194 endPos = textLayoutObject->textLength(); 194 endPos = textLayoutObject->textLength();
195 break; 195 break;
196 case SelectionStart: 196 case SelectionStart:
197 textLayoutObject->selectionStartEnd(startPos, endPos); 197 textLayoutObject->selectionStartEnd(startPos, endPos);
198 endPos = textLayoutObject->textLength(); 198 endPos = textLayoutObject->textLength();
199 break; 199 break;
200 case SelectionEnd: 200 case SelectionEnd:
201 textLayoutObject->selectionStartEnd(startPos, endPos); 201 textLayoutObject->selectionStartEnd(startPos, endPos);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem ber<Node>>& nodes) 498 bool findBestZoomableArea(Node*& targetNode, IntRect& targetArea, const IntPoint & touchHotspot, const IntRect& touchArea, const WillBeHeapVector<RefPtrWillBeMem ber<Node>>& nodes)
499 { 499 {
500 IntPoint targetPoint; 500 IntPoint targetPoint;
501 TouchAdjustment::SubtargetGeometryList subtargets; 501 TouchAdjustment::SubtargetGeometryList subtargets;
502 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets); 502 TouchAdjustment::compileZoomableSubtargets(nodes, subtargets);
503 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient); 503 return TouchAdjustment::findNodeWithLowestDistanceMetric(targetNode, targetP oint, targetArea, touchHotspot, touchArea, subtargets, TouchAdjustment::zoomable IntersectionQuotient);
504 } 504 }
505 505
506 } // namespace blink 506 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698