Browse Source

#7984 removed Firefox workarounds

tags/7.0.0.alpha1
Artur Signell 12 years ago
parent
commit
a86f5e6a15

+ 1
- 2
WebContent/VAADIN/themes/chameleon/common/common.css View File

@@ -28,8 +28,7 @@
-moz-border-radius: 4px;
}

.v-sa .v-tooltip,
.v-ff3 .v-tooltip {
.v-sa .v-tooltip {
outline: 1px solid rgba(0,0,0,.2);
-webkit-border-radius: 0;
-moz-border-radius: 0;

+ 0
- 1
WebContent/VAADIN/themes/reindeer/datefield/datefield.css View File

@@ -221,7 +221,6 @@ td.v-datefield-calendarpanel-nextyear {
-moz-border-radius: 3px;
}
.v-sa .v-datefield-popup,
.v-ff3 .v-datefield-popup,
.v-op .v-datefield-popup {
background: rgba(255,255,255,.95);
}

+ 2
- 4
WebContent/VAADIN/themes/reindeer/tabsheet/tabsheet-normal-style.css View File

@@ -104,8 +104,7 @@
.v-tabsheet-tabsheetpanel {
background: #fff;
}
.v-sa .v-tabsheet-content,
.v-ff3 .v-tabsheet-content {
.v-sa .v-tabsheet-content {
border-color: rgba(0,0,0,.1);
}
.blue .v-tabsheet-deco {
@@ -119,8 +118,7 @@
background: #e2e2e2;
overflow: hidden;
}
.v-sa .v-tabsheet-deco,
.v-ff3 .v-tabsheet-deco {
.v-sa .v-tabsheet-deco {
border-top-color: rgba(0,0,0,.1);
background: rgba(0,0,0,.08);
}

+ 0
- 3
WebContent/VAADIN/themes/reindeer/window/window.css View File

@@ -5,7 +5,6 @@
border: 1px solid #808386;
}
.v-sa .v-window-wrap,
.v-ff3 .v-window-wrap,
.v-op .v-window-wrap {
border-color: rgba(0,0,0,.2);
}
@@ -127,7 +126,6 @@
overflow: hidden;
}
.v-sa .v-window-black .v-window-wrap,
.v-ff3 .v-window-black .v-window-wrap,
.v-op .v-window-black .v-window-wrap {
border-color: rgba(0,0,0,.8);
}
@@ -137,7 +135,6 @@
-webkit-border-radius: 7px;
}
.v-sa .v-window-black .v-window-wrap2,
.v-ff3 .v-window-black .v-window-wrap2,
.v-op .v-window-black .v-window-wrap2 {
background-color: rgba(29,32,33,.9);
}

+ 0
- 11
src/com/vaadin/terminal/gwt/client/BrowserInfo.java View File

@@ -212,17 +212,6 @@ public class BrowserInfo {
return browserDetails.isWebKit();
}

public boolean isFF3() {
// FIXME: Should use browserVersion
return browserDetails.isFirefox()
&& browserDetails.getBrowserEngineVersion() == 1.9;
}

public boolean isFF4() {
return browserDetails.isFirefox()
&& browserDetails.getBrowserMajorVersion() == 4;
}

/**
* Returns the Gecko version if the browser is Gecko based. The Gecko
* version for Firefox 2 is 1.8 and 1.9 for Firefox 3.

+ 2
- 12
src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java View File

@@ -12,7 +12,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.event.dom.client.BlurHandler;
@@ -1244,22 +1243,13 @@ public class VFilterSelect extends Composite implements Paintable, Field,
}

/**
* Sets the text in the text box using a deferred command if on Gecko. This
* is required for performance reasons (see #3663).
* Sets the text in the text box.
*
* @param text
* the text to set in the text box
*/
private void setTextboxText(final String text) {
if (BrowserInfo.get().isFF3()) {
Scheduler.get().scheduleDeferred(new Command() {
public void execute() {
tb.setText(text);
}
});
} else {
tb.setText(text);
}
tb.setText(text);
}

/*

+ 7
- 36
src/com/vaadin/terminal/gwt/client/ui/VTextField.java View File

@@ -287,44 +287,15 @@ public class VTextField extends TextBoxBase implements Paintable, Field,
setPrompting(inputPrompt != null && focusedTextField != this
&& (text.equals("")));

if (BrowserInfo.get().isFF3()) {
/*
* Firefox 3 is really sluggish when updating input attached to dom.
* Some optimizations seems to work much better in Firefox3 if we
* update the actual content lazily when the rest of the DOM has
* stabilized. In tests, about ten times better performance is
* achieved with this optimization. See for eg. #2898
*/
Scheduler.get().scheduleDeferred(new Command() {
public void execute() {
String fieldValue;
if (prompting) {
fieldValue = isReadOnly() ? "" : inputPrompt;
addStyleDependentName(CLASSNAME_PROMPT);
} else {
fieldValue = text;
removeStyleDependentName(CLASSNAME_PROMPT);
}
/*
* Avoid resetting the old value. Prevents cursor flickering
* which then again happens due to this Gecko hack.
*/
if (!getText().equals(fieldValue)) {
setText(fieldValue);
}
}
});
String fieldValue;
if (prompting) {
fieldValue = isReadOnly() ? "" : inputPrompt;
addStyleDependentName(CLASSNAME_PROMPT);
} else {
String fieldValue;
if (prompting) {
fieldValue = isReadOnly() ? "" : inputPrompt;
addStyleDependentName(CLASSNAME_PROMPT);
} else {
fieldValue = text;
removeStyleDependentName(CLASSNAME_PROMPT);
}
setText(fieldValue);
fieldValue = text;
removeStyleDependentName(CLASSNAME_PROMPT);
}
setText(fieldValue);

lastTextChangeString = valueBeforeEdit = text;
}

+ 0
- 5
src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java View File

@@ -15,7 +15,6 @@ import com.google.gwt.event.dom.client.FocusHandler;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.TextBox;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.ContainerResizedListener;
import com.vaadin.terminal.gwt.client.EventId;
import com.vaadin.terminal.gwt.client.Focusable;
@@ -367,10 +366,6 @@ public class VTextualDate extends VDateField implements Paintable, Field,
if (fieldExtraWidth < 0) {
text.setWidth("0");
fieldExtraWidth = text.getOffsetWidth();
if (BrowserInfo.get().isFF3()) {
// Firefox somehow always leaves the INPUT element 2px wide
fieldExtraWidth -= 2;
}
}
return fieldExtraWidth;
}

+ 1
- 2
src/com/vaadin/terminal/gwt/client/ui/VView.java View File

@@ -476,8 +476,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler,
* browser window. Constantly recalculating the layout causes the resize
* operation to be really slow with complex layouts.
*/
boolean lazy = resizeLazy || BrowserInfo.get().isIE8()
|| BrowserInfo.get().isFF3();
boolean lazy = resizeLazy || BrowserInfo.get().isIE8();

if (lazy) {
delayedResizeExecutor.trigger();

+ 0
- 13
src/com/vaadin/terminal/gwt/client/ui/VWindow.java View File

@@ -667,19 +667,6 @@ public class VWindow extends VOverlay implements Container,
showModalityCurtain();
}
super.show();

fixFF3OverflowBug();
}

/** Disable overflow auto with FF3 to fix #1837. */
private void fixFF3OverflowBug() {
if (BrowserInfo.get().isFF3()) {
Scheduler.get().scheduleDeferred(new Command() {
public void execute() {
DOM.setStyleAttribute(getElement(), "overflow", "");
}
});
}
}

@Override

Loading…
Cancel
Save