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

Side by Side Diff: third_party/WebKit/Source/core/editing/RenderedPosition.h

Issue 1531473004: Fix selection handles in vertical writing modes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply code review comments Created 4 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 | « no previous file | third_party/WebKit/Source/core/editing/RenderedPosition.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 bool atRightBoundaryOfBidiRun() const { return atRightBoundaryOfBidiRun(Igno reBidiLevel, 0); } 65 bool atRightBoundaryOfBidiRun() const { return atRightBoundaryOfBidiRun(Igno reBidiLevel, 0); }
66 // The following two functions return true only if the current position is a t the end of the bidi run 66 // The following two functions return true only if the current position is a t the end of the bidi run
67 // of the specified bidi embedding level. 67 // of the specified bidi embedding level.
68 bool atLeftBoundaryOfBidiRun(unsigned char bidiLevelOfRun) const { return at LeftBoundaryOfBidiRun(MatchBidiLevel, bidiLevelOfRun); } 68 bool atLeftBoundaryOfBidiRun(unsigned char bidiLevelOfRun) const { return at LeftBoundaryOfBidiRun(MatchBidiLevel, bidiLevelOfRun); }
69 bool atRightBoundaryOfBidiRun(unsigned char bidiLevelOfRun) const { return a tRightBoundaryOfBidiRun(MatchBidiLevel, bidiLevelOfRun); } 69 bool atRightBoundaryOfBidiRun(unsigned char bidiLevelOfRun) const { return a tRightBoundaryOfBidiRun(MatchBidiLevel, bidiLevelOfRun); }
70 70
71 Position positionAtLeftBoundaryOfBiDiRun() const; 71 Position positionAtLeftBoundaryOfBiDiRun() const;
72 Position positionAtRightBoundaryOfBiDiRun() const; 72 Position positionAtRightBoundaryOfBiDiRun() const;
73 73
74 IntRect absoluteRect(LayoutUnit* extraWidthToEndOfLine = 0) const; 74 IntRect absoluteRect(LayoutUnit* extraWidthToEndOfLine = 0) const;
75 void positionInGraphicsLayerBacking(CompositedSelectionBound&) const; 75
76 void positionInGraphicsLayerBacking(CompositedSelectionBound&, bool selectio nStart) const;
76 77
77 private: 78 private:
78 bool operator==(const RenderedPosition&) const { return false; } 79 bool operator==(const RenderedPosition&) const { return false; }
79 explicit RenderedPosition(LayoutObject*, InlineBox*, int offset); 80 explicit RenderedPosition(LayoutObject*, InlineBox*, int offset);
80 81
81 InlineBox* prevLeafChild() const; 82 InlineBox* prevLeafChild() const;
82 InlineBox* nextLeafChild() const; 83 InlineBox* nextLeafChild() const;
83 bool atLeftmostOffsetInBox() const { return m_inlineBox && m_offset == m_inl ineBox->caretLeftmostOffset(); } 84 bool atLeftmostOffsetInBox() const { return m_inlineBox && m_offset == m_inl ineBox->caretLeftmostOffset(); }
84 bool atRightmostOffsetInBox() const { return m_inlineBox && m_offset == m_in lineBox->caretRightmostOffset(); } 85 bool atRightmostOffsetInBox() const { return m_inlineBox && m_offset == m_in lineBox->caretRightmostOffset(); }
85 bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel, unsigned char bidiLevelOf Run) const; 86 bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel, unsigned char bidiLevelOf Run) const;
(...skipping 26 matching lines...) Expand all
112 , m_prevLeafChild(uncachedInlineBox()) 113 , m_prevLeafChild(uncachedInlineBox())
113 , m_nextLeafChild(uncachedInlineBox()) 114 , m_nextLeafChild(uncachedInlineBox())
114 { 115 {
115 } 116 }
116 117
117 CORE_EXPORT bool layoutObjectContainsPosition(LayoutObject*, const Position&); 118 CORE_EXPORT bool layoutObjectContainsPosition(LayoutObject*, const Position&);
118 119
119 }; 120 };
120 121
121 #endif // RenderedPosition_h 122 #endif // RenderedPosition_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/RenderedPosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698