diff options
author | Fabian Lange <lange.fabian@gmail.com> | 2014-06-20 10:49:50 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-06-23 06:51:47 +0000 |
commit | 0c229ae91460fedaeb557bdc5a646433658b0dfb (patch) | |
tree | 4959adbc8ab29cc67515e44e2fc792d39ffba310 /server/src/com/vaadin/ui/AbstractMedia.java | |
parent | 6e109e4d73b7e3c09da3000a813904b52ea89991 (diff) | |
download | vaadin-framework-0c229ae91460fedaeb557bdc5a646433658b0dfb.tar.gz vaadin-framework-0c229ae91460fedaeb557bdc5a646433658b0dfb.zip |
Reading properties of components should not set state to dirty (#14060).
Many core vaadin components did incorrectly mark the state as dirty when
reading from them. This patch fixes the problem, which should reduce the
amount of server->client state updates significantly.
Change-Id: I342d74129e2985a7f407e9b53a802dc0146d9992
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractMedia.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractMedia.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/AbstractMedia.java b/server/src/com/vaadin/ui/AbstractMedia.java index a841aa672e..d0ff8494f0 100644 --- a/server/src/com/vaadin/ui/AbstractMedia.java +++ b/server/src/com/vaadin/ui/AbstractMedia.java @@ -47,6 +47,11 @@ public abstract class AbstractMedia extends AbstractComponent { return (AbstractMediaState) super.getState(); } + @Override + protected AbstractMediaState getState(boolean markAsDirty) { + return (AbstractMediaState) super.getState(markAsDirty); + } + /** * Sets a single media file as the source of the media component. * @@ -160,7 +165,7 @@ public abstract class AbstractMedia extends AbstractComponent { * @return true if the browser is to show native media controls. */ public boolean isShowControls() { - return getState().showControls; + return getState(false).showControls; } /** @@ -183,7 +188,7 @@ public abstract class AbstractMedia extends AbstractComponent { * HTML5. */ public String getAltText() { - return getState().altText; + return getState(false).altText; } /** @@ -201,7 +206,7 @@ public abstract class AbstractMedia extends AbstractComponent { * be rendered as HTML. */ public boolean isHtmlContentAllowed() { - return getState().htmlContentAllowed; + return getState(false).htmlContentAllowed; } /** @@ -218,7 +223,7 @@ public abstract class AbstractMedia extends AbstractComponent { * @return true if the media is set to automatically start playback. */ public boolean isAutoplay() { - return getState().autoplay; + return getState(false).autoplay; } /** @@ -234,7 +239,7 @@ public abstract class AbstractMedia extends AbstractComponent { * @return true if the audio is muted. */ public boolean isMuted() { - return getState().muted; + return getState(false).muted; } /** |