Diff
Modified: trunk/Source/WebCore/ChangeLog (92346 => 92347)
--- trunk/Source/WebCore/ChangeLog 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/ChangeLog 2011-08-04 04:38:01 UTC (rev 92347)
@@ -1,3 +1,33 @@
+2011-08-03 Kent Tamura <tk...@chromium.org>
+
+ Fix incorrect checks for HTMLMediaElement
+ https://bugs.webkit.org/show_bug.cgi?id=65590
+
+ Reviewed by Dimitri Glazkov.
+
+ <video> and <audio> can be an HTMLElement instance instead of
+ HTMLMediaElement if MediaPlayer::isAvailable() returns false or
+ the media feature is disabled at runtime.
+
+ * html/HTMLSourceElement.cpp:
+ (WebCore::HTMLSourceElement::insertedIntoTree):
+ (WebCore::HTMLSourceElement::willRemove):
+ * html/HTMLTrackElement.cpp:
+ (WebCore::HTMLTrackElement::insertedIntoTree):
+ (WebCore::HTMLTrackElement::willRemove):
+ * html/shadow/MediaControlElements.cpp:
+ (WebCore::toParentMediaElement):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::updateWidget):
+ * platform/efl/RenderThemeEfl.cpp:
+ (WebCore::RenderThemeEfl::paintMediaMuteButton):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::getMediaElementFromRenderObject):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaSliderTrack):
+ * rendering/RenderThemeWinCE.cpp:
+ (WebCore::mediaElementParent):
+
2011-08-03 Sailesh Agrawal <s...@chromium.org>
Chromium Mac: Make ScrollbarOverlayUtilitiesChromiumMac.h c++ compatible
Modified: trunk/Source/WebCore/html/HTMLSourceElement.cpp (92346 => 92347)
--- trunk/Source/WebCore/html/HTMLSourceElement.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/html/HTMLSourceElement.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -57,13 +57,15 @@
void HTMLSourceElement::insertedIntoTree(bool deep)
{
HTMLElement::insertedIntoTree(deep);
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag)))
+ Element* parent = parentElement();
+ if (parent && parent->isMediaElement())
static_cast<HTMLMediaElement*>(parentNode())->sourceWasAdded(this);
}
void HTMLSourceElement::willRemove()
{
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag)))
+ Element* parent = parentElement();
+ if (parent && parent->isMediaElement())
static_cast<HTMLMediaElement*>(parentNode())->sourceWillBeRemoved(this);
HTMLElement::willRemove();
}
Modified: trunk/Source/WebCore/html/HTMLTrackElement.cpp (92346 => 92347)
--- trunk/Source/WebCore/html/HTMLTrackElement.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/html/HTMLTrackElement.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -57,7 +57,8 @@
void HTMLTrackElement::insertedIntoTree(bool deep)
{
HTMLElement::insertedIntoTree(deep);
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) {
+ Element* parent = parentElement();
+ if (parent && parent->isMediaElement()) {
// TODO(annacc):
// static_cast<HTMLMediaElement*>(parentNode())->trackWasAdded(this);
}
@@ -65,7 +66,8 @@
void HTMLTrackElement::willRemove()
{
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) {
+ Element* parent = parentElement();
+ if (parent && parent->isMediaElement()) {
// TODO(annacc):
// static_cast<HTMLMediaElement*>(parentNode())->trackWillBeRemoved(this);
}
Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (92346 => 92347)
--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -57,7 +57,7 @@
HTMLMediaElement* toParentMediaElement(Node* node)
{
Node* mediaNode = node ? node->shadowAncestorNode() : 0;
- if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode->hasTagName(HTMLNames::audioTag)))
+ if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement())
return 0;
return static_cast<HTMLMediaElement*>(mediaNode);
Modified: trunk/Source/WebCore/page/FrameView.cpp (92346 => 92347)
--- trunk/Source/WebCore/page/FrameView.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/page/FrameView.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -1998,7 +1998,7 @@
static_cast<HTMLPlugInImageElement*>(ownerElement)->updateWidget(CreateAnyWidgetType);
// FIXME: It is not clear that Media elements need or want this updateWidget() call.
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
- else if (ownerElement->hasTagName(videoTag) || ownerElement->hasTagName(audioTag))
+ else if (ownerElement->isMediaElement())
static_cast<HTMLMediaElement*>(ownerElement)->updateWidget(CreateAnyWidgetType);
#endif
else
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (92346 => 92347)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -1170,7 +1170,7 @@
bool RenderThemeEfl::paintMediaMuteButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
{
Node* mediaNode = object->node() ? object->node()->shadowAncestorNode() : 0;
- if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
+ if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement())
return false;
HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode);
Modified: trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp (92346 => 92347)
--- trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -64,7 +64,7 @@
{
Node* node = o->node();
Node* mediaNode = node ? node->shadowAncestorNode() : 0;
- if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
+ if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement())
return 0;
return static_cast<HTMLMediaElement*>(mediaNode);
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (92346 => 92347)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2011-08-04 04:38:01 UTC (rev 92347)
@@ -1792,7 +1792,7 @@
{
Node* node = o->node();
Node* mediaNode = node ? node->shadowAncestorNode() : 0;
- if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagName(audioTag)))
+ if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement())
return false;
HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode);
Modified: trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp (92346 => 92347)
--- trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebCore/rendering/RenderThemeWinCE.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -479,7 +479,7 @@
if (!node)
return 0;
Node* mediaNode = node->shadowAncestorNode();
- if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode->hasTagName(HTMLNames::audioTag)))
+ if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement())
return 0;
return static_cast<HTMLMediaElement*>(mediaNode);
Modified: trunk/Source/WebKit/mac/ChangeLog (92346 => 92347)
--- trunk/Source/WebKit/mac/ChangeLog 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-08-04 04:38:01 UTC (rev 92347)
@@ -1,3 +1,17 @@
+2011-08-03 Kent Tamura <tk...@chromium.org>
+
+ Fix incorrect checks for HTMLMediaElement
+ https://bugs.webkit.org/show_bug.cgi?id=65590
+
+ Reviewed by Dimitri Glazkov.
+
+ <video> and <audio> can be an HTMLElement instance instead of
+ HTMLMediaElement if MediaPlayer::isAvailable() returns false or
+ the media feature is disabled at runtime.
+
+ * WebView/WebFullScreenController.mm:
+ (-[WebFullScreenController _isAnyMoviePlaying]):
+
2011-08-03 Mark Rowe <mr...@apple.com>
Bring some order to FeatureDefines.xcconfig to make it easier to follow.
Modified: trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm (92346 => 92347)
--- trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebKit/mac/WebView/WebFullScreenController.mm 2011-08-04 04:38:01 UTC (rev 92347)
@@ -736,7 +736,7 @@
Node* nextNode = _element.get();
while (nextNode)
{
- if (nextNode->hasTagName(HTMLNames::videoTag)) {
+ if (nextNode->hasTagName(HTMLNames::videoTag) && static_cast<Element*>(nextNode)->isMediaElement()) {
HTMLMediaElement* element = static_cast<HTMLMediaElement*>(nextNode);
if (!element->paused() && !element->ended())
return YES;
Modified: trunk/Source/WebKit/win/ChangeLog (92346 => 92347)
--- trunk/Source/WebKit/win/ChangeLog 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebKit/win/ChangeLog 2011-08-04 04:38:01 UTC (rev 92347)
@@ -1,3 +1,17 @@
+2011-08-03 Kent Tamura <tk...@chromium.org>
+
+ Fix incorrect checks for HTMLMediaElement
+ https://bugs.webkit.org/show_bug.cgi?id=65590
+
+ Reviewed by Dimitri Glazkov.
+
+ <video> and <audio> can be an HTMLElement instance instead of
+ HTMLMediaElement if MediaPlayer::isAvailable() returns false or
+ the media feature is disabled at runtime.
+
+ * WebView.cpp:
+ (WebView::enterFullscreenForNode):
+
2011-08-03 Joseph Pecoraro <joep...@webkit.org>
Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting
Modified: trunk/Source/WebKit/win/WebView.cpp (92346 => 92347)
--- trunk/Source/WebKit/win/WebView.cpp 2011-08-04 04:16:47 UTC (rev 92346)
+++ trunk/Source/WebKit/win/WebView.cpp 2011-08-04 04:38:01 UTC (rev 92347)
@@ -6137,7 +6137,7 @@
void WebView::enterFullscreenForNode(Node* node)
{
- if (!node->hasTagName(HTMLNames::videoTag))
+ if (!node->hasTagName(HTMLNames::videoTag) || !node->isElementNode() || !static_cast<Element*>(node)->isMediaElement())
return;
#if ENABLE(VIDEO)