Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index e913d31e1340f849c08cc1f8b86a41dd5aee504c..d71183a3dbaf71a6ba527ed95dbf9c4fd00749a5 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -28,6 +28,8 @@ |
| #include "core/layout/LayoutObject.h" |
| +#include <algorithm> |
| +#include <memory> |
| #include "core/animation/ElementAnimations.h" |
| #include "core/css/resolver/StyleResolver.h" |
| #include "core/dom/AXObjectCache.h" |
| @@ -77,6 +79,7 @@ |
| #include "core/paint/PaintLayer.h" |
| #include "core/style/ContentData.h" |
| #include "core/style/CursorData.h" |
| +#include "platform/HostWindow.h" |
| #include "platform/InstanceCounters.h" |
| #include "platform/RuntimeEnabledFeatures.h" |
| #include "platform/geometry/TransformState.h" |
| @@ -85,8 +88,6 @@ |
| #include "wtf/allocator/Partitions.h" |
| #include "wtf/text/StringBuilder.h" |
| #include "wtf/text/WTFString.h" |
| -#include <algorithm> |
| -#include <memory> |
| #ifndef NDEBUG |
| #include <stdio.h> |
| #endif |
| @@ -99,8 +100,8 @@ static bool gModifyLayoutTreeStructureAnyState = false; |
| } // namespace |
| -const LayoutUnit& caretWidth() { |
| - static LayoutUnit gCaretWidth(1); |
| +const LayoutUnit& caretWidth(HostWindow* host) { |
| + static LayoutUnit gCaretWidth(host->windowToViewportScalar(1)); |
|
Xianzhu
2017/02/10 22:53:55
Does host->windowToViewportScalar(1) always return
oshima
2017/02/10 22:57:23
No, two tabs may have different scale factor.
Xianzhu
2017/02/10 23:04:13
Then the above code is incorrect because the stati
|
| return gCaretWidth; |
| } |