Timeline



Feb 22, 2005:

7:44 PM Changeset in webkit [8665] by rjw
  • 9 edits in trunk

WebCore:

Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions

Just set dashboard dirty bit when overflow scrolling changes.

Don't do comparison of regions in before scroll regions are
added, instead do it in WebKit after automatic scroll regions
are added.

Reviewed by Maciej.

  • khtml/css/cssparser.cpp: (CSSParser::parseDashboardRegions): Cleaned up comments
  • khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::styleForElement): Cleaned up comments
  • khtml/khtmlview.cpp: (KHTMLView::updateDashboardRegions):
  • khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout):
  • kwq/WebDashboardRegion.m: (-[WebDashboardRegion isEqual:]):

Webkit:

Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions

Compare regions after automatice scroll regions have been
added.

Reviewed by Maciej.

  • WebCoreSupport.subproj/WebBridge.h:
  • WebCoreSupport.subproj/WebBridge.m: (-[WebBridge dealloc]): (-[WebBridge _compareDashboardRegions:]): (-[WebBridge dashboardRegionsChanged:]):
7:34 PM Changeset in webkit [8664] by rjw
  • 3 edits in trunk/WebKit

Fixed <rdar://problem/4012463> Dashboard widgets don't work with authenticating proxies

Added new SPI for dashboard that just calls default delegate
behavior.

Reviewed by Maciej.

  • WebView.subproj/WebView.m: (-[WebView handleAuthenticationForResource:challenge:fromDataSource:]):
  • WebView.subproj/WebViewPrivate.h:
6:34 PM Changeset in webkit [8663] by cblu
  • 11 edits
    4 adds in trunk

WebCore:

Fixed: <rdar://problem/3976872> Pasted plain text doesn't get the proper style if pasted into newlines

Reviewed by mjs.

  • khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): don't clear the typing style when matching style (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply the typing style when matching style
  • khtml/editing/jsediting.cpp:
  • khtml/khtml_part.cpp: (KHTMLPart::pasteAndMatchStyle): new
  • khtml/khtml_part.h:
  • kwq/KWQKHTMLPart.h:
  • kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::issuePasteAndMatchStyleCommand): new
  • kwq/WebCoreBridge.h:
  • layout-tests/editing/editing.js:

WebKit:

Reviewed by mjs.

  • WebCoreSupport.subproj/WebBridge.m: (-[WebBridge issuePasteAndMatchStyleCommand]): support for new "PasteAndMatchStyle" exec command
5:27 PM Changeset in webkit [8662] by darin
  • 2 edits in trunk/WebCore

Reviewed by Adele.

  • fixed <rdar://problem/4006596> REGRESSION (183-184): crash in DOM::DocumentImpl::setFocusNode(DOM::NodeImpl*)
  • khtml/xml/dom_docimpl.cpp: (widgetForNode): Added helper. (DocumentImpl::setFocusNode): Re-get the widget for the node after calling updateLayout. The updateLayout can destroy the old widget, so we can't keep a stale widget pointer around.
4:10 PM Changeset in webkit [8661] by kocienda
  • 10 edits in trunk

Reviewed by Hyatt

Fix for this bug:

<rdar://problem/4003463> Mail.app HTML uses inline styling markup not understood by Entourage and Eudora

  • khtml/editing/htmlediting.cpp: (khtml::isEmptyFontTag): Helper for removing <font> tags. (khtml::StyleChange::styleModeForParseMode): Helper to map a document parse mode to a use/don't use legacy-html-styles value. (khtml::StyleChange::checkForLegacyHTMLStyleChange): Add support for colors, font faces, and font sizes. (khtml::ApplyStyleCommand::isHTMLStyleNode): (khtml::ApplyStyleCommand::removeHTMLFontStyle): (khtml::ApplyStyleCommand::applyTextDecorationStyle): Now call styleModeForParseMode to determine whether to use legacy html styles or not. (khtml::ApplyStyleCommand::removeInlineStyle): Now properly removes <font> styles. (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto. (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto. (khtml::createFontElement): Helper for applying <font> elements.
  • khtml/editing/htmlediting.h: All the following support the new bits of data we need to store. (khtml::StyleChange::applyFontColor) (khtml::StyleChange::applyFontFace) (khtml::StyleChange::applyFontSize) (khtml::StyleChange::fontColor) (khtml::StyleChange::fontFace) (khtml::StyleChange::fontSize)

Test results updated now that we will write out <font> tags for quirks mode documents.

  • layout-tests/editing/execCommand/modifyForeColorByCharacter-expected.txt
  • layout-tests/editing/style/block-style-004-expected.txt
  • layout-tests/editing/editing/pasteboard/paste-text-011-expected.txt
  • layout-tests/editing/style/block-style-005-expected.txt
  • layout-tests/editing/style/block-style-006-expected.txt
  • layout-tests/editing/style/smoosh-styles-001-expected.txt
  • layout-tests/editing/style/smoosh-styles-002-expected.txt
4:00 PM Changeset in webkit [8660] by mjs
  • 2 edits in trunk/WebCore

Reviewed by Kevin.

<rdar://problem/4017066> crash in KJS::ValueImp::dispatchType() every time I load www.nytimes.com/pages/automobiles

When creating option elements, use lowercase "option" instead of
uppercase "OPTION" to create option elements, because only
lowercase works for XHTML.

  • khtml/ecma/kjs_html.cpp: (KJS::HTMLSelectCollection::tryPut): (OptionConstructorImp::construct):
3:22 PM Changeset in webkit [8659] by cblu
  • 2 edits
    2 adds in trunk

WebCore fix for: <rdar://problem/3918056> Mail not line breaking my <pre> formatted emails on replies

Mail must 4018993 to fully address the problem.

Reviewed by kocienda.

  • khtml/editing/markup.cpp: (khtml::startMarkup): don't compute style for text in PRE tags (khtml::createMarkup): include PRE if it is an ancestor of the nodes in the range

Feb 21, 2005:

5:32 PM Changeset in webkit [8658] by rjw
  • 2 edits in trunk/WebCore

Fixed <rdar://problem/4008338> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com

There was a long standing bug in cssText(). Double value were always cast int! So,
opacity values values were incorrectly converted to text, i.e. 0.75 became 0.

The problem was newly triggered because we parse the css for opacity *TWICE*. This is a result of
incorrectly "invalidating" the style attribute (from fix for 3790449). The second parse was from
the cssText() of the style.

Reviewed by Hyatt.

  • khtml/css/css_valueimpl.cpp: (DOM::CSSPrimitiveValueImpl::cssText):
4:19 PM Changeset in webkit [8657] by hyatt
  • 2 edits in trunk/WebCore

Fix for 4017204, apply the same fix to the base class nodeAtPoint that was already applied to RenderBlock.
Skip elements with layers and inline flows. Demoted <form>s can end up causing trouble otherwise.

Reviewed by Richard Williamson

  • khtml/rendering/render_box.cpp: (RenderBox::nodeAtPoint):
3:36 PM Changeset in webkit [8656] by hyatt
  • 9 edits in trunk/WebCore

Fix for 4017033, CSS is being parsed twice. Make sure to always validate the style attribute when it is
initially parsed. Add code to clean up decls when the style attribute is completely removed. Add a new
synchronizing boolean that avoids reparsing the style declaration when the attribute is simply
being synced up to the declaration.

Reviewed by John

  • khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::setChanged):
  • khtml/html/html_elementimpl.cpp: (HTMLElementImpl::invalidateStyleAttribute): (HTMLElementImpl::updateStyleAttributeIfNeeded): (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::~HTMLElementImpl): (HTMLElementImpl::destroyInlineStyleDecl): (HTMLElementImpl::mapToEntry): (HTMLElementImpl::parseHTMLAttribute):
  • khtml/html/html_elementimpl.h:
  • khtml/xml/dom_elementimpl.cpp: (ElementImpl::ElementImpl): (ElementImpl::setAttribute):
  • khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::updateStyleAttributeIfNeeded):
3:24 PM Changeset in webkit [8655] by vicki
  • 3 edits in trunk

versioning for TOT, Safari 2.0 (188+)

3:17 PM Changeset in webkit [8654]
  • 1 copy in tags/Safari-188

This commit was manufactured by cvs2svn to create tag 'Safari-188'.

3:17 PM Changeset in webkit [8653] by vicki
  • 6 edits in trunk

Safari-188 stamp

2:02 PM Changeset in webkit [8652] by kocienda
  • 9 edits in trunk

Tree was closed. Rolling out.

2:01 PM Changeset in webkit [8651] by kocienda
  • 9 edits in trunk

Reviewed by Hyatt

Fix for this bug:

<rdar://problem/4003463> Mail.app HTML uses inline styling markup not understood by Entourage and Eudora

  • khtml/editing/htmlediting.cpp: (khtml::isEmptyFontTag): Helper for removing <font> tags. (khtml::StyleChange::styleModeForParseMode): Helper to map a document parse mode to a use/don't use legacy-html-styles value. (khtml::StyleChange::checkForLegacyHTMLStyleChange): Add support for colors, font faces, and font sizes. (khtml::ApplyStyleCommand::isHTMLStyleNode): (khtml::ApplyStyleCommand::removeHTMLFontStyle): (khtml::ApplyStyleCommand::applyTextDecorationStyle): Now call styleModeForParseMode to determine whether to use legacy html styles or not. (khtml::ApplyStyleCommand::removeInlineStyle): Now properly removes <font> styles. (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto. (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto. (khtml::createFontElement): Helper for applying <font> elements.
  • khtml/editing/htmlediting.h: All the following support the new bits of data we need to store. (khtml::StyleChange::applyFontColor) (khtml::StyleChange::applyFontFace) (khtml::StyleChange::applyFontSize) (khtml::StyleChange::fontColor) (khtml::StyleChange::fontFace) (khtml::StyleChange::fontSize)

Test results updated now that we will write out <font> tags for quirks mode documents.

  • layout-tests/editing/execCommand/modifyForeColorByCharacter-expected.txt
  • layout-tests/editing/style/block-style-004-expected.txt
  • layout-tests/editing/style/block-style-005-expected.txt
  • layout-tests/editing/style/block-style-006-expected.txt
  • layout-tests/editing/style/smoosh-styles-001-expected.txt
  • layout-tests/editing/style/smoosh-styles-002-expected.txt
1:55 PM Changeset in webkit [8650] by darin
  • 2 edits in trunk/WebCore
  • fixed Panther deployment build
  • kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Put more stuff inside #if.
11:56 AM Changeset in webkit [8649] by harrison
  • 2 edits in trunk/WebKit

Reviewed by Darin.

<rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps

  • WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer misspellingLineThickness]): (-[WebTextRenderer misspellingLinePatternWidth]): Replaced #defines with these methods, so others can get the same info.

(-[WebTextRenderer drawLineForMisspelling:withWidth:]):
Keep underline within originally specified bounds.

11:56 AM Changeset in webkit [8648] by harrison
  • 5 edits in trunk/WebCore

Reviewed by Darin.

<rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps

  • khtml/rendering/render_text.cpp: (InlineTextBox::paintMarker): Make sure underline is placed within the text bounds.
  • kwq/KWQPainter.h:
  • kwq/KWQPainter.mm: (QPainter::misspellingLineThickness):
  • kwq/WebCoreTextRenderer.h: Add misspellingLineThickness for use by InlineTextBox::paintMarker.
11:50 AM Changeset in webkit [8647] by darin
  • 2 edits in trunk/WebCore

Reviewed by John.

  • fixed <rdar://problem/4012978> -[DOMRange markupString] crashes when range contains only a text node with a single space
  • khtml/editing/markup.cpp: (khtml::createMarkup): Added updateLayout calls, and added a missing nil check.
9:50 AM Changeset in webkit [8646] by darin
  • 2 edits in trunk/WebCore

Reviewed by John.

  • fixed <rdar://problem/4005435> Safari hung while pasting text into a <textarea> (Panther-only)
  • kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Don't setAutohidesScrollers:YES on Panther.
9:45 AM Changeset in webkit [8645] by darin
  • 2 edits in trunk/WebKit

Reviewed by John.

  • fixed <rdar://problem/4016358> don't ever display IDN URLs with characters from "possible Latin look-alike" scripts
  • Misc.subproj/WebNSURLExtras.m: (containsPossibleLatinLookalikes): Added. (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call containsPossibleLatinLookalikes, and if true, don't decode the host name.
9:33 AM Changeset in webkit [8644] by kocienda
  • 3 edits in trunk/WebCore

Reviewed by John

Fix for this bug:

<rdar://problem/4015499> REGRESSION (186-187): pasted quoted text starting with a blank line increases quote level of pasted text when pasted

  • khtml/editing/markup.cpp: (khtml::markup): Changed over to ASSERT instead of assert. (khtml::createMarkup): The issue was that the code to add parents all the way back to the common ancestor block did not check for blocks whose markup had already been added, and could result in adding markup for nodes twice (hence the additional and erroneous quote level). Now there is a new check that will only add markup for those nodes before the start of the selection range. This fixes the bug. (khtml::createFragmentFromMarkup): Changed over to ASSERT instead of assert. (khtml::createFragmentFromText): Ditto.
9:32 AM Changeset in webkit [8643] by darin
  • 2 edits in trunk/JavaScriptCore
  • kjs/date_object.cpp: (timetUsingCF): Fixed indenting.

Feb 19, 2005:

6:24 PM Changeset in webkit [8642] by kocienda
  • 13 edits in trunk/WebCore

Reviewed by Maciej

  • khtml/editing/htmlediting.cpp: (khtml::matchNearestBlockquoteColorString): New function which abstracts away the CSS property we use for this pseudo-color. (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Set the new nearestBlockquoteColorString psuedo-color here, rather than removing colors as was done before. (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): Check for the pseudo-color in the desired style, and determine the real color based on the nearest blockquote (or none) to the node. (khtml::nearestMailBlockquote): Name change from closestMailBlockquote to match new property better.

All the rest of this change is the mechanical coding you need to do to add a new CSS property, in this
case, -khtml-match-nearest-mail-blockquote-color.

  • khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue)
  • khtml/css/cssparser.cpp: (CSSParser::parseValue):
  • khtml/css/cssproperties.c: (hash_prop): (findProp):
  • khtml/css/cssproperties.h:
  • khtml/css/cssproperties.in:
  • khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty)
  • khtml/css/cssvalues.c: (findValue)
  • khtml/css/cssvalues.h:
  • khtml/css/cssvalues.in:
  • khtml/rendering/render_style.h: (khtml::RenderStyle::matchNearestMailBlockquoteColor) (khtml::RenderStyle::setMatchNearestMailBlockquoteColor) (khtml::RenderStyle::initialMatchNearestMailBlockquoteColor)
2:53 PM Changeset in webkit [8641] by kocienda
  • 5 edits in trunk

Reviewed by Chris

Fix for these bugs:

<rdar://problem/4014228> REGRESSION (186-187) extra, uneditable lines inserted above and below a line of pasted quoted text
<rdar://problem/4014393> REGRESSION (186-187) pasted quoted text gets extra <cr>s when pasted at top of document

  • khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Part of a general refactoring of how the fragment is inserted into the document, rendered, and then tested for certain important pieces of information that are required for pasting. (khtml::ReplacementFragment::insertFragmentForTestRendering): New helper. Handles inserting the fragment nodes into the document. (khtml::ReplacementFragment::restoreTestRenderingNodesToFragment): Removes nodes from the document, and restores them to the fragment. (khtml::ReplacementFragment::computeStylesUsingTestRendering): Factored out code that did this before into its own function. (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto. (khtml::ReplacementFragment::countRenderedBlocks): This is a real improvement, as it eliminates a major use of the isProbablyBlock() function. Now, the blocks that are counted are real, rendered blocks. (khtml::ReplacementFragment::removeStyleNodes): Made this function retain margin-zeroing CSS properties on paragraphs. This does two things: 1) It helps us to maintain good behavior in the short term while there are still versions of Mail out there that use <p> elements instead of <div> elements for new paragraphs; and 2) It will help to maintain the compatibility with other mail clients that use <p> elements for their paragraphs but render them themselves with no margins as the result of quirks. (khtml::ReplaceSelectionCommand::doApply): Do some work to fix up and improve the handling of blank lines, be they <p> elements or <br> elements, that can be removed after pasting. This, coupled with the refactoring, fixes 4014393.
  • khtml/editing/htmlediting.h: Updated for new functions.
  • layout-tests/editing/pasteboard/paste-text-010-expected.txt: Updated results, actually improved with this change.
  • layout-tests/editing/pasteboard/paste-text-011-expected.txt: Ditto.
1:46 PM Changeset in webkit [8640] by kdecker
  • 3 edits in trunk/WebCore

Reviewed by Chris.

Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission

Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case. Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker.

  • kwq/WebCoreBridge.h:
  • kwq/WebCoreBridge.mm: (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): Changed this to invoke the new stringByEvaluatingJavaScriptFromString:forceUserGesture method below. (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Let the WebKit make the determination if this was a user originated gesture or not; we must no longer assume this is always the case.
1:40 PM Changeset in webkit [8639] by kdecker
  • 3 edits in trunk/WebKit

Reviewed by Chris.

Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission

Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case. Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker.

  • Plugins.subproj/WebBaseNetscapePluginView.h: Addded currentEventIsUserGesture boolean ivar.
  • Plugins.subproj/WebBaseNetscapePluginView.m: (-[WebBaseNetscapePluginView sendEvent:]): If at any point the user clicks or presses a key from within a plugin, set the currentEventIsUserGesture flag to true. This is important to differentiate legitimate window.open() calls originating from plugins; we still want to allow those. (-[WebBaseNetscapePluginView initWithFrame:]): In our asynchronous load, pass along currentEventIsUserGesture to the PluginRequest. (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Inform WebCore if this was a user originated gesture when calling executeScript(). (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]): (-[WebPluginRequest isCurrentEventUserGesture]): Added.
1:36 PM Changeset in webkit [8638] by cblu
  • 2 edits in trunk/WebCore

Fixed: <rdar://problem/3951196> REGRESSION (Mail): too many levels of reply quotes after certain steps

Reviewed by kocienda.

  • khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
  • If we find a new start node, update topBlockquote so we don't use too many block quotes for the contents following the new line.
  • Build up the list of ancestors after we've determined the actual topBlockquote.
  • Don't insert an extra new line if there is a new start node.
10:59 AM Changeset in webkit [8637] by cblu
  • 2 edits in trunk/WebCore

Fixed: <rdar://problem/3978461> smart paste is broken

Reviewed by kevin.

  • khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): properly check for leading and trailing whitespace. These checks were incorrectly reversed. Also check if we're pasting at the beginning or end of a line. We should not insert spaces in either case.

Feb 18, 2005:

5:13 PM Changeset in webkit [8636] by adele
  • 7 edits in trunk/WebCore

Reviewed by Darin.

Fix for <rdar://problem/3975568> REGRESSION(125-180)Australian Open pages have drawing problem

This patch fixes two problems caused by our added support for custom tags. First, the layout problem at the sites mentioned in the bug
was caused by custom tags within tables. In checkChild, we needed to treat these tags as spans so they get placed correctly in the DOM tree.
Also, we were indexing the tagPriority and endTag arrays with id values from the custom tags that were greater than the size of the array. So now
we have functions to check for the custom tags, and again, treat them as spans. To avoid confusion, we changed the names of the arrays to
endTagArray and tagPriorityArray.

  • khtml/html/dtd.h: changed all uses of the endTag array to endTagArray for our new wrapper functions (DOM::tagPriority): added function to check array bounds and to treat custom tags as spans (DOM::endTagRequirement): added function to check array bounds and to treat custom tags as spans
  • khtml/html/dtd.cpp: changed name of endTag and tagPriority arrays to endTagArray and tagPriorityArray (DOM::checkChild): treat custom tags as spans during this check
  • khtml/html/html_elementimpl.cpp: changed all uses of the endTag array to the endTagRequirement function (HTMLElementImpl::createContextualFragment): (HTMLElementImpl::setInnerText): (HTMLElementImpl::setOuterText): (HTMLElementImpl::toString):
  • khtml/html/htmlparser.cpp: changed all uses of the endTag array to the endTagRequirement function and all uses of the tagPriority array to the tagPriority function. (KHTMLParser::parseToken): (KHTMLParser::insertNode):
  • khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): changed all uses of the endTag array to the endTagRequirement function
  • khtml/editing/markup.cpp: changed all uses of the endTag array to the endTagRequirement function (khtml::endMarkup): (khtml::markup):
2:10 PM Changeset in webkit [8635] by jens
  • 2 edits in trunk/WebCore

Fixed build: Whoops, setNeedsLayout's parameter is NOT optional!

1:39 PM Changeset in webkit [8634] by jens
  • 5 edits in trunk/WebCore

[3603191] REGRESSION: Applets not receiving all of the Applet Parameters in Java 1.4.1/1.4.2. Fix is to defer instantiating the applet plugin until the applet tag and its nested param tags have been completely parsed.

12:49 PM Changeset in webkit [8633] by rjw
  • 2 edits in trunk/WebCore

Fixed <rdar://problem/4006161> Tiger8A380: Widgets leak dashboard regions

We were leaking the DashboardRegionImpls.

Reviewed by Kevin.

  • khtml/css/css_valueimpl.cpp: (DOM::CSSPrimitiveValueImpl::cleanup):
12:11 PM Changeset in webkit [8632] by cblu
  • 8 edits in trunk

WebCore:

Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled

Reviewed by kocienda.

  • khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): don't set class on element returned by createStyleSpanElement since that's already done (khtml::ReplacementFragment::ReplacementFragment): take matchStyle param, don't call computeStylesAndRemoveUnrendered() if !matchStyle (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take matchStyle param (khtml::ReplaceSelectionCommand::doApply): if m_matchStyle, use selection.start() as the insertion position and don't call applyStyleToInsertedNodes()
  • khtml/editing/htmlediting.h:
  • kwq/WebCoreBridge.h:
  • kwq/WebCoreBridge.mm: (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): take matchStyle param and pass it (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): pass NO for matchStyle (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): pass NO for matchStyle (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): pass YES for matchStyle

WebKit:

Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled

Reviewed by kocienda.

  • WebView.subproj/WebDataSource.m: (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for matchStyle to replaceSelection
  • WebView.subproj/WebHTMLView.m: (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]): return new chosePlainText parameter (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass chosePlainText for matchStyle to replaceSelection (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
11:55 AM Changeset in webkit [8631] by kocienda
  • 5 edits in trunk

Reviewed by Chris

Fix for these bugs:

<rdar://problem/4013025> Copy/Paste of quoted word results in removal of any following <cr>
<rdar://problem/4013100> Copy/Paste quoted text and then decrease quote level does not change text color

For the most part, these bugs were caused by errors and lack of foresight on my part when
I added the better paste code. Chalk these fixes up to the result of bake time.

  • khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Need to move count of number of blocks in fragment after the call to remove unrendered nodes. Meant to do this before, but forgot to. (khtml::ReplacementFragment::removeStyleNodes): Need to remove inline styles from elements! Terrible omission now fixed. (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Remove blockquote colors for now. Code has a more extensive comment in it now to explain the difficulty, and the need for more study and changes. (khtml::ReplaceSelectionCommand::doApply): Need to call applyStyleToInsertedNodes() in the m_fragment.hasInterchangeNewline() case. This was just missed before.
  • layout-tests/editing/pasteboard/paste-text-011-expected.txt: Updated results, subtly different, but OK.
  • layout-tests/editing/pasteboard/paste-text-017-expected.txt: Updated for <p> to <div> change in test content.
  • layout-tests/editing/pasteboard/paste-text-017.html: Needed to change <p> to <div> to make this test go with the new design of using <div> tags for default paragraphs.
11:37 AM Changeset in webkit [8630] by hyatt
  • 3 edits in trunk/WebCore

Fix for 3974263 (and possibly others). Don't let fixed tables use maxint as their maxwidth when some
cells have percentage values.

Reviewed by kocienda

  • khtml/misc/arena.cpp: (ArenaAllocate):
  • khtml/rendering/table_layout.cpp: (FixedTableLayout::calcWidthArray): (FixedTableLayout::calcMinMaxWidth): (AutoTableLayout::layout):
11:35 AM Changeset in webkit [8629] by hyatt
  • 2 adds in trunk/LayoutTests/fast/table

new layout test

Note: See TracTimeline for information about the timeline view.