WebKit-https.git
6 years agoUnreviewed, rolling out r157460.
commit-queue@webkit.org [Tue, 15 Oct 2013 20:20:06 +0000 (20:20 +0000)]
Unreviewed, rolling out r157460.
http://trac.webkit.org/changeset/157460
https://bugs.webkit.org/show_bug.cgi?id=122858

Mis-skip, test isn't actually failing. (Requested by rfong on
#webkit).

* platform/wk2/TestExpectations:

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

6 years agoUnreviewed gardening. Skip unexpected flakey test: webaudio/oscillator-sawtooth.html.
roger_fong@apple.com [Tue, 15 Oct 2013 20:10:46 +0000 (20:10 +0000)]
Unreviewed gardening. Skip unexpected flakey test: webaudio/oscillator-sawtooth.html.

* platform/wk2/TestExpectations:

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

6 years agoWeb Inspector: can't select text inside a text node
graouts@apple.com [Tue, 15 Oct 2013 19:40:50 +0000 (19:40 +0000)]
Web Inspector: can't select text inside a text node
https://bugs.webkit.org/show_bug.cgi?id=122828

Reviewed by Timothy Hatcher.

Cancel the default user interaction when a drag action starts if the
element is being edited.

* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.onattach):
(WebInspector.DOMTreeElement.prototype.handleEvent):

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

6 years agoAdd support for the column-fill property
commit-queue@webkit.org [Tue, 15 Oct 2013 18:45:29 +0000 (18:45 +0000)]
Add support for the column-fill property
https://bugs.webkit.org/show_bug.cgi?id=117693

Patch by Morten Stenshorne <mstensho@opera.com> on 2013-10-15
Reviewed by David Hyatt.

Source/WebCore:

This is only supported in the (new) region based multicol implementation.

With column-fill support, a lot of multicol tests needed an update.
The old implementation behaved as if column-fill were 'auto', but the
initial value is 'balance', so now we need to be explicit about that.
For auto-height tests it doesn't really matter - such multicols are always
balanced anyway.

Tests: fast/multicol/newmulticol/fixed-height-fill-auto.html
       fast/multicol/newmulticol/fixed-height-fill-balance.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ColumnFill):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* rendering/RenderMultiColumnBlock.h:
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
(WebCore::StyleMultiColData::operator==):
* rendering/style/StyleMultiColData.h:

LayoutTests:

With column-fill support, a lot of multicol tests needed an update.
The old implementation behaved as if column-fill were 'auto', but the
initial value is 'balance', so now we need to be explicit about that.
For auto-height tests it doesn't really matter - such multicols are always
balanced anyway.

* compositing/geometry/composited-in-columns.html:
* fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.html:
* fast/block/positioning/offsetLeft-offsetTop-multicolumn.html:
* fast/borders/border-antialiasing.html:
* fast/dynamic/float-moved-downwards-for-pagination-expected.html:
* fast/dynamic/float-moved-downwards-for-pagination.html:
* fast/dynamic/layer-no-longer-paginated.html:
* fast/events/document-elementFromPoint.html:
* fast/line-grid/line-grid-inside-columns.html:
* fast/line-grid/line-grid-into-columns.html:
* fast/multicol/break-properties.html:
* fast/multicol/cell-shrinkback.html:
* fast/multicol/client-rects.html:
* fast/multicol/column-count-with-rules.html:
* fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html:
* fast/multicol/flipped-blocks-hit-test.html:
* fast/multicol/float-paginate-complex.html:
* fast/multicol/float-paginate-empty-lines.html:
* fast/multicol/float-paginate.html:
* fast/multicol/float-truncation.html:
* fast/multicol/hit-test-above-or-below.html:
* fast/multicol/hit-test-end-of-column-with-line-height.html:
* fast/multicol/hit-test-end-of-column.html:
* fast/multicol/hit-test-float.html:
* fast/multicol/image-inside-nested-blocks-with-border.html:
* fast/multicol/layers-in-multicol.html:
* fast/multicol/layers-split-across-columns.html:
* fast/multicol/margin-collapse.html:
* fast/multicol/mixed-opacity-fixed-test.html:
* fast/multicol/mixed-opacity-test.html:
* fast/multicol/mixed-positioning-stacking-order.html:
* fast/multicol/nested-columns.html:
* fast/multicol/newmulticol/cell-shrinkback-expected.html:
* fast/multicol/newmulticol/cell-shrinkback.html:
* fast/multicol/newmulticol/column-rules-fixed-height-expected.html:
* fast/multicol/newmulticol/fixed-height-fill-auto-expected.html: Added.
* fast/multicol/newmulticol/fixed-height-fill-auto.html: Added.
* fast/multicol/newmulticol/fixed-height-fill-balance-expected.html: Added.
* fast/multicol/newmulticol/fixed-height-fill-balance.html: Added.
* fast/multicol/newmulticol/float-avoidance-expected.html:
* fast/multicol/newmulticol/float-avoidance.html:
* fast/multicol/newmulticol/float-multicol-expected.html:
* fast/multicol/newmulticol/float-multicol.html:
* fast/multicol/newmulticol/float-paginate-complex-expected.html:
* fast/multicol/newmulticol/float-paginate-complex.html:
* fast/multicol/newmulticol/float-paginate-empty-lines-expected.html:
* fast/multicol/newmulticol/float-paginate-empty-lines.html:
* fast/multicol/newmulticol/float-paginate-expected.html:
* fast/multicol/newmulticol/float-paginate.html:
* fast/multicol/newmulticol/layers-in-multicol-expected.html:
* fast/multicol/newmulticol/layers-in-multicol.html:
* fast/multicol/newmulticol/layers-split-across-columns-expected.html:
* fast/multicol/newmulticol/layers-split-across-columns.html:
* fast/multicol/newmulticol/positioned-split-expected.html:
* fast/multicol/newmulticol/positioned-split.html:
* fast/multicol/newmulticol/positioned-with-constrained-height-expected.html:
* fast/multicol/newmulticol/positioned-with-constrained-height.html:
* fast/multicol/null-lastFloat-in-removeFloatingObjectsBelow.html:
* fast/multicol/orphans-relayout.html:
* fast/multicol/overflow-across-columns-percent-height.html:
* fast/multicol/overflow-across-columns.html:
* fast/multicol/overflow-content-expected.html:
* fast/multicol/overflow-content.html:
* fast/multicol/overflow-unsplittable.html:
* fast/multicol/pageLogicalOffset-vertical-expected.html:
* fast/multicol/pageLogicalOffset-vertical.html:
* fast/multicol/paginate-block-replaced.html:
* fast/multicol/positioned-outside-of-columns.html:
* fast/multicol/positioned-split.html:
* fast/multicol/positive-leading.html:
* fast/multicol/progression-reverse-overflow-expected.html:
* fast/multicol/progression-reverse-overflow.html:
* fast/multicol/progression-reverse.html:
* fast/multicol/scrolling-overflow.html:
* fast/multicol/seamless-flowed-through-columns-expected.html:
* fast/multicol/seamless-flowed-through-columns.html:
* fast/multicol/table-margin-collapse.html:
* fast/multicol/table-row-height-increase-expected.html:
* fast/multicol/table-row-height-increase.html:
* fast/multicol/table-vertical-align.html:
* fast/multicol/transform-inside-opacity.html:
* fast/multicol/unsplittable-inline-block.html:
* fast/multicol/vertical-lr/break-properties.html:
* fast/multicol/vertical-lr/column-count-with-rules.html:
* fast/multicol/vertical-lr/float-multicol.html:
* fast/multicol/vertical-lr/float-paginate-complex.html:
* fast/multicol/vertical-lr/float-paginate.html:
* fast/multicol/vertical-lr/float-truncation.html:
* fast/multicol/vertical-lr/image-inside-nested-blocks-with-border.html:
* fast/multicol/vertical-lr/nested-columns.html:
* fast/multicol/vertical-lr/rules-with-border-before.html:
* fast/multicol/vertical-lr/unsplittable-inline-block.html:
* fast/multicol/vertical-rl/break-properties.html:
* fast/multicol/vertical-rl/column-count-with-rules.html:
* fast/multicol/vertical-rl/float-avoidance.html:
* fast/multicol/vertical-rl/float-multicol.html:
* fast/multicol/vertical-rl/float-paginate-complex.html:
* fast/multicol/vertical-rl/float-paginate.html:
* fast/multicol/vertical-rl/float-truncation.html:
* fast/multicol/vertical-rl/image-inside-nested-blocks-with-border.html:
* fast/multicol/vertical-rl/nested-columns.html:
* fast/multicol/vertical-rl/rule-style.html:
* fast/multicol/vertical-rl/rules-with-border-before.html:
* fast/multicol/vertical-rl/unsplittable-inline-block.html:
* fast/multicol/widows-and-orphans.html:
* fast/regions/region-style-in-columns.html:
* fast/repaint/multicol-repaint.html:
* fast/sub-pixel/column-clipping.html:

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

6 years agotransition void cti_op_* methods to JIT operations.
msaboff@apple.com [Tue, 15 Oct 2013 18:33:04 +0000 (18:33 +0000)]
transition void cti_op_* methods to JIT operations.
https://bugs.webkit.org/show_bug.cgi?id=122617

Reviewed by Geoffrey Garen.

Converted the follow stubs to JIT operations:
    cti_handle_watchdog_timer
    cti_op_debug
    cti_op_pop_scope
    cti_op_profile_did_call
    cti_op_profile_will_call
    cti_op_put_by_index
    cti_op_put_getter_setter
    cti_op_tear_off_activation
    cti_op_tear_off_arguments
    cti_op_throw_static_error
    cti_optimize

* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
(JSC::CCallHelpers::setupThreeStubArgsGPR):
(JSC::CCallHelpers::setupStubArguments):
(JSC::CCallHelpers::setupStubArguments134):
* jit/JIT.cpp:
(JSC::JIT::emitEnterOptimizationCheck):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_tear_off_arguments):
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
(JSC::JIT::emit_op_throw_static_error):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
(JSC::JIT::emit_op_throw_static_error):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_by_index):
(JSC::JIT::emit_op_put_getter_setter):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_by_index):
(JSC::JIT::emit_op_put_getter_setter):
* jit/JITStubs.cpp:
* jit/JITStubs.h:

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

6 years agoSkip unnecessary null check in RenderText::textLength().
akling@apple.com [Tue, 15 Oct 2013 18:17:56 +0000 (18:17 +0000)]
Skip unnecessary null check in RenderText::textLength().
<https://webkit.org/b/122841>

Reviewed by Antti Koivisto.

RenderText will never have a null String in m_text, so textLength()
can grab at the StringImpl directly, avoiding a null check.

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

6 years agoFontGenericFamilies should not be ref-counted.
akling@apple.com [Tue, 15 Oct 2013 18:16:51 +0000 (18:16 +0000)]
FontGenericFamilies should not be ref-counted.
<https://webkit.org/b/122835>

Reviewed by Anders Carlsson.

FontGenericFamilies is singly-owned by Settings.

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

6 years ago[CSS Shapes] Move RenderBlock::layoutShapeInsideInfo into RenderBlock.cpp
zoltan@webkit.org [Tue, 15 Oct 2013 18:08:14 +0000 (18:08 +0000)]
[CSS Shapes] Move RenderBlock::layoutShapeInsideInfo into RenderBlock.cpp
http://bugs.webkit.org/show_bug.cgi?id=122843

Reviewed by Oliver Hunt.

Historically, layoutShapeInsideInfo was a static function in RenderBlockLineLayout, then it has changed to be a member of RenderBlock,
but at that time it hasn't been moved to RenderBlock.cpp. This patch moves it into RenderBlock.cpp next to the Shapes functions. I removed
an unnecessary CSS_SHAPES #ifdef as well from RenderBlock.cpp.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
(WebCore::RenderBlock::layoutShapeInsideInfo):
* rendering/RenderBlockLineLayout.cpp:

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

6 years agoAdd some API tests for Vector, RefPtr, and Ref
darin@apple.com [Tue, 15 Oct 2013 18:05:56 +0000 (18:05 +0000)]
Add some API tests for Vector, RefPtr, and Ref
https://bugs.webkit.org/show_bug.cgi?id=122840

Reviewed by Andreas Kling.

* TestWebKitAPI/CMakeLists.txt: Added new files.
* TestWebKitAPI/GNUmakefile.am: Ditto.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj: Ditto.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters: Ditto.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.

* TestWebKitAPI/Tests/WTF/Ref.cpp: Added.
* TestWebKitAPI/Tests/WTF/RefLogger.h: Added.
* TestWebKitAPI/Tests/WTF/RefPtr.cpp: Added.
* TestWebKitAPI/Tests/WTF/Vector.cpp: Added move-only insert tests.

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

6 years ago[sh4] Introduce const pools in LLINT.
commit-queue@webkit.org [Tue, 15 Oct 2013 18:03:42 +0000 (18:03 +0000)]
[sh4] Introduce const pools in LLINT.
https://bugs.webkit.org/show_bug.cgi?id=122746

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-10-15
Reviewed by Michael Saboff.

In current implementation of LLINT for sh4, immediate values outside range -128..127 are
loaded this way:

    mov.l .label, rx
    bra out
    nop
    .balign 4
    .label: .long immvalue
    out:

This change introduces const pools for sh4 implementation to avoid lots of useless branches
and reduce code size. It also removes lines of dirty code, like jmpf and callf.

* offlineasm/instructions.rb: Remove jmpf and callf sh4 specific instructions.
* offlineasm/sh4.rb:

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

6 years agoFix broken C Loop LLINT build.
mark.lam@apple.com [Tue, 15 Oct 2013 17:01:10 +0000 (17:01 +0000)]
Fix broken C Loop LLINT build.
https://bugs.webkit.org/show_bug.cgi?id=122839.

Reviewed by Michael Saboff.

* dfg/DFGFlushedAt.cpp:
* jit/JITOperations.h:

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

6 years ago[WinCairo] Build fails.
commit-queue@webkit.org [Tue, 15 Oct 2013 16:39:46 +0000 (16:39 +0000)]
[WinCairo] Build fails.
https://bugs.webkit.org/show_bug.cgi?id=122830

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-15
Reviewed by Brent Fulgham.

* platform/network/NetworkStorageSessionStub.cpp:
(WebCore::NetworkStorageSession::createPrivateBrowsingSession): Update to new return type.

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

6 years agoFileIconLoader should not be ref-counted.
akling@apple.com [Tue, 15 Oct 2013 13:02:14 +0000 (13:02 +0000)]
FileIconLoader should not be ref-counted.
<https://webkit.org/b/122827>

FileIconLoader is singly-owned by FileInputType.

Reviewed by Antti Koivisto.

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

6 years agoRenderText should cache RenderStyle in locals more.
akling@apple.com [Tue, 15 Oct 2013 11:45:03 +0000 (11:45 +0000)]
RenderText should cache RenderStyle in locals more.
<https://webkit.org/b/122823>

Reviewed by Antti Koivisto.

Now that fetching the RenderStyle has to go through the parent,
we should avoid unnecessary loads by caching style() in a local.

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

6 years ago[Soup] Unreviewed buildfix after r157445 for ENABLE(NETWORK_PROCESS) builds.
ossy@webkit.org [Tue, 15 Oct 2013 11:44:05 +0000 (11:44 +0000)]
[Soup] Unreviewed buildfix after r157445 for ENABLE(NETWORK_PROCESS) builds.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):

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

6 years agoUnreviewed. Fix the GTK+ build after r157445.
carlosgc@webkit.org [Tue, 15 Oct 2013 11:25:08 +0000 (11:25 +0000)]
Unreviewed. Fix the GTK+ build after r157445.

* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didFailProvisionalLoadWithErrorForFrame):

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

6 years agoMove PlatformCertificateInfo to WebCore and make the ResourceResponse primitives...
ossy@webkit.org [Tue, 15 Oct 2013 10:24:29 +0000 (10:24 +0000)]
Move PlatformCertificateInfo to WebCore and make the ResourceResponse primitives work in terms of that platform agnostic object
https://bugs.webkit.org/show_bug.cgi?id=118520

Reviewed by Anders Carlsson.

Added PlatformCertificateInfo getter and setter to ResourceErrorBase
and ResourceResponseBase so that getting and setting certificates
becomes cross platform.

Changed the existing platform specific certificate getters and setters
of ResourceError and ResourceResponse to use the
PlatformCertificateInfo member.

Original patch by Kwang Yul Seo  <skyul@company100.net>

Source/WebCore:

The following things were fixed by Csaba Osztrogonác:
- trivial conflicts resolved in WebCore.exp.in, project.pbxproj, NetworkResourceLoader.cpp,
  WebPageProxy.h, WebFrameLoaderClient.cpp and PlatformEfl.cmake.
- trivial fix in the new AsynchronousNetworkLoaderClient.cpp
- style fixed (NULL -> 0 and smaller indentation in WebCoreArgumentCodersSoup.cpp)
- obsolete change removed from NetworkResourceLoader.cpp
- unneeded typo removed from ResourceHandleSoup.cpp
- Fixed the if guard of including RetainPtr.h in PlatformCertificateInfo.h to make Windows build happy.
- add PlatformCertificateInfoCFNet.cpp with empty constructor and destructor to make Windows build happy.
- resolved conflict in Source/WebCore/WebCore.xcodeproj/project.pbxproj after r156488
- renamed KURL to URL after r156550.
- removed obsolete Qt changes
- added back initializers for m_soupFlags
- included gio/gio.h instead of libsoup/soup.h in PlatformCertificateInfo.h
- removed unused class forward declarations and includes

* GNUmakefile.list.am:
* PlatformEfl.cmake:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/PlatformCertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/PlatformCertificateInfo.h.
(WebCore::PlatformCertificateInfo::certificate):
(WebCore::PlatformCertificateInfo::setCertificate):
(WebCore::PlatformCertificateInfo::tlsErrors):
(WebCore::PlatformCertificateInfo::setTLSErrors):
* platform/network/ResourceErrorBase.h:
(WebCore::ResourceErrorBase::platformCertificateInfo):
(WebCore::ResourceErrorBase::setPlatformCertificateInfo):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::platformCertificateInfo):
(WebCore::ResourceResponseBase::setPlatformCertificateInfo):
* platform/network/cf/ResourceResponse.h:
* platform/network/mac/PlatformCertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/PlatformCertificateInfo.mm.
(WebCore::PlatformCertificateInfo::PlatformCertificateInfo):
(WebCore::PlatformCertificateInfo::~PlatformCertificateInfo):
(WebCore::PlatformCertificateInfo::setCertificateChain):
(WebCore::PlatformCertificateInfo::certificateChain):
(WebCore::PlatformCertificateInfo::dump):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::setCertificateChain):
(WebCore::ResourceResponse::certificateChain):
* platform/network/soup/PlatformCertificateInfoSoup.cpp:
(WebCore::PlatformCertificateInfo::PlatformCertificateInfo):
(WebCore::PlatformCertificateInfo::~PlatformCertificateInfo):
* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::tlsErrors):
(WebCore::ResourceError::setTLSErrors):
(WebCore::ResourceError::certificate):
(WebCore::ResourceError::setCertificate):
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::platformCopy):
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
(WebCore::ResourceResponse::soupMessageCertificate):
(WebCore::ResourceResponse::setSoupMessageCertificate):
(WebCore::ResourceResponse::soupMessageTLSErrors):
(WebCore::ResourceResponse::setSoupMessageTLSErrors):
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::toSoupMessage):
(WebCore::ResourceResponse::updateFromSoupMessage):

Source/WebKit2:

The following things were fixed by Csaba Osztrogonác:
- trivial conflicts resolved in WebCore.exp.in, project.pbxproj, NetworkResourceLoader.cpp,
  WebPageProxy.h, WebFrameLoaderClient.cpp and PlatformEfl.cmake.
- trivial fix in the new AsynchronousNetworkLoaderClient.cpp
- style fixed (NULL -> 0 and smaller indentation in WebCoreArgumentCodersSoup.cpp)
- obsolete change removed from NetworkResourceLoader.cpp
- unneeded typo removed from ResourceHandleSoup.cpp
- Fixed the if guard of including RetainPtr.h in PlatformCertificateInfo.h to make Windows build happy.
- add PlatformCertificateInfoCFNet.cpp with empty constructor and destructor to make Windows build happy.
- resolve conflict in Source/WebCore/WebCore.xcodeproj/project.pbxproj after r156488
- rename KURL to URL after r156550.
- remove obsolete Qt changes
- added back initializers for m_soupFlags
- included gio/gio.h instead of libsoup/soup.h in PlatformCertificateInfo.h
- removed unused class forward declarations and includes

* GNUmakefile.list.am:
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/mac/NetworkProcessMac.mm:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/API/c/mac/WKCertificateInfoMac.mm:
(WKCertificateInfoCreateWithCertficateChain):
* Shared/Authentication/AuthenticationManager.h:
* Shared/Authentication/AuthenticationManager.messages.in:
* Shared/Authentication/mac/AuthenticationManager.mac.mm:
* Shared/UserMessageCoders.h:
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebCertificateInfo.h:
(WebKit::WebCertificateInfo::create):
(WebKit::WebCertificateInfo::platformCertificateInfo):
(WebKit::WebCertificateInfo::WebCertificateInfo):
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::decode):
(CoreIPC::::encode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):
* Shared/soup/PlatformCertificateInfo.cpp: Removed.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):
* Target.pri:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_tls_info):
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::useCredential):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):

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

6 years agoRemove redundant Document::getElementById
rniwa@webkit.org [Tue, 15 Oct 2013 07:02:55 +0000 (07:02 +0000)]
Remove redundant Document::getElementById
https://bugs.webkit.org/show_bug.cgi?id=122813

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/4e8f1c5316415614b84370c602beae4a1008299f

This function simply calls virtual TreeScope::getElementById and Document inherits from TreeScope.

* WebCore.exp.in:
* dom/Document.cpp:
* dom/Document.h:

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

6 years agoSource/WebCore: in safari,the background-color of input[type="search"] can't work
commit-queue@webkit.org [Tue, 15 Oct 2013 05:55:40 +0000 (05:55 +0000)]
Source/WebCore: in safari,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-14
Reviewed by Ryosuke Niwa.

When input type=search is styled with css background property then
it does not change the background-color of field. Its happening becasue
search field is not counted as styled control. Thus theme ignores the
css background property. With this patch search field is also counted as
styled control so background property reflects on search field.

Test: fast/forms/search/search-field-background-color.html

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isControlStyled):Now search field is also
a styled control.

LayoutTests: in safari ,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-14
Reviewed by Ryosuke Niwa.

Added testcase to verify the background color of search field when
search field is styled with css background property.

* fast/forms/search/search-field-background-color-expected.txt: Added.
* fast/forms/search/search-field-background-color.html: Added.
* platform/mac/fast/forms/search-styled-expected.txt: Rebaselined.

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

6 years ago[CSS Shapes] Move shape-inside floats tests into their own subdirectory
zoltan@webkit.org [Tue, 15 Oct 2013 05:06:10 +0000 (05:06 +0000)]
[CSS Shapes] Move shape-inside floats tests into their own subdirectory
https://bugs.webkit.org/show_bug.cgi?id=122761

Reviewed by Sam Weinig.

I'm going to add some new float tests soon. In order to keep our shapes tests organized,
I'm moving the shape-inside with floating content tests to their own subdirectory.

* fast/shapes/shape-inside/floats/shape-inside-floats-simple-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-floats-simple-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-floats-simple.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-floats-simple.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-left-triangle-block-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-block-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-left-triangle-block-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-block-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-left-triangle-inline-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-inline-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-left-triangle-inline-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-inline-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-right-triangle-block-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-block-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-right-triangle-block-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-block-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-right-triangle-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-right-triangle-inline-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-inline-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-right-triangle-inline-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-inline-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-lower-right-triangle.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-left-triangle-block-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-block-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-left-triangle-block-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-block-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-left-triangle-inline-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-inline-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-left-triangle-inline-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-inline-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-vertical-lr-inline-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-right-triangle-block-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-block-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-right-triangle-block-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-block-content.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-right-triangle-inline-content-expected.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-inline-content-expected.html.
* fast/shapes/shape-inside/floats/shape-inside-left-float-in-upper-right-triangle-inline-content.html: Renamed from LayoutTests/fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-inline-content.html.

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

6 years agoEventPath::updateTouchLists traverses through EventPath thrice
rniwa@webkit.org [Tue, 15 Oct 2013 04:08:16 +0000 (04:08 +0000)]
EventPath::updateTouchLists traverses through EventPath thrice
https://bugs.webkit.org/show_bug.cgi?id=122804

Reviewed by Benjamin Poulain.

Instead of traversing through EventPath for each TouchList, traverse through TouchList for every EventContext.
This paves our way to have one-pass traversal over EventPath, and evetually to remove EventContext altogether.

This change should also improve the cache hit rate since all Touch objects tend to be allocated at the same time
but this performance improvement is probably not observable.

* dom/EventContext.h:
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Added a new constructor that takes Touch and
and TouchListType. We need to store these two values in order to update EventContext later.
(WebCore::EventRelatedNodeResolver::touch): Added,
(WebCore::EventRelatedNodeResolver::touchListType): Added.
(WebCore::addRelatedNodeResolversForTouchList): Extracted from updateTouchListsInEventPath.
(WebCore::EventPath::updateTouchLists): Moved the loop over m_path here. Notice that the outer loop iterates
over m_path instead of touchList as done in updateTouchListsInEventPath. The inner loop goes through resolvers
and adds Touch objects each EventContext as needed.

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

6 years agoUnreviewed, EFL gardening. Below tests don't be failed anymore after enabling subpixe...
gyuyoung.kim@samsung.com [Tue, 15 Oct 2013 03:48:55 +0000 (03:48 +0000)]
Unreviewed, EFL gardening. Below tests don't be failed anymore after enabling subpixel layout.

fast/spatial-navigation/snav-container-white-space.html
fast/spatial-navigation/snav-fully-aligned-horizontally.html
fast/spatial-navigation/snav-iframe-no-scrollable-content.html

* platform/efl/TestExpectations:

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

6 years agoTransition *switch* and *scope* JITStubs to JIT operations.
mark.lam@apple.com [Tue, 15 Oct 2013 03:03:45 +0000 (03:03 +0000)]
Transition *switch* and *scope* JITStubs to JIT operations.
https://bugs.webkit.org/show_bug.cgi?id=122757.

Reviewed by Geoffrey Garen.

Transitioning:
    cti_op_switch_char
    cti_op_switch_imm
    cti_op_switch_string
    cti_op_resolve_scope
    cti_op_get_from_scope
    cti_op_put_to_scope

* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
* jit/JITStubs.cpp:
* jit/JITStubs.h:

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

6 years agoDon't generate a wasteful isObservable check in isReachableFromOpaqueRoots
ap@apple.com [Tue, 15 Oct 2013 02:47:38 +0000 (02:47 +0000)]
Don't generate a wasteful isObservable check in isReachableFromOpaqueRoots
https://bugs.webkit.org/show_bug.cgi?id=122802

Reviewed by Mark Hahnenberg.

* bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Don't.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
Updated results.

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

6 years agoWindows select element doesn't draw RTL properly.
roger_fong@apple.com [Tue, 15 Oct 2013 01:06:20 +0000 (01:06 +0000)]
Windows select element doesn't draw RTL properly.
https://bugs.webkit.org/show_bug.cgi?id=122785.

Reviewed by Brent Fulgham.

Problems include the popup items not drawing on the right hand side and
not respecting the direction or the directional override styling of the option.
The selected element (drawn in the actual select element) also doesn't respect
the style settings of the selected menu option.

Tests:
Covered by fast/text/international/pop-up-button-text-alignment-and-direction.html.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::selectItemWritingDirectionIsNatural):
(WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
* platform/win/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt: Removed.

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

6 years agoSource/WebCore: AX: fieldset should have GroupRole and legend should be description.
rniwa@webkit.org [Tue, 15 Oct 2013 00:38:10 +0000 (00:38 +0000)]
Source/WebCore: AX: fieldset should have GroupRole and legend should be description.
https://bugs.webkit.org/show_bug.cgi?id=122534

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

Changes fieldset to derive AXDescription from legend if one is available. Added
convenience method to AccessibilityObject to fetch element if available.

Test: accessibility/fieldset-element.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::element):
(WebCore::AccessibilityObject::isARIAHidden):
(WebCore::AccessibilityObject::isDOMHidden):
(WebCore::AccessibilityObject::defaultObjectInclusion):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isHidden):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::getAttribute):
(WebCore::AccessibilitySlider::valueForRange):
(WebCore::AccessibilitySlider::maxValueForRange):
(WebCore::AccessibilitySlider::minValueForRange):
(WebCore::AccessibilitySlider::setValue):
(WebCore::AccessibilitySlider::inputElement):
* accessibility/AccessibilitySlider.h:
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFieldSetElement.h:

LayoutTests: Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
https://bugs.webkit.org/show_bug.cgi?id=122776

Reviewed by Darin Adler.

* fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt: Added.
* fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html: Added.

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

6 years agoAdding myself to CC list for some components.
roger_fong@apple.com [Tue, 15 Oct 2013 00:35:36 +0000 (00:35 +0000)]
Adding myself to CC list for some components.

* Scripts/webkitpy/common/config/watchlist:

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

6 years agoAX: fieldset should have GroupRole and legend should be description.
commit-queue@webkit.org [Tue, 15 Oct 2013 00:23:25 +0000 (00:23 +0000)]
AX: fieldset should have GroupRole and legend should be description.
https://bugs.webkit.org/show_bug.cgi?id=122534

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

Source/WebCore:

Changes fieldset to derive AXDescription from legend if one is available. Added
convenience method to AccessibilityObject to fetch element if available.

Test: accessibility/fieldset-element.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::element):
(WebCore::AccessibilityObject::isARIAHidden):
(WebCore::AccessibilityObject::isDOMHidden):
(WebCore::AccessibilityObject::defaultObjectInclusion):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isHidden):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::getAttribute):
(WebCore::AccessibilitySlider::valueForRange):
(WebCore::AccessibilitySlider::maxValueForRange):
(WebCore::AccessibilitySlider::minValueForRange):
(WebCore::AccessibilitySlider::setValue):
(WebCore::AccessibilitySlider::inputElement):
* accessibility/AccessibilitySlider.h:
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFieldSetElement.h:

LayoutTests:

legend no longer treated as titleUIElement so removing tests that check this functionality.
Added test to check that legend is used as AXDescription of fieldset if present.

* accessibility/fieldset-element.html: Added.
* accessibility/hidden-legend-expected.txt: Removed.
* accessibility/hidden-legend.html: Removed.
* accessibility/legend.html: Removed.
* platform/efl/accessibility/legend-expected.txt: Removed.
* platform/gtk/accessibility/legend-expected.txt: Removed.
* platform/mac/accessibility/fieldset-element-expected.txt: Added.
* platform/mac/accessibility/legend-expected.txt: Removed.
* platform/mac/accessibility/role-subrole-roledescription-expected.txt:
* platform/mac/accessibility/role-subrole-roledescription.html:

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

6 years agoDFG PutById IC should use the ConcurrentJITLocker since it's now dealing with IC...
fpizlo@apple.com [Tue, 15 Oct 2013 00:05:45 +0000 (00:05 +0000)]
DFG PutById IC should use the ConcurrentJITLocker since it's now dealing with IC's that get read by the compiler thread
https://bugs.webkit.org/show_bug.cgi?id=122786

Reviewed by Mark Hahnenberg.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStub): Resetting a stub should acquire the lock since this is observable from the thread; but we should only acquire the lock if we're resetting outside of GC.
* jit/Repatch.cpp:
(JSC::repatchPutByID): Doing the PutById patching should hold the lock.
(JSC::buildPutByIdList): Ditto.

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

6 years ago[Windows] Unreviewed build fix.
roger_fong@apple.com [Tue, 15 Oct 2013 00:02:52 +0000 (00:02 +0000)]
[Windows] Unreviewed build fix.

* WebCore.vcxproj/WebCoreCommon.props:

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

6 years agoAssertion failure in Range::processContentsBetweenOffsets
rniwa@webkit.org [Mon, 14 Oct 2013 23:58:22 +0000 (23:58 +0000)]
Assertion failure in Range::processContentsBetweenOffsets
https://bugs.webkit.org/show_bug.cgi?id=122777

Reviewed by Darin Adler.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/c15de182774c7859c20d97126eb844ae97b792a4

This patch changes ASSERT statements for checking |endOffset| inbound in Range::processContentsBetweenOffsets()
to limit |endOffset|. This is necessary when DOMNodeRemovedFromDocument event handler splits text nodes,
Range::insertNode() on text node, in the range calling Range::deleteContents().

Test: fast/dom/Range/range-delete-contents-mutation-event-crash.html

* dom/Range.cpp:
(WebCore::Range::processContentsBetweenOffsets):

LayoutTests:

* fast/dom/Range/range-delete-contents-mutation-event-crash-expected.txt: Added.
* fast/dom/Range/range-delete-contents-mutation-event-crash.html: Added.

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

6 years agoAdd an empty window.crypto.webkitSubtle
ap@apple.com [Mon, 14 Oct 2013 23:36:32 +0000 (23:36 +0000)]
Add an empty window.crypto.webkitSubtle
https://bugs.webkit.org/show_bug.cgi?id=122778

Reviewed by Mark Hahnenberg.

Source/WebCore:

Tests: security/crypto-subtle-gc-2.html
       security/crypto-subtle-gc-3.html
       security/crypto-subtle-gc.html

* DerivedSources.make: Process SubtleCrypto.idl.

* crypto: Added.
* WebCore.xcodeproj/project.pbxproj:
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj.filters:

* bindings/js/JSSubtleCryptoCustom.cpp: Added. Empty for now, but we'll certainly
need custom bindings code here.

* crypto/SubtleCrypto.cpp: Added.
(WebCore::SubtleCrypto::SubtleCrypto):
(WebCore::SubtleCrypto::document):
* crypto/SubtleCrypto.h: Added.
* crypto/SubtleCrypto.idl: Added.
* page/Crypto.cpp:
(WebCore::Crypto::subtle):
* page/Crypto.h:
* page/Crypto.idl:

LayoutTests:

* TestExpectations: The feature isn't enabled anywhere yet, so skipping the new tests.

* security/crypto-subtle-gc-2-expected.txt: Added.
* security/crypto-subtle-gc-2.html: Added.
* security/crypto-subtle-gc-3-expected.txt: Added.
* security/crypto-subtle-gc-3.html: Added.
* security/crypto-subtle-gc-expected.txt: Added.
* security/crypto-subtle-gc.html: Added.

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

6 years agoAdd FTL support for LogicalNot(string)
mark.lam@apple.com [Mon, 14 Oct 2013 23:30:37 +0000 (23:30 +0000)]
Add FTL support for LogicalNot(string)
https://bugs.webkit.org/show_bug.cgi?id=122765

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-14
Reviewed by Filip Pizlo.

This patch is tested by:
regress/script-tests/emscripten-cube2hash.js.ftl-eager

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileLogicalNot):

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

6 years agoRemove GestureEvent leftovers from WebCore
commit-queue@webkit.org [Mon, 14 Oct 2013 23:26:45 +0000 (23:26 +0000)]
Remove GestureEvent leftovers from WebCore
<https://webkit.org/b/122780>

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-10-14
Reviewed by Anders Carlsson.

- Removed some remaining references to PlatformGestureEvent, supposed to
  be removed by r157316
- TOUCH_ADJUSTMENT should be reworked after GestureEvent feature
  removal

* page/EventHandler.cpp:
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/EventHandler.h:
* platform/PlatformEvent.h:
* platform/ScrollAnimatorNone.cpp:
* platform/ScrollableArea.h:

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

6 years ago[sh4] Fixes after r157404 and r157411.
commit-queue@webkit.org [Mon, 14 Oct 2013 23:22:38 +0000 (23:22 +0000)]
[sh4] Fixes after r157404 and r157411.
https://bugs.webkit.org/show_bug.cgi?id=122782

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-10-14
Reviewed by Michael Saboff.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation): Add missing SH4_32BIT_DUMMY_ARG.
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JITInlines.h:
(JSC::JIT::callOperation): Add missing SH4_32BIT_DUMMY_ARG.
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_by_id): Remove unwanted BEGIN_UNINTERRUPTED_SEQUENCE.

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

6 years agoBuild fix after r157366
commit-queue@webkit.org [Mon, 14 Oct 2013 23:17:59 +0000 (23:17 +0000)]
Build fix after r157366
http://bugs.webkit.org/show_bug.cgi?id=122783

When TOUCH_AJUSTMENT is enabled build fails due to some
refactors in TextRender functions.

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-10-14
Reviewed by Anders Carlsson.

* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::appendContextSubtargetsForNode):

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

6 years agoThe content of the DOM panel for iframes is not updated until the "onload" event
achicu@adobe.com [Mon, 14 Oct 2013 23:08:37 +0000 (23:08 +0000)]
The content of the DOM panel for iframes is not updated until the "onload" event
https://bugs.webkit.org/show_bug.cgi?id=122653

Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/inspector-protocol/loading-iframe-document-node.html

Renamed InspectorDOMAgent::loadEventFired to InspectorDOMAgent::didCommitLoad and moved the call site
from InspectorInstrumentation::loadEventFiredImpl to InspectorInstrumentation::didCommitLoadImpl.
This is to make sure that it will invalidate the content of the iframe as soon as the frame navigates
to a different page. This way the new node can be retrieved as soon as the page has some content, and
not just when the page is fully loaded.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::didCommitLoad): Renamed from loadEventFired, as it is now called from
didCommitLoadImpl instead.
(WebCore::InspectorDOMAgent::frameDocumentUpdated): Updated comment to point to the new function name.
* inspector/InspectorDOMAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::loadEventFiredImpl): Removed call do InspectorDOMAgent.loadEventFired.
(WebCore::InspectorInstrumentation::didCommitLoadImpl): Added call to InspectorDOMAgent.didCommitLoad.

LayoutTests:

Added test to check that immediately after the scripting context is created, the
inspector already has access to the nodeId of the document of the iframe.

* http/tests/inspector-protocol/loading-iframe-document-node-expected.txt: Added.
* http/tests/inspector-protocol/loading-iframe-document-node.html: Added.
* http/tests/inspector-protocol/resources/slow-test-page.html: Added.

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

6 years agoUnreviewed, rolling out r157413.
commit-queue@webkit.org [Mon, 14 Oct 2013 21:59:41 +0000 (21:59 +0000)]
Unreviewed, rolling out r157413.
http://trac.webkit.org/changeset/157413
https://bugs.webkit.org/show_bug.cgi?id=122779

Appears to have caused frequent crashes (Requested by ap on
#webkit).

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/DeferGC.cpp: Removed.
* heap/DeferGC.h:
* jit/JITStubs.cpp:
(JSC::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ConcurrentJITLock.h:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
* runtime/JSCellInlines.h:
(JSC::allocateCell):
* runtime/Structure.cpp:
(JSC::Structure::materializePropertyMap):
(JSC::Structure::putSpecificValue):
(JSC::Structure::createPropertyMap):
* runtime/Structure.h:

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

6 years agohttps://bugs.webkit.org/show_bug.cgi?id=122774.
roger_fong@apple.com [Mon, 14 Oct 2013 21:45:13 +0000 (21:45 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=122774.
<rdar://problem/6138855>.

Reviewed by Brent Fulgham.

Add a field to keep track of hovered over index.
Use index to determine whether or not to use the existing selected index on the mouse down event.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::PopupMenuWin):
(WebCore::PopupMenuWin::show):
(WebCore::PopupMenuWin::wndProc):
* platform/win/PopupMenuWin.h:

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

6 years agoCOLLECT_ON_EVERY_ALLOCATION causes assertion failures
mhahnenberg@apple.com [Mon, 14 Oct 2013 21:41:13 +0000 (21:41 +0000)]
COLLECT_ON_EVERY_ALLOCATION causes assertion failures
https://bugs.webkit.org/show_bug.cgi?id=122652

Reviewed by Filip Pizlo.

COLLECT_ON_EVERY_ALLOCATION wasn't accounting for the new GC deferral mechanism,
so we would end up ASSERTing during garbage collection.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateSlowCase):

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

6 years agoUnreviewed, fix the paths so that the test passes.
fpizlo@apple.com [Mon, 14 Oct 2013 21:11:50 +0000 (21:11 +0000)]
Unreviewed, fix the paths so that the test passes.

* js/regress/put-by-id.html:

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

6 years agoSeparate out array iteration intrinsics
oliver@apple.com [Mon, 14 Oct 2013 21:08:37 +0000 (21:08 +0000)]
Separate out array iteration intrinsics
https://bugs.webkit.org/show_bug.cgi?id=122656

Reviewed by Michael Saboff.

Separate out the intrinsics for key and values iteration
of arrays.

This requires moving moving array iteration into the iterator
instance, rather than the prototype, but this is essentially
unobservable so we'll live with it for now.

* jit/ThunkGenerators.cpp:
(JSC::arrayIteratorNextThunkGenerator):
(JSC::arrayIteratorNextKeyThunkGenerator):
(JSC::arrayIteratorNextValueThunkGenerator):
* jit/ThunkGenerators.h:
* runtime/ArrayIteratorPrototype.cpp:
(JSC::ArrayIteratorPrototype::finishCreation):
* runtime/Intrinsic.h:
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::finishCreation):
(JSC::createIteratorResult):
(JSC::arrayIteratorNext):
(JSC::arrayIteratorNextKey):
(JSC::arrayIteratorNextValue):
(JSC::arrayIteratorNextGeneric):
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):

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

6 years agoVirtualize PlatformCALayer
timothy_horton@apple.com [Mon, 14 Oct 2013 20:49:59 +0000 (20:49 +0000)]
Virtualize PlatformCALayer
https://bugs.webkit.org/show_bug.cgi?id=122672

Reviewed by Anders Carlsson.

No new tests, just a refactoring.

* WebCore.exp.in:
setGeometryFlipped is on PlatformCALayerMac now.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Add PlatformCALayer.cpp, PlatformCALayerWin.h, and let VS do its
thing with some other files.

* WebCore.xcodeproj/project.pbxproj:
Add PlatformCALayer.cpp and PlatformCALayerMac.h.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::platformLayer):
Make a PlatformCALayerWin explicitly.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
Added. Decide whether to make a PlatformCALayer{Mac, Win} based on the platform.
Later, we will decide between other subclasses based on other things.

(WebCore::GraphicsLayerCA::filtersCanBeComposited):
Do the same thing for filtersCanBeComposited.

(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::setContentsToMedia):
(WebCore::GraphicsLayerCA::setContentsToCanvas):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
Use createPlatformCALayer instead of PlatformCALayer::create.

* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
For now, use the PlatformCALayerMac version of filtersCanBeComposited,
since this code is heavily tied to having CALayers in the Web process.

* platform/graphics/ca/GraphicsLayerCA.h:
Include PlatformCALayer.h here so we can get the LayerType enum.
(NOTE-to-be-removed: if there's a better way to do this, I'm open to
suggestions; I couldn't puzzle out nested 'enum class' stuff).

Add the createPlatformCALayers.

* platform/graphics/ca/PlatformCAAnimation.h:
Friend the subclasses too.

* platform/graphics/ca/PlatformCALayer.cpp: Added.
(WebCore::PlatformCALayer::~PlatformCALayer):
Pull the shared part of the PlatformCALayer destructor out.

* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::platformLayer):
(WebCore::PlatformCALayer::setOwner):
(WebCore::PlatformCALayer::PlatformCALayer):
Virtualize all the things. Move platform specific members to their new subclasses.

* platform/graphics/ca/mac/PlatformCALayerMac.h: Added.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
Move the PLATFORM(MAC) implementations from PlatformCALayer to PlatformCALayerMac.

(PlatformCALayer::platformCALayer):
The platformCALayer lookup function is static on PlatformCALayer, so it can't
be moved to the subclasses. It might be a good idea in the future to move towards
a platform-independent mechanism for looking up PlatformCALayers from PlatformLayers,
and to avoid needing to do this as often as we do now.

* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::CACFLayerTreeHost):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
Move the PLATFORM(WIN) implementations from PlatformCALayer to PlatformCALayerWin.

(PlatformCALayerWin::create):
(PlatformCALayer::platformCALayer):

* platform/graphics/ca/win/PlatformCALayerWin.h: Added.

* platform/graphics/win/GraphicsContext3DWin.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie):
Include PlatformCALayerWin.h and explicitly make PlatformCALayerWins here.

* FullscreenVideoController.cpp:
(FullscreenVideoController::FullscreenVideoController):
Include PlatformCALayerWin.h and explicitly make PlatformCALayerWins here.

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

6 years ago[cmake] MediaControlsApple is used only by Efl port and is on CMakeLists.txt
hugo.lima@openbossa.org [Mon, 14 Oct 2013 20:44:58 +0000 (20:44 +0000)]
[cmake] MediaControlsApple is used only by Efl port and is on CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=122772

Reviewed by Anders Carlsson.

* CMakeLists.txt: Removed MediaControlsApple.cpp
* PlatformEfl.cmake: Added MediaControlsApple.cpp

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

6 years agowindow.crypto doesn't preserve custom properties
ap@apple.com [Mon, 14 Oct 2013 20:28:55 +0000 (20:28 +0000)]
window.crypto doesn't preserve custom properties
https://bugs.webkit.org/show_bug.cgi?id=122770

Reviewed by Mark Hahnenberg.

Source/WebCore:

Test: security/crypto-gc.html

Generate isReachableFromOpaqueRoots that makes Crypto live as long as the document
lives (because that's when it's observable through window object).

* page/Crypto.cpp:
(WebCore::Crypto::Crypto):
(WebCore::Crypto::~Crypto):
(WebCore::Crypto::document):
* page/Crypto.h:
(WebCore::Crypto::create):
Made Crypto a ContextDestructionObserver, so that it can report its document to bindings.
Removed ScriptWrappable, because it seems to have served no purpose in this class.

* page/Crypto.idl: Added GenerateIsReachable. Removed ImplementationLacksVTable,
because the class now has a vtable, and can be checked for bindings integrity.

* page/DOMWindow.cpp: (WebCore::DOMWindow::crypto): Pass a document when creating
crypto.

LayoutTests:

* security/crypto-gc-expected.txt: Added.
* security/crypto-gc.html: Added.

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

6 years agoCTTE: NamedNodeMap always has a corresponding Element.
akling@apple.com [Mon, 14 Oct 2013 20:11:51 +0000 (20:11 +0000)]
CTTE: NamedNodeMap always has a corresponding Element.
<https://webkit.org/b/122769>

Reviewed by Anders Carlsson.

Made NamedNodeMap::m_element a reference and remove an assertion
that it's never null.

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

6 years agoREGRESSION(r157408): Crashes in RenderFullScreen::wrapRenderer().
akling@apple.com [Mon, 14 Oct 2013 19:53:01 +0000 (19:53 +0000)]
REGRESSION(r157408): Crashes in RenderFullScreen::wrapRenderer().

Unreviewed crash fix for these two tests:

- fullscreen/full-screen-restrictions.html
- fullscreen/empty-anonymous-block-continuation-crash.html

* rendering/RenderFullScreen.cpp:
(RenderFullScreen::wrapRenderer):

    Get the RenderArena from Document like we did before this patch.

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

6 years ago[CSS Shapes] Image valued shape-outside shapes should update the layout after the...
hmuller@adobe.com [Mon, 14 Oct 2013 19:35:32 +0000 (19:35 +0000)]
[CSS Shapes] Image valued shape-outside shapes should update the layout after the image has been loaded
https://bugs.webkit.org/show_bug.cgi?id=122340

Reviewed by Simon Fraser.

Source/WebCore:

Ensure that the an image-valued shape-outside layout is updated after the image has
been loaded.

Test: http/tests/css/css-image-valued-shape.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::imageChanged): Added code for the shape-outside case.
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Ditto.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement): Ditto.
(WebCore::RenderElement::setStyle): Ditto.

LayoutTests:

Verify that an image-valued shape-outside layout is updated after the image has been loaded.

* http/tests/css/css-image-valued-shape-expected.txt: Added.
* http/tests/css/css-image-valued-shape.html: Added.

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

6 years agollint_slow_path_put_by_id can deadlock on a ConcurrentJITLock
mhahnenberg@apple.com [Mon, 14 Oct 2013 19:34:44 +0000 (19:34 +0000)]
llint_slow_path_put_by_id can deadlock on a ConcurrentJITLock
https://bugs.webkit.org/show_bug.cgi?id=122667

Reviewed by Filip Pizlo.

The issue this patch is attempting to fix is that there are places in our codebase
where we acquire the ConcurrentJITLock for a particular CodeBlock, then we do some
operations that can initiate a garbage collection. Garbage collection then calls
some methods of CodeBlock that also take the ConcurrentJITLock (because they don't
always necessarily run during garbage collection). This causes a deadlock.

To fix this issue, this patch adds a new RAII-style object (DisallowGC) that stores
into a thread-local field that indicates that it is unsafe to perform any operation
that could trigger garbage collection on the current thread. In debug builds,
ConcurrentJITLocker contains one of these DisallowGC objects so that we can eagerly
detect deadlocks.

This patch also adds a new type of ConcurrentJITLocker, GCSafeConcurrentJITLocker,
which uses the DeferGC mechanism to prevent collections from occurring while the
lock is held.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/DeferGC.cpp: Added.
* heap/DeferGC.h:
(JSC::DisallowGC::DisallowGC):
(JSC::DisallowGC::~DisallowGC):
(JSC::DisallowGC::isGCDisallowedOnCurrentThread):
(JSC::DisallowGC::initialize):
* jit/JITStubs.cpp:
(JSC::tryCachePutByID):
(JSC::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ConcurrentJITLock.h:
(JSC::ConcurrentJITLockerBase::ConcurrentJITLockerBase):
(JSC::ConcurrentJITLockerBase::~ConcurrentJITLockerBase):
(JSC::ConcurrentJITLockerBase::unlockEarly):
(JSC::GCSafeConcurrentJITLocker::GCSafeConcurrentJITLocker):
(JSC::ConcurrentJITLocker::ConcurrentJITLocker):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
* runtime/JSCellInlines.h:
(JSC::allocateCell):
* runtime/Structure.cpp:
(JSC::Structure::materializePropertyMap):
(JSC::Structure::putSpecificValue):
(JSC::Structure::createPropertyMap):
* runtime/Structure.h:

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

6 years agoRemove some silly null checks in Element/NamedNodeMap.
akling@apple.com [Mon, 14 Oct 2013 19:24:09 +0000 (19:24 +0000)]
Remove some silly null checks in Element/NamedNodeMap.
<https://webkit.org/b/122767>

Reviewed by Darin Adler.

Make shouldIgnoreAttributeCase() take a const Element&, exposing
some unnecessary null checks.

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

6 years agoBaseline JIT should use the DFG's PutById IC
fpizlo@apple.com [Mon, 14 Oct 2013 18:39:45 +0000 (18:39 +0000)]
Baseline JIT should use the DFG's PutById IC
https://bugs.webkit.org/show_bug.cgi?id=122704

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

Mostly no big deal, just removing the old Baseline JIT's put_by_id IC support and forcing
that JIT to use the DFG's (i.e. JITOperations) PutById IC.

The only complicated part was that the PutById operations assumed that we first did a
cell speculation, which the baseline JIT obviously won't do. So I changed all of those
slow paths to deal with EncodedJSValue's.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetStubInternal):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedPutById):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedPutById):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.cpp:
(JSC::PropertyStubCompilationInfo::copyToStubInfo):
* jit/JIT.h:
(JSC::PropertyStubCompilationInfo::PropertyStubCompilationInfo):
(JSC::PropertyStubCompilationInfo::slowCaseInfo):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperationWrappers.h:
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetByIdSlowCase):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/Repatch.cpp:
(JSC::appropriateGenericPutByIdFunction):
(JSC::appropriateListBuildingPutByIdFunction):
(JSC::resetPutByID):

LayoutTests:

Reviewed by Mark Hahnenberg.

* js/regress/put-by-id-expected.txt: Added.
* js/regress/put-by-id.html: Added.
* js/regress/script-tests/put-by-id.js: Added.
(foo):
(bar):

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

6 years ago[Win] Build fix after r122737.
bfulgham@apple.com [Mon, 14 Oct 2013 18:29:37 +0000 (18:29 +0000)]
[Win] Build fix after r122737.

* dom/Node.h: Add explicit WebCore namespace to macro definition to work around
Visual Studio bug.

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

6 years agoFTL should have an inefficient but correct implementation of GetById
fpizlo@apple.com [Mon, 14 Oct 2013 18:08:11 +0000 (18:08 +0000)]
FTL should have an inefficient but correct implementation of GetById
https://bugs.webkit.org/show_bug.cgi?id=122740

Reviewed by Mark Hahnenberg.

It took some effort to realize that the node->prediction() check in the DFG backends
are completely unnecessary since the ByteCodeParser will always insert a ForceOSRExit
if !prediction.

But other than that this was an easy patch.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetById):

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

6 years agoPass Document directly to anonymous renderer constructors.
akling@apple.com [Mon, 14 Oct 2013 17:55:52 +0000 (17:55 +0000)]
Pass Document directly to anonymous renderer constructors.
<https://webkit.org/b/122752>

Reviewed by Antti Koivisto.

Added separate constructors for creating anonymous renderers that
take a Document& instead of a null Element*/Text*.

Removed setDocumentForAnonymous() and all createAnonymous() helpers.
...and RenderObject::m_node is now a Node&, wohoo!

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

6 years ago[CSSRegions] Move style-scoped* tests into fast/regions/style-scoped
mihnea@adobe.com [Mon, 14 Oct 2013 17:50:14 +0000 (17:50 +0000)]
[CSSRegions] Move style-scoped* tests into fast/regions/style-scoped
https://bugs.webkit.org/show_bug.cgi?id=122741

Reviewed by Darin Adler.

Move files, adjust TestExpectations.

* fast/regions/style-scoped/style-scoped-in-flow-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-expected.html.
* fast/regions/style-scoped/style-scoped-in-flow-override-container-style-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-container-style-expected.html.
* fast/regions/style-scoped/style-scoped-in-flow-override-container-style.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-container-style.html.
* fast/regions/style-scoped/style-scoped-in-flow-override-region-styling-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling-expected.html.
* fast/regions/style-scoped/style-scoped-in-flow-override-region-styling-multiple-regions-expected.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling-multiple-regions-expected.html.
* fast/regions/style-scoped/style-scoped-in-flow-override-region-styling-multiple-regions.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling-multiple-regions.html.
* fast/regions/style-scoped/style-scoped-in-flow-override-region-styling.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow-override-region-styling.html.
* fast/regions/style-scoped/style-scoped-in-flow.html: Renamed from LayoutTests/fast/regions/style-scoped-in-flow.html.
* platform/efl/TestExpectations:
* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years ago[WK2][Efl][Soup] Make NetworkProcessMainUnix handle proxy settings.
ossy@webkit.org [Mon, 14 Oct 2013 17:16:23 +0000 (17:16 +0000)]
[WK2][Efl][Soup] Make NetworkProcessMainUnix handle proxy settings.
https://bugs.webkit.org/show_bug.cgi?id=118388

Reviewed by Carlos Garcia Campos.

Original patch by Kwang Yul Seo <skyul@company100.net> .

Proxy configuration should honor the no_proxy environment variable
same to WebProcess. It is necessary not to change the current behaviour.
See https://bugs.webkit.org/show_bug.cgi?id=91747 for details.

The following things were fixed by Csaba Osztrogonác:
- moved session variable before #if not to have conflict with https://bugs.webkit.org/show_bug.cgi?id=118343
- added GRefPtr.h include
- fixed ifdef guards

* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
(WebKit::NetworkProcessMain):
Copied from WebProcessMainEfl.cpp.

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

6 years agoCTTE: Add more node conversion helpers
weinig@apple.com [Mon, 14 Oct 2013 16:52:23 +0000 (16:52 +0000)]
CTTE: Add more node conversion helpers
https://bugs.webkit.org/show_bug.cgi?id=122737

Reviewed by Darin Adler.

- Factor NODE_TYPE_CASTS into TYPE_CASTS_BASE(ToClassName, FromClassName)
  to allow for DOCUMENT_TYPE_CASTS.
- Replace more static_casts<>.

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

6 years agoTransition misc cti_op_* JITStubs to JIT operations.
mark.lam@apple.com [Mon, 14 Oct 2013 16:42:22 +0000 (16:42 +0000)]
Transition misc cti_op_* JITStubs to JIT operations.
https://bugs.webkit.org/show_bug.cgi?id=122645.

Reviewed by Michael Saboff.

Stubs converted:
    cti_op_check_has_instance
    cti_op_create_arguments
    cti_op_del_by_id
    cti_op_instanceof
    cti_to_object
    cti_op_push_activation
    cti_op_get_pnames
    cti_op_load_varargs

* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.h:
(JSC::JIT::emitStoreCell):
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileLoadVarargs):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_pnames):
(JSC::JIT::emit_op_create_activation):
(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emitSlow_op_check_has_instance):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_get_argument_by_val):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_check_has_instance):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emit_op_get_pnames):
(JSC::JIT::emit_op_create_activation):
(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emitSlow_op_get_argument_by_val):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_del_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_del_by_id):
* jit/JITStubs.cpp:
* jit/JITStubs.h:

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

6 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Mon, 14 Oct 2013 15:55:47 +0000 (15:55 +0000)]
Unreviewed EFL gardening

Added new baselines for tests marked as skipped.

* platform/efl-wk1/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl/compositing/overflow/nested-scrolling-expected.txt: Added.
* platform/efl/compositing/overflow/remove-overflow-crash2-expected.png: Added.
* platform/efl/compositing/overflow/remove-overflow-crash2-expected.txt: Added.
* platform/efl/editing/spelling/inline-spelling-markers-hidpi-expected.png: Added.
* platform/efl/editing/unsupported-content/list-delete-001-expected.png:
* platform/efl/editing/unsupported-content/list-delete-001-expected.txt: Added.
* platform/efl/editing/unsupported-content/list-delete-003-expected.png:
* platform/efl/editing/unsupported-content/list-delete-003-expected.txt: Added.
* platform/efl/editing/unsupported-content/list-type-after-expected.png:
* platform/efl/editing/unsupported-content/list-type-after-expected.txt: Added.
* platform/efl/editing/unsupported-content/table-delete-002-expected.png:
* platform/efl/editing/unsupported-content/table-delete-002-expected.txt: Added.
* platform/efl/fast/canvas/fill-stroke-clip-reset-path-expected.png: Added.
* platform/efl/fast/table/click-near-anonymous-table-expected.png: Added.
* platform/efl/fast/table/click-near-anonymous-table-expected.txt: Added.
* platform/efl/fast/text/international/arabic-justify-expected.png: Added.
* platform/efl/fast/text/international/arabic-justify-expected.txt: Added.
* platform/efl/fast/text/international/bidi-linebreak-001-expected.png: Added.
* platform/efl/fast/text/international/bidi-linebreak-001-expected.txt: Added.
* platform/efl/fast/text/international/bidi-linebreak-002-expected.png: Added.
* platform/efl/fast/text/international/bidi-linebreak-002-expected.txt: Added.
* platform/efl/fast/text/international/bidi-linebreak-003-expected.png: Added.
* platform/efl/fast/text/international/bidi-linebreak-003-expected.txt: Added.
* platform/efl/fast/text/unicode-variation-selector-expected.png: Added.
* platform/efl/fast/text/unicode-variation-selector-expected.txt: Added.
* platform/efl/media/video-colorspace-yuv420-expected.png: Added.
* platform/efl/media/video-colorspace-yuv420-expected.txt: Added.
* platform/efl/media/video-colorspace-yuv422-expected.png: Added.
* platform/efl/media/video-colorspace-yuv422-expected.txt: Added.
* platform/efl/svg/as-image/image-respects-deviceScaleFactor-expected.png: Added.
* platform/efl/svg/as-image/image-respects-deviceScaleFactor-expected.txt: Added.
* platform/efl/svg/hixie/data-types/002-expected.png: Added.
* platform/efl/svg/hixie/data-types/002-expected.txt:
* platform/efl/svg/text/non-bmp-positioning-lists-expected.png: Added.
* platform/efl/svg/text/non-bmp-positioning-lists-expected.txt: Added.
* platform/efl/svg/zoom/text/zoom-hixie-mixed-009-expected.png: Added.
* platform/efl/svg/zoom/text/zoom-hixie-mixed-009-expected.txt:

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

6 years agoStatic assertions in WTF::adoptPtr should point to using adoptRef for ref-counted...
zandobersek@gmail.com [Mon, 14 Oct 2013 15:46:38 +0000 (15:46 +0000)]
Static assertions in WTF::adoptPtr should point to using adoptRef for ref-counted objects
https://bugs.webkit.org/show_bug.cgi?id=122745

Reviewed by Anders Carlsson.

* wtf/PassOwnPtr.h:
(WTF::adoptPtr): When the object's type is convertible to the RefCountedBase or ThreadSafeRefCountedBase type,
the static assertion should note that adoptRef should be used instead.

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

6 years agoReintroduce PassRefPtr<Event> copy in ScopedEventQueue::dispatchEvent
zandobersek@gmail.com [Mon, 14 Oct 2013 15:45:35 +0000 (15:45 +0000)]
Reintroduce PassRefPtr<Event> copy in ScopedEventQueue::dispatchEvent
https://bugs.webkit.org/show_bug.cgi?id=122742

Reviewed by Alexey Proskuryakov.

This is a follow-up to r157219 which introduced a workaround for the GCC's quirky behavior that
was resulting in crashes due to the PassRefPtr<Event> object passed to EventDispatcher::dispatchEvent
being copied and nullified first before retrieving the EventTarget of the Event object wrapped in that
PassRefPtr.

The implementation is now adjusted to first retrieve the pointer to the Event's EventTarget and store
it in a local variable. That variable is then passed as the first parameter to EventDispatcher::dispatchEvent,
and the PassRefPtr<Event> passed directly as the second parameter. Previously the pointer of that PassRefPtr
object was passed in, with a new PassRefPtr being created which would increase the reference count of the
ref-counted object. Passing in the original PassRefPtr avoids the unnecessary reference count increase by creating
a copy. That still nullifies the original PassRefPtr, but that's not a problem anymore.

* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent):

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

6 years ago[CSS Shapes] Shape-Margin should be animatable
betravis@adobe.com [Mon, 14 Oct 2013 15:34:50 +0000 (15:34 +0000)]
[CSS Shapes] Shape-Margin should be animatable
https://bugs.webkit.org/show_bug.cgi?id=122524

Reviewed by Darin Adler.

Source/WebCore:

Mark content for relayout after shape-margin changes, and add shape-margin
to the list of animatable properties.

Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin.html
       fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add
shape-margin to the map of animatable CSS properties.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Compare shape-margins,
and mark dependent content for relayout if they have changed.

LayoutTests:

Test that shape-margin can be set dynamically and content lays out correctly.
Also test that shape-margin can be manipulated through CSS Animations.

* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-margin.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-shape-margin-animation.html: Added.

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

6 years ago[EFL] Accessibility gardening
g.czajkowski@samsung.com [Mon, 14 Oct 2013 14:17:33 +0000 (14:17 +0000)]
[EFL] Accessibility gardening
https://bugs.webkit.org/show_bug.cgi?id=122751

Unreviewed EFL gardening.

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-14

* platform/efl-wk2/TestExpectations: Add bug numbers and marked missing tests.

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

6 years agoDon't crash after OpenGL robustness reset
commit-queue@webkit.org [Mon, 14 Oct 2013 14:03:44 +0000 (14:03 +0000)]
Don't crash after OpenGL robustness reset
https://bugs.webkit.org/show_bug.cgi?id=122750

Patch by Arvid Nilsson <anilsson@blackberry.com> on 2013-10-14
Reviewed by George Staikos.

JIRA 517132.
Just log the incident and pretend like nothing happened.

No new tests, we don't have repeatable steps to reproduce a robustness
reset.

* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::makeContextCurrent):

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

6 years ago[EFL] Buildfix after r157393
andersca@apple.com [Mon, 14 Oct 2013 13:39:41 +0000 (13:39 +0000)]
[EFL] Buildfix after r157393
https://bugs.webkit.org/show_bug.cgi?id=122749

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-14
Reviewed by Andreas Kling.

Buildfix with error enumeration value 'CSS_FR' not handled in switch.

* css/CSSCalculationValue.cpp:
(WebCore::hasDoubleValue):

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

6 years agoWebKit Nightlies broken by r157374
andersca@apple.com [Mon, 14 Oct 2013 13:08:13 +0000 (13:08 +0000)]
WebKit Nightlies broken by r157374
https://bugs.webkit.org/show_bug.cgi?id=122736

Reviewed by Andreas Kling.

Add back a callOnMainThread overload that Safari is using.

* wtf/MainThread.cpp:
(WTF::callOnMainThread):
* wtf/MainThread.h:

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

6 years agoUnreviewed. EFL Gardening.
gyuyoung.kim@samsung.com [Mon, 14 Oct 2013 12:48:26 +0000 (12:48 +0000)]
Unreviewed. EFL Gardening.
Add baselines for new tests which was added by r156767.

* platform/efl/TestExpectations: Remove tests supported by this commit.
* platform/efl/fast/regions/multiple-directionality-changes-in-variable-width-regions-expected.txt: Added.
* platform/efl/fast/regions/text-region-split-small-pagination-expected.txt: Added.
* platform/efl/fast/regions/top-overflow-out-of-second-region-expected.txt: Added.
* platform/efl/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Added.
* platform/efl/fast/repaint/region-painting-invalidation-expected.txt: Added.

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

6 years ago[EFL] Present replaced objects with 0xFFFC character
mario@webkit.org [Mon, 14 Oct 2013 10:41:26 +0000 (10:41 +0000)]
[EFL] Present replaced objects with 0xFFFC character
https://bugs.webkit.org/show_bug.cgi?id=122744

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-14
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Replaced elements should be emitted in GTK/EFL and
marked their presence with the replacement character.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):

LayoutTests:

Added new accessibility expectation after r156532.

* platform/efl-wk2/TestExpectations:
* platform/efl/accessibility/deleting-iframe-destroys-axcache-expected.txt: Added.

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

6 years ago[CSS Grid Layout] Implement support for <flex>
svillar@igalia.com [Mon, 14 Oct 2013 10:36:39 +0000 (10:36 +0000)]
[CSS Grid Layout] Implement support for <flex>
https://bugs.webkit.org/show_bug.cgi?id=115362

Reviewed by Andreas Kling.

From Blink r149134, r149480, r149532, r150287 and r156127 by <jchaffraix@chromium.org>
From Blink r157820 by <svillar@igalia.com>

Source/WebCore:

Added support for flexible lengths ('fr' unit) in CSS Grid Layout
code. This requires the addition of GridLength class to
encapsulate the knowledge of <flex> to the grid layout code.

Also updated the algorithm that computes the layout. It increases
the value of 1fr based on the grid tracks' usedBreath to fraction
ratio (called normalizedFractionValue). This enables increasing
the fraction value while updating the available space to account
for processed grid tracks. The algorithm stops when we run out of
grid tracks or available space (one grid item has an intrinsic
size too big). This matches the specs to the letter for the known
available space case (both the unknown case and the interaction
with 'span' are left out of this patch).

Tests: fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html
       fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html
       fast/css-grid-layout/flex-content-resolution-columns.html
       fast/css-grid-layout/flex-content-resolution-rows.html

* GNUmakefile.list.am: Added GridLength.h to the build system.
* Target.pri: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackBreadth): Replace Length by GridLength.
* css/CSSGrammar.y.in: Added FR support.
* css/CSSParser.cpp: Ditto.
(WebCore::CSSParser::parseGridBreadth):
(WebCore::CSSParser::detectNumberToken):
* css/CSSParserValues.cpp: Added FR support.
(WebCore::CSSParserValue::createCSSValue):
* css/CSSParserValues.h:
(WebCore::CSSParserString::operator[]):
(WebCore::CSSParserString::equalIgnoringCase):
* css/CSSPrimitiveValue.cpp: Added FR support.
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::customCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h: Added a couple of missing const.
(WebCore::CSSPrimitiveValue::isFlex):
* css/StyleResolver.cpp: Added FR support.
(WebCore::createGridTrackBreadth):
(WebCore::createGridTrackSize):
* rendering/RenderGrid.cpp:
(WebCore::GridTrackForNormalization::GridTrackForNormalization):
New helper struct to ease the computation of track breadths with
flexible lengths.
(WebCore::GridTrackForNormalization::operator=):
(WebCore::RenderGrid::computePreferredTrackWidth): Replaced Length by GridLength.
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Grow grid lines
having a fraction as the MaxTrackSizingFunction.
(WebCore::RenderGrid::computeUsedBreadthOfMinLength): Replaced Length by GridLength.
(WebCore::RenderGrid::computeUsedBreadthOfMaxLength): Ditto.
(WebCore::sortByGridNormalizedFlexValue):
(WebCore::RenderGrid::computeNormalizedFractionBreadth): Increase
the fraction value while updating the available space to account
for processed grid tracks.
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::distributeSpaceToTracks): Never shrink track sizes.
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
* rendering/RenderGrid.h:
* rendering/style/GridLength.h: Added.
(WebCore::GridLength::GridLength):
(WebCore::GridLength::isLength):
(WebCore::GridLength::isFlex):
(WebCore::GridLength::length):
(WebCore::GridLength::flex):
(WebCore::GridLength::setFlex):
(WebCore::GridLength::operator==):
* rendering/style/GridTrackSize.h: Replaced Length by GridLength.
(WebCore::GridTrackSize::length):
(WebCore::GridTrackSize::setLength):
(WebCore::GridTrackSize::minTrackBreadth):
(WebCore::GridTrackSize::maxTrackBreadth):
(WebCore::GridTrackSize::setMinMax):
(WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentMinTrackBreadth):
(WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth):
(WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth):

LayoutTests:

Added 4 new test cases to test the support for <flex> in CSS Grid
Layout code. Also updated some of the existing ones to check the
support for 'fr' units.

* fast/css-grid-layout/flex-and-minmax-content-resolution-columns-expected.txt: Added.
* fast/css-grid-layout/flex-and-minmax-content-resolution-columns.html: Added.
* fast/css-grid-layout/flex-and-minmax-content-resolution-rows-expected.txt: Added.
* fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html: Added.
* fast/css-grid-layout/flex-content-resolution-columns-expected.txt: Added.
* fast/css-grid-layout/flex-content-resolution-columns.html: Added.
* fast/css-grid-layout/flex-content-resolution-rows-expected.txt: Added.
* fast/css-grid-layout/flex-content-resolution-rows.html: Added.
* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-dynamic-updates-relayout-expected.txt:
* fast/css-grid-layout/grid-dynamic-updates-relayout.html:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:

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

6 years agoBroken text rendering when input field has selection.
commit-queue@webkit.org [Mon, 14 Oct 2013 10:33:32 +0000 (10:33 +0000)]
Broken text rendering when input field has selection.
https://bugs.webkit.org/show_bug.cgi?id=122716

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-14
Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/text/text-rendering-with-input-selection.html.
       fast/text/text-rendering-with-input-selection-expected.html.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Check that text has selection.

LayoutTests:

* fast/text/text-rendering-with-input-selection.html: Added.
* fast/text/text-rendering-with-input-selection-expected.html: Added.

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

6 years agoUnexpected word wrapping for wrapped content then raw content.
zalan@apple.com [Mon, 14 Oct 2013 09:43:54 +0000 (09:43 +0000)]
Unexpected word wrapping for wrapped content then raw content.
https://bugs.webkit.org/show_bug.cgi?id=121130

Reviewed by Antti Koivisto.

When deciding whether a line is considered empty, we need to check if the current
object is fully responsible for the currently uncommitted width. It helps differentiating
<span></span><span>abcd</span> from <span>a</span><span>bcd</span>, where in the first
case when we hit the second <span> the line is still considered empty, as opposed to the
second example.

Source/WebCore:

Test: fast/css/unexpected-word-wrapping-with-non-empty-spans.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/css/unexpected-word-wrapping-with-non-empty-spans-expected.html: Added.
* fast/css/unexpected-word-wrapping-with-non-empty-spans.html: Added.

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

6 years agoBe more efficient about passing RenderStyle to attachRenderTree().
akling@apple.com [Mon, 14 Oct 2013 09:16:03 +0000 (09:16 +0000)]
Be more efficient about passing RenderStyle to attachRenderTree().
<https://webkit.org/b/122743>

Reviewed by Antti Koivisto.

Have attachRenderTree() and createRendererTreeIfNeeded() pass the
RenderStyle in a PassRefPtr to avoid churning the ref count.

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

6 years ago[CSS Grid Layout] 2 span positions are not resolved correctly
svillar@igalia.com [Mon, 14 Oct 2013 09:00:50 +0000 (09:00 +0000)]
[CSS Grid Layout] 2 span positions are not resolved correctly
https://bugs.webkit.org/show_bug.cgi?id=119717

Reviewed by Andreas Kling.

From Blink r155397 by <jchaffraix@chromium.org>

Source/WebCore:

Test: fast/css-grid-layout/grid-item-bad-resolution-double-span.html

Two opposite 'span' or 'auto' positions should be resolved using
the auto placement algorithm. We were only checking for the 'auto'
case. This also covers the case of other positions that, according
to the spec, should be treated as 'auto'.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionsFromStyle):

LayoutTests:

Added a new test case to check bad grid items resolution with two
opposite span positions. Also added a real grid container to check
also the resolution code path in some other tests.

* fast/css-grid-layout/grid-item-area-get-set.html: Added a grid container.
* fast/css-grid-layout/grid-item-bad-resolution-double-span-expected.txt: Added.
* fast/css-grid-layout/grid-item-bad-resolution-double-span.html: Added.
* fast/css-grid-layout/grid-item-end-after-get-set.html: Added a grid container.
* fast/css-grid-layout/grid-item-start-before-get-set.html: Ditto.

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

6 years agoUse RenderElement instead of RenderObject in more places.
akling@apple.com [Mon, 14 Oct 2013 07:58:09 +0000 (07:58 +0000)]
Use RenderElement instead of RenderObject in more places.
<https://webkit.org/b/122734>

Reviewed by Antti Koivisto.

Convert some sites to use RenderElement (or type inference) instead
of RenderObject for less branchy code.

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

6 years agoDeprecate or remove deleteAllValues functions; there are only a few call sites left
darin@apple.com [Mon, 14 Oct 2013 05:58:34 +0000 (05:58 +0000)]
Deprecate or remove deleteAllValues functions; there are only a few call sites left
https://bugs.webkit.org/show_bug.cgi?id=122738

Reviewed by Anders Carlsson.

Source/WebCore:

* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::deleteAllCookiesAndDomains):
* platform/network/blackberry/rss/RSSParserBase.cpp:
(WebCore::RSSFeed::clear):
* platform/win/WCDataObject.cpp:
(WebCore::WCDataObject::~WCDataObject):
Renamed deleteAllValues to deprecatedDeleteAllValues.

Source/WebKit/blackberry:

* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::cancelPendingScopingEffort):
Renamed deleteAllValues to deprecatedDeleteAllValues.

Source/WebKit2:

* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::pluginDestroyed): Renamed deleteAllValues to
deprecatedDeleteAllValues.

Source/WTF:

* wtf/Deque.h: Deleted deleteAllValues.
* wtf/HashMap.h: Ditto.
* wtf/HashSet.h: Ditto.
* wtf/ListHashSet.h: Ditto.
* wtf/Vector.h: Renamed deleteAllValues to deprecatedDeleteAllValues.

Tools:

* DumpRenderTree/win/DRTDataObject.cpp:
(DRTDataObject::~DRTDataObject):
* DumpRenderTree/win/UIDelegate.cpp:
(DRTUndoStack::~DRTUndoStack):
(DRTUndoStack::clear):
Renamed deleteAllValues to deprecatedDeleteAllValues.

* Scripts/do-webcore-rename: Updated to perform this rename, as is traditional.

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

6 years agobuild.webkit.org/dashboard incorrectly shows interrupted builds as green
ap@apple.com [Mon, 14 Oct 2013 05:02:03 +0000 (05:02 +0000)]
build.webkit.org/dashboard incorrectly shows interrupted builds as green
https://bugs.webkit.org/show_bug.cgi?id=122732

Reviewed by Tim Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update): Removed a special case for status 4 (EXCEPTION).
I don't see it occur any time in recent history, but judging from what happens for
status 5 (RETRY), we can just finish this function normally.
Record overall text description for iteration as BuildbotIteration.text.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): If an iteration is a failure,
but no tests failed, make it yellow, and use buildbot-provided description for it.

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

6 years agoMerge NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS
weinig@apple.com [Mon, 14 Oct 2013 00:11:18 +0000 (00:11 +0000)]
Merge NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS
https://bugs.webkit.org/show_bug.cgi?id=122735

Reviewed by Antti Koivisto.

NODE_TYPE_CASTS and ELEMENT_TYPE_CASTS are identical. Let them become one
with one another.

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

6 years agoUncrashify Document::head() too. (Why am I even awake?)
akling@apple.com [Sun, 13 Oct 2013 22:06:47 +0000 (22:06 +0000)]
Uncrashify Document::head() too. (Why am I even awake?)

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

6 years agoREGRESSION(r157381): Make Document::body() crash less when there is no documentElement.
akling@apple.com [Sun, 13 Oct 2013 21:21:32 +0000 (21:21 +0000)]
REGRESSION(r157381): Make Document::body() crash less when there is no documentElement.

Unreviewed.

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

6 years agoFTL OSR exit should perform zero extension on values smaller than 64-bit
fpizlo@apple.com [Sun, 13 Oct 2013 20:45:12 +0000 (20:45 +0000)]
FTL OSR exit should perform zero extension on values smaller than 64-bit
https://bugs.webkit.org/show_bug.cgi?id=122688

Reviewed by Gavin Barraclough.

In the DFG we usually make the simplistic assumption that a 32-bit value in a 64-bit
register will have zeros on the high bits.  In the few cases where the high bits are
non-zero, the DFG sort of tells us this explicitly.

But when working with llvm.webkit.stackmap, it doesn't work that way.  Consider we might
emit LLVM IR like:

    %2 = trunc i64 %1 to i32
    stuff %2
    call @llvm.webkit.stackmap(...., %2)

LLVM may never actually emit a truncation instruction of any kind.  And that's great - in
many cases it won't be needed, like if 'stuff %2' is a 32-bit op that ignores the high
bits anyway.  Hence LLVM may tell us that %2 is in the register that still had the value
from before truncation, and that register may have garbage in the high bits.

This means that on our end, if we want a 32-bit value and we want that value to be
zero-extended, we should zero-extend it ourselves.  This is pretty easy and should be
cheap, so we should just do it and not make it a requirement that LLVM does it on its
end.

This makes all tests pass with JSC_ftlOSRExitUsesStackmap=true.

* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStubWithOSRExitStackmap):
* ftl/FTLValueFormat.cpp:
(JSC::FTL::reboxAccordingToFormat):

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

6 years agoRewrite Document::body and Document::head in modern style, way clearer and shorter
darin@apple.com [Sun, 13 Oct 2013 19:21:23 +0000 (19:21 +0000)]
Rewrite Document::body and Document::head in modern style, way clearer and shorter
https://bugs.webkit.org/show_bug.cgi?id=122717

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::body): Use iterator to make this way easier to read.
(WebCore::Document::head): Ditto.

* html/HTMLTagNames.in: Added generateTypeHelpers for body and head.

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

6 years agoRoll deps^H^H^H^HChangeLogs.
mrowe@apple.com [Sun, 13 Oct 2013 19:17:04 +0000 (19:17 +0000)]
Roll deps^H^H^H^HChangeLogs.

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

6 years agoUnreviewed GTK gardening.
berto@igalia.com [Sun, 13 Oct 2013 18:52:35 +0000 (18:52 +0000)]
Unreviewed GTK gardening.

* platform/gtk-wk2/TestExpectations:
Add bug number to the failing animation tests.

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

6 years agoRenderLayerBacking should have RenderLayer& backpointer.
akling@apple.com [Sun, 13 Oct 2013 18:39:27 +0000 (18:39 +0000)]
RenderLayerBacking should have RenderLayer& backpointer.
<https://webkit.org/b/122731>

Reviewed by Anders Carlsson.

RenderLayerBacking is always owned by a RenderLayer and so should
store its backpointer in a reference.

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

6 years agoRemoving input-file-entries.html from TestExpectation
commit-queue@webkit.org [Sun, 13 Oct 2013 17:26:16 +0000 (17:26 +0000)]
Removing  input-file-entries.html from TestExpectation
https://bugs.webkit.org/show_bug.cgi?id=122674

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-13
Reviewed by Anders Carlsson.

input-file-entries.html has been removed in
changeset 156692. so removing references to this file.

* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

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

6 years agoTry to fix the Lion build.
andersca@apple.com [Sun, 13 Oct 2013 17:10:20 +0000 (17:10 +0000)]
Try to fix the Lion build.

* Configurations/JavaScriptCore.xcconfig:

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

6 years agoMake element predicates and type casts work more consistently on more types
darin@apple.com [Sun, 13 Oct 2013 16:15:59 +0000 (16:15 +0000)]
Make element predicates and type casts work more consistently on more types
https://bugs.webkit.org/show_bug.cgi?id=122718

Reviewed by Antti Koivisto.

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::collectFrameOwners):
Updated for name change.

* dom/Document.cpp:
(WebCore::Document::adoptNode): Use a reference instead of a pointer.
(WebCore::Document::dispatchFullScreenChangeOrErrorEvent): Updated for
typecast name change and also to cast a reference, since we don't overload
for pointers.
(WebCore::Document::updateHoverActiveState): Ditto.

* dom/Element.h: Made the isElementOfType functions take references instead
of pointers. Also use const in the type template argument. These changes go
hand in hand with the changes in the generated code and all the classes.
Also use a bit of nullptr.

* dom/ElementIterator.h:
(WebCore::findElementAncestorOfType): Got rid of the ElementTypeWithConst
naming since this works with or without const. Added const to the call site
for isElementOfType, because it works that way now.

* dom/ElementTraversal.h:
(WebCore::Traversal::firstChildTemplate): Add const to the type when calling
isElementOfType. Along with the corresponding changes, this makes these
templates work for const types.
(WebCore::Traversal::lastChildTemplate): Ditto.
(WebCore::Traversal::firstWithinTemplate): Ditto.
(WebCore::Traversal::lastWithinTemplate): Ditto.
(WebCore::Traversal::nextTemplate): Ditto.
(WebCore::Traversal::previousTemplate): Ditto.
(WebCore::Traversal::nextSiblingTemplate): Ditto.
(WebCore::Traversal::previousSiblingTemplate): Ditto.
(WebCore::Traversal::nextSkippingChildrenTemplate): Ditto.

* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Check isElementNode and then call the
isDisabledFormControl member function, since we no longer have a helper that
takes a node.
(WebCore::Node::willRespondToMouseMoveEvents): Ditto.
(WebCore::Node::willRespondToMouseClickEvents): Ditto.
(WebCore::Node::willRespondToTouchEvents): Ditto.

* dom/PseudoElement.h: Use some nullptr. Added an isPseudoElement function
that the ELEMENT_TYPE_CASTS macro can use, and also used that macro to make
the toPseudoElement functions instead of a hand-written local variant.

* dom/make_names.pl:
(printTypeHelpers): Added unimplemented versions of the element predicate
functions that return void to catch unnecessary runtime checks of types
that are already known at compile time. Added assertions to the pointer
overloads of the predicates. Maybe later we can delete them. Added const
to the isElementOf template arguments to make these work with both const
and non-const. Put overloads in a consistent order, most specific class
first, then less specific. Changed isElementOfType to take references
rather than pointers.

* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand): Updated to pass a reference.
(WebCore::Editor::setBaseWritingDirection): Ditto.
(WebCore::findFirstMarkable): Ditto.

* html/FormAssociatedElement.h: Tweaked a comment.

* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Updated for name change and to
pass a reference.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::translate): Removed FIXME and const_cast since the
problem is fixed.
(WebCore::HTMLElement::directionality): Use a reference.

* html/HTMLElement.h: Use const in the type of the isElementOfType functions.
Use references for all the arguments, not pointers.

* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): Use documentVersion
instead of docVersion for local variable name. Use elementDescendants instead
of elementTraversal.
(WebCore::HTMLFieldSetElement::length): Use length instead of len for name.

* html/HTMLFormControlElement.h: Put predicates into the standard format and
did them on single lines. Added ELEMENT_TYPE_CASTS so we get standard casts.
* html/HTMLFrameElementBase.h: Ditto.
* html/HTMLFrameOwnerElement.h: Ditto, but changed the name to match the class,
so it's now isHTMLFrameOwnerElement and toHTMLFrameOwnerElement.

* html/HTMLLabelElement.cpp:
(WebCore::nodeAsSupportedLabelableElement): Updated to use references.

* html/HTMLMediaElement.h: Put predicates into the standard format and did
them on single lines. Added ELEMENT_TYPE_CASTS so we get standard casts.
* html/HTMLPlugInElement.h: Ditto. Also marked isPluginElement FINAL.
* html/HTMLPlugInImageElement.h: Ditto.
* html/HTMLTableCellElement.cpp: Removed old hand-written cast functions.
* html/HTMLTableCellElement.h: Did same predicate and ELEMENT_TYPE_CASTS
changes. Also fixed up the ordering of functions in the class.

* html/HTMLTextFormControlElement.cpp:
(WebCore::enclosingTextFormControl): Updated to use references and nullptr.

* html/HTMLTextFormControlElement.h: Did same predicate and ELEMENT_TYPE_CASTS.

* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::removedFrom): Call isHTMLMediaElement by its new name.

* html/LabelableElement.h: Did same predicate and ELEMENT_TYPE_CASTS.

* html/track/WebVTTElement.h: Made isWebVTTElement private. Changed the argument
type of setLanguage to const AtomicString& to avoid excess reference count churn.
Did the predicate and type casts thing.

* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Update for name changes and use references.

* mathml/MathMLElement.h: Did same predicate and ELEMENT_TYPE_CASTS.

* page/FocusController.cpp:
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
(WebCore::FocusController::advanceFocusInDocumentOrder):
* page/PageSerializer.cpp:
(WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
Update for name change.

* platform/Pasteboard.h: Removed unneeded forward declaration.

* rendering/RenderWidget.h: Updated for name change.

* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives): Use element iterator
and nullptr.

* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler): Update for name changes.

* svg/SVGAnimateElement.cpp:
(WebCore::isSVGAnimateElement): Moved here since we don't want to inline such
a long list of tag names.

* svg/SVGAnimateElement.h: Marked a lot more virtual functions OVERRIDE.
Did predicate and ELEMENT_TYPE_CASTS changes, but did not make the predicate
be inlined.

* svg/SVGElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGFilterPrimitiveStandardAttributes.h: Ditto.

* svg/SVGGradientElement.cpp:
(WebCore::isSVGGradientElement): Moved here since we don't want to inline
the two tag names.

* svg/SVGGradientElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGGraphicsElement.h: Ditto.

* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement): Took out assertion, since it
was asserting the class of the obejct we just created.

* svg/SVGPolyElement.cpp:
(WebCore::isSVGPolyElement): Moved here since we don't want to inline the
two tag names.

* svg/SVGPolyElement.h: Did predicate and ELEMENT_TYPE_CASTS changes.
* svg/SVGTextContentElement.h: Ditto.

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::connectConditions): Update for name changes,
to use references and nullptr, and to get rid of a non-helpful local.

* svg/animation/SVGSMILElement.h: Added a virtual function to check if a
given SVGElement is an SVGSMILElement so we don't have to check a long list
of tag names instead. Also did the predicate and ELEMENT_TYPE_CASTS changes.

* testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder): Updated to use references.

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

6 years agoChange callOnMainThread to take an std::function
andersca@apple.com [Sun, 13 Oct 2013 16:12:49 +0000 (16:12 +0000)]
Change callOnMainThread to take an std::function
https://bugs.webkit.org/show_bug.cgi?id=122698

Reviewed by Darin Adler.

This will let us pass anything that can be converted to an std::function (including lambdas and
WTF::Function objects) to callOnMainThread.

* wtf/MainThread.cpp:
(WTF::callOnMainThread):
* wtf/MainThread.h:

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

6 years agoText::renderer() should return RenderText
antti@apple.com [Sun, 13 Oct 2013 16:00:10 +0000 (16:00 +0000)]
Text::renderer() should return RenderText
https://bugs.webkit.org/show_bug.cgi?id=122729

Reviewed by Andreas Kling.

Tighten typing.

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

6 years agoDevirtualize RenderView::viewRect().
akling@apple.com [Sun, 13 Oct 2013 15:57:30 +0000 (15:57 +0000)]
Devirtualize RenderView::viewRect().
<https://webkit.org/b/122730>

Reviewed by Antti Koivisto.

There's no need for viewRect() to be a virtual RenderObject function.
The single call site that didn't already access it through RenderView
can just go via view().

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

6 years agoMove setPseudoStyle() to RenderImage (from RenderElement.)
akling@apple.com [Sun, 13 Oct 2013 15:56:39 +0000 (15:56 +0000)]
Move setPseudoStyle() to RenderImage (from RenderElement.)
<https://webkit.org/b/122726>

Reviewed by Antti Koivisto.

Only RenderImages ever use setPseudoStyle() so move it there and
remove the non-image codepath.

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

6 years agoCTTE: RenderSlider always has an HTMLInputElement.
akling@apple.com [Sun, 13 Oct 2013 15:04:05 +0000 (15:04 +0000)]
CTTE: RenderSlider always has an HTMLInputElement.
<https://webkit.org/b/122728>

Reviewed by Anders Carlsson.

This renderer is never anonymous and always has a corresponding
HTMLInputElement. Tighten this up by having the constructor take
the element by reference, and override element() with a stronger
return type.

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

6 years agoRemove two unused AX functions for getting a FrameView*.
akling@apple.com [Sun, 13 Oct 2013 14:46:50 +0000 (14:46 +0000)]
Remove two unused AX functions for getting a FrameView*.
<https://webkit.org/b/122724>

Reviewed by Anders Carlsson.

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

6 years agoAdd traverseNextSkippingChildren to ElementIterators
antti@apple.com [Sun, 13 Oct 2013 13:26:07 +0000 (13:26 +0000)]
Add traverseNextSkippingChildren to ElementIterators
https://bugs.webkit.org/show_bug.cgi?id=122727

Reviewed by Andreas Kling.

Also switch some code using ElementTraversal over to iterators.

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

6 years agoRename InlineBox::remove() to removeFromParent
antti@apple.com [Sun, 13 Oct 2013 11:39:33 +0000 (11:39 +0000)]
Rename InlineBox::remove() to removeFromParent
https://bugs.webkit.org/show_bug.cgi?id=122725

Reviewed by Andreas Kling.

Also make it clear from the code that all InlineTextBoxes have behavesLikeText set.

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

6 years agoMake absoluteQuads/Rects functions return Vectors
antti@apple.com [Sun, 13 Oct 2013 11:05:33 +0000 (11:05 +0000)]
Make absoluteQuads/Rects functions return Vectors
https://bugs.webkit.org/show_bug.cgi?id=122722

Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
(WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):

    Take RenderStyle instead of RenderObject

* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::getClientRects):
(WebCore::Element::getBoundingClientRect):
* dom/Range.cpp:
(WebCore::Range::textRects):
(WebCore::Range::textQuads):
(WebCore::Range::getBorderAndTextQuads):

    Adapt to the changes.

* rendering/RenderObject.h:

    Removed unnecessary adjustFloatQuad/RectForAbsoluteZoom functions, inline code to
    adjustFloatQuads/RectForScrollAndAbsoluteZoomAndFrameScale.

* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuadsClippedToEllipsis):
(WebCore::RenderText::absoluteQuads):
(WebCore::RenderText::absoluteQuadsForRange):
* rendering/RenderText.h:
* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::absoluteRects):
(WebCore::RenderTextLineBoxes::absoluteRectsForRange):
(WebCore::RenderTextLineBoxes::absoluteQuads):
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
* rendering/RenderTextLineBoxes.h:

    Use return value instead of an out-arg, except for the virtual versions.

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

6 years agoLiveNodeList: rootNode() and document() should return references.
akling@apple.com [Sun, 13 Oct 2013 11:01:08 +0000 (11:01 +0000)]
LiveNodeList: rootNode() and document() should return references.
<https://webkit.org/b/122720>

Reviewed by Antti Koivisto.

Tighten up this code a bit by having rootNode() and document()
return references. Also replaced some handwritten traversal
with a call to Node::lastDescendant().

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

6 years agoDocument::createRenderTree() should assert that there is no arena.
akling@apple.com [Sun, 13 Oct 2013 10:59:40 +0000 (10:59 +0000)]
Document::createRenderTree() should assert that there is no arena.
<https://webkit.org/b/122723>

Reviewed by Antti Koivisto.

Calling createRenderTree() with a RenderArena already in place would
be a programming error.

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

6 years agoRemove dead ENABLE(CUSTOM_ELEMENTS) code.
akling@apple.com [Sun, 13 Oct 2013 10:16:54 +0000 (10:16 +0000)]
Remove dead ENABLE(CUSTOM_ELEMENTS) code.
<https://webkit.org/b/122721>

Reviewed by Antti Koivisto.

There are no ports building with this flag since April and the code
has bitrotted since. Remove it for now. If someone wants to resurrect
the feature someday, getting back to this point is trivial.

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

6 years agoMove absoluteRects/Quads to RenderTextLineBoxes
antti@apple.com [Sun, 13 Oct 2013 09:39:44 +0000 (09:39 +0000)]
Move absoluteRects/Quads to RenderTextLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=122706

Reviewed by Andreas Kling.

* rendering/RenderTextLineBoxes.cpp:
(WebCore::RenderTextLineBoxes::absoluteRects):
(WebCore::RenderTextLineBoxes::absoluteRectsForRange):
(WebCore::RenderTextLineBoxes::absoluteQuads):
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange):

    These move.

(WebCore::RenderTextLineBoxes::selectionRectForRange):
(WebCore::RenderTextLineBoxes::setSelectionState):

    Also moved a few smaller functions.

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