[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