Fix !ENABLE(DFG_JIT) build
https://bugs.webkit.org/show_bug.cgi?id=136702

Reviewed by Michael Saboff.

* bytecode/CallEdgeProfile.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MIPS] branch32WithPatch missing
https://bugs.webkit.org/show_bug.cgi?id=136696

Reviewed by Michael Saboff.

Added the missing branch32WithPatch. The implementation
is currently the same as the branchPtrithPatch because
the macro assembler supports only 32 bit MIPS.

* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branch32WithPatch):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix ESLint* no-avoidable-bind warnings
https://bugs.webkit.org/show_bug.cgi?id=136690

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-10
Reviewed by Timothy Hatcher.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.LocalJSONObject.prototype._children):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/Views/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._updateDataGrid):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._filterMessages):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.get supplementalRepresentedObjects):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove unused Console search highlight methods
https://bugs.webkit.org/show_bug.cgi?id=136661

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-10
Reviewed by Timothy Hatcher.

ESLint's no-undef warning complained about some undefined references
in these functions that would have thrown exceptions. Turns out this
code is unused, and we do highlighting in the console separately.

* UserInterface/Views/ConsoleCommand.js:
(WebInspector.ConsoleCommand.prototype.clearHighlight): Deleted.
(WebInspector.ConsoleCommand.prototype.highlightSearchResults): Deleted.
(WebInspector.ConsoleCommand.prototype.matchesRegex): Deleted.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype.clearHighlight): Deleted.
(WebInspector.ConsoleMessageImpl.prototype.highlightSearchResults): Deleted.
(WebInspector.ConsoleMessageImpl.prototype.matchesRegex): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up some ENABLE(PICTURE_SIZES) stuff, don't change function signatures inside #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=136654

Reviewed by Darin Adler.

Adding parameters inside an #ifdef makes for unreadable code, so remove some
#if ENABLE(PICTURE_SIZES) related to the preload scanner and always pass the arguments.
Reduced the argument count on some functions by just passing a Document&.

Also fix a couple of uses of #if ENABLE_PICTURE_SIZES.

* html/HTMLImageElement.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::insert):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::scan):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
* html/parser/HTMLSrcsetParser.cpp:
(WebCore::pickBestImageCandidate):
(WebCore::bestFitSourceForImageAttributes):
* html/parser/HTMLSrcsetParser.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Compile error, CertificateInfo.h is not found.
https://bugs.webkit.org/show_bug.cgi?id=136703

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-09-10
Reviewed by Alex Christensen.

Curl also needs to implement the CertificateInfo class.

* platform/network/curl/CertificateInfo.h: Added.
(WebCore::CertificateInfo::CertificateInfo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix ESLint no-undef warnings
https://bugs.webkit.org/show_bug.cgi?id=136660

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-10
Reviewed by Timothy Hatcher.

* UserInterface/Models/DOMSearchMatchObject.js:
(WebInspector.DOMSearchMatchObject.prototype._generateClassName):
(WebInspector.DOMSearchMatchObject.titleForDOMNode):
* UserInterface/Models/Gradient.js:
(WebInspector.Gradient.fromString):
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/ReplayDashboardView.js:
(WebInspector.ReplayDashboardView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r173446.
https://bugs.webkit.org/show_bug.cgi?id=136707

These two tests fail consistently on Mavericks and ML WK2
bots. (Requested by jernoble|laptop on #webkit).

Reverted changeset:

"Unskip two snapshotting tests that work for me consistently
locally."
http://trac.webkit.org/changeset/173446

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NetworkResourceLoader cleanups
https://bugs.webkit.org/show_bug.cgi?id=136701

Reviewed by Darin Adler.

After smashing NetworkResourceLoader together with the clients it can be made nicer.

* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):

    The original request is now part of the loader.

(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::NetworkResourceLoader):

    Instead of copying everything out from NetworkResourceLoadParameters just include the whole thing as a const field.
    SanboxExtension construction moves to NetworkResourceLoadParameters::decode()
    Stuff that is related to starting the load moves to start().

(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::setDefersLoading):

    Eliminate m_deferredRequest since we now always remember the original request.

(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::continueWillSendRequest):

    Eliminate unnecessary m_suggestedRequestForWillSendRequest.

(WebKit::NetworkResourceLoader::wasBlocked):
(WebKit::NetworkResourceLoader::cannotShowURL):
(WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
(WebKit::NetworkResourceLoader::receivedCancellation):
(WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::originalRequest):
(WebKit::NetworkResourceLoader::currentRequest):
(WebKit::NetworkResourceLoader::sessionID):
(WebKit::NetworkResourceLoader::defersLoading):
(WebKit::NetworkResourceLoader::isLoadingMainResource):
(WebKit::NetworkResourceLoader::request): Deleted.
(WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.

    Made private and moved to cpp.

* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):

    Use original request instead of the current one. This might fix a bug where we didn't use file backing over redirects.

* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):

    Decode to SanboxExtensions to the actual type rather than a handle.

* Shared/Network/NetworkResourceLoadParameters.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TypeSet needs a mode where it no longer profiles structure shapes
https://bugs.webkit.org/show_bug.cgi?id=136263

Reviewed by Filip Pizlo.

The TypeSet data structure used to gather as many StructureShape
objects as it encountered during type profiling. But, this meant 
that there was no upper limit on how many objects it could allocate. 
This patch places a fixed upper bound on the number of StructureShapes
allocated per TypeSet to prevent using too much memory for little gain
in type profiling usefulness.

StructureShape objects are now also aware of when they are created
from Structures which are dictionaries.

In total, this patch lays the final groundwork needed in refactoring 
the inspector protocol for the type profiler.

* runtime/Structure.cpp:
(JSC::Structure::toStructureShape):
* runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::typeInformationForExpressionAtOffset):
* runtime/TypeSet.cpp:
(JSC::TypeSet::TypeSet):
(JSC::TypeSet::addTypeInformation):
(JSC::StructureShape::StructureShape):
(JSC::StructureShape::toJSONString):
(JSC::StructureShape::enterDictionaryMode):
* runtime/TypeSet.h:
(JSC::TypeSet::isOverflown):
* tests/typeProfiler/dictionary-mode.js: Added.
(wrapper):
* tests/typeProfiler/driver/driver.js:
* tests/typeProfiler/overflow.js: Added.
(wrapper.Proto):
(wrapper):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Group all the media expectations together logically.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rollout r173446, the skipped tests still fail only on the bots.

* platform/mac-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Optimization; avoid reallocating string many times.
https://bugs.webkit.org/show_bug.cgi?id=136704

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-09-10
Reviewed by Alex Christensen.

Adding individual characters to a string is inefficient, the string will be reallocated each time.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::readCurlCookieToken):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix a snapshotting test. Test was incorrect as it assumed the wrong window size.

* platform/mac-wk2/TestExpectations: Remove some duplicate test expectations.
* platform/mac-wk2/plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image-expected.txt:
* plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Laying out a TextRun using an SVG font is O(n^2)
https://bugs.webkit.org/show_bug.cgi?id=136584

Reviewed by Darin Adler.

Addressing post-commit review from Darin.

No new tests.

* platform/graphics/Font.h:
(WebCore::Font::treatAsSpace): Un-inline.
(WebCore::Font::treatAsZeroWidthSpace): Ditto.
(WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
* svg/SVGFontData.cpp:
(WebCore::computeNormalizedSpaces): Avoid unnecessary copy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix ESLint consistent-return warnings
https://bugs.webkit.org/show_bug.cgi?id=136682

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-10
Reviewed by Timothy Hatcher.

* .eslintrc:
* UserInterface/Controllers/BranchManager.js:
(WebInspector.BranchManager.prototype.createBranch):
* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrame):
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):
* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype._applyUserInput):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.showChild):
(WebInspector.DOMTreeElement.prototype._startEditingTarget):
(WebInspector.DOMTreeElement.prototype._startEditing):
* UserInterface/Views/EditingSupport.js:
* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup.prototype._nodeTextOrLink):
* UserInterface/Views/FrameContentView.js:
(WebInspector.FrameContentView.prototype._showContentViewForIdentifier):
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.insertNavigationItem):
(WebInspector.NavigationBar.prototype.removeNavigationItem):
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype._insertExecutionContextPathComponentForFrame):
* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar.prototype.addSidebarPanel):
(WebInspector.Sidebar.prototype.removeSidebarPanel):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.addStyleClassToLine):
(WebInspector.TextEditor.prototype.removeStyleClassFromLine):
(WebInspector.TextEditor.prototype.toggleStyleClassForLine):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove a workaround in frameIsCompleteAtIndex for a problem that was fixed in Lion
https://bugs.webkit.org/show_bug.cgi?id=136652

Reviewed by Dan Bernstein.

* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameIsCompleteAtIndex):
ImageIO returns the right thing now.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More unreviewed gardening; despite the comment, media/audio-repaint.html is failing on all mac ports, not just on Lion.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[mips] Add missing parts and fix LLINT mips backend
https://bugs.webkit.org/show_bug.cgi?id=136706

Reviewed by Michael Saboff.

* llint/LowLevelInterpreter.asm: Fix invalid CalleeSave register number.
Implement initPCRelative and setEntryAddress macros.
* llint/LowLevelInterpreter32_64.asm: Fix register distribution in
doVMEntry macro.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=136650
Rubber-banding in the DOM view of the WebInspector is really jumpy
-and corresponding-
rdar://problem/18166043

Reviewed by Darin Adler.

This patch implements the ScrollableArea virtual function isRubberBandInProgress() 
for RenderLayer, and then uses that to determine whether to clamp the scroll 
position in updateScrollInfoAfterLayout().
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isRubberBandInProgress):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:



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