[Chromium] REGRESSION: Closed Captions button not showing properly
https://bugs.webkit.org/show_bug.cgi?id=109871

Reviewed by Jer Noble.

No new tests - covered by existing tests.

Most of the patch was in the meantime covered by a patch to
https://bugs.webkit.org/show_bug.cgi?id=111109 .
This changes a static Chromium-only function name to be consistent with
parent class function names.

* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaToggleClosedCaptionsButton):
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XSSAuditor doesn't need a copy of the original document's body.
https://bugs.webkit.org/show_bug.cgi?id=111946

Reviewed by Darin Adler.

The XSSAuditor currently copies the original HTTP body of the document
that's being audited in order to include it into a violation report if
reflected XSS is detected. We don't actually need to do this, as we
have access to the original request information from inside the
XSSAuditorDelegate where the report is generated.
XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
main thread, so it should be safe to reach through the document's
loader to get that information directly, rather than passing it from
thread to thread via XSSInfo object properties.

* html/parser/XSSAuditor.h:
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::filterToken):
(WebCore::XSSAuditor::isSafeToSendToAnotherThread):
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
(WebCore::XSSInfo::XSSInfo):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSInfo::isSafeToSendToAnotherThread):
    Drop the XSSInfo and XSSAuditor properties that held an
    isolatedCopy of the the original HTTP body. Depending on the
    document's size, this could be a significant savings.
(WebCore::XSSAuditorDelegate::didBlockScript):
    Reach into the document's loader's original request in order to
    grab the body as a String, and feed that into the violation report
    object.

    As a drive-by, this patch creates a FrameLoader* temporary
    variable to minimize repetition in this area of the code. We use
    the loader a few times, but should only have to grab it once.


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