Create short build logs for errors and warnings.
https://bugs.webkit.org/show_bug.cgi?id=120614

Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
    -include StringIO
(CompileWebKit.createSummary):
    -add a createSummary function which will parse out errors and warnings into a concise log file for quick viewing


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore: Web Inspector shouldn't artificially allocate the arguments object in functions that don't use it
https://bugs.webkit.org/show_bug.cgi?id=121206
<rdar://problem/6911886>

Reviewed by Joseph Pecoraro.

This is a step toward better tools, and a 23% speedup in a simple
JavaScript benchmark run with the Web Inspector open.

We want the Web Inspector to be fast, and we want it to produce reliable
CPU and memory profiles. We can't do that if just opening the Web Inspector
incurs huge CPU/memory penalties like the arguments object.

Also, since use of the 'arguments' identifier is an API for allocating
an object, I think it's good for the UI to let developers know when
they've invoked that API and when they haven't.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator): No need to allocate the
arguments object artificially for the debugger's sake. The activation
object no longer assumes that the stack frame is laid out for one.

(Long-term, this code will move out of the activation object, into a
special object for interfacing with the debugger.)

* runtime/JSActivation.cpp:
(JSC::JSActivation::getOwnNonIndexPropertyNames):
(JSC::JSActivation::getOwnPropertySlot): Don't advertise or provide an
arguments object if the user function didn't include one. The bytecode
generator will not have laid out the stack frame to support one.

(Eventually, we do want the Web Inspector to see an arguments
object in scope in the console. That's a one-line change in JSActivation,
but it's blocked by https://bugs.webkit.org/show_bug.cgi?id=121208.)

(JSC::JSActivation::argumentsGetter):
* runtime/JSActivation.h: Removed this obsolete performance
work-around. C++ property access to an activation object is no longer
hot.

LayoutTests: Web Inspector shouldn't artificially allocate the arguments object in functions that don't use it
https://bugs.webkit.org/show_bug.cgi?id=121206

Reviewed by Joseph Pecoraro.
<rdar://problem/6911886>

* inspector/debugger/debugger-expand-scope-expected.txt: Updated these
results to reflect the fact that it's correct to exclude the 'arguments'
identifier from function scopes that don't use it.

* inspector/debugger/debugger-expand-scope.html: Edited this test to
include one frame that uses the 'arguments' identifier and one frame
that doesn't, so we test both cases.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Update License copyrights in minified JavaScript
https://bugs.webkit.org/show_bug.cgi?id=121264

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

* Scripts/copy-user-interface-resources.sh:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Update CodeMirror for gutter fix
https://bugs.webkit.org/show_bug.cgi?id=121262

Update CodeMirror to 757944449 to fix gutter click issue:
<https://github.com/marijnh/CodeMirror/issues/1807>

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

* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype._appendIndent):
* Tools/PrettyPrinting/codemirror.css:
* Tools/PrettyPrinting/codemirror.js:
* Tools/PrettyPrinting/css.js:
* UserInterface/CodeMirrorAdditions.js:
* UserInterface/CodeMirrorFormatters.js:
* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.didRemoveBreakpoint):
(WebInspector.DebuggerManager.prototype._removeBreakpoint):
* UserInterface/External/CodeMirror/codemirror.css:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/css.js:
* UserInterface/External/CodeMirror/less.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/TextEditor.js:
(WebInspector.TextEditor.prototype.hasFormatter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid extra scrollbar-related layouts for overlay scrollbars
https://bugs.webkit.org/show_bug.cgi?id=121267

Source/WebCore:

Reviewed by Beth Dakin.

If ScrollView::updateScrollbars() detected that scrollbars were added
and removed, it would call contentsResized(), which calls setNeedsLayout(),
followed by visibleContentsResized() which would trigger layout. There is no
point doing this with overlay scrollbars, so avoid it by having
setHas*Scrollbar() return true if the addition/removal of a scrollbar changed
the available width.

No tests: we can't test overlay scrollbars in tests.

* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize): Drive-by assertion that
checks that the unsigned m_deferSetNeedsLayouts doesn't wrap when
decremented.
* platform/ScrollView.cpp:
(WebCore::ScrollView::setHasHorizontalScrollbar): Return true if the addition/removal
changed available space.
(WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
(WebCore::ScrollView::updateScrollbars): Only set sendContentResizedNotification
if available space was changed by addition/removal of scrollbars.
* platform/ScrollView.h:

Source/WebKit2:

Reviewed by Beth Dakin.

view->resize() will call setNeedsLayout() if necessary, and may already have
done layout, so the extra setNeedsLayout() here was bad.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Duplicated color swatches changing autocompletes color names
https://bugs.webkit.org/show_bug.cgi?id=121265

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

CodeMirror bookmarks at position used to be unique but no longer are.
Define an extension to give us unique bookmarks as we expected, and
update all the old locations using setBookmark.

* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
(WebInspector.CSSStyleDeclarationTextEditor.prototype):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.event.newColorText):
* UserInterface/CodeMirrorAdditions.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG::Int32Operand and fillInt32() should go away and all uses should be replaced with SpeculateInt32Operand
https://bugs.webkit.org/show_bug.cgi?id=121268

Reviewed by Oliver Hunt.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Speculative build fix after r155638.

* platform/efl/PasteboardEfl.cpp: Add include for PassRefPtr, which
is no longer implicitly included.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Image doesn't always repaint at high quality in all tiles after a live resize
https://bugs.webkit.org/show_bug.cgi?id=121244

Reviewed by Darin Adler.

Currently, ImageQualityController removes an image from its low-quality-images
list from inside shouldPaintAtLowQuality, if this is the first paint outside
of a live resize, but does not force the renderer to repaint in its entirety.

However, there's no guarantee we've invalidated the whole renderer, so this can
leave some parts of the image painted in low-quality.

This just removes a short-circuit, instead using the ordinary high-quality-repaint
timer to ensure that the entire renderer is repainted.

No new test; all attempts have failed, as this depends on tiled drawing
and a live resize occurring.

* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[mac] Cache rendered image in PDFDocumentImage
https://bugs.webkit.org/show_bug.cgi?id=121207

Reviewed by Simon Fraser.

Tests: fast/images/pdf-as-image-too-big.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::createImage):
PDFDocumentImage takes a ImageObserver now so that it can report
decoded data size changes to the memory cache.

* platform/graphics/Image.h:
(WebCore::Image::isPDFDocumentImage): Added.

* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::PDFDocumentImage):
PDFDocumentImage takes a ImageObserver now so that it can report
decoded data size changes to the memory cache.

(WebCore::PDFDocumentImage::applyRotationForPainting):
Fix up some comments, and use GraphicsContext instead of CG API.

(WebCore::PDFDocumentImage::cacheParametersMatch):
Determine whether our cached image is still valid, given the new
destination's size, CTM scale, and source rect.

(WebCore::transformContextForPainting): Added.

(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
Cache a rendered bitmap of the PDF. Invalidate the cache if cacheParametersMatch
decides that the parameters don't match, unless we're painting in low quality mode,
in which case we'll scale the existing image (and then fully repaint when the
high-quality repaint timer fires).
Inform the memory cache of our new size.

(WebCore::PDFDocumentImage::draw):
Update the cached image if needed.
Paint the cached image into the context if it's available (which it might not be,
if the image is way too big and the allocation fails). Otherwise, paint straight
into the context as we previously did.

(WebCore::PDFDocumentImage::destroyDecodedData):
Throw away the cached image if requested.

(WebCore::PDFDocumentImage::decodedSize):
(WebCore::PDFDocumentImage::drawPDFPage):
Drive-by use GraphicsContext instead of CG directly.

* platform/graphics/cg/PDFDocumentImage.h:
(WebCore::PDFDocumentImage::create):
Override isPDFDocumentImage().
Add storage for the cached image buffer and various cache parameters.

* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
PDFDocumentImage is also interested in/capable of low-quality painting now.

Add a test ensuring that very large PDF-in-<img> elements don't crash.

* fast/images/pdf-as-image-too-big-expected.txt: Added.
* fast/images/pdf-as-image-too-big.html: Added.


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