WebKit-https.git
9 years agoUnreviewed update test expectations for inspector's tests.
loislo@chromium.org [Wed, 21 Dec 2011 08:11:54 +0000 (08:11 +0000)]
Unreviewed update test expectations for inspector's tests.

* platform/chromium/test_expectations.txt:

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

9 years ago[Qt] [Gardening] Move tests to the right skip list.
commit-queue@webkit.org [Wed, 21 Dec 2011 08:09:55 +0000 (08:09 +0000)]
[Qt] [Gardening] Move tests to the right skip list.
https://bugs.webkit.org/show_bug.cgi?id=74958

These tests pass on Qt-5.0 both with WK1 and WK2 but fail on Qt-4.8.
Also removes comment refering to Qt-4.7 since the test fails on all
versions at the moment.

Patch by João Paulo Rechi Vita <jprvita@openbossa.org> on 2011-12-21
Reviewed by Csaba Osztrogonác.

* platform/qt-4.8/Skipped:
* platform/qt/Skipped:

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

9 years agoDisable a test without a result while I figure out
levin@chromium.org [Wed, 21 Dec 2011 08:03:04 +0000 (08:03 +0000)]
Disable a test without a result while I figure out
how to make the results consistent for each run.
Bug 74666 basically tracks re-enabling this test
since it contains an enhanced version of it.

* http/tests/workers/interrupt-database-sync-open-crash.html-skipped: Renamed from LayoutTests/http/tests/workers/interrupt-database-sync-open-crash.html.

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

9 years agoUpstream PageClientBlackBerry.h into WebCore/platform/blackberry
commit-queue@webkit.org [Wed, 21 Dec 2011 07:44:43 +0000 (07:44 +0000)]
Upstream PageClientBlackBerry.h into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74169

Patch by Mary Wu <mary.wu@torchmobile.com.cn> on 2011-12-20
Reviewed by Daniel Bates.

Initial upstream, no new tests.

* platform/blackberry/PageClientBlackBerry.h: Added.

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

9 years ago32_64 baseline JIT should attempt to convert division results to integers, and record...
fpizlo@apple.com [Wed, 21 Dec 2011 07:40:44 +0000 (07:40 +0000)]
32_64 baseline JIT should attempt to convert division results to integers, and record when that fails
https://bugs.webkit.org/show_bug.cgi?id=74997
<rdar://problem/10612389>

Reviewed by Gavin Barraclough.

* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_div):

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

9 years agoUpstream PlatformMouseEvent and LocalizedStrings into WebCore/platform/blackberry
commit-queue@webkit.org [Wed, 21 Dec 2011 07:36:28 +0000 (07:36 +0000)]
Upstream PlatformMouseEvent and LocalizedStrings into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74383

Patch by Mary Wu <mary.wu@torchmobile.com.cn> on 2011-12-20
Reviewed by Daniel Bates.

Other Main Contributors:
Rob Buis <rbuis@rim.com>
Mike Fenton <mifenton@rim.com>

Initial upstream, no new tests.

* PlatformBlackBerry.cmake: Modified to rename Localizations.cpp to LocalizedStringsBlackBerry.cpp
* platform/blackberry/LocalizedStringsBlackBerry.cpp: Added.
* platform/blackberry/PlatformMouseEventBlackBerry.cpp: Added.

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

9 years agoJavaScriptCore should be consistent about how it reads and writes ArgumentCount
fpizlo@apple.com [Wed, 21 Dec 2011 06:01:20 +0000 (06:01 +0000)]
JavaScriptCore should be consistent about how it reads and writes ArgumentCount
https://bugs.webkit.org/show_bug.cgi?id=74989
<rdar://problem/10612006>

Reviewed by Gavin Barraclough.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileFunction):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileLoadVarargs):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_arguments_length):
(JSC::JIT::emit_op_get_argument_by_val):
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::SpecializedThunkJIT):

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

9 years agoWeb Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
loislo@chromium.org [Wed, 21 Dec 2011 05:51:31 +0000 (05:51 +0000)]
Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
https://bugs.webkit.org/show_bug.cgi?id=69366

Patch by Peter Rybin <peter.rybin@gmail.com> on 2011-12-20
Reviewed by Pavel Feldman.

Generator fixed and all usages are changed manually.

* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType):
(RawTypes.BaseType.get_output_argument_prefix):
(RawTypes.Object.get_output_argument_prefix):
(RawTypes.Array.get_output_argument_prefix):
(RawTypes):
(Generator.process_command):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:

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

9 years ago[chromium] m_triggerIdlePaints not reset after a compositeAndReadback
commit-queue@webkit.org [Wed, 21 Dec 2011 04:36:13 +0000 (04:36 +0000)]
[chromium] m_triggerIdlePaints not reset after a compositeAndReadback
https://bugs.webkit.org/show_bug.cgi?id=74974

Patch by Eric Penner <epenner@google.com> on 2011-12-20
Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::compositeAndReadback):

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

9 years agoMove misplaced assert in SQLiteStatement.cpp
levin@chromium.org [Wed, 21 Dec 2011 03:26:26 +0000 (03:26 +0000)]
Move misplaced assert in SQLiteStatement.cpp
https://bugs.webkit.org/show_bug.cgi?id=74975

Reviewed by Dmitry Titov.

The test is coming with bug 74666.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::step): If a database was interrupted
before the prepare method was called, then m_isPrepared will be
false, so I moved the assert to be after the check for interrupted.

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

9 years agoWebVTT cues sometimes render when they should not
eric.carlson@apple.com [Wed, 21 Dec 2011 02:37:02 +0000 (02:37 +0000)]
WebVTT cues sometimes render when they should not
https://bugs.webkit.org/show_bug.cgi?id=74873

Not reviewed: update Chromium to pass new test added in r103371.

* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::updateTextTrackDisplay):

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

9 years agoValue Profiles for arguments should be more easily accessible to the interpreter
fpizlo@apple.com [Wed, 21 Dec 2011 02:29:15 +0000 (02:29 +0000)]
Value Profiles for arguments should be more easily accessible to the interpreter
https://bugs.webkit.org/show_bug.cgi?id=74984
<rdar://problem/10611364>

Reviewed by Gavin Barraclough.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::shouldOptimizeNow):
(JSC::CodeBlock::dumpValueProfiles):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setArgumentValueProfileSize):
(JSC::CodeBlock::numberOfArgumentValueProfiles):
(JSC::CodeBlock::valueProfileForArgument):
(JSC::CodeBlock::addValueProfile):
(JSC::CodeBlock::valueProfile):
(JSC::CodeBlock::valueProfileForBytecodeOffset):
(JSC::CodeBlock::totalNumberOfValueProfiles):
(JSC::CodeBlock::getFromAllValueProfiles):
* bytecode/ValueProfile.h:
(JSC::ValueProfile::ValueProfile):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
* jit/JITInlineMethods.h:
(JSC::JIT::emitValueProfilingSite):

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

9 years agoHTMLOptionsCollection: Remove incorrect FIXME about having a base class.
kling@webkit.org [Wed, 21 Dec 2011 02:02:19 +0000 (02:02 +0000)]
HTMLOptionsCollection: Remove incorrect FIXME about having a base class.
<http://webkit.org/b/74973>

Reviewed by Alexey Proskuryakov.

HTMLOptionsCollection should indeed inherit from HTMLCollection according to
current HTML5, so remove the comment saying we should change that.

Spec: http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection

* html/HTMLOptionsCollection.idl:

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

9 years agoJSC shell should accept utf8 input.
barraclough@apple.com [Wed, 21 Dec 2011 01:50:23 +0000 (01:50 +0000)]
JSC shell should accept utf8 input.

Reviewed by Filip Pizlo.

* jsc.cpp:
(jscSource):
(functionRun):
(functionLoad):
(functionCheckSyntax):
(runWithScripts):
(runInteractive):

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

9 years agotd element ignores zero width/height input element
commit-queue@webkit.org [Wed, 21 Dec 2011 01:41:13 +0000 (01:41 +0000)]
td element ignores zero width/height input element
https://bugs.webkit.org/show_bug.cgi?id=74636

Patch by Florin Malita <fmalita@google.com> on 2011-12-20
Reviewed by Kent Tamura.

Source/WebCore:

Test: fast/forms/input-zero-width.html

* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):
Relax the attribute test to allow setting widths == 0.

LayoutTests:

* fast/forms/input-zero-width-expected.html: Added.
* fast/forms/input-zero-width.html: Added.

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

9 years agoAvoid unnecessary work when removing attributes from an element
adamk@chromium.org [Wed, 21 Dec 2011 01:32:54 +0000 (01:32 +0000)]
Avoid unnecessary work when removing attributes from an element
https://bugs.webkit.org/show_bug.cgi?id=74953

Reviewed by Ryosuke Niwa.

Source/WebCore:

Various codepaths in Element and NamedNodeMap repeatedly search
through the list of attributes during a single operation. To avoid
this, I've added new getters to NamedNodeMap that return indices
rather than Attribute*s (they return WTF::notFound if no match is
found). These new methods are now used during removeAttribute
operations, as well as setAttribute and NamedNodeMap::setNamedItem
(along with a new replaceAttribute helper method).

The other optimization here involves the creation/destruction
of never-references Attr nodes. This is now avoided by calling
NamedNodeMap::removeAttribute directly instead of going through
NamedNodeMap::removeNamedItem.

As a cleanup after the above changes, the ExceptionCode argument is
gone from Element::removeAttribute and friends (it was never set
previously). The bulk of the files mentioned below are simply updating
callers to these methods.

No new tests, no change in behavior expected.

* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::deleteItem):
* dom/Element.cpp:
(WebCore::Element::removeAttribute):
(WebCore::Element::setBooleanAttribute):
(WebCore::Element::removeAttributeNS):
(WebCore::Element::setAttribute):
(WebCore::Element::setAttributeInternal):
* dom/Element.h:
* dom/Element.idl:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::getAttributeItemIndexSlowCase):
(WebCore::NamedNodeMap::replaceAttribute):
(WebCore::NamedNodeMap::removeAttribute):
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::getAttributeItem):
(WebCore::NamedNodeMap::getAttributeItemIndex):
(WebCore::NamedNodeMap::removeAttribute):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::executeApply):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setType):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttributesAsText):
(WebCore::InspectorDOMAgent::removeAttribute):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::transferUseAttributesToReplacedElement):

Source/WebKit/qt:

* Api/qwebelement.cpp:
(QWebElement::removeAttribute): Updated a caller of
WebCore::Element::removeAttribute to remove ExceptionCode argument.

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

9 years agoWebVTT cues sometimes render when they should not
eric.carlson@apple.com [Wed, 21 Dec 2011 01:14:23 +0000 (01:14 +0000)]
WebVTT cues sometimes render when they should not
https://bugs.webkit.org/show_bug.cgi?id=74873

Reviewed by Darin Adler.

Source/WebCore:

Test: media/track/track-cue-nothing-to-render.html

* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::updateTextTrackDisplay): Don't return early if the current
    cue is empty so the previous cue is removed.

LayoutTests:

* media/track/captions-webvtt/captions-gaps.vtt: Added.
* media/track/track-cue-nothing-to-render-expected.txt: Added.
* media/track/track-cue-nothing-to-render.html: Added.

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

9 years agoDon't crash on the second time VideoLayerChromium::createCCVideoLayer() is called
commit-queue@webkit.org [Wed, 21 Dec 2011 01:09:12 +0000 (01:09 +0000)]
Don't crash on the second time VideoLayerChromium::createCCVideoLayer() is called
https://bugs.webkit.org/show_bug.cgi?id=74963

Patch by Ami Fischman <fischman@chromium.org> on 2011-12-20
Reviewed by James Robinson.

Manually tested by force-dropping the layer tree in CCLayerTreeHost::didBecomeInvisibleOnImplThread().
Crashed before the fix, doesn't crash after.

* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::VideoLayerChromium):
(WebCore::VideoLayerChromium::~VideoLayerChromium):
(WebCore::VideoLayerChromium::createCCLayerImpl):
* platform/graphics/chromium/VideoLayerChromium.h:

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

9 years agowouldTaintOrigin m_cleanURLs cache grows very large when data urls used
commit-queue@webkit.org [Wed, 21 Dec 2011 00:39:28 +0000 (00:39 +0000)]
wouldTaintOrigin m_cleanURLs cache grows very large when data urls used
https://bugs.webkit.org/show_bug.cgi?id=74957

Patch by Scott Graham <scottmg@chromium.org> on 2011-12-20
Reviewed by Kenneth Russell.

No new tests, but memory usage of CanvasRenderingContext::m_cleanURLs
is reduced.

* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):

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

9 years agoChange adoptPtr(new ...) to ...::create in Page.cpp
commit-queue@webkit.org [Wed, 21 Dec 2011 00:23:50 +0000 (00:23 +0000)]
Change adoptPtr(new ...) to ...::create in Page.cpp
https://bugs.webkit.org/show_bug.cgi?id=74457

Patch by Greg Billock <gbillock@google.com> on 2011-12-20
Reviewed by Darin Adler.

* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::create):
* dom/DeviceMotionController.h:
* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::create):
* dom/DeviceOrientationController.h:
* editing/FrameSelection.cpp:
(WebCore::DragCaretController::create):
* editing/FrameSelection.h:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::create):
* history/BackForwardController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::create):
* inspector/InspectorController.h:
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::create):
* loader/ProgressTracker.h:
* notifications/NotificationController.cpp:
(WebCore::NotificationController::create):
* notifications/NotificationController.h:
* page/Chrome.cpp:
(WebCore::Chrome::create):
* page/Chrome.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::create):
* page/ContextMenuController.h:
* page/DragController.cpp:
(WebCore::DragController::create):
* page/DragController.h:
* page/FocusController.cpp:
(WebCore::FocusController::create):
* page/FocusController.h:
* page/GeolocationController.cpp:
(WebCore::GeolocationController::create):
* page/GeolocationController.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::initGroup):
(WebCore::Page::speechInput):
* page/PageGroup.cpp:
(WebCore::PageGroup::create):
* page/PageGroup.h:
* page/Settings.cpp:
(WebCore::Settings::create):
* page/Settings.h:
* page/SpeechInput.cpp:
(WebCore::SpeechInput::create):
* page/SpeechInput.h:

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

9 years agoRubber Stamped by Sam Weinig
barraclough@apple.com [Wed, 21 Dec 2011 00:10:07 +0000 (00:10 +0000)]
Rubber Stamped by Sam Weinig

* runtime/JSGlobalData.cpp:
    - removed some dead code.

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

9 years agoMac build fix after r103354.
rniwa@webkit.org [Wed, 21 Dec 2011 00:04:22 +0000 (00:04 +0000)]
Mac build fix after r103354.

* platform/mac/ScrollAnimatorMac.mm:
(systemUptime):

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

9 years agoAdd ScrollableArea::contentsResized and have it call the scroll animator
andersca@apple.com [Tue, 20 Dec 2011 23:58:30 +0000 (23:58 +0000)]
Add ScrollableArea::contentsResized and have it call the scroll animator
https://bugs.webkit.org/show_bug.cgi?id=74966

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize):
(WebCore::FrameView::contentsResized):
* page/FrameView.h:
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::contentsResized):
* platform/ScrollableArea.h:

Source/WebKit2:

* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::scrollbarStyleChanged):

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

9 years agorequestAnimationFrame on Mac fires at 60fps even when drawing is much slower
simon.fraser@apple.com [Tue, 20 Dec 2011 23:55:11 +0000 (23:55 +0000)]
requestAnimationFrame on Mac fires at 60fps even when drawing is much slower
https://bugs.webkit.org/show_bug.cgi?id=74964

Reviewed by Chris Marrin.

On Mac requestAnimationFrame uses a CVDisplayLink, sending notifications
from the display link thread to the main thread that the display link fired.
However, there was no throttling on these notifications; if processing an event
took a long time, notifications would pile up, and then get handled after
the slow event completed.

This would cause JS animations which animate by changing style to report
60fps when their display framerate was much lower.

Fix by throttling notifications from the display link thread to the web
thread; if the previous event hasn't completed yet, don't send any new ones.

No new tests, since testing this runtime behavior is hard.

* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread):
(WebCore::DisplayRefreshMonitor::notifyClients): Factored out of the
static refreshDisplayOnMainThread method so we can use 'this'.
* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):

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

9 years ago[Coverity] Fix leak in V8HTMLDocument
commit-queue@webkit.org [Tue, 20 Dec 2011 23:46:03 +0000 (23:46 +0000)]
[Coverity] Fix leak in V8HTMLDocument
https://bugs.webkit.org/show_bug.cgi?id=74943

Patch by Greg Billock <gbillock@google.com> on 2011-12-20
Reviewed by Adam Barth.

* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::openCallback):

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

9 years agonrwt: rename field references from _fs to _filesystem
dpranke@chromium.org [Tue, 20 Dec 2011 23:39:54 +0000 (23:39 +0000)]
nrwt: rename field references from _fs to _filesystem
https://bugs.webkit.org/show_bug.cgi?id=74898

Reviewed by Adam Barth.

This is a simple cleanup; most of the code uses
self._filesystem, but some used self._fs; this change renames
the latter to the former to be more consistent.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.__init__):
(Manager.collect_tests):
(Manager._strip_test_dir_prefix):
(Manager._split_into_chunks_if_necessary):
(Manager.results_directory):
(Manager._clobber_old_results):
(Manager._upload_json_files):
(Manager.print_config):
(Manager._copy_results_html_file):
(Manager._show_results_html_file):
(Manager._log_worker_stack):
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator._normalize_results_json):
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGeneratorBase.__init__):
(JSONResultsGeneratorBase.generate_json_output):
(JSONResultsGeneratorBase.generate_times_ms_file):
(JSONResultsGeneratorBase.upload_json_files):
(JSONResultsGeneratorBase._get_svn_revision):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(Base.__init__):

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

9 years agoTightened up Vector<T>::append
ggaren@apple.com [Tue, 20 Dec 2011 23:30:50 +0000 (23:30 +0000)]
Tightened up Vector<T>::append
https://bugs.webkit.org/show_bug.cgi?id=74906

Reviewed by Sam Weinig.

Not a measurable speedup, but code inspection shows better code generated,
and I believe this is a step toward turning off -fomit-frame-pointer.

* wtf/Vector.h:
(WTF::::append):
(WTF::::appendSlowCase): Split out the slow case into a separate function
to keep unnecessary instructions off the hot path. This means the hot
path can now be inlined more often.

Removed some old MSVC7 cruft. Hopefully, we don't need to hang on to a
compiler work-around from 2007.

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

9 years agoTry to fix the Windows build.
andersca@apple.com [Tue, 20 Dec 2011 23:28:37 +0000 (23:28 +0000)]
Try to fix the Windows build.

* UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
(WebKit::WebPopupMenuProxyWin::setFocusedIndex):

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

9 years agoMerge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
commit-queue@webkit.org [Tue, 20 Dec 2011 23:13:59 +0000 (23:13 +0000)]
Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=61144

Patch by Sailesh Agrawal <sail@chromium.org> on 2011-12-20
Reviewed by Beth Dakin.

At a high level the main changes are:
    - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks
    - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff.
    - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing
    - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing

No new tests. Just refactoring.

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
* platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed.
* platform/chromium/ScrollbarThemeChromiumMac.h:
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::scrollbarPainterPaintTrack):
(WebCore::ScrollbarThemeChromiumMac::paint):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
(WebCore::isScrollbarOverlayAPIAvailable):
* platform/mac/NSScrollerImpDetails.mm: Added.
(WebCore::isScrollbarOverlayAPIAvailable):
(WebCore::recommendedScrollerStyle):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(scrollbarPainterForScrollbar):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):

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

9 years agosizeof(RenderStyle) is 64 instead of 56 on Windows (x86)
tony@chromium.org [Tue, 20 Dec 2011 22:37:04 +0000 (22:37 +0000)]
sizeof(RenderStyle) is 64 instead of 56 on Windows (x86)
https://bugs.webkit.org/show_bug.cgi?id=74876

Reviewed by Ryosuke Niwa.

Move bit fields into a new class and use unsigned for all types so we
align at 4 byte bounds. Also move the initializers into the header
file (has the side benefit of not needing to duplicate the initializers
in 3 places).

Enable the compile assert on Windows.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyleBitfields::affectedByUncommonAttributeSelectors):
(WebCore::RenderStyleBitfields::setAffectedByUncommonAttributeSelectors):
(WebCore::RenderStyleBitfields::unique):
(WebCore::RenderStyleBitfields::setUnique):
(WebCore::RenderStyleBitfields::affectedByEmpty):
(WebCore::RenderStyleBitfields::emptyState):
(WebCore::RenderStyleBitfields::setEmptyState):
(WebCore::RenderStyleBitfields::childrenAffectedByFirstChildRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByFirstChildRules):
(WebCore::RenderStyleBitfields::childrenAffectedByLastChildRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByLastChildRules):
(WebCore::RenderStyleBitfields::childrenAffectedByDirectAdjacentRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByDirectAdjacentRules):
(WebCore::RenderStyleBitfields::childrenAffectedByForwardPositionalRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByForwardPositionalRules):
(WebCore::RenderStyleBitfields::childrenAffectedByBackwardPositionalRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByBackwardPositionalRules):
(WebCore::RenderStyleBitfields::firstChildState):
(WebCore::RenderStyleBitfields::setFirstChildState):
(WebCore::RenderStyleBitfields::lastChildState):
(WebCore::RenderStyleBitfields::setLastChildState):
(WebCore::RenderStyleBitfields::childIndex):
(WebCore::RenderStyleBitfields::setChildIndex):
(WebCore::RenderStyleBitfields::setHasExplicitlyInheritedProperties):
(WebCore::RenderStyleBitfields::hasExplicitlyInheritedProperties):

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

9 years ago[chromium] Unreviewed, according to the flakiness dashboard,
tony@chromium.org [Tue, 20 Dec 2011 22:33:22 +0000 (22:33 +0000)]
[chromium] Unreviewed, according to the flakiness dashboard,
http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html
is consistently passing.

* platform/chromium/test_expectations.txt:

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

9 years agoRevert code for r96912 and r101905, since they cause
japhet@chromium.org [Tue, 20 Dec 2011 22:17:40 +0000 (22:17 +0000)]
Revert code for r96912 and r101905, since they cause
regressions in mac scrollbars, caret display in
form fields, etc.
https://bugs.webkit.org/show_bug.cgi?id=74939

Reviewed by Eric Seidel.

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

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

9 years ago[chromium] Unreviewed, according to the flakiness dashboard,
tony@chromium.org [Tue, 20 Dec 2011 22:13:56 +0000 (22:13 +0000)]
[chromium] Unreviewed, according to the flakiness dashboard,
svg/css/glyph-orientation-rounding-test.xhtml is consistently passing
on all platforms.

* platform/chromium/test_expectations.txt:

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

9 years agoenable USE_SKIA_TEXT by default, replacing GDI for all text drawing
reed@google.com [Tue, 20 Dec 2011 22:05:28 +0000 (22:05 +0000)]
enable USE_SKIA_TEXT by default, replacing GDI for all text drawing
https://bugs.webkit.org/show_bug.cgi?id=74928

Reviewed by Stephen White.

* features.gypi:

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

9 years ago[chromium] enable WPO for WebCore libs in official builds
tony@chromium.org [Tue, 20 Dec 2011 21:45:25 +0000 (21:45 +0000)]
[chromium] enable WPO for WebCore libs in official builds
https://bugs.webkit.org/show_bug.cgi?id=74947

Reviewed by James Robinson.

Also move enable_wexit_time_destructors to the top level variables
so we don't have to add it to all targets.

* WebCore.gyp/WebCore.gyp:

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

9 years ago[Qt][WK2] Remove statusBarMessageChanged
commit-queue@webkit.org [Tue, 20 Dec 2011 21:40:42 +0000 (21:40 +0000)]
[Qt][WK2] Remove statusBarMessageChanged
https://bugs.webkit.org/show_bug.cgi?id=74405

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2011-12-20
Reviewed by Tor Arne Vestbø.

Removing support for window.status updates from the public
QML API. See bug for details.

* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/qt/QtWebPageUIClient.cpp:
(QtWebPageUIClient::QtWebPageUIClient):
* UIProcess/qt/QtWebPageUIClient.h:

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

9 years agoAdd ScrollableArea wrappers for a bunch of ScrollAnimator member functions
andersca@apple.com [Tue, 20 Dec 2011 21:21:33 +0000 (21:21 +0000)]
Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
https://bugs.webkit.org/show_bug.cgi?id=74951

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::updateMouseEventTargetNode):
* page/FocusController.cpp:
(WebCore::FocusController::setActive):
* page/FrameView.cpp:
(WebCore::FrameView::didMoveOnscreen):
(WebCore::FrameView::willMoveOffscreen):
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::contentAreaWillPaint):
(WebCore::ScrollableArea::mouseEnteredContentArea):
(WebCore::ScrollableArea::mouseExitedContentArea):
(WebCore::ScrollableArea::mouseMovedInContentArea):
(WebCore::ScrollableArea::mouseEnteredScrollbar):
(WebCore::ScrollableArea::mouseExitedScrollbar):
(WebCore::ScrollableArea::contentAreaDidShow):
(WebCore::ScrollableArea::contentAreaDidHide):
* platform/ScrollableArea.h:
* platform/ScrollableAreaClient.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::mouseEntered):
(WebCore::Scrollbar::mouseExited):
(WebCore::Scrollbar::mouseUp):

Source/WebKit2:

* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::paint):
(WebKit::BuiltInPDFView::handleMouseEvent):
(WebKit::BuiltInPDFView::handleMouseEnterEvent):
(WebKit::BuiltInPDFView::handleMouseLeaveEvent):

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

9 years agoWhen <bdi> content is wrapped, all hell breaks loose
commit-queue@webkit.org [Tue, 20 Dec 2011 21:11:35 +0000 (21:11 +0000)]
When <bdi> content is wrapped, all hell breaks loose
https://bugs.webkit.org/show_bug.cgi?id=74396

New test case by Aharon Lanin for multi-line bidi.

Patch by Ken Buchanan <kenrb@chromium.org> on 2011-12-20
Reviewed by Ryosuke Niwa.

* fast/text/international/bidi-neutral-wrapped.html: Added.
* fast/text/international/bidi-neutral-wrapped-expected.html: Added.

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

9 years agoPerform case insensitive matching on MIME types in XHR
jarred@sencha.com [Tue, 20 Dec 2011 21:06:48 +0000 (21:06 +0000)]
Perform case insensitive matching on MIME types in XHR
https://bugs.webkit.org/show_bug.cgi?id=74800

Source/WebCore:

Perform case insensitive matching on responseMIMEType() in didReceiveData().
Workaround case sensitive matching by DOMImplementation::isXMLMIMEType() in responseIsXML().

Reviewed by Darin Adler.

Tests: http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case.html
       http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didReceiveData):
(WebCore::XMLHttpRequest::responseIsXML):

LayoutTests:

New tests that verify mixed case MIME types are properly handled in XHR for
- user provided types via overrideMimeType()
- server-sent Content-Type headers

Reviewed by Darin Adler.

* http/tests/xmlhttprequest/resources/xmlhttprequest-mimetype-mixed-case.php: Added.
* http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case.html: Added.
* http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case-expected.txt: Added.
* http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case.html: Added.
* http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case-expected.txt: Added.

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

9 years agoRemove no-op DOMAttr* event dispatch methods from Element
adamk@chromium.org [Tue, 20 Dec 2011 21:02:48 +0000 (21:02 +0000)]
Remove no-op DOMAttr* event dispatch methods from Element
https://bugs.webkit.org/show_bug.cgi?id=74946

Reviewed by Darin Adler.

The removed methods had their bodies #if 0'd out, so this should have
no effect on anything.

* dom/Element.cpp:
* dom/Element.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::addAttribute):
(WebCore::NamedNodeMap::removeAttribute):

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

9 years agoScrollableArea should have an optional ScrollableAreaClient
andersca@apple.com [Tue, 20 Dec 2011 20:33:38 +0000 (20:33 +0000)]
ScrollableArea should have an optional ScrollableAreaClient
https://bugs.webkit.org/show_bug.cgi?id=74949

Reviewed by Sam Weinig.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::scrollableAreaClient):
(WebCore::FrameView::FrameView):
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::scrollableAreaClientForFrame):
* page/ScrollingCoordinator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::ScrollView):
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea):
* platform/ScrollableArea.h:
* platform/ScrollableAreaClient.h: Added.
(WebCore::ScrollableAreaClient::~ScrollableAreaClient):
(WebCore::ScrollableAreaClient::ScrollableAreaClient):

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

9 years ago[WinCairo] Unreviewed build fix.
bfulgham@webkit.org [Tue, 20 Dec 2011 20:29:47 +0000 (20:29 +0000)]
[WinCairo] Unreviewed build fix.

* win/WebKit2CFLite.def: Add missing export declaration.

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

9 years agoRename Element::setAttributeMap to parserSetAttributeMap and limit its use to the...
adamk@chromium.org [Tue, 20 Dec 2011 19:40:58 +0000 (19:40 +0000)]
Rename Element::setAttributeMap to parserSetAttributeMap and limit its use to the parser
https://bugs.webkit.org/show_bug.cgi?id=74885

Reviewed by Ryosuke Niwa.

Element::setAttributeMap is currently used by the parser in cases
where a NamedNodeMap of attributes has already been allocated and
transfers ownership to the Element. Other uses in WebCore don't have
this ownership-transfer requirement, and so are more clearly expressed
with normal setAttribute calls.

Eliminating non-parser callers allows the code to make safe
assumptions about the state of the Element it's called on: no need to
worry about, e.g., updating the id in the document's cache or
enqueueing mutation records.

No new tests, no change in behavior expected.

* dom/Element.cpp:
(WebCore::Element::parserSetAttributeMap): Renamed, added assertions
to make sure it's not called unexpectedly, update comments.
* dom/Element.h:
* html/HTMLViewSourceDocument.cpp: Use setAttribute instead of setAttributeMap.
(WebCore::HTMLViewSourceDocument::createContainingTable):
(WebCore::HTMLViewSourceDocument::addSpanWithClassName):
(WebCore::HTMLViewSourceDocument::addLine):
(WebCore::HTMLViewSourceDocument::addBase):
(WebCore::HTMLViewSourceDocument::addLink):
* html/parser/HTMLConstructionSite.cpp: Reference new name.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
(WebCore::HTMLConstructionSite::insertScriptElement):
(WebCore::HTMLConstructionSite::createElement):
(WebCore::HTMLConstructionSite::createHTMLElement):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): Use setAttribute instead of setAttributeMap.
Also get rid of an unnecessary String -> AtomicString conversion.

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

9 years agoRemove unused parameter from RenderLayerCompositor::rebuildCompositingLayerTree
commit-queue@webkit.org [Tue, 20 Dec 2011 18:12:34 +0000 (18:12 +0000)]
Remove unused parameter from RenderLayerCompositor::rebuildCompositingLayerTree
https://bugs.webkit.org/show_bug.cgi?id=74936

Patch by Iain Merrick <husky@google.com> on 2011-12-20
Reviewed by Simon Fraser.

Pure refactoring, no change in functionality.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
* rendering/RenderLayerCompositor.h:

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

9 years agoReplace webkitperl/run-leaks_unittest/RunLeaks.pm with webkitperl/LoadAsModule.pm
haraken@chromium.org [Tue, 20 Dec 2011 17:40:33 +0000 (17:40 +0000)]
Replace webkitperl/run-leaks_unittest/RunLeaks.pm with webkitperl/LoadAsModule.pm
https://bugs.webkit.org/show_bug.cgi?id=74836

Reviewed by David Kilzer.

webkitperl/run-leaks_unittest/RunLeaks.pm can be used for unit-testing of run-leaks only.
This patch creates more generalized webkitperl/LoadAsModule.pm, which can be also used
for unit-testing of other Perl scripts. We are planning to use it for unit-testing
of prepare-ChangeLog.

Using LoadAsModule.pm, you can load a Perl script as follows.
The first argument is the arbitrary package name you want to use, and the second argument
is the name of the Perl script you want to load.

    use LoadAsModule qw(RunLeaks run-leaks);
    RunLeaks::someFunctionDefinedInRunLeaks(...);

Tests: Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl
       Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl
       Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl

* Scripts/webkitperl/LoadAsModule.pm: Added.
* Scripts/webkitperl/run-leaks_unittest/RunLeaks.pm: Removed.
(import):
(readFile):
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl: Used LoadAsModule instead of RunLeaks.
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl: Ditto.
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl: Ditto.

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

9 years agoRenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags members should be...
tony@chromium.org [Tue, 20 Dec 2011 17:31:39 +0000 (17:31 +0000)]
RenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags members should be 4 byte aligned
https://bugs.webkit.org/show_bug.cgi?id=74880

Reviewed by Ryosuke Niwa.

Use unsigned for all types so we get 4 byte boundaries (unsigned char
means we try to align to 1 byte boundaries) and add setters and
getters for bool members.

Move some members around to make sure we're aligned to 4 byte boundaries.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::copyNonInheritedFrom):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::NonInheritedFlags::affectedByHover):
(WebCore::InheritedFlags::NonInheritedFlags::setAffectedByHover):
(WebCore::InheritedFlags::NonInheritedFlags::affectedByActive):
(WebCore::InheritedFlags::NonInheritedFlags::setAffectedByActive):
(WebCore::InheritedFlags::NonInheritedFlags::affectedByDrag):
(WebCore::InheritedFlags::NonInheritedFlags::setAffectedByDrag):
(WebCore::InheritedFlags::NonInheritedFlags::isLink):
(WebCore::InheritedFlags::NonInheritedFlags::setIsLink):
(WebCore::InheritedFlags::setBitDefaults):
(WebCore::InheritedFlags::affectedByHoverRules):
(WebCore::InheritedFlags::affectedByActiveRules):
(WebCore::InheritedFlags::affectedByDragRules):
(WebCore::InheritedFlags::setAffectedByHoverRules):
(WebCore::InheritedFlags::setAffectedByActiveRules):
(WebCore::InheritedFlags::setAffectedByDragRules):
(WebCore::InheritedFlags::isLink):
(WebCore::InheritedFlags::setIsLink):

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

9 years ago[Qt][WK2] 2 editing tests introduced in r103073 fails
ossy@webkit.org [Tue, 20 Dec 2011 17:26:43 +0000 (17:26 +0000)]
[Qt][WK2] 2 editing tests introduced in r103073 fails
https://bugs.webkit.org/show_bug.cgi?id=74937

Unreviewed gardening, skip failing tests.

* platform/qt-wk2/Skipped:

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

9 years ago[Qt][WK2] Assertion hit and crash with fast/multicol/pagination-* tests
ossy@webkit.org [Tue, 20 Dec 2011 17:23:05 +0000 (17:23 +0000)]
[Qt][WK2] Assertion hit and crash with fast/multicol/pagination-* tests
https://bugs.webkit.org/show_bug.cgi?id=74511

Unreviewed gardening, skip failing tests.

* platform/qt-wk2/Skipped:

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

9 years agoemacs: unreviewed. add settings for editing js files.
loislo@chromium.org [Tue, 20 Dec 2011 17:09:20 +0000 (17:09 +0000)]
emacs: unreviewed. add settings for editing js files.

* .dir-locals.el:

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

9 years agoREGRESSION(r103325) - injected-script-for-origin.html crashing in Chromium Linux...
caseq@chromium.org [Tue, 20 Dec 2011 16:32:25 +0000 (16:32 +0000)]
REGRESSION(r103325) - injected-script-for-origin.html crashing in Chromium Linux debug
https://bugs.webkit.org/show_bug.cgi?id=74934

Unreviewed test fix.

* http/tests/inspector/injected-script-for-origin.html:

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

9 years agochromium: unreviewed. Clean out passing tests from test_expectations.txt.
loislo@chromium.org [Tue, 20 Dec 2011 16:27:31 +0000 (16:27 +0000)]
chromium: unreviewed. Clean out passing tests from test_expectations.txt.

* platform/chromium/test_expectations.txt:
  plugins/form-value.html: was fixed at r103147.
  fast/images/move-image-to-new-document.html: was fixed somewhere between r102959 and r102965.
  media/media-controller-playback.html: rebaselined at r103285.

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

9 years ago[Qt] Build fix for gcc used on WK2 build bot.
hausmann@webkit.org [Tue, 20 Dec 2011 15:42:38 +0000 (15:42 +0000)]
[Qt] Build fix for gcc used on WK2 build bot.

* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case:
with values outside the range of the type. Instead switch() on the int instead.

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

9 years ago[Qt] Extend QQuickWebview::navigationRequested API
hausmann@webkit.org [Tue, 20 Dec 2011 15:35:52 +0000 (15:35 +0000)]
[Qt] Extend QQuickWebview::navigationRequested API
https://bugs.webkit.org/show_bug.cgi?id=73818

Patch by Rafael Brandao <rafael.lobo@openbossa.org> on 2011-12-20
Reviewed by Simon Hausmann.

Source/WebKit/qt:

* declarative/experimental/plugin.cpp:

Source/WebKit2:

Added url of the originating frame on QWebNavigationRequest,
accessible via 'request.originatingUrl' on QML. Download action
was moved to experimental, so in order to use it you should set
'request.action = WebViewExperimental.DownloadRequest' on QML.

* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebnavigationrequest.cpp:
(QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
(QWebNavigationRequest::QWebNavigationRequest):
(QWebNavigationRequest::originatingUrl):
* UIProcess/API/qt/qwebnavigationrequest_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
Tests were modified a bit to reuse urls and also added a test case to check
originating url once a request is done.
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
* UIProcess/qt/QtWebPagePolicyClient.h:

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

9 years ago[Qt] WK2 Debugging quirks need some improvement
kbalazs@webkit.org [Tue, 20 Dec 2011 15:21:49 +0000 (15:21 +0000)]
[Qt] WK2 Debugging quirks need some improvement
https://bugs.webkit.org/show_bug.cgi?id=74859

Reviewed by Simon Hausmann.

Improvements added to make debugging WebKit2 more
confortable and efficient:
1. Unify debugging quirks. From now all of them are controlled
by the QT_WEBKIT2_DEBUG environment variable.
2. Disable crash handlers for WebKitTestRunner if debugging quirks
are used to make it possible to use postmortem debugging via core dumps
which is extremely useful for debugging bugs triggered by layout tests.
3. Disable test timeout for WebKitTestRunner if debugging quirks
are used because that makes debugging impossible.

Source/WebKit2:

* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::QtWebProcess::setupChildProcess):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):

Tools:

* WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
(WTR::LayoutTestController::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/qt/TestControllerQt.cpp:
(WTR::TestController::platformRunUntil):

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

9 years ago[Chromium] Rebaseline fast/js/mozilla/strict/15.4.5.1.html
loislo@chromium.org [Tue, 20 Dec 2011 15:07:09 +0000 (15:07 +0000)]
[Chromium] Rebaseline fast/js/mozilla/strict/15.4.5.1.html
https://bugs.webkit.org/show_bug.cgi?id=74918

Unreviewed expectation fix.

Patch by Michael Starzinger <mstarzinger@chromium.org> on 2011-12-20

* platform/chromium/fast/js/mozilla/strict/15.4.5.1-expected.txt: Added.
* platform/chromium/test_

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

9 years agoRegression(99212): table rows get incorrect height after changing some cells' height
jchaffraix@webkit.org [Tue, 20 Dec 2011 14:08:52 +0000 (14:08 +0000)]
Regression(99212): table rows get incorrect height after changing some cells' height
https://bugs.webkit.org/show_bug.cgi?id=74303

Reviewed by Darin Adler.

Source/WebCore:

Tests: fast/table/resize-table-binding-cell.html
       fast/table/resize-table-cell.html
       fast/table/resize-table-row.html

r99212 wrongly implemented the row's logicalHeight recalculation.
The original code would use recalcCells which would properly recalculate a
row logicalHeight by iterating over the table's cells but throwing out the
existing result.

Our approach is just to recompute our row's logicalHeight and leave the
rest of the section untouched.

* rendering/RenderTableSection.cpp:
(WebCore::updateLogicalHeightForCell):
Added this new helper function to update the RowStruct logicalHeight during
|addCell| and |rowLogicalHeightChanged|.

(WebCore::RenderTableSection::addCell):
Replaced the old code with a call to updateLogicalHeightForCell.
(WebCore::RenderTableSection::rowLogicalHeightChanged):
Added a call to updateLogicalHeightForCell for each cells.

LayoutTests:

Added some tests that resize a cell or a row and check that we properly recompute the height.

* fast/table/resize-table-binding-cell-expected.txt: Added.
* fast/table/resize-table-binding-cell.html: Added.
* fast/table/resize-table-cell-expected.txt: Added.
* fast/table/resize-table-cell.html: Added.
* fast/table/resize-table-row-expected.txt: Added.
* fast/table/resize-table-row.html: Added.

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

9 years agoUnreviewed, rolling out r103322.
loislo@chromium.org [Tue, 20 Dec 2011 14:04:25 +0000 (14:04 +0000)]
Unreviewed, rolling out r103322.
http://trac.webkit.org/changeset/103322
https://bugs.webkit.org/show_bug.cgi?id=74927

seven inspector's tests are crashing on qt (Requested by
loislo on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-12-20

* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType.is_event_param_check_optional):
(RawTypes.Object.is_event_param_check_optional):
(RawTypes.Array.is_event_param_check_optional):
(RawTypes):
(Generator.process_command):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:

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

9 years agoWeb Inspector: [Extensions API] allow setting extension API per extension security...
caseq@chromium.org [Tue, 20 Dec 2011 13:42:35 +0000 (13:42 +0000)]
Web Inspector: [Extensions API] allow setting extension API per extension security origin
https://bugs.webkit.org/show_bug.cgi?id=74868

Reviewed by Pavel Feldman.

This replaces InspectorExtensionAPI string within InspectorFrontendHost with a map by extension
security origin, so that we can have APIs customized by extension (in particular, this is needed
to expose experimental APIs only to certain extensions).

* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
(WebCore::InspectorAgent::setInjectedScriptForOrigin):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::setInjectedScriptForOrigin):
* inspector/InspectorController.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setInjectedScriptForOrigin):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._addExtensions):
(WebInspector.ExtensionServer.prototype._addExtension):

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

9 years ago[Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl...
jesus@webkit.org [Tue, 20 Dec 2011 13:36:14 +0000 (13:36 +0000)]
[Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test
https://bugs.webkit.org/show_bug.cgi?id=74923

Rubber-stamped by Csaba Osztrogonác.

Fixing API usage after http://trac.webkit.org/changeset/103310.

* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::loadNonexistentFileUrl):

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

9 years ago[Qt] Favicon support should work with multiple web contexts
hausmann@webkit.org [Tue, 20 Dec 2011 13:31:53 +0000 (13:31 +0000)]
[Qt] Favicon support should work with multiple web contexts
https://bugs.webkit.org/show_bug.cgi?id=74922

Reviewed by Tor Arne Vestbø.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is
already a member variable "context" which is the correct one.
(QQuickWebViewPrivate::setIcon): Ditto.
* UIProcess/API/qt/qwebiconimageprovider.cpp:
(QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to
query the correct icon database.
* UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext.
(WebKit::generateContextID):
(WebKit::QtWebContext::QtWebContext):
(WebKit::QtWebContext::~QtWebContext):
(WebKit::QtWebContext::contextByID):
(WebKit::QtWebContext::initialize):
* UIProcess/qt/QtWebContext.h:
(WebKit::QtWebContext::context):
(WebKit::QtWebContext::contextID):
* UIProcess/qt/QtWebIconDatabaseClient.cpp:
(QtWebIconDatabaseClient::QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url.
* UIProcess/qt/QtWebIconDatabaseClient.h:

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

9 years agoWeb Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
loislo@chromium.org [Tue, 20 Dec 2011 13:20:28 +0000 (13:20 +0000)]
Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
https://bugs.webkit.org/show_bug.cgi?id=69366

Patch by Peter Rybin <peter.rybin@gmail.com> on 2011-12-20
Reviewed by Pavel Feldman.

Generator fixed and all usages are changed manually.

* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType.is_event_param_check_optional):
(RawTypes.BaseType):
(RawTypes.BaseType.get_output_argument_prefix):
(RawTypes.Object.get_output_argument_prefix):
(RawTypes.Array.get_output_argument_prefix):
(RawTypes):
(Generator.process_command):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:

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

9 years ago[GTK] Change default WebSocket protocol to the latest one
yutak@chromium.org [Tue, 20 Dec 2011 13:17:17 +0000 (13:17 +0000)]
[GTK] Change default WebSocket protocol to the latest one
https://bugs.webkit.org/show_bug.cgi?id=74064

Reviewed by Martin Robinson.

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
Use hybi WebSocket protocol by default.

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

9 years ago[Qt] HTTP header injection via QWebPage::userAgentForUrl()
jarred@sencha.com [Tue, 20 Dec 2011 12:56:06 +0000 (12:56 +0000)]
[Qt] HTTP header injection via QWebPage::userAgentForUrl()
https://bugs.webkit.org/show_bug.cgi?id=68560

Strip out newline characters from the result of userAgentForUrl() to prevent additional
HTTP headers in HTTP requests.

New QtTest case that validates the user agent, as returned by navigator.userAgent, does not
contain any newline characters.

Reviewed by Simon Hausmann.

* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::userAgent):
* tests/qwebpage/tst_qwebpage.cpp:
(CustomUserAgentWebPage::userAgentForUrl):
(tst_QWebPage::userAgentNewlineStripping):

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

9 years ago[Qt] Unreviewed gardening.
ossy@webkit.org [Tue, 20 Dec 2011 12:49:30 +0000 (12:49 +0000)]
[Qt] Unreviewed gardening.

* platform/qt-mac/Skipped: Skip failing and crashing tests to try to paint the bot green.

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

9 years agoCrash in RenderTable::outerBorderAfter
jchaffraix@webkit.org [Tue, 20 Dec 2011 12:40:48 +0000 (12:40 +0000)]
Crash in RenderTable::outerBorderAfter
http://webkit.org/b/74026
<rdar://problem/10552313>

Reviewed by Eric Seidel.

Source/WebCore:

Test: fast/table/computeLogicalWidth-table-needsSectionRecalc.html

RenderBlock can call computeLogicalWidth() before calling layout(). The code in
RenderTable::computeLogicalWidth would make the assumption that layout() was called
as layout() is responsible for recomputing our sections.

To prevent the issue, let's just recompute the section if it's needed as this situation
shouldn't be an error. Also adding more knowledge of table in RenderBlock seems bad.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
Make sure we recalculate our section if it's needed.

LayoutTests:

* fast/table/computeLogicalWidth-table-needsSectionRecalc-expected.txt: Added.
* fast/table/computeLogicalWidth-table-needsSectionRecalc.html: Added.

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

9 years ago[Qt][WK2] Implement favicon support
hausmann@webkit.org [Tue, 20 Dec 2011 11:49:21 +0000 (11:49 +0000)]
[Qt][WK2] Implement favicon support
https://bugs.webkit.org/show_bug.cgi?id=71082

Patch by Rafael Brandao <rafael.lobo@openbossa.org> on 2011-12-20
Reviewed by Simon Hausmann.

.:

* Source/qtwebkit-export.map: Added new classes.

Source/WebKit/qt:

* declarative/plugin.cpp:
(WebKitQmlPlugin::initializeEngine): Setup for the QDeclarativeImageProvider to display favicons.
Its handles the following url format: "image://webicon/<iconID>#<pageURL>".

Source/WebKit2:

Added attribute to QQuickWebView named "icon" that should be used
as source for QQuickImage in order to display it. All images
pointing to it will refresh when the icon is ready. We also use IDs
to make it possible to handle different icons for the same page URL
at different times (i.e. dynamically changing favicon).

IconDatabase storage lies on UIProcess and the synchronous call for
the icon that happens on WebIconDatabase won't need to send any message
to WebProcess. The part of IconDatabase on WebProcess handles the download
of the resource whenever it is needed. Then the content downloaded is sent
through IPC to the actual database, on UIProcess.

* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::_q_onIconChangedForPageURL):
(QQuickWebViewPrivate::setIcon):
(QQuickWebView::icon):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebiconimageprovider.cpp: Added.
(QWebIconImageProvider::QWebIconImageProvider):
(QWebIconImageProvider::~QWebIconImageProvider):
(QWebIconImageProvider::requestImage):
* UIProcess/API/qt/qwebiconimageprovider_p.h: Added.
* UIProcess/WebContext.h:
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::synchronousIconURLForPageURL):
(WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter
and a default value for it to not break the old usage. The support for
multiple sizes of favicons is still missing on WebCore.
* UIProcess/WebIconDatabase.h:
* UIProcess/qt/QtWebContext.cpp:
(WebKit::QtWebContext::initialize):
* UIProcess/qt/QtWebContext.h:
(WebKit::QtWebContext::iconDatabase):
* UIProcess/qt/QtWebIconDatabaseClient.cpp: Added.
(toQtWebIconDatabaseClient):
(QtWebIconDatabaseClient::QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
(QtWebIconDatabaseClient::didChangeIconForPageURL):
(QtWebIconDatabaseClient::iconImageForPageURL):
(QtWebIconDatabaseClient::iconURLHashForPageURL):
(QtWebIconDatabaseClient::requestIconForPageURL):
(QtWebIconDatabaseClient::retainIconForPageURL):
(QtWebIconDatabaseClient::releaseIconForPageURL):
* UIProcess/qt/QtWebIconDatabaseClient.h: Added.
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::didStartProgress):

Tools:

A favorite icon was added on MiniBrowser's url bar as example.
We display a default icon when the page doesn't have an icon ready.

* MiniBrowser/qt/MiniBrowser.qrc:
* MiniBrowser/qt/icons/favicon.png: Added.
* MiniBrowser/qt/qml/BrowserWindow.qml:

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

9 years ago[Refactoring] Replace imp with impl in CodeGeneratorJS.pm
haraken@chromium.org [Tue, 20 Dec 2011 11:44:29 +0000 (11:44 +0000)]
[Refactoring] Replace imp with impl in CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=74901

Reviewed by Adam Barth.

As pointed out in bug 74837, the generated code by CodeGeneratorJS.pm includes
both 'imp' and 'impl'. This patch unifies them into 'impl'.
I confirmed that "perl -lne 'print if /imp[^a-z]/' CodeGeneratorJS.pm" outputs nothing.

No new tests. No change in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall):
(GenerateEventListenerCall):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(NativeToJSValue):

* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::jsTestEventConstructorAttr1):
(WebCore::jsTestEventConstructorAttr2):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceStr1):
(WebCore::jsTestInterfaceStr2):
(WebCore::jsTestInterfaceStr3):
(WebCore::setJSTestInterfaceStr2):
(WebCore::setJSTestInterfaceStr3):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjReadOnlyIntAttr):
(WebCore::jsTestObjReadOnlyStringAttr):
(WebCore::jsTestObjReadOnlyTestObjAttr):
(WebCore::jsTestObjShortAttr):
(WebCore::jsTestObjUnsignedShortAttr):
(WebCore::jsTestObjIntAttr):
(WebCore::jsTestObjLongLongAttr):
(WebCore::jsTestObjUnsignedLongLongAttr):
(WebCore::jsTestObjStringAttr):
(WebCore::jsTestObjTestObjAttr):
(WebCore::jsTestObjXMLObjAttr):
(WebCore::jsTestObjCreate):
(WebCore::jsTestObjReflectedStringAttr):
(WebCore::jsTestObjReflectedIntegralAttr):
(WebCore::jsTestObjReflectedUnsignedIntegralAttr):
(WebCore::jsTestObjReflectedBooleanAttr):
(WebCore::jsTestObjReflectedURLAttr):
(WebCore::jsTestObjReflectedNonEmptyURLAttr):
(WebCore::jsTestObjReflectedCustomIntegralAttr):
(WebCore::jsTestObjReflectedCustomBooleanAttr):
(WebCore::jsTestObjReflectedCustomURLAttr):
(WebCore::jsTestObjReflectedCustomNonEmptyURLAttr):
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjAttrWithSetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithSetterException):
(WebCore::jsTestObjScriptStringAttr):
(WebCore::jsTestObjConditionalAttr1):
(WebCore::jsTestObjConditionalAttr2):
(WebCore::jsTestObjConditionalAttr3):
(WebCore::jsTestObjCachedAttribute1):
(WebCore::jsTestObjCachedAttribute2):
(WebCore::jsTestObjDescription):
(WebCore::jsTestObjId):
(WebCore::jsTestObjHash):
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
(WebCore::setJSTestObjIntAttr):
(WebCore::setJSTestObjLongLongAttr):
(WebCore::setJSTestObjUnsignedLongLongAttr):
(WebCore::setJSTestObjStringAttr):
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedIntegralAttr):
(WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedNonEmptyURLAttr):
(WebCore::setJSTestObjReflectedCustomIntegralAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjReflectedCustomNonEmptyURLAttr):
(WebCore::setJSTestObjAttrWithGetterException):
(WebCore::setJSTestObjAttrWithSetterException):
(WebCore::setJSTestObjStringAttrWithGetterException):
(WebCore::setJSTestObjStringAttrWithSetterException):
(WebCore::setJSTestObjConditionalAttr1):
(WebCore::setJSTestObjConditionalAttr2):
(WebCore::setJSTestObjConditionalAttr3):
(WebCore::setJSTestObjId):
(WebCore::jsTestObjPrototypeFunctionVoidMethod):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethod):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithException):
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfaceValue):

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

9 years agoWeb Inspector: reproducible crash after closing web inspector and browser window...
pfeldman@chromium.org [Tue, 20 Dec 2011 10:02:50 +0000 (10:02 +0000)]
Web Inspector: reproducible crash after closing web inspector and browser window  (iCab)
https://bugs.webkit.org/show_bug.cgi?id=74255

Patch by Pavel Feldman <pavel.feldman@gmail.com> on 2011-12-20
Reviewed by Yury Semikhatsky.

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:
(WebInspectorClient::releaseFrontend):

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::bringFrontendToFront):
(-[WebInspectorWindowController destroyInspectorView:]):

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::~WebInspectorClient):
(WebInspectorFrontendClient::destroyInspectorView):
* WebCoreSupport/WebInspectorClient.h:

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

9 years agoMake WebIntentServiceInfo constructor public for testing.
commit-queue@webkit.org [Tue, 20 Dec 2011 09:41:31 +0000 (09:41 +0000)]
Make WebIntentServiceInfo constructor public for testing.
https://bugs.webkit.org/show_bug.cgi?id=74764

Patch by Greg Billock <gbillock@google.com> on 2011-12-20
Reviewed by Darin Fisher.

* public/WebIntentServiceInfo.h:

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

9 years ago[Qt] Improve QQuickWebView error handling API
commit-queue@webkit.org [Tue, 20 Dec 2011 08:56:39 +0000 (08:56 +0000)]
[Qt] Improve QQuickWebView error handling API
https://bugs.webkit.org/show_bug.cgi?id=73815

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2011-12-20
Reviewed by Simon Hausmann.

Modifying loadFail signal to include the error description
and changing the ErrorType enum to ErrorDomain, to stay aligned
with ResourceError API itself.

* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::dispatchLoadFailed):

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

9 years ago[chromium] compositing/shadows tests fail with accelerated painting
alokp@chromium.org [Tue, 20 Dec 2011 08:39:07 +0000 (08:39 +0000)]
[chromium] compositing/shadows tests fail with accelerated painting
https://bugs.webkit.org/show_bug.cgi?id=74871

Reviewed by James Robinson.

Switched over to new API for creating accelerated canvas GrContext::createPlatformTexture.
It correctly binds the stencil buffer to the FBO.

Test: compositing/shadows/shadow-drawing.html (existing)

* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::createAcceleratedCanvas):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/ManagedTexture.cpp:
(WebCore::ManagedTexture::allocate):
(WebCore::ManagedTexture::bindTexture):
(WebCore::ManagedTexture::framebufferTexture2D):
* platform/graphics/chromium/ManagedTexture.h:

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

9 years agoUnreviewed, rolling out r103291.
loislo@chromium.org [Tue, 20 Dec 2011 08:00:53 +0000 (08:00 +0000)]
Unreviewed, rolling out r103291.
http://trac.webkit.org/changeset/103291
https://bugs.webkit.org/show_bug.cgi?id=74915

Looks like it broke fast/events/touch and
fast/events/touch/gesture/gesture-scroll.html
http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.5/builds/7010
(Requested by loislo on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-12-20

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/chromium/ScrollAnimatorChromiumMac.h: Copied from Source/WebCore/platform/mac/ScrollAnimatorMac.h.
(WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
(WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
(WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
(WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate):
(WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate):
* platform/chromium/ScrollAnimatorChromiumMac.mm: Added.
(-[NSProcessInfo systemUptime]):
(abs):
(-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
(-[ScrollAnimationHelperDelegate bounds]):
(-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
(-[ScrollAnimationHelperDelegate convertSizeToBase:]):
(-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
(-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
(-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
(-[ScrollAnimationHelperDelegate superview]):
(-[ScrollAnimationHelperDelegate documentView]):
(-[ScrollAnimationHelperDelegate window]):
(-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
(-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
(-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPartAnimation setCurrentProgress:]):
(-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
(-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollbarPainterDelegate cancelAnimations]):
(-[ScrollbarPainterDelegate convertRectToBacking:]):
(-[ScrollbarPainterDelegate convertRectFromBacking:]):
(-[ScrollbarPainterDelegate layer]):
(-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
(-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
(WebCore::ScrollAnimator::create):
(WebCore::chromiumScrollbarTheme):
(WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
(WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
(WebCore::ScrollAnimatorChromiumMac::scroll):
(WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation):
(WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged):
(WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
(WebCore::ScrollAnimatorChromiumMac::contentsResized):
(WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
(WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
(WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
(WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
(WebCore::elasticDeltaForTimeDelta):
(WebCore::elasticDeltaForReboundDelta):
(WebCore::reboundDeltaForElasticDelta):
(WebCore::scrollWheelMultiplier):
(WebCore::isScrollingLeftAndShouldNotRubberBand):
(WebCore::isScrollingRightAndShouldNotRubberBand):
(WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
(WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
(WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
(WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
(WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
(WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
(WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
(WebCore::roundTowardZero):
(WebCore::roundToDevicePixelTowardZero):
(WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorChromiumMac::setIsActive):
(WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle):
(WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
(WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
(WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
(WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Added.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Added.
(lookUpNSScrollerImpClass):
(lookUpNSScrollerImpPairClass):
(scrollbarControlSizeToNSControlSize):
(preferredScrollerStyle):
(wkScrollbarPainterUsesOverlayScrollers):
(wkScrollbarPainterIsHorizontal):
(wkScrollbarPainterKnobAlpha):
(wkScrollbarPainterSetOverlayState):
(wkScrollbarPainterPaint):
(wkScrollbarPainterPaintTrack):
(wkScrollbarPainterPaintKnob):
(wkScrollbarMinimumThumbLength):
(wkScrollbarPainterSetDelegate):
(wkScrollbarPainterSetEnabled):
(wkScrollbarPainterTrackAlpha):
(wkMakeScrollbarPainter):
(wkScrollbarThickness):
(wkScrollbarMinimumTotalLengthNeededForThumb):
(wkVerticalScrollbarPainterForController):
(wkHorizontalScrollbarPainterForController):
(wkScrollbarPainterControllerStyle):
(wkMakeScrollbarReplacementPainter):
(wkSetPainterForPainterController):
(wkSetScrollbarPainterControllerStyle):
(wkScrollbarPainterKnobRect):
(wkSetScrollbarPainterKnobAlpha):
(wkSetScrollbarPainterTrackAlpha):
(wkSetScrollbarPainterKnobStyle):
(wkMakeScrollbarPainterController):
(wkContentAreaScrolled):
(wkContentAreaWillPaint):
(wkMouseEnteredContentArea):
(wkMouseExitedContentArea):
(wkMouseMovedInContentArea):
(wkWillStartLiveResize):
(wkContentAreaResized):
(wkWillEndLiveResize):
(wkContentAreaDidShow):
(wkContentAreaDidHide):
(wkDidBeginScrollGesture):
(wkDidEndScrollGesture):
(wkScrollbarPainterForceFlashScrollers):
(isScrollbarOverlayAPIAvailable):
* platform/chromium/ScrollbarThemeChromiumMac.h:
(WebCore::ScrollbarThemeChromiumMac::supportsControlTints):
(WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages):
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::scrollbarMap):
(+[ScrollbarPrefsObserver appearancePrefsChanged:]):
(+[ScrollbarPrefsObserver behaviorPrefsChanged:]):
(+[ScrollbarPrefsObserver registerAsObserver]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
(WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar):
(WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
(WebCore::ScrollbarThemeChromiumMac::painterForScrollbar):
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::ScrollbarThemeChromiumMac::preferencesChanged):
(WebCore::ScrollbarThemeChromiumMac::scrollbarThickness):
(WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars):
(WebCore::toScrollbarPainterKnobStyle):
(WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeChromiumMac::initialAutoscrollTimerDelay):
(WebCore::ScrollbarThemeChromiumMac::autoscrollTimerDelay):
(WebCore::ScrollbarThemeChromiumMac::buttonsPlacement):
(WebCore::ScrollbarThemeChromiumMac::hasButtons):
(WebCore::ScrollbarThemeChromiumMac::hasThumb):
(WebCore::buttonRepaintRect):
(WebCore::ScrollbarThemeChromiumMac::backButtonRect):
(WebCore::ScrollbarThemeChromiumMac::forwardButtonRect):
(WebCore::ScrollbarThemeChromiumMac::trackRect):
(WebCore::ScrollbarThemeChromiumMac::minimumThumbLength):
(WebCore::ScrollbarThemeChromiumMac::shouldCenterOnThumb):
(WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb):
(WebCore::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeChromiumMac::updateEnabledState):
(WebCore::ScrollbarThemeChromiumMac::paint):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/NSScrollerImpDetails.mm: Removed.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate layer]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
(WebCore::ScrollbarTheme::nativeTheme):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::ScrollbarThemeMac::paint):

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

9 years agoMake all calls to NamedNodeMap::setAttributes go through Element
adamk@chromium.org [Tue, 20 Dec 2011 07:49:14 +0000 (07:49 +0000)]
Make all calls to NamedNodeMap::setAttributes go through Element
https://bugs.webkit.org/show_bug.cgi?id=74895

Reviewed by Ryosuke Niwa.

There are two reasons for this change. One is an optimization: some
callers were previously always creating a NamedNodeMap even if the
source didn't have any attributes.

The other reason is forward-looking: setAttributes' behavior is subtly
wrong in the presence of MutationObservers. This doesn't matter
for most callers since the element on which setAttributesFromElement
is called is newly-created. In the editing case, however, it could
make a difference in behavior, which I hope to fix in a future change
without sacrificing the performance of cloneNode() on an Element
(which is what NamedNodeMap::setAttributes is designed for).

No new tests, no change in behavior.

* dom/Element.cpp:
(WebCore::Element::cloneElementWithoutChildren): Call setAttributesFromElement.
* dom/Element.h:
(WebCore::Element::setAttributesFromElement): Create new inline helper method
which conditionally forwards to NamedNodeMap::setAttribute.
* dom/NamedNodeMap.h: Make setAttributes private (Element is already a friend).
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Call setAttributesFromElement.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName): Call setAttributesFromElement.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Call setAttributesFromElement.
(WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Call setAttributesFromElement
and make use of ASSERT_NO_EXCEPTION to make code easier to read.

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

9 years agoTemporary GPR should not be lazily allocated in DFG JIT on X86
yuqiang.xian@intel.com [Tue, 20 Dec 2011 07:31:00 +0000 (07:31 +0000)]
Temporary GPR should not be lazily allocated in DFG JIT on X86
https://bugs.webkit.org/show_bug.cgi?id=74908

Reviewed by Filip Pizlo.

On X86, we used to allocate a temporary GPR lazily when it's really
used rather than defined. This may cause potential issues of
allocating registers inside control flow and result in problems in
subsequent code generation, for example the DFG JIT may think an
operand already being spilled (to satisfy the allocation request) and
generate code to read the data from memory, but the allocation and
spilling are in a branch which is not taken at runtime, so the
generated code is incorrect.

Although current DFG JIT code doesn't have this problematic pattern,
it's better to cut-off the root to avoid any potential issues in the
future.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::GPRTemporary::GPRTemporary):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::GPRTemporary::gpr):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

9 years ago[BlackBerry] Upstream the BlackBerry change to ResourceRequestBase.cpp
leo.yang@torchmobile.com.cn [Tue, 20 Dec 2011 06:22:39 +0000 (06:22 +0000)]
[BlackBerry] Upstream the BlackBerry change to ResourceRequestBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=74910

Reviewed by Daniel Bates.

No functionality change to the existing code, no new tests.

* platform/network/ResourceRequestBase.cpp: The BlackBerry porting has its own
initializeMaximumHTTPConnectionCountPerHost(). Exclude the default implementation.

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

9 years ago[BlackBerry] Upstream the BlackBerry change to NetworkStateNotifier.h
leo.yang@torchmobile.com.cn [Tue, 20 Dec 2011 05:43:21 +0000 (05:43 +0000)]
[BlackBerry] Upstream the BlackBerry change to NetworkStateNotifier.h
https://bugs.webkit.org/show_bug.cgi?id=74904

Reviewed by Daniel Bates.

No functionality change to existing code, no new tests.

* platform/network/NetworkStateNotifier.h:

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

9 years agoUpdate dropzone implementation per spec update
yael.aharon@nokia.com [Tue, 20 Dec 2011 05:26:56 +0000 (05:26 +0000)]
Update dropzone implementation per spec update
https://bugs.webkit.org/show_bug.cgi?id=74834

Reviewed by Tony Chang.

Source/WebCore:

Update support for dropzone attribute to use file: and string: instead of f: and s:.
http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute

No new tests. Existing tests cover this and were updated.

* dom/Clipboard.cpp:
(WebCore::Clipboard::hasDropZoneType):

LayoutTests:

Update the tests per spec change.

* fast/events/dropzone-001.html:
* fast/events/dropzone-002.html:
* fast/events/dropzone-003.html:
* fast/events/dropzone-004.html:

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

9 years agoAdd support for scrollLineDown: and scrollLineUp: NSResponder selectors
weinig@apple.com [Tue, 20 Dec 2011 05:10:02 +0000 (05:10 +0000)]
Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
https://bugs.webkit.org/show_bug.cgi?id=74907

Reviewed by Dan Bernstein.

Source/WebCore:

Added API test: WebKit2.ScrollByLineCommands

* editing/EditorCommand.cpp:
(WebCore::executeScrollLineUp):
(WebCore::executeScrollLineDown):
(WebCore::createCommandMap):
Add implementations for scrollLineUp/Down. Do not expose
these to execCommand.

Source/WebKit2:

* UIProcess/API/mac/WKView.mm:
Add implementations for scrollLineDown: and scrollLineUp: using our
fun macros.

Tools:

Add ScrollByLineCommands API test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/mac/EditorCommands.mm: Added.
* TestWebKitAPI/Tests/WebKit2/simple-tall.html: Added.

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

9 years ago[QT] WebGL can not make the frame buffer with the stencil buffer.
commit-queue@webkit.org [Tue, 20 Dec 2011 05:01:09 +0000 (05:01 +0000)]
[QT] WebGL can not make the frame buffer with the stencil buffer.
https://bugs.webkit.org/show_bug.cgi?id=74783

When initializing a framebuffer in OpenGL ES 2, we need to initialize the depth
and stencil buffers separately, as opposed to the combined depth-stencil buffer
we initialize for desktop GL.

This makes fast/canvas/webgl/context-attributes-depth-stencil-combination.html
work in OpenGL ES 2.

Patch by Huang Dongsung <luxtella@company100.net> on 2011-12-19
Reviewed by Noam Rosenthal.

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::reshape):

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

9 years agoCompile fix for chromium on windows due to collision of testing::NotNull from gtest...
jamesr@google.com [Tue, 20 Dec 2011 04:34:36 +0000 (04:34 +0000)]
Compile fix for chromium on windows due to collision of testing::NotNull from gtest and NotNull from Vector.h

* tests/WebLayerTest.cpp:

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

9 years agoRemove unused code for non-speculative Arith operations from DFG JIT
yuqiang.xian@intel.com [Tue, 20 Dec 2011 04:33:36 +0000 (04:33 +0000)]
Remove unused code for non-speculative Arith operations from DFG JIT
https://bugs.webkit.org/show_bug.cgi?id=74905

Reviewed by Filip Pizlo.

* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:

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

9 years agoSource/WebCore: Teach VideoLayerChromium how to render native texture (to support...
commit-queue@webkit.org [Tue, 20 Dec 2011 04:27:53 +0000 (04:27 +0000)]
Source/WebCore: Teach VideoLayerChromium how to render native texture (to support HW video decode).
https://bugs.webkit.org/show_bug.cgi?id=73043

Patch by Ami Fischman <fischman@chromium.org> on 2011-12-19
Reviewed by James Robinson.

Fix the life-cycle of video frames handled by VideoLayerChromium/CCVideoLayerImpl.
VideoFrameProvider::{get,put}CurrentFrame provide lease semantics.  Previously
VideoLayerChromium would acquire the lease for the duration of copying the frame,
even if that was only a texture ID, and immediately return the lease, while
CCVideoLayerImpl::draw() would come along later and use the (no-longer locked)
texture optimistically.  This change makes it so that CCVideoLayerImpl holds
the frame's lease for the duration of draw(), guaranteeing the frame is valid to read.

Existing test coverage (compositing/video/, LayoutTests).  HW render of
HW-decoded textures is not yet tested explicitly.

* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::VideoLayerChromium):
(WebCore::VideoLayerChromium::~VideoLayerChromium):
(WebCore::VideoLayerChromium::createCCLayerImpl):
(WebCore::VideoLayerChromium::releaseProvider):
* platform/graphics/chromium/VideoLayerChromium.h:
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
(WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
(WebCore::CCVideoLayerImpl::setProvider):
(WebCore::convertVFCFormatToGC3DFormat):
(WebCore::CCVideoLayerImpl::draw):
(WebCore::CCVideoLayerImpl::copyFrameToTextures):
(WebCore::CCVideoLayerImpl::copyPlaneToTexture):
(WebCore::computeVisibleSize):
(WebCore::CCVideoLayerImpl::reserveTextures):
(WebCore::CCVideoLayerImpl::drawYUV):
(WebCore::CCVideoLayerImpl::drawCommon):
(WebCore::CCVideoLayerImpl::drawRGBA):
(WebCore::CCVideoLayerImpl::drawNativeTexture):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:

Source/WebKit/chromium: Teach VideoLayerChromium how to render native texture (to support HW video decode).
https://bugs.webkit.org/show_bug.cgi?id=73043

Patch by Ami Fischman <fischman@chromium.org> on 2011-12-19
Reviewed by James Robinson.

Fix the life-cycle of video frames handled by VideoLayerChromium/CCVideoLayerImpl.
VideoFrameProvider::{get,put}CurrentFrame provide lease semantics.  Previously
VideoLayerChromium would acquire the lease for the duration of copying the frame,
even if that was only a texture ID, and immediately return the lease, while
CCVideoLayerImpl::draw() would come along later and use the (no-longer locked)
texture optimistically.  This change makes it so that CCVideoLayerImpl holds
the frame's lease for the duration of draw(), guaranteeing the frame is valid to read.

* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::getCurrentFrame):

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

9 years agoMore PlatformEvent cleanup
weinig@apple.com [Tue, 20 Dec 2011 04:08:24 +0000 (04:08 +0000)]
More PlatformEvent cleanup
https://bugs.webkit.org/show_bug.cgi?id=74831

Reviewed by Dan Bernstein.

../WebCore:

* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::position):
Rename pos -> position(). Remove x() and y() accessors.

(WebCore::PlatformMouseEvent::globalPosition):
Added. Replaces globalX() and globalY() accessors.

(WebCore::PlatformMouseEvent::movementDelta):
Added. Replaces movementX() and movementY() accessors.

* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::position):
Renamed pos -> position().

(WebCore::PlatformWheelEvent::globalPosition):
Renamed globalPos -> globalPosition().

* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
* dom/WheelEvent.cpp:
(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::dispatchDragEvent):
(WebCore::EventHandler::prepareMouseEvent):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::handleTouchEvent):
* page/chromium/EventHandlerChromium.cpp:
(WebCore::EventHandler::passMousePressEventToSubframe):
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::mouseMoved):
(WebCore::Scrollbar::mouseDown):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::hitTest):
* platform/chromium/PopupContainer.cpp:
(WebCore::constructRelativeMouseEvent):
(WebCore::constructRelativeWheelEvent):
* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::handleMouseDownEvent):
(WebCore::PopupListBox::handleMouseMoveEvent):
(WebCore::PopupListBox::handleMouseReleaseEvent):
(WebCore::PopupListBox::handleWheelEvent):
* platform/chromium/ScrollbarThemeChromiumWin.cpp:
(WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin):
* platform/qt/ScrollbarQt.cpp:
(WebCore::Scrollbar::contextMenu):
* platform/qt/ScrollbarThemeQt.cpp:
(WebCore::ScrollbarThemeQt::hitTest):
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
Update to use new names, access style.

../WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::mouseContextMenu):
Update to use new names, access style.

../WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_forward_context_menu_event):
(webkit_web_view_get_hit_test_result):
Update to use new names, access style.

../WebKit/qt:

* Api/qwebpage.cpp:
(QWebPage::swallowContextMenuEvent):
Update to use new names, access style.

../WebKit/win:

* WebView.cpp:
(WebView::handleMouseEvent):
Update to use new names, access style.

../WebKit/wince:

* WebView.cpp:
(WebView::handleMouseEvent):
Update to use new names, access style.

../WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::handleContextMenuEvent):
Update to use new names, access style.

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

9 years agoRemove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
adamk@chromium.org [Tue, 20 Dec 2011 03:42:22 +0000 (03:42 +0000)]
Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
https://bugs.webkit.org/show_bug.cgi?id=74740

Reviewed by Ryosuke Niwa.

Updated lots of callers to remove third argument. The list of changes
below only lists things other than updating callers.

* dom/Document.cpp:
(WebCore::Document::importNode):
* dom/Element.cpp:
(WebCore::Element::setAttribute):
(WebCore::Element::setAttributeNS):
(WebCore::Element::setIntegralAttribute):
(WebCore::Element::setUnsignedIntegralAttribute):
* dom/Element.h: Removed third arg from method, removed old two-arg
overload which now has an identical signature.
* editing/mac/EditorMac.mm: Updated caller and used
ASSERT_NO_EXCEPTION for nearby code.
(WebCore::styleForSelectionStart):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttributesAsText):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
* svg/SVGElement.idl: Removed 'setter raises(DOMException)'
* svg/SVGGlyphRefElement.idl: ditto.
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::setType):
(WebCore::SVGStyleElement::setMedia):
(WebCore::SVGStyleElement::setTitle):
* xml/parser/XMLTreeBuilder.cpp:
(WebCore::XMLTreeBuilder::processAttributes):

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

9 years agoUnreviewed. Rebaselined run-bindings-tests results.
haraken@chromium.org [Tue, 20 Dec 2011 03:36:51 +0000 (03:36 +0000)]
Unreviewed. Rebaselined run-bindings-tests results.

* bindings/scripts/test/JS/JSFloat64Array.h:
(WebCore::JSFloat64Array::create):
(WebCore::JSFloat64ArrayPrototype::create):
(WebCore::JSFloat64ArrayConstructor::create):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::create):
(WebCore::JSTestEventConstructorPrototype::create):
(WebCore::JSTestEventConstructorConstructor::create):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::create):
(WebCore::JSTestInterfacePrototype::create):
(WebCore::JSTestInterfaceConstructor::create):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::create):
(WebCore::JSTestMediaQueryListListenerPrototype::create):
(WebCore::JSTestMediaQueryListListenerConstructor::create):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::create):
(WebCore::JSTestNamedConstructorPrototype::create):
(WebCore::JSTestNamedConstructorConstructor::create):
(WebCore::JSTestNamedConstructorNamedConstructor::create):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::create):
(WebCore::JSTestObjPrototype::create):
(WebCore::JSTestObjConstructor::create):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::create):
(WebCore::JSTestSerializedScriptValueInterfacePrototype::create):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):

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

9 years agohttps://bugs.webkit.org/show_bug.cgi?id=74903
barraclough@apple.com [Tue, 20 Dec 2011 03:16:21 +0000 (03:16 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=74903
Exceptions not thrown correctly from DFG JIT on 32bit

Reviewed by Oliver Hunt.

Arguments for lookupExceptionHandler are not setup correctly.
In the case of ARMv7 we rely on lr being preserved over a call,
this in invalid. On x86 we don't should be poking the arguments onto the stack!

Source/JavaScriptCore:

* bytecode/CodeBlock.h:
(JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
* dfg/DFGAssemblyHelpers.h:
(JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
* dfg/DFGGPRInfo.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileBody):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addExceptionCheck):
(JSC::DFG::JITCompiler::addFastExceptionCheck):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:

LayoutTests:

* fast/js/dfg-exception-expected.txt: Added.
* fast/js/dfg-exception.html: Added.
* fast/js/script-tests/dfg-exception.js: Added.
(doesntDFGCompile):
(test):

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

9 years ago[chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
jamesr@google.com [Tue, 20 Dec 2011 02:54:49 +0000 (02:54 +0000)]
[chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
https://bugs.webkit.org/show_bug.cgi?id=74376

Reviewed by Kenneth Russell.

Source/WebCore:

CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the
CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new
frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all
implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper
scheduling decision.

This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to
CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic.

There is a large amount of unit test coverage for this change, largely in LayerChromiumTest

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::insertChild):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::~CCLayerTreeHost):
(WebCore::CCLayerTreeHost::setRootLayer):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCScopedThreadProxy.h:
(WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):

Source/WebKit/chromium:

WebLayerClient::notifyNeedsComposite() is an odd interface for the same reason that
CCLayerDelegate::notifySyncRequired() is - all scheduling decisions should route through the WebLayerTreeView,
not individual layers. In practice, all implementations of WebLayerClient::notifySyncRequired() do the exact
same thing as WebLayerTreeView::scheduleComposite(). This removes that callback, making WebLayerClient an empty
interface, and routes all calls that would go to that interface to WebLayerTreeView::scheduleComposite().

Once downstream implementations of WebLayerClient are removed, WebLayerClient.h and the constructors associated
with it can be deleted.

The bulk of the changes here are to the test harness. Many tests that were designed around notifySyncRequired()
are rewritten to check for CCLayerTreeHost::setNeedsCommit() or WebLayerTreeView::scheduleComposite() instead.
In a few instances, this required changing the setup logic around somewhat so that the layers being manipulated
were in a tree that initialized without errors.

* WebKit.gypi:
* public/platform/WebContentLayer.h:
* public/platform/WebExternalTextureLayer.h:
* public/platform/WebLayer.h:
* public/platform/WebLayerClient.h:
* src/WebContentLayer.cpp:
(WebKit::WebContentLayer::create):
* src/WebContentLayerImpl.cpp:
(WebKit::WebContentLayerImpl::create):
(WebKit::WebContentLayerImpl::WebContentLayerImpl):
* src/WebContentLayerImpl.h:
* src/WebExternalTextureLayer.cpp:
(WebKit::WebExternalTextureLayer::create):
* src/WebExternalTextureLayerImpl.cpp:
(WebKit::WebExternalTextureLayerImpl::create):
(WebKit::WebExternalTextureLayerImpl::WebExternalTextureLayerImpl):
* src/WebExternalTextureLayerImpl.h:
* src/WebLayer.cpp:
(WebKit::WebLayer::create):
* src/WebLayerImpl.cpp:
(WebKit::WebLayerImpl::create):
(WebKit::WebLayerImpl::WebLayerImpl):
* src/WebLayerImpl.h:
* src/WebLayerTreeViewImpl.cpp:
(WebKit::WebLayerTreeViewImpl::create):
(WebKit::WebLayerTreeViewImpl::WebLayerTreeViewImpl):
* src/WebLayerTreeViewImpl.h:
* tests/CCLayerTreeHostTest.cpp:
(WTF::MockLayerTreeHost::create):
(WTF::MockLayerTreeHost::MockLayerTreeHost):
(WTF::MockLayerTreeHostClient::createLayerTreeHostContext3D):
(WTF::CCLayerTreeHostTestScrollSimple::animateAndLayout):
* tests/CompositorMockGraphicsContext3D.h: Added.
(WebCore::createCompositorMockGraphicsContext3D):
* tests/CompositorMockWebGraphicsContext3D.h: Added.
(WebKit::CompositorMockWebGraphicsContext3D::create):
(WebKit::CompositorMockWebGraphicsContext3D::makeContextCurrent):
(WebKit::CompositorMockWebGraphicsContext3D::createProgram):
(WebKit::CompositorMockWebGraphicsContext3D::createShader):
(WebKit::CompositorMockWebGraphicsContext3D::getShaderiv):
(WebKit::CompositorMockWebGraphicsContext3D::getProgramiv):
(WebKit::CompositorMockWebGraphicsContext3D::CompositorMockWebGraphicsContext3D):
* tests/LayerChromiumTest.cpp:
* tests/MockWebGraphicsContext3D.h:
(WebKit::MockWebGraphicsContext3D::getContextAttributes):
* tests/WebGLLayerChromiumTest.cpp:
(WebKit::TEST):
* tests/WebLayerTest.cpp:
(testing::MockWebLayerTreeViewClient::animateAndLayout):
(testing::MockWebLayerTreeViewClient::applyScrollAndScale):
(testing::MockWebLayerTreeViewClient::createContext3D):
(testing::MockWebLayerTreeViewClient::didRebindGraphicsContext):
(testing::WebLayerTest::SetUp):
(testing::WebLayerTest::TearDown):
(testing::TEST_F):

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

9 years agoIf we detect that we can use the JIT, don't use computed opcode lookups
fpizlo@apple.com [Tue, 20 Dec 2011 02:42:06 +0000 (02:42 +0000)]
If we detect that we can use the JIT, don't use computed opcode lookups
https://bugs.webkit.org/show_bug.cgi?id=74899
<rdar://problem/10604551>

Reviewed by Gavin Barraclough.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::initialize):
(JSC::Interpreter::privateExecute):
* interpreter/Interpreter.h:
(JSC::Interpreter::getOpcode):
(JSC::Interpreter::getOpcodeID):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):

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

9 years agoMerge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
commit-queue@webkit.org [Tue, 20 Dec 2011 02:01:16 +0000 (02:01 +0000)]
Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=61144

Patch by Sailesh Agrawal <sail@chromium.org> on 2011-12-19
Reviewed by Beth Dakin.

At a high level the main changes are:
    - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks
    - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff.
    - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing
    - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing

No new tests. Just refactoring.

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
* platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed.
* platform/chromium/ScrollbarThemeChromiumMac.h:
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::scrollbarPainterPaintTrack):
(WebCore::ScrollbarThemeChromiumMac::paint):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
(WebCore::isScrollbarOverlayAPIAvailable):
* platform/mac/NSScrollerImpDetails.mm: Added.
(WebCore::isScrollbarOverlayAPIAvailable):
(WebCore::recommendedScrollerStyle):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(scrollbarPainterForScrollbar):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):

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

9 years ago[chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
jamesr@google.com [Tue, 20 Dec 2011 01:35:53 +0000 (01:35 +0000)]
[chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
https://bugs.webkit.org/show_bug.cgi?id=74477

Reviewed by Kenneth Russell.

Source/WebCore:

This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
lazily setting it in the paintContents loop. There are two invariants:
1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
refers to that CCLayerTreeHost
2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
CCLayerTreeHost pointer is nil.

Covered by several new layout tests in LayerChromiumTest

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setLayerTreeHost):
(WebCore::LayerChromium::setParent):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::createTile):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::setRootLayer):
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:

Source/WebKit/chromium:

Add some new tests for LayerChromium::m_layerTreeHost behavior.

* tests/CCLayerTreeHostTest.cpp:
(::MockLayerTreeHost::create):
(::MockLayerTreeHost::MockLayerTreeHost):
(::CCLayerTreeHostTestShortlived1::beginTest):
(::CCLayerTreeHostTestShortlived2::beginTest):
(::CCLayerTreeHostTestShortlived3::beginTest):
* tests/LayerChromiumTest.cpp:

LayoutTests:

* platform/chromium/test_expectations.txt:

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

9 years agowebkitpy: remove port.executive, port.filesystem, port.user properties
dpranke@chromium.org [Tue, 20 Dec 2011 01:16:29 +0000 (01:16 +0000)]
webkitpy: remove port.executive, port.filesystem, port.user properties
https://bugs.webkit.org/show_bug.cgi?id=74896

Reviewed by Eric Seidel.

Following on the refactoring of the port and host objects, this
removes the public executive, filesystem, and user properties
from the Port interface (protected versions of executive and
filesystem still exist). There is still some more clean up to
make the code more consistent and rearrange some other files to
talk to Hosts directly instead of getting them off of the Port
class.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.__init__):
(Manager.results_directory):
(Manager._log_worker_stack):
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ManagerTest.test_fallback_path_in_config):
* Scripts/webkitpy/layout_tests/controllers/manager_worker_broker.py:
(_InlineManager.start_worker):
(_InlineWorkerConnection.__init__):
* Scripts/webkitpy/layout_tests/controllers/worker.py:
(Worker.safe_init):
* Scripts/webkitpy/layout_tests/models/test_configuration.py:
(TestConfiguration.from_port):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):
(Port.tests):
(Port.show_results_html_file):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_layout_tests_skipping):
(PortTest.test_test_dirs):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner.__init__):
* Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests.py:
(HtmlGenerator.__init__):
(HtmlGenerator.show_html):
(real_main):
* Scripts/webkitpy/to_be_moved/rebaseline_chromium_webkit_tests_unittest.py:
(TestHtmlGenerator.make_generator):

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

9 years ago[EFL] Change the behavior of ewk_view_scale_set.
ryuan.choi@samsung.com [Tue, 20 Dec 2011 01:13:37 +0000 (01:13 +0000)]
[EFL] Change the behavior of ewk_view_scale_set.
https://bugs.webkit.org/show_bug.cgi?id=70078

Reviewed by Eric Seidel.

Remove center point basis zoom alignment from ewk_view_scale_set to call
Page::setPageScaleFactor without any adjustment.

* ewk/ewk_view.cpp:
(ewk_view_scale_set):
* ewk/ewk_view.h:

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

9 years agoTry to fix the Qt build.
ggaren@apple.com [Tue, 20 Dec 2011 01:13:08 +0000 (01:13 +0000)]
Try to fix the Qt build.

Unreviewed.

* wtf/ThreadSpecific.h: #include!

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

9 years agoIt should be possible to change the value of an Options variable without recompiling...
fpizlo@apple.com [Tue, 20 Dec 2011 01:11:36 +0000 (01:11 +0000)]
It should be possible to change the value of an Options variable without recompiling the world
https://bugs.webkit.org/show_bug.cgi?id=74807

Reviewed by Gavin Barraclough.

* runtime/Options.cpp:
(JSC::Options::initializeOptions):
* runtime/Options.h:

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

9 years agoRebaseline results from https://bugs.webkit.org/show_bug.cgi?id=74870
jer.noble@apple.com [Tue, 20 Dec 2011 01:06:30 +0000 (01:06 +0000)]
Rebaseline results from https://bugs.webkit.org/show_bug.cgi?id=74870

Unreviewed; rebaseline only.

* media/media-controller-playback-expected.txt:

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

9 years ago[chromium] Unreviewed, mark svg/filters/big-sized-filter.svg as slow in debug.
tony@chromium.org [Tue, 20 Dec 2011 01:03:22 +0000 (01:03 +0000)]
[chromium] Unreviewed, mark svg/filters/big-sized-filter.svg as slow in debug.

* platform/chromium/test_expectations.txt:

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

9 years agoIndexedDB multiple calls to transaction.objectStore(name) should return the same...
commit-queue@webkit.org [Tue, 20 Dec 2011 00:57:07 +0000 (00:57 +0000)]
IndexedDB multiple calls to transaction.objectStore(name) should return the same instance
https://bugs.webkit.org/show_bug.cgi?id=60208

Patch by Joshua Bell <jsbell@chromium.org> on 2011-12-19
Reviewed by Tony Chang.

Source/WebCore:

Ditto for calls to IDBObjectStore.index(). Calling these methods after the
enclosing transaction has finished now consistently throws an error, which
allows us to break reference cycles.

Test: storage/indexeddb/mozilla/object-identity.html

* storage/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::transactionFinished):
* storage/IDBObjectStore.h:
* storage/IDBTransaction.cpp:
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::objectStoreCreated):
(WebCore::IDBTransaction::dispatchEvent):
* storage/IDBTransaction.h:

LayoutTests:

* storage/indexeddb/mozilla/object-identity-expected.txt: Added.
* storage/indexeddb/mozilla/object-identity.html: Added.
* storage/indexeddb/transaction-and-objectstore-calls-expected.txt:
* storage/indexeddb/transaction-and-objectstore-calls.html:
* storage/indexeddb/tutorial.html:

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

9 years ago[chromium] Unreviewed, adding a bug number for svg/carto.net/selectionlist.svg.
tony@chromium.org [Tue, 20 Dec 2011 00:52:59 +0000 (00:52 +0000)]
[chromium] Unreviewed, adding a bug number for svg/carto.net/selectionlist.svg.

* platform/chromium/test_expectations.txt:

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

9 years ago[WK2] Extend show notification API to include the source page
jonlee@apple.com [Tue, 20 Dec 2011 00:51:46 +0000 (00:51 +0000)]
[WK2] Extend show notification API to include the source page
https://bugs.webkit.org/show_bug.cgi?id=74751
<rdar://problem/10514541>

Reviewed by John Sullivan.

We add the source page that dispatched the notification in the API for convenience. In order to include the page,
we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy.

* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy.

* UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message.
* UIProcess/WebPageProxy.messages.in: Add a showNotification() message.

* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy.
* UIProcess/Notifications/WebNotificationManagerProxy.h:

* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
(WebKit::WebNotificationProvider::show):
* UIProcess/Notifications/WebNotificationProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:

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

9 years ago[chromium] Replace accidentally removed expectation in r103270.
enne@google.com [Tue, 20 Dec 2011 00:39:56 +0000 (00:39 +0000)]
[chromium] Replace accidentally removed expectation in r103270.

Unreviewed gardening.

* platform/chromium/test_expectations.txt:

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