webkit-patch apply-attachment does not work when not called from the root of the checkout
https://bugs.webkit.org/show_bug.cgi?id=64751

Unreviewed.  Just updating unit test results after bug 64751.

* Scripts/webkitpy/layout_tests/port/chromium_win.py:
* Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Interpreter build-fix

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add regression tests for legacy color parsing of valid CSS colors
https://bugs.webkit.org/show_bug.cgi?id=64576

Patch by Tab Atkins <jackalmage@gmail.com> on 2011-07-18
Reviewed by Simon Fraser.

* fast/dom/attribute-legacy-colors-expected.txt:
* fast/dom/script-tests/attribute-legacy-colors.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSC GC lazy sweep does not inline the common cases of cell destruction.
https://bugs.webkit.org/show_bug.cgi?id=64745

Patch by Filip Pizlo <fpizlo@apple.com> on 2011-07-18
Reviewed by Oliver Hunt.

This inlines the case of JSFinalObject destruction.

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::lazySweep):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Focus and selection events are not fired when a <select>'s selection
changes
https://bugs.webkit.org/show_bug.cgi?id=64504
<rdar://problem/9319881>

Reviewed by Alice Liu.

Source/WebCore:

Test: platform/win/accessibility/option-element-selection-and-focus-events.html

* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
Add new notification type to the section of unhandled notifications.

* accessibility/AXObjectCache.h:
Declare a new notification, AXMenuListItemSelected.

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
Tell our child popup that the active option changed, and post a
notification that our value changed.

* accessibility/AccessibilityMenuList.h:
Declare didUpdateActiveOption().

* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
Get the child <option> element that is selected, and fire focus and
selection events for it.

* accessibility/AccessibilityMenuListPopup.h:
Declare didUpdateActiveOption().

* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
Map AXMenuListItemSelected -> EVENT_OBJECT_SELECTION.

* dom/SelectElement.cpp:
(WebCore::SelectElement::setSelectedIndex):
Pass the newly-selected index.

* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
Update the initialization list for the renamed m_lastActiveIndex.
(WebCore::RenderMenuList::setTextFromOption):
A new selection has been made in the popup; call
didUpdateActiveOption().
(WebCore::RenderMenuList::didSetSelectedIndex):
Call didUpdateActiveOption(), passing the index of the newly-selected
<option>.
(WebCore::RenderMenuList::didUpdateActiveOption):
If accessibility is disabled, or if the active option has not changed,
return early. Check whether the option index is in the range of list
items, and assert that the item at that index is an <option> element.
Tell the AccessibilityMenuList for this element that we updated the
active option.

* rendering/RenderMenuList.h:
Updated the declaration of didSetSelectedIndex() to take the selected
index. Declared didUpdateActiveOption(). Renamed m_lastSelectedIndex to
m_lastActiveIndex.

Tools:

* DumpRenderTree/AccessibilityController.h:
Added m_notificationsEventHook for addNotificationListener().
m_allEventsHook will now be used for setLogAccessibilityEvents().

* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::AccessibilityController):
Initialize m_notificationsEventHook.
(AccessibilityController::~AccessibilityController):
Turn off logging of all accessibility events. If
m_notificationsEventHook is non-null, unhook it.
(logEventProc):
Add handling of EVENT_OBJECT_SELECTION.
(AccessibilityController::setLogAccessibilityEvents):
If the state of logging is not changing, return early. If we're turning
off logging, unhook m_allEventsHook, and zero it out. Otherwise, add a
hook for all events.
(AccessibilityController::addNotificationListener):
Use m_notificationsEventHook rather than m_allEventsHook.

LayoutTests:

* platform/win/accessibility/option-element-selection-and-focus-events-expected.txt: Added.
* platform/win/accessibility/option-element-selection-and-focus-events.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Load ToT chromium bots by default in the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=64756

Reviewed by Adam Barth.

For now, these are the most useful bots to look at. Eventually,
we may want to load the build.webkit.org bots by default once
most of the bots there upload results.

* TestResultServer/static-dashboards/dashboard_base.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Chromium failing expectations for some font tests; failures are tracked by the bug 64767.

* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prep work for: Crash under WebPage::platformDragEnded when dragging on Mac
https://bugs.webkit.org/show_bug.cgi?id=64766
<rdar://problem/9548174>
        
Reviewed by Darin Adler.

Add a DragClient function that is called when a drag is ended, and call it from DragController::dragEnded.
This isn't used yet, but will be used by WebKit2 on Mac.
        
This patch also cleans up style in DragClient.h.

No change in behavior, no tests needed.

* page/DragClient.h:
(WebCore::DragClient::dragEnded): Stub virtual implementation for now, this will be used by
    WebKit2 on Mac.
* page/DragController.cpp:
(WebCore::DragController::dragEnded): Call DragClient::dragEnded.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a typo.

* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=64678
Fix bugs in Object.prototype this handling.

Reviewed by Oliver Hunt.

Source/JavaScriptCore: 

undefined/null this values should throw TypeErrors, not convert to the global object,
also, to toLocaleString should be calling the ToObject & invoking the object's toString
function, even for values that are already strings.

* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncPropertyIsEnumerable):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):

LayoutTests: 

* fast/js/resources/js-test-pre.js:
    - Updated harness to not call Object.prototype.toString on undefined.
* fast/js/eval-var-decl-expected.txt:
* fast/js/object-prototype-properties-expected.txt: Added.
* fast/js/object-prototype-properties.html: Added.
* fast/js/object-prototype-toLocaleString-expected.txt
* fast/js/script-tests/eval-var-decl.js:
    - Fix test case, calling hasProperty with undefined as the this value should throw.
* fast/js/script-tests/object-prototype-properties.js: Added.
    - Place for test cases for Object.prototype properties; to being with, check that calling these methods on undefined throws!
* fast/js/script-tests/object-prototype-toLocaleString.js:
    - Added test cases for correct behaviour when this is a string primitive.
* sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.1_The_this_Keyword/S11.1.1_A2-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.11_String.prototype.replace/S15.5.4.11_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.12_String.prototype.search/S15.5.4.12_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.13_String.prototype.slice/S15.5.4.13_A1_T3-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_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.15_String.prototype.substring/S15.5.4.15_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.4_String.prototype.charAt/S15.5.4.4_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.5_String.prototype.charCodeAt/S15.5.4.5_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.6_String.prototype.concat/S15.5.4.6_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.7_String.prototype.indexOf/S15.5.4.7_A1_T3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.8_String.prototype.lastIndexOf/S15.5.4.8_A1_T3-expected.txt:
    - These test cases are all incorrect. (See https://bugs.ecmascript.org/show_bug.cgi?id=117).
      We were incorrectly passing 15.5.4.11_String.prototype.replace, this should fail, as the others do.
      All the other 15.5.4 tests were failing & are still failing, but now have a better error message.
      S11.1.1_A2 is also invalid, calling toString() passing undefined as this should throw.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=64760
DFG JIT - Should be able to compile program code.

Reviewed by Geoff Garen.

Add support for op_end, hooks to compile program code in Executable.cpp.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
    - Add support for op_end
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compileBody):
(JSC::DFG::JITCompiler::link):
    - Added, separate out steps of compileFunction.
(JSC::DFG::JITCompiler::compile):
    - Added, compile program code.
(JSC::DFG::JITCompiler::compileFunction):
    - Sections separated out to helper functions.
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::JITCompiler):
    - Added m_exceptionCheckCount.
* runtime/Executable.cpp:
(JSC::tryDFGCompile):
(JSC::tryDFGCompileFunction):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
    - Renamed tryDFGCompile to tryDFGCompileFunction, added tryDFGCompile to compile program code.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG JIT does not optimize strict equality as effectively as the old JIT does.
https://bugs.webkit.org/show_bug.cgi?id=64759

Patch by Filip Pizlo <fpizlo@apple.com> on 2011-07-18
Reviewed by Gavin Barraclough.

This adds a more complete set of strict equality optimizations.  If either
operand is known numeric, then the code reverts to the old style of optimizing
(first try integer comparison).  Otherwise it uses the old JIT's trick of
first simultaneously checking if both operands are either numbers or cells;
if not then a fast path is taken.

* dfg/DFGJITCodeGenerator.cpp:
(JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
(JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::JITCodeGenerator::nonSpeculativeStrictEq):
* dfg/DFGJITCodeGenerator.h:
* dfg/DFGNonSpeculativeJIT.cpp:
(JSC::DFG::NonSpeculativeJIT::compile):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [REGRESSION] Resource preserving fails when frameNavigated event is dispatched on NetworkPanel.
https://bugs.webkit.org/show_bug.cgi?id=64748

Reviewed by Pavel Feldman.

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._frameNavigated):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove drawsUsingCopy now that all ports handle the copying
https://bugs.webkit.org/show_bug.cgi?id=64768
        
Introduced in https://bugs.webkit.org/show_bug.cgi?id=43507, ImageBuffer::drawsUsingCopy
was used to know whether or not an ImageBuffer should be explicitly copied before being
painted into a context (as was used in HTMLCanvasElement::paint). All platforms now
handle the logic of copying or not in their ImageBuffer::draw() implementations, so
drawsUsingCopy() is no longer needed. This patch removes it.

Reviewed by Dan Bernstein.

No new tests; does not affect behavior.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::isAccelerated):
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/qt/ImageBufferQt.cpp:
* platform/graphics/skia/ImageBufferSkia.cpp:
* platform/graphics/wince/ImageBufferWinCE.cpp:
* platform/graphics/wx/ImageBufferWx.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(91209?): fast/css/custom-font-xheight.html is failing on Leopard
https://bugs.webkit.org/show_bug.cgi?id=64767

Reviewed by Sam Weinig.

* platform/graphics/Font.h:
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont): Undo the cascade list optimization on Leopard for custom
fonts, because adding a cascade list apparently breaks the font.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a failing test expectation for object-prototype-properties.html after r91225.

* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Leopard build fix after r91229.

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFont):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-07-18  Dean Jackson  <dino@apple.com>

        https://bugs.webkit.org/show_bug.cgi?id=64742
        Expose WebPreferences for media playback requiring user gestures and inline playback

        Reviewed by Simon Fraser.

        Media playback already tested if it should require user gestures, but
        no setting was ever exposed to clients. Also, some ports only allow media
        playback to be fullscreen, so exposing a new setting for them.

        Two new WebPreferences: MediaPlaybackRequiresUserGesture and
        MediaPlaybackAllowsInline.

    WebCore:

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Examine the new Setting
        for user gestures.
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        * page/Settings.h: Two new settings.
        (WebCore::Settings::setMediaPlaybackRequiresUserGesture):
        (WebCore::Settings::mediaPlaybackRequiresUserGesture):
        (WebCore::Settings::setMediaPlaybackAllowsInline):
        (WebCore::Settings::mediaPlaybackAllowsInline):

    WebKit/mac:

        * WebView/WebPreferenceKeysPrivate.h:
        * WebView/WebPreferences.mm:
        (+[WebPreferences initialize]):
        (-[WebPreferences mediaPlaybackRequiresUserGesture]):
        (-[WebPreferences setMediaPlaybackRequiresUserGesture:]):
        (-[WebPreferences mediaPlaybackAllowsInline]):
        (-[WebPreferences setMediaPlaybackAllowsInline:]):
        * WebView/WebPreferencesPrivate.h:
        * WebView/WebView.mm:
        (-[WebView _preferencesChanged:]):

    WebKit/win:

        * Interfaces/IWebPreferencesPrivate.idl:
        * WebPreferenceKeysPrivate.h:
        * WebPreferences.cpp:
        (WebPreferences::initializeDefaultSettings):
        (WebPreferences::setMediaPlaybackRequiresUserGesture):
        (WebPreferences::mediaPlaybackRequiresUserGesture):
        (WebPreferences::setMediaPlaybackAllowsInline):
        (WebPreferences::mediaPlaybackAllowsInline):
        * WebPreferences.h:
        * WebView.cpp:
        (WebView::notifyPreferencesChanged):

    WebKit2:

        * Shared/WebPreferencesStore.h:
        * UIProcess/API/C/WKPreferences.cpp:
        (WKPreferencesSetMediaPlaybackRequiresUserGesture):
        (WKPreferencesGetMediaPlaybackRequiresUserGesture):
        (WKPreferencesSetMediaPlaybackAllowsInline):
        (WKPreferencesGetMediaPlaybackAllowsInline):
        * UIProcess/API/C/WKPreferencesPrivate.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::updatePreferences):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tab Atkins is not in committers.py (as a non-committer)
https://bugs.webkit.org/show_bug.cgi?id=64770

Patch by Tab Atkins <jackalmage@gmail.com> on 2011-07-18
Reviewed by Eric Seidel.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a failing test expectation for object-prototype-properties.html after r91225.

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2011-07-18

* platform/chromium/test_expectations.txt:



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