Merge from Chromium at DEPS revision r213057

This commit was generated by merge_to_master.py.

Change-Id: If0dbdee1edae80ae428c081eb0ecd6ce3518559f
diff --git a/Source/core/html/BaseCheckableInputType.cpp b/Source/core/html/BaseCheckableInputType.cpp
index 6867bd2..28c069b 100644
--- a/Source/core/html/BaseCheckableInputType.cpp
+++ b/Source/core/html/BaseCheckableInputType.cpp
@@ -44,7 +44,7 @@
 
 FormControlState BaseCheckableInputType::saveFormControlState() const
 {
-    return FormControlState(element()->checked() ? "on" : "off");
+    return FormControlState(element()->checked() ? ASCIILiteral("on") : ASCIILiteral("off"));
 }
 
 void BaseCheckableInputType::restoreFormControlState(const FormControlState& state)
@@ -93,7 +93,7 @@
 
 String BaseCheckableInputType::fallbackValue() const
 {
-    return "on";
+    return ASCIILiteral("on");
 }
 
 bool BaseCheckableInputType::storesValueSeparateFromAttribute()
diff --git a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
index 0484277..478e66c 100644
--- a/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -150,7 +150,7 @@
 
 inline bool BaseMultipleFieldsDateAndTimeInputType::containsFocusedShadowElement() const
 {
-    return element()->userAgentShadowRoot()->contains(element()->document()->focusedNode());
+    return element()->userAgentShadowRoot()->contains(element()->document()->focusedElement());
 }
 
 void BaseMultipleFieldsDateAndTimeInputType::didBlurFromControl()
diff --git a/Source/core/html/DOMTokenList.cpp b/Source/core/html/DOMTokenList.cpp
index b61dfec..2f9b122 100644
--- a/Source/core/html/DOMTokenList.cpp
+++ b/Source/core/html/DOMTokenList.cpp
@@ -208,12 +208,13 @@
         }
 
         // Step 7
-        StringBuilder s;
+        StringBuilder tokenBuilder;
         while (position < inputLength && isNotHTMLSpace(input[position]))
-            s.append(input[position++]);
+            tokenBuilder.append(input[position++]);
 
         // Step 8
-        if (tokens.contains(s.toStringPreserveCapacity())) {
+        String token = tokenBuilder.toString();
+        if (tokens.contains(token)) {
             // Step 8.1
             while (position < inputLength && isHTMLSpace(input[position]))
                 ++position;
@@ -227,8 +228,9 @@
             // Step 8.3
             if (position < inputLength && !output.isEmpty())
                 output.append(' ');
-        } else
-            output.append(s.toStringPreserveCapacity()); // Step 9
+        } else {
+            output.append(token); // Step 9
+        }
     }
 
     return output.toString();
diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
index 5e6e54d..398ac18 100644
--- a/Source/core/html/HTMLAnchorElement.cpp
+++ b/Source/core/html/HTMLAnchorElement.cpp
@@ -375,7 +375,9 @@
 String HTMLAnchorElement::hash() const
 {
     String fragmentIdentifier = href().fragmentIdentifier();
-    return fragmentIdentifier.isEmpty() ? emptyString() : "#" + fragmentIdentifier;
+    if (fragmentIdentifier.isEmpty())
+        return emptyString();
+    return AtomicString(String("#" + fragmentIdentifier));
 }
 
 void HTMLAnchorElement::setHash(const String& value)
diff --git a/Source/core/html/HTMLDimension.cpp b/Source/core/html/HTMLDimension.cpp
index fb91fd1..0946482 100644
--- a/Source/core/html/HTMLDimension.cpp
+++ b/Source/core/html/HTMLDimension.cpp
@@ -31,14 +31,15 @@
 #include "config.h"
 #include "core/html/HTMLDimension.h"
 
+#include "wtf/MathExtras.h"
 #include "wtf/text/WTFString.h"
 
 namespace WebCore {
 
 template <typename CharacterType>
-static Length parseDimension(const CharacterType* characters, size_t lastParsedIndex, size_t endOfCurrentToken)
+static HTMLDimension parseDimension(const CharacterType* characters, size_t lastParsedIndex, size_t endOfCurrentToken)
 {
-    LengthType type = Fixed;
+    HTMLDimension::HTMLDimensionType type = HTMLDimension::Absolute;
     double value = 0.;
 
     // HTML5's split removes leading and trailing spaces so we need to skip the leading spaces here.
@@ -47,7 +48,7 @@
 
     // This is Step 5.5. in the algorithm. Going to the last step would make the code less readable.
     if (lastParsedIndex >= endOfCurrentToken)
-        return Length(value, Relative);
+        return HTMLDimension(value, HTMLDimension::Relative);
 
     size_t position = lastParsedIndex;
     while (position < endOfCurrentToken && isASCIIDigit(characters[position]))
@@ -83,15 +84,15 @@
 
     if (position < endOfCurrentToken) {
         if (characters[position] == '*')
-            type = Relative;
+            type = HTMLDimension::Relative;
         else if (characters[position] == '%')
-            type = Percent;
+            type = HTMLDimension::Percentage;
     }
 
-    return Length(value, type);
+    return HTMLDimension(value, type);
 }
 
-static Length parseDimension(const String& rawToken, size_t lastParsedIndex, size_t endOfCurrentToken)
+static HTMLDimension parseDimension(const String& rawToken, size_t lastParsedIndex, size_t endOfCurrentToken)
 {
     if (rawToken.is8Bit())
         return parseDimension<LChar>(rawToken.characters8(), lastParsedIndex, endOfCurrentToken);
@@ -100,7 +101,7 @@
 
 // This implements the "rules for parsing a list of dimensions" per HTML5.
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#rules-for-parsing-a-list-of-dimensions
-Vector<Length> parseListOfDimensions(const String& input)
+Vector<HTMLDimension> parseListOfDimensions(const String& input)
 {
     static const char comma = ',';
 
@@ -112,22 +113,22 @@
     // HTML5's split doesn't return a token for an empty string so
     // we need to match them here.
     if (trimmedString.isEmpty())
-        return Vector<Length>();
+        return Vector<HTMLDimension>();
 
     // Step 3. To avoid String copies, we just look for commas instead of splitting.
-    Vector<Length> parsedLength;
+    Vector<HTMLDimension> parsedDimensions;
     size_t lastParsedIndex = 0;
     while (true) {
         size_t nextComma = trimmedString.find(comma, lastParsedIndex);
         if (nextComma == notFound)
             break;
 
-        parsedLength.append(parseDimension(trimmedString, lastParsedIndex, nextComma));
+        parsedDimensions.append(parseDimension(trimmedString, lastParsedIndex, nextComma));
         lastParsedIndex = nextComma + 1;
     }
 
-    parsedLength.append(parseDimension(trimmedString, lastParsedIndex, trimmedString.length()));
-    return parsedLength;
+    parsedDimensions.append(parseDimension(trimmedString, lastParsedIndex, trimmedString.length()));
+    return parsedDimensions;
 }
 
 } // namespace WebCore
diff --git a/Source/core/html/HTMLDimension.h b/Source/core/html/HTMLDimension.h
index 0241d7a..f0aa343 100644
--- a/Source/core/html/HTMLDimension.h
+++ b/Source/core/html/HTMLDimension.h
@@ -31,16 +31,51 @@
 #ifndef HTMLDimension_h
 #define HTMLDimension_h
 
-// FIXME: Remove once we introduce HTMLDimension.
-#include "core/platform/Length.h"
 #include "wtf/Forward.h"
 #include "wtf/Vector.h"
 
 namespace WebCore {
 
-struct Length;
+// This class corresponds to a dimension as described in HTML5 by the
+// "rules for parsing a list of dimensions" (section 2.4.4.6).
+class HTMLDimension {
+public:
+    enum HTMLDimensionType {
+        Relative, Percentage, Absolute
+    };
 
-Vector<Length> parseListOfDimensions(const String&);
+    HTMLDimension()
+        : m_type(Absolute)
+        , m_value(0)
+    {
+    }
+
+    HTMLDimension(double value, HTMLDimensionType type)
+        : m_type(type)
+        , m_value(value)
+    {
+    }
+
+    HTMLDimensionType type() const { return m_type; }
+
+    bool isRelative() const { return m_type == Relative; }
+    bool isPercentage() const { return m_type == Percentage; }
+    bool isAbsolute() const { return m_type == Absolute; }
+
+    double value() const { return m_value; }
+
+    bool operator==(const HTMLDimension& other) const
+    {
+        return m_type == other.m_type && m_value == other.m_value;
+    }
+    bool operator!=(const HTMLDimension& other) const { return !(*this == other); }
+
+private:
+    HTMLDimensionType m_type;
+    double m_value;
+};
+
+Vector<HTMLDimension> parseListOfDimensions(const String&);
 
 } // namespace WebCore
 
diff --git a/Source/core/html/HTMLFrameOwnerElement.cpp b/Source/core/html/HTMLFrameOwnerElement.cpp
index 779e19c..a8bfa6e 100644
--- a/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -95,7 +95,7 @@
 
 DOMWindow* HTMLFrameOwnerElement::contentWindow() const
 {
-    return m_contentFrame ? m_contentFrame->document()->domWindow() : 0;
+    return m_contentFrame ? m_contentFrame->domWindow() : 0;
 }
 
 void HTMLFrameOwnerElement::setSandboxFlags(SandboxFlags flags)
diff --git a/Source/core/html/HTMLFrameSetElement.h b/Source/core/html/HTMLFrameSetElement.h
index 912b397..9b01d46 100644
--- a/Source/core/html/HTMLFrameSetElement.h
+++ b/Source/core/html/HTMLFrameSetElement.h
@@ -24,6 +24,7 @@
 #ifndef HTMLFrameSetElement_h
 #define HTMLFrameSetElement_h
 
+#include "core/html/HTMLDimension.h"
 #include "core/html/HTMLElement.h"
 
 namespace WebCore {
@@ -41,8 +42,8 @@
 
     bool hasBorderColor() const { return m_borderColorSet; }
 
-    const Vector<Length>& rowLengths() const { return m_rowLengths; }
-    const Vector<Length>& colLengths() const { return m_colLengths; }
+    const Vector<HTMLDimension>& rowLengths() const { return m_rowLengths; }
+    const Vector<HTMLDimension>& colLengths() const { return m_colLengths; }
 
     DOMWindow* anonymousNamedGetter(const AtomicString&);
 
@@ -81,8 +82,8 @@
     virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void willRecalcStyle(StyleChange) OVERRIDE;
 
-    Vector<Length> m_rowLengths;
-    Vector<Length> m_colLengths;
+    Vector<HTMLDimension> m_rowLengths;
+    Vector<HTMLDimension> m_colLengths;
 
     int m_border;
     bool m_borderSet;
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 245d2ac..3325cf9 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -498,7 +498,7 @@
 
     if (wasAttached) {
         lazyAttach();
-        if (document()->focusedNode() == this)
+        if (document()->focusedElement() == this)
             document()->updateFocusAppearanceSoon(true /* restore selection */);
     }
 
@@ -821,7 +821,7 @@
 
     m_inputType->attach();
 
-    if (document()->focusedNode() == this)
+    if (document()->focusedElement() == this)
         document()->updateFocusAppearanceSoon(true /* restore selection */);
 }
 
diff --git a/Source/core/html/HTMLLinkElement.cpp b/Source/core/html/HTMLLinkElement.cpp
index cfdadad..6231f2d 100644
--- a/Source/core/html/HTMLLinkElement.cpp
+++ b/Source/core/html/HTMLLinkElement.cpp
@@ -26,6 +26,7 @@
 #include "core/html/HTMLLinkElement.h"
 
 #include "HTMLNames.h"
+#include "RuntimeEnabledFeatures.h"
 #include "bindings/v8/ScriptEventListener.h"
 #include "core/css/MediaList.h"
 #include "core/css/MediaQueryEvaluator.h"
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 41cbee8..13cc476 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1010,7 +1010,7 @@
     // element. (In the other cases, such as explicit seeks, relevant events get
     // fired as part of the overall process of changing the current playback
     // position.)
-    if (m_lastSeekTime <= lastTime)
+    if (!m_seeking && m_lastSeekTime <= lastTime)
         scheduleTimeupdateEvent(false);
 
     // Explicitly cache vector sizes, as their content is constant from here.
@@ -1588,11 +1588,13 @@
         return;
 
     if (m_seeking) {
-        // 4.8.10.9, step 11
+        // 4.8.10.9, step 9 note: If the media element was potentially playing immediately before
+        // it started seeking, but seeking caused its readyState attribute to change to a value
+        // lower than HAVE_FUTURE_DATA, then a waiting will be fired at the element.
         if (wasPotentiallyPlaying && m_readyState < HAVE_FUTURE_DATA)
             scheduleEvent(eventNames().waitingEvent);
 
-        // 4.8.10.10 step 14 & 15.
+        // 4.8.10.9 steps 12-14
         if (m_readyState >= HAVE_CURRENT_DATA)
             finishSeek();
     } else {
@@ -1834,7 +1836,7 @@
 {
     LOG(Media, "HTMLMediaElement::seek(%f)", time);
 
-    // 4.8.9.9 Seeking
+    // 4.8.10.9 Seeking
 
     // 1 - If the media element's readyState is HAVE_NOTHING, then raise an InvalidStateError exception.
     if (m_readyState == HAVE_NOTHING || !m_player) {
@@ -1912,26 +1914,28 @@
     m_lastSeekTime = time;
     m_sentEndEvent = false;
 
-    // 8 - Set the current playback position to the given new playback position
-    m_player->seek(time);
-
-    // 9 - Queue a task to fire a simple event named seeking at the element.
+    // 8 - Queue a task to fire a simple event named seeking at the element.
     scheduleEvent(eventNames().seekingEvent);
 
-    // 10 - Queue a task to fire a simple event named timeupdate at the element.
-    scheduleTimeupdateEvent(false);
+    // 9 - Set the current playback position to the given new playback position
+    m_player->seek(time);
 
-    // 11-15 are handled, if necessary, when the engine signals a readystate change.
+    // 10-14 are handled, if necessary, when the engine signals a readystate change or otherwise
+    // satisfies seek completion and signals a time change.
 }
 
 void HTMLMediaElement::finishSeek()
 {
     LOG(Media, "HTMLMediaElement::finishSeek");
 
-    // 4.8.10.9 Seeking step 14
+    // 4.8.10.9 Seeking completion
+    // 12 - Set the seeking IDL attribute to false.
     m_seeking = false;
 
-    // 4.8.10.9 Seeking step 15
+    // 13 - Queue a task to fire a simple event named timeupdate at the element.
+    scheduleTimeupdateEvent(false);
+
+    // 14 - Queue a task to fire a simple event named seeked at the element.
     scheduleEvent(eventNames().seekedEvent);
 
     setDisplayMode(Video);
@@ -2444,7 +2448,8 @@
         }
     }
 
-    scheduleTimeupdateEvent(true);
+    if (!m_seeking)
+        scheduleTimeupdateEvent(true);
 
     if (!m_playbackRate)
         return;
@@ -3079,7 +3084,7 @@
 
     invalidateCachedTime();
 
-    // 4.8.10.9 step 14 & 15.  Needed if no ReadyState change is associated with the seek.
+    // 4.8.10.9 steps 12-14. Needed if no ReadyState change is associated with the seek.
     if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking())
         finishSeek();
 
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
index 0ca2446..e44a404 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -196,13 +196,8 @@
                 renderer()->theme()->stateChanged(renderer(), EnabledState);
         }
     } else if (name == selectedAttr) {
-        // FIXME: This doesn't match what the HTML specification says.
-        // The specification implies that removing the selected attribute or
-        // changing the value of a selected attribute that is already present
-        // has no effect on whether the element is selected. Further, it seems
-        // that we need to do more than just set m_isSelected to select in that
-        // case; we'd need to do the other work from the setSelected function.
-        m_isSelected = !value.isNull();
+        if (bool willBeSelected = !value.isNull())
+            setSelected(willBeSelected);
     } else
         HTMLElement::parseAttribute(name, value);
 }
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index 0e5110b..cf99917 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -384,7 +384,7 @@
     setFormControlValueMatchesRenderer(true);
 
     // Set the caret to the end of the text value.
-    if (document()->focusedNode() == this) {
+    if (document()->focusedElement() == this) {
         unsigned endOfString = m_value.length();
         setSelectionRange(endOfString, endOfString);
     }
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
index 5d12522..e55dfb4 100644
--- a/Source/core/html/HTMLTextFormControlElement.cpp
+++ b/Source/core/html/HTMLTextFormControlElement.cpp
@@ -148,7 +148,7 @@
         && isEmptyValue()
         && isEmptySuggestedValue()
         && !isPlaceholderEmpty()
-        && (document()->focusedNode() != this || (renderer() && renderer()->theme()->shouldShowPlaceholderWhenFocused()))
+        && (document()->focusedElement() != this || (renderer() && renderer()->theme()->shouldShowPlaceholderWhenFocused()))
         && (!renderer() || renderer()->style()->visibility() == VISIBLE);
 }
 
@@ -161,7 +161,7 @@
     HTMLElement* placeholder = placeholderElement();
     if (!placeholder)
         return;
-    placeholder->setInlineStyleProperty(CSSPropertyVisibility, placeholderShouldBeVisible() ? "visible" : "hidden");
+    placeholder->setInlineStyleProperty(CSSPropertyVisibility, placeholderShouldBeVisible() ? ASCIILiteral("visible") : ASCIILiteral("hidden"));
 }
 
 void HTMLTextFormControlElement::fixPlaceholderRenderer(HTMLElement* placeholder, HTMLElement* siblingElement)
@@ -359,7 +359,7 @@
 {
     if (!isTextFormControl())
         return 0;
-    if (document()->focusedNode() != this && hasCachedSelection())
+    if (document()->focusedElement() != this && hasCachedSelection())
         return m_cachedSelectionStart;
 
     return computeSelectionStart();
@@ -379,7 +379,7 @@
 {
     if (!isTextFormControl())
         return 0;
-    if (document()->focusedNode() != this && hasCachedSelection())
+    if (document()->focusedElement() != this && hasCachedSelection())
         return m_cachedSelectionEnd;
     return computeSelectionEnd();
 }
@@ -417,7 +417,7 @@
 {
     if (!isTextFormControl())
         return directionString(SelectionHasNoDirection);
-    if (document()->focusedNode() != this && hasCachedSelection())
+    if (document()->focusedElement() != this && hasCachedSelection())
         return directionString(m_cachedSelectionDirection);
 
     return directionString(computeSelectionDirection());
diff --git a/Source/core/html/PluginDocument.cpp b/Source/core/html/PluginDocument.cpp
index 7164d88..154d2ae 100644
--- a/Source/core/html/PluginDocument.cpp
+++ b/Source/core/html/PluginDocument.cpp
@@ -198,7 +198,7 @@
         return;
 
     DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader();
-    documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(documentLoader->request()));
+    documentLoader->cancelMainResourceLoad(ResourceError::cancelledError(documentLoader->request().url()));
     setShouldLoadPluginManually(false);
 }
 
diff --git a/Source/core/html/RadioInputType.cpp b/Source/core/html/RadioInputType.cpp
index 45b3b7f..897abc7 100644
--- a/Source/core/html/RadioInputType.cpp
+++ b/Source/core/html/RadioInputType.cpp
@@ -126,9 +126,9 @@
 
     // Never allow keyboard tabbing to leave you in the same radio group.  Always
     // skip any other elements in the group.
-    Node* currentFocusedNode = element()->document()->focusedNode();
-    if (currentFocusedNode && currentFocusedNode->hasTagName(inputTag)) {
-        HTMLInputElement* focusedInput = toHTMLInputElement(currentFocusedNode);
+    Element* currentFocusedElement = element()->document()->focusedElement();
+    if (currentFocusedElement && currentFocusedElement->hasTagName(inputTag)) {
+        HTMLInputElement* focusedInput = toHTMLInputElement(currentFocusedElement);
         if (focusedInput->isRadioButton() && focusedInput->form() == element()->form() && focusedInput->name() == element()->name())
             return false;
     }
diff --git a/Source/core/html/ime/InputMethodContext.cpp b/Source/core/html/ime/InputMethodContext.cpp
index 537fa03..ce72536 100644
--- a/Source/core/html/ime/InputMethodContext.cpp
+++ b/Source/core/html/ime/InputMethodContext.cpp
@@ -91,8 +91,8 @@
     if (!editor->hasComposition())
         return;
 
-    const Node* node = frame->document()->focusedNode();
-    if (!node || !node->isHTMLElement() || m_element != toHTMLElement(node))
+    const Element* element = frame->document()->focusedElement();
+    if (!element || !element->isHTMLElement() || m_element != toHTMLElement(element))
         return;
 
     // We should verify the parent node of this IME composition node are
diff --git a/Source/core/html/parser/CSSPreloadScanner.cpp b/Source/core/html/parser/CSSPreloadScanner.cpp
index be74d9f..e6b787b 100644
--- a/Source/core/html/parser/CSSPreloadScanner.cpp
+++ b/Source/core/html/parser/CSSPreloadScanner.cpp
@@ -212,7 +212,7 @@
 void CSSPreloadScanner::emitRule(const SegmentedString& source)
 {
     if (equalIgnoringCase(m_rule, "import")) {
-        String url = parseCSSStringOrURL(m_ruleValue.toStringPreserveCapacity());
+        String url = parseCSSStringOrURL(m_ruleValue.toString());
         if (!url.isEmpty()) {
             KURL baseElementURL; // FIXME: This should be passed in from the HTMLPreloadScaner via scan()!
             TextPosition position = TextPosition(source.currentLine(), source.currentColumn());
diff --git a/Source/core/html/shadow/DateTimeEditElement.cpp b/Source/core/html/shadow/DateTimeEditElement.cpp
index 6194d2c..6654f86 100644
--- a/Source/core/html/shadow/DateTimeEditElement.cpp
+++ b/Source/core/html/shadow/DateTimeEditElement.cpp
@@ -572,9 +572,9 @@
 
 size_t DateTimeEditElement::focusedFieldIndex() const
 {
-    Node* const focusedFieldNode = document()->focusedNode();
+    Element* const focusedFieldElement = document()->focusedElement();
     for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) {
-        if (m_fields[fieldIndex] == focusedFieldNode)
+        if (m_fields[fieldIndex] == focusedFieldElement)
             return fieldIndex;
     }
     return invalidFieldIndex;
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index 3940978..84f6ea9 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -186,8 +186,8 @@
 
     double duration = document()->page() ? document()->page()->theme()->mediaControlsFadeInDuration() : 0;
 
-    setInlineStyleProperty(CSSPropertyWebkitTransitionProperty, CSSPropertyOpacity);
-    setInlineStyleProperty(CSSPropertyWebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
+    setInlineStyleProperty(CSSPropertyTransitionProperty, CSSPropertyOpacity);
+    setInlineStyleProperty(CSSPropertyTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
     setInlineStyleProperty(CSSPropertyOpacity, 1.0, CSSPrimitiveValue::CSS_NUMBER);
 
     m_opaque = true;
@@ -203,8 +203,8 @@
 
     double duration = document()->page() ? document()->page()->theme()->mediaControlsFadeOutDuration() : 0;
 
-    setInlineStyleProperty(CSSPropertyWebkitTransitionProperty, CSSPropertyOpacity);
-    setInlineStyleProperty(CSSPropertyWebkitTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
+    setInlineStyleProperty(CSSPropertyTransitionProperty, CSSPropertyOpacity);
+    setInlineStyleProperty(CSSPropertyTransitionDuration, duration, CSSPrimitiveValue::CSS_S);
     setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER);
 
     m_opaque = false;