1. 03 Sep, 2008 18 commits
    • hyatt@apple.com's avatar
      WebCore: · 4b38ed82
      hyatt@apple.com authored
      2008-09-03  David Hyatt  <hyatt@apple.com>
      
              Fix for bug 18203, right floats should be allowed to overflow past the left border edge.
      
              Reviewed by Darin (ages ago)
      
              Added fast/block/float/clamped-right-float.html
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::positionNewFloats):
      
      LayoutTests:
      
      2008-09-03  David Hyatt  <hyatt@apple.com>
      
              Fix for bug 18203.
      
              Reviewed by Darin (ages ago).
      
              * fast/block/float/clamped-right-float.html: Added.
              * platform/mac/fast/block/float/clamped-right-float-expected.checksum: Added.
              * platform/mac/fast/block/float/clamped-right-float-expected.png: Added.
              * platform/mac/fast/block/float/clamped-right-float-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b38ed82
    • hyatt@apple.com's avatar
      WebCore: · afe62056
      hyatt@apple.com authored
      2008-09-02  David Hyatt  <hyatt@apple.com>
      
              Add support for canvas text drawing APIs.
      
              Reviewed by olliej
      
              Tests added as fast/canvas/canvas-text-*.html
      
              * DerivedSources.make:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              (WebCore::JSCanvasRenderingContext2D::fillText):
              (WebCore::JSCanvasRenderingContext2D::strokeText):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::initForStyleResolve):
              (WebCore::CSSStyleSelector::applyPropertyToStyle):
              * css/CSSStyleSelector.h:
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::State::State):
              (WebCore::CanvasRenderingContext2D::font):
              (WebCore::CanvasRenderingContext2D::setFont):
              (WebCore::CanvasRenderingContext2D::textAlign):
              (WebCore::CanvasRenderingContext2D::setTextAlign):
              (WebCore::CanvasRenderingContext2D::textBaseline):
              (WebCore::CanvasRenderingContext2D::setTextBaseline):
              (WebCore::CanvasRenderingContext2D::fillText):
              (WebCore::CanvasRenderingContext2D::strokeText):
              (WebCore::CanvasRenderingContext2D::measureText):
              (WebCore::CanvasRenderingContext2D::drawTextInternal):
              (WebCore::CanvasRenderingContext2D::accessFont):
              * html/CanvasRenderingContext2D.h:
              * html/CanvasRenderingContext2D.idl:
              * html/TextMetrics.h: Added.
              (WebCore::TextMetrics::create):
              (WebCore::TextMetrics::width):
              (WebCore::TextMetrics::setWidth):
              (WebCore::TextMetrics::TextMetrics):
              * html/TextMetrics.idl: Added.
              * platform/graphics/Font.cpp:
              (WebCore::Font::lineGap):
              * platform/graphics/Font.h:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawBidiText):
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/GraphicsTypes.cpp:
              (WebCore::textAlignName):
              (WebCore::parseTextAlign):
              (WebCore::textBaselineName):
              (WebCore::parseTextBaseline):
              * platform/graphics/GraphicsTypes.h:
              (WebCore::):
      
      LayoutTests:
      
      2008-09-02  David Hyatt  <hyatt@apple.com>
      
              Add support for the canvas text APIs.
      
              Reviewed by olliej
      
              * fast/canvas/canvas-text-alignment.html: Added.
              * fast/canvas/canvas-text-baseline.html: Added.
              * platform/mac/fast/canvas/canvas-text-alignment-expected.checksum: Added.
              * platform/mac/fast/canvas/canvas-text-alignment-expected.png: Added.
              * platform/mac/fast/canvas/canvas-text-alignment-expected.txt: Added.
              * platform/mac/fast/canvas/canvas-text-baseline-expected.checksum: Added.
              * platform/mac/fast/canvas/canvas-text-baseline-expected.png: Added.
              * platform/mac/fast/canvas/canvas-text-baseline-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afe62056
    • sullivan@apple.com's avatar
      2008-09-03 John Sullivan <sullivan@apple.com> · bc066af8
      sullivan@apple.com authored
              Fixed <rdar://problem/6193022> <rdar://problem/6193022> Crash occurs at WebCore::AnimationBase::propertiesEqual () after certain steps
      
              Fixed by Darin, reviewed by me
      
              * page/animation/AnimationBase.cpp:
              (WebCore::AnimationBase::propertiesEqual):
              added ensurePropertyMap() to this static function
              (WebCore::AnimationBase::getPropertyAtIndex):
              ditto
              (WebCore::AnimationBase::getNumProperties):
              ditto
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc066af8
    • kmccullough@apple.com's avatar
      JavaScriptCore: · 70168ee9
      kmccullough@apple.com authored
      2008-09-02  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Darin and Tim.
      
              Remove most of the "zombie" mode from the profiler.  Next we will need
              to remove the client callback mechanism in profiles.
      
              - This simplifies the code, leverages the recent changes I've made in
              getting line numbers from SquirrelFish, and is a slight speed
              improvement on SunSpider.
              - Also the "zombie" mode was a constant source of odd edge cases and
              obscure bugs so it's good to remove since all of its issues may not have
              been found.
      
              * API/JSProfilerPrivate.cpp: No need to call didFinishAllExecution() any
              more.
              (JSEndProfiling):
              * JavaScriptCore.exp: Export the new signature of retrieveLastCaller()
              * VM/Machine.cpp:
              (KJS::Machine::execute): No need to call didFinishAllExecution() any
              more.
              (KJS::Machine::retrieveCaller): Now operates on InternalFunctions now
              since the RegisterFile is no longer guaranteeded to store only
              JSFunctions
              (KJS::Machine::retrieveLastCaller): Now also retrieve the function's
              name
              (KJS::Machine::callFrame): A result of changing retrieveCaller()
              * VM/Machine.h:
              * VM/Register.h: 
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::~JSGlobalObject):
              * kjs/nodes.h:
              * profiler/ProfileGenerator.cpp:
              (KJS::ProfileGenerator::create): Now pass the original exec and get the
              global exec and client when necessary.  We need the original exec so we
              can have the stack frame where profiling started.
              (KJS::ProfileGenerator::ProfileGenerator): ditto.
              (KJS::ProfileGenerator::addParentForConsoleStart): This is where the 
              parent to star of the profile is added, if there is one.
              (KJS::ProfileGenerator::willExecute): Remove uglyness!
              (KJS::ProfileGenerator::didExecute): Ditto!
              (KJS::ProfileGenerator::stopProfiling):
              (KJS::ProfileGenerator::removeProfileStart): Use a better way to find
              and remove the function we are looking for.
              (KJS::ProfileGenerator::removeProfileEnd): Ditto.
              * profiler/ProfileGenerator.h:
              (KJS::ProfileGenerator::client):
              * profiler/ProfileNode.cpp:
              (KJS::ProfileNode::removeChild): Add a better way to remove a child from
              a ProfileNode.
              (KJS::ProfileNode::stopProfiling):
              (KJS::ProfileNode::debugPrintData): Modified a debug-only diagnostic
              function to be sane.
              * profiler/ProfileNode.h:
              * profiler/Profiler.cpp: Change to pass the original exec state.
              (KJS::Profiler::startProfiling):
              (KJS::Profiler::stopProfiling):
              (KJS::Profiler::willExecute):
              (KJS::Profiler::didExecute):
              (KJS::Profiler::createCallIdentifier):
              * profiler/Profiler.h:
      
      WebCore:
      
      2008-09-03  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Darin and Tim.
      
              Remove most of the "zombie" mode from the profiler.  Next we will need
              to remove the client callback mechanism in profiles.
              - These changes are a result of changes to JSCore.
      
              * manual-tests/inspector/profiler-test-nested-start-and-stop-profiler.html:
              * page/Console.cpp:
              (WebCore::retrieveLastCaller):
              (WebCore::Console::profileEnd):
              * page/InspectorController.cpp:
              (WebCore::InspectorController::stopUserInitiatedProfiling):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70168ee9
    • adele@apple.com's avatar
      WebCore: · 643616bc
      adele@apple.com authored
      2008-09-03  Adele Peterson  <adele@apple.com>
      
              Reviewed by Darin Adler.
      
              Test: fast/forms/search-display-none-cancel-button.html
      
              Allow display:none to work on a search field's cancel button.  Prepare for adding more style-ability for the results button too.
      
              * css/html4.css: Set display:inline-block for these buttons.  Now they can be overridden by a web author.
      
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::setStyle): Add nil checks for the button renderers.
              (WebCore::RenderTextControl::createResultsButtonStyle): Don't set the display explicitly.  This is now done in html4.css.
              (WebCore::RenderTextControl::createCancelButtonStyle): ditto.
              (WebCore::RenderTextControl::createSubtreeIfNeeded):
              Reorganize this code so our complicated way of adding shadow nodes is abstracted out into the TextControlInnerElement class.
              (WebCore::RenderTextControl::updateFromElement): Added nil checks for the button renderers.
              (WebCore::RenderTextControl::subtreeHasChanged): ditto.
              (WebCore::RenderTextControl::calcHeight): ditto.
              (WebCore::RenderTextControl::nodeAtPoint): ditto.
              (WebCore::RenderTextControl::layout): ditto.
              (WebCore::RenderTextControl::calcPrefWidths): ditto.
              (WebCore::RenderTextControl::clientPaddingLeft): ditto.
              (WebCore::RenderTextControl::clientPaddingRight): ditto.
      
              * rendering/TextControlInnerElements.cpp:
              (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): Moved from RenderTextControl.cpp.
              (WebCore::RenderTextControlInnerBlock::nodeAtPoint): ditto.
              (WebCore::TextControlInnerElement::attachInnerElement): Added.
               This does all the separate steps of attaching a shadow node that used to be repeated in RenderTextControl::createSubtreeIfNeeded for each element.
              (WebCore::TextControlInnerTextElement::createRenderer): Added.  Creates a RenderTextControlInnerBlock.
              * rendering/TextControlInnerElements.h:
      
      LayoutTests:
      
      2008-09-03  Adele Peterson  <adele@apple.com>
      
              Reviewed by Darin Adler.
      
              Test that display:none works on a search field's cancel button.
      
              * fast/forms/search-display-none-cancel-button.html: Added.
              * platform/mac/fast/forms/search-display-none-cancel-button-expected.checksum: Added.
              * platform/mac/fast/forms/search-display-none-cancel-button-expected.png: Added.
              * platform/mac/fast/forms/search-display-none-cancel-button-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      643616bc
    • ap@webkit.org's avatar
      Reviewed by Darin Adler. · 2c50496e
      ap@webkit.org authored
              Implement callOnMainThreadAndWait().
      
              This will be useful when a background thread needs to perform UI calls synchronously
              (e.g. an openDatabase() call cannot return until the user answers to a confirmation dialog).
      
              * wtf/MainThread.cpp:
              (WTF::FunctionWithContext::FunctionWithContext): Added a ThreadCondition member. When
              non-zero, the condition is signalled after the function is called.
              (WTF::mainThreadFunctionQueueMutex): Renamed from functionQueueMutex, sinc this is no longer
              static. Changed to be initialized from initializeThreading() to avoid lock contention.
              (WTF::initializeMainThread): On non-Windows platforms, just call mainThreadFunctionQueueMutex.
              (WTF::dispatchFunctionsFromMainThread): Signal synchronous calls when done.
              (WTF::callOnMainThread): Updated for functionQueueMutex rename.
              (WTF::callOnMainThreadAndWait):  Added.
      
              * wtf/MainThread.h: Added callOnMainThreadAndWait(); initializeMainThread() now exists on
              all platforms.
      
              * wtf/win/MainThreadWin.cpp: (WTF::initializeMainThread): Added a callOnMainThreadAndWait()
              call to initialize function queue mutex.
      
              * wtf/ThreadingGtk.cpp: (WTF::initializeThreading):
              * wtf/ThreadingPthreads.cpp: (WTF::initializeThreading):
              * wtf/ThreadingQt.cpp: (WTF::initializeThreading):
              Only initialize mainThreadIdentifier on non-Darwin platforms. It was not guaranteed to be
              accurate on Darwin.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2c50496e
    • ggaren@apple.com's avatar
      2008-09-03 Geoffrey Garen <ggaren@apple.com> · ee3f3d42
      ggaren@apple.com authored
              Reviewed by Darin Adler.
              
              Use isUndefinedOrNull() instead of separate checks for each in op_eq_null
              and op_neq_null.
      
              * VM/Machine.cpp:
              (KJS::Machine::privateExecute):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee3f3d42
    • ap@webkit.org's avatar
      Reviewed by Maciej. · acd84145
      ap@webkit.org authored
              Elminate SQLiteAuthorizer class.
      
              * WebCore.xcodeproj/project.pbxproj:
              * WebCore.vcproj/WebCore.vcproj:
              * GNUmakefile.am
              Removed SQLiteAuthorizer.h.
      
              * platform/sql/SQLiteAuthorizer.cpp:
              * platform/sql/SQLiteAuthorizer.h: Removed.
              * platform/sql/SQLiteDatabase.cpp:
              (WebCore::SQLiteDatabase::authorizerFunction):
              (WebCore::SQLiteDatabase::setAuthorizer):
              * platform/sql/SQLiteDatabase.h:
              * storage/DatabaseAuthorizer.h:
              (WebCore::DatabaseAuthorizer::create):
              (WebCore::DatabaseAuthorizer::createView):
              (WebCore::DatabaseAuthorizer::createTempView):
              (WebCore::DatabaseAuthorizer::dropView):
              (WebCore::DatabaseAuthorizer::dropTempView):
              (WebCore::DatabaseAuthorizer::allowSelect):
              (WebCore::DatabaseAuthorizer::allowReindex):
              Merge SQLiteAuthorizer and DatabaseAuthorizer, as keeping them separate serves no purpose.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      acd84145
    • mrowe@apple.com's avatar
      Move the backslash to the right place. · df3ffe1e
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df3ffe1e
    • mrowe@apple.com's avatar
      2008-09-03 Dirk Schulze <vbs85@gmx.de> · 2ecd4860
      mrowe@apple.com authored
              Reviewed and tweaked by Mark Rowe.
      
              WebKitGtk build fix.
      
              * GNUmakefile.am:
              * page/animation/AnimationController.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ecd4860
    • mrowe@apple.com's avatar
      2008-09-02 Robert Blaut <webkit@blaut.biz> · e344ad00
      mrowe@apple.com authored
              Reviewed by Geoff Garen.
      
              Fix for <https://bugs.webkit.org/show_bug.cgi?id=16913>
              Misplaced elements should not close DL lists.
      
              Test: fast/invalid/test-case-tr-th-td-should-not-close-dl-list.html
      
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError):
      
      2008-09-02  Robert Blaut  <webkit@blaut.biz>
      
              Reviewed by Geoff Garen.
      
              Test for <https://bugs.webkit.org/show_bug.cgi?id=16913>
              Misplaced elements should not close DL lists.
      
              * fast/invalid/test-case-tr-th-td-should-not-close-dl-list-expected.txt: Added.
              * fast/invalid/test-case-tr-th-td-should-not-close-dl-list.html: Added.
              * platform/mac/fast/invalid/missing-dl-end-tag-expected.checksum:
              * platform/mac/fast/invalid/missing-dl-end-tag-expected.png:
              * platform/mac/fast/invalid/missing-dl-end-tag-expected.txt:
              * platform/mac/fast/invalid/missing-dt-end-tag-expected.checksum:
              * platform/mac/fast/invalid/missing-dt-end-tag-expected.png:
              * platform/mac/fast/invalid/missing-dt-end-tag-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e344ad00
    • mrowe@apple.com's avatar
      2008-09-02 Glenn Wilson <wilsong@gmail.com> · 7a909467
      mrowe@apple.com authored
              Reviewed by Darin Adler.
      
              Fix for <https://bugs.webkit.org/show_bug.cgi?id=15360>
              Bug 15360: color:#{predefined colorName} is treated as colorName in Safari
      
              We would inappropriately interpret and apply an invalid CSS "color" property
              when the value is a predefined color preceded by a '#' symbol.  For example,
              style="color:#gray;" would apply the color gray when it should not.
      
              In the bison template, "hexcolor" was defined as both "HEX maybe_space" OR "IDENT maybe_space".
              This caused identifiers not fitting the appropriate hex format but preceded by a '#' to be
              interpreted as a valid color (CSSPrimitiveValue::CSS_PARSER_HEXCOLOR), when it was really just
              an ignorable token.
      
              To correct this, "IDENT maybe_space" was removed from "hexcolor" and added under "term" as
              '#' IDENT maybe_space, which is then processed as a CSSPrimitiveValue::CSS_STRING instead of
              CSSPrimitiveValue::CSS_PARSER_HEXCOLOR.
      
              Test: css1/color_and_background/invalid_color.html
      
              * css/CSSGrammar.y:
      
      2008-09-02  Glenn Wilson  <wilsong@gmail.com>
      
              Reviewed by Darin Adler.
      
              Test for <https://bugs.webkit.org/show_bug.cgi?id=15360>
              Bug 15360: color:#{predefined colorName} is treated as colorName in Safari
      
              Added new test to verify that CSS "color" attributes with '#'-preceeded predefined color names
              are not rendered in those colors.
      
              * css1/color_and_background/invalid_color.html: Added.
              * css1/color_and_background/invalid_color-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a909467
    • mrowe@apple.com's avatar
      Build fix. Remove the now unnecessary check for "4" in the user agent string. · af1400de
      mrowe@apple.com authored
      Reviewed by Tim Hatcher.
      
      * WebKit.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af1400de
    • mrowe@apple.com's avatar
      2008-09-02 Csaba Osztrogonac <oszi@inf.u-szeged.hu> · 90cd9dac
      mrowe@apple.com authored
              Reviewed by Darin Adler.
      
              Bug 20296: OpcodeStats doesn't build on platforms which don't have mergesort().
              <https://bugs.webkit.org/show_bug.cgi?id=20296>
      
              * VM/Opcode.cpp:
              (KJS::OpcodeStats::~OpcodeStats): mergesort() replaced with qsort()
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90cd9dac
    • mrowe@apple.com's avatar
      2008-09-02 Mihnea Ovidenie <mihnea@adobe.com> · da9a144b
      mrowe@apple.com authored
              Reviewed by Darin Adler.
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=19964
              Bug 19964: Divide by zero crash in RenderBox::calculateBackgroundSize with 0,0 bmp background image
      
              Add a check to RenderBox::repaintLayerRectsForImage to make sure the current layer image can be rendered.
      
              Test: css3/khtml-background-size-0x0-bmp.html
      
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::repaintLayerRectsForImage):
      
      2008-09-02  Mihnea Ovidenie  <mihnea@adobe.com>
      
              Reviewed by Darin Adler.
      
              Test for https://bugs.webkit.org/show_bug.cgi?id=19964
              Bug 19964: Divide by zero crash in RenderBox::calculateBackgroundSize with 0,0 bmp background image
      
              * css3/khtml-background-size-0x0-bmp-expected.txt: Added.
              * css3/khtml-background-size-0x0-bmp.html: Added.
              * css3/support/0x0.bmp: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da9a144b
    • mrowe@apple.com's avatar
      2008-09-02 Glenn Wilson <wilsong@gmail.com> · 6625ae59
      mrowe@apple.com authored
              Reviewed by Eric Seidel.
      
              Fix https://bugs.webkit.org/show_bug.cgi?id=20397
              Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash
      
              The function checkForOrphanedUnits() would change the length of a list whose size was
              was already determined before the call to checkForOrphanedUnits was made.  Later in
              the caller, the old size was being used for boundary management.
      
              This has been fixed by moving the call to checkForOrphanedUnits() earlier in the
              calling function, before the size of the list is determined.
      
              Test: fast/css/orphaned_units_crash.html
      
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):  Moved call to checkForOrphanedUnits() earlier in the function.
      
      2008-09-02  Glenn Wilson  <wilsong@gmail.com>
      
              Reviewed by Eric Seidel.
      
              Tests for https://bugs.webkit.org/show_bug.cgi?id=20397
              Bug 20397: Invalid webkit-border-bottom-left-radius property causes crash
      
              Added new tests to check whether an orphaned unit identifier in particular
              CSS attributes will crash the browser.
      
              * fast/css/orphaned_units_crash-expected.txt: Added.
              * fast/css/orphaned_units_crash.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6625ae59
    • cwzwarich@webkit.org's avatar
      2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca> · c3e1bcc4
      cwzwarich@webkit.org authored
              Not reviewed.
      
              Move the ChangeLog of r35906 to its rightful place.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3e1bcc4
    • mrowe@apple.com's avatar
      2008-09-02 Dirk Schulze <vbs85@gmx.de> · eb877a50
      mrowe@apple.com authored
              Reviewed by Darin Adler.
      
              Fallback on invalid fill or stroke styles in Canvas was
              transparent black. Changed it to last valid style.
      
              Canvas fillStyle() and strokeStyle() needs fallback
              https://bugs.webkit.org/show_bug.cgi?id=20474
      
              Tests: fast/canvas/canvas-invalid-fillstyle.html
                     fast/canvas/canvas-invalid-strokestyle.html
      
              * html/CanvasStyle.cpp:
              (WebCore::CanvasStyle::applyStrokeColor):
              (WebCore::CanvasStyle::applyFillColor):
      
      2008-09-02  Dirk Schulze  <vbs85@gmx.de>
      
              Reviewed by Darin Adler.
      
              Tests for https://bugs.webkit.org/show_bug.cgi?id=20474
              Tests behaviour on invalid fillStyle() or strokeStyle() in canvas.
      
              * fast/canvas/canvas-invalid-fillstyle-expected.txt: Added.
              * fast/canvas/canvas-invalid-fillstyle.html: Added.
              * fast/canvas/canvas-invalid-fillstyle.js: Added.
              * fast/canvas/canvas-invalid-strokestyle-expected.txt: Added.
              * fast/canvas/canvas-invalid-strokestyle.html: Added.
              * fast/canvas/canvas-invalid-strokestyle.js: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb877a50
  2. 02 Sep, 2008 19 commits
    • mrowe@apple.com's avatar
      2008-09-02 Dirk Schulze <vbs85@gmx.de> · 170bd527
      mrowe@apple.com authored
              Reviewed by Darin Adler.
      
              Fix https://bugs.webkit.org/show_bug.cgi?id=20468
              Updated drawImage() in canvas to match the current specification.
      
              Test: fast/canvas/drawImage-with-negative-source-destination.html
      
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::normalizeRect):
              (WebCore::CanvasRenderingContext2D::drawImage):
      
      2008-09-02  Dirk Schulze  <vbs85@gmx.de>
      
              Reviewed by Darin Adler.
      
              Tests for https://bugs.webkit.org/show_bug.cgi?id=20468
              Test negative source and destination rect in drawImage()
      
              * fast/canvas/drawImage-with-invalid-args-expected.txt:
              * fast/canvas/drawImage-with-invalid-args.html:
              * fast/canvas/drawImage-with-negative-source-destination-expected.txt: Added.
              * fast/canvas/drawImage-with-negative-source-destination.html: Added.
              * fast/canvas/drawImage-with-negative-source-destination.js: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      170bd527
    • mrowe@apple.com's avatar
      <rdar://problem/5768210> Switch back to the system version of SQLite · 96916d10
      mrowe@apple.com authored
      Reviewed by Darin Adler.
      
      Use the system version of SQLite when it is new enough to provide the functionality
      that WebCore requires.
      
      * Configurations/Base.xcconfig:
      * Configurations/DebugRelease.xcconfig:
      * Configurations/WebCore.xcconfig:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96916d10
    • mrowe@apple.com's avatar
      Versioning. · 7178266f
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7178266f
    • ggaren@apple.com's avatar
      2008-09-02 Geoffrey Garen <ggaren@apple.com> · bc363099
      ggaren@apple.com authored
              Reviewed by Oliver Hunt.
              
              Fast path for array.length and string.length.
              
              SunSpider says 0.5% faster.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc363099
    • mitz@apple.com's avatar
      - update expected results now that log() et al. report line numbers · bfe460c4
      mitz@apple.com authored
              * fast/dom/Window/console-functions-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bfe460c4
    • mitz@apple.com's avatar
      - build fix · ce268c11
      mitz@apple.com authored
              * page/animation/AnimationBase.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce268c11
    • ggaren@apple.com's avatar
      2008-09-02 Geoffrey Garen <ggaren@apple.com> · f15b1880
      ggaren@apple.com authored
              Reviewed by Anders Carlsson.
              
              Added optimized paths for comparing to null.
              
              SunSpider says 0.5% faster.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f15b1880
    • cwzwarich@webkit.org's avatar
      2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca> · f637d1a0
      cwzwarich@webkit.org authored
              Not reviewed.
      
              Remove a local change that was accidentally committed in r36034.
      
              * resources/sunspider-standalone-driver.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f637d1a0
    • cwzwarich@webkit.org's avatar
      2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 29b9b108
      cwzwarich@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Tests for bug 17936: "ASSERTION FAILED: false" (GetterSetterImp::toObject is called)
              <https://bugs.webkit.org/show_bug.cgi?id=17936>
      
              This bug was fixed by the rewrite of much of the code handling getters
              and setters in r36016, the revision that introduced the polymorphic
              inline cache.
      
              * fast/js/delete-getters-setters-expected.txt: Added.
              * fast/js/delete-getters-setters.html: Added.
              * fast/js/resources/delete-getters-setters.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29b9b108
    • ggaren@apple.com's avatar
      2008-09-02 Geoffrey Garen <ggaren@apple.com> · 631e9454
      ggaren@apple.com authored
              Reviewed by Sam Weinig.
      
              Changed jsDriver.pl to dump the exact text you would need in order to
              reproduce a test result. This enables a fast workflow where you copy
              and paste a test failure in the terminal.
      
              * tests/mozilla/jsDriver.pl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      631e9454
    • ggaren@apple.com's avatar
      JavaScriptCore: · 8d8ff6a5
      ggaren@apple.com authored
      2008-09-02  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Implemented the rest of Darin's review comments for the 09-01 inline
              caching patch.
              
              SunSpider says 0.5% faster, but that seems like noise.
      
              * JavaScriptCore.xcodeproj/project.pbxproj: Put PutPropertySlot into
              its own file, and added BatchedTransitionOptimizer.
      
              * VM/CodeBlock.cpp:
              (KJS::CodeBlock::~CodeBlock): Use array indexing instead of a pointer
              iterator.
      
              * VM/CodeGenerator.cpp:
              (KJS::CodeGenerator::CodeGenerator): Used BatchedTransitionOptimizer to
              make batched put and remove for declared variables fast, without forever
              pessimizing the global object. Removed the old getDirect/removeDirect hack
              that tried to do the same in a more limited way.
      
              * VM/CodeGenerator.h: Moved IdentifierRepHash to the KJS namespace since
              it doesn't specialize anything in WTF.
      
              * VM/Machine.cpp:
              (KJS::Machine::Machine): Nixed the DummyConstruct tag because it was
              confusingly named.
      
              (KJS::Machine::execute):  Used BatchedTransitionOptimizer, as above. Fixed
              up some comments.
      
              (KJS::cachePrototypeChain): Cast to JSObject*, since it's more specific.
      
              (KJS::Machine::tryCachePutByID): Use isNull() instead of comparing to
              jsNull(), since isNull() leaves more options open for the future.
              (KJS::Machine::tryCacheGetByID): ditto
              (KJS::Machine::privateExecute): ditto
      
              * VM/SamplingTool.cpp:
              (KJS::SamplingTool::dump): Use C++-style cast, to match our style
              guidelines.
      
              * kjs/BatchedTransitionOptimizer.h: Added. New class that allows host
              code to add a batch of properties to an object in an efficient way.
      
              * kjs/JSActivation.cpp: Use isNull(), as above.
      
              * kjs/JSArray.cpp: Get rid of DummyConstruct tag, as above.
              * kjs/JSArray.h:
      
              * kjs/JSGlobalData.cpp: Nixed two unused StructureIDs.
              * kjs/JSGlobalData.h:
      
              * kjs/JSImmediate.cpp: Use isNull(), as above.
      
              * kjs/JSObject.cpp:
              (KJS::JSObject::mark): Moved mark tracing code elsewhere, to make this
              function more readable.
      
              (KJS::JSObject::put): Use isNull(), as above.
      
              (KJS::JSObject::createInheritorID): Return a raw pointer, since the
              object is owned by a data member, not necessarily the caller.
              * kjs/JSObject.h:
      
              * kjs/JSString.cpp: Use isNull(), as above.
      
              * kjs/PropertyMap.h: Updated to use PropertySlot::invalidOffset.
      
              * kjs/PropertySlot.h: Changed KJS_INVALID_OFFSET to WTF::notFound
              because C macros are so 80's.
      
              * kjs/PutPropertySlot.h: Added. Split out of PropertySlot.h. Also renamed
              PutPropertySlot::SlotType to PutPropertySlot::Type, and slotBase to base,
              since "slot" was redundant.
      
              * kjs/StructureID.cpp: Added a new transition *away* from dictionary
              status, to support BatchedTransitionOptimizer.
      
              (KJS::StructureIDChain::StructureIDChain): No need to store m_size as
              a data member, so keep it in a local, which might be faster.
              * kjs/StructureID.h:
      
              * kjs/SymbolTable.h: Moved IdentifierRepHash to KJS namespace, as above.
              * kjs/ustring.h:
      
      JavaScriptGlue:
      
      2008-09-02  Geoffrey Garen  <ggaren@apple.com>
      
              Reviewed by Sam Weinig.
              
              Implemented the rest of Darin's review comments for the 09-01 inline
              caching patch.
              
              * ForwardingHeaders/kjs/PutPropertySlot.h: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d8ff6a5
    • dino@apple.com's avatar
      2008-09-02 Chris Marrin <cmarrin@apple.com> · 7e49a7a8
      dino@apple.com authored
              Reviewed by Dave Hyatt.
      
              AnimationController.cpp should be split into separate files
              https://bugs.webkit.org/show_bug.cgi?id=20604
      
              Note: All makefiles, except WebCore.xcodeproj have been changed without testing, upon
              recommendation of Dave Hyatt.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
                  Build files.
      
              * page/AnimationController.cpp: Removed.
              * page/AnimationController.h: Removed.
              * page/animation: Added.
              * page/animation/AnimationBase.cpp: Added.
              * page/animation/AnimationBase.h: Added.
              * page/animation/AnimationController.cpp: Copied from WebCore/page/AnimationController.cpp.
              * page/animation/AnimationController.h: Copied from WebCore/page/AnimationController.h.
              * page/animation/CompositeAnimation.cpp: Added.
              * page/animation/CompositeAnimation.h: Added.
              * page/animation/ImplicitAnimation.cpp: Added.
              * page/animation/ImplicitAnimation.h: Added.
              * page/animation/KeyframeAnimation.cpp: Added.
              * page/animation/KeyframeAnimation.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e49a7a8
    • mitz@apple.com's avatar
      - release build fix · cb917a2a
      mitz@apple.com authored
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::calculateDrawingMode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb917a2a
    • timothy@apple.com's avatar
      Make console functions log the correct resource URL and · c33ff3cc
      timothy@apple.com authored
              line number for where the call originated.
      
              https://bugs.webkit.org/show_bug.cgi?id=17234
              <rdar://problem/5732837>
      
              Reviewed by Kevin McCullough.
      
              Test: manual-tests/inspector/console-call-line-numbers.html
      
              * bindings/js/JSConsoleCustom.cpp:
              (WebCore::JSConsole::count): Call the impl.
              (WebCore::JSConsole::timeEnd): Ditto.
              * manual-tests/inspector/console-call-line-numbers.html: Added.
              * manual-tests/inspector/resources/script-console-calls.js: Added.
              * page/Console.cpp:
              (WebCore::retrieveLastCaller): Helper to get the URL and line.
              (WebCore::Console::error): Call retrieveLastCaller to get the URL and
              line number to pass to addMessageToConsole.
              (WebCore::Console::info): Ditto.
              (WebCore::Console::log): Ditto.
              (WebCore::Console::assertCondition): Ditto.
              (WebCore::Console::count): Ditto.
              (WebCore::Console::timeEnd): Ditto.
              (WebCore::Console::warn): Ditto.
              * page/Console.h:
              * page/Console.idl: Make count and timeEnd custom.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c33ff3cc
    • timothy@apple.com's avatar
      Removed IDL files from WebCore's framework resources. · f3aa7346
      timothy@apple.com authored
              * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3aa7346
    • cwzwarich@webkit.org's avatar
      2008-09-02 Cameron Zwarich <cwzwarich@uwaterloo.ca> · b7232188
      cwzwarich@webkit.org authored
              Rubber-stamped by Oliver Hunt.
      
              Make SunSpider work with JavaScript shells that don't take filenames
              after a '-f' argument.
      
              * sunspider:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7232188
    • mitz@apple.com's avatar
      Reviewed by Dave Hyatt. · fb6ad39f
      mitz@apple.com authored
              - <rdar://problem/5681647> pages at http://www.stendmarsofa.com/ are so slow to calculate style it seems like a hang
      
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Added a
              cap on the number of consecutive identical residual style tags to
              reopen.
              (WebCore::HTMLParser::popBlock): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb6ad39f
    • ap@webkit.org's avatar
      Reviewed by Adam Roben. · 879328b3
      ap@webkit.org authored
              A little database quota management cleanup.
      
              * storage/OriginQuotaManager.cpp:
              (WebCore::OriginQuotaManager::OriginQuotaManager):
              (WebCore::OriginQuotaManager::lock):
              (WebCore::OriginQuotaManager::unlock):
              (WebCore::OriginQuotaManager::trackOrigin):
              (WebCore::OriginQuotaManager::tracksOrigin):
              (WebCore::OriginQuotaManager::addDatabase):
              (WebCore::OriginQuotaManager::removeDatabase):
              (WebCore::OriginQuotaManager::removeOrigin):
              (WebCore::OriginQuotaManager::markDatabase):
              (WebCore::OriginQuotaManager::diskUsage):
              * storage/OriginQuotaManager.h:
              Changed to assert that a lock is taken more directly and reliably. Removed comments about
              main/background threads, as this is likely to stop being true with synchronous Database calls
              being made on worker threads.
      
              * storage/OriginUsageRecord.cpp:
              (WebCore::OriginUsageRecord::OriginUsageRecord):
              (WebCore::OriginUsageRecord::addDatabase):
              (WebCore::OriginUsageRecord::removeDatabase):
              (WebCore::OriginUsageRecord::markDatabase):
              (WebCore::OriginUsageRecord::diskUsage):
              * storage/OriginUsageRecord.h:
              (WebCore::OriginUsageRecord::DatabaseEntry::DatabaseEntry):
              Don't use a magic value for unknown. It is totally unnecessary for DatabaseEntry, and
              can be replaced with a single boolean for OriginUsageRecord.
              Added assertions for string parameters being unshared.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      879328b3
    • aroben@apple.com's avatar
      Windows build fixes · a2fd5702
      aroben@apple.com authored
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add
              StructureID.{cpp,h} to the project. Also let VS reorder this file.
              * VM/CodeBlock.cpp: Include StringExtras so that snprintf will be
              defined on Windows.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a2fd5702
  3. 01 Sep, 2008 3 commits
    • abarth@webkit.org's avatar
      WebCore: · aea97a06
      abarth@webkit.org authored
      2008-09-01  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=19760
      
              Make granting LoadLocalResources conditional on a policy.
      
              * WebCore.base.exp:
              * dom/Document.cpp:
              (WebCore::Document::initSecurityContext):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::setLocalLoadPolicy):
              (WebCore::FrameLoader::restrictAccessToLocal):
              * loader/FrameLoader.h:
              (WebCore::FrameLoader::):
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::grantLoadLocalResources):
              * platform/SecurityOrigin.h:
      
      WebKit/mac:
      
      2008-09-01  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=19760
      
              Add a linked-on-or-after check to prevent substitute data from loading
              local resources on newer users of WebKit.
      
              * Misc/WebKitVersionChecks.h:
              * WebView/WebView.mm:
              (-[WebView _commonInitializationWithFrameName:groupName:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aea97a06
    • dino@apple.com's avatar
      2008-09-01 Dean Jackson <dino@apple.com> · 59ca9f5b
      dino@apple.com authored
              Reviewed by Sam Weinig.
      
              https://bugs.webkit.org/show_bug.cgi?id=20571
              Make sure Window object can assign Animation/Transition event
              listeners via attributes.
      
              Also added a bunch of transition event tests, although
              only transition-end-event-window is directly relevant to this patch.
      
              (WebCore::JSDOMWindowBase::put):
      
              Tests: transitions/transition-end-event-all-properties.html
                     transitions/transition-end-event-attributes.html
                     transitions/transition-end-event-container.html
                     transitions/transition-end-event-left.html
                     transitions/transition-end-event-multiple-01.html
                     transitions/transition-end-event-multiple-02.html
                     transitions/transition-end-event-multiple-03.html
                     transitions/transition-end-event-multiple-04.html
                     transitions/transition-end-event-nested.html
                     transitions/transition-end-event-transform.html
                     transitions/transition-end-event-window.html
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59ca9f5b
    • dino@apple.com's avatar
      2008-09-01 Dean Jackson <dino@apple.com> · 6e2db502
      dino@apple.com authored
              Reviewed by Sam Weinig
      
              Code styling cleanup.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getValueProperty):
              (WebCore::JSDOMWindowBase::put):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e2db502