1. 27 Jan, 2010 37 commits
    • ossy@webkit.org's avatar
      [Qt] Failing tests after r53895 skipped. · db745be9
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=34167
      
      * platform/qt/Skipped: 
       - http/tests/history/redirect-301.pl
       - http/tests/history/redirect-302.pl
       - http/tests/history/redirect-303.pl
       - http/tests/history/redirect-307.pl
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53906 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      db745be9
    • ossy@webkit.org's avatar
      Unreviewed trivial fix. · cef7984a
      ossy@webkit.org authored
      * platform/qt/editing/pasteboard/paste-noscript-xhtml-expected.txt: updated after r53873.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53905 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      cef7984a
    • ap@apple.com's avatar
      More Windows build fixing. · dd0e675f
      ap@apple.com authored
              * win/tools/vsprops/common.vsprops: Disable warning C4180 (qualifier applied to function
              type has no meaning; ignored). This is a known bug - MSVC tries to compile a wrong
              specialization sometimes - but it's not instantiated, so it's harmless.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53904 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      dd0e675f
    • ap@apple.com's avatar
      More Windows build fixing. · 66d8ab52
      ap@apple.com authored
              * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53903 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      66d8ab52
    • ap@apple.com's avatar
      Windows build fix. · a20d9d3b
      ap@apple.com authored
              * wtf/HashTraits.h: Include malloc.h for _msize().
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53902 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      a20d9d3b
    • ap@apple.com's avatar
      Build fix. · 697ea931
      ap@apple.com authored
              * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a
              static (empty) version of this function.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53901 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      697ea931
    • dbates@webkit.org's avatar
      2010-01-26 Daniel Bates <dbates@webkit.org> · 43fcba7f
      dbates@webkit.org authored
              Unreviewed. Updated expected failing results for table-percent-height.html
              to reflect one pixel difference between the results generated by the Qt bot
              and my machine. Added failing test fast/css/button-height.html to GTK Skipped
              file as we need to look into this. See bug #33936 for more details.
      
              * platform/gtk/Skipped: Added failing test fast/css/button-height.html.
              * platform/qt/fast/replaced/table-percent-height-expected.txt: Updated result.
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53900 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      43fcba7f
    • ap@apple.com's avatar
      Reviewed by Darin Adler. · 7f8c270a
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=34150
              WebKit needs a mechanism to catch stale HashMap entries
      
              It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
              is just its value, it is very unlikely that any observable problem is reproducible.
      
              This extends hash table consistency checks to check that pointers are referencing allocated
              memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
              to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
      
              * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
              add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
              with those yet.
      
              * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
              CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
      
              * wtf/HashTable.h:
              (WTF::HashTable::internalCheckTableConsistency):
              (WTF::HashTable::internalCheckTableConsistencyExceptSize):
              (WTF::HashTable::checkTableConsistencyExceptSize):
              Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
              (WTF::::add): Updated for checkTableConsistency renaming.
              (WTF::::addPassingHashCode): Ditto.
              (WTF::::removeAndInvalidate): Ditto.
              (WTF::::remove): Ditto.
              (WTF::::rehash): Ditto.
              (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
              function returns true for tables with m_table == 0.
              (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
              we could do the same for values.
      
              * wtf/HashTraits.h:
              (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
              to add checks. Currently, the only override is for pointer hashes.
      
              * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53899 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      7f8c270a
    • eric@webkit.org's avatar
      2010-01-26 Yaar Schnitman <yaar@chromium.org> · ca0e3e27
      eric@webkit.org authored
              Reviewed by Darin Fisher.
      
              Add KeyboardTest to WebKit API tests
              https://bugs.webkit.org/show_bug.cgi?id=34178
      
              * WebKit.gyp:
              * tests/KeyboardTest.cpp: Added.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53898 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      ca0e3e27
    • dbates@webkit.org's avatar
      2010-01-26 Daniel Bates <dbates@webkit.org> · 988df85e
      dbates@webkit.org authored
              Reviewed by Tor Arne Vestbø.
      
              https://bugs.webkit.org/show_bug.cgi?id=29564
      
              [Qt] Fixes an issue where the height of <button>- and
              <input type="button">- elements are fixed to the height of the
              button label font plus padding. That is, the CSS height property
              is being ignored.
      
              Instead, we should honor the user-specified height, if appropriate
              for the platform and context. Notice, the Mac ports do not honor the
              height for <input type="button"> elements unless a border and/or
              background is also specified.
      
              Test: fast/css/button-height.html
      
              * platform/qt/RenderThemeQt.cpp:
              (WebCore::RenderThemeQt::adjustButtonStyle):
      2010-01-26  Daniel Bates  <dbates@webkit.org>
      
              Reviewed by Tor Arne Vestbø.
      
              https://bugs.webkit.org/show_bug.cgi?id=29564
      
              Tests that the user-specified height for <button>- and <input type="button">-
              elements are honored, if appropriate for the platform and context.
      
              * fast/css/button-height-expected.txt: Added.
              * fast/css/button-height.html: Added.
              * fast/replaced/table-percent-height-expected.txt: Added notice about failing tests
              in Windows ports.
              * fast/replaced/table-percent-height.html: Ditto.
              * platform/qt/fast/replaced/table-percent-height-expected.txt: Added.
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53897 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      988df85e
    • dbates@webkit.org's avatar
      2010-01-26 Daniel Bates <dbates@webkit.org> · 1dbb0a7a
      dbates@webkit.org authored
              Reviewed by Adam Barth.
      
              https://bugs.webkit.org/show_bug.cgi?id=34070
      
              Moves the try/catch for OSError exceptions in Executive.run_command
              to Credentials.read_credentials() so that the unit test
              webkitpy.scm_unittest.SCMClassTests.test_error_handlers can
              assert that Executive.run_command throws an OSError exception.
      
              * Scripts/webkitpy/credentials.py:
              * Scripts/webkitpy/executive.py: Moved try/catch for OSError to
              method Credentials.read_credentials().
              * Scripts/webkitpy/executive_unittest.py: Removed tests that no longer
              apply: test_run_command_with_bad_command_check_return_code and
              test_run_command_with_bad_command_check_calls_error_handler. Added new
              test to assert that run_command throws OSError exceptions.
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53896 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      1dbb0a7a
    • eric@webkit.org's avatar
      2010-01-26 Diego Gonzalez <diego.gonzalez@openbossa.org> · b3f1033f
      eric@webkit.org authored
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] DRT WebHistory support
              https://bugs.webkit.org/show_bug.cgi?id=34167
      
              * platform/qt/Skipped:
      2010-01-26  Diego Gonzalez  <diego.gonzalez@openbossa.org>
      
              Reviewed by Kenneth Rohde Christiansen.
      
              [Qt] DRT WebHistory support
              https://bugs.webkit.org/show_bug.cgi?id=34167
      
              * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
              (LayoutTestController::reset):
              (LayoutTestController::webHistoryItemCount):
              (LayoutTestController::keepWebHistory):
              * DumpRenderTree/qt/LayoutTestControllerQt.h:
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53895 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      b3f1033f
    • eric@webkit.org's avatar
      2010-01-26 Alexander Pavlov <apavlov@chromium.org> · a52d12b2
      eric@webkit.org authored
              Reviewed by Timothy Hatcher.
      
              Enable the Audits panel via a shortcut (Cmd/Ctrl+Alt+A)
              https://bugs.webkit.org/show_bug.cgi?id=34158
      
              * inspector/front-end/inspector.js:
              (WebInspector.documentKeyDown):
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53894 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      a52d12b2
    • tkent@chromium.org's avatar
      2010-01-26 Kent Tamura <tkent@chromium.org> · 1a400cb7
      tkent@chromium.org authored
              Reviewed by Darin Adler.
      
              HTMLInputElement::valueAsNumber support except type=datetime-local.
              https://bugs.webkit.org/show_bug.cgi?id=32696
      
              input-valueasnumber-datetime-expected.txt and
              input-valueasnumber-time-expected.txt have FAIL lines because they
              test unimplemented features.
      
              * fast/forms/input-valueasnumber-date-expected.txt: Added.
              * fast/forms/input-valueasnumber-date.html: Added.
              * fast/forms/input-valueasnumber-datetime-expected.txt: Added.
              * fast/forms/input-valueasnumber-datetime.html: Added.
              * fast/forms/input-valueasnumber-month-expected.txt: Added.
              * fast/forms/input-valueasnumber-month.html: Added.
              * fast/forms/input-valueasnumber-number-expected.txt: Added.
              * fast/forms/input-valueasnumber-number.html: Added.
              * fast/forms/input-valueasnumber-range-expected.txt: Added.
              * fast/forms/input-valueasnumber-range.html: Added.
              * fast/forms/input-valueasnumber-time-expected.txt: Added.
              * fast/forms/input-valueasnumber-time.html: Added.
              * fast/forms/input-valueasnumber-unsupported-expected.txt: Added.
              * fast/forms/input-valueasnumber-unsupported.html: Added.
              * fast/forms/input-valueasnumber-week-expected.txt: Added.
              * fast/forms/input-valueasnumber-week.html: Added.
              * fast/forms/script-tests/input-valueasnumber-date.js: Added.
              * fast/forms/script-tests/input-valueasnumber-datetime.js: Added.
              * fast/forms/script-tests/input-valueasnumber-month.js: Added.
              * fast/forms/script-tests/input-valueasnumber-number.js: Added.
              * fast/forms/script-tests/input-valueasnumber-range.js: Added.
              * fast/forms/script-tests/input-valueasnumber-time.js: Added.
              * fast/forms/script-tests/input-valueasnumber-unsupported.js: Added.
              * fast/forms/script-tests/input-valueasnumber-week.js: Added.
      
      2010-01-26  Kent Tamura  <tkent@chromium.org>
      
              Reviewed by Darin Adler.
      
              HTMLInputElement::valueAsNumber support except type=datetime-local.
              https://bugs.webkit.org/show_bug.cgi?id=32696
      
              Tests: fast/forms/input-valueasnumber-date.html
                     fast/forms/input-valueasnumber-datetime.html
                     fast/forms/input-valueasnumber-month.html
                     fast/forms/input-valueasnumber-number.html
                     fast/forms/input-valueasnumber-range.html
                     fast/forms/input-valueasnumber-time.html
                     fast/forms/input-valueasnumber-unsupported.html
                     fast/forms/input-valueasnumber-week.html
      
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::valueAsNumber):
                According to the specification, we should return NaN for invalid values.
              (WebCore::HTMLInputElement::setValueAsNumber):
                According to the specification, throws NOT_SUPPORTED_ERR for Infinitiy or NaN,
                and throws INVALID_STATE_ERR for unsupported types.
              (WebCore::HTMLInputElement::formStringToDouble):
                According to the step 14 of Real Number in the specification, we
                should round -0 to 0.
              * html/HTMLInputElement.h: Declare valueAsNumber() and setValueAsNumber().
              * html/HTMLInputElement.idl: Add valueAsNumber.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53893 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      1a400cb7
    • hyatt@apple.com's avatar
      Make sure there is a lock on serialize in SerializedScriptValueData, since... · f95408e5
      hyatt@apple.com authored
      Make sure there is a lock on serialize in SerializedScriptValueData, since type errors can be created when
      exceptions are thrown.
      
      Reviewed by Oliver Hunt.
      
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValueData::serialize):
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53892 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      f95408e5
    • eric@webkit.org's avatar
      2010-01-26 Lyon Chen <liachen@rim.com> · 7493eaa6
      eric@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
              https://bugs.webkit.org/show_bug.cgi?id=33902
      
              * bytecode/Opcode.h:
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53891 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      7493eaa6
    • tkent@chromium.org's avatar
      2010-01-26 Kent Tamura <tkent@chromium.org> · 8cb79277
      tkent@chromium.org authored
              Reviewed by Eric Seidel.
      
              Add Date type support for Objective-C binding.
              https://bugs.webkit.org/show_bug.cgi?id=32810
      
              The Date type in IDLs is mapped to NSTimeInterval in Objective-C.
      
              * bindings/objc/DOMInternal.h: Add kit() and core() for NSTimeInterval.
              * bindings/scripts/CodeGenerator.pm: Make Date a primitive type.
              * bindings/scripts/CodeGeneratorJS.pm: Move some code for the CodeGeenrator.pm change.
              * bindings/scripts/CodeGeneratorObjC.pm:
              * bindings/scripts/CodeGeneratorV8.pm: Move some code for the CodeGeenrator.pm change.
              * html/HTMLInputElement.idl: Remove Objective-C exclusion for valueAsDate.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53890 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      8cb79277
    • tkent@chromium.org's avatar
      2010-01-26 Kent Tamura <tkent@chromium.org> · 1c731d2f
      tkent@chromium.org authored
              Reviewed by Eric Seidel.
      
              [Win] Add modifiers parameter support to Windows DumpRenderTree
              https://bugs.webkit.org/show_bug.cgi?id=34068
      
              Remove listbox-deselect-scroll.html and listbox-selectio-2.html
              from Skipped. We improved their portability and Windows DRT now
              havs modifiers parameter of eventSender.mouseDown() and
              eventSender.mouseUp().
      
              * platform/win/Skipped:
      2010-01-26  Kent Tamura  <tkent@chromium.org>
      
              Reviewed by Eric Seidel.
      
              [Win] Add modifiers parameter support to Windows DumpRenderTree
              https://bugs.webkit.org/show_bug.cgi?id=34068
      
              Add support for functional name modifiers; "addSelectionKey" and
              "rangeSelectionKey", and modifiers parameter to eventSender.mouseDown()
              and eventSender.mouseUp().
              This change is similar to r53498 for Mac.
      
              * DumpRenderTree/win/EventSender.cpp:
              (buildModifierFlags): New function to set MK_CONTROL or MK_SHIFT to WPARAM.
              (mouseDownCallback): Call buidlModifiersFlags().
              (mouseUpCallback): ditto.
              (keyDownCallback): Add support for "addSelectionkey" and "rangeSelectionKey".
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53889 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      1c731d2f
    • cjerdonek@webkit.org's avatar
      No review: fixing broken autoinstall.py · ee6b2f39
      cjerdonek@webkit.org authored
      git-svn-id: svn://svn.chromium.org/blink/trunk@53888 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      ee6b2f39
    • cjerdonek@webkit.org's avatar
      2010-01-26 Chris Jerdonek <cjerdonek@webkit.org> · 99a3cf79
      cjerdonek@webkit.org authored
              Reviewed by Eric Seidel.
      
              The Python autoinstall cache directory now only gets created
              in the directory containing autoinstall.py.
      
              https://bugs.webkit.org/show_bug.cgi?id=33365
      
              * Scripts/webkitpy/autoinstall.py:
                - Also added a README file to the cache directory saying
                  where it came from.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53887 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      99a3cf79
    • dimich@chromium.org's avatar
      Not reviewed, attempt to fix Tiger build. · 8ea95dd9
      dimich@chromium.org authored
      * rendering/RenderTreeAsText.cpp:
      (WebCore::write): Use UNUSED_PARAM macros to prevent compiler warning on targets without accelerated compositing.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53886 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      8ea95dd9
    • rolandsteiner@chromium.org's avatar
      Incorrect boolean expression in isMailBlockquote() (WebCore/htmlediting.cpp) · 048cb7cf
      rolandsteiner@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=34156
      
      Reviewed by Darin Adler.
      
      No new tests (minor code change).
      
      * editing/htmlediting.cpp:
      (WebCore::isMailBlockquote):
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53885 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      048cb7cf
    • pkasting@chromium.org's avatar
      Handle broken images more correctly in the open-source image decoders. · ea9468a2
      pkasting@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=33747
      
      Reviewed by David Levin.
      
      No tests since Safari doesn't use these decoders and there's already a
      broken-image test in the tree.
      
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::createFrameAtIndex): No need to check isSizeAvailable() since size() is now always safe.
      * platform/image-decoders/ImageDecoder.h:
      (WebCore::ImageDecoder::size): Don't assert that the bitmap is valid; we don't need a complete successful decode to be able to give info about the size.
      * platform/image-decoders/qt/RGBA32BufferQt.cpp:
      (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
      * platform/image-decoders/skia/ImageDecoderSkia.cpp:
      (WebCore::RGBA32Buffer::setSize): Don't set the frame to complete on failure, since it's not complete, but empty, and callers can better handle empty frames.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53884 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      ea9468a2
    • zimmermann@webkit.org's avatar
      2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com> · 4a9b80a8
      zimmermann@webkit.org authored
              Not reviewed. Synchronize Qt/Gtk build systems with Mac/Win, should fix Qt compilation. Gtk results still pending.
      
              * GNUmakefile.am:
              * WebCore.pro:
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53883 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      4a9b80a8
    • cjerdonek@webkit.org's avatar
      2010-01-26 Chris Jerdonek <cjerdonek@webkit.org> · a0ec3f95
      cjerdonek@webkit.org authored
              Reviewed by Eric Seidel.
      
              Moved the check-webkit-style processors into a new
              webkitpy/style/processors directory.
      
              https://bugs.webkit.org/show_bug.cgi?id=34060
      
              * Scripts/webkitpy/style/checker.py:
              * Scripts/webkitpy/style/checker_unittest.py:
              * Scripts/webkitpy/style/cpp_style.py: Removed.
              * Scripts/webkitpy/style/cpp_style_unittest.py: Removed.
              * Scripts/webkitpy/style/processors: Added.
              * Scripts/webkitpy/style/processors/__init__.py: Added.
              * Scripts/webkitpy/style/processors/cpp.py: Copied from WebKitTools/Scripts/webkitpy/style/cpp_style.py.
              * Scripts/webkitpy/style/processors/cpp_unittest.py: Copied from WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py.
              * Scripts/webkitpy/style/processors/text.py: Copied from WebKitTools/Scripts/webkitpy/style/text_style.py.
              * Scripts/webkitpy/style/processors/text_unittest.py: Copied from WebKitTools/Scripts/webkitpy/style/text_style_unittest.py.
              * Scripts/webkitpy/style/text_style.py: Removed.
              * Scripts/webkitpy/style/text_style_unittest.py: Removed.
              * Scripts/webkitpy/style/unittests.py:
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53882 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      a0ec3f95
    • zimmermann@webkit.org's avatar
      2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com> · 45b04eff
      zimmermann@webkit.org authored
              Not reviewed. Attempt to fix V8 - change SetterMethod function signatures, just like it has been done for JSSVGPODTypeWrapper.
      
              * bindings/v8/V8SVGPODTypeWrapper.h:
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53881 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      45b04eff
    • zimmermann@webkit.org's avatar
      2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com> · 4b8cea10
      zimmermann@webkit.org authored
              Not reviewd. Revert Base.xcconfig changes, was not meant to be committed.
      
              * Configurations/Base.xcconfig:
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53880 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      4b8cea10
    • zimmermann@webkit.org's avatar
      2010-01-26 Nikolas Zimmermann <nzimmermann@rim.com> · 1534e2e0
      zimmermann@webkit.org authored
              Reviewed by Oliver Hunt.
      
              SVG consumes way too much memory to store animated properties in the DOM
              https://bugs.webkit.org/show_bug.cgi?id=34188
      
              Shrink WebCore library size to 75% (measured in debug builds) and reduce SVG memory usage to <25%.
              Adding Oliver testcase as manual-tests/svg-node-count-vs-scroll.xhtml, which creates an arbitary number of
              rects (50.000 <rect> elements added to the DOM by default) - memory usage down to 111M from 503M (RPRVT).
              The SVG DOM side is almost fine, still some optimizations possible, that will be implemented soon - next
              target is the SVG render tree, there are plenty of possibilities to reduce memory usage there.
      
              Redesign the way we store animated properties in the individual SVG*Element files. Short story: In order
              to support SVG DOM through the bindings (e.g. JS) we need to associate SVGAnimatedProperty objects with
              the SVGElement object that created it - we used to store this pointer directly in the SVGAnimatedProperty.
              This means, every SVGAnimatedProperty stored in a SVGRectElement, stored a pointer to the SVGRectElement, resulting
              in excessive memory usage. This is now properly implemented, without wasting tons of memory. Unfortunately this
              requires touching all SVG*Element files.
      
              Detailed list of changes:
              - Remove template bloat by not specializing class templates for each attributeName/tagName combination. Instead
                SVGAnimatedProperty is a non-specialized template class now, only depending on the AnimatedType (ie. SVGLength for SVGAnimatedLength)
                -> This heavily reduces the generated code, thus shrinking WebCore size. I hope we can build windows again without SVGAllInOne.cpp
      
              - Remove "exportStrings" / "exportString" handling from make_names.pl - SVG defined string literals for each QualifiedName,
                in order to use template specialization based on "const char*" parameters. All that bloat is gone, so there's no need for it anymore.
      
              - Redesign SVGAnimatedProperty so it does not need any back-pointers to the SVGElement that created it
      
              - Don't actually store the XML DOM attribute name associated with a SVG DOM property in SVGAnimatedProperty, move the associatedAttributeName()
                function inside the macro declaration and just return the passed macro parameter DOMAttribute there, storing is inefficient and useless.
      
              - Remove SynchronizablePropertyController, which was living in SVGElement as member variable, keeping a HashMap<AttributeName, SVGAnimatedProperty>.
                It was needed before to lookup a SVGAnimatedProperty for a XML DOM attribute, in order to synchronize SVG <-> XML dom properties/attributes.
                Instead just add a "synchronizeProperty(const QualifiedName&)" method to all SVG*Element classes. As each SVG*Element class knows about its
                animated properties it can just ask them to synchronize themselves - no need for any dynamic lookups anymore.
      
              - Remove SynchronizableTypeWrapper which added more complexity for the sake of SVG <-> XML DOM synchronization, all replaced by synchronizeProperty.
      
              - Pass around any POD objects as const references, instead of copying them for no reason.
      
              - Clean up SVGAnimatedProperty, splitting up into SVGAnimatedProperty/PropertySynchronizer/PropertyTraits.
      
              - Remove baseValue/setBaseValue code from SVGDocumentExtensions, not needed anymore.
      
              ... and tons of changes to all SVG*Element classes, adapting to the new way of handling animated properties.
      
              * GNUmakefile.am: Remove Synchronizable* from build, add new SVGAnimatedPropertySynchronizer/Traits files
              * WebCore.gypi: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * bindings/js/JSSVGPODTypeWrapper.h: Change synchronization callback signatures, as we pass around const-references now.
              * dom/Element.cpp: Let updateAnimatedSVGAttribute take a QualifiedName instead of pure Strings.
              (WebCore::Element::getAttribute):
              (WebCore::Element::hasAttributes):
              * dom/Element.h:
              (WebCore::Element::updateAnimatedSVGAttribute):
              (WebCore::Element::attributes):
              * dom/make_names.pl: Remove SVG specific "exportString" / "exportStrings" functionality, see above.
              * html/HTMLAttributeNames.in: Remove "exportString" tag from "className" attribute.
              * manual-tests/svg-node-count-vs-scroll.xhtml: Added. Can be used to verify memory consumption with a lot of DOM objects.
              * mathml/mathattrs.in: MathML doesn't need "exportStrings" - remove it.
              * mathml/mathtags.in: Ditto.
              * svg/SVGAElement.cpp:
              (WebCore::SVGAElement::SVGAElement):
              (WebCore::SVGAElement::synchronizeProperty):
              * svg/SVGAElement.h:
              * svg/SVGAllInOne.cpp: Remove SynchronizablePropertyController.cpp
              * svg/SVGAltGlyphElement.cpp:
              (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
              (WebCore::SVGAltGlyphElement::synchronizeProperty):
              * svg/SVGAltGlyphElement.h:
              * svg/SVGAnimateTransformElement.cpp:
              (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
              * svg/SVGAnimatedProperty.h: Rewritten, see above for details.
              (WebCore::SVGAnimatedPropertyTearOff::create):
              (WebCore::SVGAnimatedPropertyTearOff::setBaseVal):
              (WebCore::SVGAnimatedPropertyTearOff::setAnimVal):
              (WebCore::SVGAnimatedPropertyTearOff::baseVal):
              (WebCore::SVGAnimatedPropertyTearOff::animVal):
              (WebCore::SVGAnimatedPropertyTearOff::associatedAttributeName):
              (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff):
              (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
              (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
              (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
              (WebCore::SVGAnimatedProperty::value):
              (WebCore::SVGAnimatedProperty::baseValue):
              (WebCore::SVGAnimatedProperty::setValue):
              (WebCore::SVGAnimatedProperty::setBaseValue):
              (WebCore::SVGAnimatedProperty::shouldSynchronize):
              (WebCore::SVGAnimatedProperty::setShouldSynchronize):
              * svg/SVGAnimatedPropertySynchronizer.h: Added.
              (WebCore::):
              * svg/SVGAnimatedPropertyTraits.h: Added.
              (WebCore::):
              * svg/SVGAnimatedTemplate.h: Move SVGAnimatedPropertyTraits into its own file.
              (WebCore::SVGAnimatedTemplate::forgetWrapper):
              (WebCore::lookupOrCreateWrapper):
              * svg/SVGAnimationElement.cpp:
              (WebCore::SVGAnimationElement::SVGAnimationElement):
              (WebCore::SVGAnimationElement::synchronizeProperty):
              * svg/SVGAnimationElement.h:
              * svg/SVGCircleElement.cpp:
              (WebCore::SVGCircleElement::SVGCircleElement):
              (WebCore::SVGCircleElement::synchronizeProperty):
              * svg/SVGCircleElement.h:
              * svg/SVGClipPathElement.cpp:
              (WebCore::SVGClipPathElement::SVGClipPathElement):
              (WebCore::SVGClipPathElement::synchronizeProperty):
              * svg/SVGClipPathElement.h:
              * svg/SVGComponentTransferFunctionElement.cpp:
              (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
              (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute):
              (WebCore::SVGComponentTransferFunctionElement::synchronizeProperty):
              * svg/SVGComponentTransferFunctionElement.h:
              * svg/SVGCursorElement.cpp:
              (WebCore::SVGCursorElement::SVGCursorElement):
              (WebCore::SVGCursorElement::synchronizeProperty):
              * svg/SVGCursorElement.h:
              * svg/SVGDefsElement.cpp:
              (WebCore::SVGDefsElement::SVGDefsElement):
              (WebCore::SVGDefsElement::synchronizeProperty):
              * svg/SVGDefsElement.h:
              * svg/SVGDocumentExtensions.h:
              * svg/SVGElement.cpp: Adapt to synchronization changes: use synchronizeProperty() call, instead of SynchronizablePropertyController.
              (WebCore::SVGElement::updateAnimatedSVGAttribute):
              * svg/SVGElement.h: Don't store SynchronizablePropertyController anymore, it's gone.
              (WebCore::SVGElement::synchronizeProperty):
              (WebCore::SVGElement::setSynchronizedSVGAttributes):
              * svg/SVGEllipseElement.cpp:
              (WebCore::SVGEllipseElement::SVGEllipseElement):
              (WebCore::SVGEllipseElement::synchronizeProperty):
              * svg/SVGEllipseElement.h:
              * svg/SVGExternalResourcesRequired.cpp:
              * svg/SVGExternalResourcesRequired.h:
              * svg/SVGFEBlendElement.cpp:
              (WebCore::SVGFEBlendElement::SVGFEBlendElement):
              (WebCore::SVGFEBlendElement::synchronizeProperty):
              * svg/SVGFEBlendElement.h:
              * svg/SVGFEColorMatrixElement.cpp:
              (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
              (WebCore::SVGFEColorMatrixElement::synchronizeProperty):
              * svg/SVGFEColorMatrixElement.h:
              * svg/SVGFEComponentTransferElement.cpp:
              (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
              (WebCore::SVGFEComponentTransferElement::synchronizeProperty):
              * svg/SVGFEComponentTransferElement.h:
              * svg/SVGFECompositeElement.cpp:
              (WebCore::SVGFECompositeElement::SVGFECompositeElement):
              (WebCore::SVGFECompositeElement::parseMappedAttribute):
              (WebCore::SVGFECompositeElement::synchronizeProperty):
              * svg/SVGFECompositeElement.h:
              * svg/SVGFEDiffuseLightingElement.cpp:
              (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
              (WebCore::SVGFEDiffuseLightingElement::synchronizeProperty):
              * svg/SVGFEDiffuseLightingElement.h:
              * svg/SVGFEDisplacementMapElement.cpp:
              (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
              (WebCore::SVGFEDisplacementMapElement::synchronizeProperty):
              * svg/SVGFEDisplacementMapElement.h:
              * svg/SVGFEGaussianBlurElement.cpp:
              (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
              (WebCore::SVGFEGaussianBlurElement::synchronizeProperty):
              * svg/SVGFEGaussianBlurElement.h:
              * svg/SVGFEImageElement.cpp:
              (WebCore::SVGFEImageElement::SVGFEImageElement):
              (WebCore::SVGFEImageElement::synchronizeProperty):
              * svg/SVGFEImageElement.h:
              * svg/SVGFELightElement.cpp:
              (WebCore::SVGFELightElement::SVGFELightElement):
              (WebCore::SVGFELightElement::synchronizeProperty):
              * svg/SVGFELightElement.h:
              * svg/SVGFEMergeNodeElement.cpp:
              (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
              (WebCore::SVGFEMergeNodeElement::synchronizeProperty):
              * svg/SVGFEMergeNodeElement.h:
              * svg/SVGFEMorphologyElement.cpp:
              (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
              (WebCore::SVGFEMorphologyElement::synchronizeProperty):
              * svg/SVGFEMorphologyElement.h:
              * svg/SVGFEOffsetElement.cpp:
              (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
              (WebCore::SVGFEOffsetElement::synchronizeProperty):
              * svg/SVGFEOffsetElement.h:
              * svg/SVGFESpecularLightingElement.cpp:
              (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
              (WebCore::SVGFESpecularLightingElement::synchronizeProperty):
              * svg/SVGFESpecularLightingElement.h:
              * svg/SVGFETileElement.cpp:
              (WebCore::SVGFETileElement::SVGFETileElement):
              (WebCore::SVGFETileElement::synchronizeProperty):
              * svg/SVGFETileElement.h:
              * svg/SVGFETurbulenceElement.cpp:
              (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
              (WebCore::SVGFETurbulenceElement::synchronizeProperty):
              * svg/SVGFETurbulenceElement.h:
              * svg/SVGFilterElement.cpp:
              (WebCore::SVGFilterElement::SVGFilterElement):
              (WebCore::SVGFilterElement::synchronizeProperty):
              * svg/SVGFilterElement.h:
              * svg/SVGFilterPrimitiveStandardAttributes.cpp:
              (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
              (WebCore::SVGFilterPrimitiveStandardAttributes::synchronizeProperty):
              * svg/SVGFilterPrimitiveStandardAttributes.h:
              * svg/SVGFitToViewBox.cpp:
              * svg/SVGFitToViewBox.h:
              * svg/SVGFontElement.cpp:
              (WebCore::SVGFontElement::SVGFontElement):
              (WebCore::SVGFontElement::synchronizeProperty):
              * svg/SVGFontElement.h:
              * svg/SVGForeignObjectElement.cpp:
              (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
              (WebCore::SVGForeignObjectElement::synchronizeProperty):
              * svg/SVGForeignObjectElement.h:
              * svg/SVGGElement.cpp:
              (WebCore::SVGGElement::SVGGElement):
              (WebCore::SVGGElement::synchronizeProperty):
              * svg/SVGGElement.h:
              * svg/SVGGradientElement.cpp:
              (WebCore::SVGGradientElement::SVGGradientElement):
              (WebCore::SVGGradientElement::synchronizeProperty):
              * svg/SVGGradientElement.h:
              * svg/SVGImageElement.cpp:
              (WebCore::SVGImageElement::SVGImageElement):
              (WebCore::SVGImageElement::synchronizeProperty):
              * svg/SVGImageElement.h:
              * svg/SVGLineElement.cpp:
              (WebCore::SVGLineElement::SVGLineElement):
              (WebCore::SVGLineElement::synchronizeProperty):
              * svg/SVGLineElement.h:
              * svg/SVGLinearGradientElement.cpp:
              (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
              (WebCore::SVGLinearGradientElement::synchronizeProperty):
              * svg/SVGLinearGradientElement.h:
              * svg/SVGList.h: Adapt to const-reference changes.
              (WebCore::SVGPODListItem::setValue):
              * svg/SVGMPathElement.cpp:
              (WebCore::SVGMPathElement::SVGMPathElement):
              (WebCore::SVGMPathElement::synchronizeProperty):
              * svg/SVGMPathElement.h:
              * svg/SVGMarkerElement.cpp:
              (WebCore::SVGMarkerElement::SVGMarkerElement):
              (WebCore::SVGMarkerElement::synchronizeProperty):
              * svg/SVGMarkerElement.h:
              * svg/SVGMaskElement.cpp:
              (WebCore::SVGMaskElement::SVGMaskElement):
              (WebCore::SVGMaskElement::synchronizeProperty):
              * svg/SVGMaskElement.h:
              * svg/SVGPathElement.cpp:
              (WebCore::SVGPathElement::SVGPathElement):
              (WebCore::SVGPathElement::synchronizeProperty):
              * svg/SVGPathElement.h:
              * svg/SVGPatternElement.cpp:
              (WebCore::SVGPatternElement::SVGPatternElement):
              (WebCore::SVGPatternElement::synchronizeProperty):
              * svg/SVGPatternElement.h:
              * svg/SVGPolyElement.cpp:
              (WebCore::SVGPolyElement::SVGPolyElement):
              (WebCore::SVGPolyElement::svgAttributeChanged):
              (WebCore::SVGPolyElement::synchronizeProperty):
              * svg/SVGPolyElement.h:
              * svg/SVGRadialGradientElement.cpp:
              (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
              (WebCore::SVGRadialGradientElement::synchronizeProperty):
              * svg/SVGRadialGradientElement.h:
              * svg/SVGRectElement.cpp:
              (WebCore::SVGRectElement::SVGRectElement):
              (WebCore::SVGRectElement::synchronizeProperty):
              * svg/SVGRectElement.h:
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::SVGSVGElement):
              (WebCore::SVGSVGElement::synchronizeProperty):
              * svg/SVGSVGElement.h:
              * svg/SVGScriptElement.cpp:
              (WebCore::SVGScriptElement::SVGScriptElement):
              (WebCore::SVGScriptElement::synchronizeProperty):
              * svg/SVGScriptElement.h:
              * svg/SVGStopElement.cpp:
              (WebCore::SVGStopElement::SVGStopElement):
              (WebCore::SVGStopElement::synchronizeProperty):
              * svg/SVGStopElement.h:
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::SVGStyledElement):
              (WebCore::SVGStyledElement::parseMappedAttribute):
              (WebCore::SVGStyledElement::synchronizeProperty):
              * svg/SVGStyledElement.h:
              * svg/SVGStyledTransformableElement.cpp:
              (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
              (WebCore::SVGStyledTransformableElement::synchronizeProperty):
              * svg/SVGStyledTransformableElement.h:
              * svg/SVGSwitchElement.cpp:
              (WebCore::SVGSwitchElement::SVGSwitchElement):
              (WebCore::SVGSwitchElement::synchronizeProperty):
              * svg/SVGSwitchElement.h:
              * svg/SVGSymbolElement.cpp:
              (WebCore::SVGSymbolElement::SVGSymbolElement):
              (WebCore::SVGSymbolElement::synchronizeProperty):
              * svg/SVGSymbolElement.h:
              * svg/SVGTRefElement.cpp:
              (WebCore::SVGTRefElement::SVGTRefElement):
              (WebCore::SVGTRefElement::synchronizeProperty):
              * svg/SVGTRefElement.h:
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGTextContentElement::SVGTextContentElement):
              (WebCore::SVGTextContentElement::synchronizeProperty):
              * svg/SVGTextContentElement.h:
              * svg/SVGTextElement.cpp:
              (WebCore::SVGTextElement::SVGTextElement):
              (WebCore::SVGTextElement::synchronizeProperty):
              * svg/SVGTextElement.h:
              * svg/SVGTextPathElement.cpp:
              (WebCore::SVGTextPathElement::SVGTextPathElement):
              (WebCore::SVGTextPathElement::synchronizeProperty):
              * svg/SVGTextPathElement.h:
              * svg/SVGTextPositioningElement.cpp:
              (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
              (WebCore::SVGTextPositioningElement::synchronizeProperty):
              * svg/SVGTextPositioningElement.h:
              * svg/SVGURIReference.cpp:
              * svg/SVGURIReference.h:
              * svg/SVGUseElement.cpp:
              (WebCore::SVGUseElement::SVGUseElement):
              (WebCore::SVGUseElement::synchronizeProperty):
              * svg/SVGUseElement.h:
              * svg/SVGViewElement.cpp:
              (WebCore::SVGViewElement::SVGViewElement):
              (WebCore::SVGViewElement::synchronizeProperty):
              * svg/SVGViewElement.h:
              * svg/SVGViewSpec.cpp:
              (WebCore::SVGViewSpec::SVGViewSpec):
              * svg/SVGViewSpec.h:
              (WebCore::SVGViewSpec::contextElement):
              * svg/SynchronizablePropertyController.cpp: Removed.
              * svg/SynchronizablePropertyController.h: Removed.
              * svg/SynchronizableTypeWrapper.h: Removed.
              * svg/svgattrs.in: Remove "exportStrings" tag.
              * svg/svgtags.in: Ditto.
              * svg/xlinkattrs.in:
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53879 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      1534e2e0
    • adele@apple.com's avatar
      WebCore: Fix for <rdar://problem/7169464> REGRESSION (r47444): PLT is 1%... · 272da116
      adele@apple.com authored
      WebCore: Fix for <rdar://problem/7169464> REGRESSION (r47444): PLT is 1% slower due to implementation of :valid and :invalid CSS selectors
      https://bugs.webkit.org/show_bug.cgi?id=34029
      
      Reviewed by Darin Adler.
      
      If we never hit the valid or invalid selectors for a particular document, 
      then we'll skip the validity checks when deciding about style sharing.
      
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::canShareStyleWithElement):
      (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
              
      * dom/Document.cpp: (WebCore::Document::Document):
      * dom/Document.h:
      (WebCore::Document::considerValidity):
      (WebCore::Document::setConsiderValidity):
      
      LayoutTests: Test for <rdar://problem/7169464> REGRESSION (r47444): PLT is 1% slower due to implementation of :valid and :invalid CSS selectors
      https://bugs.webkit.org/show_bug.cgi?id=34029
      
      Reviewed by Darin Adler.
      
      * fast/css/pseudo-valid-dynamic-expected.txt: Added.
      * fast/css/pseudo-valid-dynamic.html: Added.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53878 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      272da116
    • jorlow@chromium.org's avatar
      Revert 53797 as it seems to be causing crashes. · a182963d
      jorlow@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=34153
      
      Patch by Jeremy Orlow <jorlow@chromium.org> on 2010-01-26
      Reviewed by Simon Fraser.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::useSlowRepaints):
      (WebCore::FrameView::useSlowRepaintsIfNotOverlapped):
      * page/FrameView.h:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::scrollContents):
      * platform/ScrollView.h:
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::styleWillChange):
      (WebCore::RenderObject::destroy):
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53877 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      a182963d
    • dimich@chromium.org's avatar
      DumpRenderTree silently crashes at the end of the run because... · 5bf540ae
      dimich@chromium.org authored
      DumpRenderTree silently crashes at the end of the run because geolocationControllerClient pointer is 0.
      https://bugs.webkit.org/show_bug.cgi?id=34191
      
      Reviewed by Steve Falkenburg.
      
      * page/GeolocationController.cpp:
      (WebCore::GeolocationController::~GeolocationController): Add check for m_client being 0.
      (WebCore::GeolocationController::addObserver): Ditto.
      (WebCore::GeolocationController::removeObserver): Ditto.
      (WebCore::GeolocationController::lastPosition): Ditto.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53876 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      5bf540ae
    • ukai@chromium.org's avatar
      2010-01-26 Fumitoshi Ukai <ukai@chromium.org> · 2206eff2
      ukai@chromium.org authored
              Reviewed by Alexey Proskuryakov.
      
              Fix url used in websocket-event-target.html
              https://bugs.webkit.org/show_bug.cgi?id=34066
      
              * websocket/tests/script-tests/websocket-event-target.js:
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53875 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      2206eff2
    • simon.fraser@apple.com's avatar
      2010-01-26 Simon Fraser <simon.fraser@apple.com> · 4836fd00
      simon.fraser@apple.com authored
              Reviewed by Adele Peterson.
      
              Enhance externalRepresentation() to make it more useful for layer debugging
              https://bugs.webkit.org/show_bug.cgi?id=34143
      
              Enhance externalRepresentation() to output additional information about layers when certain flags are passed.
              The new flags allow you to show all layers (not just those that would paint), to the structure of the z-order
              and normal flow lists, and to show which layers are composited.
      
              * WebCore.base.exp: The signature of externalRepresentation() changed.
      
              * platform/text/TextStream.h: Add operator<<(void*)
              * platform/text/TextStream.cpp: Implement operator<<(void*)
      
              * rendering/RenderLayer.h:
              * rendering/RenderLayer.cpp:
              (showLayerTree): New method outside the WebCore namespace, for ease of calling from gdb.
      
              * rendering/RenderTreeAsText.h: New behavior flags for externalRepresentation().
              * rendering/RenderTreeAsText.cpp:
              (WebCore::write): Output compositing information if requested. Also clean up some -1/1 magic
              numbers with an enum.
              (WebCore::writeLayers): If requested, show layer nesting via the z-order and normal flow lists.
              (WebCore::externalRepresentation): New arguments
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53874 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      4836fd00
    • enrica@apple.com's avatar
      Fixing for failing test on qt. · 8ca0a889
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=34148
              
      Reviewed by Jon Honeycutt.
      
      Changed url in anchor tag to avoid the additional trailing slash.
      
      * editing/pasteboard/paste-noscript-xhtml-expected.txt:
      * editing/resources/htmlcontent.html:
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53873 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      8ca0a889
    • mitz@apple.com's avatar
      Fixed an off-by-one error. · ab45f00a
      mitz@apple.com authored
      Reviewed by Simon Fraser.
      
      * rendering/break_lines.cpp:
      (WebCore::shouldBreakAfter):
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53872 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      ab45f00a
    • dimich@chromium.org's avatar
      Avoid reloading iframe on re-parenting between documents. · 7e6503e1
      dimich@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=32848
      
      Reviewed by David Levin.
      
      WebCore:
      
      Achieved by setting a flag on iframe element when it is a target of document.adoptNode(node) operation.
      The flag prevents unload/load cycle and is reset once element is attached to a new document.
      If iframe is adopted but not actually inserted into the tree, it gets unloaded by async timer
      once JS yields, to avoid having active content in non-attached iframe.
      
      Test: fast/frames/iframe-reparenting.html
      
      * dom/Document.cpp:
      (WebCore::Document::adoptNode): If the adopted node is iframe, set a remainsAliveOnRemovalFromTree on it.
      * html/HTMLFrameElementBase.h:
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
      (WebCore::HTMLFrameElementBase::attach): Skip actual loading of the frame if it has remainsAliveOnRemovalFromTree flag. Reset the flag.
      (WebCore::HTMLFrameElementBase::willRemove): Skip unloading the frame if it has remainsAliveOnRemovalFromTree flag set.
      (WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree): Set the flag, start the async timer to check if the frame was actually attached.
      (WebCore::HTMLFrameElementBase::checkAttachedTimerFired):
      * html/HTMLFrameOwnerElement.h:
      (WebCore::HTMLFrameOwnerElement::willRemove): Move from private to protected, since it is conditionally called in HTMLFrameElementBase::willRemove now.
      
      LayoutTests:
      
      * fast/frames/iframe-reparenting-expected.txt: Added.
      * fast/frames/iframe-reparenting.html: Added.
      * fast/frames/resources/iframe-reparenting-frame1.html: Added.
      * fast/frames/resources/iframe-reparenting-frame2.html: Added.
      * fast/frames/resources/iframe-reparenting-iframe-content.html: Added.
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53871 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      7e6503e1
    • kevino@webkit.org's avatar
      [wx] Build fix, make sure stub function returns a value. · 47d12a9c
      kevino@webkit.org authored
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53870 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      47d12a9c
  2. 26 Jan, 2010 3 commits
    • aroben@apple.com's avatar
      2010-01-26 Adam Roben <aroben@apple.com> · b6a16320
      aroben@apple.com authored
              No review, rolling out r53861.
              http://trac.webkit.org/changeset/53861
              https://bugs.webkit.org/show_bug.cgi?id=33224
      
              Caused 2 regression tests to fail.
      
              * fast/loader/stateobjects/document-destroyed-navigate-back-expected.txt:
              * fast/loader/stateobjects/document-destroyed-navigate-back.html:
      2010-01-26  Adam Roben  <aroben@apple.com>
      
              No review, rolling out r53861.
              http://trac.webkit.org/changeset/53861
              https://bugs.webkit.org/show_bug.cgi?id=33224
      
              Caused 2 regression tests to fail.
      
              * dom/Document.cpp:
              (WebCore::Document::detach):
              (WebCore::Document::registerHistoryItem):
              (WebCore::Document::unregisterHistoryItem):
              * dom/Document.h:
              * history/BackForwardList.cpp:
              (WebCore::BackForwardList::pushStateItem):
              * history/BackForwardListChromium.cpp:
              (WebCore::BackForwardList::pushStateItem):
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::HistoryItem):
              (WebCore::HistoryItem::~HistoryItem):
              (WebCore::HistoryItem::setStateObject):
              (WebCore::HistoryItem::setDocument):
              (WebCore::HistoryItem::documentDetached):
              * history/HistoryItem.h:
              (WebCore::HistoryItem::document):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::navigateWithinDocument):
              (WebCore::FrameLoader::loadItem):
              * loader/HistoryController.cpp:
              (WebCore::HistoryController::updateBackForwardListForFragmentScroll):
              (WebCore::HistoryController::pushState):
              (WebCore::HistoryController::replaceState):
              * loader/RedirectScheduler.cpp:
              (WebCore::RedirectScheduler::scheduleHistoryNavigation):
              * page/History.cpp:
              (WebCore::History::stateObjectAdded):
              * page/Page.cpp:
              (WebCore::Page::goToItem):
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53869 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      b6a16320
    • mitz@apple.com's avatar
      <rdar://problem/7576663> Crash caused by anonymous list item · 448b68d0
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=34183
      
      Reviewed by Beth Dakin.
      
      WebCore: 
      
      Test: fast/lists/anonymous-items.html
      
      enclosingList() and previousListItem() were DOM-based, but in order to work with anonymous
      list items, they need to work with rthe render tree.
      
      * rendering/RenderListItem.cpp:
      (WebCore::isList): Factored out.
      (WebCore::enclosingList): Added this variant that takes a RenderObject.
      (WebCore::previousListItem): Changed to travers the render tree.
      (WebCore::RenderListItem::calcValue): Use the RenderObject version of enclosingList()
      (WebCore::RenderListItem::setExplicitValue): Added an assertion.
      (WebCore::RenderListItem::clearExplicitValue): Ditto.
      
      LayoutTests: 
      
      * fast/lists/anonymous-items.html: Added.
      * platform/mac/fast/lists/anonymous-items-expected.checksum: Added.
      * platform/mac/fast/lists/anonymous-items-expected.png: Added.
      * platform/mac/fast/lists/anonymous-items-expected.txt: Added.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53868 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      448b68d0
    • bweinstein@apple.com's avatar
      Crash in WebKit!WebCore::RenderMenuList::itemStyle · d465668b
      bweinstein@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=34182
      <rdar://7087757>
              
      Reviewed by Jon Honeycutt.
      
      Added bounds checks in RenderMenuList to make sure we are
      not making an out of bounds check in a vector once an option
      element has been deleted. If we are out of bounds, we fall back to
      a default value and return early, and in the case of itemStyle, we use a 
      previous option's style, if it is available.
      
      * manual-tests/select-delete-item.html: Added.
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::itemText): If out of bounds check, return early.
      (WebCore::RenderMenuList::itemToolTip): Ditto.
      (WebCore::RenderMenuList::itemIsEnabled): Ditto.
      (WebCore::RenderMenuList::itemStyle): If out of bounds check, try using the 0th index
          option style, then fall back to the select's style if that option doesn't exist.
      (WebCore::RenderMenuList::itemBackgroundColor): If out of bounds check, return early.
      (WebCore::RenderMenuList::itemIsSeparator): Ditto.
      (WebCore::RenderMenuList::itemIsLabel): Ditto.
      (WebCore::RenderMenuList::itemIsSelected): Ditto.
      
      
      
      git-svn-id: svn://svn.chromium.org/blink/trunk@53867 bbb929c8-8fbe-4397-9dbb-9b2b20218538
      d465668b