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

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

Issue 792953006: Devirtualize offsetInCharacters (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | Source/core/dom/Node.cpp » ('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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 virtual bool childTypeAllowed(NodeType) const { return false; } 482 virtual bool childTypeAllowed(NodeType) const { return false; }
483 unsigned countChildren() const; 483 unsigned countChildren() const;
484 484
485 bool isDescendantOf(const Node*) const; 485 bool isDescendantOf(const Node*) const;
486 bool contains(const Node*) const; 486 bool contains(const Node*) const;
487 bool containsIncludingShadowDOM(const Node*) const; 487 bool containsIncludingShadowDOM(const Node*) const;
488 bool containsIncludingHostElements(const Node&) const; 488 bool containsIncludingHostElements(const Node&) const;
489 Node* commonAncestor(const Node&, Node* (*parent)(const Node&)); 489 Node* commonAncestor(const Node&, Node* (*parent)(const Node&));
490 490
491 // Used to determine whether range offsets use characters or node indices. 491 // Used to determine whether range offsets use characters or node indices.
492 virtual bool offsetInCharacters() const; 492 bool offsetInCharacters() const;
493 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of 493 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of
494 // css-transform:capitalize breaking up precomposed characters and ligatures . 494 // css-transform:capitalize breaking up precomposed characters and ligatures .
495 virtual int maxCharacterOffset() const; 495 virtual int maxCharacterOffset() const;
496 496
497 // Whether or not a selection can be started in this object 497 // Whether or not a selection can be started in this object
498 virtual bool canStartSelection() const; 498 virtual bool canStartSelection() const;
499 499
500 // ------------------------------------------------------------------------- ---- 500 // ------------------------------------------------------------------------- ----
501 // Integration with rendering tree 501 // Integration with rendering tree
502 502
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 } // namespace blink 901 } // namespace blink
902 902
903 #ifndef NDEBUG 903 #ifndef NDEBUG
904 // Outside the WebCore namespace for ease of invocation from gdb. 904 // Outside the WebCore namespace for ease of invocation from gdb.
905 void showNode(const blink::Node*); 905 void showNode(const blink::Node*);
906 void showTree(const blink::Node*); 906 void showTree(const blink::Node*);
907 void showNodePath(const blink::Node*); 907 void showNodePath(const blink::Node*);
908 #endif 908 #endif
909 909
910 #endif // Node_h 910 #endif // Node_h
OLDNEW
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698