Changeset 83039 in webkit
- Timestamp:
- Apr 6, 2011 5:59:24 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83037 r83039 1 2011-04-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words 6 https://bugs.webkit.org/show_bug.cgi?id=57872 7 8 Added a test insert a paragraph separator and text around tab spans. WebKit should not apply the tab span's 9 style to the paragraph separator or the text. 10 11 * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Added. 12 * editing/inserting/insert-paragraph-separator-tab-span.html: Added. 13 1 14 2011-04-05 Alexander Pavlov <apavlov@chromium.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r83038 r83039 1 2011-04-06 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words 6 https://bugs.webkit.org/show_bug.cgi?id=57872 7 8 r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition 9 because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition. 10 11 r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without 12 avoiding the tab span. 13 14 Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy. 15 16 Test: editing/inserting/insert-paragraph-separator-tab-span.html 17 18 * editing/EditingStyle.cpp: 19 (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style. 20 * editing/InsertParagraphSeparatorCommand.cpp: 21 (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph 22 separator into a paragraph separator. 23 1 24 2011-04-06 Levi Weintraub <leviw@chromium.org> 2 25 -
trunk/Source/WebCore/editing/EditingStyle.cpp
r82503 r83039 301 301 void EditingStyle::init(Node* node, PropertiesToInclude propertiesToInclude) 302 302 { 303 if (isTabSpanTextNode(node)) 304 node = tabSpanNode(node)->parentNode(); 305 else if (isTabSpanNode(node)) 306 node = node->parentNode(); 307 303 308 RefPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = computedStyle(node); 304 309 m_mutableStyle = propertiesToInclude == AllProperties && computedStyleAtPosition ? computedStyleAtPosition->copy() : editingStyleFromComputedStyle(computedStyleAtPosition); -
trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
r79398 r83039 240 240 241 241 Vector<Element*> ancestors; 242 getAncestorsInsideBlock( insertionPosition.deprecatedNode(), startBlock, ancestors);242 getAncestorsInsideBlock(positionBeforeTabSpan(insertionPosition).deprecatedNode(), startBlock, ancestors); 243 243 RefPtr<Element> parent = cloneHierarchyUnderNewBlock(ancestors, blockToInsert); 244 244 … … 255 255 if (isFirstInBlock || !inSameBlock(visiblePos, visiblePos.previous())) { 256 256 Node *refNode; 257 258 insertionPosition = positionBeforeTabSpan(insertionPosition); 259 257 260 if (isFirstInBlock && !nestNewBlock) 258 261 refNode = startBlock; … … 271 274 272 275 Vector<Element*> ancestors; 273 getAncestorsInsideBlock(positionAvoidingSpecialElementBoundary( insertionPosition).deprecatedNode(), startBlock, ancestors);276 getAncestorsInsideBlock(positionAvoidingSpecialElementBoundary(positionBeforeTabSpan(insertionPosition)).deprecatedNode(), startBlock, ancestors); 274 277 275 278 appendBlockPlaceholder(cloneHierarchyUnderNewBlock(ancestors, blockToInsert)); … … 304 307 // Build up list of ancestors in between the start node and the start block. 305 308 Vector<Element*> ancestors; 306 getAncestorsInsideBlock( insertionPosition.deprecatedNode(), startBlock, ancestors);309 getAncestorsInsideBlock(positionBeforeTabSpan(insertionPosition).deprecatedNode(), startBlock, ancestors); 307 310 308 311 // Make sure we do not cause a rendered space to become unrendered.
Note: See TracChangeset
for help on using the changeset viewer.