WebKit-https.git
7 years agoFix for 128110
bburg@apple.com [Tue, 4 Feb 2014 01:02:23 +0000 (01:02 +0000)]
Fix for 128110

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

7 years agoFix the cloop due to GenGC
mhahnenberg@apple.com [Tue, 4 Feb 2014 00:54:16 +0000 (00:54 +0000)]
Fix the cloop due to GenGC
https://bugs.webkit.org/show_bug.cgi?id=128137

Reviewed by Geoffrey Garen.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::llint_write_barrier_slow):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.cpp:
(JSC::CLoopRegister::operator JSCell*):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/cloop.rb:
* offlineasm/instructions.rb:

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

7 years agoRemove unused code in CSSParser.cpp
jinwoo7.song@samsung.com [Tue, 4 Feb 2014 00:45:02 +0000 (00:45 +0000)]
Remove unused code in CSSParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=128135

Reviewed by Darin Adler.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):

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

7 years agoREGRESSION (r163011-r163031): Web Inspector: Latest nightly crashes when showing...
msaboff@apple.com [Tue, 4 Feb 2014 00:37:51 +0000 (00:37 +0000)]
REGRESSION (r163011-r163031): Web Inspector: Latest nightly crashes when showing the Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=127901

Reviewed by Geoffrey Garen.

Set VM::topCallFrame before making calls to possible C++ code in
generateProtoChainAccessStub() and tryBuildGetByIDList().

* jit/Repatch.cpp:
(JSC::generateProtoChainAccessStub):
(JSC::tryBuildGetByIDList):

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

7 years agoMore tail pointer consolidation
andersca@apple.com [Tue, 4 Feb 2014 00:37:15 +0000 (00:37 +0000)]
More tail pointer consolidation
https://bugs.webkit.org/show_bug.cgi?id=128139

Reviewed by Andreas Kling.

Add a new tailOffset() function and reimplement allocationSize() and tailPointer()
in terms of it. Use tailPointer() instead of reinterpret_cast-ing this + 1.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternalNonEmpty):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::requiresCopy):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::tailOffset):
(WTF::StringImpl::tailPointer):

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

7 years agokill-old-processes doesn't kill plugin processes
rniwa@webkit.org [Tue, 4 Feb 2014 00:29:22 +0000 (00:29 +0000)]
kill-old-processes doesn't kill plugin processes
https://bugs.webkit.org/show_bug.cgi?id=128138

Reviewed by Andreas Kling.

Add plugin process names to the list of processes to kill.

* BuildSlaveSupport/kill-old-processes:
(main):

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

7 years ago[GTK][CMake] Enable SUBPIXEL_LAYOUT in FeatureDefines.h like EFL does
gns@gnome.org [Tue, 4 Feb 2014 00:26:58 +0000 (00:26 +0000)]
[GTK][CMake] Enable SUBPIXEL_LAYOUT in FeatureDefines.h like EFL does
https://bugs.webkit.org/show_bug.cgi?id=128136

Reviewed by Martin Robinson.

* wtf/FeatureDefines.h: enable SUBPIXEL_LAYOUT if it's not set, for GTK+.

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

7 years ago[Mac] WK1 Clients Only Latch on Momentum Scroll
bfulgham@apple.com [Tue, 4 Feb 2014 00:17:05 +0000 (00:17 +0000)]
[Mac] WK1 Clients Only Latch on Momentum Scroll
https://bugs.webkit.org/show_bug.cgi?id=128133

Reviewed by Simon Fraser.

* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::useLatchedEventElement): Update
predicate to recognize the start and change phases of the wheel
event as latchable (not just momentum start/change).

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

7 years agoKeep only captured symbols in CodeBlock symbol tables.
akling@apple.com [Tue, 4 Feb 2014 00:13:01 +0000 (00:13 +0000)]
Keep only captured symbols in CodeBlock symbol tables.
<https://webkit.org/b/128050>

Discard all uncaptured symbols at the end of codegen since only
the captured ones will be used after that point.

~2MB progression on Membuster OSUS.

Reviewed by Geoffrey Garen.

* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::setSymbolTable):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):

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

7 years agoAllow WK2 to read from NSUserDefaults when it has no prefs identifier
simon.fraser@apple.com [Tue, 4 Feb 2014 00:00:46 +0000 (00:00 +0000)]
Allow WK2 to read from NSUserDefaults when it has no prefs identifier
https://bugs.webkit.org/show_bug.cgi?id=128124

Reviewed by Sam Weinig.

WebPreferences would never read from NSUserDefaults if no identifier
had been set, but this prevents us from reading useful debugging prefs.

Fix to read pref names using a "WebKit2" prefix when no identifier
is set.

* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey):
(WebKit::WebPreferences::platformInitializeStore):

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

7 years ago[WK2] Remove the VideoPluginProxyEnabled preference in WK2
jer.noble@apple.com [Mon, 3 Feb 2014 23:39:53 +0000 (23:39 +0000)]
[WK2] Remove the VideoPluginProxyEnabled preference in WK2
https://bugs.webkit.org/show_bug.cgi?id=128128

Reviewed by Brady Eidson.

The plugin proxy is iOS WK1 only, and has no meaning in WebKit2. Just set the preference to false.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

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

7 years agoFix the LLInt C loop
mhahnenberg@apple.com [Mon, 3 Feb 2014 23:36:42 +0000 (23:36 +0000)]
Fix the LLInt C loop

Rubber stamped by Mark Lam.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::llint_write_barrier_slow):
* llint/LLIntSlowPaths.h:

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

7 years agoFeature flag for shape-inside
dino@apple.com [Mon, 3 Feb 2014 23:35:34 +0000 (23:35 +0000)]
Feature flag for shape-inside
https://bugs.webkit.org/show_bug.cgi?id=128001

Reviewed by Simon Fraser.

Source/JavaScriptCore:

Add CSS_SHAPE_INSIDE flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Add CSS_SHAPE_INSIDE flag.

I wrapped everything that is specific to shape-inside in
this flag. It is now possible to build with CSS Shapes enabled
but shape-inside disabled. CSS_SHAPE_INSIDE is dependent on
CSS_SHAPES, so disabling the latter should also disable the former.

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseShapeProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateShapesBeforeBlockLayout):
(WebCore::RenderBlock::updateShapesAfterBlockLayout):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::setStyle):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
* rendering/RenderView.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* rendering/line/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::fitBelowFloats):
* rendering/line/LineWidth.h:
* rendering/shapes/ShapeInsideInfo.cpp:
* rendering/shapes/ShapeInsideInfo.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

Source/WebKit/mac:

Add CSS_SHAPE_INSIDE flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Add CSS_SHAPE_INSIDE flag.

* Configurations/FeatureDefines.xcconfig:

Tools:

Add CSS_SHAPE_INSIDE flag, and -css-shape-inside build
flag.

* Scripts/webkitperl/FeatureList.pm:

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

7 years agoNavigationState should be a PageLoadState::Observer
andersca@apple.com [Mon, 3 Feb 2014 23:33:20 +0000 (23:33 +0000)]
NavigationState should be a PageLoadState::Observer
https://bugs.webkit.org/show_bug.cgi?id=128130

Reviewed by Darin Adler.

This will make it easier to provide load related KVO properties on WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h: Added.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationState):
(WebKit::NavigationState::~NavigationState):
(WebKit::NavigationState::willChangeIsLoading):
(WebKit::NavigationState::didChangeIsLoading):
(WebKit::NavigationState::willChangeTitle):
(WebKit::NavigationState::didChangeTitle):
(WebKit::NavigationState::willChangeActiveURL):
(WebKit::NavigationState::didChangeActiveURL):
(WebKit::NavigationState::willChangeHasOnlySecureContent):
(WebKit::NavigationState::didChangeHasOnlySecureContent):
(WebKit::NavigationState::willChangeEstimatedProgress):
(WebKit::NavigationState::didChangeEstimatedProgress):
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoTurn GenGC on
mhahnenberg@apple.com [Mon, 3 Feb 2014 23:12:11 +0000 (23:12 +0000)]
Turn GenGC on
https://bugs.webkit.org/show_bug.cgi?id=128109

Reviewed by Oliver Hunt.

* wtf/Platform.h: Initially it will only be enabled for X86-64.

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

7 years agoREGRESSION (r163018): Can’t scroll in <select> lists
bfulgham@apple.com [Mon, 3 Feb 2014 23:10:31 +0000 (23:10 +0000)]
REGRESSION (r163018): Can’t scroll in <select> lists
https://bugs.webkit.org/show_bug.cgi?id=128090

Source/WebCore:

The regression was caused by the fact that a new method scrollWithWheelEventLocation() was added
to RenderBox to replace the generic scroll() method for the particular case of scrolling using
the mouse wheel. This turned out to be a mistake because in the case of some elements, like select lists,
the scroll method was overriden and now the incorrect method was being called.
The solution was to remove the new method and just add two default parameters to the generic
scroll method.

Patch by Radu Stavila <stavila@adobe.com> on 2014-02-03
Reviewed by Simon Fraser.

Test: fast/scrolling/scroll-select-list.html

* page/EventHandler.cpp:
(WebCore::scrollNode):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
* rendering/RenderBox.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::scroll):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scroll):
* rendering/RenderListBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::scroll):
* rendering/RenderTextControlSingleLine.h:

LayoutTests:

New test validates scrolling using the mouse wheel inside a select list.
This test is for the moment added as a ImageOnlyFailure expectation
because the current implementation of eventSender cannot simulate mouse wheel events.

Patch by Radu Stavila <stavila@adobe.com> on 2014-02-03
Reviewed by Simon Fraser.

* TestExpectations:
* fast/scrolling/scroll-select-list-expected.html: Added.
* fast/scrolling/scroll-select-list.html: Added.

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

7 years agoDeconstructed parameters aren't being placed in the correct scope
oliver@apple.com [Mon, 3 Feb 2014 22:43:28 +0000 (22:43 +0000)]
Deconstructed parameters aren't being placed in the correct scope
https://bugs.webkit.org/show_bug.cgi?id=128126

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Make sure we declare the bound parameter names as variables when
we reparse.  In the BytecodeGenerator we now also directly ensure
that bound parameters are placed in the symbol table of the function
we're currently compiling.  We then delay binding until just before
we start codegen for the body of the function so that we can ensure
the function has completely initialised all scope details.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::createBindingPattern):

LayoutTests:

Added tests for correct behaviour.

* js/deconstructing-parameters-should-be-locals-expected.txt: Added.
* js/deconstructing-parameters-should-be-locals.html: Added.
* js/script-tests/deconstructing-parameters-should-be-locals.js: Added.
(description.value.string_appeared_here.readDeconstructedParameter):
(overwriteDeconstructedParameter):
(readCapturedDeconstructedParameter):
(overwriteCapturedDeconstructedParameter):

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

7 years agoUnreviewed. Reorder my e-mail addresses in contributors.json,
zoltan@webkit.org [Mon, 3 Feb 2014 22:39:38 +0000 (22:39 +0000)]
Unreviewed. Reorder my e-mail addresses in contributors.json,
so bugzilla will auto complete my actual bugzilla username.

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

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

7 years agoConsolidate StringImpl tail handling into two functions
andersca@apple.com [Mon, 3 Feb 2014 22:04:56 +0000 (22:04 +0000)]
Consolidate StringImpl tail handling into two functions
https://bugs.webkit.org/show_bug.cgi?id=128122

Reviewed by Andreas Kling.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):
* wtf/text/StringImpl.h:
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::tailPointer):

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

7 years agoUpdate JS whitespace definition for changes in Unicode 6.3
ap@apple.com [Mon, 3 Feb 2014 21:52:55 +0000 (21:52 +0000)]
Update JS whitespace definition for changes in Unicode 6.3
https://bugs.webkit.org/show_bug.cgi?id=127450

Reviewed by Oliver Hunt.

* parser/Lexer.h: (JSC::Lexer<UChar>::isWhiteSpace): Part 2 of the fix, update lexer too.

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

7 years agoAdded GetTypedArrayByteOffset to FTL
commit-queue@webkit.org [Mon, 3 Feb 2014 21:51:47 +0000 (21:51 +0000)]
Added GetTypedArrayByteOffset to FTL
https://bugs.webkit.org/show_bug.cgi?id=127589

Patch by Matthew Mirman <mmirman@apple.com> on 2014-02-03
Reviewed by Filip Pizlo.

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetTypedArrayByteOffset):
* tests/stress/ftl-gettypedarrayoffset-simple.js: Added.
(foo):
* tests/stress/ftl-gettypedarrayoffset-wasteful.js: Added.
(foo):

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

7 years agoWebKit2 View Gestures: Two smart magnifications in a row without moving the mouse...
timothy_horton@apple.com [Mon, 3 Feb 2014 21:46:46 +0000 (21:46 +0000)]
WebKit2 View Gestures: Two smart magnifications in a row without moving the mouse should zoom out
https://bugs.webkit.org/show_bug.cgi?id=128108
<rdar://problem/15914539>

Reviewed by Darin Adler.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::handleMagnificationGesture):
Clear the bit that tells us that we should do "smart" things (because the
last gesture was also a smart magnification gesture) when the user manually pinch-magnifies.

(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
Zoom out if the mouse hasn't moved since the last pinch-magnification gesture.

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

7 years agoDebugger created JSActivations should account for CodeBlock::framePointerOffsetToGetA...
mark.lam@apple.com [Mon, 3 Feb 2014 20:59:40 +0000 (20:59 +0000)]
Debugger created JSActivations should account for CodeBlock::framePointerOffsetToGetActivationRegisters().
<https://webkit.org/b/128112>

Reviewed by Geoffrey Garen.

Currently, when the DebuggerCallFrame creates the JSActivation object
for a frame, it does not account for the framePointerOffsetToGetActivationRegisters()
offset that needs to be added for DFG frames.

Instead of special casing the fix in DebuggerCallFrame::scope(), we fix
this by adding CodeBlock::framePointerOffsetToGetActivationRegisters() to
callFrame->registers() in the JSActivation::create() method that does not
explicitly take a Register*. This ensures that JSActivation::create() will
always do the right thing instead of only being a special case for the
LLINT and baselineJIT.

Apart from the DebuggerCallFrame, this create() function is only called by
slow paths in the LLINT and baselineJIT. Hence, it is not performance
critical.

* runtime/JSActivation.h:
(JSC::JSActivation::create):

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

7 years agoSimplified name scope creation for function expressions
ggaren@apple.com [Mon, 3 Feb 2014 20:39:38 +0000 (20:39 +0000)]
Simplified name scope creation for function expressions
https://bugs.webkit.org/show_bug.cgi?id=128031

Reviewed by Mark Lam.

Source/JavaScriptCore:

3X speedup on js/regress/script-tests/function-with-eval.js.

We used to emit bytecode to push a name into local scope every
time a function that needed such a name executed. Now, we push the name
into scope once on the function object, and leave it there.

This is faster, and it also reduces the number of variable resolution
modes you have to worry about when thinking about bytecode and the
debugger.

This patch is slightly complicated by the fact that we don't know if
a function needs a name scope until we parse its body. So, there's some
glue code in here to delay filling in a function's scope until we parse
its body for the first time.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::functionMode): Renamed
functionNameIsInScopeToggle to functionMode.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator): No need to emit convert_this
when debugging. The debugger will perform the conversion as needed.

(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::addCallee): Simplified this code by removing
the "my function needs a name scope, but didn't allocate one" mode.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall): Pass a scope slot through to
CodeBlock generation, so we can add a function name scope if the parsed
function body requires one.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall): Ditto.

* parser/NodeConstructors.h:
(JSC::FuncExprNode::FuncExprNode):
(JSC::FuncDeclNode::FuncDeclNode):
* parser/Nodes.cpp:
(JSC::FunctionBodyNode::finishParsing):
* parser/Nodes.h:
(JSC::FunctionBodyNode::functionMode): Updated for rename.

* parser/ParserModes.h:
(JSC::functionNameIsInScope):
(JSC::functionNameScopeIsDynamic): Helper functions for reasoning about
how crazy JavaScript language semantics are.

* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
(JSC::attemptFastSort): Updated for interface changes above.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::prepareForExecutionImpl):
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/Executable.h:
(JSC::ScriptExecutable::prepareForExecution):
(JSC::FunctionExecutable::functionMode):
* runtime/JSFunction.cpp:
(JSC::JSFunction::addNameScopeIfNeeded):
* runtime/JSFunction.h:
* runtime/JSNameScope.h:
(JSC::JSNameScope::create):
(JSC::JSNameScope::JSNameScope): Added machinery for pushing a function
name scope onto a function when we first discover that it's needed.

LayoutTests:

Added a performance regression test.

* js/regress/function-with-eval-expected.txt: Added.
* js/regress/function-with-eval.html: Added.
* js/regress/script-tests/function-with-eval.js: Added.
(foo):
(bar):

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

7 years agoAX: WebKit should support @headers/@id for complex accessible web tables
cfleizach@apple.com [Mon, 3 Feb 2014 20:34:39 +0000 (20:34 +0000)]
AX: WebKit should support @headers/@id for complex accessible web tables
https://bugs.webkit.org/show_bug.cgi?id=128114

Reviewed by Darin Adler.

Source/WebCore:

Expose the headers attribute for table cells to accessibility.

Test: platform/mac/accessibility/table-headers-attribute.html

* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::columnHeaders):

LayoutTests:

* platform/mac/accessibility/table-headers-attribute-expected.txt: Added.
* platform/mac/accessibility/table-headers-attribute.html: Added.

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

7 years agoCTTE: RenderSVGGradientStop always has a SVGStopElement.
akling@apple.com [Mon, 3 Feb 2014 20:26:09 +0000 (20:26 +0000)]
CTTE: RenderSVGGradientStop always has a SVGStopElement.
<https://webkit.org/b/128107>

RenderSVGGradientStop is never anonymous and always has a
corresponding SVGStopElement. Codify this by adding an element()
overload that returns an SVGStopElement&.

Also added missing overrides and made most functions private.

Reviewed by Darin Adler.

* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
(WebCore::RenderSVGGradientStop::gradientElement):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGGradientStop):

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

7 years agoRemove CachedImageManual class
ddkilzer@apple.com [Mon, 3 Feb 2014 19:34:30 +0000 (19:34 +0000)]
Remove CachedImageManual class
<http://webkit.org/b/128043>

Reviewed by Darin Adler.

Get rid of the CachedImageManual class by inlining its
functionality into CachedImage.  This makes it possible to
de-virtual-ize isManual() (renamed to isManuallyCached()) and to
make CachedImage final.  The size of CachedImage does not
increase because we turn an existing bool into a bitfield to add
an m_isManuallyCached bit, and create a static CachedImageClient
in MemoryCache.cpp as the "fake" client to keep the manually
cached image alive in the cache.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage): Set m_isManuallyCached
bitfield.  For one overloaded constructor, move the
CachedImageManual code into the CachedImage constructor.
(WebCore::CachedImageManual::CachedImageManual): Remove.
(WebCore::CachedImage::mustRevalidateDueToCacheHeaders): Move
method from CachedImageManual to CachedImage, and put
ManuallyCached behavior behind a check.
* loader/cache/CachedImage.h: Update includes.  Make CachedImage
final.  Add CachedImage::CacheBehaviorType enum when manually
cached images are created.  Move CachedImageManual methods into
CachedImage, remove addFakeClient() and removeFakeClient()
methods (MemoryCache methods use addClient() and removeClient()
with a static CachedImageClient), and remove the
CachedImageManual class definition.  Change
m_shouldPaintBrokenImage to a bitfield and add
m_isManuallyCached bitfield.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::addImageToCache): Use std::unique_ptr and
remove useless NULL check after calling CachedImage constructor.
(WebCore::MemoryCache::removeImageFromCache):
- Update to use CachedImage class instead of CachedImageManual.

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

7 years agoMove the webdatabase module source code to std::unique_ptr
zandobersek@gmail.com [Mon, 3 Feb 2014 19:07:29 +0000 (19:07 +0000)]
Move the webdatabase module source code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127278

Reviewed by Antti Koivisto.

Replace the majority of OwnPtr uses in the webdatabase module with std::unique_ptr.
The only remaining uses are due to ScriptExecutionContext::Task subclasses.

* Modules/webdatabase/AbstractSQLTransactionBackend.h:
* Modules/webdatabase/Database.cpp:
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::DatabaseThread):
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::addOpenDatabase):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/OriginLock.cpp:
* Modules/webdatabase/SQLStatement.cpp:
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLStatementBackend.cpp:
(WebCore::SQLStatementBackend::create):
(WebCore::SQLStatementBackend::SQLStatementBackend):
* Modules/webdatabase/SQLStatementBackend.h:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::executeSQL):
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::doCleanup):
(WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
(WebCore::SQLTransactionBackend::executeSQL):
(WebCore::SQLTransactionBackend::openTransactionAndPreflight):
(WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
* Modules/webdatabase/SQLTransactionBackend.h:
* Modules/webdatabase/SQLTransactionBackendSync.cpp:
(WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync):
(WebCore::SQLTransactionBackendSync::begin):
(WebCore::SQLTransactionBackendSync::commit):
(WebCore::SQLTransactionBackendSync::rollback):
* Modules/webdatabase/SQLTransactionBackendSync.h:

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

7 years agoCTTE: Grab bag of SVGRenderTreeAsText cleanups.
akling@apple.com [Mon, 3 Feb 2014 18:52:12 +0000 (18:52 +0000)]
CTTE: Grab bag of SVGRenderTreeAsText cleanups.
<https://webkit.org/b/128099>

Made some of the DRT SVG functions take more specific types than
RenderObject. Removed some redundant casts.

Reviewed by Anders Carlsson.

* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/svg/SVGRenderTreeAsText.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
(WebCore::writeSVGContainer):

    Make writeSVGResourceContainer() and writeSVGContainer() take the
    final type instead of RenderObject.

(WebCore::writeStyle):
(WebCore::writePositionAndStyle):

    Make these take RenderElement instead of RenderObject.

(WebCore::writeChildren):

    Use child renderer iterator.

(WebCore::writeResources):

    Remove unnecessary cast.

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

7 years agoRemove Unicode.h
darin@apple.com [Mon, 3 Feb 2014 18:38:54 +0000 (18:38 +0000)]
Remove Unicode.h
https://bugs.webkit.org/show_bug.cgi?id=128106

Reviewed by Anders Carlsson.

* GNUmakefile.list.am: Removed files.
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.

* wtf/unicode/ScriptCodesFromICU.h: Removed.
* wtf/unicode/Unicode.h: Removed.
* wtf/unicode/UnicodeMacrosFromICU.h: Removed.
* wtf/unicode/icu/UnicodeIcu.h: Removed.
* wtf/unicode/wchar/UnicodeWchar.cpp: Removed.
* wtf/unicode/wchar/UnicodeWchar.h: Removed.

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

7 years agoWebKit Bot Watcher's Dashboard: Defer subsequent resource loads from access-restricte...
dbates@webkit.org [Mon, 3 Feb 2014 18:37:11 +0000 (18:37 +0000)]
WebKit Bot Watcher's Dashboard: Defer subsequent resource loads from access-restricted build bot when
iteration fails to load with HTTP 401 status code
https://bugs.webkit.org/show_bug.cgi?id=128077

Reviewed by Alexey Proskuryakov.

Similar to the fix for <https://bugs.webkit.org/show_bug.cgi?id=127849>, we should only prompt for
the HTTP credentials of a build bot so long as an earlier authentication request wasn't cancelled
(i.e. failed with an HTTP 401 Unauthorized status code). Currently an authentication dialog will be
presented for an iteration each time the update queue timer fires until a person successfully
authenticates. Instead we should update the authentication status of the build bot on receiving an
HTTP 401 response code such that we defer subsequent requests to load any resource from the access-
restricted build bot when the queue update timer fires.

A person must explicitly click the "unauthorized" status line shown for the queue associated with the
iteration in the dashboard and authenticate successfully for the iteration to be loaded once an
authentication request for an iteration is cancelled.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update): Early return if the associated Buildbot was given invalid credentials.
Also notify the associated Buildbot and update the queue view when a load failed with an HTTP 401 status code.
(BuildbotIteration.prototype.loadLayoutTestResults): Ditto.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView): Modified to call BuildbotQueueView.prototype._unauthorizedAccess instead of
QueueView.prototype._updateSoon when event BuildbotQueue.Event.UnauthorizedAccess is received.
(BuildbotQueueView.prototype._unauthorizedAccess): Added.

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

7 years agoWebKit Bot Watcher's Dashboard: Teach JSON.load() to interpret third argument as...
dbates@webkit.org [Mon, 3 Feb 2014 18:08:59 +0000 (18:08 +0000)]
WebKit Bot Watcher's Dashboard: Teach JSON.load() to interpret third argument as either an
option dictionary or a failure callback
https://bugs.webkit.org/show_bug.cgi?id=128080

Reviewed by Alexey Proskuryakov.

Currently JSON.load() takes a failure callback function as its third argument and
an option dictionary as its fourth argument. So, a caller that wants to ignore errors
and pass an option dictionary must pass null or a reference to an empty function for
the value of third argument. Instead, we should make the third argument polymorphic for
convenience. Then a caller can either pass a failure callback function or an option dictionary.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:

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

7 years agoTry to fix the WinCairo build.
darin@apple.com [Mon, 3 Feb 2014 17:39:25 +0000 (17:39 +0000)]
Try to fix the WinCairo build.

* WebDownloadCurl.cpp:
(WebDownload::didReceiveResponse): characters -> deprecatedCharacters.

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

7 years agoTry to fix 32-bit Mac build.
darin@apple.com [Mon, 3 Feb 2014 17:39:22 +0000 (17:39 +0000)]
Try to fix 32-bit Mac build.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::convertStringToKeyCodes): Use deprecatedCharacters.

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

7 years agoStop using Unicode.h
darin@apple.com [Mon, 3 Feb 2014 17:30:04 +0000 (17:30 +0000)]
Stop using Unicode.h
https://bugs.webkit.org/show_bug.cgi?id=127633

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* parser/Lexer.h:
* runtime/JSGlobalObjectFunctions.h:
* yarr/YarrCanonicalizeUCS2.h:
* yarr/YarrInterpreter.h:
* yarr/YarrParser.h:
* yarr/YarrPattern.h:
Removed includes of <wtf/unicode/Unicode.h>, adding includes of
ICU headers and <wtf/text/LChar.h> as needed to replace it.

Source/WebCore:

* Modules/indexeddb/IDBKeyPath.cpp:
* css/CSSFontFace.h:
* css/CSSOMUtils.h:
* css/CSSSegmentedFontFace.h:
* css/CSSUnicodeRangeValue.h:
* editing/Editor.cpp:
* editing/SmartReplace.h:
* html/parser/HTMLTokenizer.cpp:
* loader/DocumentLoader.cpp:
* page/ContextMenuController.cpp:
* page/Settings.h:
* platform/DateComponents.h:
* platform/SharedBuffer.cpp:
* platform/graphics/Color.h:
* platform/graphics/FontCache.h:
* platform/graphics/FontData.h:
* platform/graphics/FontDescription.h:
* platform/graphics/FontFastPath.cpp:
* platform/graphics/FontGenericFamilies.h:
* platform/graphics/FontGlyphs.cpp:
* platform/graphics/GlyphMetricsMap.h:
* platform/graphics/GlyphPage.h:
* platform/graphics/GlyphPageTreeNode.cpp:
* platform/graphics/GlyphPageTreeNode.h:
* platform/graphics/SVGGlyph.cpp:
* platform/graphics/WidthIterator.h:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
* platform/graphics/mac/ComplexTextController.h:
* platform/graphics/win/QTMovie.h:
* platform/graphics/wince/FontWinCE.cpp:
* platform/text/BidiContext.h:
* platform/text/Hyphenation.h:
* platform/text/LocaleToScriptMapping.h:
* platform/text/TextBoundaries.cpp:
* platform/text/TextBoundaries.h:
* platform/text/TextBreakIterator.h:
* platform/text/TextCodec.h:
* platform/text/TextEncoding.h:
* platform/text/TextEncodingRegistry.h:
* platform/text/TextStream.h:
* platform/text/icu/UTextProvider.h:
* platform/text/icu/UTextProviderLatin1.h:
* platform/text/icu/UTextProviderUTF16.h:
* platform/text/wchar/TextBreakIteratorWchar.cpp:
* platform/win/WebCoreTextRenderer.cpp:
* rendering/RootInlineBox.cpp:
* rendering/SimpleLineLayout.cpp:
* rendering/SimpleLineLayoutFunctions.cpp:
* rendering/break_lines.h:
* svg/SVGFontData.cpp:
Removed includes of <wtf/unicode/Unicode.h>, adding includes of
ICU headers and <wtf/text/LChar.h> as needed to replace it.

Source/WTF:

* wtf/StringHasher.h:
* wtf/dtoa.h:
* wtf/text/ASCIIFastPath.h:
* wtf/text/LChar.h:
* wtf/text/StringBuffer.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
* wtf/unicode/CharacterNames.h:
* wtf/unicode/Collator.h:
* wtf/unicode/UTF8.h:
Removed includes of <wtf/unicode/Unicode.h>, adding includes of
ICU headers and <wtf/text/LChar.h> as needed to replace it.

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

7 years agoRevert r163299 since it broke the ML 32-bit Release build
jberlin@webkit.org [Mon, 3 Feb 2014 17:23:47 +0000 (17:23 +0000)]
Revert r163299 since it broke the ML 32-bit Release build

Source/WebCore:

* html/HTMLAnchorElement.cpp:
(WebCore::parsePortFromStringPosition):
(WebCore::HTMLAnchorElement::hash):
(WebCore::HTMLAnchorElement::setHash):
(WebCore::HTMLAnchorElement::host):
(WebCore::HTMLAnchorElement::setHost):
(WebCore::HTMLAnchorElement::hostname):
(WebCore::HTMLAnchorElement::setHostname):
(WebCore::HTMLAnchorElement::pathname):
(WebCore::HTMLAnchorElement::setPathname):
(WebCore::HTMLAnchorElement::port):
(WebCore::HTMLAnchorElement::setPort):
(WebCore::HTMLAnchorElement::protocol):
(WebCore::HTMLAnchorElement::setProtocol):
(WebCore::HTMLAnchorElement::search):
(WebCore::HTMLAnchorElement::origin):
(WebCore::HTMLAnchorElement::setSearch):
(WebCore::HTMLAnchorElement::toString):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/URLUtils.idl:

LayoutTests:

* fast/dom/HTMLAnchorElement/anchor-password-expected.txt: Removed.
* fast/dom/HTMLAnchorElement/anchor-password.html: Removed.
* fast/dom/HTMLAnchorElement/anchor-username-expected.txt: Removed.
* fast/dom/HTMLAnchorElement/anchor-username.html: Removed.
* fast/dom/HTMLAreaElement/area-password.html: Removed.
* fast/dom/HTMLAreaElement/area-username.html: Removed.
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* js/dom/dom-static-property-for-in-iteration.html:

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

7 years agoVersioning.
lforschler@apple.com [Mon, 3 Feb 2014 14:51:40 +0000 (14:51 +0000)]
Versioning.

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

7 years ago[CSS Regions] Fix selection and hover effect of content in region with overflow:hidden
commit-queue@webkit.org [Mon, 3 Feb 2014 13:54:32 +0000 (13:54 +0000)]
[CSS Regions] Fix selection and hover effect of content in region with overflow:hidden
https://bugs.webkit.org/show_bug.cgi?id=127101

Patch by Mihai Maerean <mmaerean@adobe.com> on 2014-02-03
Reviewed by Mihnea Ovidenie.

Source/WebCore:

RenderNamedFlowFragments are not hit candidates. The hit test algorithm will pick the
parent layer, the one of the region.

Test: fast/regions/hover-overflow-hidden.html

* rendering/RenderLayer.cpp:
(WebCore::isHitCandidate):

LayoutTests:

* fast/regions/hover-overflow-hidden.html: Added.
* fast/regions/hover-overflow-hidden-expected.html: Added.

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

7 years agoAdopt URLUtils interface and template in HTMLAnchorElement and HTMLAreaElement
mjs@apple.com [Mon, 3 Feb 2014 11:13:17 +0000 (11:13 +0000)]
Adopt URLUtils interface and template in HTMLAnchorElement and HTMLAreaElement
https://bugs.webkit.org/show_bug.cgi?id=128067

Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/dom/HTMLAnchorElement/anchor-password.html
       fast/dom/HTMLAnchorElement/anchor-username.html
       fast/dom/HTMLAreaElement/area-password.html
       fast/dom/HTMLAreaElement/area-username.html

* html/HTMLAnchorElement.cpp:
* html/HTMLAnchorElement.h:
(WebCore::HTMLAnchorElement::setHref): Add version that takes
(and ignores) ExceptionCode. This is needed because the URLUtil
base interface is used for URL, which can throw an exception,
and HTMLAnchorElement, which cannot.
* html/HTMLAnchorElement.idl: implement URLUtils
* html/HTMLAreaElement.idl: implement URLUtils
* html/URLUtils.idl: Treat null as empty string for href

LayoutTests:

New tests for the newly added attributes.
* fast/dom/HTMLAnchorElement/anchor-password-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-password.html: Added.
* fast/dom/HTMLAnchorElement/anchor-username-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-username.html: Added.
* fast/dom/HTMLAreaElement/area-password.html: Added.
* fast/dom/HTMLAreaElement/area-username.html: Added.

Update a test to handle the new anchor properties.
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* js/dom/dom-static-property-for-in-iteration.html:

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

7 years agoBuild fix after r163289.
k.czech@samsung.com [Mon, 3 Feb 2014 10:05:06 +0000 (10:05 +0000)]
Build fix after r163289.

Unreviewed EFL build fix.

Use deprecatedCharacters.

* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit::TextChecker::requestCheckingOfString):

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

7 years agoBuild fix.
mitz@apple.com [Mon, 3 Feb 2014 09:31:53 +0000 (09:31 +0000)]
Build fix.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::convertStringToKeyCodes):

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

7 years ago[ATK] Expose aria-controls through ATK_RELATION_CONTROLLER_FOR
k.czech@samsung.com [Mon, 3 Feb 2014 09:16:54 +0000 (09:16 +0000)]
[ATK] Expose aria-controls through ATK_RELATION_CONTROLLER_FOR
https://bugs.webkit.org/show_bug.cgi?id=127908

Reviewed by Chris Fleizach.

Source/WebCore:

Based on w3c, aria-controls could be exposed through ATK_RELATION_CONTROLLER_FOR.

Test: accessibility/aria-controls.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::supportsARIAControls):
(WebCore::AccessibilityObject::ariaControlsElements):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::supportsARIAFlowTo):
(WebCore::AccessibilityRenderObject::supportsARIAControls):
(WebCore::AccessibilityRenderObject::ariaControlsElements):
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkRelationSetFromCoreObject):

Tools:

Updated AccessibilityUIElement both in WKTR and DRT so that aria-controls support could be tested properly.
Added empty stubs to not break mac builds.

* DumpRenderTree/AccessibilityUIElement.cpp:
(ariaControlsElementAtIndexCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(accessibilityElementAtIndex):
(AccessibilityUIElement::disclosedRowAtIndex):
(AccessibilityUIElement::ariaOwnsElementAtIndex):
(AccessibilityUIElement::ariaFlowToElementAtIndex):
(AccessibilityUIElement::ariaControlsElementAtIndex):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::ariaControlsElementAtIndex):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::ariaControlsElementAtIndex):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::ariaControlsElementAtIndex):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::accessibilityElementAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::ariaControlsElementAtIndex):

LayoutTests:

Tests whether aria-controls returns correct element at the given index.

* accessibility/aria-controls-expected.txt: Added.
* accessibility/aria-controls.html: Added.
* platform/mac/TestExpectations: Skipped it, missing implementation.

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

7 years agoRenderSVGResource::removeClientFromCache() should take RenderElement&.
akling@apple.com [Mon, 3 Feb 2014 09:02:55 +0000 (09:02 +0000)]
RenderSVGResource::removeClientFromCache() should take RenderElement&.
<https://webkit.org/b/128097>

Text renderers never have resources associated with them.
This is yet another step towards enforcing that at compile-time
by making all the resource cache interfaces deal in RenderElement.

Also marked the RenderSVGResourceSolidColor class final.

Reviewed by Darin Adler.

* rendering/svg/RenderSVGResource.cpp:
(WebCore::removeFromCacheAndInvalidateDependencies):
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGResource.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::removeClientFromCache):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::removeClientFromCache):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::removeClientFromCache):
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::removeClientFromCache):
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::removeClientFromCache):
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::removeClientFromCache):
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceSolidColor.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::invalidateResourcesOfChildren):
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::removeClientFromCache):
* rendering/svg/SVGResources.h:

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

7 years agoMore iOS build fixing.
mitz@apple.com [Mon, 3 Feb 2014 08:41:24 +0000 (08:41 +0000)]
More iOS build fixing.

Source/WebCore:

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot):

Source/WebKit/ios:

* Misc/WebNSStringDrawing.mm:
(-[NSString __web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:measureOnly:renderedStringOut:drawUnderline:]):
(-[NSString __web_drawInRect:withFont:ellipsis:alignment:letterSpacing:lineSpacing:includeEmoji:truncationRect:measureOnly:renderedStringOut:drawUnderline:]):

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

7 years agoCorrectly address Darin’s review comment on the last change.
mitz@apple.com [Mon, 3 Feb 2014 08:27:26 +0000 (08:27 +0000)]
Correctly address Darin’s review comment on the last change.

* runtime/Watchdog.h: Changed an OS(DARWIN) guard around formerly PLATFORM(MAC)-only member
variables to the equivalent OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).

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

7 years agoFix wrong mix of fcntl commands and flags
berto@igalia.com [Mon, 3 Feb 2014 08:19:13 +0000 (08:19 +0000)]
Fix wrong mix of fcntl commands and flags
https://bugs.webkit.org/show_bug.cgi?id=127842

Reviewed by Darin Adler.

We are mixing the commands to set file descriptor and file status
flags in a couple of fcntl() calls. FD_CLOEXEC must be set using
F_SETFD, and the access mode flags (O_RDONLY, O_WRONLY, O_RDWR)
with F_SETFL.

This combines patches by Guillem Jover and Sergio Correia.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::readBytesFromSocket):
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::createHandle):

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

7 years agoStop using PLATFORM(MAC) in JavaScriptCore except where it means “OS X but not iOS”
mitz@apple.com [Mon, 3 Feb 2014 08:17:33 +0000 (08:17 +0000)]
Stop using PLATFORM(MAC) in JavaScriptCore except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128098

Reviewed by Darin Adler.

* API/JSValueRef.cpp:
(JSValueUnprotect): Added an explicit !PLATFORM(IOS) in guards for the Evernote workaround,
which is only needed on OS X.

* API/tests/testapi.c:
(main): Changed PLATFORM(MAC) || PLATFORM(IOS) guards to OS(DARWIN), because they were
surrounding tests for code that is itself guarded by OS(DARWIN).

* runtime/Watchdog.h: Changed PLATFORM(MAC) to OS(DARWIN).

* tools/CodeProfiling.cpp:
(JSC::CodeProfiling::begin): Changed PLATFORM(MAC) to
OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
(JSC::CodeProfiling::end): Ditto.

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

7 years agoTry to fix iOS build.
darin@apple.com [Mon, 3 Feb 2014 08:10:03 +0000 (08:10 +0000)]
Try to fix iOS build.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::parseToDateComponents):
Use deprecatedCharacters.

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

7 years agoObey "delete this" comments, including deleting String::characters and friends
darin@apple.com [Mon, 3 Feb 2014 07:52:38 +0000 (07:52 +0000)]
Obey "delete this" comments, including deleting String::characters and friends
https://bugs.webkit.org/show_bug.cgi?id=126865

Reviewed by Andreas Kling.

Source/WebCore:

* CMakeLists.txt: Deleted HTMLParserErrorCodes.cpp.
* GNUmakefile.list.am: Deleted HTMLParserErrorCodes.cpp/h, and HTMLParserQuirks.h.
* WebCore.vcxproj/WebCore.vcxproj: Deleted HTMLParserErrorCodes.cpp/h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* html/HTMLParserErrorCodes.cpp: Removed.
* html/HTMLParserErrorCodes.h: Removed.
* html/HTMLParserQuirks.h: Removed.

* rendering/RenderText.h: Deleted the characters function, leaving behind the
deprecatedCharacters function.

Source/WTF:

* wtf/text/AtomicString.h: Deleted the characters function.
* wtf/text/StringBuilder.h: Deleted the characters function, leaving behind the
deprecatedCharacters function.
* wtf/text/StringImpl.h: Ditto.
* wtf/text/WTFString.h: Ditto. Also added a constructor that takes a StringImpl&,
helpful for later string refactoring.

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

7 years agoStop using PLATFORM(MAC) in WTF except where it means “OS X but not iOS”
mitz@apple.com [Mon, 3 Feb 2014 07:31:40 +0000 (07:31 +0000)]
Stop using PLATFORM(MAC) in WTF except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128089

Reviewed by Darin Adler.

Replaced all uses of PLATFORM(MAC) that weren’t accompanied by !PLATFORM(IOS) with
equivalent(*) tests that are more idiomatic and will not change once PLATFORM(MAC) changes to
be false when building for iOS.

* - One exception noted below.

* wtf/AutodrainedPool.h: Changed PLATFORM(MAC) to USE(FOUNDATION), because NSAutoreleasePool
is a Foundation class.

* wtf/CurrentTime.cpp:
(WTF::monotonicallyIncreasingTime): Changed PLATFORM(MAC) to OS(DARWIN), because Mach is
part of the Darwin kernel, but reordered such that the EFL and GLIB implementations continue
to take precedence regardless of the OS.

* wtf/MainThread.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
* wtf/MainThread.h: Ditto.

* wtf/Platform.h: Changed USE(CG) and USE(CA) to depend on COCOA, rather than MAC or IOS.
Ditto for USE(CFURLCACHE), HAVE(ACCESSIBILITY), USE(PROTECTION_SPACE_AUTH_CALLBACK),
USE(ACCESSIBILITY_CONTEXT_MENUS), USE(EXPORT_MACROS), USE(AVFOUNDATION),
USE(REQUEST_ANIMATION_FRAME_TIMER), USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR),
USE(CONTENT_FILTERING), USE(UNIFIED_TEXT_CHECKING), USE(MARKER_REMOVAL_UPON_EDITING),
USE(AUDIO_SESSION), USE(IOSURFACE), and ENABLE(CSS3_TEXT_DECORATION_SKIP_INK). Changed
PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) in controlling various
JavaScriptCore or JavaScriptCore-dependent behaviors.

* wtf/RunLoop.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* wtf/RunLoopTimerCF.cpp: Ditto.

* wtf/SchedulePair.h: Changed PLATFORM(MAC) to USE(FOUNDATION), since it was used to guard
usage of Foundation API.

* wtf/Threading.cpp: Added an explicit !PLATFORM(IOS) in a guard around something needed
only on OS X and Windows.

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

7 years agoIDB: Cannot open new databases with the default version
beidson@apple.com [Mon, 3 Feb 2014 06:19:25 +0000 (06:19 +0000)]
IDB: Cannot open new databases with the default version
https://bugs.webkit.org/show_bug.cgi?id=128096

Reviewed by Tim Horton.

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::openConnectionInternal): Update logic to handle the
  current version being NoIntVersion.

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::IDBDatabaseBackend::VersionChangeOperation::perform): Update ASSERT.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): New databases should
  have the magic "no version set" version.

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

7 years agoFix context save/restore mistake spotted in SVGInlineTextBox::paintTextWithShadows
darin@apple.com [Mon, 3 Feb 2014 06:18:12 +0000 (06:18 +0000)]
Fix context save/restore mistake spotted in SVGInlineTextBox::paintTextWithShadows
https://bugs.webkit.org/show_bug.cgi?id=128095

Reviewed by Andreas Kling.

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintTextWithShadows): Move calls to GraphicsContext::restore
and GraphicsContext::clearShadow before restoreGraphicsContextAfterTextPainting, since that
function can swap contexts.

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

7 years agoModernize RenderSVGText::locateRenderSVGTextAncestor().
akling@apple.com [Mon, 3 Feb 2014 05:04:57 +0000 (05:04 +0000)]
Modernize RenderSVGText::locateRenderSVGTextAncestor().
<https://webkit.org/b/128093>

Make locateRenderSVGTextAncestor() take a reference, and simplify it
internally with lineageOfType.

Switched callers to use 'auto' for the return type so we get some
devirtualization freebies.

Reviewed by Anders Carlsson.

* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::objectBoundingBox):
(WebCore::RenderSVGInline::strokeBoundingBox):
(WebCore::RenderSVGInline::repaintRectInLocalCoordinates):
(WebCore::RenderSVGInline::absoluteQuads):
(WebCore::RenderSVGInline::addChild):
(WebCore::RenderSVGInline::removeChild):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::setTextInternal):
(WebCore::RenderSVGInlineText::styleDidChange):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::locateRenderSVGTextAncestor):
* rendering/svg/RenderSVGText.h:
(WebCore::RenderSVGText>):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::svgAttributeChanged):

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

7 years ago[EFL][WK2] Add a logic for checking multi touch in GestureRecognizer::noGesture
commit-queue@webkit.org [Mon, 3 Feb 2014 04:54:26 +0000 (04:54 +0000)]
[EFL][WK2] Add a logic for checking multi touch in GestureRecognizer::noGesture
https://bugs.webkit.org/show_bug.cgi?id=127675

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2014-02-02
Reviewed by Gyuyoung Kim.

When processing TouchStart event in GestureRecognizer::noGesture(), we should
check the number of touch points to distinguish if the gesture is single tap
or pinch zoom. Current logic only considers the event as single tap.

* UIProcess/API/efl/GestureRecognizer.cpp:
(WebKit::GestureRecognizer::noGesture):

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

7 years agoModernize the toRenderSVGResourceContainer() helper.
akling@apple.com [Mon, 3 Feb 2014 04:50:00 +0000 (04:50 +0000)]
Modernize the toRenderSVGResourceContainer() helper.
<https://webkit.org/b/128091>

Make toRenderSVGResourceContainer() a free function like all the
other casting helpers. Use references instead of pointers where
applicable.

Reviewed by Anders Carlsson.

* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resolveCycles):
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):

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

7 years agoMinor SVGRootInlineBox cleanup.
akling@apple.com [Mon, 3 Feb 2014 04:44:10 +0000 (04:44 +0000)]
Minor SVGRootInlineBox cleanup.
<https://webkit.org/b/128094>

Remove two virtual functions and sprinkle some missing overrides.

Reviewed by Anders Carlsson.

* rendering/svg/SVGRootInlineBox.h:

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

7 years agoI forgot to save the changelog prior to submitting.
oliver@apple.com [Mon, 3 Feb 2014 02:35:22 +0000 (02:35 +0000)]
I forgot to save the changelog prior to submitting.

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

7 years agoPush DOM attributes into the prototype chain
oliver@apple.com [Mon, 3 Feb 2014 02:25:18 +0000 (02:25 +0000)]
Push DOM attributes into the prototype chain
https://bugs.webkit.org/show_bug.cgi?id=127969

Reviewed by Mark Lam.

Source/WebCore:

Start redoing code generation for attributes.

* bindings/js/JSDOMBinding.h:
(WebCore::getStaticPropertySlotEntryWithoutCaching):
(WebCore::getStaticPropertySlotEntryWithoutCaching<JSDOMWrapper>):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(HasComplexGetOwnProperty):
(ConstructorShouldBeOnInstance):
(AttributeShouldBeOnInstance):
(InstanceAttributeCount):
(PrototypeAttributeCount):
(InstanceOverridesGetOwnPropertySlot):
(PrototypeOverridesGetOwnPropertySlot):
(GenerateAttributesHashTable):
(GenerateImplementation):

LayoutTests:

Update layout test results

* fast/dom/wrapper-classes-expected.txt:
* js/dom/constructor-attributes-expected.txt:
* js/dom/dom-static-property-for-in-iteration-expected.txt:
* js/dom/script-tests/constructor-attributes.js:

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

7 years agoRenderSVGResourceContainer clients are always RenderElement.
akling@apple.com [Mon, 3 Feb 2014 02:15:13 +0000 (02:15 +0000)]
RenderSVGResourceContainer clients are always RenderElement.
<https://webkit.org/b/128088>

All clients of RenderSVGResourceContainer are going to be RenderElement,
so make the interface take RenderElement& instead of RenderObject*.

Also modernized the code a bit with C++11 range for loops.

Reviewed by Sam Weinig.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::addClient):
(WebCore::RenderSVGResourceContainer::removeClient):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::addResourcesFromRenderer):
(WebCore::SVGResourcesCache::removeResourcesFromRenderer):

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

7 years agoSubpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
zalan@apple.com [Mon, 3 Feb 2014 01:40:12 +0000 (01:40 +0000)]
Subpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
https://bugs.webkit.org/show_bug.cgi?id=128075

Reviewed by Darin Adler.

No change in functionality.

* platform/LayoutUnit.h:
(WebCore::roundToDevicePixel):
(WebCore::floorToDevicePixel):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):

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

7 years agoSVGDocumentExtensions::resourcesCache() should return a reference.
akling@apple.com [Mon, 3 Feb 2014 01:05:01 +0000 (01:05 +0000)]
SVGDocumentExtensions::resourcesCache() should return a reference.
<https://webkit.org/b/128087>

The SVGResourcesCache is always present when the Document is using
SVG extensions, so make this return a reference and propagate that
knowledge to the call site.

This gets rid of an assertion and some rickety looking ->'s.
Also converted a loop to use C++11 range for syntax.

Reviewed by Sam Weinig.

* rendering/svg/SVGResourcesCache.cpp:
(WebCore::resourcesCacheFromRenderer):
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
(WebCore::SVGResourcesCache::clientStyleChanged):
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
(WebCore::SVGResourcesCache::clientDestroyed):
(WebCore::SVGResourcesCache::resourceDestroyed):
* svg/SVGDocumentExtensions.h:
(WebCore::SVGDocumentExtensions::resourcesCache):

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

7 years agoRenderSVGInlineText::computeNewScaledFontForStyle() should take references.
akling@apple.com [Mon, 3 Feb 2014 01:03:48 +0000 (01:03 +0000)]
RenderSVGInlineText::computeNewScaledFontForStyle() should take references.
<https://webkit.org/b/128086>

Make computeNewScaledFontForStyle() take renderer and style by reference
instead of taking a pointer and asserting that it's non-null.

Reviewed by Darin Adler.

* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::updateScaledFont):
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
* rendering/svg/SVGRenderingContext.h:

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

7 years agoStill more characters -> deprecatedCharacters (EWS keeps finding more)
darin@apple.com [Mon, 3 Feb 2014 00:38:36 +0000 (00:38 +0000)]
Still more characters -> deprecatedCharacters (EWS keeps finding more)
https://bugs.webkit.org/show_bug.cgi?id=128076

Reviewed by Andreas Kling.

Source/WebCore:

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
Use deprecatedCharacters.

Source/WebKit/win:

* AccessibleTextImpl.cpp:
(AccessibleText::get_text):
(AccessibleText::get_textBeforeOffset):
(AccessibleText::get_textAfterOffset):
(AccessibleText::get_textAtOffset):
(AccessibleText::get_attributes):
* DOMCSSClasses.cpp:
(DOMCSSStyleDeclaration::getPropertyValue):
* DOMCoreClasses.cpp:
(DOMNode::nodeValue):
(DOMElement::getAttribute):
(DOMElement::font):
* DOMHTMLClasses.cpp:
(DOMHTMLElement::innerText):
(DOMHTMLFormElement::action):
(DOMHTMLFormElement::method):
(DOMHTMLInputElement::value):
(DOMHTMLTextAreaElement::value):
* MarshallingHelpers.cpp:
(MarshallingHelpers::PathStringToFileCFURLRef):
* WebDataSource.cpp:
(WebDataSource::unreachableURL):
* WebDownload.cpp:
(WebDownload::bundlePathForTargetPath):
* WebDownloadCFNet.cpp:
(WebDownload::didFinish):
* WebElementPropertyBag.cpp:
(convertStringToVariant):
* WebFrame.cpp:
(WebFrame::searchForLabelsBeforeElement):
(WebFrame::matchLabelsAgainstElement):
* WebHistory.cpp:
(WebHistory::addVisitedLinksToPageGroup):
* WebKitGraphics.cpp:
(CenterTruncateStringToWidth):
(RightTruncateStringToWidth):
* WebView.cpp:
(WebView::applicationNameForUserAgent):
(WebView::customUserAgent):
(WebView::groupName):
(WebView::selectedText):
(WebView::onIMERequestReconvertString):
Use deprecatedCharacters.

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

7 years agoRepatch code is passing the wrong args to lookupExceptionHandler.
mark.lam@apple.com [Mon, 3 Feb 2014 00:22:37 +0000 (00:22 +0000)]
Repatch code is passing the wrong args to lookupExceptionHandler.
<https://webkit.org/b/128085>

Reviewed by Oliver Hunt.

lookupExceptionHandler() is expecting 2 args: VM*, ExecState*.
The repatch code was only passing an ExecState*. A crash ensues.
This is now fixed.

* jit/JIT.cpp:
(JSC::JIT::privateCompileExceptionHandlers):
* jit/Repatch.cpp:
(JSC::generateProtoChainAccessStub):

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

7 years agoWK2: Selection is non editable content is not cleared when navigating to a different...
enrica@apple.com [Sun, 2 Feb 2014 23:46:01 +0000 (23:46 +0000)]
WK2: Selection is non editable content is not cleared when navigating to a different page.
https://bugs.webkit.org/show_bug.cgi?id=128084
<rdar://problem/15966166>

Reviewed by Dan Bernstein.

When resigning first responder, we need to cleanup the selection.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView resignFirstResponder]):

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

7 years agoSubpixel rendering: Enable subpixel positioning/sizing/hairline border painting.
zalan@apple.com [Sun, 2 Feb 2014 21:59:01 +0000 (21:59 +0000)]
Subpixel rendering: Enable subpixel positioning/sizing/hairline border painting.
https://bugs.webkit.org/show_bug.cgi?id=128009

Reviewed by Simon Fraser.

Snap and clip to device pixels when painting boxes. Enable hairline painting
for solid border.

No existing context to test this functionality yet.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getRoundedBorderFor):
(WebCore::RenderStyle::getRoundedInnerBorderFor):

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

7 years agoAdd some missing override keywords
weinig@apple.com [Sun, 2 Feb 2014 21:56:15 +0000 (21:56 +0000)]
Add some missing override keywords
https://bugs.webkit.org/show_bug.cgi?id=128082

Reviewed by Antti Koivisto.

* loader/DocumentThreadableLoader.h:
* loader/LinkLoader.h:
* loader/TextTrackLoader.h:
* xml/parser/XMLDocumentParser.h:

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

7 years agoUnreviewed Mac gardering after r163265.
zalan@apple.com [Sun, 2 Feb 2014 21:07:40 +0000 (21:07 +0000)]
Unreviewed Mac gardering after r163265.

* platform/mac/TestExpectations:

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

7 years agoWK2: Cannot focus a second field in a page after the first has been focused.
enrica@apple.com [Sun, 2 Feb 2014 20:37:17 +0000 (20:37 +0000)]
WK2: Cannot focus a second field in a page after the first has been focused.
https://bugs.webkit.org/show_bug.cgi?id=128055
<rdar://problem/15943652>

Reviewed by Simon Fraser.

When handling singleTap, we always need to send
a click to WebKit when we are already interacting with text.
Also, when we stop assisting the node, we should not call
resign responder, since that will trigger another unwanted blur.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView _singleTapRecognized:]):
(-[WKInteractionView _stopAssistingNode]):

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

7 years agoWebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP...
dbates@webkit.org [Sun, 2 Feb 2014 20:31:03 +0000 (20:31 +0000)]
WebKit Bot Watcher's Dashboard: Access restricted queue should only prompt for HTTP credentials once per page load
https://bugs.webkit.org/show_bug.cgi?id=127849

I inadvertently used the equality operator instead of the identity operator when comparing the
value of the error HTTP status code with the numeric literal 401.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.update):

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

7 years agoAttempt to fix production dashboard after <http://trac.webkit.org/changeset/163222>
dbates@webkit.org [Sun, 2 Feb 2014 20:29:50 +0000 (20:29 +0000)]
Attempt to fix production dashboard after <trac.webkit.org/changeset/163222>

Actually pass option dictionary to JSON.load(); JSON.load() takes four arguments with the
last-most argument being the option dictionary.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update):

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

7 years agoIDB: Support IDBFactory.deleteDatabase()
beidson@apple.com [Sun, 2 Feb 2014 19:55:25 +0000 (19:55 +0000)]
IDB: Support IDBFactory.deleteDatabase()
https://bugs.webkit.org/show_bug.cgi?id=128060

Reviewed by Filip Pizlo and Maciej Stachowiak (filesystem parts also Tim Hatcher and Simon Fraser)

Source/WebCore:

* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::deleteDatabaseAsync):

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::deleteDatabase):

Change factory-level deleteDatabase to take opening and main frame origins:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

* WebCore.exp.in:

Source/WebKit2:

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::deleteDatabase):

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::calculateAbsoluteDatabaseFilename): Central place to
  calculate the database filename.
(WebKit::UniqueIDBDatabase::unregisterConnection):
(WebKit::UniqueIDBDatabase::shutdown): Pass shutdown type along.
(WebKit::UniqueIDBDatabase::shutdownBackingStore): If this is a delete shutdown, delete the DB.
(WebKit::UniqueIDBDatabase::didShutdownBackingStore):
(WebKit::UniqueIDBDatabase::deleteDatabase):
(WebKit::UniqueIDBDatabase::postMainThreadTask): All some tasks to bypass the no-more-request restriction.
(WebKit::UniqueIDBDatabase::postDatabaseTask): Ditto.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Use
  calculateAbsoluteDatabaseFilename from UniqueIDBDatabase.

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::open): Update logging channel.
(WebKit::WebIDBFactoryBackend::deleteDatabase): Implement.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

* Shared/WebCrossThreadCopier.h:

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

7 years agoSubpixel rendering: Introduce device pixel snapping helper functions.
zalan@apple.com [Sun, 2 Feb 2014 18:38:45 +0000 (18:38 +0000)]
Subpixel rendering: Introduce device pixel snapping helper functions.
https://bugs.webkit.org/show_bug.cgi?id=128049

Reviewed by Simon Fraser.

These functions help device pixel snapping during painting. They follow the logic of
the corresponding pixelSnappedInt* functions.

No change in functionality.

* platform/LayoutUnit.h:
(WebCore::roundToDevicePixel):
(WebCore::floorToDevicePixel):
(WebCore::snapSizeToPixel):
(WebCore::snapSizeToDevicePixel):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::pixelSnappingFactor):
* platform/graphics/LayoutRect.h:
(WebCore::pixelSnappedForPainting):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):

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

7 years agoFloor thickness and length after switching from int to float.
zalan@apple.com [Sun, 2 Feb 2014 17:44:48 +0000 (17:44 +0000)]
Floor thickness and length after switching from int to float.
https://bugs.webkit.org/show_bug.cgi?id=128071

Reviewed by Antti Koivisto.

This is a temporary solution to fix the assertion on empty line drawing until after
device pixel snapping is added.

Covered by existing tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):

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

7 years agoRemove StyleScopeResolver
antti@apple.com [Sun, 2 Feb 2014 17:27:02 +0000 (17:27 +0000)]
Remove StyleScopeResolver
https://bugs.webkit.org/show_bug.cgi?id=128069

Reviewed by Anders Carlsson.

This is dead code.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):
(WebCore::DocumentRuleSets::collectFeatures):
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.h:
(WebCore::ElementRuleCollector::ElementRuleCollector):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::pushParentElement):
(WebCore::StyleResolver::popParentElement):
(WebCore::StyleResolver::locateSharedStyle):
(WebCore::StyleResolver::styleForElement):
* css/StyleResolver.h:
(WebCore::StyleResolver::document):
* css/StyleScopeResolver.cpp: Removed.
* css/StyleScopeResolver.h: Removed.
* style/StyleResolveTree.cpp:
(WebCore::Style::attachShadowRoot):
(WebCore::Style::resolveShadowTree):

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

7 years agoSubpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
zalan@apple.com [Sun, 2 Feb 2014 16:15:20 +0000 (16:15 +0000)]
Subpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
https://bugs.webkit.org/show_bug.cgi?id=128036

Reviewed by Darin Adler.

Source/WebCore:

Covered by existing tests.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::operator++):
* rendering/RenderBoxModelObject.cpp:
(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::usedWidth):
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::calculateSideRectIncludingInner):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderObject.h:
* rendering/style/BorderData.h:
(WebCore::BorderData::borderLeftWidth):
(WebCore::BorderData::borderRightWidth):
(WebCore::BorderData::borderTopWidth):
(WebCore::BorderData::borderBottomWidth):
* rendering/style/RenderStyle.cpp:
(WebCore::calcRadiiFor):
(WebCore::calcConstraintScaleFor):
(WebCore::RenderStyle::getRoundedInnerBorderFor):
* rendering/style/RenderStyle.h:

LayoutTests:

Bug 128061: Subpixel rendering: borders are reporting float values.

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

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

7 years agoREGRESSION(r163234) Debug build is broken
commit-queue@webkit.org [Sun, 2 Feb 2014 08:02:27 +0000 (08:02 +0000)]
REGRESSION(r163234) Debug build is broken
https://bugs.webkit.org/show_bug.cgi?id=128059

Unreviewed. Debug build is broken with INDEXED_DATABASE.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2014-02-01

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString): Added the default: case.

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

7 years agoSubpixel rendering: LayoutUnit operator++ is broken.
zalan@apple.com [Sun, 2 Feb 2014 07:45:32 +0000 (07:45 +0000)]
Subpixel rendering: LayoutUnit operator++ is broken.
https://bugs.webkit.org/show_bug.cgi?id=128056

Reviewed by Darin Adler.

Add pre-increment operator++.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::operator++):

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

7 years agoJSC profiler's stub info profiling support should work again
fpizlo@apple.com [Sun, 2 Feb 2014 06:38:51 +0000 (06:38 +0000)]
JSC profiler's stub info profiling support should work again
https://bugs.webkit.org/show_bug.cgi?id=128057

Reviewed by Mark Lam.

Source/JavaScriptCore:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdCacheStatus): We want to know if the cache was ever reset by GC, since the DFG uses this information.
(JSC::CodeBlock::printLocationAndOp): This shouldn't have been inline.
(JSC::CodeBlock::printLocationOpAndRegisterOperand): Ditto.
(JSC::CodeBlock::dumpBytecode): Dump the profiling field, and make sure that the caller can pass a StubInfoMap, which is necessary for dumping StructureStubInfo profiling.
* bytecode/CodeBlock.h: Out-of-line some methods and add the StubInfoMap parameter.
* profiler/ProfilerBytecodeSequence.cpp:
(JSC::Profiler::BytecodeSequence::BytecodeSequence): Create a StubInfoMap before dumping bytecodes.

Tools:

* Scripts/display-profiler-output: Just make sure that there's always a space between the origin stack dump and the top bytecode index.

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

7 years agoMore characters -> deprecatedCharacters (based on more EWS complaints)
darin@apple.com [Sun, 2 Feb 2014 06:38:18 +0000 (06:38 +0000)]
More characters -> deprecatedCharacters (based on more EWS complaints)
https://bugs.webkit.org/show_bug.cgi?id=128063

Reviewed by Anders Carlsson.

Source/WebCore:

* editing/SmartReplace.cpp:
(WebCore::addAllCodePoints):
(WebCore::getSmartSet):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
Use deprecatedCharacters.

Source/WebKit2:

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::truncateToSingleLine): Use deprecatedCharacters.

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

7 years agoUse deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
darin@apple.com [Sun, 2 Feb 2014 04:59:36 +0000 (04:59 +0000)]
Use deprecatedCharacters in a few more places (non-Mac-build sites found by EWS)
https://bugs.webkit.org/show_bug.cgi?id=128042

Reviewed by Sam Weinig.

* Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeString):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::createGDIFont):
(WebCore::FontCache::getTraitsInFamily):
* platform/network/DataURL.cpp:
(WebCore::handleDataURL):
* platform/win/BString.cpp:
(WebCore::BString::BString):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::createGlobalData):
* platform/win/FileSystemWin.cpp:
(WebCore::pathByAppendingComponent):
(WebCore::fileSystemRepresentation):
* platform/win/PasteboardWin.cpp:
(WebCore::filesystemPathFromUrlOrTitle):
(WebCore::Pasteboard::writeURLToDataObject):
(WebCore::createGlobalImageFileDescriptor):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
Call deprecatedCharacters instead of characters.

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

7 years agoSpeculative OSX build fix.
enrica@apple.com [Sun, 2 Feb 2014 02:45:52 +0000 (02:45 +0000)]
Speculative OSX build fix.

Excluding WKActionSheet.mm and WKActionSheetAssistant.mm.

* Configurations/WebKit2.xcconfig:

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

7 years agoAdd support for ActionSheets in WK2 for iOS.
enrica@apple.com [Sun, 2 Feb 2014 02:37:43 +0000 (02:37 +0000)]
Add support for ActionSheets in WK2 for iOS.
https://bugs.webkit.org/show_bug.cgi?id=127586
<rdar://problem/15283667>

Reviewed by Benjamin Poulain.

Source/WebCore:

Updates the localizable strings for action sheets.

* English.lproj/Localizable.strings:

Source/WebKit2:

This patch adds the default support for Action Sheets
in WK2 for iOS. WKActionSheet is the implementation of the
sheet itself that inherits from UIActionSheet and handles
the repositioning of the sheet after rotation for iPad.
WKActionSheetAssistant is the controller class that implements
the delegate methods, controls the lifetime of the action sheet
object and performs the actions.
We have 3 different types of sheets:
   - link sheet, displayed when the target element is a link
   - image sheet, when the target element is an image
   - data detector sheet when the target is an element
     recognized by the data detectors library.
Both link and image sheet have a set of default buttons, whereas
datadetector sheet in only populated by custom actions provided
by data detectors.
The link sheet provides the following default actions:
    - open, navigates to the URL
    - copy, copies the URL to the pasteboard
    - add to reading list
The image sheet provides the following actions depending on whether
the image is contained inside an anchor element or not.
If the image is NOT inside a link the following actions are provided:
   - copy, copies the image to the pasteboard
   - save image, saves the image in the photo library
Instead, if the image is inside an link:
   - open, navigates to the URL spcified by the link
   - copy, copies the link URL to the pasteboard
    - save image, saves the image in the photo library
    - add to reading list, adds the link URL to reading list.

* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
* Shared/ios/WKGestureTypes.h:
* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::saveImageToLibrary):
* UIProcess/API/ios/WKActionSheet.h: Added.
* UIProcess/API/ios/WKActionSheet.mm: Added.
(-[WKActionSheet initWithView:]):
(-[WKActionSheet dealloc]):
(-[WKActionSheet presentSheet]):
(-[WKActionSheet presentSheetFromRect:]):
(-[WKActionSheet doneWithSheet]):
(-[WKActionSheet willRotate]):
(-[WKActionSheet updateSheetPosition]):
(-[WKActionSheet didRotate]):
(-[WKElementActionInfo initWithInfo:location:title:rect:]):
(-[WKElementActionInfo dealloc]):
(-[WKElementAction initWithTitle:actionHandler:type:]):
(-[WKElementAction dealloc]):
(+[WKElementAction customElementActionWithTitle:actionHandler:]):
(copyElement):
(saveImage):
(addToReadingList):
(+[WKElementAction standardElementActionWithType:customTitle:]):
(+[WKElementAction standardElementActionWithType:]):
(-[WKElementAction runActionWithElementInfo:view:]):
* UIProcess/API/ios/WKActionSheetAssistant.h: Added.
* UIProcess/API/ios/WKActionSheetAssistant.mm: Added.
(-[WKActionSheetAssistant initWithView:]):
(-[WKActionSheetAssistant dealloc]):
(-[WKActionSheetAssistant setPage:WebKit::]):
(-[WKActionSheetAssistant superviewForSheet]):
(-[WKActionSheetAssistant _presentationRectForSheetGivenPoint:inHostView:]):
(-[WKActionSheetAssistant hostViewForSheet]):
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentSheet]):
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
(-[WKActionSheetAssistant updateSheetPosition]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/API/ios/WKInteractionView.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView initWithFrame:]):
(-[WKInteractionView dealloc]):
(-[WKInteractionView setPage:WebKit::]):
(-[WKInteractionView _showImageSheet]):
(-[WKInteractionView _showLinkSheet]):
(-[WKInteractionView _showDataDetectorsSheet]):
(-[WKInteractionView _actionForLongPress]):
(-[WKInteractionView _updatePositionInformation]):
(-[WKInteractionView _longPressRecognized:]):
(-[WKInteractionView _positionInformationDidChange:]):
(-[WKInteractionView _performAction:]):
(-[WKInteractionView _updateAccessory]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startInteractionWithElementAtPosition):
(WebKit::WebPageProxy::stopInteraction):
(WebKit::WebPageProxy::performActionOnElement):
(WebKit::WebPageProxy::saveImageToLibrary):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::containingLinkElement):
(WebKit::WebPage::getPositionInformation):
(WebKit::WebPage::startInteractionWithElementAtPosition):
(WebKit::WebPage::stopInteraction):
(WebKit::WebPage::performActionOnElement):

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

7 years agoJSC profiler should show reasons for jettison
fpizlo@apple.com [Sun, 2 Feb 2014 02:25:13 +0000 (02:25 +0000)]
JSC profiler should show reasons for jettison
https://bugs.webkit.org/show_bug.cgi?id=128047

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Henceforth if you want to jettison a CodeBlock, you gotta tell the Profiler why you did
it. This makes figuring out convergence issues - where some code seems to take a long
time to get into the top tier compiler - a lot easier.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::setSteppingMode):
* bytecode/CodeBlock.h:
* bytecode/CodeBlockJettisoningWatchpoint.cpp:
(JSC::CodeBlockJettisoningWatchpoint::fireInternal):
* bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp:
(JSC::ProfiledCodeBlockJettisoningWatchpoint::fireInternal):
* dfg/DFGOperations.cpp:
* jit/JITOperations.cpp:
* profiler/ProfilerCompilation.cpp:
(JSC::Profiler::Compilation::Compilation):
(JSC::Profiler::Compilation::toJS):
* profiler/ProfilerCompilation.h:
(JSC::Profiler::Compilation::setJettisonReason):
* profiler/ProfilerJettisonReason.cpp: Added.
(WTF::printInternal):
* profiler/ProfilerJettisonReason.h: Added.
* runtime/CommonIdentifiers.h:
* runtime/VM.cpp:
(JSC::SetEnabledProfilerFunctor::operator()):

Tools:

Reviewed by Geoffrey Garen.

Gave the tool a "log" command, that tells you all of the interesting things
that happened to a piece of bytecode, from the standpoint of optimization.
It's a great summary view for seeing how our tier-up machinery works.

This uses a lot of information that was already available, plus the newly
added jettisonReason field.

* Scripts/display-profiler-output:

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

7 years agoFactor URL decomposition methods (from URLUtils interface) into a base template
mjs@apple.com [Sun, 2 Feb 2014 02:18:09 +0000 (02:18 +0000)]
Factor URL decomposition methods (from URLUtils interface) into a base template
https://bugs.webkit.org/show_bug.cgi?id=128052

Reviewed by Sam Weinig.

Refactoring only; no new tests.

* html/DOMURL.cpp:
* html/DOMURL.h:
(WebCore::DOMURL::href): Moved to header and made inline.
* html/URLUtils.h: Added.
(WebCore::URLUtils::href): Downcast and call the derived class.
(WebCore::URLUtils::setHref): Downcast and call the derived class.
Functions below factored out from DOMURL.cpp.
(WebCore::URLUtils<T>::toString):
(WebCore::URLUtils<T>::origin):
(WebCore::URLUtils<T>::protocol):
(WebCore::URLUtils<T>::setProtocol):
(WebCore::URLUtils<T>::username):
(WebCore::URLUtils<T>::setUsername):
(WebCore::URLUtils<T>::password):
(WebCore::URLUtils<T>::setPassword):
(WebCore::URLUtils<T>::host):
(WebCore::parsePortFromStringPosition):
(WebCore::URLUtils<T>::setHost):
(WebCore::URLUtils<T>::hostname):
(WebCore::URLUtils<T>::setHostname):
(WebCore::URLUtils<T>::port):
(WebCore::URLUtils<T>::setPort):
(WebCore::URLUtils<T>::pathname):
(WebCore::URLUtils<T>::setPathname):
(WebCore::URLUtils<T>::search):
(WebCore::URLUtils<T>::setSearch):
(WebCore::URLUtils<T>::hash):
(WebCore::URLUtils<T>::setHash):

Add mention of new header.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

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

7 years agoIDB: Implement IDBCursor.delete()
beidson@apple.com [Sun, 2 Feb 2014 01:58:16 +0000 (01:58 +0000)]
IDB: Implement IDBCursor.delete()
<rdar://problem/15944203> and https://bugs.webkit.org/show_bug.cgi?id=127882

Reviewed by Sam Weinig.

IDBCursor.delete() actually relies on deleteRange(), which was implemented earlier.
So the only thing keeping it from working was a "Cursors iterate past their end" bug,
causing the delete transaction to be aborted.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advanceOnce): When the cursor does the final iteration,
  clear the previous values to indicate completion.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::clearCursors): Noticed this opportunistic cleanup to
  iterate over unique_ptr<>s with an auto& instead of an auto.

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

7 years agoImprove the JavaScript bindings of DatasetDOMStringMap
benjamin@webkit.org [Sun, 2 Feb 2014 00:16:15 +0000 (00:16 +0000)]
Improve the JavaScript bindings of DatasetDOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=127971

Unriewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-01

* dom/DatasetDOMStringMap.cpp:
* dom/DatasetDOMStringMap.h:
Follow up for r163239. Darin pointed out the #includes are wrong.

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

7 years agoText interaction assistant is not deleted when dismissing the keyboard on iPad.
enrica@apple.com [Sun, 2 Feb 2014 00:10:03 +0000 (00:10 +0000)]
Text interaction assistant is not deleted when dismissing the keyboard on iPad.
https://bugs.webkit.org/show_bug.cgi?id=128034
<rdar://problem/15915695>

Reviewed by Dan Bernstein.

In iPhone mode, tapping on 'Done' in the accessory view
calls the delegate accessoryDone where we correctly blur
the assisted node and tear down the text interaction assistant.
The code path for the keyboard in iPad mode is different,
all we get is resignFirstResponder.
The fix is just to move the blurring in resignFirstResponder
and it works for both iPhone and iPad.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView resignFirstResponder]):
(-[WKInteractionView accessoryDone]):

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

7 years agoIDB: Implement IDBObjectStore.delete()
beidson@apple.com [Sat, 1 Feb 2014 21:00:30 +0000 (21:00 +0000)]
IDB: Implement IDBObjectStore.delete()
https://bugs.webkit.org/show_bug.cgi?id=127880

Reviewed by Sam Weinig.

Source/WebCore:

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::compare): Make this const.
* Modules/indexeddb/IDBKeyData.h:

* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::isExactlyOneKey): Returns whether or not
  the key range is known to represent precisely one key.
* Modules/indexeddb/IDBKeyRangeData.h:

* WebCore.exp.in:

Source/WebKit2:

Implementing IDBObjectStore.delete() involves filling in the already-stubbed deleteRange() method.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Call through to the backing store.

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRange): Call deleteRecord on each key represented
  by the passed-in keyRange. This involves collecting each key using a cursor.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteRecord): Delete an individual record from the
  object store and all associated indexes.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Teach the SQLiteIDBCursor to remember if it ended in an error condition:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::SQLiteIDBCursor):
(WebKit::SQLiteIDBCursor::advanceOnce):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.h:
(WebKit::SQLiteIDBCursor::didError):

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

7 years agoSVGTextLayoutAttributesBuilder shouldn't use RenderText::deprecatedCharacters()
andersca@apple.com [Sat, 1 Feb 2014 20:37:15 +0000 (20:37 +0000)]
SVGTextLayoutAttributesBuilder shouldn't use RenderText::deprecatedCharacters()
https://bugs.webkit.org/show_bug.cgi?id=128048

Reviewed by Sam Weinig.

Change UChar*& lastCharacter to bool& lastCharacterWasSpace since that's what the parameter was used for.

* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
Initialize lastCharacterWasSpace to true to match the previous behavior.

(WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
Ditto.

(WebCore::processRenderSVGInlineText):
Take a reference instead of a pointer, get the character using RenderText::operator[] and compute lastCharacterWasSpace.

(WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
This now takes a bool reference instead.

* rendering/svg/SVGTextLayoutAttributesBuilder.h:

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

7 years agoSaying "jitType() == JITCode::DFGJIT" is almost never correct.
mark.lam@apple.com [Sat, 1 Feb 2014 20:29:23 +0000 (20:29 +0000)]
Saying "jitType() == JITCode::DFGJIT" is almost never correct.
<http://webkit.org/b/128045>

Reviewed by Filip Pizlo.

JITCode::isOptimizingJIT(jitType()) is the right way to say it.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::setSteppingMode):
* runtime/VM.cpp:
(JSC::SetEnabledProfilerFunctor::operator()):

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

7 years agoIDB: Index reading
beidson@apple.com [Sat, 1 Feb 2014 19:11:38 +0000 (19:11 +0000)]
IDB: Index reading
<rdar://problem/15899973> and https://bugs.webkit.org/show_bug.cgi?id=127868

Reviewed by Jer Noble.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord): Using an index cursor, read a value.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years agoIDB: Index cursor complete advance() and iterate() support
beidson@apple.com [Sat, 1 Feb 2014 19:04:02 +0000 (19:04 +0000)]
IDB: Index cursor complete advance() and iterate() support
<rdar://problem/15941916> and https://bugs.webkit.org/show_bug.cgi?id=127870

Reviewed by Dan Bernstein.

Source/WebCore:

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Always use the value buffer for the script object.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::advanceOnce): Look up the found record value from the
  object store records based on the key we found from the index.

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

7 years agoUpdate WebCrypto JWK mapping to use key_ops
ap@apple.com [Sat, 1 Feb 2014 18:14:17 +0000 (18:14 +0000)]
Update WebCrypto JWK mapping to use key_ops
https://bugs.webkit.org/show_bug.cgi?id=127609

Reviewed by Sam Weinig.

Source/WebCore:

Updated JWK support ot match current editor draft.

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::getJSArrayFromJSON): Fixed this previously untested function to actually work.
(WebCore::tryJWKKeyOpsValue):
(WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
(WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Removed an old comment,
these things are now specced.
(WebCore::addToJSON): Made static functions file static, there is no reason for
them to be class members.
(WebCore::buildJSONForOctetSequence):
(WebCore::buildJSONForRSAComponents):
(WebCore::addBoolToJSON):
(WebCore::addJWKAlgorithmToJSON):
(WebCore::addUsagesToJSON):
(WebCore::JSCryptoKeySerializationJWK::serialize):
* bindings/js/JSCryptoKeySerializationJWK.h:

* crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
Check for length, so that we don't fail silently.

LayoutTests:

* crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt:
* crypto/subtle/aes-kw-wrap-unwrap-aes.html:
Removed a subtest for wrapping JWK. That doesn't really work per the spec, because
JWK is arbitatry length, and AES-KW requires 8*n bytes.

* crypto/subtle/aes-export-key-expected.txt:
* crypto/subtle/aes-export-key.html:
* crypto/subtle/hmac-export-key-expected.txt:
* crypto/subtle/hmac-export-key.html:
* crypto/subtle/jwk-export-use-values-expected.txt:
* crypto/subtle/jwk-export-use-values.html:
* crypto/subtle/jwk-import-use-values-expected.txt:
* crypto/subtle/jwk-import-use-values.html:
* crypto/subtle/rsa-export-key-expected.txt:
* crypto/subtle/rsa-export-key.html:
* crypto/subtle/rsa-export-private-key-expected.txt:
* crypto/subtle/rsa-export-private-key.html:
* crypto/subtle/rsa-oaep-key-manipulation-expected.txt:
* crypto/subtle/rsa-oaep-key-manipulation.html:
* crypto/subtle/rsa-postMessage-expected.txt:
* crypto/subtle/rsa-postMessage.html:
Updated for the fix.

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

7 years agoAdd webView:didFailNavigation:withError: delegate method
andersca@apple.com [Sat, 1 Feb 2014 17:31:48 +0000 (17:31 +0000)]
Add webView:didFailNavigation:withError: delegate method
https://bugs.webkit.org/show_bug.cgi?id=128022

Reviewed by Darin Adler.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFailLoadWithErrorForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):

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

7 years agoAdd security-checked casts for all WebCore::CachedResource subclasses
ddkilzer@apple.com [Sat, 1 Feb 2014 16:32:11 +0000 (16:32 +0000)]
Add security-checked casts for all WebCore::CachedResource subclasses
<http://webkit.org/b/127988>

Reviewed by Darin Adler.

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
- Switch from static_cast<>() to security-checked cast.

* loader/cache/CachedCSSStyleSheet.h:
(WebCore::toCachedCSSStyleSheet): Add.
* loader/cache/CachedFont.h:
(WebCore::toCachedFont): Add.

* loader/cache/CachedImage.h: Make CachedImageManual final.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource): Add assert that
only MainResource or RawResource types are used to construct a
CachedRawResource.  This may be a security issue depending on
what code exists that uses the type() value to cast to a
CachedResource subclass.
(WebCore::CachedRawResource::switchClientsToRevalidatedResource):
Switch from static_cast<>() to toCachedRawResource().

* loader/cache/CachedRawResource.h:
(WebCore::toCachedRawResource): Add.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isMainOrRawResource): Add.  A
CachedRawResource could be either a MainResource or a
RawResource.  Currently only used in assertions.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestMainResource):
- Switch from static_cast<>() to security-checked cast.

* loader/cache/CachedSVGDocument.h:
(WebCore::toCachedSVGDocument): Add.
* loader/cache/CachedScript.h:
(WebCore::toCachedScript): Add.
* loader/cache/CachedTextTrack.h:
(WebCore::toCachedTextTrack): Add.
* loader/cache/CachedXSLStyleSheet.h:
(WebCore::toCachedXSLStyleSheet): Add.

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

7 years agoREGRESSION (r163027?): CrashTracer: [USER] com.apple.WebKit.WebContent.Development...
msaboff@apple.com [Sat, 1 Feb 2014 15:30:41 +0000 (15:30 +0000)]
REGRESSION (r163027?): CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.JavaScriptCore: JSC::ArrayProfile::computeUpdatedPrediction + 4
https://bugs.webkit.org/show_bug.cgi?id=128037

Reviewed by Mark Lam.

op_call_varargs ops now needs an ArrayProfile since DFG inlines these since
change set r162739.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCallVarargs):

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

7 years agoUnreviewed. Fixed GTK+ CMake build after r162922.
calvaris@igalia.com [Sat, 1 Feb 2014 15:15:56 +0000 (15:15 +0000)]
Unreviewed. Fixed GTK+ CMake build after r162922.

* PlatformGTK.cmake: Removed SoupURIUtils.cpp from the
compilation.

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

7 years agoImprove the JavaScript bindings of DatasetDOMStringMap
benjamin@webkit.org [Sat, 1 Feb 2014 08:10:27 +0000 (08:10 +0000)]
Improve the JavaScript bindings of DatasetDOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=127971

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-01
Reviewed by Sam Weinig.

Source/WebCore:

Instead of querying contains() followed by item(), just get the item
at once in the custom binding.

Test: fast/dom/dataset-name-getter-properties.html

* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
* dom/DOMStringMap.idl:
* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::item):
* dom/DatasetDOMStringMap.h:

LayoutTests:

* fast/dom/dataset-name-getter-properties-expected.txt: Added.
* fast/dom/dataset-name-getter-properties.html: Added.

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

7 years agoRemove LEGACY_VIEWPORT_ADAPTION
benjamin@webkit.org [Sat, 1 Feb 2014 08:05:21 +0000 (08:05 +0000)]
Remove LEGACY_VIEWPORT_ADAPTION
https://bugs.webkit.org/show_bug.cgi?id=128028

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-31
Reviewed by Anders Carlsson.

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:

The code is incorrect and was only supported by Nix.

* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/ViewportArguments.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):

Source/WTF:

* wtf/FeatureDefines.h:

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