| Index: Source/core/rendering/compositing/CompositedSelectionBound.h
|
| diff --git a/Source/web/tests/FloatPointTestHelpers.h b/Source/core/rendering/compositing/CompositedSelectionBound.h
|
| similarity index 68%
|
| copy from Source/web/tests/FloatPointTestHelpers.h
|
| copy to Source/core/rendering/compositing/CompositedSelectionBound.h
|
| index 2ef2ee07fe3bb2d7ae60416992c8039769a93d72..d9cc88a412fa983f32f4f8a587f8d281ceafb718 100644
|
| --- a/Source/web/tests/FloatPointTestHelpers.h
|
| +++ b/Source/core/rendering/compositing/CompositedSelectionBound.h
|
| @@ -27,24 +27,38 @@
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
| -#ifndef FloatPointTestHelpers_h
|
| -#define FloatPointTestHelpers_h
|
|
|
| -#include "platform/geometry/FloatPoint.h"
|
| +#ifndef CompositedSelectionBound_h
|
| +#define CompositedSelectionBound_h
|
|
|
| -#include <gtest/gtest.h>
|
| +#include "platform/geometry/FloatPoint.h"
|
| +#include "platform/graphics/GraphicsLayer.h"
|
|
|
| -// Gtest will automatically pick up this function if included to print out
|
| -// FloatPoints, rather than just spitting out their memory.
|
| namespace blink {
|
| -inline void PrintTo(const FloatPoint& point, ::std::ostream* os)
|
| -{
|
| - *os << "FloatPoint("
|
| - << std::fixed
|
| - << std::setprecision(4) << point.x() << "f, "
|
| - << std::setprecision(4) << point.y() << "f)";
|
| - os->unsetf(std::ios::floatfield);
|
| -}
|
| -}
|
| -
|
| -#endif // FloatPointTestHelpers_h
|
| +
|
| +struct CompositedSelectionBound {
|
| + enum Type {
|
| + Caret,
|
| + SelectionLeft,
|
| + SelectionRight
|
| + };
|
| +
|
| + CompositedSelectionBound()
|
| + : type(Caret)
|
| + , layer(nullptr)
|
| + {
|
| + }
|
| +
|
| + Type type;
|
| +
|
| + // The structure describes the position of a caret in space of the GraphicsLayer the caret resides in.
|
| + // Where edgeTopInLayer is the top point of the caret, usually on the ascend line of the line box,
|
| + // and edgeBottomInLayer it the bottom point, on the baseline of the line box.
|
| + GraphicsLayer* layer;
|
| + FloatPoint edgeTopInLayer;
|
| + FloatPoint edgeBottomInLayer;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|