1. 18 Sep, 2009 9 commits
    • eric@webkit.org's avatar
      2009-09-18 Fumitoshi Ukai <ukai@chromium.org> · 35738bfb
      eric@webkit.org authored
              Reviewed by Simon Hausmann.
      
              Update Qt build system for Web Socket.
              https://bugs.webkit.org/show_bug.cgi?id=29270
      
              * WebCore.pro:
              * platform/network/qt/SocketStreamError.h: Added.
              * platform/network/qt/SocketStreamHandle.h: Added.
              * platform/network/qt/SocketStreamHandleSoup.cpp: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35738bfb
    • eric.carlson@apple.com's avatar
      2009-09-18 Eric Carlson <eric.carlson@apple.com> · b2498fa7
      eric.carlson@apple.com authored
              Reviewed by Darin Adler.
      
              NULL check HTMLMediaElement::m_playedTimeRanges.
              Fix for https://bugs.webkit.org/show_bug.cgi?id=29494
      
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::addPlayedRange): New. Create m_playedTimeRanges if
              necessary, add range specified.
              (WebCore::HTMLMediaElement::seek): Use addPlayedRange. 
              (WebCore::HTMLMediaElement::played): Use addPlayedRange. Change time comparison 
              to be more readable.
              (WebCore::HTMLMediaElement::updatePlayState): Ditto.
              * html/HTMLMediaElement.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2498fa7
    • weinig@apple.com's avatar
      WebCore: Follow up fix for https://bugs.webkit.org/show_bug.cgi?id=29276 · 8d13417e
      weinig@apple.com authored
      REGRESSION(r48334): WebKit crashes on file select by drag
      
      Reviewed by Adele Peterson.
      
      Don't use Document.elementFromPoint since it returns null if the point
      is outside the viewport.  Instead, just hit test ourselves.
      
      Test: fast/events/drag-file-crash.html
      
      * page/DragController.cpp:
      (WebCore::elementUnderMouse):
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::concludeEditDrag):
      
      LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=29276
      REGRESSION(r48334): WebKit crashes on file select by drag
      
      Reviewed by Adele Peterson.
      
      * fast/events/drag-file-crash-expected.txt: Added.
      * fast/events/drag-file-crash.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d13417e
    • darin@apple.com's avatar
      Fix date on a change log entry. · f93e081e
      darin@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f93e081e
    • darin@apple.com's avatar
      Each wrapped Objective-C object should use a single RuntimeObjectImp · f55539ca
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29351
      rdar://problem/7142294
      
      Patch by Darin Adler <darin@apple.com> on 2009-09-18
      Reviewed by Sam Weinig.
      
      * WebCore.base.exp: Added a newly-needed exported symbol.
      
      * bindings/objc/DOMInternal.h: Eliminated unused
      createWrapperCacheWithIntegerKeys; it has not been needed since the
      RGBColor wrappers were reworked.
      * bindings/objc/DOMInternal.mm: Ditto.
      
      * bridge/objc/objc_instance.h: Made the create function non-inline.
      * bridge/objc/objc_instance.mm:
      (createInstanceWrapperCache): Added. Creates an appropriate map table.
      (ObjcInstance::create): Moved here from header. Uses NSMapGet and
      NSMapInsert to cache the instance in a map table.
      (ObjcInstance::~ObjcInstance): Added a call to NSMapRemove to remove
      the instance from the map table.
      
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtInstance::~QtInstance): Remove unneeded code to remove
      the instance from cachedObjects, which no longer exists.
      (JSC::Bindings::QtInstance::newRuntimeObject): Renamed to overload new
      bottleneck. Caching is now handled by the base class.
      
      * bridge/runtime.cpp:
      (JSC::Bindings::Instance::Instance): Initialize m_runtimeObject to 0.
      (JSC::Bindings::Instance::~Instance): Assert m_runtimeObject is 0.
      (JSC::Bindings::Instance::createRuntimeObject): Use m_runtimeObject
      if it's already set. Set m_runtimeObject and call addRuntimeObject
      if it's not.
      (JSC::Bindings::Instance::newRuntimeObject): Added. Virtual function,
      used only by createRuntimeObject.
      (JSC::Bindings::Instance::willDestroyRuntimeObject): Added.
      Calls removeRuntimeObject and then clears m_runtimeObject.
      (JSC::Bindings::Instance::willInvalidateRuntimeObject): Added.
      Clears m_runtimeObject.
      
      * bridge/runtime.h: Made createRuntimeObject non-virtual. Added
      willDestroyRuntimeObject, willInvalidateRuntimeObject,
      newRuntimeObject, and m_runtimeObject.
      
      * bridge/runtime_object.cpp:
      (JSC::RuntimeObjectImp::RuntimeObjectImp): Removed addRuntimeObject
      call, now handled by caller.
      (JSC::RuntimeObjectImp::~RuntimeObjectImp): Replaced removeRuntimeObject
      call with willDestroyRuntimeObject call; the latter nows calls
      removeRuntimeObject.
      (JSC::RuntimeObjectImp::invalidate): Added willInvalidateRuntimeObject
      call.
      
      * bridge/runtime_object.h: Made invalidate non-virtual.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f55539ca
    • kenneth@webkit.org's avatar
      Make PlatformWindow return something else than PlatformWidget · e8249bf2
      kenneth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=29085
      
      Patch by Kenneth Rohde Christiansen <kenneth@webkit.org> on 2009-09-17
      Reviewed by Simon Hausmann.
      
      WebCore:
      
      Make platformWindow return a PlatformPageClient
      (for now typedef'ed to PlatformWidget)
      
      Also, change the name of platformWindow to platformPageClient()
      
      * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
      (getPangoLayoutForAtk):
      * accessibility/win/AXObjectCacheWin.cpp:
      (WebCore::AXObjectCache::postPlatformNotification):
      (WebCore::AXObjectCache::handleFocusedUIElementChanged):
      * loader/EmptyClients.h:
      (WebCore::EmptyChromeClient::platformPageClient):
      * page/Chrome.cpp:
      (WebCore::Chrome::platformPageClient):
      * page/Chrome.h:
      * page/ChromeClient.h:
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::wheelEvent):
      (WebCore::EventHandler::currentPlatformMouseEvent):
      (WebCore::EventHandler::sendContextMenuEvent):
      (WebCore::EventHandler::eventMayStartDrag):
      * platform/HostWindow.h:
      * platform/Widget.h:
      * platform/gtk/PlatformScreenGtk.cpp:
      (WebCore::getVisual):
      (WebCore::screenRect):
      (WebCore::screenAvailableRect):
      * platform/gtk/PopupMenuGtk.cpp:
      (WebCore::PopupMenu::show):
      * platform/gtk/ScrollViewGtk.cpp:
      (WebCore::ScrollView::platformAddChild):
      (WebCore::ScrollView::platformRemoveChild):
      (WebCore::ScrollView::visibleContentRect):
      * platform/gtk/WidgetGtk.cpp:
      (WebCore::Widget::setFocus):
      (WebCore::Widget::setCursor):
      * platform/qt/PlatformScreenQt.cpp:
      (WebCore::screenDepth):
      (WebCore::screenDepthPerComponent):
      (WebCore::screenIsMonochrome):
      (WebCore::screenRect):
      (WebCore::screenAvailableRect):
      * platform/qt/PopupMenuQt.cpp:
      (WebCore::PopupMenu::show):
      * platform/qt/WidgetQt.cpp:
      (WebCore::Widget::setCursor):
      * platform/win/PlatformScreenWin.cpp:
      (WebCore::monitorInfoForWidget):
      * platform/win/PopupMenuWin.cpp:
      (WebCore::PopupMenu::show):
      (WebCore::PopupMenu::calculatePositionAndSize):
      (WebCore::PopupMenu::wndProc):
      * platform/wx/RenderThemeWx.cpp:
      (WebCore::nativeWindowForRenderObject):
      * platform/wx/ScrollbarThemeWx.cpp:
      (WebCore::ScrollbarThemeWx::paint):
      * plugins/gtk/PluginViewGtk.cpp:
      (WebCore::PluginView::getValue):
      (WebCore::PluginView::forceRedraw):
      (WebCore::PluginView::platformStart):
      * plugins/mac/PluginViewMac.cpp:
      (WebCore::PluginView::platformStart):
      * plugins/qt/PluginViewQt.cpp:
      (WebCore::PluginView::handleKeyboardEvent):
      (WebCore::PluginView::getValue):
      (WebCore::PluginView::platformStart):
      * plugins/win/PluginViewWin.cpp:
      (WebCore::PluginView::getValue):
      (WebCore::PluginView::forceRedraw):
      (WebCore::PluginView::platformStart):
      
      WebKit/gtk:
      
      Reflect the rename of platformWindow and it's return type.
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      (WebKit::ChromeClient::platformPageClient):
      (WebKit::ChromeClient::runOpenPanel):
      * WebCoreSupport/ChromeClientGtk.h:
      * webkit/webkitprivate.cpp:
      (currentToplevelCallback):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_popup_menu_handler):
      
      WebKit/haiku:
      
      Reflect the rename of platformWindow and it's return type.
      
      * WebCoreSupport/ChromeClientHaiku.cpp:
      (WebCore::ChromeClientHaiku::platformPageClient):
      * WebCoreSupport/ChromeClientHaiku.h:
      
      WebKit/mac:
      
      Reflect the rename of platformWindow and it's return type.
      
      * WebCoreSupport/WebChromeClient.h:
      * WebCoreSupport/WebChromeClient.mm:
      (WebChromeClient::platformPageClient):
      
      WebKit/qt:
      
      Reflect the rename of platformWindow and it's return type.
      
      * WebCoreSupport/ChromeClientQt.cpp:
      (WebCore::ChromeClientQt::platformPageClient):
      * WebCoreSupport/ChromeClientQt.h:
      
      WebKit/win:
      
      Reflect the rename of platformWindow and it's return type.
      
      * AccessibleBase.cpp:
      (AccessibleBase::get_accParent):
      * WebCoreSupport/WebChromeClient.cpp:
      (WebChromeClient::platformPageClient):
      * WebCoreSupport/WebChromeClient.h:
      
      WebKit/wx:
      
      Reflect the rename of platformWindow and it's return type.
      
      * WebKitSupport/ChromeClientWx.cpp:
      (WebCore::ChromeClientWx::platformPageClient):
      * WebKitSupport/ChromeClientWx.h:
      * WebKitSupport/EditorClientWx.cpp:
      (WebCore::EditorClientWx::isEditable):
      (WebCore::EditorClientWx::registerCommandForUndo):
      (WebCore::EditorClientWx::registerCommandForRedo):
      (WebCore::EditorClientWx::clearUndoRedoOperations):
      (WebCore::EditorClientWx::canUndo):
      (WebCore::EditorClientWx::canRedo):
      (WebCore::EditorClientWx::undo):
      (WebCore::EditorClientWx::redo):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8249bf2
    • hausmann@webkit.org's avatar
      [Qt] Web inspector UI adjustments specific to the Qt platform: · daa9f964
      hausmann@webkit.org authored
      - Hide the close button
      - Hide the dock button
      - Disable the draggable toolbar
      
      Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com> on 2009-09-18
      Reviewed by Simon Hausmann.
      
      https://bugs.webkit.org/show_bug.cgi?id=29384
      
      * inspector/front-end/inspector.css:
      * inspector/front-end/inspector.js:
      (WebInspector.toolbarDragStart):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      daa9f964
    • hausmann@webkit.org's avatar
      QtWebKit Windows CE compile fixes · 7f26dc14
      hausmann@webkit.org authored
      Patch by Joerg Bornemann <joerg.bornemann@nokia.com> on 2009-09-18
      Reviewed by Simon Hausmann.
      
      Exclude certain pure-WINCE specific code paths from the Qt build.
      
      * platform/graphics/BitmapImage.h:
      * platform/graphics/FontCache.h:
      * platform/graphics/MediaPlayer.cpp:
      * platform/text/TextEncodingRegistry.cpp:
      (WebCore::buildBaseTextCodecMaps):
      (WebCore::extendTextCodecMaps):
      * plugins/PluginView.cpp:
      (WebCore::PluginView::stop): Guard this code block with NETSCAPE_PLUGIN_API as
      the corresponding PluginViewWndProc has the same guard in the header file.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f26dc14
    • eric@webkit.org's avatar
      2009-09-18 Steve Block <steveblock@google.com> · a05aaad4
      eric@webkit.org authored
              Reviewed by Dimitri Glazkov.
      
              Geolocation does not correctly handle Infinity for PositionOptions properties.
              https://bugs.webkit.org/show_bug.cgi?id=29099
      
              * fast/dom/Geolocation/resources/argument-types.js: Modified. Test passing positive and negative Infinity to Geolocation methods.
              * fast/dom/Geolocation/argument-types-expected.txt: Modified. Expected result for above test.
      2009-09-18  Steve Block  <steveblock@google.com>
      
              Reviewed by Dimitri Glazkov.
      
              Geolocation does not correctly handle Infinity for PositionOptions properties.
              https://bugs.webkit.org/show_bug.cgi?id=29099
      
              * bindings/js/JSGeolocationCustom.cpp: Modified.
              (WebCore::createPositionOptions): Modified. If timeout or maximumAge is positive infinity, applies these values as a special case.
              * page/PositionOptions.h: Modified.
              (WebCore::PositionOptions::hasMaximumAge): Added. Determines whether the object has a maximum age.
              (WebCore::PositionOptions::maximumAge): Modified. Asserts that the object has a maximum age.
              (WebCore::PositionOptions::clearMaximumAge): Added. Clears the maximum age.
              (WebCore::PositionOptions::setMaximumAge): Modified. Registers that the maximum age has been set.
              (WebCore::PositionOptions::PositionOptions): Modified. Registers that the maximum age has been set.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a05aaad4
  2. 17 Sep, 2009 21 commits
    • weinig@apple.com's avatar
      Fix for https://bugs.webkit.org/show_bug.cgi?id=29276 · 7c2f4a32
      weinig@apple.com authored
      REGRESSION(r48334): WebKit crashes on file select by drag
      
      Reviewed by Adele Peterson.
      
      Document.elementFromPoint now takes point in client space, not page space.
      
      * page/DragController.cpp:
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::concludeEditDrag):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7c2f4a32
    • ajwong@chromium.org's avatar
      2009-09-17 Albert J. Wong <ajwong@chromium.org> · 85a391e1
      ajwong@chromium.org authored
              Reviewed by David Levin.
      
              Reimplement default media UI for Mac Chromium to match the style
              of the Windows and Linux versions.  Also breaks the dependency
              on the internal wk* functions that were previously used to
              render the media controller widgets.
              https://bugs.webkit.org/show_bug.cgi?id=29161
      
              No media layout tests are currently enabled in Mac Chromium, so
              nothing needs rebaselineing, etc.
      
              This is a recommit of r48438 with a compile fix and merges of
              recent changes to the file.
      
              * css/mediaControlsChromium.css:
              * rendering/RenderThemeChromiumMac.h:
              * rendering/RenderThemeChromiumMac.mm:
              (WebCore::mediaElementParent):
              (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
              (WebCore::mediaSliderThumbImage):
              (WebCore::mediaVolumeSliderThumbImage):
              (WebCore::RenderThemeChromiumMac::paintSliderTrack):
              (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
              (WebCore::RenderThemeChromiumMac::paintMediaButtonInternal):
              (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
              (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
              (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
              (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack):
              (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
              (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb):
              (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
              * rendering/RenderThemeChromiumSkia.cpp:
              (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85a391e1
    • bweinstein@apple.com's avatar
      2009-09-17 Brian Weinstein <bweinstein@apple.com> · e72263c6
      bweinstein@apple.com authored
              Reviewed by Timothy Hatcher.
      
              The Console scope bar should have a divider between All and the other possible
              values (Errors, Warnings, Logs). It will look something like:
              
              All | Errors Warnings Logs.
      
              * inspector/front-end/ConsoleView.js:
              (WebInspector.ConsoleView.createDividerElement):
              (WebInspector.ConsoleView):
              * inspector/front-end/inspector.css:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e72263c6
    • weinig@apple.com's avatar
      Remove additional references to JSVoidCallback which no longer exists. · 8911af2f
      weinig@apple.com authored
      Reviewed by Mark Rowe.
      
      * DerivedSources.cpp:
      * WebCore.vcproj/WebCore.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8911af2f
    • weinig@apple.com's avatar
      Remove commented out onhashchange attribute now that it is implemented. · 9363f63c
      weinig@apple.com authored
      Reviewed by Brady Eidson.
      
      * page/DOMWindow.idl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9363f63c
    • andersca@apple.com's avatar
      WebCore: <rdar://problem/7007541> · 5efc6b59
      andersca@apple.com authored
      CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
              
      Reviewed by Oliver Hunt.
      
      Make RuntimeObjectImp more robust against m_instance being a null (which can happen if an OOP plug-in
      crashes while we're calling into it).
              
      * bridge/runtime_object.cpp:
      (JSC::RuntimeObjectImp::RuntimeObjectImp):
      (JSC::RuntimeObjectImp::~RuntimeObjectImp):
      (JSC::RuntimeObjectImp::invalidate):
      (JSC::RuntimeObjectImp::fallbackObjectGetter):
      (JSC::RuntimeObjectImp::fieldGetter):
      (JSC::RuntimeObjectImp::methodGetter):
      (JSC::RuntimeObjectImp::getOwnPropertySlot):
      (JSC::RuntimeObjectImp::getOwnPropertyDescriptor):
      (JSC::RuntimeObjectImp::put):
      (JSC::RuntimeObjectImp::defaultValue):
      (JSC::RuntimeObjectImp::getCallData):
      (JSC::RuntimeObjectImp::getConstructData):
      (JSC::RuntimeObjectImp::getPropertyNames):
      * bridge/runtime_object.h:
      (JSC::RuntimeObjectImp::getInternalInstance):
      
      WebKit/mac: <rdar://problem/7007541> 
      CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
      
      Reviewed by Oliver Hunt.
      
      Add null checks for m_instanceProxy (It will be null when a plug-in has crashed).
              
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::invoke):
      (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
      (WebKit::ProxyInstance::supportsConstruct):
      (WebKit::ProxyInstance::getPropertyNames):
      (WebKit::ProxyInstance::methodsNamed):
      (WebKit::ProxyInstance::fieldNamed):
      (WebKit::ProxyInstance::fieldValue):
      (WebKit::ProxyInstance::setFieldValue):
      (WebKit::ProxyInstance::invalidate):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5efc6b59
    • eric@webkit.org's avatar
      2009-09-17 Yury Semikhatsky <yurys@chromium.org> · 703a517d
      eric@webkit.org authored
              Reviewed by Timothy Hatcher.
      
              Wrap primitive values (as objects) in InspectorController::wrap.
      
              https://bugs.webkit.org/show_bug.cgi?id=28983
      
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::wrapObject): objects of any type will be wrapped into proxies,
               only object proxies will have objectId.
              * inspector/front-end/ConsoleView.js:
              (WebInspector.ConsoleView.prototype.completions): there is InjectedScript.getCompletionsi
               that accepts an expression and returns possible completions. This way we don't need to wrap
               and unwrap the completions result into a proxy object.
              * inspector/front-end/InjectedScript.js:
              (InjectedScript.getCompletions):
              (InjectedScript.evaluate):
              (InjectedScript._evaluateOn):
              (InjectedScript.createProxyObject):
              * inspector/front-end/InjectedScriptAccess.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      703a517d
    • japhet@chromium.org's avatar
      2009-09-17 Nate Chapin <japhet@chromium.org> · 4404a525
      japhet@chromium.org authored
              Reviewed by Dimitri Glazkov.
      
              Wrap PageTransitionEvents properly for V8's use.
      
              https://bugs.webkit.org/show_bug.cgi?id=29340
      
              Fixes Chromium's failures for LayoutTests/fast/events/pageshow-pagehide.html.
      
              * bindings/v8/V8DOMWrapper.cpp:
              (WebCore::V8DOMWrapper::convertEventToV8Object): Wrap PageTransitionEvents properly.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4404a525
    • simon.fraser@apple.com's avatar
      2009-09-17 Simon Fraser <simon.fraser@apple.com> · f159ab01
      simon.fraser@apple.com authored
              Reviewed by Dave Hyatt.
      
              Hardware-accelerated opacity transition on inline asserts
              https://bugs.webkit.org/show_bug.cgi?id=29342
      
              Remove an erroneous toRenderBox() that could be called on a RenderInline; we can just
              pass an empty size, because the box size is only required for transform animations.
      
              Test: compositing/transitions/opacity-on-inline.html
      
              * rendering/RenderLayerBacking.cpp:
              (WebCore::RenderLayerBacking::startTransition):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f159ab01
    • eric@webkit.org's avatar
      2009-09-17 Adam Barth <abarth@webkit.org> · a0074eea
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              [V8] OwnHandle might get a weak callback after destruction
              https://bugs.webkit.org/show_bug.cgi?id=29172
      
              Be sure to clear out weak reference so we don't get a weak callback
              after we've destructed ourselves.  Also, removed some tricky methods
              that had no clients.
      
              * bindings/v8/OwnHandle.h:
              (WebCore::OwnHandle::clear):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0074eea
    • dglazkov@chromium.org's avatar
      2009-09-17 Dimitri Glazkov <dglazkov@chromium.org> · 02e94c42
      dglazkov@chromium.org authored
              Unreviewed, build fix.
      
              [V8] Partial roll out of http://trac.webkit.org/changeset/48455 to
              fix crashes that started happening in V8Proxy::getEnteredContext().
      
              * bindings/v8/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02e94c42
    • cfleizach@apple.com's avatar
      AX: labels of checkboxes should, when hit-tested, return the checkbox · 3b920269
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29335
      
      Reviewed by Beth Dakin.
      
      WebCore: 
      
      When an accessibility hit test is done and it hits the label of a control element,
      the control element should be returned instead of nothing, since the label
      itself is usually ignored.
      
      Test: accessibility/label-for-control-hittest.html
      
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityObject::correspondingControlForLabelElement):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
      (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
      (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
      * accessibility/AccessibilityRenderObject.h:
      
      LayoutTests: 
      
      * accessibility/label-for-control-hittest-expected.txt: Added.
      * accessibility/label-for-control-hittest.html: Added.
      * platform/gtk/Skipped:
      * platform/win/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b920269
    • dglazkov@chromium.org's avatar
      2009-09-17 Avi Drissman <avi@chromium.org> · 1b42b7eb
      dglazkov@chromium.org authored
              Reviewed by Dimitri Glazkov, build fix.
      
              Change to make RenderThemeChromiumMac compile inside of non PLATFORM(MAC).
              https://bugs.webkit.org/show_bug.cgi?id=29243
      
              Covered by existing tests.
      
              * rendering/RenderThemeChromiumMac.mm:
              (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b42b7eb
    • dglazkov@chromium.org's avatar
      2009-09-17 Dimitri Glazkov <dglazkov@chromium.org> · 2bd9bd3d
      dglazkov@chromium.org authored
              Reviewed by Eric Seidel.
      
              [V8] Accessing properties/methods of an object, created with document.implementation.createDocumentType
              creates nodes that have no document (ScriptExecutionContext), which in turn produces NULL-ref crashes.
              https://bugs.webkit.org/show_bug.cgi?id=26402
      
              Test: fast/dom/DOMImplementation/detached-doctype.html
                    fast/dom/doctype-event-listener-crash.html
      
              * bindings/v8/V8DOMWrapper.cpp:
              (WebCore::V8DOMWrapper::getEventListener): Added an extra NULL-check.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2bd9bd3d
    • mitz@apple.com's avatar
      FontDescription.h includes RenderStyleConstants.h, which violates layering · 0c9a5dda
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29327
      
      Reviewed by Simon Fraser.
      
      * GNUmakefile.am: Added FontSmoothingMode.h.
      * WebCore.gypi: Added FontSmoothingMode.h.
      * WebCore.vcproj/WebCore.vcproj: Added FontSmoothingMode.h.
      * WebCore.xcodeproj/project.pbxproj: Added FontSmoothingMode.h and made
          it a private header.
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the
          font smoothing mode via the font description.
      * css/CSSPrimitiveValueMappings.h: Include FontSmoothingMode.h
      (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Updated for the rename
          of FontSmoothing to FontSmoothingMode.
      (WebCore::CSSPrimitiveValue::operator FontSmoothingMode): Ditto.
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::applyProperty): Get the font smoothing mode
          via the font description.
      * platform/graphics/FontDescription.h: Do not include
          RenderStyleConstants.h.
      (WebCore::FontDescription::fontSmoothing): Updated for the rename of
          FontSmoothing to FontSmoothingMode.
      (WebCore::FontDescription::setFontSmoothing): Ditto.
      * platform/graphics/FontSmoothingMode.h: Added.
      (WebCore::FontSmoothingMode): Moved the FontSmoothing enum from
          RenderStyleConstants here and renamed it to this.
      * rendering/style/RenderStyle.h:
      (WebCore::InheritedFlags::fontSmoothing): Removed this getter, since
          this can be accessed via the font description.
      * rendering/style/RenderStyleConstants.h: Moved the FontSmoothing enum
          from here to FontSmoothingMode.h.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c9a5dda
    • kevino@webkit.org's avatar
      wx 2.9 build fix. · c3f23b6f
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3f23b6f
    • simon.fraser@apple.com's avatar
      2009-09-16 Simon Fraser <simon.fraser@apple.com> · 0416adfb
      simon.fraser@apple.com authored
              Reviewed by Dan Bernstein.
      
              Elements appear behind <video> when they should be in front sometimes
              https://bugs.webkit.org/show_bug.cgi?id=29314
      
              r45598 added logic that tests for overlap with <video> to determine when to throw
              a layer into compositing mode. That logic was incorrect in some cases, and this patch
              fixes it. When testing overlap, the layer needs to be composited iff some previous layer
              is composited (which adds a rect to the overlay map), and there is overlap.
      
              Test: compositing/geometry/video-opacity-overlay.html
      
              * rendering/RenderLayerCompositor.cpp:
              (WebCore::CompositingState::CompositingState):
              (WebCore::RenderLayerCompositor::computeCompositingRequirements):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0416adfb
    • dglazkov@chromium.org's avatar
      2009-09-17 Avi Drissman <avi@google.com> · e765538e
      dglazkov@chromium.org authored
              Reviewed by Darin Fisher.
      
              Update the Chromium Mac theming files (RenderTheme and Theme) to be
              up-to-date.
      
              https://bugs.webkit.org/show_bug.cgi?id=29243
              http://crbug.com/19604
      
              Covered by existing tests.
      
              * WebCore.gypi:
              * platform/chromium/ThemeChromiumMac.h: Added.
              (WebCore::ThemeChromiumMac::ThemeChromiumMac):
              (WebCore::ThemeChromiumMac::~ThemeChromiumMac):
              (WebCore::ThemeChromiumMac::controlRequiresPreWhiteSpace):
              * platform/chromium/ThemeChromiumMac.mm: Added.
              (WebCore::):
              (WebCore::platformTheme):
              (WebCore::controlSizeForFont):
              (WebCore::sizeFromFont):
              (WebCore::setControlSize):
              (WebCore::updateStates):
              (WebCore::inflateRect):
              (WebCore::checkboxSizes):
              (WebCore::checkboxMargins):
              (WebCore::checkboxSize):
              (WebCore::checkbox):
              (WebCore::paintCheckbox):
              (WebCore::radioSizes):
              (WebCore::radioMargins):
              (WebCore::radioSize):
              (WebCore::radio):
              (WebCore::paintRadio):
              (WebCore::buttonSizes):
              (WebCore::buttonMargins):
              (WebCore::button):
              (WebCore::paintButton):
              (WebCore::ThemeChromiumMac::baselinePositionAdjustment):
              (WebCore::ThemeChromiumMac::controlFont):
              (WebCore::ThemeChromiumMac::controlSize):
              (WebCore::ThemeChromiumMac::minimumControlSize):
              (WebCore::ThemeChromiumMac::controlBorder):
              (WebCore::ThemeChromiumMac::controlPadding):
              (WebCore::ThemeChromiumMac::inflateControlPaintRect):
              (WebCore::ThemeChromiumMac::paint):
              * platform/graphics/FloatPoint.h:
              * platform/graphics/FloatRect.h:
              * platform/graphics/FloatSize.h:
              * platform/graphics/IntRect.h:
              * rendering/RenderThemeChromiumMac.h:
              (WebCore::RenderThemeChromiumMac::supportsControlTints):
              (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
              (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
              * rendering/RenderThemeChromiumMac.mm:
              (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
              (-[RTCMFlippedView isFlipped]):
              (-[RTCMFlippedView currentEditor]):
              (WebCore::):
              (WebCore::FlippedView):
              (WebCore::RenderTheme::themeForPage):
              (WebCore::RenderThemeChromiumMac::platformActiveListBoxSelectionForegroundColor):
              (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionForegroundColor):
              (WebCore::RenderThemeChromiumMac::platformInactiveListBoxSelectionBackgroundColor):
              (WebCore::RenderThemeChromiumMac::systemFont):
              (WebCore::convertNSColorToColor):
              (WebCore::menuBackgroundColor):
              (WebCore::RenderThemeChromiumMac::systemColor):
              (WebCore::RenderThemeChromiumMac::isControlStyled):
              (WebCore::RenderThemeChromiumMac::adjustRepaintRect):
              (WebCore::RenderThemeChromiumMac::inflateRect):
              (WebCore::RenderThemeChromiumMac::convertToPaintingRect):
              (WebCore::RenderThemeChromiumMac::setFontFromControlSize):
              (WebCore::RenderThemeChromiumMac::paintTextField):
              (WebCore::RenderThemeChromiumMac::paintCapsLockIndicator):
              (WebCore::RenderThemeChromiumMac::paintTextArea):
              (WebCore::RenderThemeChromiumMac::paintMenuList):
              (WebCore::TopGradientInterpolate):
              (WebCore::BottomGradientInterpolate):
              (WebCore::MainGradientInterpolate):
              (WebCore::TrackGradientInterpolate):
              (WebCore::RenderThemeChromiumMac::paintMenuListButtonGradients):
              (WebCore::RenderThemeChromiumMac::paintMenuListButton):
              (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft):
              (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight):
              (WebCore::RenderThemeChromiumMac::popupInternalPaddingTop):
              (WebCore::RenderThemeChromiumMac::popupInternalPaddingBottom):
              (WebCore::RenderThemeChromiumMac::adjustMenuListButtonStyle):
              (WebCore::RenderThemeChromiumMac::adjustSliderTrackStyle):
              (WebCore::RenderThemeChromiumMac::adjustSliderThumbStyle):
              (WebCore::RenderThemeChromiumMac::paintSliderThumb):
              (WebCore::RenderThemeChromiumMac::paintSearchField):
              (WebCore::RenderThemeChromiumMac::setSearchCellState):
              (WebCore::RenderThemeChromiumMac::adjustSearchFieldStyle):
              (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
              (WebCore::RenderThemeChromiumMac::adjustSearchFieldCancelButtonStyle):
              (WebCore::RenderThemeChromiumMac::adjustSearchFieldDecorationStyle):
              (WebCore::RenderThemeChromiumMac::paintSearchFieldDecoration):
              (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle):
              (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
              (WebCore::RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle):
              (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
              (WebCore::mediaControllerTheme):
              (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize):
              (WebCore::getMediaUIPartStateFlags):
              (WebCore::getUnzoomedRectAndAdjustCurrentContext):
              (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton):
              (WebCore::RenderThemeChromiumMac::paintMediaMuteButton):
              (WebCore::RenderThemeChromiumMac::paintMediaPlayButton):
              (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton):
              (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton):
              (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack):
              (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb):
              (WebCore::RenderThemeChromiumMac::paintMediaRewindButton):
              (WebCore::RenderThemeChromiumMac::paintMediaReturnToRealtimeButton):
              (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground):
              (WebCore::RenderThemeChromiumMac::paintMediaCurrentTime):
              (WebCore::RenderThemeChromiumMac::paintMediaTimeRemaining):
              (WebCore::RenderThemeChromiumMac::extraMediaControlsStyleSheet):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e765538e
    • abarth@webkit.org's avatar
      2009-09-16 Daniel Bates <dbates@webkit.org> · b407e41b
      abarth@webkit.org authored
              Reviewed by Darin Adler.
      
              https://bugs.webkit.org/show_bug.cgi?id=29306
      
              Tests that scripts with accented characters do not bypass the XSSAuditor.
      
              * http/tests/security/xssAuditor/img-onerror-accented-char-expected.txt: Added.
              * http/tests/security/xssAuditor/img-onerror-accented-char.html: Added.
      2009-09-16  Daniel Bates  <dbates@webkit.org>
      
              Reviewed by Darin Adler.
      
              https://bugs.webkit.org/show_bug.cgi?id=29306
      
              Fixes an issue where an attack that contains accented characters can
              bypass the XSSAuditor.
      
              XSSAuditor::decodeURL used the wrong length for the input string.
              When the input string was decoded, the decoded result was truncated.
              Hence, XSSAuditor was comparing the source code of the script to the
              truncated input parameters.
      
              Test: http/tests/security/xssAuditor/img-onerror-accented-char.html
      
              * page/XSSAuditor.cpp:
              (WebCore::XSSAuditor::decodeURL):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b407e41b
    • beidson@apple.com's avatar
      Explore allowing pages with unload handlers into the Page Cache · 0f8529a9
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29021
      
      Reviewed by Sam Weinig.
      
      No new tests. (All previous tests continue to pass)
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::stopLoading): If the document is in the page cache, don't fire the unload event.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f8529a9
    • abarth@webkit.org's avatar
      2009-09-16 Adam Barth <abarth@webkit.org> · bec44e31
      abarth@webkit.org authored
              Reviewed by Dimitri Glazkov.
      
              [V8] Teach ScheduledAction::execute about isolated worlds
              https://bugs.webkit.org/show_bug.cgi?id=27703
      
              We now save a handle to the original context.  We use that handle to
              call the timeout in the right context / world.
      
              Tests: http/tests/security/isolatedWorld/window-setTimeout-function.html
                     http/tests/security/isolatedWorld/window-setTimeout-string.html
      
              * bindings/v8/ScheduledAction.cpp:
              (WebCore::ScheduledAction::ScheduledAction):
              (WebCore::ScheduledAction::execute):
              * bindings/v8/ScheduledAction.h:
              (WebCore::ScheduledAction::ScheduledAction):
              * bindings/v8/custom/V8DOMWindowCustom.cpp:
              (WebCore::V8Custom::WindowSetTimeoutImpl):
              * bindings/v8/custom/V8WorkerContextCustom.cpp:
              (WebCore::SetTimeoutOrInterval):
      2009-09-16  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Dimitri Glazkov.
      
              [V8] Teach ScheduledAction::execute about isolated worlds
              https://bugs.webkit.org/show_bug.cgi?id=27703
      
              Add test coverage for the interaction between setTimeout and isolated
              worlds.
      
              * http/tests/security/isolatedWorld/window-setTimeout-function-expected.txt: Added.
              * http/tests/security/isolatedWorld/window-setTimeout-function.html: Added.
              * http/tests/security/isolatedWorld/window-setTimeout-string-expected.txt: Added.
              * http/tests/security/isolatedWorld/window-setTimeout-string.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bec44e31
  3. 16 Sep, 2009 10 commits
    • weinig@apple.com's avatar
      Add some groups to the xcode project to make the bindings/js/ group · 5241943a
      weinig@apple.com authored
      a little nicer.
      
      Reviewed by Anders Carlsson.
      
      * WebCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5241943a
    • weinig@apple.com's avatar
      Fix for https://bugs.webkit.org/show_bug.cgi?id=29320 · 2c28eb64
      weinig@apple.com authored
      JS callback objects should store the global object
      
      Reviewed by Anders Carlsson.
      
      This just changes the callback objects to store the global object instead
      of the frame. A follow up patch will change them to store the 'current' 
      global object instead of the lexical or dynamic.
      
      * DerivedSources.make: Remove unused VoidCallback.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * bindings/js/JSCustomPositionCallback.cpp:
      (WebCore::JSCustomPositionCallback::JSCustomPositionCallback):
      (WebCore::JSCustomPositionCallback::handleEvent):
      * bindings/js/JSCustomPositionCallback.h:
      (WebCore::JSCustomPositionCallback::create):
      * bindings/js/JSCustomPositionErrorCallback.cpp:
      (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback):
      (WebCore::JSCustomPositionErrorCallback::handleEvent):
      * bindings/js/JSCustomPositionErrorCallback.h:
      (WebCore::JSCustomPositionErrorCallback::create):
      * bindings/js/JSCustomSQLStatementCallback.cpp:
      (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
      (WebCore::JSCustomSQLStatementCallback::handleEvent):
      * bindings/js/JSCustomSQLStatementCallback.h:
      (WebCore::JSCustomSQLStatementCallback::create):
      * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
      (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
      (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
      * bindings/js/JSCustomSQLStatementErrorCallback.h:
      (WebCore::JSCustomSQLStatementErrorCallback::create):
      * bindings/js/JSCustomSQLTransactionCallback.cpp:
      (WebCore::JSCustomSQLTransactionCallback::Data::Data):
      (WebCore::JSCustomSQLTransactionCallback::Data::globalObject):
      (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
      (WebCore::JSCustomSQLTransactionCallback::handleEvent):
      * bindings/js/JSCustomSQLTransactionCallback.h:
      (WebCore::JSCustomSQLTransactionCallback::create):
      * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
      (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
      (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
      * bindings/js/JSCustomSQLTransactionErrorCallback.h:
      (WebCore::JSCustomSQLTransactionErrorCallback::create):
      * bindings/js/JSCustomVoidCallback.cpp:
      (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
      (WebCore::JSCustomVoidCallback::handleEvent):
      * bindings/js/JSCustomVoidCallback.h:
      (WebCore::JSCustomVoidCallback::create):
      * bindings/js/JSDatabaseCustom.cpp:
      (WebCore::JSDatabase::changeVersion):
      (WebCore::createTransaction):
      (WebCore::JSDatabase::transaction):
      (WebCore::JSDatabase::readTransaction):
      * bindings/js/JSGeolocationCustom.cpp:
      (WebCore::createPositionCallback):
      (WebCore::createPositionErrorCallback):
      (WebCore::JSGeolocation::getCurrentPosition):
      (WebCore::JSGeolocation::watchPosition):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2c28eb64
    • brettw@chromium.org's avatar
      Revert "2009-09-16 Albert J. Wong <ajwong@chromium.org>" · 81deb684
      brettw@chromium.org authored
      This change did not compile.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81deb684
    • eric@webkit.org's avatar
      2009-09-15 Kent Tamura <tkent@chromium.org> · e2353175
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              <input maxlength=> should restrict only values specified by users.
              https://bugs.webkit.org/show_bug.cgi?id=21271
      
              * fast/forms/input-appearance-maxlength-expected.txt:
              * fast/forms/input-appearance-maxlength.html:
              * fast/forms/input-maxlength-expected.txt:
              * fast/forms/input-maxlength.html:
              * fast/forms/input-text-maxlength-expected.txt: Added.
              * fast/forms/input-text-maxlength.html:
              * fast/forms/input-text-paste-maxlength-expected.txt: Added.
              * fast/forms/input-text-paste-maxlength.html:
              * platform/mac-leopard/fast/forms/input-text-maxlength-expected.checksum: Removed.
              * platform/mac-leopard/fast/forms/input-text-maxlength-expected.png: Removed.
              * platform/mac-leopard/fast/forms/input-text-maxlength-expected.txt: Removed.
              * platform/mac-leopard/fast/forms/input-text-paste-maxlength-expected.checksum: Removed.
              * platform/mac-leopard/fast/forms/input-text-paste-maxlength-expected.png: Removed.
              * platform/mac-leopard/fast/forms/input-text-paste-maxlength-expected.txt: Removed.
              * platform/mac/fast/forms/input-text-maxlength-expected.txt: Removed.
              * platform/mac/fast/forms/input-text-paste-maxlength-expected.txt: Removed.
              * platform/qt/fast/forms/input-text-maxlength-expected.txt: Removed.
              * platform/qt/fast/forms/input-text-paste-maxlength-expected.txt: Removed.
              * platform/win/fast/forms/input-text-maxlength-expected.txt: Removed.
              * platform/win/fast/forms/input-text-paste-maxlength-expected.txt: Removed.
      2009-09-15  Kent Tamura  <tkent@chromium.org>
      
              Reviewed by Eric Seidel.
      
              <input maxlength=> should restrict only values specified by users.
              https://bugs.webkit.org/show_bug.cgi?id=21271
      
              * dom/InputElement.cpp:
              (WebCore::InputElement::setValueFromRenderer):
              (WebCore::InputElement::sanitizeValue):
              (WebCore::InputElement::sanitizeUserInputValue): Rename from constrainValue().
              (WebCore::InputElement::handleBeforeTextInsertedEvent):
              (WebCore::InputElement::updateValueIfNeeded):
              * dom/InputElement.h:
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::setInputType):
              (WebCore::HTMLInputElement::value):
              (WebCore::HTMLInputElement::setValue):
              (WebCore::HTMLInputElement::sanitizeValue):
              * html/HTMLInputElement.h:
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
              * wml/WMLInputElement.cpp:
              (WebCore::WMLInputElement::constrainValue):
              * wml/WMLInputElement.h:
              (WebCore::WMLInputElement::sanitizeValue):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2353175
    • eric@webkit.org's avatar
      2009-09-16 Enrica Casucci <enrica@apple.com> · 0772608c
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Reorganizing helper functions in htmlediting.h to group them by type of object they return/operate upon.
              https://bugs.webkit.org/show_bug.cgi?id=29319
      
              * editing/IndentOutdentCommand.cpp:
              Removed implementation of isAtUnsplittableElement.
      
              * editing/IndentOutdentCommand.h:
              Removed member function isAtUnsplittableElement, because it was not class specific and belonged logically among the helper functions.
      
              * editing/htmlediting.cpp:
              (WebCore::isAtUnsplittableElement): added. The code was taken from IndentOutdentCommand.
      
              * editing/htmlediting.h:
              Reordered functions to group them by type of object returned or operate upon.
              Added comments.
              Added isAtUnsplittableElement declaration.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0772608c
    • ggaren@apple.com's avatar
      WebCore: Removed some vestigial and potentially crashy code that makes consolidating · 2984d4f5
      ggaren@apple.com authored
      event listeners hard.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-16
      Reviewed by Sam Weinig and Anders Carlsson.
      
      * dom/Node.cpp:
      (WebCore::Node::addEventListener): No need to limit when event listeners
      can be added. Other EventTargets don't do this.
              
      Also, check for null when accessing document(). Technically, the JS bindings
      do this check for us, but let's not rely on that.
      
      LayoutTests: Added a test for a potential crash when adding an event listener to a
      doctype node.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-16
      Reviewed by Sam Weinig.
      
      * fast/dom/doctype-event-listener-crash-expected.txt: Added.
      * fast/dom/doctype-event-listener-crash.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2984d4f5
    • andersca@apple.com's avatar
      <rdar://problem/7155710> · f62d0642
      andersca@apple.com authored
      HTML selects on windows cause containing window to become inactive when opened
              
      Reviewed by Adam Roben.
      
      Redo the way we handle events when a popup menu is shown, based on
      http://blogs.msdn.com/oldnewthing/archive/2004/08/20/217684.aspx
              
      Since a non-active window can't capture the mouse, we use the owning window 
      (the WebView) as the capture window. We then run a recursive message pump that 
      forwards all mouse and keyboard events to the popup menu.
              
      * platform/PopupMenu.h:
      * platform/win/PopupMenuWin.cpp:
      (WebCore::PopupMenu::PopupMenu):
      (WebCore::PopupMenu::show):
      (WebCore::PopupMenu::hide):
      (WebCore::PopupMenu::wndProc):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f62d0642
    • mitz@apple.com's avatar
      Speculative fix for · 5cc5c844
      mitz@apple.com authored
      <rdar://problem/6937089> Crashes at RenderWidget::destroy()
      
      Reviewed by Ada Chan.
      
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::destroy): Avoid calling renderArena() if node()
      is null. Add two assertions that can help determine how this crash
      happens (in particular, whether node() becomes null during destroy() or
      it is null before destroy() is called).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5cc5c844
    • bdakin@apple.com's avatar
      Speculative build fix. · 8dbaf133
      bdakin@apple.com authored
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::applyProperty):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8dbaf133
    • bdakin@apple.com's avatar
      WebCore: Fix for <rdar://problem/7083741> Implement a CSS extension to · cd4dd27a
      bdakin@apple.com authored
      adjust sub-pixel anti-aliasing for text
      -and corresponding-
      https://bugs.webkit.org/show_bug.cgi?id=29291
      
      Reviewed by Darin Adler.
      
      Added tests:
      * fast/css/font-smoothing.html: Added.
      * fast/css/parsing-webkit-font-smoothing.html: Added.
      
      This patch adds a new CSS property called -webkit-font-smoothing 
      that accepts the following as valid input: auto | none | 
      antialiased | subpixel-antialiased
      
      Return appropriate computed style for -webkit-font-smoothing
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::):
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      
      Add a case for CSSPropertyWebkitFontSmoothing, and accept valid 
      input.
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseValue):
      
      Add mappings for FontSmoothing to the right CSS values.
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
      (WebCore::CSSPrimitiveValue::operator FontSmoothing):
      
      Add -webkit-font-smoothing
      * css/CSSPropertyNames.in:
      
      Set fontSmoothing on the FontDescription.
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::applyProperty):
      
      Add antialiased and subpixel-antialiased as possible new CSS 
      values.
      * css/CSSValueKeywords.in:
      Store the font smoothing CSS value in the FontDescription.
      * platform/graphics/FontDescription.h:
      (WebCore::FontDescription::FontDescription):
      (WebCore::FontDescription::fontSmoothing):
      (WebCore::FontDescription::setFontSmoothing):
      (WebCore::FontDescription::operator==):
      
      Call setShouldAntialias() and setShouldUseSmoothing() appropriately 
      based on the CSS fontSmoothing() value.
      * platform/graphics/mac/FontMac.mm:
      (WebCore::Font::drawGlyphs):
      * platform/graphics/win/FontCGWin.cpp:
      (WebCore::Font::drawGlyphs):
      
      New function fontSmoothing()
      * rendering/style/RenderStyle.h:
      (WebCore::InheritedFlags::fontSmoothing):
      
      New enum FontSmoothing.
      * rendering/style/RenderStyleConstants.h:
      (WebCore::):
      
      LayoutTests: Tests for <rdar://problem/7083741> Implement a CSS extension to 
      adjust sub-pixel anti-aliasing for text
      
      Reviewed by Darin Adler.
      
      New tests:
      * fast/css/font-smoothing.html: Added.
      * fast/css/parsing-webkit-font-smoothing-expected.txt: Added.
      * fast/css/parsing-webkit-font-smoothing.html: Added.
      * fast/css/resources/parsing-webkit-font-smoothing.js: Added.
      (test):
      * platform/mac/fast/css/font-smoothing-expected.checksum: Added.
      * platform/mac/fast/css/font-smoothing-expected.png: Added.
      * platform/mac/fast/css/font-smoothing-expected.txt: Added.
      
      These tests have updated results now that -webkit-font-smoothing is 
      reported with computed style.
      * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
      * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
      * svg/css/getComputedStyle-basic-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd4dd27a