1. 06 Mar, 2008 2 commits
  2. 05 Mar, 2008 3 commits
    • justin.garcia@apple.com's avatar
      WebCore: · 6dc0b0a5
      justin.garcia@apple.com authored
              Reviewed by Darin.
              One part of fix for:
              <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
              * editing/markup.cpp:
              (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
              inline style declarations, not the other way around. 
              Reviewed by Darin.
              <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
              * editing/pasteboard/5780697-1-expected.txt: Added.
              * editing/pasteboard/5780697-1.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • beidson@apple.com's avatar
      JavaScriptCore: · a059d6f9
      beidson@apple.com authored
              Reviewed by Alexey and Mark Rowe
              Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
              DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
              removing particular items for Databases that were shutting down.
              This filtering operation is not atomic, and therefore causes a race condition with the
              MessageQueue waking up and reading from the message queue.  
              The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
              seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
              assertion with a crash in a release build is what revealed this bug.
              * wtf/MessageQueue.h:
              (WTF::::waitForMessage): Tweak the waiting logic to check the queue's empty state then go back
                to sleep if the queue was empty - checking m_killed each time it wakes up.
              Reviewed by Alexey and Mark Rowe
              Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
              DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
              removing particular items for Databases that were shutting down.
              This filtering operation is not atomic, and therefore causes a race condition with the
              database thread waking up and reading from the message queue.  
              The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
              seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
              assertion with a crash in a release build is what revealed this bug.
              The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
              place, another crash popped up in the layout tests that was related to dereferencing a 
              deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
              when it needed to be a ref pointer.
              * storage/SQLTransaction.cpp:
              * storage/SQLTransaction.h: Change m_database to be a RefPtr
              Reviewed by Alexey + Mark Rowe
              Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
              This test takes its best shot at handling two databases on a single database thread at once,
              then having one of those databases go away completely (garbage collection and everything)
              * storage/multiple-databases-garbage-collection-expected.txt: Added.
              * storage/multiple-databases-garbage-collection.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mjs@apple.com's avatar
      WebCore: · 2a58f429
      mjs@apple.com authored
              Reviewed by Sam and Oliver.
              - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
              - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::mark): When marking a node that's in-document,
              mark the owner document if it hasn't been already. This means holding on
              to a single node from an unreferenced document now keeps the whole document alive.
              We are now at 90/100 on Acid3.
              Reviewed by Sam and Oliver.
              - test for http://bugs.webkit.org/show_bug.cgi?id=16289
              - test for Acid3 tests 26 and 27 (not exactly the same issue but related)
              * fast/dom/gc-11-expected.txt: Added. Test case from bug 16289.
              * fast/dom/gc-11.html: Added.
              * fast/dom/gc-acid3.html: Added. DOM garbage collection part of Acid3.
              * fast/dom/gc-acid3-expected.txt: Added.
              * fast/dom/gc-6-expected.txt: Updated results. The old assumptions of this test
              were in conflict with the requirements of Acid3.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  3. 04 Mar, 2008 9 commits
    • mitz@apple.com's avatar
      WebCore: · f55fe75a
      mitz@apple.com authored
              Reviewed by Darin Adler.
              - fix http://bugs.webkit.org/show_bug.cgi?id=17676
                <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
              Test: fast/encoding/url-host-name-non-ascii.html
              * platform/KURL.cpp:
              (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
              case to avoid copying the host name twice and corrected the error
              checking after calling uidna_IDNToASCII().
              - test for http://bugs.webkit.org/show_bug.cgi?id=17676
                <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
              * fast/encoding/url-host-name-non-ascii-expected.txt: Added.
              * fast/encoding/url-host-name-non-ascii.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann@webkit.org's avatar
      Reviewed by Eric. · 804d48bc
      zimmermann@webkit.org authored
      Fix svg/dynamic-updates time-dependancy problem. Remove unneeded setTimeout() call.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann@webkit.org's avatar
      Reviewed by Eric & David. · 10d6adf4
      zimmermann@webkit.org authored
      Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078
      Fix getSubStringLength() handling, verified by Acid3 test 77.
      Brings up Acid3 score to 88/100.
      Added test: svg/custom/acid3-test-77.html
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      WebCore: · a37bbd4d
      weinig@apple.com authored
              Reviewed by Darin Adler.
              Add ClassInfo to custom constructors so that they toString properly
              - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
                and XSLTProcessorConstructorImp and prefix all the classes with JS. 
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::): Added ClassInfo definition.
              (WebCore::JSAudioConstructor::construct): Cleanup.
              * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
              (WebCore::JSAudioConstructor::classInfo): Added.
              * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
              to JSHTMLInputElementBasePrototype as seen if toString'ed.
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              (WebCore::): Added ClassInfo definition.
              * bindings/js/JSHTMLOptionElementConstructor.h:
              (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::): Added ClassInfo definition.
              (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::classInfo): Added.
              * bindings/js/JSXMLHttpRequest.cpp:
              (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
              as seen if toString'ed.
              * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
              JSXMLHttpRequestConstructor and doc to m_document and 
              (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
              * bindings/js/JSXSLTProcessor.cpp:
              (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
              XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
              * bindings/js/JSXSLTProcessor.h:
              (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
              * bindings/js/kjs_window.cpp:
              (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
              Reviewed by Darin Adler.
              * Scripts/do-webcore-rename: Update renaming plan.
              Reviewed by Darin Adler.
              Update results for fixed class names.
              * fast/dom/Window/window-properties-expected.txt:
              * fast/dom/xmlhttprequest-get-expected.txt:
              * http/tests/xmlhttprequest/event-target-expected.txt:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mitz@apple.com's avatar
      WebCore: · 12085ebf
      mitz@apple.com authored
              Reviewed by Oliver Hunt and Geoffrey Garen.
              - fix http://bugs.webkit.org/show_bug.cgi?id=17667
                <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
              * loader/loader.cpp:
              (WebCore::Loader::didFinishLoading): Changed to call
              setLoadInProgress(false) even for 4xx errors, because that triggers
              load completion check.
              Reviewed by Oliver Hunt and Geoffrey Garen.
              - extended test to cover http://bugs.webkit.org/show_bug.cgi?id=17667
                <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
              * http/tests/misc/missing-style-sheet-expected.txt:
              * http/tests/misc/missing-style-sheet.html:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • adele@apple.com's avatar
      WebCore: · aee865c5
      adele@apple.com authored
              Reviewed by Beth.
              Fix for <rdar://problem/5779718> focus() does not work for anchor elements with no content
              If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it
              from being keyboard focusable (using the tab key).
              * html/HTMLAnchorElement.cpp:
              Reviewed by Beth.
              Test for <rdar://problem/5779718> focus() does not work for anchor elements with no content
              * fast/events/anchor-empty-focus-expected.txt: Added.
              * fast/events/anchor-empty-focus.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mitz@apple.com's avatar
      WebCore: · 5b4aa39f
      mitz@apple.com authored
              Reviewed by Sam Weinig.
              - fix <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
              Test: platform/win/fast/text/uniscribe-missing-glyph.html
              Note that default installations of Windows do not have Myanmar fonts.
              What this patch does is ensure that the Myanmar and other complex
              scripts are rendered as missing glyphs rather than not rendered at all.
              The particular page in the bug measures the relative widths of two
              rendered strings and, if they are rendered as missing glyphs, detects
              that a Myanmar fonts is not available and substitutes the text with
              images. By not rendering (and measuring) missing glyphs, WebKit was
              throwing the page's detection code off.
              * platform/graphics/win/UniscribeController.cpp:
              (WebCore::UniscribeController::shape): Removed an early return in case
              shaping resulted in missing glyphs. This is now expected if font
              fallback failed to produce a font containing glyphs for the character.
              Also changed two resize()s to shrink()s.
              - test for <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
              * platform/win/fast/text/uniscribe-missing-glyph-expected.txt: Added.
              * platform/win/fast/text/uniscribe-missing-glyph.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Suggested by Darin, rubber-stamped by Mark. · a17471b3
      ap@webkit.org authored
              REGRESSION (r30571): Buzzword.com doesn't load
              Rolling out r30571, as determining what is wrong with it proved tricky.
              * loader/FrameLoader.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      WebCore: · 6d270f6f
      weinig@apple.com authored
              Reviewed by Mark Rowe.
              Move JSClipboard into its own file.
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp: Added.
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/kjs_events.cpp:
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_window.cpp:
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Clipboard.cpp:
              * dom/Clipboard.idl: Added.
              Reviewed by Mark Rowe.
              Update test results.
              * fast/dom/Window/window-properties-expected.txt:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  4. 03 Mar, 2008 5 commits
    • mitz@apple.com's avatar
      WebCore: · c76605ad
      mitz@apple.com authored
              Reviewed by Darin Adler.
              - make :first-letter apply to the first letter in normal flow, skipping
                floats and positioned objects
              Test: fast/css/first-letter-skip-out-of-flow.html
              * rendering/RenderBlock.cpp:
              Reviewed by Darin Adler.
              - test that :first-letter applies to the first letter in normal flow,
                skipping floats and positioned objects
              * fast/css/first-letter-skip-out-of-flow.html: Added.
              * platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.checksum: Added.
              * platform/mac-leopard/fast/css/first-letter-skip-out-of-flow-expected.png: Added.
              * platform/mac/fast/css/first-letter-skip-out-of-flow-expected.txt: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mrowe@apple.com's avatar
      2008-03-03 Mark Rowe <mrowe@apple.com> · 45e6a3fa
      mrowe@apple.com authored
              Reviewed by Dan Bernstein.
              Fix http://bugs.webkit.org/show_bug.cgi?id=17313
              Bug 17313: querySelectorAll() causing crashes when called via dojo.query() wrapper
              Node::querySelector and SelectorNodeList were not sufficiently initializing the CSSStyleSelector
              before using it to resolve styles, which lead to it having a stale m_style member in some situations.
              This stale m_style member resulted in a wild store that would write over whatever object now resided
              at the location m_style pointed to.
              Test: fast/dom/SelectorAPI/bug-17313.html
              * dom/Node.cpp:
              (WebCore::Node::querySelector): Call initForStyleResolve to further initialize the CSSStyleSelector.
              * dom/SelectorNodeList.cpp:
              (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
      2008-03-03  Mark Rowe  <mrowe@apple.com>
              Reviewed by Dan Bernstein.
              Test for http://bugs.webkit.org/show_bug.cgi?id=17313
              Bug 17313: querySelectorAll() causing crashes when called via dojo.query() wrapper
              * fast/dom/SelectorAPI/bug-17313-expected.txt: Added.
              * fast/dom/SelectorAPI/bug-17313.html: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ddkilzer@apple.com's avatar
      WebCore: · a75202e1
      ddkilzer@apple.com authored
              Dynamically inserting CSS rule with @media query fails with DOM Exception 12
              Reviewed by Darin.
              Allow any valid rule (@font-face, @import, @media, @page or style) to be
              parsed when using CSSStyleSheet.insertRule().  Previously only import and
              style rules were allowed.  Note that @page rules always throw an exception
              because they're not implemented yet, so no test case was added for them.
              Tests: fast/css/insertRule-font-face.html
              * css/CSSGrammar.y: Extracted 'valid_rule' out of 'rule'.  Renamed
              'ruleset_or_import' to 'valid_rule_or_import' and changed its definition.
              Dynamically inserting CSS rule with @media query fails with DOM Exception 12
              Reviewed by Darin.
              * fast/css/insertRule-font-face.html: Added.
              * fast/css/insertRule-media.html: Added.
              * fast/css/resources/insertRule-font-face.js: Added.
              * fast/css/resources/insertRule-media.js: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • oliver@apple.com's avatar
      Bug 17620: getImageData lies · 350652b5
      oliver@apple.com authored
      Reviewed by Mark Rowe
      Correct logic to actually iterate over the source row
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • oliver@apple.com's avatar
      Correct incorrect assertion · 7babd229
      oliver@apple.com authored
      Reviewed by Mark Rowe
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  5. 02 Mar, 2008 1 commit
  6. 01 Mar, 2008 3 commits
    • oliver@apple.com's avatar
      Bug 16954: Support putImageData · 18ed29dc
      oliver@apple.com authored
      Reviewed by Sam Weinig.
      Implement support for HTML5's putImageData for the CG port.  All other ports
      are currently just using stubs for the final blit.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      WebCore: · 4ba897c4
      weinig@apple.com authored
              Reviewed by Darin Adler.
              Search the entire prototype chain when doing early prototype lookup in
              the Window's getOwnPropertySlot method.
              Makes fast/dom/Window/window-function-name-getter-precedence.html pass all tests.
              * bindings/js/kjs_window.cpp:
              Reviewed by Darin Adler.
              Update test result.
              * fast/dom/Window/window-function-name-getter-precedence-expected.txt:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • zimmermann@webkit.org's avatar
      Reviewed by Oliver. · 6238d76f
      zimmermann@webkit.org authored
      Fixes: http://bugs.webkit.org/show_bug.cgi?id=17568 (SVGForeignObjectElement can't react to width/height SVG DOM changes)
      As the bug title says, fix all dynamic update problems that occour with SVGForeignObjectElement.
      Tests: svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr.html
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  7. 29 Feb, 2008 4 commits
    • mitz@apple.com's avatar
      Rubber-stamped by Sam Weinig. · 847345ef
      mitz@apple.com authored
              - update test results following r30649
              * svg/css/getComputedStyle-basic-expected.txt:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mrowe@apple.com's avatar
      2008-02-29 Robert Blaut <webkit@blaut.biz> · 94335d6c
      mrowe@apple.com authored
              Reviewed by Darin Adler.
              - fix http://bugs.webkit.org/show_bug.cgi?id=17532
                Webkit imports styles from <link> element which doesn't have rel=stylesheet defined
              Test: fast/html/link-rel-stylesheet.html
              * html/HTMLLinkElement.cpp:
      2008-02-29  Robert Blaut  <webkit@blaut.biz>
              Reviewed by Darin Adler.
              - Tests for http://bugs.webkit.org/show_bug.cgi?id=17532
                Webkit imports styles from <link> element which doesn't have rel=stylesheet defined
              * fast/html/link-rel-stylesheet.html: Added.
              * fast/media/mq-simple-query-02.html:
              * fast/media/mq-width-absolute-02.html:
              * platform/mac/fast/html/link-rel-stylesheet-expected.txt: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Reviewed by Darin. · 5b6da2c5
      ap@webkit.org authored
              <rdar://problem/5766352> REGRESSION (r27151): XMLHttpRequest.abort() resets response status
              Test: http/tests/xmlhttprequest/status-after-abort.html
              * xml/XMLHttpRequest.cpp:
              Changed to match Firefox more closely (IE just raises an exception in most of those cases).
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mitz@apple.com's avatar
      WebCore: · 6fa3cd2c
      mitz@apple.com authored
              Reviewed by Darin Adler.
              - fix a bug where explicit embedding past the end of a line could
                affect text that line
              Test: fast/text/embed-at-end-of-pre-wrap-line.html
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::skipWhitespace): Removed calls to
              (WebCore::RenderBlock::findNextLineBreak): Added calls to
              setAdjustEmbedding() around skipWhitespace() only where needed.
              Reviewed by Darin Adler.
              - test for a bug where explicit embedding past the end of a line could
                affect text that line
              * fast/text/embed-at-end-of-pre-wrap-line.html: Added.
              * platform/mac-leopard/fast/text/embed-at-end-of-pre-wrap-line-expected.checksum: Added.
              * platform/mac-leopard/fast/text/embed-at-end-of-pre-wrap-line-expected.png: Added.
              * platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  8. 28 Feb, 2008 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 131b4fd5
      justin.garcia@apple.com authored
              Reviewed by Darin Adler.
              <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
              Add a second style span at copy time to hold document default styles.  This helps us
              differentiate between those and user applied styles at paste time, where we'll want
              to let Mail's Paste As Quotation blockquote override document default styles, but
              not others.
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used 
              for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that 
              are thick | medium | thin | <length>.  Before, there was a mismatch between the unit 
              type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for 
              an element and that element's inlineStyleDecl(), causing identical values to always appear 
              different to diff().
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed.  Don't just change
              the class to an empty string, completely remove it, it's no longer needed.
              (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
              Added, replaces removeRedundantStyles.
              We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
              unused code and renamed the function.
              There won't be more than two style spans that we need to consider, the one with the 
              source document's default styles and styles on the commonAncestor of the copied Range, 
              so don't look for more than two.
              Let elements that wrap the incoming fragment override the source document's styles.
              (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
              and call the renamed handleStyleSpans.
              * editing/ReplaceSelectionCommand.h:
              * editing/markup.cpp:
              (WebCore::removeDefaultStyles): Added.  Don't add document defaults to the style span
              that holds user applied styles, since they'll be added to their own style span.
              Add a second style span that holds just the document defaults. This lets us differentiate
              between those and user applied styles at paste time.
              Mail blockquotes are just another type of special element, moved their handling there. This
              also lets paste code make assumptions about the position of the two style spans (they are 
              *always* parent-child).
              Reviewed by Darin Adler.
              <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
              Demonstrates the bug:
              * editing/pasteboard/4930986-1-expected.txt: Added.
              * editing/pasteboard/4930986-1.html: Added.
              * editing/pasteboard/4930986-2-expected.txt: Added.
              * editing/pasteboard/4930986-2.html: Added.
              Demonstrates a problem with the first version of the patch:
              * editing/pasteboard/4930986-3-expected.txt: Added.
              * editing/pasteboard/4930986-3.html: Added.
              Visual problem fixed.  An anonymous renderer changed position, DOM remains unchanged:
              * editing/execCommand/5144139-1.html:
              * platform/mac/editing/execCommand/5144139-1-expected.checksum:
              * platform/mac/editing/execCommand/5144139-1-expected.png:
              * platform/mac/editing/execCommand/5144139-1-expected.txt:
              Removed unnecessary style spans, visual result unchanged:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.checksum:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.png:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.txt:
              * platform/mac/editing/style/font-family-with-space-expected.checksum:
              * platform/mac/editing/style/font-family-with-space-expected.png:
              * platform/mac/editing/style/font-family-with-space-expected.txt:
              A style span isn't removed because at paste time because we don't anticipate 
              encountering styles on style spans that are non-inheritable, because we don't 
              create style spans like that at copy time. Turned this into a text only 
              test. Test remains visually unchanged:
              * editing/pasteboard/5245519-expected.txt: Added.
              * editing/pasteboard/5245519.html:
              * platform/mac/editing/pasteboard/5245519-expected.checksum: Removed.
              * platform/mac/editing/pasteboard/5245519-expected.png: Removed.
              * platform/mac/editing/pasteboard/5245519-expected.txt: Removed.
              Added an extra empty anonymous renderer, DOM and visual result remain unchanged:
              * platform/mac/editing/execCommand/create-list-with-hr-expected.checksum:
              * platform/mac/editing/execCommand/create-list-with-hr-expected.png:
              * platform/mac/editing/execCommand/create-list-with-hr-expected.txt:
              * platform/mac/editing/pasteboard/paste-list-001-expected.checksum:
              * platform/mac/editing/pasteboard/paste-list-001-expected.png:
              * platform/mac/editing/pasteboard/paste-list-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-table-001-expected.checksum:
              * platform/mac/editing/pasteboard/paste-table-001-expected.png:
              * platform/mac/editing/pasteboard/paste-table-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-003-expected.checksum:
              * platform/mac/editing/pasteboard/paste-text-003-expected.png:
              * platform/mac/editing/pasteboard/paste-text-003-expected.txt:
              Reflects changes to CSSComputedStyleDeclaration::getPropertyCSSValue:
              * fast/css/computed-style-expected.txt:
              * fast/css/computed-style-without-renderer-expected.txt:
              We don't remove styles from style spans that are overridden by all of their 
              children, even though they are unnecessary. We've never done this, but now
              that there can be two style spans at paste time we are more likely to have 
              a style span left over because of this problem.  Mentioned this in the test 
              case and turned this into a text only test:
              * editing/pasteboard/4840662.html:
              * editing/pasteboard/4840662-expected.txt: Added.
              * platform/mac/editing/pasteboard/4840662-expected.checksum: Removed.
              * platform/mac/editing/pasteboard/4840662-expected.png: Removed.
              * platform/mac/editing/pasteboard/4840662-expected.txt: Removed.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  9. 27 Feb, 2008 9 commits
    • mitz@apple.com's avatar
      WebCore: · c92d1283
      mitz@apple.com authored
              Reviewed by John Sullivan.
              - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
              Test: fast/text/soft-hyphen-2.html
              * rendering/bidi.cpp:
              (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
              that if there are two midpoints at the given position, only the last one
              will be chopped off.
              Reviewed by John Sullivan.
              - test for <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
              * fast/text/soft-hyphen-2.html: Added.
              * platform/mac/fast/text/soft-hyphen-2-expected.checksum: Added.
              * platform/mac/fast/text/soft-hyphen-2-expected.png: Added.
              * platform/mac/fast/text/soft-hyphen-2-expected.txt: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • beidson@apple.com's avatar
      Updated resource used in the layout test I landed yesterday. · 673612d8
      beidson@apple.com authored
              Due to a difference between Foundation on Tiger vs Leopard, the resource generated on
              Leopard caused different results on Leopard and Tiger.
              Regenerating the resource on Tiger, however, agrees with Leopard.
              * webarchive/loading/resources/cache-expired-subresource.webarchive:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • mitz@apple.com's avatar
      WebCore: · 37717da4
      mitz@apple.com authored
              Reviewed by Darin Adler.
              - make centered text in right-to-left blocks spill over to the left
              Test: fast/text/align-center-rtl-spill.html
              * rendering/bidi.cpp:
              Reviewed by Darin Adler.
              - test that centered text in right-to-left blocks spills over to the left
              * fast/text/align-center-rtl-spill.html: Added.
              * platform/mac/fast/text/align-center-rtl-spill-expected.checksum: Added.
              * platform/mac/fast/text/align-center-rtl-spill-expected.png: Added.
              * platform/mac/fast/text/align-center-rtl-spill-expected.txt: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • eric@webkit.org's avatar
      Rubber-stamped by Adam. · 58f8521c
      eric@webkit.org authored
              Fix svn:eol-style on all LayoutTest results
              I simply ran:
              cd LayoutTests
              find . -name "*-expected.txt" | xargs svn ps svn:eol-style native
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • weinig@apple.com's avatar
      WebCore: · 014c993b
      weinig@apple.com authored
              Reviewed by Darin.
              Fix for <rdar://problem/5768769>
              - Don't allow cross-origin calls using window.functionName.call(otherFrame)
              * bindings/js/JSLocation.cpp:
              (WebCore::jsLocationProtoFuncToString): Do same-origin check.
              * bindings/js/kjs_window.cpp:
              (KJS::windowProtoFuncAToB): Ditto.
              (KJS::windowProtoFuncBToA): Ditto.
              (KJS::windowProtoFuncOpen): Ditto.
              (KJS::windowProtoFuncClearTimeout): Ditto.
              * bindings/scripts/CodeGeneratorJS.pm: Ditto.
              Reviewed by Darin.
              Updates tests for <rdar://problem/5768769>
              * http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
              * http/tests/security/cross-frame-access-call-expected.txt:
              * http/tests/security/cross-frame-access-call.html:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • beidson@apple.com's avatar
      WebKit/mac: · a6171866
      beidson@apple.com authored
              Reviewed by Mark Rowe (code) and Darin (concept)
              Much better fix for <rdar://problem/4930688> (see r19549)
              Original fix for <rdar://problem/3947312> (and 14 dupes)
              Let me tell you a story:
              A long time ago, in a cvs repository far, far away, loader code was almost all up in WebKit.
              WebArchive code was intertwined with that code in bizarre and complex ways.
              During the months long loader re-factoring where we pushed much loader code down into WebCore,
              many portions of the WebKit loader were thinned out until they ceased to exist.  Others remained
              with a sole purpose.
              One such section of code whose lineage traces back from WebFrameLoaderClient to WebFrameLoader
              to WebLoader was originally rooted in the method [WebLoader loadRequest:].  This method was the 
              single entry point for almost all loading (network or web archives)
              This method would check various headers and other fields on the NSURLRequest and NSURLResponse 
              to make decisions about the load.  If the cache control fields were expired or other conditions 
              in the headers were met, the load would be forced to go out to the network.
              As the loader was moved and tweaked repeatedly, most of this code was pruned or re-factored.  
              At some point, all that remained was the special cases for loading WebArchives.  
              Somewhere in the r16,000s, this remaining responsibility was noticed and related methods we renamed
              to be WebArchive specific, further cementing the assumed design.
              Problem is, the design was bad.  A WebArchive is meant to be a static snapshot of a WebPage at a
              specific point in time.  Referring to the request to see if the resource should be reloaded seems
              nonsensical, as does referring to the response headers to see if the resource is "expired".  In the 
              context of loading a WebArchive, available data should *always* be loaded from the WebArchive, at least
              during the initial load!
              After discovering the secret to reproducing all of these bugs is both emptying our your Foundation 
              cache and disconnecting your network, it was easy to reproduce the 16 individually reported cases 
              that were all symptoms of this bug, and easy to verify that they are fixed with this patch.
              * WebCoreSupport/WebFrameLoaderClient.h:
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::willUseArchive): Do not call either form of "canUseArchivedResource()" that
                inspect the request or response objects - We are loading from a WebArchive, and we should never
                make the decision to go out to the network when we actually have the resource available.
              * WebCoreSupport/WebSystemInterface.m:
              (InitWebCoreSystemInterface):  Remove two methods that are no longer used anywhere in WebKit
              Reviewed by Mark Rowe
              Test for better fix for <rdar://problem/4930688> (see r19549) and
              original fix for <rdar://problem/3947312> (and 14 dupes)
              Crafting custom WebArchives for layout tests is a pain and something that should
              be resolved if we decide to pursue a new format.
              Using a custom php script to act as a stand in for an image resource, I set its 
              cache-control header to expire immediately.  Without the fix for the above bugs,
              the resource will be "expired" and an attempt to fetch it from the network will
              go out and fail.  This failure will manifest with different ResourceLoadDelegate
              information, as well as different dimensions in the render tree - the missing 
              image icon versus the archived image.
              With the fix in place, the response will be ignored and the image will be pulled
              from the WebArchive.
              * webarchive/loading/cache-expired-subresource-expected.txt: Added.
              * webarchive/loading/cache-expired-subresource.html: Added.
              * webarchive/loading/resources/cache-expired-subresource.webarchive: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • kmccullough@apple.com's avatar
      Landing test that was forgotten in the original patch (r30087). · 9d9b272b
      kmccullough@apple.com authored
              Test for: http://bugs.webkit.org/show_bug.cgi?id=17191
              HTML5: Client-side database queries should return values of type number
              * storage/sql-data-types-expected.txt: Added.
              * storage/sql-data-types.html: Added.
              * storage/sql-data-types.js: Added.
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      Add bug number to ChangeLog. · 192dc689
      ap@webkit.org authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    • ap@webkit.org's avatar
      2008-02-27 Julien Chaffraix <julien.chaffraix@gmail.com> · b134ed7f
      ap@webkit.org authored
              Reviewed by Alexey.
              Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event
              Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
              * xml/XMLHttpRequest.cpp:
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  10. 26 Feb, 2008 3 commits