Typo in 'autofocus' sandboxing error message.
https://bugs.webkit.org/show_bug.cgi?id=103616

Reviewed by Jochen Eisinger.

Source/WebCore:

The sandbox attribute name is 'allow-scripts', not 'allow-script'. :(

* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):

LayoutTests:

* fast/frames/sandboxed-iframe-autofocus-denied-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] TiledBackingStore: User events are sent to web page before it is shown
https://bugs.webkit.org/show_bug.cgi?id=101753

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-11-29
Reviewed by Jocelyn Turcotte.

User events are suppressed on WEB process side while drawing area is frozen.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::gestureEvent):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::sendIfEventCannotBeHandled):
(WebKit):
(WebKit::WebPage::didCompletePageTransition):
* WebProcess/WebPage/WebPage.h:
(WebPage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-perf-tests --chromium-android fails due to Skia INFO logging
https://bugs.webkit.org/show_bug.cgi?id=103585

Reviewed by Adam Barth.

Ignore all INFO logging from Chromium code.
Also added some basic testing of the ignored-stderr lines code.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(MainTest.test_ignored_stderr_lines):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsSurfaceGLX: remove redundant parameter from resolveGLMethods.
https://bugs.webkit.org/show_bug.cgi?id=103636

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::resolveGLMethods):
(WebCore::GraphicsSurface::platformCreate):
(WebCore::GraphicsSurface::platformImport):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Update BB10 form theme.
https://bugs.webkit.org/show_bug.cgi?id=100760

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-11-29
Reviewed by Rob Buis.

Internally Reviewed by Eli Fidler.
Set text color after buttons are pressed.

* css/themeBlackBerry.css:
(input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active):
(select:active):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::RenderThemeBlackBerry::paintButton):
(WebCore::RenderThemeBlackBerry::paintMenuList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for WinCE after r136096.

* wtf/StringPrintStream.cpp: Added missing include file.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Add code supppression flags for skia

Unreviewed addition of Skia build flags to allow for their removal from Chromium's skia.gyp.

* skia_webkit.gyp: Added defines for SK_DISABLE_DITHER_32BIT_GRADIENT and SK_DISABLE_DASHING_OPTIMIZATION


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordinatedGraphics] Have LayerTreeRenderer::ensureLayer() return the layer
https://bugs.webkit.org/show_bug.cgi?id=103645

Reviewed by Noam Rosenthal.

The current LayerTreeRenderer code keep calling ensureLayer() and then
LayerMap::find() to retrieve the layer. Since ensureLayer() already has
a pointer to the layer, we can simply have the function return it.
This is slightly more efficient and it makes the code a bit simpler.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerChildren):
(WebKit::LayerTreeRenderer::setLayerFilters):
(WebKit::LayerTreeRenderer::setLayerState):
(WebKit::LayerTreeRenderer::ensureLayer):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative Windows build fix after r136086.

Unreviewed build fix.

Suspect that ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z needs to be removed from Windows
export list since the symbol was removed in r136086.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build after r136095
https://bugs.webkit.org/show_bug.cgi?id=103629

Unreviewed.

Add a static_cast to fix the build.

Patch by Andrei Bucur <abucur@adobe.com> on 2012-11-29

* Shared/mac/ObjCObjectGraphCoders.mm:
(WebKit::ObjCObjectGraphEncoder::baseEncode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/12771885> Support ruby-position: {before, after}
https://bugs.webkit.org/show_bug.cgi?id=103569

Reviewed by Anders Carlsson.

Source/WebCore: 

Specified in <http://www.w3.org/TR/2011/WD-css3-ruby-20110630/#rubypos>, the ruby-position
property takes four values: before, after, inter-character, and inline. This change adds
support for the values before and after.

Test: fast/ruby/position-after.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle ruby-position.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Accept before and after as valid values for
ruby-position.
(WebCore::isKeywordPropertyID): Added ruby-position to the list of properties with keyword
values.
(WebCore::CSSParser::parseValue): Added ruby-position to the switch statement.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mapping from RubyPosition.
(WebCore::CSSPrimitiveValue::operator RubyPosition): Added mapping from CSSPrimitiveValue.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Added ruby-position as an inherited property.
* css/CSSPropertyNames.in: Added -webkit-ruby-position.
* css/CSSValueKeywords.in: Added after and before.
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder): Added a handler for ruby-position.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Added ruby-position.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection): Changed to choose which of
hasAnnotationsBefore and hasAnnotationsAfter to set based on ruby position.
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment): Changed to adjust only for
ruby positioned before the base.
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): Added adjustment for ruby
positioned after the base.
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::layout): Account for ruby-position when positioning the ruby text
relative to the base.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff): Made a ruby-position difference a layout difference.
* rendering/style/RenderStyle.h: Added rubyPosition(), setRubyPosition(), and 
initialRubyPosition().
* rendering/style/RenderStyleConstants.h: Added the RubyPosition enum.
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialized for
m_rubyPosition. Added copying the value of this member to the copy constructor.
(WebCore::StyleRareInheritedData::operator==): Added comparison of m_rubyPosition.
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData): Added m_rubyPosition member variable.

LayoutTests: 

* fast/ruby/position-after.html: Added.
* platform/mac/fast/ruby/position-after-expected.png: Added.
* platform/mac/fast/ruby/position-after-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] LayoutTests/fast/js/string-replacement-outofmemory.html crashes
https://bugs.webkit.org/show_bug.cgi?id=103348

Reviewed by Abhishek Arya.

Add a comment to explain that the crash is expected and is performed in an
orderly fashion.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Console: hovering node wrappers in object tree should highlight them on the page
https://bugs.webkit.org/show_bug.cgi?id=101150

Reviewed by Vsevolod Vlasov.

- Introduced a way to highlight nodes by object id in addition to node id.
- Decorated nodes in the object tree outline and added on-hover highlighting.

* inspector/Inspector.json:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightNode):
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype.highlightDOMNode):
* inspector/front-end/DOMPresentationUtils.js:
(WebInspector.DOMPresentationUtils.createSpansForNodeTitle):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype.update):
(WebInspector.ObjectPropertyTreeElement.prototype._mouseMove):
(WebInspector.ObjectPropertyTreeElement.prototype._mouseOut):
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.prototype.highlightAsDOMNode):
(WebInspector.RemoteObject.prototype.hideDOMNodeHighlight):
* inspector/front-end/TestController.js:
* inspector/front-end/externs.js:
* inspector/front-end/inspector.css:
(.console-formatted-node:hover):
* inspector/front-end/utilities.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: introduce fast case for within-chunk edit
https://bugs.webkit.org/show_bug.cgi?id=103545

Reviewed by Vsevolod Vlasov.

Special-casing edits within the chunk for faster operation.

* inspector/front-end/DOMExtension.js:
(removeSubsequentNodes):
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Add minimum column height tracking and forced break tracking to column sets.
https://bugs.webkit.org/show_bug.cgi?id=103657

Reviewed by Simon Fraser.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
(WebCore::RenderMultiColumnSet::updateMinimumColumnHeight):
(WebCore::RenderMultiColumnSet::minimumColumnHeight):
(RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::forcedBreaksCount):
(WebCore::RenderMultiColumnSet::forcedBreakOffset):
(WebCore::RenderMultiColumnSet::maximumDistanceBetweenForcedBreaks):
(WebCore::RenderMultiColumnSet::clearForcedBreaks):
(WebCore::RenderMultiColumnSet::addForcedBreak):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Be consistent in handling of frameAtIndex (and related) returns.
https://bugs.webkit.org/show_bug.cgi?id=103207

Patch by Brent Fulgham <bfulgham@gmail.com> on 2012-11-29
Reviewed by David Hyatt.

Under various conditions, frameAtIndex (and therefore,
nativeImageForCurrentFrame) returns null. A series of bugs over
the years has ensured null returns are handled in some cases,
but there are a handful of remaining cases where this is still a
problem.

No new tests, as these low-level functions are covered by
numerous existing test cases.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Cookies in private mode should not have access to public cookies
https://bugs.webkit.org/show_bug.cgi?id=103649

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-11-29
Reviewed by Rob Buis.

PR 253983

When CookieManager switches back from public to private mode,
we will clear the cookie tree so the browser won't have access
to the public cookies.

Tested using browser.swlab.rim.net cookie tests and the steps in
the PR.

* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::setPrivateMode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136148 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Typo in Color creation function name
https://bugs.webkit.org/show_bug.cgi?id=103464

Patch by Helder Correia <helder.correia@nokia.com> on 2012-11-29
Reviewed by Alexey Proskuryakov.

Renaming createUnCheked() as createUnchecked().

No new tests.

* platform/graphics/Color.cpp:
(WebCore::colorFromPremultipliedARGB):
* platform/graphics/Color.h:
(WebCore::Color::createUnchecked):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] track sizing functions should have their own type
https://bugs.webkit.org/show_bug.cgi?id=103343

Reviewed by Tony Chang.

The current code uses a Length to represent the track sizing function. This is
fine as we only parse <length> | <percentage> but in order to support minmax
sizing, we have to store 2 Lengths. We could go with a pair but that would make
the code not very readable so this change introduces GridTrackSize.

Refactoring, covered by existing tests.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Added GridTrackSize.h to all our build systems.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackBreadth):
(WebCore::valueForGridTrackList):
* css/StyleResolver.cpp:
(WebCore::createGridTrackBreadth):
(WebCore::createGridTrackList):
(WebCore::StyleResolver::applyProperty):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computePreferredLogicalWidths):
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
* rendering/style/RenderStyle.h:
Updated the above call sites to use GridTrackSize. While
touching them, changed the code to use an empty Vector to represent
'none' instead of Length(Undefined).

* rendering/style/StyleGridData.h:
Updated #include, removed a comment as it would have gone stale after
adding more grammar support and added a FIXME to rename some variables.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutGridItems):
Implemented a work-around to avoid crashing due to implicit columns / rows.

* rendering/style/GridTrackSize.h: Added.
(WebCore::GridTrackSize::GridTrackSize):
(WebCore::GridTrackSize::length):
(WebCore::GridTrackSize::setLength):
(WebCore::GridTrackSize::type):
(WebCore::GridTrackSize::operator==):
New class, it now only wraps a single Length.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=103577
TiledDrawingArea should recycle tiles
-and corresponding-
<rdar://problem/12714586>

Reviewed by Simon Fraser.

New class LayerPool will keep a list of layers to reuse so that 
we can avoid creating and destroying so many layer.

When removing layers, add them to the LayerPool
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::revalidateTiles):

Before creating a new layer, try to get one of the appropriate size 
from the LayerPool.
(WebCore::TileCache::createTileLayer):

New class.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ca/mac/LayerPool.h: Added.
(WebCore):
(LayerPool):
(WebCore::LayerPool::capacity):
(WebCore::LayerPool::canReuseLayerWithSize):
* platform/graphics/ca/mac/LayerPool.mm: Added.
(WebCore):
(WebCore::LayerPool:: LayerPool):
(WebCore::LayerPool::sharedPool):
(WebCore::LayerPool::bytesBackingLayerWithPixelSize):
(WebCore::LayerPool::listOfLayersWithSize):
(WebCore::LayerPool::addLayer):
(WebCore::LayerPool::takeLayerWithSize):
(WebCore::LayerPool::decayedCapacity):
(WebCore::LayerPool::schedulePrune):
(WebCore::LayerPool::prune):
(WebCore::LayerPool::drain):

If we're under memory pressure, drain the LayerPool
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::releaseMemory):



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