https://bugs.webkit.org/show_bug.cgi?id=86403
ASSERTION FAILED: m_verticalScrollbarPainterDelegate on recent builds
-and corresponding-
<rdar://problem/11448841>

Reviewed by Simon Fraser.

http://trac.webkit.org/changeset/116476 accidentally started calling 
these functions for custom scrollbars. This change replaces that 
guard.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::destroyScrollbar):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in FrameView::windowClipRectForFrameOwner after r116371
https://bugs.webkit.org/show_bug.cgi?id=86035

Reviewed by David Hyatt.

Added a NULL-check for |parentView| as nothing guarantees it to be
non-NULL. Unfortunately no test as this is a crasher I couldn't
reproduce on my machine and the user logs were not helpful.

* page/FrameView.cpp:
(WebCore::FrameView::windowClipRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Content Security Policy console errors include violated directive.
https://bugs.webkit.org/show_bug.cgi?id=86323

Source/WebCore:

Patch by Mike West <mike@mikewest.org> on 2012-05-14
Reviewed by Adam Barth.

Console errors generated when resources, inline script/style, or eval
are blocked by Content Security Policy directives should include the
text of the directive that's been violated. This gives developers more
of the information they need to resolve the issue.

Test: http/tests/security/contentSecurityPolicy/*

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkEvalAndReportViolation):
(WebCore::CSPDirectiveList::checkInlineAndReportViolation):
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):

LayoutTests:

Sharded http/tests/security/contentSecurityPolicy/source-list-parsing.html
into four tests, and reworked it to have a well-defined order.

Patch by Mike West <mike@mikewest.org> on 2012-05-14
Reviewed by Adam Barth.

* http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning-expected.txt:
* http/tests/security/contentSecurityPolicy/combine-multiple-policies-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-eventsource-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-websocket-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/default-src-inline-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-01-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-02-expected.txt:
* http/tests/security/contentSecurityPolicy/directive-parsing-03-expected.txt:
* http/tests/security/contentSecurityPolicy/eval-scripts-setInterval-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/eval-scripts-setTimeout-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/image-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-script-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-style-attribute-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/inline-style-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/javascript-url-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
* http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt:
* http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt:
* http/tests/security/contentSecurityPolicy/report-only-expected.txt:
* http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
* http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-none-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-none-inline-event-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-redirect-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-01-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-02-expected.txt:
* http/tests/security/contentSecurityPolicy/script-src-self-blocked-03-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-expected.txt: Removed
* http/tests/security/contentSecurityPolicy/source-list-parsing.html: Removed
* http/tests/security/contentSecurityPolicy/source-list-parsing-01-expected.txt: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-01.html: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-02-expected.txt: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-02.html: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-03-expected.txt: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-03.html: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-04-expected.txt: Added
* http/tests/security/contentSecurityPolicy/source-list-parsing-04.html: Added
* http/tests/security/contentSecurityPolicy/srcdoc-doesnt-bypass-script-src-expected.txt:
* http/tests/security/contentSecurityPolicy/style-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/worker-connect-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/worker-script-src-expected.txt:
* http/tests/security/contentSecurityPolicy/xsl-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/xsl-img-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/xsl-unaffected-by-style-src-1-expected.txt:
* media/csp-blocks-video-expected.txt:
* platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WebCore::RenderObject::repaint
https://bugs.webkit.org/show_bug.cgi?id=86162

Patch by Takashi Sakamoto <tasak@google.com> on 2012-05-14
Reviewed by Abhishek Arya.

Source/WebCore:

As RenderScrollbarPart has no parent renderer, we crash in
WebCore::RenderBoxModelObject::paddingLeft when paddingLeft has
percent value, e.g. 5%. However if we set the scrollbar's parent
renderer to a renderer owning the scrollbar by using setParent method,
RenderScrollbarPart::styleWillChange will invoke parent renderer's
repaint. This causes crash in WebCore::RenderObject::repaint if the
owning renderer is already destroyed.
To fix the first crash without the second crash, modify
RenderObject::containingBlock() to check isRenderScrollbarPart or not,
if parent() is 0.
If so, use scrollbar's owningRenderer from RenderScrollbarPart.

Test: scrollbars/scrollbar-percent-padding-crash.html
      scrollbars/scrollbar-scrollbarparts-repaint-crash.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):
Modifying containingBlock. If parent() is 0 and isRenderScrollbarPart()
is true, use RenderScrollbarPart's m_scrollbar->owningRenderer()
instead of parent().
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderScrollbarPart):
(RenderObject):
Adding a new method, isRenderScrollbarPart.
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::rendererOwningScrollbar):
(WebCore):
Adding a new method, scrollbarOwningRenderer to obtain m_scrollar's
owningRenderer.
* rendering/RenderScrollbarPart.h:
(RenderScrollbarPart):
Removing "friend class RenderScrollbar".
(WebCore::RenderScrollbarPart::isRenderScrollbarPart):
(WebCore::toRenderScrollbarPart):
(WebCore):
Implementing isRenderScrollbarPart and toRenderScrollbarPart.

LayoutTests:

* scrollbars/scrollbar-scrollbarparts-repaint-crash-expected.txt: Added.
* scrollbars/scrollbar-scrollbarparts-repaint-crash.html: Added.
* scrollbars/scrollbar-percent-padding-crash-expected.txt: Added.
* scrollbars/scrollbar-percent-padding-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<http://webkit.org/b/86320> WTF.xcodeproj builds with -O3 in debug builds

Reviewed by Simon Fraser.

* WTF.xcodeproj/project.pbxproj: Ensure that the debug configuration uses the
same settings as the debug variant would.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117008 268f45cc-cd09-0410-ab3c-d52691b4dbfc