Bug 58014

Summary: Implement CSP's options directive
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 53572    
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Adam Barth 2011-04-06 23:32:06 PDT
Implement CSP's options directive
Comment 1 Adam Barth 2011-04-06 23:34:07 PDT
Created attachment 88578 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-04-07 02:53:31 PDT
Comment on attachment 88578 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=88578&action=review

> Source/WebCore/page/ContentSecurityPolicy.cpp:454
> +        skipWhile<isOptionValueCharacter>(position, end);
> +
> +        String optionsValue(optionsValueBegin, position - optionsValueBegin);

I would almost put a comment here noting that position may be == end, but that we don't care.

> Source/WebCore/page/ContentSecurityPolicy.cpp:484
> +    return !m_scriptSrc || (m_options && m_options->disableXSSProtection());

Perhaps this m_options || m_options->disableXSSProtection check should be rolled into a single dispableXSSProtection() method then you don't need to repeat yourself.
Comment 3 Adam Barth 2011-04-07 03:14:51 PDT
Created attachment 88601 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2011-04-07 03:54:10 PDT
Comment on attachment 88601 [details]
Patch for landing

Rejecting attachment 88601 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-7', 'build'..." exit_code: 2

Last 500 characters of output:
0
    setenv YACC /Developer/usr/bin/yacc
    /bin/sh -c /mnt/git/webkit-commit-queue/WebKitBuild/WebCore.build/Debug/WebCore.build/Script-5DF50887116F3077005202AB.sh

** BUILD FAILED **


The following build commands failed:
WebCore:
	CompileC /mnt/git/webkit-commit-queue/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/ContentSecurityPolicy.o /mnt/git/webkit-commit-queue/Source/WebCore/page/ContentSecurityPolicy.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2
(1 failure)


Full output: http://queues.webkit.org/results/8347540
Comment 5 Adam Barth 2011-04-07 10:53:16 PDT
Created attachment 88662 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2011-04-07 13:51:42 PDT
Comment on attachment 88662 [details]
Patch for landing

Clearing flags on attachment: 88662

Committed r83205: <http://trac.webkit.org/changeset/83205>
Comment 7 WebKit Commit Bot 2011-04-07 13:51:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Review Bot 2011-04-07 15:38:40 PDT
http://trac.webkit.org/changeset/83205 might have broken GTK Linux 32-bit Release and GTK Linux 64-bit Debug
The following tests are not passing:
media/context-menu-actions.html
media/media-fullscreen-inline.html
media/media-fullscreen-not-in-document.html