Refactor CachedResourceLoader: add CachedResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=99736

Patch by Marja Hölttä <marja@chromium.org> on 2012-10-22
Reviewed by Adam Barth.

For fixing bugs 84883 and 92761,
CachedResourceLoader::requestResource should take as parameter
information about who initiated the request. But the parameter
list was already long. This gathers all the parameters into a
separate class, CachedResourceRequest. The next step is to add
information about who initiated the request into
CachedResourceRequest.

No new tests because no changes in functionality, just moving code
around.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):
* css/WebKitCSSSVGDocumentValue.cpp:
(WebCore::WebKitCSSSVGDocumentValue::load):
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::cachedShader):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestShader):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::requestPreload):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
(WebCore):
* loader/cache/CachedResourceLoader.h:
(WebCore):
(CachedResourceLoader):
* loader/cache/CachedResourceRequest.cpp: Added.
(WebCore):
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h: Added.
(WebCore):
(CachedResourceRequest):
(WebCore::CachedResourceRequest::mutableResourceRequest):
(WebCore::CachedResourceRequest::resourceRequest):
(WebCore::CachedResourceRequest::charset):
(WebCore::CachedResourceRequest::setCharset):
(WebCore::CachedResourceRequest::options):
(WebCore::CachedResourceRequest::priority):
(WebCore::CachedResourceRequest::forPreload):
(WebCore::CachedResourceRequest::setForPreload):
(WebCore::CachedResourceRequest::defer):
(WebCore::CachedResourceRequest::setDefer):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::requestImageResource):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::loadFont):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged):
* xml/XSLImportRule.cpp:
(WebCore::XSLImportRule::loadSheet):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: remove unneeded debug messages from find_files()
https://bugs.webkit.org/show_bug.cgi?id=100041

Reviewed by Adam Barth.

This routine gets called all the time when loading the virtual
suites, and the debug messages were spamming me.

* Scripts/webkitpy/common/find_files.py:
(_normalized_find):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r131655): Crash in StringImpl::findIgnoringCase
https://bugs.webkit.org/show_bug.cgi?id=99753

Reviewed by Geoffrey Garen.

Source/WTF: 

Fixed to use the searchLength to take into account the start index.

Added LayoutTests/fast/js/find-ignoring-case-regress-99753.html

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findIgnoringCase):

LayoutTests: 

New regression test.

* fast/js/find-ignoring-case-regress-99753-expected.txt: Added.
* fast/js/find-ignoring-case-regress-99753.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, more Chromium ML expectation updating.

* platform/chromium-mac-mountainlion/TestExpectations:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More Argument coder cleanup
https://bugs.webkit.org/show_bug.cgi?id=100022

Reviewed by Andreas Kling.

Remove the ArgumentDecoder::decode overload that takes a const reference - if the call to decode ends up creating a temporary
we'll encode into it and then destroy it. Since this decode overload was mostly used with the CoreIPC::Out functions, remove them
(and CoreIPC::In) as well. Clean up a couple of ArgumentCoders as well.

* Platform/CoreIPC/ArgumentCoders.h:
* Platform/CoreIPC/ArgumentDecoder.h:
* Platform/CoreIPC/Arguments.h:
* Platform/CoreIPC/Connection.h:
(Connection):
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::decode):
* Shared/PrintInfo.cpp:
(WebKit::PrintInfo::encode):
(WebKit::PrintInfo::decode):
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::encode):
(WebKit::WebContextMenuItemData::decode):
* Shared/WebEvent.cpp:
(WebKit::WebEvent::encode):
(WebKit::WebEvent::decode):
* Shared/WebGeolocationPosition.cpp:
(WebKit::WebGeolocationPosition::Data::encode):
(WebKit::WebGeolocationPosition::Data::decode):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/WebPopupItem.cpp:
(WebKit::WebPopupItem::encode):
(WebKit::WebPopupItem::decode):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::decodeMessageBody):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
(WebKit::InjectedBundle::postSynchronousMessage):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::decodeMessageBody):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::postInjectedBundleMessage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::postInjectedBundleMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG::Array::Undecided should be called DFG::Array::SelectUsingPredictions
https://bugs.webkit.org/show_bug.cgi?id=100052

Reviewed by Oliver Hunt.

No functional change, just renaming. It's a clearer name that more accurately
reflects the meaning, and it eliminates the namespace confusion that will happen
with the Undecided indexing type in https://bugs.webkit.org/show_bug.cgi?id=98606

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::fromObserved):
(JSC::DFG::refineArrayMode):
(JSC::DFG::modeAlreadyChecked):
(JSC::DFG::modeToString):
* dfg/DFGArrayMode.h:
(JSC::DFG::canCSEStorage):
(JSC::DFG::modeIsSpecific):
(JSC::DFG::modeSupportsLength):
(JSC::DFG::benefitsFromStructureCheck):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::blessArrayOperation):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::arrayify):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium win rebaselines.

* platform/chromium-win/fast/speech/input-appearance-searchandspeech-expected.png:
* platform/chromium-win/fast/speech/input-appearance-searchandspeech-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
margin-top/bottom has no effect for child nodes of flex items
https://bugs.webkit.org/show_bug.cgi?id=99923

Reviewed by Ojan Vafai.

Source/WebCore:

Flexitems, like table cells, shouldn't collapse margins.

Test: css3/flexbox/flexitem-no-margin-collapsing.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::MarginInfo::MarginInfo): Check to see if the parent is a flexible box.
We should always have a parent if we make it this far in the check.

LayoutTests:

Add a test to make sure we don't collapse margins in flex items.

* css3/flexbox/flexitem-no-margin-collapsing-expected.txt: Added.
* css3/flexbox/flexitem-no-margin-collapsing.html: Added.
* css3/flexbox/repaint.html:


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