WebKit-https.git
9 years agoUnreviewed chromium windows rebaseline for r119456.
eae@chromium.org [Tue, 5 Jun 2012 06:07:07 +0000 (06:07 +0000)]
Unreviewed chromium windows rebaseline for r119456.

* platform/chromium-win-vista/fast/multicol: Removed.
* platform/chromium-win/fast/multicol/float-multicol-expected.png:

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

9 years agoUnreviewed chromium test expectation updates for new tests.
eae@chromium.org [Tue, 5 Jun 2012 05:44:51 +0000 (05:44 +0000)]
Unreviewed chromium test expectation updates for new tests.

* fast/sub-pixel/inline-block-with-padding-expected.txt:
* platform/chromium-mac/fast/sub-pixel: Added.
* platform/chromium-mac/fast/sub-pixel/inline-block-with-padding-expected.txt: Added.

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

9 years ago[Chromium] Fix a TestExpectations format error.
tkent@chromium.org [Tue, 5 Jun 2012 05:33:25 +0000 (05:33 +0000)]
[Chromium] Fix a TestExpectations format error.

* platform/chromium/TestExpectations:

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

9 years agoUnreviewed chromium test and expectation updates for r119456.
eae@chromium.org [Tue, 5 Jun 2012 05:20:08 +0000 (05:20 +0000)]
Unreviewed chromium test and expectation updates for r119456.

* fast/sub-pixel/inline-block-with-padding.html:
* platform/chromium-mac-snowleopard/fast/events/offsetX-offsetY-expected.txt:
* platform/chromium/TestExpectations:

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

9 years agoLeaking ClipRects
simon.fraser@apple.com [Tue, 5 Jun 2012 05:01:57 +0000 (05:01 +0000)]
Leaking ClipRects
https://bugs.webkit.org/show_bug.cgi?id=88282

Reviewed by Dan Bernstein.

In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::ClipRects):

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

9 years agoPython test fix attempt for Chromium Windows.
rniwa@webkit.org [Tue, 5 Jun 2012 04:49:54 +0000 (04:49 +0000)]
Python test fix attempt for Chromium Windows.

* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver.uri_to_test):

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

9 years agoAdd missing FractionalLayoutUnit += operator and move LineWidth to use all floats
eae@chromium.org [Tue, 5 Jun 2012 04:42:55 +0000 (04:42 +0000)]
Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
https://bugs.webkit.org/show_bug.cgi?id=88259

Patch by Emil A Eklund  <eae@chromium.org> and Levi Weintraub <leviw@chromium.org> on 2012-06-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Fix two rounding bugs in LineLayout and RenderBlock that caused inlines
and floats to wrap incorrectly.

Tests: fast/sub-pixel/float-containing-block-with-margin.html
       fast/sub-pixel/float-with-right-margin-zoom.html
       fast/sub-pixel/inline-block-with-padding.html

* platform/FractionalLayoutUnit.h:
(WebCore::operator+=):
Add missing float version of += operator thus avoiding a silent cast to
int loosing precision.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
(WebCore::LineWidth::updateAvailableWidth):
Change LineWidth left/right to floating point and instead of rounding the
left and right edge separately.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
Use explicit cast to avoid compiler ambiguity warning.

LayoutTests:

* fast/dom/elementFromPoint-relative-to-viewport.html:
* fast/events/offsetX-offsetY.html:
Remove special casing for subpixel layout as it is no longer needed.

* fast/sub-pixel/float-containing-block-with-margin-expected.html: Added.
* fast/sub-pixel/float-containing-block-with-margin.html: Added.
* fast/sub-pixel/float-with-right-margin-zoom-expected.txt: Added.
* fast/sub-pixel/float-with-right-margin-zoom.html: Added.
* fast/sub-pixel/inline-block-with-padding-expected.txt: Added.
* fast/sub-pixel/inline-block-with-padding.html: Added.
New tests for wrapping logic.

* platform/chromium-linux/css2.1/t100801-c544-valgn-03-d-agi-expected.png:
* platform/chromium-linux/css2.1/t100801-c544-valgn-03-d-agi-expected.txt:
* platform/chromium-linux/fast/line-grid/line-align-left-edges-expected.png:
* platform/chromium-linux/fast/line-grid/line-grid-contains-value-expected.png:
* platform/chromium-linux/fast/multicol/float-multicol-expected.png:
* platform/chromium-win/fast/events/offsetX-offsetY-expected.txt:
* platform/chromium-win/fast/line-grid/line-grid-contains-value-expected.txt:
* platform/chromium-win/fast/multicol/float-multicol-expected.txt:
Update expectations to match pre-subpixel rendering.

* platform/chromium/TestExpectations:
Mark updated tests as failing on mac and windows temporarily.

* platform/chromium/fast/dom/elementFromPoint-relative-to-viewport-expected.txt:
Remove special casing for subpixel layout as it is no longer needed.

* platform/chromium/fast/line-grid/line-align-left-edges-expected.txt:
Update expectations to match pre-subpixel rendering.

* platform/efl/Skipped:
* platform/gtk-wk2/Skipped:
* platform/mac-lion/Skipped:
* platform/mac-snowleopard/Skipped:
* platform/mac-wk2/Skipped:
* platform/mac/Skipped:
* platform/qt-4.8/Skipped:
* platform/qt/Skipped:
* platform/win-wk2/Skipped:
* platform/win-xp/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:
Skip new sub-pixel tests on platforms that does not enable sub-pixel layout.

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

9 years agoCSS property 'order' should be a number rather than an int
tony@chromium.org [Tue, 5 Jun 2012 04:38:19 +0000 (04:38 +0000)]
CSS property 'order' should be a number rather than an int
https://bugs.webkit.org/show_bug.cgi?id=88111

Reviewed by Ojan Vafai.

Source/WebCore:

This changed in the spec:
http://dev.w3.org/csswg/css3-flexbox/#order

I also fixed the compile with CSS3_FLEXBOX disabled.

No new tests, covered by existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
(WebCore::CSSProperty::isInheritedProperty):
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
(RenderFlexibleBox::OrderIterator):
* rendering/RenderFlexibleBox.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

LayoutTests:

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html: Allow decimal values.
* css3/flexbox/flex-order.html: Fix tests based on float limits.

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

9 years agoSyntax error in fast/filesystem/resources/file-writer-gc-blob.js
leo.yang@torchmobile.com.cn [Tue, 5 Jun 2012 04:29:31 +0000 (04:29 +0000)]
Syntax error in fast/filesystem/resources/file-writer-gc-blob.js
https://bugs.webkit.org/show_bug.cgi?id=87939

Reviewed by Alexey Proskuryakov.

* fast/filesystem/resources/file-writer-gc-blob.js: Add parentheses around the blob data.
(startWrite):

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

9 years agoUnreviewed.
ggaren@apple.com [Tue, 5 Jun 2012 03:17:15 +0000 (03:17 +0000)]
Unreviewed.

Rolled out r119364 because it's still causing crashes (when running
v8-earley in release builds of DRT)

This time for sure!

* heap/Heap.cpp:
(JSC::Heap::collect):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::sweep):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::resetAllocator):
(JSC):
* heap/MarkedSpace.cpp:
(JSC::ResetAllocator::operator()):
(JSC):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::sweepWeakSets):
* heap/MarkedSpace.h:
(MarkedSpace):
* heap/WeakBlock.cpp:
(JSC::WeakBlock::sweep):
* heap/WeakSet.cpp:
(JSC::WeakSet::sweep):
(JSC::WeakSet::tryFindAllocator):
* heap/WeakSet.h:
(JSC::WeakSet::shrink):

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

9 years agoTurn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
commit-queue@webkit.org [Tue, 5 Jun 2012 03:01:18 +0000 (03:01 +0000)]
Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
https://bugs.webkit.org/show_bug.cgi?id=88243

Patch by Hugo Parente Lima <hugo.lima@openbossa.org> on 2012-06-04
Reviewed by Adam Barth.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

No new tests needed, this just rename a compiler flag.

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

Tools:

* qmake/mkspecs/features/features.prf:

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

9 years agowebkitpy.layout_tests.port.server_process_unittest.TestServerProcess.test_basic is...
dpranke@chromium.org [Tue, 5 Jun 2012 02:13:17 +0000 (02:13 +0000)]
webkitpy.layout_tests.port.server_process_unittest.TestServerProcess.test_basic is flaky
https://bugs.webkit.org/show_bug.cgi?id=88280

Unreviewed, build fix.

* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(TestServerProcess.test_basic):

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

9 years agoSkip more tests on Windows to get the bots greener.
jberlin@webkit.org [Tue, 5 Jun 2012 02:05:00 +0000 (02:05 +0000)]
Skip more tests on Windows to get the bots greener.

See r119449 for more context.

* platform/win/Skipped:

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

9 years agoStart skipping all the failing tests on Windows to get the bots greener.
jberlin@webkit.org [Tue, 5 Jun 2012 01:10:48 +0000 (01:10 +0000)]
Start skipping all the failing tests on Windows to get the bots greener.

At this point it doesn't make sense to try to split the hundreds of failures out into
separate bugs and rebaseline. It makes more sense to use the Skipped list as a todo list
of things that need to be checked / updated for Windows.

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

9 years ago[chromium] Remove redundant setNeedsCommit when prepareToDraw fails
danakj@chromium.org [Tue, 5 Jun 2012 01:07:29 +0000 (01:07 +0000)]
[chromium] Remove redundant setNeedsCommit when prepareToDraw fails
https://bugs.webkit.org/show_bug.cgi?id=88246

Reviewed by James Robinson.

Source/WebCore:

When prepareToDraw fails it explicitly calls setNeedsCommit, but the
scheduler already takes care of this for it. When a frame is not
successfully drawn, the scheduler state machine sets the needsCommit
bit itself.

This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::prepareToDraw):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:

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

9 years ago[WebSocket] Send requires super linear time against data size
toyoshim@chromium.org [Tue, 5 Jun 2012 00:51:56 +0000 (00:51 +0000)]
[WebSocket] Send requires super linear time against data size
https://bugs.webkit.org/show_bug.cgi?id=87383

Reviewed by Kent Tamura.

Source/WebCore:

WebSocket send operation requires super linear time to send data
against data size. This is because removing sent data in Vector<char>
always requires data copy.
Introduced wtf/StreamBuffer realizes O(n) buffer operations.
This patch is only for optimization. No new tests are needed.

* platform/network/SocketStreamHandleBase.cpp:
(WebCore::SocketStreamHandleBase::sendPendingData):
* platform/network/SocketStreamHandleBase.h:
(SocketStreamHandleBase):

Source/WTF:

* wtf/StreamBuffer.h: Added.
(WTF):
(StreamBuffer):
(WTF::StreamBuffer::StreamBuffer):
(WTF::StreamBuffer::~StreamBuffer):
(WTF::StreamBuffer::isEmpty):
(WTF::StreamBuffer::append):
(WTF::StreamBuffer::consume):
(WTF::StreamBuffer::size):
(WTF::StreamBuffer::firstBlockData):
(WTF::StreamBuffer::firstBlockSize):

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

9 years agotest-webkitpy is hanging under cygwin
dpranke@chromium.org [Tue, 5 Jun 2012 00:37:29 +0000 (00:37 +0000)]
test-webkitpy is hanging under cygwin
https://bugs.webkit.org/show_bug.cgi?id=88269

Reviewed by Ryosuke Niwa.

The 'multiprocessing' module doesn't work correctly under Cygwin yet,
so we need to skip any tests that use it.

* Scripts/webkitpy/common/system/executive.py:
(Executive.run_in_parallel):
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_run_in_parallel):

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

9 years agoDFG arguments simplification should have rationalized handling of TearOffArguments
fpizlo@apple.com [Tue, 5 Jun 2012 00:28:49 +0000 (00:28 +0000)]
DFG arguments simplification should have rationalized handling of TearOffArguments
https://bugs.webkit.org/show_bug.cgi?id=88206

Reviewed by Geoffrey Garen.

- Accesses to the unmodified arguments register ought to have the same effect on
  alias/escape analysis of arguments as accesses to the mutable arguments register.

- The existence of TearOffArguments should not get in the way of arguments aliasing.

- TearOffArguments should be eliminated if CreateArguments is eliminated.

* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
(JSC::DFG::ArgumentsSimplificationPhase::observeBadArgumentsUse):

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

9 years agotest-webkitpy is failing on win32 after r115054
dpranke@chromium.org [Tue, 5 Jun 2012 00:27:44 +0000 (00:27 +0000)]
test-webkitpy is failing on win32 after r115054
https://bugs.webkit.org/show_bug.cgi?id=88264

Reviewed by Ryosuke Niwa.

The failing http_server test was improperly suppressed (the
tuple was missing a comma, and so wasn't a tuple at all, just a
string) and so we were skipping *all* tests on win32. The right
way to skip a single test is to disable it inside the test
itself.

* Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
(TestHttpServer.test_start_cmd):
* Scripts/webkitpy/test/test_finder.py:
(TestFinder._default_names):
* Scripts/webkitpy/test/main.py:
(Tester.run): Add error message if we don't find any tests to run.
* Scripts/webkitpy/test/main_unittest.py:

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

9 years agoUnreviewed new baseline for test added in r119423.
timothy_horton@apple.com [Tue, 5 Jun 2012 00:21:58 +0000 (00:21 +0000)]
Unreviewed new baseline for test added in r119423.

* platform/mac/fast/hidpi/device-scale-factor-paint-expected.png: Added.
* platform/mac/fast/hidpi/device-scale-factor-paint-expected.txt: Added.

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

9 years agoRemove enabledProfilerReference
barraclough@apple.com [Tue, 5 Jun 2012 00:00:17 +0000 (00:00 +0000)]
Remove enabledProfilerReference
https://bugs.webkit.org/show_bug.cgi?id=88258

Reviewed by Michael Saboff.

Make the enabled profiler a member of JSGlobalData, and switch code that accesses it to do so directly
via the JSGlobalData, rather than holding a Profiler** reference to it. Do not pass the Profiler**
reference to JIT code. This patch does not change the stack layout on entry into JIT code (passing an
unused void* instead), since this is an intrusive change better handled in a separate patch.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::privateExecute):
* jit/JITCode.h:
(JSC::JITCode::execute):
    - Don't pass Profiler** to JIT code.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_will_call):
(JSC::JIT::emit_op_profile_did_call):
* jit/JITStubs.cpp:
(JSC):
(JSC::ctiTrampoline):
(JSC::ctiVMThrowTrampoline):
(JSC::ctiOpThrowNotCaught):
(JSC::JITThunks::JITThunks):
(JSC::DEFINE_STUB_FUNCTION):
    - For ARM_THUMB2, rename ENABLE_PROFILER_REFERENCE_OFFSET to FIRST_STACK_ARGUMENT (which is how it is being used).
    - For MIPS, remove ENABLE_PROFILER_REFERENCE_OFFSET.
* jit/JITStubs.h:
(JITStackFrame):
(JSC):
    - Renamed enabledProfilerReference to unusedX.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* profiler/Profiler.cpp:
(JSC):
(JSC::Profiler::startProfiling):
(JSC::Profiler::stopProfiling):
* profiler/Profiler.h:
(Profiler):
    - Removed s_sharedEnabledProfilerReference, enabledProfilerReference().
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC):
(JSC::JSGlobalData::enabledProfiler):
(JSGlobalData):
    - Added m_enabledProfiler, enabledProfiler().
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):

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

9 years agoMock scrollbars differ by 1px in DRT vs. WKTR
timothy_horton@apple.com [Mon, 4 Jun 2012 23:45:40 +0000 (23:45 +0000)]
Mock scrollbars differ by 1px in DRT vs. WKTR
https://bugs.webkit.org/show_bug.cgi?id=80879

Rubber-stamped by Ryosuke Niwa.

Disable r119431 except for Apple Mac port.

* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::thumbLength):

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

9 years agoDocument cleanup can get confused if parser still exists
jpfau@apple.com [Mon, 4 Jun 2012 23:38:33 +0000 (23:38 +0000)]
Document cleanup can get confused if parser still exists
https://bugs.webkit.org/show_bug.cgi?id=88250

Reviewed by Geoffrey Garen.

No new tests; no behavior changes.

* dom/Document.cpp:
(WebCore::Document::removedLastRef): Detach parser earlier

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

9 years agoget_argument_by_val should be profiled everywhere
fpizlo@apple.com [Mon, 4 Jun 2012 23:32:57 +0000 (23:32 +0000)]
get_argument_by_val should be profiled everywhere
https://bugs.webkit.org/show_bug.cgi?id=88205

Reviewed by Geoffrey Garen.

* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_get_argument_by_val):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

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

9 years agoDFG arguments simplification takes unkindly to direct accesses to the arguments register
fpizlo@apple.com [Mon, 4 Jun 2012 23:27:34 +0000 (23:27 +0000)]
DFG arguments simplification takes unkindly to direct accesses to the arguments register
https://bugs.webkit.org/show_bug.cgi?id=88261

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Fixed arguments simplification for direct accesses to the arguments register, which may
arise if CSE had not run. Fixed CSE so that it does run prior to arguments simplification,
by making it a full-fledged member of the fixpoint. Fixed other issues in arguments
simplification, like realizing that it needs to bail if there is a direct assignment to
the arguments register, and failing to turn CreateArguments into PhantomArguments. Also
fixed CSE's handling of store elimination of captured locals in the presence of a
GetMyArgumentByVal (or one of its friends), and fixed CSE to correctly fixup variables at
tail if the Flush it removes is the last operation on a local in a basic block.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
(JSC::DFG::ArgumentsSimplificationPhase::isOKToOptimize):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::run):
(JSC::DFG::CSEPhase::setLocalStoreElimination):
(JSC::DFG::CSEPhase::performNodeCSE):
(CSEPhase):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):

LayoutTests:

Reviewed by Geoffrey Garen.

* fast/js/dfg-arguments-alias-one-block-expected.txt: Added.
* fast/js/dfg-arguments-alias-one-block-osr-exit-expected.txt: Added.
* fast/js/dfg-arguments-alias-one-block-osr-exit.html: Added.
* fast/js/dfg-arguments-alias-one-block-overwrite-arguments-expected.txt: Added.
* fast/js/dfg-arguments-alias-one-block-overwrite-arguments.html: Added.
* fast/js/dfg-arguments-alias-one-block-overwrite-expected.txt: Added.
* fast/js/dfg-arguments-alias-one-block-overwrite.html: Added.
* fast/js/dfg-arguments-alias-one-block.html: Added.
* fast/js/script-tests/dfg-arguments-alias-one-block-osr-exit.js: Added.
(foo):
* fast/js/script-tests/dfg-arguments-alias-one-block-overwrite-arguments.js: Added.
(foo):
* fast/js/script-tests/dfg-arguments-alias-one-block-overwrite.js: Added.
(foo):
* fast/js/script-tests/dfg-arguments-alias-one-block.js: Added.
(foo):

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

9 years ago[BlackBerry] Split AnimationFrameRateController into its own file
commit-queue@webkit.org [Mon, 4 Jun 2012 23:25:18 +0000 (23:25 +0000)]
[BlackBerry] Split AnimationFrameRateController into its own file
https://bugs.webkit.org/show_bug.cgi?id=88242

Patch by Andrew Lo <anlo@rim.com> on 2012-06-04
Reviewed by Antonio Gomes.

Include new header file to reflect re-organization of platform animation
header files.

Source/WebCore:

* platform/graphics/DisplayRefreshMonitor.h:

Source/WebKit/blackberry:

* Api/WebPageCompositor_p.h:

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

9 years ago[chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLay...
danakj@chromium.org [Mon, 4 Jun 2012 23:19:04 +0000 (23:19 +0000)]
[chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLayerImpl instead of always-null pointer.
https://bugs.webkit.org/show_bug.cgi?id=88252

Reviewed by James Robinson.

Source/WebCore:

CCVideoLayerImpl has a pointer to its CCLayerTreeHostImpl which is never
set to be non-null currently. Instead of making this a special case, we
move the CCLayerTreeHostImpl* up to the CCLayerImpl base class, and set
the pointer on every layer during commit via the TreeSynchronizer's walk
through the layer tree.

Unit tests: Tested by TreeSynchronizer tests.

* platform/graphics/chromium/TreeSynchronizer.cpp:
(WebCore::TreeSynchronizer::synchronizeTrees):
(WebCore::TreeSynchronizer::synchronizeTreeRecursive):
* platform/graphics/chromium/TreeSynchronizer.h:
(WebCore):
(TreeSynchronizer):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore):
(WebCore::CCLayerImpl::layerTreeHostImpl):
(WebCore::CCLayerImpl::setLayerTreeHostImpl):
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
(WebCore::CCVideoLayerImpl::setNeedsRedraw):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:

Source/WebKit/chromium:

* tests/ScrollbarLayerChromiumTest.cpp:
(WebCore::TEST):
* tests/TreeSynchronizerTest.cpp:
(WebKitTests::expectTreesAreIdentical):
(WebKitTests::TEST):

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

9 years agoyet another build fix attempt.
rniwa@webkit.org [Mon, 4 Jun 2012 23:03:48 +0000 (23:03 +0000)]
yet another build fix attempt.

* src/WebHelperPluginImpl.cpp:

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

9 years agoAnother Chromium Windows build fix attempt after r119411.
rniwa@webkit.org [Mon, 4 Jun 2012 22:52:49 +0000 (22:52 +0000)]
Another Chromium Windows build fix attempt after r119411.

* src/WebHelperPluginImpl.cpp:

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

9 years ago[chromium] CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer needs to be...
shawnsingh@chromium.org [Mon, 4 Jun 2012 22:26:43 +0000 (22:26 +0000)]
[chromium] CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer needs to be cleaner
https://bugs.webkit.org/show_bug.cgi?id=85245

Reviewed by James Robinson.

Updated CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer
so that the test is clearer and cleaner. The original test was
covering what it needed, but in a confusing and not-so-practical
way. This patch adds comments and performs a tighter test so that
the intent is a bit more clear.

* tests/CCDamageTrackerTest.cpp:
(WebKitTests::TEST_F):

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

9 years agoMock scrollbars differ by 1px in DRT vs. WKTR
timothy_horton@apple.com [Mon, 4 Jun 2012 22:25:29 +0000 (22:25 +0000)]
Mock scrollbars differ by 1px in DRT vs. WKTR
https://bugs.webkit.org/show_bug.cgi?id=80879

Reviewed by Simon Fraser.

Round the length of the scrollbar thumb instead of truncating it.

No new tests, fixes a mismatch between pixel results from DRT and WKTR.
Change is covered by all existing tests with scrollbars run with low tolerance.

* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::thumbLength):

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

9 years agoFix an unused result warning when building with clang.
andersca@apple.com [Mon, 4 Jun 2012 22:24:33 +0000 (22:24 +0000)]
Fix an unused result warning when building with clang.

* platform/cf/BinaryPropertyList.cpp:
(WebCore::BinaryPropertyListWriter::writePropertyList):

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

9 years agoFix a struct/class mismatch.
andersca@apple.com [Mon, 4 Jun 2012 21:56:32 +0000 (21:56 +0000)]
Fix a struct/class mismatch.

* heap/Handle.h:
(Handle):

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

9 years agoDon't crash when re-parenting a removed HTMLMediaElement
fischman@chromium.org [Mon, 4 Jun 2012 21:47:12 +0000 (21:47 +0000)]
Don't crash when re-parenting a removed HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=88058

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-reparent.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::userCancelledLoad): Clear the pending load flags because any pending load has been cancelled.

LayoutTests:

* media/media-reparent-expected.txt: Added.
* media/media-reparent.html: Added.

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

9 years agoUnreviewed, rolling out r119421 and r119425.
rniwa@webkit.org [Mon, 4 Jun 2012 21:35:24 +0000 (21:35 +0000)]
Unreviewed, rolling out r119421 and r119425.
http://trac.webkit.org/changeset/119421
http://trac.webkit.org/changeset/119425
https://bugs.webkit.org/show_bug.cgi?id=88256

not reliable, let's have a do-over (Requested by kling on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-04

* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::attributes):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::parserSetAttributes):
(WebCore::Element::hasEquivalentAttributes):
(WebCore::Element::createAttributeData):
(WebCore):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::getAttributeNode):
(WebCore::Element::getAttributeNodeNS):
(WebCore::Element::hasAttribute):
(WebCore::Element::hasAttributeNS):
(WebCore::Element::normalizeAttributes):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
(WebCore::Element::attributeData):
(Element):
(WebCore::Element::ensureAttributeData):
(WebCore::Element::updatedAttributeData):
(WebCore::Element::ensureUpdatedAttributeData):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::attrIfExists):
(WebCore::ElementAttributeData::ensureAttr):
(WebCore::ElementAttributeData::setAttr):
(WebCore::ElementAttributeData::removeAttr):
(WebCore::ElementAttributeData::setClass):
(WebCore):
(WebCore::ElementAttributeData::ensureInlineStyle):
(WebCore::ElementAttributeData::ensureMutableInlineStyle):
(WebCore::ElementAttributeData::destroyInlineStyle):
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
(WebCore::ElementAttributeData::isEquivalent):
(WebCore::ElementAttributeData::detachAttrObjectsFromElement):
(WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
(WebCore::ElementAttributeData::cloneDataFrom):
(WebCore::ElementAttributeData::clearAttributes):
(WebCore::ElementAttributeData::replaceAttribute):
(WebCore::ElementAttributeData::getAttributeNode):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::create):
(ElementAttributeData):
(WebCore::ElementAttributeData::setIdForStyleResolution):
(WebCore::ElementAttributeData::setAttributeStyle):
(WebCore::ElementAttributeData::length):
(WebCore::ElementAttributeData::isEmpty):
(WebCore::ElementAttributeData::attributeItem):
(WebCore::ElementAttributeData::getAttributeItem):
(WebCore::ElementAttributeData::ElementAttributeData):
(WebCore::ElementAttributeData::attributeVector):
(WebCore::ElementAttributeData::clonedAttributeVector):
(WebCore::ElementAttributeData::getAttributeItemIndex):
* dom/StyledElement.cpp:
(WebCore::StyledElement::style):
(WebCore::StyledElement::classAttributeChanged):
(WebCore::StyledElement::removeInlineStyleProperty):
(WebCore::StyledElement::addSubresourceAttributeURLs):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):

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

9 years agoUnreviewed build fixes for cr-android and Qt.
kling@webkit.org [Mon, 4 Jun 2012 20:23:45 +0000 (20:23 +0000)]
Unreviewed build fixes for cr-android and Qt.

* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::setClass):
Change ElementAttributeData::setClass() to take an AtomicString instead of a String.
The only call site has an AtomicString anyway.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser): Add missing const.

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

9 years agoFix attempt after r119411.
rniwa@webkit.org [Mon, 4 Jun 2012 20:14:56 +0000 (20:14 +0000)]
Fix attempt after r119411.

* src/WebHelperPluginImpl.cpp:

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

9 years ago.: [chromium] Fix software rendering for device-scale-factor > 1
commit-queue@webkit.org [Mon, 4 Jun 2012 20:11:36 +0000 (20:11 +0000)]
.: [chromium] Fix software rendering for device-scale-factor > 1
https://bugs.webkit.org/show_bug.cgi?id=88136

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

Export WebCore::Page::setDeviceScaleFactor and WebCore::Settings::setDefaultDeviceScaleFactor.

* Source/autotools/symbols.filter:

Source/WebCore: [chromium] Fix software rendering for device-scale-factor > 1
https://bugs.webkit.org/show_bug.cgi?id=88136

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

Test: fast/hidpi/device-scale-factor-paint.html

* WebCore.exp.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setDeviceScaleFactor):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium: [chromium] Fix software rendering for larger device-scale-factor
https://bugs.webkit.org/show_bug.cgi?id=88136

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

The fix is to apply the device-scale factor on the GraphicsContext.
(and add a WebWidgetClient::deviceScaleFactor method to facilitate that).

* public/WebWidgetClient.h:
(WebWidgetClient):
(WebKit::WebWidgetClient::deviceScaleFactor):
* src/PageWidgetDelegate.cpp:
(WebKit::PageWidgetDelegate::paint):
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::paint):

Source/WebKit2: [chromium] Fix software rendering for device-scale-factor > 1
https://bugs.webkit.org/show_bug.cgi?id=88136

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

Export WebCore::Page::setDeviceScaleFactor and WebCore::Settings::setDefaultDeviceScaleFactor.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests: [chromium] Fix software rendering for device-scale-factor > 1
https://bugs.webkit.org/show_bug.cgi?id=88136

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

* fast/hidpi/device-scale-factor-paint.html: Added.
* platform/chromium/fast/hidpi/device-scale-factor-paint-expected.html: Added.

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

9 years ago[GTK] Memory leaks in AccessibilityUIElementGtk.cpp
commit-queue@webkit.org [Mon, 4 Jun 2012 20:10:34 +0000 (20:10 +0000)]
[GTK] Memory leaks in AccessibilityUIElementGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=88215

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-04
Reviewed by Martin Robinson.

Fixed memory leaks in AccessibilityUIElement by using GOwnPtr
for newly allocated strings.

* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(attributeSetToString):
(AccessibilityUIElement::allAttributes):

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

9 years agoMake ElementAttributeData a variable-sized object to reduce memory use.
kling@webkit.org [Mon, 4 Jun 2012 20:00:49 +0000 (20:00 +0000)]
Make ElementAttributeData a variable-sized object to reduce memory use.
<http://webkit.org/b/88240>

Reviewed by Antti Koivisto.

Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
For elements that never have their attribute list mutated (the vast majority), this saves a lot of
memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.

Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
that nothing tries to mutate an element with a raw attribute array.

When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().

This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
This is a 35% reduction in DOM attribute memory use.

Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
adding of "class" attributes. For more static pages, savings are even greater.

* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::attributes):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::parserSetAttributes):
(WebCore::Element::hasEquivalentAttributes):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::getAttributeNode):
(WebCore::Element::getAttributeNodeNS):
(WebCore::Element::hasAttribute):
(WebCore::Element::hasAttributeNS):
(WebCore::Element::normalizeAttributes):
(WebCore::Element::cloneAttributesFromElement):
(WebCore::Element::createMutableAttributeData):
* dom/Element.h:
(WebCore::Element::attributeData):
(Element):
(WebCore::Element::updatedAttributeData):
(WebCore::Element::ensureAttributeData):
(WebCore::Element::ensureUpdatedAttributeData):
(WebCore::Element::mutableAttributeData):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::createImmutable):
(WebCore::ElementAttributeData::ElementAttributeData):
(WebCore::ElementAttributeData::~ElementAttributeData):
(WebCore::ElementAttributeData::attrIfExists):
(WebCore::ElementAttributeData::ensureAttr):
(WebCore::ElementAttributeData::setAttr):
(WebCore::ElementAttributeData::removeAttr):
(WebCore::ElementAttributeData::ensureInlineStyle):
(WebCore::ElementAttributeData::ensureMutableInlineStyle):
(WebCore::ElementAttributeData::destroyInlineStyle):
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
(WebCore::ElementAttributeData::isEquivalent):
(WebCore::ElementAttributeData::detachAttrObjectsFromElement):
(WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
(WebCore::ElementAttributeData::cloneDataFrom):
(WebCore::ElementAttributeData::clearAttributes):
(WebCore::ElementAttributeData::replaceAttribute):
(WebCore::ElementAttributeData::getAttributeNode):
* dom/ElementAttributeData.h:
(ElementAttributeData):
(WebCore::ElementAttributeData::setClass):
(WebCore::ElementAttributeData::setIdForStyleResolution):
(WebCore::ElementAttributeData::inlineStyle):
(WebCore::ElementAttributeData::setAttributeStyle):
(WebCore::ElementAttributeData::isMutable):
(WebCore::ElementAttributeData::makeMutable):
(WebCore::ElementAttributeData::length):
(WebCore::ElementAttributeData::isEmpty):
(WebCore::ElementAttributeData::array):
(WebCore::ElementAttributeData::attributeItem):
(WebCore::ElementAttributeData::getAttributeItem):
(WebCore::ElementAttributeData::getAttributeItemIndex):
* dom/StyledElement.cpp:
(WebCore::StyledElement::style):
(WebCore::StyledElement::classAttributeChanged):
(WebCore::StyledElement::removeInlineStyleProperty):
(WebCore::StyledElement::addSubresourceAttributeURLs):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):

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

9 years agoSource/WebCore: [chromium] Combobox options and autofill options should not be scaled...
commit-queue@webkit.org [Mon, 4 Jun 2012 19:56:35 +0000 (19:56 +0000)]
Source/WebCore: [chromium] Combobox options and autofill options should not be scaled for device-scale factor
https://bugs.webkit.org/show_bug.cgi?id=87921

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

Chrome takes care of scaling the combobox/autofill lists in the browser side. So it is not
necessary to scale here. This change reverts parts of changes in r111539.

Manually tested with different scale factors.

* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::paint):
(WebCore::PopupListBox::paintRow):
(WebCore::PopupListBox::getRowHeight):
* platform/chromium/PopupListBox.h:
(PopupContainerSettings):
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupMenuChromium::show):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):

Source/WebKit/chromium: Combobox options and autofill options should not be scaled for device-scale factor.
https://bugs.webkit.org/show_bug.cgi?id=87921

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::applyAutofillSuggestions):

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

9 years ago[chromium] Make LayerRendererChromium use RenderPasses instead of RenderSurfaces
danakj@chromium.org [Mon, 4 Jun 2012 19:53:39 +0000 (19:53 +0000)]
[chromium] Make LayerRendererChromium use RenderPasses instead of RenderSurfaces
https://bugs.webkit.org/show_bug.cgi?id=88132

Reviewed by Adrienne Walker.

Source/WebCore:

This patch is partly renaming, partly moving data into CCRenderPass
and CCRenderPassDrawQuad. LayerRendererChromium should accept as input
a set of RenderPasses and this should be sufficient for drawing. It
should have no notion of RenderSurfaces at all.

First, what isn't done: RenderSurfaces still hold the textures
where RenderPasses are drawn to/from, so that these textures can
persist across frames. This will be addressed separately.

Otherwise, this completely removes the concept of RenderSurface from
LayerRenderChromium and the CCDrawQuad, replacing it with RenderPass.
The "renderSurfaceTextureManager" is renamed to the "implTextureManager"
and like-wise for the TextureAllocator, as these are not used
exclusively for render surfaces (passes), and a texture manager for
render passes that does not require a RenderSurface* will be the focus
of future changes.

Covered by existing tests.

* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::setVisible):
(WebCore::LayerRendererChromium::releaseRenderPassTextures):
(WebCore::LayerRendererChromium::viewportChanged):
(WebCore::LayerRendererChromium::clearRenderPass):
(WebCore::LayerRendererChromium::beginDrawingFrame):
(WebCore::LayerRendererChromium::drawRenderPass):
(WebCore::LayerRendererChromium::drawQuad):
(WebCore::LayerRendererChromium::drawBackgroundFilters):
(WebCore::LayerRendererChromium::drawRenderPassQuad):
(WebCore::LayerRendererChromium::copyPlaneToTexture):
(WebCore::LayerRendererChromium::drawHeadsUpDisplay):
(WebCore::LayerRendererChromium::finishDrawingFrame):
(WebCore::LayerRendererChromium::copyTextureToFramebuffer):
(WebCore::LayerRendererChromium::getFramebufferTexture):
(WebCore::LayerRendererChromium::isCurrentRenderPass):
(WebCore::LayerRendererChromium::useRenderPass):
(WebCore::LayerRendererChromium::useManagedTexture):
(WebCore::LayerRendererChromium::bindFramebufferToTexture):
(WebCore::LayerRendererChromium::setScissorToRect):
(WebCore::LayerRendererChromium::setDrawFramebufferRect):
(WebCore::LayerRendererChromium::initializeSharedObjects):
(WebCore::LayerRendererChromium::renderPassProgram):
(WebCore::LayerRendererChromium::renderPassProgramAA):
(WebCore::LayerRendererChromium::renderPassMaskProgram):
(WebCore::LayerRendererChromium::renderPassMaskProgramAA):
(WebCore::LayerRendererChromium::cleanupSharedObjects):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore):
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCDrawQuad.cpp:
(WebCore::CCDrawQuad::toRenderPassDrawQuad):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore):
(CCDrawQuad):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::draw):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::drawLayers):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::CCRenderPass):
(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
* platform/graphics/chromium/cc/CCRenderPass.h:
(CCRenderPass):
(WebCore::CCRenderPass::framebufferOutputRect):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp.
(WebCore):
(WebCore::CCRenderPassDrawQuad::create):
(WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h.
(WebCore):
(CCRenderPassDrawQuad):
(WebCore::CCRenderPassDrawQuad::renderPass):
(WebCore::CCRenderPassDrawQuad::isReplica):
(WebCore::CCRenderPassDrawQuad::maskTextureId):
(WebCore::CCRenderPassDrawQuad::filters):
(WebCore::CCRenderPassDrawQuad::backgroundFilters):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::prepareContentsTexture):
(WebCore::CCRenderSurface::prepareBackgroundTexture):
(WebCore::CCRenderSurface::appendQuads):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore):
(CCRenderSurface):
* platform/graphics/chromium/cc/CCRenderer.h:
(CCRenderer):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::willDraw):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::reserveTextures):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
* tests/LayerRendererChromiumTest.cpp:
(FakeCCRendererClient::FakeCCRendererClient):
(FakeCCRendererClient::rootRenderPass):
(FakeCCRendererClient):
(TEST_F):

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

9 years ago[chromium] Issue async events for console.time/timeEnd
commit-queue@webkit.org [Mon, 4 Jun 2012 19:52:05 +0000 (19:52 +0000)]
[chromium] Issue async events for console.time/timeEnd
https://bugs.webkit.org/show_bug.cgi?id=88003

Patch by Kevin Greer <kgr@chromium.org> on 2012-06-04
Reviewed by Pavel Feldman.

* ../../Source/WebCore/page/Console.cpp:

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

9 years agoUse ENABLE() and USE() macros in a few more places
aestes@apple.com [Mon, 4 Jun 2012 19:36:27 +0000 (19:36 +0000)]
Use ENABLE() and USE() macros in a few more places
https://bugs.webkit.org/show_bug.cgi?id=88245

Reviewed by Anders Carlsson.

* UIProcess/API/C/WKPluginSiteDataManager.cpp: Only include npapi.h if
Netscape plug-in API is enabled.
* UIProcess/mac/CorrectionPanel.h: Wrap with USE(AUTOCORRECTION_PANEL)
* WebProcess/Authentication/AuthenticationManager.cpp: Use the stub
version of tryUsePlatformCertificateInfoForChallenge if
Security.framework isn't available.
* WebProcess/WebProcess.messages.in: Only generate two messages if
Security.framework is available.
* WebProcess/mac/KeychainItemShimMethods.mm: Wrap with
USE(SECURITY_FRAMEWORK).

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

9 years ago[GTK] Memory leaks in DumpRenderTree.cpp
commit-queue@webkit.org [Mon, 4 Jun 2012 19:30:52 +0000 (19:30 +0000)]
[GTK] Memory leaks in DumpRenderTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=88213

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-04
Reviewed by Martin Robinson.

Fixed memory leaks in DumpRenderTree.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(appendString): Accepts const gchar* as the second argument.
(dumpFramesAsText): Free the string returned by g_strdup_printf().
(dumpHistoryItem): Free the string returned by g_uri_parse_scheme().

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

9 years ago[Gtk] http/tests/media/video-buffered.html is failing after r119268
fischman@chromium.org [Mon, 4 Jun 2012 19:26:56 +0000 (19:26 +0000)]
[Gtk] http/tests/media/video-buffered.html is failing after r119268
https://bugs.webkit.org/show_bug.cgi?id=88138

Reviewed by Eric Carlson.

* http/tests/media/video-buffered.html:

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

9 years agoSpeed up video-media-source-play & video-media-source-seek LayoutTests.
commit-queue@webkit.org [Mon, 4 Jun 2012 19:22:10 +0000 (19:22 +0000)]
Speed up video-media-source-play & video-media-source-seek LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=87986

Patch by Aaron Colwell <acolwell@chromium.org> on 2012-06-04
Reviewed by Eric Carlson.

* http/tests/media/media-source/video-media-source-play.html: Updated test to only play 1 second of media data instead of ~3 seconds.
* http/tests/media/media-source/video-media-source-seek-expected.txt:
* http/tests/media/media-source/video-media-source-seek.html:
    - Triggers seek after playing 0.5 seconds instead of 2 seconds.
    - Seeks to the last segment instead of a segment that is ~2 seconds from the end.
    - Added an webkitSourceAbort() call before appending the segments for the seek. This is to prevent this test from failing
      when the old v0.3 "flush on seek" behavior is removed from the Chromium code.

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

9 years agoAdd stub WebKit2 implementations of PLUGIN_PROXY_FOR_VIDEO methods declared in FrameL...
aestes@apple.com [Mon, 4 Jun 2012 19:21:22 +0000 (19:21 +0000)]
Add stub WebKit2 implementations of PLUGIN_PROXY_FOR_VIDEO methods declared in FrameLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=88244

Reviewed by Anders Carlsson.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Add a stub implementation.
(WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Ditto.
(WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

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

9 years agoPort RAMSize to WinCE
paroga@webkit.org [Mon, 4 Jun 2012 19:14:44 +0000 (19:14 +0000)]
Port RAMSize to WinCE
https://bugs.webkit.org/show_bug.cgi?id=87854

Reviewed by Geoffrey Garen.

WinCE has no GlobalMemoryStatusEx() function. Use GlobalMemoryStatus() instead.

* wtf/RAMSize.cpp:
(WTF::computeRAMSize):

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

9 years agoEnable Chromium media player to instantiate a plugin
commit-queue@webkit.org [Mon, 4 Jun 2012 19:03:02 +0000 (19:03 +0000)]
Enable Chromium media player to instantiate a plugin
https://bugs.webkit.org/show_bug.cgi?id=87399

Patch by David Dorwin <ddorwin@chromium.org> on 2012-06-04
Reviewed by Kent Tamura.

Adds WebHelperPlugin, an off-screen widget that contains an <object> tag.

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebHelperPlugin.h: Copied from Source/WebKit/chromium/public/WebPopupType.h.
(WebKit):
(WebHelperPlugin):
(WebKit::WebHelperPlugin::~WebHelperPlugin):
* public/WebMediaPlayerClient.h:
(WebKit):
* public/WebPopupType.h:
* public/WebView.h:
* public/WebViewClient.h:
(WebKit):
(WebViewClient):
(WebKit::WebViewClient::initializeHelperPluginWebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::WebFrameImpl):
(WebKit::WebFrameImpl::initializeAsMainFrame):
* src/WebFrameImpl.h:
(WebFrameImpl):
* src/WebHelperPluginImpl.cpp: Added.
(WebKit):
(WebKit::addString):
(WebKit::writeDocument):
(HelperPluginChromeClient):
(WebKit::HelperPluginChromeClient::HelperPluginChromeClient):
(WebKit::WebHelperPluginImpl::WebHelperPluginImpl):
(WebKit::WebHelperPluginImpl::~WebHelperPluginImpl):
(WebKit::WebHelperPluginImpl::init):
(WebKit::WebHelperPluginImpl::initializeFrame):
(WebKit::WebHelperPluginImpl::initPage):
(WebKit::WebHelperPluginImpl::setCompositorSurfaceReady):
(WebKit::WebHelperPluginImpl::composite):
(WebKit::WebHelperPluginImpl::layout):
(WebKit::WebHelperPluginImpl::setFocus):
(WebKit::WebHelperPluginImpl::close):
(WebKit::WebHelperPluginImpl::closeHelperPlugin):
(WebKit::WebHelperPlugin::create):
* src/WebHelperPluginImpl.h: Copied from Source/WebKit/chromium/public/WebPopupType.h.
(WebCore):
(WebKit):
(WebHelperPluginImpl):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl):
(WebKit::WebMediaPlayerClientImpl::createHelperPlugin):
(WebKit):
(WebKit::WebMediaPlayerClientImpl::closeHelperPlugin):
* src/WebMediaPlayerClientImpl.h:
(WebKit):
(WebMediaPlayerClientImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::initializeMainFrame):
(WebKit::WebViewImpl::initializeHelperPluginFrame):
(WebKit):
(WebKit::WebViewImpl::createHelperPlugin):
* src/WebViewImpl.h:
(WebKit):
(WebViewImpl):

Tools:

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::createPopupMenu):

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

9 years agoRemove obsolete acceptMIMETypes member.
commit-queue@webkit.org [Mon, 4 Jun 2012 18:30:54 +0000 (18:30 +0000)]
Remove obsolete acceptMIMETypes member.
https://bugs.webkit.org/show_bug.cgi?id=88241

Patch by Raymes Khoury <raymes@chromium.org> on 2012-06-04
Reviewed by Darin Fisher.

Obsoleted by https://bugs.webkit.org/show_bug.cgi?id=87271 and http://codereview.chromium.org/10414085/.

* public/WebFileChooserParams.h:
(WebFileChooserParams):
* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::runOpenPanel):

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

9 years agoCrash in multi-column layout.
inferno@chromium.org [Mon, 4 Jun 2012 18:06:52 +0000 (18:06 +0000)]
Crash in multi-column layout.
https://bugs.webkit.org/show_bug.cgi?id=88022

Reviewed by Ojan Vafai.

Source/WebCore:

The patch addresses two problems::
1. |this| in RenderBlock::splitBlocks can get destroyed when we
move its children to the clone and later call updateBeforeAfterContent
on the parent. So, we stop accessing its member variables and cache
it in a local.
2. Positioned objects were not getting cleared from our grand parents.
This will happen if our immediate children got moved to a clone tree,
however at our parent nothing was moved. So, we make sure to remove
the positioned objects at every level while we are doing the cloning.

Tests: fast/multicol/span/empty-anonymous-block-split-crash.html
       fast/multicol/span/positioned-objects-not-removed-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::splitBlocks):

LayoutTests:

* fast/multicol/span/empty-anonymous-block-split-crash-expected.txt: Added.
* fast/multicol/span/empty-anonymous-block-split-crash.html: Added.
* fast/multicol/span/positioned-objects-not-removed-crash-expected.txt: Added.
* fast/multicol/span/positioned-objects-not-removed-crash.html: Added.

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

9 years agoMac build fails with SVG disabled
timothy_horton@apple.com [Mon, 4 Jun 2012 18:04:25 +0000 (18:04 +0000)]
Mac build fails with SVG disabled
https://bugs.webkit.org/show_bug.cgi?id=88165

Reviewed by Dirk Schulze.

Wrap all of SVGCSSPropertyNames in #if ENABLE(SVG),
and mark an unused argument in collectMatchingRulesForList.

* css/SVGCSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

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

9 years agoBUILD FIX: Unused variable with ENABLE(CONTEXT_MENUS) off
ddkilzer@apple.com [Mon, 4 Jun 2012 18:01:21 +0000 (18:01 +0000)]
BUILD FIX: Unused variable with ENABLE(CONTEXT_MENUS) off

This broke in r118374.

* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::showContextMenu): Add
UNUSED_PARAM(exec) when ENABLE(CONTEXT_MENUS) is off.

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

9 years agoRename CSS flexbox test files to match new property names
tony@chromium.org [Mon, 4 Jun 2012 17:07:33 +0000 (17:07 +0000)]
Rename CSS flexbox test files to match new property names
https://bugs.webkit.org/show_bug.cgi?id=88174

Reviewed by Ojan Vafai.

flex-pack became justify-content and flex-line-pack became
align-content. Rename the tests to match the new names.

* css3/flexbox/flex-justify-content-expected.txt: Renamed from LayoutTests/css3/flexbox/flex-pack-expected.txt.
* css3/flexbox/flex-justify-content.html: Renamed from LayoutTests/css3/flexbox/flex-pack.html.
* css3/flexbox/multiline-align-content-expected.txt: Renamed from LayoutTests/css3/flexbox/multiline-line-pack-expected.txt.
* css3/flexbox/multiline-align-content-horizontal-column-expected.txt: Renamed from LayoutTests/css3/flexbox/multiline-line-pack-horizontal-column-expected.txt.
* css3/flexbox/multiline-align-content-horizontal-column.html: Renamed from LayoutTests/css3/flexbox/multiline-line-pack-horizontal-column.html.
* css3/flexbox/multiline-align-content.html: Renamed from LayoutTests/css3/flexbox/multiline-line-pack.html.
* css3/flexbox/multiline-align-self-expected.txt: Renamed from LayoutTests/css3/flexbox/multiline-align-expected.txt.
* css3/flexbox/multiline-align-self.html: Renamed from LayoutTests/css3/flexbox/multiline-align.html.
* css3/flexbox/multiline-justify-content-expected.txt: Renamed from LayoutTests/css3/flexbox/multiline-pack-expected.txt.
* css3/flexbox/multiline-justify-content.html: Renamed from LayoutTests/css3/flexbox/multiline-pack.html.
* platform/chromium/TestExpectations:

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

9 years agoFix a couple flexbox tests to use flex-start and flex-end
tony@chromium.org [Mon, 4 Jun 2012 17:05:20 +0000 (17:05 +0000)]
Fix a couple flexbox tests to use flex-start and flex-end
https://bugs.webkit.org/show_bug.cgi?id=88170

Reviewed by Ojan Vafai.

This test was still using start/end for align-self, which fallback
to stretch. The test still passed because it is testing that all
values of align-self behave the same and stretch produced the same
behavior as flex-start/flex-end.

* css3/flexbox/cross-axis-scrollbar.html:

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

9 years ago[GTK][WK2] Implement geolocation provider for the GTK port
mario@webkit.org [Mon, 4 Jun 2012 16:05:02 +0000 (16:05 +0000)]
[GTK][WK2] Implement geolocation provider for the GTK port
https://bugs.webkit.org/show_bug.cgi?id=83877

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Add a new client-based geolocation provider for WebKit2GTK+, relying the
new Geoclue-based geolocation provider available in WebCore.

* GNUmakefile.am:
* GNUmakefile.list.am:
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Added.
(toGeolocationProvider):
(startUpdatingCallback):
(stopUpdatingCallback):
(WebKitGeolocationProvider::~WebKitGeolocationProvider):
(WebKitGeolocationProvider::create):
(WebKitGeolocationProvider::WebKitGeolocationProvider):
(WebKitGeolocationProvider::startUpdating):
(WebKitGeolocationProvider::stopUpdating):
(WebKitGeolocationProvider::notifyPositionChanged):
(WebKitGeolocationProvider::notifyErrorOccurred):
* UIProcess/API/gtk/WebKitGeolocationProvider.h: Added.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(_WebKitWebContextPrivate):
(createDefaultWebContext):

Tools:

* gtk/generate-gtkdoc:
(get_webkit2_options): Ignore WebKitGeolocationProvider files.

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

9 years agoUnreviewed, rolling out r119393.
commit-queue@webkit.org [Mon, 4 Jun 2012 16:02:12 +0000 (16:02 +0000)]
Unreviewed, rolling out r119393.
http://trac.webkit.org/changeset/119393
https://bugs.webkit.org/show_bug.cgi?id=88236

Test is incorrect (duplicate content) and is causing Chromium
failures (Requested by schenney on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-04

Source/WebCore:

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):

LayoutTests:

* fast/canvas/drawImage-clipped-source-expected.txt: Removed.
* fast/canvas/drawImage-clipped-source.html: Removed.
* fast/canvas/drawImage-clipped-source.js: Removed.

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

9 years agoUpdate test expectations after 119392
pdr@google.com [Mon, 4 Jun 2012 15:50:54 +0000 (15:50 +0000)]
Update test expectations after 119392
https://bugs.webkit.org/show_bug.cgi?id=88230

Unreviewed update of test expectations.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:

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

9 years ago[chromium] Cleanup scissor rect computation/use with damage
commit-queue@webkit.org [Mon, 4 Jun 2012 15:42:14 +0000 (15:42 +0000)]
[chromium] Cleanup scissor rect computation/use with damage
https://bugs.webkit.org/show_bug.cgi?id=87167

Patch by Zeev Lieber <zlieber@chromium.org> on 2012-06-04
Reviewed by Adrienne Walker.

Source/WebCore:

Performing scissorRect computation during
calculateRenderPasses. Storing scissorRect in shared quad state
instead of computing it during drawQuad. Added scissorRect fields
into layers and render surfaces.

Covered by existing layout tests. Introduced more unit tests to
test end-to-end drawing using mock graphic context, and added more
test cases to CCLayerTreeHostCommon to verify scissorRect computation.

* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::scissorRect):
(WebCore::LayerChromium::setScissorRect):
(LayerChromium):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::clearRenderSurface):
(WebCore::LayerRendererChromium::drawRenderPass):
(WebCore::LayerRendererChromium::drawQuad):
(WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):
* platform/graphics/chromium/RenderSurfaceChromium.cpp:
(WebCore::RenderSurfaceChromium::computeRootScissorRectInCurrentSurface):
(WebCore):
* platform/graphics/chromium/RenderSurfaceChromium.h:
(WebCore::RenderSurfaceChromium::scissorRect):
(WebCore::RenderSurfaceChromium::setScissorRect):
(RenderSurfaceChromium):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore::CCDrawQuad::scissorRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::createSharedQuadState):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
(WebCore::CCLayerImpl::scissorRect):
(WebCore::CCLayerImpl::setScissorRect):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateLayers):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore):
(WebCore::calculateLayerScissorRect):
(WebCore::calculateSurfaceScissorRect):
(WebCore::calculateDrawTransformsInternal):
(WebCore::calculateVisibleAndScissorRectsInternal):
(WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
(WebCore::CCLayerTreeHostCommon::calculateVisibleAndScissorRects):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
(CCLayerTreeHostCommon):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::drawLayers):
(WebCore::CCLayerTreeHostImpl::swapBuffers):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
* platform/graphics/chromium/cc/CCRenderPass.h:
(CCRenderPass):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::createSharedQuadState):
(WebCore::CCRenderSurface::createReplicaSharedQuadState):
(WebCore):
(WebCore::CCRenderSurface::computeRootScissorRectInCurrentSurface):
(WebCore::CCRenderSurface::appendQuads):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(CCRenderSurface):
(WebCore::CCRenderSurface::setScissorRect):
(WebCore::CCRenderSurface::scissorRect):
* platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp:
(WebCore::CCRenderSurfaceDrawQuad::create):
(WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
* platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h:
(CCRenderSurfaceDrawQuad):
* platform/graphics/chromium/cc/CCRenderer.h:
(CCRenderer):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp:
(WebCore::CCSharedQuadState::create):
(WebCore::CCSharedQuadState::CCSharedQuadState):
* platform/graphics/chromium/cc/CCSharedQuadState.h:
(CCSharedQuadState):
(WebCore::CCSharedQuadState::scissorRect):

Source/WebKit/chromium:

Added unit tests to CCLayerTreeHostImpl using mock graphic context
to verify end-to-end quad drawing.

Added more test cases to CCLayerTreeHostCommon to verify clip and
scissor rect computations.

* tests/CCDamageTrackerTest.cpp:
(WebKitTests::executeCalculateDrawTransformsAndVisibility):
* tests/CCLayerIteratorTest.cpp:
* tests/CCLayerTreeHostCommonTest.cpp:
* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCOcclusionTrackerTest.cpp:
(WebKitTests::CCOcclusionTrackerTest::calcDrawEtc):
* tests/CCRenderSurfaceTest.cpp:

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

9 years ago[Qt][WK2] Rename QtViewportInteractionEngine to QtViewportHandler.
commit-queue@webkit.org [Mon, 4 Jun 2012 15:30:46 +0000 (15:30 +0000)]
[Qt][WK2] Rename QtViewportInteractionEngine to QtViewportHandler.
https://bugs.webkit.org/show_bug.cgi?id=88226

Patch by Zalan Bujtas <zbujtas@gmail.com> on 2012-06-04
Reviewed by Kenneth Rohde Christiansen.

* Target.pri:
* UIProcess/API/qt/qquickwebpage_p_p.h:
(WebKit):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate):
(QQuickWebViewFlickablePrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::didChangeViewportProperties):
(QQuickWebViewFlickablePrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::pageDidRequestScroll):
(QQuickWebViewFlickablePrivate::didChangeContentsSize):
* UIProcess/API/qt/qquickwebview_p.h:
(WebKit):
* UIProcess/API/qt/qquickwebview_p_p.h:
(WebKit):
(QQuickWebViewPrivate::viewportHandler):
(QQuickWebViewFlickablePrivate::viewportHandler):
(QQuickWebViewFlickablePrivate):
* UIProcess/API/qt/qwebkittest.cpp:
(QWebKitTest::contentsScale):
(QWebKitTest::devicePixelRatio):
(QWebKitTest::initialScale):
(QWebKitTest::minimumScale):
(QWebKitTest::maximumScale):
(QWebKitTest::isScalable):
(QWebKitTest::layoutSize):
* UIProcess/qt/QtGestureRecognizer.cpp:
(WebKit::QtGestureRecognizer::viewportHandler):
* UIProcess/qt/QtGestureRecognizer.h:
(WebKit):
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::update):
(WebKit::QtPanGestureRecognizer::finish):
(WebKit::QtPanGestureRecognizer::cancel):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::update):
(WebKit::QtPinchGestureRecognizer::finish):
(WebKit::QtPinchGestureRecognizer::cancel):
* UIProcess/qt/QtViewportHandler.cpp: Copied from Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp.
(WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(ViewportUpdateDeferrer):
(WebKit::QtViewportHandler::suspendPageContent):
(WebKit::QtViewportHandler::resumePageContent):
(WebKit::QtViewportHandler::cssScaleFromItem):
(WebKit::QtViewportHandler::itemScaleFromCSS):
(WebKit::QtViewportHandler::itemCoordFromCSS):
(WebKit::QtViewportHandler::itemRectFromCSS):
(WebKit::QtViewportHandler::QtViewportHandler):
(WebKit::QtViewportHandler::~QtViewportHandler):
(WebKit::QtViewportHandler::innerBoundedCSSScale):
(WebKit::QtViewportHandler::outerBoundedCSSScale):
(WebKit::QtViewportHandler::viewportAttributesChanged):
(WebKit::QtViewportHandler::pageContentsSizeChanged):
(WebKit::QtViewportHandler::setPageItemRectVisible):
(WebKit::QtViewportHandler::animatePageItemRectVisible):
(WebKit::QtViewportHandler::flickMoveStarted):
(WebKit::QtViewportHandler::flickMoveEnded):
(WebKit::QtViewportHandler::pageItemPositionChanged):
(WebKit::QtViewportHandler::pageContentPositionRequested):
(WebKit::QtViewportHandler::scaleAnimationStateChanged):
(WebKit::QtViewportHandler::scaleAnimationValueChanged):
(WebKit::QtViewportHandler::touchBegin):
(WebKit::QtViewportHandler::touchEnd):
(WebKit::QtViewportHandler::computePosRangeForPageItemAtScale):
(WebKit::QtViewportHandler::focusEditableArea):
(WebKit::QtViewportHandler::zoomToAreaGestureEnded):
(WebKit::QtViewportHandler::nearestValidBounds):
(WebKit::QtViewportHandler::setCSSScale):
(WebKit::QtViewportHandler::currentCSSScale):
(WebKit::QtViewportHandler::scrollAnimationActive):
(WebKit::QtViewportHandler::panGestureActive):
(WebKit::QtViewportHandler::panGestureStarted):
(WebKit::QtViewportHandler::panGestureRequestUpdate):
(WebKit::QtViewportHandler::panGestureEnded):
(WebKit::QtViewportHandler::panGestureCancelled):
(WebKit::QtViewportHandler::scaleAnimationActive):
(WebKit::QtViewportHandler::cancelScrollAnimation):
(WebKit::QtViewportHandler::interruptScaleAnimation):
(WebKit::QtViewportHandler::pinchGestureActive):
(WebKit::QtViewportHandler::pinchGestureStarted):
(WebKit::QtViewportHandler::pinchGestureRequestUpdate):
(WebKit::QtViewportHandler::pinchGestureEnded):
(WebKit::QtViewportHandler::pinchGestureCancelled):
(WebKit::QtViewportHandler::visibleContentsRect):
(WebKit::QtViewportHandler::informVisibleContentChange):
(WebKit::QtViewportHandler::viewportItemSizeChanged):
(WebKit::QtViewportHandler::scaleContent):
* UIProcess/qt/QtViewportHandler.h: Copied from Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.h.
(QtViewportHandler):
* UIProcess/qt/QtViewportInteractionEngine.cpp: Removed.
* UIProcess/qt/QtViewportInteractionEngine.h: Removed.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
(WebKit::QtWebPageEventHandler::setViewportHandler):
(WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
(WebKit::QtWebPageEventHandler::doneWithTouchEvent):
(WebKit::QtWebPageEventHandler::didFindZoomableArea):
* UIProcess/qt/QtWebPageEventHandler.h:
(WebKit):
(QtWebPageEventHandler):
(WebKit::QtWebPageEventHandler::viewportHandler):

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

9 years agoRemove SelectorQueryCacheEntry from SelectorQuery.h
haraken@chromium.org [Mon, 4 Jun 2012 15:30:37 +0000 (15:30 +0000)]
Remove SelectorQueryCacheEntry from SelectorQuery.h
https://bugs.webkit.org/show_bug.cgi?id=88204

Reviewed by Hajime Morita.

As anttik@ pointed out in https://bugs.webkit.org/show_bug.cgi?id=87942#c15,
we can remove SelectorQueryCacheEntry by having SelectorQuery hold CSSSelectorList.

Tests: fast/dom/SelectorAPI/* No change in test results.

* dom/SelectorQuery.cpp:
(WebCore::SelectorQuery::SelectorQuery):
(WebCore::SelectorQueryCache::add):
* dom/SelectorQuery.h:
(SelectorQuery):
(SelectorQueryCache):

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

9 years ago[GTK] Memory leak in PasteboardHelper
commit-queue@webkit.org [Mon, 4 Jun 2012 15:18:19 +0000 (15:18 +0000)]
[GTK] Memory leak in PasteboardHelper
https://bugs.webkit.org/show_bug.cgi?id=88216

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-04
Reviewed by Martin Robinson.

Fixed a memory leak in PasteboardHelper by using adoptRef instead
of just getting a new reference of TargetList.

No new tests because of no behavior changes.

* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::dropAtomsForContext):

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

9 years ago[GTK] Memory leak in WebKitWebView
commit-queue@webkit.org [Mon, 4 Jun 2012 15:15:41 +0000 (15:15 +0000)]
[GTK] Memory leak in WebKitWebView
https://bugs.webkit.org/show_bug.cgi?id=88214

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-04
Reviewed by Martin Robinson.

Fixed a memory leak in WebKitWebView by making
GeolocationClientMock to be owned by the WebView.

* webkit/webkitwebview.cpp:
(webkit_web_view_init):
* webkit/webkitwebviewprivate.h:

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

9 years agoHit ASSERT when editing attribute value in Element in SVG Document
rwlbuis@webkit.org [Mon, 4 Jun 2012 15:00:47 +0000 (15:00 +0000)]
Hit ASSERT when editing attribute value in Element in SVG Document
https://bugs.webkit.org/show_bug.cgi?id=88179

Patch by Rob Buis <rbuis@rim.com> on 2012-06-04
Reviewed by Pavel Feldman.

Make sure the <span> is created as a HTML Element regardless of document in use.

* inspector/InspectorDOMAgent.cpp:
(WebCore):
(WebCore::InspectorDOMAgent::setAttributesAsText):

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

9 years ago[Forms] Change function and variable names independent from "double" type
yosin@chromium.org [Mon, 4 Jun 2012 14:57:17 +0000 (14:57 +0000)]
[Forms] Change function and variable names independent from "double" type
https://bugs.webkit.org/show_bug.cgi?id=88220

Reviewed by Kent Tamura.

This patch is a part of introducing decimal arithmetic to input type.

This patch renames function and variable names which contain term "double"
to "number" to separate concept and implementation.

No new tests. This patch doesn't change behavior.

* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::valueAsDate): Replace parseToDouble to parseToNumber.
(WebCore::BaseDateAndTimeInputType::valueAsNumber): ditto.
(WebCore::BaseDateAndTimeInputType::parseToNumber): ditto.
* html/BaseDateAndTimeInputType.h:
(BaseDateAndTimeInputType):
* html/DateInputType.cpp:
(WebCore::DateInputType::createStepRange): Replace parseToDouble to parseToNumber.
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::createStepRange): Replace parseToDouble to parseToNumber.
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::createStepRange): Replace parseToDouble to parseToNumber.
* html/InputType.cpp:
(WebCore::InputType::rangeUnderflow): Replace parseToDouble to parseToNumber and doubleValue to numericValue.
(WebCore::InputType::rangeOverflow): ditto.
(WebCore::InputType::isInRange): ditto.
(WebCore::InputType::isOutOfRange): ditto.
(WebCore::InputType::stepMismatch): ditto.
(WebCore::InputType::validationMessage): ditto.
(WebCore::InputType::parseToNumber): ditto.
(WebCore::InputType::parseToDoubleWithDecimalPlaces): ditto.
(WebCore::InputType::stepUpFromRenderer): dttio.
* html/InputType.h:
(InputType):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::createStepRange): Replace parseToDouble to parseToNumber.
(WebCore::MonthInputType::parseToNumber): ditto.
* html/MonthInputType.h:
(MonthInputType):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::valueAsNumber): Replace parseToDouble to parseToNumber.
(WebCore::NumberInputType::createStepRange): ditto.
(WebCore::NumberInputType::parseToNumber): ditto.
* html/NumberInputType.h:
* html/RangeInputType.cpp:
(WebCore::ensureMaximum): Added helper function for createStepRange for avoiding cast in max() and using "const".
(WebCore::RangeInputType::valueAsNumber): Replace parseToDouble to parseToNumber.
(WebCore::RangeInputType::createStepRange): ditto.
(WebCore::RangeInputType::handleKeydownEvent): ditto.
(WebCore::RangeInputType::parseToNumber): ditto.
(WebCore::RangeInputType::sanitizeValue): ditto.
* html/RangeInputType.h:
(RangeInputType):
* html/StepRange.cpp:
(WebCore::StepRange::parseStep): Replace DoubleWithDecimalPlaces to NumberWithDecimalPlaces.
(WebCore::StepRange::stepMismatch): Replace parseToDouble to parseToNumber.
* html/StepRange.h:
(WebCore::StepRange::NumberWithDecimalPlaces): Renamed from DoubleWithDecimalPlaces.
(WebCore::StepRange::NumberWithDecimalPlacesOrMissing): Renamed from DoubleWithDecimalPlacesOrMissing.
* html/TimeInputType.cpp:
(WebCore::TimeInputType::createStepRange): Replace parseToDouble to parseToNumber.
* html/WeekInputType.cpp:
(WebCore::WeekInputType::createStepRange): Replace parseToDouble to parseToNumber.

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

9 years agoBUILD FIX: FeatureDefines.xcconfig should match across projects
ddkilzer@apple.com [Mon, 4 Jun 2012 14:55:26 +0000 (14:55 +0000)]
BUILD FIX: FeatureDefines.xcconfig should match across projects

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
- Add missing ENABLE_LEGACY_CSS_VENDOR_PREFIXES.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
- Add missing ENABLE_CSS_IMAGE_RESOLUTION.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
- Fix sort order of ENABLE_CSS3_FLEXBOX.
- Fix typo in ENABLE_FONT_BOOSTING.
- Add missing ENABLE_LEGACY_CSS_VENDOR_PREFIXES.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
- Add missing ENABLE_LEGACY_CSS_VENDOR_PREFIXES.

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

9 years agoCanvas 2D - Source rectangles that overlap the source image boundary, not supported...
commit-queue@webkit.org [Mon, 4 Jun 2012 14:43:51 +0000 (14:43 +0000)]
Canvas 2D - Source rectangles that overlap the source image boundary, not supported by drawImage
https://bugs.webkit.org/show_bug.cgi?id=66574

Patch by Justin Novosad <junov@chromium.org> on 2012-06-04
Reviewed by Stephen White.

Source/WebCore:

Test: fast/canvas/drawImage-clipped-source.html

When the source rectangle argument to drawImage is not entirely
contatained by the domain of the source image, the source rectangle
is clipped, and the destination rectangle is clipped proportionately
Old behavior was to silently fail, which did not comply with the spec.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::normalizeAndClipRects):
(WebCore):
(WebCore::CanvasRenderingContext2D::drawImage):

LayoutTests:

Adding a new layout test that verifies that the source and destination
rectangle arguments to drawImage are properly clipped when the source
rectangle is not entirely contained whithin the domian of the source
image. Tests image to canvas draws and canvas to canvas draws.

* fast/canvas/drawImage-clipped-source-expected.txt: Added.
* fast/canvas/drawImage-clipped-source.html: Added.
* fast/canvas/drawImage-clipped-source.js: Added.
(patternTest.this.testPixel):
(patternTest.this.testRedSquare):
(patternTest.this.testAggregatePattern):
(patternTest):
(drawTestPattern):
(executeTest):

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

9 years ago[Cairo] Implementation of GraphicsContext does not save/restore ImageInterpolation...
commit-queue@webkit.org [Mon, 4 Jun 2012 13:31:14 +0000 (13:31 +0000)]
[Cairo] Implementation of GraphicsContext does not save/restore ImageInterpolation correctly
https://bugs.webkit.org/show_bug.cgi?id=87985

Patch by Dominik Röttsches <dominik.rottsches@intel.com> on 2012-06-04
Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Moving image interpolation quality setting into state so that it's saved and restored.

Covered by existing test fast/canvas/canvas-imageSmoothingEnabled.html which is now passing.

* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
(GraphicsContextPlatformPrivate): Removing stale member that was never used.
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::State::State):
(PlatformContextCairo::State):
(WebCore::PlatformContextCairo::PlatformContextCairo):
(WebCore::PlatformContextCairo::drawSurfaceToContext):
(WebCore::PlatformContextCairo::setImageInterpolationQuality):
(WebCore):
(WebCore::PlatformContextCairo::imageInterpolationQuality):
* platform/graphics/cairo/PlatformContextCairo.h:
(PlatformContextCairo): Moving implementations for image interpolation quality setter into implementation file.

LayoutTests:

Unskipping fast/canvas/canvas-imageSmoothingEnabled.html now that it passes.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

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

9 years agoFix assert in non-scaling strokes in patterns
pdr@google.com [Mon, 4 Jun 2012 13:23:16 +0000 (13:23 +0000)]
Fix assert in non-scaling strokes in patterns
https://bugs.webkit.org/show_bug.cgi?id=88198

Source/WebCore:

When calculating the CTM for a rect or path in a pattern we need to use
an SVGPatternElement's local transform. Pattern did not expose the transform
because it does not extend from from SVGStyledLocatable or SVGStyledTransformable.
This patch exposes the pattern's transform in localCoordinateSpaceTransform.

SVGGradientElement does not need this special handling because the children
of a gradient element are restricted to not include shape and structural elements
that would need to calculate a CTM.

Before this patch the added test would assert.
This patch is a prerequisite to a major refactoring of RenderSVGShape &
friends, and the test will be unskipped in a followup patch.

Reviewed by Dirk Schulze.

Tests: svg/stroke/non-scaling-stroke-pattern-expected.svg
       svg/stroke/non-scaling-stroke-pattern.svg

* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::localCoordinateSpaceTransform):
(WebCore):
* svg/SVGPatternElement.h:
(SVGPatternElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):

LayoutTests:

Reviewed by Dirk Schulze.

* platform/chromium/TestExpectations:
* platform/mac/TestExpectations:
* svg/stroke/non-scaling-stroke-pattern-expected.svg: Added.
* svg/stroke/non-scaling-stroke-pattern.svg: Added.

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

9 years ago[Qt] Tap-to-zoom overshoot animation.
commit-queue@webkit.org [Mon, 4 Jun 2012 13:15:04 +0000 (13:15 +0000)]
[Qt] Tap-to-zoom overshoot animation.
https://bugs.webkit.org/show_bug.cgi?id=87108

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-06-04
Reviewed by Tor Arne Vestbø.

Reverts the change in animation, so the default is more "neutral".
This should be made configurable later.

* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::animatePageItemRectVisible):

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

9 years agoWeb Inspector: speed up _calculateRetainedSizes function
loislo@chromium.org [Mon, 4 Jun 2012 12:38:30 +0000 (12:38 +0000)]
Web Inspector: speed up _calculateRetainedSizes function
https://bugs.webkit.org/show_bug.cgi?id=87863

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-06-04
Reviewed by Yury Semikhatsky.

PerformanceTests:

* inspector/heap-snapshot-advanced.html: Added.
* inspector/heap-snapshot-performance-test.js: Copied from PerformanceTests/inspector/heap-snapshot.html.
(test.performanceTest.step0):
(test.performanceTest.step1):
(test.performanceTest.step2):
(test.performanceTest.cleanup):
(test.performanceTest.done):
(test.performanceTest):
(test):
* inspector/heap-snapshot.html:

Source/WebCore:

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):

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

9 years agoUnreviewed. Disable heap profiler test on mac platform.
loislo@chromium.org [Mon, 4 Jun 2012 12:35:32 +0000 (12:35 +0000)]
Unreviewed. Disable heap profiler test on mac platform.

* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:

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

9 years agoUnreviewed, rolling out r119384.
commit-queue@webkit.org [Mon, 4 Jun 2012 12:17:10 +0000 (12:17 +0000)]
Unreviewed, rolling out r119384.
http://trac.webkit.org/changeset/119384
https://bugs.webkit.org/show_bug.cgi?id=88227

Need to update some tests, I'll roll in later. (Requested by
Zoltan on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-04

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchWillSendRequest):

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

9 years agoWeb Inspector: add unknown size to the memory pie-chart legend
loislo@chromium.org [Mon, 4 Jun 2012 12:02:24 +0000 (12:02 +0000)]
Web Inspector: add unknown size to the memory pie-chart legend
https://bugs.webkit.org/show_bug.cgi?id=88081

Patch by Yury Semikhatsky <yurys@chromium.org> on 2012-06-04
Reviewed by Pavel Feldman.

Added "Unknown" part size to the memory pie-chart legend.

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
(WebInspector.MemoryBlockViewProperties._initialize):
(WebInspector.NativeMemoryPieChart.prototype._paint):

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

9 years ago[Qt][WK2] Refactor the tap gesture recognizer
abecsi@webkit.org [Mon, 4 Jun 2012 11:31:15 +0000 (11:31 +0000)]
[Qt][WK2] Refactor the tap gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=88096

Reviewed by Simon Hausmann.

Refactor the tap gesture recognizer so that its internal state machine is
self contained and independent of input event types.
Also change the internal API for tap highlighting to make the code easier
to understand on the caller side.

This patch makes the tap gesture recognizer more robust, consistent with
other gesture recognizers and fixes some issues related to highlighting
and link activation with respect to native touch events.

* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::withinDistance):
(WebKit::QtTapGestureRecognizer::update):
(WebKit::QtTapGestureRecognizer::finish):
(WebKit::QtTapGestureRecognizer::cancel):
(WebKit::QtTapGestureRecognizer::highlightTimeout):
(WebKit::QtTapGestureRecognizer::singleTapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):
(WebKit::QtTapGestureRecognizer::reset):
* UIProcess/qt/QtTapGestureRecognizer.h:
(QtTapGestureRecognizer):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
(WebKit::QtWebPageEventHandler::activateTapHighlight):
(WebKit::QtWebPageEventHandler::deactivateTapHighlight):
(WebKit):
(WebKit::QtWebPageEventHandler::handleSingleTapEvent):
(WebKit::QtWebPageEventHandler::handleDoubleTapEvent):
(WebKit::QtWebPageEventHandler::doneWithTouchEvent):
* UIProcess/qt/QtWebPageEventHandler.h:
(QtWebPageEventHandler):

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

9 years ago[Qt] Qt DRT / WTR should be able to load external resources
zoltan@webkit.org [Mon, 4 Jun 2012 11:26:11 +0000 (11:26 +0000)]
[Qt] Qt DRT / WTR should be able to load external resources
https://bugs.webkit.org/show_bug.cgi?id=87326

Reviewed by Ryosuke Niwa.

Allow external resources to be loaded when the main frame's URL is also an external resource.
This change is analogous to r118231 for Mac port and to r119153 Chromium port.

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::blockRequest):
(WebCore):
(WebCore::isLocalhost):
(WebCore::hostIsUsedBySomeTestsToGenerateError):
(WebCore::FrameLoaderClientQt::dispatchWillSendRequest):

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

9 years agoUnreviewed. Update NEWS and configure.ac for 1.9.3 release
carlosgc@webkit.org [Mon, 4 Jun 2012 11:00:09 +0000 (11:00 +0000)]
Unreviewed. Update NEWS and configure.ac for 1.9.3 release

.:

* configure.ac: Bump version number.

Source/WebKit/gtk:

* NEWS: Added release notes for 1.9.3.

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

9 years ago[Qt] Don't use WebKit HAVE() macro in public Qt headers
vestbo@webkit.org [Mon, 4 Jun 2012 10:24:38 +0000 (10:24 +0000)]
[Qt] Don't use WebKit HAVE() macro in public Qt headers

Reviewed by Kenneth Rohde Christiansen.

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

9 years agoAdding explicit console error for duplicated CSP directives.
commit-queue@webkit.org [Mon, 4 Jun 2012 10:09:59 +0000 (10:09 +0000)]
Adding explicit console error for duplicated CSP directives.
https://bugs.webkit.org/show_bug.cgi?id=88193

Source/WebCore:

This patch adds an explicit error message for duplicated CSP
directives instead of reusing the "unrecognized directive" error.

Patch by Mike West <mkwst@chromium.org> on 2012-06-04
Reviewed by Adam Barth.

Test: http/tests/security/contentSecurityPolicy/duplicate-directive.html

* page/ContentSecurityPolicy.cpp:
(CSPDirectiveList):
(WebCore::CSPDirectiveList::logDuplicateDirective):
(WebCore):
(WebCore::CSPDirectiveList::parseReportURI):
(WebCore::CSPDirectiveList::setCSPDirective):
(WebCore::CSPDirectiveList::applySandboxPolicy):
(WebCore::CSPDirectiveList::addDirective):

LayoutTests:

Patch by Mike West <mkwst@chromium.org> on 2012-06-04
Reviewed by Adam Barth.

* http/tests/security/contentSecurityPolicy/duplicate-directive-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/duplicate-directive.html: Added.

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

9 years agoREGRESSION(r117929) [Forms] input type=number thinks 0 is not a number
yosin@chromium.org [Mon, 4 Jun 2012 09:48:59 +0000 (09:48 +0000)]
REGRESSION(r117929) [Forms] input type=number thinks 0 is not a number
https://bugs.webkit.org/show_bug.cgi?id=88208

Reviewed by Kent Tamura.

Source/WebCore:

This patch fixes invalid handling of return value of parseToDoubleForNumberType
in NumberInputType::isAcceptableValue to use isfinite() function for checking
whether specified string is valid number or not. Before r117929, return value
of parseToDoubleForNumberType was bool, but after r117929, it is double.

Test: fast/forms/number/input-number-from-renderer.html

* html/NumberInputType.cpp:
(WebCore::NumberInputType::isAcceptableValue): Use isfinite()

LayoutTests:

This patch introduced function checkIt() for code sharing and added
more test cases to input-number-commit-valid-only.htm

* fast/forms/number/input-number-commit-valid-only-expected.txt: Changed for additional tests.
* fast/forms/number/input-number-commit-valid-only.html: Changed.

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

9 years agoCrash in WebCore::RenderView::getRetainedWidgets
antti@apple.com [Mon, 4 Jun 2012 09:32:05 +0000 (09:32 +0000)]
Crash in WebCore::RenderView::getRetainedWidgets
https://bugs.webkit.org/show_bug.cgi?id=88217

Reviewed by Kenneth Rohde Christiansen.

There is no known repro, the crash has been seen on the field. It is likely that it happens with frame
flattening enabled only.

Null check root renderer in performPostLayoutTasks. The root can legitimely be null for several reasons and
is mostly null checked everywhere else.

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

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

9 years ago[EFL] Reset "WebKitTabToLinksPreferenceKey" in DumpRenderTreeChrome::resetDefaultsToC...
commit-queue@webkit.org [Mon, 4 Jun 2012 09:28:34 +0000 (09:28 +0000)]
[EFL] Reset "WebKitTabToLinksPreferenceKey" in DumpRenderTreeChrome::resetDefaultsToConsistentValues
https://bugs.webkit.org/show_bug.cgi?id=87668

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-06-04
Reviewed by Ryosuke Niwa.

Tools:

Layout test controller "WebKitTabToLinksPreferenceKey" setting should be reset to false
otherwise LayoutTests/fast/html/tab-order.html is failing as it has a link inside the test description which might
be included in focus chain (if "WebKitTabToLinksPreferenceKey" setting is set to true).

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):

LayoutTests:

* platform/efl/Skipped: Unskipped fast/html/tab-order.html.

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

9 years ago[GTK] Remove geoclue dependency from WebKit API Layer
mario@webkit.org [Mon, 4 Jun 2012 09:06:26 +0000 (09:06 +0000)]
[GTK] Remove geoclue dependency from WebKit API Layer
https://bugs.webkit.org/show_bug.cgi?id=87801

Reviewed by Martin Robinson.

Make GeolocationClient for WebKitGTK+ use the new Geoclue-based
geolocation provider available in WebCore.

* WebCoreSupport/GeolocationClientGtk.cpp:
(WebKit):
(WebKit::GeolocationClient::GeolocationClient):
(WebKit::GeolocationClient::startUpdating):
(WebKit::GeolocationClient::stopUpdating):
(WebKit::GeolocationClient::setEnableHighAccuracy):
(WebKit::GeolocationClient::notifyPositionChanged):
(WebKit::GeolocationClient::notifyErrorOccurred):
* WebCoreSupport/GeolocationClientGtk.h:
(GeolocationClient):

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

9 years agoUse SelectorQuery in Element::webkitMatchesSelector()
haraken@chromium.org [Mon, 4 Jun 2012 08:52:08 +0000 (08:52 +0000)]
Use SelectorQuery in Element::webkitMatchesSelector()
https://bugs.webkit.org/show_bug.cgi?id=88209

Reviewed by Antti Koivisto.

By using SelectorQuery in Element::webkitMatchesSelector(),
we can not only simplify the code but also improve the performance
thanks to the cache mechanism of SelectorQuery which was implemented
in bug 87942.

Tests: fast/dom/SelectorAPI/*. No change in test results.

* dom/Element.cpp:
(WebCore::Element::webkitMatchesSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorQuery::matches):
(WebCore):
* dom/SelectorQuery.h:
(SelectorQuery):

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

9 years ago[EFL] Refactor ewk_view_context_paint code.
commit-queue@webkit.org [Mon, 4 Jun 2012 08:45:38 +0000 (08:45 +0000)]
[EFL] Refactor ewk_view_context_paint code.
https://bugs.webkit.org/show_bug.cgi?id=85588

Patch by Tomasz Morawski <t.morawski@samsung.com> on 2012-06-04
Reviewed by Hajime Morita.

Source/WebKit:

Added new ewk_paint_context.cpp file to source list.

* PlatformEfl.cmake:

Source/WebKit/efl:

The main purpose of this change is reduce size of ewk_view.h/cpp files and make use of ewk_view_context_paint
object by ewk_view_single and ewk_view_tiled instead of direct operations on cairo.
The code is more objective and looks very simple now.
Remove ewk_view_context_paint code from ewk_view h/cpp file and move it to separate new ewk_context_paint file.
The ewk_view_context_paint has been renamed to ewk_context_paint and it is not binded to view on creation time.

* ewk/ewk_paint_context.cpp: Added.
Functions renamed and moved from ewk_view to ewk_paint_context file.
(ewk_paint_context_new):
(ewk_paint_context_from_image_new): New function.
(ewk_paint_context_from_image_data_new): New function.
(ewk_paint_context_free):
(ewk_paint_context_save):
(ewk_paint_context_restore):
(ewk_paint_context_clip):
(ewk_paint_context_scale):
(ewk_paint_context_translate):
(ewk_paint_context_paint): Added FrameView parameter.
(ewk_paint_context_paint_contents): Added FrameView parameter.
* ewk/ewk_paint_context_private.h: Added.
(_Ewk_Paint_Context):
* ewk/ewk_private.h: Functions ewk_view_paint and ewk_view_paint_contents moved from ewk_view.h.
* ewk/ewk_tiled_backing_store.h: Removed unused include.
* ewk/ewk_view.cpp: Moved all function releated to paint context object to new ewk_paint_context file.
(_Ewk_View_Private_Data):
(ewk_view_paint): Changed function according change in ewk_paint_context_paint function.
(ewk_view_paint_contents): Changed function according change in ewk_paint_context_paint_contents function.
* ewk/ewk_view.h: Removed all paint context functions and ewk_view_paint, ewk_view_paint_contents function from
public API.
* ewk/ewk_view_single.cpp:
(_ewk_view_single_smart_repaints_process):
Refactor of _ewk_view_single_smart_repaints_process function.
Removed goto statements.
Removed variables declaration from function beginning.
* ewk/ewk_view_tiled.cpp:
(_ewk_view_tiled_render_cb): Make use of ewk_paint_context object instead of direction operation on cairo.
Looks simpler and more objective.

Tools:

* DumpRenderTree/efl/CMakeLists.txt: Added include directory.

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

9 years ago[EFL] Compilation warning in DumpRenderTreeView.cpp on 64-Bit
commit-queue@webkit.org [Mon, 4 Jun 2012 07:00:15 +0000 (07:00 +0000)]
[EFL] Compilation warning in DumpRenderTreeView.cpp on 64-Bit
https://bugs.webkit.org/show_bug.cgi?id=87869

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-04
Reviewed by Andreas Kling.

Replace %lld by PRId64 macro to print an int64_t value and silent a
compilation warning on 64-Bit.

* DumpRenderTree/efl/DumpRenderTreeView.cpp:
(onExceededApplicationCacheQuota):

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

9 years agoRoll Chromium DEPS from r140222 to r140260.
rniwa@webkit.org [Mon, 4 Jun 2012 06:20:39 +0000 (06:20 +0000)]
Roll Chromium DEPS from r140222 to r140260.

* DEPS:

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

9 years ago[chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry
kinuko@chromium.org [Mon, 4 Jun 2012 05:38:04 +0000 (05:38 +0000)]
[chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry
https://bugs.webkit.org/show_bug.cgi?id=87969

Reviewed by Tony Chang.

Source/WebCore:

Per discussion on whatwg we should make webkitGetAsEntry synchronous.
http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Apr/0079.html

Tests: editing/pasteboard/data-transfer-items-drag-drop-entry.html
       fast/filesystem/cross-filesystem-op.html

* Modules/filesystem/DataTransferItemFileSystem.h:
(DataTransferItemFileSystem):
* Modules/filesystem/DataTransferItemFileSystem.idl:
* Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:
(WebCore::DataTransferItemFileSystem::webkitGetAsEntry): Changed it to synchronously return entry.

LayoutTests:

* editing/pasteboard/data-transfer-items-drag-drop-entry-expected.txt:
* editing/pasteboard/data-transfer-items-drag-drop-entry.html:
* fast/filesystem/cross-filesystem-op.html:
* platform/chromium/test_expectations.txt:

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

9 years agoUnreviewed fix of chromium TestExpectations
shawnsingh@chromium.org [Mon, 4 Jun 2012 05:24:33 +0000 (05:24 +0000)]
Unreviewed fix of chromium TestExpectations

Some extra junk got added by accident when I tried to change
TestExpectations. This patch removes it.

* platform/chromium/TestExpectations:

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

9 years agoUnreviewed rebasline for transforms/3d test cases.
shawnsingh@chromium.org [Mon, 4 Jun 2012 05:10:11 +0000 (05:10 +0000)]
Unreviewed rebasline for transforms/3d test cases.

9 tests re-baselined.
The remainin 6 tests are explicitly enumerated in the TestExpectations file now.

* platform/chromium-linux/transforms/3d/general/perspective-units-expected.png: Added.
* platform/chromium-linux/transforms/3d/hit-testing/backface-hit-test-expected.png: Added.
* platform/chromium-linux/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.png: Added.
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-expected.png: Added.
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png: Added.
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.png: Added.
* platform/chromium-linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png: Added.
* platform/chromium-mac-leopard/transforms/3d/general/perspective-units-expected.png:
* platform/chromium-mac-leopard/transforms/3d/hit-testing/backface-hit-test-expected.png: Added.
* platform/chromium-mac-leopard/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.png: Added.
* platform/chromium-mac-leopard/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/chromium-mac-leopard/transforms/3d/point-mapping/3d-point-mapping-expected.png:
* platform/chromium-mac-leopard/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png:
* platform/chromium-mac-leopard/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.png:
* platform/chromium-mac-leopard/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/general/perspective-units-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/hit-testing/backface-hit-test-expected.png: Added.
* platform/chromium-mac-snowleopard/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.png: Added.
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png:
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.png: Added.
* platform/chromium-mac-snowleopard/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png:
* platform/chromium-mac/transforms/3d/general/matrix-with-zoom-3d-expected.png: Added.
* platform/chromium-mac/transforms/3d/general/perspective-units-expected.png: Added.
* platform/chromium-mac/transforms/3d/hit-testing/backface-hit-test-expected.png: Added.
* platform/chromium-mac/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.png: Added.
* platform/chromium-mac/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/chromium-mac/transforms/3d/point-mapping/3d-point-mapping-expected.png: Added.
* platform/chromium-mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png: Added.
* platform/chromium-mac/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.png: Added.
* platform/chromium-mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png: Added.
* platform/chromium-win/transforms/3d/general/matrix-with-zoom-3d-expected.png: Added.
* platform/chromium-win/transforms/3d/general/perspective-units-expected.png: Added.
* platform/chromium-win/transforms/3d/general/perspective-units-expected.txt: Added.
* platform/chromium-win/transforms/3d/hit-testing/backface-hit-test-expected.png: Added.
* platform/chromium-win/transforms/3d/hit-testing/backface-hit-test-expected.txt: Added.
* platform/chromium-win/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.png: Added.
* platform/chromium-win/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.txt: Added.
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-3-expected.txt: Added.
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-expected.png:
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-expected.txt:
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png:
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-origins-expected.txt:
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.png: Added.
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.txt: Added.
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png:
* platform/chromium-win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.txt:
* platform/chromium/TestExpectations:

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

9 years ago[perf-test] Add a benchmark of querySelector() for an element that appears in the...
haraken@chromium.org [Mon, 4 Jun 2012 03:14:20 +0000 (03:14 +0000)]
[perf-test] Add a benchmark of querySelector() for an element that appears in the depths in the document
https://bugs.webkit.org/show_bug.cgi?id=88202

Reviewed by Ryosuke Niwa.

query-selector-first.html tests querySelector() for an element
that appears at the head of the document. query-selector-last.html
tests querySelector() for an element that appears at the tail of
the document. In addition, we want a benchmark of querySelector()
for an element that appears in the depths in the document.

Test results in my Linux desktop:

RESULT Parser: query-selector-deep= 460.776980611 runs/s
median= 460.947503201 runs/s, stdev= 1.72274941942 runs/s, min= 455.696202532 runs/s, max= 463.32046332 runs/s

RESULT Parser: query-selector-deep= 458.925050915 runs/s
median= 459.183673469 runs/s, stdev= 1.47930124139 runs/s, min= 454.545454545 runs/s, max= 460.947503201 runs/s

RESULT Parser: query-selector-deep= 461.866981491 runs/s
median= 461.538461538 runs/s, stdev= 1.14613123359 runs/s, min= 459.183673469 runs/s, max= 463.917525773 runs/s

RESULT Parser: query-selector-deep= 453.922010788 runs/s
median= 454.258855898 runs/s, stdev= 1.77279123317 runs/s, min= 447.204968944 runs/s, max= 455.696202532 runs/s

RESULT Parser: query-selector-deep= 454.666321221 runs/s
median= 454.545454545 runs/s, stdev= 1.65775667417 runs/s, min= 451.127819549 runs/s, max= 456.852791878 runs/s

* Parser/query-selector-deep.html: Added.

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

9 years agoEventTarget.idl should generate JS bindings
dominicc@chromium.org [Mon, 4 Jun 2012 03:06:19 +0000 (03:06 +0000)]
EventTarget.idl should generate JS bindings
https://bugs.webkit.org/show_bug.cgi?id=88120

This is one step in a larger change to expose a constructor for
EventTarget and put EventTarget on the prototype chain of DOM
objects that are event targets, in line with DOM Core. See
<https://bugs.webkit.org/show_bug.cgi?id=67312>

Reviewed by Adam Barth.

No new tests. This change does not change any functionality.

* CMakeLists.txt: Generate JSEventTarget.
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp: JSEventTarget.cpp was renamed.
* bindings/js/JSEventTarget.h: Removed. Generated now.
* bindings/js/JSEventTargetCustom.cpp: Renamed from Source/WebCore/bindings/js/JSEventTarget.cpp.
* bindings/scripts/CodeGeneratorV8.pm:
(GetInternalFields): EventTarget is an EventTarget.
* dom/EventTarget.idl: Defer to toJS, toEventTarget in JSEventTargetCustom.cpp.

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

9 years ago[perf-test] Make query-selector-last.html more realistic
haraken@chromium.org [Mon, 4 Jun 2012 02:24:49 +0000 (02:24 +0000)]
[perf-test] Make query-selector-last.html more realistic
https://bugs.webkit.org/show_bug.cgi?id=88203

Reviewed by Ryosuke Niwa.

query-selector-last.html tests querySelector() for an element
that appears after 1000 div elements, all of which have the same
id and class. To test the performance of querySelector() under
a lot of ids and classes, we should make the ids and classes of
the 1000 elements different.

This patch degrades the performance of query-selector-last.html
by 3.6%.

[Before]
RESULT Parser: query-selector-last= 476.382274152 runs/s
median= 476.821192053 runs/s, stdev= 1.14578875814 runs/s, min= 474.308300395 runs/s, max= 478.087649402 runs/s

RESULT Parser: query-selector-last= 478.423061861 runs/s
median= 478.723404255 runs/s, stdev= 1.54876867255 runs/s, min= 473.684210526 runs/s, max= 481.347773767 runs/s

RESULT Parser: query-selector-last= 479.849287174 runs/s
median= 480.0 runs/s, stdev= 1.69849752498 runs/s, min= 475.561426684 runs/s, max= 481.927710843 runs/s

RESULT Parser: query-selector-last= 476.765438846 runs/s
median= 477.453580902 runs/s, stdev= 1.8724488664 runs/s, min= 471.821756225 runs/s, max= 478.723404255 runs/s

RESULT Parser: query-selector-last= 481.715340644 runs/s
median= 481.637742305 runs/s, stdev= 1.81446361145 runs/s, min= 475.561426684 runs/s, max= 483.675937122 runs/s

[After]
RESULT Parser: query-selector-last= 458.866623582 runs/s
median= 459.183673469 runs/s, stdev= 1.48881464737 runs/s, min= 453.972257251 runs/s, max= 460.947503201 runs/s

RESULT Parser: query-selector-last= 460.363532897 runs/s
median= 460.358056266 runs/s, stdev= 1.58512056995 runs/s, min= 456.273764259 runs/s, max= 462.130937099 runs/s

RESULT Parser: query-selector-last= 457.727448451 runs/s
median= 458.015267176 runs/s, stdev= 1.23681915516 runs/s, min= 453.972257251 runs/s, max= 459.183673469 runs/s

RESULT Parser: query-selector-last= 465.57336853 runs/s
median= 465.717981889 runs/s, stdev= 1.6616925374 runs/s, min= 460.947503201 runs/s, max= 467.532467532 runs/s

RESULT Parser: query-selector-last= 459.836252019 runs/s
median= 459.770114943 runs/s, stdev= 1.84485630505 runs/s, min= 455.696202532 runs/s, max= 462.724935733 runs/s

* Parser/query-selector-last.html:

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

9 years agoSupports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWa...
hayato@chromium.org [Sun, 3 Jun 2012 22:35:42 +0000 (22:35 +0000)]
Supports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWalker.
https://bugs.webkit.org/show_bug.cgi?id=87924

Reviewed by Dimitri Glazkov.

Source/WebCore:

Some events, such as a 'click' event, can be dispatched on nodes in an orphaned shadow subtree.
When resolving a parent node of a shadow root which is not assigned to any shadow insertion point,
we have to return its shadow host as a parent node.

The related shadow DOM spec section is:
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events

Test: fast/dom/shadow/shadow-dom-event-dispatching.html

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):

LayoutTests:

* fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:
* fast/dom/shadow/shadow-dom-event-dispatching.html:

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

9 years agoWeak pointer finalization should be lazy
ggaren@apple.com [Sun, 3 Jun 2012 21:16:55 +0000 (21:16 +0000)]
Weak pointer finalization should be lazy
https://bugs.webkit.org/show_bug.cgi?id=87599

Reviewed by Sam Weinig.

This time for sure!

* heap/Heap.cpp:
(JSC::Heap::collect): Don't sweep eagerly -- we'll sweep lazily instead.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::sweep): Sweep our weak set before we sweep our other
destructors -- this is our last chance to run weak set finalizers before
we recycle our memory.

* heap/MarkedBlock.h:
(JSC::MarkedBlock::resetAllocator):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::resetAllocators):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::resetAllocators): Don't force allocator reset anymore.
It will happen automatically when a weak set is swept. It's simpler to
have only one canonical way for this to happen, and it wasn't buying
us anything to do it eagerly.

* heap/WeakBlock.cpp:
(JSC::WeakBlock::sweep): Don't short-circuit a sweep unless we know
the sweep would be a no-op. If even one finalizer is pending, we need to
run it, since we won't get another chance.

* heap/WeakSet.cpp:
(JSC::WeakSet::sweep): This loop can be simpler now that
WeakBlock::sweep() does what we mean.

Reset our allocator after a sweep because this is the optimal time to
start trying to recycle old weak pointers.

(JSC::WeakSet::tryFindAllocator): Don't sweep when searching for an
allocator because we've swept already, and forcing a new sweep would be
wasteful.

* heap/WeakSet.h:
(JSC::WeakSet::shrink): Be sure to reset our allocator after a shrink
because the shrink may have removed the block the allocator was going to
allocate out of.

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

9 years ago[EFL] http/tests/media/video-buffered.html is failing after r119268 and need to be...
commit-queue@webkit.org [Sun, 3 Jun 2012 19:13:59 +0000 (19:13 +0000)]
[EFL] http/tests/media/video-buffered.html is failing after r119268 and need to be skipped
https://bugs.webkit.org/show_bug.cgi?id=88194

Unreviewed EFL gardening. Skipping http/tests/media/video-buffered.html
which is failing after r119268.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-03

* platform/efl/TestExpectations:

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

9 years ago[EFL] legacy-viewport tests added in r119256 need to be skipped
commit-queue@webkit.org [Sun, 3 Jun 2012 18:49:46 +0000 (18:49 +0000)]
[EFL] legacy-viewport tests added in r119256 need to be skipped
https://bugs.webkit.org/show_bug.cgi?id=88192

Unreviewed EFL gardening. Skip new tests added in r119256 since the
LEGACY_VIEWPORT_ADAPTION flag is disabled on EFL port.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-03

* platform/efl/Skipped:
* platform/efl/TestExpectations:

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

9 years ago[EFL] New tests need a baseline
commit-queue@webkit.org [Sun, 3 Jun 2012 18:30:13 +0000 (18:30 +0000)]
[EFL] New tests need a baseline
https://bugs.webkit.org/show_bug.cgi?id=88190

Unreviewed EFL gardening. Add EFL baseline for new test cases.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-03

* platform/efl/fast/reflections/reflection-with-zoom-expected.png: Added.
* platform/efl/fast/reflections/reflection-with-zoom-expected.txt: Added.
* platform/efl/svg/repaint/text-mask-update-expected.png: Added.
* platform/efl/svg/repaint/text-mask-update-expected.txt: Added.

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

9 years agoUnreviewed, rolling out r119359.
commit-queue@webkit.org [Sun, 3 Jun 2012 15:51:08 +0000 (15:51 +0000)]
Unreviewed, rolling out r119359.
http://trac.webkit.org/changeset/119359
https://bugs.webkit.org/show_bug.cgi?id=88189

This broke platform/mac/fast/dom/wrapper-classes-objc.html.
(Requested by dominicc on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-03

Source/WebCore:

* bindings/objc/PublicDOMInterfaces.h:
* bindings/scripts/CodeGeneratorObjC.pm:
(GetBaseClass):
* dom/MouseEvent.h:
(MouseEvent):
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
* dom/WheelEvent.h:
(WheelEvent):
* dom/WheelEvent.idl:

LayoutTests:

* fast/events/event-creation-expected.txt:
* fast/events/event-creation.html:

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