Timeline



Nov 4, 2004:

7:09 PM Changeset in webkit [7942] by hyatt
  • 13 edits in trunk/LayoutTests

land updated layout tests for the relpositioned change, the ex unit change, and the text-top vertical-align change

6:59 PM Changeset in webkit [7941] by hyatt
  • 9 edits in trunk/WebCore

Fix for relpositioned inlines. This was reviewed a long time ago, but I can't recall who reviewed it (either
darin or ken).

Reviewed by darin or ken

  • khtml/rendering/bidi.cpp: (khtml::appendRunsForObject): (khtml::RenderBlock::skipWhitespace): (khtml::RenderBlock::findNextLineBreak):
  • khtml/rendering/render_block.cpp: (khtml::RenderBlock::lowestPosition): (khtml::RenderBlock::rightmostPosition): (khtml::RenderBlock::leftmostPosition):
  • khtml/rendering/render_box.cpp: (RenderBox::position):
  • khtml/rendering/render_box.h: (khtml::RenderBox::staticX): (khtml::RenderBox::staticY):
  • khtml/rendering/render_layer.cpp: (RenderLayer::updateLayerPosition): (RenderLayer::convertToLayerCoords):
  • khtml/rendering/render_line.cpp: (khtml::InlineFlowBox::placeBoxesHorizontally):
  • khtml/rendering/render_object.h: (khtml::RenderObject::staticX): (khtml::RenderObject::staticY):

Finish turning on XSLT. Make sure child stylesheets can load.

  • khtml/xsl/xslt_processorimpl.cpp: (DOM::stylesheetLoadFunc): (DOM::XSLTProcessorImpl::transformDocument):
5:19 PM Changeset in webkit [7940] by hyatt
  • 2 edits in trunk/WebKit

Make sure the dominant line direction is properly set for RTL runs so that spaces will reverse.

Change xHeight to measure the ascent of the x glyph, since the xHeight metrics appear to be
totally bogus in both CG and AppKit.

Reviewed by darin

  • WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer xHeight]): (-[WebTextRenderer _createATSUTextLayoutForRun:style:]): (-[WebTextRenderer _trapezoidForRun:style:atPoint:]): (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]): (-[WebTextRenderer _ATSU_drawRun:style:geometry:]): (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
5:18 PM Changeset in webkit [7939] by hyatt
  • 15 edits in trunk/WebCore

Implement CSS3 support for multiple backgrounds. Also fix a bug with background propagation so that it only
happens (from the <body> to the root) for HTML documents. Fixed background-position to handle a mixture of
keyword and length values.

Reviewed by darin

  • khtml/css/cssparser.cpp: (CSSParser::parseValue): (CSSParser::addBackgroundValue): (CSSParser::parseBackgroundShorthand): (CSSParser::parseBackgroundColor): (CSSParser::parseBackgroundImage): (CSSParser::parseBackgroundPositionXY): (CSSParser::parseBackgroundPosition): (CSSParser::parseBackgroundProperty): (CSSParser::parseColorFromValue):
  • khtml/css/cssparser.h:
  • khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::adjustRenderStyle): (khtml::CSSStyleSelector::applyProperty): (khtml::CSSStyleSelector::mapBackgroundAttachment): (khtml::CSSStyleSelector::mapBackgroundImage): (khtml::CSSStyleSelector::mapBackgroundRepeat): (khtml::CSSStyleSelector::mapBackgroundXPosition): (khtml::CSSStyleSelector::mapBackgroundYPosition):
  • khtml/css/cssstyleselector.h:
  • khtml/rendering/render_box.cpp: (RenderBox::paintRootBoxDecorations): (RenderBox::paintBoxDecorations): (RenderBox::paintBackgrounds): (RenderBox::paintBackground): (RenderBox::paintBackgroundExtended):
  • khtml/rendering/render_box.h:
  • khtml/rendering/render_form.cpp: (RenderFieldset::paintBoxDecorations):
  • khtml/rendering/render_line.cpp: (khtml::InlineFlowBox::paintBackgrounds): (khtml::InlineFlowBox::paintBackground): (khtml::InlineFlowBox::paintBackgroundAndBorder):
  • khtml/rendering/render_line.h:
  • khtml/rendering/render_object.cpp: (RenderObject::setStyle): (RenderObject::updateBackgroundImages): (RenderObject::getVerticalPosition):
  • khtml/rendering/render_object.h: (khtml::RenderObject::paintBackgroundExtended):
  • khtml/rendering/render_style.cpp: (m_next): (BackgroundLayer::BackgroundLayer): (BackgroundLayer::~BackgroundLayer): (BackgroundLayer::operator=): (BackgroundLayer::operator==): (BackgroundLayer::fillUnsetProperties): (BackgroundLayer::cullEmptyLayers): (StyleBackgroundData::StyleBackgroundData): (StyleBackgroundData::operator==): (RenderStyle::diff): (RenderStyle::adjustBackgroundLayers):
  • khtml/rendering/render_style.h: (khtml::OutlineValue::operator==): (khtml::OutlineValue::operator!=): (khtml::BackgroundLayer::backgroundImage): (khtml::BackgroundLayer::backgroundXPosition): (khtml::BackgroundLayer::backgroundYPosition): (khtml::BackgroundLayer::backgroundAttachment): (khtml::BackgroundLayer::backgroundRepeat): (khtml::BackgroundLayer::next): (khtml::BackgroundLayer::isBackgroundImageSet): (khtml::BackgroundLayer::isBackgroundXPositionSet): (khtml::BackgroundLayer::isBackgroundYPositionSet): (khtml::BackgroundLayer::isBackgroundAttachmentSet): (khtml::BackgroundLayer::isBackgroundRepeatSet): (khtml::BackgroundLayer::setBackgroundImage): (khtml::BackgroundLayer::setBackgroundXPosition): (khtml::BackgroundLayer::setBackgroundYPosition): (khtml::BackgroundLayer::setBackgroundAttachment): (khtml::BackgroundLayer::setBackgroundRepeat): (khtml::BackgroundLayer::clearBackgroundImage): (khtml::BackgroundLayer::clearBackgroundXPosition): (khtml::BackgroundLayer::clearBackgroundYPosition): (khtml::BackgroundLayer::clearBackgroundAttachment): (khtml::BackgroundLayer::clearBackgroundRepeat): (khtml::BackgroundLayer::setNext): (khtml::BackgroundLayer::operator!=): (khtml::BackgroundLayer::containsImage): (khtml::BackgroundLayer::hasImage): (khtml::BackgroundLayer::hasFixedImage): (khtml::RenderStyle::setBitDefaults): (khtml::RenderStyle::hasBackground): (khtml::RenderStyle::hasFixedBackgroundImage): (khtml::RenderStyle::outlineWidth): (khtml::RenderStyle::outlineStyle): (khtml::RenderStyle::outlineStyleIsAuto): (khtml::RenderStyle::outlineColor): (khtml::RenderStyle::backgroundColor): (khtml::RenderStyle::backgroundImage): (khtml::RenderStyle::backgroundRepeat): (khtml::RenderStyle::backgroundAttachment): (khtml::RenderStyle::backgroundXPosition): (khtml::RenderStyle::backgroundYPosition): (khtml::RenderStyle::accessBackgroundLayers): (khtml::RenderStyle::backgroundLayers): (khtml::RenderStyle::outlineOffset): (khtml::RenderStyle::resetOutline): (khtml::RenderStyle::setBackgroundColor): (khtml::RenderStyle::setOutlineWidth): (khtml::RenderStyle::setOutlineStyle): (khtml::RenderStyle::setOutlineColor): (khtml::RenderStyle::clearBackgroundLayers): (khtml::RenderStyle::inheritBackgroundLayers): (khtml::RenderStyle::setOutlineOffset):
  • khtml/rendering/render_table.cpp: (RenderTable::paintBoxDecorations): (RenderTableCell::paintBoxDecorations):
4:32 PM Changeset in webkit [7938] by hyatt
  • 2 edits in trunk/WebCore

Make sure the text decoder returns empty strings rather than null strings when the utf8 char ptr is non-null.
Ensures that <a href=""> works with libxml (which returns data in utf-8 buffers).

Reviewed by darin

  • kwq/KWQTextCodec.mm: (KWQTextDecoder::convertLatin1): (KWQTextDecoder::convertUTF16): (KWQTextDecoder::convertUsingTEC): (KWQTextDecoder::toUnicode):
4:30 PM Changeset in webkit [7937] by hyatt
  • 2 edits in trunk/WebCore

Make sure line-height returns the correct value for normal.

Reviewed by darin

  • khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1:07 PM Changeset in webkit [7936] by darin
  • 1 delete in trunk/LayoutTests/.cvsignore

Don't ignore results file since it's not here any more.

10:29 AM Changeset in webkit [7935] by harrison
  • 4 edits
    2 adds in trunk

Reviewed by Ken Kocienda.

<rdar://problem/3857753> REGRESSION (Mail): Delete incorrectly causes text to take on new style

  • khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::moveNodesAfterNode): Fixed to move entire source subtree (up to, but not including, the enclosingBlockFlowElement) rather than just the source element. Fixed to insert after the destination subtree, rather than the destination element. Handles edge case of deleting back to the top of the tree, where there is nothing left to insert after.
  • khtml/xml/dom_nodeimpl.cpp: (NodeImpl::enclosingNonBlockFlowElement): New method to support moveNodesAfterNode changes.
  • khtml/xml/dom_nodeimpl.h: Declare NodeImpl::enclosingNonBlockFlowElement
  • layout-tests/editing/deleting/delete-3857753-fix-expected.txt: Added.
  • layout-tests/editing/deleting/delete-3857753-fix.html: Added.
9:16 AM Changeset in webkit [7934] by darin
  • 2 edits in trunk/JavaScriptCore

Reviewed by Ken.

  • fixed <rdar://problem/3865365> since -[WebScriptObject dealloc] does not call [super dealloc], the build will fail due to a warning
  • fixed behavior so that [[WebScriptObject alloc] initWithCoder:] doesn't leak WebUndefined instances and incidentally so that [[WebScriptObject alloc] init] returns the single shared instance rather than allocating a new one
  • bindings/objc/WebScriptObject.mm: Removed some stray semicolons. (+[WebUndefined allocWithZone:]): Made this the common bottleneck that returns the single instance of WebUndefined, since it's the single method that normally allocates new instances. Calls super to actually allocate only the very first time it's called. (-[WebUndefined initWithCoder:]): Simplified to just return self (no reason to re-lookup the single shared instance since there can be only one). (-[WebUndefined copyWithZone:]): Ditto. (-[WebUndefined retain]): Ditto. (-[WebUndefined retainCount]): Use UINT_MAX constant here (matches usage in NSObject.m for retain count of class). (-[WebUndefined autorelease]): Simplified to just return self (see above). (-[WebUndefined copy]): No need to override this since it just turns around and calls copyWithZone:. (-[WebUndefined dealloc]): Added an assertion since this method should never be called. Also added a call to [super dealloc] after return; to make the new -Wdealloc-check compiler happy (fixing the bug mentioned above). (+[WebUndefined undefined]): Reimplemented; calls allocWithZone:NULL to get to the shared instance. No need to call init, since that's a no-op for this class.

Nov 3, 2004:

4:40 PM Changeset in webkit [7933] by harrison
  • 4 edits in trunk/JavaScriptCore

Reviewed by Darin.

Eliminate the use of a marker file to determine how to build.

  • .cvsignore:
  • Makefile.am:
7:58 AM Changeset in webkit [7932] by kocienda
  • 1 edit
    6 adds in trunk

Reviewed by me

More layout tests.

  • layout-tests/editing/deleting/delete-br-008-expected.txt: Added.
  • layout-tests/editing/deleting/delete-br-008.html: Added.
  • layout-tests/editing/deleting/delete-br-009-expected.txt: Added.
  • layout-tests/editing/deleting/delete-br-009.html: Added.
  • layout-tests/editing/deleting/delete-br-010-expected.txt: Added.
  • layout-tests/editing/deleting/delete-br-010.html: Added.
3:52 AM Changeset in webkit [7931] by mjs
  • 2 edits in trunk/WebCore

Fix by Yasuo Kida, reviewed by me.

<rdar://problem/3819004> REGRESSION (Mail): Can't move cursor / delete character after deleting the active input area

  • kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::setMarkedTextRange): Treat a collapsed range the same as a nil range - setting an empty marked range should clear the marked range entirely.
3:19 AM Changeset in webkit [7930] by mjs
  • 15 edits in trunk

WebCore:

Reviewed by Dave Hyatt (when I originally coded it).

WebCore part of fix for:

<rdar://problem/3759187> REGRESSION (Mail): implement firstRectForCharacterRange:

  • kwq/WebCoreBridge.h:
  • kwq/WebCoreBridge.mm: (-[WebCoreBridge firstRectForDOMRange:]): New method to compute the rect for a DOMRange, or if the range is split into multiple lines, the rect for the part on the first line only.
  • khtml/rendering/render_object.cpp: (RenderObject::caretRect): Added extraWidthToEndOfLine parameter and ditto for the overrides below.
  • khtml/rendering/render_object.h:
  • khtml/rendering/render_box.cpp: (RenderBox::caretRect):
  • khtml/rendering/render_box.h:
  • khtml/rendering/render_br.cpp: (RenderBR::caretRect):
  • khtml/rendering/render_br.h:
  • khtml/rendering/render_flow.cpp: (RenderFlow::caretRect):
  • khtml/rendering/render_flow.h:
  • khtml/rendering/render_text.cpp: (RenderText::caretRect):

WebKit:

Reviewed by Dave Hyatt (when I originally coded it).

Redid WebKit part of fix for:

<rdar://problem/3759187> REGRESSION (Mail): implement firstRectForCharacterRange:

  • WebView.subproj/WebHTMLView.m: (-[WebHTMLView firstRectForCharacterRange:]): Call the appropriate new bridge method, and translate to screen coordinates.

Nov 2, 2004:

5:07 PM Changeset in webkit [7929] by sullivan
  • 2 edits in trunk/WebKit

Reviewed by Hyatt.

  • [NSFont menuFontOfSize:], called from WebStringTruncator, was taking > 9% of the time creating a very large bookmarks menu, so I cached this one NSFont object.
  • Misc.subproj/WebStringTruncator.m: (defaultMenuFont): new function, caches the font used when no font is specified (+[WebStringTruncator centerTruncateString:toWidth:]): call new function
3:22 PM Changeset in webkit [7928] by kocienda
  • 9 edits in trunk

WebCore:

Reviewed by Hyatt

Implemented command to insert a block in response to typing a return key (even though
I am not turning that on by default with this patch....that will come later).

This new command is called InsertParagraphSeparatorCommand.

Reworked the command and function names associated with inserting content into a
document. Before this patch, there were inputXXX and insertXXX variants, with the
former used for more high-level actions and the latter used for lower-level stuff.
However, this was confusing as the AppKit uses insertXXX for everything. This resulted
in an insertXXX command going through an inputXXX WebCore step and then finally to an
insertXXX WebCore step. To make this less confusing, I have changes all the names to
be insertXXX, and modified the lower-level operations so that it is clear what they do.

  • khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::isInsertTextCommand): Name change. (khtml::EditCommand::isInsertTextCommand): Ditto. (khtml::CompositeEditCommand::inputText): Ditto. (khtml::CompositeEditCommand::insertTextIntoNode): Ditto. (khtml::CompositeEditCommand::deleteTextFromNode): Ditto. (khtml::CompositeEditCommand::replaceTextInNode): Ditto. (khtml::CompositeEditCommand::deleteInsignificantText): Name changes in implementation. (khtml::CompositeEditCommand::isLastVisiblePositionInNode): Ditto. (khtml::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Class name change, was DeleteTextCommand. (khtml::DeleteFromTextNodeCommand::~DeleteFromTextNodeCommand): Ditto. (khtml::DeleteFromTextNodeCommand::doApply): Ditto. (khtml::DeleteFromTextNodeCommand::doUnapply): Ditto. (khtml::DeleteSelectionCommand::performGeneralDelete): Ditto. (khtml::DeleteSelectionCommand::fixupWhitespace): Ditto. (khtml::DeleteSelectionCommand::moveNodesAfterNode): Ditto. (khtml::InsertIntoTextNode::InsertIntoTextNode): Class name change. (khtml::InsertIntoTextNode::~InsertIntoTextNode): Ditto. (khtml::InsertIntoTextNode::doApply): Ditto. (khtml::InsertIntoTextNode::doUnapply): Ditto. (khtml::InsertLineBreakCommand::InsertLineBreakCommand): Class name change, was InsertNewlineCommand. (khtml::InsertLineBreakCommand::insertNodeAfterPosition): (khtml::InsertLineBreakCommand::insertNodeBeforePosition): (khtml::InsertLineBreakCommand::doApply): (khtml::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Code moved. No changes. (khtml::InsertNodeBeforeCommand::~InsertNodeBeforeCommand): Ditto. (khtml::InsertNodeBeforeCommand::doApply): Ditto. (khtml::InsertNodeBeforeCommand::doUnapply): Ditto. (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): New command. (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand): Class name change, was InsertNewlineCommandInQuotedContentCommand. (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand): Ditto. (khtml::InsertParagraphSeparatorInQuotedContentCommand::isMailBlockquote): Ditto. (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto. (khtml::InsertTextCommand::InsertTextCommand): Class name change, was InputTextCommand. (khtml::InsertTextCommand::doApply): Ditto. (khtml::InsertTextCommand::deleteCharacter): Ditto. (khtml::InsertTextCommand::prepareForTextInsertion): Ditto. (khtml::InsertTextCommand::input): Ditto. (khtml::InsertTextCommand::insertSpace): Ditto. (khtml::InsertTextCommand::isInsertTextCommand): Ditto. (khtml::TypingCommand::insertLineBreak): Name change, was insertNewline. (khtml::TypingCommand::insertParagraphSeparatorInQuotedContent): Name change, was insertNewlineInQuotedContent. (khtml::TypingCommand::insertParagraphSeparator): New function. (khtml::TypingCommand::doApply): Name changes, as above. (khtml::TypingCommand::insertText): Ditto. (khtml::TypingCommand::deleteKeyPressed): Ditto. (khtml::TypingCommand::preservesTypingStyle): Ditto.
  • khtml/editing/htmlediting.h: (khtml::DeleteFromTextNodeCommand::node): Name change. (khtml::DeleteFromTextNodeCommand::offset): Ditto. (khtml::DeleteFromTextNodeCommand::count): Ditto. (khtml::InsertIntoTextNode::text): Ditto. (khtml::InsertNodeBeforeCommand::insertChild): Ditto. (khtml::InsertNodeBeforeCommand::refChild): Ditto. (khtml::TypingCommand::): Ditto.
  • khtml/editing/jsediting.cpp: Name changes, as above.
  • kwq/WebCoreBridge.h:
  • kwq/WebCoreBridge.mm: (-[WebCoreBridge insertLineBreak]): Name change, was insertNewline. (-[WebCoreBridge insertParagraphSeparator]): New function. (-[WebCoreBridge insertParagraphSeparatorInQuotedContent]): Name change, was insertNewlineInQuotedContent.

WebKit:

Reviewed by Hyatt

WebCore now implements a command to insert a block in response to typing a return key, and
some names were improved in the course of this work.

  • WebView.subproj/WebHTMLView.m: (-[WebHTMLView insertNewline:]): Now calls insertLineBreak on bridge object. (-[WebHTMLView insertLineBreak:]): New method. (-[WebHTMLView insertParagraphSeparator:]): Now implemented.
  • WebView.subproj/WebView.m:

Nov 1, 2004:

3:46 PM Changeset in webkit [7927] by rjw
  • 3 edits in trunk/JavaScriptCore

Fixed <rdar://problem/3861469> Latest Real player crashes Safari on some sites.

Reviewed by Ken.

  • bindings/c/c_instance.cpp: (CInstance::invokeMethod): (CInstance::invokeDefaultMethod): Initialize out parameters to void type.
  • bindings/c/c_runtime.cpp: (CField::valueFromInstance): (CField::setValueToInstance): Initialize out parameters to void type. Also added additional checks to protect against classes that don't implement all functions.
2:33 PM Changeset in webkit [7926] by rjw
  • 3 edits in trunk/JavaScriptCore

Fixed <rdar://problem/3861257> WebUndefined should be returned for undefined values

Reviewed by John.

  • ChangeLog:
  • bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]): Added additional conversion Undefined -> WebUndefined.
  • bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue): Added additional conversion WebUndefined -> Undefined.
2:21 PM Changeset in webkit [7925] by cblu
  • 2 edits in branches/Safari-1-2-branch/WebCore

Fixed: <rdar://problem/3860882> Safari URI status bar spoofing using a nested <a> links in a table

Rolled fix from TOT to 1.2 branch.

Reviewed by adele.

  • khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint): Make sure the URL element is the innermost one, by not setting it once it's already set.
2:20 PM Changeset in webkit [7924] by kdecker
  • 2 edits in trunk/WebCore

Reviewed by rjw.

fixed <rdar://problem/3681094> Crash in KJS::WindowFunc::tryCall with application/xhtml+xml Content-Type
once and for all.

  • khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Added a nil check in the case of an empty document lacking a baseURL().
1:23 PM Changeset in webkit [7923] by darin
  • 2 edits in trunk/JavaScriptCore
  • fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments
  • bindings/objc/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug report to match the contents of the file.
11:21 AM Changeset in webkit [7922] by darin
  • 2 edits in trunk/WebCore

Reviewed by Hyatt.

  • fixed <rdar://problem/3859381> REGRESSION (167-168): text in form fields should not use body's text color
  • khtml/css/html4.css: Use color: initial for textarea and related ones.
9:56 AM Changeset in webkit [7921] by kocienda
  • 9 edits
    6 adds in trunk

Reviewed by John

Fix for this bug:

<rdar://problem/3775920> REGRESSION (Mail): Centering doesn't work in HTML mail

  • khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties): Factor out the implementation here into new copyPropertiesInSet helper. This now calls the generalized copyPropertiesInSet function with the arguments needed to make copying inheritable work.
  • khtml/css/css_computedstyle.h:
  • khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::diff): Move this function here from css_computedstyle.cpp. In order to do apply block properties, "regular" style declarations need to do style diffs as well. (CSSStyleDeclarationImpl::copyBlockProperties): New helper. Just like copyInheritableProperties except that it uses a different set of properties that apply only to blocks. (CSSStyleDeclarationImpl::copyPropertiesInSet): New helper that looks at a style declaration and copies out those properties listed in a pre-defined set.
  • khtml/css/css_valueimpl.h:
  • khtml/editing/htmlediting.cpp: (khtml::StyleChange::StyleChange): Modified to work with style changes that apply to a whole block, factoring out some of the special case code that should now only run in the inline case. (khtml::StyleChange::init): Factored out the code that now is in checkForLegacyHTMLStyleChange. (khtml::StyleChange::checkForLegacyHTMLStyleChange): New helper for case where we want special handling for "legacy" HTML styles like <B> and <I>. (khtml::ApplyStyleCommand::doApply): Much refactoring in this class to divide up the work of style changes into different kinds. CSS specifies certain properties only apply to certain element types. This set of changes now recognizes two such separate cases: styles that apply to blocks, and styles that apply to inlines. (khtml::ApplyStyleCommand::applyBlockStyle): New function to handle apply styles to whole blocks. (khtml::ApplyStyleCommand::applyInlineStyle): New function to handle apply styles to inlines. (khtml::ApplyStyleCommand::isHTMLStyleNode): Is now passed a CSSStyleDeclarationImpl to work with rather than working on the CSSStyleDeclarationImpl member variable of the class. This is done so that the function can be passed a portion of the styles being applied so that block styles and inline styles can be handled separately. (khtml::ApplyStyleCommand::removeCSSStyle): Ditto. (khtml::ApplyStyleCommand::removeBlockStyle): New function to handle removing styles from whole blocks. (khtml::ApplyStyleCommand::removeInlineStyle): New function to removing styles from inlines. (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): New function to handle applying style to whole blocks. (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): New function to handle applying style to inlines.
  • khtml/editing/htmlediting.h: (khtml::StyleChange::): Changed as described above. (khtml::StyleChange::usesLegacyStyles): (khtml::EditCommand::setEndingSelectionNeedsLayout): New function to that tells the ending selection it needs to layout, even though it has not changed position in the DOM. For instance, this is needed when text align changes.
  • khtml/khtml_part.cpp: (KHTMLPart::setTypingStyle): Put in an early bail-out in the case where the current style matches the passed-in argument. (KHTMLPart::applyStyle): Modify this function so that block styles are applied when the selection is a caret. Formerly, this just set typing style and made no visible changes to the document.

New tests.

  • layout-tests/editing/editing.js: Added some glue to change text align.
  • layout-tests/editing/style/block-style-001-expected.txt: Added.
  • layout-tests/editing/style/block-style-001.html: Added.
  • layout-tests/editing/style/block-style-002-expected.txt: Added.
  • layout-tests/editing/style/block-style-002.html: Added.
  • layout-tests/editing/style/block-style-003-expected.txt: Added.
  • layout-tests/editing/style/block-style-003.html: Added.
Note: See TracTimeline for information about the timeline view.