Diff
Modified: trunk/LayoutTests/ChangeLog (194933 => 194934)
--- trunk/LayoutTests/ChangeLog 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/LayoutTests/ChangeLog 2016-01-13 00:32:00 UTC (rev 194934)
@@ -1,3 +1,21 @@
+2016-01-12 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r194926 and r194928.
+ https://bugs.webkit.org/show_bug.cgi?id=153048
+
+ This change is causing LayoutTest crashes (Requested by
+ ryanhaddad on #webkit).
+
+ Reverted changesets:
+
+ "Avoid downloading the wrong image for <picture> elements."
+ https://bugs.webkit.org/show_bug.cgi?id=153027
+ http://trac.webkit.org/changeset/194926
+
+ "Avoid downloading the wrong image for <picture> elements."
+ https://bugs.webkit.org/show_bug.cgi?id=153027
+ http://trac.webkit.org/changeset/194928
+
2016-01-12 Dean Jackson <[email protected]>
[iOS] Antialiasing doesn't work in WebGL
Deleted: trunk/LayoutTests/fast/picture/image-picture-loads-1x-expected.txt (194933 => 194934)
--- trunk/LayoutTests/fast/picture/image-picture-loads-1x-expected.txt 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/LayoutTests/fast/picture/image-picture-loads-1x-expected.txt 2016-01-13 00:32:00 UTC (rev 194934)
@@ -1,13 +0,0 @@
-image-set-2x.png - willSendRequest <NSURLRequest URL image-set-2x.png, main document URL image-picture-loads-1x.html, http method GET> redirectResponse (null)
-resources/image-set-4x.png - willSendRequest <NSURLRequest URL resources/image-set-4x.png, main document URL image-picture-loads-1x.html, http method GET> redirectResponse (null)
-data:,b - willSendRequest <NSURLRequest URL data:,b, main document URL image-picture-loads-1x.html, http method GET> redirectResponse (null)
-image-picture-loads-1x.html - didFinishLoading
-image-set-2x.png - didReceiveResponse <NSURLResponse image-set-2x.png, http status code 0>
-image-set-2x.png - didFinishLoading
-resources/image-set-4x.png - didReceiveResponse <NSURLResponse resources/image-set-4x.png, http status code 0>
-resources/image-set-4x.png - didFinishLoading
-data:,b - didReceiveResponse <NSURLResponse data:,b, http status code 0>
-data:,b - didFinishLoading
-
-some text
-
Deleted: trunk/LayoutTests/fast/picture/image-picture-loads-1x.html (194933 => 194934)
--- trunk/LayoutTests/fast/picture/image-picture-loads-1x.html 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/LayoutTests/fast/picture/image-picture-loads-1x.html 2016-01-13 00:32:00 UTC (rev 194934)
@@ -1,108 +0,0 @@
-<!DOCTYPE html>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.dumpResourceLoadCallbacks();
- }
- </script>
- <!-- simple picture construct -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="simple" src=""
- </picture>
- <!-- Multiple img elements -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img src=""
- <img id="multiple" src=""
- </picture>
- <!-- non-source children - should be ignored-->
- <picture>
- <div>some text</div>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="other_children" src=""
- </picture>
- <!-- source with unknown type - should be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" type="image/nonsense" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="unknown_type" src=""
- </picture>
- <!-- SVG source - should not be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" type="image/svg+xml" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="svg_type" src=""
- </picture>
- <!-- Empty type - should not be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" type="" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="empty_type" src=""
- </picture>
- <!-- whitespace type - should not be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" type=" " sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="whitespace_type" src=""
- </picture>
- <!-- parameter type - should not be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" type="image/png;bla=bla" sizes="800px" srcset="../hidpi/resources/image-set-1x.png?10002 400w, ../hidpi/resources/image-set-2x.png?10002 800w,
- resources/image-set-4x.png?10002 1600w">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="parameter_type" src=""
- </picture>
- <!-- source with empty srcset - should be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" sizes="800px" srcset=", , ">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="empty_srcset" src=""
- </picture>
- <!-- source with no srcset - should be ignored -->
- <picture>
- <source media="(max-width: 400px)" sizes="400px" srcset="../hidpi/resources/image-set-1x.png?10001 400w, ../hidpi/resources/image-set-2x.png?10001 800w,
- resources/image-set-4x.png?10001 1600w">
- <source media="(max-width: 800px)" sizes="800px">
- <source media="(max-width: 1600px)" sizes="1600px" srcset="../hidpi/resources/image-set-1x.png?10003 400w, ../hidpi/resources/image-set-2x.png?10003 800w,
- resources/image-set-4x.png?10003 1600w">
- <img id="no_srcset" src=""
- </picture>
- <picture><source srcset="data:,b"><img src=""
Modified: trunk/Source/WebCore/ChangeLog (194933 => 194934)
--- trunk/Source/WebCore/ChangeLog 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/Source/WebCore/ChangeLog 2016-01-13 00:32:00 UTC (rev 194934)
@@ -1,3 +1,21 @@
+2016-01-12 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r194926 and r194928.
+ https://bugs.webkit.org/show_bug.cgi?id=153048
+
+ This change is causing LayoutTest crashes (Requested by
+ ryanhaddad on #webkit).
+
+ Reverted changesets:
+
+ "Avoid downloading the wrong image for <picture> elements."
+ https://bugs.webkit.org/show_bug.cgi?id=153027
+ http://trac.webkit.org/changeset/194926
+
+ "Avoid downloading the wrong image for <picture> elements."
+ https://bugs.webkit.org/show_bug.cgi?id=153027
+ http://trac.webkit.org/changeset/194928
+
2016-01-11 Dean Jackson <[email protected]>
[iOS] Antialiasing doesn't work in WebGL
Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (194933 => 194934)
--- trunk/Source/WebCore/html/HTMLImageElement.cpp 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp 2016-01-13 00:32:00 UTC (rev 194934)
@@ -53,9 +53,6 @@
using namespace HTMLNames;
-typedef HashMap<const Node*, Node*> PictureOwnerMap;
-static PictureOwnerMap* gPictureOwnerMap = nullptr;
-
HTMLImageElement::HTMLImageElement(const QualifiedName& tagName, Document& document, HTMLFormElement* form)
: HTMLElement(tagName, document)
, m_imageLoader(*this)
@@ -85,7 +82,6 @@
{
if (m_form)
m_form->removeImgElement(this);
- setPictureNode(nullptr);
}
Ref<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document& document, const int* optionalWidth, const int* optionalHeight)
@@ -144,13 +140,13 @@
ImageCandidate HTMLImageElement::bestFitSourceFromPictureElement()
{
- auto* pictureOwner = pictureNode();
- if (!pictureOwner)
+ auto* parent = parentNode();
+ if (!is<HTMLPictureElement>(parent))
return { };
- auto* picture = downcast<HTMLPictureElement>(pictureOwner);
+ auto* picture = downcast<HTMLPictureElement>(parent);
picture->clearViewportDependentResults();
document().removeViewportDependentPicture(*picture);
- for (Node* child = picture->firstChild(); child && child != this; child = child->nextSibling()) {
+ for (Node* child = parent->firstChild(); child && child != this; child = child->nextSibling()) {
if (!is<HTMLSourceElement>(*child))
continue;
auto& source = downcast<HTMLSourceElement>(*child);
@@ -167,7 +163,7 @@
if (!type.isEmpty() && !MIMETypeRegistry::isSupportedImageMIMEType(type) && type != "image/svg+xml")
continue;
}
- MediaQueryEvaluator evaluator(document().printing() ? "print" : "screen", document().frame(), document().documentElement()->computedStyle());
+ MediaQueryEvaluator evaluator(document().printing() ? "print" : "screen", document().frame(), computedStyle());
bool evaluation = evaluator.evalCheckingViewportDependentResults(source.mediaQuerySet(), picture->viewportDependentResults());
if (picture->hasViewportDependentResults())
document().addViewportDependentPicture(*picture);
@@ -317,10 +313,8 @@
if (insertionPoint.inDocument() && !m_lowercasedUsemap.isNull())
document().addImageElementByLowercasedUsemap(*m_lowercasedUsemap.impl(), *this);
- if (is<HTMLPictureElement>(parentNode())) {
- setPictureNode(parentNode());
+ if (is<HTMLPictureElement>(parentNode()))
selectImageSource();
- }
// If we have been inserted from a renderer-less document,
// our loader may have not fetched the image, so do it now.
@@ -337,34 +331,11 @@
if (insertionPoint.inDocument() && !m_lowercasedUsemap.isNull())
document().removeImageElementByLowercasedUsemap(*m_lowercasedUsemap.impl(), *this);
-
- if (is<HTMLPictureElement>(parentNode()))
- setPictureNode(nullptr);
-
+
m_form = nullptr;
HTMLElement::removedFrom(insertionPoint);
}
-Node* HTMLImageElement::pictureNode() const
-{
- if (!gPictureOwnerMap)
- return nullptr;
- return gPictureOwnerMap->get(this);
-}
-
-void HTMLImageElement::setPictureNode(Node* node)
-{
- if (!node) {
- if (gPictureOwnerMap)
- gPictureOwnerMap->remove(this);
- return;
- }
-
- if (!gPictureOwnerMap)
- gPictureOwnerMap = new PictureOwnerMap();
- gPictureOwnerMap->add(this, node);
-}
-
int HTMLImageElement::width(bool ignorePendingStylesheets)
{
if (!renderer()) {
Modified: trunk/Source/WebCore/html/HTMLImageElement.h (194933 => 194934)
--- trunk/Source/WebCore/html/HTMLImageElement.h 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/Source/WebCore/html/HTMLImageElement.h 2016-01-13 00:32:00 UTC (rev 194934)
@@ -87,9 +87,6 @@
virtual const AtomicString& imageSourceURL() const override;
bool hasShadowControls() const { return m_experimentalImageMenuEnabled; }
-
- Node* pictureNode() const;
- void setPictureNode(Node*);
protected:
HTMLImageElement(const QualifiedName&, Document&, HTMLFormElement* = 0);
@@ -130,7 +127,6 @@
HTMLImageLoader m_imageLoader;
HTMLFormElement* m_form;
HTMLFormElement* m_formSetByParser;
-
CompositeOperator m_compositeOperator;
AtomicString m_bestFitImageURL;
AtomicString m_currentSrc;
Modified: trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp (194933 => 194934)
--- trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2016-01-13 00:10:26 UTC (rev 194933)
+++ trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2016-01-13 00:32:00 UTC (rev 194934)
@@ -36,11 +36,9 @@
#include "HTMLElementFactory.h"
#include "HTMLFormElement.h"
#include "HTMLHtmlElement.h"
-#include "HTMLImageElement.h"
#include "HTMLOptGroupElement.h"
#include "HTMLOptionElement.h"
#include "HTMLParserIdioms.h"
-#include "HTMLPictureElement.h"
#include "HTMLScriptElement.h"
#include "HTMLTemplateElement.h"
#include "NotImplemented.h"
@@ -642,13 +640,6 @@
Document& ownerDocument = ownerDocumentForCurrentNode();
bool insideTemplateElement = !ownerDocument.frame();
RefPtr<Element> element = HTMLElementFactory::createElement(tagName, ownerDocument, insideTemplateElement ? nullptr : form(), true);
-
- // FIXME: This is a hack to connect images to pictures before the image has
- // been inserted into the document. It can be removed once asynchronous image
- // loading is working.
- if (is<HTMLPictureElement>(currentNode()) && is<HTMLImageElement>(*element.get()))
- downcast<HTMLImageElement>(*element.get()).setPictureNode(¤tNode());
-
setAttributes(element.get(), token, m_parserContentPolicy);
ASSERT(element->isHTMLElement());
return element.release();