WebKit-https.git
6 years agoAdd missing copyright header to ColorChooserClient.h
tkent@chromium.org [Wed, 24 Apr 2013 01:06:01 +0000 (01:06 +0000)]
Add missing copyright header to ColorChooserClient.h
https://bugs.webkit.org/show_bug.cgi?id=115067

Reviewed by Andreas Kling.

* platform/ColorChooserClient.h:
This was added in 2011 by a Google employee.
http://trac.webkit.org/changeset/103168

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

6 years agoCall the correct superclass in RenderSlider::layout().
akling@apple.com [Wed, 24 Apr 2013 00:55:21 +0000 (00:55 +0000)]
Call the correct superclass in RenderSlider::layout().
<http://webkit.org/b/115071>

From Blink r147850 by <cbiesinger@chromium.org>:

The superclass is RenderFlexibleBox, not RenderBlock.

* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::layout):

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

6 years agoAdd platform support for -webkit-background-blend-mode to CG context with background...
commit-queue@webkit.org [Wed, 24 Apr 2013 00:53:42 +0000 (00:53 +0000)]
Add platform support for -webkit-background-blend-mode to CG context with background color
https://bugs.webkit.org/show_bug.cgi?id=114412

Patch by Mihai Tica <mitica@adobe.com> on 2013-04-23
Reviewed by Darin Adler.

Source/WebCore:

Tests: css3/compositing/effect-background-blend-mode-color.html, css3/compositing/effect-background-blend-mode-color2.html

This patch adds support for blending on background colors to the Core Graphics port of WebKit.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
* platform/graphics/GraphicsContext.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):

LayoutTests:

Adding pixel tests for -webkit-background-blend-mode with bg-color
effect-background-blend-mode-color.html uses accelerated compositing
effect-background-blend-mode-color2.html uses software rendering

* css3/compositing/effect-background-blend-mode-color-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-color.html: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-color-expected.png: Added.
* css3/compositing/effect-background-blend-mode-color2-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-color2.html: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-color2-expected.png: Added.

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

6 years agoRemove an unused member variable erroneously added in r149007.
rniwa@webkit.org [Wed, 24 Apr 2013 00:33:19 +0000 (00:33 +0000)]
Remove an unused member variable erroneously added in r149007.

* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
(LogicalSelectionOffsetCaches):

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

6 years ago[EFL][WK2] Build break after r149004
ryuan.choi@samsung.com [Wed, 24 Apr 2013 00:20:09 +0000 (00:20 +0000)]
[EFL][WK2] Build break after r149004
https://bugs.webkit.org/show_bug.cgi?id=115066

Reviewed by Tim Horton.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged):
Added dummy method for new virtual method.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(CoordinatedLayerTreeHost): Ditto.

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

6 years agologicalLeftSelectionGap and logicalRightSelectionGap call availableLogicalWidth(...
rniwa@webkit.org [Wed, 24 Apr 2013 00:18:27 +0000 (00:18 +0000)]
logicalLeftSelectionGap and logicalRightSelectionGap call availableLogicalWidth() multiple times
https://bugs.webkit.org/show_bug.cgi?id=113479

Reviewed by David Hyatt.

Introduced LogicalSelectionOffsetCaches to cache the containing blocks and their logical left and right
selection offsets in computing selection gaps. An instance of this class stores the containing block for
each position type and caches their logical selection offsets when none of their block ancestors up until
its nearest selection root do no have any floating objects or regions and exclusions.

When blockSelectionGaps recurses to another level, it creates a new cache instance by "inheriting"
(like RenderStyle) from the old cache, overriding those containing blocks that are replaced by "this".

This eliminates the need to traverse containing block ancestors in RenderBlock::logicalLeftSelectionOffset
and RenderBlock::logicalRightSelectionOffset, and improves WebKit's performance by roughly 20%.

Performance Tests: Interactive/SelectAll.html

* GNUmakefile.list.am:
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:

* rendering/LogicalSelectionOffsetCaches.h: Added.
(WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Moved from RenderObject.h.
(WebCore::isNonRenderBlockInline): Ditto.
(WebCore::containingBlockForFixedPosition): Extracted from RenderObject::containingBlock.
(WebCore::containingBlockForAbsolutePosition): Ditto.
(WebCore::containingBlockForObjectInFlow): Ditto.

(WebCore::LogicalSelectionOffsetCaches): Added.
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo): Added.
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock): Added. m_hasFloatsOrRegions is
or'ed with itself when ContainingBlockInfo is copy constructed since m_hasFloatsOrRegions needs be true
for a block when any of its containing block ancestors have floats or regions.
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block): Added.
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache): Added.
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalLeftSelectionOffset): Added. Caches
the logical selection offset if it hasn't.
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalRightSelectionOffset): Ditto.

(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches): The first constructor is used
for a selection root. The second one is used for inheriting from another cache. In the latter case,
copy all containing block information except ones that need to be overridden by this block.
(WebCore::LogicalSelectionOffsetCaches::containingBlockInfo): Returns a ContainingBlockInfo based on
object's position value.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::selectionGapRectsForRepaint):
(WebCore::RenderBlock::paintSelection):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::inlineSelectionGaps):
(WebCore::RenderBlock::blockSelectionGaps): Exit before instantiating a new LogicalSelectionOffsetCaches
if there is no child to recurse.
(WebCore::RenderBlock::blockSelectionGap):
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::RenderBlock::logicalLeftSelectionOffset): Use LogicalSelectionOffsetCaches to get its containing
block and its logical selection offset.
(WebCore::RenderBlock::logicalRightSelectionOffset): Ditto.

* rendering/RenderBlock.h:
(WebCore::RenderBlock):

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock): Extracted code into LogicalSelectionOffsetCaches.h.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSelectionGap):

* rendering/RootInlineBox.h:
(WebCore::RootInlineBox):

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

6 years agoTurn off tiled drawing in the Web Inspector
simon.fraser@apple.com [Tue, 23 Apr 2013 23:44:41 +0000 (23:44 +0000)]
Turn off tiled drawing in the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=115064

Reviewed by Tim Horton.

We get little benefit from making the Web Inspector use tiled drawing;
it doesn't scroll the main frame, so doesn't benefit from the ScrollingCoordinator.
Not using tiled drawing also means that we won't make compositing
layers for position: -webkit-sticky, which avoids a number of issues
with compositing layer proliferation in the inspector.

Also turn off accelerated drawing, since that pref will force a single
compositing layer.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::createInspectorPageGroup):
* UIProcess/mac/WebInspectorProxyMac.mm:

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

6 years ago[Mac] forced subtitle track should change when audio track language changes
eric.carlson@apple.com [Tue, 23 Apr 2013 23:35:12 +0000 (23:35 +0000)]
[Mac] forced subtitle track should change when audio track language changes
https://bugs.webkit.org/show_bug.cgi?id=115043

Reviewed by Jer Noble.

No new tests, it isn't possible to test this automatically because there is currently no way
to enable/disable audio tracks.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup): Set m_forcedOrAutomaticSubtitleTrackLanguage.
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):  Call markCaptionAndSubtitleTracksAsUnconfigured
    after a delay if the language of the primary audio track changes.
(WebCore::HTMLMediaElement::setClosedCaptionsVisible): markCaptionAndSubtitleTracksAsUnconfigured API change.
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Take parameter to allow
    the reconfiguration to happen after a delay to avoid doing it during a callback from the
    media engine. Clear the ConfigureTextTracks bit in m_pendingActionFlags to cancel any pending
    asynch configuration.
* html/HTMLMediaElement.h:

* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Clean up logic.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Call characteristicChanged when
    the primary audio track language changes.

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

6 years agoWhen the web page transparency changes, DrawingAreaImpl needs to know about it
simon.fraser@apple.com [Tue, 23 Apr 2013 23:02:08 +0000 (23:02 +0000)]
When the web page transparency changes, DrawingAreaImpl needs to know about it
https://bugs.webkit.org/show_bug.cgi?id=115062

Reviewed by Tim Horton.

The non-composited contents layer owned by LayerTreeHostMac needs to
be marked as opaque or not depending on whether the WebPage draws
a background (or transparent background). It computed this at creation,
but did not dynamically update the state. Fix it so it does.

This fixes cases of garbage pixels in the Web Inspector toolbar area
in some configurations.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::pageBackgroundTransparencyChanged):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::pageBackgroundTransparencyChanged):

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

6 years ago[CSS Exclusions] Improve ExclusionPolygon smart pointer safety
hmuller@adobe.com [Tue, 23 Apr 2013 22:43:19 +0000 (22:43 +0000)]
[CSS Exclusions] Improve ExclusionPolygon smart pointer safety
https://bugs.webkit.org/show_bug.cgi?id=114984

Reviewed by Dirk Schulze.

Assign newly allocated objects to PassOwnPtrs as early as possible to reduce the
chances of future leaks. No new tests were added, this change adds no new functionality.

* rendering/ExclusionPolygon.cpp:
(WebCore::computeShapePaddingBounds):
(WebCore::computeShapeMarginBounds):
(WebCore::ExclusionPolygon::shapePaddingBounds):
(WebCore::ExclusionPolygon::shapeMarginBounds):
* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape):

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

6 years agoRevert "Throttle resize events during live window resize."
akling@apple.com [Tue, 23 Apr 2013 22:36:20 +0000 (22:36 +0000)]
Revert "Throttle resize events during live window resize."
<http://webkit.org/b/114292>
<rdar://problem/13411454>
<rdar://problem/13694839>

Reviewed by Geoffrey Garen.

It appears that this caused more glitches than it helped resize performance.

* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEvent):

    Turn the null-check of m_frame into an assertion since this method is
    no longer called asynchronously.

(WebCore::FrameView::willEndLiveResize):

    Ninja fix: call up to the closest superclass implementation.

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

6 years agoGlobal constructors should be configurable and not enumerable
ch.dumez@sisa.samsung.com [Tue, 23 Apr 2013 22:34:46 +0000 (22:34 +0000)]
Global constructors should be configurable and not enumerable
https://bugs.webkit.org/show_bug.cgi?id=110573

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Update JSObject::deleteProperty() so that mark to set the property
value to undefined if it is in static hashtable of properties. The
previous code was not doing anything in this case and this meant
we could not remove builtin DOMWindow properties such as
"ProgressEvent" even if marked as Deletable.

* runtime/JSObject.cpp:
(JSC::JSObject::deleteProperty):
* runtime/Lookup.h:
(JSC):
(JSC::putEntry):
(JSC::lookupPut):

Source/WebCore:

Update JSC Code generator so that global constructors now have the following
attributes:
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
instead of previously:
{ [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false }

The new behavior is according to the Web IDL specification (section 4.4):
http://dev.w3.org/cvsweb/~checkout~/2006/webapi/WebIDL/Overview.html?rev=1.617;content-type=text%2Fhtml#es-interfaces

This also matches the behavior of Firefox.

Tests: fast/js/global-constructors-attributes.html
       fast/js/global-constructors-deletable.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):

LayoutTests:

Add new tests to make sure that the global constructors have the
right attributes and to check that they are 'Deletable'.

* canvas/philip/tests/type.delete-expected.txt: Removed.
* canvas/philip/tests/type.delete.html: Removed. It was checking that global constructor
could NOT be deleted, which is no longer according to the Web IDL specification.
* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/dom/script-tests/constructed-objects-prototypes.js: Update test to hardcode a few
global constructors as they are no longer enumerable.
* fast/js/getOwnPropertyDescriptor-expected.txt:
* fast/js/global-constructors.html: Removed. It was relying on the global constructors
to be 'Enumerable', which is not to the latest Web IDL specification.
* fast/js/global-constructors-attributes-expected.txt: Added.
* fast/js/global-constructors-attributes.html: Added.
* fast/js/global-constructors-deletable-expected.txt: Added.
* fast/js/global-constructors-deletable.html: Added.
* fast/js/global-constructors-expected.txt: Removed.
* fast/js/resources/getOwnPropertyDescriptor.js:
* fast/js/script-tests/global-constructors-attributes.js: Added.
* fast/js/script-tests/global-constructors-deletable.js: Added.
* fast/js/script-tests/global-constructors.js: Removed.
* platform/efl/fast/dom/constructed-objects-prototypes-expected.txt: Removed.
* platform/efl/fast/js/global-constructors-expected.txt: Removed.
* platform/gtk/fast/dom/constructed-objects-prototypes-expected.txt: Removed.
* platform/gtk/fast/js/global-constructors-expected.txt: Removed.
* platform/mac/fast/js/global-constructors-expected.txt: Removed.
* platform/qt/fast/dom/constructed-objects-prototypes-expected.txt: Removed.
* platform/qt/fast/js/global-constructors-expected.txt: Removed.
* platform/win/fast/dom/constructed-objects-prototypes-expected.txt: Removed.
* platform/win/fast/js/global-constructors-expected.txt: Removed.

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

6 years agoUnreviewed. Remove myself from watchlist.
dgrogan@chromium.org [Tue, 23 Apr 2013 22:23:54 +0000 (22:23 +0000)]
Unreviewed. Remove myself from watchlist.

* Scripts/webkitpy/common/config/watchlist:

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

6 years agoSource/JavaScriptCore: Filled out more cases of branch folding in bytecode when emitting
ggaren@apple.com [Tue, 23 Apr 2013 22:18:18 +0000 (22:18 +0000)]
Source/JavaScriptCore: Filled out more cases of branch folding in bytecode when emitting
expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057

Reviewed by Filip Pizlo.

This covers a few cases like:

    - while (true) { }
    - while (1) { }
    - if (x) break;
    - if (x) continue;
    - if (boolean_expr == boolean_const) { }
    - if (boolean_expr == 1_or_0) { }
    - if (bitop == 1_or_0) { }

This also works, but will bring shame on your family:

    - while ("hello world") { }

No change on the benchmarks we track, but a 2.5X speedup on a microbenchmark
that uses these techniques.

* JavaScriptCore.order: Order!

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewArray):
(JSC::BytecodeGenerator::emitThrowReferenceError):
(JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::shouldEmitDebugHooks): Updated ancillary code
for interface simplifications.

* bytecompiler/NodesCodegen.cpp:
(JSC::ConstantNode::emitBytecodeInConditionContext): Constants can
jump unconditionally when used within a condition context.

(JSC::ConstantNode::emitBytecode):
(JSC::StringNode::jsValue): Gave constants a common base class so I
could implement their codegen just once.

(JSC::BinaryOpNode::emitBytecodeInConditionContext):
(JSC::canFoldToBranch):
(JSC::BinaryOpNode::tryFoldToBranch): Fold (!/=)= and (!/=)== where
appropriate. A lot of cases are not appropriate because of the surprising
type conversion semantics of ==. For example, if (number == true) { } is
not the same as if (number) { } because the former will up-convert true
to number and then do numeric comparison.

(JSC::singleStatement):
(JSC::IfElseNode::tryFoldBreakAndContinue):
(JSC::IfElseNode::emitBytecode):
(JSC::ContinueNode::trivialTarget):
(JSC::BreakNode::trivialTarget): Fold "if (expression) break" and
"if (expression) continue" into direct jumps from expression.

* parser/ASTBuilder.h:
(ASTBuilder):
(JSC::ASTBuilder::createIfStatement):
* parser/NodeConstructors.h:
(JSC::ConstantNode::ConstantNode):
(JSC):
(JSC::NullNode::NullNode):
(JSC::BooleanNode::BooleanNode):
(JSC::NumberNode::NumberNode):
(JSC::StringNode::StringNode):
(JSC::IfElseNode::IfElseNode):
* parser/Nodes.h:
(JSC::ExpressionNode::isConstant):
(JSC::ExpressionNode::isBoolean):
(JSC::StatementNode::isBreak):
(JSC::StatementNode::isContinue):
(ConstantNode):
(JSC::ConstantNode::isPure):
(JSC::ConstantNode::isConstant):
(NullNode):
(JSC::NullNode::jsValue):
(JSC::BooleanNode::value):
(JSC::BooleanNode::isBoolean):
(JSC::BooleanNode::jsValue):
(JSC::NumberNode::value):
(NumberNode):
(JSC::NumberNode::jsValue):
(StringNode):
(BinaryOpNode):
(IfElseNode):
(ContinueNode):
(JSC::ContinueNode::isContinue):
(BreakNode):
(JSC::BreakNode::isBreak):
* parser/Parser.cpp:
(JSC::::parseIfStatement):
* parser/ResultType.h:
(JSC::ResultType::definitelyIsBoolean):
(ResultType):
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::pureToBoolean):
* runtime/JSCell.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::pureToBoolean): Updated for interface changes above.

Source/WTF: Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057

Reviewed by Filip Pizlo.

Added a helper constructor for TriState so clients can make one without
branching or making assumptions about the integer values of TriStates.

* wtf/TriState.h:
(WTF::triState):
(WTF):

LayoutTests: Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057

Reviewed by Filip Pizlo.

Added a performance test for interesting branch types.

* fast/js/regress/branch-fold-expected.txt: Added.
* fast/js/regress/branch-fold.html: Added.
* fast/js/regress/script-tests/branch-fold.js: Added.

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

6 years agoDon't create compositing layers for sticky position unless using the ScrollingCoordinator
simon.fraser@apple.com [Tue, 23 Apr 2013 22:01:05 +0000 (22:01 +0000)]
Don't create compositing layers for sticky position unless using the ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=115060

Source/WebCore:

Reviewed by Tim Horton.

Creating compositing layers for sticky position elements is only useful
when we're using a ScrollingCoordinator, so don't create them if
we're not in a frame that uses a scrolling coordinator.

Tests: compositing/layer-creation/no-compositing-for-sticky.html
       platform/mac-wk2/tiled-drawing/sticky/sticky-layers.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

LayoutTests:

Reviewed by Tim Horton.

Tests that we create layers for sticky position when in tiled drawing mode,
and that we have no layers when not.

* compositing/layer-creation/no-compositing-for-sticky-expected.txt: Added.
* compositing/layer-creation/no-compositing-for-sticky.html: Added.
* platform/mac-wk2/tiled-drawing/sticky/sticky-layers-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/sticky/sticky-layers.html: Added.

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

6 years ago'length' property of DOM bindings functions returns wrong value
ch.dumez@sisa.samsung.com [Tue, 23 Apr 2013 21:59:26 +0000 (21:59 +0000)]
'length' property of DOM bindings functions returns wrong value
https://bugs.webkit.org/show_bug.cgi?id=110569

Reviewed by Geoffrey Garen.

Source/WebCore:

Make the 'length' property of Function objects and Interface
objects behave according to the latest Web IDL specification
editor draft:
http://dev.w3.org/2006/webapi/WebIDL/#es-interface-call
http://dev.w3.org/2006/webapi/WebIDL/#es-operations

As a result, only mandatory arguments are taken into account
when computing the value for the 'length' property. This
behavior is consistent with Firefox and Blink.

Tests: fast/js/constructor-length.html
       fast/js/function-length.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateConstructorHelperMethods):
Update the JSC code generator to only account for mandatory parameters
when computing the value for the 'length' property of Function objects
and constructors.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::finishCreation):
(WebCore):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::finishCreation):
(WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
(WebCore):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore):
Rebaseline bindings tests results.

* fileapi/Blob.idl:
Remove 'ConstructorParameters=2' extended attribute as the correct value
is 0, given that a Blob can be constructed without parameter.

* html/canvas/DataView.idl:
Update ConstructorParameters extended attribute value from 3 to 1 as only
one of the 3 parameters is mandatory.

* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
Remove 'ConstructorParameters=1' extended attribute from interfaces using
'ConstructorTemplate=TypedArray' as the bindings generator now properly
compute the number of constructor parameters for such interfaces.

* page/WebKitPoint.idl:
Remove 'ConstructorParameters=2' extended attribute as the correct value
should be 0, given that a WebKitPoint can be constructed without parameters.

LayoutTests:

Update fast/js/constructor-length.html test case now that only
mandatory arguments are considered for the constructor length.

Also add a new fast/js/function-length.html test to make sure
that the 'length' property of Function objects from DOM
bindings behaves according to the Web IDL specification as
this was not covered by existing tests.

* fast/files/blob-constructor-expected.txt: Rebaseline.
* fast/files/script-tests/blob-constructor.js: Update test now that Blob constructor
length is 0 instead of 2.
* fast/js/constructor-length.html:
* fast/js/function-length-expected.txt: Added.
* fast/js/function-length.html: Added.
* platform/blackberry/fast/js/constructor-length-expected.txt: Rebaseline.
* platform/efl/TestExpectations: Unskip fast/js/constructor-length.html for EFL port.
* platform/efl/fast/js/constructor-length-expected.txt: Copied from LayoutTests/platform/mac/fast/js/constructor-length-expected.txt.
* platform/gtk/fast/js/constructor-length-expected.txt: Rebaseline.
* platform/mac/fast/js/constructor-length-expected.txt: Rebaseline.
* platform/qt/fast/js/constructor-length-expected.txt: Rebaseline.

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

6 years agoNRWT: confusing warning about a line being in a Skipped file when it is really just...
commit-queue@webkit.org [Tue, 23 Apr 2013 21:58:28 +0000 (21:58 +0000)]
NRWT: confusing warning about a line being in a Skipped file when it is really just listed
in _missing_symbol_to_skipped_tests in base.py
https://bugs.webkit.org/show_bug.cgi?id=108884

Patch by Jessie Berlin <jberlin@apple.com> on 2013-04-23
Reviewed by Tim Horton.

Tools:

Remove symbol-based skipped list detection.

* Scripts/webkitpy/port/base.py:
(Port._missing_feature_to_skipped_tests):
(Port._skipped_tests_for_unsupported_features):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_path_to_test_expectations_file):

LayoutTests:

Explicitly skip the mhtml tests on the Mac and Win ports.

* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

6 years agoREGRESSION(r148922): Crash opening web archives or loading web pages
andersca@apple.com [Tue, 23 Apr 2013 21:56:59 +0000 (21:56 +0000)]
REGRESSION(r148922): Crash opening web archives or loading web pages
https://bugs.webkit.org/show_bug.cgi?id=115061
<rdar://problem/13714228>

Reviewed by Sam Weinig.

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
Calling ResourceLoader::didReceiveResponse can cause the WebResourceLoader object to go away,
so protect it here and guard against a null core loader.

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

6 years agoRemove the WebKit layer of wxWebKit
benjamin@webkit.org [Tue, 23 Apr 2013 21:35:51 +0000 (21:35 +0000)]
Remove the WebKit layer of wxWebKit
https://bugs.webkit.org/show_bug.cgi?id=115006

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-23
Reviewed by Anders Carlsson.

The wxWebKit port is no longer actively maintained by Kevin
on webkit.org. Remove the code until new maintainers resume the work.

* wx/WebBrowserShell.cpp: Removed.
* wx/WebBrowserShell.h: Removed.
* wx/WebDOMSelection.cpp: Removed.
* wx/WebDOMSelection.h: Removed.
* wx/WebEdit.cpp: Removed.
* wx/WebEdit.h: Removed.
* wx/WebFrame.cpp: Removed.
* wx/WebFrame.h: Removed.
* wx/WebFramePrivate.h: Removed.
* wx/WebKitDefines.h: Removed.
* wx/WebKitSupport/ChromeClientWx.cpp: Removed.
* wx/WebKitSupport/ChromeClientWx.h: Removed.
* wx/WebKitSupport/ContextMenuClientWx.cpp: Removed.
* wx/WebKitSupport/ContextMenuClientWx.h: Removed.
* wx/WebKitSupport/DragClientWx.cpp: Removed.
* wx/WebKitSupport/DragClientWx.h: Removed.
* wx/WebKitSupport/EditCommandWx.h: Removed.
* wx/WebKitSupport/EditorClientWx.cpp: Removed.
* wx/WebKitSupport/EditorClientWx.h: Removed.
* wx/WebKitSupport/FrameLoaderClientWx.cpp: Removed.
* wx/WebKitSupport/FrameLoaderClientWx.h: Removed.
* wx/WebKitSupport/FrameNetworkingContextWx.h: Removed.
* wx/WebKitSupport/InspectorClientWx.cpp: Removed.
* wx/WebKitSupport/InspectorClientWx.h: Removed.
* wx/WebSettings.cpp: Removed.
* wx/WebSettings.h: Removed.
* wx/WebView.cpp: Removed.
* wx/WebView.h: Removed.
* wx/WebViewPrivate.h: Removed.
* wx/bindings/python/samples/simple.py: Removed.
* wx/bindings/python/webview.i: Removed.
* wx/bindings/python/wscript: Removed.
* wx/wscript: Removed.

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

6 years agoMinor String usage fixes in WebCore/platform
benjamin@webkit.org [Tue, 23 Apr 2013 21:24:57 +0000 (21:24 +0000)]
Minor String usage fixes in WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=115021

Reviewed by Andreas Kling.

Use ASCIILiteral when possible + minor fixes.

* platform/ContentType.cpp:
(WebCore::ContentType::codecs):
* platform/ContentType.h:
(ContentType):
* platform/Decimal.cpp:
(WebCore::Decimal::toString):
* platform/KURL.cpp:
(WebCore::KURL::setProtocol):

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

6 years agoPick up color and mat values in custom shaders
krit@webkit.org [Tue, 23 Apr 2013 21:18:36 +0000 (21:18 +0000)]
Pick up color and mat values in custom shaders
https://bugs.webkit.org/show_bug.cgi?id=115046

Reviewed by Dean Jackson.

Source/WebCore:

The custom filter functions accept color values and mat2-4 functions
as parameter types. These were implemented in CSS already.
This patch picks up the values and applies them as uniforms to the
custom shader program.

Tests: css3/filters/custom/custom-filter-color.html
       css3/filters/custom/custom-filter-matN.html

* platform/graphics/filters/CustomFilterRenderer.cpp:
(WebCore::CustomFilterRenderer::bindProgramColorParameters): Set uniform for color values.
(WebCore):
(WebCore::CustomFilterRenderer::bindProgramMatrixParameters): Set uniform for mat2-4 values.
(WebCore::CustomFilterRenderer::bindProgramParameters): Call color and matrix functions.
* platform/graphics/filters/CustomFilterRenderer.h:
(WebCore):
(CustomFilterRenderer):

LayoutTests:

Test that the CSS defined color values and mat2-4 functions get
set as uniforms in shader programs.

* css3/filters/custom/custom-filter-color-expected.html: Added.
* css3/filters/custom/custom-filter-color.html: Added.
* css3/filters/custom/custom-filter-matN-expected.html: Added.
* css3/filters/custom/custom-filter-matN.html: Added.

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

6 years agoWeb process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
timothy_horton@apple.com [Tue, 23 Apr 2013 21:04:53 +0000 (21:04 +0000)]
Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
https://bugs.webkit.org/show_bug.cgi?id=115056
<rdar://problem/13719543>

Reviewed by Simon Fraser.

Stop the primary plugin detection timer if the WebPage is torn down.

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

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

6 years agoRemove redundant code in ViewportArguments::resolve
zhajiang@rim.com [Tue, 23 Apr 2013 20:58:56 +0000 (20:58 +0000)]
Remove redundant code in ViewportArguments::resolve
https://bugs.webkit.org/show_bug.cgi?id=115054

Patch by Jacky Jiang <zhajiang@blackberry.com>.
Reviewed by Kenneth Rohde Christiansen.

Remove redundant code "result.orientation = orientation;".

* dom/ViewportArguments.cpp:
(WebCore::ViewportArguments::resolve):

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

6 years agoSimplify the baseline JIT loop hint call site.
mark.lam@apple.com [Tue, 23 Apr 2013 20:54:34 +0000 (20:54 +0000)]
Simplify the baseline JIT loop hint call site.
https://bugs.webkit.org/show_bug.cgi?id=115052.

Reviewed by Geoffrey Garen.

Moved the watchdog timer check after the JIT optimization check. This
ensures that the JIT opimization counter is incremented on every loop
hint even if the watchdog timer fires.

Removed the code that allows the JIT OSR to happen if the watchdog
timer fires but does not result in a termination. It is extremely rare
that the JIT optimization counter would trigger an OSR on the same pass
as when the watchdog timer fire. If it does happen, we'll simply hold
off on servicing the watchdog timer until the next pass (because it's
not time critical).

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):

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

6 years agoTiled layers clipped inside nested transform/preserve-3d hierarchies
simon.fraser@apple.com [Tue, 23 Apr 2013 20:51:42 +0000 (20:51 +0000)]
Tiled layers clipped inside nested transform/preserve-3d hierarchies
https://bugs.webkit.org/show_bug.cgi?id=115044

Source/WebCore:

Reviewed by Dean Jackson.

The optimization added in r139479 to call move() for integral translation
transforms hit a bug in TransformState::move(). If m_accumulatedTransform is
not null, we have to apply it.

Test: compositing/visible-rect/flipped-preserve-3d.html

* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::move):

LayoutTests:

Reviewed by Dean Jackson.

Testcase that dumps visible rects for tiled layers inside nested
transformed/preserve-3d hierarchies.

* compositing/visible-rect/flipped-preserve-3d-expected.txt: Added.
* compositing/visible-rect/flipped-preserve-3d.html: Added.

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

6 years agoCtrl+Shift+Right in Windows should select the spacing after the word
csaavedra@igalia.com [Tue, 23 Apr 2013 20:39:28 +0000 (20:39 +0000)]
Ctrl+Shift+Right in Windows should select the spacing after the word
https://bugs.webkit.org/show_bug.cgi?id=110487

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: editing/deleting/smart-editing-disabled-win.html
       editing/execCommand/remove-format-multiple-elements-win.html
       editing/execCommand/toggle-link-win.html
       editing/execCommand/toggle-unlink-win.html
       editing/selection/extend-selection-enclosing-block-win.html
       editing/style/make-text-writing-direction-inline-win.html
       editing/style/push-down-font-styles-win.html
       editing/style/push-down-implicit-styles-around-list-win.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::nextWordPositionForPlatform): New method
that takes platform-specific editing behaviour in order to decide
what the next word position is, that is, for Windows, skip
spacing, for all other platforms, behave as currently.
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyMovingForward):
(WebCore::FrameSelection::modifyExtendingLeft): Use the new method
in all of the above.
* editing/FrameSelection.h: Declare the new method.

LayoutTests:

* editing/deleting/smart-editing-disabled-win-expected.txt: Added.
* editing/deleting/smart-editing-disabled-win.html: Added.
* editing/execCommand/query-command-state-expected.txt:
* editing/execCommand/remove-format-multiple-elements-win-expected.txt: Added.
* editing/execCommand/remove-format-multiple-elements-win.html: Added.
* editing/execCommand/script-tests/query-command-state.js:
(runTests): Update to reflect new editing behavior in Windows.
* editing/execCommand/script-tests/remove-format-multiple-elements-win.js: Added.
* editing/execCommand/script-tests/toggle-link-win.js: Added.
* editing/execCommand/script-tests/toggle-unlink-win.js: Added.
* editing/execCommand/toggle-link-win-expected.txt: Added.
* editing/execCommand/toggle-link-win.html: Added.
* editing/execCommand/toggle-unlink-win-expected.txt: Added.
* editing/execCommand/toggle-unlink-win.html: Added.
* editing/selection/extend-selection-enclosing-block-win-expected.txt: Added.
* editing/selection/extend-selection-enclosing-block-win.html: Added.
* editing/selection/resources/extend-selection.js:
(extendSelectionWithinBlockWin): Method to test behavior in windows.
(extendAndLogSelectionWithinBlock): Add test support for Windows.
* editing/selection/selection-extend-should-not-move-across-caret-on-mac.html:
Add test support for Windows editing behavior.
* editing/style/make-text-writing-direction-inline-win-expected.txt: Added.
* editing/style/make-text-writing-direction-inline-win.html: Added.
* editing/style/push-down-font-styles-win-expected.txt: Added.
* editing/style/push-down-font-styles-win.html: Added.
* editing/style/push-down-implicit-styles-around-list-win-expected.txt: Added.
* editing/style/push-down-implicit-styles-around-list-win.html: Added.
* editing/style/script-tests/make-text-writing-direction-inline-win.js: Added.
* editing/style/script-tests/push-down-font-styles-win.js: Added.
* editing/style/script-tests/push-down-implicit-styles-around-list-win.js: Added.

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

6 years ago[Qt] REGRESSION (r148975) shape-inside-percentage.html and shape-inside-overflow...
zoltan@webkit.org [Tue, 23 Apr 2013 20:24:44 +0000 (20:24 +0000)]
[Qt] REGRESSION (r148975) shape-inside-percentage.html and shape-inside-overflow-fixed-dimensions.html are failing after r148975
https://bugs.webkit.org/show_bug.cgi?id=115053

Unreviewed gardening.

* platform/qt/TestExpectations: Skip failing tests.

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

6 years agoAppleWin build fix.
roger_fong@apple.com [Tue, 23 Apr 2013 20:17:53 +0000 (20:17 +0000)]
AppleWin build fix.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* WTF.vcproj/WTF.vcproj:

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

6 years agoInline SelectorQuery::matches, SelectorQuery::queryAll, SelectorQuery::queryFirst
benjamin@webkit.org [Tue, 23 Apr 2013 19:59:13 +0000 (19:59 +0000)]
Inline SelectorQuery::matches, SelectorQuery::queryAll, SelectorQuery::queryFirst
https://bugs.webkit.org/show_bug.cgi?id=115012

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-23
Reviewed by Andreas Kling.

Each of these function has a single call site:
-SelectorQuery::matches from Element::webkitMatchesSelector.
-SelectorQuery::queryAll from Node::querySelectorAll.
-SelectorQuery::queryFirst from Node::querySelector.

Having a dedicated method to jump to was a little overkill.

* dom/SelectorQuery.cpp:
* dom/SelectorQuery.h:
(WebCore::SelectorQuery::matches):
(WebCore::SelectorQuery::queryAll):
(WebCore::SelectorQuery::queryFirst):

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

6 years agoRemove wxWebKit's folders from WebCore
benjamin@webkit.org [Tue, 23 Apr 2013 19:51:42 +0000 (19:51 +0000)]
Remove wxWebKit's folders from WebCore
https://bugs.webkit.org/show_bug.cgi?id=115007

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-23
Reviewed by Andreas Kling.

The wxWebKit port is no longer actively maintained by Kevin
on webkit.org. Remove the code until new maintainers resume the work.

* accessibility/wx/AccessibilityObjectWx.cpp: Removed.
* editing/wx/EditorWx.cpp: Removed.
* page/wx/DragControllerWx.cpp: Removed.
* page/wx/EventHandlerWx.cpp: Removed.
* platform/graphics/wx/ColorWx.cpp: Removed.
* platform/graphics/wx/FloatRectWx.cpp: Removed.
* platform/graphics/wx/FontCacheWx.cpp: Removed.
* platform/graphics/wx/FontCustomPlatformData.cpp: Removed.
* platform/graphics/wx/FontCustomPlatformData.h: Removed.
* platform/graphics/wx/FontPlatformData.h: Removed.
* platform/graphics/wx/FontPlatformDataWx.cpp: Removed.
* platform/graphics/wx/FontPlatformDataWxMac.mm: Removed.
* platform/graphics/wx/FontWx.cpp: Removed.
* platform/graphics/wx/GlyphMapWx.cpp: Removed.
* platform/graphics/wx/GradientWx.cpp: Removed.
* platform/graphics/wx/GraphicsContextWx.cpp: Removed.
* platform/graphics/wx/IconWx.cpp: Removed.
* platform/graphics/wx/ImageBufferDataWx.h: Removed.
* platform/graphics/wx/ImageBufferWx.cpp: Removed.
* platform/graphics/wx/ImageWx.cpp: Removed.
* platform/graphics/wx/IntPointWx.cpp: Removed.
* platform/graphics/wx/IntRectWx.cpp: Removed.
* platform/graphics/wx/IntSizeWx.cpp: Removed.
* platform/graphics/wx/PathWx.cpp: Removed.
* platform/graphics/wx/SimpleFontDataWx.cpp: Removed.
* platform/graphics/wx/TransformationMatrixWx.cpp: Removed.
* platform/image-decoders/wx/ImageDecoderWx.cpp: Removed.
* platform/wx/ClipboardWx.cpp: Removed.
* platform/wx/ClipboardWx.h: Removed.
* platform/wx/ContextMenuItemWx.cpp: Removed.
* platform/wx/ContextMenuWx.cpp: Removed.
* platform/wx/CursorWx.cpp: Removed.
* platform/wx/DragDataWx.cpp: Removed.
* platform/wx/DragImageWx.cpp: Removed.
* platform/wx/EventLoopWx.cpp: Removed.
* platform/wx/FileSystemWx.cpp: Removed.
* platform/wx/KeyEventWin.cpp: Removed.
* platform/wx/KeyboardEventWx.cpp: Removed.
* platform/wx/LanguageWx.cpp: Removed.
* platform/wx/LocalDC.h: Removed.
* platform/wx/LocalizedStringsWx.cpp: Removed.
* platform/wx/LoggingWx.cpp: Removed.
* platform/wx/MimeTypeRegistryWx.cpp: Removed.
* platform/wx/MouseEventWx.cpp: Removed.
* platform/wx/MouseWheelEventWx.cpp: Removed.
* platform/wx/PasteboardWx.cpp: Removed.
* platform/wx/PopupMenuWx.cpp: Removed.
* platform/wx/PopupMenuWx.h: Removed.
* platform/wx/RenderThemeWx.cpp: Removed.
* platform/wx/RunLoopWx.cpp: Removed.
* platform/wx/SSLKeyGeneratorWx.cpp: Removed.
* platform/wx/ScreenWx.cpp: Removed.
* platform/wx/ScrollViewWx.cpp: Removed.
* platform/wx/ScrollbarThemeWx.cpp: Removed.
* platform/wx/ScrollbarThemeWx.h: Removed.
* platform/wx/SearchPopupMenuWx.cpp: Removed.
* platform/wx/SearchPopupMenuWx.h: Removed.
* platform/wx/SharedBufferWx.cpp: Removed.
* platform/wx/SharedTimerWx.cpp: Removed.
* platform/wx/SoundWx.cpp: Removed.
* platform/wx/SystemTimeWx.cpp: Removed.
* platform/wx/TemporaryLinkStubs.cpp: Removed.
* platform/wx/TextBreakIteratorInternalICUWx.cpp: Removed.
* platform/wx/WidgetWx.cpp: Removed.
* platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Removed.
* platform/wx/wxcode/fontprops.cpp: Removed.
* platform/wx/wxcode/fontprops.h: Removed.
* platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Removed.
* platform/wx/wxcode/gtk/fontprops.cpp: Removed.
* platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Removed.
* platform/wx/wxcode/gtk/scrollbar_render.cpp: Removed.
* platform/wx/wxcode/mac/carbon/fontprops.mm: Removed.
* platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Removed.
* platform/wx/wxcode/mac/carbon/scrollbar_render.cpp: Removed.
* platform/wx/wxcode/non-kerned-drawing.h: Removed.
* platform/wx/wxcode/scrollbar_render.h: Removed.
* platform/wx/wxcode/win/fontprops.cpp: Removed.
* platform/wx/wxcode/win/non-kerned-drawing.cpp: Removed.
* platform/wx/wxcode/win/scrollbar_render.cpp: Removed.
* plugins/wx/PluginDataWx.cpp: Removed.

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

6 years agoAppleWin VS2010 build fix.
roger_fong@apple.com [Tue, 23 Apr 2013 19:44:20 +0000 (19:44 +0000)]
AppleWin VS2010 build fix.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

6 years agoRemove unused code of RefCounted after chromium removal
benjamin@webkit.org [Tue, 23 Apr 2013 19:28:42 +0000 (19:28 +0000)]
Remove unused code of RefCounted after chromium removal
https://bugs.webkit.org/show_bug.cgi?id=115009

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-23
Reviewed by Ryosuke Niwa.

* wtf/RefCounted.h:
(WTF::RefCountedBase::refCount):
(RefCountedBase):
It looks like addressOfCount() is no longer needed.
Also change the type back to unsigned as it make more sense.

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

6 years agoRemove wxWebKit support from the Tools
benjamin@webkit.org [Tue, 23 Apr 2013 19:21:25 +0000 (19:21 +0000)]
Remove wxWebKit support from the Tools
https://bugs.webkit.org/show_bug.cgi?id=115005

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-23
Reviewed by Andreas Kling.

The wxWebKit port is no longer actively maintained by Kevin
on webkit.org. Remove the code until new maintainers resume the work.

* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/config.h:
* DumpRenderTree/wscript: Removed.
* DumpRenderTree/wx/DumpRenderTreeWx.cpp: Removed.
* DumpRenderTree/wx/DumpRenderTreeWx.h: Removed.
* DumpRenderTree/wx/GCControllerWx.cpp: Removed.
* DumpRenderTree/wx/TestRunnerWx.cpp: Removed.
* DumpRenderTree/wx/WorkQueueItemWx.cpp: Removed.
* Scripts/build-dumprendertree:
* Scripts/build-jsc:
(buildMyProject):
* Scripts/build-webkit:
* Scripts/old-run-webkit-tests:
* Scripts/run-launcher:
* Scripts/webkitdirs.pm:
(argumentsForConfiguration):
(determineConfigurationProductDir):
(determinePassedArchitecture):
(builtDylibPathForName):
(determineIsQt):
(isAppleWebKit):
(launcherPath):
(launcherName):
(checkRequiredSystemConfig):
* Scripts/webkitpy/common/config/contributionareas.py:
* waf/build/build_utils.py: Removed.
* waf/build/settings.py: Removed.
* waf/build/waf_extensions.py: Removed.
* waf/build/wxpresets.py: Removed.
* wx/browser/browser.cpp: Removed.
* wx/browser/wscript: Removed.
* wx/install-unix-extras: Removed.
* wx/packaging/build-debian-installer.py: Removed.
* wx/packaging/build-mac-installer.py: Removed.
* wx/packaging/build-win-installer.py: Removed.
* wx/packaging/debian/changelog: Removed.
* wx/packaging/debian/compat: Removed.
* wx/packaging/debian/control: Removed.
* wx/packaging/debian/copyright: Removed.
* wx/packaging/debian/python-webkitwx.install: Removed.
* wx/packaging/debian/rules: Removed.
* wx/packaging/wxWebKitInstaller.iss.in: Removed.

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

6 years agoRetainPtr.h should compile with -Wshorten-64-to-32
ddkilzer@apple.com [Tue, 23 Apr 2013 19:15:35 +0000 (19:15 +0000)]
RetainPtr.h should compile with -Wshorten-64-to-32
<http://webkit.org/b/115047>

Reviewed by Anders Carlsson.

Fixes the following warning:

    RetainPtr.h:318:20: error: implicit conversion loses integer precision: 'CFHashCode' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
                return CFHash(o.get());
                ~~~~~~ ^~~~~~~~~~~~~~~

* wtf/RetainPtr.h:
(WTF::RetainPtrObjectHash::hash): Cast return value of CFHash()
to unsigned.  This has no effect on 32-bit architectures, but
takes the lower 32-bits of the CFHashCode (unsigned long) on
64-bit architectures, which is what happens implicitly now.

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

6 years ago[BlackBerry] Invalid assert in InputHandler::requestCheckingOfString()
commit-queue@webkit.org [Tue, 23 Apr 2013 19:12:31 +0000 (19:12 +0000)]
[BlackBerry] Invalid assert in InputHandler::requestCheckingOfString()
https://bugs.webkit.org/show_bug.cgi?id=114952

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-23
Reviewed by Rob Buis.

Do not assume that Batch requests are only created whe input field
is focused, the Editor can also create Batch requests when pasting
a selection.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::requestCheckingOfString):
Remove invalid assert.

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

6 years agoRemove fast/js/i18n-bindings-locale.html
commit-queue@webkit.org [Tue, 23 Apr 2013 19:09:38 +0000 (19:09 +0000)]
Remove fast/js/i18n-bindings-locale.html
https://bugs.webkit.org/show_bug.cgi?id=115024

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-23
Reviewed by Geoffrey Garen.

Remove V8-i18n-extension test(r78095) from all ports.

* fast/js/i18n-bindings-locale-expected.txt: Removed.
* fast/js/i18n-bindings-locale.html: Removed.
* fast/js/script-tests/i18n-bindings-locale.js: Removed.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years agoAppleWin build fix.
roger_fong@apple.com [Tue, 23 Apr 2013 18:57:34 +0000 (18:57 +0000)]
AppleWin build fix.

* inspector/InspectorAllInOne.cpp:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::create):
(WebCore):
* inspector/InspectorMemoryAgent.h:
(InspectorMemoryAgent):

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

6 years ago[CSS Exclusions] shape-inside overflow should be pushed to the outside of the content box
zoltan@webkit.org [Tue, 23 Apr 2013 18:23:36 +0000 (18:23 +0000)]
[CSS Exclusions] shape-inside overflow should be pushed to the outside of the content box
https://bugs.webkit.org/show_bug.cgi?id=114526

Reviewed by David Hyatt.

Source/WebCore:

The specification has changed to define shape-outside as the inverse of an exclusion. Overflowing content
should not overlap the shape, and it should be pushed outside the content box. This change affects several
tests, but only one new has been added. In this change I'm not intended to include the behavior change for
shape-inside on CSS Regions, I'm going to fix that in a follow up patch.

Tests: fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html: Modified.
       fast/exclusions/shape-inside/shape-inside-bottom-edge.html: Modified.
       fast/exclusions/shape-inside/shape-inside-empty.html: Modified.
       fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html: Added.
       fast/exclusions/shape-inside/shape-inside-overflow.html: Modified.
       fast/exclusions/shape-inside/shape-inside-percentage.html: Modified.
       fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004.html: Modified.

* rendering/ExclusionShapeInfo.h:
(WebCore::ExclusionShapeInfo::clearSegments): Shape-outside's code uses shape-inside codepaths, when that happens we need to provide a
way to reset the m_segments member.
(WebCore::ExclusionShapeInfo::shapeContainingBlockHeight): The containing block's height is stored in m_shapeLogicalHeight, I added a
function to get this value when we need it to calculate the content box's bottom position.
(ExclusionShapeInfo):
(WebCore::ExclusionShapeInfo::lineOverlapsShapeBounds):
(WebCore::ExclusionShapeInfo::lineWithinShapeBounds):  Add function to test whether a whole line is within a shape or not.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Overflowing content should start under the content box.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Since we use shape-inside codepaths for shape-outside in layoutRunsAndFloatsInRange function
and for shape-outside is not a requirement to check the line's bottom position is within the shape we might end up with some extra segments here.
In this case we should clear segments, since we don't want to apply any horizontal offsets on the overflowing content.

LayoutTests:

Update and add tests for the new behavior.

* fast/exclusions/resources/rounded-rectangle.js:
(generateString): Modify the function to not generate overflow content.
* fast/exclusions/shape-inside/shape-inside-bottom-edge-expected.html:
* fast/exclusions/shape-inside/shape-inside-bottom-edge.html:
* fast/exclusions/shape-inside/shape-inside-empty-expected.html:
* fast/exclusions/shape-inside/shape-inside-empty.html:
* fast/exclusions/shape-inside/shape-inside-overflow-expected.html:
* fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html: Added.
* fast/exclusions/shape-inside/shape-inside-overflow.html:
* fast/exclusions/shape-inside/shape-inside-percentage-expected.html:
* fast/exclusions/shape-inside/shape-inside-percentage.html:
* fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004-expected.html:
* fast/exclusions/shape-inside/shape-inside-rounded-rectangle-004.html:
* fast/regions/shape-inside/shape-inside-on-additional-regions-expected.html:
* fast/regions/shape-inside/shape-inside-on-additional-regions.html: This test is not intented to test the overflow behavior from
shape-inside on regions, so I set the shape's height to the container's height.

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

6 years agoObjective-C API: Update public header documentation
mhahnenberg@apple.com [Tue, 23 Apr 2013 18:00:33 +0000 (18:00 +0000)]
Objective-C API: Update public header documentation
https://bugs.webkit.org/show_bug.cgi?id=114841

Reviewed by Geoffrey Garen.

Added documentation for the newly added object lifetime-related stuff.

* API/JSManagedValue.h:
* API/JSVirtualMachine.h:

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

6 years agocheckLayout() should error out if no data-expected* attributes were found
robert@webkit.org [Tue, 23 Apr 2013 17:50:01 +0000 (17:50 +0000)]
checkLayout() should error out if no data-expected* attributes were found
https://bugs.webkit.org/show_bug.cgi?id=114900

Reviewed by Ojan Vafai.

If checkLayout() doesn't find any attributes checking the node's layout then error out
instead of assuming the test has passed. This will ensure data-* attributes containing
typos don't register as a pass.

* fast/check-layout-error-no-attributes-expected.txt: Added.
* fast/check-layout-error-no-attributes.html: Added.
* resources/check-layout.js:
(.):

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

6 years ago[BlackBerry] Simplify BackForwardListBlackBerry::clear
commit-queue@webkit.org [Tue, 23 Apr 2013 17:08:57 +0000 (17:08 +0000)]
[BlackBerry] Simplify BackForwardListBlackBerry::clear
https://bugs.webkit.org/show_bug.cgi?id=115029

Patch by Xan Lopez <xlopez@igalia.com> on 2013-04-23
Reviewed by Carlos Garcia Campos.

Simplify the implementation of the clear method. Instead of asking
the WebCore implementation to search each item and delete it, set
the capacity of the list to zero directly, which will do the same
thing but more efficiently.

No change in behavior, no new tests.

* WebCoreSupport/BackForwardListBlackBerry.cpp:
(WebCore::BackForwardListBlackBerry::clear):

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

6 years ago[Qt] Fix test_build_check for Qt on Mac after r148075.
zeno.albisser@digia.com [Tue, 23 Apr 2013 16:20:02 +0000 (16:20 +0000)]
[Qt] Fix test_build_check for Qt on Mac after r148075.
https://bugs.webkit.org/show_bug.cgi?id=115038

Reviewed by Csaba Osztrogon√°c.

* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_build_check):
    run-webkit-tests is supposed to fail, if it is run on a different
    platform than specified on the command line.
    However, Qt allows exactly this for Qt-platforms to allow comparing
    of test results of different baselines.
    Before r148075 "chromium-linux-x86" was used for testing.
    This patch changes the port_name to gtk when running the test on mac.

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

6 years agoAvoid computing style twice when element has no existing style
antti@apple.com [Tue, 23 Apr 2013 16:13:17 +0000 (16:13 +0000)]
Avoid computing style twice when element has no existing style
https://bugs.webkit.org/show_bug.cgi?id=115042

Reviewed by Andreas Kling.

We currently compute element style twice if we end up having to reattach, first in recalcStyle and then
again during attach(). We can easily avoid this in common case where the element has no existing style
(usually because it is display:none).

* dom/Element.cpp:
(WebCore::Element::recalcStyle):

    Don't compute the style and diff if there is no existing style. There is nothing to diff against.
    Instead just call reattach() directly, we ended up doing that anyway with the existing code.

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

6 years ago[BlackBerry] Do not access BackForwardListImpl from DRT
commit-queue@webkit.org [Tue, 23 Apr 2013 16:03:46 +0000 (16:03 +0000)]
[BlackBerry] Do not access BackForwardListImpl from DRT
https://bugs.webkit.org/show_bug.cgi?id=115041

Patch by Xan Lopez <xlopez@igalia.com> on 2013-04-23
Reviewed by Carlos Garcia Campos.

Source/WebKit/blackberry:

Export the necessary functionality in our BackForwardList port
client in order for DRT to work.

* WebCoreSupport/BackForwardListBlackBerry.cpp:
(WebCore::BackForwardListBlackBerry::backListWithLimit):
(WebCore):
(WebCore::BackForwardListBlackBerry::forwardListWithLimit):
(WebCore::BackForwardListBlackBerry::capacity):
* WebCoreSupport/BackForwardListBlackBerry.h:
(BackForwardListBlackBerry):

Tools:

Use the right class to access the bflist functionality.

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::dumpBackForwardListForWebView):

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

6 years agoWebSocket: Return type of send() should be void if hybi-10 protocol is chosen
commit-queue@webkit.org [Tue, 23 Apr 2013 15:53:15 +0000 (15:53 +0000)]
WebSocket: Return type of send() should be void if hybi-10 protocol is chosen
https://bugs.webkit.org/show_bug.cgi?id=65850

Patch by Lamarque V. Souza <Lamarque.Souza@basyskom.com> on 2013-04-23
Reviewed by Alexey Proskuryakov.

Source/WebCore:

WebSocket API draft changed the return type of send() from boolean to void based on Simon
Pieters' post to WHATWG. Firefox 8 and IE 10 already follow the specification, hence it should
make sense for us to do the same when hybi protocol is used.

Original patch by Yuta Kitamura  <yutak@chromium.org>

Tests: http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated)
       http/tests/websocket/tests/hybi/send-after-close-on-unload.html (updated)

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocket.idl:

LayoutTests:

Update tests and test results because WebSocket.send() now returns undefined when
the hybi WebSocket protocol is used.

* http/tests/websocket/tests/hybi/bufferedAmount-after-close-expected.txt:
* http/tests/websocket/tests/hybi/bufferedAmount-after-close-in-busy-expected.txt:
* http/tests/websocket/tests/hybi/bufferedAmount-after-close-in-busy.html:
* http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:
* http/tests/websocket/tests/hybi/send-after-close-on-unload-expected.txt:
* http/tests/websocket/tests/hybi/send-after-close-on-unload.html:

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

6 years agoScrollbarThemeComposite depends on Page/FrameView/ChromeClient
carlosgc@webkit.org [Tue, 23 Apr 2013 15:11:25 +0000 (15:11 +0000)]
ScrollbarThemeComposite depends on Page/FrameView/ChromeClient
https://bugs.webkit.org/show_bug.cgi?id=21361

Reviewed by Andreas Kling.

Remove unused header includes.

* platform/ScrollbarThemeComposite.cpp:

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

6 years ago[GTK] Add webkit_uri_request_get_http_headers to WebKit2 GTK+ API
carlosgc@webkit.org [Tue, 23 Apr 2013 15:08:22 +0000 (15:08 +0000)]
[GTK] Add webkit_uri_request_get_http_headers to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=112160

Reviewed by Andreas Kling.

Source/WebCore:

* platform/network/soup/GOwnPtrSoup.cpp:
(WTF::SoupMessageHeaders): Add freeOwnedGPtr implementation for
SoupMessageHeaders.
(WTF):
* platform/network/soup/GOwnPtrSoup.h:
(WTF):
* platform/network/soup/ResourceRequest.h:
(ResourceRequest):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageHeaders): New function
to update the given SoupMessageHeaders with the ResourceRequest
headers.
(WebCore::ResourceRequest::updateFromSoupMessageHeaders): New
function to update the ResourceRequest headers with the given
SoupMessageHeaders.
(WebCore::ResourceRequest::updateSoupMessage): Use
updateSoupMessageHeaders() to update the headers.
(WebCore::ResourceRequest::toSoupMessage): Ditto.
(WebCore::ResourceRequest::updateFromSoupMessage): Use
updateFromSoupMessageHeaders to update the headers.

Source/WebKit2:

It allows to load requests with custom headers, or to update the
headers of a request before being sent to the server in the
WebKitWebPage::send-request callback.

* UIProcess/API/gtk/WebKitURIRequest.cpp:
(_WebKitURIRequestPrivate): Add SoupMessageHeaders.
(webkit_uri_request_get_http_headers): Return the HTTP headers of
the request as a SoupMessageHeaders if the request is HTTP. A new
SoupMessageHeaders is created on demand using the existing headers
of the request.
(webkitURIRequestGetResourceRequest): Instead of returning a const
reference of the internal ResourceRequest, set a request passed as
a reference and update its HTTP headers using the
SoupMessageHeaders if present.
* UIProcess/API/gtk/WebKitURIRequest.h:
* UIProcess/API/gtk/WebKitURIRequestPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_request): Update to the new
webkitURIRequestGetResourceRequest API.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
webkit_uri_request_get_http_headers symbol.
* UIProcess/API/gtk/tests/TestLoaderClient.cpp:
(testWebPageURI):
(testURIRequestHTTPHeaders):
(serverCallback):
(beforeAll):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(willSendRequestForFrame): Update to the new
webkitURIRequestGetResourceRequest API.

Tools:

* MiniBrowser/gtk/GNUmakefile.am: Add missing libsoup flags to
CPPFLAGS.

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

6 years agoClear StyleResolver state before returning from styleForElement().
akling@apple.com [Tue, 23 Apr 2013 14:55:17 +0000 (14:55 +0000)]
Clear StyleResolver state before returning from styleForElement().
<http://webkit.org/b/115035>

Reviewed by Antti Koivisto.

From Blink r148687 by <inferno@chromium.org>.

Source/WebCore:

A cached element pointer in the resolver state was causing confusion because
in some cases a subsequent call to styleForElement() would use a pointer to
a different object that is at the same memory address as the previous one.

Test: fast/css/reload-non-styled-element-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):

LayoutTests:

* fast/css/reload-non-styled-element-crash-expected.txt: Added.
* fast/css/reload-non-styled-element-crash.html: Added.

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

6 years agoXSSAuditor performance regression due to threaded parser changes.
akling@apple.com [Tue, 23 Apr 2013 14:54:29 +0000 (14:54 +0000)]
XSSAuditor performance regression due to threaded parser changes.
<http://webkit.org/b/115037>
<rdar://problem/13716069>

Reviewed by Anders Carlsson.

From Blink r148792 by <abarth@chromium.org>:

The refactoring we did for the threaded parser introduced a performance
regression in innerHTML because we'd boot up the XSSAuditor for fragment
parsing. This CL returns to our earlier behavior of not booting up the
XSSAuditor when parsing fragments.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::initForFragment):
* html/parser/XSSAuditor.h:
(XSSAuditor):

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

6 years ago[WK2] Make EFL WKView API shareable between ports
mikhail.pozdnyakov@intel.com [Tue, 23 Apr 2013 14:45:52 +0000 (14:45 +0000)]
[WK2] Make EFL WKView API shareable between ports
https://bugs.webkit.org/show_bug.cgi?id=114734

Reviewed by Anders Carlsson.

Source/WebKit2:

EFL-independent part of WKView API (and its implementation) is now
shareable between ports that use Coordinated Graphics and put to
CoordinatedGraphics folders.

* PlatformEfl.cmake:
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp: Renamed from Source/WebKit2/UIProcess/API/C/efl/WKView.cpp.
(WKViewCreate):
(WKViewInitialize):
(WKViewGetSize):
(WKViewSetSize):
(WKViewSetViewClient):
(WKViewIsFocused):
(WKViewSetIsFocused):
(WKViewIsVisible):
(WKViewSetIsVisible):
(WKViewGetContentScaleFactor):
(WKViewSetContentScaleFactor):
(WKViewGetContentPosition):
(WKViewSetContentPosition):
(WKViewSetUserViewportTranslation):
(WKViewUserViewportToContents):
(WKViewPaintToCurrentGLContext):
(WKViewGetPage):
(WKViewSetDrawsBackground):
(WKViewGetDrawsBackground):
(WKViewSetDrawsTransparentBackground):
(WKViewGetDrawsTransparentBackground):
(WKViewSetThemePath):
(WKViewSuspendActiveDOMObjectsAndAnimations):
(WKViewResumeActiveDOMObjectsAndAnimations):
(WKViewSetShowsAsSource):
(WKViewGetShowsAsSource):
(WKViewExitFullScreen):
* UIProcess/API/C/CoordinatedGraphics/WKView.h: Renamed from Source/WebKit2/UIProcess/API/C/efl/WKView.h.
* UIProcess/API/C/efl/WKViewEfl.cpp: Added.
(WKViewPaintToCairoSurface):
(WKViewCreateSnapshot):
* UIProcess/API/C/efl/WKViewEfl.h: Added.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
* UIProcess/CoordinatedGraphics/WebView.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebView.cpp.
(WebKit):
(WebKit::WebView::WebView):
(WebKit::WebView::~WebView):
(WebKit::WebView::initialize):
(WebKit::WebView::setSize):
(WebKit::WebView::setFocused):
(WebKit::WebView::setVisible):
(WebKit::WebView::setUserViewportTranslation):
(WebKit::WebView::userViewportToContents):
(WebKit::WebView::paintToCurrentGLContext):
(WebKit::WebView::setThemePath):
(WebKit::WebView::setDrawsBackground):
(WebKit::WebView::drawsBackground):
(WebKit::WebView::setDrawsTransparentBackground):
(WebKit::WebView::drawsTransparentBackground):
(WebKit::WebView::suspendActiveDOMObjectsAndAnimations):
(WebKit::WebView::resumeActiveDOMObjectsAndAnimations):
(WebKit::WebView::setShowsAsSource):
(WebKit::WebView::showsAsSource):
(WebKit::WebView::exitFullScreen):
(WebKit::WebView::initializeClient):
(WebKit::WebView::didChangeContentsSize):
(WebKit::WebView::transformFromScene):
(WebKit::WebView::transformToScene):
(WebKit::WebView::coordinatedGraphicsScene):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::dipSize):
(WebKit::WebView::createDrawingAreaProxy):
(WebKit::WebView::setViewNeedsDisplay):
(WebKit::WebView::displayView):
(WebKit::WebView::scrollView):
(WebKit::WebView::viewSize):
(WebKit::WebView::isViewWindowActive):
(WebKit::WebView::isViewFocused):
(WebKit::WebView::isViewVisible):
(WebKit::WebView::isViewInWindow):
(WebKit::WebView::processDidCrash):
(WebKit::WebView::didRelaunchProcess):
(WebKit::WebView::pageClosed):
(WebKit::WebView::toolTipChanged):
(WebKit::WebView::setCursor):
(WebKit::WebView::setCursorHiddenUntilMouseMoves):
(WebKit::WebView::registerEditCommand):
(WebKit::WebView::clearAllEditCommands):
(WebKit::WebView::canUndoRedo):
(WebKit::WebView::executeUndoRedo):
(WebKit::WebView::screenToWindow):
(WebKit::WebView::windowToScreen):
(WebKit::WebView::doneWithKeyEvent):
(WebKit::WebView::doneWithTouchEvent):
(WebKit::WebView::createPopupMenuProxy):
(WebKit::WebView::createContextMenuProxy):
(WebKit::WebView::createColorChooserProxy):
(WebKit::WebView::setFindIndicator):
(WebKit::WebView::enterAcceleratedCompositingMode):
(WebKit::WebView::exitAcceleratedCompositingMode):
(WebKit::WebView::updateAcceleratedCompositingMode):
(WebKit::WebView::didCommitLoadForMainFrame):
(WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
(WebKit::WebView::customRepresentationZoomFactor):
(WebKit::WebView::setCustomRepresentationZoomFactor):
(WebKit::WebView::flashBackingStoreUpdates):
(WebKit::WebView::findStringInCustomRepresentation):
(WebKit::WebView::countStringMatchesInCustomRepresentation):
(WebKit::WebView::updateTextInputState):
(WebKit::WebView::handleDownloadRequest):
(WebKit::WebView::convertToDeviceSpace):
(WebKit::WebView::convertToUserSpace):
(WebKit::WebView::didChangeViewportProperties):
(WebKit::WebView::pageDidRequestScroll):
(WebKit::WebView::didRenderFrame):
(WebKit::WebView::pageTransitionViewportReady):
* UIProcess/CoordinatedGraphics/WebView.h: Renamed from Source/WebKit2/UIProcess/efl/WebView.h.
(WebCore):
(WebKit):
(WebView):
(WebKit::WebView::size):
(WebKit::WebView::isFocused):
(WebKit::WebView::isVisible):
(WebKit::WebView::setContentScaleFactor):
(WebKit::WebView::contentScaleFactor):
(WebKit::WebView::setContentPosition):
(WebKit::WebView::contentPosition):
(WebKit::WebView::pageRef):
(WebKit::WebView::page):
* UIProcess/CoordinatedGraphics/WebViewClient.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebViewClient.cpp.
(WebKit):
(WebKit::WebViewClient::viewNeedsDisplay):
(WebKit::WebViewClient::didChangeContentsSize):
(WebKit::WebViewClient::webProcessCrashed):
(WebKit::WebViewClient::webProcessDidRelaunch):
(WebKit::WebViewClient::didChangeContentsPosition):
(WebKit::WebViewClient::didRenderFrame):
(WebKit::WebViewClient::didCompletePageTransition):
(WebKit::WebViewClient::didChangeViewportAttributes):
(WebKit::WebViewClient::didChangeTooltip):
* UIProcess/CoordinatedGraphics/WebViewClient.h: Renamed from Source/WebKit2/UIProcess/efl/WebViewClient.h.
(WebCore):
(WebKit):
* UIProcess/efl/WebViewEfl.cpp: Added.
(WebKit):
(WebKit::WebView::create):
(WebKit::WebViewEfl::WebViewEfl):
(WebKit::WebViewEfl::setEwkView):
(WebKit::WebViewEfl::paintToCairoSurface):
(WebKit::WebViewEfl::createPopupMenuProxy):
(WebKit::WebViewEfl::createContextMenuProxy):
(WebKit::WebViewEfl::setCursor):
(WebKit::WebViewEfl::updateTextInputState):
(WebKit::WebViewEfl::handleDownloadRequest):
* UIProcess/efl/WebViewEfl.h: Added.
(WebKit):
(WebViewEfl):
(WebKit::WebViewEfl::ewkView):

Tools:

* TestWebKitAPI/PlatformEfl.cmake:
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:

    Updated project files accordingly to updated WKView API files
    structure.

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

6 years agoAdd Benjamin Poulain's @apple.com address to his entry. Unreviewed.
akling@apple.com [Tue, 23 Apr 2013 14:23:36 +0000 (14:23 +0000)]
Add Benjamin Poulain's @apple.com address to his entry. Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years agoSpeed up ElementData::getAttributeItem(), which is hot.
akling@apple.com [Tue, 23 Apr 2013 14:21:05 +0000 (14:21 +0000)]
Speed up ElementData::getAttributeItem(), which is hot.
<http://webkit.org/b/115031>

Reviewed by Antti Koivisto.

From Blink r148622 by <cevans@chromium.org>.

The previous version had a couple of issues:
- Incurred new WTF::Vector::operator[] checks.
- Had a branch in _every_ loop iteration that checked whether the storage was Vector or array[] backed.

Both these issues are fixed, and CloneNodes.html seems reliably at +2%.
I also believe GetElement.html is maybe +1%.

For WebKit, also applied the same optimization to getAttributeItemIndex().

* dom/Element.h:
(WebCore::ElementData::attributeBase):
(WebCore::ElementData::getAttributeItemIndex):
(WebCore::ElementData::getAttributeItem):
(WebCore::ElementData::attributeItem):

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

6 years agoBaselines for fast/css/image-rendering.html
allan.jensen@digia.com [Tue, 23 Apr 2013 12:07:57 +0000 (12:07 +0000)]
Baselines for fast/css/image-rendering.html

Unreviewed gardening.

* fast/css/image-rendering-expected.png: Added.
* fast/css/image-rendering-expected.txt: Added.
* platform/gtk-wk1/fast/css/image-rendering-expected.txt: Added.

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

6 years ago[BlackBerry] Need to send out change event for date/color picker
charles.wei@torchmobile.com.cn [Tue, 23 Apr 2013 11:58:19 +0000 (11:58 +0000)]
[BlackBerry] Need to send out change event for date/color picker
https://bugs.webkit.org/show_bug.cgi?id=114942

Reviewed by Carlos Garcia Campos.

We need to instruct the FormControlElements to send out 'change' event
when the user makes the selection and closes the PagePopup for date/color.

* WebCoreSupport/ColorPickerClient.cpp:
(WebCore::ColorPickerClient::setValueAndClosePopup):
* WebCoreSupport/DatePickerClient.cpp:
(WebCore::DatePickerClient::setValueAndClosePopup):

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

6 years agoRemove the text expecation again to force the bots to fail and generate png expectations.
allan.jensen@digia.com [Tue, 23 Apr 2013 10:29:38 +0000 (10:29 +0000)]
Remove the text expecation again to force the bots to fail and generate png expectations.

Unreviewed ungardening.

* fast/css/image-rendering-expected.txt: Removed.

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

6 years agoUnreviewed GTK gardening. Rebaselining after r148944.
zandobersek@gmail.com [Tue, 23 Apr 2013 10:00:21 +0000 (10:00 +0000)]
Unreviewed GTK gardening. Rebaselining after r148944.

* platform/gtk/TestExpectations:
* platform/gtk/fast/table/giantRowspan-expected.txt:
* platform/gtk/fast/table/giantRowspan2-expected.png:
* platform/gtk/fast/table/giantRowspan2-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug133756-1-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug133756-2-expected.png:
* platform/gtk/tables/mozilla/bugs/bug133756-2-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug220536-expected.png:
* platform/gtk/tables/mozilla/bugs/bug220536-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug8858-expected.txt:
* platform/gtk/tables/mozilla/core/bloomberg-expected.png:
* platform/gtk/tables/mozilla/core/bloomberg-expected.txt:
* platform/gtk/tables/mozilla/core/row_span-expected.png:
* platform/gtk/tables/mozilla/core/row_span-expected.txt:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug131020-3-expected.txt:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug23847-expected.png:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug23847-expected.txt:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug65372-expected.png:
* platform/gtk/tables/mozilla_expected_failures/bugs/bug65372-expected.txt:

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

6 years agoInitial advance of text runs should be taken into account
graouts@apple.com [Tue, 23 Apr 2013 09:50:15 +0000 (09:50 +0000)]
Initial advance of text runs should be taken into account
https://bugs.webkit.org/show_bug.cgi?id=114949

Reviewed by Darin Adler.

Source/WebCore:

Keep track of complex text runs' initial advance by adding a new
member to GlyphBuffer and adding the initial advance of any non-first
text run to the advance of the last glyph added for the previous text run.
Additionally, we now correctly handle advance values in the y-axis.

Test: fast/text/complex-initial-advance.html

* WebCore.exp.in:
Add support for new WebKitSystemInterface API.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::drawGlyphBuffer):
Take into account the buffer's initial advance in the y-axis to adjust
the point at which to draw the buffers. Additionally, keep track of advances
on the y-axis as well as the x-axis (which we already were doing) as we iterate
through glyphs and adjust the start point.
(WebCore::Font::drawEmphasisMarks):
Adopt change of GlyphBuffer::advanceAt() return type.
* platform/graphics/GlyphBuffer.h:
Removing the WINCE-specific GlyphBufferAdvance struct since heights are now necessary.
(WebCore::GlyphBufferAdvance::GlyphBufferAdvance):
New default constructor for GlyphBufferAdvance to support the m_initialAdvance member.
(WebCore::GlyphBuffer::setInitialAdvance):
(WebCore::GlyphBuffer::initialAdvance):
New APIs to get and set the initial advance for a glyph buffer.
(WebCore::GlyphBuffer::advanceAt):
Return a GlyphBufferAdvance rather than a float which used to be only
the glyph buffer's x-axis advance. This is necessary to handle deltas
on the y-axis as well (see WebCore::Font::drawGlyphBuffer).
* platform/graphics/GlyphBuffer.h:
(GlyphBuffer):
(WebCore::GlyphBuffer::setInitialAdvance):
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::advanceOneCharacter):
Adopt change of GlyphBuffer::advanceAt() return type.
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::Font::drawGlyphs):
Adopt change of GlyphBuffer::advanceAt() return type.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::advance):
When processing the first text run, set that run's initial advance as
the glyph buffer's initial advance.
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
Represent the initial advance for a text run by adjusting the advance
of the last glyph of the previous text run in the glyph buffer.
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::initialAdvance):
(ComplexTextRun):
New API to read the inital advance of a complex text run.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
Obtain the text run's initial advance via the new wkCTRunGetInitialAdvance
WebKitSystemInterface API.
* platform/graphics/qt/FontQt.cpp:
(WebCore::Font::drawGlyphs):
Adopt change of GlyphBuffer::advanceAt() return type.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Add support for the new wkCTRunGetInitialAdvance WebKitSystemInterface API.
* platform/wx/wxcode/cairo/non-kerned-drawing.cpp:
(WebCore::drawTextWithSpacing):
Adopt change of GlyphBuffer::advanceAt() return type.
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
Adopt change of GlyphBuffer::advanceAt() return type.

Source/WebKit/mac:

Adding support for new method CTRunGetInitialAdvance in WebKitSystemInterface.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

Adding support for new method CTRunGetInitialAdvance in WebKitSystemInterface.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

LayoutTests:

* fast/text/complex-initial-advance-expected.html: Added.
* fast/text/complex-initial-advance.html: Added.

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

6 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Tue, 23 Apr 2013 09:42:15 +0000 (09:42 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding failure expectations for two DOM4 constructors tests
that started failing after enabling the subpixel layout due to LayoutUnit overflows.

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

6 years ago[EFL] EFL gardening
commit-queue@webkit.org [Tue, 23 Apr 2013 09:05:09 +0000 (09:05 +0000)]
[EFL] EFL gardening
https://bugs.webkit.org/show_bug.cgi?id=115013

Remove editing/selection/doubleclick-whitespace-crash.html and
editing/selection/doubleclick-whitespace-img-crash.html from TestExpectations
after r144221.

Unreviewed, EFL gardening.

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2013-04-23

* platform/efl-wk2/TestExpectations:

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

6 years ago[Texmap] Don't paint to an intermediate surface when the result is going to be clippe...
commit-queue@webkit.org [Tue, 23 Apr 2013 09:02:03 +0000 (09:02 +0000)]
[Texmap] Don't paint to an intermediate surface when the result is going to be clipped out completely.
https://bugs.webkit.org/show_bug.cgi?id=115015

Patch by Noam Rosenthal <noam@webkit.org> on 2013-04-23
Reviewed by Allan Sandfeld Jensen.

Maintain a clipBounds rectangle in TextureMapper, and test it against the bounds of an intermediate
surface before it is painted.
This allows us to opt out completely of painting into the surface if the result is going to be optimized
out by the GPU clipping.

Covered by tests in compositing/overlap-blending.

* platform/graphics/texmap/TextureMapper.h:
(TextureMapper):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::clipBounds):
(WebCore):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperImageBuffer.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):

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

6 years ago[Coordinated Graphics] Remove the lockAnimations code path
commit-queue@webkit.org [Tue, 23 Apr 2013 08:58:25 +0000 (08:58 +0000)]
[Coordinated Graphics] Remove the lockAnimations code path
https://bugs.webkit.org/show_bug.cgi?id=114899

Source/WebCore:

Patch by Noam Rosenthal <noam@webkit.org> on 2013-04-23
Reviewed by Benjamin Poulain.

Remove locking/unlocking animations and checks for the lock state.
The animation locking has been tested to create not-so-smooth animations,
while the use case where the composited animations run out of sync from
the non-composited animations is very rare and unnoticeable.

No new tests, removing functionality that wasn't tested in the first place.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(CoordinatedGraphicsScene):

Source/WebKit2:

Remove locking/unlocking animations and checks for the lock state.
The animation locking has been tested to create not-so-smooth animations,
while the use case where the composited animations run out of sync from
the non-composited animations is very rare and unnoticeable.

Patch by Noam Rosenthal <noam@webkit.org> on 2013-04-23
Reviewed by Benjamin Poulain.

* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
(WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

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

6 years ago[Qt][WK1] MemoryCache is not cleaned by default
allan.jensen@digia.com [Tue, 23 Apr 2013 08:33:23 +0000 (08:33 +0000)]
[Qt][WK1] MemoryCache is not cleaned by default
https://bugs.webkit.org/show_bug.cgi?id=111443

Reviewed by Jocelyn Turcotte.

Enable deletion of dead resources in the memory cache as long as the MemoryCache is enabled.

This can be disabled or tuned using the dynamic property  "_q_deadDecodedDataDeletionInterval".
The default is set to match that of most other ports and WK2 with cache in WebBrowsing mode.

* Api/qwebsettings.cpp:
(QWebSettings::setObjectCacheCapacities):
* WebCoreSupport/InitWebCoreQt.cpp:
(WebCore::initializeWebCoreQt):

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

6 years ago[Qt] Unreviewed gardening. Changing failure mark to skip after r148948.
zarvai@inf.u-szeged.hu [Tue, 23 Apr 2013 08:31:25 +0000 (08:31 +0000)]
[Qt] Unreviewed gardening. Changing failure mark to skip after r148948.

* platform/qt/TestExpectations:

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

6 years agoRespect image-rendering setting for determing image-rendering quality
allan.jensen@digia.com [Tue, 23 Apr 2013 08:17:05 +0000 (08:17 +0000)]
Respect image-rendering setting for determing image-rendering quality
https://bugs.webkit.org/show_bug.cgi?id=113405

Reviewed by Benjamin Poulain.

Source/WebCore:

Remove the CSS4 values as they are not ready for implementation yet.
We still parse the -webkit-crisp-edges and SVG compatibility values to
be closer to the the partial support in Gecko and Presto.

Tests: fast/css/image-rendering-canvas.html
       fast/css/image-rendering-parsing.html
       fast/css/image-rendering.html
       fast/css/optimize-contrast-image.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSValueKeywords.in:
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyleConstants.h:

Tools:

Remove CSS4 Images option. It is not ready for implementation.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Moved the two tests of image-rendering out of CSS3 since it was removed from the final recommendation.
Added tests of the supported values, and upgraded one test to a reference test so that it now tests
that -webkit-optimize-contrast gets converted to and treated as -webkit-crisp-edges.

Baselines for fast/css/image-rendering.html will be uploaded later when the bots have generated them.

* css3/images/optimize-contrast-image-expected.png: Removed.
* css3/images/optimize-contrast-image-expected.txt: Removed.
* fast/css/image-rendering-canvas-expected.png: Renamed from LayoutTests/css3/images/optimize-contrast-canvas-expected.png.
* fast/css/image-rendering-canvas-expected.txt: Renamed from LayoutTests/css3/images/optimize-contrast-canvas-expected.txt.
* fast/css/image-rendering-canvas.html: Renamed from LayoutTests/css3/images/optimize-contrast-canvas.html.
* fast/css/image-rendering-expected.txt: Added.
* fast/css/image-rendering-parsing-expected.txt: Added.
* fast/css/image-rendering-parsing.html: Renamed from LayoutTests/fast/css/image-set-parsing.html.
* fast/css/image-rendering.html: Added.
* fast/css/optimize-contrast-image-expected.html: Added.
* fast/css/optimize-contrast-image.html: Renamed from LayoutTests/css3/images/optimize-contrast-image.html.
* fast/css/script-tests/image-rendering-parsing.js: Added.
(testImageRendering):

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

6 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Tue, 23 Apr 2013 08:07:37 +0000 (08:07 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations:

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

6 years agoUnreviewed, rolling out r148923.
rniwa@webkit.org [Tue, 23 Apr 2013 07:48:49 +0000 (07:48 +0000)]
Unreviewed, rolling out r148923.
http://trac.webkit.org/changeset/148923
https://bugs.webkit.org/show_bug.cgi?id=115020

The patch causes multiple failures in CSS, canvas tests
(Requested by zdobersek on #webkit).

Source/WebCore:

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):

LayoutTests:

* fast/canvas/script-tests/shadow-image.js: Removed.
* fast/canvas/shadow-image-expected.txt: Removed.
* fast/canvas/shadow-image.html: Removed.

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

6 years agoUnreviewed EFL gardening.
ch.dumez@sisa.samsung.com [Tue, 23 Apr 2013 07:01:20 +0000 (07:01 +0000)]
Unreviewed EFL gardening.

Unskip several test cases that are no longer crashing after r148945.

* platform/efl/TestExpectations:

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

6 years ago[EFL] Assertion Failures in Coordinated Graphics after r148433
commit-queue@webkit.org [Tue, 23 Apr 2013 06:51:11 +0000 (06:51 +0000)]
[EFL] Assertion Failures in Coordinated Graphics after r148433
https://bugs.webkit.org/show_bug.cgi?id=114731

Patch by Noam Rosenthal <noam@webkit.org> on 2013-04-22
Reviewed by Gyuyoung Kim.

The assert is incorrect. In some cases in coordinated graphics we may have a backing store
and drawsContent would be set to false.

No new tests.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):

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

6 years agotable's text aligned on top instead of center because of rowspan
commit-queue@webkit.org [Tue, 23 Apr 2013 06:36:45 +0000 (06:36 +0000)]
table's text aligned on top instead of center because of rowspan
https://bugs.webkit.org/show_bug.cgi?id=18092

Patch by Suchit Agrawal <a.suchit@samsung.com> on 2013-04-22
Reviewed by Beth Dakin.

Source/WebCore:

Last row in the rowspan is not getting the height of rowspan cell because there is not
enough rows present below rowspan cell and we are strictly applying height of rowspan
to the row which should lay last in the rowspan based of rowspan value.

When row contains rowspan cell and it is last row of the table then
rowspan height is adding to last row of the table.

Test: fast/table/Rowspan-value-more-than-number-of-rows-present.html

It calculates logical height of the rows in the table.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):

LayoutTests:

Added test cases, based on rowspan issue.
* fast/table/Rowspan-value-more-than-number-of-rows-present-expected.txt: Added.
* fast/table/Rowspan-value-more-than-number-of-rows-present.html: Added.

Test cases need to do rebaseline in efl, gtk and mac platforms.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

Test case results are updated in qt platform.
* platform/qt/fast/table/giantRowspan-expected.png:
* platform/qt/fast/table/giantRowspan-expected.txt:
* platform/qt/fast/table/giantRowspan2-expected.png:
* platform/qt/fast/table/giantRowspan2-expected.txt:
* platform/qt/tables/mozilla/bugs/bug133756-1-expected.png:
* platform/qt/tables/mozilla/bugs/bug133756-1-expected.txt:
* platform/qt/tables/mozilla/bugs/bug133756-2-expected.png:
* platform/qt/tables/mozilla/bugs/bug133756-2-expected.txt:
* platform/qt/tables/mozilla/bugs/bug220536-expected.png:
* platform/qt/tables/mozilla/bugs/bug220536-expected.txt:
* platform/qt/tables/mozilla/bugs/bug8858-expected.txt:
* platform/qt/tables/mozilla/core/bloomberg-expected.png:
* platform/qt/tables/mozilla/core/bloomberg-expected.txt:
* platform/qt/tables/mozilla/core/row_span-expected.png:
* platform/qt/tables/mozilla/core/row_span-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug131020-3-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug23847-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug65372-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug65372-expected.txt:
* tables/mozilla/core/bloomberg-expected.txt:
* tables/mozilla/core/row_span-expected.txt:
* tables/mozilla_expected_failures/bugs/bug131020-3-expected.txt:
* tables/mozilla_expected_failures/bugs/bug23847-expected.txt:

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

6 years ago[CSS Regions] Region's float parent doesn't size according to region size but to...
mihnea@adobe.com [Tue, 23 Apr 2013 04:52:56 +0000 (04:52 +0000)]
[CSS Regions] Region's float parent doesn't size according to region size but to content node size
https://bugs.webkit.org/show_bug.cgi?id=111332

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/regions/intrinsic-sized-regions.html
       fast/regions/region-with-float-parent.html

The patch ensures that the computation of region's preferred widths
takes into account the region width/min-width if these values are specified.
Also implemented the computation of intrinsic widths for a region,
based on the min/max preferred widths of the associated flow thread.

* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::computeIntrinsicLogicalWidths):
(WebCore):
(WebCore::RenderRegion::computePreferredLogicalWidths):
* rendering/RenderRegion.h:
(RenderRegion):

LayoutTests:

Added tests for intrinsic and preferred width computation for region.

* fast/regions/intrinsic-sized-regions-expected.txt: Added.
* fast/regions/intrinsic-sized-regions.html: Added.
* fast/regions/region-with-float-parent-expected.txt: Added.
* fast/regions/region-with-float-parent.html: Added.

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

6 years agoFix a typo in MacroAssemblerARMv7.h.
mark.lam@apple.com [Tue, 23 Apr 2013 04:47:08 +0000 (04:47 +0000)]
Fix a typo in MacroAssemblerARMv7.h.
https://bugs.webkit.org/show_bug.cgi?id=115011.

Reviewed by Geoffrey Garen.

* assembler/ARMAssembler.h: Fix a comment.
* assembler/ARMv7Assembler.h: Added some comments.
* assembler/MacroAssemblerARMv7.h:
  - ARMAssembler::PL should be ARMv7Assembler::ConditionPL.

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

6 years ago[CMake] Move NullPtr.cpp from PlatformWinCE.cmake to CMakeLists.txt
paroga@webkit.org [Tue, 23 Apr 2013 03:32:43 +0000 (03:32 +0000)]
[CMake] Move NullPtr.cpp from PlatformWinCE.cmake to CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=114557

Reviewed by Laszlo Gombos.

This file is not specific to Windwos CE. Move it the the general
CMakeLists.txt so other ports can use it to. It does not affect
ports which do not need it, since it contains a preprocessor guard.

* wtf/CMakeLists.txt:
* wtf/PlatformWinCE.cmake:

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

6 years agoSpeculative Windows build fix.
jberlin@webkit.org [Tue, 23 Apr 2013 02:33:59 +0000 (02:33 +0000)]
Speculative Windows build fix.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in:

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

6 years agoRemove references to the inspector/profiler/memory-instrumentation tests removed...
jberlin@webkit.org [Tue, 23 Apr 2013 02:03:13 +0000 (02:03 +0000)]
Remove references to the inspector/profiler/memory-instrumentation tests removed in r148921

Rubber-stamped by Benjamin Poulain.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years agoNeed WebKit SPI to detect whether a page contains form controls
weinig@apple.com [Tue, 23 Apr 2013 01:10:13 +0000 (01:10 +0000)]
Need WebKit SPI to detect whether a page contains form controls
<rdar://problem/13686661>
https://bugs.webkit.org/show_bug.cgi?id=115003

Reviewed by Beth Dakin.

* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameContainsAnyFormControls):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormControls):
* WebProcess/WebPage/WebFrame.h:

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

6 years ago [Mac] REGRESSION (r142806): "Just Leaking" Console errors on launch
ap@apple.com [Tue, 23 Apr 2013 00:43:25 +0000 (00:43 +0000)]
    [Mac] REGRESSION (r142806): "Just Leaking" Console errors on launch
        https://bugs.webkit.org/show_bug.cgi?id=115002
        <rdar://problem/13254212>

        Reviewed by Sam Weinig.

        * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
        (WebKit::BootstrapMain): Added an autorelease pool for code that uses Objective-C.

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

6 years agoTry to fix the build after enabling gobject-introspection
mrobinson@webkit.org [Tue, 23 Apr 2013 00:16:26 +0000 (00:16 +0000)]
Try to fix the build after enabling gobject-introspection

* GNUmakefile.am: Disable --warn-error for WebKit1 until we can work out all gir failures.
* webkit/webkitwebplugin.cpp: Skip this API for introspection because it return a GSList
of pointer (non-boxed) types.

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

6 years ago<http://webkit.org/b/114989> Add a user default to allow use of the Safari binary...
mrowe@apple.com [Tue, 23 Apr 2013 00:10:59 +0000 (00:10 +0000)]
<webkit.org/b/114989> Add a user default to allow use of the Safari binary rather than SafariForWebKitDevelopment

Reviewed by Anders Carlsson.

* Scripts/webkitdirs.pm:
(skipSafariExecutableEntitlementChecks): Look for the SkipSafariExecutableEntitlementChecks default in the
/Library/Preferences/org.webkit.BuildConfiguration preference domain.
(safariPathFromSafariBundle): If the user default is set asking us to skip the entitlement checks, return
the path to the regular Safari binary.

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

6 years agoDebug build fix.
jberlin@webkit.org [Mon, 22 Apr 2013 23:50:41 +0000 (23:50 +0000)]
Debug build fix.

Rubber-stamped by Ryosuke Niwa.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h:
(WebCore):
(WebCore::InspectorMemoryAgent::create):
(InspectorMemoryAgent):

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

6 years agoAddress review feedback I forgot to address in r148929
beidson@apple.com [Mon, 22 Apr 2013 23:42:25 +0000 (23:42 +0000)]
Address review feedback I forgot to address in r148929
https://bugs.webkit.org/show_bug.cgi?id=114480

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest): Rework the "what" comment into a more useful "why" comment.

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

6 years ago Unreviewed Efl build fix after r148921
ryuan.choi@samsung.com [Mon, 22 Apr 2013 23:40:35 +0000 (23:40 +0000)]
   Unreviewed Efl build fix after r148921

* TestWebKitAPI/CMakeLists.txt:

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

6 years agoSecond Mac debug build fix after r148921
benjamin@webkit.org [Mon, 22 Apr 2013 23:34:01 +0000 (23:34 +0000)]
Second Mac debug build fix after r148921

Unreviewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-22

* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h:
(InspectorMemoryAgent):

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

6 years agoREGRESSION (r141136): Wiki "Random article" function very broken.
beidson@apple.com [Mon, 22 Apr 2013 23:28:59 +0000 (23:28 +0000)]
REGRESSION (r141136): Wiki "Random article" function very broken.
<rdar://problem/13229985> and https://bugs.webkit.org/show_bug.cgi?id=114480

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/navigation/redirect-to-random-url-versus-memory-cache.html

If we are performing a conditional GET to revalidate a resource and there's a redirect,
check to see if the redirect is to a different URL than the final URL of the resource.

If the URLs differ then we should make the redirect-request unconditional and do a normal load.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):

* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::makeUnconditional):

* platform/network/ResourceRequestBase.h:
(ResourceRequestBase):

LayoutTests:

* http/tests/navigation/redirect-to-random-url-versus-memory-cache-expected.txt: Added.
* http/tests/navigation/redirect-to-random-url-versus-memory-cache.html: Added.
* http/tests/navigation/resources/randomredirects/0.php: Added.
* http/tests/navigation/resources/randomredirects/1.php: Added.
* http/tests/navigation/resources/randomredirects/2.php: Added.
* http/tests/navigation/resources/randomredirects/3.php: Added.
* http/tests/navigation/resources/randomredirects/4.php: Added.
* http/tests/navigation/resources/randomredirects/5.php: Added.
* http/tests/navigation/resources/randomredirects/6.php: Added.
* http/tests/navigation/resources/randomredirects/7.php: Added.
* http/tests/navigation/resources/randomredirects/8.php: Added.
* http/tests/navigation/resources/randomredirects/9.php: Added.
* http/tests/navigation/resources/randomredirects/randomredirect.php: Added.

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

6 years agoAnother Windows build fix after r148921
benjamin@webkit.org [Mon, 22 Apr 2013 23:27:30 +0000 (23:27 +0000)]
Another Windows build fix after r148921

Unreviewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-22

* AccessibleBase.cpp: Add missing header include.

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

6 years agoAdd branchAdd32 missing implementation in SH4 base JIT.
commit-queue@webkit.org [Mon, 22 Apr 2013 23:25:41 +0000 (23:25 +0000)]
Add branchAdd32 missing implementation in SH4 base JIT.
This should fix SH4 build, broken since r148893.
https://bugs.webkit.org/show_bug.cgi?id=114993.

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-04-22
Reviewed by Oliver Hunt.

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::branchAdd32):
(MacroAssemblerSH4):

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

6 years agoMac debug build fix after r148921
benjamin@webkit.org [Mon, 22 Apr 2013 23:12:10 +0000 (23:12 +0000)]
Mac debug build fix after r148921

Unreviewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-22

* page/animation/CompositeAnimation.cpp:

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

6 years agoWindows build fix after r148921
benjamin@webkit.org [Mon, 22 Apr 2013 23:08:30 +0000 (23:08 +0000)]
Windows build fix after r148921

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-22

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:

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

6 years ago[Cairo] Canvas-shadow behavior is not being as expected
mrobinson@webkit.org [Mon, 22 Apr 2013 23:06:16 +0000 (23:06 +0000)]
[Cairo] Canvas-shadow behavior is not being as expected
https://bugs.webkit.org/show_bug.cgi?id=108897

Patch by Rashmi Shyamasundar <rashmi.s2@samsung.com> on 2013-04-22
Reviewed by Martin Robinson.

Source/WebCore:

Use the pattern-extend-mode "CAIRO_EXTEND_NONE" instead of "CAIRO_EXTEND_PAD" in
PlatformContextCairo::drawSurfaceToContext().

In the function PlatformContextCairo::drawSurfaceToContext(), a pattern is being
created from the source surface and this pattern is drawn onto the destination
context. There is no gradient involved. Hence the extend mode for filling the
pattern should be "CAIRO_EXTEND_NONE". If we use the extend mode
"CAIRO_EXTEND_PAD" in PlatformContextCairo::drawSurfaceToContext(), the original
image area is also filled with the shadow color which is not the expected behavior.

Test: fast/canvas/canvas-image-shadow.html

* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::drawSurfaceToContext):

LayoutTests:

Test to verify the shadow of an image drawn on canvas.
This test uses an image whose size is smaller than,
the size of the rectangle which should be filled with the image.

* fast/canvas/canvas-image-shadow-expected.txt: Added.
* fast/canvas/canvas-image-shadow.html: Added.
* fast/canvas/green.png: Added.
* fast/canvas/script-tests/canvas-image-shadow.js: Added.
(draw):

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

6 years agoWeb process should decide when to continue main resource loads
andersca@apple.com [Mon, 22 Apr 2013 22:56:19 +0000 (22:56 +0000)]
Web process should decide when to continue main resource loads
https://bugs.webkit.org/show_bug.cgi?id=114995

Reviewed by Sam Weinig.

Main resource loads can be converted to downloads, so we need the ability to let the web process decide when
to continue loading after a response has been received.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
For non-main resources, just call continueDidReceiveResponse directly; there's no need to ping-pong to the web process in that case.

(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
Just call ResourceHandle::continueDidReceiveResponse.

* NetworkProcess/NetworkResourceLoader.messages.in:
Add ContinueDidReceiveResponse message.

* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
Initialize m_isLoadingMainResource.

* NetworkProcess/SchedulableLoader.h:
(WebKit::SchedulableLoader::isLoadingMainResource):
Add getter.

(SchedulableLoader):
Move m_shouldClearReferrerOnHTTPSToHTTPRedirect next to the rest of the booleans.

* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
(NetworkResourceLoadParameters):
Add isMainResource flag.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
Pass the cached resource to scheduleLoad.

(WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
Pass null to scheduleLoad.

(WebKit::WebResourceLoadScheduler::scheduleLoad):
Initialize isMainResource.

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
If this is a main resource load, send back a ContinueDidReceiveResponse message.

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

6 years agoRemove the memory instrumentation code
benjamin@webkit.org [Mon, 22 Apr 2013 22:52:23 +0000 (22:52 +0000)]
Remove the memory instrumentation code
https://bugs.webkit.org/show_bug.cgi?id=114931

Reviewed by Andreas Kling.

.:

* Source/autotools/symbols.filter:

Source/JavaScriptCore:

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:

Source/WebCore:

The Memory Instrumentation code is unfinished and has already
become out of sync the objects it is supposed to represent.

The current approach does not seem maintainable, it is better to
remove it before someone gets hurt.

By removing the code, the binary become 1240976 bytes smaller.
Yep, almost 1 Mb, bringing WebCore to the size it has 5 months ago :)

* MostWebCoreFiles: remove the support for memory instrumentation.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/mac:

* WebView/WebRenderLayer.mm:

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in:

Source/WTF:

On Mac x86_64, the code removal cause the binary to be
9224 bytes smaller.

* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/ListHashSet.h:
(ListHashSet):
(ListHashSetNodeAllocator):
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):
* wtf/MemoryInstrumentation.cpp: Removed.
* wtf/MemoryInstrumentation.h: Removed.
* wtf/MemoryInstrumentationArrayBufferView.h: Removed.
* wtf/MemoryInstrumentationHashCountedSet.h: Removed.
* wtf/MemoryInstrumentationHashMap.h: Removed.
* wtf/MemoryInstrumentationHashSet.h: Removed.
* wtf/MemoryInstrumentationListHashSet.h: Removed.
* wtf/MemoryInstrumentationSequence.h: Removed.
* wtf/MemoryInstrumentationString.h: Removed.
* wtf/MemoryInstrumentationVector.h: Removed.
* wtf/MemoryObjectInfo.h: Removed.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::isASCIILiteral):
* wtf/text/WTFString.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: Removed.

LayoutTests:

* inspector/profiler/memory-instrumentation-cached-images-expected.txt: Removed.
* inspector/profiler/memory-instrumentation-cached-images.html: Removed.
* inspector/profiler/memory-instrumentation-canvas-expected.txt: Removed.
* inspector/profiler/memory-instrumentation-canvas.html: Removed.
* inspector/profiler/memory-instrumentation-external-array-expected.txt: Removed.
* inspector/profiler/memory-instrumentation-external-array.html: Removed.
* inspector/profiler/memory-instrumentation-external-string-expected.txt: Removed.
* inspector/profiler/memory-instrumentation-external-string.html: Removed.
* inspector/profiler/memory-instrumentation-test.js: Removed.

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

6 years agoDo not reuse ExclusionShapeInsideInfo in a recursive region layout
betravis@adobe.com [Mon, 22 Apr 2013 22:39:17 +0000 (22:39 +0000)]
Do not reuse ExclusionShapeInsideInfo in a recursive region layout
https://bugs.webkit.org/show_bug.cgi?id=114467

Reviewed by David Hyatt.

Source/WebCore:

Elements that respect shape-inside that have inline children should not reuse an
ExclusionShapeInsideInfo for their children's layout. This patch adds the test
for regions. See the details for non-region layout in bug 104582.
https://bugs.webkit.org/show_bug.cgi?id=104582

Test: fast/regions/shape-inside/shape-inside-recursive-layout.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Do not look up a region's
ExclusionShapeInsideInfo if a block is already respecting shape-inside.

LayoutTests:

Test that for various types of inline containers do not reuse
ExclusionShapeInsideInfo when laying out their children.

* fast/regions/shape-inside/shape-inside-recursive-layout-expected.html: Added.
* fast/regions/shape-inside/shape-inside-recursive-layout.html: Added.

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

6 years agoPlugin Snapshotting: Don't consume insane amounts of time detecting the primary plugin
timothy_horton@apple.com [Mon, 22 Apr 2013 22:36:43 +0000 (22:36 +0000)]
Plugin Snapshotting: Don't consume insane amounts of time detecting the primary plugin
https://bugs.webkit.org/show_bug.cgi?id=114994
<rdar://problem/13696269>

Reviewed by Anders Carlsson.

On some pages, we currently waste a lot of time on every subframe load
and every addPluginView doing primary plugin detection. This patch
attempts to address this via a few minor changes:

- Only allow detection after the main frame's didFinishLoad comes, instead of the first subframe.

- Only explicitly detect on the main frame's didFinishLoad (not subframes).

- Coalesce calls to determinePrimarySnapshottedPlugIn from both addPluginView
(in case JS is adding lots of plugins in a loop) and didFinishLoad.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addPluginView): Coalesce calls to determinePrimarySnapshottedPlugIn.
(WebKit::WebPage::didFinishLoad):
Coalesce calls to determinePrimarySnapshottedPlugIn.
Bail on subframe loads, we're only interested in the main frame being complete.
(WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
Call determinePrimarySnapshottedPlugIn.
* WebProcess/WebPage/WebPage.h:
Add m_determinePrimarySnapshottedPlugInTimer and determinePrimarySnapshottedPlugInTimerFired

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

6 years agoFix r148773.
jberlin@webkit.org [Mon, 22 Apr 2013 22:29:22 +0000 (22:29 +0000)]
Fix r148773.

* platform/mac-lion/TestExpectations:

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

6 years ago <rdar://problem/13334446> [Mac] Tweak sandbox profiles.
ap@apple.com [Mon, 22 Apr 2013 22:21:24 +0000 (22:21 +0000)]
    <rdar://problem/13334446> [Mac] Tweak sandbox profiles.

        Reviewed by Anders Carlsson.

        Unbreak Lion, which doesn't provide detailed control over IPC.

        * WebProcess/com.apple.WebProcess.sb.in:

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

6 years ago[GTK] Enable introspection always for developer builds
mrobinson@webkit.org [Mon, 22 Apr 2013 22:15:37 +0000 (22:15 +0000)]
[GTK] Enable introspection always for developer builds
https://bugs.webkit.org/show_bug.cgi?id=114983

Reviewed by Gustavo Noronha Silva.

.:

* Source/autotools/SetupAutoconfHeader.m4: No longer expose the ENABLE_INTROSPECTION
autoconf header variable. It isn't used and it means that when introspection is enabled
or disabled, there is an unnecessary full rebuild.

Source/WebKit/gtk:

* GNUmakefile.am: Make warnings during gir scanning cause the build to fail. Eliminate
warnings about deprecated API that the g-ir-scanner uses when generating
the scanner program. Use --quiet to avoid printing lots of output to
non-verbose builds.

Source/WebKit2:

* GNUmakefile.am: Make warnings during gir scanning cause the build to fail. Eliminate
warnings about deprecated API that the g-ir-scanner uses when generating
the scanner program. Use --quiet.

Tools:

* Scripts/webkitdirs.pm:
(runAutogenForAutotoolsProjectIfNecessary): Always enable introspection
when using build-webkit.
* gtk/jhbuildrc: Enable documentation for all jhbuild modules and explicitly
choose the memory gsettings backend while in the jhbuild. This eliminates
warnings from programs that fall back to the memory backend.

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

6 years ago[css exclusions] shape-inside-recursive-layout.html should not yet test display:...
betravis@adobe.com [Mon, 22 Apr 2013 22:07:05 +0000 (22:07 +0000)]
[css exclusions] shape-inside-recursive-layout.html should not yet test display: inline-grid
https://bugs.webkit.org/show_bug.cgi?id=114986

Reviewed by Dirk Schulze.

Because the inline-grid value is not yet supported, the test case is falling back to
display: block. This causes an incorrect layout, as block and inline content react to
shape-inside differently.

* fast/exclusions/shape-inside/shape-inside-recursive-layout-expected.html:
* fast/exclusions/shape-inside/shape-inside-recursive-layout.html:

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

6 years ago[GTK] Fix remaining introspection warnings
mrobinson@webkit.org [Mon, 22 Apr 2013 21:54:02 +0000 (21:54 +0000)]
[GTK] Fix remaining introspection warnings
https://bugs.webkit.org/show_bug.cgi?id=114980

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

* bindings/gobject/WebKitDOMCustom.h: Add scope and transfer annotations and flesh
out gtkdoc for completeness.
* bindings/gobject/WebKitDOMEventTarget.h:
(_WebKitDOMEventTargetIface): Ditto and also align virtual method names with those used
for the concrete ones.

Source/WebKit/gtk:

* webkit/webkitspellchecker.h:
(_WebKitSpellCheckerInterface): Align the name of the check_spelling_of_string virtual
method with the concrete method to avoid a g-ir-scanner warning.
* webkit/webkitversion.h.in: Skip WEBKITGTK_API_VERSION for introspection because it
doesn't follow the appropriate namespace name.

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

6 years agoMake it easier to extend NetworkResourceLoadParameters
andersca@apple.com [Mon, 22 Apr 2013 21:45:43 +0000 (21:45 +0000)]
Make it easier to extend NetworkResourceLoadParameters
https://bugs.webkit.org/show_bug.cgi?id=114992

Reviewed by Sam Weinig.

Turn NetworkResourceLoadParameters into a struct which matches all our other parameter classes in WebKit2. Fill in the struct manually
instead of having a constructor with 9 parameters.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
(NetworkResourceLoadParameters):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):

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

6 years agoPDFPlugin: Support unlocking encrypted PDFs
timothy_horton@apple.com [Mon, 22 Apr 2013 21:19:17 +0000 (21:19 +0000)]
PDFPlugin: Support unlocking encrypted PDFs
https://bugs.webkit.org/show_bug.cgi?id=114938
<rdar://problem/12872888>

Reviewed by Alexey Proskuryakov and Oliver Hunt.

If we try to load an encrypted PDF, we need to provide a sane mechanism
through which the user can provide the password. Add a slightly-below-center
password field to match PDFKit's normal behavior.

* WebKit2.xcodeproj/project.pbxproj: Add PDFPluginPasswordField.{h,mm}
* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add attemptToUnlockWithPassword:
* WebProcess/Plugins/PDF/PDFPlugin.h:
Add createPasswordEntryForm, attemptToUnlockPDF, m_passwordField.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(annotationStyle): Make #annotationContainer a flexbox that centers its contents.
This won't affect the normal absolutely-positioned form fields, but the inline
password field will be centered vertically and horizontally.

(WebKit::PDFPlugin::pdfDocumentDidLoad):
If the document is locked when loaded, create a password field.

(WebKit::PDFPlugin::createPasswordEntryForm):
Create a PDFPluginPasswordField and attach it to the document.

(WebKit::PDFPlugin::attemptToUnlockPDF):
Try to unlock the PDF with the given password. If this succeeds, remove
the password field and relayout the scroll view.

(WebKit::PDFPlugin::calculateSizes):
Make the document 0x0 if it is locked, preventing scrolling.

(WebKit::PDFPlugin::handleMouseEvent):
Don't pass mouse events to PDFLayerController while it is locked,
as it has no useful events to provide, and will try to present a
dialog asking for the password if we let a click through.

* WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
(WebKit::PDFPluginAnnotation::eventListener): Added.
* WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
(WebKit::PDFPluginAnnotation::handleEvent):
Move event-handling code here from PDFPluginAnnotationEventListener::handleEvent
so that subclasses can override this instead of having to have their own
event listeners (this is also why we now expose eventListener()).

(WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):
Forward the event to our owning PDFPluginAnnotation.

* WebProcess/Plugins/PDF/PDFPluginPasswordField.h: Added.
(WebKit::PDFPluginPasswordField::PDFPluginPasswordField):
* WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Added.
(WebKit::PDFPluginPasswordField::create):
(WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
Unregister for keyup.

(WebKit::PDFPluginPasswordField::createAnnotationElement):
Register for keyup, and set our element's class to "password".

(WebKit::PDFPluginPasswordField::updateGeometry):
Added. Override updateGeometry and do nothing, as the password field
has a geometry defined by CSS instead of by the PDF content.

(WebKit::PDFPluginPasswordField::handleEvent):
If the enter/return key is pressed, attempt to unlock the PDF. Also,
we do not call either of our superclass' implementations of handleEvent,
because blurring the password field should not destroy it, and tabbing
between fields has no relevance when there can only be one field.

* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
(WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener):
Removed. We now share our superclass' event listener.

(WebKit::PDFPluginTextAnnotation::textAnnotation): Const.
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
PDFPluginTextAnnotation no longer has its own event listener,
so there's nothing left to clear here. Just make sure to unregister
our event from PDFPluginAnnotation's shared event listener!

(WebKit::PDFPluginTextAnnotation::createAnnotationElement):
Ensure that we can create a PDFPluginTextAnnotation with a null annotation.

(WebKit::PDFPluginTextAnnotation::commit): Use value().
(WebKit::PDFPluginTextAnnotation::value):
Factor retrieving the value of the form control out of commit().

(WebKit::PDFPluginTextAnnotation::handleEvent):
Call up to PDFPluginAnnotation's handler so that defocus destroys the annotation.

Export HTMLNames::typeAttr.

* WebCore.exp.in:

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

6 years agoSlow/beachballing when using the find bar on a page with plug-ins
andersca@apple.com [Mon, 22 Apr 2013 20:46:06 +0000 (20:46 +0000)]
Slow/beachballing when using the find bar on a page with plug-ins
https://bugs.webkit.org/show_bug.cgi?id=114990
<rdar://problem/12832313>

Reviewed by Tim Horton.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::notifyWidget):
Call shouldCreateTransientPaintingSnapshot().

(WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
Don't create a painting snapshot if we're asked to paint the find indicator.

* WebProcess/Plugins/PluginView.h:
Add new member function.

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