WebKit-https.git
12 years agoAdd logic to track whether a function uses a locally scoped eval or requires a closure
oliver@apple.com [Sat, 15 Mar 2008 01:05:55 +0000 (01:05 +0000)]
Add logic to track whether a function uses a locally scoped eval or requires a closure

Reviewed by Maciej

Now that we limit eval we can track those uses of eval that operate
in the local scope and functions that require a closure.  We track
this information during initial parsing to avoid yet another tree
walk.

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

12 years agoWebCore:
andersca@apple.com [Sat, 15 Mar 2008 00:21:03 +0000 (00:21 +0000)]
WebCore:

        Reviewed by Sam.

        <rdar://problem/5794989>
        https://bugs.webkit.org/show_bug.cgi?id=17792
        REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work

        Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
        so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::createWindow):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::createWindow):
        * loader/FrameLoader.h:

LayoutTests:

        Reviewed by Sam.

        <rdar://problem/5794989>
        https://bugs.webkit.org/show_bug.cgi?id=17792
        REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work

        Add tests.

        * fast/dom/Window/window-open-self-from-other-frame-expected.txt: Added.
        * fast/dom/Window/window-open-self-from-other-frame.html: Added.

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

12 years agoFix ChangeLog
mitz@apple.com [Fri, 14 Mar 2008 22:57:36 +0000 (22:57 +0000)]
Fix ChangeLog

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

12 years ago Reviewed by Mark Rowe.
mitz@apple.com [Fri, 14 Mar 2008 22:54:08 +0000 (22:54 +0000)]
    Reviewed by Mark Rowe.

        - fix <rdar://problem/5797836> shadow offsets are smaller than specified

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setShadow): Made the workaround for
        <rdar://problem/5643663> unconditional.

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

12 years ago Fix it right this time
aroben@apple.com [Fri, 14 Mar 2008 21:06:20 +0000 (21:06 +0000)]
    Fix it right this time

        * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
        format string.
        * platform/mac/MainThreadMac.mm:

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

12 years ago Reviewed by Brian Dash's rubberstamp
beidson@apple.com [Fri, 14 Mar 2008 20:57:40 +0000 (20:57 +0000)]
    Reviewed by Brian Dash's rubberstamp

        Remove a class declaration for a class that has never existed

        * WebView/WebResource.h:

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

12 years ago Mac build fix
aroben@apple.com [Fri, 14 Mar 2008 20:47:34 +0000 (20:47 +0000)]
    Mac build fix

        * platform/mac/MainThreadMac.mm: Corrected a typo.

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

12 years agoWebCore:
mitz@apple.com [Fri, 14 Mar 2008 20:34:01 +0000 (20:34 +0000)]
WebCore:

        Reviewed by Darin Adler.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17834
          REGRESSION: floated first-letter does not work when included in table

        Test: fast/css/first-letter-float.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
        first text node to stop at a float if that float is an existing first-
        letter.

LayoutTests:

        Reviewed by Darin Adler.

        - test for http://bugs.webkit.org/show_bug.cgi?id=17834
          REGRESSION: floated first-letter does not work when included in table

        * fast/css/first-letter-float.html: Added.
        * platform/mac-leopard/fast/css/first-letter-float-expected.checksum: Added.
        * platform/mac-leopard/fast/css/first-letter-float-expected.png: Added.
        * platform/mac/fast/css/first-letter-float-expected.txt: Added.

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

12 years ago Fix Mac build
weinig@apple.com [Fri, 14 Mar 2008 20:15:04 +0000 (20:15 +0000)]
    Fix Mac build

        * WebCore.xcodeproj/project.pbxproj:

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

12 years ago Make most of callOnMainThread's implementation be cross-platform
aroben@apple.com [Fri, 14 Mar 2008 19:53:37 +0000 (19:53 +0000)]
    Make most of callOnMainThread's implementation be cross-platform

        I took the non-platform-specific parts of MainThreadWin.cpp and moved
        them to a new MainThread.cpp. Each platform is now responsible for
        implementing one function, scheduleDispatchFunctionsOnMainThread,
        which is supposed to set things up so that
        dispatchFunctionsFromMainThread gets called from the main thread in
        the near future.

        Reviewed by Alexey.

        * GNUmakefile.am: Added MainThread.cpp to the project.
        * WebCore.pro: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * WebCoreSources.bkl: Ditto.
        * platform/MainThread.cpp:
          - Copied from WebCore/platform/win/MainThreadWin.cpp.
          - Removed the Windows-specific parts.
        (WebCore::callOnMainThread): Changed to call
        scheduleDispatchFunctionsOnMainThread instead of PostMessage.
        * platform/gtk/MainThreadGtk.cpp:
        (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
        just calls dispatchFunctionsFromMainThread.
        (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
        to g_timeout_add.
        * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
        WebCoreMainThreadCaller.
        (-[WebCoreMainThreadCaller call]): Calls through to
        dispatchFunctionsFromMainThread.
        (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
        WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
        * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
        (WebCore::MainThreadInvoker::event): Chagned to call through to
        dispatchFunctionsFromMainThread.
        (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
        to the MainThreadInvoker.
        * platform/win/MainThreadWin.cpp:
          - Removed the non-Windows-specific parts.
          - Removed some unnecessary initialization of static variables to 0.
        (WebCore::ThreadingWindowWndProc): Changed to call
        dispatchFunctionsFromMainThread.
        (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
        PostMessage.
        * platform/wx/MainThreadWx.cpp:
        (WebCore::scheduleDispatchFunctionsOnMainThread): Added.

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

12 years ago Reviewed by Beth Dakin.
ggaren@apple.com [Fri, 14 Mar 2008 19:28:57 +0000 (19:28 +0000)]
    Reviewed by Beth Dakin.

        Fixed another problem with Vector::shrinkCapacity.

        moveOverlapping isn't good enough for the case where the buffer hasn't
        changed, because it still destroys the contents of the buffer.

        * wtf/Vector.h:
        (WTF::::shrinkCapacity): Changed to explicitly check whether the call
        to allocateBuffer produced a new buffer. If it didn't, there's no need
        to move.

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

12 years ago Reviewed by Beth Dakin.
ggaren@apple.com [Fri, 14 Mar 2008 19:05:28 +0000 (19:05 +0000)]
    Reviewed by Beth Dakin.

        Fixed a few problems with Vector::shrinkCapacity that I noticed in testing.

        * wtf/Vector.h:
        (WTF::VectorBufferBase::deallocateBuffer): Clear our m_buffer pointer
        when we deallocate m_buffer, in case we're not asked to reallocate a new
        buffer. (Otherwise, we would use a stale m_buffer if we were asked to
        perform any operations after shrinkCapacity was called.)

        (WTF::VectorBuffer::allocateBuffer): Made VectorBuffer with inline
        capacity aware that calls to allocateBuffer might be shrinks, rather
        than grows, so we shouldn't allocate a new buffer on the heap unless
        our inline buffer is too small.

        (WTF::::shrinkCapacity): Call resize() instead of just setting m_size,
        so destructors run. Call resize before reallocating the buffer to make
        sure that we still have access to the objects we need to destroy. Call
        moveOverlapping instead of move, since a call to allocateBuffer on an
        inline buffer may produce identical storage.

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

12 years ago Reviewed by Geoff.
bdakin@apple.com [Fri, 14 Mar 2008 18:28:51 +0000 (18:28 +0000)]
    Reviewed by Geoff.

        Fix for <rdar://problem/5728171> Potential PLT speedup: don't
        realloc every time inside NamedAttrMap::addAttribute

        The speed-up for this turned out to be so small that it is mostly
        imperceptible. It is likely that it is a tiny boost, though, and
        the new code is much cleaner.

        * dom/Element.cpp:
        (WebCore::Element::setAttributeMap): attrs is now called
        m_attributes
        * dom/NamedAttrMap.cpp: The array attrs is now the Vector of
        RefPtrs called m_attributes, and there is no longer any need for
        the len member variable.
        (WebCore::NamedAttrMap::NamedAttrMap):
        (WebCore::NamedAttrMap::item):
        (WebCore::NamedAttrMap::getAttributeItem):
        (WebCore::NamedAttrMap::clearAttributes):
        (WebCore::NamedAttrMap::operator=):
        (WebCore::NamedAttrMap::addAttribute):
        (WebCore::NamedAttrMap::removeAttribute):
        (WebCore::NamedAttrMap::mapsEquivalent):
        * dom/NamedAttrMap.h: Same.
        (WebCore::NamedAttrMap::length):
        (WebCore::NamedAttrMap::attributeItem):
        (WebCore::NamedAttrMap::shrinkToLength):
        (WebCore::NamedAttrMap::reserveCapacity):
        * html/HTMLTokenizer.cpp: One of the benefits of the old array was
        that it never took up more memory than it needed to. So the
        tokenizer utilizes new member functions on NamedAttrMap
        (shrinkToLength and reserveCapacity) to try to keep memory usage at
        a minimum.
        (WebCore::Token::addAttribute):
        (WebCore::HTMLTokenizer::processToken):

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

12 years agoFix typos.
ddkilzer@apple.com [Fri, 14 Mar 2008 15:21:10 +0000 (15:21 +0000)]
Fix typos.

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

12 years ago BUILD FIX when ENABLE(MAC_JAVA_BINDINGS) set to 0.
ddkilzer@apple.com [Fri, 14 Mar 2008 15:19:52 +0000 (15:19 +0000)]
    BUILD FIX when ENABLE(MAC_JAVA_BINDINGS) set to 0.

        * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BINDINGS) guard
        to comment out unused code.

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

12 years ago Reviewed by Darin.
ap@webkit.org [Fri, 14 Mar 2008 14:59:38 +0000 (14:59 +0000)]
    Reviewed by Darin.

        Get rid of a localime() call on platforms that have better alternatives.

        * kjs/DateMath.h: Added getLocalTime();

        * kjs/DateMath.cpp:
        (KJS::getLocalTime):
        (KJS::getDSTOffsetSimple):
        Implementation moved from getDSTOffsetSimple().

        * kjs/date_object.cpp:
        (KJS::DateObjectImp::callAsFunction): Switched to getLocalTime().

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

12 years agoJavaScriptCore:
ddkilzer@apple.com [Fri, 14 Mar 2008 14:34:31 +0000 (14:34 +0000)]
JavaScriptCore:

        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        * wtf/Platform.h: Define ENABLE_MAC_JAVA_BRIDGE here.

WebCore:

        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        No test cases added since there is no change in functionality.

        * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
        If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
        * WebCore.JNI.exp: Added.
        * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.

        * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
        * bridge/jni/jni_class.h: Ditto.
        * bridge/jni/jni_instance.cpp: Ditto.
        * bridge/jni/jni_instance.h: Ditto.
        * bridge/jni/jni_jsobject.cpp: Ditto.
        * bridge/jni/jni_jsobject.h: Ditto.
        * bridge/jni/jni_objc.mm: Ditto.
        * bridge/jni/jni_runtime.cpp: Ditto.
        * bridge/jni/jni_runtime.h: Ditto.
        * bridge/jni/jni_utility.cpp: Ditto.
        * bridge/jni/jni_utility.h: Ditto.

        * bridge/runtime.cpp: Removed unused #include statements.
        * bridge/runtime.h:
        (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
        guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
        ObjectiveCLanguage enum to match corresponding code in runtime.cpp.

        * config.h: Removed definition of HAVE_JNI.

        * loader/FrameLoaderClient.h:
        (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
        * page/Frame.cpp:
        (WebCore::Frame::Frame): Ditto.
        * page/Frame.h:
        (WebCore::Frame::initJavaJSBindings): Ditto.
        * page/mac/FrameMac.mm:
        (WebCore::Frame::createScriptInstanceForWidget): Ditto.
        (WebCore::Frame::initJavaJSBindings): Ditto.

WebKit/mac:

        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        * Plugins/WebPluginJava.h: Removed unused file.
        * WebCoreSupport/WebFrameLoaderClient.h:
        (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
        * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
        (WebFrameLoaderClient::javaApplet): Ditto.

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

12 years agoFix the Qt build.
hausmann@webkit.org [Fri, 14 Mar 2008 08:09:09 +0000 (08:09 +0000)]
Fix the Qt build.

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

12 years ago * html/PreloadScanner.h: Corrected license.
darin@apple.com [Fri, 14 Mar 2008 07:13:28 +0000 (07:13 +0000)]
    * html/PreloadScanner.h: Corrected license.
        * html/PreloadScanner.cpp: Corrected license.

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

12 years ago2008-03-13 Brent Fulgham <bfulgham@gmail.com>
pewtermoose@webkit.org [Fri, 14 Mar 2008 04:40:07 +0000 (04:40 +0000)]
2008-03-13  Brent Fulgham  <bfulgham@gmail.com>

        Reviewed by Darin.

        Correct paths to vsprops files so they use the environment
        variable, rather than hard-coded path.
        http://bugs.webkit.org/show_bug.cgi?id=17797.

        * WinLauncher/WinLauncher.vcproj:  Correct paths to vsprops.

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

12 years ago Reviewed by darin. Landed by eseidel.
eric@webkit.org [Fri, 14 Mar 2008 04:19:24 +0000 (04:19 +0000)]
    Reviewed by darin.  Landed by eseidel.

        * platform/FloatConversion.h: Include a header to get CoreGraphics
        types when using CoreGraphics types.

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

12 years ago Reviewed by eseidel. Landed by eseidel.
eric@webkit.org [Fri, 14 Mar 2008 04:19:03 +0000 (04:19 +0000)]
    Reviewed by eseidel.  Landed by eseidel.

        * WebCore.xcodeproj/project.pbxproj:
        * css/CSSParser.cpp:
        * css/makeprop.pl:
Move CSSPropertyNames.c to CSSPropertyNames.cpp

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

12 years ago Reviewed by eseidel. Landed by eseidel.
eric@webkit.org [Fri, 14 Mar 2008 03:47:15 +0000 (03:47 +0000)]
    Reviewed by eseidel.  Landed by eseidel.

        * platform/Arena.h: Use statement1;statement2 instead of
        (statement1,statement2) in CLEAR_UNUSED.

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

12 years ago Reviewed by eseidel. Landed by eseidel.
eric@webkit.org [Fri, 14 Mar 2008 03:44:10 +0000 (03:44 +0000)]
    Reviewed by eseidel.  Landed by eseidel.

        * wtf/FastMalloc.cpp: #include <wtf/HashSet.h> outside of any
        namespaces.

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

12 years ago Reviewed by eseidel. Landed by eseidel
eric@webkit.org [Fri, 14 Mar 2008 03:43:55 +0000 (03:43 +0000)]
    Reviewed by eseidel.  Landed by eseidel

        * pcre/pcre_exec.cpp: Fix misnamed variable, allowing -DDEBUG build
        to succeed.
        * wtf/ThreadingPthreads.cpp: #include <sys/time.h> for gettimeofday
        in non-pch build.

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

12 years ago Reviewed by Mitz.
antti@apple.com [Fri, 14 Mar 2008 03:07:17 +0000 (03:07 +0000)]
    Reviewed by Mitz.

        Update test results for the preload patch. Load order for some resources changed,
        this does not affect the substance of these tests.

        * platform/mac-leopard/security/block-test-expected.txt:
        * security/block-test-expected.txt:
        * webarchive/loading/cache-expired-subresource-expected.txt:

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

12 years ago2008-03-13 Tommi Komulainen <tommi.komulainen@iki.fi>
alp@webkit.org [Fri, 14 Mar 2008 02:47:45 +0000 (02:47 +0000)]
2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=17821
        [SOUP] POST requests are empty

        Send the HTTP request body as well.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::ResourceHandle::start):

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

12 years agoFix the build.
timothy@apple.com [Thu, 13 Mar 2008 23:16:27 +0000 (23:16 +0000)]
Fix the build.

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

12 years agoWebCore:
mitz@apple.com [Thu, 13 Mar 2008 22:14:15 +0000 (22:14 +0000)]
WebCore:

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17819
          Border-collapse: collapse later cell wins on PC, earlier cell on Mac

        Test: fast/table/border-collapsing/equal-precedence-resolution.html

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::collapsedLeftBorder): When calling
        compareBorders() with borders that may have the same precedence, made
        sure to pass the border belonging to the earlier (in document order)
        element first, since compareBorders() prefers the first argument when
        there is a tie.
        (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
        (WebCore::RenderTableCell::collapsedTopBorder): Ditto.

LayoutTests:

        Reviewed by Dave Hyatt.

        - test for http://bugs.webkit.org/show_bug.cgi?id=17819
          Border-collapse: collapse later cell wins on PC, earlier cell on Mac

        * fast/table/border-collapsing/equal-precedence-resolution.html: Added.
        * platform/mac/fast/table/border-collapsing/equal-precedence-resolution-expected.checksum: Added.
        * platform/mac/fast/table/border-collapsing/equal-precedence-resolution-expected.png: Added.
        * platform/mac/fast/table/border-collapsing/equal-precedence-resolution-expected.txt: Added.

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

12 years ago Another Windows build fix after r31034
aroben@apple.com [Thu, 13 Mar 2008 22:07:23 +0000 (22:07 +0000)]
    Another Windows build fix after r31034

        * WebKitDLL.cpp:
        (loadResourceIntoBuffer): Use SharedBuffer::create.

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

12 years agoBuild fixes after r31034
aroben@apple.com [Thu, 13 Mar 2008 21:40:43 +0000 (21:40 +0000)]
Build fixes after r31034

WebCore:

        wx build fix and Windows leak fix after r31034

        * platform/graphics/wx/ImageWx.cpp:
        (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
        * platform/win/SharedBufferWin.cpp:
        (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
        leaking the SharedBuffer here before).

WebKit/win:

        Windows build fix after r31034

        * WebFrame.cpp:
        (WebFrame::loadData): Use SharedBuffer::create.
        (WebFrame::loadHTMLString): Ditto.

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

12 years ago Reviewed by Eric.
antti@apple.com [Thu, 13 Mar 2008 21:31:14 +0000 (21:31 +0000)]
    Reviewed by Eric.

        Correct a few issues spotted by Mike Belshe.

        * html/PreloadScanner.cpp:
        (WebCore::PreloadScanner::tokenize):
        * loader/loader.cpp:
        (WebCore::Loader::cancelRequests):

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

12 years agoFix GTK+ build for SharedBuffer changes.
aroben@apple.com [Thu, 13 Mar 2008 21:26:55 +0000 (21:26 +0000)]
Fix GTK+ build for SharedBuffer changes.

WebCore:

2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>

        Fix GTK+ build for SharedBuffer changes.

        * platform/graphics/gtk/ImageGtk.cpp:
        (Image::loadPlatformResource):

WebKit/gtk:

2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>

        Fix GTK+ build for SharedBuffer changes.

        * webkit/webkitwebview.cpp:
        (webkit_web_view_load_string):

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

12 years agoWebCore:
sfalken@apple.com [Thu, 13 Mar 2008 21:24:01 +0000 (21:24 +0000)]
WebCore:

        More PGO build fixes.

        * WebCorePrefix.cpp:

WebKit/win:

        More PGO build fixes.

        * WebKit.vcproj/WebKit.pgd: Removed.
        * WebKit.vcproj/WebKit.vcproj:
        * WebKitPrefix.cpp:

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

12 years agoWebCore:
antti@apple.com [Thu, 13 Mar 2008 21:20:31 +0000 (21:20 +0000)]
WebCore:

        Reviewed by Darin.

        Make page loads go fast.

        http://bugs.webkit.org/show_bug.cgi?id=17480

        - Implement speculative preloading. When a script load blocks the main parser, use a side
          parser to pick up more resources.
        - Implement per-host load queues, prioritize scripts and stylesheets over images.

        Depending on content and network latency this may speed things up quite a bit.

        * WebCore.xcodeproj/project.pbxproj:
        * dom/Document.cpp:
        (WebCore::Document::implicitClose):
        Clear the preloads after laoding completes.

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::parseMappedAttribute):
        (WebCore::HTMLLinkElement::tokenizeRelAttribute):
        * html/HTMLLinkElement.h:
        Make tokenizeRelAttribute() public static so it can be used from elsewhere.
        Eliminate a pointless bitfield so I can get references.

        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::scriptHandler):
        (WebCore::HTMLTokenizer::scriptExecution):
        (WebCore::HTMLTokenizer::write):
        * html/HTMLTokenizer.h:
        Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of
        the document while temporary ones are created as needed to scan document.write() output.

        * html/PreloadScanner.cpp: Added.
        (WebCore::PreloadScanner::PreloadScanner):
        (WebCore::PreloadScanner::~PreloadScanner):
        (WebCore::PreloadScanner::begin):
        (WebCore::PreloadScanner::end):
        (WebCore::PreloadScanner::reset):
        (WebCore::PreloadScanner::write):
        (WebCore::isWhitespace):
        (WebCore::PreloadScanner::clearLastCharacters):
        (WebCore::PreloadScanner::rememberCharacter):
        (WebCore::PreloadScanner::lastCharactersMatch):
        (WebCore::legalEntityFor):
        (WebCore::PreloadScanner::consumeEntity):
        (WebCore::PreloadScanner::tokenize):
        (WebCore::PreloadScanner::processAttribute):
        (WebCore::PreloadScanner::emitCharacter):
        (WebCore::PreloadScanner::tokenizeCSS):
        (WebCore::PreloadScanner::emitTag):
        (WebCore::PreloadScanner::emitCSSRule):
        * html/PreloadScanner.h: Added.
        (WebCore::PreloadScanner::inProgress):
        (WebCore::PreloadScanner::):
        HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.

        * loader/Cache.cpp:
        (WebCore::Cache::pruneDeadResources):
        Preloads have zero refcount, avoid kicking them out too early.

        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::ref):
        * loader/CachedResource.h:
        (WebCore::CachedResource::):
        (WebCore::CachedResource::preloadResult):
        (WebCore::CachedResource::setRequestedFromNetworkingLayer):
        (WebCore::CachedResource::canDelete):
        (WebCore::CachedResource::isPreloaded):
        (WebCore::CachedResource::increasePreloadCount):
        (WebCore::CachedResource::decreasePreloadCount):
        Keep track which resources are preloads. Avoid deleting them. Track
        at which point of the loading preloads get utilized to enable some interesting
        statistics.

        * loader/DocLoader.cpp:
        (WebCore::DocLoader::~DocLoader):
        (WebCore::DocLoader::checkForReload):
        (WebCore::DocLoader::registerPreload):
        (WebCore::DocLoader::clearPreloads):
        (WebCore::DocLoader::printPreloadStats):
        * loader/DocLoader.h:
        Ensure we utilize preloaded resources during reloads.
        Keep a list of all preloads in the document. Clear the preloads after
        parsing is complete. Some debug statistics.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::isLoadingInAPISense):
        Avoid signaling that loading is complete too early.

        * loader/loader.cpp:
        (WebCore::Loader::Loader):
        (WebCore::Loader::~Loader):
        (WebCore::Loader::determinePriority):
        (WebCore::Loader::load):
        (WebCore::Loader::scheduleServePendingRequests):
        (WebCore::Loader::requestTimerFired):
        (WebCore::Loader::servePendingRequests):
        (WebCore::Loader::cancelRequests):
        (WebCore::Loader::Host::Host):
        (WebCore::Loader::Host::~Host):
        (WebCore::Loader::Host::addRequest):
        (WebCore::Loader::Host::hasRequests):
        (WebCore::Loader::Host::servePendingRequests):
        (WebCore::Loader::Host::didFinishLoading):
        (WebCore::Loader::Host::didFail):
        (WebCore::Loader::Host::didReceiveResponse):
        (WebCore::Loader::Host::didReceiveData):
        (WebCore::Loader::Host::cancelPendingRequests):
        (WebCore::Loader::Host::cancelRequests):
        * loader/loader.h:
        (WebCore::Loader::):
        Distribute load requests to per-host priority queues. Limit the number of loads issued to the
        networking layer so we have better changes of getting important requests through first.
        Prioritize scripts > stylesheets > images.

WebKit/mac:

        Reviewed by Darin.

        * ForwardingHeaders/wtf/Deque.h: Added.

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

12 years ago This patch makes full page zoom work pretty well. It fixes repainting so...
hyatt@apple.com [Thu, 13 Mar 2008 21:01:04 +0000 (21:01 +0000)]
    This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
        are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
        zooming. The page will still try to constrain to the viewport size even when zoomed.

        Reviewed by john

        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):
        Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
        caused by jumping from a zoomed state back to the standard size.

        * page/FrameView.cpp:
        (WebCore::FrameView::adjustViewSize):
        Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
        need to handle zoomed coordinates).

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calcHeight):
        Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
        stretching to fill the viewport.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::setHasVisibleContent):
        Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.

        * rendering/RenderView.cpp:
        (WebCore::RenderView::calcHeight):
        (WebCore::RenderView::calcWidth):
        Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
        behavior.

        (WebCore::RenderView::layout):
        When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
        the viewport size.

        (WebCore::RenderView::computeAbsoluteRepaintRect):
        Patched to take into account transforms set on the RenderView.

        (WebCore::RenderView::docHeight):
        (WebCore::RenderView::docWidth):
        Patched to just always use m_width and m_height initially, since those have already been adjusted for
        the zoom factor.

        (WebCore::RenderView::zoomedHeight):
        (WebCore::RenderView::zoomedWidth):
        * rendering/RenderView.h:
        New helper methods for obtaining the adjusted width/height of the viewport taking into account the
        zoom factor.

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

12 years ago Build fix.
andersca@apple.com [Thu, 13 Mar 2008 20:02:54 +0000 (20:02 +0000)]
    Build fix.

        * WebCore.base.exp:

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

12 years agoWebCore:
andersca@apple.com [Thu, 13 Mar 2008 19:08:06 +0000 (19:08 +0000)]
WebCore:

        Reviewed by Adam.

        Get rid of actualRequest, it is not used anymore. Also, get rid of
        initialRequest and replace all uses with originalRequest because those are
        the same thing.

        * loader/DocumentLoader.cpp:
        * loader/DocumentLoader.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::initialRequest):
        (WebCore::FrameLoader::originalRequestURL):

WebKit/mac:

        Reviewed by Adam.

        Call originalRequest, not initialRequest.

        * WebView/WebDataSource.mm:
        (-[WebDataSource initialRequest]):

WebKit/win:

        Reviewed by Adam.

        Call originalRequest instead of initialRequest.

        * WebDataSource.cpp:
        (WebDataSource::initialRequest):

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

12 years ago Reviewed by Anders
beidson@apple.com [Thu, 13 Mar 2008 19:00:55 +0000 (19:00 +0000)]
    Reviewed by Anders

        Convert SharedBuffer to start with a refCount of 1

        * loader/ImageDocument.cpp:
        (WebCore::ImageTokenizer::finish):

        * loader/ResourceLoader.cpp:
        (WebCore::ResourceLoader::addData):
        (WebCore::ResourceLoader::willStopBufferingData):

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultIcon):
        (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):

        * loader/loader.cpp:
        (WebCore::Loader::didReceiveData):

        * platform/SharedBuffer.h:
        (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
        (WebCore::SharedBuffer::copy):
        * platform/mac/SharedBufferMac.mm:
        (WebCore::SharedBuffer::wrapNSData):
        (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1

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

12 years agoJavaScriptCore:
sfalken@apple.com [Thu, 13 Mar 2008 18:37:23 +0000 (18:37 +0000)]
JavaScriptCore:

        PGO build fixes.

        Disable PGO for normal release builds.
        Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

WebCore:

        PGO build fixes.

        Disable PGO for normal release builds.
        Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.

        * WebCore.vcproj/WebCore.vcproj:

WebKit/win:

        PGO build fixes.

        Disable PGO for normal release builds.
        Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.

        * WebKit.vcproj/WebKit.vcproj:

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

12 years ago Reviewed by Geoff.
bdakin@apple.com [Thu, 13 Mar 2008 18:32:07 +0000 (18:32 +0000)]
    Reviewed by Geoff.

        Adding new functionality to Vector. Currently all of the shrink and
        resize functions on Vector only shrink the size of the Vector, not
        the capacity. For the Vector to take up as little memory as
        possible, though, it is necessary to be able to shrink the capacity
        as well. So this patch adds that functionality.

        I need this for a speed up I am working on, and Geoff wants to use
        it in a speed up he is working on also, so he asked me to commit it
        now.

        * wtf/Vector.h:
        (WTF::VectorBufferBase::allocateBuffer):
        (WTF::::shrinkCapacity):

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

12 years ago Reviewed by Darin.
andersca@apple.com [Thu, 13 Mar 2008 18:18:19 +0000 (18:18 +0000)]
    Reviewed by Darin.

        Make a bunch of DocumentLoader setters/getters inline.

        * loader/DocumentLoader.cpp:
        * loader/DocumentLoader.h:
        (WebCore::DocumentLoader::isStopping):
        (WebCore::DocumentLoader::setCommitted):
        (WebCore::DocumentLoader::isCommitted):
        (WebCore::DocumentLoader::isLoading):
        (WebCore::DocumentLoader::setLoading):
        (WebCore::DocumentLoader::response):
        (WebCore::DocumentLoader::mainDocumentError):
        (WebCore::DocumentLoader::setResponse):
        (WebCore::DocumentLoader::isClientRedirect):
        (WebCore::DocumentLoader::setIsClientRedirect):
        (WebCore::DocumentLoader::overrideEncoding):
        (WebCore::DocumentLoader::responses):
        (WebCore::DocumentLoader::triggeringAction):
        (WebCore::DocumentLoader::setTriggeringAction):
        (WebCore::DocumentLoader::setOverrideEncoding):
        (WebCore::DocumentLoader::setLastCheckedRequest):
        (WebCore::DocumentLoader::lastCheckedRequest):
        (WebCore::DocumentLoader::title):
        (WebCore::DocumentLoader::setLoadingFromCachedPage):
        (WebCore::DocumentLoader::isLoadingFromCachedPage):

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

12 years agoAttempt at fixing the Qt/Windows build bot. Quote using double-quotes
hausmann@webkit.org [Thu, 13 Mar 2008 16:17:13 +0000 (16:17 +0000)]
Attempt at fixing the Qt/Windows build bot. Quote using double-quotes
instead of single quotes.

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

12 years ago2008-03-13 Rodney Dawes <dobey@wayofthemonkey.com>
aroben@apple.com [Thu, 13 Mar 2008 15:19:45 +0000 (15:19 +0000)]
2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>

        Fix builds without SVG enabled.

        * page/Frame.cpp:
        (Frame::shouldApplyTextZoom):
        (Frame::shouldApplyPageZoom):

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

12 years ago Reviewed by John Sullivan.
darin@apple.com [Thu, 13 Mar 2008 14:49:06 +0000 (14:49 +0000)]
    Reviewed by John Sullivan.

        - cleanup after removing the bridge

        * DOM/WebDOMOperations.mm:
        (-[DOMDocument URLWithAttributeString:]): Call computeURL directly.

        * Misc/WebCoreStatistics.mm:
        (-[WebFrame renderTreeAsExternalRepresentation]): Call externalRepresentation directly.

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView loadPluginRequest:]): Use core function instead of
        _frameLoader method.
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
        Ditto.
        * Plugins/WebPluginController.mm:
        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Ditto.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::frameLoaderDestroyed): Added a call to the new _clearCoreFrame
        method. Without this we could leave a stale frame pointer around.
        (WebFrameLoaderClient::dispatchDidReceiveIcon): Rewrote assertion so it's not the single
        caller of the _isMainFrame method.
        (WebFrameLoaderClient::transitionToCommittedForNewPage): Use core function instead of
        _frameLoader method.
        (WebFrameLoaderClient::createFrame): Moved code here from _addChild.

        * WebView/WebFrame.mm: Removed lots of methods. Some were moved elsewhere, others
        turned out to be unused.
        (core): Added overload for DocumentFragment.
        (kit): Ditto.
        (-[WebFrame _loadURL:referrer:intoChild:]): Get to Frame using _private->coreFrame and
        to FrameLoader with _private->coreFrame->loader().
        (-[WebFrame _attachScriptDebugger]): Ditto.
        (-[WebFrame _clearCoreFrame]): Added.
        (-[WebFrame _updateBackground]): More of the same.
        (-[WebFrame _unmarkAllBadGrammar]): Ditto.
        (-[WebFrame _unmarkAllMisspellings]): Ditto.
        (-[WebFrame _hasSelection]): Ditto.
        (-[WebFrame _atMostOneFrameHasSelection]): Ditto.
        (-[WebFrame _findFrameWithSelection]): Ditto.
        (-[WebFrame _dataSource]): Ditto.
        (-[WebFrame _addData:]): Streamlined code a bit.
        (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
        (-[WebFrame _receivedData:textEncodingName:]): Ditto.
        (-[WebFrame _isDescendantOfFrame:]): Ditto.
        (-[WebFrame _bodyBackgroundColor]): Ditto.
        (-[WebFrame _isFrameSet]): Ditto.
        (-[WebFrame _firstLayoutDone]): Ditto.
        (-[WebFrame _loadType]): Ditto.
        (-[WebFrame _isDisplayingStandaloneImage]): Ditto.
        (-[WebFrame name]): Ditto.
        (-[WebFrame DOMDocument]): Ditto.
        (-[WebFrame frameElement]): Ditto.
        (-[WebFrame provisionalDataSource]): Ditto.
        (-[WebFrame dataSource]): Ditto.
        (-[WebFrame loadRequest:]): Ditto.
        (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Ditto.
        (-[WebFrame loadArchive:]): Ditto.
        (-[WebFrame stopLoading]): Ditto.
        (-[WebFrame reload]): Ditto.
        (-[WebFrame findFrameNamed:]): Ditto.
        (-[WebFrame parentFrame]): Ditto.
        (-[WebFrame childFrames]): Ditto.
        (-[WebFrame windowObject]): Ditto.
        (-[WebFrame globalContext]): Ditto.

        * WebView/WebFrameInternal.h: Added overloads of core and kit.
        Removed method declarations.

        * WebView/WebHTMLRepresentation.mm:
        (-[WebHTMLRepresentation documentSource]): Moved code here from WebFrame.
        (formElementFromDOMElement): Ditto.
        (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
        (inputElementFromDOMElement): Ditto.
        (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
        (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
        (-[WebHTMLRepresentation formForElement:]): Ditto.
        (-[WebHTMLRepresentation currentForm]): Ditto.
        (-[WebHTMLRepresentation controlsInForm:]): Ditto.
        (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
        (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _frameOrBoundsChanged]): Moved sendScrollEvent code here from WebFrame.
        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
        Call createFragmentFromText directly instead of via WebFrame.
        (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
        Moved layout calls here from WebFrame.
        (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
        (-[WebHTMLView _updateFontPanel]): Ditto, but with fontForSelection.
        (-[WebHTMLView _canSmartCopyOrDelete]): Ditto, but with selectionGranularity.
        (-[WebHTMLView markedRange]): Moved code here from _markedTextNSRange.
        (-[WebHTMLView attributedSubstringFromRange:]): Tweaked code a bit.
        (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
        Moved code here from WebFrame.
        (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.
        (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
        (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
        (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
        (-[WebHTMLView unmarkAllTextMatches]): Ditto.
        (-[WebHTMLView rectsForTextMatches]): Ditto.

        * WebView/WebHTMLViewInternal.h: Removed unused method declarations.

        * WebView/WebPDFView.mm:
        (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Use core function instead of
        _frameLoader method.

        * WebView/WebRenderNode.mm:
        (copyRenderNode): Moved code here from WebFrame.
        (-[WebRenderNode initWithWebFrameView:]): Ditto.

        * WebView/WebResource.mm:
        (-[WebResource _stringValue]): Moved code here from WebFrame.

        * WebView/WebView.mm:
        (-[WebView _close]): Use core function intsead of _frameLoader method.
        (-[WebView setCustomTextEncodingName:]): Ditto.
        (-[WebView setHostWindow:]): Moved code here from WebFrame.
        (aeDescFromJSValue): Moved this here from WebFrame.
        (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Moved code here from WebFrame.

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

12 years agoFix the Qt build.
hausmann@webkit.org [Thu, 13 Mar 2008 12:17:15 +0000 (12:17 +0000)]
Fix the Qt build.

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

12 years ago Reviewed by Darin Adler.
weinig@apple.com [Thu, 13 Mar 2008 07:11:26 +0000 (07:11 +0000)]
    Reviewed by Darin Adler.

        Fix <rdar://problem/5784773>
        Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)

        Make bridged RuntimeObjects get collected on the main thread only. This is necessary
        because clients of the bridged objects are unlikely to prepared for a collection on
        non-main thread, which can happen with a PAC file.

        * bridge/runtime_object.cpp:
        (RuntimeObjectImp::RuntimeObjectImp):

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

12 years ago Fix Bug 17815: Inspector's DOM tree should descend into subframes
aroben@apple.com [Thu, 13 Mar 2008 06:13:32 +0000 (06:13 +0000)]
    Fix Bug 17815: Inspector's DOM tree should descend into subframes

        <http://bugs.webkit.org/show_bug.cgi?id=17815>

        Reviewed by Tim.

        * page/inspector/DocumentPanel.js:
        (WebInspector.DocumentPanel.revealNode): Changed to provide
        _isAncestorIncludingParentFramesWithinPanel and
        _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
        parameters to findTreeElement so that parent frames will be searched.
        (WebInspector.DocumentPanel.updateBreadcrumb):
          - Changed while loop to for loop
          - Use _parentNodeOrFrameElementWithinPanel instead of
            Node.parentNode to move to the next node
          - The loop now ends when we reach the DocumentPanel's document node
          - Traversal past other Document nodes is now allowed
          - We add the "start" class to the final crumb after the loop exits
        (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
        that returns the node itself if the node is a Document node, or the
        node's ownerDocument otherwise.
        (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
        Added. Returns the node's parent node or, in the case of a Document
        node, the node's window's owning frame element, but will not return a
        node that is in a parent frame of the DocumentPanel's Document.
        (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
        Added. Returns true if a is an ancestor of b if a is an ancestor of a
        frame element whose subframe(s) contain b.
        (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
        children if we have a contentDocument.
        (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
        loop into a function so that we can add both children of our
        contentDocument and children of our node to the tree.
        (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
        the rootDOMNode by traversing the tree outline hierarchy instead of
        the DOM hierarchy so that we can easily jump up to a parent frame.

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

12 years ago Update the styles/metrics panes and breadcrumb after editing DOM attributes
aroben@apple.com [Thu, 13 Mar 2008 06:13:02 +0000 (06:13 +0000)]
     Update the styles/metrics panes and breadcrumb after editing DOM attributes

         Reviewed by Tim.

         * page/inspector/DocumentPanel.js:
         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
         the parts of the DocumentPanel other than the DOM tree into a new
         function, _focusedNodeChanged.
         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
         forceUpdate parameter specifies whether the update should occur even
         if the focused node hasn't changed since the last update.
         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
         parameter. If forceUpdate is true, we always rebuild the styles pane.
         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
         call to DocumentPanel._focusedNodeChanged. We have to force the update
         because we haven't changed the focused node (the attributes of the
         node have changed).
         * page/inspector/StylesSidebarPane.js:
         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
         parameter. If forceUpdate is true we always rebuild the styles.

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

12 years ago Fix build.
sfalken@apple.com [Thu, 13 Mar 2008 06:05:32 +0000 (06:05 +0000)]
    Fix build.

        * WebKit.vcproj/WebKit.vcproj:

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

12 years ago New version of WebKitSystemInterface.lib with
sfalken@apple.com [Thu, 13 Mar 2008 05:49:03 +0000 (05:49 +0000)]
    New version of WebKitSystemInterface.lib with
        more compiler warnings suppressed.

        * win/lib/WebKitSystemInterface.lib:
        * win/tools/vsprops/common.vsprops:

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

12 years agoFurther Gtk and Qt build fixes.
mrowe@apple.com [Thu, 13 Mar 2008 05:40:12 +0000 (05:40 +0000)]
Further Gtk and Qt build fixes.

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

12 years agoTouch file to build WebKit.
sfalken@apple.com [Thu, 13 Mar 2008 05:39:17 +0000 (05:39 +0000)]
Touch file to build WebKit.

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

12 years agoFix Gtk and Qt builds.
mrowe@apple.com [Thu, 13 Mar 2008 05:30:41 +0000 (05:30 +0000)]
Fix Gtk and Qt builds.

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

12 years agoMac build fix.
mrowe@apple.com [Thu, 13 Mar 2008 05:26:54 +0000 (05:26 +0000)]
Mac build fix.

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

12 years ago Build fix.
sfalken@apple.com [Thu, 13 Mar 2008 05:02:50 +0000 (05:02 +0000)]
    Build fix.

        * page/win/FrameWin.cpp:

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

12 years ago Build fix.
sfalken@apple.com [Thu, 13 Mar 2008 04:20:06 +0000 (04:20 +0000)]
    Build fix.

        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginView::bindingInstance):

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

12 years ago <rdar://problem/5795843>
adachan@apple.com [Thu, 13 Mar 2008 03:50:40 +0000 (03:50 +0000)]
    <rdar://problem/5795843>
        CFURLDownload needs to be cancelled if we don't have a destination path
        to save resume information.

        Reviewed by Brady.

        * WebDownload.cpp:
        (WebDownload::cancelForResume):

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

12 years agoWebCore:
darin@apple.com [Thu, 13 Mar 2008 03:48:28 +0000 (03:48 +0000)]
WebCore:

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17640
          eliminate WebCoreFrameBridge

        * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
        to WebFrame in WebKit.
        * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
        WebCoreFrameBridge.h and WebCoreFrameBridge.mm.

        * page/Frame.cpp:
        (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
        the WebCoreFrameBridge.
        * page/Frame.h: Added initJavaJSBindings function.

        * page/mac/FrameMac.mm:
        (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
        (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.

        * page/mac/WebCoreFrameBridge.h: Removed.
        * page/mac/WebCoreFrameBridge.mm: Removed.

WebKit:

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17640
          eliminate WebCoreFrameBridge

        * StringsNotToBeLocalized.txt: Updated for recent changes.
        * WebKit.xcodeproj/project.pbxproj: Removed WebFrameBridge.h and WebFrameBridge.mm.

WebKit/mac:

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17640
          eliminate WebCoreFrameBridge

        Moved all the code from the bridge into WebFrame. This need not be the final
        home of these methods -- they can be moved closer to their callers and improved
        further -- but it eliminates the bridge without requiring a rewrite of the code.
        It's a fairly mechanical process (just adding underscores to method names really).

        There's even a chance that some of the methods are unused. Those we can remove
        after checking if that's so.

        * DOM/WebDOMOperations.mm:
        (-[DOMNode markupString]): Use WebFrame rather than bridge.
        (-[DOMDocument webFrame]): Changed to use the core and kit functions
        instead of using the bridge.
        (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
        (-[DOMRange markupString]): Ditto.
        * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.

        * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
        * History/WebHistoryItem.mm: Ditto.

        * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
        * Misc/WebCoreStatistics.mm:
        (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.

        * Misc/WebElementDictionary.mm: Removed unneeded import.

        * Misc/WebKitStatistics.m:
        (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
        * Misc/WebKitStatisticsPrivate.h: Ditto.

        * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
        * Misc/WebNSPasteboardExtras.mm: Ditto.

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
        rather than bridge.

        * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
        * Plugins/WebNetscapePluginStream.mm: Ditto.

        * Plugins/WebPluginContainerCheck.mm:
        (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
        bridge to get to the WebCore::Frame.

        * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
        * Plugins/WebPluginController.mm:
        (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
        rather than bridge.

        * WebCoreSupport/WebEditorClient.mm:
        (selectorForKeyEvent): Tweaked comment.

        * WebCoreSupport/WebFrameBridge.h: Removed.
        * WebCoreSupport/WebFrameBridge.mm: Removed.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
        (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
        I could remove this function entirely, but it looks like the Qt port is using it.

        * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.

        * WebView/WebArchiver.mm:
        (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
        (+[WebArchiver archiveNode:]): Ditto.
        (+[WebArchiver archiveSelectionInFrame:]): Ditto.

        * WebView/WebDataSource.mm:
        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
        (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
        (-[WebDataSource subresources]): Ditto.
        (-[WebDataSource subresourceForURL:]): Ditto.

        * WebView/WebDataSourceInternal.h: Removed _bridge method.

        * WebView/WebFrame.mm:
        (-[WebFramePrivate dealloc]): Removed code to release the bridge.
        (core): Go directly to the core frame, not via the bridge.
        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
        Remove the code to deal with the bridge.
        (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
        shouldCreateRenderers flag, formerly on the bridge.
        (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
        (aeDescFromJSValue): Moved here from bridge.
        (-[WebFrame _domain]): Ditto.
        (-[WebFrame _addData:]): Ditto.
        (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
        (-[WebFrame _nodesFromList:]): Ditto.
        (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
        (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
        (-[WebFrame _selectedString]): Ditto.
        (-[WebFrame _stringForRange:]): Ditto.
        (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
        (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
        (-[WebFrame _sendScrollEvent]): Ditto.
        (-[WebFrame _drawRect:]): Ditto.
        (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
        (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
        (-[WebFrame _copyRenderNode:copier:]): Ditto.
        (-[WebFrame _copyRenderTree:]): Ditto.
        (inputElementFromDOMElement): Ditto.
        (formElementFromDOMElement): Ditto.
        (-[WebFrame _elementWithName:inForm:]): Ditto.
        (-[WebFrame _elementDoesAutoComplete:]): Ditto.
        (-[WebFrame _elementIsPassword:]): Ditto.
        (-[WebFrame _formForElement:]): Ditto.
        (-[WebFrame _currentForm]): Ditto.
        (-[WebFrame _controlsInForm:]): Ditto.
        (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
        (-[WebFrame _matchLabels:againstElement:]): Ditto.
        (-[WebFrame _URLWithAttributeString:]): Ditto.
        (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
        (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
        (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
        (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
        (-[WebFrame _unmarkAllTextMatches]): Ditto.
        (-[WebFrame _rectsForTextMatches]): Ditto.
        (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
        (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
        (-[WebFrame _firstRectForDOMRange:]): Ditto.
        (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
        (-[WebFrame _baseURL]): Ditto.
        (-[WebFrame _stringWithData:]): Ditto.
        (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
        (-[WebFrame _needsLayout]): Ditto.
        (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
        (-[WebFrame _accessibilityTree]): Ditto.
        (-[WebFrame _setBaseBackgroundColor:]): Ditto.
        (-[WebFrame _setDrawsBackground:]): Ditto.
        (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
        Ditto.
        (-[WebFrame _selectionGranularity]): Ditto.
        (-[WebFrame _convertToNSRange:]): Ditto.
        (-[WebFrame _convertToDOMRange:]): Ditto.
        (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
        (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
        (-[WebFrame _markDOMRange]): Ditto.
        (-[WebFrame _markedTextNSRange]): Ditto.
        (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
        (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
        (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
        (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
        (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
        (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
        (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
        (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
        (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
        (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
        (-[WebFrame _visiblePositionForPoint:]): Ditto.
        (-[WebFrame _characterRangeAtPoint:]): Ditto.
        (-[WebFrame _typingStyle]): Ditto.
        (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
        (-[WebFrame _fontForSelection:]): Ditto.
        (-[WebFrame _dragSourceMovedTo:]): Ditto.
        (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
        (-[WebFrame _getData:andResponse:forURL:]): Ditto.
        (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
        (-[WebFrame _canProvideDocumentSource]): Ditto.
        (-[WebFrame _canSaveAsWebArchive]): Ditto.
        (-[WebFrame _receivedData:textEncodingName:]): Ditto.
        (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
        function. Couldn't just keep the bridge method because this was already here with the same name.
        (-[WebFrame _selectedNSRange]): Ditto.
        (-[WebFrame _selectNSRange:]): Ditto.
        (-[WebFrame dealloc]): Remove bridge-related code.
        (-[WebFrame finalize]): Ditto.

        * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
        Removed the bridge parameter from the init method. Removed the #if blocks that
        tried to make this header work in non-C++ ObjC files -- they were broken and unused.
        Removed the _bridge method.

        * WebView/WebFrameView.mm: Removed the _bridge method.

        * WebView/WebHTMLRepresentation.mm:
        (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
        field.
        (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
        (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
        (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
        (-[WebHTMLRepresentation documentSource]): Ditto.
        (-[WebHTMLRepresentation DOMDocument]): Ditto.
        (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
        (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
        (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
        (-[WebHTMLRepresentation formForElement:]): Ditto.
        (-[WebHTMLRepresentation currentForm]): Ditto.
        (-[WebHTMLRepresentation controlsInForm:]): Ditto.
        (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
        (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.

        * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
        (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
        (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
        (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
        (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
        (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
        (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
        (-[WebHTMLView drawSingleRect:]): Ditto.
        (-[WebHTMLView draggedImage:movedTo:]): Ditto.
        (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
        (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
        (-[WebHTMLView knowsPageRange:]): Ditto.
        (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
        (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
        (-[WebHTMLView accessibilityHitTest:]): Ditto.
        (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
        (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
        (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
        (-[WebHTMLView _changeSpellingToWord:]): Ditto.
        (-[WebHTMLView startSpeaking:]): Ditto.
        (-[WebHTMLView _updateFontPanel]): Ditto.
        (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
        (-[WebHTMLView _layoutIfNeeded]): Ditto.
        (-[WebHTMLView characterIndexForPoint:]): Ditto.
        (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
        (-[WebHTMLView selectedRange]): Ditto.
        (-[WebHTMLView markedRange]): Ditto.
        (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
        (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
        (-[WebHTMLView insertText:]): Ditto.
        (-[WebTextCompleteController _insertMatch:]): Ditto.
        (-[WebTextCompleteController doCompletion]): Ditto.
        (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
        (-[WebHTMLView string]): Ditto.
        (-[WebHTMLView selectedString]): Ditto.
        (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
        (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
        (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
        (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
        (-[WebHTMLView unmarkAllTextMatches]): Ditto.
        (-[WebHTMLView rectsForTextMatches]): Ditto.
        * WebView/WebRenderNode.mm:
        (-[WebRenderNode initWithWebFrameView:]): Ditto.
        * WebView/WebResource.mm:
        (-[WebResource _stringValue]): Ditto.

        * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.

        * WebView/WebView.mm:
        (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
        (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
        (-[WebView _setInViewSourceMode:]): Ditto.
        (-[WebView _inViewSourceMode]): Ditto.
        (-[WebView _executeCoreCommandByName:value:]): Ditto.
        (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
        (-[WebView scrollDOMRangeToVisible:]): Ditto.
        (-[WebView setSelectedDOMRange:affinity:]): Ditto.
        (-[WebView setEditable:]): Ditto.
        (-[WebView setTypingStyle:]): Ditto.
        (-[WebView typingStyle]): Ditto.
        (-[WebView replaceSelectionWithNode:]): Ditto.
        (-[WebView replaceSelectionWithText:]): Ditto.
        (-[WebView replaceSelectionWithMarkupString:]): Ditto.
        (-[WebView replaceSelectionWithArchive:]): Ditto.
        (-[WebView _insertNewlineInQuotedContent]): Ditto.
        (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.

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

12 years ago Reviewed by Anders Carlsson.
weinig@apple.com [Thu, 13 Mar 2008 03:40:47 +0000 (03:40 +0000)]
    Reviewed by Anders Carlsson.

        Don't go through the Document just to get the frame Element.

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::frameElement):

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

12 years ago Reviewed by Geoff and Sam.
andersca@apple.com [Thu, 13 Mar 2008 03:18:33 +0000 (03:18 +0000)]
    Reviewed by Geoff and Sam.

        More Instance cleanup:

        * Make Instance inherit from RefCounted instead of doing its own refcounting.
        * Make all Instance subclasses private, add static create methods.
        * Have Instance start out with a refcount of 1.
        * Get rid of Instance::createBindingForLanguageInstance and call the individual
          instance constructor methods instead.
        * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
          refcounting is done correctly.

        * bridge/c/c_instance.h:
        (KJS::Bindings::CInstance::create):
        * bridge/c/c_utility.cpp:
        (KJS::Bindings::convertNPVariantToValue):
        * bridge/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bridge/jni/jni_instance.h:
        (KJS::Bindings::JavaInstance::create):
        * bridge/jni/jni_jsobject.cpp:
        (JavaJSObject::convertJObjectToValue):
        * bridge/jni/jni_runtime.cpp:
        (JavaField::valueFromInstance):
        (JavaArray::valueAt):
        * bridge/objc/objc_instance.h:
        (KJS::Bindings::ObjcInstance::create):
        * bridge/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):
        * bridge/qt/qt_instance.cpp:
        (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
        (KJS::Bindings::QtInstance::getQtInstance):
        (KJS::Bindings::QtInstance::getRuntimeObject):
        * bridge/qt/qt_instance.h:
        * bridge/runtime.cpp:
        (KJS::Bindings::Instance::Instance):
        (KJS::Bindings::Instance::createRuntimeObject):
        * bridge/runtime.h:
        * bridge/runtime_object.cpp:
        (RuntimeObjectImp::RuntimeObjectImp):
        * bridge/runtime_object.h:
        * page/Frame.h:
        * page/mac/FrameMac.mm:
        (WebCore::Frame::createScriptInstanceForWidget):
        * page/win/FrameWin.cpp:
        (WebCore::Frame::createScriptInstanceForWidget):
        * plugins/PluginView.h:
        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginView::bindingInstance):

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

12 years ago Suggested by Darin Adler. Reviewed by Dave Hyatt.
mitz@apple.com [Thu, 13 Mar 2008 00:25:55 +0000 (00:25 +0000)]
    Suggested by Darin Adler. Reviewed by Dave Hyatt.

        - speed up BidiIterator::direction()

        * rendering/bidi.cpp:
        (WebCore::BidiIterator::current): Made inline and corrected the
        out-of-bounds condition to work with 0-length text and offsets beyond
        the end of the text.
        (WebCore::BidiIterator::direction): Changed to call current() and not
        call the virtual method isListMarker() most of the time.
        (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
        (WebCore::appendRunsForObject): Ditto.

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

12 years ago Make URLs not be underlined while editing them in the DOM view
aroben@apple.com [Wed, 12 Mar 2008 23:00:34 +0000 (23:00 +0000)]
    Make URLs not be underlined while editing them in the DOM view

        Reviewed by Tim.

        * page/inspector/inspector.css:

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

12 years ago Part of Bug 17224: DOM nodes/attributes should be editable
aroben@apple.com [Wed, 12 Mar 2008 23:00:00 +0000 (23:00 +0000)]
    Part of Bug 17224: DOM nodes/attributes should be editable

        <http://bugs.webkit.org/show_bug.cgi?id=17224>
        <rdar://problem/5732825>

        We now start editing if the user single-clicks on an attribute,
        attribute value, or text node while the parent element is selected.
        Previously, we started editing on double-click regardless of the
        selection state of the element.

        URLs in the DOM tree are now followed on Alt/Option-click, rather than
        on just click.

        Reviewed by Tim.

        * English.lproj/InspectorLocalizedStrings.js: Added four new localized
        strings.
        * page/inspector/DocumentPanel.js:
        (WebInspector.DOMNodeTreeElement.onattach): Call new
        _makeURLSActivateOnModifiedClick.
        (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
        Added. Changes the tooltip of each link in this element to indicate
        that Alt/Option-click will follow the URL, and sets the
        followOnAltClick property on each link.
        (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
        selected.
        (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
        being selected, start editing.
        (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
        editing here. We block re-rooting of the tree if we're currently
        editing.
        (WebInspector.DOMNodeTreeElement._startEditing):
          - Don't do anything if we're not focused
          - Pass the event down to _startEditingAttribute.
        (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
        anything if the event target is a URL and the Alt/Option key is
        pressed -- in this case we want to follow the link.
        (WebInspector.DOMNodeTreeElement._updateTitle): Call
        _makeURLsActivateOnClick again since the anchor elements have all been
        recreated.
        * page/inspector/inspector.js:
        (WebInspector.documentClick): If the anchor as a followOnAltClick
        property and the Alt/Option key is not pressed, do nothing.

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

12 years ago Fixed the initial value of zoom factor.
adachan@apple.com [Wed, 12 Mar 2008 22:23:15 +0000 (22:23 +0000)]
    Fixed the initial value of zoom factor.

        Reviewed by Adam.

        * page/Frame.cpp:
        (WebCore::FramePrivate::FramePrivate):

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

12 years ago Make full page zoom vaguely work. This patch uses the CSS transform system...
hyatt@apple.com [Wed, 12 Mar 2008 21:41:12 +0000 (21:41 +0000)]
    Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
        document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
        are just bugs with transforms themselves).

        Reviewed by Adam Roben

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
        * dom/Document.cpp:
        (WebCore::Document::recalcStyle):
        * page/Frame.cpp:
        (WebCore::Frame::shouldApplyTextZoom):
        (WebCore::Frame::shouldApplyPageZoom):
        * page/Frame.h:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPositions):
        (WebCore::RenderLayer::setHasVisibleContent):
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::hitTestLayer):
        * rendering/RenderLayer.h:

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

12 years agoTouch file to force WebKit rebuild
sfalken@apple.com [Wed, 12 Mar 2008 21:33:57 +0000 (21:33 +0000)]
Touch file to force WebKit rebuild

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

12 years ago Build fix.
sfalken@apple.com [Wed, 12 Mar 2008 20:57:13 +0000 (20:57 +0000)]
    Build fix.

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:

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

12 years ago2008-03-12 Tommi Komulainen <tommi.komulainen@iki.fi>
alp@webkit.org [Wed, 12 Mar 2008 19:40:15 +0000 (19:40 +0000)]
2008-03-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=17799
        WebView signals should use more specific types

        * webkit/webkitwebview.cpp: Use WEBKIT_TYPE_WEB_FRAME argument
        type in "script-alert", "script-confirm", "script-script-prompt"
        signals so that it gets more clearly documented rather than just
        plain GObject.

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

12 years agoWebCore:
hyatt@apple.com [Wed, 12 Mar 2008 19:14:44 +0000 (19:14 +0000)]
WebCore:

        Make the zoom factor a float and not a percent.

        Reviewed by antti

        * WebCore.base.exp:
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
        * page/Frame.cpp:
        (WebCore::Frame::zoomFactor):
        (WebCore::Frame::setZoomFactor):
        * page/Frame.h:
        * page/FramePrivate.h:
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::currentScale):
        (WebCore::SVGSVGElement::setCurrentScale):

WebKit/mac:

        Make the zoom factor a float and not a percent.

        Reviewed by antti

        * WebView/WebView.mm:
        (-[WebView _setZoomMultiplier:isTextOnly:]):

WebKit/win:

        Make the zoom factor a float and not a percent.

        Reviewed by antti

        * WebFrame.cpp:
        (WebFrame::setTextSizeMultiplier):

WebKit/wx:

        Make the zoom factor a float and not a percent.

        Reviewed by antti

        * WebView.cpp:
        (wxWebView::IncreaseTextSize):
        (wxWebView::DecreaseTextSize):

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

12 years ago Build fix.
sfalken@apple.com [Wed, 12 Mar 2008 19:10:19 +0000 (19:10 +0000)]
    Build fix.

        * WebKit.vcproj/WebKit.pgd:
        * WebKit.vcproj/WebKit.vcproj:

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

12 years agoSpeculative fix for build bustage. Will be another 20-30 mins before I can get compi...
hyatt@apple.com [Wed, 12 Mar 2008 18:50:32 +0000 (18:50 +0000)]
Speculative fix for build bustage.  Will be another 20-30 mins before I can get compiled enough to know for sure.

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

12 years ago VSExpress build fix
sfalken@apple.com [Wed, 12 Mar 2008 18:50:18 +0000 (18:50 +0000)]
    VSExpress build fix

        * WinLauncher/WinLauncher.vcproj:

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

12 years agoWebCore:
hyatt@apple.com [Wed, 12 Mar 2008 18:33:37 +0000 (18:33 +0000)]
WebCore:

        Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.

        Reviewed by Tim H.

        * WebCore.base.exp:
        * page/mac/WebCoreFrameBridge.h:
        * page/mac/WebCoreFrameBridge.mm:

WebKit/mac:

        This patch prepares Mac WebKit to handle two different zooming modes (full page zoom and text only zoom).
        New API is added that is parallel to the text zoom public API.  You can get/set a pageSizeMultiplier and you
        can zoom the page in, out or reset it to the standard size.

        In the implementation only one zoom factor is stored, and setting one multiplier will shift you into that mode
        and set the common zoom factor.  In other words you can't combine text zoom and page zoom.  One will always
        win.

        Reviewed by Tim H.

        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
        * WebView/WebDocumentInternal.h:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView viewDidMoveToSuperview]):
        * WebView/WebPDFView.h:
        * WebView/WebPDFView.mm:
        (-[WebPDFView _zoomOut:]):
        (-[WebPDFView _zoomIn:]):
        (-[WebPDFView _resetZoom:]):
        (-[WebPDFView _canZoomOut]):
        (-[WebPDFView _canZoomIn]):
        (-[WebPDFView _canResetZoom]):
        * WebView/WebView.mm:
        (-[WebViewPrivate init]):
        (-[WebView setTextSizeMultiplier:]):
        (-[WebView textSizeMultiplier]):
        (-[WebView _setZoomMultiplier:isTextOnly:]):
        (-[WebView _zoomMultiplier:]):
        (-[WebView _realZoomMultiplier]):
        (-[WebView _realZoomMultiplierIsTextOnly]):
        (-[WebView _canZoomOut:]):
        (-[WebView _canZoomIn:]):
        (-[WebView _zoomOut:isTextOnly:]):
        (-[WebView _zoomIn:isTextOnly:]):
        (-[WebView _canResetZoom:]):
        (-[WebView _resetZoom:isTextOnly:]):
        (-[WebView canMakeTextSmaller]):
        (-[WebView makeTextSmaller:]):
        (-[WebView canMakeTextLarger]):
        (-[WebView makeTextLarger:]):
        (-[WebView canMakeTextStandardSize]):
        (-[WebView makeTextStandardSize:]):
        (-[WebView setPageSizeMultiplier:]):
        (-[WebView pageSizeMultiplier]):
        (-[WebView canZoomPageIn]):
        (-[WebView zoomPageIn:]):
        (-[WebView canZoomPageOut]):
        (-[WebView zoomPageOut:]):
        (-[WebView canResetPageZoom]):
        (-[WebView resetPageZoom:]):
        (-[WebView _searchWithSpotlightFromMenu:]):
        * WebView/WebViewInternal.h:
        * WebView/WebViewPrivate.h:

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

12 years agoWebCore:
mitz@apple.com [Wed, 12 Mar 2008 18:31:25 +0000 (18:31 +0000)]
WebCore:

        Reviewed by Darin Adler and Sam Weinig.

        - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard

        Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
        of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
        and CTFontRef being toll-free bridged.

        * WebCore.Tiger.exp:
        * WebCore.base.exp:
        * platform/graphics/mac/FontMac.mm:
        (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
        * platform/graphics/mac/FontPlatformData.h:
        Made m_cgFont a RetainPtr on Leopard.
        (WebCore::toCTFontRef): Added a function that encapsulates the
        toll-free bridging.
        (WebCore::FontPlatformData::FontPlatformData):
        (WebCore::FontPlatformData::cgFont): Added this accessor method.
        * platform/graphics/mac/FontPlatformDataMac.mm:
        (WebCore::FontPlatformData::FontPlatformData): Changed to use
        CoreText API on Leopard.
        (WebCore::FontPlatformData::setFont): Ditto.
        * platform/graphics/mac/SimpleFontDataMac.mm:
        (WebCore::initFontData):
        (WebCore::pathFromFont):
        (WebCore::SimpleFontData::platformInit):
        (WebCore::SimpleFontData::platformWidthForGlyph):
        * platform/mac/WebCoreSystemInterface.mm:

WebKit/mac:

        Reviewed by Darin Adler and Sam Weinig.

        - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard

        * WebCoreSupport/WebSystemInterface.m:
        (InitWebCoreSystemInterface): Made WKGetCGFontFromNSFont and
        WKGetNSFontATSUFontId Tiger-only.

WebKitLibraries:

        Reviewed by Darin Adler and Sam Weinig.

        - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard

        * WebKitSystemInterface.h:
        * libWebKitSystemInterfaceLeopard.a:

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

12 years ago2008-03-12 Holger Hans Peter Freyther <zecke@selfish.org>
alp@webkit.org [Wed, 12 Mar 2008 18:06:54 +0000 (18:06 +0000)]
2008-03-12  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Alp Toker.

        Run testkjs in the correct productsDir in the GTK+ port.

        * Scripts/run-javascriptcore-tests:

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

12 years ago Re-enabled PGO.
sfalken@apple.com [Wed, 12 Mar 2008 17:56:13 +0000 (17:56 +0000)]
    Re-enabled PGO.

        Rubber stamped by Mark Rowe.

        * WebKit.vcproj/WebKit.pgd:
        * WebKit.vcproj/WebKit.vcproj:
        * WebKitPrefix.cpp: touched this file to force a re-build.

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

12 years ago2008-03-12 Alp Toker <alp@atoker.com>
alp@webkit.org [Wed, 12 Mar 2008 17:20:23 +0000 (17:20 +0000)]
2008-03-12  Alp Toker  <alp@atoker.com>

        Another autotools testkjs build fix attempt.

        * GNUmakefile.am:

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

12 years ago - fix http://bugs.webkit.org/show_bug.cgi?id=17794
darin@apple.com [Wed, 12 Mar 2008 16:38:25 +0000 (16:38 +0000)]
    - fix bugs.webkit.org/show_bug.cgi?id=17794
          REGRESSION (r30980): 23 tests hanging on the Mac buildbot

        * WebView/WebFrame.mm:
        (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added missing call to set
        up pointer from the bridge to the frame. (My next check-in removes the bridge
        entirely, but we need this until then.)

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

12 years ago Reviewed by Darin.
harrison@apple.com [Wed, 12 Mar 2008 16:16:40 +0000 (16:16 +0000)]
    Reviewed by Darin.

        <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8

        The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
        called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
        Also saw that cache clearing was missing from Document::detach(), and fixed that.

        Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.

        Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.

        * dom/Document.cpp:
        (WebCore::Document::attach):
        Assert that there is no AX cache (since there is no renderer).

        (WebCore::Document::detach):
        Destroy the AX cache installed on this document.

        (WebCore::Document::clearAXObjectCache):
        New. Destroy the AX cache associated with this document.

        (WebCore::Document::axObjectCache):
        Added some comments.

        * dom/Document.h:
        Declare clearAXObjectCache().

        * page/Frame.cpp:
        (WebCore::Frame::disconnectOwnerElement):
        Destroy the AX cache associated with this frame's document.

        * page/mac/AXObjectCacheMac.mm:
        (WebCore::AXObjectCache::remove):
        * page/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject initWithRenderer:]):
        (-[WebCoreAXObject detach]):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::RenderObject):
        (WebCore::RenderObject::~RenderObject):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::setHasAXObject):
        (WebCore::RenderObject::hasAXObject):
        Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.

        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::destroy):
        Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
        very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().

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

12 years ago2008-03-12 Alp Toker <alp@atoker.com>
alp@webkit.org [Wed, 12 Mar 2008 16:12:46 +0000 (16:12 +0000)]
2008-03-12  Alp Toker  <alp@atoker.com>

        Attempt to fix the autotools testkjs build on systems with
        non-standard include paths.

        * GNUmakefile.am:

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

12 years agoCredit the original patch author in the r30989 ChangeLogs
alp@webkit.org [Wed, 12 Mar 2008 15:08:01 +0000 (15:08 +0000)]
Credit the original patch author in the r30989 ChangeLogs

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

12 years ago2008-03-12 Xan Lopez <xan@gnome.org>
alp@webkit.org [Wed, 12 Mar 2008 15:03:17 +0000 (15:03 +0000)]
2008-03-12  Xan Lopez  <xan@gnome.org>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=15229

        Add Pango font backend.

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

12 years agoFix compilation against Qt 4.3
hausmann@webkit.org [Wed, 12 Mar 2008 08:47:47 +0000 (08:47 +0000)]
Fix compilation against Qt 4.3

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

12 years agoWebCore:
justin.garcia@apple.com [Wed, 12 Mar 2008 08:12:37 +0000 (08:12 +0000)]
WebCore:

        Reviewed by Oliver.

        <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list

        Fixes some (but not all) of the instances of:
        <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
        <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion

        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
        the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
        * editing/RemoveFormatCommand.cpp:
        (WebCore::RemoveFormatCommand::doApply): Added a FIXME.

LayoutTests:

        Reviewed by Oliver.

        <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list

        * editing/execCommand/5770834-1-expected.txt: Added.
        * editing/execCommand/5770834-1.html: Added.

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

12 years ago Reviewed by Darin.
ap@webkit.org [Wed, 12 Mar 2008 08:07:26 +0000 (08:07 +0000)]
    Reviewed by Darin.

        <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
        some sites.

        Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
        if the frame and subframe belong to the same site, then the encoding is inherited from parent
        frame to subframe. Otherwise, it is not.

        Always inheriting the encoding would cause a security problem.

        Tests: http/tests/misc/frame-default-enc-different-domain.html
               http/tests/misc/frame-default-enc-same-domain.html
               fast/encoding/frame-default-enc.html

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
        this function also has code that uses it without checking, so it must be safe.

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

12 years ago Fix build.
sfalken@apple.com [Wed, 12 Mar 2008 08:04:44 +0000 (08:04 +0000)]
    Fix build.

        * WebKit.vcproj/WebKit.vcproj:

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

12 years agoGtk build fix.
mrowe@apple.com [Wed, 12 Mar 2008 07:51:44 +0000 (07:51 +0000)]
Gtk build fix.

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

12 years ago Reviewed by Darin.
ap@webkit.org [Wed, 12 Mar 2008 07:40:16 +0000 (07:40 +0000)]
    Reviewed by Darin.

        <rdar://problem/5787743> REGRESSION: Crash at WTF::Collator::CreateCollator() running fast/js/kde/StringObject.html on Windows

        * wtf/unicode/icu/CollatorICU.cpp:
        (WTF::Collator::createCollator): Check for null (== user default) m_locale before calling strcmp.

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

12 years agoTouch a file in WebKitWin to cause it to build
sfalken@apple.com [Wed, 12 Mar 2008 07:00:09 +0000 (07:00 +0000)]
Touch a file in WebKitWin to cause it to build

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

12 years agoJavaScriptCore:
sfalken@apple.com [Wed, 12 Mar 2008 05:40:03 +0000 (05:40 +0000)]
JavaScriptCore:

        Disable LTCG/PGO for grammar.cpp and nodes.cpp.
        PGO on these files causes us to hang.

        Copy newer vsprops files from relative WebKitLibraries path to environment variable based path.

        Reviewed by Oliver.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:

WebCore:

        Disable LTCG/PGO for all of WebCore for now.
        We'll re-enable this as part of follow-on PGO work.

        Reviewed by Oliver.

        * WebCore.vcproj/WebCore.vcproj:

WebKit/win:

        Use PGO to build WebKit.dll.

        Reviewed by Oliver.

        * WebKit.vcproj/WebKit.pgd: Added.
        * WebKit.vcproj/WebKit.vcproj:

WebKitLibraries:

        Disable two PGO/LTCG specific warnings.

        Reviewed by Oliver.

        * win/tools/vsprops/common.vsprops:

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

12 years agoWebCore:
darin@apple.com [Wed, 12 Mar 2008 05:27:19 +0000 (05:27 +0000)]
WebCore:

        Reviewed by Sam.

        - remove all bridge-related things from WebCore except the bridge itself

        * WebCore.base.exp: Removed the bridge and setBridge functions.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
        close method.

        * page/Frame.cpp:
        (WebCore::Frame::~Frame): Removed call to setBridge(0).
        (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
        * page/Frame.h: Removed setBridge and bridge functions.
        * page/FramePrivate.h: Removed m_bridge pointer.
        * page/mac/FrameMac.mm: Removed setBridge and bridge functions.

        * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
        Removed bridgeForDOMDocument: and clearFrame methods.
        * page/mac/WebCoreFrameBridge.mm: Ditto.
        (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
        (-[WebCoreFrameBridge setWebCoreFrame:]): Added.

WebKit/mac:

        Reviewed by Sam.

        - remove all bridge-related things from WebCore except the bridge itself

        * DOM/WebDOMOperations.mm:
        (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method.

        * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include.

        * Plugins/WebPluginController.mm: Ditto.

        * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the
        init and close methods. Added a setWebFrame: method.

        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge setWebFrame:]): Added.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion.
        (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the
        bridge here. Soon we will be able to remove this entirely!
        (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved
        into WebFrame from the bridge.

        * WebView/WebFrame.mm:
        (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's
        now owned by the frame.
        (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script
        debugger under GC without this!
        (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to
        use WebFrameLoaderClient instead of the bridge.
        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added.
        This is code that used to live in the bridge's init function.
        (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto.
        (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto.
        (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since
        the WebView is now the bridge's owner.
        (-[WebFrame _updateBackground]): Changed this one call site that was calling the
        WebCore::Frame::bridge function directly to use the kit function instead.
        (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge.
        This code won't last long -- we're eliminating the bridge soon.
        (-[WebFrame finalize]): Ditto.

        * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods
        for creating frames.

        * WebView/WebView.mm:
        (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use
        the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom
        where we have to allocate a WebFrameBridge and then immediately release it.

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

12 years agoWebCore:
darin@apple.com [Wed, 12 Mar 2008 05:13:21 +0000 (05:13 +0000)]
WebCore:

        - restored some code I removed in the Range change; this code can't go
          until the rest of the Range fix is in

        * dom/Range.cpp:
        (WebCore::Range::commonAncestorContainer): Added back the check for 0
        that I removed erroneously in the Range patch.
        (WebCore::Range::processContents): Left in assertions I used to debug
        this.

LayoutTests:

        Reviewed by Beth Dakin.

        Update test to catch the SECURITY_ERR thrown by
        CanvasRenderingContext2D::getImageData() and
        HTMLCanvasElement::toDataURL() on a tainted canvas

        * http/tests/security/canvas-remote-read-remote-image-expected.txt:
        * http/tests/security/canvas-remote-read-remote-image.html:

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

12 years ago - update expected result changed by recent Range patch
darin@apple.com [Wed, 12 Mar 2008 03:51:53 +0000 (03:51 +0000)]
    - update expected result changed by recent Range patch

        * platform/mac/editing/execCommand/4920488-expected.txt: Removed incorrect exception log.
        * platform/qt/editing/execCommand/4920488-expected.txt: Ditto.

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

12 years ago - fix Release build
darin@apple.com [Wed, 12 Mar 2008 01:31:36 +0000 (01:31 +0000)]
    - fix Release build

        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.

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

12 years agoWebCore:
darin@apple.com [Wed, 12 Mar 2008 01:23:29 +0000 (01:23 +0000)]
WebCore:

        Reviewed by Anders.

        - simplify Mac code for ScrollView, since it's used only for FrameView
          and not in two different modes like it was historically
        - remove code depending on the bridge to get from an NSView to a WebCore::Frame

        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.

        * bridge/jni/jni_jsobject.cpp:
        (createRootObject): Instead of using WebCoreViewFactory to find the frame given
        and NSView, use the WebCoreFrameView interface to do it.

        * editing/mac/EditorMac.mm:
        (WebCore::Editor::paste): getDocumentView -> documentView.
        * editing/mac/SelectionControllerMac.mm:
        (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.

        * page/FrameView.h: Fixed comment.

        * page/InspectorController.cpp:
        (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
        to ScrollView* since FrameView is derived from ScrollView.

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
        * page/mac/FrameMac.mm:
        (WebCore::Frame::imageFromRect): Ditto.
        * page/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject position]): Ditto.
        (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
        (-[WebCoreAXObject rendererForView:]): Updated code that used to use
        WebCoreBridgeHolder to use WebCoreFrameView instead.

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
        getDocumentView -> documentView.

        * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
        use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
        WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
        frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
        protocol, which returns a WebCore::Frame directly rather than a bridge.

        * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.

        * platform/ScrollView.h: Moved the constructor and destructor out of the
        class-specific #if blocks. Renamed Mac-specific function that gets the
        NSView for from getDocumentView to documentView and a scrollView function
        that returns an appropriately classed NSScrollView.

        * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
        instead of Widget.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.

        * platform/mac/PopupMenuMac.mm:
        (WebCore::PopupMenu::show): getDocumentView -> documentView.
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::ScrollView): Added.
        (WebCore::ScrollView::~ScrollView): Added.
        (WebCore::ScrollView::scrollView): Added.
        (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
        (WebCore::ScrollView::visibleHeight): Ditto.
        (WebCore::ScrollView::visibleContentRect): Ditto.
        (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
        (WebCore::ScrollView::contentsWidth): Ditto.
        (WebCore::ScrollView::contentsHeight): Ditto.
        (WebCore::ScrollView::contentsX): Ditto.
        (WebCore::ScrollView::contentsY): Ditto.
        (WebCore::ScrollView::scrollOffset): Ditto.
        (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
        (WebCore::ScrollView::setContentsPos): Ditto.
        (WebCore::ScrollView::setVScrollbarMode): Ditto.
        (WebCore::ScrollView::setHScrollbarMode): Ditto.
        (WebCore::ScrollView::setScrollbarsMode): Ditto.
        (WebCore::ScrollView::vScrollbarMode): Ditto.
        (WebCore::ScrollView::hScrollbarMode): Ditto.
        (WebCore::ScrollView::suppressScrollbars): Ditto.
        (WebCore::ScrollView::addChild): Ditto.
        (WebCore::ScrollView::resizeContents): Ditto.
        (WebCore::ScrollView::updateContents): Ditto.
        (WebCore::ScrollView::contentsToWindow): Ditto.
        (WebCore::ScrollView::windowToContents): Ditto.
        (WebCore::ScrollView::setStaticBackground): Ditto.
        (WebCore::ScrollView::documentView): Renamed and removed unused case.
        (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.

        * platform/mac/WidgetMac.mm:
        (WebCore::Widget::getOuterView): Update for protocol name change.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
        (WebCore::RenderThemeMac::paintRadio): Ditto.
        (WebCore::RenderThemeMac::paintButton): Ditto.
        (WebCore::RenderThemeMac::paintMenuList): Ditto.
        (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
        (WebCore::RenderThemeMac::paintSearchField): Ditto.
        (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
        (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
        (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.

WebKit:

        Reviewed by Anders.

        * WebKit.xcodeproj/project.pbxproj: Change WebDynamicScrollBarsView.m to be Obj-C++.
        We can rename the file later.

WebKit/mac:

        Reviewed by Anders.

        - remove code depending on the bridge to get from an NSView to a WebCore::Frame

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call
        to setView. A couple lines later, there is a call to _install, which sets the
        view to the scroll view.

        * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method.

        * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of
        this file, since it's used by Safari.
        * WebView/WebDynamicScrollBarsViewInternal.h: Added.
        * WebView/WebDynamicScrollBarsView.m:
        (-[WebDynamicScrollBarsView updateScrollers]): Ditto.
        (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto.
        (-[WebDynamicScrollBarsView allowsScrolling]): Ditto.
        (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto.
        (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto.
        (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto.
        (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto.
        (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto.
        (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto.
        (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto.
        (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto.
        (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto.
        (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto.
        (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto.
        (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto.

        * WebView/WebFrameView.mm:
        (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method.

        * WebView/WebView.mm:
        (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h.
        (-[WebView alwaysShowVerticalScroller]): Ditto.
        (-[WebView setAlwaysShowHorizontalScroller:]): Ditto.
        (-[WebView alwaysShowHorizontalScroller]): Ditto.

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

12 years agoWebCore:
darin@apple.com [Wed, 12 Mar 2008 00:48:00 +0000 (00:48 +0000)]
WebCore:

        Reviewed by Adam Roben.

        Split CookieJarWin.cpp into CFNet and non-CFNet versions to
        reduce the massive amount of conditionalization in the file.
        (see http://bugs.webkit.org/show_bug.cgi?id=17788)

        * WebCore.vcproj/WebCore.vcproj:
        * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
        (WebCore::setCookies):
        (WebCore::cookies):
        (WebCore::cookiesEnabled):
        * platform/network/win/CookieJarWin.cpp:
        (WebCore::setCookies):
        (WebCore::cookies):
        (WebCore::cookiesEnabled):

WebKit/mac:

        Reviewed by Sam.

        - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore

        * WebCoreSupport/WebChromeClient.h: Added new virtual functions that replace
        bridge methods.
        * WebCoreSupport/WebChromeClient.mm: Added lots of BEGIN_BLOCK_OBJC_EXCEPTIONS
        to recently-created functions.
        (WebChromeClient::firstResponder): Moved code here from the bridge.
        (WebChromeClient::makeFirstResponder): Ditto.
        (WebChromeClient::runOpenPanel): Ditto.
        (WebChromeClient::willPopUpMenu): Ditto.

        * WebCoreSupport/WebFrameBridge.h: Removed almost everything. What's left
        is related to creating the bridge and connecting it to WebCore, which will
        go next when I eliminate use of the bridge to get to/from the Frame*.
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge close]): Moved the code to track the bridge count here
        instead of the dealloc and finalize methods.

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

12 years ago2008-03-11 Brent Fulgham <bfulgham@gmail.com>
pewtermoose@webkit.org [Wed, 12 Mar 2008 00:28:37 +0000 (00:28 +0000)]
2008-03-11  Brent Fulgham  <bfulgham@gmail.com>

        Reviewed by Adam Roben.

        Split CookieJarWin.cpp into CFNet and non-CFNet versions to
        reduce the massive amount of conditionalization in the file.
        (see http://bugs.webkit.org/show_bug.cgi?id=17788)

        * WebCore.vcproj/WebCore.vcproj:
        * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
        (WebCore::setCookies):
        (WebCore::cookies):
        (WebCore::cookiesEnabled):
        * platform/network/win/CookieJarWin.cpp:
        (WebCore::setCookies):
        (WebCore::cookies):
        (WebCore::cookiesEnabled):

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

12 years agoWebCore:
darin@apple.com [Tue, 11 Mar 2008 23:43:12 +0000 (23:43 +0000)]
WebCore:

        Reviewed by Mitz.

        - make some Range improvements (preparation for Range support for DOM mutation)

        Made constructors private, added create functions.
        Made refcount start at 1 rather than starting at 0 and being incremented.
        Made Range use two Position objects for the start/end container/offset pairs.

        * WebCore.base.exp: Updated.

        * dom/Document.cpp:
        (WebCore::Document::createRange): Changed to use Range::create.
        (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.

        * dom/Position.cpp:
        (WebCore::Position::formatForDebugger): Updated for member variable name change.
        (WebCore::Position::showTreeForThis): Ditto.
        (WebCore::startPosition): Changed to use Range::startPosition.
        (WebCore::endPosition): Changed to use Range::endPosition.

        * dom/Position.h: Made the data members public and renamed them to container
        and offset. But since offset() is already a function, temporarily used posOffset
        for the data member. Later we'll get rid of offset(). Made more functions inline.
        Removed the constructor that takes a PositionIterator.

        * dom/PositionIterator.cpp:
        (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
        that used to be in Position.
        * dom/PositionIterator.h: Added conversion operator to produce a Position.
        Removed friend declaration for Position.

        * dom/Range.cpp:
        (WebCore::Range::Range): Updated constructors for data member changes and made
        them use a refcount of 1.
        (WebCore::Range::create): Added.
        (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
        is now indicated by m_start.container of 0. Also updated to use m_start instead
        of the old m_startContainer.
        (WebCore::Range::startOffset): Ditto.
        (WebCore::Range::endContainer): Ditto.
        (WebCore::Range::endOffset): Ditto.
        (WebCore::Range::commonAncestorContainer): Ditto.
        (WebCore::Range::collapsed): Ditto.
        (WebCore::Range::setStart): Ditto.
        (WebCore::Range::setEnd): Ditto.
        (WebCore::Range::collapse): Ditto.
        (WebCore::Range::isPointInRange): Ditto.
        (WebCore::Range::comparePoint): Ditto.
        (WebCore::Range::compareNode): Ditto.
        (WebCore::Range::compareBoundaryPoints): Ditto.
        (WebCore::Range::boundaryPointsValid): Ditto.
        (WebCore::Range::deleteContents): Ditto.
        (WebCore::Range::intersectsNode): Ditto.
        (WebCore::Range::processContents): Ditto.
        (WebCore::Range::extractContents): Ditto.
        (WebCore::Range::cloneContents): Ditto.
        (WebCore::Range::insertNode): Ditto.
        (WebCore::Range::toString): Ditto.
        (WebCore::Range::text): Ditto.
        (WebCore::Range::createContextualFragment): Ditto.
        (WebCore::Range::detach): Ditto.
        (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
        multiple calls to the virtual nodeType() function.
        (WebCore::Range::cloneRange): Ditto.
        (WebCore::Range::setStartAfter): Ditto.
        (WebCore::Range::setEndBefore): Ditto.
        (WebCore::Range::setEndAfter): Ditto.
        (WebCore::Range::selectNode): Ditto.
        (WebCore::Range::selectNodeContents): Ditto.
        (WebCore::Range::surroundContents): Ditto.
        (WebCore::Range::setStartBefore): Ditto.
        (WebCore::Range::checkDeleteExtract): Ditto.
        (WebCore::Range::containedByReadOnly): Ditto.
        (WebCore::Range::firstNode): Ditto.
        (WebCore::Range::editingStartPosition): Ditto.
        (WebCore::Range::pastLastNode): Ditto.
        (WebCore::Range::addLineBoxRects): Ditto.
        (WebCore::Range::formatForDebugger): Ditto.
        (WebCore::operator==): Ditto.
        (WebCore::rangeOfContents): Ditto.
        (WebCore::Range::maxStartOffset): Ditto.
        (WebCore::Range::maxEndOffset): Ditto.

        * dom/Range.h: Made constructors private. Added create functions.
        Added getters for startContainer/Offset and endContainer/Offset that
        return 0 instead of an exception for detached ranges that are inline
        and don't require an ExceptionCode out parameter. Changed the parameters
        to setStart and setEnd to PassRefPtr. Removed isDetached function.
        Made ActionType and processContents private. Made startPosition and
        endPosition inlines and have then return const&. Renamed startNode and
        pastEndNode to firstNode and pastLastNode to reduce the chance of
        confusion with startContainer/endContainer. Used Position for m_start
        and m_end instead of separate container and offset members. Changed
        maxStartOffset and maxEndOffset into int to match other offsets.

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
        (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::inputText): Ditto.
        (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
        * editing/Editor.cpp:
        (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
        (WebCore::Editor::setComposition): Changed to use Range::create.
        (WebCore::paragraphAlignedRangeForRange): Ditto.
        (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
        isDetached and check for 0 from startContainer instead.
        (WebCore::Editor::compositionRange): Changed to use Range::create.
        * editing/EditorCommand.cpp:
        (WebCore::unionDOMRanges): Ditto.
        * editing/Selection.cpp:
        (WebCore::Selection::toRange): Ditto.
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
        name change.
        (WebCore::TextIterator::range): Changed to use Range::create.
        (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
        (WebCore::TextIterator::subrange): Ditto.
        * editing/VisiblePosition.cpp:
        (WebCore::makeRange): Ditto.
        * editing/VisiblePosition.h: Added now-needed include.
        * editing/htmlediting.cpp:
        (WebCore::indexForVisiblePosition): Changed to use Range::create.
        (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
        isDetached and check for 0 instead and to use Range::create.
        * editing/markup.cpp:
        (WebCore::renderedText): Changed to use Range::create.
        (WebCore::createMarkup): Changed to no longer use isDetached and also
        for new firstNode/pastEndNode names.
        (WebCore::createFragmentFromText): Ditto.
        * editing/visible_units.cpp:
        (WebCore::previousBoundary): Changed to use Range::create.
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
        isDetached().
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
        (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.

WebKit/mac:

        Reviewed by Mitz.

        - update code affected by Range changes

        * Misc/WebNSAttributedStringExtras.mm:
        (+[NSAttributedString _web_attributedStringFromRange:]): Update for name changes.
        * WebView/WebHTMLRepresentation.mm:
        (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
        Use Range::create.
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView attributedString]): Ditto.

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

12 years ago2008-03-11 Daniel Zucker <zucker@wake3.com>
pewtermoose@webkit.org [Tue, 11 Mar 2008 23:32:43 +0000 (23:32 +0000)]
2008-03-11  Daniel Zucker <zucker@wake3.com>

        Reviewed by Adam Roben.

        There are a handful of placed where the use of CFNetwork-specific
        calls are protected by PLATFORM(CF).  Revise to use the more specific
        USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783)

        * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
        * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
        * platform/network/win/CookieJarWin.cpp:  Correct error in
          InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
          as all other implementations in this file.

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