2009-11-04  Daniel Bates  <dbates@webkit.org>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=30266
        
        Changed data format type from "text" to "text/plain" to pass Chrome tests.

        * fast/events/drag-and-drop-dataTransfer-types-nocrash-expected.txt:
        * fast/events/drag-and-drop-dataTransfer-types-nocrash.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-04  Pavel Heimlich  <tropikhajma@gmail.com>

        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=30647
        Solaris build failure due to strnstr.

        * wtf/StringExtras.h: Enable strnstr on Solaris, too.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need to properly disable applicationCache at runtime
https://bugs.webkit.org/show_bug.cgi?id=30417

Patch by Jenn Braithwaite <jennb@chromium.org> on 2009-11-04
Reviewed by David Levin.

Adding applicationCacheEnabled bit to V8 RuntimeEnabledFeatures.

No new exposed functionality, so no new tests.

* bindings/v8/RuntimeEnabledFeatures.cpp:
* bindings/v8/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
* bindings/v8/custom/V8CustomBinding.h:
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::ACCESSOR_RUNTIME_ENABLER):
* page/DOMWindow.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-04  Alpha Lam  <hclam@chromium.org>

        Reviewed by Eric Carlson.

        Volume slider doesn't have a thumb
        https://bugs.webkit.org/show_bug.cgi?id=31135

        Fixed an incorrect if statement that prevents volume slider
        being updated.

        The statement checks if the slider value equals to the current
        volume value of the media control to avoid updating the volume
        slider. Updating the volume slider control shouldn't be within
        this condition because we explicitly set them to be equals
        during creation of the controls and also when mouse events are
        received on the volume control.

        No new tests because existing code breaks:
        LayoutTests/media/video-volume-slider.html

        It should now start passing on Chromium.

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlVolumeSliderElement::update):
        Update the volume slider regardless of the current volume value
        of the media control.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore: Hang in Mail on attempting to change indent level.
<rdar://problem/7131805>
https://bugs.webkit.org/show_bug.cgi?id=31127

Reviewed by Adele Peterson.

The hang was caused by an infinite loop inside outdentRegion.
The code did not account for the fact that, when a list item
cointains multiple paragraphs, outdent moves all paragraphs at
once, invalidating some of the position we keep track of in the loop.
Some code refactoring has also been done to minimize duplicate code.
        
Test: editing/execCommand/outdent-multiparagraph-list.html

* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::indentRegion): Moved code in common with
outdentRegion to doApply.
(WebCore::IndentOutdentCommand::outdentRegion): Fixed endless loop.
(WebCore::IndentOutdentCommand::doApply): Some code refactoring.
* editing/IndentOutdentCommand.h: Added VisiblePosition parameters to
indentRegion and outdentRegion.

LayoutTests: Hang in Mail on attempting to change indent level
<rdar://problem/7131805>
https://bugs.webkit.org/show_bug.cgi?id=31127
        
Reviewed by Adele Peterson.

Added test to cover all the different code paths.

* editing/execCommand/outdent-multiparagraph-list-expected.txt: Added.
* editing/execCommand/outdent-multiparagraph-list.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.

Reviewed by Sam Weinig.

We do this by having the registerName function return information about the constant if the register
number corresponds to a constant.  This requires that registerName, and several functions that call it,
be converted to member functions of CodeBlock so that the constant value can be retrieved.  The
ExecState also needs to be threaded down through these functions so that it can be passed on to
constantName when needed.

* bytecode/CodeBlock.cpp:
(JSC::constantName):
(JSC::CodeBlock::registerName):
(JSC::CodeBlock::printUnaryOp):
(JSC::CodeBlock::printBinaryOp):
(JSC::CodeBlock::printConditionalJump):
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::printPutByIdOp):
(JSC::CodeBlock::dump):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::isConstantRegisterIndex):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove bogus op_ prefix on dumped version of three opcodes.

Rubber-stamped by Oliver Hunt.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.

Patch by Gavin Barraclough <barraclough@apple.com> on 2009-11-04
Add a missing assert to the ARMv7 JIT.

* assembler/ARMv7Assembler.h:
(JSC::ARMThumbImmediate::ARMThumbImmediate):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rubber Stamped by Oliver Hunt.

Patch by Gavin Barraclough <barraclough@apple.com> on 2009-11-04
Enable native call optimizations on ARMv7.  (Existing ARM_TRADITIONAL
implementation was generic, worked perfectly, just needed turning on).

* jit/JITOpcodes.cpp:
* wtf/Platform.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=31151
Fix branchDouble behaviour on ARM THUMB2 JIT.

Patch by Gavin Barraclough <barraclough@apple.com> on 2009-11-04
Reviewed by Oliver Hunt.

The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
branch on unordered operands.  Similarly, DoubleLessThanOrUnordered &
DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
ARMv7Assembler::ConditionLS, whereas they should be using
ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.

Fix these, and fill out the missing DoubleConditions.

* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::):
(JSC::MacroAssemblerARMv7::branchDouble):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore:

2009-11-02  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Adele Peterson.

        https://bugs.webkit.org/show_bug.cgi?id=25439
        Deleting when in front of a block image removes character from previous paragraph

        Added editing/deleting/25439-{1,2,3}.html

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::mergeParagraphs): Block images, tables and HRs cannot 
        be made inline with other content.  Instead of merging, just move the caret to just before 
        the selection we deleted.
        * editing/htmlediting.cpp:
        (WebCore::firstInSpecialElement): Added a FIXME.  This function begins iterating up from pos.node(), which 
        doesn't necessarily contain pos (suppose pos was [img, 0]).
        (WebCore::lastInSpecialElement): Ditto.
        (WebCore::isRenderedAsNonInlineTableImageOrHR): Moved from visible_units.cpp.  Added a check for non-inline images.
        * editing/htmlediting.h:
        * editing/visible_units.cpp:
        (WebCore::startOfParagraph): Use moved/renamed function.  Removed FIXME.  The problem causing 
        5027702 is now squarely in first/lastInSpecialElement
        (WebCore::endOfParagraph): Ditto.

LayoutTests:

2009-11-03  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Adele Peterson.

        https://bugs.webkit.org/show_bug.cgi?id=25439
        Deleting when in front of a block image removes character from previous paragraph

        * editing/deleting/delete-before-block-image-1-expected.txt: Added.
        * editing/deleting/delete-before-block-image-1.html: Added.
        * editing/deleting/delete-before-block-image-2-expected.txt: Added.
        * editing/deleting/delete-before-block-image-2.html: Added.
        * editing/deleting/delete-before-block-table-expected.txt: Added.
        * editing/deleting/delete-before-block-table.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed typos.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the Web Inspector Timeline panel to better match the mock-up.

https://bugs.webkit.org/show_bug.cgi?id=31150

Reviewed by Pavel Feldman.

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._getRecordDetails):
(WebInspector.TimelinePanel.prototype._dragWindow):
(WebInspector.TimelinePanel.prototype._resizeWindowLeft):
(WebInspector.TimelinePanel.prototype._resizeWindowRight):
(WebInspector.TimelineCategoryTreeElement.prototype.onattach):
(WebInspector.TimelineRecordTreeElement.prototype.onattach):
(WebInspector.TimelineRecordTreeElement.prototype.refresh):
(WebInspector.TimelineCategoryGraph):
* inspector/front-end/inspector.css:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-04  Dan Kegel  <dank@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Fix buffer overrun in WebCore::Page::userStyleSheetLocationChanged()
        https://bugs.webkit.org/show_bug.cgi?id=31138

        Test: LayoutTests/platform/mac/fast/loader/user-stylesheet-fast-path.html in Valgrind

        * page/Page.cpp:
        (WebCore::Page::userStyleSheetLocationChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-04  Mark Mentovai  <mark@chromium.org>

        Reviewed by Mark Rowe.

        Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
        BUILDING_ON_TIGER and BUILDING_ON_LEOPARD.  The TARGETING_ macros
        consider the deployment target; the BUILDING_ON_ macros consider the
        headers being built against.

        * wtf/Platform.h:
2009-11-04  Mark Mentovai  <mark@chromium.org>

        Reviewed by Mark Rowe.

        Separate the difference between HAVE(CGINTERPOLATION_MEDIUM), which
        is true when building on 10.6 or later, and USE(CGINTERPOLATION_MEDIUM)
        which is true when targeting 10.6 or later.

        HAVE(CGINTERPOLATION_MEDIUM) indicates that kCGInterpolationMedium
        is present in the CGInterpolationQuality enum, and must be handled
        by a switch that has cases for each enumerated value.

        USE(CGINTERPOLATION_MEDIUM) indicates that the product will only run
        on 10.6 or later, and that CoreGraphics will understand when
        InterpolationMedium is mapped to kCGInterpolationMedium at runtime.

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setImageInterpolationQuality):
        (WebCore::GraphicsContext::imageInterpolationQuality):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-11-04  Eric Seidel  <eric@webkit.org>

        Reviewed by David Kilzer.

        svn-apply's fixChangeLogPatch function seems broken
        https://bugs.webkit.org/show_bug.cgi?id=30683

        Update fixChangeLogPatch to be able to handle patches which
        don't start at line 1.
        Add unit tests for svn-apply to scm_unittest.py.

        * Scripts/VCSUtils.pm:
        * Scripts/modules/scm_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow custom memory allocation control for WebCore's CachedResource
https://bugs.webkit.org/show_bug.cgi?id=31114

Reviewed by Eric Seidel.

Inherits CachedResource class from Noncopyable because its (its child
class) CachedCSSStyleSheet instantiated by 'new' in WebCore/loader/Cache.cpp:75 
and it is no need to be copyable.

* loader/CachedResource.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed status and progress properties of QGraphicsWebView.
Added loadProgress and statusBarMessage signals instead,
after API review.

Patch by Simon Hausmann <hausmann@webkit.org> on 2009-11-04
Reviewed by Kenneth Christiansen.

* Api/qgraphicswebview.cpp:
(QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
(QGraphicsWebView::setPage):
* Api/qgraphicswebview.h:
* tests/qgraphicswebview/tst_qgraphicswebview.cpp:
(tst_QGraphicsWebView::qgraphicswebview):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added QGraphicsWebView::modified property, for consistency
with QWebView.

Patch by Simon Hausmann <hausmann@webkit.org> on 2009-11-04
Reviewed by Kenneth Christiansen.

* Api/qgraphicswebview.cpp:
(QGraphicsWebView::isModified):
* Api/qgraphicswebview.h:
* tests/qgraphicswebview/tst_qgraphicswebview.cpp:
(tst_QGraphicsWebView::qgraphicswebview):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix enabling of input method support on QGraphicsWebView.
https://bugs.webkit.org/show_bug.cgi?id=30605

Patch by Simon Hausmann <hausmann@webkit.org> on 2009-11-01
Reviewed by Kenneth Christiansen.

Instead of setting the unsupported widget attribute on the
QGraphicsWidget in setInputMethodEnabled() set the
ItemAcceptsInputMethod GraphicsItem flag directly.

Changed the existing input method auto test to run once
on a QWebView and once on a QGraphicsWebView.

* Api/qgraphicswebview.cpp:
(QGraphicsWebViewPrivate::setInputMethodEnabled):
* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::inputMethods_data):
(inputMethodHints):
(inputMethodEnabled):
(tst_QWebPage::inputMethods):

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