http://trac.webkit.org/changeset/146375 causing CrOS crashes

https://bugs.webkit.org/show_bug.cgi?id=112958

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-21
Reviewed by Adam Barth.

Source/WebCore:

Test: fast/flexbox/crash-anonymous-box.html

* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
Anonymous renderers don't have a node in their constructor, so
don't get document() in there.

LayoutTests:

* fast/flexbox/crash-anonymous-box-expected.txt: Added.
* fast/flexbox/crash-anonymous-box.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b07cdb74
2013-03-21 Christian Biesinger <cbiesinger@chromium.org>
http://trac.webkit.org/changeset/146375 causing CrOS crashes
https://bugs.webkit.org/show_bug.cgi?id=112958
Reviewed by Adam Barth.
* fast/flexbox/crash-anonymous-box-expected.txt: Added.
* fast/flexbox/crash-anonymous-box.html: Added.
2013-03-21 Mike West <mkwst@chromium.org>
CSP 1.1: Fire a SecurityPolicyViolationEvent when violations occur.
<!DOCTYPE html>
<html><head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head><body>
<p>This shouldn't crash.</p>
<button style="display: -webkit-box;">Button</button>
</body></html>
2013-03-21 Christian Biesinger <cbiesinger@chromium.org>
http://trac.webkit.org/changeset/146375 causing CrOS crashes
https://bugs.webkit.org/show_bug.cgi?id=112958
Reviewed by Adam Barth.
Test: fast/flexbox/crash-anonymous-box.html
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
Anonymous renderers don't have a node in their constructor, so
don't get document() in there.
2013-03-21 Mike West <mkwst@chromium.org>
CSP 1.1: Fire a SecurityPolicyViolationEvent when violations occur.
......@@ -125,13 +125,15 @@ RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox(Element* element)
{
setChildrenInline(false); // All of our children must be block-level
m_stretchingChildren = false;
const KURL& url = document()->url();
if (url.protocolIs("chrome"))
FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlexboxChrome);
else if (url.protocolIs("chrome-extension"))
FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlexboxChromeExtension);
else
FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlexboxWebContent);
if (!isAnonymous()) {
const KURL& url = document()->url();
if (url.protocolIs("chrome"))
FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlexboxChrome);
else if (url.protocolIs("chrome-extension"))
FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlexboxChromeExtension);
else
FeatureObserver::observe(document(), FeatureObserver::DeprecatedFlexboxWebContent);
}
}
RenderDeprecatedFlexibleBox::~RenderDeprecatedFlexibleBox()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment