diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2011-01-07 15:46:52 -0800 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2011-01-11 10:53:17 -0800 |
commit | c4683829d0d4932156a97ce14ea15deed71bf21d (patch) | |
tree | 46ae05af82a74578639530ed4b38517b0f17ce81 /WebCore | |
parent | cea2bc79994f4e4f617a2e1a372dfc44a3f5365a (diff) | |
download | external_webkit-c4683829d0d4932156a97ce14ea15deed71bf21d.zip external_webkit-c4683829d0d4932156a97ce14ea15deed71bf21d.tar.gz external_webkit-c4683829d0d4932156a97ce14ea15deed71bf21d.tar.bz2 |
Use float to preserve scales' accuracy.
This change helps page navigation, since the restored scale
is accurate.
This change has a corresponding change in frameworks/base.
https://android-git.corp.google.com/g/#change,88121
issue: 3225233
Change-Id: I7e5601e8412e8b81e7f32c9ffb9e6c114db95169
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/history/android/AndroidWebHistoryBridge.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/WebCore/history/android/AndroidWebHistoryBridge.h b/WebCore/history/android/AndroidWebHistoryBridge.h index b320c4a..a827b4a 100644 --- a/WebCore/history/android/AndroidWebHistoryBridge.h +++ b/WebCore/history/android/AndroidWebHistoryBridge.h @@ -42,17 +42,17 @@ public: virtual ~AndroidWebHistoryBridge() { } virtual void updateHistoryItem(HistoryItem* item) = 0; - void setScale(int s) { m_scale = s; } - void setTextWrapScale(int s) { m_textWrapScale = s; } - int scale() const { return m_scale; } - int textWrapScale() const { return m_textWrapScale; } + void setScale(float s) { m_scale = s; } + void setTextWrapScale(float s) { m_textWrapScale = s; } + float scale() const { return m_scale; } + float textWrapScale() const { return m_textWrapScale; } void detachHistoryItem() { m_historyItem = 0; } HistoryItem* historyItem() const { return m_historyItem; } void setActive() { m_active = true; } protected: - int m_scale; - int m_textWrapScale; + float m_scale; + float m_textWrapScale; bool m_active; HistoryItem* m_historyItem; }; |