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

Side by Side Diff: Source/core/layout/compositing/CompositedSelectionBound.h

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TODO for moving WebSelectionBound Created 5 years, 8 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/layout/compositing/CompositedSelection.h ('k') | Source/core/page/ChromeClient.h » ('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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 19 matching lines...) Expand all
30 30
31 #ifndef CompositedSelectionBound_h 31 #ifndef CompositedSelectionBound_h
32 #define CompositedSelectionBound_h 32 #define CompositedSelectionBound_h
33 33
34 #include "platform/geometry/FloatPoint.h" 34 #include "platform/geometry/FloatPoint.h"
35 #include "platform/graphics/GraphicsLayer.h" 35 #include "platform/graphics/GraphicsLayer.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 struct CompositedSelectionBound { 39 struct CompositedSelectionBound {
40 enum Type {
41 Caret,
42 SelectionLeft,
43 SelectionRight
44 };
45
46 CompositedSelectionBound() 40 CompositedSelectionBound()
47 : type(Caret) 41 : layer(nullptr)
48 , layer(nullptr) 42 , isTextDirectionRTL(false)
49 { 43 {
50 } 44 }
51 45
52 Type type;
53
54 // The structure describes the position of a caret in space of the GraphicsL ayer the caret resides in. 46 // The structure describes the position of a caret in space of the GraphicsL ayer the caret resides in.
55 // Where edgeTopInLayer is the top point of the caret, usually on the ascend line of the line box, 47 // Where edgeTopInLayer is the top point of the caret, usually on the ascend line of the line box,
56 // and edgeBottomInLayer it the bottom point, on the baseline of the line bo x. 48 // and edgeBottomInLayer it the bottom point, on the baseline of the line bo x.
57 GraphicsLayer* layer; 49 GraphicsLayer* layer;
58 FloatPoint edgeTopInLayer; 50 FloatPoint edgeTopInLayer;
59 FloatPoint edgeBottomInLayer; 51 FloatPoint edgeBottomInLayer;
52
53 bool isTextDirectionRTL;
60 }; 54 };
61 55
62 } // namespace blink 56 } // namespace blink
63 57
64 #endif 58 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/compositing/CompositedSelection.h ('k') | Source/core/page/ChromeClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698