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

Unified Diff: third_party/WebKit/public/web/WebLocalFrame.h

Issue 2953193002: Move ContentsSize and HasVisibleContent methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: . Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/web/WebLocalFrame.h
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h
index e8798beb7f77b18f8bc9d03c4429653f2a823879..2cb148cac15fdc473427978616632c7017019786 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -13,6 +13,7 @@
#include "WebFrameLoadType.h"
#include "WebHistoryItem.h"
#include "public/platform/WebCachePolicy.h"
+#include "public/platform/WebSize.h"
#include "public/platform/WebURLError.h"
#include "public/platform/WebURLRequest.h"
#include "public/platform/site_engagement.mojom-shared.h"
@@ -704,6 +705,9 @@ class WebLocalFrame : public WebFrame {
// Geometry -----------------------------------------------------------------
+ // NOTE: These routines do not force page layout so their results may
+ // not be accurate if the page layout is out-of-date.
+
// The scroll offset from the top-left corner of the frame in pixels.
virtual WebSize GetScrollOffset() const = 0;
virtual void SetScrollOffset(const WebSize&) = 0;
@@ -711,6 +715,12 @@ class WebLocalFrame : public WebFrame {
// If set to false, do not draw scrollbars on this frame's view.
virtual void SetCanHaveScrollbars(bool) = 0;
+ // The size of the contents area.
+ virtual WebSize ContentsSize() const = 0;
+
+ // Returns true if the contents (minus scrollbars) has non-zero area.
+ virtual bool HasVisibleContent() const = 0;
+
// Printing ------------------------------------------------------------
// Reformats the WebFrame for printing. WebPrintParams specifies the printable
« android_webview/renderer/aw_render_view_ext.cc ('K') | « third_party/WebKit/public/web/WebFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698