WebKit-https.git
8 years ago[BlackBerry] Clear local storage won't take effect until browser exit and relaunch
commit-queue@webkit.org [Thu, 5 Apr 2012 10:52:47 +0000 (10:52 +0000)]
[BlackBerry] Clear local storage won't take effect until browser exit and relaunch
https://bugs.webkit.org/show_bug.cgi?id=83253

Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-04-05
Reviewed by Rob Buis.

.:

RIM PR: #146871
Added a manual test case to test the behavior when press
button "Clear Local Storage" from browser settings.
It has to be a manual test as it requires user interaction.

* ManualTests/blackberry/clear-localstorage.html: Added.

Source/WebKit/blackberry:

RIM PR: #146871
Cleared the local storage namespace of a WebPage's PageGroup
when WebPage::clearLocalStorage() get called.
Also deleted unused global function clearLocalStorage().

* Api/BlackBerryGlobal.cpp:
* Api/BlackBerryGlobal.h:
(WebKit):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::clearLocalStorage):

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

8 years agoLayout Test fast/text/international/font-fallback-to-common-script.html has flaky...
commit-queue@webkit.org [Thu, 5 Apr 2012 10:41:07 +0000 (10:41 +0000)]
Layout Test fast/text/international/font-fallback-to-common-script.html has flaky image results on all Chromium bots
https://bugs.webkit.org/show_bug.cgi?id=81544

Patch by Matt Falkenhagen <falken@chromium.org> on 2012-04-05
Reviewed by Kent Tamura.

Skip embed-bidi-style-in-isolate-crash.html, which seems to cause the
subsequent layout test to fail (bug https://bugs.webkit.org/show_bug.cgi?id=83260).

* platform/chromium/test_expectations.txt:

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

8 years agowebkit_unit_tests build fix.
hans@chromium.org [Thu, 5 Apr 2012 10:14:43 +0000 (10:14 +0000)]
webkit_unit_tests build fix.
https://bugs.webkit.org/show_bug.cgi?id=83261

Unreviewed, webkit_unit_tests buildfix.

The CCLayerTreeHostTestEmptyContentsShouldNotDraw.runMultiThread test
stopped working after r113254.

Disable it for now.

Source/WebCore:

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

Source/WebKit/chromium:

* tests/CCLayerTreeHostTest.cpp:
(WTF):
(WTF::TEST_F):

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

8 years ago[Chromium] Remove a wrong expectation file for hebrew-vowels.html.
tkent@chromium.org [Thu, 5 Apr 2012 10:10:09 +0000 (10:10 +0000)]
[Chromium] Remove a wrong expectation file for hebrew-vowels.html.
https://bugs.webkit.org/show_bug.cgi?id=81544

* platform/chromium-mac-snowleopard/fast/text/international/hebrew-vowels-expected.txt: Removed.
* platform/chromium-mac/fast/text/international/hebrew-vowels-expected.txt: Removed.

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

8 years ago[GTK][DRT] Fail fast/filesystem/flags-passing.html on JSC
commit-queue@webkit.org [Thu, 5 Apr 2012 09:25:20 +0000 (09:25 +0000)]
[GTK][DRT] Fail fast/filesystem/flags-passing.html on JSC
https://bugs.webkit.org/show_bug.cgi?id=83137

Patch by ChangSeok Oh <shivamidow@gmail.com> on 2012-04-05
Reviewed by Kentaro Hara.

fast/filesystem/flags-passing.html is failed on webkitgtk+ applied FileSystem API patch
for bug58443. 'testsList' is a global array object, but it's accessed in runNextTest
function object like this, "this[testsList[testCounter++]]();". I'm not familiar
with JavaScript and V8, but in my understanding, it looks a bit strange.
'this' in the statement means runNextTest function object which doesn't have
testList array object. (It's a global scope variable.) This test might be able to
pass on V8 JS engine, but not on JSC at least my try.
'testsList' is changed from a function name array to a function array.

* fast/filesystem/script-tests/flags-passing.js:
(runNextTest):

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

8 years agoUnreviewed, GTK test_expectations update after r113292.
philn@webkit.org [Thu, 5 Apr 2012 09:13:34 +0000 (09:13 +0000)]
Unreviewed, GTK test_expectations update after r113292.

* platform/gtk/test_expectations.txt:

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

8 years ago[Qt] Unreviewed gardening after r113279
kkristof@inf.u-szeged.hu [Thu, 5 Apr 2012 09:08:45 +0000 (09:08 +0000)]
[Qt] Unreviewed gardening after r113279

* platform/qt/Skipped: Skip a new failing test because ENABLE(MUTATION_OBSERVERS) is disabled.

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

8 years ago[Qt] Unreviewed gardening
kkristof@inf.u-szeged.hu [Thu, 5 Apr 2012 08:58:42 +0000 (08:58 +0000)]
[Qt] Unreviewed gardening
https://bugs.webkit.org/show_bug.cgi?id=82607
Skip V8 specific test that currently not supported on Qt bots

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2012-04-05

* platform/qt/Skipped: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html

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

8 years ago[chromium] Only shut down V8 if we actually initialized it
jochen@chromium.org [Thu, 5 Apr 2012 08:53:05 +0000 (08:53 +0000)]
[chromium] Only shut down V8 if we actually initialized it
https://bugs.webkit.org/show_bug.cgi?id=83159

Reviewed by Pavel Feldman.

* src/WebKit.cpp:
(WebKit::initialize):
(WebKit::shutdown):

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

8 years ago[EFL] keycode translation is wrong for function keys
commit-queue@webkit.org [Thu, 5 Apr 2012 08:47:21 +0000 (08:47 +0000)]
[EFL] keycode translation is wrong for function keys
https://bugs.webkit.org/show_bug.cgi?id=82738

Source/WebCore:

This patch fixes keycode translation for function keys.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-04-05
Reviewed by Philippe Normand.

Test: fast/events/keydown-function-keys.html

* platform/efl/EflKeyboardUtilities.cpp:
(WebCore::createWindowsKeyMap):

LayoutTests:

Unskip fast/events/keydown-function-keys.html

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-04-05
Reviewed by Philippe Normand.

* platform/efl/Skipped:

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

8 years agoWork around an entity parsing bug in libxml2 2.7.3 (supplied with Lion) and unskip...
zimmermann@webkit.org [Thu, 5 Apr 2012 08:18:07 +0000 (08:18 +0000)]
Work around an entity parsing bug in libxml2 2.7.3 (supplied with Lion) and unskip tests
https://bugs.webkit.org/show_bug.cgi?id=82577

Reviewed by Filip Pizlo.

Source/WebCore:

Work-around entity expansion bug that affects several SVG tests on Lion.

Sample test document which is currently broken:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" [
<!ENTITY Smile "<rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>">
]>

<svg xmlns="http://www.w3.org/2000/svg">&Smile;</svg>

The expanded rect carries no namespace, thus an Element will be created for it, instead of a SVGRectElement.
libxml2 2.7.4 fixed this bug (https://bugzilla.gnome.org/show_bug.cgi?id=502960) in 2009 already, but Lion
still ships with 2.7.3, so we need to find a work-around for the problem. It works like this:
- When an entity is requested (getEntityHandler) determine whether the entity is being declared (while the <!ENTITY.. parses)
  or wheter its references (when the &Smile; is parsed). If its referenced, record the current depth of the libxml2 parser.
- When startElementNs is called while we're expanding entities, be sure to transfer the namespace of the parent node
  to the new node, but only do this if the current depth() is greater than the depth() at the time where entity expansion started.
  This way we only apply our workaround for elements inside entities, that get expanded at the insertion point.
- When endElementNs is called, and our current depth() is less than our equal to the depth() where entity expansion started,
  clear the recorded detph(), and stop executing the workaround.

It requires storing an extra integer & boolean in XMLDocumentParser, which is only used for this work-around.

* xml/parser/XMLDocumentParser.h:
(XMLDocumentParser):
(WebCore::XMLDocumentParser::isParsingEntityDeclaration):
(WebCore::XMLDocumentParser::setIsParsingEntityDeclaration):
(WebCore::XMLDocumentParser::depthTriggeringEntityExpansion):
(WebCore::XMLDocumentParser::setDepthTriggeringEntityExpansion):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::hackAroundLibXMLEntityParsingBug):
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::endElementNs):
(WebCore::entityDeclarationHandler):
(WebCore::getEntityHandler):
(WebCore::XMLDocumentParser::initializeParserContext):

LayoutTests:

Unskip several test on Lion, now that the libxml2 bug doesn't affect us anymore.

* platform/mac-lion/Skipped:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/coords-viewattr-01-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/coords-viewattr-01-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/coords-viewattr-02-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/coords-viewattr-02-b-expected.txt:
* platform/mac/svg/custom/preserve-aspect-ratio-syntax-expected.png:
* platform/mac/svg/custom/preserve-aspect-ratio-syntax-expected.txt:
* platform/mac/svg/custom/viewbox-syntax-expected.png:
* platform/mac/svg/custom/viewbox-syntax-expected.txt:
* platform/mac/svg/zoom/page/zoom-coords-viewattr-01-b-expected.png:
* platform/mac/svg/zoom/page/zoom-coords-viewattr-01-b-expected.txt:
* platform/mac/svg/zoom/text/zoom-coords-viewattr-01-b-expected.png:
* platform/mac/svg/zoom/text/zoom-coords-viewattr-01-b-expected.txt:

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

8 years agoAdd JavaScript and CSS code for the calendar picker implementation
tkent@chromium.org [Thu, 5 Apr 2012 07:30:51 +0000 (07:30 +0000)]
Add JavaScript and CSS code for the calendar picker implementation
https://bugs.webkit.org/show_bug.cgi?id=83011

Reviewed by Hajime Morita.

.:

* ManualTests/forms/calendar-picker.html: Added.

Source/WebCore:

Add calendarPicker.js and calendarPicker.css, and add a build rule to
generate a C++ file. This change doesn't make any behavior change
because the code is wrapped by ENABLE(CALENDAR_PICKER).

Tests: ManualTests/forms/calendar-picker.html

* Resources/calendarPicker.css: Added.
* Resources/calendarPicker.js: Added.
* WebCore.gyp/WebCore.gyp: Generate CalendarPicker.{cpp,h} from calendarPicker.{css,js}.

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

8 years agoExpose DataTransferItem.getAsEntry() to allow users access dropped files as FileEntry
kinuko@chromium.org [Thu, 5 Apr 2012 07:29:28 +0000 (07:29 +0000)]
Expose DataTransferItem.getAsEntry() to allow users access dropped files as FileEntry
https://bugs.webkit.org/show_bug.cgi?id=82592

Reviewed by David Levin.

Source/WebCore:

For now the method is prefixed thus it is to be exposed as 'webkitGetAsEntry'.

The API is proposed and discussed in the following whatwg thread:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html

Add DataTransferItemFilesystem under Modules/filesystem and implemented the bridging part for chromium.

Test: editing/pasteboard/data-transfer-items-drag-drop-entry.html

* Modules/filesystem/DataTransferItemFileSystem.h: Added.
(DataTransferItemFileSystem):
* Modules/filesystem/DataTransferItemFileSystem.idl: Added for DataTransferItem.getAsEntry which is only exposed if filesystem is enabled.
* Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Added for chromium implementation.
* Modules/filesystem/chromium/DataTransferItemFileSystemChromium.h: Added.
* Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp: Added.
* Modules/filesystem/chromium/DraggedIsolatedFileSystem.h: Added.
* WebCore.gypi:
* platform/chromium/ChromiumDataObject.cpp:
* platform/chromium/ChromiumDataObject.h:
(WebCore::ChromiumDataObject::filesystemId): Added.
(WebCore::ChromiumDataObject::setFilesystemId): Added.
* platform/chromium/ClipboardChromium.cpp:

Source/WebKit/chromium:

* src/WebDragData.cpp:
(WebKit::WebDragData::filesystemId): Added implementation.
(WebKit::WebDragData::setFilesystemId): Added implementation.

Tools:

Added filesystem hook support in EventSender.beginDragWithFiles() for DumpRenderTree.

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::beginDragWithFiles):

LayoutTests:

* editing/pasteboard/data-transfer-items-drag-drop-entry-expected.txt: Added.
* editing/pasteboard/data-transfer-items-drag-drop-entry.html: Added.
* editing/pasteboard/resources/test_directory/test.txt: Added.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:

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

8 years agoUnreviewed, GTK rebaseline after r113279.
philn@webkit.org [Thu, 5 Apr 2012 07:21:36 +0000 (07:21 +0000)]
Unreviewed, GTK rebaseline after r113279.

* platform/gtk/fast/dom/Window/window-properties-expected.txt:

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

8 years agoAdd WTF::getCurrentLocalTime()
paroga@webkit.org [Thu, 5 Apr 2012 06:40:16 +0000 (06:40 +0000)]
Add WTF::getCurrentLocalTime()
https://bugs.webkit.org/show_bug.cgi?id=83164

Reviewed by Alexey Proskuryakov.

Replace the calls to WTF::getLocalTime() with time(0) with the new function.
This allows us to use Win32 API on windows to get the same result in a next step.

Source/JavaScriptCore:

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/DateConstructor.cpp:
(JSC::callDate):

Source/WebCore:

* html/FTPDirectoryDocument.cpp:
(WebCore::processFileDateString):
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):

Source/WTF:

Also remove the inline keyword from WTF::getLocalTime(), since there is no need for
it and it will make the later Win32 API changes easier.

* WTF.gyp/WTF.gyp:
* wtf/CurrentTime.cpp:
(WTF::getLocalTime):
(WTF::getCurrentLocalTime):
* wtf/CurrentTime.h:

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

8 years agoRemove ReifiedTreeTraversal.
hayato@chromium.org [Thu, 5 Apr 2012 05:29:34 +0000 (05:29 +0000)]
Remove ReifiedTreeTraversal.
https://bugs.webkit.org/show_bug.cgi?id=83110

Reviewed by Dimitri Glazkov.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

We can now remove ReifiedTreeTraversal. All clients have switched to use ComposedShadowTreeWalker.

No new tests. No change in functionality.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ReifiedTreeTraversal.cpp: Removed.
* dom/ReifiedTreeTraversal.h: Removed.
* testing/Internals.cpp:
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit2:

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

LayoutTests:

* fast/dom/shadow/reified-tree-traversal-expected.txt: Removed.
* fast/dom/shadow/reified-tree-traversal.html: Removed.
* platform/efl/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:

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

8 years agoAnother unreviewed attempt at getting the EFL build bot to a
rakuco@webkit.org [Thu, 5 Apr 2012 05:29:05 +0000 (05:29 +0000)]
Another unreviewed attempt at getting the EFL build bot to a
healthy state by forcing a rebuild.

* ewk/ewk_cookies.h:

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

8 years agoLayout Test http/tests/websocket/tests/hybi/workers/worker-reload.html is flaky
yutak@chromium.org [Thu, 5 Apr 2012 05:17:15 +0000 (05:17 +0000)]
Layout Test http/tests/websocket/tests/hybi/workers/worker-reload.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=83173

Reviewed by David Levin.

Try to deflake the test by
- decreasing the number of reloads in the test, and
- changing the URL of WebSocket to silence random console messages.

* http/tests/websocket/tests/hybi/workers/resources/worker-reload-iframe.html:
Reloading 100 times seemed too much, as Chromium debug bots frequently time out.
* http/tests/websocket/tests/hybi/workers/resources/worker-reload.js:
Use a real URL to avoid random console messages.

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

8 years agoWorkerEventQueue::close might access deleted WorkerEventQueue::EventDispatcherTask.
dslomov@google.com [Thu, 5 Apr 2012 05:15:10 +0000 (05:15 +0000)]
WorkerEventQueue::close might access deleted WorkerEventQueue::EventDispatcherTask.
https://bugs.webkit.org/show_bug.cgi?id=83202

On closing the event queue, WorkerEventQueue cancels all the tasks associated with events.
The tasks in their turn delete themselves from the map whenever task gets executed.
However if shutdown occurs when task is in queue but before task gets executed, the task will be deleted without execution.
This patch makes sure that no deleted tasks stay in WorkerEventQueue, by task removing itself in destructor.

Reviewed by David Levin.

Covered by existing tests.

* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::EventDispatcherTask::~EventDispatcherTask):
(WorkerEventQueue::EventDispatcherTask):
(WebCore::WorkerEventQueue::EventDispatcherTask::performTask):

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

8 years agoUnreviewed; touch a file to check if the EFL build bot is back to
rakuco@webkit.org [Thu, 5 Apr 2012 05:13:09 +0000 (05:13 +0000)]
Unreviewed; touch a file to check if the EFL build bot is back to
normal.

* ewk/ewk_cookies.h:

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

8 years agoRenderLayer scrollbars' updates should be split between layout induced and style...
jchaffraix@webkit.org [Thu, 5 Apr 2012 04:30:23 +0000 (04:30 +0000)]
RenderLayer scrollbars' updates should be split between layout induced and style change induced
https://bugs.webkit.org/show_bug.cgi?id=83213

Reviewed by Simon Fraser.

Refactoring only, no change in behavior.

This patches splits up the 2 reasons for modifying the scrollbars:
- style updates, handled in updateScrollbarsAfterStyleChange.
- layout time, handled in updateScrollbarsAfterLayout.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::contentsSize):
Removed now unneeded const-casts.

(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
Updated to use hasHorizontalScrollbar / hasVerticalScrollbar.

(WebCore::RenderLayer::scrollWidth):
(WebCore::RenderLayer::scrollHeight):
Made those functions |const|.

(WebCore::RenderLayer::computeScrollDimensions):
Removed the unneeded booleans and move the do-we-have-overflow-logic
into hasHorizontalOverflow and hasVerticalOverflow.

(WebCore::RenderLayer::hasHorizontalOverflow):
(WebCore::RenderLayer::hasVerticalOverflow):
Added those new helper functions.

(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
Updated the latter to call the former.

(WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
(WebCore::RenderLayer::styleChanged):
Ditto.

(WebCore::overflowCanHaveAScrollbar):
Add this helper function for updateScrollbarsAfterStyleChange.

* rendering/RenderLayer.h:
(WebCore::RenderLayer::hasHorizontalScrollbar):
(WebCore::RenderLayer::hasVerticalScrollbar):
Added those 2 new helper functions.

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

8 years ago[mac] WKTR should always keep its windows offscreen
timothy_horton@apple.com [Thu, 5 Apr 2012 04:28:38 +0000 (04:28 +0000)]
[mac] WKTR should always keep its windows offscreen
https://bugs.webkit.org/show_bug.cgi?id=83244
<rdar://problem/11188764>

Reviewed by Simon Fraser.

We don't want to allow windows onto the main display; intercept attempts to
change WebKitTestRunnerWindow's frame origin and prevent it from happening.

Also keep around and respond with a new "fake" origin, in case someone is
expecting it to change (I couldn't find any tests that expected this, however).

* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(-[WebKitTestRunnerWindow setFrameOrigin:]):
(-[WebKitTestRunnerWindow setFrame:display:animate:]):
(-[WebKitTestRunnerWindow setFrame:display:]):
(-[WebKitTestRunnerWindow frame]):

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

8 years agoAuto-size may not work on first load
commit-queue@webkit.org [Thu, 5 Apr 2012 04:22:50 +0000 (04:22 +0000)]
Auto-size may not work on first load
https://bugs.webkit.org/show_bug.cgi?id=82989

Patch by Andrei Burago <aburago@chromium.org> on 2012-04-04
Reviewed by David Levin.

No new tests. The only known repro scenario involves using chrome with a third-party extension,
which makes making a test out of it problematic.

* dom/Document.cpp:
(WebCore::Document::implicitClose):
* page/FrameView.cpp:
(WebCore::FrameView::autoSizeIfEnabled):

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

8 years agoXSSAuditor doesn't catch injected srcdoc attributes
abarth@webkit.org [Thu, 5 Apr 2012 04:18:26 +0000 (04:18 +0000)]
XSSAuditor doesn't catch injected srcdoc attributes
https://bugs.webkit.org/show_bug.cgi?id=83238

Reviewed by Daniel Bates.

Source/WebCore:

<iframe srcdoc> is an XSS injection vector because the srcdoc inherits
the security origin of the parent page.  This patch updates the XSS
auditor to check whether the attribute is injected using the same
hueristics we use for inline event handlers.

Test: http/tests/security/xssAuditor/iframe-srcdoc.html

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterIframeToken):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
(WebCore::XSSAuditor::eraseAttributeIfInjected):
(WebCore::XSSAuditor::decodedSnippetForAttribute):
* html/parser/XSSAuditor.h:

LayoutTests:

* http/tests/security/xssAuditor/iframe-srcdoc-expected.txt: Added.
* http/tests/security/xssAuditor/iframe-srcdoc.html: Added.

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

8 years ago[BlackBerry] Add local: protocol support in KURL for blackberry
leo.yang@torchmobile.com.cn [Thu, 5 Apr 2012 04:06:30 +0000 (04:06 +0000)]
[BlackBerry] Add local: protocol support in KURL for blackberry
https://bugs.webkit.org/show_bug.cgi?id=82695

Reviewed by Rob Buis.

BlackBerry porting is using local: protocol just as file: protocol
with the exception that it sandboxes the path to the application private space.

* platform/KURL.cpp:
(WebCore::KURL::parse):
(WebCore::portAllowed):

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

8 years agoSource/WebCore: https://bugs.webkit.org/show_bug.cgi?id=82994
simon.fraser@apple.com [Thu, 5 Apr 2012 03:44:19 +0000 (03:44 +0000)]
Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=82994

Reviewed by James Robinson.

Fix an issue when removing elements with reflections from the document.

Test: compositing/reflections/remove-reflection.html

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::willBeDestroyed):

LayoutTests: REGRESSION(112939): compositing/reflections/backface-hidden-reflection.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=82994

Reviewed by James Robinson.

Test that removes reflected elements.

* compositing/reflections/remove-reflection-expected.txt: Added.
* compositing/reflections/remove-reflection.html: Added.

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

8 years agoNeed using namespace std for system calls in MIMESniffing.cpp
charles.wei@torchmobile.com.cn [Thu, 5 Apr 2012 03:43:21 +0000 (03:43 +0000)]
Need using namespace std for system calls in MIMESniffing.cpp
https://bugs.webkit.org/show_bug.cgi?id=82706

Reviewed by Antonio Gomes.

No new tests, just fix the compile error for BlackBerry porting.

* platform/network/MIMESniffing.cpp:

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

8 years agoSwitch web intents API to be vendor-prefixed
commit-queue@webkit.org [Thu, 5 Apr 2012 03:36:12 +0000 (03:36 +0000)]
Switch web intents API to be vendor-prefixed
https://bugs.webkit.org/show_bug.cgi?id=83172

Patch by Greg Billock <gbillock@google.com> on 2012-04-04
Reviewed by Adam Barth.

Source/WebCore:

* Modules/intents/DOMWindowIntents.idl:
* Modules/intents/NavigatorIntents.cpp:
(WebCore::NavigatorIntents::webkitStartActivity):
* Modules/intents/NavigatorIntents.h:
(NavigatorIntents):
* Modules/intents/NavigatorIntents.idl:

LayoutTests:

* webintents/resources/web-intents-reload-orig.html:
* webintents/resources/web-intents-testing.js:
(startIntentWithCallbacks):
* webintents/web-intents-api-expected.txt:
* webintents/web-intents-api.html:
* webintents/web-intents-invoke.html:

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

8 years ago[Part 4] We should use CSSPropertyID rather than integers when manipulating CSS prope...
alexis.menard@openbossa.org [Thu, 5 Apr 2012 03:08:10 +0000 (03:08 +0000)]
[Part 4] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
https://bugs.webkit.org/show_bug.cgi?id=83224

Reviewed by Tony Chang.

CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids
as integers. While it's not incorrect it is nicer to use the enum as a parameter of
functions manipulating property ids, as we ensure that the value passed will be an
existing value. This patch clean up some remaining part of code.

No new tests : There should be no behavior change in this patch.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
* page/animation/AnimationBase.h:
(WebCore::AnimationBase::affectsProperty):
(WebCore::AnimationBase::isAnimatingProperty):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::getAnimationForProperty):
(WebCore::CompositeAnimation::overrideImplicitAnimations):
(WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
(WebCore::CompositeAnimation::isAnimatingProperty):
* page/animation/CompositeAnimation.h:
(CompositeAnimation):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::affectsProperty):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::transitionProperty):
(WebCore::ImplicitAnimation::animatingProperty):
(ImplicitAnimation):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
(WebCore::KeyframeAnimation::hasAnimationForProperty):
(WebCore::KeyframeAnimation::overrideAnimations):
(WebCore::KeyframeAnimation::resumeOverriddenAnimations):
(WebCore::KeyframeAnimation::affectsProperty):
* page/animation/KeyframeAnimation.h:
(KeyframeAnimation):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::transitionPaused):
(WebCore::RenderLayerBacking::transitionFinished):
(WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
(WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):

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

8 years ago[Chromium] Calendar Picker: Add localization functions
tkent@chromium.org [Thu, 5 Apr 2012 02:50:46 +0000 (02:50 +0000)]
[Chromium] Calendar Picker: Add localization functions
https://bugs.webkit.org/show_bug.cgi?id=83235

Reviewed by Adam Barth.

Implement calendarTodayText() and calendarClearText(), which are
introduced in http://trac.webkit.org/changeset/113166

* public/platform/WebLocalizedString.h:
Add CalendarClear and CalendarToday.
* src/LocalizedStrings.cpp:
(WebCore::calendarTodayText): Added.
(WebCore::calendarClearText): Added.

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

8 years ago[MutationObservers] implement takeRecords()
rafaelw@chromium.org [Thu, 5 Apr 2012 02:50:25 +0000 (02:50 +0000)]
[MutationObservers] implement takeRecords()
https://bugs.webkit.org/show_bug.cgi?id=83218

Reviewed by Ojan Vafai.

Source/WebCore:

This patch implements MutationObserver.takeRecords per the DOM4 spec.
takeRecords retrieves and clears any pending mutation records for
the observer.

Test: fast/mutation/takeRecords.html

* dom/WebKitMutationObserver.cpp:
(WebCore::WebKitMutationObserver::takeRecords):
(WebCore):
(WebCore::WebKitMutationObserver::deliver):
* dom/WebKitMutationObserver.h:
* dom/WebKitMutationObserver.idl:

LayoutTests:

* fast/mutation/takeRecords-expected.txt: Added.
* fast/mutation/takeRecords.html: Added.

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

8 years agoRebaseline for r113252.
inferno@chromium.org [Thu, 5 Apr 2012 02:42:57 +0000 (02:42 +0000)]
Rebaseline for r113252.

Unreviewed.

* platform/qt/fast/css/bidi-override-in-anonymous-block-expected.txt:

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

8 years agoFix typo introduced in r113271.
dpranke@chromium.org [Thu, 5 Apr 2012 02:35:54 +0000 (02:35 +0000)]
Fix typo introduced in r113271.

Unreviewed, build fix.

* Scripts/webkitpy/common/net/file_uploader.py:
(FileUploader._upload_data.callback):
(FileUploader):

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

8 years agoShadow DOM is exposed in JS.
shinyak@chromium.org [Thu, 5 Apr 2012 02:28:15 +0000 (02:28 +0000)]
Shadow DOM is exposed in JS.
https://bugs.webkit.org/show_bug.cgi?id=82607

Reviewed by Hajime Morita.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

DOMSelection didn't consider nested shadow trees. This patch makes DOMSelection
take nested shadow trees into account.

To test that the element is not in a shadow tree, Internals has a treeScopeRootNode method
which returns the root node of the belonging tree scope.

Test: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html

* WebCore.exp.in:
* page/DOMSelection.cpp:
(WebCore::selectionShadowAncestor):
(WebCore):
* testing/Internals.cpp:
(WebCore::Internals::treeScopeRootNode):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit2:

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

LayoutTests:

* fast/dom/shadow/selection-shouldnt-expose-shadow-dom-expected.txt: Added.
* fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html: Added.

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

8 years agoUpdate a layout test, adding a case for traversing a ShadowRoot which does not have...
hayato@chromium.org [Thu, 5 Apr 2012 02:07:27 +0000 (02:07 +0000)]
Update a layout test, adding a case for traversing a ShadowRoot which does not have any children.
https://bugs.webkit.org/show_bug.cgi?id=82593

Reviewed by Dimitri Glazkov.

Prior to r113125, if we traverse a ShadowRoot which does not have any children,
it caused an assertion failure on debug build. r113125 fixed this issue implicitly.
Adds a test case for that to catch a future regression.

* fast/dom/shadow/focus-navigation-expected.html:
* fast/dom/shadow/focus-navigation.html:

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

8 years ago[Chromium, DRT] Bounds check indices on gamepadController
commit-queue@webkit.org [Thu, 5 Apr 2012 01:57:19 +0000 (01:57 +0000)]
[Chromium, DRT] Bounds check indices on gamepadController
https://bugs.webkit.org/show_bug.cgi?id=83192

Invalid test data would cause bad array accesses. Add simple checks to
ignore such invalid data.

Patch by Scott Graham <scottmg@google.com> on 2012-04-04
Reviewed by Kent Tamura.

* DumpRenderTree/chromium/GamepadController.cpp:
(GamepadController::connect):
(GamepadController::disconnect):
(GamepadController::setId):
(GamepadController::setButtonCount):
(GamepadController::setButtonData):
(GamepadController::setAxisCount):
(GamepadController::setAxisData):

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

8 years agoReplace further usage of int with CSSPropertyID.
macpherson@chromium.org [Thu, 5 Apr 2012 01:42:05 +0000 (01:42 +0000)]
Replace further usage of int with CSSPropertyID.
https://bugs.webkit.org/show_bug.cgi?id=83119

Reviewed by Simon Fraser.

No new tests / no functionality changed.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::logUnimplementedPropertyID):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSGrammar.y:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
* css/CSSParser.h:
(CSSParser):
(WebCore::ShorthandScope::~ShorthandScope):
* css/CSSProperty.h:
(WebCore::CSSProperty::CSSProperty):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
* css/StylePropertySet.h:
(StylePropertySet):
* css/makeprop.pl:
* dom/StyledElement.h:
(StyledElement):
* editing/EditingStyle.h:
(EditingStyle):
* html/HTMLElement.h:
(HTMLElement):

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

8 years agoUse PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
adamk@chromium.org [Thu, 5 Apr 2012 01:38:28 +0000 (01:38 +0000)]
Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
https://bugs.webkit.org/show_bug.cgi?id=82238

Reviewed by Adam Barth.

Relanding r112163 without modification, as it still seems valid.
Will watch Chrome Canaries closely for any memory issues.

The setJSWrapper* methods previously featured a comment that asked
callers to ref the objects before passing them in. This change makes
that contract explicit (and allows the removal of the comment).

In addition, for ConstructorCallbacks, this change slightly reduces
refcount churn by passing on the initial ref via RefPtr::release().

No new tests, no change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
(GenerateNamedConstructorCallback): ditto.
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
(WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
(WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
* bindings/v8/V8Proxy.h:
(WebCore::toV8): Remove explicit ref.
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
(WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback): ditto.
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback): ditto.

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

8 years agonrwt is failing to upload test results on the chromium-mac-leopard bots
dpranke@chromium.org [Thu, 5 Apr 2012 01:17:13 +0000 (01:17 +0000)]
nrwt is failing to upload test results on the chromium-mac-leopard bots
https://bugs.webkit.org/show_bug.cgi?id=83230

Reviewed by Ojan Vafai.

More debugging info and a possible fix - stop messing with the
default network timeout, and don't swallow URLErrors.

* Scripts/webkitpy/common/net/file_uploader.py:
(FileUploader._upload_data):
* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run):
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGeneratorBase.upload_json_files):

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

8 years agoParser fails to revert some state after parsing expression and object literals.
oliver@apple.com [Thu, 5 Apr 2012 00:56:54 +0000 (00:56 +0000)]
Parser fails to revert some state after parsing expression and object literals.
https://bugs.webkit.org/show_bug.cgi?id=83236

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

Reset left hand side counter after parsing the literals.

* parser/Parser.cpp:
(JSC::::parseObjectLiteral):
(JSC::::parseStrictObjectLiteral):
(JSC::::parseArrayLiteral):

LayoutTests:

Add more parser test cases.

* fast/js/parser-syntax-check-expected.txt:
* fast/js/script-tests/parser-syntax-check.js:

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

8 years agoDFG InstanceOf should not uselessly speculate cell
fpizlo@apple.com [Thu, 5 Apr 2012 00:48:08 +0000 (00:48 +0000)]
DFG InstanceOf should not uselessly speculate cell
https://bugs.webkit.org/show_bug.cgi?id=83234

Reviewed by Oliver Hunt.

If InstanceOf is the only user of its child then don't speculate cell, since
the not-cell case is super easy to handle.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInstanceOf):

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

8 years agoWaveTable::waveDataForFundamentalFrequency() should properly interpret negative frequency
crogers@google.com [Thu, 5 Apr 2012 00:14:41 +0000 (00:14 +0000)]
WaveTable::waveDataForFundamentalFrequency() should properly interpret negative frequency
https://bugs.webkit.org/show_bug.cgi?id=83228

Reviewed by Kenneth Russell.

* Modules/webaudio/WaveTable.cpp:
(WebCore::WaveTable::waveDataForFundamentalFrequency):

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

8 years agoDelay post-insertion notifications until new DOM tree is complete
adamk@chromium.org [Thu, 5 Apr 2012 00:05:24 +0000 (00:05 +0000)]
Delay post-insertion notifications until new DOM tree is complete
https://bugs.webkit.org/show_bug.cgi?id=82631

Reviewed by Ojan Vafai.

Source/WebCore:

When inserting a DocumentFragment, WebKit previously would update both
internal WebCore state and mutation event listeners after each node
was inserted. This is inconsistent not only with DOM4, but also
with (at least) Firefox and IE. Given the many bugs over the years in
WebKit due to this behavior, it seems better to delay notification
until the fragment is completely inserted.

The changes to the three core mutation methods below are similar:
the only logic remaining in the loop is checking that insertion is
possible and taking care of that insertion. The entire loop is then
wrapped in forbidEventDispatch/allowEventDispatch, effectively
asserting that none of the code inside will have side effects.

The one bit of logic added to the loop is resizing the targets
vector down to the set of nodes actually inserted as part of the
loop. This makes it possible to simply pass the vector on to
notifyChildrenInserted without having to also pass along a count of
actually-inserted nodes.

As for the code that used to live inside the loop that could have
side-effects, or depended on those side-effects, it has been moved
out, either above (the check that the refChild is still valid in
insertBefore) or after (the calls to notifyChildrenInserted).

Finally, it was necessary to retrofit ChildListMutationScope to take a
vector of added nodes instead of a single node at a time, due to the
assertions in isAddedNodeInOrder (now renamed to be plural). Note that
there is now a single call to ChildListMutationScope::childrenAdded,
inside notifyChildrenInserted.

Test: fast/events/domnodeinserted-entire-fragment.html

* dom/ChildListMutationScope.cpp:
(ChildListMutationScope::MutationAccumulator): Renamed method to be plural.
(WebCore::ChildListMutationScope::MutationAccumulator::areAddedNodesInOrder): Handle a NodeVector instead of a Node.
(WebCore::ChildListMutationScope::MutationAccumulator::childrenAdded): Handle adding a NodeVector instead of a Node.
(WebCore::ChildListMutationScope::MutationAccumulationRouter::childrenAdded): Renamed to be plural, pass NodeVector through.
* dom/ChildListMutationScope.h:
(WebCore::ChildListMutationScope::childrenAdded): ditto.
(MutationAccumulationRouter):
* dom/ContainerNode.cpp:
(WebCore): Renamed updateTreeAfterInsertion to notifyChildrenInserted.
(WebCore::ContainerNode::insertBefore): See main ChangeLog explanation.
(WebCore::ContainerNode::replaceChild): ditto.
(WebCore::ContainerNode::appendChild): ditto.
(WebCore::dispatchChildInsertionEvents): Remove MutationObserver handling.
(WebCore::notifyChildrenInserted): Handle a NodeVector of all inserted children,
and take on responsiblity for MutationObserver handling as well as dispatchSubtreeModifiedEvent.

LayoutTests:

* fast/events/domnodeinserted-entire-fragment-expected.txt: Added.
* fast/events/domnodeinserted-entire-fragment.html: Added.

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

8 years agoRealtimeAnalyserNode should support smaller analysis sizes
crogers@google.com [Thu, 5 Apr 2012 00:03:04 +0000 (00:03 +0000)]
RealtimeAnalyserNode should support smaller analysis sizes
https://bugs.webkit.org/show_bug.cgi?id=83215

Source/WebCore:

Reviewed by Kenneth Russell.

RealtimeAnalyserNode analysis size currently goes no lower than 128.
It is useful to support lower power-of-two sizes.
Decrease this limit to 32.

Updated webaudio/realtimeanalyser-fft-sizing-expected.txt

* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore):

LayoutTests:

Reviewed by Kenneth Russell.

* webaudio/realtimeanalyser-fft-sizing-expected.txt:
* webaudio/realtimeanalyser-fft-sizing.html:

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

8 years agoUnify and modernize fast/css/{outline,background}-currentcolor.html
commit-queue@webkit.org [Thu, 5 Apr 2012 00:00:31 +0000 (00:00 +0000)]
Unify and modernize fast/css/{outline,background}-currentcolor.html
https://bugs.webkit.org/show_bug.cgi?id=75523

Patch by David Barr <davidbarr@chromium.org> on 2012-04-04
Reviewed by Daniel Bates.

Use js-test-pre utility functions instead of hardcoded testing logic
to simplify the test code and make the test more closely conform to
the visual appearance of other PASS/FAIL tests.

* fast/css/background-currentcolor-expected.txt:
* fast/css/background-currentcolor.html:
* fast/css/outline-currentcolor-expected.txt:
* fast/css/outline-currentcolor.html:

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

8 years agoCSS transitions should work on the flex property
tony@chromium.org [Wed, 4 Apr 2012 23:57:33 +0000 (23:57 +0000)]
CSS transitions should work on the flex property
https://bugs.webkit.org/show_bug.cgi?id=75915

Reviewed by Dean Jackson.

Source/WebCore:

Test: transitions/flex-transitions.html

* page/animation/AnimationBase.cpp:
(WebCore::PropertyWrapperGetter::equals): Fix indention.
(PropertyWrapperFlex): Add a wrapper for -webkit-flex which has 3 values (two floats and
a length), but is not a shorthand.
(WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
(WebCore::PropertyWrapperFlex::equals):
(WebCore::PropertyWrapperFlex::blend):
(WebCore):
(WebCore::AnimationBase::ensurePropertyMap):

LayoutTests:

* transitions/flex-transitions-expected.txt: Added.
* transitions/flex-transitions.html: Added.

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

8 years agoXSSAuditor bypass through HTTP Parameter Pollution.
tsepez@chromium.org [Wed, 4 Apr 2012 23:54:28 +0000 (23:54 +0000)]
XSSAuditor bypass through HTTP Parameter Pollution.
https://bugs.webkit.org/show_bug.cgi?id=81283

Reviewed by Adam Barth.

Source/WebCore:

Deal with concatenation of multiple parameters via comma-splicing that
is common to some webservers. We can no longer trust that all of the
attributes of a reflected script tag, nor the reflected script itself,
came from the same single URL parameter. The fix is to take commas into
account when trucating the snippet used for matching.

Test: http/tests/security/xssAuditor/script-tag-with-comma.html

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterScriptToken):
(WebCore):
(WebCore::XSSAuditor::decodedSnippetForName):
(WebCore::XSSAuditor::decodedSnippetForJavaScript):

LayoutTests:

* http/tests/security/xssAuditor/script-tag-with-comma-expected.txt: Added.
* http/tests/security/xssAuditor/script-tag-with-comma.html: Added.

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

8 years agoFixed minor error: "& 3" should be "& 2".
msaboff@apple.com [Wed, 4 Apr 2012 23:50:53 +0000 (23:50 +0000)]
Fixed minor error: "& 3" should be "& 2".

Rubber-stamped by Oliver Hunt.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::additionBlindedConstant):

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

8 years agoText input doesn't work for some Flash forms
andersca@apple.com [Wed, 4 Apr 2012 23:28:25 +0000 (23:28 +0000)]
Text input doesn't work for some Flash forms
https://bugs.webkit.org/show_bug.cgi?id=83232
<rdar://problem/11186162>

Reviewed by Alexey Proskuryakov.

If a plug-in is instantiated when the WKView is not focused, text input wouldn't work. The reason for this
is that WebPage::windowIsFocused() would only return true if the window and the WKView are both focused. Rename
this member function to windowAndWebPageAreFocused, add a new windowIsFocused member function that does the right thing
and change WebPage::focusedWebPage to use windowAndWebPageAreFocused.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowIsFocused):
(WebKit):
(WebKit::WebPage::windowAndWebPageAreFocused):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::focusedWebPage):

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

8 years agoPaginated webviews render nothing in their gutters
mitz@apple.com [Wed, 4 Apr 2012 23:23:28 +0000 (23:23 +0000)]
Paginated webviews render nothing in their gutters
https://bugs.webkit.org/show_bug.cgi?id=83231

Reviewed by Adele Peterson.

When the RenderView has columns, nothing draws in the gutters.

* page/FrameView.cpp:
(WebCore::FrameView::paintContents): Paint the background color behind everything when
paginated.

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

8 years ago[Chromium] Update expectations for Leopard.
dglazkov@chromium.org [Wed, 4 Apr 2012 23:17:35 +0000 (23:17 +0000)]
[Chromium] Update expectations for Leopard.

* platform/chromium-mac-leopard/ietestcenter/css3/bordersbackgrounds: Added.
* platform/chromium-mac-leopard/svg/css/group-with-shadow-expected.png: Added.

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

8 years agoinline script for flexbox tests
tony@chromium.org [Wed, 4 Apr 2012 23:10:53 +0000 (23:10 +0000)]
inline script for flexbox tests
https://bugs.webkit.org/show_bug.cgi?id=83220

Reviewed by Ojan Vafai.

Inline the .js test files into the .html files. These tests don't need
to be in a separate file.

* css3/flexbox/css-properties.html:
* css3/flexbox/display-flexbox-set-get.html:
* css3/flexbox/resources/display-flexbox-set-get.js: Removed.
* css3/flexbox/script-tests/TEMPLATE.html: Removed.
* css3/flexbox/script-tests/css-properties.js: Removed.

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

8 years agoRebaseline for r113252.
inferno@chromium.org [Wed, 4 Apr 2012 23:06:56 +0000 (23:06 +0000)]
Rebaseline for r113252.

Unreviewed.

* platform/gtk/fast/css/bidi-override-in-anonymous-block-expected.txt:

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

8 years agonrwt is failing to upload test results on the chromium-mac-leopard bots
dpranke@chromium.org [Wed, 4 Apr 2012 23:01:32 +0000 (23:01 +0000)]
nrwt is failing to upload test results on the chromium-mac-leopard bots
https://bugs.webkit.org/show_bug.cgi?id=83230

Reviewed by Ojan Vafai.

* Scripts/webkitpy/common/net/file_uploader.py:
(FileUploader.__init__):
(FileUploader._upload_data.callback):
(FileUploader):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._upload_json_files):
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGeneratorBase.upload_json_files):

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

8 years agoCall histogramEnumeration directly
commit-queue@webkit.org [Wed, 4 Apr 2012 22:55:09 +0000 (22:55 +0000)]
Call histogramEnumeration directly
https://bugs.webkit.org/show_bug.cgi?id=83106

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2012-04-04
Reviewed by Adam Barth.

Part of a refactoring project to remove the PlatformSupport
abstraction from some functions. See bug 82948.

Source/WebCore:

* bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
(WebCore::histogramEnumeration):
* platform/chromium/HistogramSupportChromium.cpp:
(WebCore::HistogramSupport::histogramEnumeration):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::shouldRunModalDialogDuringPageDismissal):
* src/PlatformSupport.cpp:
(WebCore):

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

8 years ago2012-04-04 Zhenyao Mo <zmo@google.com>
zmo@google.com [Wed, 4 Apr 2012 22:53:02 +0000 (22:53 +0000)]
2012-04-04  Zhenyao Mo  <zmo@google.com>

        Unreviewed, GPU bots build fix.

        Commited on behalf of sievers@chromium.org.

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

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

8 years agoConstant Blinding for add/sub immediate crashes in ArmV7 when dest is SP
msaboff@apple.com [Wed, 4 Apr 2012 22:42:29 +0000 (22:42 +0000)]
Constant Blinding for add/sub immediate crashes in ArmV7 when dest is SP
https://bugs.webkit.org/show_bug.cgi?id=83191

Reviewed by Oliver Hunt.

Make are that blinded constant pairs are similarly aligned to the
original immediate values so that instructions that expect that
alignment work correctly.  One example is ARMv7 add/sub imm to SP.

* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::add): Added ASSERT that immediate is word aligned.
(JSC::ARMv7Assembler::sub): Added ASSERT that immediate is word aligned.
(JSC::ARMv7Assembler::sub_S): Added ASSERT that immediate is word aligned.
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::additionBlindedConstant):

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

8 years agoAdd helpers to create anonymous table parts.
inferno@chromium.org [Wed, 4 Apr 2012 22:41:56 +0000 (22:41 +0000)]
Add helpers to create anonymous table parts.
https://bugs.webkit.org/show_bug.cgi?id=83116

Reviewed by Julien Chaffraix.

Source/WebCore:

The patch introduces helpers to create anonymous table parts by
introducing a new static function createAnonymousWithParentRenderer.
The function builds a new anonymous wrapper of the same type as the class,
inheriting style properties from parent and sets a display based on
argument/default values. Also we streamline the RenderBlock functions
to match this naming convention.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymousBlockWithSameTypeAs):
(WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
(WebCore):
(WebCore::RenderBlock::createAnonymousColumnsWithParentRendererAndDisplay):
(WebCore::RenderBlock::createAnonymousColumnSpanWithParentRendererAndDisplay):
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::createAnonymousBlock):
(WebCore::RenderBlock::createAnonymousColumnsBlock):
(WebCore::RenderBlock::createAnonymousColumnSpanBlock):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::addChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTable.h:
(RenderTable):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTableCell.h:
(RenderTableCell):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild):
(WebCore::RenderTableRow::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTableRow.h:
(RenderTableRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTableSection.h:
(RenderTableSection):

LayoutTests:

Rebaselining tests because we now correctly inherit the bidi override.

* platform/chromium-mac/fast/css/bidi-override-in-anonymous-block-expected.txt:
* platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt:

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

8 years ago[Chromium] Adjust expectations for fast/text/international/spaces-combined-in-vertica...
dglazkov@chromium.org [Wed, 4 Apr 2012 22:36:41 +0000 (22:36 +0000)]
[Chromium] Adjust expectations for fast/text/international/spaces-combined-in-vertical-text.html

* platform/chromium/test_expectations.txt: Tweaked some more.

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

8 years ago[V8] Add a per context data store and use that for caching boiler plates as well...
arv@chromium.org [Wed, 4 Apr 2012 22:30:56 +0000 (22:30 +0000)]
[V8] Add a per context data store and use that for caching boiler plates as well as constructor functions
https://bugs.webkit.org/show_bug.cgi?id=83093

Reviewed by Adam Barth.

Source/WebCore:

This introduces a V8BindingPerContextData class. After creating a new v8::Context we also create a new
per context data instance. This instance maintains the boiler plate and constructor caches. V8DOMWrapper
now delegates the caching to this new class. Previously the caching was only done in V8DOMWindowShell which
made workers and isolated worlds behave slightly different.

Tests: fast/dom/constructor-proto.html
       fast/workers/constructor-proto.html

* WebCore.gypi:
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorGetter): Renamed getConstructor to constructorForType.
* bindings/v8/V8BindingPerContextData.cpp: Added.
(WebCore):
(WebCore::V8BindingPerContextData::dispose): This clears the persistent handles stored in the maps.
(WebCore::V8BindingPerContextData::init): This installs the hidden prototype which is used as the
[[Prototype]] for the constructor functions (for HotMail compat).
(WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): Instantiates a new object and
stores it in the boilerplate map, and returns a clone.
(WebCore::V8BindingPerContextData::constructorForTypeSlowCase): Creates the function for the constructor
and stores it in the constructor map.
* bindings/v8/V8BindingPerContextData.h: Added.
(WebCore):
(V8BindingPerContextData):
(WebCore::V8BindingPerContextData::create):
(WebCore::V8BindingPerContextData::~V8BindingPerContextData):
(WebCore::V8BindingPerContextData::createWrapperFromCache): Checks the cache and clones the wrapper in
the cache. If no boiler plate exists one is created and cached.
(WebCore::V8BindingPerContextData::constructorForType): If the constructor already exists the cached
constructor function is returned, otherwise a new constructor function is created and cached.
(WebCore::V8BindingPerContextData::V8BindingPerContextData):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::disposeContextHandles): Clear the per context data when disposing the handles.
(WebCore::V8DOMWindowShell::initContextIfNeeded): Create and initialize the per context data.
(WebCore::V8DOMWindowShell::installDOMWindow):
* bindings/v8/V8DOMWindowShell.h:
(V8DOMWindowShell):
(WebCore::V8DOMWindowShell::perContextData):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::constructorForType): Static method to get the constructor. The per context data
is determined based on the type of the parameters.
(WebCore):
(WebCore::V8DOMWrapper::perContextData):
(WebCore::V8DOMWrapper::instantiateV8Object): Use the per context data to unify the code paths.
* bindings/v8/V8DOMWrapper.h:
(WebCore):
(V8DOMWrapper):
* bindings/v8/V8IsolatedContext.cpp:
(WebCore::V8IsolatedContext::V8IsolatedContext): Create and initialize the per context data.
(WebCore::V8IsolatedContext::destroy): Clear the per context data.
* bindings/v8/V8IsolatedContext.h:
(WebCore):
(WebCore::V8IsolatedContext::perContextData):
(V8IsolatedContext):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::retrievePerContextData):
(WebCore):
* bindings/v8/V8Proxy.h:
(WebCore):
(V8Proxy):
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::dispose): Clear the per context data
(WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Create and initialize the per context data.
* bindings/v8/WorkerContextExecutionProxy.h:
(WebCore):
(WebCore::WorkerContextExecutionProxy::perContextData):
(WorkerContextExecutionProxy):

LayoutTests:

* fast/dom/constructor-proto-expected.txt: Added.
* fast/dom/constructor-proto.html: Added.
* fast/workers/constructor-proto-expected.txt: Added.
* fast/workers/constructor-proto.html: Added.

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

8 years agoUnreviewed, updating expected test output for a test already marked FAIL.
jsbell@chromium.org [Wed, 4 Apr 2012 22:28:23 +0000 (22:28 +0000)]
Unreviewed, updating expected test output for a test already marked FAIL.
Replace dummy output with real expected output to unblock Chromium-side test.

* storage/indexeddb/dont-commit-on-blocked-expected.txt:

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

8 years ago[chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl
shawnsingh@chromium.org [Wed, 4 Apr 2012 22:23:28 +0000 (22:23 +0000)]
[chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl
https://bugs.webkit.org/show_bug.cgi?id=82091

Reviewed by James Robinson.

Source/WebCore:

No new tests needed, minor refactoring covered by existing tests.

This patch is just a minor cleanup, moving clearRenderSurfacesOnCCLayerImplRecursive()
from LayerRendererChromium to CCLayerTreeHostImpl. It makes more sense to place the code
there, so that LayerRendererChromium is more like a blind utility for drawing things
while CCLayerTreeHostImpl actually manages the state of the resources.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::beginDrawingFrame):
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
(WebCore::CCLayerTreeHostImpl::sendDidLoseContextRecursive):
(WebCore::CCLayerTreeHostImpl::clearRenderSurfacesOnCCLayerImplRecursive):
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(WebCore::CCLayerTreeHostImpl::rootLayer):
(CCLayerTreeHostImpl):

Source/WebKit/chromium:

* tests/LayerRendererChromiumTest.cpp:
(FakeLayerRendererChromiumClient::FakeLayerRendererChromiumClient):

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

8 years ago[Chromium] Tweak expectations for accessibility/aria-checkbox-sends-notification...
dglazkov@chromium.org [Wed, 4 Apr 2012 22:23:10 +0000 (22:23 +0000)]
[Chromium] Tweak expectations for accessibility/aria-checkbox-sends-notification.html.

* platform/chromium/test_expectations.txt: Tweaked expectations.

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

8 years agoWeb Audio should use MutexTryLocker class
crogers@google.com [Wed, 4 Apr 2012 22:13:17 +0000 (22:13 +0000)]
Web Audio should use MutexTryLocker class
https://bugs.webkit.org/show_bug.cgi?id=83194

Reviewed by Kenneth Russell.

Source/WebCore:

Switch existing Web Audio code from directly calling tryLock() on a Mutex to use a MutexTryLocker.
No new tests since it is a low-level threading primitive and is difficult to test.
Existing Web Audio tests continue to test the process() methods affected.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::process):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::valuesForTimeRange):
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::process):
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::process):
* Modules/webaudio/Oscillator.cpp:
(WebCore::Oscillator::process):
* Modules/webaudio/WaveShaperProcessor.cpp:
(WebCore::WaveShaperProcessor::process):

Source/WTF:

Add MutexTryLocker class which can be used as a stack-based object wrapping a Mutex.
It will automatically unlock the Mutex in its destructor if the tryLock() succeeded.

* wtf/ThreadingPrimitives.h:
(MutexTryLocker):
(WTF::MutexTryLocker::MutexTryLocker):
(WTF::MutexTryLocker::~MutexTryLocker):
(WTF::MutexTryLocker::locked):
Check if the tryLock() on the Mutex succeeded.
(WTF):

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

8 years ago[CSS] Make makevalues.pl and makeprop.pl ignore '#'s.
rakuco@webkit.org [Wed, 4 Apr 2012 22:06:24 +0000 (22:06 +0000)]
[CSS] Make makevalues.pl and makeprop.pl ignore '#'s.
https://bugs.webkit.org/show_bug.cgi?id=83212

Reviewed by Tony Chang.

This patch is a side-effect of my intentions to make the
CMake-based ports work with GCC 4.7 without changing the
parameters currently passed to the preprocessor. "-P" is always
being passed to the preprocessor, but this breaks
dom/make_names.pl due to GCC not outputting empty lines with "-P"
anymore; if I switch to never passing "-P" (my aim), the CSS
scripts currently break because of the additional lines output by
the preprocessor. InFilesParser.pm and make-css-file-array.pl
already skip lines which start with '#', for example.

No new tests, tools plumbing.

* css/makeprop.pl:
* css/makevalues.pl:

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

8 years agoDisable fancy upsampling and dithering for decoding jpeg on android
commit-queue@webkit.org [Wed, 4 Apr 2012 21:48:32 +0000 (21:48 +0000)]
Disable fancy upsampling and dithering for decoding jpeg on android
https://bugs.webkit.org/show_bug.cgi?id=83196

Patch by Min Qin <qinmin@google.com> on 2012-04-04
Reviewed by Kenneth Russell.

Dithering and fancy upsampling are currently disabled for chrome on android.
This gives us about 20% performance improvement.
Since the screen of mobile devices is small, impact on image quality is limited.
This change does not introduce any changes on other platforms.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(ditherMode):
(doFancyUpsampling):
(WebCore::JPEGImageReader::decode):

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

8 years ago[Chromium] Mark fonts/cursive.html as flaky on LION.
dglazkov@chromium.org [Wed, 4 Apr 2012 21:36:13 +0000 (21:36 +0000)]
[Chromium] Mark fonts/cursive.html as flaky on LION.

* platform/chromium/test_expectations.txt: Marked as flaky.

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

8 years ago[Chromium] Always skip draw and readback if there is nothing
commit-queue@webkit.org [Wed, 4 Apr 2012 21:27:36 +0000 (21:27 +0000)]
[Chromium] Always skip draw and readback if there is nothing
to draw.
https://bugs.webkit.org/show_bug.cgi?id=82680

This avoids corruption from pushing frames that have no valid
content drawn into them.
Also in addition to checking for non-existing root layers, check
for root layers with no content bounds. It's possible to see those
with kForceCompositing mode for empty documents.

Patch by Daniel Sievers <sievers@chromium.org> on 2012-04-04
Reviewed by James Robinson.

Added CCLayerTreeHostTestEmptyContentsShouldNotDraw.

Source/WebCore:

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

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
(WebKitTests::TEST_F):
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTest::doBeginTest):
(WTF):
(CCLayerTreeHostTestEmptyContentsShouldNotDraw):
(WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::CCLayerTreeHostTestEmptyContentsShouldNotDraw):
(WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::beginTest):
(WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::drawLayersOnCCThread):
(WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::didCommitAndDrawFrame):
(WTF::CCLayerTreeHostTestEmptyContentsShouldNotDraw::afterTest):
(WTF::TEST_F):

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

8 years agoDFG should short-circuit Branch(LogicalNot(...))
fpizlo@apple.com [Wed, 4 Apr 2012 21:14:48 +0000 (21:14 +0000)]
DFG should short-circuit Branch(LogicalNot(...))
https://bugs.webkit.org/show_bug.cgi?id=83181

Reviewed by Geoff Garen.

Slight (sub 1%) speed-up on V8.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

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

8 years ago https://bugs.webkit.org/show_bug.cgi?id=83207
bdakin@apple.com [Wed, 4 Apr 2012 21:12:42 +0000 (21:12 +0000)]
 https://bugs.webkit.org/show_bug.cgi?id=83207
 platform/mac/fast/forms/input-list-button-size.html fails on the Mac bots after
 r11317

 This test is expected to fail now that datalist is disabled.
* platform/mac/Skipped:

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

8 years agoFull Screen mode should cancel before navigation.
jer.noble@apple.com [Wed, 4 Apr 2012 21:11:14 +0000 (21:11 +0000)]
Full Screen mode should cancel before navigation.
https://bugs.webkit.org/show_bug.cgi?id=81295

Reviewed by Anders Carlsson.

Source/WebCore:

No new tests; protect against speculative crasher when a bad client calls the below
functions at inopportune times.

Check that the document is not either detached or in the page cache, and if so, bail out
early:
* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidEnterFullScreenForElement):
(WebCore::Document::webkitWillExitFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):

Source/WebKit/mac:

When a provisional load is started, if the page is currently in full screen mode, instruct
the full screen controller to close the full screen window immediately.

* WebView/WebFullScreenController.h:
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController isFullScreen]): Added.
* WebView/WebView.mm:
(-[WebView _didStartProvisionalLoadForFrame:]): Close the full screen window controller, if
    present and in full screen mode.

Source/WebKit2:

When a provisional load is started, if the page is currently in full screen mode, instruct
the full screen controller to close the full screen window immediately.

Close the full screen window controller, if present and in full screen mode:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):

Add boilerplate to support passing through isFullScreen() and close() methods from the WebPageProxy
to the WKFullScreenWindowController:
* UIProcess/WebFullScreenManagerProxy.h:
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController isFullScreen]): Added simple accessor.
* UIProcess/mac/WebFullScreenManagerProxyMac.mm:
(WebKit::WebFullScreenManagerProxy::close): Pass through to the WKFullScreenWindowController.
(WebKit::WebFullScreenManagerProxy::isFullScreen): Ditto.

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

8 years ago[Chromium] Adjust expectations for fast/text/international/spaces-combined-in-vertica...
dglazkov@chromium.org [Wed, 4 Apr 2012 21:06:15 +0000 (21:06 +0000)]
[Chromium] Adjust expectations for fast/text/international/spaces-combined-in-vertical-text.html
https://bugs.webkit.org/show_bug.cgi?id=82669

* platform/chromium/test_expectations.txt: Tweaked expectations.

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

8 years agoFix getFilterOutsets parameter types in RenderLayer
eae@chromium.org [Wed, 4 Apr 2012 21:06:12 +0000 (21:06 +0000)]
Fix getFilterOutsets parameter types in RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=83041

Reviewed by Julien Chaffraix.

The getFilterOutsets method was changed to take integers in r112475, update
RenderLayer to use the right data type for the outset arguments.

No new tests, no change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::RenderLayer::calculateLayerBounds):

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

8 years agoWKTR needs to implement layoutTestController.setPageVisibility()
commit-queue@webkit.org [Wed, 4 Apr 2012 20:51:09 +0000 (20:51 +0000)]
WKTR needs to implement layoutTestController.setPageVisibility()
https://bugs.webkit.org/show_bug.cgi?id=69554

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2012-04-04
Reviewed by Simon Fraser.

Source/WebKit2:

This patch implements the setPageVisibilityState through InjectedBundle
so WKTR supports the Page Visibility API and can set the visibility state
directly to Page.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetPageVisibilityState):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit):
(WebKit::InjectedBundle::setPageVisibilityState):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

This patch implements the layoutTestController.setPageVisibility
so WKTR supports the Page Visibility API implementation by using InjectedBundle
to set the visibility state directly to Page.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::setPageVisibility):
(WTR):
(WTR::LayoutTestController::resetPageVisibility):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):

LayoutTests:

* platform/wk2/Skipped: Unskipping compositing/video-page-visibility.html

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

8 years agoRebaseline binding tests.
arv@chromium.org [Wed, 4 Apr 2012 20:47:58 +0000 (20:47 +0000)]
Rebaseline binding tests.

Unreviewed.

* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::constructorCallback):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructorConstructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::constructorCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):

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

8 years agoSource/WebCore: [JSC] ArrayBufferView and its ArrayBuffer are appended to object...
dslomov@google.com [Wed, 4 Apr 2012 20:43:31 +0000 (20:43 +0000)]
Source/WebCore: [JSC] ArrayBufferView and its ArrayBuffer are appended to object pool in wrong order
https://bugs.webkit.org/show_bug.cgi?id=82090
The implementation of structured cloning algorithm (http://www.w3.org/TR/html5/common-dom-interfaces.html#internal-structured-cloning-algorithm)
in SerializedScriptValue.cpp assigns numerical identifiers to encontered objects as it traverses
the cloned object during serialization.
When the cloning encounters an already seen object, it transfers the assigned numerical id
instead of cloning the object again. Deserialization process then repeats the process in
the mirror fashion, i.e. on deserializing the object it assigns deserialized object a numeric id and if it
deserializes the id it substitutes the perviously deserialized objects. It is critical that serialization and deserialization
assigns numeric ids in the same order.

The bug (discovered by Yong Li) is that when serializing ArrayBufferView, the ids were assigned first to
the ArrayBufferView and then to underlying ArrayBuffer; however on deserialization the ids were assigned another way round.

This patch fixes that by assigning the id first to ArrayBuffer and then to ArrayBufferView, and adds corresponding test cases.

Reviewed by Kenneth Russell.

New test cases added to fast/canvas/web-gl/array-message-passing.html.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::checkForDuplicate):
(CloneSerializer):
(WebCore::CloneSerializer::recordObject):
(WebCore::CloneSerializer::startObjectInternal):
(WebCore::CloneSerializer::dumpIfTerminal):

LayoutTests: [JSC] ArrayBufferView and its ArrayBuffer are appended to object pool in wrong order
https://bugs.webkit.org/show_bug.cgi?id=82090
Adds tests that cover more than one view of the same ArrayBuffer being cloned.

Reviewed by Kenneth Russell.

* fast/canvas/webgl/array-message-passing-expected.txt:
* fast/canvas/webgl/script-tests/array-message-passing.js:
(typedArrayCompare):
(dataViewCompare):
(dataViewCompare2):
(dataViewCompare3):

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

8 years ago[chromium] When setting animation started events, should check the root layer
commit-queue@webkit.org [Wed, 4 Apr 2012 20:31:24 +0000 (20:31 +0000)]
[chromium] When setting animation started events, should check the root layer
https://bugs.webkit.org/show_bug.cgi?id=83060

Patch by Ian Vollick <vollick@chromium.org> on 2012-04-04
Reviewed by Adrienne Walker.

No new tests.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::animateLayers):
(WebCore::CCLayerTreeHost::animateLayersRecursive):
(WebCore::CCLayerTreeHost::setAnimationEventsRecursive):

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

8 years ago[Chromium] TestWebKitAPI links in WebCore twice
abarth@webkit.org [Wed, 4 Apr 2012 20:27:46 +0000 (20:27 +0000)]
[Chromium] TestWebKitAPI links in WebCore twice
https://bugs.webkit.org/show_bug.cgi?id=83177

Reviewed by Dimitri Glazkov.

This is causing link errors in the Windows component build. This patch
moves the dependencies a bit lower down in the dependency diagram in
the hopes of removing the duplicate symbols.

* TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:

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

8 years agoWeb Inspector: break on DOM node insertion only once per operation, not once per...
adamk@chromium.org [Wed, 4 Apr 2012 20:10:34 +0000 (20:10 +0000)]
Web Inspector: break on DOM node insertion only once per operation, not once per inserted node
https://bugs.webkit.org/show_bug.cgi?id=82967

Reviewed by Ojan Vafai.

Source/WebCore:

This change affects the case where a DocumentFragment is inserted,
rather than a single node. This is most common when using innerHTML:
the effect of the change is that inserting, e.g., '<input><input>',
the SubtreeModified breakpoint will be hit once, rather than twice
(once for each input element). Given that the particular node being
inserted wasn't exposed as part of the breakpoint, this seems strictly
better.

Now that the call to willInsertDOMNode is outside the loop, there's
not an obvious node to pass in as the new child. Luckily, InspectorDOMDebuggerAgent
already ignored that argument, so it's simply been removed from the signature.

This changes paves the way to do only tree-modification work, and no
external notifications, inside the loops in appendChild/insertBefore/replaceChild.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore): Hoisted call to willInsertDOMNode out of loop.
(WebCore::ContainerNode::replaceChild): ditto.
(WebCore::ContainerNode::appendChild): ditto.
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): Removed first argument (now takes only the parent).
* inspector/InspectorDOMDebuggerAgent.h:
(InspectorDOMDebuggerAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willInsertDOMNodeImpl): Removed second argument.
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willInsertDOMNode): Removed second argument.

LayoutTests:

Added test for setting inner HTML and ensuring that only a single
breakpoint is hit.

* inspector/debugger/dom-breakpoints.html:
* platform/chromium/inspector/debugger/dom-breakpoints-expected.txt:

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

8 years agoSource/WebCore: Move pending sheet removal from ~HTMLLinkElement to removal from...
jpfau@apple.com [Wed, 4 Apr 2012 20:06:35 +0000 (20:06 +0000)]
Source/WebCore: Move pending sheet removal from ~HTMLLinkElement to removal from document.
https://bugs.webkit.org/show_bug.cgi?id=69184

Reviewed by Adam Barth.

Test: fast/html/pending-stylesheet-crash.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::removedFromDocument):

LayoutTests: Move pending sheet removal from ~HTMLLinkElement to removal from document.
https://bugs.webkit.org/show_bug.cgi?id=69184

Reviewed by Adam Barth.

* fast/html/pending-stylesheet-crash-expected.txt: Added.
* fast/html/pending-stylesheet-crash.html: Added.

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

8 years agoUnskip Mac filter pixel tests which changed because of color space adjustment
jonlee@apple.com [Wed, 4 Apr 2012 19:50:00 +0000 (19:50 +0000)]
Unskip Mac filter pixel tests which changed because of color space adjustment
https://bugs.webkit.org/show_bug.cgi?id=80630

Unreviewed.

* platform/mac/test_expectations.txt: Unskip tests now that patch for b80571 landed.
* platform/wk2/Skipped: Unskip same tests.

These were rebaselined with color correction. Between WK1 and WK2, however, they still fail
the pixel hash, and completely fail if tolerance is set to 0. https://bugs.webkit.org/show_bug.cgi?id=83187
* css3/filters/add-filter-rendering-expected.png:
* css3/filters/crash-filter-change-expected.png:
* css3/filters/effect-blur-expected.png:
* css3/filters/effect-brightness-expected.png:
* css3/filters/effect-combined-expected.png:
* css3/filters/effect-contrast-expected.png:
* css3/filters/effect-drop-shadow-expected.png:
* css3/filters/effect-grayscale-expected.png:
* css3/filters/effect-hue-rotate-expected.png:
* css3/filters/effect-invert-expected.png:
* css3/filters/effect-opacity-expected.png:
* css3/filters/effect-saturate-expected.png:
* css3/filters/effect-sepia-expected.png:
* css3/filters/filter-repaint-expected.png:
* css3/filters/filter-with-transform-expected.png:
* css3/filters/nested-filter-expected.png:
* css3/filters/regions-expanding-expected.png:
* css3/filters/simple-filter-rendering-expected.png:

These tests fail between WK1 and WK2 because of a difference in the blur. https://bugs.webkit.org/show_bug.cgi?id=83188
* platform/mac-wk2/css3/filters/effect-blur-expected.png: Added.
* platform/mac-wk2/css3/filters/effect-combined-expected.png: Added.
* platform/mac-wk2/css3/filters/effect-opacity-expected.png: Added.
* platform/mac-wk2/css3/filters/regions-expanding-expected.png: Added.

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

8 years agoCall histogramCustomCounts directly
commit-queue@webkit.org [Wed, 4 Apr 2012 19:46:31 +0000 (19:46 +0000)]
Call histogramCustomCounts directly
https://bugs.webkit.org/show_bug.cgi?id=83112

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2012-04-04
Reviewed by Adam Barth.

Source/WebCore:

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerPainter::paint):
* platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
(WebCore::CCOverdrawMetrics::recordMetricsInternal):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::paint):
(WebKit::WebViewImplContentPainter::paint):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
* src/painting/PaintAggregator.cpp:

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

8 years ago[Chromium] Mark fast/writing-mode/relative-positioning-percentages.html as crashing...
dglazkov@chromium.org [Wed, 4 Apr 2012 19:35:25 +0000 (19:35 +0000)]
[Chromium] Mark fast/writing-mode/relative-positioning-percentages.html as crashing on Mac debug
https://bugs.webkit.org/show_bug.cgi?id=83185

* platform/chromium/test_expectations.txt: Marked as crashing.

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

8 years agoSource/WebCore: Animation related classes should use CSSPropertyID rather than intege...
alexis.menard@openbossa.org [Wed, 4 Apr 2012 19:33:22 +0000 (19:33 +0000)]
Source/WebCore: Animation related classes should use CSSPropertyID rather than integers when manipulating CSS property ids.
https://bugs.webkit.org/show_bug.cgi?id=83050

Reviewed by Simon Fraser.

Split the concept of animate none and animate all into a separate function rather than using the property member
with some magic value set on it. Make also sure that we use CSSPropertyID all over the place rather than integers.
We still have some place where convert from int to CSSPropertyID (mostly due to the fact that we need to make Hash*
related classes to handle CSSPropertyID). While refactoring I also removed some dead code.

No new tests : not behaviour changes intented.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyAnimation::applyInheritValue):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
* page/animation/AnimationBase.cpp:
(WebCore):
(WebCore::PropertyWrapperBase::PropertyWrapperBase):
(WebCore::PropertyWrapperBase::property):
(PropertyWrapperBase):
(WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
(WebCore::PropertyWrapper::PropertyWrapper):
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
(WebCore::PropertyWrapperColor::PropertyWrapperColor):
(WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
(WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
(WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
(WebCore::wrapperForProperty):
(WebCore::AnimationBase::propertiesEqual):
The code removed here could never be reached. propertiesEqual is used only in CompositeAnimation::updateTransitions and through
ImplicitAnimation::isTargetPropertyEqual which is also called in CompositeAnimation. Both calls are protected by an ASSERT in
CompositeAnimation:116 where we make sure the property id we're dealing with is a valid property id, therefore prop can't be equal to
the old value cAnimateAll or even the new mode concept introduced in that patch can't be AnimateAll.
(WebCore::AnimationBase::getPropertyAtIndex):
(WebCore::AnimationBase::blendProperties):
(WebCore::AnimationBase::animationOfPropertyIsAccelerated):
(WebCore::gatherEnclosingShorthandProperties):
(WebCore::AnimationBase::animatableShorthandsAffectingProperty):
* page/animation/AnimationBase.h:
(AnimationBase):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::pauseTransitionAtTime):
* page/animation/CompositeAnimation.h:
(CompositeAnimation):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::ImplicitAnimation):
(WebCore::ImplicitAnimation::sendTransitionEvent):
The check removed is useless as ImplicitAnimation constructor ensure via an ASSERT that the animatingProperty value is a correct and valid
property id. Even the old code was ensuring the value of animatingProperty was different from cAnimateAll at construction time. As stated also
in CompositeAnimation::updateTransitions and cover by the same ASSERT explained earlier, ImplicitAnimation are constructed for valid property ids.
(WebCore::ImplicitAnimation::isTargetPropertyEqual):
(WebCore::ImplicitAnimation::blendPropertyValueInStyle):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::create):
(ImplicitAnimation):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
(WebCore::KeyframeAnimation::getAnimatedStyle):
(WebCore::KeyframeAnimation::timeToNextService):
* platform/animation/Animation.cpp:
(WebCore::Animation::Animation):
(WebCore::Animation::operator=):
(WebCore::Animation::animationsMatch):
* platform/animation/Animation.h:
(WebCore::Animation::property):
(WebCore::Animation::animationMode):
(WebCore::Animation::setProperty):
(WebCore::Animation::setAnimationMode):
(Animation):
(WebCore::Animation::initialAnimationProperty):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startTransition):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::transitionForProperty):
* rendering/style/RenderStyle.h:

Source/WebKit2: Animation related classes should use CSSPropertyId rather than integers when manipulating CSS property ids.
https://bugs.webkit.org/show_bug.cgi?id=83050

Reviewed by Simon Fraser.

The property of the Animation is a CSSPropertyID. It's ok to cast it here as an int for IPC transmission.

* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

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

8 years ago[EFL][DRT] Catch the "resource,request,willsend" signal
rakuco@webkit.org [Wed, 4 Apr 2012 19:11:13 +0000 (19:11 +0000)]
[EFL][DRT] Catch the "resource,request,willsend" signal
https://bugs.webkit.org/show_bug.cgi?id=82192

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-04-04
Reviewed by Gustavo Noronha Silva.

Source/WebKit/efl:

EFL's FrameLoaderClient now emits the "resource,request,willsend"
signal on the view for all resources about to be loaded, not just the
main frame. Also adds a boolean flag to Ewk_Frame_Resource_Request to
distinguish the request for the main frame from those for
sub-resources.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
(WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
* ewk/ewk_frame.h:
* ewk/ewk_view.h:

Tools:

EFL's DumpRenderTree now catches the "resource,request,willsend"
signal in order to implement the "Blocked access to external URL"
behavior and avoid potential network-related timeouts in the tests.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::onWillSendRequest):
* DumpRenderTree/efl/DumpRenderTreeChrome.h:
(DumpRenderTreeChrome):

LayoutTests:

Unskip related test cases now that EFL's DumpRenderTree
catches the "resource,request,willsend" signal and implements the
"Blocked access to external URL" behavior.

* platform/efl/Skipped:

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

8 years agoFix usage of LayoutUnits and snapping for scrolling in RenderBox
eae@chromium.org [Wed, 4 Apr 2012 19:10:00 +0000 (19:10 +0000)]
Fix usage of LayoutUnits and snapping for scrolling in RenderBox
https://bugs.webkit.org/show_bug.cgi?id=83073

Reviewed by Eric Seidel.

Fix usage of LayoutUnits and snapping/rounding logic in RenderBox.

No new tests, no change in functionality.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrollWidth):
Change scrollWidth to properly pixel snap values.

(WebCore::RenderBox::scrollHeight):
Change scrollHeight to properly pixel snap values.

(WebCore::RenderBox::scrolledContentOffset):
Change to return IntSize to match function definition.

(WebCore::RenderBox::cachedSizeForOverflowClip):
Changed cachedSizeForOverflowClip to LayoutSize as the overflow and clip
rects all have subpixel precision.

* rendering/RenderBox.h:
(WebCore::RenderBox::pixelSnappedWidth):
(WebCore::RenderBox::pixelSnappedHeight):
Removed FIXME comment as the implementation

(WebCore::RenderBox::minYLayoutOverflow):
(WebCore::RenderBox::maxYLayoutOverflow):
(WebCore::RenderBox::minXLayoutOverflow):
(WebCore::RenderBox::maxXLayoutOverflow):
Added static_cast for border values.

(WebCore::RenderBox::hasVisualOverflow):
Changed to compare two pixel snapped values as we don't want to indicate
overflow in cases where the the size is rounded down resulting in no
visual overflow.

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

8 years agoFix types for location, size and rect calculations for render objects
eae@chromium.org [Wed, 4 Apr 2012 19:04:15 +0000 (19:04 +0000)]
Fix types for location, size and rect calculations for render objects
https://bugs.webkit.org/show_bug.cgi?id=83089

Reviewed by Eric Seidel.

Fix usage of LayoutUnits and rounding for a couple of different render
object classes.

No new tests, no change in functionality.

* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::getPath):
Change getPath to take a LayoutPoint as the transform has subpixel
precision already.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeLogicalHeight):
Change logicalHeight to LayoutUnit as it is computed from subpixel
values.

* rendering/RenderInputSpeech.cpp:
(WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
Change button rect computation to LayoutRect and pixel snap just before
painting to preserve precision.

* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
(WebCore::RenderLineBoxList::paint):
Change range calculations to LayoutUnits to preserve precision.

* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::computePosition):
Change width calculations to LayoutUnits to preserve precision.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::layoutCaption):
Change table captions to LayoutUnits as the values are computed from
subpixel componenets.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getRoundedBorderFor):
Snap border rect as RoundedRects use ints for crisp rendering.

* rendering/style/ShadowData.cpp:
(WebCore::ShadowData::adjustRectForShadow):
Change adjustRectForShadow to take a LayoutRect as it already uses
LayoutUnits.

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

8 years agoConvert RootInlineBox to LayoutUnits in preparation for turning on subpixel layout
eae@chromium.org [Wed, 4 Apr 2012 18:54:38 +0000 (18:54 +0000)]
Convert RootInlineBox to LayoutUnits in preparation for turning on subpixel layout
https://bugs.webkit.org/show_bug.cgi?id=83054

Reviewed by Eric Seidel.

Convert RootInlineBox over to LayoutUnits, this mostly involves updating
the alignment and adjustment code to be subpixel aware.

No new tests, no change in functionality.

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
Change beforeAnnotationsAdjustment to LayoutUnit.

(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
Change method to return LayoutUnit as it is computed from values with
subpixel precision.

(WebCore::RootInlineBox::lineSnapAdjustment):
Round values before computing remainder.

(WebCore::RootInlineBox::ascentAndDescentForBox):
Change ascent and decent calculation to use LayoutUnits as they are
computed from values with subpixel precision.

(WebCore::RootInlineBox::verticalPositionForBox):
Change verticalPosition to LayoutUnit.

* rendering/RootInlineBox.h:
(RootInlineBox):

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

8 years ago<http://webkit.org/b/83108> Web Inspector: JSC Crash inspecting node with object...
joepeck@webkit.org [Wed, 4 Apr 2012 18:42:39 +0000 (18:42 +0000)]
<webkit.org/b/83108> Web Inspector: JSC Crash inspecting node with object event listener

Reviewed by Geoff Garen.

Source/WebCore:

* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
Use jsDynamicCast to bail when the JSObject is not a JSFunction.

LayoutTests:

* inspector/elements/event-listener-sidebar.html:
* inspector/elements/event-listener-sidebar-expected.txt:
* platform/chromium/inspector/elements/event-listener-sidebar-expected.txt:
Add an EventListener that uses an object listener instead of a function.

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

8 years agoCall suddenTerminationChanged directly
commit-queue@webkit.org [Wed, 4 Apr 2012 18:18:44 +0000 (18:18 +0000)]
Call suddenTerminationChanged directly
https://bugs.webkit.org/show_bug.cgi?id=83114

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2012-04-04
Reviewed by Adam Barth.

Source/WebCore:

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/chromium/SuddenTerminationChromium.cpp:
(WebCore::disableSuddenTermination):
(WebCore::enableSuddenTermination):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):

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

8 years agofigure out how to export webcore symbols from webkit.dll properly
abarth@webkit.org [Wed, 4 Apr 2012 18:14:15 +0000 (18:14 +0000)]
figure out how to export webcore symbols from webkit.dll properly
https://bugs.webkit.org/show_bug.cgi?id=83105

Reviewed by Dimitri Glazkov.

Source/Platform:

Unwind our ugly, ugly hack to make the Windows component build work.

* chromium/public/WebMediaStreamSourcesRequest.h:
(WebMediaStreamSourcesRequest):

Source/WebCore:

* WebCore.gypi:
    - Separate the platform support files into a new GYP variable so
      that they can be build as part of webkit.dll rather than in
      webcore_platform.lib. Building them as part of webkit.dll ensure
      that the symbols marked for export will actually be in webkit.dll
      (and hence exported), even if nothing else in webkit.dll
      references the obj file that contains the symbol.
* platform/chromium/support/WebMediaStreamSourcesRequest.cpp:
    - Unwind our ugly, ugly hack to make the Windows component build
      work.

Source/WebKit/chromium:

* WebKit.gyp:
    - We now compile the platform support files as part of webkit.dll
      to make sure the lib contains the obj files and therefore exports
      the necessary symbols. In principle, we could use a defs file to
      achieve the same thing, but those files are a pain to maintain.
* src/WebKit.cpp:
(WebKit::shutdown):
    - Unwind our ugly, ugly hack to make the Windows component build
      work.

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

8 years agoCall sandboxEnabled directly
commit-queue@webkit.org [Wed, 4 Apr 2012 18:12:03 +0000 (18:12 +0000)]
Call sandboxEnabled directly
https://bugs.webkit.org/show_bug.cgi?id=83113

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2012-04-04
Reviewed by Adam Barth.

Source/WebCore:

* platform/chromium/PlatformSupport.h:
(PlatformSupport):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):

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

8 years ago[EFL][DRT] Correct <wtf/*.h> include paths.
paroga@webkit.org [Wed, 4 Apr 2012 18:07:39 +0000 (18:07 +0000)]
[EFL][DRT] Correct <wtf/*.h> include paths.
https://bugs.webkit.org/show_bug.cgi?id=83168

Reviewed by Eric Seidel.

Modify the #include declarations so that the
wtf types are included using the full path.

* DumpRenderTree/efl/DumpRenderTree.cpp:

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

8 years ago[Chromium] Mark svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html as...
dglazkov@chromium.org [Wed, 4 Apr 2012 17:50:23 +0000 (17:50 +0000)]
[Chromium] Mark svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=83183

* platform/chromium/test_expectations.txt: Registered flakes.

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

8 years agoWeb Inspector: CodeGeneratorInspector.py: switch IndexedDB, DOMStorage, ApplicationCa...
caseq@chromium.org [Wed, 4 Apr 2012 17:43:27 +0000 (17:43 +0000)]
Web Inspector: CodeGeneratorInspector.py: switch IndexedDB, DOMStorage, ApplicationCache domains to typed API
https://bugs.webkit.org/show_bug.cgi?id=83039

Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-04-04
Reviewed by Pavel Feldman.

Client code is switched to typed API (all InspectorObject and InspectorArray types are
replaced with generated types from TypeBuilder according to Inspector.json).

Missing array of array specialization is added. Inspector.json is fixed to comform
with actual behavior of InspectorDOMStorageAgent.

Output parameter initialization is assured.

* inspector/CodeGeneratorInspector.py:
* inspector/Inspector.json:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
(WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
* inspector/InspectorApplicationCacheAgent.h:
(InspectorApplicationCacheAgent):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
* inspector/InspectorDOMStorageAgent.h:
(InspectorDOMStorageAgent):
* inspector/InspectorDOMStorageResource.cpp:
(WebCore::InspectorDOMStorageResource::bind):

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

8 years ago[Chromium] Add another kind of flaky to fast/replaced/border-radius-clip.html
dglazkov@chromium.org [Wed, 4 Apr 2012 17:38:47 +0000 (17:38 +0000)]
[Chromium] Add another kind of flaky to fast/replaced/border-radius-clip.html

* platform/chromium/test_expectations.txt: Flakes registered.

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

8 years agoLayout Test media/video-beforeload-remove-source.html is timing out
fischman@chromium.org [Wed, 4 Apr 2012 17:31:54 +0000 (17:31 +0000)]
Layout Test media/video-beforeload-remove-source.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=82260

Reviewed by Eric Carlson.

Moved the beforeload listener to <head> to ensure it is registered before the
load actually happens.  Before this change, the test failed (timed out) 2/1000 runs,
after the change it had no failures in 5000 runs.

* media/video-beforeload-remove-source.html:
* platform/chromium/test_expectations.txt:

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

8 years agogtk_unittest.GtkPortTest.test_get_crash_log failing on windows
philn@webkit.org [Wed, 4 Apr 2012 17:29:23 +0000 (17:29 +0000)]
gtk_unittest.GtkPortTest.test_get_crash_log failing on windows
https://bugs.webkit.org/show_bug.cgi?id=83176

Reviewed by Tony Chang.

* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
(test_get_crash_log): Skip the test on non-linux platforms.

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

8 years ago[Qt] REGRESSION(r113141): All tests assert on 32 bit debug mode
ggaren@apple.com [Wed, 4 Apr 2012 17:17:32 +0000 (17:17 +0000)]
[Qt] REGRESSION(r113141): All tests assert on 32 bit debug mode
https://bugs.webkit.org/show_bug.cgi?id=83139

Reviewed by Sam Weinig.

* heap/PassWeak.h:
(JSC::::get): 32-bit JSValue treats JSValue(nullptr).asCell() as an error,
so work around that here. (Long-term, we should make 32-bit and 64-bit
agree on the right behavior.)

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

8 years agoRemove flex function css parsing
tony@chromium.org [Wed, 4 Apr 2012 17:13:16 +0000 (17:13 +0000)]
Remove flex function css parsing
https://bugs.webkit.org/show_bug.cgi?id=83083

Reviewed by Ojan Vafai.

Source/WebCore:

The flexbox spec switched from using a flex() function on the width
and height to a css property. Now that the -webkit-flex: has been
implemented, we can remove the flex() function code.

No new tests. Removing an old test that used to test the flex() function.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/CSSFlexValue.cpp: Removed.
* css/CSSFlexValue.h: Removed.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFlex):
* css/CSSParser.h:
(WebCore):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleFlexibleBoxData.cpp:
(WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
(WebCore::StyleFlexibleBoxData::operator==):
* rendering/style/StyleFlexibleBoxData.h:

LayoutTests:

Remove test of -webkit-flex() function.

* css3/flexbox/flex-parsing-expected.txt: Removed.
* css3/flexbox/flex-parsing.html: Removed.
* css3/flexbox/script-tests/flex-parsing.js: Removed.

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