Encapsulate globals in CSSPropertyAnimation.cpp
https://bugs.webkit.org/show_bug.cgi?id=121205

Reviewed by Antti Koivisto.

Encapsulated the globals inside a newly added CSSPropertyAnimationWrapperMap. Also removed the circular
dependency from ShorthandPropertyWrapper's constructor to CSSPropertyAnimationWrapperMap::instance().
The circular dependency still exists in ensurePropertyMap but I'm going to remove it in the bug 121199.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Takes a Vector of longhand wrappers instead of
calling wrapperForProperty in the middle of constructing the very table. This circular dependency is now
encapsulated in CSSPropertyAnimationWrapperMap::ensurePropertyMap.
(WebCore::CSSPropertyAnimationWrapperMap::instance): Added.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Renamed from WebCore::wrapperForProperty.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Added.
(WebCore::CSSPropertyAnimationWrapperMap::size): Added.
(WebCore::CSSPropertyAnimationWrapperMap::addPropertyWrapper): Renamed from WebCore::addPropertyWrapper. Also
cleaned up boolean logics to use early exits instead of nested ifs.
(WebCore::CSSPropertyAnimationWrapperMap::addShorthandProperties): Renamed from WebCore::addShorthandProperties.
(WebCore::CSSPropertyAnimationWrapperMap::ensurePropertyMap): Renamed from WebCore::ensurePropertyMap.
Added an alias gPropertyWrappers for m_propertyWrappers; this aliasing will be removed in the bug 121199.
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
(WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::getPropertyAtIndex):
(WebCore::CSSPropertyAnimation::getNumProperties):
* page/animation/CSSPropertyAnimation.h:
* rendering/style/RenderStyle.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/animations/smil-leak-*.svg tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=114280

Reviewed by Tim Horton.

Moved garbage collection out of the function that touches nodes to be collected,
making sure that they are definitely not on the stack.

I could not reproduce locally, so this is a speculative fix.

* svg/animations/smil-leak-dynamically-added-element-instances.svg:
* svg/animations/smil-leak-element-instances-noBaseValRef.svg:
* svg/animations/smil-leak-element-instances.svg:
* svg/animations/smil-leak-elements.svg:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore: Qt build fix. Add a return to make the compiler happy.

* dfg/DFGGPRInfo.h:
(JSC::DFG::JSValueRegs::gpr):

Source/WebCore: Qt and Windows build fix.

* page/animation/CSSPropertyAnimation.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Canvas fillText and measureText handle ideographic spaces differently
https://bugs.webkit.org/show_bug.cgi?id=108881

Fixing the test:
1. Updated paths to js-test scripts.
2. Removed "meta charcode" - we don't need to specify a charset here, and it's
"charset", not "charcode" anyway.

* fast/canvas/canvas-measureText-ideographicSpace.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] SHOULD NEVER BE REACHED is touched WebCore::InputType::createStepRange
https://bugs.webkit.org/show_bug.cgi?id=121148

Reviewed by Kent Tamura.

Source/WebCore:

Non-steppable input types must not rendered as slider even if its webkit-apperance style
property is set to slider-vertical/horizontal.

Test: platform/qt/fast/forms/range/slider-crash-on-input.html

* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::paintSliderTrack):

LayoutTests:

Trying to render text input as slider-vertical. Expecting to run without crash.

* platform/qt/fast/forms/range/slider-crash-on-input.html: Added.
* platform/qt/platform/qt/fast/forms/range/slider-crash-on-input-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rolling out r155632

Broke some tests.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper):
* heap/MarkedBlock.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<meter> element AXValue is listed as a writable value
https://bugs.webkit.org/show_bug.cgi?id=117650

Patch by Samuel White <samuel_white@apple.com> on 2013-09-12
Reviewed by Chris Fleizach.

Source/WebCore:

No new tests, updated existing accessibility/meter-element.html test
to check writability. Changed meter element value to be unwritable.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetValueAttribute):

LayoutTests:

Added writability check to meter element test.

* accessibility/meter-element.html:
* platform/mac/accessibility/meter-element-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update cygwin downloader to search for packages in the right location.

* CygwinDownloader/cygwin-downloader.py:
* CygwinDownloader/cygwin-downloader.zip:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Rename shapeContainingBlockHeight to shapeContainingBlockLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=121252

Reviewed by Oliver Hunt.

No new tests, no behavior change.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::shapeContainingBlockLogicalHeight):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[Windows] Update WKSI library for Open Source builders.

* win/lib32/WebKitSystemInterface.lib: Recompile with latest WebKit to use newer
WTF.dll symbol exports.



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