1. 28 Nov, 2007 4 commits
    • mjs@apple.com's avatar
      JavaScriptCore: · d342e879
      mjs@apple.com authored
              Reviewed by Darin and Geoff.
      
              - Fixed "Stack overflow crash in JavaScript garbage collector mark pass"
              http://bugs.webkit.org/show_bug.cgi?id=12216
              
              Implement mark stack. This version is not suitable for prime time because it makes a
              huge allocation on every collect, and potentially makes marking of detached subtrees
              slow. But it is an 0.4% SunSpider speedup even without much tweaking.
              
              The basic approach is to replace mark() methods with
              markChildren(MarkStack&) methods. Reachable references are pushed
              onto a mark stack (which encapsulates ignoring already-marked
              references). 
              
              Objects are no longer responsible for actually setting their own
              mark bits, the collector does that. This means that for objects on
              the number heap we don't have to call markChildren() at all since
              we know there aren't any.
              
              The mark phase of collect pushes roots onto the mark stack
              and drains it as often as possible.
              
              To make this approach viable requires a constant-size mark stack
              and a slow fallback approach for when the stack size is exceeded,
              plus optimizations to make the required stack small in common
              cases. This should be doable.
      
              * JavaScriptCore.exp: Export new symbols.
              * JavaScriptCore.xcodeproj/project.pbxproj: Add new file.
              * kjs/collector.cpp:
              (KJS::Collector::heapAllocate):
              (KJS::drainMarkStack): Helper for all of the below.
              (KJS::Collector::markStackObjectsConservatively): Use mark stack.
              (KJS::Collector::markCurrentThreadConservatively): ditto
              (KJS::Collector::markOtherThreadConservatively): ditto
              (KJS::Collector::markProtectedObjects): ditto
              (KJS::Collector::markMainThreadOnlyObjects): ditto
              (KJS::Collector::collect): ditto
              * kjs/collector.h:
              (KJS::Collector::cellMayHaveRefs): Helper for MarkStack.
      
              * kjs/MarkStack.h: Added. The actual mark stack implementation.
              (KJS::MarkStack::push):
              (KJS::MarkStack::pushAtom):
              (KJS::MarkStack::pop):
              (KJS::MarkStack::isEmpty):
              (KJS::MarkStack::reserveCapacity):
      
              Changed mark() methods to markChildren() methods:
              
              * kjs/ExecState.cpp:
              (KJS::ExecState::markChildren):
              * kjs/ExecState.h:
              * kjs/JSWrapperObject.cpp:
              (KJS::JSWrapperObject::markChildren):
              * kjs/JSWrapperObject.h:
              * kjs/array_instance.cpp:
              (KJS::ArrayInstance::markChildren):
              * kjs/array_instance.h:
              * kjs/bool_object.cpp:
              (BooleanInstance::markChildren):
              * kjs/bool_object.h:
              * kjs/error_object.cpp:
              * kjs/error_object.h:
              * kjs/function.cpp:
              (KJS::FunctionImp::markChildren):
              (KJS::Arguments::Arguments):
              (KJS::Arguments::markChildren):
              (KJS::ActivationImp::markChildren):
              * kjs/function.h:
              * kjs/internal.cpp:
              (KJS::GetterSetterImp::markChildren):
              * kjs/interpreter.cpp:
              (KJS::Interpreter::markRoots):
              * kjs/interpreter.h:
              * kjs/list.cpp:
              (KJS::List::markProtectedListsSlowCase):
              * kjs/list.h:
              (KJS::List::markProtectedLists):
              * kjs/object.cpp:
              (KJS::JSObject::markChildren):
              * kjs/object.h:
              (KJS::ScopeChain::markChildren):
              * kjs/property_map.cpp:
              (KJS::PropertyMap::markChildren):
              * kjs/property_map.h:
              * kjs/scope_chain.h:
              * kjs/string_object.cpp:
              (KJS::StringInstance::markChildren):
              * kjs/string_object.h:
      
      JavaScriptGlue:
      
              Reviewed by Darin and Geoff.
      
              Fixups for JavaScriptCore mark stack.
      
              * JSObject.cpp:
              (JSUserObject::Mark):
              * JSObject.h:
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectMark):
              * JSValueWrapper.h:
              * UserObjectImp.cpp:
              * UserObjectImp.h:
      
      WebCore:
      
              Reviewed by Darin and Geoff.
      
              Implement mark stack. This version is not suitable for prime time because it makes a
              huge allocation on every collect, and potentially makes marking of detached subtrees
              slow. But it is a .2% - .4% speedup even without much tweaking.
      
              I replaced mark() methods with markChildren() as usual. One
              optimization that is lost is avoiding walking detached DOM
              subtrees more than once to mark them; since marking is not
              recursive there's no obvious way to bracket operation on the tree
              any more.
      
              * bindings/js/JSDocumentCustom.cpp:
              (WebCore::JSDocument::markChildren):
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::markChildren):
              * bindings/js/JSNodeFilterCondition.cpp:
              * bindings/js/JSNodeFilterCondition.h:
              * bindings/js/JSNodeFilterCustom.cpp:
              (WebCore::JSNodeFilter::markChildren):
              * bindings/js/JSNodeIteratorCustom.cpp:
              (WebCore::JSNodeIterator::markChildren):
              * bindings/js/JSTreeWalkerCustom.cpp:
              (WebCore::JSTreeWalker::markChildren):
              * bindings/js/JSXMLHttpRequest.cpp:
              (KJS::JSXMLHttpRequest::markChildren):
              * bindings/js/JSXMLHttpRequest.h:
              * bindings/js/kjs_binding.cpp:
              (KJS::ScriptInterpreter::markDOMNodesForDocument):
              * bindings/js/kjs_binding.h:
              * bindings/js/kjs_events.cpp:
              (WebCore::JSUnprotectedEventListener::markChildren):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_window.cpp:
              (KJS::Window::markChildren):
              * bindings/js/kjs_window.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Node.cpp:
              (WebCore::Node::Node):
              * dom/Node.h:
              * dom/NodeFilter.h:
              * dom/NodeFilterCondition.h:
      
      LayoutTests:
      
              Not reviewed.
              
              - Test cases for "Stack overflow crash in JavaScript garbage collector mark pass"
              http://bugs.webkit.org/show_bug.cgi?id=12216
      
              I have fixed this with the mark stack work.
              
              * fast/js/gc-breadth-2-expected.txt: Added.
              * fast/js/gc-breadth-2.html: Added.
              * fast/js/gc-breadth-expected.txt: Added.
              * fast/js/gc-breadth.html: Added.
              * fast/js/gc-depth-expected.txt: Added.
              * fast/js/gc-depth.html: Added.
              * fast/js/resources/gc-breadth-2.js: Added.
              * fast/js/resources/gc-breadth.js: Added.
              * fast/js/resources/gc-depth.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d342e879
    • mjs@apple.com's avatar
      Not reviewer for this patch. · 61a95a0d
      mjs@apple.com authored
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61a95a0d
    • mitz@apple.com's avatar
      Reviewed by Maciej Stachowiak. · 08d5b62b
      mitz@apple.com authored
              - fix <rdar://problem/5596160> fast/events/objc-event-api.html fails when run alone (or first)
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView setDataSource:]): This method calls addMouseMovedObserver
              because addMouseMovedObserver returns early if the dataSource
              is not nil. But if the dataSource is already set (which happens when
              a WebHTMLView is being reused) then addMouseMovedObserver must not
              be called again.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08d5b62b
    • alp@webkit.org's avatar
      2007-11-27 Alp Toker <alp@atoker.com> · 385c46bd
      alp@webkit.org authored
              Reviewed by Mark Rowe.
      
              Install the JavaScriptCore headers as part of the GTK+ port.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      385c46bd
  2. 27 Nov, 2007 33 commits
    • bdakin@apple.com's avatar
      WebCore: · df26720b
      bdakin@apple.com authored
              Reviewed by Oliver.
      
              Fix for <rdar://problem/5616052> SVGs with width or height of 100% 
              hang when used as a background-image (16164)
      
              * platform/graphics/svg/SVGImage.cpp:
              (WebCore::SVGImage::size): Use valueAsPercentage() for percents 
              instead of valueInSpecifiedUnits(). valueInSpecifiedUnits() 
              returns, for example, 50 for 50%, so multiplying percentages by the 
              default size of 300 x 150 led to ridiculously huge dimensions for 
              SVG images, and the subsequent hang. 
      
      LayoutTests:
      
              Reviewed by Oliver.
      
              Test for <rdar://problem/5616052> SVGs with width or height of 100% 
              hang when used as a background-image (16164)
      
              * fast/images/resources/width-100-percent.svg: Added.
              * fast/images/svg-width-100p-as-background.html: Added.
              * platform/mac/fast/images/svg-width-100p-as-background-expected.checksum: Added.
              * platform/mac/fast/images/svg-width-100p-as-background-expected.png: Added.
              * platform/mac/fast/images/svg-width-100p-as-background-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df26720b
    • mjs@apple.com's avatar
      Not reviewed. · 8993659a
      mjs@apple.com authored
              Fix DumpRenderTree ObjC bug comparing strings.
      
              * DumpRenderTree/mac/ObjCController.m:
              (-[ObjCController identityIsEqual::]): Compare strings with string
              equality instead of identiy equality.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8993659a
    • alp@webkit.org's avatar
      2007-11-27 Alp Toker <alp@atoker.com> · 6c739aa1
      alp@webkit.org authored
              Prospective MSVC build fix.
      
              Roll back dllexport/dllimport support for now.
      
              * API/JSBase.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c739aa1
    • jhoneycutt@apple.com's avatar
      2007-11-27 Jon Honeycutt <jhoneycutt@apple.com> · a1ea4add
      jhoneycutt@apple.com authored
              Reviewed by Adam.
      
              Return bool from registerWebViewWindowClass, as nothing uses the ATOM.
              Set haveRegisteredWindowClass to true
      
              * WebView.cpp:
              (registerWebViewWindowClass):
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1ea4add
    • jhoneycutt@apple.com's avatar
      2007-11-27 Jon Honeycutt <jhoneycutt@apple.com> · 427b0d64
      jhoneycutt@apple.com authored
              Reviewed by Adam.
      
              Set haveRegisteredWindowClass when we register the window class.
      
              * plugins/win/PluginViewWin.cpp:
              (WebCore::registerPluginView):
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      427b0d64
    • alp@webkit.org's avatar
      2007-11-27 Alp Toker <alp@atoker.com> · d8bfe3d7
      alp@webkit.org authored
              Reviewed by Maciej.
      
              http://bugs.webkit.org/show_bug.cgi?id=15569
              [gtk] GTK JavaScriptCore needs to export symbols for JSC API and WTF
      
              Introduce JS_EXPORT to mark symbols to be exported as public API.
      
              Export all public symbols in the JavaScriptCore C API.
      
              This matches conventions for exporting symbols set by the CF and CG
              frameworks.
      
              * API/JSBase.h:
              * API/JSContextRef.h:
              * API/JSObjectRef.h:
              * API/JSStringRef.h:
              * API/JSStringRefBSTR.h:
              * API/JSStringRefCF.h:
              * API/JSValueRef.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8bfe3d7
    • andersca@apple.com's avatar
      Speculative fix to get Drosera working. · dae9c2ac
      andersca@apple.com authored
              
              * COMEnumVariant.h:
              (::Next):
              Update the number of elements fetched correctly.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dae9c2ac
    • andersca@apple.com's avatar
      Reviewed by Brady. · b23a84fb
      andersca@apple.com authored
              * Storage/WebDatabaseManager.mm:
              * Storage/WebDatabaseManagerPrivate.h:
              * Storage/WebDatabaseTrackerClient.mm:
              (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
              (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
              * Storage/WebSecurityOrigin.mm:
              (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
              * Storage/WebSecurityOriginInternal.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b23a84fb
    • timothy@apple.com's avatar
      Reviewed by Sam. · 8411535b
      timothy@apple.com authored
              Reset the authorAndUserStylesEnabled preference
              back to YES for each test. Fixes the broken tests.
      
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (resetWebViewToConsistentStateBeforeTesting):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8411535b
    • timothy@apple.com's avatar
      Reviewed by Sam Weinig. · 92232b6d
      timothy@apple.com authored
              Bug 16165: Dragging the inspector toolbar should move the window
              http://bugs.webkit.org/show_bug.cgi?id=16165
      
              * page/inspector/DocumentPanel.js: Call the new drag functions, and cleanup code.
              * page/inspector/inspector.css: Only make the toolbar transparent in detached mode.
              * page/inspector/inspector.js: Call the new drag functions, and cleanup code. Add
                toolbar drag functions that move the window.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92232b6d
    • andersca@apple.com's avatar
      Reviewed by Adam. · fae63cae
      andersca@apple.com authored
              Some COM cleanup.
              
              * CFDictionaryPropertyBag.cpp:
              (CFDictionaryPropertyBag::QueryInterface):
              * CFDictionaryPropertyBag.h:
              * WebBackForwardList.cpp:
              (WebBackForwardList::addItem):
              (WebBackForwardList::removeItem):
              * WebDownload.cpp:
              (WebDownload::initWithRequest):
              * WebFrame.cpp:
              (WebFrame::loadRequest):
              (WebFrame::initWithWebFrameView):
              (WebFrame::webHistory):
              (WebFrame::dispatchWillSendRequest):
              * WebURLAuthenticationChallenge.cpp:
              (WebURLAuthenticationChallenge::QueryInterface):
              (WebURLAuthenticationChallenge::initWithProtectionSpace):
              * WebURLAuthenticationChallenge.h:
              * WebURLAuthenticationChallengeSender.cpp:
              (WebURLAuthenticationChallengeSender::QueryInterface):
              * WebURLAuthenticationChallengeSender.h:
              * WebURLResponse.cpp:
              (WebURLResponse::QueryInterface):
              * WebURLResponse.h:
              * WebView.cpp:
              (WebView::notifyDidAddIcon):
              (WebView::goToBackForwardItem):
              (WebView::canHandleRequest):
              (WebView::loadBackForwardListFromOtherView):
              (core):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fae63cae
    • kmccullough@apple.com's avatar
      Reviewed by Adam. · ce400917
      kmccullough@apple.com authored
              - Drosera now displays the console window, although it cannot currently
              process JavaScript.
      
              * Drosera/win/DebuggerClient.cpp: Shows the console window.
              (registerConsoleClass): Implemented.
              (consoleWndProc): Implemented.
              (DebuggerClient::onSize): Implemented.
              (DebuggerClient::createWebViewWithRequest): Implemented, now creates a
              new window.
              * Drosera/win/DebuggerClient.h: Added needed method and members for 
              creating and maintaining a new window.
              * Drosera/win/Drosera.cpp: Fixed some minor bugs, and moved a couple of
              lines of code to more appropriate places.
              (Drosera::handleCommand):
              (Drosera::initUI):
              (Drosera::onSize):
              (Drosera::attach):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce400917
    • andersca@apple.com's avatar
      Add COMEnumVariant.h to the project. · c3da0206
      andersca@apple.com authored
              
              * WebKit.vcproj/WebKit.vcproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3da0206
    • andersca@apple.com's avatar
      Reviewed by Adam. · e2d290d0
      andersca@apple.com authored
              Return E_INVALIDARG if the databaseName BSTR is null;
              
              * WebDatabaseManager.cpp:
              (WebDatabaseManager::detailsForDatabaseWithOrigin):
              (WebDatabaseManager::deleteDatabaseWithOrigin):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2d290d0
    • andersca@apple.com's avatar
      Reviewed by Adam. · f069e564
      andersca@apple.com authored
              Implement the rest of the WebDatabaseManager API.
      
              * COMEnumVariant.h:
              * Interfaces/IWebDatabaseManager.idl:
              * WebDatabaseManager.cpp:
              (isEqual):
              (DatabaseDetailsPropertyBag::DatabaseDetailsPropertyBag):
              (DatabaseDetailsPropertyBag::~DatabaseDetailsPropertyBag):
              (DatabaseDetailsPropertyBag::createInstance):
              (DatabaseDetailsPropertyBag::AddRef):
              (DatabaseDetailsPropertyBag::Release):
              (DatabaseDetailsPropertyBag::QueryInterface):
              (DatabaseDetailsPropertyBag::Read):
              (DatabaseDetailsPropertyBag::Write):
              (WebDatabaseManager::detailsForDatabaseWithOrigin):
              (WebDatabaseManager::deleteAllDatabases):
              (WebDatabaseManager::deleteDatabasesWithOrigin):
              (WebDatabaseManager::deleteDatabaseWithOrigin):
              * WebDatabaseManager.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f069e564
    • timothy@apple.com's avatar
      Land results for my last test change, · e2a16604
      timothy@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2a16604
    • adachan@apple.com's avatar
      <rdar://problem/5616098> The BSTR returned by WebHistoryItem::alternateTitle · 575c219a
      adachan@apple.com authored
              was not allocated correctly.
      
              Reviewed by Anders.
      
              * WebHistoryItem.cpp:
              (WebHistoryItem::setAlternateTitle):
              (WebHistoryItem::alternateTitle):
              * WebHistoryItem.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      575c219a
    • antti@apple.com's avatar
      Reviewed by Mitz. · bdd43ec8
      antti@apple.com authored
              Small changes to make RenderSlider a bit more generic so it can be used in video controls.
      
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::defaultEventHandler): Fix coordinates with forwarded events.
              * rendering/RenderSlider.cpp:
              (WebCore::HTMLSliderThumbElement::defaultEventHandler): Fix coordinates with forwarded events.
              (WebCore::RenderSlider::setStyle):
              (WebCore::RenderSlider::createThumbStyle): Copy thumb left and top from the orginal style so position does not reset.
              (WebCore::RenderSlider::mouseEventIsInThumb): Make this work with forwarded events.
              * rendering/RenderSlider.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bdd43ec8
    • antti@apple.com's avatar
      Reviewed by Darin. · 3920132a
      antti@apple.com authored
              - Don't use hasPseudoId() optimization for pseudo styles used in shadow trees. These styles
                generally exist when asked for so the optimization does not do much. This reverses the continuing
                growth of the _pseudoBits bitfield in RenderStyle.
              - Add some pseudo elements for media controls
      
              * css/CSSSelector.cpp:
              (WebCore::CSSSelector::extractPseudoType):
              * css/CSSSelector.h:
              (WebCore::CSSSelector::):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::matchRulesForList):
              (WebCore::CSSStyleSelector::checkOneSelector):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::getPseudoStyle):
              * rendering/RenderStyle.cpp:
              (WebCore::pseudoBit):
              (WebCore::RenderStyle::hasPseudoStyle):
              (WebCore::RenderStyle::setHasPseudoStyle):
              * rendering/RenderStyle.h:
              (WebCore::RenderStyle::):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3920132a
    • timothy@apple.com's avatar
      WebCore: · d67b9deb
      timothy@apple.com authored
              Reviewed by Kevin McCullough.
      
              Bug 16161: window.moveBy(0, 0) moves the window by -22px vertically
              http://bugs.webkit.org/show_bug.cgi?id=16161
      
              Removed the "Adjust the window rect to be in the coordinate space of
              the screen rect" step which was always adding (0,22) to the window
              position (on the main screen). Instead, account for screen X and Y
              in the bottom and right constrain step.
      
              Added more test cases to: fast/dom/Window/window-resize.html
      
              * bindings/js/kjs_window.cpp:
              (KJS::adjustWindowRect):
      
      LayoutTests:
      
              Reviewed by Kevin McCullough.
      
              Bug 16161: window.moveBy(0, 0) moves the window by -22px vertically
              http://bugs.webkit.org/show_bug.cgi?id=16161
      
              Added test cases for moveBy(0, 0), moveBy(0, 1) and  moveBy(1, 0).
      
              * fast/dom/Window/window-resize.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d67b9deb
    • andersca@apple.com's avatar
      Build fix. · e74cd86a
      andersca@apple.com authored
              
              * JSUtils.cpp:
              (KJSValueToCFTypeInternal):
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectCopyPropertyNames):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e74cd86a
    • andersca@apple.com's avatar
      Reviewed by Darin, landed by Anders. · 44e28217
      andersca@apple.com authored
              Fixed: <rdar://problem/4610818> CrashTracer: 1533 crashes in Safari at com.macromedia.Flash Player.plugin: native_ShockwaveFlash_TCallLabel + 271131
      
              The problem was that some Leopard users were still inadvertently using the old Flash 8 plug-in, even though Leopard
              shipped with Flash 9. To avoid loading an older version of a plug-in when a newer version is installed, the plug-in
              database will compare bundle versions and always load the latest version.
      
              * Plugins/WebBasePluginPackage.h:
              * Plugins/WebBasePluginPackage.m:
              (-[WebBasePluginPackage versionNumber]): New method. CFBundleGetVersionNumber doesn't work with all possible versioning schemes,
              but we think for now it's good enough for us.
              * Plugins/WebPluginDatabase.m:
              (considerCandidate): Added a C utility function which compares the current plug-in against a candidate plug-in's version number.
              If both plug-ins have the same bundle ID and the candiate is newer, the current plug-in becomes the candidate.
              (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): Calls the new considerCandidate() function.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44e28217
    • andersca@apple.com's avatar
      Reviewed by Adam. · 45dd6c50
      andersca@apple.com authored
              Use COMEnumVariant in WebScriptCallFrame and WebScriptScope.
              
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::scopeChain):
              * WebScriptScope.cpp:
              (WebScriptScope::variableNames):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45dd6c50
    • andersca@apple.com's avatar
      Reviewed by Adam. · fad5ca4e
      andersca@apple.com authored
              Make PropertyNameArray and ScopeChain COMEnumVariant friendly.
              
              * kjs/PropertyNameArray.cpp:
              (KJS::PropertyNameArray::swap):
              Implement PropertyNameArray::swap.
              
              * kjs/PropertyNameArray.h:
              Add ValueType typedef. Replace PropertyNameArrayIterator with 
              PropertyNameArray::const_iterator.
              
              * kjs/nodes.cpp:
              (KJS::ForInNode::execute):
              * kjs/scope_chain.cpp:
              (KJS::ScopeChain::print):
              Update for changes to PropertyNameArray.
              
              * kjs/scope_chain.h:
              Add const_iterator and ValueType typedef.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fad5ca4e
    • andersca@apple.com's avatar
      Reviewed by Adam. · 4c87759a
      andersca@apple.com authored
              Use the correct include paths.
              
              * COMEnumVariant.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c87759a
    • andersca@apple.com's avatar
      Reviewed by Darin. · 8c09b338
      andersca@apple.com authored
         
              Add COMEnumVariant, a templatized class with implements IEnumVARIANT and lets
              you enumerate over a C++ container, be it WTF or STL.
              
              * COMEnumVariant.h: Added.
              
              * WebDatabaseManager.cpp:
              (WebDatabaseManager::origins):
              (WebDatabaseManager::databasesWithOrigin):
              Implement these using COMEnumVariant.
              
              * WebSecurityOrigin.cpp:
              (WebSecurityOrigin::QueryInterface):
              * WebSecurityOrigin.h:
              Add a UUID for the implementation so that other parts of WebKit can access
              the WebCore::SecurityOriginData object.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c09b338
    • andersca@apple.com's avatar
      Reviewed by Darin. · 104317bf
      andersca@apple.com authored
              Add a ValueType typedef.
              
              * wtf/Vector.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      104317bf
    • timothy@apple.com's avatar
      Reviewed by Adam Roben. · b5f7fe2d
      timothy@apple.com authored
              * page/inspector/inspector.css: Make the text in the Network
              panel legend more readable.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5f7fe2d
    • timothy@apple.com's avatar
      Reviewed by Adam Roben. · 9fd40590
      timothy@apple.com authored
              Don't call setNeedsReapplyStylesInAllFrames if the
              authorAndUserStylesEnabled setting didn't change.
      
              * page/Settings.cpp:
              (WebCore::Settings::setAuthorAndUserStylesEnabled):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fd40590
    • alp@webkit.org's avatar
      2007-11-27 Alp Toker <alp@atoker.com> · 3c646f12
      alp@webkit.org authored
              Fix potential broken build due to a missing DEPENDPATH.
      
              * WebCore.pro:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c646f12
    • sullivan@apple.com's avatar
      Fixed 5614525, caused by a recent bug in WKGetExtensionsForMIMEType · cd3fc2a1
      sullivan@apple.com authored
              that affects Safari.
              
              reviewed by Kevin Decker
      
              * libWebKitSystemInterfaceLeopard.a:
              * libWebKitSystemInterfaceTiger.a:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd3fc2a1
    • timothy@apple.com's avatar
      WebCore: · bf423a1b
      timothy@apple.com authored
              Reviewed by Dave Hyatt.
      
              <rdar://problem/5569233> Add the ability to disable author and user CSS styles
      
              * WebCore.base.exp: Add the Settings::setAuthorAndUserStylesEnabled symbol.
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector): Add a new matchAuthorAndUserStyles parameter.
              (WebCore::CSSStyleSelector::styleForElement): Check m_matchAuthorAndUserStyles before
              matching user and author rules.
              (WebCore::CSSStyleSelector::pseudoStyleForElement): Ditto.
              (WebCore::CSSStyleSelector::styleRulesForElement): Ditto.
              * css/CSSStyleSelector.h: Add m_matchAuthorAndUserStyles and new constructor parameter.
              * dom/Document.cpp:
              (WebCore::Document::Document): Pass Settings::authorAndUserStylesEnabled to the CSSStyleSelector.
              (WebCore::Document::recalcStyleSelector): Skip collecting the author stylesheets if
              Settings::authorAndUserStylesEnabled is false, and pass that to the CSSStyleSelector.
              * page/Settings.cpp:
              (WebCore::Settings::Settings): Initialize m_authorAndUserStylesEnabled to true.
              (WebCore::Settings::setAuthorAndUserStylesEnabled): Recalc style in all the frames
              when the setting changes.
              * page/Settings.h: Add m_authorAndUserStylesEnabled.
              (WebCore::Settings::authorAndUserStylesEnabled): Return m_authorAndUserStylesEnabled.
      
      WebKit/mac:
      
              Reviewed by Dave Hyatt.
      
              <rdar://problem/5569233> Add the ability to disable author and user CSS styles
      
              * WebView/WebPreferenceKeysPrivate.h: Define WebKitRespectStandardStyleKeyEquivalentsPreferenceKey.
              * WebView/WebPreferences.m:
              (+[WebPreferences initialize]): Default WebKitRespectStandardStyleKeyEquivalentsPreferenceKey to YES.
              (-[WebPreferences authorAndUserStylesEnabled]): Return the setting's BOOL value.
              (-[WebPreferences setAuthorAndUserStylesEnabled:]): Set the setting's BOOL value.
              * WebView/WebPreferencesPrivate.h: Add authorAndUserStylesEnabled and setAuthorAndUserStylesEnabled:.
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]): Update WebCore::Settings::authorAndUserStylesEnabled.
      
      WebKitTools:
      
              Reviewed by Dave Hyatt.
      
              <rdar://problem/5569233> Add the ability to disable author and user CSS styles
              
              Add support for disabling author and user styles for testing.
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
              * DumpRenderTree/LayoutTestController.cpp:
              (setAuthorAndUserStylesEnabledCallback):
              (LayoutTestController::staticFunctions):
              * DumpRenderTree/LayoutTestController.h:
              * DumpRenderTree/mac/LayoutTestControllerMac.mm:
              (LayoutTestController::setAuthorAndUserStylesEnabled):
              * DumpRenderTree/win/LayoutTestControllerWin.cpp:
              (LayoutTestController::setAuthorAndUserStylesEnabled):
      
      LayoutTests:
      
              Reviewed by Dave Hyatt.
      
              Test for: <rdar://problem/5569233> Add the ability to disable author and user CSS styles
      
              * fast/css/disabled-author-styles.html: Added.
              * platform/mac/fast/css/disabled-author-styles-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf423a1b
    • alp@webkit.org's avatar
      2007-11-27 Alp Toker <alp@atoker.com> · d755f617
      alp@webkit.org authored
              Reviewed by Mark Rowe.
      
              Based on changes by Mike Emmel.
      
              CURL HTTP backend local file fixes:
      
              Set a MIME type for local files based on the file extension.
      
              Remove any HTTP query part sent to a local file.
      
              * platform/network/curl/ResourceHandleManager.cpp:
              (WebCore::ResourceHandleManager::startJob):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d755f617
  3. 26 Nov, 2007 3 commits
    • beidson@apple.com's avatar
      WebCore: · 2dbe1211
      beidson@apple.com authored
              Reviewed by Mark Rowe
      
              Allow setting the default storage quota per database origin
      
              * WebCore.base.exp:
      
              * page/Settings.cpp:
              (WebCore::Settings::setDefaultDatabaseOriginQuota):
              (WebCore::Settings::defaultDatabaseOriginQuota):
              * page/Settings.h:
      
              * storage/DatabaseTracker.cpp:
              (WebCore::DatabaseTracker::DatabaseTracker):
              (WebCore::DatabaseTracker::setDefaultOriginQuota):
              (WebCore::DatabaseTracker::defaultOriginQuota):
              * storage/DatabaseTracker.h:
      
      WebKit/mac:
      
              Reviewed by Mark Rowe
      
              Provide API for setting the default storage quota per database origin
      
              * Misc/WebNSDictionaryExtras.h:
              * Misc/WebNSDictionaryExtras.m:
              (-[NSMutableDictionary _webkit_setUnsignedLongLong:forKey:]): Helper for UINT64 preferences
      
              * WebView/WebPreferenceKeysPrivate.h:
              * WebView/WebPreferences.m:
              (-[WebPreferences _unsignedLongLongValueForKey:]): Helper for UINT64 prefs
              (-[WebPreferences _setUnsignedLongLongValue:forKey:]): Ditto
              (-[WebPreferences defaultDatabaseQuota]):
              (-[WebPreferences setDefaultDatabaseQuota:]):
              * WebView/WebPreferencesPrivate.h:
      
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]): Set the WebCore Settings version of the default storage pref
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2dbe1211
    • alp@webkit.org's avatar
      2007-11-26 Peter Kasting <zerodpx@gmail.com> · b00202b2
      alp@webkit.org authored
              Reviewed by Alp Toker.
      
              http://bugs.webkit.org/show_bug.cgi?id=15974
              GIF decoding should respect frames' specified disposal methods.
      
              * platform/image-decoders/ImageDecoder.h:
              (WebCore::RGBA32Buffer::):
              (WebCore::RGBA32Buffer::RGBA32Buffer):
              (WebCore::RGBA32Buffer::disposalMethod):
              (WebCore::RGBA32Buffer::setDisposalMethod):
              * platform/image-decoders/gif/GIFImageDecoder.cpp:
              (WebCore::GIFImageDecoder::frameBufferAtIndex):
              (WebCore::GIFImageDecoder::initFrameBuffer):
              (WebCore::GIFImageDecoder::prepEmptyFrameBuffer):
              (WebCore::GIFImageDecoder::haveDecodedRow):
              (WebCore::GIFImageDecoder::frameComplete):
              * platform/image-decoders/gif/GIFImageDecoder.h:
              * platform/image-decoders/gif/GIFImageReader.cpp:
              (GIFImageReader::read):
              * platform/image-decoders/gif/GIFImageReader.h:
              (GIFFrameReader::GIFFrameReader):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b00202b2
    • aroben@apple.com's avatar
      Make WebKitGraphics able to handle grayscale colors · aa330cfb
      aroben@apple.com authored
       WebCore:
      
               Add a Color(CGColorRef) constructor
      
               Reviewed by Darin.
      
               * platform/graphics/Color.h:
               * platform/graphics/cg/ColorCG.cpp:
               (WebCore::Color::Color): Added.
      
       WebKit/win:
      
               Take advantage of the new Color constructor that takes a CGColorRef
      
               This lets us handle grayscale colors (which only have 2 components).
      
               Reviewed by Darin.
      
               * WebKitGraphics.cpp:
               (DrawTextAtPoint):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa330cfb