Unreviewed, rolling out r119705.
http://trac.webkit.org/changeset/119705
https://bugs.webkit.org/show_bug.cgi?id=94192

Causing crash on ClusterFuzz due to incorrect layout ordering
change (Requested by inferno-sec on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-08-16

* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* editing/FrameSelection.cpp:
(WebCore::updatePositionAfterAdoptingTextReplacement):
(WebCore::FrameSelection::textWillBeReplaced):
* editing/FrameSelection.h:
(FrameSelection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TextureMapperGL::beginPainting has a duplicate call to get GL_FRAMEBUFFER_BINDING.
https://bugs.webkit.org/show_bug.cgi?id=94180

Patch by Zhigang Gong <zhigang.gong@linux.intel.com> on 2012-08-16
Reviewed by Noam Rosenthal.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::beginPainting):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Wheel event support in multiple fields time input UI
https://bugs.webkit.org/show_bug.cgi?id=94166

Reviewed by Kent Tamura.

Source/WebCore:

This patch makes multiple fields time input UI to handle wheel event
on spin button.

This patch affects if ENABLE_INPUT_TYPE_TIME and ENABLE_INPUT_TYPE_MULTIPLE_FIELDS
are enabled.

Test: fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html

* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::defaultEventHandler): Changed to forward
event to spin button if available.

LayoutTests:

This patch adds a test for wheel event handling in multiple fields
time input UI.

* fast/forms/time-multiple-fields/time-multiple-fields-wheel-event-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-wheel-event.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add deleteFileSystem support to DumpRenderTree for chromium
https://bugs.webkit.org/show_bug.cgi?id=94071

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-08-16
Reviewed by Kent Tamura.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::deleteFileSystem): Added
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Adding failure expectations for two accessibility tests introduced in r125710.

Rebaselining fast/css/word-space-extra.html after r125578.

* platform/gtk/TestExpectations:
* platform/gtk/fast/css/word-space-extra-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent showing suggestions when right-clicking a selection range.
https://bugs.webkit.org/show_bug.cgi?id=94189

Reviewed by Hajime Morita.

To emulate Safari, my r120810 changes selection when right-clicking a misspelled
word. Unfortunately, this change somehow uses VisibleSelection::isCaretOrRange
and it changes the existing selection when right-clicking a selection which
includes a misspelled word. This change uses VisibleSelection::isCaret to
prevent showing suggestions when right-clicking a selection range. (Neither does
Safari show suggestions when there is a selection range.)

* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] set scissorRect per quad so that quads are correctly clipped
https://bugs.webkit.org/show_bug.cgi?id=94050

Reviewed by Adrienne Walker.

Source/WebCore:

Certain quad types rely on scissoring to do correct
clipping. Refactoring the quad types to remove this assumption
will be done in a later patch, but for now, we have to apply the
scissor rect to every quad to ensure that those quads are
correctly clipped.

Test: compositing/overflow/overflow-hidden-canvas-layer.html

Also updated two unit tests to reflect the change in semantics.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawRenderPass):
(WebCore::LayerRendererChromium::drawQuad):

Source/WebKit/chromium:

Updated two unit tests to reflect that we need to always scissor,
until we refactor so that quads do not depend on scissoring.

* tests/CCLayerTreeHostImplTest.cpp:

LayoutTests:

* compositing/overflow/overflow-hidden-canvas-layer-expected.png: Added.
* compositing/overflow/overflow-hidden-canvas-layer-expected.txt: Added.
* compositing/overflow/overflow-hidden-canvas-layer.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: FormController, WebHistoryItem: Enable reading selected file names from document state
https://bugs.webkit.org/show_bug.cgi?id=91231

Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
Reviewed by Jochen Eisinger.

This change enables Chromium to set up file permissions properly when
the session restore feature restores a page with selected files.

* Source/autotools/symbols.filter: Exported FormController::getReferencedFilePaths and HistoryController::saveDocumentAndScrollState.

Source/WebCore: FormController, FileInputType: Enable reading selected file names from document state
https://bugs.webkit.org/show_bug.cgi?id=91231

Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
Reviewed by Jochen Eisinger.

This change enables Chromium to set up file permissions properly when
the session restore feature restores a page with selected files.

Test: fast/forms/file/selected-files-from-history-state.html

* WebCore.exp.in: Exported FormController::getReferencedFilePaths.
* html/FileInputType.cpp:
(WebCore::FileInputType::filesFromFormControlState): Added. Extracts FileChooserFileInfos from a FormControlState.
(WebCore):
(WebCore::FileInputType::restoreFormControlState): Refactored to use filesFromFormControlState.
* html/FileInputType.h:
(FileInputType): Added filesFromFormControlState.
* html/FormController.cpp:
(SavedFormState): Added getReferencedFilePaths.
(WebCore::SavedFormState::getReferencedFilePaths): Added. Extracts selected file paths from SavedFormState.
(WebCore):
(WebCore::FormController::setStateForNewFormElements): Refactored to use formStatesFromStateVector.
(WebCore::FormController::formStatesFromStateVector):
(WebCore::FormController::getReferencedFilePaths): Added. Static. Extracts selected file paths from a document state.
* html/FormController.h:
(FormController): Added getReferencedFilePaths and formStatesFromStateVector.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::filesFromFileInputFormControlState): Added. Delegates to FileInputType::filesFromFormControlState.
(WebCore):
* html/HTMLInputElement.h: Added filesFromFileInputFormControlState.
(HTMLInputElement):
* testing/Internals.cpp:
(WebCore::Internals::getReferencedFilePaths): Calls FormController::getReferencedFilePaths.
(WebCore):
* testing/Internals.h:
(Internals): Added getReferencedFilePaths.
* testing/Internals.idl: Added binding for getReferencedFilePaths.

Source/WebKit/chromium: WebHistoryItem: Enable reading selected file names from document state
https://bugs.webkit.org/show_bug.cgi?id=91231

Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
Reviewed by Jochen Eisinger.

This change enables Chromium to set up file permissions properly when
the session restore feature restores a page with selected files.

* public/WebHistoryItem.h:
(WebHistoryItem): Added getReferencedFilePaths.
* src/WebHistoryItem.cpp:
(WebKit::WebHistoryItem::getReferencedFilePaths): Extracts selected and posted file paths from a document state.
(WebKit):

Source/WebKit2: FormController, WebHistoryItem: Enable reading selected file names from document state
https://bugs.webkit.org/show_bug.cgi?id=91231

Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
Reviewed by Jochen Eisinger.

This change enables Chromium to set up file permissions properly when
the session restore feature restores a page with selected files.

* win/WebKit2.def: Exported FormController::getReferencedFilePaths and HistoryController::saveDocumentAndScrollState.

LayoutTests: FormController: Enable reading selected file names from document state
https://bugs.webkit.org/show_bug.cgi?id=91231

Patch by Marja Hölttä <marja@chromium.org> on 2012-08-16
Reviewed by Jochen Eisinger.

This change enables Chromium to set up file permissions properly when
the session restore feature restores a page with selected files.

* fast/forms/file/selected-files-from-history-state-expected.txt: Added.
* fast/forms/file/selected-files-from-history-state.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r125751.
http://trac.webkit.org/changeset/125751
https://bugs.webkit.org/show_bug.cgi?id=94206

we shouldn't be rolling out this patch without a formal
review. (Requested by rniwa_ on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-08-16

* dom/CharacterData.cpp:
(WebCore::CharacterData::setDataAndUpdate):
* editing/FrameSelection.cpp:
(WebCore::updatePositionAfterAdoptingTextReplacement):
(WebCore::FrameSelection::textWasReplaced):
* editing/FrameSelection.h:
(FrameSelection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Delete DOMWindow::securityOrigin()
https://bugs.webkit.org/show_bug.cgi?id=93991

Reviewed by Eric Seidel.

DOMWindow::securityOrigin() just calls through to
document()->securityOrigin(). This patch updates all the callers to do
that work themselves, making it clearer what's going on at each call
site.

* bindings/generic/BindingSecurity.cpp:
(WebCore::canAccessDocument):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::allowsAccessFrom):
* bindings/js/JSDOMWindowCustom.h:
(WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::collectIsolatedContexts):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::isInsecureScriptAccess):
(WebCore::DOMWindow::createWindow):
* page/DOMWindow.h:
(DOMWindow):
* page/Location.cpp:
(WebCore::Location::reload):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add unit tests for Web intent registration
https://bugs.webkit.org/show_bug.cgi?id=94133

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-08-16
Reviewed by Kenneth Rohde Christiansen.

Add unit tests for Web Intent service registration.
This tests the "intent,service,register" signaling
on the Ewk_View as well as Ewk_Intent_Service.

* PlatformEfl.cmake:
* UIProcess/API/efl/tests/resources/intent-service.html: Added.
* UIProcess/API/efl/tests/test_ewk2_intents.cpp: Added.
(onIntentServiceRegistration):
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: memory instrumentation for Resource{Request/Response}Base
https://bugs.webkit.org/show_bug.cgi?id=94109

Reviewed by Vsevolod Vlasov.

Added reportMemoryUsage methods to ResourceRequestBase, ResourceResponseBase
and several related classes.

* dom/MemoryInstrumentation.cpp:
(WebCore::MemoryInstrumentation::addInstrumentedObjectImpl): added overrides
for String, StringImpl and AtomicString object types so that we can reuse
existing addInstrumentedCollection method instead of adding a counterpart
that would operate on not instrumented content. Next step would be to get
rid od addObject overrides for these types so that all kinds of Strings are
considered as instrumented classes despite they don't have reportMemoryUsage
method.
(WebCore):
* dom/MemoryInstrumentation.h:
(WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
(MemoryInstrumentation):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::reportMemoryUsage):
* platform/network/FormData.cpp:
(WebCore::FormData::reportMemoryUsage):
(WebCore):
* platform/network/FormData.h:
(WebCore):
(FormData):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::reportMemoryUsage):
(WebCore):
* platform/network/ResourceRequestBase.h:
(ResourceRequestBase):
* platform/network/ResourceResponseBase.cpp:
(WebCore):
(WebCore::ResourceResponseBase::reportMemoryUsage):
* platform/network/ResourceResponseBase.h:
(WebCore):
(ResourceResponseBase):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DOMWindowPagePopup needs to be installed before loading the html inside the page popup
https://bugs.webkit.org/show_bug.cgi?id=94193

Reviewed by Kent Tamura.

We are using window.pagePopupController.localizeNumberString while loading so we need to install DOMWindowPagePopup before loading the html.

* src/WebPagePopupImpl.cpp:
(WebKit::WebPagePopupImpl::initPage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening after r125592, r125635
https://bugs.webkit.org/show_bug.cgi?id=94197

Unreviewed gardening.

Gardening of fast/overflow/line-clamp-and-columns.html and
http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html.

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-08-16

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove FontQt4, HAVE_QRAWFONT flag and the related dead code
https://bugs.webkit.org/show_bug.cgi?id=93960

Reviewed by Simon Hausmann.

Following the removal of Qt 4 support from trunk in r124879.

Source/WebCore:

No new tests. Simple cleanup job.

* Target.pri:
* platform/graphics/Font.cpp:
(WebCore::Font::codePath):
* platform/graphics/Font.h:
(Font):
* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::platformGlyphInit):
(WebCore::SimpleFontData::glyphForCharacter):
* platform/graphics/SimpleFontData.h:
(SimpleFontData):
(WebCore::SimpleFontData::widthForGlyph):
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::rawFontForCharacters):
(WebCore::FontCache::getFontDataForCharacters):
* platform/graphics/qt/FontCustomPlatformData.h:
(FontCustomPlatformData):
* platform/graphics/qt/FontCustomPlatformDataQt.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/qt/FontPlatformData.h:
(WebCore::FontPlatformDataPrivate::FontPlatformDataPrivate):
(FontPlatformDataPrivate):
(FontPlatformData):
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator==):
(WebCore::FontPlatformData::hash):
* platform/graphics/qt/FontQt4.cpp: Removed.
* platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::determinePitch):
(WebCore::SimpleFontData::platformBoundsForGlyph):
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformCharWidthInit):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::advance):
(WebCore::SVGTextMetricsBuilder::advanceSimpleText):
(WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataHaveFeatures.in: Remove all traces of HAVE_QRAWFONT's existence.

Source/WebKit2:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics):

Tools:

* qmake/mkspecs/features/features.prf:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Breakpoints are not correctly restored on reload.
https://bugs.webkit.org/show_bug.cgi?id=94209

Reviewed by Pavel Feldman.

Source/WebCore:

BreakpointManager now resets uiLocations on workspace reset (was doing it on GlobalObjectCleared).
Breakpoint manager now calls restoreBreakpoints automatically when uiSourceCode is added to workspace.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager):
(WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
(WebInspector.BreakpointManager.prototype._workspaceReset):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
* inspector/front-end/inspector.js:

LayoutTests:

restoreBreakpoints is not called inside the test anymore to test that it is called automatically.

* inspector/debugger/breakpoint-manager-expected.txt:
* inspector/debugger/breakpoint-manager.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Update pixel test expectations for layout test fast/dom/
https://bugs.webkit.org/show_bug.cgi?id=94177

Unreviewed, rebaseline.

Some tests have wrong pixel test results. They should be replaced.

And, two tests related image seem to fail. Alt text should be displayed
if src attribute is not set.

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2012-08-16

* platform/efl/TestExpectations: Added two tests related to display alt text without src.
* platform/efl/fast/dom/34176-expected.png:
* platform/efl/fast/dom/Element/class-attribute-whitespace-expected.png:
* platform/efl/fast/dom/HTMLElement/bdo-expected.png:
* platform/efl/fast/dom/HTMLHeadElement/head-link-style-href-check-expected.png:
* platform/efl/fast/dom/HTMLLinkElement/pending-stylesheet-count-expected.png:
* platform/efl/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.png:
* platform/efl/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.png:
* platform/efl/fast/dom/HTMLMeterElement/meter-boundary-values-expected.png:
* platform/efl/fast/dom/HTMLMeterElement/meter-optimums-expected.png:
* platform/efl/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.png:
* platform/efl/fast/dom/HTMLMeterElement/meter-styles-expected.png:
* platform/efl/fast/dom/HTMLObjectElement/vspace-hspace-as-number-expected.png:
* platform/efl/fast/dom/HTMLTableColElement/resize-table-using-col-width-expected.png:
* platform/efl/fast/dom/HTMLTableElement/colSpan-expected.png:
* platform/efl/fast/dom/HTMLTableElement/createCaption-expected.png:
* platform/efl/fast/dom/HTMLTextAreaElement/reset-textarea-expected.png:
* platform/efl/fast/dom/Range/surroundContents-1-expected.png:
* platform/efl/fast/dom/Window/open-existing-pop-up-blocking-expected.png:
* platform/efl/fast/dom/blur-contenteditable-expected.png:
* platform/efl/fast/dom/children-nodes-expected.png:
* platform/efl/fast/dom/clone-contents-0-end-offset-expected.png:
* platform/efl/fast/dom/css-rule-functions-expected.png:
* platform/efl/fast/dom/focus-contenteditable-expected.png:
* platform/efl/fast/dom/gc-10-expected.png:
* platform/efl/fast/dom/importNodeHTML-expected.png:
* platform/efl/fast/dom/importNodeXML-expected.png:
* platform/efl/fast/dom/row-inner-text-expected.png:
* platform/efl/fast/dom/scroll-reveal-left-overflow-expected.png:
* platform/efl/fast/dom/scroll-reveal-top-overflow-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: enable instrumentation of platform code
https://bugs.webkit.org/show_bug.cgi?id=94125

Reviewed by Pavel Feldman.

- add PlatformInstrumentation class that exposes instrumentation methods that may be used by code under WebCore/platform;
- move TRACE_EVENT_XXX() macros into PlatformInstrumentation.h to minimize instrumentation hassle in the client code;
- implement PlatformInstrumentationClient by InspectorTimelineAgent;
- only install PlatformInstrumentationClient when we have outer events for which we expect low-level details

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDecodeImage): to be implemented by subsequent change;
(WebCore::InspectorTimelineAgent::didDecodeImage): to be implemented by subsequent change;
(WebCore::InspectorTimelineAgent::willResizeImage): to be implemented by subsequent change;
(WebCore::InspectorTimelineAgent::didResizeImage): to be implemented by subsequent change;
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
(WebCore::InspectorTimelineAgent::clearRecordStack):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):
* platform/PlatformInstrumentation.cpp: Added.
(WebCore):
(WebCore::PlatformInstrumentation::setClient):
* platform/PlatformInstrumentation.h: Added.
(WebCore):
(PlatformInstrumentationClient):
(PlatformInstrumentation):
(WebCore::PlatformInstrumentation::hasClient):
(WebCore::PlatformInstrumentation::willDecodeImage):
(WebCore::PlatformInstrumentation::didDecodeImage):
(WebCore::PlatformInstrumentation::willResizeImage):
(WebCore::PlatformInstrumentation::didResizeImage):
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::resizedBitmap): added calls to PlatformInstrumentation, removed TRACE_EVENT();
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::frameBufferAtIndex): added calls to PlatformInstrumentation;
(WebCore::BMPImageDecoder::decode): removed TRACE_EVENT()
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameBufferAtIndex): added calls to PlatformInstrumentation;
(WebCore::GIFImageDecoder::decode): removed TRACE_EVENT()
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::frameBufferAtIndex): added calls to PlatformInstrumentation;
(WebCore::ICOImageDecoder::decode): removed TRACE_EVENT()
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::frameBufferAtIndex): added calls to PlatformInstrumentation;
(WebCore::JPEGImageDecoder::decode): removed TRACE_EVENT()
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::frameBufferAtIndex): added calls to PlatformInstrumentation;
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::frameBufferAtIndex): added calls to PlatformInstrumentation;
(WebCore::WEBPImageDecoder::decode): removed TRACE_EVENT();
* inspector/InspectorInstrumentation.cpp: removed orphan event support;
(WebCore):
* inspector/InspectorInstrumentation.h: ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] WebGL and Canvas fail to display after being restored from page cache
https://bugs.webkit.org/show_bug.cgi?id=94105

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-08-16
Reviewed by George Staikos.

The EGLImage was being destroyed when releasing layer resources on the
compositing thread, but the WebKit thread layer never found out and
failed to create a new image.

Fixed by extending the release layer resources mechanism to also make a
pass on the WebKit thread so that thread's layers have a chance to
delete their textures and related resources.

Source/WebCore:

WebGL and canvas layers now take this opportunity to release their
textures so the EGLImage gets recreated when compositing commits
resume.

The only detail that deserves extra explanation is the ownership of the
EGLImage.

Since the EGLImage is created in updateTextureContentsIfNeeded() and
that one is always followed by commitPendingTextureUploads() which
transfers the EGLImage to the compositing thread layer's custody, the
EGLImage currently referenced by EGLImageLayerWebKitThread::m_image
should never be deleted by the WebKit thread layer.

Thus all we have to do in deleteFrontBuffer() is to set the m_image
member to 0 so the image gets recreated on the next commit. It will be
deleted by the part of releaseLayerResources() that executes on the
compositing thread (which, if you recall, was the original source of
this bug).

Reviewed internally by Filip Spacek.

PR 192899

Not currently testable by the BlackBerry testing infrastructure.

* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
(WebCore::CanvasLayerWebKitThread::deleteTextures):
(WebCore):
* platform/graphics/blackberry/CanvasLayerWebKitThread.h:
(CanvasLayerWebKitThread):
* platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
(WebCore::EGLImageLayerWebKitThread::~EGLImageLayerWebKitThread):
(WebCore::EGLImageLayerWebKitThread::deleteFrontBuffer):
* platform/graphics/blackberry/EGLImageLayerWebKitThread.h:
(EGLImageLayerWebKitThread):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::releaseLayerResources):
(WebCore):
* platform/graphics/blackberry/LayerWebKitThread.h:
(LayerWebKitThread):
(WebCore::LayerWebKitThread::deleteTextures):
* platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
(WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
(WebCore::WebGLLayerWebKitThread::deleteTextures):
(WebCore):
* platform/graphics/blackberry/WebGLLayerWebKitThread.h:
(WebGLLayerWebKitThread):

Source/WebKit/blackberry:

Reviewed internally by Filip Spacek.

PR 192899

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::releaseLayerResources):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread):
(BlackBerry::WebKit::WebPagePrivate::suspendRootLayerCommit):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebKitSupport/FrameLayers.cpp:
(BlackBerry::WebKit::FrameLayers::releaseLayerResources):
(WebKit):
* WebKitSupport/FrameLayers.h:
(FrameLayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement the form-action Content Security Policy directive.
https://bugs.webkit.org/show_bug.cgi?id=93777

Patch by Mike West <mkwst@chromium.org> on 2012-08-16
Reviewed by Jochen Eisinger.

Source/WebCore:

The CSP 1.1 editor's draft defines the 'form-action' directive as a
mechanism for whitelisting valid targets for form submission from a
protected resource. A web author might desire to restrict form
submissions to the same origin as the protected resource itself via
a Content Security Policy of "form-action 'self'", or ensure that all
submissions were sent over an SSL connection via "form-action https:".

Specification details available at: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#form-action--experimental

This experimental directive is gated on the ENABLE_CSP_NEXT flag, which
is currently only enabled in Chromium.

Tests: http/tests/security/contentSecurityPolicy/1.1/form-action-src-allowed.html
       http/tests/security/contentSecurityPolicy/1.1/form-action-src-blocked.html
       http/tests/security/contentSecurityPolicy/1.1/form-action-src-default-ignored.html
       http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-allowed.html
       http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked.html
       http/tests/security/contentSecurityPolicy/1.1/form-action-src-javascript-blocked.html
       http/tests/security/contentSecurityPolicy/1.1/form-action-src-redirect-blocked.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkIfFormActionAllowedByCSP):
    Adding a callback to FrameLoader in order to allow the
    MainResourceLoader to check the relevant CSP status without knowing
    anything about CSP.
(WebCore):
* loader/FrameLoader.h:
(FrameLoader):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest):
    Check against the protected resource's Content Security Policy when
    presented with a request that is itself a form submission, or is the
    result of a redirect in response to a form submission. If CSP would
    block the target, cancel the request.
* page/ContentSecurityPolicy.cpp:
(CSPDirectiveList):
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
    Added explanatory text to the source violation console warning that
    specifically calls out sending form data (as opposed to "connect to"
    or "load the").
(WebCore::CSPDirectiveList::allowFormAction):
    Check a URL against a directive list's the 'form-action' source list.
(WebCore):
(WebCore::CSPDirectiveList::addDirective):
    Recognize the 'form-action' CSP directive.
(WebCore::ContentSecurityPolicy::allowFormAction):
    Public interface to check a form action.
* page/ContentSecurityPolicy.h:

LayoutTests:

* http/tests/navigation/resources/redirection-response.php:
    Allow for the specification of alternate hosts for the redirect. We
    need this capability in order to check that an initial submission
    followed by a blocked redirect results in the correct behavior.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-allowed-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-allowed.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-blocked-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-blocked.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-default-ignored-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-default-ignored.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-allowed-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-allowed.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-get-blocked.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-javascript-blocked-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-javascript-blocked.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-redirect-blocked-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/form-action-src-redirect-blocked.html: Added.

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