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

Unified Diff: Source/core/platform/ScrollView.h

Issue 14766010: Clarify the size of a document view (a.k.a layout size) that causes FrameView to emit the resize ev… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add new test: fast/events/resize-events-count.html Created 7 years, 7 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: Source/core/platform/ScrollView.h
diff --git a/Source/core/platform/ScrollView.h b/Source/core/platform/ScrollView.h
index b8f97a38e32c714fb500c26de4bb8173bb321d14..3c7701874a01ba72785ea2eda8a444eae0f0a77f 100644
--- a/Source/core/platform/ScrollView.h
+++ b/Source/core/platform/ScrollView.h
@@ -142,6 +142,10 @@ public:
IntSize layoutSize() const;
int layoutWidth() const { return layoutSize().width(); }
int layoutHeight() const { return layoutSize().height(); }
+ // The spec DOM Level 2 Events states that the resize event occurs when document view size (a.k.a layout size) is changed. Refer to http://www.w3.org/TR/DOM-Level-2-Events/events.html
+ // However, we don't want scrollbar to emit a resize event because other browsers don't have this behavior, and actual site is badly affected. Refer to webkit.org/b/80242
kenneth.r.christiansen 2013/05/06 19:50:51 I don't think this explains it very well. You want
+ // So we use layoutSizeIncludingScrollbars() to emit a resize event due to above practical reason.
+ IntSize layoutSizeIncludingScrollbars() const;
IntSize fixedLayoutSize() const;
void setFixedLayoutSize(const IntSize&);
bool useFixedLayout() const;

Powered by Google App Engine
This is Rietveld 408576698