WebKit-https.git
9 years agocheck-webkit-style of the chromium test_expectations.txt file doesn't test all chromi...
ojan@chromium.org [Thu, 19 Jan 2012 23:01:24 +0000 (23:01 +0000)]
check-webkit-style of the chromium test_expectations.txt file doesn't test all chromium ports
https://bugs.webkit.org/show_bug.cgi?id=76510

Reviewed by Adam Barth.

Unlike other style rules, if you get the syntax of the test_expectations.txt
file wrong, the layout tests won't run. Also, this check is simple and only
slows down committing if you actually modify one of the test_expectations.txt files.

* Scripts/webkitpy/style/checkers/test_expectations.py:
(TestExpectationsChecker.check_test_expectations):
(TestExpectationsChecker.check):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_check_covers_all_configurations):
(TestExpectationsTestCase.test_check_covers_all_configurations.mock_check_test_expectations):
(TestExpectationsTestCase):
(assert_lines_lint):

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

9 years agoAdd text-overflow support that allows placeholder and value text to show an ellipsis...
jonlee@apple.com [Thu, 19 Jan 2012 22:56:14 +0000 (22:56 +0000)]
Add text-overflow support that allows placeholder and value text to show an ellipsis when not focused
https://bugs.webkit.org/show_bug.cgi?id=76118
<rdar://problem/9271742>

Reviewed by Dan Bernstein.

Source/WebCore:

Tests: fast/css/text-overflow-input-focus-placeholder-expected.html
       fast/css/text-overflow-input-focus-placeholder.html
       fast/css/text-overflow-input-focus-value-expected.html
       fast/css/text-overflow-input-focus-value.html
       fast/css/text-overflow-input.html

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange): When the style of the text control
changes, we update the text overflow property of the placeholder.
(WebCore::RenderTextControlSingleLine::createInnerTextStyle): When the style of the text control
changes, we update the text overflow property of the inner text block.
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated): The text of the value and placeholder should
only contain the ellipsis if the input's text-overflow property is set to ellipsis, and the input is not focused.
* rendering/RenderTextControlSingleLine.h:

LayoutTests:

* fast/css/text-overflow-input-focus-placeholder-expected.html: Added.
* fast/css/text-overflow-input-focus-placeholder.html: Added.
* fast/css/text-overflow-input-focus-value-expected.html: Added.
* fast/css/text-overflow-input-focus-value.html: Added.
* fast/css/text-overflow-input.html: Added.

New baselines:
* platform/mac/fast/css/text-overflow-input-expected.png: Added.
* platform/mac/fast/css/text-overflow-input-expected.txt: Added.

Needs baselines:
* platform/chromium/test_expectations.txt:
* platform/gtk/test_expectations.txt:
* platform/qt/test_expectations.txt:
* platform/win/test_expectations.txt:

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

9 years agoBuild fix. Revert an unintentional change to WebKitDriver in r105443.
rniwa@webkit.org [Thu, 19 Jan 2012 22:50:10 +0000 (22:50 +0000)]
Build fix. Revert an unintentional change to WebKitDriver in r105443.

* Scripts/webkitpy/layout_tests/port/driver.py:
(DriverProxy.__init__):

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

9 years agoremove the duplicated build rules from WebKit.gyp, Tools.gyp
dpranke@chromium.org [Thu, 19 Jan 2012 22:46:05 +0000 (22:46 +0000)]
remove the duplicated build rules from WebKit.gyp, Tools.gyp
https://bugs.webkit.org/show_bug.cgi?id=73384

Reviewed by Tony Chang.

Source/WebKit/chromium:

This patch removes the no-longer-necessary conditional logic for
build_webkit_exes_from_webkit_gyp; we now always build the exes
from their own dedicated gyp files.
* WebKit.gyp:
* WebKitUnitTests.gyp:
* gyp_webkit:

Tools:

This patch removes the no-longer-necessary conditional logic for
build_webkit_exes_from_webkit_gyp; we now always build the exes
from their own dedicated gyp files.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

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

9 years agoAdd a V8-specific baseline for fast/regex/syntax-errors.html.
abarth@webkit.org [Thu, 19 Jan 2012 22:36:03 +0000 (22:36 +0000)]
Add a V8-specific baseline for fast/regex/syntax-errors.html.

* platform/chromium/fast/regex/syntax-errors-expected.txt: Added.

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

9 years agoThis test can also timeout.
abarth@webkit.org [Thu, 19 Jan 2012 22:07:23 +0000 (22:07 +0000)]
This test can also timeout.

* platform/chromium/test_expectations.txt:

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

9 years agomake-new-script-test should work with HTTP tests
ap@apple.com [Thu, 19 Jan 2012 22:04:55 +0000 (22:04 +0000)]
make-new-script-test should work with HTTP tests
https://bugs.webkit.org/show_bug.cgi?id=76603

Reviewed by Adam Roben.

* Scripts/make-new-script-test:
(makePathToSharedSources): Renamed from makeTestRelativePathToSharedSources(), since it
now also creates absolute paths for HTTP.

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

9 years agoImplicit creation of a regular expression should eagerly check for syntax errors
ggaren@apple.com [Thu, 19 Jan 2012 21:57:11 +0000 (21:57 +0000)]
Implicit creation of a regular expression should eagerly check for syntax errors
https://bugs.webkit.org/show_bug.cgi?id=76642

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

This is a correctness fix and a slight optimization.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncMatch):
(JSC::stringProtoFuncSearch): Check for syntax errors because that's the
correct behavior.

* runtime/RegExp.cpp:
(JSC::RegExp::match): ASSERT that we aren't a syntax error. (One line
of code change, many lines of indentation change.)

Since we have no clients that try to match a RegExp that is a syntax error,
let's optimize out the check.

LayoutTests:

Reviewed by Oliver Hunt.

* fast/js/code-serialize-paren-expected.txt:
* fast/js/script-tests/code-serialize-paren.js: This test was secretly
broken due to a regexp syntax error. Now fixed.

* fast/regex/syntax-errors-expected.txt: Added.
* fast/regex/syntax-errors.html: Added.

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

9 years agoSome perf tests time out when ran by run-perf-tests
rniwa@webkit.org [Thu, 19 Jan 2012 21:50:52 +0000 (21:50 +0000)]
Some perf tests time out when ran by run-perf-tests
https://bugs.webkit.org/show_bug.cgi?id=76612

Reviewed by Dirk Pranke and Eric Seidel.

PerformanceTests:

Replace all images in html5.html by geenbox.png to avoid accessing whatwg.org when
running the parser tests. Also call dumpAsText, waitUntilDone, and notifyDone automatically
inside runner.js to avoid having to call them in individual tests.

* Bindings/event-target-wrapper.html: Removed calls to layoutTestController methods since
they are now called by runner.js automatically.
* Parser/resources/greenbox.png: Copied from LayoutTests/fast/css/resources/greenbox.png.
* Parser/resources/html5.html:
* Parser/resources/runner.js:
(runLoop):

Tools:

Always pass --no-timeout to DumpRenderTree from run-perf-tests.
Otherwise some tests such as Parser/xml-parser.html will timeout.

--no-timeout option is currently supported by Chromium and Mac ports.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.to.create_driver):
* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumDriver.__init__):
(ChromiumDriver._wrapper_options):
* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver.__init__):
(DriverProxy.__init__):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver.__init__):
(WebKitDriver.cmd_line):
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
(WebKitDriverTest.test_read_binary_block):
(WebKitDriverTest):
(WebKitDriverTest.test_no_timeout):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(get_tests_run.RecordingTestDriver.__init__):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args):
(PerfTestsRunner._run_tests_set):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(create_runner):

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

9 years agoImplement a new allocator for backing stores
mhahnenberg@apple.com [Thu, 19 Jan 2012 21:49:56 +0000 (21:49 +0000)]
Implement a new allocator for backing stores
https://bugs.webkit.org/show_bug.cgi?id=75181

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

We want to move away from using fastMalloc for the backing stores for
some of our objects (e.g. JSArray, JSObject, JSString, etc).  These backing
stores have a nice property in that they only have a single owner (i.e. a
single pointer to them at any one time).  One way that we can take advantage
of this property is to implement a simple bump allocator/copying collector,
which will run alongside our normal mark/sweep collector, that only needs to
update the single owner pointer rather than having to redirect an arbitrary
number of pointers in from-space to to-space.

This plan can give us a number of benefits. We can beat fastMalloc in terms
of both performance and memory usage, we can track how much memory we're using
far more accurately than our rough estimation now through the use of
reportExtraMemoryCost, and we can allocate arbitrary size objects (as opposed
to being limited to size classes like we have been historically). This is also
another step toward moving away from lazy destruction, which will improve our memory footprint.

We start by creating said allocator and moving the ArrayStorage for JSArray
to use it rather than fastMalloc.

The design of the collector is as follows:
Allocation:
-The collector allocates 64KB chunks from the OS to use for object allocation.
-Each chunk contains an offset, a flag indicating if the block has been pinned,
 and a payload, along with next and prev pointers so that they can be put in DoublyLinkedLists.
-Any allocation greater than 64KB gets its own separate oversize block, which
 is managed separately from the rest.
-If the allocator receives a request for more than the remaining amount in the
 current block, it grabs a fresh block.
-Grabbing a fresh block means grabbing one off of the global free list (which is now
 shared between the mark/sweep allocator and the bump allocator) if there is one.
 If there isn't a new one we do one of two things: allocate a new block from the OS
 if we're not ready for a GC yet, or run a GC and then try again. If we still don't
 have enough space after the GC, we allocate a new block from the OS.

Garbage collection:
-At the start of garbage collection during conservative stack scanning, if we encounter
 what appears to be a pointer to a bump-allocated block of memory, we pin that block so
 that it will not be copied for this round of collection.
-We also pin any oversize blocks that we encounter, which effectively doubles as a
 "mark bit" for that block. Any oversize blocks that aren't pinned at the end of copying
 are given back to the OS.
-Marking threads are now also responsible for copying bump-allocated objects to newSpace
-Each marking thread has a private 64KB block into which it copies bump-allocated objects that it encounters.
-When that block fills up, the marking thread gives it back to the allocator and requests a new one.
-When all marking has concluded, each thread gives back its copy block, even if it isn't full.
-At the conclusion of copying (which is done by the end of the marking phase), we un-pin
 any pinned blocks and give any blocks left in from-space to the global free list.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* heap/AllocationSpace.cpp:
(JSC::AllocationSpace::allocateSlowCase):
(JSC::AllocationSpace::allocateBlock):
(JSC::AllocationSpace::freeBlocks):
* heap/AllocationSpace.h:
(JSC::AllocationSpace::waterMark):
* heap/BumpBlock.h: Added.
(JSC::BumpBlock::BumpBlock):
* heap/BumpSpace.cpp: Added.
(JSC::BumpSpace::tryAllocateSlowCase):
* heap/BumpSpace.h: Added.
(JSC::BumpSpace::isInCopyPhase):
(JSC::BumpSpace::totalMemoryAllocated):
(JSC::BumpSpace::totalMemoryUtilized):
* heap/BumpSpaceInlineMethods.h: Added.
(JSC::BumpSpace::BumpSpace):
(JSC::BumpSpace::init):
(JSC::BumpSpace::contains):
(JSC::BumpSpace::pin):
(JSC::BumpSpace::startedCopying):
(JSC::BumpSpace::doneCopying):
(JSC::BumpSpace::doneFillingBlock):
(JSC::BumpSpace::recycleBlock):
(JSC::BumpSpace::getFreshBlock):
(JSC::BumpSpace::borrowBlock):
(JSC::BumpSpace::addNewBlock):
(JSC::BumpSpace::allocateNewBlock):
(JSC::BumpSpace::fitsInBlock):
(JSC::BumpSpace::fitsInCurrentBlock):
(JSC::BumpSpace::tryAllocate):
(JSC::BumpSpace::tryAllocateOversize):
(JSC::BumpSpace::allocateFromBlock):
(JSC::BumpSpace::tryReallocate):
(JSC::BumpSpace::tryReallocateOversize):
(JSC::BumpSpace::isOversize):
(JSC::BumpSpace::isPinned):
(JSC::BumpSpace::oversizeBlockFor):
(JSC::BumpSpace::blockFor):
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::add):
* heap/ConservativeRoots.h:
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::blockFreeingThreadMain):
(JSC::Heap::reportExtraMemoryCostSlowCase):
(JSC::Heap::getConservativeRegisterRoots):
(JSC::Heap::markRoots):
(JSC::Heap::collect):
(JSC::Heap::releaseFreeBlocks):
* heap/Heap.h:
(JSC::Heap::waterMark):
(JSC::Heap::highWaterMark):
(JSC::Heap::setHighWaterMark):
(JSC::Heap::tryAllocateStorage):
(JSC::Heap::tryReallocateStorage):
* heap/HeapBlock.h: Added.
(JSC::HeapBlock::HeapBlock):
* heap/MarkStack.cpp:
(JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::startCopying):
(JSC::SlotVisitor::allocateNewSpace):
(JSC::SlotVisitor::copy):
(JSC::SlotVisitor::copyAndAppend):
(JSC::SlotVisitor::doneCopying):
* heap/MarkStack.h:
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::recycle):
(JSC::MarkedBlock::MarkedBlock):
* heap/MarkedBlock.h:
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::forEachBlock):
(JSC::MarkedSpace::SizeClass::resetAllocator):
* heap/SlotVisitor.h:
(JSC::SlotVisitor::SlotVisitor):
* heap/TinyBloomFilter.h:
(JSC::TinyBloomFilter::reset):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
(JSC::JSArray::finishCreation):
(JSC::JSArray::tryFinishCreationUninitialized):
(JSC::JSArray::~JSArray):
(JSC::JSArray::enterSparseMode):
(JSC::JSArray::defineOwnNumericProperty):
(JSC::JSArray::setLengthWritable):
(JSC::JSArray::getOwnPropertySlotByIndex):
(JSC::JSArray::getOwnPropertyDescriptor):
(JSC::JSArray::putByIndexBeyondVectorLength):
(JSC::JSArray::deletePropertyByIndex):
(JSC::JSArray::getOwnPropertyNames):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::unshiftCountSlowCase):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::unshiftCount):
(JSC::JSArray::visitChildren):
(JSC::JSArray::sortNumeric):
(JSC::JSArray::sort):
(JSC::JSArray::compactForSorting):
(JSC::JSArray::subclassData):
(JSC::JSArray::setSubclassData):
(JSC::JSArray::checkConsistency):
* runtime/JSArray.h:
(JSC::JSArray::inSparseMode):
(JSC::JSArray::isLengthWritable):
* wtf/CheckedBoolean.h: Added.
(CheckedBoolean::CheckedBoolean):
(CheckedBoolean::~CheckedBoolean):
(CheckedBoolean::operator bool):
* wtf/DoublyLinkedList.h:
(WTF::::push):
* wtf/StdLibExtras.h:
(WTF::isPointerAligned):

Source/JavaScriptGlue:

Added forwarding header for new CheckedBoolean used in the bump allocator.

* ForwardingHeaders/wtf/CheckedBoolean.h: Added.

Source/WebCore:

No new tests.

Added forwarding header for new CheckedBoolean used in the bump allocator.

* ForwardingHeaders/wtf/CheckedBoolean.h: Added.

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

9 years agoCrash in CompositeEditCommand::ensureComposition
rniwa@webkit.org [Thu, 19 Jan 2012 21:41:08 +0000 (21:41 +0000)]
Crash in CompositeEditCommand::ensureComposition
https://bugs.webkit.org/show_bug.cgi?id=76207

Reviewed by Chang Shu.

Source/WebCore:

The crash was caused by TypingCommand not kept alive when new editing commands are executed
during adding more typings to the open last typing command since m_lastEditCommand is replaced
by the new command. Fixed the bug by keeping them alive a little longer with RefPtr.

Test: editing/execCommand/editing-command-while-executing-typing-command-crash.html

* editing/FrameSelection.cpp:
(WebCore::shouldStopBlinkingDueToTypingCommand):
(WebCore::FrameSelection::updateAppearance):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteSelection):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
(WebCore::TypingCommand::closeTyping):
* editing/TypingCommand.h:

LayoutTests:

Add a regression test.

* editing/execCommand/editing-command-while-executing-typing-command-crash-expected.txt: Added.
* editing/execCommand/editing-command-while-executing-typing-command-crash.html: Added.

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

9 years agoUnreviewed debug build fix.
kling@webkit.org [Thu, 19 Jan 2012 21:16:46 +0000 (21:16 +0000)]
Unreviewed debug build fix.

Remove ASSERT that the cached match is cacheable (we don't store that flag anymore.)

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):

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

9 years agoNeed a WebKit2 API for setting media volume https://bugs.webkit.org/show_bug.cgi...
adachan@apple.com [Thu, 19 Jan 2012 20:55:19 +0000 (20:55 +0000)]
Need a WebKit2 API for setting media volume https://bugs.webkit.org/show_bug.cgi?id=76560

Reviewed by Dan Bernstein.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Encode the mediaVolume parameter.
(WebKit::WebPageCreationParameters::decode): Decode the mediaVolume parameter.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetMediaVolume): Call WebPageProxy::setMediaVolume().
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize new data member m_mediaVolume.
(WebKit::WebPageProxy::setMediaVolume): Bail if the volume hasn't changed. Update m_mediaVolume
and bail if the page is no longer valid.  Otherwise, send a WebPage::SetMediaVolume message to
the web process.
(WebKit::WebPageProxy::creationParameters): Add media volume to the creation parameters.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize media volume from the WebPageCreationParameters.
(WebKit::WebPage::setMediaVolume): Call Page::setMediaVolume().
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add the SetMediaVolume message.

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

9 years agoFix Debug build after r105433
robert@webkit.org [Thu, 19 Jan 2012 20:52:32 +0000 (20:52 +0000)]
Fix Debug build after r105433

Unreviewed, build fix.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::recalcCollapsedBorders):

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

9 years agoAdd support for window.print to chromium DRT
benwells@chromium.org [Thu, 19 Jan 2012 20:47:22 +0000 (20:47 +0000)]
Add support for window.print to chromium DRT
https://bugs.webkit.org/show_bug.cgi?id=76479

When used in a test window.print goes into print mode and then
straight out again. This will allow the afterprint event to be
tested by having the afterprint event happen before the dump
happens.

Reviewed by Mihai Parparita.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::printPage):
* DumpRenderTree/chromium/WebViewHost.h:

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

9 years agoUnreviewed, Roll DEPS to most recent LKGR (118291).
dpranke@chromium.org [Thu, 19 Jan 2012 20:35:35 +0000 (20:35 +0000)]
Unreviewed, Roll DEPS to most recent LKGR (118291).

* DEPS:

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

9 years agoCSSStyleSelector: Factor 'isCacheable' flag out of MatchedResult.
kling@webkit.org [Thu, 19 Jan 2012 20:32:21 +0000 (20:32 +0000)]
CSSStyleSelector: Factor 'isCacheable' flag out of MatchedResult.
<http://webkit.org/b/76376>

Reviewed by Antti Koivisto.

Break up the MatchResult struct into MatchResult and MatchRanges. The matched
declaration cache only needs the ranges, so we save 4 bytes per entry.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchAllRules):
(WebCore::CSSStyleSelector::matchUARules):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
(WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
(WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
(WebCore::CSSStyleSelector::applyMatchedDeclarations):
* css/CSSStyleSelector.h:
(WebCore::CSSStyleSelector::MatchRanges::MatchRanges):
(WebCore::CSSStyleSelector::MatchResult::MatchResult):

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

9 years agohttps://bugs.webkit.org/show_bug.cgi?id=75192
eric.carlson@apple.com [Thu, 19 Jan 2012 20:28:55 +0000 (20:28 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=75192

Reviewed by Darin Adler.

Notify the media element when tracks are added to and removed from a document instead of
a tree because we don't want to trigger loading unless a track element is in the document.

Test: media/track/track-delete-during-setup.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::trackWasRemoved): Renamed from trackWillBeRemoved because it is
    now called after removal.
* html/HTMLMediaElement.h:

* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedIntoDocument): Was insertedIntoTree. Use this instead
    because we care about when a track is inserted and removed from a document, not a tree.
(WebCore::HTMLTrackElement::removedFromDocument): Ditto.
* html/HTMLTrackElement.h:

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

9 years agoHit ASSERTION FAILED: table()->collapseBorders() on techcrunch.com
robert@webkit.org [Thu, 19 Jan 2012 20:27:08 +0000 (20:27 +0000)]
Hit ASSERTION FAILED: table()->collapseBorders() on techcrunch.com
https://bugs.webkit.org/show_bug.cgi?id=76405

Reviewed by Julien Chaffraix.

Source/WebCore:

Tests: fast/css/nested-table-with-collapsed-borders.html

Change recalcCollapsedBorders() so that it only collects border values for the current
table. Calculating the borders for nested tables was wrong as well as wasting cycles, though it would never
have impacted rendering since a cell only paints the borders that match its own.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::recalcCollapsedBorders):

LayoutTests:

* fast/css/nested-table-with-collapsed-borders-expected.html: Added.
* fast/css/nested-table-with-collapsed-borders.html: Added.

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

9 years agoUpdate Debugging on Mac OS X instructions for Safari 5.1/WebKit 2
dbates@webkit.org [Thu, 19 Jan 2012 20:03:45 +0000 (20:03 +0000)]
Update Debugging on Mac OS X instructions for Safari 5.1/WebKit 2
https://bugs.webkit.org/show_bug.cgi?id=67102

Reviewed by Eric Seidel.

Add instructions for debugging UIProcess and WebProcess using Xcode 4.

* building/active-scheme-xcode4.png: Added.
* building/build-settings-tab-xcode4.png: Added.
* building/build-window.png: Removed.
* building/custom-executable-xcode4.png: Added.
* building/custom-executable.png: Removed.
* building/debug-mac-uiprocess.html: Added.
* building/debug.html:
* building/debug.png: Removed.
* building/info-tab.png: Removed.
* building/run-xcode4.png: Added.

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

9 years agoMake WebAudio API const-correct.
jer.noble@apple.com [Thu, 19 Jan 2012 20:01:09 +0000 (20:01 +0000)]
Make WebAudio API const-correct.
https://bugs.webkit.org/show_bug.cgi?id=76573

Reviewed by Daniel Bates.

Source/WebCore:

No new tests; no net change in functionality, so covered by existing tests.

The non-const data() accessor was renamed mutableData() to expose const-correctness
bugs during compile time:
* platform/audio/AudioChannel.h:
(WebCore::AudioChannel::mutableData):

The following functions were made const correct:
* platform/audio/AudioArray.h:
(WebCore::AudioArray::copyToRange):
* platform/audio/AudioBus.h:
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/FFTConvolver.cpp:
(WebCore::FFTConvolver::process):
* platform/audio/FFTConvolver.h:
* platform/audio/FFTFrame.cpp:
(WebCore::FFTFrame::doPaddedFFT):
(WebCore::FFTFrame::doFFT):
* platform/audio/FFTFrame.h:
* platform/audio/ReverbConvolverStage.cpp:
(WebCore::ReverbConvolverStage::ReverbConvolverStage):
(WebCore::ReverbConvolverStage::process):
* platform/audio/ReverbConvolverStage.h:
* platform/audio/ReverbInputBuffer.cpp:
(WebCore::ReverbInputBuffer::write):
* platform/audio/ReverbInputBuffer.h:
* platform/audio/SincResampler.cpp:
(WebCore::SincResampler::process):
* platform/audio/SincResampler.h:
* platform/audio/ZeroPole.cpp:
(WebCore::ZeroPole::process):
* platform/audio/ZeroPole.h:
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::channelByType):
* platform/audio/AudioBus.h:
(WebCore::AudioBus::gain):
* platform/audio/AudioDSPKernelProcessor.cpp:
(WebCore::AudioDSPKernelProcessor::process):
* platform/audio/AudioDSPKernelProcessor.h:
* platform/audio/AudioProcessor.h:
* platform/audio/DynamicsCompressor.cpp:
(WebCore::DynamicsCompressor::process):
* platform/audio/DynamicsCompressor.h:
* platform/audio/DynamicsCompressorKernel.cpp:
(WebCore::DynamicsCompressorKernel::process):
* platform/audio/DynamicsCompressorKernel.h:
* platform/audio/EqualPowerPanner.cpp:
(WebCore::EqualPowerPanner::pan):
* platform/audio/EqualPowerPanner.h:
* platform/audio/HRTFElevation.h:
(WebCore::HRTFElevation::numberOfAzimuths):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::pan):
* platform/audio/HRTFPanner.h:
* platform/audio/Panner.h:
* platform/audio/Reverb.cpp:
(WebCore::Reverb::process):
* platform/audio/Reverb.h:
* platform/audio/ReverbConvolver.cpp:
(WebCore::ReverbConvolver::process):
* platform/audio/ReverbConvolver.h:
* platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
(WebCore::FFTFrame::doFFT):
* platform/audio/mkl/FFTFrameMKL.cpp:
(WebCore::FFTFrame::doFFT):

The following functions were modified to use the renamed mutableData() accessor:
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::processWithGainFromMonoStereo):
(WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
* platform/audio/AudioChannel.cpp:
(WebCore::AudioChannel::scale):
(WebCore::AudioChannel::copyFrom):
(WebCore::AudioChannel::copyFromRange):
(WebCore::AudioChannel::sumFrom):
* platform/audio/AudioDSPKernelProcessor.cpp:
(WebCore::AudioDSPKernelProcessor::process):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::process):
* platform/audio/DynamicsCompressor.cpp:
(WebCore::DynamicsCompressor::process):
* platform/audio/EqualPowerPanner.cpp:
(WebCore::EqualPowerPanner::pan):
* platform/audio/HRTFKernel.cpp:
(WebCore::extractAverageGroupDelay):
(WebCore::HRTFKernel::HRTFKernel):
(WebCore::HRTFKernel::createImpulseResponse):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::pan):
* platform/audio/MultiChannelResampler.cpp:
(WebCore::MultiChannelResampler::process):
* platform/audio/Reverb.cpp:
(WebCore::Reverb::process):
* platform/audio/ReverbConvolver.cpp:
(WebCore::ReverbConvolver::ReverbConvolver):
(WebCore::ReverbConvolver::process):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
* platform/audio/mac/FFTFrameMac.cpp:
(WebCore::FFTFrame::doFFT):
* webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::process):
(WebCore::AudioBufferSourceNode::renderFromBuffer):
* webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::process):
* webaudio/JavaScriptAudioNode.cpp:
(WebCore::JavaScriptAudioNode::process):
* webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::render):
* webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::writeInput):
* webaudio/WaveShaperProcessor.cpp:
(WebCore::WaveShaperProcessor::process):

Source/WebKit/chromium:

The following functions were modified to use the renamed mutableData() accessor:
* src/AudioDestinationChromium.cpp:
(WebCore::AudioDestinationChromium::FIFO::fillBuffer):
(WebCore::AudioDestinationChromium::FIFO::consume):
* src/WebAudioData.cpp:
(WebCore::WebAudioBus::channelData):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::AudioSourceProviderImpl::provideInput):

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

9 years agoUnreviewed, inspector closure compilation fix.
vsevik@chromium.org [Thu, 19 Jan 2012 19:15:58 +0000 (19:15 +0000)]
Unreviewed, inspector closure compilation fix.

* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/TabbedEditorContainer.js:

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

9 years agohttps://bugs.webkit.org/show_bug.cgi?id=76644
hyatt@apple.com [Thu, 19 Jan 2012 19:13:47 +0000 (19:13 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=76644

Before landing support for centering, fix the keyword value to match the latest draft.
The new keyword is "contain" instead of "bounds."

Revised the existing parsing tests to reflect the updated value.

Reviewed by Dan Bernstein.

Source/WebCore:

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator LineGridSnap):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyleConstants.h:

LayoutTests:

* fast/line-grid/line-grid-snap-parsing-expected.txt:
* fast/line-grid/script-tests/line-grid-snap-parsing.js:

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

9 years agoEnable use of precompiled headers in Chromium port on Windows.
tony@chromium.org [Thu, 19 Jan 2012 19:00:36 +0000 (19:00 +0000)]
Enable use of precompiled headers in Chromium port on Windows.

Bug 76381 - Use precompiled headers in Chromium port on Windows
https://bugs.webkit.org/show_bug.cgi?id=76381

Patch by Joi Sigurdsson <joi@chromium.org> on 2012-01-19
Reviewed by Tony Chang.

Source/JavaScriptCore:

* JavaScriptCore.gyp/JavaScriptCore.gyp: Include WinPrecompile.gypi.

Source/Platform:

* Platform.gyp/Platform.gyp: Include WinPrecompile.gypi.

Source/WebCore:

No new tests needed; if the change builds and existing tests pass
that should provide enough coverage.

* WebCore.gyp/WebCore.gyp: Include WinPrecompile.gypi.

Source/WebKit/chromium:

* WebKit.gyp: Include WinPrecompile.gypi.
* WinPrecompile.cpp: Added.
* WinPrecompile.gypi: Added.
* WinPrecompile.h: Added.

Source/WTF:

* WTF.gyp/WTF.gyp: Include WinPrecompile.gypi.

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

9 years agoWeb Inspector: Switching tabs in TabbedEditorContainer should reveal selected script...
vsevik@chromium.org [Thu, 19 Jan 2012 18:57:00 +0000 (18:57 +0000)]
Web Inspector: Switching tabs in TabbedEditorContainer should reveal selected script in navigator.
https://bugs.webkit.org/show_bug.cgi?id=76636

Reviewed by Pavel Feldman.

Renamed FileSelector's ScriptSelected event into FileSelected, added EditorSelected
event to EditorContainer.
Renamed _showSourceFrame into _showFile.
Made _uiSourceCodeRemoved reuse _removeSourceFrame.

* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator.prototype.scriptSelected):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
(WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector):
(WebInspector.ScriptsPanel.prototype._editorSelected):
(WebInspector.ScriptsPanel.prototype._fileSelected):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer):
(WebInspector.TabbedEditorContainer.prototype._tabSelected):

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

9 years ago[CSSRegions]Add support for background-color in region styling
mihnea@adobe.com [Thu, 19 Jan 2012 18:55:20 +0000 (18:55 +0000)]
[CSSRegions]Add support for background-color in region styling
https://bugs.webkit.org/show_bug.cgi?id=71488

Reviewed by David Hyatt.

Source/WebCore:

This patch enables region styling again. The region styling tests were also added back.
With the improvements from https://bugs.webkit.org/show_bug.cgi?id=76265, hopefully we will not see the same 3% regressions
in performance.

* rendering/RenderObject.h:
(WebCore::RenderObject::style):

LayoutTests:

Add back the region styling tests.

* platform/mac-snowleopard/Skipped:

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

9 years agoCrash at WebCore::MediaControlRootElement::makeOpaque + 97
jer.noble@apple.com [Thu, 19 Jan 2012 18:53:11 +0000 (18:53 +0000)]
Crash at WebCore::MediaControlRootElement::makeOpaque + 97
https://bugs.webkit.org/show_bug.cgi?id=76391

Reviewed by John Sullivan.

No new tests; Speculative fix for crash.

Crash report data suggests this crash is occurring as the document is being
closed.  Check the nullity of document()->page() before deref-ing.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::makeOpaque):

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

9 years agoRubber-stamped by Martin Robinson.
kov@webkit.org [Thu, 19 Jan 2012 18:36:09 +0000 (18:36 +0000)]
Rubber-stamped by Martin Robinson.

* Source/autotools/symbols.filter: try to fix the 32 bits release
bot by also adding the symbol it generates

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

9 years agoLayout Test fast/text/international/spaces-combined-in-vertical-text.html is failing
commit-queue@webkit.org [Thu, 19 Jan 2012 18:05:33 +0000 (18:05 +0000)]
Layout Test fast/text/international/spaces-combined-in-vertical-text.html is failing
https://bugs.webkit.org/show_bug.cgi?id=75787

Patch by Ken Buchanan <kenrb@chromium.org> on 2012-01-19
Reviewed by Simon Fraser.

This is a tweak to my patch in r104322. On some platforms
RenderCombineText::combineText() can abort early during inline
iteration, causing this loop in skipLeadingWhitespace to spin,
hence the layout test timeouts. This patch accounts for that
condition and makes the loop iteration more robust.

No new test because this is fixing a failure on an existing test.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):

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

9 years agoHRTFPanner not rendering correctly on mac port
jer.noble@apple.com [Thu, 19 Jan 2012 17:52:38 +0000 (17:52 +0000)]
HRTFPanner not rendering correctly on mac port
https://bugs.webkit.org/show_bug.cgi?id=76397

Reviewed by Eric Carlson.

No new tests; HRTF results are currently not testable.

Re-generate the Composite.wav file from its constituent azimuth & elevation files.

* platform/audio/resources/Composite.wav:

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

9 years agohttps://bugs.webkit.org/show_bug.cgi?id=76577
hyatt@apple.com [Thu, 19 Jan 2012 17:45:03 +0000 (17:45 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=76577

Fix crash when nested line grids are used. Make sure to bail out if no line grid
is found rather than crashing.

Reviewed by Dan Bernstein.

Source/WebCore:

Added fast/line-grid/line-grid-nested.html.

* rendering/LayoutState.cpp:
(WebCore::LayoutState::establishLineGrid):

LayoutTests:

* fast/line-grid/line-grid-nested-expected.txt: Added.
* fast/line-grid/line-grid-nested.html: Added.

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

9 years ago[GTK] WebKit2 GTK+ API public headers are not installed
carlosgc@webkit.org [Thu, 19 Jan 2012 17:40:25 +0000 (17:40 +0000)]
[GTK] WebKit2 GTK+ API public headers are not installed
https://bugs.webkit.org/show_bug.cgi?id=76626

Reviewed by Martin Robinson.

* GNUmakefile.am: Rename webkit2gtk_headers as
libwebkit2gtkinclude_HEADERS to match libwebkit2gtkincludedir so
that headers are installed during make install.

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

9 years ago[Chromium] A Skia roll will break some tests - marking as expected
commit-queue@webkit.org [Thu, 19 Jan 2012 17:34:55 +0000 (17:34 +0000)]
[Chromium] A Skia roll will break some tests - marking as expected
https://bugs.webkit.org/show_bug.cgi?id=76638

Unreviewed test_expectations update.

Patch by Stephen Chenney <schenney@chromium.org> on 2012-01-19

* platform/chromium/test_expectations.txt:

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

9 years ago[GTK] Add print-backgrounds setting to WebKit2 GTK+ API
carlosgc@webkit.org [Thu, 19 Jan 2012 17:30:54 +0000 (17:30 +0000)]
[GTK] Add print-backgrounds setting to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=76616

Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_print_backgrounds):
(webkit_settings_set_print_backgrounds):
* UIProcess/API/gtk/WebKitSettings.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
(testWebKitSettings):

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

9 years agoeditingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderlineStyle...
enrica@apple.com [Thu, 19 Jan 2012 16:55:15 +0000 (16:55 +0000)]
editingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderlineStyleAttributeName.
https://bugs.webkit.org/show_bug.cgi?id=76588
<rdar://problem/9325183>

Source/WebCore:

Reviewed by Dan Bernstein.

Added TestWebKitAPI test.

* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):

Tools:

Added test.

Reviewed by Dan Bernstein.

* TestWebKitAPI/Tests/mac/InspectorBar.mm:
(TestWebKitAPI::TEST):

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

9 years agoWeb Inspector: Implement screen resolution emulation backend
apavlov@chromium.org [Thu, 19 Jan 2012 16:39:55 +0000 (16:39 +0000)]
Web Inspector: Implement screen resolution emulation backend
https://bugs.webkit.org/show_bug.cgi?id=76532

Reviewed by Pavel Feldman.

Source/WebCore:

The emulation affects [min-|max-]device-(width|height) media queries, window.screen.(width|height),
and window.inner(Width|Height).

Test: inspector/styles/override-screen-size.html

* css/MediaQueryEvaluator.cpp:
(WebCore::device_heightMediaFeatureEval): Apply device-height override if necessary.
(WebCore::device_widthMediaFeatureEval): Apply device-width override if necessary.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
(WebCore::InspectorCSSAgent::startSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
(WebCore::InspectorCSSAgent::willMatchRule):
(WebCore::InspectorCSSAgent::didMatchRule):
(WebCore::InspectorCSSAgent::willProcessRule):
(WebCore::InspectorCSSAgent::didProcessRule):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::applyScreenWidthOverrideImpl):
(WebCore::InspectorInstrumentation::applyScreenHeightOverrideImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::applyScreenWidthOverride):
(WebCore::InspectorInstrumentation::applyScreenHeightOverride):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::restore):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::setScreenSizeOverride):
(WebCore::InspectorPageAgent::applyScreenWidthOverride):
(WebCore::InspectorPageAgent::applyScreenHeightOverride):
(WebCore::InspectorPageAgent::updateFrameViewFixedLayout):
(WebCore::InspectorPageAgent::clearFrameViewFixedLayout):
(WebCore::InspectorPageAgent::setFrameViewFixedLayout):
* inspector/InspectorPageAgent.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::innerHeight): Apply height override if necessary.
(WebCore::DOMWindow::innerWidth): Apply width override if necessary.
* page/Screen.cpp:
(WebCore::Screen::height): Apply height override if necessary.
(WebCore::Screen::width): Apply width override if necessary.

LayoutTests:

* inspector/styles/override-screen-size-expected.txt: Added.
* inspector/styles/override-screen-size.html: Added.

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

9 years agoUnreviewed, GTK test_expectations update for a new failing test.
philn@webkit.org [Thu, 19 Jan 2012 16:36:55 +0000 (16:36 +0000)]
Unreviewed, GTK test_expectations update for a new failing test.

* platform/gtk/test_expectations.txt:

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

9 years ago[Qt] Handle the layers visible rect calculation on the web process.
jocelyn.turcotte@nokia.com [Thu, 19 Jan 2012 15:37:53 +0000 (15:37 +0000)]
[Qt] Handle the layers visible rect calculation on the web process.
https://bugs.webkit.org/show_bug.cgi?id=74720

Reviewed by Noam Rosenthal.

Source/WebCore:

Remove all visible rect calculation related code from TextureMapperNode.

* platform/graphics/texmap/TextureMapperNode.cpp:
* platform/graphics/texmap/TextureMapperNode.h:

Source/WebKit2:

The layers now get their visible rect on the web process through the
root layer when the UI process call setVisibleContentRectAndScale,
previously only used for the non-composited content layer.
The rect is then carried down the layers in the tree which apply it the inverse
of their transform before handing it to their tiled backing store.

This ensures that new layers get a proper visible rect right on creation,
and also that simultaneous visible rect and scale changes are applied synchronously.

This patch also uses clampedBoundsOfProjectedQuad instead of mapRect
to transform the visible rect correctly for 3D transformed layers.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::updateDesktopViewportSize):
(QQuickWebViewPrivate::updateTouchViewportSize):
(QQuickWebView::geometryChanged):
Make sure that the visible rect is updated for the desktop view as well.
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/LayerTreeHostProxy.h:
* UIProcess/qt/LayerTreeHostProxyQt.cpp:
(WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
* WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
(WebCore::WebGraphicsLayer::setChildren):
(WebCore::WebGraphicsLayer::addChild):
(WebCore::WebGraphicsLayer::addChildAtIndex):
(WebCore::WebGraphicsLayer::addChildAbove):
(WebCore::WebGraphicsLayer::addChildBelow):
(WebCore::WebGraphicsLayer::replaceChild):
(WebCore::WebGraphicsLayer::setMaskLayer):
(WebCore::WebGraphicsLayer::syncCompositingState):
(WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
(WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
(WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
(WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
* WebProcess/WebCoreSupport/WebGraphicsLayer.h:
* WebProcess/WebPage/LayerTreeHost.messages.in:
* WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
(WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
* WebProcess/WebPage/qt/LayerTreeHostQt.h:

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

9 years agoUnreviewed, GTK gardening skipping 3 new test failures.
philn@webkit.org [Thu, 19 Jan 2012 15:27:00 +0000 (15:27 +0000)]
Unreviewed, GTK gardening skipping 3 new test failures.

* platform/gtk/Skipped:

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

9 years agoUnreviewed, unskip passing test.
vsevik@chromium.org [Thu, 19 Jan 2012 15:12:02 +0000 (15:12 +0000)]
Unreviewed, unskip passing test.

* platform/qt/Skipped:

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

9 years agoWeb Inspector: Improve focus switching in scripts panel.
vsevik@chromium.org [Thu, 19 Jan 2012 15:05:58 +0000 (15:05 +0000)]
Web Inspector: Improve focus switching in scripts panel.
https://bugs.webkit.org/show_bug.cgi?id=76628

Reviewed by Pavel Feldman.

* inspector/front-end/Dialog.js:
(WebInspector.Dialog.prototype._hide):
* inspector/front-end/FilteredItemSelectionDialog.js:
(WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
(WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._showSourceLine):

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

9 years agoWeb Inspector: Add isSelfOrAnsector and isSelfOrDescendant methods to utilities.
vsevik@chromium.org [Thu, 19 Jan 2012 13:56:09 +0000 (13:56 +0000)]
Web Inspector: Add isSelfOrAnsector and isSelfOrDescendant methods to utilities.
https://bugs.webkit.org/show_bug.cgi?id=76618

Added isSelfOrAncestor, isSelfOrDescendant and WebInspector.restoreFocusFromElement methods.

Reviewed by Pavel Feldman.

* inspector/front-end/Drawer.js:
* inspector/front-end/HelpScreen.js:
(WebInspector.HelpScreen.prototype._onBlur):
* inspector/front-end/MetricsSidebarPane.js:
(WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
* inspector/front-end/Popover.js:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.showUISourceCode):
* inspector/front-end/StylesSidebarPane.js:
():
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.detach):
(WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt):
* inspector/front-end/TextViewer.js:
(WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing):
(WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
* inspector/front-end/UIUtils.js:
(WebInspector.startEditing.cleanUpAfterEditing):
(WebInspector.restoreFocusFromElement):
* inspector/front-end/utilities.js:
(Element.prototype.isInsertionCaretInside):
():

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

9 years agoDynamicNodeList: Simplify internal Caches object.
kling@webkit.org [Thu, 19 Jan 2012 13:53:47 +0000 (13:53 +0000)]
DynamicNodeList: Simplify internal Caches object.
<http://webkit.org/b/76600>

Reviewed by Ryosuke Niwa.

Move m_caches from DynamicSubtreeNodeList and ChildNodeList up into DynamicNodeList.
Remove the inheritance from RefCounted and store it simply as "Caches m_caches"
This avoids one heap allocation per DynamicNodeList. Also reordered the Caches members
to pack slightly better on 64-bit.

* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::length):
(WebCore::ChildNodeList::item):
* dom/ChildNodeList.h:
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::item):
* dom/DynamicNodeList.h:
(WebCore::DynamicNodeList::invalidateCache):
* dom/Node.cpp:
(WebCore::NodeRareData::clearChildNodeListCache):

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

9 years agoWeb Inspector: TabbedPane closeAllTabs does not close all tabs.
vsevik@chromium.org [Thu, 19 Jan 2012 13:47:26 +0000 (13:47 +0000)]
Web Inspector: TabbedPane closeAllTabs does not close all tabs.
https://bugs.webkit.org/show_bug.cgi?id=76624

Reviewed by Pavel Feldman.

* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype.closeAllTabs):

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

9 years agoimage/pjpeg not supported for decoding on BlackBerry platform
rwlbuis@webkit.org [Thu, 19 Jan 2012 13:32:35 +0000 (13:32 +0000)]
image/pjpeg not supported for decoding on BlackBerry platform
https://bugs.webkit.org/show_bug.cgi?id=76595

Reviewed by Antonio Gomes.

Add image/pjpeg as one of the supported types for image decoding on BlackBerry platform.

* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):

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

9 years ago[Qt] Unreviewed gardening. Skip new failing tests.
ossy@webkit.org [Thu, 19 Jan 2012 13:04:27 +0000 (13:04 +0000)]
[Qt] Unreviewed gardening. Skip new failing tests.

* platform/qt-wk2/Skipped:
* platform/qt/Skipped:

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

9 years agoUnreviewed, rolling out r105402.
commit-queue@webkit.org [Thu, 19 Jan 2012 13:03:30 +0000 (13:03 +0000)]
Unreviewed, rolling out r105402.
http://trac.webkit.org/changeset/105402
https://bugs.webkit.org/show_bug.cgi?id=76623

Layout test problems (Requested by WildFox on #webkit).

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

Source/WebCore:

* css/svg.css:
(svg):
* rendering/RenderBox.h:
(WebCore::RenderBox::computeIntrinsicRatioInformation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeReplacedLogicalWidth):
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderImage.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::logicalHeightIsAuto):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
* rendering/RenderReplaced.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGViewportContainer.h:
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::determineViewport):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::viewport):
(WebCore::SVGSVGElement::parseMappedAttribute):
(WebCore::updateCSSForAttribute):
(WebCore::SVGSVGElement::svgAttributeChanged):
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
(WebCore::SVGSVGElement::currentViewBoxRect):
* svg/SVGSVGElement.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::size):
(WebCore::SVGImage::computeIntrinsicDimensions):
* svg/graphics/SVGImage.h:

LayoutTests:

* platform/mac/svg/custom/dynamic-empty-path-expected.png:
* platform/mac/svg/custom/fractional-rects-expected.png:
* platform/mac/svg/custom/js-update-container-expected.png:
* platform/mac/svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute-expected.png:
* platform/mac/svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute-expected.txt:
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png:
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt:
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.png:
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt:
* platform/mac/svg/custom/object-sizing-width-50p-on-target-svg-absolute-expected.png:
* platform/mac/svg/custom/object-sizing-width-50p-on-target-svg-absolute-expected.txt:
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute-expected.png:
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute-expected.txt:
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.png:
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.txt:
* platform/mac/svg/custom/use-css-no-effect-on-shadow-tree-expected.png:
* platform/mac/svg/custom/viewBox-hit-expected.png:
* platform/mac/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.png:
* platform/mac/svg/zoom/page/zoom-hixie-mixed-009-expected.png:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.png:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.txt:
* svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml:
* svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml:
* svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml:
* svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml:
* svg/foreignObject/text-tref-02-b-expected.txt:

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

9 years agoStrange Result for getComputedStyle on borderWidth set in em
alexis.menard@openbossa.org [Thu, 19 Jan 2012 12:59:52 +0000 (12:59 +0000)]
Strange Result for getComputedStyle on borderWidth set in em
https://bugs.webkit.org/show_bug.cgi?id=18294

Reviewed by Tony Chang.

Source/WebCore:

BorderValue stores its width on a 12 bits unsigned. This patch
increase it to 27. The patch also modify the way to set the
width or to get it, we now use a unsigned rather than a short.

Test: fast/css/border-width-large.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLength):
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* page/animation/AnimationBase.cpp:
(WebCore::blendFunc):
(WebCore::AnimationBase::ensurePropertyMap):
* platform/animation/AnimationUtilities.h:
(WebCore::blend):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
* rendering/style/BorderData.h:
(WebCore::BorderData::borderLeftWidth):
(WebCore::BorderData::borderRightWidth):
(WebCore::BorderData::borderTopWidth):
(WebCore::BorderData::borderBottomWidth):
* rendering/style/BorderValue.h:
(WebCore::BorderValue::width):
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyleBitfields::borderLeftWidth):
(WebCore::RenderStyleBitfields::borderRightWidth):
(WebCore::RenderStyleBitfields::borderTopWidth):
(WebCore::RenderStyleBitfields::borderBottomWidth):
(WebCore::RenderStyleBitfields::setBorderLeftWidth):
(WebCore::RenderStyleBitfields::setBorderRightWidth):
(WebCore::RenderStyleBitfields::setBorderTopWidth):
(WebCore::RenderStyleBitfields::setBorderBottomWidth):
(WebCore::RenderStyleBitfields::initialBorderWidth):
(WebCore::RenderStyleBitfields::initialColumnRuleWidth):
(WebCore::RenderStyleBitfields::initialOutlineWidth):

LayoutTests:

This test covers that setting big values to border-width will
return correct values.

* fast/css/border-width-large-expected.txt: Added.
* fast/css/border-width-large.html: Added.

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

9 years agoDifferentiate between SVG/CSS width/height attributes/properties
zimmermann@webkit.org [Thu, 19 Jan 2012 12:41:26 +0000 (12:41 +0000)]
Differentiate between SVG/CSS width/height attributes/properties
https://bugs.webkit.org/show_bug.cgi?id=76447

Reviewed by Antti Koivisto.

Source/WebCore:

Remove a gazillion of hacks out of our SVG implementation, by correctly differentiating between the
SVG width/height attributes and the CSS width/height properties. They need to be treated independently
when handling the intrinsic size negotiation, according to both CSS 2.1 & SVG 1.1 2nd Edition specs.

Fixes several bugs in the LayoutTests/svg/custom/*object*sizing tests, we now match Opera perfectly. FF still has some bugs, and IE9 as well.

* css/svg.css: Remove hardcoded, width/height: 100% on <svg>.
* rendering/RenderBox.h:
(WebCore::RenderBox::computeIntrinsicRatioInformation): Make 'intrinsicRatio' a float, and add 'intrinsicSize' as seperated FloatSize, to avoid confusion.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): Add forgotton case for percentage intrinsic sizes, that lead to workarounds in other places, that can now be removed.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeReplacedLogicalWidth): Directly use imageHasRelativeWidth/Height(), it does differentiate between SVG/CSS width/height attributes/properties now.
(WebCore::RenderImage::computeIntrinsicRatioInformation): Adapt to 'intrinsicRatio' argument change.
* rendering/RenderImage.h: Ditto.
* rendering/RenderReplaced.cpp: Refactor existing code, break out firstContainingBlockWithLogicalWidth/hasReplacedLogicalWidth/hasReplacedLogicalHeight/hasAutoHeightOrContainingBlockWithAutoHeight.
(WebCore::firstContainingBlockWithLogicalWidth): Refactored.
(WebCore::RenderReplaced::hasReplacedLogicalWidth): Refactored, and exported, so SVGSVGElement::widthAttributeEstablishesViewport() can use it.
(WebCore::hasAutoHeightOrContainingBlockWithAutoHeight): Refactored.
(WebCore::RenderReplaced::hasReplacedLogicalHeight): Refactored, and exported, so SVGSVGElement::heightAttributeEstablishesViewport() can use it.
(WebCore::RenderReplaced::computeReplacedLogicalWidth): Adapt to 'intrinsicRatio' changes ('intrinsicSize' is now decoupled from it). Refactor so that RenderSVGRoot can directly use it as well!
(WebCore::RenderReplaced::computeReplacedLogicalHeight): Ditto.
* rendering/RenderReplaced.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): Only determine the intrinsic size & ratio using the SVG width/height attributes, not the CSS width/height properties, as it's specified.
(WebCore::resolveLengthAttributeForSVG): Helper function for computeReplacedLogicalWidth/Height, that scales Length values that come from SVG width/height attributes.
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Finally remove home-brewn size computation logic - it can be fully shared with RenderReplaced now that we inherit from it.
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGViewportContainer.h:
(WebCore::RenderSVGViewportContainer::viewport): Export viewport() for easier length resolution.
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::determineViewport): Finally clean up this hell, and make it easy to understand. Only need to resolve lengths against either RenderSVGRoot or RenderSVGViewportContainer now.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::viewport): Remove wrong code and disable this. Its not used, and we have no test coverage for it. Its current implementation didn't make any sense.
(WebCore::SVGSVGElement::parseMappedAttribute): Remove hacks mapping SVG width/height attributes to CSS properties.
(WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
(WebCore::SVGSVGElement::localCoordinateSpaceTransform): Refactored.
(WebCore::SVGSVGElement::currentViewBoxRect): Ditto.
(WebCore::SVGSVGElement::currentViewportSize): Ditto.
(WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Main logic determining if the SVG or CSS properties establish the viewport -  a direct transliteration from the spec.
(WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Ditto.
(WebCore::SVGSVGElement::intrinsicWidth): Helper.
(WebCore::SVGSVGElement::intrinsicHeight): Ditto.
* svg/SVGSVGElement.h:
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::size): Cleanup code.
(WebCore::SVGImage::hasRelativeWidth): Added, avoids hacks in RenderBoxModelObject.
(WebCore::SVGImage::hasRelativeHeight): Ditto.
(WebCore::SVGImage::computeIntrinsicDimensions): Make use of new SVGSVGElement::computeIntrinsicDimensions.
* svg/graphics/SVGImage.h:

LayoutTests:

Update SVG pixel test baseline.

* platform/mac/svg/custom/dynamic-empty-path-expected.png: Marginal changes.
* platform/mac/svg/custom/fractional-rects-expected.png: Ditto.
* platform/mac/svg/custom/js-update-container-expected.png: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute-expected.png: Align with Opera, gives same result now. All *object*sizing* tests are passing now.
* platform/mac/svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute-expected.txt: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.png: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-on-target-svg-absolute-expected.png: Ditto.
* platform/mac/svg/custom/object-sizing-width-50p-on-target-svg-absolute-expected.txt: Ditto.
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute-expected.png: Ditto.
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute-expected.txt: Ditto.
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.png: Ditto.
* platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.txt: Ditto.
* platform/mac/svg/custom/use-css-no-effect-on-shadow-tree-expected.png: Marginal changes.
* platform/mac/svg/custom/viewBox-hit-expected.png: Ditto.
* platform/mac/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.png: Ditto.
* platform/mac/svg/zoom/page/zoom-hixie-mixed-009-expected.png: Ditto.
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png: Ditto.
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt: Ditto.
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.png: Ditto.
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.txt: Ditto.
* svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml: Fix test, now that our bug is fixed.
* svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml: Ditto.
* svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml: Ditto.
* svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml: Ditto.
* svg/foreignObject/text-tref-02-b-expected.txt: Size is not reported anymore.

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

9 years agoRenderSVGRoot should inherit from RenderReplaced
zimmermann@webkit.org [Thu, 19 Jan 2012 12:17:09 +0000 (12:17 +0000)]
RenderSVGRoot should inherit from RenderReplaced
https://bugs.webkit.org/show_bug.cgi?id=76446

Reviewed by Pavel Feldman.

Fix Chromium specific problem with svg/text/select-x-list-4.svg, making it fail on the bots.
After transforming the endPos.x + 1 -> absEndPos.x, subtract -1 again, to be sure we don't
select text too far after the end position, making the selection currently disappear, which
is a bug, but can be avoided in this testcase.

* platform/chromium/test_expectations.txt: Unskip test.
* svg/text/resources/SelectionTestCase.js:
(selectRange): Subtract -1 from absEndPos.x.

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

9 years ago[Qt] Do full incremental builds until bots use update-webkit
vestbo@webkit.org [Thu, 19 Jan 2012 11:18:44 +0000 (11:18 +0000)]
[Qt] Do full incremental builds until bots use update-webkit

Rubber-stamped by Simon Hausmann.

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

9 years agoFix the Qt build
vestbo@webkit.org [Thu, 19 Jan 2012 11:06:31 +0000 (11:06 +0000)]
Fix the Qt build

Unreviewed build fix.

* Scripts/webkitdirs.pm:
(buildQMakeProjects):

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

9 years ago[Qt] Make build-webkit always do safe incremental builds after update-webkit
vestbo@webkit.org [Thu, 19 Jan 2012 11:00:43 +0000 (11:00 +0000)]
[Qt] Make build-webkit always do safe incremental builds after update-webkit

When building against Qt5 with GCC we would just run 'make' in the build dir,
and rely on the dependency files output by GCC (-MD) to handle dependency
tracking, but that fails for special-cases like adding a Q_OBJECT macro
to a header.

To guarantee that an incrmental build will work, we have to run 'make qmake',
which we now do on every build-webkit that's followed by a successful run
of update-webkit. The reasoning is that update-webkit can result in such
potential corner-cases being applied, and since we can't know for sure
unless we inspect the diff and account for all the corner cases we assume
the worst and always run 'make qmake'.

After a succesful run of build-webkit we proceed to do just 'make' for any
subsequent runs, since we assume that the developer knows what kind of
changes he/she is doing, and when a 'make qmake' is needed.

Reviewed by Simon Hausmann.

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

9 years ago[Qt] Unreviewed gardening. Unskip now passing tests.
ossy@webkit.org [Thu, 19 Jan 2012 10:24:00 +0000 (10:24 +0000)]
[Qt] Unreviewed gardening. Unskip now passing tests.

* platform/qt-5.0/Skipped:
* platform/qt-wk2/Skipped:

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

9 years agodrop event isn't fired for contentEditable in edit drag
rniwa@webkit.org [Thu, 19 Jan 2012 10:16:35 +0000 (10:16 +0000)]
drop event isn't fired for contentEditable in edit drag
https://bugs.webkit.org/show_bug.cgi?id=57185

Reviewed by Adam Barth.

Source/WebCore:

Dispatch drop and dragend events after edit drag per HTML5 spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#drag-and-drop-processing-model

There are two major differences between the spec and WebKit's new behavior:

While the spec says we have to insert the dragged contents immediately after dispatching drop event
and delete the source in the default event handler of dragend event, doing so in WebKit is extremely
difficult because of the way we manage the selection. Instead, we continue to delete the source
and insert the dragged contents immediately after the drop event; this behavior matches that of Firefox 9.

When the dragged contents and the destination of the move is in the same text node, ReplaceSelectionCommand
may end up replacing it with a new text node. But this removal causes a problem when EventHandler uses
the node to dispatch dragend event because the node is "orphaned" from its parent at that point. To mitigate
this issue, we update the dragState's m_dragSrc when the node is orphaned by the edit drag. While this behavior
may differ from the spec and other browsers, not delivering dragend to the editing host seems strictly worse than
dispatching it at the slightly wrong target.

Tests: fast/events/moving-text-should-fire-drop-and-dragend-events-2.html
       fast/events/moving-text-should-fire-drop-and-dragend-events.html

* page/DragController.cpp:
(WebCore::DragController::performDrag): Dispatch drop event even when m_isHandlingDrag is true as long
as DragDestinationActionDHTML is an acceptable action.
(WebCore::DragController::concludeEditDrag): Call updateDragStateAfterEditDragIfNeeded after inserting
the dragged contents. This is necessary when ReplaceSelectionCommand or MoveSelectionCommand modifies
the source node while inserting the dragged contents.
* page/EventHandler.cpp:
(WebCore::EventHandler::performDragAndDrop): Clear the drag state only if drop event's default action
was prevented so that we dispatch dragevent event later.
(WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Update dragState's m_dragSrc when the node
is orphaned. See above for the rationale.
* page/EventHandler.h:

LayoutTests:

Added tests ensure moving text in contenteditable regions fire dragstart, drop, and dragend events.

* fast/events/moving-text-should-fire-drop-and-dragend-events-2-expected.txt: Added.
* fast/events/moving-text-should-fire-drop-and-dragend-events-2.html: Added.
* fast/events/moving-text-should-fire-drop-and-dragend-events-expected.txt: Added.
* fast/events/moving-text-should-fire-drop-and-dragend-events.html: Added.

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

9 years agoCleanup: Move chrome-specific filesystem type handling code (for FileSystem API)...
kinuko@chromium.org [Thu, 19 Jan 2012 09:58:56 +0000 (09:58 +0000)]
Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory
https://bugs.webkit.org/show_bug.cgi?id=76551

Reviewed by Darin Fisher.

WebKit-svn/Source/WebCore:

Moved the implementation of crackFileSystemURL() and toURL() from
WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem
so that each platform can extend/implement their behavior if necessary.

No new tests since this patch has no functionality changes. (Existing
tests should pass)

* fileapi/DOMFileSystemBase.cpp: Moved the implementation of
crackFileSystemURL() to AsyncFileSystem
(WebCore::DOMFileSystemBase::crackFileSystemURL):
* fileapi/DOMFileSystemBase.h:
* fileapi/EntryBase.cpp: Moved the implementation of toURL() to AsyncFileSystem
(WebCore::EntryBase::toURL):
* page/DOMWindow.cpp: Removed chrome-specific type handling code.
(WebCore::DOMWindow::webkitRequestFileSystem):
* page/DOMWindow.h: Removed chrome-specific filesystem type
(EXTERNAL).
* platform/AsyncFileSystem.cpp: Added default implementation of toURL() and crackFileSystemURL()
(WebCore::AsyncFileSystem::toURL):
(WebCore::AsyncFileSystem::crackFileSystemURL):
* platform/AsyncFileSystem.h:
* workers/WorkerContext.cpp: Removed chrome-specific type handling code.
(WebCore::WorkerContext::webkitRequestFileSystem):
(WebCore::WorkerContext::webkitRequestFileSystemSync):

WebKit-svn/Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp: Removed matching assertion for TypeExternal as it's no longer defined separately.
* src/AsyncFileSystemChromium.cpp: Added crackFileSystemURL() and toURL() implementation that
handle chrome-specific filesystem type (EXTERNAL) as well as regular TEMPORARY/PERSISTENT types.
(WebCore::AsyncFileSystem::crackFileSystemURL): Added.
(WebCore::AsyncFileSystemChromium::toURL): Added.
* src/AsyncFileSystemChromium.h:

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

9 years agoCache RenderStyle pointer as a method to avoid performance regression for region...
mihnea@adobe.com [Thu, 19 Jan 2012 09:22:59 +0000 (09:22 +0000)]
Cache RenderStyle pointer as a method to avoid performance regression for region styling
https://bugs.webkit.org/show_bug.cgi?id=76265

Reviewed by David Hyatt.

No new tests since this is just refactoring.
When region styling was enabled in https://bugs.webkit.org/show_bug.cgi?id=71488,
it introduced a performance regression due to the change of RenderObject::style() method.
This patch tries to avoid a new performance regression when region styling will be enabled again.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::MarginInfo::MarginInfo):
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::computePreferredLogicalWidths):
(WebCore::getBorderPaddingMargin):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleWillChange):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateBoxModelInfoFromStyle):
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthUsing):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::styleWillChange):
(WebCore::RenderBoxModelObject::updateBoxModelInfoFromStyle):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
* rendering/RenderText.cpp:
(WebCore::RenderText::styleDidChange):
(WebCore::RenderText::computePreferredLogicalWidths):

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

9 years ago[Chromium] Random characters got rendered as empty boxes or with incorrect glyphs...
commit-queue@webkit.org [Thu, 19 Jan 2012 09:08:12 +0000 (09:08 +0000)]
[Chromium] Random characters got rendered as empty boxes or with incorrect glyphs even when a font is present
https://bugs.webkit.org/show_bug.cgi?id=76508

Patch by Kazuhiro Inaba <kinaba@chromium.org> on 2012-01-19
Reviewed by Kent Tamura.

Wrapped GetGlyphIndices() API calls so that when they failed we trigger font
loading outside the sandbox and retry the call.

No new auto tests since the bug involves the system's occasional cache behavior
and thus there's no reliable way to reproduce and test the situation.

* platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
(WebCore::getGlyphIndices):
GDI call wrapper ensuring fonts to be loaded.
(WebCore::initSpaceGlyph):
Changed to use the wrapper function.
(WebCore::fillBMPGlyphs):
Changed to use the wrapper function.
Introduced scoped HDC management by HWndDC.
(WebCore::GlyphPage::fill):

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

9 years agoUnreviewed - re-enables tests on chromium-mac by making minor changes to cause the...
dmazzoni@google.com [Thu, 19 Jan 2012 08:58:22 +0000 (08:58 +0000)]
Unreviewed - re-enables tests on chromium-mac by making minor changes to cause the expectations to be identical on all Chromium configurations.

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

9 years agocreateAttributeNS should understand that "xmlns" is allowed in the http://www.w3...
abarth@webkit.org [Thu, 19 Jan 2012 08:31:13 +0000 (08:31 +0000)]
createAttributeNS should understand that "xmlns" is allowed in the w3.org/2000/xmlns/
https://bugs.webkit.org/show_bug.cgi?id=76579

Reviewed by Eric Seidel.

Source/WebCore:

This patch cleans up a tiny corner case involving the (somewhat
magical) xmlns attribute that we uncovered when working on
setAttributeNS.

Tests: fast/dom/Document/createAttributeNS-namespace-err.html

* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::hasValidNamespaceForElements):
(WebCore::Document::hasValidNamespaceForAttributes):
(WebCore::Document::createElementNS):
(WebCore::Document::createAttributeNS):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setAttributeNS):

LayoutTests:

* fast/dom/Document/createAttributeNS-namespace-err-expected.txt:
* fast/dom/Document/script-tests/createAttributeNS-namespace-err.js:

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

9 years agoUnreviewed build fix for DEBUG: remove comparison of an unsigned variable with '...
rolandsteiner@chromium.org [Thu, 19 Jan 2012 08:29:37 +0000 (08:29 +0000)]
Unreviewed build fix for DEBUG: remove comparison of an unsigned variable with '>= 0' in ASSERT.

No new tests. (no functionality change)

* webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):

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

9 years ago[v8] Low efficiency of writing long string from web application to plugin.
commit-queue@webkit.org [Thu, 19 Jan 2012 07:52:31 +0000 (07:52 +0000)]
[v8] Low efficiency of writing long string from web application to plugin.
https://bugs.webkit.org/show_bug.cgi?id=76592

The efficiency will be improved by 300 times in the best case, when the
size of string reaches 1MB.

Patch by Li Yin <li.yin@intel.com> on 2012-01-18
Reviewed by Adam Barth.

* bindings/v8/V8NPUtils.cpp:
(WebCore::convertV8ObjectToNPVariant):

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

9 years agoAssigning to Element.prefix should throw exception when using illegal characters
abarth@webkit.org [Thu, 19 Jan 2012 07:39:41 +0000 (07:39 +0000)]
Assigning to Element.prefix should throw exception when using illegal characters
https://bugs.webkit.org/show_bug.cgi?id=76589

Reviewed by Eric Seidel.

This patch fixes a FIXME and implements the INVALID_CHARACTER_ERR
exception described in
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-NodeNSPrefix

Tests: fast/dom/Element/prefix-setter-exception.html

* dom/Node.cpp:
(WebCore::isValidNameStartCharacter):
(WebCore::isValidNameCharacter):
(WebCore::hasInvalidValidNameCharacters):
(WebCore::Node::checkSetPrefix):

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

9 years agoShadowContent query should be able to have fallback elements.
commit-queue@webkit.org [Thu, 19 Jan 2012 07:05:58 +0000 (07:05 +0000)]
ShadowContent query should be able to have fallback elements.
https://bugs.webkit.org/show_bug.cgi?id=75306

Patch by Shinya Kawanaka <shinyak@google.com> on 2012-01-18
Reviewed by Hajime Morita.

Source/WebCore:

When no elements are selected by a shadow content element selector query,
light children are selected as a fallback elements.

Test: fast/dom/shadow/shadow-contents-fallback.html

* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
  Considers fallback phase. When no elements are chosen, the phase is set to 'fallback'.
(WebCore::NodeRenderingContext::nextRenderer):
  Takes fallback phase into account.
(WebCore::NodeRenderingContext::previousRenderer): ditto.
* dom/NodeRenderingContext.h:
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::attach):
  Calculates inclusions before attaching light children.
* html/shadow/HTMLContentElement.h:
(WebCore::HTMLContentElement::hasInclusion):

LayoutTests:

* fast/dom/shadow/shadow-contents-fallback-expected.txt: Added.
* fast/dom/shadow/shadow-contents-fallback.html: Added.

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

9 years agoREGRESSION(r100111): A 'change' event does not fire when a mouse drag
tkent@chromium.org [Thu, 19 Jan 2012 06:51:57 +0000 (06:51 +0000)]
REGRESSION(r100111): A 'change' event does not fire when a mouse drag
occurs to switch elements in a listbox <select>
https://bugs.webkit.org/show_bug.cgi?id=76244

Reviewed by Hajime Morita.

Source/WebCore:

Test: fast/forms/select/listbox-drag-in-non-multiple.html

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::updateSelectedState):
Do not update m_activeSelectionState for non-multiple <select>.
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
Use setActiveSelection*Index() and updateListBoxSelection(true) instead
of updateSelectedState() because updateSelectedState() updates
m_lastOnChangeSelection and will prevent the mouseup handler from
dispatching 'change' event.
We should not call listBoxOnChange() in the mousemove handler in order
to align the behavior of IE and Firefox.

LayoutTests:

* fast/forms/resources/common.js:
(mouseMoveToIndexInListbox): Added.
* fast/forms/select/listbox-drag-in-non-multiple-expected.txt: Added.
* fast/forms/select/listbox-drag-in-non-multiple.html: Added.

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

9 years agoupdate resolve-url-sync-expected.txt
dgrogan@chromium.org [Thu, 19 Jan 2012 06:11:02 +0000 (06:11 +0000)]
update resolve-url-sync-expected.txt
https://bugs.webkit.org/show_bug.cgi?id=76581

Reviewed by Eric Seidel.

* http/tests/filesystem/workers/resolve-url-sync-expected.txt:

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

9 years agorun-perf-tests should support Skipped list
rniwa@webkit.org [Thu, 19 Jan 2012 06:00:40 +0000 (06:00 +0000)]
run-perf-tests should support Skipped list
https://bugs.webkit.org/show_bug.cgi?id=76594

Reviewed by Adam Barth.

PerformanceTests:

Add Skipped list to be used by run-perf-tests as it can only runs tests in
Bindings, Parser, and inspector at the moment.

* Skipped: Added.

Tools:

Add a support for Skipped list in run-perf-tests; also skip files in resources directories.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.perf_tests_dir):
(Port.skipped_perf_tests):
(Port.skips_perf_test):
(Port.relative_perf_test_filename):
* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort.perf_tests_dir):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._expectations_from_skipped_files):
(WebKitPort):
(WebKitPort.skipped_layout_tests):
(WebKitPort.skipped_perf_tests):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._collect_tests):
(PerfTestsRunner.run):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_test_set_with_json_output):
(test_run_test_set_with_json_source):
(test_collect_tests_with_skipped_list):
(test_collect_tests_with_skipped_list.add_file):

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

9 years agoPass content-security-policy directive into shared workers.
tsepez@chromium.org [Thu, 19 Jan 2012 05:56:11 +0000 (05:56 +0000)]
Pass content-security-policy directive into shared workers.
https://bugs.webkit.org/show_bug.cgi?id=75660

Reviewed by Darin Fisher.

* public/WebContentSecurityPolicy.h: Added.
* public/WebSharedWorker.h:
(WebKit::WebSharedWorker::startWorkerContext):
* src/AssertMatchingEnums.cpp:
* src/SharedWorkerRepository.cpp:
(WebCore::SharedWorkerScriptLoader::notifyFinished):
* src/WebSharedWorkerImpl.cpp:
(WebKit::WebSharedWorkerImpl::startWorkerContext):
* src/WebSharedWorkerImpl.h:

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

9 years agosetAttributeNS should comply with the obscure rules of DOM2, just like createAttribut...
eric@webkit.org [Thu, 19 Jan 2012 05:40:22 +0000 (05:40 +0000)]
setAttributeNS should comply with the obscure rules of DOM2, just like createAttributeNS and createElementNS do
https://bugs.webkit.org/show_bug.cgi?id=76143

Reviewed by Adam Barth.

Source/WebCore:

Test: fast/dom/Element/setAttributeNS-namespace-err.html

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

LayoutTests:

* fast/dom/Element/script-tests/setAttributeNS-namespace-err.js: Added.
(assert):
(stringForExceptionCode):
(assertEquals):
(sourceify):
(runNSTests):
* fast/dom/Element/setAttributeNS-namespace-err-expected.txt: Added.
* fast/dom/Element/setAttributeNS-namespace-err.html: Added.

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

9 years agoUnreviewed, rolling out r105376.
rolandsteiner@chromium.org [Thu, 19 Jan 2012 05:20:17 +0000 (05:20 +0000)]
Unreviewed, rolling out r105376.
http://trac.webkit.org/changeset/105376
https://bugs.webkit.org/show_bug.cgi?id=76601

Roll 76493 back in after discussion with jsbell (Requested by
rolandsteiner on #webkit).

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

Source/WebCore:

* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::injectIDBKeyIntoSerializedValue):

LayoutTests:

* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-autoincrement.html:

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

9 years ago[chromium] Create a base-class CCAnimation to represent compositor animations
commit-queue@webkit.org [Thu, 19 Jan 2012 04:18:02 +0000 (04:18 +0000)]
[chromium] Create a base-class CCAnimation to represent compositor animations
https://bugs.webkit.org/show_bug.cgi?id=73233

Source/WebCore:

Adds a kernel for running animations on the chromium compositor
thread.

Patch by Ian Vollick <vollick@chromium.org> on 2012-01-18
Reviewed by Kenneth Russell.

* WebCore.gypi:
* platform/graphics/chromium/cc/CCActiveAnimation.cpp: Added.
(WebCore::CCActiveAnimation::CCActiveAnimation):
(WebCore::CCActiveAnimation::setRunState):
(WebCore::CCActiveAnimation::isFinishedAt):
(WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
* platform/graphics/chromium/cc/CCActiveAnimation.h: Added.
(WebCore::CCActiveAnimation::create):
(WebCore::CCActiveAnimation::~CCActiveAnimation):
(WebCore::CCActiveAnimation::group):
(WebCore::CCActiveAnimation::targetProperty):
(WebCore::CCActiveAnimation::runState):
(WebCore::CCActiveAnimation::iterations):
(WebCore::CCActiveAnimation::setIterations):
(WebCore::CCActiveAnimation::startTime):
(WebCore::CCActiveAnimation::setStartTime):
(WebCore::CCActiveAnimation::isFinished):
(WebCore::CCActiveAnimation::animationCurve):
* platform/graphics/chromium/cc/CCAnimationCurve.cpp: Added.
(WebCore::CCAnimationCurve::toFloatAnimationCurve):
(WebCore::CCAnimationCurve::toTransformAnimationCurve):
* platform/graphics/chromium/cc/CCAnimationCurve.h: Added.
(WebCore::CCAnimationCurve::~CCAnimationCurve):
(WebCore::CCFloatAnimationCurve::~CCFloatAnimationCurve):
(WebCore::CCFloatAnimationCurve::type):
(WebCore::CCTransformAnimationCurve::~CCTransformAnimationCurve):
(WebCore::CCTransformAnimationCurve::type):
* platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.cpp: Added.
(WebCore::CCLayerAnimationControllerImpl::create):
(WebCore::CCLayerAnimationControllerImpl::CCLayerAnimationControllerImpl):
(WebCore::CCLayerAnimationControllerImpl::animate):
(WebCore::CCLayerAnimationControllerImpl::add):
(WebCore::CCLayerAnimationControllerImpl::getActiveAnimation):
(WebCore::CCLayerAnimationControllerImpl::hasActiveAnimation):
(WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForNextTick):
(WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForStartTime):
(WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForTargetAvailability):
(WebCore::CCLayerAnimationControllerImpl::resolveConflicts):
(WebCore::CCLayerAnimationControllerImpl::purgeFinishedAnimations):
(WebCore::CCLayerAnimationControllerImpl::tickAnimations):
* platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.h: Added.
(WebCore::CCLayerAnimationControllerImplClient::~CCLayerAnimationControllerImplClient):

Source/WebKit/chromium:

Patch by Ian Vollick <vollick@chromium.org> on 2012-01-18
Reviewed by Kenneth Russell.

* WebKit.gypi:
* tests/CCActiveAnimationTest.cpp: Added.
(WebCore::FakeFloatAnimation::duration):
(WebCore::FakeFloatAnimation::getValue):
(WebCore::createActiveAnimation):
(WebCore::TEST):
* tests/CCLayerAnimationControllerImplTest.cpp: Added.
(WebCore::FakeControllerClient::FakeControllerClient):
(WebCore::FakeControllerClient::~FakeControllerClient):
(WebCore::FakeControllerClient::opacity):
(WebCore::FakeControllerClient::setOpacity):
(WebCore::FakeControllerClient::transform):
(WebCore::FakeControllerClient::setTransform):
(WebCore::FakeControllerClient::animationControllerImplDidActivate):
(WebCore::FakeControllerClient::activeControllers):
(WebCore::FakeTransformTransition::FakeTransformTransition):
(WebCore::FakeTransformTransition::duration):
(WebCore::FakeTransformTransition::getValue):
(WebCore::FakeFloatTransition::FakeFloatTransition):
(WebCore::FakeFloatTransition::duration):
(WebCore::FakeFloatTransition::getValue):
(WebCore::TEST):

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

9 years agoUnreviewed, rolling out r105331.
rolandsteiner@chromium.org [Thu, 19 Jan 2012 04:07:54 +0000 (04:07 +0000)]
Unreviewed, rolling out r105331.
http://trac.webkit.org/changeset/105331
https://bugs.webkit.org/show_bug.cgi?id=76599

May have broken Chromium InjectIDBKey browser_test (Requested
by rolandsteiner on #webkit).

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

Source/WebCore:

* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::injectIDBKeyIntoSerializedValue):

LayoutTests:

* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-autoincrement.html:

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

9 years agoRemove some unused code in AudioContext
commit-queue@webkit.org [Thu, 19 Jan 2012 04:02:28 +0000 (04:02 +0000)]
Remove some unused code in AudioContext
https://bugs.webkit.org/show_bug.cgi?id=76506

Patch by Raymond Liu <raymond.liu@intel.com> on 2012-01-18
Reviewed by Kenneth Russell.

No new tests required.

* webaudio/AudioContext.cpp:
(WebCore::AudioContext::constructCommon):
(WebCore::AudioContext::uninitialize):
* webaudio/AudioContext.h:

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

9 years agoFix path to chromium_src_dir introduced in previous change.
dpranke@chromium.org [Thu, 19 Jan 2012 03:28:57 +0000 (03:28 +0000)]
Fix path to chromium_src_dir introduced in previous change.

Unreviewed, build fix.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:

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

9 years agoOnly create AudioBus with required number of channels for AudioNodeOutput
commit-queue@webkit.org [Thu, 19 Jan 2012 03:22:57 +0000 (03:22 +0000)]
Only create AudioBus with required number of channels for AudioNodeOutput
https://bugs.webkit.org/show_bug.cgi?id=76417

Patch by Raymond Liu <raymond.liu@intel.com> on 2012-01-18
Reviewed by Kenneth Russell.

No new tests required.

* webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):
(WebCore::AudioNodeOutput::setNumberOfChannels):
(WebCore::AudioNodeOutput::updateInternalBus):
(WebCore::AudioNodeOutput::updateNumberOfChannels):
(WebCore::AudioNodeOutput::pull):
* webaudio/AudioNodeOutput.h:

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

9 years agoCache and reuse the NodeList returned by Node::childNodes().
kling@webkit.org [Thu, 19 Jan 2012 02:55:03 +0000 (02:55 +0000)]
Cache and reuse the NodeList returned by Node::childNodes().
<http://webkit.org/b/76591>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Instead of only caching the DynamicNodeList::Caches for .childNodes on NodeRareData,
cache the full ChildNodeList object. Lifetime management is left to wrappers who
invalidate the cached (raw) pointer via Node::removeCachedChildNodeList(), called
from ~ChildNodeList().

This is a slight behavior change, in that Node.childNodes === Node.childNodes will
now be true. This matches the behavior of both Firefox and Opera.

This reduces memory consumption by 192 kB (on 32-bit) when viewing the full
HTML5 spec at <http://whatwg.org/c>

Test: fast/dom/gc-9.html
      fast/dom/node-childNodes-idempotence.html

* dom/Node.cpp:
(WebCore::Node::childNodes):
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(WebCore::NodeRareData::childNodeList):
(WebCore::NodeRareData::setChildNodeList):

    Only construct one ChildNodeList per Node and store it on NodeRareData for
    retrieval across childNodes() calls.

* dom/ChildNodeList.h:
(WebCore::ChildNodeList::create):
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):

    Construct the Caches at creation instead of passing it to the constructor.

(WebCore::ChildNodeList::reset):

    Added, resets the internal cache.

(WebCore::ChildNodeList::~ChildNodeList):

    Call Node::removeCachedChildNodeList().

* dom/DynamicNodeList.cpp:
* dom/DynamicNodeList.h:

    Have DynamicNodeList (and subclasses) respond "true" to isDynamicNodeList().
    Previously only DynamicSubtreeNodeList (and subclasses) were doing this.
    Without it, JSC may GC our ChildNodeLists prematurely (due to NodeList's
    isReachableFromOpaqueRoots() implementation checking isDynamicNodeList().)

* dom/Node.h:
* dom/Node.cpp:
(WebCore::Node::removeCachedChildNodeList):

    Added for ~ChildNodeList() to remove the pointer to itself from the Node.

(WebCore::NodeRareData::clearChildNodeListCache):

    Call ChildNodeList::reset().

LayoutTests:

Updated gc-9.html to document the new lifetime characteristics of a .childNodes with
custom properties. Also added a test to verify that .childNodes === .childNodes.

* fast/dom/gc-9-expected.txt:
* fast/dom/gc-9.html:
* fast/dom/node-childNodes-idempotence-expected.txt: Added.
* fast/dom/node-childNodes-idempotence.html: Added.

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

9 years agoUnreviewed, rolling out r105366.
jamesr@google.com [Thu, 19 Jan 2012 02:39:04 +0000 (02:39 +0000)]
Unreviewed, rolling out r105366.
http://trac.webkit.org/changeset/105366
https://bugs.webkit.org/show_bug.cgi?id=76015

Breaks CCLayerTreeHostImplTest unit test

Source/WebCore:

* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore::CCDrawQuad::drawsOpaque):
(WebCore::CCDrawQuad::needsBlending):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
(WebCore::CCQuadCuller::cullOccludedQuads):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
(WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
* platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
(WebCore::CCTileDrawQuad::create):
(WebCore::CCTileDrawQuad::CCTileDrawQuad):
* platform/graphics/chromium/cc/CCTileDrawQuad.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::appendQuads):
(WebCore::CCTiledLayerImpl::syncTextureId):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:

Source/WebKit/chromium:

* tests/CCQuadCullerTest.cpp:
(WebCore::TestDrawQuad::TestDrawQuad):
(WebCore::TestDrawQuad::create):
(WebCore::setQuads):
* tests/CCTiledLayerImplTest.cpp:
(WebCore::createLayer):
(WebCore::TEST):
(WebCore::getQuads):
(WebCore::coverageVisibleRectOnTileBoundaries):
(WebCore::coverageVisibleRectIntersectsTiles):
(WebCore::coverageVisibleRectIntersectsBounds):

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

9 years agoSave two ID checks on CSS Min/Width property validation
commit-queue@webkit.org [Thu, 19 Jan 2012 02:02:04 +0000 (02:02 +0000)]
Save two ID checks on CSS Min/Width property validation
https://bugs.webkit.org/show_bug.cgi?id=76565

The same validation is done again in the next case statement. Check for
CSSValueIntrinsic and CSSValueMinIntrinsic was done twice when the value
is a number.

Patch by Thiago Marcos P. Santos <tmpsantos@gmail.com> on 2012-01-18
Reviewed by Andreas Kling.

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

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

9 years ago Need infrastructure to test Content-Disposition filename encoding support
ap@apple.com [Thu, 19 Jan 2012 01:54:40 +0000 (01:54 +0000)]
    Need infrastructure to test Content-Disposition filename encoding support
        https://bugs.webkit.org/show_bug.cgi?id=76572
        <rdar://problem/6421825>

        Reviewed by Sam Weinig.

        Made policy delegate log suggested file name when resource has Content-Disposition: attachment.

        WebKitTestRunner does not have a policy delegate yet, bug 42546.

        * DumpRenderTree/mac/PolicyDelegate.mm:
        (dispositionTypeFromContentDispositionHeader):
        (-[PolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]):

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

9 years agoAnother build fix for r105364.
jonlee@apple.com [Thu, 19 Jan 2012 01:53:12 +0000 (01:53 +0000)]
Another build fix for r105364.

* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Missing #if.

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

9 years agoBuild fix for r105364. Unreviewed.
jonlee@apple.com [Thu, 19 Jan 2012 01:44:29 +0000 (01:44 +0000)]
Build fix for r105364. Unreviewed.

* WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
(WebKit::WebNotificationManager::initialize):
(WebKit::WebNotificationManager::didUpdateNotificationDecision):
(WebKit::WebNotificationManager::didRemoveNotificationDecisions):
(WebKit::WebNotificationManager::policyForOrigin):

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

9 years ago[chromium] Use region reported painted opaque for draw culling
commit-queue@webkit.org [Thu, 19 Jan 2012 01:42:30 +0000 (01:42 +0000)]
[chromium] Use region reported painted opaque for draw culling
https://bugs.webkit.org/show_bug.cgi?id=76015

Patch by Dana Jansens <danakj@chromium.org> on 2012-01-18
Reviewed by James Robinson.

Source/WebCore:

New unit tests in CCQuadCullerTest.cpp and CCTiledLayerImplTest.cpp

* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore::CCDrawQuad::opaqueRect):
(WebCore::CCDrawQuad::needsBlending):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
(WebCore::CCQuadCuller::cullOccludedQuads):
* platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
(WebCore::CCTileDrawQuad::create):
(WebCore::CCTileDrawQuad::CCTileDrawQuad):
* platform/graphics/chromium/cc/CCTileDrawQuad.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::DrawableTile::opaqueRect):
(WebCore::DrawableTile::setOpaqueRect):
(WebCore::CCTiledLayerImpl::appendQuads):
(WebCore::CCTiledLayerImpl::pushTileProperties):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:

Source/WebKit/chromium:

* tests/CCQuadCullerTest.cpp:
(WebCore::TestDrawQuad::TestDrawQuad):
(WebCore::TestDrawQuad::create):
(WebCore::setQuads):
(WebCore::TEST):
* tests/CCTiledLayerImplTest.cpp:
(WebCore::createLayer):
(WebCore::TEST):
(WebCore::getQuads):
(WebCore::coverageVisibleRectOnTileBoundaries):
(WebCore::coverageVisibleRectIntersectsTiles):
(WebCore::coverageVisibleRectIntersectsBounds):

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

9 years agoHTMLMediaElement should fire 'progress' event before 'idle' if it was previously...
vrk@chromium.org [Thu, 19 Jan 2012 01:19:29 +0000 (01:19 +0000)]
HTMLMediaElement should fire 'progress' event before 'idle' if it was previously loading
https://bugs.webkit.org/show_bug.cgi?id=76568

Reviewed by Eric Carlson.

This fires a progress event when going from a non-empty state to idle,
for the same reason that a progress event is fired when going from a
non-idle state to loaded. Also consolidated logic in a single helper method.

No new tests because the decision of if/when a user agent sets the network state
to idle is up to the user agent in this scenario.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setNetworkState):
(WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
* html/HTMLMediaElement.h:

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

9 years ago[WK2] Sync call for notifications permissions causes flashes on gmail.com
jonlee@apple.com [Thu, 19 Jan 2012 01:14:55 +0000 (01:14 +0000)]
[WK2] Sync call for notifications permissions causes flashes on gmail.com
https://bugs.webkit.org/show_bug.cgi?id=76570
<rdar://problem/10647155>

Reviewed by Anders Carlsson and Sam Weinig.

Source/WebCore:

* WebCore.exp.in: Export SecurityOrigin::toString().

Add runtime setting to enable/disable notifications.

* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h: Add new bit for whether notifications are enabled.
(WebCore::Settings::setNotificationsEnabled):
(WebCore::Settings::notificationsEnabled):

Source/WebKit2:

The website code figures out the permission level for its security origin by making a JS call (called
checkPermission()) that is synchronous. The way this was implemented was to make a synchronous call from
the WebNotificationManager to its proxy. That call goes to the WK API layer to find the policy, and
returns that policy back to the JS.

The synchronous nature of this call causes the white flash to appear in certain cases.

To fix this, the checkPermission() call is handled all within the web process, instead of going up into
the UI process. To do this, the web process initializes the WebNotificationManager with a copy of the
notification permissions. Any time the WK client makes a change to the permissions, that gets sent down
asynchronously, and the cached copy in WebNotificationManager gets updated.

A page's settings may disable notifications altogether. Before, this would have been handled by the WK
client, since retrieving the permissions were also handled there. Now that the lookup happens in the web
process, we need to add that setting in WebCore.

== Update notification permissions to use the security origin's string representation, rather than its
database identifier.

* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show): Registering the provider with the manager is handled in
initialize() now.
(WebKit::WebNotificationManagerProxy::cancel): Registering the provider with the manager is handled in
initialize() now.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestNotificationPermission):
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest): Only start the request if notifications
are enabled.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Only show notification is they are enabled.
(WebKit::WebNotificationManager::cancel): Only cancel if notifications are enabled.

== Remove synchronous message to get policy for a given origin. Instead, use the cached copy in
WebNotificationManager.

* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin): Looks for the permission in the cached copy.
If it doesn't exist, return NotificationPresenter::PermissionNotAllowed.
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::permissionLevel): Update permissionLevel to use
policyForOrigin().

Remove old WK API function to get the policy. Because this function was the only synchronous message,
we remove the sync-message-related functions also. Also, add in some #includes that might have been
omitted in prior patches.

* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove NotificationPermissionLevel.
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:

* UIProcess/Notifications/WebNotificationProvider.h: Remove policyForNotificationPermissionAtOrigin().
* UIProcess/Notifications/WebNotificationProvider.cpp:

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveSyncMessage): Remove conditional to forward sync messages to the
notification manager proxy.

== Mechanism for client to update the permissions copy in WebNotificationManager.

* WebProcess/Notifications/WebNotificationManager.messages.in: Add new messages
didUpdateNotificationDecision and didRemoveNotificationDecisions.
* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::initialize):
(WebKit::WebNotificationManager::didUpdateNotificationDecision): Update the entry.
(WebKit::WebNotificationManager::didRemoveNotificationDecisions): Remove the entry.

* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): Convert the array of
origins to remove, and send it to the WebNotificationManager.

* UIProcess/API/C/WKNotificationManager.h: Expose these update functions as WK API.
* UIProcess/API/C/WKNotificationManager.cpp:
(WKNotificationManagerProviderDidUpdateNotificationPolicy):
(WKNotificationManagerProviderDidRemoveNotificationPolicies):

== Initialize WebNotificationManager with permissions. Initialize WebPage with notifications enabled bit
from settings.

* Shared/WebProcessCreationParameters.h: Add map of notification permissions as part of the
parameters.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

* UIProcess/Notifications/WebNotificationProvider.h: Retrieve copy of existing notification permissions.
* UIProcess/Notifications/WebNotificationProvider.cpp:
* UIProcess/API/C/WKNotificationProvider.h: Add WK API to get a copy of the permissions.

* UIProcess/Notifications/WebNotificationManagerProxy.h: Add populateCopyOfNotificationPermissions().
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::initializeProvider): Add the manager at the time of initialization.
Similar calls in show() and cancel() are removed in following patch.
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Clear the existing copy.
Populate with origin string, and whether that origin is allowed to post. If no decision has been made
by the user, then there should be no item in this dictionary.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess): When the web process is initialized, we get a copy of the
permissions, and send it to the web process to initialize the notification manager.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Initialize the notification manager.

* WebProcess/Notifications/WebNotificationManager.h:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::initialize): Initialize the permissions copy.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Set notifications enabled bit from settings.

== Expose toString() method from WebCore::SecurityOrigin. Work is also towards bug 74956.

* Shared/API/c/WKSecurityOrigin.h: Refactor WKSecurityOriginCreateFromIdentifier to
WKSecurityOriginCreateFromDatabaseIdentifier and add WKSecurityOriginCreateFromString function.
* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromString):
(WKSecurityOriginCreateFromDatabaseIdentifier):
(WKSecurityOriginCopyToString):

Refactor WebSecurityOrigin::create() to WebSecurityOrigin::createFromDatabaseIdentifier()
and add WebSecurityOrigin::createFromString().

* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::createFromString):
(WebKit::WebSecurityOrigin::createFromDatabaseIdentifier):
(WebKit::WebSecurityOrigin::toString): Added function.

Refactor with renamed createFromDatabaseIdentifier() method.

* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):

== Add WK API calls to change notificationsEnabled bit in WebCore::Settings.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetNotificationsEnabled):
(WKPreferencesGetNotificationsEnabled):
* UIProcess/API/C/WKPreferences.h:

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

9 years agoIndexedDB: Fix InjectIDBKeyTest.SubProperty test failure
jamesr@google.com [Thu, 19 Jan 2012 01:11:06 +0000 (01:11 +0000)]
IndexedDB: Fix InjectIDBKeyTest.SubProperty test failure
https://bugs.webkit.org/show_bug.cgi?id=76582

Correct the test, now that https://bugs.webkit.org/show_bug.cgi?id=76493
changes the semantics so that intermediate objects are created if possible
to satisfy autoIncrement keypaths.

Patch by Joshua Bell <jsbell@chromium.org> on 2012-01-18
Reviewed by James Robinson.

* tests/IDBBindingUtilitiesTest.cpp:
(WebCore::TEST):

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

9 years agoREGRESSION (r88886): Tabs restore blank when running Safari with a nightly build...
andersca@apple.com [Thu, 19 Jan 2012 00:16:50 +0000 (00:16 +0000)]
REGRESSION (r88886): Tabs restore blank when running Safari with a nightly build for the first time
https://bugs.webkit.org/show_bug.cgi?id=76587
<rdar://problem/9739135>

Reviewed by Sam Weinig.

* UIProcess/cf/WebPageProxyCF.cpp:
Change CurrentSessionStateDataVersion back to 2.

* WebProcess/WebPage/DecoderAdapter.cpp:
(WebKit::DecoderAdapter::decodeString):
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeString):
Backport the CoreIPC string encoding and decoding functions that were in place prior to r88886.

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

9 years agoFix tests from http://trac.webkit.org/changeset/105332.
ojan@chromium.org [Thu, 19 Jan 2012 00:07:00 +0000 (00:07 +0000)]
Fix tests from trac.webkit.org/changeset/105332.

The code assumed that if you passed an options object with a configuration
attribute that it would have a valid value. A bunch of the testing mocks
do things like having a configuration value of None.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):

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

9 years ago[chromium] Update a few chromium expectations.
jamesr@google.com [Wed, 18 Jan 2012 23:40:25 +0000 (23:40 +0000)]
[chromium] Update a few chromium expectations.

* platform/chromium/test_expectations.txt:

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

9 years agoProvide access to user's list of preferred languages
eric.carlson@apple.com [Wed, 18 Jan 2012 23:29:27 +0000 (23:29 +0000)]
Provide access to user's list of preferred languages
https://bugs.webkit.org/show_bug.cgi?id=76138

Reviewed by Timothy Hatcher.

No new tests, tested by fast/harness/user-preferred-language.html.

* platform/mac/Language.mm:
(WebCore::platformUserPreferredLanguages): Don't over-release a the CFStrings returned by
    CFLocaleCopyPreferredLanguages.

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

9 years agoShave 0.5 seconds off check-webkit-style runtime for test_expectations.txt
ojan@chromium.org [Wed, 18 Jan 2012 23:14:56 +0000 (23:14 +0000)]
Shave 0.5 seconds off check-webkit-style runtime for test_expectations.txt
https://bugs.webkit.org/show_bug.cgi?id=76576

Reviewed by Adam Barth.

Avoid calling default_configuration in base.py. We don't need it for
checking test_expectations.txt style. It takes ~0.5 seconds to run on my
Mac Pro. It's the call to "perl Tools/Scripts/webkit-build-directory --top-level"
from common.executive.

At some point someone should probably look into why that call is so slow
since it's on the critical path for run-webkit-tests and build-webkit startup.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):
* Scripts/webkitpy/style/checkers/test_expectations.py:
(TestExpectationsChecker._determine_port_from_exepectations_path):

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

9 years agoIndexedDB: Implement create-intermediate-objects semantics when injecting values...
jsbell@chromium.org [Wed, 18 Jan 2012 23:07:26 +0000 (23:07 +0000)]
IndexedDB: Implement create-intermediate-objects semantics when injecting values via keyPaths
https://bugs.webkit.org/show_bug.cgi?id=76493

Source/WebCore:

Reviewed by Tony Chang.

Tests: storage/indexeddb/objectstore-autoincrement.html

* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::injectIDBKeyIntoSerializedValue):

LayoutTests:

Per discussion on public-webapps, when injecting a key into a value, create intermediate
objects if necessary.

Reviewed by Tony Chang.

* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-autoincrement.html:

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

9 years ago[chromium] move Tools.gyp, switch build-webkit --chromium to All.gyp
dpranke@chromium.org [Wed, 18 Jan 2012 23:03:04 +0000 (23:03 +0000)]
[chromium] move Tools.gyp, switch build-webkit --chromium to All.gyp
https://bugs.webkit.org/show_bug.cgi?id=76505

Reviewed by Tony Chang.

.:

Update with newly-generated files.

* .gitignore:

Source/WebKit/chromium:

Update path to Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp.

* All.gyp:
* gyp_webkit:
- change to using All.gyp
- change build_webkit_exes_from_webkit_gyp to 0

Tools:

Update chromium build script to use All.gyp instead of WebKit.gyp

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp: Renamed from Source/WebKit/chromium/Tools.gyp.
* Scripts/webkitdirs.pm:

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

9 years agoIndexedDB: Invalid keys yielded by key paths should raise exceptions, not error callbacks
jsbell@chromium.org [Wed, 18 Jan 2012 22:58:56 +0000 (22:58 +0000)]
IndexedDB: Invalid keys yielded by key paths should raise exceptions, not error callbacks
https://bugs.webkit.org/show_bug.cgi?id=76075

Reviewed by Tony Chang.

Source/WebCore:

Tests: storage/indexeddb/objectstore-basics.html

* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):

LayoutTests:

* storage/indexeddb/mozilla/bad-keypath-expected.txt:
* storage/indexeddb/mozilla/bad-keypath.html:
* storage/indexeddb/objectstore-basics-expected.txt:
* storage/indexeddb/objectstore-basics.html:

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

9 years ago[chromium] Fix compile error from bug #76211
jamesr@google.com [Wed, 18 Jan 2012 22:49:59 +0000 (22:49 +0000)]
[chromium] Fix compile error from bug #76211
https://bugs.webkit.org/show_bug.cgi?id=76575

Patch by Dana Jansens <danakj@chromium.org> on 2012-01-18
Reviewed by James Robinson.

No new tests. Fixing compile only.

* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::prepareToUpdate):

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

9 years ago[chromium] Update chromium linux pixel baseline for svg test
jamesr@google.com [Wed, 18 Jan 2012 22:49:02 +0000 (22:49 +0000)]
[chromium] Update chromium linux pixel baseline for svg test

* platform/chromium-linux/svg/custom/linking-a-03-b-viewBox-expected.png:

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

9 years ago[GTK] WebKit-3.0.gir does not include information about C includes or exported packages
mrobinson@webkit.org [Wed, 18 Jan 2012 22:48:42 +0000 (22:48 +0000)]
[GTK] WebKit-3.0.gir does not include information about C includes or exported packages
https://bugs.webkit.org/show_bug.cgi?id=49875

Patch by Evan Nemerson <evan@coeus-group.com> on 2012-01-18
Reviewed by Martin Robinson.

* GNUmakefile.am: Add some information to the GIR generator to fix
Vala binding generation.

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

9 years agoDon’t hardcode the path to ‘make‘.
mitz@apple.com [Wed, 18 Jan 2012 22:43:20 +0000 (22:43 +0000)]
Don’t hardcode the path to ‘make‘.

Patch by Sam Weinig <sam@webkit.org> on 2012-01-18
Reviewed by Dan Bernstein.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:

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

9 years agoIndexedDB: Check for permission before using IndexedDB from a worker.
dgrogan@chromium.org [Wed, 18 Jan 2012 22:39:19 +0000 (22:39 +0000)]
IndexedDB: Check for permission before using IndexedDB from a worker.
https://bugs.webkit.org/show_bug.cgi?id=76500

Reviewed by David Levin.

* src/IDBFactoryBackendProxy.cpp:
(WebKit::AllowIndexedDBMainThreadBridge::create):
(WebKit::AllowIndexedDBMainThreadBridge::cancel):
(WebKit::AllowIndexedDBMainThreadBridge::result):
(WebKit::AllowIndexedDBMainThreadBridge::signalCompleted):
(WebKit::AllowIndexedDBMainThreadBridge::AllowIndexedDBMainThreadBridge):
(WebKit::AllowIndexedDBMainThreadBridge::allowIndexedDBTask): Call
webView->permissionClient()->allowIndexedDB on the main thread because
ContentSettingsObserver::AllowIndexedDB(), which is called down the
chain, expects to be run on the main thread.
(WebKit::AllowIndexedDBMainThreadBridge::didComplete):
(WebKit::IDBFactoryBackendProxy::allowIDBFromWorkerThread): Wait for
main permission check to complete on main thread before proceeding on
worker thread.

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

9 years ago [Mac] Add a flag telling plug-in if it can enter sandbox
ap@apple.com [Wed, 18 Jan 2012 22:37:34 +0000 (22:37 +0000)]
    [Mac] Add a flag telling plug-in if it can enter sandbox
        https://bugs.webkit.org/show_bug.cgi?id=76467

        Reviewed by Anders Carlsson.

        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
        (WebKit::NPN_GetValue): Added a private flag.

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

9 years agoAdding myself to committers.py
jsbell@chromium.org [Wed, 18 Jan 2012 22:34:51 +0000 (22:34 +0000)]
Adding myself to committers.py
https://bugs.webkit.org/show_bug.cgi?id=76569

Unreviewed.

* Scripts/webkitpy/common/config/committers.py:

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