WebKit-https.git
8 years agoUnreviewed; new baselines (Skia on Mac)
caryclark@google.com [Tue, 20 Sep 2011 14:03:21 +0000 (14:03 +0000)]
Unreviewed; new baselines (Skia on Mac)
Updated reference images.

* LayoutTests/platform/chromium-mac/fast/ruby/overhang-horizontal-expected.png: Removed.
* LayoutTests/platform/chromium-mac/fast/box-shadow/box-shadow-clipped-slices-expected.png:

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

8 years agoWeb Inspector: document Debugger.paused, introduce types for ids in Debugger domain.
pfeldman@chromium.org [Tue, 20 Sep 2011 14:00:37 +0000 (14:00 +0000)]
Web Inspector: document Debugger.paused, introduce types for ids in Debugger domain.
https://bugs.webkit.org/show_bug.cgi?id=68363

Migrates from poorly documented "details" object to explicit parameters
containing break type and data.

Reviewed by Tony Gentilcore.

Source/WebCore:

* inspector/InjectedScriptSource.js:
():
* inspector/Inspector.json:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
(WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
(WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement):
(WebCore::InspectorDebuggerAgent::pause):
(WebCore::InspectorDebuggerAgent::didPause):
(WebCore::InspectorDebuggerAgent::didContinue):
(WebCore::InspectorDebuggerAgent::breakProgram):
(WebCore::InspectorDebuggerAgent::clear):
(WebCore::InspectorDebuggerAgent::clearBreakDetails):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DOMBreakpointsSidebarPane.js:
(WebInspector.DOMBreakpointsSidebarPane.prototype.createBreakpointHitStatusMessage.didPushNodeToFrontend):
(WebInspector.DOMBreakpointsSidebarPane.prototype.createBreakpointHitStatusMessage):
(WebInspector.DOMBreakpointsSidebarPane.prototype.highlightBreakpoint):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._pausedScript):
(WebInspector.DebuggerDispatcher.prototype.paused):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.PresentationCallFrame.prototype.evaluate):
* inspector/front-end/ScopeChainSidebarPane.js:
(WebInspector.ScopeChainSidebarPane.prototype.update):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._debuggerPaused.didCreateBreakpointHitStatusMessage):
(WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
(WebInspector.ScriptsPanel.prototype._debuggerPaused):

LayoutTests:

* http/tests/inspector/debugger-test.js:
(initialize_DebuggerTest):

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

8 years ago[Qt] QDesktopWebView missing loadProgress tests
commit-queue@webkit.org [Tue, 20 Sep 2011 13:58:47 +0000 (13:58 +0000)]
[Qt] QDesktopWebView missing loadProgress tests
https://bugs.webkit.org/show_bug.cgi?id=68280

Patch by Gopal Raghavan <gopal.1.raghavan@nokia.com> on 2011-09-20
Reviewed by Andreas Kling.

Added test case to check load progress property and signal for QDesktopWebView

* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:

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

8 years agoSource/WebCore: Web Inspector: refactor ConsoleView, Drawer, ConsolePanel trio. Remov...
pfeldman@chromium.org [Tue, 20 Sep 2011 13:51:06 +0000 (13:51 +0000)]
Source/WebCore: Web Inspector: refactor ConsoleView, Drawer, ConsolePanel trio. Remove animation
from drawer -> panel transition.
https://bugs.webkit.org/show_bug.cgi?id=68155

ConsoleView, ConsolePanel and Drawer are all Views with custom show/hide implementations
and weird DOM element containment. As a result, we have a number of cases when switching
console from full panel to drawer mode and back result in UI glitches.
For the sake of code clarity and no glitches, I'd like to sacrifice the "grow into full
screen" console animation.

Reviewed by Tony Gentilcore.

* inspector/front-end/ConsoleModel.js:
(WebInspector.ConsoleModel):
* inspector/front-end/ConsolePanel.js:
(WebInspector.ConsolePanel):
(WebInspector.ConsolePanel.prototype.get statusBarItems):
(WebInspector.ConsolePanel.prototype.show):
(WebInspector.ConsolePanel.prototype.hide):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView):
(WebInspector.ConsoleView.createFilterElement):
(WebInspector.ConsoleView.get this):
(WebInspector.ConsoleView.prototype.get statusBarItems):
(WebInspector.ConsoleView.prototype.wasShown):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer):
(WebInspector.Drawer.prototype.get visible):
(WebInspector.Drawer.prototype._constrainHeight):
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
(WebInspector.Drawer.prototype.hide):
(WebInspector.Drawer.prototype.resize):
(WebInspector.Drawer.prototype._animationDuration):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createGlobalStatusBarItems):
(WebInspector._toggleConsoleButtonClicked):
(WebInspector.set attached):
(WebInspector.windowResize):
(WebInspector.documentKeyDown):

LayoutTests: Web Inspector: refactor ConsoleView, Drawer, ConsolePanel trio.
https://bugs.webkit.org/show_bug.cgi?id=68155

Reviewed by Tony Gentilcore.

* inspector/console/console-dir.html:

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

8 years agoWeb Inspector: streamline Console's MessageType and MessageSource semantics.
pfeldman@chromium.org [Tue, 20 Sep 2011 13:46:08 +0000 (13:46 +0000)]
Web Inspector: streamline Console's MessageType and MessageSource semantics.
https://bugs.webkit.org/show_bug.cgi?id=68342

Source/WebCore:

This change fixes semantics of the MessageSource and MessageType:
MessageSource is now the source of the message (be it Network, HTML
parser or Console API). MessageType is only defined for the Console API
messages and contains the name of the API call (log, dir, dirxml, etc.).
Subsequent https://bugs.webkit.org/show_bug.cgi?id=66371 will make MessageType
private to the inspector.

Reviewed by Tony Gentilcore.

* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
* inspector/ConsoleMessage.cpp:
(WebCore::messageSourceValue):
(WebCore::messageTypeValue):
(WebCore::ConsoleMessage::addToFrontend):
* inspector/Inspector.json:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessage.createTextMessage):
(WebInspector.ConsoleMessage.prototype._formatMessage):
(WebInspector.ConsoleMessage.prototype.toString):
* page/Console.cpp:
(WebCore::printMessageSourceAndLevelPrefix):
(WebCore::Console::addMessage):
(WebCore::Console::dir):
(WebCore::Console::dirxml):
(WebCore::Console::group):
(WebCore::Console::groupCollapsed):
(WebCore::Console::groupEnd):
* page/ConsoleTypes.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didFailSocketStream):

Source/WebKit/mac:

This change fixes semantics of the MessageSource and MessageType:
MessageSource is now the source of the message (be it Network, HTML
parser or Console API). MessageType is only defined for the Console API
messages and contains the name of the API call (log, dir, dirxml, etc.).
Subsequent https://bugs.webkit.org/show_bug.cgi?id=66371 will make MessageType
private to the inspector.

Reviewed by Tony Gentilcore.

* WebCoreSupport/WebChromeClient.mm:
(stringForMessageSource):
(stringForMessageType):
* WebView/WebUIDelegatePrivate.h:

LayoutTests:

This change fixes semantics of the MessageSource and MessageType:
MessageSource is now the source of the message (be it Network, HTML
parser or Console API). MessageType is only defined for the Console API
messages and contains the name of the API call (log, dir, dirxml, etc.).
Subsequent https://bugs.webkit.org/show_bug.cgi?id=66371 will make MessageType
private to the inspector.

Reviewed by Tony Gentilcore.

* inspector/protocol/console-agent-expected.txt:
* platform/chromium/http/tests/inspector/console-resource-errors-expected.txt: Added.

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

8 years agoMake WebViews in NSPopovers render as they would in active windows.
timothy@apple.com [Tue, 20 Sep 2011 13:37:35 +0000 (13:37 +0000)]
Make WebViews in NSPopovers render as they would in active windows.

The NSWindowDid{Become,Resign}KeyNotifications are not fired when NSPopovers
are shown or hidden since they share key with the parent window. So WebView
and WebHTMLView need to also observe the will order on/off screen notifications.

https://webkit.org/b/68402
rdar://problem/9754099

Reviewed by John Sullivan.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _removeWindowObservers]): Remove order on/off screen notification obversers.
(-[WebHTMLView addWindowObservers]): Add order on/off screen notification obversers.
(-[WebHTMLView windowWillOrderOnScreen:]): Check if the window is already a key window,
which can be the case for NSPopovers.
(-[WebHTMLView windowWillOrderOffScreen:]): Remove the mouse moved observer.
* WebView/WebView.mm:
(-[WebView addWindowObserversForWindow:]): Add order off screen notification obverser.
(-[WebView removeWindowObservers]): Remove order off screen notification obverser.
(-[WebView _windowWillOrderOnScreen:]): Call _updateActiveState.
(-[WebView _windowWillOrderOffScreen:]): Ditto.

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

8 years agoUnreviewed, GTK baselines for new tests.
philn@webkit.org [Tue, 20 Sep 2011 12:45:42 +0000 (12:45 +0000)]
Unreviewed, GTK baselines for new tests.

* platform/gtk/css3/bdi-element-expected.png: Added.
* platform/gtk/css3/bdi-element-expected.txt: Added.
* platform/gtk/css3/unicode-bidi-isolate-aharon-expected.png: Added.
* platform/gtk/css3/unicode-bidi-isolate-aharon-expected.txt: Added.
* platform/gtk/css3/unicode-bidi-isolate-basic-expected.png: Added.
* platform/gtk/css3/unicode-bidi-isolate-basic-expected.txt: Added.
* platform/gtk/fast/borders/block-mask-overlay-image-outset-expected.png: Added.
* platform/gtk/fast/borders/block-mask-overlay-image-outset-expected.txt: Added.
* platform/gtk/fast/borders/border-image-longhand-expected.png: Added.
* platform/gtk/fast/borders/border-image-longhand-expected.txt: Added.
* platform/gtk/fast/borders/border-image-massive-scale-expected.png: Added.
* platform/gtk/fast/borders/border-image-massive-scale-expected.txt: Added.
* platform/gtk/fast/borders/border-image-outset-expected.png: Added.
* platform/gtk/fast/borders/border-image-outset-expected.txt: Added.
* platform/gtk/fast/borders/border-image-outset-in-shorthand-expected.png: Added.
* platform/gtk/fast/borders/border-image-outset-in-shorthand-expected.txt: Added.
* platform/gtk/fast/borders/border-image-outset-split-inline-expected.png: Added.
* platform/gtk/fast/borders/border-image-outset-split-inline-expected.txt: Added.
* platform/gtk/fast/borders/border-image-outset-split-inline-vertical-lr-expected.png: Added.
* platform/gtk/fast/borders/border-image-outset-split-inline-vertical-lr-expected.txt: Added.
* platform/gtk/fast/borders/border-image-repeat-expected.png: Added.
* platform/gtk/fast/borders/border-image-repeat-expected.txt: Added.
* platform/gtk/fast/borders/border-image-scaled-expected.png: Added.
* platform/gtk/fast/borders/border-image-scaled-expected.txt: Added.
* platform/gtk/fast/borders/border-image-scaled-gradient-expected.png: Added.
* platform/gtk/fast/borders/border-image-scaled-gradient-expected.txt: Added.
* platform/gtk/fast/borders/border-image-scrambled-expected.png: Added.
* platform/gtk/fast/borders/border-image-scrambled-expected.txt: Added.
* platform/gtk/fast/borders/border-image-side-reduction-expected.png: Added.
* platform/gtk/fast/borders/border-image-side-reduction-expected.txt: Added.
* platform/gtk/fast/borders/border-image-slices-expected.png: Added.
* platform/gtk/fast/borders/border-image-slices-expected.txt: Added.
* platform/gtk/fast/borders/inline-mask-overlay-image-outset-expected.png: Added.
* platform/gtk/fast/borders/inline-mask-overlay-image-outset-expected.txt: Added.
* platform/gtk/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.png: Added.
* platform/gtk/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.txt: Added.
* platform/gtk/fast/clip/overflow-border-radius-combinations-expected.png: Added.
* platform/gtk/fast/clip/overflow-border-radius-combinations-expected.txt: Added.
* platform/gtk/fast/clip/overflow-border-radius-composited-expected.png: Added.
* platform/gtk/fast/clip/overflow-border-radius-composited-expected.txt: Added.
* platform/gtk/fast/clip/overflow-border-radius-transformed-expected.png: Added.
* platform/gtk/fast/clip/overflow-border-radius-transformed-expected.txt: Added.
* platform/gtk/fast/css/focus-ring-multiline-writingmode-vertical-expected.png: Added.
* platform/gtk/fast/css/focus-ring-multiline-writingmode-vertical-expected.txt: Added.
* platform/gtk/fast/css/line-after-floating-div-expected.png: Added.
* platform/gtk/fast/css/line-after-floating-div-expected.txt: Added.
* platform/gtk/fast/parser/innerhtml-with-prefixed-elements-expected.png: Added.
* platform/gtk/fast/parser/innerhtml-with-prefixed-elements-expected.txt: Added.
* platform/gtk/fast/reflections/reflection-masks-outset-expected.png: Added.
* platform/gtk/fast/reflections/reflection-masks-outset-expected.txt: Added.
* platform/gtk/fast/text/fallback-traits-fixup-expected.png: Added.
* platform/gtk/fast/text/fallback-traits-fixup-expected.txt: Added.
* platform/gtk/fast/text/hyphenate-limit-lines-expected.png: Added.
* platform/gtk/fast/text/hyphenate-limit-lines-expected.txt: Added.
* platform/gtk/svg/custom/pattern-rotate-gaps-expected.png: Added.
* platform/gtk/svg/custom/pattern-rotate-gaps-expected.txt: Added.
* platform/gtk/svg/custom/simple-text-double-shadow-expected.png: Added.
* platform/gtk/svg/custom/simple-text-double-shadow-expected.txt: Added.

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

8 years agoWebKitTestRunner: Provide usage if run without arguments
vestbo@webkit.org [Tue, 20 Sep 2011 12:34:51 +0000 (12:34 +0000)]
WebKitTestRunner: Provide usage if run without arguments

If WTR is run without either one or more filenames, or
a '-' to indicate server mode, we don't need to start
up the test machinery. Doing so might actually crash,
as we'll exit the application immedeatly after anyways.

Reviewed by Simon Hausmann.

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

8 years agoUnreviewed, GTK baselines for tests added in r95489 and r95488.
philn@webkit.org [Tue, 20 Sep 2011 12:25:54 +0000 (12:25 +0000)]
Unreviewed, GTK baselines for tests added in r95489 and r95488.

* platform/gtk/http/tests/security/document-all-expected.txt: Added.
* platform/gtk/http/tests/security/window-named-proto-expected.txt: Added.

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

8 years agoUnreviewed, GTK baselines for tests added in r95461.
philn@webkit.org [Tue, 20 Sep 2011 12:14:00 +0000 (12:14 +0000)]
Unreviewed, GTK baselines for tests added in r95461.

* platform/gtk/fast/table/table-cell-before-after-content-around-table-block-expected.txt: Added.
* platform/gtk/fast/table/table-cell-before-after-content-around-table-expected.txt: Added.
* platform/gtk/fast/table/table-cell-before-after-content-around-table-row-expected.txt: Added.
* platform/gtk/fast/table/table-row-before-after-content-around-block-expected.txt: Added.
* platform/gtk/fast/table/table-row-before-after-content-around-table-expected.txt: Added.

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

8 years ago[Qt] Rebase and unskip tests introduced in r95489 and r95488.
reni@webkit.org [Tue, 20 Sep 2011 12:10:31 +0000 (12:10 +0000)]
[Qt] Rebase and unskip tests introduced in r95489 and r95488.

Unreviewed gardening.

* platform/qt/Skipped:
* platform/qt/http/tests/security/document-all-expected.txt: Added.
* platform/qt/http/tests/security/window-named-proto-expected.txt: Added.

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

8 years agoUnreviewed, skip failing fast/files/create-blob-url-crash.html on
philn@webkit.org [Tue, 20 Sep 2011 11:50:26 +0000 (11:50 +0000)]
Unreviewed, skip failing fast/files/create-blob-url-crash.html on
GTK because of bug 66045.

* platform/gtk/Skipped:

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

8 years agoUnreviewed, GTK rebaseline after r95178 and r95362.
philn@webkit.org [Tue, 20 Sep 2011 11:43:43 +0000 (11:43 +0000)]
Unreviewed, GTK rebaseline after r95178 and r95362.

* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/gtk/fast/dom/call-a-constructor-as-a-function-expected.txt:
* platform/gtk/fast/js/global-constructors-expected.txt:

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

8 years ago[Qt] Don't use QFont before initializing QApplication
vestbo@webkit.org [Tue, 20 Sep 2011 11:36:15 +0000 (11:36 +0000)]
[Qt] Don't use QFont before initializing QApplication

Could potentially result in crash.

Reviewed by Simon Hausmann.

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

8 years ago[Qt] resizeToContent seems to trigger infinite resize on some pages
commit-queue@webkit.org [Tue, 20 Sep 2011 10:41:11 +0000 (10:41 +0000)]
[Qt] resizeToContent seems to trigger infinite resize on some pages
https://bugs.webkit.org/show_bug.cgi?id=43852

Patch by Adenilson Cavalcanti <adenilson.silva@openbossa.org> on 2011-09-20
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

InnerHeight and InnerWidth are now calculated using ScrollView::visibleContentRect
including the scrollbars (if any) instead of using ScrollView::frameRect as before.

This makes no behavior change while not using the tiled backing
store and is compliant with the W3C definition stated in the CSSOM
View Module.

Plus it will return the correct values for tiled backing store,
thus fixing the original bug report by avoiding infinite resize
events caused by wrong innerHeight and innerWidth values.

Test: innerWidth/Height are covered by existing tests. The
non-infinite resizing is covered by a new Qt autotest at
test_qgraphicswebview::windowResizeEvent()

* page/DOMWindow.cpp:
(WebCore::DOMWindow::innerHeight): using ScrollView::visibleContentRect.
(WebCore::DOMWindow::innerWidth): using ScrollView::visibleContentRect.

Source/WebKit/qt:

Test by Luiz Agostini.

* tests/qgraphicswebview/tst_qgraphicswebview.cpp:
(ResizeSpy::receiveResize):
(ResizeSpy::size):
(tst_QGraphicsWebView::windowResizeEvent):

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

8 years agoWeb Inspector: implement reverse mapping for compiler source maps.
podivilov@chromium.org [Tue, 20 Sep 2011 10:22:59 +0000 (10:22 +0000)]
Web Inspector: implement reverse mapping for compiler source maps.
https://bugs.webkit.org/show_bug.cgi?id=67850

Source/WebCore:

Implement the mapping from source code to compiled code. It will be used for
setting breakpoints on source code.

Reviewed by Pavel Feldman.

* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping):
(WebInspector.ClosureCompilerSourceMapping.prototype.compiledLocationToSourceLocation):
(WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMappings):

LayoutTests:

Reviewed by Pavel Feldman.

* inspector/debugger/compiler-source-mapping.html:

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

8 years agoDFG JIT does not speculate aggressively enough on GetById
fpizlo@apple.com [Tue, 20 Sep 2011 09:41:16 +0000 (09:41 +0000)]
DFG JIT does not speculate aggressively enough on GetById
https://bugs.webkit.org/show_bug.cgi?id=68320

Reviewed by Oliver Hunt.

This adds the ability to access properties directly, by offset.
This optimization kicks in when at the time of DFG compilation,
it appears that the given get_by_id is self-cached by the old JIT.
Two new opcodes get introduced: CheckStructure and GetByOffset.
CheckStructure performs a speculation check on the object's
structure, and returns the storage pointer. GetByOffset performs
a direct read of the field from the storage pointer. Both
CheckStructure and GetByOffset can be CSE'd, so that we can
eliminate redundant structure checks, and redundant reads of the
same field.

This is a 4% speed-up on V8, a 2% slow-down on Kraken, and
neutral on SunSpider.

* bytecode/PredictedType.cpp:
(JSC::predictionFromClassInfo):
(JSC::predictionFromStructure):
(JSC::predictionFromCell):
* bytecode/PredictedType.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGGenerationInfo.h:
(JSC::DFG::dataFormatToString):
(JSC::DFG::needDataFormatConversion):
(JSC::DFG::GenerationInfo::initStorage):
(JSC::DFG::GenerationInfo::spill):
(JSC::DFG::GenerationInfo::fillStorage):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::predict):
(JSC::DFG::Graph::getPrediction):
* dfg/DFGJITCodeGenerator.cpp:
(JSC::DFG::JITCodeGenerator::fillInteger):
(JSC::DFG::JITCodeGenerator::fillDouble):
(JSC::DFG::JITCodeGenerator::fillJSValue):
(JSC::DFG::JITCodeGenerator::fillStorage):
(JSC::DFG::GPRTemporary::GPRTemporary):
* dfg/DFGJITCodeGenerator.h:
(JSC::DFG::JITCodeGenerator::silentSpillGPR):
(JSC::DFG::JITCodeGenerator::silentFillGPR):
(JSC::DFG::JITCodeGenerator::spill):
(JSC::DFG::JITCodeGenerator::storageResult):
(JSC::DFG::StorageOperand::StorageOperand):
(JSC::DFG::StorageOperand::~StorageOperand):
(JSC::DFG::StorageOperand::index):
(JSC::DFG::StorageOperand::gpr):
(JSC::DFG::StorageOperand::use):
* dfg/DFGNode.h:
(JSC::DFG::OpInfo::OpInfo):
(JSC::DFG::Node::Node):
(JSC::DFG::Node::hasPrediction):
(JSC::DFG::Node::hasStructure):
(JSC::DFG::Node::structure):
(JSC::DFG::Node::hasStorageAccessData):
(JSC::DFG::Node::storageAccessDataIndex):
* dfg/DFGPropagator.cpp:
(JSC::DFG::Propagator::propagateNode):
(JSC::DFG::Propagator::globalVarLoadElimination):
(JSC::DFG::Propagator::getMethodLoadElimination):
(JSC::DFG::Propagator::checkStructureLoadElimination):
(JSC::DFG::Propagator::getByOffsetLoadElimination):
(JSC::DFG::Propagator::performNodeCSE):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compile):
* wtf/StdLibExtras.h:
(WTF::safeCast):

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

8 years agoWeb Inspector: extract RawSourceCode source mapping logic to helper classes.
podivilov@chromium.org [Tue, 20 Sep 2011 09:28:50 +0000 (09:28 +0000)]
Web Inspector: extract RawSourceCode source mapping logic to helper classes.
https://bugs.webkit.org/show_bug.cgi?id=67789

Reviewed by Pavel Feldman.

* inspector/front-end/SourceFile.js:
(WebInspector.RawSourceCode.prototype.get uiSourceCode):
(WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
(WebInspector.RawSourceCode.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
(WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
(WebInspector.RawSourceCode.prototype._createSourceMapping):
(WebInspector.RawSourceCode.prototype._saveSourceMapping):
(WebInspector.RawSourceCode.PlainSourceMapping):
(WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation):
(WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.PlainSourceMapping.prototype.get uiSourceCode):
(WebInspector.RawSourceCode.FormattedSourceMapping):
(WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
(WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.FormattedSourceMapping.prototype.get uiSourceCode):

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

8 years ago[GTK] WebProcess shouldn't use the GTK+ API
carlosgc@webkit.org [Tue, 20 Sep 2011 08:58:54 +0000 (08:58 +0000)]
[GTK] WebProcess shouldn't use the GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=68062

Reviewed by Martin Robinson.

Source/WebCore:

Move errors code that is common between webki1 and webkit2 to
WebCore so that it can be shared.

* GNUmakefile.list.am: Add new files to compilation.
* platform/gtk/ErrorsGtk.cpp: Added.
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
* platform/gtk/ErrorsGtk.h: Added.

Source/WebKit/gtk:

Use WebCore API to create errors in frame loader.

* WebCoreSupport/AssertMatchingEnums.cpp:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::cancelledError):
(WebKit::FrameLoaderClient::blockedError):
(WebKit::FrameLoaderClient::cannotShowURLError):
(WebKit::FrameLoaderClient::interruptedForPolicyChangeError):
(WebKit::FrameLoaderClient::cannotShowMIMETypeError):
(WebKit::FrameLoaderClient::fileDoesNotExistError):
(WebKit::FrameLoaderClient::pluginWillHandleLoadError):
* webkit/webkiterror.cpp:
(webkit_network_error_quark):
(webkit_policy_error_quark):
(webkit_plugin_error_quark):

Source/WebKit/gtk/po:

* POTFILES: Remove FrameLoaderGtk.cpp and add ErrorsGtk.cpp.

Source/WebKit2:

Use WebCore API to create errors in WebProcess.

* GNUmakefile.am: Don't use webkit/webkierror.h.
* WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
(WebKit::cancelledError):
(WebKit::blockedError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::cannotShowMIMETypeError):
(WebKit::fileDoesNotExistError):
(WebKit::pluginWillHandleLoadError):

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

8 years ago[Qt] Add Qt specific expecteds to new tests introduced in r95461.
reni@webkit.org [Tue, 20 Sep 2011 08:36:05 +0000 (08:36 +0000)]
[Qt] Add Qt specific expecteds to new tests introduced in r95461.

Unreviewed gardening.

* platform/qt/fast/table/table-cell-before-after-content-around-table-block-expected.png: Added.
* platform/qt/fast/table/table-cell-before-after-content-around-table-block-expected.txt: Added.
* platform/qt/fast/table/table-cell-before-after-content-around-table-expected.png: Added.
* platform/qt/fast/table/table-cell-before-after-content-around-table-expected.txt: Added.
* platform/qt/fast/table/table-cell-before-after-content-around-table-row-expected.png: Added.
* platform/qt/fast/table/table-cell-before-after-content-around-table-row-expected.txt: Added.
* platform/qt/fast/table/table-row-before-after-content-around-block-expected.png: Added.
* platform/qt/fast/table/table-row-before-after-content-around-block-expected.txt: Added.
* platform/qt/fast/table/table-row-before-after-content-around-table-expected.png: Added.
* platform/qt/fast/table/table-row-before-after-content-around-table-expected.txt: Added.

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

8 years ago[Qt] Two tests fail after r95488 & r95489
reni@webkit.org [Tue, 20 Sep 2011 08:05:22 +0000 (08:05 +0000)]
[Qt] Two tests fail after r95488 & r95489
https://bugs.webkit.org/show_bug.cgi?id=68428

Skip the failing tests.

Unreviewed gardening.

* platform/qt/Skipped:

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

8 years ago2011-09-20 Carlos Garcia Campos <cgarcia@igalia.com>
carlosgc@webkit.org [Tue, 20 Sep 2011 07:57:52 +0000 (07:57 +0000)]
2011-09-20  Carlos Garcia Campos  <cgarcia@igalia.com>

        [GTK] Update NEWS and configure.ac for 1.5.90 release

        Reviewed by Martin Robinson.

        * configure.ac:

2011-09-20  Philippe Normand  <pnormand@igalia.com>

        [GTK] Update NEWS and configure.ac for 1.5.90 release

        Reviewed by Martin Robinson.

        * NEWS:

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

8 years agoAttempt to fix the Leopard build.
mrowe@apple.com [Tue, 20 Sep 2011 06:33:57 +0000 (06:33 +0000)]
Attempt to fix the Leopard build.

* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
* platform/mac/DisplaySleepDisabler.h:

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

8 years agoRemove toPrimitive from JSCell
mhahnenberg@apple.com [Tue, 20 Sep 2011 04:33:10 +0000 (04:33 +0000)]
Remove toPrimitive from JSCell
https://bugs.webkit.org/show_bug.cgi?id=67875

Reviewed by Darin Adler.

Part of the refactoring process to un-virtualize JSCell.  We move
all of the implicit functionality provided by the virtual toPrimitive method
in JSCell to be explicit in JSValue::toPrimitive and JSCell:toPrimitive while
also de-virtualizing JSCell::toPrimitive.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSCell.cpp:
(JSC::JSCell::toPrimitive):
* runtime/JSCell.h:

We replace JSNotAnObject::toPrimitive with defaultValue, which it overrides from
JSObject.  This pushes the virtual method further down, enabling us to get rid
of the virtual call in JSCell.  Eventually we'll probably have to deal with this
again, but we'll cross that bridge when we come to it.
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::defaultValue):
* runtime/JSNotAnObject.h:
* runtime/JSObject.h:
* runtime/JSString.h:

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

8 years agoRemoving one last case of DENABLE_JSC_MULTIPLE_THREADS -- the cmake folder doesn...
ggaren@apple.com [Tue, 20 Sep 2011 04:30:58 +0000 (04:30 +0000)]
Removing one last case of DENABLE_JSC_MULTIPLE_THREADS -- the cmake folder doesn't seem to have a ChangeLog

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

8 years agoRemoved ENABLE_JSC_MULTIPLE_THREADS and related #ifdefs.
ggaren@apple.com [Tue, 20 Sep 2011 04:24:34 +0000 (04:24 +0000)]
Removed ENABLE_JSC_MULTIPLE_THREADS and related #ifdefs.
https://bugs.webkit.org/show_bug.cgi?id=68422

Missed this one case before.

* features.gypi:

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

8 years ago<http://webkit.org/b/68421> Stop calling UpdateSystemActivity in places where we...
mrowe@apple.com [Tue, 20 Sep 2011 04:14:55 +0000 (04:14 +0000)]
<webkit.org/b/68421> Stop calling UpdateSystemActivity in places where we hold power assertions that achieve the same effect

On SnowLeopard and newer it's not necessary to call UpdateSystemActivity to prevent the screensaver from kicking
in as the NoDisplaySleep assertion now has that effect. It's also not necessary to hold both a NoDisplaySleep and
a NoIdleSleep assertion as the latter is implied by the former.

Source/WebCore:

Since there were multiple copies of the same code to disable display sleep spread across WebCore, WebKit and WebKit2
this patch takes the approach of moving this functionality to a new DisplaySleepDisabler class that lives in WebCore.
A class is used as it makes it easier to reason about the lifetime of the assertions and to ensure that the assertions will
always be released when their owning objects go away.

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler): Register for the NoDisplaySleep assertion, and start our
system activity timer when on Leopard.
(WebCore::DisplaySleepDisabler::~DisplaySleepDisabler): Unregister for the assertion.
(WebCore::DisplaySleepDisabler::systemActivityTimerFired): Call UpdateSystemActivity to prevent the screensaver from
triggering on Leopard.
* platform/mac/DisplaySleepDisabler.h:
(WebCore::DisplaySleepDisabler::create):
* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController dealloc]):
(-[WebVideoFullscreenController setupVideoOverlay:]): Remove the now-unnecessary explicit use of the WebCore namespace.
(-[WebVideoFullscreenController mediaElement]): Ditto.
(-[WebVideoFullscreenController setMediaElement:]): Ditto.
(-[WebVideoFullscreenController windowDidExitFullscreen]): Ditto.
(-[WebVideoFullscreenController updatePowerAssertions]): Create a DisplaySleepDisabler instance when transitioning from permitting
display sleep to disabling display sleep. Clear out our reference when sleep should be permitted, destroying any
disabler that we own.

Source/WebKit/mac:

Adopt the DisplaySleepDisabler class that was added to WebCore and remove all of duplicated logic from WebFullScreenController.

Reviewed by Dan Bernstein.

* WebView/WebFullScreenController.h:
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController dealloc]):
(-[WebFullScreenController _updatePowerAssertions]): Create a DisplaySleepDisabler instance when transitioning from permitting
display sleep to disabling display sleep. Clear out our reference when sleep should be permitted, destroying any
disabler that we own.

Source/WebKit2:

Adopt the DisplaySleepDisabler class that was added to WebCore and remove all of duplicated logic from WKFullScreenWindowController.

Reviewed by Dan Bernstein.

* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _updatePowerAssertions]): Create a DisplaySleepDisabler instance when transitioning from permitting
display sleep to disabling display sleep. Clear out our reference when sleep should be permitted, destroying any
disabler that we own. Also adds a FIXME about an error that was noticed while working in this code.

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

8 years agoRemoved ENABLE_LAZY_BLOCK_FREEING and related #ifdefs
ggaren@apple.com [Tue, 20 Sep 2011 04:05:28 +0000 (04:05 +0000)]
Removed ENABLE_LAZY_BLOCK_FREEING and related #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=68424

As discussed on webkit-dev. All ports build with threads enabled in JSC now.

This may break WinCE and other ports that have not built and tested with
this configuration. I've filed bugs for port maintainers. It's time for
WebKit to move forward.

Reviewed by Mark Rowe.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::destroy):
(JSC::Heap::blockFreeingThreadMain):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlocks):
(JSC::Heap::releaseFreeBlocks):
* heap/Heap.h:
* wtf/Platform.h:

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

8 years agoRemoved ENABLE_WTF_MULTIPLE_THREADS and related #ifdefs
ggaren@apple.com [Tue, 20 Sep 2011 03:55:29 +0000 (03:55 +0000)]
Removed ENABLE_WTF_MULTIPLE_THREADS and related #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=68423

As discussed on webkit-dev. All ports build with threads enabled in WTF now.

This may break WinCE and other ports that have not built and tested with
this configuration. I've filed bugs for port maintainers. It's time for
WebKit to move forward.

Reviewed by Mark Rowe.

* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
* wtf/FastMalloc.cpp:
* wtf/Platform.h:
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::increment):
(WTF::RefCountedLeakCounter::decrement):
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
* wtf/ThreadingWin.cpp:
(WTF::initializeThreading):
* wtf/dtoa.cpp:
(WTF::pow5mult):
* wtf/gtk/ThreadingGtk.cpp:
(WTF::initializeThreading):
* wtf/qt/ThreadingQt.cpp:
(WTF::initializeThreading):

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

8 years agoRemoved ENABLE_JSC_MULTIPLE_THREADS and related #ifdefs.
ggaren@apple.com [Tue, 20 Sep 2011 03:35:49 +0000 (03:35 +0000)]
Removed ENABLE_JSC_MULTIPLE_THREADS and related #ifdefs.
https://bugs.webkit.org/show_bug.cgi?id=68422

As discussed on webkit-dev. All ports build with threads enabled in JSC now.

This may break WinCE and other ports that have not built and tested with
this configuration. I've filed bugs for port maintainers. It's time for
WebKit to move forward.

Reviewed by Sam Weinig.

* API/APIShims.h:
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
* API/JSContextRef.cpp:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::gatherConservativeRoots):
* heap/MachineStackMarker.h:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
(JSC::initializeThreading):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::sharedInstance):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::makeUsableFromMultipleThreads):
* runtime/JSLock.cpp:
* runtime/Structure.cpp:
* wtf/Platform.h:

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

8 years agoHit testing on margins of body and head elements doesn't recur
rniwa@webkit.org [Tue, 20 Sep 2011 02:48:04 +0000 (02:48 +0000)]
Hit testing on margins of body and head elements doesn't recur
https://bugs.webkit.org/show_bug.cgi?id=40753

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by positionForPointRespectingEditingBoundaries's comparing the editability
of head/body and html elements when hit testing was done inside margins of head and body elements.

Fixed the bug by special-casing html element (any immediate child of render view with a render layer)
since margins of head and body elements are special.

Tests: editing/selection/click-on-body-margin.html
       editing/selection/click-on-head-margin.html

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

LayoutTests:

Add tests to click on margins of head and body elements. WebKit should not
(attempt to) place the caret after or before head and body elements.

* editing/selection/click-on-body-margin-expected.txt: Added.
* editing/selection/click-on-body-margin.html: Added.
* editing/selection/click-on-head-margin-expected.txt: Added.
* editing/selection/click-on-head-margin.html: Added.

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

8 years agoAsk for audio hardware buffer size instead of using hardwired constants.
commit-queue@webkit.org [Tue, 20 Sep 2011 02:07:23 +0000 (02:07 +0000)]
Ask for audio hardware buffer size instead of using hardwired constants.
https://bugs.webkit.org/show_bug.cgi?id=67952

Patch by Raymond Toy <rtoy@google.com> on 2011-09-19
Reviewed by Kenneth Russell.

* public/WebKitPlatformSupport.h:
(WebKit::WebKitPlatformSupport::audioHardwareBufferSize): Declare
new member function audioHardwareBufferSize.
* src/AudioDestinationChromium.cpp:
(WebCore::AudioDestinationChromium::AudioDestinationChromium):
Call audioHardwareBufferSize() to get buffer size; update
m_callbackBuffersize and m_renderCountPerCallback appropriately.
Remove global variables callbackBufferSize and
renderCountPerCallback.  Add constant for maximum
allowed buffer size and verify we don't exceed it.
(WebCore::AudioDestinationChromium::render): Use new member
variables instead of globals.
* src/AudioDestinationChromium.h:
Define new member variables m_callbackBufferSize and
m_renderCountPerCallback

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

8 years agoUnreviewed, rolling out r95493 and r95496.
commit-queue@webkit.org [Tue, 20 Sep 2011 01:53:00 +0000 (01:53 +0000)]
Unreviewed, rolling out r95493 and r95496.
http://trac.webkit.org/changeset/95493
http://trac.webkit.org/changeset/95496
https://bugs.webkit.org/show_bug.cgi?id=68418

Broke Windows build (Requested by rniwa on #webkit).

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

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
* heap/AllocationSpace.cpp: Removed.
* heap/AllocationSpace.h: Removed.
* heap/Heap.cpp:
(JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
(JSC::CountFunctor::TakeIfEmpty::operator()):
(JSC::CountFunctor::TakeIfEmpty::returnValue):
(JSC::Heap::Heap):
(JSC::Heap::reportExtraMemoryCostSlowCase):
(JSC::Heap::tryAllocate):
(JSC::Heap::allocateSlowCase):
(JSC::Heap::getConservativeRegisterRoots):
(JSC::Heap::markRoots):
(JSC::Heap::clearMarks):
(JSC::Heap::sweep):
(JSC::Heap::objectCount):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::globalObjectCount):
(JSC::Heap::objectTypeCounts):
(JSC::Heap::collect):
(JSC::Heap::canonicalizeBlocks):
(JSC::Heap::resetAllocator):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlocks):
(JSC::Heap::shrink):
* heap/Heap.h:
(JSC::Heap::markedSpace):
(JSC::Heap::forEachCell):
(JSC::Heap::forEachBlock):
(JSC::Heap::sizeClassFor):
(JSC::Heap::allocate):
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::recompileAllJSFunctions):
(JSC::JSGlobalData::releaseExecutableMemory):

Source/WebCore:

* ForwardingHeaders/heap/AllocationSpace.h: Removed.

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

8 years ago[chromium] ContentLayer's texture updater deleted during paint when compositing turns...
commit-queue@webkit.org [Tue, 20 Sep 2011 01:49:52 +0000 (01:49 +0000)]
[chromium] ContentLayer's texture updater deleted during paint when compositing turns off in the middle of paint
https://bugs.webkit.org/show_bug.cgi?id=68405

Patch by James Robinson <jamesr@chromium.org> on 2011-09-19
Reviewed by Kenneth Russell.

Make TiledLayerChromium's textureUpdater refcounted and hold an explicit reference during paint in case
compositing is turned off halfway through a paint.

* platform/graphics/chromium/ContentLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::create):
* platform/graphics/chromium/ImageLayerChromium.h:
* platform/graphics/chromium/LayerTextureUpdater.h:
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
(WebCore::LayerTextureUpdaterBitmap::create):
(WebCore::LayerTextureUpdaterSkPicture::create):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::prepareToUpdate):

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

8 years agoErrrk, missed stylebot comments in last commit.
barraclough@apple.com [Tue, 20 Sep 2011 01:44:56 +0000 (01:44 +0000)]
Errrk, missed stylebot comments in last commit.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncSplit):

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

8 years agoString#split is buggy
barraclough@apple.com [Tue, 20 Sep 2011 01:41:42 +0000 (01:41 +0000)]
String#split is buggy
https://bugs.webkit.org/show_bug.cgi?id=68348

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* runtime/StringPrototype.cpp:
(JSC::jsStringWithReuse):
    - added helper function to reuse original JSString value.
(JSC::stringProtoFuncSplit):
    - Rewritten from the spec.
* tests/mozilla/ecma/String/15.5.4.8-2.js:
(getTestCases):
    - This test is not ES5 compliant.

LayoutTests:

* fast/js/script-tests/string-split-conformance.js: Added.
* fast/js/string-split-conformance-expected.txt: Added.
* fast/js/string-split-conformance.html: Added.
    - Added new Layout test based on:
        http://stevenlevithan.com/demo/split.cfm
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T6-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T7-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T8-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T9-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A2_T7-expected.txt:
    - Check in failing results for these 5 tests; they are all wrong
      (see https://bugs.ecmascript.org/show_bug.cgi?id=61).

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

8 years agoRemoved lots of friend declarations from JSCell, so we can more
ggaren@apple.com [Tue, 20 Sep 2011 01:21:51 +0000 (01:21 +0000)]
Removed lots of friend declarations from JSCell, so we can more
effectively make use of private and protected.

Reviewed by Sam Weinig.

* runtime/JSCell.h: Removed MSVCBugWorkaround because it was a lot of
confusion for not much safety.
(JSC::JSCell::operator new): Made this public because it is used by a
few clients, and not really dangerous.

* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::defineGetter):
(JSC::JSObject::defineSetter):
(JSC::JSObject::getPropertySpecificValue):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::seal):
(JSC::JSObject::freeze):
(JSC::JSObject::preventExtensions):
(JSC::JSObject::removeDirect):
(JSC::JSObject::createInheritorID):
(JSC::JSObject::allocatePropertyStorage):
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/JSObject.h:
(JSC::JSObject::getDirect):
(JSC::JSObject::getDirectLocation):
(JSC::JSObject::hasCustomProperties):
(JSC::JSObject::hasGetterSetterProperties):
(JSC::JSObject::isSealed):
(JSC::JSObject::isFrozen):
(JSC::JSObject::isExtensible):
(JSC::JSObject::flattenDictionaryObject):
(JSC::JSObject::finishCreation):
(JSC::JSObject::prototype):
(JSC::JSObject::setPrototype):
(JSC::JSObject::inlineGetOwnPropertySlot):
(JSC::JSCell::fastGetOwnProperty):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::transitionTo):
(JSC::JSObject::visitChildrenDirect): Changed all use of m_structure to
structure() / setStructure(), so we don't have to be a friend of JSCell.

* runtime/Structure.h:
(JSC::JSCell::setStructure): Added, to avoid direct access by JSObject
to JSCell::m_structure.

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

8 years agoEliminate Length::undefinedLength = -1 and replace with Undefined LengthType.
macpherson@chromium.org [Tue, 20 Sep 2011 01:20:12 +0000 (01:20 +0000)]
Eliminate Length::undefinedLength = -1 and replace with Undefined LengthType.
https://bugs.webkit.org/show_bug.cgi?id=68057

Reviewed by Darin Adler.

There appear to be many cases where -1 is actually a valid Length.
Encoding the validity of Length separately to the value is a natural solution.

No new tests / no behavioral changes.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyLength::applyValue):
* platform/Length.h:
(WebCore::Length::Length):
(WebCore::Length::value):
(WebCore::Length::calcValue):
(WebCore::Length::calcMinValue):
(WebCore::Length::calcFloatValue):
(WebCore::Length::isUndefined):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::isLogicalWidthSpecified):
(WebCore::RenderImage::isLogicalHeightSpecified):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computePreferredLogicalWidths):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::computePreferredLogicalWidths):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computePreferredLogicalWidths):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::initialMaxSize):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computePreferredLogicalWidths):

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

8 years agoAlways enable ENABLE(EVENTSOURCE)
abarth@webkit.org [Tue, 20 Sep 2011 01:04:25 +0000 (01:04 +0000)]
Always enable ENABLE(EVENTSOURCE)
https://bugs.webkit.org/show_bug.cgi?id=68414

Reviewed by Eric Seidel.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsWinCE.cmake:
* Source/cmakeconfig.h.cmake:
* configure.ac:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

EventSource seems to be here to stay.  This patch makes WebKit more
hackable by removing this ENABLE macro, as discussed on webkit-dev.

* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* bindings/cpp/WebDOMEventTarget.cpp:
(toWebKit):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::eventSource):
* bindings/js/JSEventSourceCustom.cpp:
* bindings/js/JSEventTarget.cpp:
(WebCore::toJS):
(WebCore::toEventTarget):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::eventSource):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
* features.pri:
* page/DOMWindow.idl:
* page/EventSource.cpp:
* page/EventSource.h:
* page/EventSource.idl:
* workers/WorkerContext.idl:

Source/WebKit/chromium:

* features.gypi:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/build-webkit:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.vsprops:
* win/tools/vsprops/FeatureDefinesCairo.vsprops:

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

8 years agoSheriffbot rollout should be more intuitive.
levin@chromium.org [Tue, 20 Sep 2011 00:56:48 +0000 (00:56 +0000)]
Sheriffbot rollout should be more intuitive.
https://bugs.webkit.org/show_bug.cgi?id=68415

Reviewed by Adam Barth.

* Scripts/webkitpy/tool/bot/irc_command.py: Add support for revert and comma separated args.
* Scripts/webkitpy/tool/bot/irc_command_unittest.py: Add parsing tests for comma separated args
  and a few others cases.
* Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py: Verify that revert works.

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

8 years agocheck-webkit-style generates bogus warning for StructuredExceptionHandlerSupressor.h
levin@chromium.org [Tue, 20 Sep 2011 00:38:09 +0000 (00:38 +0000)]
check-webkit-style generates bogus warning for StructuredExceptionHandlerSupressor.h
https://bugs.webkit.org/show_bug.cgi?id=68391

Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py: Skip __asm lines when doing style checks on a line.
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Added a test for this.

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

8 years agoEnable JSC_MULTIPLE_THREADS for OS(QNX).
commit-queue@webkit.org [Tue, 20 Sep 2011 00:35:41 +0000 (00:35 +0000)]
Enable JSC_MULTIPLE_THREADS for OS(QNX).
https://bugs.webkit.org/show_bug.cgi?id=68047

Patch by Eli Fidler <efidler@rim.com> on 2011-09-19
Reviewed by Daniel Bates.

SA_RESTART was required for SIGUSR2-based debugging, but is not
present on QNX. This debugging doesn't seem critical to
JSC_MULTIPLE_THREADS, so allow it to proceed.

* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::Thread):
(JSC::getPlatformThreadRegisters):
(JSC::otherThreadStackPointer):
(JSC::freePlatformThreadRegisters):
* wtf/Platform.h: enable PTHREADS for OS(QNX)

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

8 years agoFix a use-after-free: clear the fullscreen change event target queue at
commit-queue@webkit.org [Tue, 20 Sep 2011 00:19:02 +0000 (00:19 +0000)]
Fix a use-after-free: clear the fullscreen change event target queue at
detach time, rather than at destruction time. If this isn't done, it's
possible for the event target queue to be the only thing that
references the document. Then when the document is popped off the queue
and dereferenced in Document::fullScreenChangeDelayTimerFired, the
document is destroyed and the subsequent access to
m_fullScreenChangeEventTargetQueue.isEmpty() accesses free'd memory.
https://bugs.webkit.org/show_bug.cgi?id=67960

Patch by Jeremy Apthorp <jeremya@chromium.org> on 2011-09-19
Reviewed by Adam Barth.

* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::detach):

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

8 years agoWindows build fix.
oliver@apple.com [Mon, 19 Sep 2011 23:50:15 +0000 (23:50 +0000)]
Windows build fix.

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

8 years agoSuppress flakey test on windows in Chromium gesture recognizer
commit-queue@webkit.org [Mon, 19 Sep 2011 23:49:50 +0000 (23:49 +0000)]
Suppress flakey test on windows in Chromium gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=68408

Patch by Robert Kroeger <rjkroege@chromium.org> on 2011-09-19
Reviewed by Adam Barth.

* tests/InnerGestureRecognizerTest.cpp:
(TEST_F):

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

8 years agoUnreviewed, rolling out r95482.
commit-queue@webkit.org [Mon, 19 Sep 2011 23:48:27 +0000 (23:48 +0000)]
Unreviewed, rolling out r95482.
http://trac.webkit.org/changeset/95482
https://bugs.webkit.org/show_bug.cgi?id=68410

Broke chromium webkit-tests (Requested by dslomov on #webkit).

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

Source/WebCore:

* platform/image-encoders/skia/JPEGImageEncoder.cpp:
(WebCore::RGBAtoRGB):

LayoutTests:

* fast/canvas/webgl/premultiplyalpha-test-expected.txt:
* fast/canvas/webgl/premultiplyalpha-test.html:

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

8 years agoRefactor Heap allocation logic into separate AllocationSpace class
oliver@apple.com [Mon, 19 Sep 2011 23:15:21 +0000 (23:15 +0000)]
Refactor Heap allocation logic into separate AllocationSpace class
https://bugs.webkit.org/show_bug.cgi?id=68409

Reviewed by Gavin Barraclough.

../../../../Volumes/Data/git/WebKit/OpenSource/Source/JavaScriptCore:

This patch hoists direct manipulation of the MarkedSpace and related
data out of Heap and into a separate class.  This will allow us to
have multiple allocation spaces in future, so easing the way towards
having GC'd backing stores for objects.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
* heap/AllocationSpace.cpp: Added.
(JSC::AllocationSpace::tryAllocate):
(JSC::AllocationSpace::allocateSlowCase):
(JSC::AllocationSpace::allocateBlock):
(JSC::AllocationSpace::freeBlocks):
(JSC::TakeIfEmpty::TakeIfEmpty):
(JSC::TakeIfEmpty::operator()):
(JSC::TakeIfEmpty::returnValue):
(JSC::AllocationSpace::shrink):
* heap/AllocationSpace.h: Added.
(JSC::AllocationSpace::AllocationSpace):
(JSC::AllocationSpace::blocks):
(JSC::AllocationSpace::sizeClassFor):
(JSC::AllocationSpace::setHighWaterMark):
(JSC::AllocationSpace::highWaterMark):
(JSC::AllocationSpace::canonicalizeBlocks):
(JSC::AllocationSpace::resetAllocator):
(JSC::AllocationSpace::forEachCell):
(JSC::AllocationSpace::forEachBlock):
(JSC::AllocationSpace::allocate):
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::reportExtraMemoryCostSlowCase):
(JSC::Heap::getConservativeRegisterRoots):
(JSC::Heap::markRoots):
(JSC::Heap::clearMarks):
(JSC::Heap::sweep):
(JSC::Heap::objectCount):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::globalObjectCount):
(JSC::Heap::objectTypeCounts):
(JSC::Heap::collect):
(JSC::Heap::canonicalizeBlocks):
(JSC::Heap::resetAllocator):
(JSC::Heap::freeBlocks):
(JSC::Heap::shrink):
* heap/Heap.h:
(JSC::Heap::objectSpace):
(JSC::Heap::sizeClassForObject):
(JSC::Heap::allocate):
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::recompileAllJSFunctions):
(JSC::JSGlobalData::releaseExecutableMemory):

../../../../Volumes/Data/git/WebKit/OpenSource/Source/WebCore:

Adding a forwarding header.

* ForwardingHeaders/heap/AllocationSpace.h: Added.

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

8 years ago[Qt] Unreviewed coding style fix.
alexis.menard@openbossa.org [Mon, 19 Sep 2011 23:13:18 +0000 (23:13 +0000)]
[Qt] Unreviewed coding style fix.

* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qweberror.h:

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

8 years agoExpose AXObjectCache methods so that WebAccessibilityCache
commit-queue@webkit.org [Mon, 19 Sep 2011 23:04:11 +0000 (23:04 +0000)]
Expose AXObjectCache methods so that WebAccessibilityCache
can be deleted.
https://bugs.webkit.org/show_bug.cgi?id=68225

Patch by Dominic Mazzoni <dmazzoni@google.com> on 2011-09-19
Reviewed by Dimitri Glazkov.

This patch exposes the functionality needed from AXObjectCache
with new methods in WebAccessibilityObject and WebDocument.
Next, Chromium will be updated to use only these methods and
not WebAccessibilityCache. Then, WebAccessibilityCache can be
deleted from WebKit.

* public/WebAccessibilityObject.h:
* public/WebDocument.h:
* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::enableAccessibility):
(WebKit::WebAccessibilityObject::accessibilityEnabled):
(WebKit::WebAccessibilityObject::axID):
* src/WebDocument.cpp:
(WebKit::WebDocument::accessibilityObject):
(WebKit::WebDocument::accessibilityObjectFromID):

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

8 years agoPerform HTTP method and header validation in AssociatedURLLoader for
bbudge@chromium.org [Mon, 19 Sep 2011 23:02:52 +0000 (23:02 +0000)]
Perform HTTP method and header validation in AssociatedURLLoader for
requests coming from untrusted code (eg. Native Client in Chrome). Use
the same code as XMLHttpRequest to reduce code duplication and have
behavior identical to XHR in Javascript. Add an 'untrustedHTTP' option
to WebURLLoaderOptions, which AssociatedURLLoader can use to determine
if it should check the request method and headers.
https://bugs.webkit.org/show_bug.cgi?id=67655

Reviewed by Darin Fisher.

* public/WebURLLoaderOptions.h:
(WebKit::WebURLLoaderOptions::WebURLLoaderOptions):
* src/AssociatedURLLoader.cpp:
(WebKit::AssociatedURLLoader::ClientAdapter::setDelayedError):
(WebKit::AssociatedURLLoader::loadAsynchronously):
* tests/AssociatedURLLoaderTest.cpp:
(WebKit::AssociatedURLLoaderTest::CheckMethodFails):
(WebKit::AssociatedURLLoaderTest::CheckHeaderFails):
(WebKit::AssociatedURLLoaderTest::CheckFails):
(WebKit::TEST_F):

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

8 years ago[V8] document.all gets confused about its prototype chain
abarth@webkit.org [Mon, 19 Sep 2011 22:57:30 +0000 (22:57 +0000)]
[V8] document.all gets confused about its prototype chain
https://bugs.webkit.org/show_bug.cgi?id=68393

Reviewed by Eric Seidel.

Source/WebCore:

GetRealNamedPropertyInPrototypeChain doesn't call interceptors, so it's
not a good idea to use its return value.  It turns out that all the
callers of the API only cared about whether it returns a null handle.

Test: http/tests/security/document-all.html

* bindings/v8/V8Collection.h:
(WebCore::collectionNamedPropertyGetter):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyDeleter):
(WebCore::V8DOMStringMap::namedPropertySetter):
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
(WebCore::V8HTMLAllCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::V8HTMLCollection::namedPropertyGetter):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::V8NamedNodeMap::namedPropertyGetter):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore::storageSetter):

LayoutTests:

Test how document.all behaves when you change its prototype chain.

* http/tests/security/document-all-expected.txt: Added.
* http/tests/security/document-all.html: Added.

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

8 years agoNamed property confusion with __proto__
abarth@webkit.org [Mon, 19 Sep 2011 22:56:22 +0000 (22:56 +0000)]
Named property confusion with __proto__
https://bugs.webkit.org/show_bug.cgi?id=68221

Reviewed by Eric Seidel.

Source/WebCore:

The __proto__ property is super magical because it's not a real named
property and it has higher precedence than even interceptors.  This
confuses this check, which is meant to detech which names will get
handled by our interceptor.

Test: http/tests/security/window-named-proto.html

* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::namedSecurityCheck):

LayoutTests:

* http/tests/security/resources/innocent-victim-with-iframe.html: Added.
* http/tests/security/window-named-proto-expected.txt: Added.
* http/tests/security/window-named-proto.html: Added.

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

8 years agoRename ENABLE(OPENTYPE_SANITIZER) to USE(OPENTYPE_SANITIZER)
abarth@webkit.org [Mon, 19 Sep 2011 22:54:53 +0000 (22:54 +0000)]
Rename ENABLE(OPENTYPE_SANITIZER) to USE(OPENTYPE_SANITIZER)
https://bugs.webkit.org/show_bug.cgi?id=68292

Reviewed by Eric Seidel.

Source/WebCore:

OpenType Sanitizer is a library for sanitizing type and not a feature.
Therefore this macro should say that we USE the library.

* platform/graphics/WOFFFileFormat.cpp:
* platform/graphics/WOFFFileFormat.h:
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/opentype/OpenTypeSanitizer.cpp:
* platform/graphics/opentype/OpenTypeSanitizer.h:
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
(WebCore::FontCustomPlatformData::supportsFormat):

Source/WebKit/chromium:

* features.gypi:

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

8 years agoRemove APPLICATION_CACHE_DYNAMIC_ENTRIES and associated code
abarth@webkit.org [Mon, 19 Sep 2011 22:53:04 +0000 (22:53 +0000)]
Remove APPLICATION_CACHE_DYNAMIC_ENTRIES and associated code
https://bugs.webkit.org/show_bug.cgi?id=68407

Reviewed by Eric Seidel.

As discussed on webkit-dev, no one appears to be using this code.

* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMApplicationCacheCustom.cpp: Removed.

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

8 years agoWindows build fix after r95310
aroben@apple.com [Mon, 19 Sep 2011 22:32:20 +0000 (22:32 +0000)]
Windows build fix after r95310

* JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Added
include\private\JavaScriptCore to the include path so DFGIntrinsic.h can be found.

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

8 years agoDFG speculation failures should act as additional value profiles
fpizlo@apple.com [Mon, 19 Sep 2011 22:27:38 +0000 (22:27 +0000)]
DFG speculation failures should act as additional value profiles
https://bugs.webkit.org/show_bug.cgi?id=68335

Reviewed by Oliver Hunt.

This adds slow-case counters to the old JIT. It also ensures that
negative zero in multiply is handled carefully. The old JIT
previously took slow path if the result of a multiply was zero,
which, without any changes, would cause the DFG to think that
every such multiply produced a double result.

This also fixes a bug in the old JIT's handling of decrements. It
would take the slow path if the result was zero, but not if it
underflowed.

By itself, this would be a 1% slow-down on V8 and Kraken. But then
I wrote optimizations in the DFG that take advantage of this new
information. It's no longer the case that every multiply needs to
do a check for negative zero; it only happens if the negative
zero is ignored.

This results in a 12% speed-up on v8-crypto, for a 1.4% geomean
speed-up in V8. It's mostly neutral on Kraken. I can see an
0.5% slow-down and it appears to be significant.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::resetRareCaseProfiles):
(JSC::CodeBlock::dumpValueProfiles):
* bytecode/CodeBlock.h:
* bytecode/ValueProfile.h:
(JSC::RareCaseProfile::RareCaseProfile):
(JSC::getRareCaseProfileBytecodeOffset):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::toInt32):
(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGJITCodeGenerator.cpp:
(JSC::DFG::GPRTemporary::GPRTemporary):
* dfg/DFGJITCodeGenerator.h:
* dfg/DFGNode.h:
* dfg/DFGPropagator.cpp:
(JSC::DFG::Propagator::propagateNode):
(JSC::DFG::Propagator::fixupNode):
(JSC::DFG::Propagator::clobbersWorld):
(JSC::DFG::Propagator::performNodeCSE):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
* jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
(JSC::JIT::linkDummySlowCase):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_post_dec):
(JSC::JIT::emit_op_pre_dec):
(JSC::JIT::compileBinaryArithOp):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
* jit/JITInlineMethods.h:
(JSC::JIT::addSlowCase):

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

8 years agoUnreviewed, rolling out r95385 and r95457.
commit-queue@webkit.org [Mon, 19 Sep 2011 22:26:34 +0000 (22:26 +0000)]
Unreviewed, rolling out r95385 and r95457.
http://trac.webkit.org/changeset/95385
http://trac.webkit.org/changeset/95457
https://bugs.webkit.org/show_bug.cgi?id=68395

Broke chromium browser_tests (Requested by dslomov on
#webkit).

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

Source/WebCore:

* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::disposeContextHandles):
(WebCore::V8DOMWindowShell::initContextIfNeeded):
* bindings/v8/V8IsolatedContext.cpp:
(WebCore::V8IsolatedContext::V8IsolatedContext):
(WebCore::V8IsolatedContext::destroy):
* bindings/v8/V8IsolatedContext.h:
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::didCreateScriptContextForFrame):
(WebCore::EmptyFrameLoaderClient::didDestroyScriptContextForFrame):
(WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext):
* loader/FrameLoaderClient.h:

Source/WebKit/chromium:

* public/WebFrameClient.h:
(WebKit::WebFrameClient::didCreateIsolatedScriptContext):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::didCreateScriptContextForFrame):
(WebKit::FrameLoaderClientImpl::didDestroyScriptContextForFrame):
(WebKit::FrameLoaderClientImpl::didCreateIsolatedScriptContext):
* src/FrameLoaderClientImpl.h:
* tests/WebFrameTest.cpp:
(WebKit::TEST_F):
* tests/data/context_notifications_test.html: Removed.
* tests/data/context_notifications_test_frame.html: Removed.

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

8 years agoFix nonpremultiplied webgl toDataURL to jpeg
commit-queue@webkit.org [Mon, 19 Sep 2011 22:23:28 +0000 (22:23 +0000)]
Fix nonpremultiplied webgl toDataURL to jpeg
https://bugs.webkit.org/show_bug.cgi?id=68366

Source/WebCore:

The canvas spec says that toDataURL to formats without an alpha must
be "composited onto a solid black background using the source-over
operator." Do that.

Patch by John Bauman <jbauman@chromium.org> on 2011-09-19
Reviewed by Kenneth Russell.

* platform/image-encoders/skia/JPEGImageEncoder.cpp:
(WebCore::RGBAtoRGB):

LayoutTests:

Update the premultiplyalpha-test from the WebGL conformance tests.

Patch by John Bauman <jbauman@chromium.org> on 2011-09-19
Reviewed by Kenneth Russell.

* fast/canvas/webgl/premultiplyalpha-test-expected.txt:
* fast/canvas/webgl/premultiplyalpha-test.html:

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

8 years agoLet Xcode 4 do its thang with ANGLE.xcodeproj
aroben@apple.com [Mon, 19 Sep 2011 22:20:41 +0000 (22:20 +0000)]
Let Xcode 4 do its thang with ANGLE.xcodeproj

* ANGLE.xcodeproj/project.pbxproj:

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

8 years agoWindows build fix after r94575
aroben@apple.com [Mon, 19 Sep 2011 22:20:32 +0000 (22:20 +0000)]
Windows build fix after r94575

* JavaScriptCore.vcproj/JavaScriptCore.sln: Relinearized project dependencies. testRegExp
now builds just before FindSafari.

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

8 years ago2011-09-19 Chris Marrin <cmarrin@apple.com>
cmarrin@apple.com [Mon, 19 Sep 2011 21:56:23 +0000 (21:56 +0000)]
2011-09-19  Chris Marrin  <cmarrin@apple.com>

        Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction
        https://bugs.webkit.org/show_bug.cgi?id=67510

        Reviewed by Adam Roben.

        Another fix to take care of one last crash when running pause-crash.html.
        CACF can't deal with null valueFunctions, so avoid setting it when it doesn't
        exist.

        This also adds logic to the Windows Hook in LayerChangesFlusher to prevent it
        from catching the null pointer exception generated by the pause-crash.html test
        before this bug was fixed. Windows was ignoring the exception, so the testcase
        would appear to succeed, even though it should have crashed.

        This is a resubmission of http://trac.webkit.org/changeset/95243 with a build fix.

        * WebCore.vcproj/WebCore.vcproj:
        * platform/graphics/ca/win/LayerChangesFlusher.cpp:
        (WebCore::LayerChangesFlusher::hookCallback):
        * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
        (PlatformCAAnimation::copy):
        * platform/win/StructuredExceptionHandlerSupressor.h: Added.
        (WebCore::StructuredExceptionHandlerSupressor::StructuredExceptionHandlerSupressor):
        (WebCore::StructuredExceptionHandlerSupressor::~StructuredExceptionHandlerSupressor):

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

8 years agoIncorrect selection with absolutely positioned div
rniwa@webkit.org [Mon, 19 Sep 2011 21:51:44 +0000 (21:51 +0000)]
Incorrect selection with absolutely positioned div
https://bugs.webkit.org/show_bug.cgi?id=39503

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

The bug was caused by a false assumption in RenderBlock::positionForPoint. Because the last child box
can be positioned, floated, invisible, etc..., we can't always trust last child's logicalTop to tell us
whether a given point is inside or below the last child box.

Fixed the bug by using the last hit-test candidate instead.

Test: editing/selection/block-with-positioned-lastchild.html

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

LayoutTests:

Added a regression test for placing the caret inside a block with multiple logical lines
with an absolutely positioned last child. WebKit should place the caret on the left of the first line
(instead of after the last line) when the user clicks on the left of the first line.

* editing/selection/block-with-positioned-lastchild-expected.txt: Added.
* editing/selection/block-with-positioned-lastchild.html: Added.

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

8 years agoUnreviewed. Chromium Rebaselines for r95461.
inferno@chromium.org [Mon, 19 Sep 2011 21:48:27 +0000 (21:48 +0000)]
Unreviewed. Chromium Rebaselines for r95461.

* platform/chromium-linux/fast/table/table-cell-before-after-content-around-table-block-expected.png: Added.
* platform/chromium-linux/fast/table/table-cell-before-after-content-around-table-expected.png: Added.
* platform/chromium-linux/fast/table/table-cell-before-after-content-around-table-row-expected.png: Added.
* platform/chromium-linux/fast/table/table-row-before-after-content-around-block-expected.png: Added.
* platform/chromium-linux/fast/table/table-row-before-after-content-around-table-expected.png: Added.
* platform/chromium-mac/fast/table/table-cell-before-after-content-around-table-block-expected.png: Added.
* platform/chromium-mac/fast/table/table-cell-before-after-content-around-table-expected.png: Added.
* platform/chromium-mac/fast/table/table-cell-before-after-content-around-table-row-expected.png: Added.
* platform/chromium-mac/fast/table/table-row-before-after-content-around-block-expected.png: Added.
* platform/chromium-mac/fast/table/table-row-before-after-content-around-table-expected.png: Added.
* platform/chromium-win/fast/table/table-cell-before-after-content-around-table-block-expected.png: Added.
* platform/chromium-win/fast/table/table-cell-before-after-content-around-table-expected.png: Added.
* platform/chromium-win/fast/table/table-cell-before-after-content-around-table-row-expected.png: Added.
* platform/chromium-win/fast/table/table-row-before-after-content-around-block-expected.png: Added.
* platform/chromium-win/fast/table/table-row-before-after-content-around-table-expected.png: Added.

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

8 years agoFix crashes when running WebKit1 tests.
andersca@apple.com [Mon, 19 Sep 2011 21:47:01 +0000 (21:47 +0000)]
Fix crashes when running WebKit1 tests.

-[WebView _mustDrawUnionedRect:singleRects:count:] was removed, so just put back the
equivalent code directly into -[WebHTMLView drawRect:].

* WebView/WebHTMLView.mm:
(-[WebHTMLView drawRect:]):
* WebView/WebViewInternal.h:

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

8 years agoUnreviewed, rolling out r95466.
commit-queue@webkit.org [Mon, 19 Sep 2011 21:28:06 +0000 (21:28 +0000)]
Unreviewed, rolling out r95466.
http://trac.webkit.org/changeset/95466
https://bugs.webkit.org/show_bug.cgi?id=68389

Incorrect version of the patch. (Requested by mhahnenberg on
#webkit).

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

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSCell.cpp:
(JSC::JSCell::toPrimitive):
* runtime/JSCell.h:
(JSC::JSCell::JSValue::toPrimitive):
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::toPrimitive):
* runtime/JSNotAnObject.h:
* runtime/JSObject.h:
* runtime/JSString.h:

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

8 years agoRemove the last remains of viewless WebKit1
andersca@apple.com [Mon, 19 Sep 2011 21:25:40 +0000 (21:25 +0000)]
Remove the last remains of viewless WebKit1
https://bugs.webkit.org/show_bug.cgi?id=68388

Reviewed by Darin Adler.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::forceLayoutForNonHTML):
Remove null check.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Remove usesDocumentViews parameter and checks.

(-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]):
Add an assertion that usesDocumentViews is always true.

(-[WebView _isUsingAcceleratedCompositing]):
Remove usesDocumentViews check.

(-[WebView _isSoftwareRenderable]):
Remove usesDocumentViews check.

(-[WebView initWithFrame:frameName:groupName:]):
Remove usesDocumentViews parameter and always pass YES to the _initWithFrame method.

(-[WebView initWithCoder:]):
Remove usesDocumentViews parameter.

(-[WebView _frameViewAtWindowPoint:]):
Remove usesDocumentViews check.

* WebView/WebViewData.h:
Remove usesDocumentViews ivar.

* WebView/WebViewPrivate.h:
Remove usesDocumentViews parameters.

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

8 years ago[Qt][WK2] Make loading errors API easier to use.
alexis.menard@openbossa.org [Mon, 19 Sep 2011 21:09:56 +0000 (21:09 +0000)]
[Qt][WK2] Make loading errors API easier to use.
https://bugs.webkit.org/show_bug.cgi?id=68357

Reviewed by Tor Arne Vestbø.

Make the API to get loading errors easier to use. 95197 introduced
a QJSValue API that is a bit opaque for the client code. Rather than
using a dedicated object, we can just pass the needed information as
parameters of the slot.

* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::loadDidFail):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
(tst_CommonViewTests::loadNonexistentFileUrl):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
(WebViewAbstraction::WebViewAbstraction):
(WebViewAbstraction::touchViewLoadFailed):
(WebViewAbstraction::desktopViewLoadFailed):
* UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loadDidFail):
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::loadDidFail):
* UIProcess/qt/TouchViewInterface.h:
* UIProcess/qt/ViewInterface.h:

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

8 years ago[Chromium] Crash after magic iframe transfer for Pepper/NaCl plugins.
dimich@chromium.org [Mon, 19 Sep 2011 21:05:28 +0000 (21:05 +0000)]
[Chromium] Crash after magic iframe transfer for Pepper/NaCl plugins.
https://bugs.webkit.org/show_bug.cgi?id=68267
Make adoptNode() to not enable live iframe transfer when the iframe's subtree contains plugins.

Reviewed by Adam Barth.

Source/WebCore:

Test: fast/frames/iframe-reparenting-embed-elements.html

* dom/Document.cpp:
(WebCore::Document::adoptNode):
* html/HTMLFrameElementBase.cpp:
(WebCore::hasPluginElements):
(WebCore::HTMLFrameElementBase::canRemainAliveOnRemovalFromTree):
* html/HTMLFrameElementBase.h:

LayoutTests:

* fast/frames/iframe-reparenting-embed-elements-expected.txt: Added.
* fast/frames/iframe-reparenting-embed-elements.html: Added.
* fast/frames/resources/iframe-reparenting-embed-frame1.html: Added.
* fast/frames/resources/iframe-reparenting-embed-iframe.html: Added.

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

8 years agoRemove WebViewEventHandling.mm
andersca@apple.com [Mon, 19 Sep 2011 20:55:48 +0000 (20:55 +0000)]
Remove WebViewEventHandling.mm
https://bugs.webkit.org/show_bug.cgi?id=68387

Reviewed by Adam Roben.

../..:

Remove WebViewEventHandling.mm from the Xcode project.

* WebKit.xcodeproj/project.pbxproj:

../../mac:

WebViewEventHandling.mm was all about event handling in viewless WebKit, so rip it out since
we're getting rid of viewless WebKit1.

* WebView/WebView.mm:
(-[WebView _close]):
* WebView/WebViewData.h:
* WebView/WebViewEventHandling.mm: Removed.
* WebView/WebViewInternal.h:

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

8 years agoRemove -[WebView _selectionChanged] and -[WebView _setTooltip:]
andersca@apple.com [Mon, 19 Sep 2011 20:39:15 +0000 (20:39 +0000)]
Remove -[WebView _selectionChanged] and -[WebView _setTooltip:]
https://bugs.webkit.org/show_bug.cgi?id=68385

Reviewed by Adam Roben.

Move these functions back into the respective clients and remove usesDocumentViews checks.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::setToolTip):
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::respondToChangedSelection):
* WebView/WebView.mm:
* WebView/WebViewEventHandling.mm:
* WebView/WebViewInternal.h:

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

8 years agoRemove toPrimitive from JSCell
mhahnenberg@apple.com [Mon, 19 Sep 2011 20:32:52 +0000 (20:32 +0000)]
Remove toPrimitive from JSCell
https://bugs.webkit.org/show_bug.cgi?id=67875

Reviewed by Geoffrey Garen.

Part of the refactoring process to un-virtualize JSCell.  We move
all of the implicit functionality provided by the virtual toPrimitive method
in JSCell to be explicit in JSValue::toPrimitive and JSCell:toPrimitive while
also de-virtualizing JSCell::toPrimitive.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSCell.cpp:
(JSC::JSCell::toPrimitive):
* runtime/JSCell.h:

We replace JSNotAnObject::toPrimitive with defaultValue, which it overrides from
JSObject.  This pushes the virtual method further down, enabling us to get rid
of the virtual call in JSCell.  Eventually we'll probably have to deal with this
again, but we'll cross that bridge when we come to it.
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::defaultValue):
* runtime/JSNotAnObject.h:
* runtime/JSObject.h:
* runtime/JSString.h:
(JSC::JSValue::toPrimitive):

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

8 years agoBegin removing -[WebView _usesDocumentCalls] from WebView.mm
andersca@apple.com [Mon, 19 Sep 2011 20:27:42 +0000 (20:27 +0000)]
Begin removing -[WebView _usesDocumentCalls] from WebView.mm
https://bugs.webkit.org/show_bug.cgi?id=68383

Reviewed by Adam Roben.

Remove checks and begin assuming that -[WebView _usesDocumentViews] always
returns true, since viewless WebKit1 has been abandoned.

* WebView/WebView.mm:
(-[WebView selectedFrame]):
(-[WebView setHostWindow:]):
(-[WebView acceptsFirstResponder]):
(-[WebView becomeFirstResponder]):
(-[WebView _webcore_effectiveFirstResponder]):
(-[WebView setNextKeyView:]):
(-[WebView setHoverFeedbackSuspended:]):

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

8 years agoSource/WebCore: Issues with merging ruby bases.
inferno@chromium.org [Mon, 19 Sep 2011 20:20:13 +0000 (20:20 +0000)]
Source/WebCore: Issues with merging ruby bases.
https://bugs.webkit.org/show_bug.cgi?id=67240

Reviewed by James Robinson.

1) Change fromBeforeChild to beforeChild to match
webkit rendering naming conventions.
2) Add assert to verify ruby base is indeed emptied
after collecting all children in a single base.
3) Fix condition in mergeBlockChildren to bail out only
when we have no children and there is no work to merge
children to toBase.

Test: fast/ruby/ruby-overhang-crash.html

* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::moveChildren):
(WebCore::RenderRubyBase::moveInlineChildren):
(WebCore::RenderRubyBase::moveBlockChildren):
(WebCore::RenderRubyBase::mergeBlockChildren):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):

LayoutTests: Issues with merging ruby bases.
https://bugs.webkit.org/show_bug.cgi?id=67240

Reviewed by James Robinson.

ASSERTION FAILED: !needsLayout() in RenderRubyRun::getOverhang.

* fast/ruby/ruby-overhang-crash-expected.txt: Added.
* fast/ruby/ruby-overhang-crash.html: Added.

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

8 years agoChild not placed correctly when beforeChild (table part)
inferno@chromium.org [Mon, 19 Sep 2011 20:17:53 +0000 (20:17 +0000)]
Child not placed correctly when beforeChild (table part)
has both :before, :after content.
https://bugs.webkit.org/show_bug.cgi?id=67656

Reviewed by James Robinson.

Source/WebCore:

Tests: fast/table/table-cell-before-after-content-around-table-block.html
       fast/table/table-cell-before-after-content-around-table-row.html
       fast/table/table-cell-before-after-content-around-table.html
       fast/table/table-row-before-after-content-around-block.html
       fast/table/table-row-before-after-content-around-table.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
1. Use the new helper functions findAfterContentRenderer,
   anonymousContainer.
2. Rename anonymousChild to better name - beforeChildAnonymousContainer.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
When adding a new child, if beforeChild is a table part(
Table/TableSection/TableRow), we need to check if both
:before, :after content are shoved in one of the anonymous child.
If yes, we need to split the :before, :after content before adding
newChild. Easiest approach is to destroy the :before content, then add
the newChild and then call updateBeforeAfterContent to recreate the
:before content.
* rendering/RenderObject.h:
(WebCore::RenderObject::findBeforeContentRenderer): same as
beforePseudoElementRenderer, but ignores text childs since they are
sequentially added.
(WebCore::RenderObject::findAfterContentRenderer): same.
(WebCore::RenderObject::anonymousContainer):
(WebCore::objectIsRelayoutBoundary):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild): use the new helpers and functionally
correct functions - findAfterContentRenderer, anonymousContainer. previous
implementation was wrong since it would not go inside, if :after content
is embedded deeper than one level.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild): same.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild): same.

LayoutTests:

* fast/table/table-cell-before-after-content-around-table-block-expected.png: Added.
* fast/table/table-cell-before-after-content-around-table-block-expected.txt: Added.
* fast/table/table-cell-before-after-content-around-table-block.html: Added.
* fast/table/table-cell-before-after-content-around-table-expected.png: Added.
* fast/table/table-cell-before-after-content-around-table-expected.txt: Added.
* fast/table/table-cell-before-after-content-around-table-row-expected.png: Added.
* fast/table/table-cell-before-after-content-around-table-row-expected.txt: Added.
* fast/table/table-cell-before-after-content-around-table-row.html: Added.
* fast/table/table-cell-before-after-content-around-table.html: Added.
* fast/table/table-row-before-after-content-around-block-expected.png: Added.
* fast/table/table-row-before-after-content-around-block-expected.txt: Added.
* fast/table/table-row-before-after-content-around-block.html: Added.
* fast/table/table-row-before-after-content-around-table-expected.png: Added.
* fast/table/table-row-before-after-content-around-table-expected.txt: Added.
* fast/table/table-row-before-after-content-around-table.html: Added.

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

8 years agoRemove calls to -[WebView _usesDocumentViews] from WebFrameLoaderClient.mm
andersca@apple.com [Mon, 19 Sep 2011 20:07:46 +0000 (20:07 +0000)]
Remove calls to -[WebView _usesDocumentViews] from WebFrameLoaderClient.mm
https://bugs.webkit.org/show_bug.cgi?id=68379

Reviewed by Adam Roben.

Remove checks and begin assuming that -[WebView _usesDocumentViews] always
returns true, since viewless WebKit1 has been abandoned.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::hasHTMLView):
(WebFrameLoaderClient::dispatchDidCommitLoad):
(WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebFrameLoaderClient::createFrame):
* WebView/WebFrame.mm:
(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
(-[WebFrame _hasSelection]):
(-[WebFrame _clearSelection]):
(-[WebFrame _shouldFlattenCompositingLayers:]):
(-[WebFrame _dragSourceEndedAt:operation:]):
(-[WebFrame frameView]):

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

8 years agoRemove calls to -[WebView _usesDocumentViews]
andersca@apple.com [Mon, 19 Sep 2011 19:46:42 +0000 (19:46 +0000)]
Remove calls to -[WebView _usesDocumentViews]
https://bugs.webkit.org/show_bug.cgi?id=68377

Reviewed by Adam Roben.

Remove checks and begin assuming that -[WebView _usesDocumentViews] always
returns true, since viewless WebKit1 has been abandoned.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::windowResizerRect):
(WebChromeClient::invalidateContentsAndWindow):
(WebChromeClient::screenToWindow):
(WebChromeClient::windowToScreen):
(WebChromeClient::platformPageClient):
(WebChromeClient::scrollRectIntoView):
(WebChromeClient::print):
* WebView/WebDataSource.mm:
(-[WebDataSource _receivedData:]):

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

8 years agor95385 broke Chromium. Fix it.
aa@chromium.org [Mon, 19 Sep 2011 19:44:18 +0000 (19:44 +0000)]
r95385 broke Chromium. Fix it.
https://bugs.webkit.org/show_bug.cgi?id=68378

Unreviewed, build fix.

* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::didCreateScriptContext):
(WebKit::FrameLoaderClientImpl::willReleaseScriptContext):

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

8 years agoUnreviewed, build fix
jochen@chromium.org [Mon, 19 Sep 2011 19:38:32 +0000 (19:38 +0000)]
Unreviewed, build fix

It's not enough to disable clang plugins.

* gyp_webkit:

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

8 years agoBuild fix.
oliver@apple.com [Mon, 19 Sep 2011 19:33:21 +0000 (19:33 +0000)]
Build fix.

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

8 years ago[chromium] Disable clang when building chromium in WebKit
jochen@chromium.org [Mon, 19 Sep 2011 19:19:47 +0000 (19:19 +0000)]
[chromium] Disable clang when building chromium in WebKit
https://bugs.webkit.org/show_bug.cgi?id=68343

Reviewed by Adam Barth.

* DEPS:
* gyp_webkit:

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

8 years agoRename NewSpace.{h,cpp} to MarkedSpace.{h,cpp}
oliver@apple.com [Mon, 19 Sep 2011 19:14:53 +0000 (19:14 +0000)]
Rename NewSpace.{h,cpp} to MarkedSpace.{h,cpp}
https://bugs.webkit.org/show_bug.cgi?id=68376

Reviewed by Gavin Barraclough.

Renamed the the MarkedSpace files to match new name, and
updated the relevant references.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.h:
* heap/MarkedSpace.cpp: Renamed from Source/JavaScriptCore/heap/NewSpace.cpp.
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::addBlock):
(JSC::MarkedSpace::removeBlock):
(JSC::MarkedSpace::resetAllocator):
(JSC::MarkedSpace::canonicalizeBlocks):
* heap/MarkedSpace.h: Renamed from Source/JavaScriptCore/heap/NewSpace.h.
(JSC::MarkedSpace::waterMark):
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark):
(JSC::MarkedSpace::sizeClassFor):
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::forEachBlock):
(JSC::MarkedSpace::SizeClass::SizeClass):
(JSC::MarkedSpace::SizeClass::resetAllocator):
(JSC::MarkedSpace::SizeClass::canonicalizeBlock):
* runtime/JSCell.h:

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

8 years ago[chromium] Gesture recognizer fires taptype only every other touch
commit-queue@webkit.org [Mon, 19 Sep 2011 19:13:04 +0000 (19:13 +0000)]
[chromium] Gesture recognizer fires taptype only every other touch
down/up sequence https://bugs.webkit.org/show_bug.cgi?id=68368

Patch by Robert Kroeger <rjkroege@chromium.org> on 2011-09-19
Reviewed by Adam Barth.

Source/WebCore:

The addition of doubletap detection to the gesture recognizer missed some of the
outgoing edges in the recognizer state machine. This change simplifies the logic
and handles all outgoing edges.

* platform/chromium/GestureRecognizerChromium.cpp:
(WebCore::GestureRecognizerChromium::GestureRecognizerChromium):
(WebCore::GestureRecognizerChromium::isInSecondClickTimeWindow):
(WebCore::GestureRecognizerChromium::updateValues):
(WebCore::GestureRecognizerChromium::touchDown):
(WebCore::GestureRecognizerChromium::click):
* platform/chromium/GestureRecognizerChromium.h:

Source/WebKit/chromium:

The addition of doubletap detection to the gesture recognizer missed some of the
outgoing edges in the recognizer state machine. Thsi change simplifies the logic
and handles all outgoing edges.

* tests/InnerGestureRecognizerTest.cpp:
Additional tests added to ensure that all edges in the state
machine are accounted for.
(BuildablePlatformTouchEvent::BuildablePlatformTouchEvent):
(SimulateAndTestFirstClick):
(TEST_F):

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

8 years agoFix xssauditor bypass with unterminated closing tag by making the HTMLSourceTracker
commit-queue@webkit.org [Mon, 19 Sep 2011 18:59:21 +0000 (18:59 +0000)]
Fix xssauditor bypass with unterminated closing tag by making the HTMLSourceTracker
and the HTMLParser interact more closely with each other.  HTMLParser should be
setting the end range for the token itself to account for buffering that the
HTMLSourceTracker can't know about, but there are a lot of paths that would need
updating. First step is to cover this one path.
https://bugs.webkit.org/show_bug.cgi?id=68281

Patch by Tom Sepez <tsepez@chromium.org> on 2011-09-19
Reviewed by Adam Barth.

Source/WebCore:

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

* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::end):
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::nextToken):

LayoutTests:

* http/tests/security/xssAuditor/resources/echo-intertag.pl:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag-expected.txt: Added.
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag.html: Added.

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

8 years agoRename NewSpace to MarkedSpace
oliver@apple.com [Mon, 19 Sep 2011 18:54:33 +0000 (18:54 +0000)]
Rename NewSpace to MarkedSpace
https://bugs.webkit.org/show_bug.cgi?id=68375

Reviewed by Gavin Barraclough.

Rename NewSpace to a more accurate name, and update all uses.
This patch doesn't rename the files themselves as that will
just make the patch appear bigger than it is.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* heap/Heap.cpp:
(JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
(JSC::CountFunctor::TakeIfEmpty::operator()):
(JSC::Heap::Heap):
(JSC::Heap::reportExtraMemoryCostSlowCase):
(JSC::Heap::tryAllocate):
(JSC::Heap::allocateSlowCase):
(JSC::Heap::collect):
(JSC::Heap::canonicalizeBlocks):
(JSC::Heap::resetAllocator):
(JSC::Heap::isValidAllocation):
(JSC::Heap::shrink):
* heap/Heap.h:
(JSC::Heap::markedSpace):
(JSC::Heap::sizeClassFor):
(JSC::Heap::allocate):
* heap/NewSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::addBlock):
(JSC::MarkedSpace::removeBlock):
(JSC::MarkedSpace::resetAllocator):
(JSC::MarkedSpace::canonicalizeBlocks):
* heap/NewSpace.h:
(JSC::MarkedSpace::waterMark):
(JSC::MarkedSpace::highWaterMark):
(JSC::MarkedSpace::setHighWaterMark):
(JSC::MarkedSpace::sizeClassFor):
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::forEachBlock):
(JSC::MarkedSpace::SizeClass::SizeClass):
(JSC::MarkedSpace::SizeClass::resetAllocator):
(JSC::MarkedSpace::SizeClass::canonicalizeBlock):
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject):

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

8 years agoTextPosition refactoring: Merge ZeroBasedNumber and OneBasedNumber classes
commit-queue@webkit.org [Mon, 19 Sep 2011 18:45:47 +0000 (18:45 +0000)]
TextPosition refactoring: Merge ZeroBasedNumber and OneBasedNumber classes
https://bugs.webkit.org/show_bug.cgi?id=63541

Patch by Peter Rybin <peter.rybin@gmail.com> on 2011-09-19
Reviewed by Adam Barth.

Source/JavaScriptCore:

* parser/SourceProvider.h:
(JSC::SourceProvider::startPosition):
* wtf/text/TextPosition.h:
(WTF::OrdinalNumber::fromZeroBasedInt):
(WTF::OrdinalNumber::fromOneBasedInt):
(WTF::OrdinalNumber::OrdinalNumber):
(WTF::OrdinalNumber::zeroBasedInt):
(WTF::OrdinalNumber::oneBasedInt):
(WTF::OrdinalNumber::operator==):
(WTF::OrdinalNumber::operator!=):
(WTF::OrdinalNumber::first):
(WTF::OrdinalNumber::beforeFirst):
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):

Source/WebCore:

No new tests because this patch is not changing behavior.

* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::update):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::eventHandlerLineNumber):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::dispatchDidParseSource):
(WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
* bindings/js/StringSourceProvider.h:
(WebCore::StringSourceProvider::create):
(WebCore::StringSourceProvider::startPosition):
(WebCore::StringSourceProvider::StringSourceProvider):
* bindings/v8/ScheduledAction.cpp:
(WebCore::ScheduledAction::ScheduledAction):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::eventHandlerPosition):
* bindings/v8/ScriptController.h:
* bindings/v8/ScriptEventListener.cpp:
(WebCore::createAttributeEventListener):
* bindings/v8/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
(WebCore::ScriptSourceCode::startPosition):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::V8LazyEventListener):
* bindings/v8/V8LazyEventListener.h:
(WebCore::V8LazyEventListener::create):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::compileScript):
(WebCore::V8Proxy::evaluate):
(WebCore::V8Proxy::runScript):
* bindings/v8/V8Proxy.h:
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::evaluate):
(WebCore::WorkerContextExecutionProxy::runScript):
* bindings/v8/WorkerContextExecutionProxy.h:
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* dom/PendingScript.cpp:
(WebCore::PendingScript::releaseElementAndClear):
* dom/PendingScript.h:
(WebCore::PendingScript::PendingScript):
(WebCore::PendingScript::startingPosition):
(WebCore::PendingScript::setStartingPosition):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
* dom/ScriptElement.h:
* dom/ScriptableDocumentParser.h:
* dom/ViewportArguments.cpp:
(WebCore::parserLineNumber):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::lineNumber):
(WebCore::HTMLDocumentParser::textPosition):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLInputStream.h:
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::execute):
(WebCore::HTMLScriptRunner::runScript):
* html/parser/HTMLScriptRunner.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::uninitializedPositionValue1):
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
(WebCore::HTMLTreeBuilder::takeScriptToProcess):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::processScriptStartTag):
* html/parser/HTMLTreeBuilder.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::buildInitiatorObject):
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::currentLine):
(WebCore::SegmentedString::currentColumn):
(WebCore::SegmentedString::setCurrentPosition):
* platform/text/SegmentedString.h:
* svg/SVGDocumentExtensions.cpp:
(WebCore::parserLineNumber):
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::XMLErrors):
(WebCore::XMLErrors::handleError):
(WebCore::XMLErrors::appendErrorMessage):
* xml/XMLErrors.h:
* xml/parser/MarkupTokenizerBase.h:
(WebCore::MarkupTokenizerBase::lineNumber):
* xml/parser/NewXMLDocumentParser.cpp:
(WebCore::NewXMLDocumentParser::processScript):
(WebCore::NewXMLDocumentParser::textPosition):
(WebCore::NewXMLDocumentParser::lineNumber):
* xml/parser/NewXMLDocumentParser.h:
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::pushCurrentNode):
(WebCore::XMLDocumentParser::handleError):
* xml/parser/XMLDocumentParser.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::PendingCallbacks::appendErrorCallback):
(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::doWrite):
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::error):
(WebCore::XMLDocumentParser::lineNumber):
(WebCore::XMLDocumentParser::columnNumber):
(WebCore::XMLDocumentParser::textPosition):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::doWrite):
(WebCore::XMLDocumentParser::doEnd):
(WebCore::XMLDocumentParser::lineNumber):
(WebCore::XMLDocumentParser::columnNumber):
(WebCore::XMLDocumentParser::textPosition):
(WebCore::XMLDocumentParser::parse):
(WebCore::XMLDocumentParser::parseStartElement):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::executeScript):
(WebKit::WebFrameImpl::executeScriptInIsolatedWorld):
(WebKit::WebFrameImpl::executeScriptAndReturnValue):

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

8 years agoSource/JavaScriptCore: JavaScriptCore part of [mac] WebKit contains Objective-C class...
mitz@apple.com [Mon, 19 Sep 2011 18:36:16 +0000 (18:36 +0000)]
Source/JavaScriptCore: JavaScriptCore part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
https://bugs.webkit.org/show_bug.cgi?id=68323

Reviewed by Sam Weinig.

Renamed WTFMainThreadCaller to JSWTFMainThreadCaller.

* wtf/mac/MainThreadMac.mm:
(WTF::initializeMainThreadPlatform):
(WTF::initializeMainThreadToProcessMainThreadPlatform):

Source/WebCore: WebCore part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
https://bugs.webkit.org/show_bug.cgi?id=68323

Reviewed by Sam Weinig.

Renamed AccessibilityObjectWrapper to WebAccessibilityObjectWrapper.
Renamed CascadeList to WebCascadeList.
Renamed CookieStorageObjCAdapter to WebCookieStorageObjCAdapter.
Renamed LanguageChangeObserver to WebLanguageChangeObserver.
Renamed ScrollAnimationHelperDelegate to WebScrollAnimationHelperDelegate.
Renamed ScrollbarPainterControllerDelegate to WebScrollbarPainterControllerDelegate.
Renamed ScrollbarPainterDelegate to WebScrollbarPainterDelegate.
Renamed ScrollbarPartAnimation to WebScrollbarPartAnimation.
Renamed ScrollbarPrefsObserver to WebScrollbarPrefsObserver.

* WebCore.gyp/WebCore.gyp: Updated for the renaming of CascadeList to WebCascadeList.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityObject.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::attachWrapper):
* accessibility/mac/AccessibilityObjectMac.mm:
* accessibility/mac/AccessibilityObjectWrapper.h: Removed.
* accessibility/mac/AccessibilityObjectWrapper.mm: Removed.
* accessibility/mac/WebAccessibilityObjectWrapper.h: Copied from Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.h.
* accessibility/mac/WebAccessibilityObjectWrapper.mm: Copied from Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm.
(convertToNSArray):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
* platform/mac/Language.mm:
(WebCore::platformDefaultLanguage):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
* platform/network/mac/CookieStorageMac.mm:
(WebCore::startObservingCookieChanges):

Source/WebKit: WebKit part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
https://bugs.webkit.org/show_bug.cgi?id=68323

Reviewed by Sam Weinig.

Updated for the renaming of NonBlockingPanel to WebNonBlockingPanel.

* English.lproj/WebJavaScriptTextInputPanel.nib/classes.nib: Removed.
* English.lproj/WebJavaScriptTextInputPanel.nib/designable.nib: Added.
* English.lproj/WebJavaScriptTextInputPanel.nib/info.nib: Removed.
* English.lproj/WebJavaScriptTextInputPanel.nib/keyedobjects.nib:

Source/WebKit/mac: WebKit part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
https://bugs.webkit.org/show_bug.cgi?id=68323

Reviewed by Sam Weinig.

Renamed NonBlockingPanel to WebNonBlockingPanel.
Renamed ThreadEnabler to WebCocoaThreadingEnabler.
Renamed PDFPrefUpdatingProxy to WebPDFPrefUpdatingProxy.

* Misc/WebIconDatabase.mm:
(+[WebCocoaThreadingEnabler enableThreading]):
(importToWebCoreFormat):
* Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
* Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
* Panels/WebAuthenticationPanel.h:
* Panels/WebAuthenticationPanel.m: Renamed NonBlockingPanel to
WebNonBlockingPanel. Because Safari 5.1 uses NonBlockingPanel, this will
cause nightly builds to log an error message when showing the Safari
HTTP authentication sheet and disable the Quit command while the sheet
is disaplyed.
* WebView/WebPDFView.mm:
(-[WebPDFView initWithFrame:]):
(-[WebPDFView _updatePreferencesSoon]):

Source/WebKit2: WebKit2 part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
https://bugs.webkit.org/show_bug.cgi?id=68323

Reviewed by Sam Weinig.

Renamed FullKeyboardAccessWatcher to WKFullKeyboardAccessWatcher.
Renamed AccessibilityWebPageObject to WKAccessibilityWebPageObject.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Removed.
* WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Removed.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/AccessibilityWebPageObject.h.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/AccessibilityWebPageObject.mm.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::accessibilityRemoteObject):
* WebProcess/mac/FullKeyboardAccessWatcher.h: Removed.
* WebProcess/mac/FullKeyboardAccessWatcher.mm: Removed.
* WebProcess/mac/WKFullKeyboardAccessWatcher.h: Copied from Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.h.
* WebProcess/mac/WKFullKeyboardAccessWatcher.mm: Copied from Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.mm.
(+[WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::fullKeyboardAccessEnabled):

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

8 years agoRemove direct property slot pointers from the instruction stream
oliver@apple.com [Mon, 19 Sep 2011 18:30:07 +0000 (18:30 +0000)]
Remove direct property slot pointers from the instruction stream
https://bugs.webkit.org/show_bug.cgi?id=68373

Reviewed by Gavin Barraclough.

Use an indirect load to access prototype properties rather than directly
storing the property address in the instruction stream.  This should allow
further optimisations in future, and also provides a 0.5% win to sunspider.

* dfg/DFGRepatch.cpp:
(JSC::DFG::generateProtoChainAccessStub):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetDirectOffset):
* runtime/JSObject.h:
(JSC::JSObject::addressOfPropertyStorage):

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

8 years agoStyle checker should not check public Qt WK2 API for parameter_name.
alexis.menard@openbossa.org [Mon, 19 Sep 2011 18:29:27 +0000 (18:29 +0000)]
Style checker should not check public Qt WK2 API for parameter_name.
https://bugs.webkit.org/show_bug.cgi?id=68359

Reviewed by Andreas Kling.

The public Qt WK2 APIs have different rules than WebKit for parameters of methods in h files.
Add an exception in the style checker to disable the check. Also added the test for it.

* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checker_unittest.py:

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

8 years agoMove fontDataForCombiningCharacterSequence to fix Skia on Mac build
caryclark@google.com [Mon, 19 Sep 2011 18:27:34 +0000 (18:27 +0000)]
Move fontDataForCombiningCharacterSequence to fix Skia on Mac build
https://bugs.webkit.org/show_bug.cgi?id=68358

Reviewed by Dan Bernstein.

No new tests.

* platform/graphics/mac/FontMac.mm:
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence):
This moves the implementation from FontMac.mm to
FontComplexTextMac.cpp, so it is visible to the Skia on Mac
platform as well.

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

8 years agoGTK DRT leaks memory while comparing history items
commit-queue@webkit.org [Mon, 19 Sep 2011 18:18:56 +0000 (18:18 +0000)]
GTK DRT leaks memory while comparing history items
https://bugs.webkit.org/show_bug.cgi?id=68086

Source/WebKit/gtk:

Patch by Leandro Pereira <leandro@profusion.mobi> on 2011-09-19
Reviewed by Martin Robinson.

webkit_web_history_item_get_target() function returns a g_strdup()'d
string, so it should return "gchar*" instead of "const gchar*".

* webkit/webkitwebhistoryitem.cpp:
(webkit_web_history_item_get_target): Change return type to "gchar*".
* webkit/webkitwebhistoryitemprivate.h: Ditto.

Tools:

Patch by Leandro Pereira <leandro@profusion.mobi> on 2011-09-19
Reviewed by Martin Robinson.

webkit_web_history_item_get_target() returns a g_strdup()'d string,
so memory must be freed before compareHistoryItems() returns.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(compareHistoryItems): Use GOwnPtr to manage memory automatically.

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

8 years agoFix paths used by update-po, and avoid changing directory
commit-queue@webkit.org [Mon, 19 Sep 2011 18:16:24 +0000 (18:16 +0000)]
Fix paths used by update-po, and avoid changing directory
unnecessarily.

[GTK] make update-po is b0rked
https://bugs.webkit.org/show_bug.cgi?id=68352

Patch by Gustavo Noronha Silva <gns@gnome.org> on 2011-09-19
Reviewed by Martin Robinson.

* GNUmakefile.am:

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

8 years ago[Chromium] Rebaseline expectations and file WK68372.
dslomov@google.com [Mon, 19 Sep 2011 18:12:08 +0000 (18:12 +0000)]
[Chromium] Rebaseline expectations and file WK68372.

* platform/chromium/test_expectations.txt:

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

8 years agoBuildbot marks a nrwt bot red when tests are missing results
commit-queue@webkit.org [Mon, 19 Sep 2011 18:03:06 +0000 (18:03 +0000)]
Buildbot marks a nrwt bot red when tests are missing results
https://bugs.webkit.org/show_bug.cgi?id=64812

Patch by Kristóf Kosztyó <kkristof@inf.u-szeged.hu> on 2011-09-19
Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

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

8 years agoSites that use history pushState or replaceState are recorded in history in Private...
jberlin@webkit.org [Mon, 19 Sep 2011 18:00:45 +0000 (18:00 +0000)]
Sites that use history pushState or replaceState are recorded in history in Private Browsing
mode.
https://bugs.webkit.org/show_bug.cgi?id=68208

Reviewed by Brady Eidson.

Source/WebCore:

Test: TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.

Add the privateBrowsingEnabled check that is used in other places in HistoryController
before calling addVisitedLink and FrameLoaderClient::updateGlobalHistory.

* loader/HistoryController.cpp:
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):

Tools:

Add a test that the WKContextDidNavigateWithNavigationDataCallback (which is invoked by
updateGlobalHistory) is not called in Private Browsing when the page does history.pushState.

* TestWebKitAPI/Tests/WebKit2/PrivateBrowsingPushStateNoHistoryCallback.cpp: Added.
(TestWebKitAPI::didNavigateWithNavigationData):
This is a context history client callback, so it should not be called when in Private
Browsing. Add a call to FAIL().
(TestWebKitAPI::didSameDocumentNavigationForFrame):
This is a page load client callback that happens after the didNavigateWithNavigationData
callback. End the test.
(TestWebKitAPI::TEST):
Enable Private Browsing and load a page that uses history.pushState.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Add PrivateBrowsingPushStateNoHistoryCallback.cpp and push-state.html.
* TestWebKitAPI/Tests/WebKit2/push-state.html: Added.
Ditto.
* TestWebKitAPI/win/TestWebKitAPI.vcproj:
Ditto.
* TestWebKitAPI/win/copy-resources.cmd:
Ditto.

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

8 years agoRemove bump allocator
oliver@apple.com [Mon, 19 Sep 2011 17:41:51 +0000 (17:41 +0000)]
Remove bump allocator
https://bugs.webkit.org/show_bug.cgi?id=68370

Reviewed by Sam Weinig.

Can't do anything with this allocator currently, and it's
increasing the complexity of the GC code.  Slight progression
on SunSpider, slight regression (undoing the original progression)
in V8.

* heap/Heap.cpp:
(JSC::Heap::collect):
* heap/Heap.h:
* heap/NewSpace.cpp:
(JSC::NewSpace::NewSpace):
* heap/NewSpace.h:
(JSC::NewSpace::allocate):
* runtime/JSObject.cpp:
(JSC::JSObject::allocatePropertyStorage):
* runtime/JSObject.h:
(JSC::JSObject::~JSObject):
(JSC::JSObject::visitChildrenDirect):
* runtime/StorageBarrier.h:
(JSC::StorageBarrier::set):

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

8 years ago [Chromium] Rebaseline expectations due to r95402.
dslomov@google.com [Mon, 19 Sep 2011 17:34:53 +0000 (17:34 +0000)]
[Chromium] Rebaseline expectations due to r95402.

* platform/chromium-win-vista/fast/dom/navigator-detached-no-crash-expected.txt: Removed.

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

8 years agoUnreviewed: ScrollbarThemeMock.cpp is already referenced in the
leandro@webkit.org [Mon, 19 Sep 2011 17:18:07 +0000 (17:18 +0000)]
Unreviewed: ScrollbarThemeMock.cpp is already referenced in the
global CMakeLists.txt.

* CMakeListsEfl.txt: Remove reference to platform/mock/ScrollbarThemeMock.cpp.
* CMakeListsWinCE.txt: Ditto.

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

8 years ago[Qt] [WK2] Implement popup menus in QDesktopWebView using QComboBox
caio.oliveira@openbossa.org [Mon, 19 Sep 2011 17:14:19 +0000 (17:14 +0000)]
[Qt] [WK2] Implement popup menus in QDesktopWebView using QComboBox
https://bugs.webkit.org/show_bug.cgi?id=67938

Reviewed by Andreas Kling.

Implement a WebPopupMenuProxy that uses QtWebComboBox (a QComboBox subclass we
have for WK1). Then use this WebPopupMenuProxy in QDesktopWebView. The implementation
explicitly avoids running a nested mainloop.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showPopupMenu):
Since we don't run a nested mainloop, we need to keep the client pointer to call
valueChangedForPopupMenu().

* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Added.
(WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
(WebKit::WebPopupMenuProxyQtDesktop::~WebPopupMenuProxyQtDesktop):
(WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
(WebKit::WebPopupMenuProxyQtDesktop::hidePopupMenu):
(WebKit::WebPopupMenuProxyQtDesktop::setSelectedIndex):
(WebKit::WebPopupMenuProxyQtDesktop::onPopupMenuHidden):
(WebKit::WebPopupMenuProxyQtDesktop::populate):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Added.
(WebKit::WebPopupMenuProxyQtDesktop::create):
* UIProcess/qt/qdesktopwebpageproxy.cpp:
(QDesktopWebPageProxy::createPopupMenuProxy):
* UIProcess/qt/qdesktopwebpageproxy.h:
* WebKit2.pro:

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

8 years agoUnreviewed, rolling out r95416.
commit-queue@webkit.org [Mon, 19 Sep 2011 16:40:53 +0000 (16:40 +0000)]
Unreviewed, rolling out r95416.
http://trac.webkit.org/changeset/95416
https://bugs.webkit.org/show_bug.cgi?id=68367

Broke chromium-mac (Requested by beverloo on #webkit).

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

* DEPS:

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

8 years agoUnreviewed skip inspector/timeline/timeline-animation-frame.html on win platform.
loislo@chromium.org [Mon, 19 Sep 2011 16:26:28 +0000 (16:26 +0000)]
Unreviewed skip inspector/timeline/timeline-animation-frame.html on win platform.

* platform/win/Skipped:

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