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

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

Issue 2620383004: Fix graphics layer backing and offset for composited selection handles. (Closed)
Patch Set: none Created 3 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 20 matching lines...) Expand all
31 #ifndef RenderedPosition_h 31 #ifndef RenderedPosition_h
32 #define RenderedPosition_h 32 #define RenderedPosition_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/editing/VisiblePosition.h" 35 #include "core/editing/VisiblePosition.h"
36 #include "core/layout/line/InlineBox.h" 36 #include "core/layout/line/InlineBox.h"
37 #include "wtf/Allocator.h" 37 #include "wtf/Allocator.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class GraphicsLayer;
42 class LayoutPoint;
41 class LayoutUnit; 43 class LayoutUnit;
42 class LayoutObject; 44 class LayoutObject;
43 struct CompositedSelectionBound; 45 struct CompositedSelectionBound;
44 46
45 class RenderedPosition { 47 class RenderedPosition {
46 STACK_ALLOCATED(); 48 STACK_ALLOCATED();
47 49
48 public: 50 public:
49 RenderedPosition(); 51 RenderedPosition();
50 explicit RenderedPosition(const VisiblePosition&); 52 explicit RenderedPosition(const VisiblePosition&);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return m_inlineBox && m_offset == m_inlineBox->caretLeftmostOffset(); 97 return m_inlineBox && m_offset == m_inlineBox->caretLeftmostOffset();
96 } 98 }
97 bool atRightmostOffsetInBox() const { 99 bool atRightmostOffsetInBox() const {
98 return m_inlineBox && m_offset == m_inlineBox->caretRightmostOffset(); 100 return m_inlineBox && m_offset == m_inlineBox->caretRightmostOffset();
99 } 101 }
100 bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel, 102 bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel,
101 unsigned char bidiLevelOfRun) const; 103 unsigned char bidiLevelOfRun) const;
102 bool atRightBoundaryOfBidiRun(ShouldMatchBidiLevel, 104 bool atRightBoundaryOfBidiRun(ShouldMatchBidiLevel,
103 unsigned char bidiLevelOfRun) const; 105 unsigned char bidiLevelOfRun) const;
104 106
107 FloatPoint localToInvalidationBackingPoint(
108 const LayoutPoint& localPoint,
109 GraphicsLayer** graphicsLayerBacking) const;
110
105 LayoutObject* m_layoutObject; 111 LayoutObject* m_layoutObject;
106 InlineBox* m_inlineBox; 112 InlineBox* m_inlineBox;
107 int m_offset; 113 int m_offset;
108 114
109 static InlineBox* uncachedInlineBox() { 115 static InlineBox* uncachedInlineBox() {
110 return reinterpret_cast<InlineBox*>(1); 116 return reinterpret_cast<InlineBox*>(1);
111 } 117 }
112 // Needs to be different form 0 so pick 1 because it's also on the null page. 118 // Needs to be different form 0 so pick 1 because it's also on the null page.
113 119
114 mutable InlineBox* m_prevLeafChild; 120 mutable InlineBox* m_prevLeafChild;
(...skipping 14 matching lines...) Expand all
129 m_inlineBox(box), 135 m_inlineBox(box),
130 m_offset(offset), 136 m_offset(offset),
131 m_prevLeafChild(uncachedInlineBox()), 137 m_prevLeafChild(uncachedInlineBox()),
132 m_nextLeafChild(uncachedInlineBox()) {} 138 m_nextLeafChild(uncachedInlineBox()) {}
133 139
134 CORE_EXPORT bool layoutObjectContainsPosition(LayoutObject*, const Position&); 140 CORE_EXPORT bool layoutObjectContainsPosition(LayoutObject*, const Position&);
135 141
136 } // namespace blink 142 } // namespace blink
137 143
138 #endif // RenderedPosition_h 144 #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