OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 GetWebView()->HandleInputEvent( | 116 GetWebView()->HandleInputEvent( |
117 GenerateEvent(WebInputEvent::kGestureScrollBegin)); | 117 GenerateEvent(WebInputEvent::kGestureScrollBegin)); |
118 GetWebView()->HandleInputEvent( | 118 GetWebView()->HandleInputEvent( |
119 GenerateEvent(WebInputEvent::kGestureScrollUpdate, 0, delta_y)); | 119 GenerateEvent(WebInputEvent::kGestureScrollUpdate, 0, delta_y)); |
120 GetWebView()->HandleInputEvent( | 120 GetWebView()->HandleInputEvent( |
121 GenerateEvent(WebInputEvent::kGestureScrollEnd)); | 121 GenerateEvent(WebInputEvent::kGestureScrollEnd)); |
122 } | 122 } |
123 | 123 |
124 Element* GetElementById(const WebString& id) { | 124 Element* GetElementById(const WebString& id) { |
125 return static_cast<Element*>( | 125 return static_cast<Element*>( |
126 GetWebView()->MainFrame()->GetDocument().GetElementById(id)); | 126 GetWebView()->MainFrameImpl()->GetDocument().GetElementById(id)); |
127 } | 127 } |
128 | 128 |
129 WebViewBase* GetWebView() const { return helper_.WebView(); } | 129 WebViewBase* GetWebView() const { return helper_.WebView(); } |
130 LocalFrame* GetFrame() const { | 130 LocalFrame* GetFrame() const { |
131 return helper_.WebView()->MainFrameImpl()->GetFrame(); | 131 return helper_.WebView()->MainFrameImpl()->GetFrame(); |
132 } | 132 } |
133 VisualViewport& GetVisualViewport() const { | 133 VisualViewport& GetVisualViewport() const { |
134 return helper_.WebView()->GetPage()->GetVisualViewport(); | 134 return helper_.WebView()->GetPage()->GetVisualViewport(); |
135 } | 135 } |
136 | 136 |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 | 1071 |
1072 // Make sure we're not adding the browser controls height to the vh units as | 1072 // Make sure we're not adding the browser controls height to the vh units as |
1073 // when they're locked to hidden, the ICB fills the entire viewport already. | 1073 // when they're locked to hidden, the ICB fills the entire viewport already. |
1074 EXPECT_FLOAT_EQ(200.f, abs_pos->getBoundingClientRect()->height()); | 1074 EXPECT_FLOAT_EQ(200.f, abs_pos->getBoundingClientRect()->height()); |
1075 EXPECT_FLOAT_EQ(200.f, fixed_pos->getBoundingClientRect()->height()); | 1075 EXPECT_FLOAT_EQ(200.f, fixed_pos->getBoundingClientRect()->height()); |
1076 EXPECT_EQ(400, GetFrame()->View()->ViewportSizeForViewportUnits().Height()); | 1076 EXPECT_EQ(400, GetFrame()->View()->ViewportSizeForViewportUnits().Height()); |
1077 } | 1077 } |
1078 } | 1078 } |
1079 | 1079 |
1080 } // namespace blink | 1080 } // namespace blink |
OLD | NEW |