WebKit-https.git
5 years agoRenderLayerModelObject shouldn't need a pre-destructor hook.
akling@apple.com [Mon, 3 Nov 2014 18:39:08 +0000 (18:39 +0000)]
RenderLayerModelObject shouldn't need a pre-destructor hook.
<https://webkit.org/b/138314>

Reviewed by Antti Koivisto.

Move code from the willBeDestroyed() pre-destructor hook to the regular
~RenderLayerModelObject() destructor.

We just need to unregister the renderer from the FrameView's set of
viewport-constrained objects. That doesn't require being able to walk
the render tree or call virtuals, which is the main reason you'd use
willBeDestroyed().

* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::~RenderLayerModelObject):
(WebCore::RenderLayerModelObject::willBeDestroyed): Deleted.
* rendering/RenderLayerModelObject.h:

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

5 years agoImplement action menus for editable text
bdakin@apple.com [Mon, 3 Nov 2014 18:38:44 +0000 (18:38 +0000)]
Implement action menus for editable text
https://bugs.webkit.org/show_bug.cgi?id=138284
-and corresponding-
rdar://problem/18742323

Reviewed by Tim Horton.

New item type for paste.
* Shared/API/c/WKActionMenuItemTypes.h:

New menu type for editable text.
* Shared/API/c/WKActionMenuTypes.h:
* UIProcess/mac/WKActionMenuController.mm:

willOpenMenu should select text for both regular text menus and editable text
menus.
(-[WKActionMenuController willOpenMenu:withEvent:]):

Default items for editable text.
(-[WKActionMenuController _defaultMenuItemsForEditableText]):
(-[WKActionMenuController _paste:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):

New method _hitTestResultForStage:(MenuUpdateStage)stage will figure out whether
we can use the WebHitTestResult from the ActionMenuHitTestResult or if we have to
use the potentially out-of-date WebHitTestResult that is cached on WebPageProxy.
An important difference between these results is that the ActionMenuHitTest
result, in addition to being more recent and accurate, also now includes shadow
content, which affects some editable regions on important sites such as
bugs.webkit.org and nytimes.com.
(-[WKActionMenuController _defaultMenuItems:]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]):
(imageForResource:name::if): Deleted.

Allow shadow content in action menu hit testing.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::selectLookupTextAtLocation):

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

5 years agoPersist the page's muted state across web process crashes.
adachan@apple.com [Mon, 3 Nov 2014 18:36:57 +0000 (18:36 +0000)]
Persist the page's muted state across web process crashes.
https://bugs.webkit.org/show_bug.cgi?id=138195

Reviewed by Anders Carlsson.

Store the Page's muted state in WebPageCreationParameters so that state can be properly
restored after recovering from a crash in the web process.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize m_muted.
(WebKit::WebPageProxy::setMuted):
Update m_muted.
(WebKit::WebPageProxy::creationParameters):
Set the muted data member in WebPageCreationParameters.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Initialize the page's muted state with the muted value from WebPageCreationParameters.

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

5 years ago[EFL] Fix the build if LOG_DISABLED=0 in release mode
commit-queue@webkit.org [Mon, 3 Nov 2014 18:01:06 +0000 (18:01 +0000)]
[EFL] Fix the build if LOG_DISABLED=0 in release mode
https://bugs.webkit.org/show_bug.cgi?id=138309

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-11-03
Reviewed by Chris Dumez.

* platform/efl/LoggingEfl.cpp:

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

5 years agoAdd scope operand to op_resolve_scope
msaboff@apple.com [Mon, 3 Nov 2014 17:56:29 +0000 (17:56 +0000)]
Add scope operand to op_resolve_scope
https://bugs.webkit.org/show_bug.cgi?id=138253

Reviewed by Mark Lam.

Added scope operand to op_resolve_scope.  Although the scope register is filled in with
the ScopeChain register, this operand is not used in the processing of the bytecode.
That will be addressed in a future patch.

* bytecode/BytecodeList.json: Lengthened the three bytecodes.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Added code to dump the scope operand.

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
Updated the operand indecies for the processing of op_resolve_scope.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolveScope):
(JSC::BytecodeGenerator::emitGetOwnScope):
(JSC::BytecodeGenerator::emitReturn):
Added scope register to these emit functions and the bytecodes they emit.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
Updated the operand indecies for the processing of op_resolve_scope.

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

5 years ago[EFL] Unskip passing ENCRYPTED_MEDIA_V2 tests
evab.u-szeged@partner.samsung.com [Mon, 3 Nov 2014 15:47:08 +0000 (15:47 +0000)]
[EFL] Unskip passing ENCRYPTED_MEDIA_V2 tests
https://bugs.webkit.org/show_bug.cgi?id=138133

Reviewed by Csaba Osztrogonác.

* platform/efl/TestExpectations:

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

5 years ago[ninja] Don't remove response files for verbose builds
evab.u-szeged@partner.samsung.com [Mon, 3 Nov 2014 11:46:00 +0000 (11:46 +0000)]
[ninja] Don't remove response files for verbose builds
https://bugs.webkit.org/show_bug.cgi?id=137816

Reviewed by Csaba Osztrogonác.

* Scripts/webkitdirs.pm:
(determineNinjaVersion):
(buildCMakeGeneratedProject):

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

5 years ago[EFL] Remove dependency of PageViewportController from PageViewportControllerClient
ryuan.choi@gmail.com [Mon, 3 Nov 2014 11:26:50 +0000 (11:26 +0000)]
[EFL] Remove dependency of PageViewportController from PageViewportControllerClient
https://bugs.webkit.org/show_bug.cgi?id=138301

Reviewed by Gyuyoung Kim.

PaeViewportControllerClient does not need to keep the instance of PageViewPortController.
This patch removes it to simplify relation between them.
In addition, uses a reference for the client of PageViewportController.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::setViewportPosition):
* UIProcess/API/efl/EwkView.h:
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::didChangeContentsSize):
(WebKit::PageViewportController::didRenderFrame):
(WebKit::PageViewportController::pageDidRequestScroll):
(WebKit::PageViewportController::syncVisibleContents):
(WebKit::PageViewportController::didChangeViewportAttributes):
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/PageViewportControllerClient.h:
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
(WebKit::PageViewportControllerClientEfl::setViewportPosition):
(WebKit::PageViewportControllerClientEfl::setController): Deleted.
* UIProcess/efl/PageViewportControllerClientEfl.h:

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

5 years agoMove 'zoom' CSS property to the new StyleBuilder
cdumez@apple.com [Mon, 3 Nov 2014 11:08:33 +0000 (11:08 +0000)]
Move 'zoom' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138297

Reviewed by Antti Koivisto.

Move 'zoom' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code as it requires special handling.

No new tests, no behavior change.

* css/makeprop.pl:
Add support for Custom=All StyleBuilder option to indicate
that the property requires custom code to set the initial,
inherit and current values.

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

5 years agoAX: Fix some minor typos related to the word "accessibility".
commit-queue@webkit.org [Mon, 3 Nov 2014 08:22:22 +0000 (08:22 +0000)]
AX: Fix some minor typos related to the word "accessibility".
https://bugs.webkit.org/show_bug.cgi?id=138299

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2014-11-03
Reviewed by Chris Fleizach.

Source/WebCore:

No new tests, no behavior change.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessibilityObjectInnerText):
(WebCore::AccessibilityNodeObject::textUnderElement):
(WebCore::shouldUseAccessiblityObjectInnerText): Deleted.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getRunAttributesFromAccessibilityObject):
(webkitAccessibleTextGetRunAttributes):
(getRunAttributesFromAccesibilityObject): Deleted.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):

Source/WebCore/platform/gtk/po:

No new tests, no behavior change.

* en_CA.po:

Source/WebKit/win:

No new tests, no behavior change.

* AccessibleBase.h:

Source/WebKit2:

No new tests, no behavior change.

* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:

LayoutTests:

* accessibility/aria-link-supports-press.html:

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

5 years ago[GTK] Fix the build of FTL JIT
commit-queue@webkit.org [Mon, 3 Nov 2014 07:53:11 +0000 (07:53 +0000)]
[GTK] Fix the build of FTL JIT
https://bugs.webkit.org/show_bug.cgi?id=138298

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-02
Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake:
Remove the need for the LIBCXXABI package.

Tools:

* gtk/jhbuild-optional.modules:
Bump up LLVM version to 3.5.0 release and apply patches.
* gtk/patches/llvm-elf-add-stackmaps.patch:
Added. Adds .llvm_stackmaps section to ELF files. Backported from LLVM
trunk.
* gtk/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch:
Added. Ensures that PC-relative relocations in EH frames are not
truncated to 32 bits on x86_64.

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

5 years agoMove string-typed properties to the new StyleBuilder
cdumez@apple.com [Sun, 2 Nov 2014 22:47:30 +0000 (22:47 +0000)]
Move string-typed properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138295

Reviewed by Antti Koivisto.

Move string-typed properties to the new StyleBuilder:
-webkit-hyphenate-character
-webkit-line-grid
-webkit-flow-into
-webkit-flow-from

No new tests, no behavior change.

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

5 years agoUnreviewed, rebaseline bindings tests after r175462.
cdumez@apple.com [Sun, 2 Nov 2014 18:19:33 +0000 (18:19 +0000)]
Unreviewed, rebaseline bindings tests after r175462.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::constructJSTestObj):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionClassMethod2):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionAny):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):

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

5 years agoReduce the cost of argumentCount checks in the JS bindings
cdumez@apple.com [Sun, 2 Nov 2014 16:37:59 +0000 (16:37 +0000)]
Reduce the cost of argumentCount checks in the JS bindings
https://bugs.webkit.org/show_bug.cgi?id=138289

Reviewed by Sam Weinig.

Slightly reduce the cost of argumentCount checks in the JS bindings by
hinting to the compiler that it is UNLIKELY that those methods are
called with too few arguments.

I see a 3% progression on PerformanceTests/DOM/DOMDivWalk.html
performance test.

No new tests, no behavior change.

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

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

5 years ago[CSS] Add tests for :read-only and :read-write
ktf.kim@samsung.com [Sun, 2 Nov 2014 07:06:20 +0000 (07:06 +0000)]
[CSS] Add tests for :read-only and :read-write
https://bugs.webkit.org/show_bug.cgi?id=92473

Add test case for :readonly and :readwrite pseudoclass for common elements

Reviewed by Benjamin Poulain.

* fast/css/readonly-pseudoclass-common-element-expected.txt: Added.
* fast/css/readonly-pseudoclass-common-element.html: Added.
* fast/css/readwrite-pseudoclass-editable-expected.txt: Added.
* fast/css/readwrite-pseudoclass-editable.html: Added.

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

5 years agoREGRESSION: Using a media element changes window.name
ap@apple.com [Sun, 2 Nov 2014 06:59:49 +0000 (06:59 +0000)]
REGRESSION: Using a media element changes window.name
https://bugs.webkit.org/show_bug.cgi?id=138278
rdar://problem/18704134

Reviewed by Jer Noble.

Source/WebCore:

Test: fast/media/window-name.html

Use an actual variable for name (and while at it, for "item" as well).

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
(Controller.prototype.disconnectControls):

LayoutTests:

* fast/media/window-name-expected.txt: Added.
* fast/media/window-name.html: Added.

* platform/mac/webarchive/loading/video-in-webarchive-expected.txt: Removed.
This result was incorrect due to this bug, and now Mac matches cross-platform
results.

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

5 years agoUnreviewed gardening.
cdumez@apple.com [Sun, 2 Nov 2014 06:55:40 +0000 (06:55 +0000)]
Unreviewed gardening.

Mark jquery/manipulation.html as flakey on Debug bots as marking it
as slow did not help.

* TestExpectations:

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

5 years agoMove "direction" CSS property to the new StyleBuilder
cdumez@apple.com [Sun, 2 Nov 2014 05:58:02 +0000 (05:58 +0000)]
Move "direction" CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138288

Reviewed by Sam Weinig.

Move "direction" CSS property to the new StyleBuilder by using custom
code as it requires special handling to call
Document::setDirectionSetOnDocumentElement() when necessary.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDirection::applyValue): Deleted.
(WebCore::ApplyPropertyDirection::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueDirection):

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

5 years agoUnreviewed, fix double-slash in previous gardening commit.
cdumez@apple.com [Sun, 2 Nov 2014 04:40:18 +0000 (04:40 +0000)]
Unreviewed, fix double-slash in previous gardening commit.

* TestExpectations:

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

5 years agoUnreviewed gardening.
cdumez@apple.com [Sun, 2 Nov 2014 03:17:11 +0000 (03:17 +0000)]
Unreviewed gardening.

Mark jquery/manipulation.html as slow on Debug builds until I can
investigate how to avoid this with timer throttling.

* TestExpectations:

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

5 years agoJavaScriptCore is missing debug info for bmalloc because libbmalloc.a is stripped
ddkilzer@apple.com [Sun, 2 Nov 2014 02:31:12 +0000 (02:31 +0000)]
JavaScriptCore is missing debug info for bmalloc because libbmalloc.a is stripped
<https://webkit.org/b/138286>
<rdar://problem/18847087>

Reviewed by Dan Bernstein.

* Configurations/bmalloc.xcconfig: Set STRIP_INSTALLED_PRODUCT
to NO for the target that produces libbmalloc.a so that the
debug symbols will be linked into JavaScriptCore and end up in
its dSYM file.

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

5 years agoMove the -webkit-transform property to the new StyleBuilder
weinig@apple.com [Sat, 1 Nov 2014 22:18:38 +0000 (22:18 +0000)]
Move the -webkit-transform property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138283

Reviewed by Chris Dumez.

Move the -webkit-transform property from StyleResolver to the new
generated StyleBuilder. Adds a converter for TransformOperations.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTransform):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/TransformFunctions.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):

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

5 years agoFix the specificity of the extended :not() selector
benjamin@webkit.org [Sat, 1 Nov 2014 18:11:11 +0000 (18:11 +0000)]
Fix the specificity of the extended :not() selector
https://bugs.webkit.org/show_bug.cgi?id=138275

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-01
Reviewed by Andreas Kling.

Source/WebCore:

The current draft says "The specificity of a :not() pseudo-class
is the specificity of the most specifc complex selector in its selector list."

It is still unclear how :not() plays with other new selectors. Until that is clarified,
this only handle the simple cases.

Tests: fast/css/not-self-specificity.html
       fast/css/not-specificity-1.html
       fast/css/not-specificity-2.html
       fast/css/not-specificity-3.html
       fast/css/not-specificity-4.html
       fast/css/not-specificity-5.html
       fast/css/not-specificity-6.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):

LayoutTests:

* fast/css/not-self-specificity-expected.html: Added.
* fast/css/not-self-specificity.html: Added.
Test that :not() itself does not influence the specificity,
only the nested selectors contribute to the global specificity.

* fast/css/not-specificity-1-expected.html: Added.
* fast/css/not-specificity-1.html: Added.
* fast/css/not-specificity-2-expected.html: Added.
* fast/css/not-specificity-2.html: Added.
* fast/css/not-specificity-3-expected.html: Added.
* fast/css/not-specificity-3.html: Added.
Tests for compound selectors.
All tests are variations of the same base testing specificity
and position.

* fast/css/not-specificity-4-expected.html: Added.
* fast/css/not-specificity-4.html: Added.
* fast/css/not-specificity-5-expected.html: Added.
* fast/css/not-specificity-5.html: Added.
* fast/css/not-specificity-6-expected.html: Added.
* fast/css/not-specificity-6.html: Added.
Same thing for complex selectors.

* fast/selectors/class-style-update-with-not-expected.txt:
Yeah, one more test fixed :)

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

5 years ago[EFL] Unreviewed EFL gardening.
gyuyoung.kim@samsung.com [Sat, 1 Nov 2014 11:16:06 +0000 (11:16 +0000)]
[EFL] Unreviewed EFL gardening.
https://bugs.webkit.org/show_bug.cgi?id=138276

Rebaseline after r175259.

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

* platform/efl/css1/basic/containment-expected.txt:
* platform/efl/css1/basic/contextual_selectors-expected.txt:
* platform/efl/css1/basic/grouping-expected.txt:
* platform/efl/css1/basic/id_as_selector-expected.txt:
* platform/efl/css1/basic/inheritance-expected.txt:
* platform/efl/css1/box_properties/border-expected.txt:
* platform/efl/css1/box_properties/border_bottom-expected.txt:
* platform/efl/css1/box_properties/border_bottom_inline-expected.txt:
* platform/efl/css1/box_properties/border_bottom_width-expected.txt:
* platform/efl/css1/box_properties/border_bottom_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_color-expected.txt:
* platform/efl/css1/box_properties/border_color_inline-expected.txt:
* platform/efl/css1/box_properties/border_inline-expected.txt:
* platform/efl/css1/box_properties/border_left-expected.txt:
* platform/efl/css1/box_properties/border_left_inline-expected.txt:
* platform/efl/css1/box_properties/border_left_width-expected.txt:
* platform/efl/css1/box_properties/border_left_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_right-expected.txt:
* platform/efl/css1/box_properties/border_right_inline-expected.txt:
* platform/efl/css1/box_properties/border_right_width-expected.txt:
* platform/efl/css1/box_properties/border_right_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_style-expected.txt:
* platform/efl/css1/box_properties/border_style_inline-expected.txt:
* platform/efl/css1/box_properties/border_top-expected.txt:
* platform/efl/css1/box_properties/border_top_inline-expected.txt:
* platform/efl/css1/box_properties/border_top_width-expected.txt:
* platform/efl/css1/box_properties/border_top_width_inline-expected.txt:
* platform/efl/css1/box_properties/border_width-expected.txt:
* platform/efl/css1/box_properties/border_width_inline-expected.txt:
* platform/efl/css1/box_properties/clear-expected.txt:
* platform/efl/css1/box_properties/clear_float-expected.txt:
* platform/efl/css1/box_properties/float-expected.txt:
* platform/efl/css1/box_properties/float_elements_in_series-expected.txt:
* platform/efl/css1/box_properties/float_margin-expected.txt:
* platform/efl/css1/box_properties/float_on_text_elements-expected.txt:
* platform/efl/css1/box_properties/height-expected.txt:
* platform/efl/css1/box_properties/margin-expected.txt:
* platform/efl/css1/box_properties/margin_bottom-expected.txt:
* platform/efl/css1/box_properties/margin_bottom_inline-expected.txt:
* platform/efl/css1/box_properties/margin_inline-expected.txt:
* platform/efl/css1/box_properties/margin_left-expected.txt:
* platform/efl/css1/box_properties/margin_left_inline-expected.txt:
* platform/efl/css1/box_properties/margin_right-expected.txt:
* platform/efl/css1/box_properties/margin_right_inline-expected.txt:
* platform/efl/css1/box_properties/margin_top-expected.txt:
* platform/efl/css1/box_properties/margin_top_inline-expected.txt:
* platform/efl/css1/box_properties/padding-expected.txt:
* platform/efl/css1/box_properties/padding_bottom-expected.txt:
* platform/efl/css1/box_properties/padding_bottom_inline-expected.txt:
* platform/efl/css1/box_properties/padding_inline-expected.txt:
* platform/efl/css1/box_properties/padding_left-expected.txt:
* platform/efl/css1/box_properties/padding_left_inline-expected.txt:
* platform/efl/css1/box_properties/padding_right-expected.txt:
* platform/efl/css1/box_properties/padding_right_inline-expected.txt:
* platform/efl/css1/box_properties/padding_top-expected.txt:
* platform/efl/css1/box_properties/padding_top_inline-expected.txt:
* platform/efl/css1/box_properties/width-expected.txt:
* platform/efl/css1/cascade/cascade_order-expected.txt:
* platform/efl/css1/cascade/important-expected.txt:
* platform/efl/css1/classification/display-expected.txt:
* platform/efl/css1/classification/list_style-expected.txt:
* platform/efl/css1/classification/list_style_image-expected.txt:
* platform/efl/css1/classification/list_style_position-expected.txt:
* platform/efl/css1/classification/list_style_type-expected.txt:
* platform/efl/css1/classification/white_space-expected.txt:
* platform/efl/css1/color_and_background/background-expected.txt:
* platform/efl/css1/color_and_background/background_attachment-expected.txt:
* platform/efl/css1/color_and_background/background_color-expected.txt:
* platform/efl/css1/color_and_background/background_image-expected.txt:
* platform/efl/css1/color_and_background/background_position-expected.txt:
* platform/efl/css1/color_and_background/background_repeat-expected.txt:
* platform/efl/css1/color_and_background/color-expected.txt:
* platform/efl/css1/conformance/forward_compatible_parsing-expected.txt:
* platform/efl/css1/font_properties/font-expected.txt:
* platform/efl/css1/font_properties/font_family-expected.txt:
* platform/efl/css1/font_properties/font_size-expected.txt:
* platform/efl/css1/font_properties/font_style-expected.txt:
* platform/efl/css1/font_properties/font_variant-expected.txt:
* platform/efl/css1/font_properties/font_weight-expected.txt:
* platform/efl/css1/formatting_model/canvas-expected.txt:
* platform/efl/css1/formatting_model/floating_elements-expected.txt:
* platform/efl/css1/formatting_model/height_of_lines-expected.txt:
* platform/efl/css1/formatting_model/inline_elements-expected.txt:
* platform/efl/css1/formatting_model/replaced_elements-expected.txt:
* platform/efl/css1/formatting_model/vertical_formatting-expected.txt:
* platform/efl/css1/pseudo/anchor-expected.txt:
* platform/efl/css1/pseudo/firstletter-expected.txt:
* platform/efl/css1/pseudo/firstline-expected.txt:
* platform/efl/css1/pseudo/multiple_pseudo_elements-expected.txt:
* platform/efl/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
* platform/efl/css1/text_properties/letter_spacing-expected.txt:
* platform/efl/css1/text_properties/line_height-expected.txt:
* platform/efl/css1/text_properties/text_align-expected.txt:
* platform/efl/css1/text_properties/text_decoration-expected.txt:
* platform/efl/css1/text_properties/text_indent-expected.txt:
* platform/efl/css1/text_properties/text_transform-expected.txt:
* platform/efl/css1/text_properties/vertical_align-expected.txt:
* platform/efl/css1/text_properties/word_spacing-expected.txt:
* platform/efl/css1/units/color_units-expected.txt:
* platform/efl/css1/units/length_units-expected.txt:
* platform/efl/css1/units/percentage_units-expected.txt:
* platform/efl/css1/units/urls-expected.txt:
* platform/efl/css2.1/t100801-c548-ln-ht-00-c-a-expected.txt:
* platform/efl/css2.1/t1606-c562-white-sp-00-b-ag-expected.txt:
* platform/efl/fast/css/empty-pseudo-class-expected.txt:
* platform/efl/fast/css/first-child-pseudo-class-expected.txt:
* platform/efl/fast/css/last-child-pseudo-class-expected.txt:
* platform/efl/fast/css/only-child-pseudo-class-expected.txt:
* platform/efl/fast/forms/targeted-frame-submission-expected.txt:
* platform/efl/fast/frames/onlyCommentInIFrame-expected.txt:
* platform/efl/fast/html/listing-expected.txt:
* platform/efl/fast/invalid/junk-data-expected.txt:
* platform/efl/fast/invalid/missing-end-tag-expected.txt:
* platform/efl/fast/loader/text-document-wrapping-expected.txt:
* platform/efl/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/efl/fast/parser/xhtml-alternate-entities-expected.txt:
* platform/efl/fast/table/border-collapsing/004-expected.txt:
* platform/efl/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/efl/fast/text/whitespace/001-expected.txt: Added.
* platform/efl/fast/text/whitespace/013-expected.txt: Added.
* platform/efl/fast/text/whitespace/014-expected.txt: Added.
* platform/efl/fast/text/whitespace/022-expected.txt:
* platform/efl/fast/text/whitespace/024-expected.txt:
* platform/efl/fast/text/whitespace/030-expected.txt:
* platform/efl/fast/xsl/xslt-extra-content-at-end-expected.txt:
* platform/efl/fast/xsl/xslt-missing-namespace-in-xslt-expected.txt:
* platform/efl/svg/hixie/error/012-expected.txt:
* platform/efl/tables/mozilla/bugs/45621-expected.txt:
* platform/efl/tables/mozilla/bugs/bug139524-2-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug21518-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug22122-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* platform/efl/tables/mozilla_expected_failures/marvin/backgr_fixed-bg-expected.txt:

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

5 years agoREGRESSION(r163656): Remote inspector doesn't work unless preferences change after...
carlosgc@webkit.org [Sat, 1 Nov 2014 09:59:09 +0000 (09:59 +0000)]
REGRESSION(r163656): Remote inspector doesn't work unless preferences change after page initialization
https://bugs.webkit.org/show_bug.cgi?id=138246

Reviewed by Joseph Pecoraro.

The problem is that initializeWebPage() is still using
pageGroup().preferences() instead of m_preferences to check if
developer extras are enabled to enable remote inspection of the page.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage): Use m_preferences
instead of pageGroup().preferences().

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

5 years agoREGRESSION(CMake): Make it possible to build without introspection
carlosgc@webkit.org [Sat, 1 Nov 2014 09:55:47 +0000 (09:55 +0000)]
REGRESSION(CMake): Make it possible to build without introspection
https://bugs.webkit.org/show_bug.cgi?id=138006

Reviewed by Philippe Normand.

.:

Add ENABLE_INTROSPECTION option.

* Source/PlatformGTK.cmake: Dot not add gir global target if
introspection is disabled.
* Source/cmake/OptionsGTK.cmake: Do not add gir individual targets if
introspection is disabled.

Source/JavaScriptCore:

Do not install introspection files when introspection is disabled.

* PlatformGTK.cmake:

Source/WebKit2:

Do not install introspection files when introspection is disabled.

* PlatformGTK.cmake:

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

5 years agoRemoved a reference to a file that’s been deleted.
mitz@apple.com [Sat, 1 Nov 2014 05:34:37 +0000 (05:34 +0000)]
Removed a reference to a file that’s been deleted.

* WebKit2.xcodeproj/project.pbxproj: Removed reference to XPCPtr.h.

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

5 years agoUse std::unique_ptr instead of OwnPtr in CoordinatorDrawingProxy
gyuyoung.kim@samsung.com [Sat, 1 Nov 2014 04:23:55 +0000 (04:23 +0000)]
Use std::unique_ptr instead of OwnPtr in CoordinatorDrawingProxy
https://bugs.webkit.org/show_bug.cgi?id=138238

Reviewed by Ryosuke Niwa.

* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy): Use std::make_unique.
(WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h: Use std::unique_ptr instead of OwnPtr.

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

5 years agoFix the Debug builds after r175446
benjamin@webkit.org [Sat, 1 Nov 2014 03:22:55 +0000 (03:22 +0000)]
Fix the Debug builds after r175446

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-31

* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):

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

5 years agoAdd initial parsing functionality of :lang pseudo class in Selectors Level 4.
commit-queue@webkit.org [Sat, 1 Nov 2014 03:06:27 +0000 (03:06 +0000)]
Add initial parsing functionality of :lang pseudo class in Selectors Level 4.
https://bugs.webkit.org/show_bug.cgi?id=138170

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2014-10-31
Reviewed by Benjamin Poulain.

Source/WebCore:

Add initial parsing functionality of :lang pseudo class in Selectors Level 4,
as specified in [1].

It parses comma-separated list of string arguments. Currently, it throws error
on arguments with "*" (e.g. :lang(zh, *-hant)).

Add additional test file fast/selectors/lang-invalid.html along side the
fast/css/css-selector-text.html.

[1] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo

Test: fast/selectors/lang-invalid.html

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setArgumentList):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setArgumentList):
* css/CSSSelector.h:
(WebCore::CSSSelector::argumentList):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

Add tests for comma-separated list arguments for :lang

* fast/css/css-selector-text-expected.txt: Updated.
* fast/css/css-selector-text.html: Updated.
* fast/selectors/lang-invalid-expected.txt: Added.
* fast/selectors/lang-invalid.html: Added.

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

5 years agoStyleBuilder: Stop using custom code for -webkit-hyphenate-limit-lines
cdumez@apple.com [Sat, 1 Nov 2014 01:31:46 +0000 (01:31 +0000)]
StyleBuilder: Stop using custom code for -webkit-hyphenate-limit-lines
https://bugs.webkit.org/show_bug.cgi?id=138270

Reviewed by Antti Koivisto.

Stop using custom code for -webkit-hyphenate-limit-lines in the new
StyleBuilder. We don't really need to, we can just have a Converter
specific to this property.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines): Deleted.

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

5 years agoAdd bundle SPI to customize the action menu
weinig@apple.com [Sat, 1 Nov 2014 01:07:48 +0000 (01:07 +0000)]
Add bundle SPI to customize the action menu
<rdar://problem/18830771>
https://bugs.webkit.org/show_bug.cgi?id=138271

Reviewed by Anders Carlsson.

- Adds a new function to the WKBundlePageContextMenuClient that allows the client to pass construct
  user data in the bundle that can be available when customizing the menu in -[WKView _actionMenuItemsForHitTestResult...].
- Changes the signature of  -[WKView _actionMenuItemsForHitTestResult...] to add userData.
- Makes the actual hit test result available in the second invocation of -[WKView _actionMenuItemsForHitTestResult...]
  by serializing it in the ActionMenuHitTestResult.

* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Adds the WebHitTestResult and the original hit test request location.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Adds a new version of _actionMenuItemsForHitTestResult that passes userData along.

* UIProcess/API/mac/WKView.mm:
(-[WKView _didPerformActionMenuHitTest:userData:]):
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
Pipe the user data through to the WKView.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]):
Differentiate between the two times _updateActionMenuItems was called via a new stage parameter,
(it is called once in prepareForMenu, and once in menuNeedsUpdate). Use the last mouse move hit
test result in the prepareForMenu case (as we don't have a real result yet), and the hit result
passed in via didPerformActionMenuHitTest in the menuNeedsUpdate case (assuming we didn't time out)
waiting on the web process.

* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Adds new bundle SPI to collect user data to pass to the -[WKView _actionMenuItemsForHitTestResult...] method.

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

5 years agoUse std::unique_ptr for TypeCountSet
gyuyoung.kim@samsung.com [Sat, 1 Nov 2014 00:26:36 +0000 (00:26 +0000)]
Use std::unique_ptr for TypeCountSet
https://bugs.webkit.org/show_bug.cgi?id=138242

Reviewed by Andreas Kling.

Source/JavaScriptCore:

* heap/Heap.cpp:
(JSC::Heap::protectedObjectTypeCounts):
Use std::unique_ptr<> instead of PassOwnPtr|OwnPtr.
(JSC::Heap::objectTypeCounts): ditto.
* heap/Heap.h:

Source/WebKit/mac:

* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Use std::unique_ptr<> instead of OwnPtr.
(+[WebCoreStatistics javaScriptObjectTypeCounts]): ditto.

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::javaScriptProtectedObjectTypeCounts): Use std::unique_ptr<> instead of OwnPtr.
(WebCoreStatistics::javaScriptObjectTypeCounts): ditto.

Source/WebKit2:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics): Use std::unique_ptr<> instead of OwnPtr.

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

5 years agoNo way to specify target os or architecture when using the --no-copy option with...
msaboff@apple.com [Sat, 1 Nov 2014 00:23:29 +0000 (00:23 +0000)]
No way to specify target os or architecture when using the --no-copy option with run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=138268

Reviewed by Andreas Kling.

Added a --arch and --os option to set or override the values that are
normally computed based on examining the JavaScriptCore we want to test.

* Scripts/run-jsc-stress-tests:

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

5 years agoSupport throttling of DOMTimers using nested setTimeout() calls
cdumez@apple.com [Sat, 1 Nov 2014 00:12:51 +0000 (00:12 +0000)]
Support throttling of DOMTimers using nested setTimeout() calls
https://bugs.webkit.org/show_bug.cgi?id=138262

Reviewed by Gavin Barraclough.

Extend DOMTimers throttling support to timers that are using nested
setTimeout() calls instead of a setInterval(). To achieve this, this
patch introduces a NestedTimersVector singleton class where nested
timers are appended, and for which we potentially update the next
firing time, after the parent timer is done executing.

I have verified this helps on cnn.com for example, which has timers
interacting with non-visible plugins that are scheduled using nested
setTimeout() calls with a frequency of 150 / 200 ms.

* page/DOMTimer.cpp:
(WebCore::NestedTimersVector::NestedTimersVector):
(WebCore::NestedTimersVector::~NestedTimersVector):
(WebCore::NestedTimersVector::registerTimer):
(WebCore::NestedTimersVector::begin):
(WebCore::NestedTimersVector::end):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:

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

5 years agoVersioning.
lforschler@apple.com [Fri, 31 Oct 2014 23:58:53 +0000 (23:58 +0000)]
Versioning.

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

5 years agoMove -webkit-marquee-increment property to the new StyleBuilder
cdumez@apple.com [Fri, 31 Oct 2014 23:46:20 +0000 (23:46 +0000)]
Move -webkit-marquee-increment property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138208

Reviewed by Andreas Kling.

Move -webkit-marquee-increment property from DeprecatedStyleBuilder to
the new StyleBuilder so that it is generated from CSSPropertyNames.in.
Custom code is used to set the value due to the !length.isUndefined()
check before calling setMarqueeIncrement().

Test: fast/css/webkit-marquee-increment-bad-value.html

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyLength::setValue): Deleted.
(WebCore::ApplyPropertyLength::applyValue): Deleted.
(WebCore::ApplyPropertyLength::createHandler): Deleted.
(WebCore::ApplyPropertyMarqueeIncrement::applyValue): Deleted.
(WebCore::ApplyPropertyMarqueeIncrement::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueWebkitMarqueeIncrement):

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

5 years agoBrace cleanup in StyleResolver::adjustRenderStyle()
simon.fraser@apple.com [Fri, 31 Oct 2014 23:38:12 +0000 (23:38 +0000)]
Brace cleanup in StyleResolver::adjustRenderStyle()
https://bugs.webkit.org/show_bug.cgi?id=138267

Reviewed by Chris Dumez.

No braces for single-line clauses.

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

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

5 years agollvmForJSC build emits a linker warning that it can't find usr/local/LLVMForJavaScrip...
mitz@apple.com [Fri, 31 Oct 2014 23:37:25 +0000 (23:37 +0000)]
llvmForJSC build emits a linker warning that it can't find usr/local/LLVMForJavaScriptCore/lib under the build directory
https://bugs.webkit.org/show_bug.cgi?id=138259

Reviewed by Geoff Garen.

* Scripts/copy-webkitlibraries-to-product-directory: Create this directory even if it’s
going to be empty to silence the warning.

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

5 years agoFix several warnings reported by clang static analyzer in WebCore
cdumez@apple.com [Fri, 31 Oct 2014 23:25:05 +0000 (23:25 +0000)]
Fix several warnings reported by clang static analyzer in WebCore
https://bugs.webkit.org/show_bug.cgi?id=138258

Reviewed by Joseph Pecoraro.

Fix several warnings reported by clang static analyzer in WebCore
related to variable unnecessary assignments and scope.

No new tests, no behavior change.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* inspector/InspectorStyleTextEditor.cpp:
(WebCore::InspectorStyleTextEditor::replaceProperty):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
* page/DragController.cpp:
(WebCore::createMouseEvent):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):

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

5 years agoWhitespace cleanup in Screen.h
simon.fraser@apple.com [Fri, 31 Oct 2014 23:21:36 +0000 (23:21 +0000)]
Whitespace cleanup in Screen.h
https://bugs.webkit.org/show_bug.cgi?id=138265

Reviewed by Chris Dumez.

No indent for namespaces. Mark 'final'. Fix * placement.

* page/Screen.h:
(WebCore::Screen::create):

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

5 years agoChange the ScrollingThread code to use RunLoop::main().dispatch() rather than callOnM...
simon.fraser@apple.com [Fri, 31 Oct 2014 23:14:46 +0000 (23:14 +0000)]
Change the ScrollingThread code to use RunLoop::main().dispatch() rather than callOnMainThread(), which has Obj-C overhead
https://bugs.webkit.org/show_bug.cgi?id=138263

Reviewed by Geoffrey Garen.

callOnMainThread() uses -performSelector:onMainThread:withObject:waitUntilDone:, so
it's slightly more efficient to use RunLoop::main().dispatch().

* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::invalidate):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::handleWheelEventPhase):

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

5 years agoPseudo classes with an escaped parenthesis generate invalid rules
benjamin@webkit.org [Fri, 31 Oct 2014 23:10:04 +0000 (23:10 +0000)]
Pseudo classes with an escaped parenthesis generate invalid rules
https://bugs.webkit.org/show_bug.cgi?id=138266

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-31
Reviewed by Antti Koivisto.

Source/WebCore:

Since the functional pseudo classes are part of the list of PseudoClassAndCompatibilityElement,
they could be created by the rule
     pseudo:
         ':' IDENT
if the parenthesis is escaped. For example, with ":not\\(", the IDENT would be
"not(", CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector would
find a pseudo class type of PseudoClassNot, and the action would create an invalid
CSSSelector for a :not() without nested selector.

This patch fixes the issue by detecting the function case in
CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector().

An other solution would be to split PseudoClassAndCompatibilityElement into simple pseudo class
and functional pseudo classes. We may do that some day but at the moment it is a lot of work with
a little benefit.

Tests: fast/css/crash-on-incomplete-webkit-any.html
       fast/css/pseudo-escaped-parenthesis.html
       fast/selectors/invalid-functional-pseudo-class.html

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):

LayoutTests:

* fast/selectors/invalid-functional-pseudo-class-expected.txt: Added.
* fast/selectors/invalid-functional-pseudo-class.html: Added.
New test for all the functional pseudo classes.

* fast/css/crash-on-incomplete-webkit-any-expected.txt: Added.
* fast/css/crash-on-incomplete-webkit-any.html: Added.
* fast/css/pseudo-escaped-parenthesis-expected.txt: Added.
* fast/css/pseudo-escaped-parenthesis.html: Added.
Those tests come from blink. Rune solved the same problem a year ago on blink
in https://chromiumcodereview.appspot.com/23710067
The patch is quite different because blink uses an ancient code base, but the tests
can still be useful so I included them here.

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

5 years ago[WK2] Send origin & deletion requests to WebProcessess in additon to the DatabaseProcess.
jer.noble@apple.com [Fri, 31 Oct 2014 23:07:07 +0000 (23:07 +0000)]
[WK2] Send origin & deletion requests to WebProcessess in additon to the DatabaseProcess.
https://bugs.webkit.org/show_bug.cgi?id=138212

Reviewed by Brady Eidson.

Now that the WebProcess has its own WebOriginDataManager, WebOriginDataManagerProxy needs to
send its origin and deletion messages to all the WebProcesses. This necessetates synchronizing
all the various process's callbacks so that the final callback is only triggered once all the
messaged processes reply.

Add a simple class, CallbackSynchronizer, which will keep track of outstanding process callbacks
and which will trigger the final callback once all of them finish.

* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::CallbackSynchronizer::create):
(WebKit::CallbackSynchronizer::~CallbackSynchronizer):
(WebKit::CallbackSynchronizer::taskStarted):
(WebKit::CallbackSynchronizer::taskCompleted):
(WebKit::CallbackSynchronizer::CallbackSynchronizer):
(WebKit::createSynchronizedCallback):
(WebKit::sendMessageToAllProcessesInContext):
(WebKit::WebOriginDataManagerProxy::getOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManagerProxy::deleteAllEntries):

Drive-by fix: check the correct enum value for WebMedia origin requests.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getOrigins):
(WebKit::WebProcess::deleteEntriesForOrigin):
(WebKit::WebProcess::deleteEntriesModifiedBetweenDates):
(WebKit::WebProcess::deleteAllEntries):

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

5 years agoREGRESSION (r175376): Occasional null deref when doing a dictionary lookup
timothy_horton@apple.com [Fri, 31 Oct 2014 21:49:44 +0000 (21:49 +0000)]
REGRESSION (r175376): Occasional null deref when doing a dictionary lookup
https://bugs.webkit.org/show_bug.cgi?id=138261
<rdar://problem/18841709>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
rangeForDictionaryLookupAtHitTestResult can easily return null.

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

5 years agoMake CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
cdumez@apple.com [Fri, 31 Oct 2014 21:43:30 +0000 (21:43 +0000)]
Make CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement() faster
https://bugs.webkit.org/show_bug.cgi?id=138227

Reviewed by Benjamin Poulain.

Restructure CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement()
a bit to do less if checks. The previous implementation was doing 7 if
checks no matter the input value. The new implementation does less
if checks depending on the input type.

Also, the isImageControlsRootElement() was showing in the profiles so
I updated the condition to only do this virtual function call if the
input is an HTMLDivElement (which we can check more efficiently).

With the change, I see that we're spending about ~26% less time in
this method when running speedometer. However, the impact on the
overall score is within noise.

No new tests, no behavior change.

* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):

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

5 years agoAdd scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope
msaboff@apple.com [Fri, 31 Oct 2014 21:27:10 +0000 (21:27 +0000)]
Add scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope
https://bugs.webkit.org/show_bug.cgi?id=138252

Reviewed by Geoffrey Garen.

Added scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope.
Although the scope register is filled in with the ScopeChain register for all
three bytecodes, this operand is not used in the processing of the bytecodes.
That will be addressed in a future patch.

* bytecode/BytecodeList.json: Lengthened the three bytecodes.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode): Added code to dump the scope operand.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPopScope):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::emitPopScopes):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::scopeRegister):
Added scope register to these emit functions and the bytecodes they emit.
New m_scopeRegister and accessor.

* bytecompiler/NodesCodegen.cpp:
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::TryNode::emitBytecode):
Created a RegisterID for the ScopeChain register and used it to emit the updated
bytecodes.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_push_name_scope):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_push_name_scope):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
Updated the operand indecies for the processing of the updated bytecodes.

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

5 years agoUse system art for action menus when possible
bdakin@apple.com [Fri, 31 Oct 2014 21:25:42 +0000 (21:25 +0000)]
Use system art for action menus when possible
https://bugs.webkit.org/show_bug.cgi?id=138260

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):

Source/WebKit2:

* Resources/AddImageToPhotosTemplate.pdf: Removed.
* Resources/CopyImageTemplate.pdf: Removed.
* Resources/SaveImageToDownloadsTemplate.pdf: Removed.
* Resources/ShareImageTemplate.pdf: Removed.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoUnreviewed, fix ASan build after r175382
jpfau@apple.com [Fri, 31 Oct 2014 21:21:15 +0000 (21:21 +0000)]
Unreviewed, fix ASan build after r175382

* wtf/SizeLimits.cpp:

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

5 years agoFix assertion in CachedResource::addDataBuffer
antti@apple.com [Fri, 31 Oct 2014 21:14:05 +0000 (21:14 +0000)]
Fix assertion in CachedResource::addDataBuffer

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::addDataBuffer):

    Don't call to base class if buffering mode changed (happens with some special top level document types).

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

5 years agoFix the build for Yosemite systems after r175417
timothy_horton@apple.com [Fri, 31 Oct 2014 20:52:05 +0000 (20:52 +0000)]
Fix the build for Yosemite systems after r175417

* UIProcess/mac/WKActionMenuController.mm:

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

5 years agoRemove webkit prefix from CSS columns.
dino@apple.com [Fri, 31 Oct 2014 20:42:45 +0000 (20:42 +0000)]
Remove webkit prefix from CSS columns.
https://bugs.webkit.org/show_bug.cgi?id=137132.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-10-31
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Import tests for basic multi-column properties settings. They are approved by W3C and
pass the WebKit testing. More tests need to be imported when they are approved.

* css: Added.
* css/multicol: Added.
* css/multicol/multicol-basic-001-expected.html: Added.
* css/multicol/multicol-basic-001.html: Added.
* css/multicol/multicol-basic-002-expected.html: Added.
* css/multicol/multicol-basic-002.html: Added.
* css/multicol/multicol-basic-003-expected.html: Added.
* css/multicol/multicol-basic-003.html: Added.
* css/multicol/multicol-basic-004-expected.html: Added.
* css/multicol/multicol-basic-004.html: Added.

Source/WebCore:

CSS columns properties are ready for un-prefixing. There are still a couple
that we haven't implemented, such as the ones starting with "break-", so we're
just going to do the ones starting with "column-".  The list of column un-
prefixed properties in this change set is:
    - column-count
    - column-fill
    - column-gap
    - column-progression
    - column-rule
    - column-rule-color
    - column-rule-style
    - column-rule-width
    - column-span
    - column-width
    - columns

Tests: fast/multicol/column-box-alignment-rtl.html
       fast/multicol/multicol-aliases.html
       imported/w3c/css/multicol/multicol-basic-001.html
       imported/w3c/css/multicol/multicol-basic-002.html
       imported/w3c/css/multicol/multicol-basic-003.html
       imported/w3c/css/multicol/multicol-basic-004.html

Add new un-prefixed column properties and make the -webkit* ones be aliases
to the new ones.
* css/CSSPropertyNames.in:

Use the new enums CSSPropertyColumn* instead of the prefixed ones.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isColorPropertyID):
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::colorIncludingFallback):

LayoutTests:

Ensure the CSS un-prefixed column properties are behaving the same way as the
prefixed ones. The CSS prefixed column properties are still supported by making
them aliases of the un-prefixed ones.  Also port some of the W3C and Mozilla
tests for css column properties tests.

Change to the un-prefixed column names to be compared with the return of CSSStyleDeclaration.item().
And change the expected names to be the un-prefixed ones also.
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:

Change to the un-prefixed column names and compare them with the return of object.style.cssText().
* fast/css/remove-shorthand-expected.txt:

Test for the effect of the rtl settings on column flow; it is ported from Mozilla.
* fast/multicol/column-box-alignment-rtl-expected.html: Added.
* fast/multicol/column-box-alignment-rtl.html: Added.

Ensure the prefixed and the un-prefixed column properties are behaving exactly the same.
* fast/multicol/multicol-aliases-expected.html: Added.
* fast/multicol/multicol-aliases.html: Added.

Change to the un-prefixed column names to be compared with the return of CSSStyleDeclaration.item().
* svg/css/getComputedStyle-basic-expected.txt:

Remove the use of the un-prefixed columns property since it seems unrelated to the test.
* svg/custom/svg-fonts-in-html.html:

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

5 years agoFix the build for pre-Yosemite systems after r175417
timothy_horton@apple.com [Fri, 31 Oct 2014 20:41:57 +0000 (20:41 +0000)]
Fix the build for pre-Yosemite systems after r175417

* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

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

5 years agoRolled in r175389.
ggaren@apple.com [Fri, 31 Oct 2014 20:39:20 +0000 (20:39 +0000)]
Rolled in r175389.

WebKit was failing to build 32bit on some Apple internal systems because
those systems were configured to build bmalloc 64-bit-only. Those systems
have been updated to build bmalloc as a universal binary, so everything
should work fine now.

The relevant setting is controlled by an environment variable on the
build system, and not by the project file in the source tree, so there's
no new code change here.

        Enable bmalloc in 32bit builds
        https://bugs.webkit.org/show_bug.cgi?id=138232

        Reviewed by Andreas Kling.

* wtf/FastMalloc.cpp:

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

5 years agoRemove "Add to iPhoto" from the action menu's sharing menu
timothy_horton@apple.com [Fri, 31 Oct 2014 20:21:26 +0000 (20:21 +0000)]
Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
Retain/autorelease the new array.

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

5 years agoRemove "Add to iPhoto" from the action menu's sharing menu
timothy_horton@apple.com [Fri, 31 Oct 2014 20:16:32 +0000 (20:16 +0000)]
Remove "Add to iPhoto" from the action menu's sharing menu
https://bugs.webkit.org/show_bug.cgi?id=138251
<rdar://problem/18837197>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
Filter out "Add to iPhoto".

* platform/spi/mac/NSSharingServiceSPI.h:
Add 'name' to the NSSharingService SPI header.

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

5 years agoMake writes to RegExpObject.lastIndex cacheable.
akling@apple.com [Fri, 31 Oct 2014 19:28:12 +0000 (19:28 +0000)]
Make writes to RegExpObject.lastIndex cacheable.
<https://webkit.org/b/138255>

Reviewed by Geoffrey Garen.

We were neglecting to IC the puts to RegExpObject.lastIndex on Octane/regexp,
and ended up spending 4.5% of a time profile in operationPutByIdNonStrict.

~3% progression on Octane/regexp.

* runtime/RegExpObject.cpp:
(JSC::regExpObjectSetLastIndexStrict):
(JSC::regExpObjectSetLastIndexNonStrict):
(JSC::RegExpObject::put):

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

5 years agoFix type clash warning in supports_error rule of CSSGrammar.
commit-queue@webkit.org [Fri, 31 Oct 2014 19:11:01 +0000 (19:11 +0000)]
Fix type clash warning in supports_error rule of CSSGrammar.
https://bugs.webkit.org/show_bug.cgi?id=138248

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-10-31
Reviewed by Antti Koivisto.

Added explicit actions to supports_error rule in CSSGrammar.y.in since
the default actions caused bison to emit type clash warnings.

No new tests because there is no behavior change.

* css/CSSGrammar.y.in:

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

5 years ago[GTK] Support script message handlers WebKitUserContentManager
commit-queue@webkit.org [Fri, 31 Oct 2014 19:04:19 +0000 (19:04 +0000)]
[GTK] Support script message handlers WebKitUserContentManager
https://bugs.webkit.org/show_bug.cgi?id=133730

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2014-10-31
Reviewed by Carlos Garcia Campos.

Support user script message handlers in WebKitUserContentManager.
This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which
an option is added to the CMake build files. The option is disabled
globally by default, and the WebKitGTK port enables it. On the API
level, two new methods to register and unregister names are provided
in the "window.webkit" namespace, and on message reception the
"WebKitUserContentManager::script-message-received" signal is
emitted, using the registered names as signal detail.

.:

* Source/cmake/OptionsGTK.cmake: For the GTK port, enable the
ENABLE_USER_MESSAGE_HANDLERS feature by default.
* Source/cmake/WebKitFeatures.cmake: Add feature description for
ENABLE_USER_MESSAGE_HANDLERS, disabled by default.

Source/WebCore:

* CMakeLists.txt: Conditionally add the needed files to the build
when the ENABLE_USER_MESSAGE_HANDLERS feature is enabled.

Source/WebKit2:

* UIProcess/API/gtk/WebKitJavascriptResult.cpp: Add a new private
function to construct a WebKitJavascriptResult directly from a
WebCore::SerializedScriptValue.
(_WebKitJavascriptResult::_WebKitJavascriptResult): Ditto.
(webkitJavascriptResultCreate): Ditto.
* UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Ditto.
* UIProcess/API/gtk/WebKitUserContentManager.cpp:
(webkit_user_content_manager_class_init): Install the
"script-message-received" signal.
(webkit_user_content_manager_register_script_message_handler):
Added.
(webkit_user_content_manager_unregister_script_message_handler):
Added.
* UIProcess/API/gtk/WebKitUserContentManager.h: Added the new
public API methods.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_user_content_manager_get_type() to the list in order to make
gtk-doc to generate documentation for signals.

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:
Add test case for user script message handlers.
(scriptMessageReceived):
(testUserContentManagerScriptMessageReceived):
(beforeAll):

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

5 years agoUnreviewed, iOS build fix since 175406.
mhock@apple.com [Fri, 31 Oct 2014 19:02:39 +0000 (19:02 +0000)]
Unreviewed, iOS build fix since 175406.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):

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

5 years agoClean-up use of boolean attributes in media tests
eric.carlson@apple.com [Fri, 31 Oct 2014 18:29:00 +0000 (18:29 +0000)]
Clean-up use of boolean attributes in media tests
https://bugs.webkit.org/show_bug.cgi?id=138249

Reviewed by Brent Fulgham.

* media/resources/foreignobject-media.svg: autoplay="true" => autoplay
* media/resources/video-with-poster-as-object-fallback.html:  controls="true" => controls
* media/video-canvas-source.html: Ditto.
* media/video-canvas.html-disabled: Ditto.

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

5 years agoFix a couple of warnings in JSC reported by clang static analyzer
cdumez@apple.com [Fri, 31 Oct 2014 17:37:25 +0000 (17:37 +0000)]
Fix a couple of warnings in JSC reported by clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=138240

Reviewed by Geoffrey Garen.

Fix a couple of warnings in JSC reported by clang static analyzer about
value stored in variables never being read. This is addressed by
reducing the scope of the variable or removing the variable entirely.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
* runtime/VM.cpp:
(JSC::VM::throwException):

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

5 years ago[Win] Unreviewed 64-bit Build Fix.
bfulgham@apple.com [Fri, 31 Oct 2014 17:13:52 +0000 (17:13 +0000)]
[Win] Unreviewed 64-bit Build Fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Correct symbol
export declarations.

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

5 years agoUnreviewed rollout r175389.
lforschler@apple.com [Fri, 31 Oct 2014 15:26:37 +0000 (15:26 +0000)]
Unreviewed rollout r175389.

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

5 years ago[ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
commit-queue@webkit.org [Fri, 31 Oct 2014 12:45:55 +0000 (12:45 +0000)]
[ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
https://bugs.webkit.org/show_bug.cgi?id=137737

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-10-31
Reviewed by Chris Fleizach.

Source/WebCore:

Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818)
to more accurately determine accessibility role of the table cell.

Test: accessibility/table-cells-roles.html

* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityARIAGridCell.h:
Change rowIndexRange function to const.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK).
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::isRowHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityTableCell.h:
Change rowIndexRange function to const.

LayoutTests:

The new test illustrates the different cases deciding whether a table cell
is a row header or column header or just a table cell.
Files of expected type and one html type are adapted to changes in the code of several member functions
of  AccessibilityTableCell, i.e  determineAccessibilityRole, isColumnHeaderCell, isRowHeaderCell.

* accessibility/table-cells-roles-expected.txt: Added.
* accessibility/table-cells-roles.html: Added.
* platform/efl/accessibility/table-attributes-expected.txt:
* platform/efl/accessibility/table-cells-expected.txt:
* platform/gtk/accessibility/table-attributes-expected.txt:
* platform/gtk/accessibility/table-cells-expected.txt:
* platform/gtk/accessibility/table-hierarchy-expected.txt:
* platform/gtk/accessibility/table-hierarchy.html:

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

5 years ago[Windows] Additional rebaselining after r175259.
roger_fong@apple.com [Fri, 31 Oct 2014 07:18:25 +0000 (07:18 +0000)]
[Windows] Additional rebaselining after r175259.
* platform/win/css1/box_properties/padding_right-expected.txt:
* platform/win/fast/css/last-child-pseudo-class-expected.txt:
* platform/win/fast/css/only-child-pseudo-class-expected.txt:

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

5 years agoEliminate ResourceBuffer and use SharedBuffer directly instead
darin@apple.com [Fri, 31 Oct 2014 04:25:34 +0000 (04:25 +0000)]
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174

Reviewed by Antti Koivisto.

Source/WebCore:

Refactoring, with test coverage across many existing tests.

* CMakeLists.txt: Deleted ResourceBuffer.cpp.

* WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
for one function that used to take a PassRefPtr but now takes a reference instead.

* WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.

* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.

* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
also pass a reference only if non-null rather than passing a pointer.
(WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
(WebCore::InspectorPageAgent::mainResourceContent): Ditto.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
(WebCore::InspectorResourceAgent::didFailLoading): Ditto.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
and use the copy function rather than a hand-written alternative.
(WebCore::DocumentLoader::maybeCreateArchive): Ditto.
(WebCore::DocumentLoader::mainResource): Ditto.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.

* loader/DocumentLoader.h: Changed mainResourceData to return a
PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
but it currently returns a newly created buffer when there is substitute
data and can also return null, even though many callers assume it will not!

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
function bufferReceived.
(WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
argument to client function loadFinished.

* loader/ResourceBuffer.cpp: Removed.
* loader/ResourceBuffer.h: Removed.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.

* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData): Use SharedBuffer.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.

* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Ditto.

* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
* loader/cache/CachedCSSStyleSheet.h: Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading): Ditto.
(WebCore::CachedFont::ensureCustomFontData): Ditto.
* loader/cache/CachedFont.h: Ditto.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient): Use SharedBuffer.
(WebCore::CachedImage::didRemoveClient): Ditto.
(WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
to base class and changed to take a reference rather than a pointer.
(WebCore::CachedImage::addData): Ditto. Also added call through to base class.
(WebCore::CachedImage::finishLoading): Ditto.
* loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
to be unsigned instead of unsigend char.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
(WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedRawResource::addData): Ditto.
(WebCore::CachedRawResource::finishLoading): Ditto.
(WebCore::CachedRawResource::canReuse): Ditto.
* loader/cache/CachedRawResource.h: Ditto.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Reordered data members due to change
in header.
(WebCore::CachedResource::addDataBuffer): Changed argument type.
(WebCore::CachedResource::finishLoading): Ditto.
(WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
table lookup by using the return value from the remove function.
(WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
of using a function named "schedule" to allocate the callback object.
(WebCore::CachedResource::Callback::Callback): Changed function and data member
name.
(WebCore::CachedResource::Callback::cancel): Ditto.
(WebCore::CachedResource::Callback::timerFired): Ditto.
(WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.

* loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
data members and one function member private instead of protected. Also renamed the
CachedResource::CachedResourceCallback function CachedResource::Callback and moved
its definition out of the CachedResource class definition.

* loader/cache/CachedResourceClient.h: Removed unneeded include.

* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.

* loader/cache/CachedSVGDocument.h: Ditto. Made data members private.

* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading): Use SharedBuffer.
* loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
forward declaration.

* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
call addDataBuffer.
(WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
(WebCore::CachedTextTrack::finishLoading): Ditto.
* loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
destructor. Updated for above changes.

* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
* loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
private rather than protected. Added an explicit virtual constructor so we can
compile without knowing how to ref/deref TextResourceDecoder.

* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
and to call addDataBuffer only if there is a new data buffer.

* loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
(WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.

* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
RefPtr<ResourceBuffer>.

* loader/mac/ResourceBuffer.mm: Removed.

* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.

* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::clear): Use a modern for loop.
(WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
this never returns null. Use modern for loops.
(WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.

* platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
a pointer.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
instead of a pointer.

* platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
bufferReceived and unneeded buffer argument from loadFinished. Also marked the
constructor explicit.

* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
Removed include of ResourceBuffer.h.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
SharedBuffer directly.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::loadFinished): Updated for change to
PlatformMediaResourceLoaderClient.

* platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.

* platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
tryReplaceContentsWithPlatformBuffer function.

Source/WebKit/mac:

* WebView/WebDataSource.mm:
(-[WebDataSource data]): Use SharedBuffer directly.
* WebView/WebHTMLView.mm:
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.

Source/WebKit/win:

* WebDataSource.cpp:
(WebDataSource::data): Use SharedBuffer directly.
(WebDataSource::subresourceForURL): Ditto.

Source/WebKit2:

* CMakeLists.txt: Removed WebResourceBuffer.cpp.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendBuffer): Use a reference instead of pointer.
* NetworkProcess/NetworkResourceLoader.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): Ditto.

* Shared/WebResourceBuffer.cpp: Removed.
* Shared/WebResourceBuffer.h: Removed.

* WebKit2.xcodeproj/project.pbxproj: Removed WebResourceBuffer.cpp/h.

* WebProcess/Network/NetworkProcessConnection.cpp: Removed unneeded includes.
(WebKit::NetworkProcessConnection::didCacheResource): Use a reference instead
of a pointer.

* WebProcess/Network/WebResourceLoadScheduler.cpp: Removed unneeded include.
* WebProcess/Network/WebResourceLoader.cpp: Ditto.
* WebProcess/Network/WebResourceLoader.h: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
(WebKit::WebFrameLoaderClient::finishedLoading): Use SharedBuffer directly.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::source): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Refactored to make the relationship
between the buffer and the DataReference clearer and to avoid having a long-lived
DataReference pointing to an underlying buffer with unclear lifetime.
(WebKit::WebPage::getContentsAsString): Ditto.
(WebKit::WebPage::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Ditto. Also use SharedBuffer directly.
(WebKit::WebPage::getResourceDataFromFrame): Ditto.
(WebKit::WebPage::getWebArchiveOfFrame): Ditto.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::containingLinkElement): Use elementLineage.
(WebKit::WebPage::performActionOnElement): Use references and SharedBuffer.
ALso did a bit of other cleanup in here.
(WebKit::isAssistableElement): Take Element& instead of Node*, since that's what
the caller has.
(WebKit::nextAssistableElement): Changed name to match what the function does.
Added an obviously-missing check on the startNode argument. Updated for change
to isAssistableElement above. Take a Page& instead of a Page*.
(WebKit::hasAssistableElement): Changed name to match what the function does.
Updated for change to nextAssistableElement above. Took out incorrect comparison
of a C++ pointer to the Objective-C object pointer nil. Take a Page& instead of a Page*.
(WebKit::WebPage::focusNextAssistedNode): Updated for above changes.
(WebKit::WebPage::getAssistedNodeInformation): Updated for above changes.

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

5 years agoMove border-image-source / -webkit-mask-box-image-source to the new StyleBuilder
cdumez@apple.com [Fri, 31 Oct 2014 02:37:40 +0000 (02:37 +0000)]
Move border-image-source / -webkit-mask-box-image-source to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138209

Reviewed by Andreas Kling.

Move border-image-source / -webkit-mask-box-image-source CSS properties
from DeprecatedStyleBuilder to the new StyleBuilder so that they are
now generated from CSSPropertyNames.in.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImageSource::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageSource::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderImageSource):

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

5 years agoUnreviewed Windows build fix after r175391.
cdumez@apple.com [Fri, 31 Oct 2014 00:40:57 +0000 (00:40 +0000)]
Unreviewed Windows build fix after r175391.

Export a couple of symbols.

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

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

5 years agobisect-builds should support WebKit clients other than Safari
matthew_hanson@apple.com [Fri, 31 Oct 2014 00:26:56 +0000 (00:26 +0000)]
bisect-builds should support WebKit clients other than Safari
https://bugs.webkit.org/show_bug.cgi?id=138225

This patch adds support for bisecting WebKit nightly builds with clients other than Safari.

The -a / --application optional argument allows the user to specify which application (or application bundle)
should be run against the WebKit nightly builds.

Reviewed by David Kilzer.

* Scripts/bisect-builds:
Swap out $safariPath for the more general $applicationPath
Leave --safari-path as a commandline option for backwards compatibility
(mountAndRunNightly):
Use File::Spec->cat correctly (one directory per argument)
Use open --wait-apps instead of running the target application directly

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

5 years ago[EME] Add Setting for accessing storage location for MediaKeys data
jer.noble@apple.com [Fri, 31 Oct 2014 00:18:21 +0000 (00:18 +0000)]
[EME] Add Setting for accessing storage location for MediaKeys data
https://bugs.webkit.org/show_bug.cgi?id=138147

Reviewed by Brady Eidson.

Source/WebCore:

Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory
by piping that request down from WebKit and WebKit2 into Settings.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and
    append the current origin.
* html/HTMLMediaElement.h:
* page/Settings.h:
(WebCore::Settings::setMediaKeysStorageDirectory): Simple setter.
(WebCore::Settings::mediaKeysStorageDirectory): Simple accessor.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer.
(WebCore::sessionStorageDirectory): Deleted.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Set default location.
(-[WebPreferences mediaKeysStorageDirectory]): Simple accessor.
(-[WebPreferences setMediaKeysStorageDirectory:]): Simple setter.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Pass location from WebPreferences into Settings.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Pass from WebMediaKeyStorageManager into Settings.

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

5 years agoLayout Test http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html is failing.
commit-queue@webkit.org [Fri, 31 Oct 2014 00:16:12 +0000 (00:16 +0000)]
Layout Test http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=138072

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-10-30
Reviewed by Alexey Proskuryakov.

* http/tests/xmlhttprequest/cross-origin-redirect-responseURL-expected.txt:
* http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html:

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

5 years agoWorkaround for <rdar://problem/18830639>
dburkart@apple.com [Thu, 30 Oct 2014 23:57:59 +0000 (23:57 +0000)]
Workaround for <rdar://problem/18830639>

Unreviewed.

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

5 years ago<rdar://problem/18821260> Prepare for the mysterious future
dburkart@apple.com [Thu, 30 Oct 2014 23:53:41 +0000 (23:53 +0000)]
<rdar://problem/18821260> Prepare for the mysterious future

Reviewed by Lucas Forschler.

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

5 years agoAST Nodes should keep track of their end offset
saambarati1@gmail.com [Thu, 30 Oct 2014 23:50:54 +0000 (23:50 +0000)]
AST Nodes should keep track of their end offset
https://bugs.webkit.org/show_bug.cgi?id=138143

Reviewed by Filip Pizlo.

AST nodes nodes now have an int property for their end text
offsets. This change lays some foundational work that will be
needed in profiling which basic blocks have executed.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::setEndOffset):
* parser/Nodes.h:
(JSC::Node::endOffset):
(JSC::Node::setEndOffset):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseExpression):
(JSC::Parser<LexerType>::parseProperty):
* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):

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

5 years agoShort-circuit repaints with empty rects
simon.fraser@apple.com [Thu, 30 Oct 2014 23:26:17 +0000 (23:26 +0000)]
Short-circuit repaints with empty rects
https://bugs.webkit.org/show_bug.cgi?id=138234

Reviewed by Zalan Bujtas.

Repaints with an empty rectangle are common enough that it's worth
short-circuiting them.

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

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

5 years ago[Windows] More text rebaselining.
roger_fong@apple.com [Thu, 30 Oct 2014 23:24:32 +0000 (23:24 +0000)]
[Windows] More text rebaselining.
* platform/win/TestExpectations:
* platform/win/fast/text/tatechuyoko-expected.txt: Added.

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

5 years agoAttempt to fix the Windows build after r175384.
adachan@apple.com [Thu, 30 Oct 2014 23:18:48 +0000 (23:18 +0000)]
Attempt to fix the Windows build after r175384.

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

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

5 years ago[Windows] Text rebaselining after r175384.
roger_fong@apple.com [Thu, 30 Oct 2014 23:10:55 +0000 (23:10 +0000)]
[Windows] Text rebaselining after r175384.
* platform/win/css1/box_properties/margin_right-expected.txt:
* platform/win/css1/box_properties/padding-expected.txt:
* platform/win/css1/box_properties/padding_left-expected.txt:
* platform/win/css1/box_properties/padding_right-expected.txt:
* platform/win/css1/box_properties/padding_top-expected.txt:
* platform/win/css1/font_properties/font-expected.txt:
* platform/win/css1/formatting_model/vertical_formatting-expected.txt:
* platform/win/css1/text_properties/text_transform-expected.txt:
* platform/win/fast/css/empty-pseudo-class-expected.txt:
* platform/win/fast/css/first-child-pseudo-class-expected.txt:
* platform/win/fast/css/only-child-pseudo-class-expected.txt:
* platform/win/fast/dom/HTMLProgressElement/progress-element-expected.txt: Added.
* platform/win/fast/forms/targeted-frame-submission-expected.txt:
* platform/win/fast/table/append-cells2-expected.txt:
* platform/win/tables/mozilla/bugs/45621-expected.txt:

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

5 years agoClean up virtual functions in css/
cdumez@apple.com [Thu, 30 Oct 2014 23:08:20 +0000 (23:08 +0000)]
Clean up virtual functions in css/
https://bugs.webkit.org/show_bug.cgi?id=138230

Reviewed by Benjamin Poulain.

Clean up virtual functions in css/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
  inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
  unnecessary type checks

No new tests, no behavior change.

* WebCore.exp.in:
* css/CSSBasicShapes.h:
* css/CSSCharsetRule.h:
* css/CSSComputedStyleDeclaration.h:
* css/CSSCrossfadeValue.h:
* css/CSSFilterImageValue.h:
* css/CSSFontFaceLoadEvent.h:
* css/CSSFontFaceRule.h:
* css/CSSFontFaceSource.h:
* css/CSSImportRule.h:
* css/CSSMediaRule.h:
* css/CSSPageRule.h:
* css/CSSRuleList.h:
(WebCore::StaticCSSRuleList::ref): Deleted.
(WebCore::StaticCSSRuleList::styleSheet): Deleted.
(WebCore::StaticCSSRuleList::length): Deleted.
(WebCore::StaticCSSRuleList::item): Deleted.
(WebCore::LiveCSSRuleList::ref): Deleted.
(WebCore::LiveCSSRuleList::deref): Deleted.
(WebCore::LiveCSSRuleList::length): Deleted.
(WebCore::LiveCSSRuleList::item): Deleted.
(WebCore::LiveCSSRuleList::styleSheet): Deleted.
* css/CSSStyleRule.h:
* css/CSSSupportsRule.h:
* css/CSSUnknownRule.h:
* css/FontLoader.h:
* css/PropertySetCSSStyleDeclaration.h:
(WebCore::PropertySetCSSStyleDeclaration::parentElement):
* css/WebKitCSSKeyframeRule.h:
* css/WebKitCSSViewportRule.h:

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

5 years agoTry to fix the iOS build.
andersca@apple.com [Thu, 30 Oct 2014 23:03:26 +0000 (23:03 +0000)]
Try to fix the iOS build.

* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoEnable bmalloc in 32bit builds
ggaren@apple.com [Thu, 30 Oct 2014 22:44:04 +0000 (22:44 +0000)]
Enable bmalloc in 32bit builds
https://bugs.webkit.org/show_bug.cgi?id=138232

Reviewed by Andreas Kling.

Seems to work fine.

* wtf/FastMalloc.cpp:

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

5 years agoLong spins under rangeExpandedAroundPosition on Yahoo Mail
timothy_horton@apple.com [Thu, 30 Oct 2014 22:37:50 +0000 (22:37 +0000)]
Long spins under rangeExpandedAroundPosition on Yahoo Mail
https://bugs.webkit.org/show_bug.cgi?id=138223
<rdar://problem/18819547>

Reviewed by Enrica Casucci.

* WebCore.exp.in:
Export some things.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeExpandedAroundPositionByCharacters):
Reimplement rangeExpandedAroundPosition to operate on characters instead of lines,
and to use Position. Moving VisiblePositions by line can be very expensive in some cases,
and for generating lookup/Data Detectors context, we don't care about that kind of precision.
This makes this function ~1000x faster when it hits on a row in the Yahoo Mail message list.

(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::scanForDataDetectedItems):
Adopt the new rangeExpandedAroundPositionByCharacters, expanding 250 characters
before and after, which roughly matches what we were usually getting going by line,
and is a reasonable amount of context for these operations.

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

5 years agoWeb Inspector: Generate ObjC inspector protocol types and alternate dispatcher interfaces
commit-queue@webkit.org [Thu, 30 Oct 2014 22:09:03 +0000 (22:09 +0000)]
Web Inspector: Generate ObjC inspector protocol types and alternate dispatcher interfaces
https://bugs.webkit.org/show_bug.cgi?id=138048

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-10-30
Reviewed by Brian Burg.

Generate Objective-C interfaces for inspector protocol types, command, and event dispatchers.
This is very much like the InspectorProtocolTypes, BackendDispatchers, and FrontendDispatchers,
but with an ObjC spin on things.

The private API that clients would use is all encapsulated in RWIProtocol.h. It includes the
types interfaces, command handler protocol, and event dispatcher interface. Where possible the
API uses real enums, which hides the raw protocol enum strings from clients.

Inspector protocol types are, like InspectorProtocolObjects, built on top of an InspectorObject.
This offers the flexibilty of adding arbitrary key/values using the RWIProtocolJSONObject
interface, which may be required for certain protocol objects like "Network.Headers" which
have no fields, but expect arbitrary properties to be added.

Command handler protocols always have two callbacks. An error callback and a success callback.
The signature is very much like BackendDispatchers. In parameters are passed directly to
the selectors, and out parameters are defined by the success callback. It will be the client's
responsibility to call either of these callbacks to complete handling of a request.

Event dispatcher interfaces are straight forward, just packaging up the arguments and sending
the message to the frontend.

ObjC <-> Protocol conversion happens in each of the generated files. In type getters / setters,
in commands parameters and event parameters. For this to work we generate conversion helpers
for all enums, ObjC enum <-> protocol strings. For NSArray <-> InspectorArray there are some
static helpers to do the conversions. We do lose some type safety in these conversions.

* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/codegen/__init__.py:
* inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py:
(AlternateBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
* inspector/scripts/codegen/generate_backend_dispatcher_header.py:
(BackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains.AlternateInspector):
(BackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
(BackendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
* inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
(BackendDispatcherImplementationGenerator._generate_handler_class_destructor_for_domain):
(BackendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
* inspector/scripts/codegen/generate_frontend_dispatcher_header.py:
(FrontendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
* inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:
(FrontendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
* inspector/scripts/codegen/generate_objective_c.py: Added.
(join_type_and_name):
(strip_comment_markers):
(remove_duplicate_from_str):
(ObjCTypeCategory):
(ObjCTypeCategory.category_of_type):
(ObjCGenerator):
(ObjCGenerator.identifier_to_objc_identifier):
(ObjCGenerator.objc_identifier_to_identifier):
(ObjCGenerator.should_generate_domain_types_filter):
(ObjCGenerator.should_generate_domain_types_filter.should_generate_domain_types):
(ObjCGenerator.should_generate_domain_command_handler_filter):
(ObjCGenerator.should_generate_domain_command_handler_filter.should_generate_domain_command_handler):
(ObjCGenerator.should_generate_domain_event_dispatcher_filter):
(ObjCGenerator.should_generate_domain_event_dispatcher_filter.should_generate_domain_event_dispatcher):
(ObjCGenerator.objc_name_for_type):
(ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration):
(ObjCGenerator.objc_enum_name_for_anonymous_enum_member):
(ObjCGenerator.objc_enum_name_for_anonymous_enum_parameter):
(ObjCGenerator.objc_enum_name_for_non_anonymous_enum):
(ObjCGenerator.variable_name_prefix_for_domain):
(ObjCGenerator.objc_accessor_type_for_raw_name):
(ObjCGenerator.objc_type_for_raw_name):
(ObjCGenerator.objc_class_for_raw_name):
(ObjCGenerator.protocol_type_for_raw_name):
(ObjCGenerator.protocol_type_for_type):
(ObjCGenerator.objc_class_for_type):
(ObjCGenerator.objc_accessor_type_for_member):
(ObjCGenerator.objc_accessor_type_for_member_internal):
(ObjCGenerator.objc_type_for_member):
(ObjCGenerator.objc_type_for_member_internal):
(ObjCGenerator.objc_type_for_param):
(ObjCGenerator.objc_type_for_param_internal):
(ObjCGenerator.objc_protocol_export_expression_for_variable):
(ObjCGenerator.objc_protocol_import_expression_for_member):
(ObjCGenerator.objc_protocol_import_expression_for_parameter):
(ObjCGenerator.objc_protocol_import_expression_for_variable):
(ObjCGenerator.objc_to_protocol_expression_for_member):
(ObjCGenerator.protocol_to_objc_expression_for_member):
(ObjCGenerator.objc_setter_method_for_member):
(ObjCGenerator.objc_setter_method_for_member_internal):
(ObjCGenerator.objc_getter_method_for_member):
(ObjCGenerator.objc_getter_method_for_member_internal):
* inspector/scripts/codegen/generate_objective_c_backend_dispatcher_header.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
(ObjectiveCBackendDispatcherHeaderGenerator):
(ObjectiveCBackendDispatcherHeaderGenerator.output_filename):
(ObjectiveCBackendDispatcherHeaderGenerator.domains_to_generate):
(ObjectiveCBackendDispatcherHeaderGenerator.generate_output):
(ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_forward_declarations):
(ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_forward_declarations_for_domains):
(ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_handler_declarations_for_domain):
(ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_handler_declaration_for_command):
* inspector/scripts/codegen/generate_objective_c_backend_dispatcher_implementation.py: Added.
(ObjectiveCConfigurationImplementationGenerator):
(ObjectiveCConfigurationImplementationGenerator.__init__):
(ObjectiveCConfigurationImplementationGenerator.output_filename):
(ObjectiveCConfigurationImplementationGenerator.domains_to_generate):
(ObjectiveCConfigurationImplementationGenerator.generate_output):
(ObjectiveCConfigurationImplementationGenerator._generate_handler_implementation_for_domain):
(ObjectiveCConfigurationImplementationGenerator._generate_handler_implementation_for_command):
(ObjectiveCConfigurationImplementationGenerator._generate_success_block_for_command):
(ObjectiveCConfigurationImplementationGenerator._generate_conversions_for_command):
(ObjectiveCConfigurationImplementationGenerator._generate_invocation_for_command):
* inspector/scripts/codegen/generate_objective_c_configuration_header.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
(ObjectiveCConfigurationHeaderGenerator):
(ObjectiveCConfigurationHeaderGenerator.output_filename):
(ObjectiveCConfigurationHeaderGenerator.generate_output):
(ObjectiveCConfigurationHeaderGenerator._generate_configuration_interface_for_domains):
(ObjectiveCConfigurationHeaderGenerator._generate_properties_for_domain):
* inspector/scripts/codegen/generate_objective_c_configuration_implementation.py: Added.
(ObjectiveCBackendDispatcherImplementationGenerator):
(ObjectiveCBackendDispatcherImplementationGenerator.__init__):
(ObjectiveCBackendDispatcherImplementationGenerator.output_filename):
(ObjectiveCBackendDispatcherImplementationGenerator.generate_output):
(ObjectiveCBackendDispatcherImplementationGenerator._generate_configuration_implementation_for_domains):
(ObjectiveCBackendDispatcherImplementationGenerator._generate_ivars):
(ObjectiveCBackendDispatcherImplementationGenerator._generate_dealloc):
(ObjectiveCBackendDispatcherImplementationGenerator._generate_handler_setter_for_domain):
(ObjectiveCBackendDispatcherImplementationGenerator._generate_event_dispatcher_getter_for_domain):
* inspector/scripts/codegen/generate_objective_c_conversion_helpers.py: Added.
(add_whitespace_separator):
(ObjectiveCConversionHelpersGenerator):
(ObjectiveCConversionHelpersGenerator.__init__):
(ObjectiveCConversionHelpersGenerator.output_filename):
(ObjectiveCConversionHelpersGenerator.domains_to_generate):
(ObjectiveCConversionHelpersGenerator.generate_output):
(ObjectiveCConversionHelpersGenerator._generate_enum_conversion_functions):
(ObjectiveCConversionHelpersGenerator._generate_anonymous_enum_conversion_for_declaration):
(ObjectiveCConversionHelpersGenerator._generate_anonymous_enum_conversion_for_member):
(ObjectiveCConversionHelpersGenerator._generate_anonymous_enum_conversion_for_parameter):
(ObjectiveCConversionHelpersGenerator._generate_enum_objc_to_protocol_string):
(ObjectiveCConversionHelpersGenerator._generate_enum_from_protocol_string):
* inspector/scripts/codegen/generate_objective_c_frontend_dispatcher_implementation.py: Added.
(ObjectiveCFrontendDispatcherImplementationGenerator):
(ObjectiveCFrontendDispatcherImplementationGenerator.__init__):
(ObjectiveCFrontendDispatcherImplementationGenerator.output_filename):
(ObjectiveCFrontendDispatcherImplementationGenerator.domains_to_generate):
(ObjectiveCFrontendDispatcherImplementationGenerator.generate_output):
(ObjectiveCFrontendDispatcherImplementationGenerator._generate_event_dispatcher_implementations):
(ObjectiveCFrontendDispatcherImplementationGenerator._generate_event):
(ObjectiveCFrontendDispatcherImplementationGenerator._generate_event_signature):
(ObjectiveCFrontendDispatcherImplementationGenerator._generate_event_out_parameters):
* inspector/scripts/codegen/generate_objective_c_header.py: Added.
(add_whitespace_separator):
(ObjectiveCHeaderGenerator):
(ObjectiveCHeaderGenerator.__init__):
(ObjectiveCHeaderGenerator.output_filename):
(ObjectiveCHeaderGenerator.generate_output):
(ObjectiveCHeaderGenerator._generate_forward_declarations):
(ObjectiveCHeaderGenerator._generate_enums):
(ObjectiveCHeaderGenerator._generate_types):
(ObjectiveCHeaderGenerator._generate_anonymous_enum_for_declaration):
(ObjectiveCHeaderGenerator._generate_anonymous_enum_for_member):
(ObjectiveCHeaderGenerator._generate_anonymous_enum_for_parameter):
(ObjectiveCHeaderGenerator._generate_enum):
(ObjectiveCHeaderGenerator._generate_enum.NS_ENUM):
(ObjectiveCHeaderGenerator._generate_type_interface):
(ObjectiveCHeaderGenerator._generate_init_method_for_required_members):
(ObjectiveCHeaderGenerator._generate_member_property):
(ObjectiveCHeaderGenerator._generate_command_protocols):
(ObjectiveCHeaderGenerator._generate_single_command_protocol):
(ObjectiveCHeaderGenerator._callback_block_for_command):
(ObjectiveCHeaderGenerator._generate_event_interfaces):
(ObjectiveCHeaderGenerator._generate_single_event_interface):
* inspector/scripts/codegen/generate_objective_c_internal_header.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
(ObjectiveCTypesInternalHeaderGenerator):
(ObjectiveCTypesInternalHeaderGenerator.output_filename):
(ObjectiveCTypesInternalHeaderGenerator.generate_output):
(ObjectiveCTypesInternalHeaderGenerator._generate_event_dispatcher_private_interfaces):
* inspector/scripts/codegen/generate_objective_c_types_implementation.py: Added.
(add_whitespace_separator):
(ObjectiveCTypesImplementationGenerator):
(ObjectiveCTypesImplementationGenerator.__init__):
(ObjectiveCTypesImplementationGenerator.output_filename):
(ObjectiveCTypesImplementationGenerator.domains_to_generate):
(ObjectiveCTypesImplementationGenerator.generate_output):
(ObjectiveCTypesImplementationGenerator.generate_type_implementations):
(ObjectiveCTypesImplementationGenerator.generate_type_implementation):
(ObjectiveCTypesImplementationGenerator._generate_init_method_for_required_members):
(ObjectiveCTypesImplementationGenerator._generate_setter_for_member):
(ObjectiveCTypesImplementationGenerator._generate_getter_for_member):
* inspector/scripts/codegen/generate_protocol_types_header.py:
(ProtocolTypesHeaderGenerator._generate_forward_declarations):
(_generate_typedefs_for_domain):
(_generate_builders_for_domain):
* inspector/scripts/codegen/generator.py:
(Generator.wrap_with_guard_for_domain):
(Generator):
(Generator.wrap_with_guard):
* inspector/scripts/codegen/generator_templates.py:
(AlternateInspector):
(ObjCInspector):
* inspector/scripts/codegen/models.py:
(Framework.fromString):
(Frameworks):
* inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification):
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

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

5 years agoThe Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
adachan@apple.com [Thu, 30 Oct 2014 22:06:12 +0000 (22:06 +0000)]
The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
https://bugs.webkit.org/show_bug.cgi?id=138215

Reviewed by Eric Carlson.

Source/WebCore:

Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
update its muted state again taking the Page's muted state into account.

Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
HTMLMediaElement, taking the Page's muted state into account.

Test: media/video-muted-after-setting-page-muted-state.html

* dom/Document.cpp:
(WebCore::Document::pageMutedStateDidChange):
(WebCore::Document::setMuted): Deleted.
* dom/Document.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
(WebCore::HTMLMediaElement::updateVolume):
Ditto, and also make sure the MediaController's muted state does not override the Page's
muted state.
(WebCore::HTMLMediaElement::updatePlayState):
Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
(WebCore::HTMLMediaElement::pageMutedStateDidChange):
Call updateVolume(), which will update the MediaPlayer's muted state.
(WebCore::HTMLMediaElement::effectiveMuted):
Figure out the muted value taking Page's muted state into account.
* html/HTMLMediaElement.h:
* page/AudioProducer.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setMuted):
Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
if m_muted changes.
* page/Page.h:
(WebCore::Page::isMuted):
* testing/Internals.cpp:
(WebCore::Internals::setPageMuted):
Expose a way to set the Page's muted state in Internals for testing.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* media/video-muted-after-setting-page-muted-state-expected.txt: Added.
* media/video-muted-after-setting-page-muted-state.html: Added.

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

5 years agoUse references in calculateMinimumPageHeight() for non-optional arguments
mmaxfield@apple.com [Thu, 30 Oct 2014 21:39:27 +0000 (21:39 +0000)]
Use references in calculateMinimumPageHeight() for non-optional arguments
https://bugs.webkit.org/show_bug.cgi?id=138231

Reviewed by Dean Jackson.

No new tests because there is no behavior change.

* rendering/RenderBlockFlow.cpp:
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):

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

5 years agoASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
jpfau@apple.com [Thu, 30 Oct 2014 21:35:03 +0000 (21:35 +0000)]
ASSERT(!m_deletionHasBegun) in RefCounted.h should be ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=138141

Reviewed by Alexey Proskuryakov.

* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::relaxAdoptionRequirement):
(WTF::RefCountedBase::derefBase):
(WTF::adopted):

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

5 years agoMove -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
cdumez@apple.com [Thu, 30 Oct 2014 21:30:19 +0000 (21:30 +0000)]
Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138207

Reviewed by Andreas Kling.

Move -webkit-border-image / -webkit-mask-box-image CSS properties to
the new StyleBuilder so that they are now generated from
CSSPropertyNames.in.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImage::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImage::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertBorderImage):
(WebCore::StyleBuilderConverter::convertBorderMask):

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

5 years agoOptimize HTMLVideoElement / HTMLAudioElement type checks a bit
cdumez@apple.com [Thu, 30 Oct 2014 21:25:30 +0000 (21:25 +0000)]
Optimize HTMLVideoElement / HTMLAudioElement type checks a bit
https://bugs.webkit.org/show_bug.cgi?id=138202

Reviewed by Benjamin Poulain.

Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by:
1. Using is<HTMLMediaElement>() instead of
   (is<HTMLVideoElement>() || is<HTMLAudioElement>()) if the caller is
   interested in both video and audio elements. This is faster because
   it ends up doing:
       - virtual call to Element::isMediaElement()
   instead of
       - Node::isHTMLElement() +
         virtual call to HTMLElement::isHTMLUnknownElement() +
         2 * HTMLElement::hasTagName()
2. Updating HTMLVideoElement / HTMLAudioElement type traits
   specializations to:
   - Avoid doing any virtual function call if the input type is an
     HTMLMediaElement (which is common in the code base).
   - Speed up check if the input is an Element by doing:
       - virtual call to Element::isMediaElement() +
         HTMLElement::hasTagName()
     instead of
       - Node::isHTMLElement() +
         virtual call to !HTMLElement::isHTMLUnknownElement() +
         HTMLElement::hasTagName()
     The speed stays the same if the input is a Node or an HTMLElement.

No new tests, no behavior change.

* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* dom/make_names.pl:
(defaultTagPropertyHash):
(printTypeHelpers):
* html/HTMLAudioElement.h:
(isType):
* html/HTMLImageLoader.cpp:
* html/HTMLTagNames.in:
* html/HTMLVideoElement.h:
(isType):
* page/ChromeClient.h:

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

5 years agoMigrate ComplexTextControllerCoreText to use SPI instead of WKSI
mmaxfield@apple.com [Thu, 30 Oct 2014 21:17:30 +0000 (21:17 +0000)]
Migrate ComplexTextControllerCoreText to use SPI instead of WKSI
https://bugs.webkit.org/show_bug.cgi?id=138228

Reviewed by Simon Fraser.

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/spi/cocoa/CoreTextSPI.h: Added.

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

5 years agoIndexedDB is deleting data when a PK is shared amongst two objectStores
beidson@apple.com [Thu, 30 Oct 2014 21:00:58 +0000 (21:00 +0000)]
IndexedDB is deleting data when a PK is shared amongst two objectStores
rdar://problem/18479306 and https://bugs.webkit.org/show_bug.cgi?id=137154

Reviewed by Jer Noble.

Source/WebKit2:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::v1RecordsTableSchema): Store away the v1 schema for introspection into the database.
(WebKit::v2RecordsTableSchema): Add utility methods to get the v2 schema with different Table names.
(WebKit::createOrMigrateRecordsTableIfNecessary): Check to see if the Records table exists with
  the correct schema. If it is the v1 schema, then migrate the data to a new v2 table, drop the v1
  table, then slide the new table into place.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::ensureValidRecordsTable): Make sure the Records table
  exists and is v2, and then make sure the uniqueness index exists.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Don’t bother creating
  the Records table here as it will have already been established earlier.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

LayoutTests:

* storage/indexeddb/primary-key-unique-to-objectstore-expected.txt: Added.
* storage/indexeddb/primary-key-unique-to-objectstore.html: Added.

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

5 years agoUpdate safariVersion to safariVersionString
matthew_hanson@apple.com [Thu, 30 Oct 2014 20:57:57 +0000 (20:57 +0000)]
Update safariVersion to safariVersionString
https://bugs.webkit.org/show_bug.cgi?id=138193

The preceding change updated safariVersion to safariVersionString for the "4 Public Beta" check in OS X 10.5.x,
but it should have also been done for the "4 Public Beta" check in OS X 10.4.x.

Rubber-stamped by David Kilzer.

* Scripts/bisect-builds:
(makeNightlyList):
Compare safariVersionString to a string literal, instead of safariVersion.

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

5 years agoImplement action menus for text
bdakin@apple.com [Thu, 30 Oct 2014 19:38:27 +0000 (19:38 +0000)]
Implement action menus for text
https://bugs.webkit.org/show_bug.cgi?id=138220
-and corresponding-
rdar://problem/18742297

Reviewed by Tim Horton.

Two new types of actions for the two text actions.
* Shared/API/c/WKActionMenuItemTypes.h:

One new type of menu.
* Shared/API/c/WKActionMenuTypes.h:

Pass willOpenMenu on to the WKActionMenuController.
* UIProcess/API/mac/WKView.mm:
(-[WKView willOpenMenu:withEvent:]):

Two new WebPageProxy functions that will pass messages along to the web process.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::selectLookupTextAtLocation):
* UIProcess/WebPageProxy.h:

At willOpenMenu time, text menus should select text so that it is clear what the
menu actions will apply to.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

Menu items for text menus.
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController _defaultMenuItemsForText]):
(-[WKActionMenuController _copyText:]):
(-[WKActionMenuController _lookupText:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(imageForResource:name::if):

New messages to the web process.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Re-factor performDictionaryLookupAtLocation() to re-use the code that finds the
Range for the dictionary lookup. That code now lives in
rangeForDictionaryLookupAtHitTestResult() and can be used by
performDictionaryLookupAtLocation() and our new function
selectLookupTextAtLocation().
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::rangeForDictionaryLookupAtHitTestResult):
(WebKit::WebPage::performDictionaryLookupAtLocation):

Since the action menu text is always selected, when the lookup action is chosen,
we can just lookup the current selection.
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):

Uses the new function rangeForDictionaryLookupAtHitTestResult() to get a lookup
range and then select it.
(WebKit::WebPage::selectLookupTextAtLocation):

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

5 years agoAdd diagnostic logging to track page loads.
eric.carlson@apple.com [Thu, 30 Oct 2014 19:04:29 +0000 (19:04 +0000)]
Add diagnostic logging to track page loads.
https://bugs.webkit.org/show_bug.cgi?id=138205
<rdar://problem/18173017>

Reviewed by Jer Noble.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
* page/DiagnosticLoggingKeys.h:

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

5 years agoWhen a client certificate is rejected, Safari says the website didn’t accept the...
mitz@apple.com [Thu, 30 Oct 2014 18:48:43 +0000 (18:48 +0000)]
When a client certificate is rejected, Safari says the website didn’t accept the certificate “unknown” instead of naming the certificate
https://bugs.webkit.org/show_bug.cgi?id=138216

Reviewed by Alexey Proskuryakov.

* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef): Remove no-longer-necessary platform guards around SecIdentityRef.
(IPC::encode): Ditto.
(IPC::decode): Ditto.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceError>::encodePlatformData): If NSErrorClientCertificateChainKey
is present in the error’s userInfo dictionary, assert that it’s an array of identities and
certificates, and include it in the filtered dictionary.

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

5 years agoUnreviewed gardening; rebaseline two media/ tests.
jer.noble@apple.com [Thu, 30 Oct 2014 17:39:52 +0000 (17:39 +0000)]
Unreviewed gardening; rebaseline two media/ tests.

* platform/mac-mavericks/media/controls-after-reload-expected.txt: Added.
* platform/mac-mavericks/media/controls-styling-expected.txt:
* platform/mac-mountainlion/media/controls-after-reload-expected.txt: Added.
* platform/mac-mountainlion/media/controls-styling-expected.txt: Copied from LayoutTests/platform/mac-mavericks/media/controls-styling-expected.txt.
* platform/mac-wk1/media/controls-styling-expected.txt: Copied from LayoutTests/platform/mac-mavericks/media/controls-styling-expected.txt.

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

5 years agoUnreviewed assertion fix.
akling@apple.com [Thu, 30 Oct 2014 16:01:53 +0000 (16:01 +0000)]
Unreviewed assertion fix.

RegExpCachedResult::m_reified is now the dedicated member that knows whether
the result was reified into an array or not. Check that instead of m_result
which is now single-purpose.

* runtime/RegExpCachedResult.cpp:
(JSC::RegExpCachedResult::setInput):

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

5 years ago[GTK] Minibrowser : Add window fullscreen support for Minibrowser
commit-queue@webkit.org [Thu, 30 Oct 2014 13:45:09 +0000 (13:45 +0000)]
[GTK] Minibrowser : Add window fullscreen support for Minibrowser
https://bugs.webkit.org/show_bug.cgi?id=137775

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-10-30
Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/BrowserWindow.c:
(toggleFullScreen): Callback to toggle window fullscreen on pressing F11 key.
(browser_window_init):

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

5 years ago[GStreamer] Video resolution changes trigger a crash in the TextureMapper
philn@webkit.org [Thu, 30 Oct 2014 08:53:39 +0000 (08:53 +0000)]
[GStreamer] Video resolution changes trigger a crash in the TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137065

Reviewed by Gustavo Noronha Silva.

Switch to GstSample for buffer+caps communication between the
video sink and the player. Using a single object type for this
avoid issues where the caps might not correctly describe the
buffer contents anymore, for example when the video resolution is
changed.

* platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample
instead of GstBuffer+GstCaps.
(WebCore::ImageGStreamer::createImage):
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
(ImageGStreamer::ImageGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal
now uses a GstSample instead of a GstBuffer.
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
Store the current sample instead of a buffer. Also renamed the
mutex protecting access to the sample.
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return
early if no sample is available. The caps used to get the video
size are store in the sample.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use
GstSample instead of GstBuffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a
GstSample internally. Also removed the now useless current-caps property.
(_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the
mutex protecting access to the sample.
(_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto.
(webkit_video_sink_init): Disable last-sample in basesink since we
already store one in our sink anyway.
(webkitVideoSinkTimeoutCallback): Switch to GstSample.
(webkitVideoSinkRender): Ditto.
(unlockSampleMutex): Ditto.
(webkitVideoSinkUnlock): Ditto.
(webkitVideoSinkUnlockStop): Ditto.
(webkitVideoSinkStop): Ditto!
(webkitVideoSinkStart): Ditto.
(webkit_video_sink_class_init): Drop current-caps property.
(webkitVideoSinkGetProperty): Deleted.
(unlockBufferMutex): Deleted.

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

5 years agoFormDataBuilder should not use Document
carlosgc@webkit.org [Thu, 30 Oct 2014 08:02:20 +0000 (08:02 +0000)]
FormDataBuilder should not use Document
https://bugs.webkit.org/show_bug.cgi?id=138172

Reviewed by Alexey Proskuryakov.

It's only used by encodingFromAcceptCharset() to fallback to
document input encoding. That method is only used by
FormSubmission::create(), so it could be moved as a static
function to FormSubmission.cpp.

* loader/FormSubmission.cpp:
(WebCore::encodingFromAcceptCharset):
(WebCore::FormSubmission::create):
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted.
* platform/network/FormDataBuilder.h:

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