1. 19 May, 2010 1 commit
  2. 16 May, 2010 1 commit
    • dbates@webkit.org's avatar
      2010-05-16 Daniel Bates <dbates@rim.com> · f6f05a9e
      dbates@webkit.org authored
              Reviewed by David Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=39196
      
              Rollout changeset 59274 <http://trac.webkit.org/changeset/59274>.
      
              Prepared on behalf of David Hyatt.
      
              "Not worth the memory use." Just roll this out.
      
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * editing/visible_units.cpp:
              (WebCore::previousLinePosition):
              (WebCore::nextLinePosition):
              * rendering/EllipsisBox.cpp:
              (WebCore::EllipsisBox::paint):
              (WebCore::EllipsisBox::selectionRect):
              (WebCore::EllipsisBox::paintSelection):
              (WebCore::EllipsisBox::nodeAtPoint):
              * rendering/EllipsisBox.h:
              (WebCore::EllipsisBox::EllipsisBox):
              (WebCore::EllipsisBox::height):
              * rendering/InlineBox.cpp:
              (WebCore::InlineBox::height):
              (WebCore::InlineBox::adjustPosition):
              (WebCore::InlineBox::canAccommodateEllipsis):
              * rendering/InlineBox.h:
              (WebCore::InlineBox::InlineBox):
              (WebCore::InlineBox::isInlineBox):
              (WebCore::InlineBox::hasVirtualHeight):
              (WebCore::InlineBox::setHasVirtualHeight):
              (WebCore::InlineBox::virtualHeight):
              (WebCore::InlineBox::setWidth):
              (WebCore::InlineBox::width):
              (WebCore::InlineBox::setX):
              (WebCore::InlineBox::x):
              (WebCore::InlineBox::setY):
              (WebCore::InlineBox::y):
              (WebCore::InlineBox::baselinePosition):
              (WebCore::InlineBox::lineHeight):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesVertically):
              (WebCore::InlineFlowBox::computeVerticalOverflow):
              (WebCore::InlineFlowBox::nodeAtPoint):
              (WebCore::InlineFlowBox::paintBoxDecorations):
              (WebCore::InlineFlowBox::paintMask):
              (WebCore::InlineFlowBox::paintTextDecorations):
              * rendering/InlineFlowBox.h:
              (WebCore::InlineFlowBox::visibleOverflowRect):
              (WebCore::InlineFlowBox::topLayoutOverflow):
              (WebCore::InlineFlowBox::bottomLayoutOverflow):
              (WebCore::InlineFlowBox::leftLayoutOverflow):
              (WebCore::InlineFlowBox::rightLayoutOverflow):
              (WebCore::InlineFlowBox::layoutOverflowRect):
              (WebCore::InlineFlowBox::topVisualOverflow):
              (WebCore::InlineFlowBox::bottomVisualOverflow):
              (WebCore::InlineFlowBox::leftVisualOverflow):
              (WebCore::InlineFlowBox::rightVisualOverflow):
              (WebCore::InlineFlowBox::visualOverflowRect):
              (WebCore::InlineFlowBox::setHorizontalOverflowPositions):
              (WebCore::InlineFlowBox::setVerticalOverflowPositions):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::selectionRect):
              (WebCore::InlineTextBox::placeEllipsisBox):
              (WebCore::InlineTextBox::nodeAtPoint):
              (WebCore::InlineTextBox::paint):
              (WebCore::InlineTextBox::paintSelection):
              (WebCore::InlineTextBox::paintCompositionBackground):
              (WebCore::InlineTextBox::paintDecoration):
              (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
              (WebCore::InlineTextBox::paintTextMatchMarker):
              (WebCore::InlineTextBox::computeRectForReplacementMarker):
              (WebCore::InlineTextBox::paintCompositionUnderline):
              (WebCore::InlineTextBox::offsetForPosition):
              (WebCore::InlineTextBox::positionForOffset):
              * rendering/InlineTextBox.h:
              (WebCore::InlineTextBox::setSpaceAdd):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::positionForPointWithInlineChildren):
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::RenderBlock::computeVerticalPositionsForLine):
              (WebCore::RenderBlock::layoutInlineChildren):
              * rendering/RenderSVGInline.cpp:
              (WebCore::RenderSVGInline::createInlineFlowBox):
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::createTextBox):
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::createRootInlineBox):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::positionForPoint):
              (WebCore::RenderText::firstRunX):
              (WebCore::RenderText::firstRunY):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::writeTextRun):
              * rendering/RootInlineBox.cpp:
              (WebCore::RootInlineBox::placeEllipsis):
              (WebCore::RootInlineBox::addHighlightOverflow):
              (WebCore::RootInlineBox::closestLeafChildForXPos):
              * rendering/SVGInlineFlowBox.h:
              (WebCore::SVGInlineFlowBox::SVGInlineFlowBox):
              (WebCore::SVGInlineFlowBox::virtualHeight):
              (WebCore::SVGInlineFlowBox::setHeight):
              * rendering/SVGInlineTextBox.h:
              (WebCore::SVGInlineTextBox::virtualHeight):
              (WebCore::SVGInlineTextBox::setHeight):
              (WebCore::SVGInlineTextBox::selectionTop):
              (WebCore::SVGInlineTextBox::selectionHeight):
              * rendering/SVGRootInlineBox.h:
              (WebCore::SVGRootInlineBox::SVGRootInlineBox):
              (WebCore::SVGRootInlineBox::virtualHeight):
              (WebCore::SVGRootInlineBox::setHeight):
              * rendering/TrailingFloatsRootInlineBox.h: Added.
              (WebCore::TrailingFloatsRootInlineBox::TrailingFloatsRootInlineBox):
              (WebCore::TrailingFloatsRootInlineBox::virtualHeight):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6f05a9e
  3. 12 May, 2010 1 commit
    • hyatt@apple.com's avatar
      Make InlineBoxes use an IntRect for dimensions, and eliminate the dynamic... · 56261e20
      hyatt@apple.com authored
      Make InlineBoxes use an IntRect for dimensions, and eliminate the dynamic computation of height() every time.
      
      Reviewed by Sam Weinig.
      
      * WebCore.xcodeproj/project.pbxproj:
      * editing/visible_units.cpp:
      (WebCore::previousLinePosition):
      (WebCore::nextLinePosition):
      * rendering/EllipsisBox.cpp:
      (WebCore::EllipsisBox::paint):
      (WebCore::EllipsisBox::selectionRect):
      (WebCore::EllipsisBox::paintSelection):
      (WebCore::EllipsisBox::nodeAtPoint):
      * rendering/EllipsisBox.h:
      (WebCore::EllipsisBox::EllipsisBox):
      * rendering/InlineBox.cpp:
      (WebCore::InlineBox::adjustPosition):
      (WebCore::InlineBox::canAccommodateEllipsis):
      * rendering/InlineBox.h:
      (WebCore::InlineBox::InlineBox):
      (WebCore::InlineBox::isSVGRootInlineBox):
      (WebCore::InlineBox::x):
      (WebCore::InlineBox::y):
      (WebCore::InlineBox::width):
      (WebCore::InlineBox::height):
      (WebCore::InlineBox::bottom):
      (WebCore::InlineBox::right):
      (WebCore::InlineBox::setX):
      (WebCore::InlineBox::setY):
      (WebCore::InlineBox::setWidth):
      (WebCore::InlineBox::setHeight):
      (WebCore::InlineBox::location):
      (WebCore::InlineBox::size):
      (WebCore::InlineBox::setLocation):
      (WebCore::InlineBox::setSize):
      (WebCore::InlineBox::move):
      (WebCore::InlineBox::frameRect):
      (WebCore::InlineBox::setFrameRect):
      (WebCore::InlineBox::baselinePosition):
      (WebCore::InlineBox::lineHeight):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::placeBoxesVertically):
      (WebCore::InlineFlowBox::computeVerticalOverflow):
      (WebCore::InlineFlowBox::nodeAtPoint):
      (WebCore::InlineFlowBox::paintBoxDecorations):
      (WebCore::InlineFlowBox::paintMask):
      (WebCore::InlineFlowBox::paintTextDecorations):
      * rendering/InlineFlowBox.h:
      (WebCore::InlineFlowBox::visibleOverflowRect):
      (WebCore::InlineFlowBox::topLayoutOverflow):
      (WebCore::InlineFlowBox::bottomLayoutOverflow):
      (WebCore::InlineFlowBox::leftLayoutOverflow):
      (WebCore::InlineFlowBox::rightLayoutOverflow):
      (WebCore::InlineFlowBox::layoutOverflowRect):
      (WebCore::InlineFlowBox::topVisualOverflow):
      (WebCore::InlineFlowBox::bottomVisualOverflow):
      (WebCore::InlineFlowBox::leftVisualOverflow):
      (WebCore::InlineFlowBox::rightVisualOverflow):
      (WebCore::InlineFlowBox::visualOverflowRect):
      (WebCore::InlineFlowBox::setHorizontalOverflowPositions):
      (WebCore::InlineFlowBox::setVerticalOverflowPositions):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::selectionRect):
      (WebCore::InlineTextBox::placeEllipsisBox):
      (WebCore::InlineTextBox::nodeAtPoint):
      (WebCore::InlineTextBox::paint):
      (WebCore::InlineTextBox::paintSelection):
      (WebCore::InlineTextBox::paintCompositionBackground):
      (WebCore::InlineTextBox::paintDecoration):
      (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
      (WebCore::InlineTextBox::paintTextMatchMarker):
      (WebCore::InlineTextBox::computeRectForReplacementMarker):
      (WebCore::InlineTextBox::paintCompositionUnderline):
      (WebCore::InlineTextBox::offsetForPosition):
      (WebCore::InlineTextBox::positionForOffset):
      * rendering/InlineTextBox.h:
      (WebCore::InlineTextBox::setSpaceAdd):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::positionForPointWithInlineChildren):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::computeVerticalPositionsForLine):
      (WebCore::RenderBlock::layoutInlineChildren):
      * rendering/RenderSVGInline.cpp:
      (WebCore::RenderSVGInline::createInlineFlowBox):
      * rendering/RenderSVGInlineText.cpp:
      (WebCore::RenderSVGInlineText::createTextBox):
      * rendering/RenderSVGText.cpp:
      (WebCore::RenderSVGText::createRootInlineBox):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::positionForPoint):
      (WebCore::RenderText::firstRunX):
      (WebCore::RenderText::firstRunY):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::writeTextRun):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::placeEllipsis):
      (WebCore::RootInlineBox::addHighlightOverflow):
      (WebCore::RootInlineBox::closestLeafChildForXPos):
      * rendering/SVGInlineFlowBox.h:
      (WebCore::SVGInlineFlowBox::SVGInlineFlowBox):
      * rendering/SVGInlineTextBox.h:
      (WebCore::SVGInlineTextBox::selectionTop):
      (WebCore::SVGInlineTextBox::selectionHeight):
      * rendering/SVGRootInlineBox.h:
      (WebCore::SVGRootInlineBox::SVGRootInlineBox):
      (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
      * rendering/TrailingFloatsRootInlineBox.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56261e20
  4. 23 Apr, 2010 1 commit
    • xji@chromium.org's avatar
      2010-04-23 Xiaomei Ji <xji@chromium.org> · 1dfb0561
      xji@chromium.org authored
              Reviewed by Dan Bernstein and Darin Adler
      
              Fix issue "caret does not paint after type in characters in right
              aligned div or after delete all characters in RTL div or 
              0px right padding RTL textarea"
              https://bugs.webkit.org/show_bug.cgi?id=25319
      
              Test: editing/inserting/caret-position.html
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::localCaretRect):
      2010-04-23  Xiaomei Ji  <xji@chromium.org>
      
              Reviewed by Dan Bernstein and Darin Adler
      
              Fix issue "caret does not paint after type in characters in right
              aligned div or after delete all characters in RTL div or 
              0px right padding RTL textarea"
              https://bugs.webkit.org/show_bug.cgi?id=25319
      
              * editing/inserting/caret-position-expected.txt: Added.
              * editing/inserting/caret-position.html: Added.
              * platform/mac/editing/input/caret-primary-bidi-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1dfb0561
  5. 20 Apr, 2010 1 commit
    • hamaji@chromium.org's avatar
      2010-04-20 Shinichiro Hamaji <hamaji@chromium.org> · 359e1319
      hamaji@chromium.org authored
              Reviewed by Darin Adler and Alexey Proskuryakov.
      
              A backslash in EUC-JP becomes to a yen sign when it is copied
              https://bugs.webkit.org/show_bug.cgi?id=36419
      
              * editing/execCommand/transpose-backslash-with-euc-expected.txt: Added.
              * editing/execCommand/transpose-backslash-with-euc.html: Added.
              * editing/pasteboard/copy-backslash-with-euc-expected.txt: Added.
              * editing/pasteboard/copy-backslash-with-euc.html: Added.
              * editing/pasteboard/resources/copy-backslash-euc.html: Added.
      2010-04-20  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler and Alexey Proskuryakov.
      
              A backslash in EUC-JP becomes to a yen sign when it is copied
              https://bugs.webkit.org/show_bug.cgi?id=36419
      
              Tests: editing/execCommand/transpose-backslash-with-euc.html
                     editing/pasteboard/copy-backslash-with-euc.html
      
              * editing/Editor.cpp: Remove an unnecessary displayStringModifiedByEncoding calls.
              (WebCore::Editor::addToKillRing):
              * editing/TextIterator.cpp: TextIterator can use RenderText::textWithoutTranscoding and now plainText() uses this version
              (WebCore::TextIterator::TextIterator):
              (WebCore::TextIterator::init):
              (WebCore::TextIterator::emitText):
              (WebCore::plainTextToMallocAllocatedBuffer):
              * editing/TextIterator.h:
              (WebCore::):
              * platform/mac/PasteboardMac.mm: Remove an unnecessary displayStringModifiedByEncoding call.
              (WebCore::Pasteboard::writeSelection):
              * platform/text/TextEncoding.h: Make backslashAsCurrencySymbol public.
              * rendering/RenderText.cpp: Add RenderText::textWithoutTranscoding
              (WebCore::RenderText::RenderText):
              (WebCore::RenderText::updateNeedsTranscoding):
              (WebCore::RenderText::styleDidChange):
              (WebCore::isInlineFlowOrEmptyText):
              (WebCore::RenderText::previousCharacter):
              (WebCore::RenderText::setTextInternal):
              (WebCore::RenderText::textWithoutTranscoding):
              (WebCore::RenderText::transformText):
              * rendering/RenderText.h:
              * rendering/RenderTextControl.cpp: Remove an unnecessary displayStringModifiedByEncoding call.
              (WebCore::RenderTextControl::setInnerTextValue):
              (WebCore::RenderTextControl::finishText):
              * rendering/RenderTextFragment.cpp:
              (WebCore::RenderTextFragment::previousCharacter):
              * rendering/RenderTextFragment.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      359e1319
  6. 07 Apr, 2010 1 commit
    • enrica@apple.com's avatar
      WebCore: Text repainting does not account for glyphs which draw outside the... · b9050ed5
      enrica@apple.com authored
      WebCore: Text repainting does not account for glyphs which draw outside the typographic bounds of the font (6274).
      <rdar://problem/6649734>
      <https://bugs.webkit.org/show_bug.cgi?id=6274>
              
      Reviewed by Dave Hyatt.
      
      In order to be able to handle successfully this case, it is necessary to change the glyph width cache to store
      the bounding box for the glyph instead of the simply caching the glyph width.
      Retrieving the bounding box for the glyph is expensive, therefore we do it only
      when we are rendering text using the complex text path to minimize the performance impact.
      To support characters with stacked diacritics, the method canUseGlyphCache has been modified to
      return false for the range of characters with stacked diacritics.
      The glyph cache has been also updated to allow storing the glyph bounding box together with the
      horizontal width. The bounding box is populated only for complex text.
              
      The original version of this patch has been written by Dan Bernstein.
      
      Test: fast/repaint/stacked-diacritics.html
      
      * Android.mk: File name change.
      * GNUmakefile.am: File name change.
      * WebCore.base.exp: Added parameter in exported function.
      * WebCore.gypi: File name change.
      * WebCore.vcproj/WebCore.vcproj: File name change.
      * WebCore.xcodeproj/project.pbxproj: File name change.
      * platform/graphics/Font.cpp:
      (WebCore::Font::floatWidth): Added glyphOverflow parameter.
      * platform/graphics/Font.h:
      (WebCore::GlyphOverflow::GlyphOverflow): Added.
      (WebCore::Font::width): Added glyphOverflow parameter.
      * platform/graphics/FontFastPath.cpp:
      (WebCore::Font::canUseGlyphCache): Modified to render characters with stacked diacritics with complex text path.
      * platform/graphics/GlyphMetricsMap.cpp: Copied from WebCore/platform/graphics/GlyphWidthMap.cpp.
      (WebCore::GlyphMetricsMap::locatePageSlowCase): Class name changed to reflect new semantics.
      * platform/graphics/GlyphMetricsMap.h: Copied from WebCore/platform/graphics/GlyphWidthMap.h.
      (WebCore::GlyphMetricsMap::GlyphMetricsMap):
      (WebCore::GlyphMetricsMap::~GlyphMetricsMap):
      (WebCore::GlyphMetricsMap::metricsForGlyph):
      (WebCore::GlyphMetricsMap::widthForGlyph):
      (WebCore::GlyphMetricsMap::setMetricsForGlyph):
      (WebCore::GlyphMetricsMap::GlyphMetricsPage::metricsForGlyph):
      (WebCore::GlyphMetricsMap::GlyphMetricsPage::setMetricsForGlyph):
      (WebCore::GlyphMetricsMap::GlyphMetricsPage::setMetricsForIndex):
      (WebCore::GlyphMetricsMap::locatePage):
      * platform/graphics/GlyphWidthMap.cpp: Removed.
      * platform/graphics/GlyphWidthMap.h: Removed.
      * platform/graphics/SimpleFontData.cpp:
      (WebCore::SimpleFontData::platformGlyphInit):
      * platform/graphics/SimpleFontData.h:
      (WebCore::):
      (WebCore::SimpleFontData::widthForGlyph):
      (WebCore::SimpleFontData::metricsForGlyph):
      * platform/graphics/cairo/SimpleFontDataCairo.cpp:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * platform/graphics/chromium/FontChromiumWin.cpp:
      (WebCore::Font::floatWidthForComplexText): Added parameter.
      * platform/graphics/chromium/FontLinux.cpp:
      (WebCore::Font::floatWidthForComplexText): Added parameter.
      * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * platform/graphics/chromium/SimpleFontDataLinux.cpp:
      (WebCore::SimpleFontData::platformWidthForGlyph): Name and signature vachange
      * platform/graphics/efl/FontEfl.cpp:
      (WebCore::Font::floatWidthForComplexText): Name and signature change.
      * platform/graphics/gtk/SimpleFontDataPango.cpp:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * platform/graphics/haiku/FontHaiku.cpp:
      (WebCore::Font::floatWidthForComplexText): Added parameter.
      * platform/graphics/haiku/SimpleFontDataHaiku.cpp:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::ComplexTextController::ComplexTextController):
      (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
      * platform/graphics/mac/ComplexTextController.h:
      (WebCore::ComplexTextController::minGlyphBoundingBoxX):
      (WebCore::ComplexTextController::maxGlyphBoundingBoxX):
      (WebCore::ComplexTextController::minGlyphBoundingBoxY):
      (WebCore::ComplexTextController::maxGlyphBoundingBoxY):
      * platform/graphics/mac/FontComplexTextMac.cpp:
      (WebCore::Font::floatWidthForComplexText): Added paramter.
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * platform/graphics/qt/FontQt.cpp:
      (WebCore::Font::floatWidthForComplexText): Added paramter.
      * platform/graphics/win/FontWin.cpp:
      (WebCore::Font::floatWidthForComplexText): Added parameter.
      * platform/graphics/win/SimpleFontDataCGWin.cpp:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * platform/graphics/win/SimpleFontDataWin.cpp:
      (WebCore::SimpleFontData::metricsForGDIGlyph):
      * platform/graphics/win/UniscribeController.cpp:
      (WebCore::UniscribeController::UniscribeController):
      (WebCore::UniscribeController::shapeAndPlaceItem):
      * platform/graphics/win/UniscribeController.h:
      (WebCore::UniscribeController::minGlyphBoundingBoxX):
      (WebCore::UniscribeController::maxGlyphBoundingBoxX):
      (WebCore::UniscribeController::minGlyphBoundingBoxY):
      (WebCore::UniscribeController::maxGlyphBoundingBoxY):
      * platform/graphics/wince/FontWince.cpp:
      (WebCore::Font::floatWidthForComplexText): Added parameter.
      * platform/graphics/wx/FontWx.cpp:
      (WebCore::Font::floatWidthForComplexText): Added parameter.
      * platform/graphics/wx/SimpleFontDataWx.cpp:
      (WebCore::SimpleFontData::platformMetricsForGlyph): Name and signature change.
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::placeBoxesHorizontally):
      (WebCore::InlineFlowBox::computeLogicalBoxHeights):
      (WebCore::InlineFlowBox::computeVerticalOverflow):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::setFallbackFonts):
      (WebCore::InlineTextBox::fallbackFonts):
      (WebCore::InlineTextBox::setGlyphOverflow):
      (WebCore::InlineTextBox::glyphOverflow):
      * rendering/InlineTextBox.h:
      (WebCore::InlineTextBox::clearGlyphOverflowAndFallbackFontMap): Added.
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::computeHorizontalPositionsForLine):
      (WebCore::RenderBlock::layoutInlineChildren):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::RenderText):
      (WebCore::RenderText::styleDidChange):
      (WebCore::RenderText::widthFromCache):
      (WebCore::RenderText::trimmedPrefWidths):
      (WebCore::RenderText::calcPrefWidths):
      (WebCore::RenderText::setText):
      (WebCore::RenderText::width):
      * rendering/RenderText.h:
      
      LayoutTests: Text repainting does not account for glyphs which draw outside the typographic bounds of the font (6274).
      <rdar://problem/6649734>
      <https://bugs.webkit.org/show_bug.cgi?id=6274>
      
      Reviewed by Dave Hyatt.
      
      * fast/repaint/stacked-diacritics.html: Added.
      * platform/mac/fast/repaint/stacked-diacritics-expected.checksum: Added.
      * platform/mac/fast/repaint/stacked-diacritics-expected.png: Added.
      * platform/mac/fast/repaint/stacked-diacritics-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9050ed5
  7. 01 Apr, 2010 1 commit
    • simon.fraser@apple.com's avatar
      2010-04-01 Simon Fraser <simon.fraser@apple.com> · 50f7bdca
      simon.fraser@apple.com authored
              Reviewed by Dan Bernstein.
      
              Assertion failure: !repaintContainer || repaintContainer == this
              https://bugs.webkit.org/show_bug.cgi?id=36672
      
              RenderText's implementation of clippedOverflowRectForRepaint() uses containingBlock()
              to get the renderer to use for computing the repaint rect. However, the renderer returned
              by containingBlock() may be an ancestor of the repaintContainer, and containingBlock()
              doesn't have the 'repaintContainerSkipped' logic that container() has.
      
              So in this case, check to see whether repaintContainer is actually a descendant of the
              containing block, and in that case just repaint the entire repaintContainer.
      
              Test: compositing/repaint/inline-repaint-container.html
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::clippedOverflowRectForRepaint):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50f7bdca
  8. 31 Mar, 2010 1 commit
    • barraclough@apple.com's avatar
      Remove dependency on TextBreakIterator from StringImpl.cpp, · c72059ea
      barraclough@apple.com authored
      and from member methods of String.
      
      Reviewed by Oliver Hunt.
      
      Make 'numGraphemeClusters' & 'numCharactersInGraphemeClusters'
      global function defined in PlatformString.h, rather than
      member methods on String (these can be implemented purely
      using the characters() and length() public interface),
      and make 'makeCapitalized' a static function in RenderText.cpp.
      
      * dom/InputElement.cpp:
      (WebCore::InputElement::sanitizeUserInputValue):
      (WebCore::InputElement::handleBeforeTextInsertedEvent):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::tooLong):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
      (WebCore::HTMLTextAreaElement::sanitizeUserInputValue):
      (WebCore::HTMLTextAreaElement::tooLong):
      * platform/text/PlatformString.h:
      (WebCore::String::makeSecure):
      * platform/text/String.cpp:
      (WebCore::numGraphemeClusters):
      (WebCore::numCharactersInGraphemeClusters):
      * platform/text/StringImpl.cpp:
      * platform/text/StringImpl.h:
      * rendering/RenderText.cpp:
      (WebCore::makeCapitalized):
      (WebCore::RenderText::setTextInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c72059ea
  9. 16 Mar, 2010 1 commit
    • hamaji@chromium.org's avatar
      2010-03-16 Shinichiro Hamaji <hamaji@chromium.org> · 5e3b1e24
      hamaji@chromium.org authored
              Reviewed by Darin Adler.
      
              RenderText::m_text should be a String, not RefPtr<StringImpl>
              https://bugs.webkit.org/show_bug.cgi?id=36010
      
              Refactoring only, so no new tests.
      
              * platform/text/PlatformString.h:
              (WebCore::String::makeLower):
              (WebCore::String::makeUpper):
              (WebCore::String::makeSecure):
              (WebCore::String::makeCapitalized):
              (WebCore::String::containsOnlyASCII):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::RenderText):
              (WebCore::RenderText::widthFromCache):
              (WebCore::RenderText::trimmedPrefWidths):
              (WebCore::RenderText::containsOnlyWhitespace):
              (WebCore::RenderText::setTextInternal):
              (WebCore::RenderText::setText):
              (WebCore::RenderText::previousOffset):
              (WebCore::RenderText::previousOffsetForBackwardDeletion):
              (WebCore::RenderText::nextOffset):
              * rendering/RenderText.h:
              (WebCore::RenderText::text):
              (WebCore::RenderText::characters):
              (WebCore::RenderText::textLength):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e3b1e24
  10. 12 Mar, 2010 1 commit
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=36069 · 9f47d581
      hyatt@apple.com authored
              
      Reviewed by Dan Bernstein.
      
      Eliminate InlineRunBox.
      
      * WebCore.xcodeproj/project.pbxproj:
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::adjustPosition):
      (WebCore::InlineFlowBox::paintFillLayer):
      (WebCore::InlineFlowBox::paintBoxDecorations):
      (WebCore::InlineFlowBox::paintMask):
      * rendering/InlineFlowBox.h:
      (WebCore::InlineFlowBox::InlineFlowBox):
      (WebCore::InlineFlowBox::prevLineBox):
      (WebCore::InlineFlowBox::nextLineBox):
      (WebCore::InlineFlowBox::setNextLineBox):
      (WebCore::InlineFlowBox::setPreviousLineBox):
      * rendering/InlineRunBox.h: Removed.
      * rendering/InlineTextBox.h:
      (WebCore::InlineTextBox::InlineTextBox):
      (WebCore::InlineTextBox::prevTextBox):
      (WebCore::InlineTextBox::nextTextBox):
      (WebCore::InlineTextBox::setNextTextBox):
      (WebCore::InlineTextBox::setPreviousTextBox):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::destroy):
      (WebCore::RenderBlock::rightmostPosition):
      (WebCore::RenderBlock::leftmostPosition):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::destroy):
      (WebCore::RenderInline::absoluteRects):
      (WebCore::RenderInline::absoluteQuads):
      (WebCore::RenderInline::linesBoundingBox):
      (WebCore::RenderInline::linesVisibleOverflowBoundingBox):
      (WebCore::RenderInline::addFocusRingRects):
      (WebCore::RenderInline::paintOutline):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::localBoundingBox):
      * rendering/RenderLineBoxList.cpp:
      (WebCore::RenderLineBoxList::deleteLineBoxTree):
      (WebCore::RenderLineBoxList::extractLineBox):
      (WebCore::RenderLineBoxList::attachLineBox):
      (WebCore::RenderLineBoxList::removeLineBox):
      (WebCore::RenderLineBoxList::deleteLineBoxes):
      (WebCore::RenderLineBoxList::dirtyLineBoxes):
      (WebCore::RenderLineBoxList::paint):
      (WebCore::RenderLineBoxList::hitTest):
      (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
      (WebCore::RenderLineBoxList::checkConsistency):
      * rendering/RenderSVGInline.cpp:
      (WebCore::RenderSVGInline::absoluteRects):
      (WebCore::RenderSVGInline::absoluteQuads):
      * rendering/RenderSVGText.cpp:
      (WebCore::RenderSVGText::absoluteRects):
      (WebCore::RenderSVGText::absoluteQuads):
      (WebCore::RenderSVGText::objectBoundingBox):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::extractTextBox):
      (WebCore::RenderText::attachTextBox):
      (WebCore::RenderText::removeTextBox):
      (WebCore::RenderText::createInlineTextBox):
      (WebCore::RenderText::positionLineBox):
      * rendering/RootInlineBox.h:
      (WebCore::RootInlineBox::nextRootBox):
      (WebCore::RootInlineBox::prevRootBox):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9f47d581
  11. 15 Feb, 2010 1 commit
    • mitz@apple.com's avatar
      <rdar://problem/7647300> Incorrect client rects for blocks the span multiple... · f77bed42
      mitz@apple.com authored
      <rdar://problem/7647300> Incorrect client rects for blocks the span multiple columns and their descendants
      https://bugs.webkit.org/show_bug.cgi?id=34923
      
      Reviewed by Simon Fraser.
      
      WebCore: 
      
      Test: fast/multicol/client-rects.html
      
      In column layout, a different transform applies to different points in
      the block and its descendants, depending on their y coordinate within the
      block. offsetFromContainer() used to return the offset that applied to
      the origin. With this change, it returns the offset that applies to a
      given reference point. When mapping a quad from local to absolute
      coordinates, the top left of the quad’s bounding box is used as that
      reference point.
      
      * editing/SelectionController.cpp:
      (WebCore::SelectionController::layout): Pass the caret’s origin as the
      reference point to offsetFromContainer().
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::adjustForColumns): Adds the offset between the
      given point and its image under the column paint-time transform to the
      given offset. Used by offsetFromContainer() where it had previously used
      adjustRectForColumns(), which takes a rect and operates less efficiently.
      * rendering/RenderBlock.h:
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::mapLocalToContainer): Pass the transformed point as
      the reference point to offsetFromContainer().
      (WebCore::RenderBox::mapAbsoluteToLocalPoint): Pass a point to
      offsetFromContainer().
      (WebCore::RenderBox::offsetFromContainer): Use adjustForColumns() instead
      of adjustRectForColumns(), and use the reference point to get the right
      adjustment for the point of interest, instead of the origin, in case this
      box spans multiple columns.
      * rendering/RenderBox.h:
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::offsetFromContainer): Ditto. Actually apply the
      column offset to the computation, which previously this function didn’t
      do.
      (WebCore::RenderInline::mapLocalToContainer): Pass the transformed point
      as the reference point to offsetFromContainer().
      (WebCore::RenderInline::mapAbsoluteToLocalPoint): Pass a point to
      offsetFromContainer().
      * rendering/RenderInline.h:
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::mapLocalToContainer): Apply column adjustment,
      based on the reference point, to the transform if needed.
      (WebCore::RenderObject::localToContainerQuad): Initialize the
      TransformState with the top left corner of the quad’s bounding box. It
      is later used as the reference point when deciding on which column to
      base the calculations.
      (WebCore::RenderObject::offsetFromContainer): Adjust for columns.
      (WebCore::RenderObject::offsetFromAncestorContainer): Pass the origin
      as the reference point to offsetFromContainer().
      * rendering/RenderObject.h:
      (WebCore::RenderObject::adjustForColumns): Added.
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::offsetFromContainer): Pass the reference
      point through.
      * rendering/RenderTableCell.h:
      * rendering/RenderText.cpp:
      (WebCore::RenderText::absoluteRectsForRange): Map (the origin of) each
      rect to absolute coordinates individually.
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::convertToPaintingRect): Pass a point to
      offsetFromContainer().
      
      LayoutTests: 
      
      * fast/multicol/client-rects-expected.checksum: Added.
      * fast/multicol/client-rects-expected.png: Added.
      * fast/multicol/client-rects-expected.txt: Added.
      * fast/multicol/client-rects.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f77bed42
  12. 31 Jan, 2010 1 commit
  13. 05 Jan, 2010 1 commit
    • cfleizach@apple.com's avatar
      Add ARIA "Live Region" support · e7600b28
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=33117
      
      Reviewed by Darin Adler.
      
      WebCore: 
      
      Tests: platform/mac/accessibility/aria-liveregions-attributes.html
             platform/mac/accessibility/aria-liveregions-notifications.html
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::contentChanged):
      * accessibility/AXObjectCache.h:
      (WebCore::AXObjectCache::):
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::isChildOfARIALiveRegion):
      (WebCore::AccessibilityObject::supportsARIALiveRegion):
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityObject::contentChanged):
      (WebCore::AccessibilityObject::ariaLiveRegionStatus):
      (WebCore::AccessibilityObject::ariaLiveRegionRelevant):
      (WebCore::AccessibilityObject::ariaLiveRegionAtomic):
      (WebCore::AccessibilityObject::ariaLiveRegionBusy):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::elementAttributeValue):
      (WebCore::AccessibilityRenderObject::contentChanged):
      (WebCore::AccessibilityRenderObject::childrenChanged):
      (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
      (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
      (WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic):
      (WebCore::AccessibilityRenderObject::ariaLiveRegionBusy):
      * accessibility/AccessibilityRenderObject.h:
      (WebCore::AccessibilityRenderObject::areChildrenDirty):
      * accessibility/mac/AXObjectCacheMac.mm:
      (WebCore::AXObjectCache::postPlatformNotification):
      * accessibility/mac/AccessibilityObjectWrapper.h:
      * accessibility/mac/AccessibilityObjectWrapper.mm:
      (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
      (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
      (-[AccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:]):
      (-[AccessibilityObjectWrapper accessibilityPostedNotification:]):
      * dom/Element.cpp:
      (WebCore::Element::updateAfterAttributeChanged):
      * html/HTMLAttributeNames.in:
      * rendering/RenderText.cpp:
      (WebCore::RenderText::setText):
      
      WebKitTools: 
      
      * DumpRenderTree/AccessibilityUIElement.cpp:
      (indexOfChildCallback):
      (boolAttributeValueCallback):
      (stringAttributeValueCallback):
      (addNotificationListenerCallback):
      (AccessibilityUIElement::getJSClass):
      * DumpRenderTree/AccessibilityUIElement.h:
      * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
      (AccessibilityUIElement::indexOfChild):
      (AccessibilityUIElement::stringAttributeValue):
      (AccessibilityUIElement::boolAttributeValue):
      (AccessibilityUIElement::addNotificationListener):
      * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
      (AccessibilityUIElement::indexOfChild):
      (AccessibilityUIElement::stringAttributeValue):
      (AccessibilityUIElement::boolAttributeValue):
      (_accessibilityNotificationCallback):
      (AccessibilityUIElement::addNotificationListener):
      * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
      (AccessibilityUIElement::indexOfChild):
      (AccessibilityUIElement::stringAttributeValue):
      (AccessibilityUIElement::boolAttributeValue):
      (AccessibilityUIElement::addNotificationListener):
      
      LayoutTests: 
      
      * accessibility/aria-activedescendant-crash.html:
      * platform/mac/accessibility/aria-liveregions-attributes-expected.txt: Added.
      * platform/mac/accessibility/aria-liveregions-attributes.html: Added.
      * platform/mac/accessibility/aria-liveregions-notifications-expected.txt: Added.
      * platform/mac/accessibility/aria-liveregions-notifications.html: Added.
      * platform/mac/accessibility/aria-menu-role-descriptions.html:
      * platform/mac/accessibility/slider-supports-actions.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7600b28
  14. 24 Dec, 2009 1 commit
    • jberlin@webkit.org's avatar
      Fix for WebKit bug 29968 - Selecting text with text-overflow ellipsis · 17def147
      jberlin@webkit.org authored
              should not show cut off text
              https://bugs.webkit.org/show_bug.cgi?id=29968
              
              Reviewed by Dan Bernstein.
      
              Also fixes the issue on both Mac OS X and Windows where the highlight
              would extend only partway into the ellipsis based on the size of the
              characters being truncated.
      
              Test: editing/selection/select-text-overflow-ellipsis.html
      
              WebCore:
      
              * rendering/EllipsisBox.cpp:
              (WebCore::EllipsisBox::paint):
              When the ellipsis have been selected, paints them with the color for
              selected text.
              (WebCore::EllipsisBox::selectionRect):
              Returns the selection rect for the ellipsis text.
              (WebCore::EllipsisBox::paintSelection):
              Paints the selection highlight around the ellipsis text.
      
              * rendering/EllipsisBox.h:
              (WebCore::EllipsisBox::EllipsisBox):
              Default the selection state of the EllipsisBox to SelectionNone.
              (WebCore::EllipsisBox::setSelectionState):
              Allow the selection state to be explicitly set by the InlineTextBox
              that it is associated with, since the selection state depends on the
              position of the selection within the truncated text.
              (WebCore::EllipsisBox::selectionState):
              Return the cached selection state.
              
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::selectionState):
              If the text is truncated and the selection extends into the truncation
              where there are ellipsis, set the selection state on the EllipsisBox.
              (WebCore::paintTextWithShadows):
              Allow for an upper bound to be specified on the maximum length of the
              text to be painted.
              (WebCore::InlineTextBox::paint):
              Make sure the text that is drawn gets appropriately truncated. This was
              not an issue before on Mac OS X because it wasn't necessary to draw the
              selected text separately (the selected text had the same color as the
              non-selected text).
              (WebCore::InlineTextBox::paintSelection):
              If the text is being truncated, let whatever is being painted in the
              space after the truncated text paint its own highlight. 
              
              * rendering/InlineTextBox.h:
              (WebCore::InlineTextBox::truncation):
              Allow RenderText to access the truncation status.
              
              * rendering/RenderText.cpp:
              (WebCore::RenderText::selectionRectForRepaint):
              Make sure that any ellipsis box that falls within the selection also
              gets repainted.
              
              Places the expected results under the mac and win platforms separately
              because they are pixel test results and also the size of the
              RenderBlocks are showing up as slightly different between mac and win.
      
              LayoutTests:
      
              * editing/selection/select-text-overflow-ellipsis.html: Added.
              * platform/mac/editing/selection/select-text-overflow-ellipsis-expected.checksum: Added.
              * platform/mac/editing/selection/select-text-overflow-ellipsis-expected.png: Added.
              * platform/mac/editing/selection/select-text-overflow-ellipsis-expected.txt: Added.
              * platform/win/editing/selection/select-text-overflow-ellipsis-expected.checksum: Added.
              * platform/win/editing/selection/select-text-overflow-ellipsis-expected.png: Added.
              * platform/win/editing/selection/select-text-overflow-ellipsis-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17def147
  15. 23 Dec, 2009 1 commit
  16. 18 Dec, 2009 1 commit
  17. 30 Nov, 2009 1 commit
    • enrica@apple.com's avatar
      WebCore: Can focus but not type into content editable block that contains only... · 429c6e2b
      enrica@apple.com authored
      WebCore: Can focus but not type into content editable block that contains only non-editable content.
      <rdar://problem/5982901>
      https://bugs.webkit.org/show_bug.cgi?id=31750
              
      Reviewed by Darin Adler.
      
      The goal is to change the way we choose a visible position
      after hit detection, by preferring a visually equivalent editable
      position if available. By doing this, it is possible to add content
      to an editable block that initially contains only non editable elements.
      
      Test: editing/selection/mixed-editability-10.html
      
      * WebCore.base.exp: Changed to match the new signature of downstream
      and upstream in the Position class.
      * dom/Position.cpp:
      (WebCore::Position::atEditingBoundary): Added.
      (WebCore::Position::upstream): Modified to allow to cross the boundary
      between editable and non editable content if required.
      (WebCore::Position::downstream): Modified to allow to cross the boundary
      between editable and non editable content if required.
      (WebCore::Position::isCandidate): Modified to qualify as candidates positions
      that are at the editability boundary.
      (WebCore::Position::getInlineBoxAndOffset): Modified to retrieve the inline box
      to be used in calculating the caret rectangle.
      * dom/Position.h:
      (WebCore::Position::):
      * dom/PositionIterator.cpp:
      (WebCore::PositionIterator::atEditingBoundary): Added.
      (WebCore::PositionIterator::isCandidate): Modified to qualify as candidates positions
      that are at the editability boundary.
      * dom/PositionIterator.h:
      * editing/htmlediting.cpp:
      (WebCore::firstEditablePositionAfterPositionInRoot): Modified to accept not only
      descendants of the editable container, but the container itself.
      (WebCore::lastEditablePositionBeforePositionInRoot): Modified to accept not only
      descendants of the editable container, but the container itself.
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::createVisiblePosition): Added logic to prefer an editable position,
      if available.
      * rendering/RenderText.cpp:
      (WebCore::RenderText::isAllCollapsibleWhitespace): Added.
      * rendering/RenderText.h:
      
      LayoutTests: Can focus but not type into content editable block that contains only non-editable content.
      <rdar://problem/5982901>
      https://bugs.webkit.org/show_bug.cgi?id=31750
      
      Reviewed by Darin Adler.
      
      * editing/selection/5825350-1-expected.txt:
      * editing/selection/5825350-1.html: Modified to use caret rectangle.
      * editing/selection/5825350-2-expected.txt:
      * editing/selection/5825350-2.html: Modified to use caret rectangle.
      * editing/selection/mixed-editability-10-expected.txt: Added.
      * editing/selection/mixed-editability-10.html: Added.
      * platform/mac/editing/deleting/5390681-2-expected.txt: Re-baselined
      to account for the new possible caret position.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      429c6e2b
  18. 02 Nov, 2009 1 commit
  19. 18 Aug, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=20329, shadows and reflections incorrectly · 5dc5a312
      hyatt@apple.com authored
      considered part of scrollable overflow.
      
      Reviewed by Dan Bernstein.
      
      This patch takes the engine's concept of overflow and splits it into two types:
      layout overflow and visual overflow.
              
      Layout overflow is about other boxes that spill out of an enclosing box,  For example,
      in the inline flow case a tall image could spill out of a line box. Examples of 
      visual overflow are shadows, text stroke (and eventually outline and
      border-image).
      
      Three objects tracked overflow before this patch: RenderBlock had 
      m_overflowLeft/Top/Width/Height variables.  RootInlineBox had an Overflow*
      that also had four overflow values.  Finally RenderReplaced elements tracked shadow/reflection
      overflow using a map that cached four values.
              
      This patch takes all of these different overflow models and unifies them into a single
      new class called RenderOverflow.   This class is now a member variable in RenderBox and
      InlineFlowBoxes.  It is only allocated if overflow actually exists.  Instead of tracking
      four values, it tracks eight: left/top/right/bottom for layout overflow and 
      left/top/right/bottom for visual overflow.
              
      Overflow computation is now done after layout is finished rather than during layout
      (when child objects can be churning and moving around).  A number of layout tests progressed
      by deferring overflow computation to a separate pass.
              
      All inline flow boxes now track overflow (and not just the root line box).  This allows
      repainting of line boxes to actually be tight and bail early if the overflow rect of a box
      doesn't intersect.  The old code always visited all object on a line if the root line box
      intersected at all.
              
      Line box overflow no longer propagates across self-painting layers.  This fixes a number of
      issues with incorrect scrollbars appearing when relative positioned inlines were used in a page.
              
      Layer bounds have been modified to exclude visual overflow.  The width/height members only really
      have one reason for continued existence, and that is that they happen to be used in repaint()
      when an overflow clip object's height isn't accurate.  In this case, the bounds should exclude
      visual overflow anyway, so this change tightens that repaint up.
              
      Root lines have renamed m_selectionTop/Bottom to m_lineTop/Bottom and positionForPoint methods have
      been changed to use these instead of relying on overflow (which was totally wrong).
      
      Significant changes have been made to the "almost strict mode" line box quirk where objects with no
      text children have no effect on the height of a line.  Instead of making the height() of the objects
      variable and dependent on overflow, the objects now have their full height and get placed on
      the baseline properly.  They simply don't contribute to overflow above lineTop/Bottom.
              
      Reflections are no longer considered overflow of any kind.  Because reflections have their own layers,
      it is not necessary to treat them as visual or layout overflow in the RenderObject tree.  The end result
      of not incorporating them into RenderOverflow is that they have no effect on scrolling.  transparencyClipBox
      has been extended to support fully reflecting the entire clip box when a reflection exists.  This fixes
      numerous repaint bugs in transparent objects with reflections when the transparent objects had self-painting
      sublayers.
      
      * WebCore.xcodeproj/project.pbxproj:
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::getUpperLeftCorner):
      * editing/visible_units.cpp:
      (WebCore::previousLinePosition):
      (WebCore::nextLinePosition):
      * page/FrameView.cpp:
      (WebCore::FrameView::adjustViewSize):
      (WebCore::FrameView::adjustPageHeight):
      * rendering/InlineBox.cpp:
      (WebCore::InlineBox::height):
      * rendering/InlineBox.h:
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::adjustPosition):
      (WebCore::InlineFlowBox::placeBoxesHorizontally):
      (WebCore::InlineFlowBox::placeBoxesVertically):
      (WebCore::InlineFlowBox::computeVerticalOverflow):
      (WebCore::InlineFlowBox::nodeAtPoint):
      (WebCore::InlineFlowBox::paint):
      * rendering/InlineFlowBox.h:
      (WebCore::InlineFlowBox::InlineFlowBox):
      (WebCore::InlineFlowBox::topCombinedOverflow):
      (WebCore::InlineFlowBox::bottomCombinedOverflow):
      (WebCore::InlineFlowBox::leftCombinedOverflow):
      (WebCore::InlineFlowBox::rightCombinedOverflow):
      (WebCore::InlineFlowBox::combinedOverflowRect):
      (WebCore::InlineFlowBox::topLayoutOverflow):
      (WebCore::InlineFlowBox::bottomLayoutOverflow):
      (WebCore::InlineFlowBox::leftLayoutOverflow):
      (WebCore::InlineFlowBox::rightLayoutOverflow):
      (WebCore::InlineFlowBox::layoutOverflowRect):
      (WebCore::InlineFlowBox::topVisualOverflow):
      (WebCore::InlineFlowBox::bottomVisualOverflow):
      (WebCore::InlineFlowBox::leftVisualOverflow):
      (WebCore::InlineFlowBox::rightVisualOverflow):
      (WebCore::InlineFlowBox::visualOverflowRect):
      (WebCore::InlineFlowBox::setHorizontalOverflowPositions):
      (WebCore::InlineFlowBox::setVerticalOverflowPositions):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paint):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::RenderBlock):
      (WebCore::RenderBlock::layout):
      (WebCore::RenderBlock::layoutBlock):
      (WebCore::RenderBlock::addOverflowFromBlockChildren):
      (WebCore::RenderBlock::handleBottomOfBlock):
      (WebCore::RenderBlock::layoutBlockChildren):
      (WebCore::RenderBlock::paint):
      (WebCore::RenderBlock::fillInlineSelectionGaps):
      (WebCore::RenderBlock::floatRect):
      (WebCore::RenderBlock::lowestPosition):
      (WebCore::RenderBlock::rightmostPosition):
      (WebCore::RenderBlock::leftmostPosition):
      (WebCore::RenderBlock::addOverhangingFloats):
      (WebCore::RenderBlock::nodeAtPoint):
      (WebCore::RenderBlock::positionForPointWithInlineChildren):
      (WebCore::RenderBlock::layoutColumns):
      (WebCore::getHeightForLineCount):
      * rendering/RenderBlock.h:
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::computeHorizontalPositionsForLine):
      (WebCore::RenderBlock::computeVerticalPositionsForLine):
      (WebCore::RenderBlock::layoutInlineChildren):
      (WebCore::RenderBlock::matchedEndLine):
      (WebCore::RenderBlock::addOverflowFromInlineChildren):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::destroy):
      (WebCore::RenderBox::clippedOverflowRectForRepaint):
      (WebCore::RenderBox::localCaretRect):
      (WebCore::RenderBox::addShadowAndReflectionOverflow):
      (WebCore::RenderBox::addOverflowFromChild):
      (WebCore::RenderBox::addLayoutOverflow):
      (WebCore::RenderBox::addVisualOverflow):
      (WebCore::RenderBox::clearLayoutOverflow):
      * rendering/RenderBox.h:
      (WebCore::RenderBox::combinedOverflowRect):
      (WebCore::RenderBox::topCombinedOverflow):
      (WebCore::RenderBox::bottomCombinedOverflow):
      (WebCore::RenderBox::leftCombinedOverflow):
      (WebCore::RenderBox::rightCombinedOverflow):
      (WebCore::RenderBox::layoutOverflowRect):
      (WebCore::RenderBox::topLayoutOverflow):
      (WebCore::RenderBox::bottomLayoutOverflow):
      (WebCore::RenderBox::leftLayoutOverflow):
      (WebCore::RenderBox::rightLayoutOverflow):
      (WebCore::RenderBox::visualOverflowRect):
      (WebCore::RenderBox::topVisualOverflow):
      (WebCore::RenderBox::bottomVisualOverflow):
      (WebCore::RenderBox::leftVisualOverflow):
      (WebCore::RenderBox::rightVisualOverflow):
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::layoutBlock):
      (WebCore::RenderFlexibleBox::layoutHorizontalBox):
      (WebCore::RenderFlexibleBox::layoutVerticalBox):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::updateLayerPosition):
      (WebCore::RenderLayer::localBoundingBox):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateRootLayerPosition):
      (WebCore::RenderLayerCompositor::ensureRootPlatformLayer):
      * rendering/RenderLineBoxList.cpp:
      (WebCore::RenderLineBoxList::paint):
      (WebCore::RenderLineBoxList::hitTest):
      * rendering/RenderListItem.cpp:
      (WebCore::RenderListItem::positionListMarker):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::RenderObject):
      * rendering/RenderObject.h:
      * rendering/RenderOverflow.h: Added.
      (WebCore::RenderOverflow::RenderOverflow):
      (WebCore::RenderOverflow::topLayoutOverflow):
      (WebCore::RenderOverflow::bottomLayoutOverflow):
      (WebCore::RenderOverflow::leftLayoutOverflow):
      (WebCore::RenderOverflow::rightLayoutOverflow):
      (WebCore::RenderOverflow::topVisualOverflow):
      (WebCore::RenderOverflow::bottomVisualOverflow):
      (WebCore::RenderOverflow::leftVisualOverflow):
      (WebCore::RenderOverflow::rightVisualOverflow):
      (WebCore::RenderOverflow::setTopLayoutOverflow):
      (WebCore::RenderOverflow::setBottomLayoutOverflow):
      (WebCore::RenderOverflow::setLeftLayoutOverflow):
      (WebCore::RenderOverflow::setRightLayoutOverflow):
      (WebCore::RenderOverflow::setTopVisualOverflow):
      (WebCore::RenderOverflow::setBottomVisualOverflow):
      (WebCore::RenderOverflow::setLeftVisualOverflow):
      (WebCore::RenderOverflow::setRightVisualOverflow):
      (WebCore::RenderOverflow::layoutOverflowRect):
      (WebCore::RenderOverflow::visualOverflowRect):
      (WebCore::RenderOverflow::combinedOverflowRect):
      (WebCore::RenderOverflow::move):
      (WebCore::RenderOverflow::addLayoutOverflow):
      (WebCore::RenderOverflow::addVisualOverflow):
      (WebCore::RenderOverflow::resetLayoutOverflow):
      * rendering/RenderPartObject.cpp:
      (WebCore::RenderPartObject::layout):
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::~RenderReplaced):
      (WebCore::RenderReplaced::layout):
      (WebCore::RenderReplaced::shouldPaint):
      (WebCore::RenderReplaced::positionForPoint):
      (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
      * rendering/RenderReplaced.h:
      * rendering/RenderScrollbarPart.cpp:
      (WebCore::RenderScrollbarPart::layout):
      (WebCore::RenderScrollbarPart::paintIntoRect):
      * rendering/RenderSlider.cpp:
      (WebCore::RenderSlider::layout):
      * rendering/RenderTable.cpp:
      (WebCore::RenderTable::layout):
      (WebCore::RenderTable::paint):
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::layoutRows):
      * rendering/RenderTableSection.h:
      * rendering/RenderText.cpp:
      (WebCore::RenderText::positionForPoint):
      (WebCore::RenderText::localCaretRect):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::layout):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::addHighlightOverflow):
      (WebCore::RootInlineBox::adjustPosition):
      (WebCore::RootInlineBox::verticallyAlignBoxes):
      (WebCore::RootInlineBox::selectionTop):
      * rendering/RootInlineBox.h:
      (WebCore::RootInlineBox::RootInlineBox):
      (WebCore::RootInlineBox::nextRootBox):
      (WebCore::RootInlineBox::prevRootBox):
      (WebCore::RootInlineBox::lineTop):
      (WebCore::RootInlineBox::lineBottom):
      (WebCore::RootInlineBox::selectionBottom):
      (WebCore::RootInlineBox::selectionHeight):
      (WebCore::RootInlineBox::floats):
      (WebCore::RootInlineBox::floatsPtr):
      (WebCore::RootInlineBox::setLineTopBottomPositions):
      * rendering/SVGRootInlineBox.cpp:
      (WebCore::SVGRootInlineBox::layoutInlineBoxes):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=20329, shadows and reflections incorrectly being included
      as part of scrollable overflow.
              
      Reviewed by Dan Bernstein.
      
      Update layout tests to account for all of the changes made to overflow to split it into two types.  Remove the layout
      tests that were recently added that assumed that shadows and reflections should be part of scrollable overflow.
      
      * fast/box-shadow/box-shadow-overflow-scroll-expected.txt: Removed.
      * fast/box-shadow/box-shadow-overflow-scroll.html: Removed.
      * fast/reflections/reflection-overflow-scroll-expected.txt: Removed.
      * fast/reflections/reflection-overflow-scroll.html: Removed.
      * platform/mac/compositing/overflow/ancestor-overflow-expected.txt:
      * platform/mac/compositing/reflections/reflection-on-composited-expected.txt:
      * platform/mac/editing/deleting/delete-br-011-expected.txt:
      * platform/mac/editing/deleting/delete-br-012-expected.txt:
      * platform/mac/editing/pasteboard/select-element-1-expected.txt:
      * platform/mac/fast/block/positioning/relative-overflow-block-expected.txt:
      * platform/mac/fast/body-propagation/background-color/002-expected.txt:
      * platform/mac/fast/body-propagation/background-color/002-xhtml-expected.txt:
      * platform/mac/fast/body-propagation/background-image/002-expected.txt:
      * platform/mac/fast/body-propagation/background-image/002-xhtml-expected.txt:
      * platform/mac/fast/body-propagation/overflow/001-expected.txt:
      * platform/mac/fast/body-propagation/overflow/001-xhtml-expected.txt:
      * platform/mac/fast/body-propagation/overflow/005-declarative-expected.txt:
      * platform/mac/fast/body-propagation/overflow/005-expected.txt:
      * platform/mac/fast/body-propagation/overflow/005-xhtml-expected.txt:
      * platform/mac/fast/borders/fieldsetBorderRadius-expected.txt:
      * platform/mac/fast/box-shadow/transform-fringing-expected.txt:
      * platform/mac/fast/clip/008-expected.txt:
      * platform/mac/fast/clip/011-expected.txt:
      * platform/mac/fast/clip/012-expected.txt:
      * platform/mac/fast/dynamic/genContentDestroyChildren-expected.txt:
      * platform/mac/fast/dynamic/window-resize-scrollbars-test-expected.txt:
      * platform/mac/fast/encoding/utf-16-big-endian-expected.txt:
      * platform/mac/fast/encoding/utf-16-little-endian-expected.txt:
      * platform/mac/fast/forms/form-element-geometry-expected.txt:
      * platform/mac/fast/images/image-in-map-expected.txt:
      * platform/mac/fast/inline-block/003-expected.txt:
      * platform/mac/fast/inline/inline-text-quirk-bpm-expected.txt:
      * platform/mac/fast/invalid/012-expected.txt:
      * platform/mac/fast/layers/normal-flow-hit-test-expected.txt:
      * platform/mac/fast/lists/inlineBoxWrapperNullCheck-expected.txt:
      * platform/mac/fast/overflow/scrollRevealButton-expected.txt:
      * platform/mac/fast/reflections/reflection-direction-expected.txt:
      * platform/mac/fast/reflections/reflection-masks-expected.checksum:
      * platform/mac/fast/reflections/reflection-masks-expected.png:
      * platform/mac/fast/reflections/reflection-masks-expected.txt:
      * platform/mac/fast/reflections/reflection-masks-opacity-expected.checksum:
      * platform/mac/fast/reflections/reflection-masks-opacity-expected.png:
      * platform/mac/fast/reflections/reflection-masks-opacity-expected.txt:
      * platform/mac/fast/reflections/reflection-nesting-expected.txt:
      * platform/mac/fast/reflections/reflection-overflow-hidden-expected.png:
      * platform/mac/fast/reflections/reflection-overflow-hidden-expected.txt:
      * platform/mac/fast/repaint/box-shadow-h-expected.txt:
      * platform/mac/fast/repaint/box-shadow-v-expected.txt:
      * platform/mac/fast/repaint/reflection-redraw-expected.txt:
      * platform/mac/fast/repaint/reflection-repaint-test-expected.txt:
      * platform/mac/fast/repaint/transform-absolute-in-positioned-container-expected.txt:
      * platform/mac/fast/repaint/transform-replaced-shadows-expected.txt:
      * platform/mac/fast/replaced/border-radius-clip-expected.txt:
      * platform/mac/fast/transforms/shadows-expected.txt:
      * platform/mac/fast/transforms/transforms-with-opacity-expected.txt:
      * platform/mac/media/video-layer-crash-expected.txt:
      * platform/mac/tables/mozilla/bugs/adforce_imgis_com-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug10565-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug10633-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug113424-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug1188-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug131020-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug1318-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug22513-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug26553-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug3309-1-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug4427-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug4527-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug5538-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug78162-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug8381-expected.txt:
      * platform/mac/tables/mozilla/bugs/bug86708-expected.txt:
      * platform/mac/tables/mozilla/core/bloomberg-expected.txt:
      * platform/mac/tables/mozilla/other/ms-expected.txt:
      * platform/mac/tables/mozilla_expected_failures/bugs/bug23847-expected.txt:
      * platform/mac/tables/mozilla_expected_failures/bugs/bug72393-expected.txt:
      * platform/mac/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
      * platform/mac/tables/mozilla_expected_failures/marvin/backgr_border-table-quirks-expected.txt:
      * platform/mac/tables/mozilla_expected_failures/marvin/table_overflow_caption_bottom-expected.txt:
      * platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.txt:
      * platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.txt:
      * platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.txt:
      * platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.txt:
      * platform/mac/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.txt:
      * platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dc5a312
  20. 15 Aug, 2009 1 commit
    • darin@apple.com's avatar
      Make DOM classes start with a reference count of 1, like all other RefCounted · 7e131b6d
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28068
      
      Patch by Darin Adler <darin@apple.com> on 2009-08-14
      Reviewed by Sam Weinig.
      
      First half, everything except for element classes.
      
      * GNUmakefile.am: Removed DocPtr.h.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      
      * dom/Attr.cpp:
      (WebCore::Attr::Attr): Added a call to createTextChild here so callers don't
      have to call it explicitly.
      (WebCore::Attr::create): Added.
      (WebCore::Attr::setValue): Changed to take AtomicString.
      (WebCore::Attr::cloneNode): Use create.
      
      * dom/Attr.h: Added a create function. Made the constructor private,
      and a lot of other functions private as well.
      
      * dom/Attribute.cpp:
      (WebCore::Attribute::createAttrIfNeeded): Use Attr::create.
      
      * dom/CDATASection.cpp:
      (WebCore::CDATASection::create): Added.
      (WebCore::CDATASection::cloneNode): Use create.
      (WebCore::CDATASection::virtualCreate): Ditto.
      
      * dom/CDATASection.h: Added a create function. Made everything private.
      Removed unneeded destructor declaration.
      
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::CharacterData): Replaced the multiple constructors
      with a single one that takes ConstructionType.
      
      * dom/CharacterData.h: Made more functions be protected and private.
      Made m_data be private.
      
      * dom/Comment.cpp:
      (WebCore::Comment::Comment): Got rid of an extra constructor.
      (WebCore::Comment::create): Added.
      (WebCore::Comment::cloneNode): Call create.
      
      * dom/Comment.h: Added a create function. Made everything private.
      
      * dom/ContainerNode.cpp:
      (WebCore::dispatchChildInsertionEvents): Use RefPtr instead of DocPtr.
      (WebCore::dispatchChildRemovalEvents): Ditto.
      
      * dom/ContainerNode.h: Made the constructor protected and passed
      ConstructionType instead of an isElement boolean.
      
      * dom/DocPtr.h: Removed.
      
      * dom/Document.cpp:
      (WebCore::Document::Document): Simplified the code that sets m_document
      since it's no longer a smart pointer.
      (WebCore::Document::removedLastRef): Use explicit calls to selfOnlyRef
      and selfOnlyDeref instead of a DocPtr in here.
      (WebCore::Document::~Document): Simplified the code that sets m_document
      since it's no longer a smart pointer.
      (WebCore::Document::createDocumentFragment): Call create.
      (WebCore::Document::createTextNode): Ditto.
      (WebCore::Document::createComment): Ditto.
      (WebCore::Document::createCDATASection): Ditto.
      (WebCore::Document::createProcessingInstruction): Ditto.
      (WebCore::Document::createEntityReference): Ditto.
      (WebCore::Document::createEditingTextNode): Ditto.
      (WebCore::Document::importNode): Call Attr::create.
      (WebCore::Document::createAttributeNS): Ditto.
      
      * dom/Document.h: Call adoptRef. Made a lot of functions private and
      protected and sorted them so public functions come first.
      
      * dom/DocumentFragment.cpp:
      (WebCore::DocumentFragment::create): Added.
      (WebCore::DocumentFragment::cloneNode): Call create.
      * dom/DocumentFragment.h: Added create.
      
      * dom/DocumentType.cpp:
      (WebCore::DocumentType::DocumentType): Pass type to Node constructor.
      (WebCore::DocumentType::cloneNode): Use create.
      * dom/DocumentType.h:
      (WebCore::DocumentType::create): Call adoptRef.
      
      * dom/EditingText.cpp:
      (WebCore::EditingText::create): Added.
      * dom/EditingText.h: Added a create function. Made everything private.
      
      * dom/Element.cpp:
      (WebCore::Element::Element): Pass CreateElementZeroRefCount to preserve
      the zero reference count behavior for classes derived from Element.
      
      * dom/EntityReference.cpp:
      (WebCore::EntityReference::create): Added.
      (WebCore::EntityReference::cloneNode): Call create.
      * dom/EntityReference.h: Added create. Made everything private.
      
      * dom/Node.cpp:
      (WebCore::Node::initialRefCount): Added. Inline helper function for
      the constructor.
      (WebCore::Node::isContainer): Ditto.
      (WebCore::Node::isElement): Ditto.
      (WebCore::Node::isText): Ditto.
      (WebCore::Node::Node): Changed to take a construction type argument.
      Since m_document is now a normal pointer, added a call to selfOnlyRef.
      (WebCore::Node::~Node): Ditto, but selfOnlyDeref.
      (WebCore::Node::setDocument): Added selfOnlyRef/Deref calls.
      (WebCore::Node::appendTextContent): Use the data function instead of
      calling nodeValue functions, which do the same thing in a roundabout way.
      
      * dom/Node.h: Made the constructor protected and replaced the multiple
      arguments iwth a single ConstructionType argument. Sorted the public
      things first.
      
      * dom/Notation.h: Made most things private.
      * dom/Notation.cpp: Removed extra constructor.
      
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::create): Added.
      (WebCore::ProcessingInstruction::cloneNode): Call create.
      * dom/ProcessingInstruction.h: Added create function. Made many other
      members private.
      
      * dom/Range.cpp:
      (WebCore::Range::processContents): Use DocumentFragment::create.
      
      * dom/Text.cpp:
      (WebCore::Text::Text): Updated for base class change.
      (WebCore::Text::create): Added.
      (WebCore::Text::splitText): Changed to not require access to m_data.
      (WebCore::Text::cloneNode): Call create.
      (WebCore::Text::createRenderer): Call dataImpl.
      (WebCore::Text::attach): Call data.
      (WebCore::Text::recalcStyle): Call dataImpl.
      (WebCore::Text::virtualCreate): Call create.
      (WebCore::Text::createWithLengthLimit): Call create.
      (WebCore::Text::formatForDebugger): Call data.
      
      * dom/Text.h: Added a create function. Made many other members private.
      Renamed createNew to virtualCreate.
      
      * dom/XMLTokenizer.cpp:
      (WebCore::XMLTokenizer::enterText): Call Text::create.
      
      * dom/XMLTokenizerLibxml2.cpp:
      (WebCore::XMLTokenizer::cdataBlock): Call CDATASection::create.
      (WebCore::XMLTokenizer::comment): Call Comment::create.
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::deleteInsignificantText):
      Call data instead of string.
      
      * editing/CreateLinkCommand.cpp:
      (WebCore::CreateLinkCommand::doApply): Call Text::create.
      
      * editing/EditorCommand.cpp:
      (WebCore::executeInsertNode): Call DocumentFragment::create.
      
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doApply): Call Text::create.
      
      * editing/markup.cpp:
      (WebCore::appendStartMarkup): Call data instead of nodeValue.
      
      * html/HTMLDocument.h:
      (WebCore::HTMLDocument::create): Call adoptRef.
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::createContextualFragment): Call DocumentFragment::create.
      (WebCore::replaceChildrenWithFragment): Call data instead of string.
      (WebCore::replaceChildrenWithText): Call Text::create.
      (WebCore::HTMLElement::setInnerText): Call DocumentFragment::create and
      Text::create.
      (WebCore::HTMLElement::setOuterText): Call Text::create.
      
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::HTMLKeygenElement): Call Text::create.
      
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::setText): Call Text::create.
      
      * html/HTMLParser.cpp:
      (WebCore::HTMLParser::textCreateErrorCheck): Call Text::create.
      (WebCore::HTMLParser::commentCreateErrorCheck): Call Comment::create.
      (WebCore::HTMLParser::handleIsindex): Call Text::create.
      
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addText): Call Text::create.
      
      * html/HTMLViewSourceDocument.h:
      (WebCore::HTMLViewSourceDocument::create): Call adoptRef.
      
      * loader/FTPDirectoryDocument.cpp:
      (WebCore::FTPDirectoryTokenizer::appendEntry): Call Text::create.
      (WebCore::FTPDirectoryTokenizer::createTDForFilename): Call Text::create.
      
      * loader/FTPDirectoryDocument.h:
      (WebCore::FTPDirectoryDocument::create): Call adoptRef.
      * loader/ImageDocument.h:
      (WebCore::ImageDocument::create): Ditto.
      * loader/MediaDocument.h:
      (WebCore::MediaDocument::create): Ditto.
      * loader/PlaceholderDocument.h:
      (WebCore::PlaceholderDocument::create): Ditto.
      * loader/PluginDocument.h:
      (WebCore::PluginDocument::create): Ditto.
      * loader/TextDocument.h:
      (WebCore::TextDocument::create): Ditto.
      
      * loader/loader.cpp:
      (WebCore::Loader::Host::didFinishLoading): Use RefPtr instead of DocPtr.
      (WebCore::Loader::Host::didFail): Ditto.
      
      * platform/TreeShared.h:
      (WebCore::TreeShared::TreeShared): Added an initialRefCount argument,
      defaulting to 1. Node still sometimes initializes it to 0 instead for now.
      
      * rendering/RenderText.cpp:
      (WebCore::RenderText::originalText): Use dataImpl instead of string.
      
      * rendering/RenderTextFragment.cpp:
      (WebCore::RenderTextFragment::originalText): Use dataImpl instead of string.
      (WebCore::RenderTextFragment::previousCharacter): Ditto.
      
      * svg/SVGDocument.h:
      (WebCore::SVGDocument::create): Use adoptRef.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::SVGElementInstance): Updated to take a
      PassRefPtr.
      
      * svg/SVGElementInstance.h: Made everything private.
      
      * wml/WMLDocument.h:
      (WebCore::WMLDocument::create): Called adoptRef.
      
      * xml/XPathNamespace.cpp:
      (WebCore::XPathNamespace::XPathNamespace): Take AtomicString arguments.
      * xml/XPathNamespace.h: Made everything private.
      
      * xml/XSLTProcessor.cpp:
      (WebCore::createFragmentFromSource): Use DocumentFragment::create and
      Text::create.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e131b6d
  21. 06 May, 2009 1 commit
  22. 28 Apr, 2009 2 commits
    • timothy@apple.com's avatar
      Remove the topLevel boolean argument from absolute{Rects,Quads}. · 527e7327
      timothy@apple.com authored
              This argument was default to true and no one ever passed false.
      
              Reviewed by Sam Weinig.
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::absoluteRects):
              (WebCore::RenderBlock::absoluteQuads):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::absoluteRects):
              (WebCore::RenderBox::absoluteQuads):
              * rendering/RenderBox.h:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::absoluteRects):
              (WebCore::RenderInline::absoluteQuads):
              * rendering/RenderInline.h:
              * rendering/RenderObject.h:
              (WebCore::RenderObject::absoluteRects):
              (WebCore::RenderObject::absoluteQuads):
              * rendering/RenderSVGHiddenContainer.cpp:
              (WebCore::RenderSVGHiddenContainer::absoluteRects):
              (WebCore::RenderSVGHiddenContainer::absoluteQuads):
              * rendering/RenderSVGHiddenContainer.h:
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::absoluteRects):
              (WebCore::RenderSVGImage::absoluteQuads):
              * rendering/RenderSVGImage.h:
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::absoluteRects):
              (WebCore::RenderSVGInlineText::absoluteQuads):
              * rendering/RenderSVGInlineText.h:
              * rendering/RenderSVGModelObject.cpp:
              (WebCore::RenderSVGModelObject::absoluteRects):
              (WebCore::RenderSVGModelObject::absoluteQuads):
              * rendering/RenderSVGModelObject.h:
              * rendering/RenderSVGTSpan.cpp:
              (WebCore::RenderSVGTSpan::absoluteRects):
              (WebCore::RenderSVGTSpan::absoluteQuads):
              * rendering/RenderSVGTSpan.h:
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::absoluteRects):
              (WebCore::RenderSVGText::absoluteQuads):
              * rendering/RenderSVGText.h:
              * rendering/RenderSVGTextPath.cpp:
              (WebCore::RenderSVGTextPath::absoluteQuads):
              * rendering/RenderSVGTextPath.h:
              * rendering/RenderText.cpp:
              (WebCore::RenderText::absoluteRects):
              * rendering/RenderText.h:
              * rendering/RenderView.cpp:
              (WebCore::RenderView::absoluteRects):
              (WebCore::RenderView::absoluteQuads):
              * rendering/RenderView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      527e7327
    • darin@apple.com's avatar
      2009-04-28 Darin Adler <darin@apple.com> · cc2fff61
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::RenderText): Streamline code path to avoid a bit of reference count
              churn and remove a strange unneeeded PassRefPtr typecast. Also added a comment.
              (WebCore::RenderText::setTextInternal): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc2fff61
  23. 24 Apr, 2009 1 commit
    • hyatt@apple.com's avatar
      2009-04-24 David Hyatt <hyatt@apple.com> · 09e05653
      hyatt@apple.com authored
              Reviewed by Simon Fraser, Dan Bernstein.
      
              Speed up the PLT by devirtualizing the height() function on InlineBox.  virtualizing it in order to make the height() computation dynamic caused
              a ~0.5% slowdown.  This patch does the following to get the speed back:
              
              (a) Devirtualizes isText and forces inline box creators to set the bit as needed.  This actually resulted in simplified code, since ListMarkerBox could
              then be removed.
              (b) Reduces the height() call count.  In some cases the code was repeatedly calling height(), which used to be fine when the function was just an inline
              member variable access.  The call sites have been patched to cut down on extra height() calls now that it is more expensive.
              (c) Devirtualize height() except on SVG boxes.  For all non-SVG, the height() function on InlineBox handles the computation.  For SVG boxes, a new bit has
              been set on InlineBoxes (isSVG()) that indicates that the virtual svgBoxHeight() function should be called to retrieve the height instead.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * rendering/InlineBox.cpp:
              (WebCore::InlineBox::height):
              * rendering/InlineBox.h:
              (WebCore::InlineBox::InlineBox):
              (WebCore::InlineBox::isSVG):
              (WebCore::InlineBox::setIsSVG):
              (WebCore::InlineBox::isText):
              (WebCore::InlineBox::setIsText):
              (WebCore::InlineBox::svgBoxHeight):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesVertically):
              (WebCore::InlineFlowBox::paintBoxDecorations):
              (WebCore::InlineFlowBox::paintMask):
              * rendering/InlineFlowBox.h:
              * rendering/InlineTextBox.cpp:
              * rendering/InlineTextBox.h:
              * rendering/ListMarkerBox.cpp: Removed.
              * rendering/ListMarkerBox.h: Removed.
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::createInlineBox):
              * rendering/RenderSVGInline.cpp:
              (WebCore::RenderSVGInline::createFlowBox):
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::createTextBox):
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::createRootBox):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::createInlineTextBox):
              * rendering/RootInlineBox.cpp:
              * rendering/RootInlineBox.h:
              * rendering/SVGInlineFlowBox.h:
              (WebCore::SVGInlineFlowBox::svgBoxHeight):
              * rendering/SVGInlineTextBox.h:
              (WebCore::SVGInlineTextBox::svgBoxHeight):
              * rendering/SVGRootInlineBox.h:
              (WebCore::SVGRootInlineBox::svgBoxHeight):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09e05653
  24. 23 Apr, 2009 1 commit
    • eric@webkit.org's avatar
      Reviewed by Simon Fraser. · 70a812d4
      eric@webkit.org authored
              SVGRenderTreeAsText cleanup/code sharing.
      
              No test changes, only code cleanup.
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::firstRunOrigin):
              * rendering/RenderText.h:
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::writeStandardPrefix):
              (WebCore::writeChildren):
              (WebCore::write):
              (WebCore::writeRenderResources):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      70a812d4
  25. 20 Apr, 2009 2 commits
  26. 17 Apr, 2009 2 commits
    • justin.garcia@apple.com's avatar
      Forgot to uncomment some code before checking in. · 9ee6892f
      justin.garcia@apple.com authored
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ee6892f
    • justin.garcia@apple.com's avatar
      WebCore: · dc139c46
      justin.garcia@apple.com authored
      2009-04-17  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Dan Bernstein.
      
              https://bugs.webkit.org/show_bug.cgi?id=25277
              If there is no line wrapping, a caret can leave its containing block but it shouldn't leave its root line box
              
              Also added code to handle a caret wider than one pixel.
              
              Added fast/inline/25277.html and fast/inline/25277-2.html
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::localCaretRect): Distribute a caret's width to either side of the offset,
              so that a caret between two characters doesn't hang over one character more than the other.
              If there is no wrapping, the caret can leave its containing block, but not its root line box.
      
      LayoutTests:
      
      2009-04-17  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Dan Bernstein.
              
              https://bugs.webkit.org/show_bug.cgi?id=25277
              If there is no line wrapping, a caret can leave its containing block but it shouldn't leave its root line box
      
              * fast/inline/25277-2.html: Added.
              * fast/inline/25277.html: Added.
              * platform/mac/fast/inline/25277-2-expected.checksum: Added.
              * platform/mac/fast/inline/25277-2-expected.png: Added.
              * platform/mac/fast/inline/25277-2-expected.txt: Added.
              * platform/mac/fast/inline/25277-expected.checksum: Added.
              * platform/mac/fast/inline/25277-expected.png: Added.
              * platform/mac/fast/inline/25277-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc139c46
  27. 09 Apr, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · aa6ce3d8
      mitz@apple.com authored
      2009-04-09  Dan Bernstein  <mitz@apple.com>
      
              Reviewed by Dave Hyatt.
      
              - fix <rdar://problem/6166612> Text boxes' metrics should be based on
                the actual fonts used in them, not just the primary font
      
              Covered by many existing layout tests
      
              * platform/graphics/Font.cpp:
              (WebCore::Font::floatWidth): Added a fallbackFonts parameter. If the
              platform supports collecting fallback fonts in its complex font path
              and fallbackFonts is not null, all fallback fonts used for the text run
              will be added to it.
      
              * platform/graphics/Font.h:
              (WebCore::Font::width): Ditto.
      
              * platform/graphics/FontFastPath.cpp:
              (WebCore::Font::glyphDataForCharacter): Removed an unnecessary namespace
              qualifier.
              (WebCore::Font::floatWidthForSimpleText): Added a fallbackFonts
              parameter, which is passed down to WidthIterator.
      
              * platform/graphics/WidthIterator.cpp:
              (WebCore::WidthIterator::WidthIterator): Added a fallbackFonts parameter
              and used it to initialize the m_fallbackFonts member.
              (WebCore::WidthIterator::advance): Track the fonts being used and add
              any fallback fonts to the m_fallbackFonts set. Make sure to only add
              non-small-caps fonts.
      
              * platform/graphics/WidthIterator.h:
      
              * platform/graphics/chromium/FontChromiumWin.cpp:
              (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
              implementation that returns false, meaning this platform's
              implementation of floatWidthForComplexText() does not populate the
              fallbackFonts set.
              (WebCore::Font::floatWidthForComplexText): Updated for the new
              prototype.
      
              * platform/graphics/chromium/FontLinux.cpp: Ditto.
      
              * platform/graphics/gtk/FontGtk.cpp: Ditto.
      
              * platform/graphics/mac/CoreTextController.cpp:
              (WebCore::CoreTextController::CoreTextController): Added a fallbackFonts
              parameter and used it to initialize the m_fallbackFonts member.
              (WebCore::CoreTextController::collectCoreTextRunsForCharacters): Add
              fallback fonts to m_fallbackFonts.
      
              * platform/graphics/mac/CoreTextController.h:
      
              * platform/graphics/mac/FontMac.mm:
              (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
              implementation that returns true, indicating that the Mac
              implementations of floatWidthForComplexText() populate the fallbackFonts
              set.
              * platform/graphics/mac/FontMacATSUI.mm:
              (WebCore::ATSULayoutParameters::ATSULayoutParameters): Added a
              fallbackFonts parameter and used it to initialize the m_fallbackFonts
              member.
              (WebCore::ATSULayoutParameters::initialize): Add fallback fonts to
              m_fallbackFonts.
              (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
              parameter, which is passed down to ATSULayoutParameters.
      
              * platform/graphics/mac/FontMacCoreText.cpp:
              (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
              parameter, which is passed down to CoreTextController.
      
              * platform/graphics/win/FontWin.cpp:
              (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
              implementation that returns true, indicating that the
              UniscribeController-based implementations of floatWidthForComplexText()
              populate the fallbackFonts set.
              (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
              parameter, which is passed down to UniscribeController.
      
              * platform/graphics/win/UniscribeController.cpp:
              (WebCore::UniscribeController::UniscribeController): Added a
              fallbackfonts parameter and used it to initialize m_fallbackFonts.
              (WebCore::UniscribeController::advance): Add fallback fonts to
              m_fallbackFonts.
      
              * platform/graphics/win/UniscribeController.h:
              
              * platform/graphics/wx/FontWx.cpp:
              (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
              implementation that returns false, meaning this platform's
              implementation of floatWidthForComplexText() does not populate the
              fallbackFonts set.
              (WebCore::Font::floatWidthForComplexText): Updated for the new
              prototype.
      
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::computeLogicalBoxHeights): For an InlineTextBox
              with multiple fonts, compute a common baseline and line height by
              considering all fonts' ascents and descents (and line spacing, if
              applicable).
      
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::setFallbackFonts): Added. Temporarily stores
              the set of fallback fonts in a vector.
              (WebCore::InlineTextBox::takeFallbackFonts): Added. Returns the fallback
              fonts previously stored and removes them from storage.
      
              * rendering/InlineTextBox.h:
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::RenderText): Initialized the
              m_knownNotToUseFallbackFonts to false.
              (WebCore::RenderText::styleDidChange): Reset
              m_knownNotToUseFallbackFonts to false if the style difference is such that
              affects layout.
              (WebCore::RenderText::widthFromCache): Added a fallbackFonts parameter,
              which is passed down to Font::width().
              (WebCore::RenderText::trimmedPrefWidths): Updated for the change to
              widthFromCache().
              (WebCore::RenderText::calcPrefWidths): Made this call a private version
              of calcPrefWidths() that takes a fallbackFonts parameter and set the
              m_knownNotToUseFallbackFonts to true if the set comes back empty.
              The private version passes the fallbackFonts set to widthFromCache().
              (WebCore::RenderText::setText): Reset m_knownNotToUseFallbackFonts to
              false.
              (WebCore::RenderText::createFallbackFontMetricsBox): Added.
              (WebCore::RenderText::width): Added a fallbackFonts parameter, which is
              passed down to calcPrefWidths(), widthFromCache() and Font::width().
              Set m_knownNotToUseFallbackFonts to true when appropriate.
      
              * rendering/RenderText.h:
      
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::constructLine): Added an assertion and a continue
              statement to remove one level of indentation.
              (WebCore::RenderBlock::computeHorizontalPositionsForLine): Temporarily
              store the set of fallback fonts in the InlineTextBox.
              (WebCore::RenderBlock::computeVerticalPositionsForLine): Added an
              assertion.
      
      LayoutTests:
      
      2009-04-09  Dan Bernstein  <mitz@apple.com>
      
              Reviewed by Dave Hyatt.
      
              - updated results for <rdar://problem/6166612> Text boxes' metrics should be based on
                the actual fonts used in them, not just the primary font
      
              * editing/selection/extend-selection-bidi-expected.txt:
              * fast/text/offsetForPosition-cluster-at-zero-expected.txt:
              * platform/mac-leopard/fast/text/atsui-multiple-renderers-expected.checksum:
              * platform/mac-leopard/fast/text/atsui-multiple-renderers-expected.png:
              * platform/mac-leopard/fast/text/atsui-multiple-renderers-expected.txt:
              * platform/mac-leopard/fast/text/international/bidi-AN-after-empty-run-expected.checksum:
              * platform/mac-leopard/fast/text/international/bidi-AN-after-empty-run-expected.png:
              * platform/mac-leopard/fast/text/international/bidi-AN-after-empty-run-expected.txt:
              * platform/mac-leopard/fast/text/international/bidi-CS-after-AN-expected.checksum:
              * platform/mac-leopard/fast/text/international/bidi-CS-after-AN-expected.png:
              * platform/mac-leopard/fast/text/international/bidi-CS-after-AN-expected.txt:
              * platform/mac-leopard/fast/text/international/bidi-neutral-run-expected.checksum:
              * platform/mac-leopard/fast/text/international/bidi-neutral-run-expected.png:
              * platform/mac-leopard/fast/text/international/bidi-neutral-run-expected.txt:
              * platform/mac/css2.1/t0805-c5518-brdr-t-01-e-expected.checksum:
              * platform/mac/css2.1/t0805-c5518-brdr-t-01-e-expected.png:
              * platform/mac/css2.1/t0805-c5518-brdr-t-01-e-expected.txt:
              * platform/mac/css2.1/t0805-c5519-brdr-r-00-a-expected.checksum:
              * platform/mac/css2.1/t0805-c5519-brdr-r-00-a-expected.png:
              * platform/mac/css2.1/t0805-c5519-brdr-r-00-a-expected.txt:
              * platform/mac/css2.1/t0805-c5520-brdr-b-01-e-expected.checksum:
              * platform/mac/css2.1/t0805-c5520-brdr-b-01-e-expected.png:
              * platform/mac/css2.1/t0805-c5520-brdr-b-01-e-expected.txt:
              * platform/mac/css2.1/t0805-c5521-brdr-l-00-a-expected.checksum:
              * platform/mac/css2.1/t0805-c5521-brdr-l-00-a-expected.png:
              * platform/mac/css2.1/t0805-c5521-brdr-l-00-a-expected.txt:
              * platform/mac/css2.1/t0805-c5521-brdr-l-01-e-expected.checksum:
              * platform/mac/css2.1/t0805-c5521-brdr-l-01-e-expected.png:
              * platform/mac/css2.1/t0805-c5521-brdr-l-01-e-expected.txt:
              * platform/mac/css2.1/t0805-c5521-ibrdr-l-00-a-expected.checksum:
              * platform/mac/css2.1/t0805-c5521-ibrdr-l-00-a-expected.png:
              * platform/mac/css2.1/t0805-c5521-ibrdr-l-00-a-expected.txt:
              * platform/mac/css2.1/t0905-c414-flt-02-c-expected.checksum:
              * platform/mac/css2.1/t0905-c414-flt-02-c-expected.png:
              * platform/mac/css2.1/t0905-c414-flt-02-c-expected.txt:
              * platform/mac/css2.1/t0905-c414-flt-03-c-expected.checksum:
              * platform/mac/css2.1/t0905-c414-flt-03-c-expected.png:
              * platform/mac/css2.1/t0905-c414-flt-03-c-expected.txt:
              * platform/mac/css2.1/t0905-c414-flt-04-c-expected.checksum:
              * platform/mac/css2.1/t0905-c414-flt-04-c-expected.png:
              * platform/mac/css2.1/t0905-c414-flt-04-c-expected.txt:
              * platform/mac/css2.1/t0905-c414-flt-fit-01-d-g-expected.checksum:
              * platform/mac/css2.1/t0905-c414-flt-fit-01-d-g-expected.png:
              * platform/mac/css2.1/t0905-c414-flt-fit-01-d-g-expected.txt:
              * platform/mac/css2.1/t0905-c5525-fltblck-01-d-expected.checksum:
              * platform/mac/css2.1/t0905-c5525-fltblck-01-d-expected.png:
              * platform/mac/css2.1/t0905-c5525-fltblck-01-d-expected.txt:
              * platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.checksum:
              * platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.png:
              * platform/mac/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt:
              * platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.checksum:
              * platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.png:
              * platform/mac/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt:
              * platform/mac/css2.1/t0905-c5525-fltwidth-02-c-g-expected.checksum:
              * platform/mac/css2.1/t0905-c5525-fltwidth-02-c-g-expected.png:
              * platform/mac/css2.1/t0905-c5525-fltwidth-02-c-g-expected.txt:
              * platform/mac/css2.1/t0905-c5525-fltwidth-03-c-g-expected.checksum:
              * platform/mac/css2.1/t0905-c5525-fltwidth-03-c-g-expected.png:
              * platform/mac/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt:
              * platform/mac/css2.1/t0905-c5525-fltwrap-00-b-expected.checksum:
              * platform/mac/css2.1/t0905-c5525-fltwrap-00-b-expected.png:
              * platform/mac/css2.1/t0905-c5525-fltwrap-00-b-expected.txt:
              * platform/mac/css2.1/t090501-c414-flt-01-b-expected.checksum:
              * platform/mac/css2.1/t090501-c414-flt-01-b-expected.png:
              * platform/mac/css2.1/t090501-c414-flt-01-b-expected.txt:
              * platform/mac/css2.1/t090501-c414-flt-03-b-g-expected.checksum:
              * platform/mac/css2.1/t090501-c414-flt-03-b-g-expected.png:
              * platform/mac/css2.1/t090501-c414-flt-03-b-g-expected.txt:
              * platform/mac/css2.1/t090501-c5525-flt-l-00-b-g-expected.checksum:
              * platform/mac/css2.1/t090501-c5525-flt-l-00-b-g-expected.png:
              * platform/mac/css2.1/t090501-c5525-flt-l-00-b-g-expected.txt:
              * platform/mac/css2.1/t090501-c5525-flt-r-00-b-g-expected.checksum:
              * platform/mac/css2.1/t090501-c5525-flt-r-00-b-g-expected.png:
              * platform/mac/css2.1/t090501-c5525-flt-r-00-b-g-expected.txt:
              * platform/mac/css2.1/t100304-c43-rpl-bbx-01-d-g-expected.checksum:
              * platform/mac/css2.1/t100304-c43-rpl-bbx-01-d-g-expected.png:
              * platform/mac/css2.1/t100304-c43-rpl-bbx-01-d-g-expected.txt:
              * platform/mac/css2.1/t1202-counter-03-b-expected.checksum:
              * platform/mac/css2.1/t1202-counter-03-b-expected.png:
              * platform/mac/css2.1/t1202-counter-03-b-expected.txt:
              * platform/mac/css2.1/t1202-counter-04-b-expected.checksum:
              * platform/mac/css2.1/t1202-counter-04-b-expected.png:
              * platform/mac/css2.1/t1202-counter-04-b-expected.txt:
              * platform/mac/css2.1/t1202-counter-09-b-expected.checksum:
              * platform/mac/css2.1/t1202-counter-09-b-expected.png:
              * platform/mac/css2.1/t1202-counter-09-b-expected.txt:
              * platform/mac/css2.1/t1202-counters-03-b-expected.checksum:
              * platform/mac/css2.1/t1202-counters-03-b-expected.png:
              * platform/mac/css2.1/t1202-counters-03-b-expected.txt:
              * platform/mac/css2.1/t1202-counters-04-b-expected.checksum:
              * platform/mac/css2.1/t1202-counters-04-b-expected.png:
              * platform/mac/css2.1/t1202-counters-04-b-expected.txt:
              * platform/mac/css2.1/t1202-counters-09-b-expected.checksum:
              * platform/mac/css2.1/t1202-counters-09-b-expected.png:
              * platform/mac/css2.1/t1202-counters-09-b-expected.txt:
              * platform/mac/editing/deleting/5144139-2-expected.checksum:
              * platform/mac/editing/deleting/5144139-2-expected.png:
              * platform/mac/editing/deleting/5144139-2-expected.txt:
              * platform/mac/editing/input/devanagari-ligature-expected.checksum:
              * platform/mac/editing/input/devanagari-ligature-expected.png:
              * platform/mac/editing/input/devanagari-ligature-expected.txt:
              * platform/mac/editing/pasteboard/copy-paste-bidi-expected.checksum:
              * platform/mac/editing/pasteboard/copy-paste-bidi-expected.png:
              * platform/mac/editing/pasteboard/copy-paste-bidi-expected.txt:
              * platform/mac/editing/selection/caret-rtl-2-expected.checksum:
              * platform/mac/editing/selection/caret-rtl-2-expected.png:
              * platform/mac/editing/selection/caret-rtl-2-expected.txt:
              * platform/mac/editing/selection/caret-rtl-expected.checksum:
              * platform/mac/editing/selection/caret-rtl-expected.png:
              * platform/mac/editing/selection/caret-rtl-expected.txt:
              * platform/mac/editing/selection/extend-selection-bidi-expected.checksum:
              * platform/mac/editing/selection/extend-selection-bidi-expected.png:
              * platform/mac/fast/css/beforeSelectorOnCodeElement-expected.checksum:
              * platform/mac/fast/css/beforeSelectorOnCodeElement-expected.png:
              * platform/mac/fast/css/beforeSelectorOnCodeElement-expected.txt:
              * platform/mac/fast/css/rtl-ordering-expected.checksum:
              * platform/mac/fast/css/rtl-ordering-expected.png:
              * platform/mac/fast/css/rtl-ordering-expected.txt:
              * platform/mac/fast/css/text-overflow-ellipsis-expected.checksum:
              * platform/mac/fast/css/text-overflow-ellipsis-expected.png:
              * platform/mac/fast/css/text-overflow-ellipsis-expected.txt:
              * platform/mac/fast/css/text-security-expected.checksum:
              * platform/mac/fast/css/text-security-expected.png:
              * platform/mac/fast/css/text-security-expected.txt:
              * platform/mac/fast/encoding/denormalised-voiced-japanese-chars-expected.checksum:
              * platform/mac/fast/encoding/denormalised-voiced-japanese-chars-expected.png:
              * platform/mac/fast/encoding/denormalised-voiced-japanese-chars-expected.txt:
              * platform/mac/fast/encoding/invalid-UTF-8-expected.checksum:
              * platform/mac/fast/encoding/invalid-UTF-8-expected.png:
              * platform/mac/fast/encoding/invalid-UTF-8-expected.txt:
              * platform/mac/fast/events/updateLayoutForHitTest-expected.checksum:
              * platform/mac/fast/events/updateLayoutForHitTest-expected.png:
              * platform/mac/fast/events/updateLayoutForHitTest-expected.txt:
              * platform/mac/fast/forms/select-visual-hebrew-expected.checksum:
              * platform/mac/fast/forms/select-visual-hebrew-expected.png:
              * platform/mac/fast/forms/select-visual-hebrew-expected.txt:
              * platform/mac/fast/forms/select-writing-direction-natural-expected.checksum:
              * platform/mac/fast/forms/select-writing-direction-natural-expected.png:
              * platform/mac/fast/forms/select-writing-direction-natural-expected.txt:
              * platform/mac/fast/forms/visual-hebrew-text-field-expected.checksum:
              * platform/mac/fast/forms/visual-hebrew-text-field-expected.png:
              * platform/mac/fast/forms/visual-hebrew-text-field-expected.txt:
              * platform/mac/fast/lists/w3-list-styles-expected.checksum:
              * platform/mac/fast/lists/w3-list-styles-expected.png:
              * platform/mac/fast/lists/w3-list-styles-expected.txt:
              * platform/mac/fast/text/bidi-embedding-pop-and-push-same-expected.checksum:
              * platform/mac/fast/text/bidi-embedding-pop-and-push-same-expected.png:
              * platform/mac/fast/text/bidi-embedding-pop-and-push-same-expected.txt:
              * platform/mac/fast/text/capitalize-boundaries-expected.checksum:
              * platform/mac/fast/text/capitalize-boundaries-expected.png:
              * platform/mac/fast/text/capitalize-boundaries-expected.txt:
              * platform/mac/fast/text/cg-fallback-bolding-expected.checksum:
              * platform/mac/fast/text/cg-fallback-bolding-expected.png:
              * platform/mac/fast/text/cg-fallback-bolding-expected.txt:
              * platform/mac/fast/text/complex-text-opacity-expected.checksum:
              * platform/mac/fast/text/complex-text-opacity-expected.png:
              * platform/mac/fast/text/complex-text-opacity-expected.txt:
              * platform/mac/fast/text/in-rendered-text-rtl-expected.checksum:
              * platform/mac/fast/text/in-rendered-text-rtl-expected.png:
              * platform/mac/fast/text/in-rendered-text-rtl-expected.txt:
              * platform/mac/fast/text/international/001-expected.checksum:
              * platform/mac/fast/text/international/001-expected.png:
              * platform/mac/fast/text/international/001-expected.txt:
              * platform/mac/fast/text/international/002-expected.checksum:
              * platform/mac/fast/text/international/002-expected.png:
              * platform/mac/fast/text/international/002-expected.txt:
              * platform/mac/fast/text/international/003-expected.checksum:
              * platform/mac/fast/text/international/003-expected.png:
              * platform/mac/fast/text/international/003-expected.txt:
              * platform/mac/fast/text/international/bidi-AN-after-L-expected.checksum:
              * platform/mac/fast/text/international/bidi-AN-after-L-expected.png:
              * platform/mac/fast/text/international/bidi-AN-after-L-expected.txt:
              * platform/mac/fast/text/international/bidi-L2-run-reordering-expected.checksum:
              * platform/mac/fast/text/international/bidi-L2-run-reordering-expected.png:
              * platform/mac/fast/text/international/bidi-L2-run-reordering-expected.txt:
              * platform/mac/fast/text/international/bidi-LDB-2-CSS-expected.checksum:
              * platform/mac/fast/text/international/bidi-LDB-2-CSS-expected.png:
              * platform/mac/fast/text/international/bidi-LDB-2-CSS-expected.txt:
              * platform/mac/fast/text/international/bidi-LDB-2-HTML-expected.checksum:
              * platform/mac/fast/text/international/bidi-LDB-2-HTML-expected.png:
              * platform/mac/fast/text/international/bidi-LDB-2-HTML-expected.txt:
              * platform/mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.checksum:
              * platform/mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
              * platform/mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
              * platform/mac/fast/text/international/bidi-european-terminators-expected.checksum:
              * platform/mac/fast/text/international/bidi-european-terminators-expected.png:
              * platform/mac/fast/text/international/bidi-european-terminators-expected.txt:
              * platform/mac/fast/text/international/bidi-fallback-font-weight-expected.checksum:
              * platform/mac/fast/text/international/bidi-fallback-font-weight-expected.png:
              * platform/mac/fast/text/international/bidi-fallback-font-weight-expected.txt:
              * platform/mac/fast/text/international/bidi-ignored-for-first-child-inline-expected.checksum:
              * platform/mac/fast/text/international/bidi-ignored-for-first-child-inline-expected.png:
              * platform/mac/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
              * platform/mac/fast/text/international/bidi-innertext-expected.checksum:
              * platform/mac/fast/text/international/bidi-innertext-expected.png:
              * platform/mac/fast/text/international/bidi-innertext-expected.txt:
              * platform/mac/fast/text/international/bidi-linebreak-001-expected.checksum:
              * platform/mac/fast/text/international/bidi-linebreak-001-expected.png:
              * platform/mac/fast/text/international/bidi-linebreak-001-expected.txt:
              * platform/mac/fast/text/international/bidi-linebreak-002-expected.checksum:
              * platform/mac/fast/text/international/bidi-linebreak-002-expected.png:
              * platform/mac/fast/text/international/bidi-linebreak-002-expected.txt:
              * platform/mac/fast/text/international/bidi-linebreak-003-expected.checksum:
              * platform/mac/fast/text/international/bidi-linebreak-003-expected.png:
              * platform/mac/fast/text/international/bidi-linebreak-003-expected.txt:
              * platform/mac/fast/text/international/bidi-listbox-atsui-expected.checksum:
              * platform/mac/fast/text/international/bidi-listbox-atsui-expected.png:
              * platform/mac/fast/text/international/bidi-listbox-atsui-expected.txt:
              * platform/mac/fast/text/international/bidi-listbox-expected.checksum:
              * platform/mac/fast/text/international/bidi-listbox-expected.png:
              * platform/mac/fast/text/international/bidi-listbox-expected.txt:
              * platform/mac/fast/text/international/bidi-menulist-expected.checksum:
              * platform/mac/fast/text/international/bidi-menulist-expected.png:
              * platform/mac/fast/text/international/bidi-menulist-expected.txt:
              * platform/mac/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.checksum:
              * platform/mac/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.png:
              * platform/mac/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.txt:
              * platform/mac/fast/text/international/bidi-override-expected.checksum:
              * platform/mac/fast/text/international/bidi-override-expected.png:
              * platform/mac/fast/text/international/bidi-override-expected.txt:
              * platform/mac/fast/text/international/hindi-spacing-expected.checksum:
              * platform/mac/fast/text/international/hindi-spacing-expected.png:
              * platform/mac/fast/text/international/hindi-spacing-expected.txt:
              * platform/mac/fast/text/international/rtl-caret-expected.checksum:
              * platform/mac/fast/text/international/rtl-caret-expected.png:
              * platform/mac/fast/text/international/rtl-caret-expected.txt:
              * platform/mac/fast/text/international/thai-line-breaks-expected.checksum:
              * platform/mac/fast/text/international/thai-line-breaks-expected.png:
              * platform/mac/fast/text/international/thai-line-breaks-expected.txt:
              * platform/mac/fast/text/international/wrap-CJK-001-expected.checksum:
              * platform/mac/fast/text/international/wrap-CJK-001-expected.png:
              * platform/mac/fast/text/international/wrap-CJK-001-expected.txt:
              * platform/mac/fast/text/wide-zero-width-space-expected.checksum:
              * platform/mac/fast/text/wide-zero-width-space-expected.png:
              * platform/mac/fast/text/wide-zero-width-space-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa6ce3d8
  28. 08 Apr, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · 84c0e63d
      mitz@apple.com authored
              Reviewed by Dave Hyatt.
      
              - fix <rdar://problem/6771547> Appending to a RenderText causes all its
                lines to be dirtied
      
              Test: fast/repaint/text-append-dirty-lines.html
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::setTextWithOffset): If no text boxes intersected
              with or came after the new text, dirty the last root box, since the new
              text may begin there. Having at least one dirty line prevents the
              incorrect dirtying of all lines later during layoutInlineChildren().
      
      LayoutTests:
      
              Reviewed by Dave Hyatt.
      
              - test for <rdar://problem/6771547> Appending to a RenderText causes all its
                lines to be dirtied
      
              * fast/repaint/text-append-dirty-lines.html: Added.
              * platform/mac/fast/repaint/text-append-dirty-lines-expected.checksum: Added.
              * platform/mac/fast/repaint/text-append-dirty-lines-expected.png: Added.
              * platform/mac/fast/repaint/text-append-dirty-lines-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84c0e63d
  29. 26 Mar, 2009 1 commit
  30. 23 Mar, 2009 1 commit
    • darin@apple.com's avatar
      WebCore: · 3b117c53
      darin@apple.com authored
      2009-03-23  Darin Adler  <darin@apple.com>
      
              Reviewed by Adele Peterson.
      
              Bug 24726: hit testing doesn't work right when the click is on anonymous content
              https://bugs.webkit.org/show_bug.cgi?id=24726
              rdar://problem/6696992
      
              Test: editing/selection/hit-test-anonymous.html
      
              * rendering/RenderBR.cpp:
              (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
              creating a VisiblePosition directly. It will handle finding non-anonymous
              content nearby if node() is 0.
              * rendering/RenderBlock.cpp:
              (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
              (WebCore::positionForPointWithInlineChildren): Ditto.
              (WebCore::RenderBlock::positionForPoint): Ditto.
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::positionForPoint): Ditto.
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::positionForPoint): Ditto.
              (WebCore::RenderObject::createVisiblePosition): Added.
              * rendering/RenderObject.h: Added createVisiblePosition.
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
              * rendering/RenderText.cpp:
              (WebCore::RenderText::positionForPoint): Ditto.
      
      LayoutTests:
      
      2009-03-23  Darin Adler  <darin@apple.com>
      
              Reviewed by Adele Peterson.
      
              Bug 24726: hit testing doesn't work right when the click is on anonymous content
              https://bugs.webkit.org/show_bug.cgi?id=24726
              rdar://problem/6696992
      
              * editing/selection/hit-test-anonymous-expected.txt: Added.
              * editing/selection/hit-test-anonymous.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3b117c53
  31. 08 Mar, 2009 1 commit
  32. 06 Mar, 2009 1 commit
    • ap@webkit.org's avatar
      2009-03-06 Hironori Bono <hbono@chromium.org> · b1be2a70
      ap@webkit.org authored
              Reviewed by Alexey Proskuryakov.
      
              https://bugs.webkit.org/show_bug.cgi?id=24342
              Cannot insert a Thai character after a Thai prepend character when using ICU 4.0
      
              This change creates a new break iterator "cursorMovementIterator" for
              moving cursors and use it when moving an input cursor.
              In "TextBreakIteratorICU.cpp", this break iterator uses custom ruleset
              based on the one of ICU 3.8.
              On the other hand, in "TextBreakIteratorQt.cpp", this break iterator
              just calls the characterBreakIterator() function.
      
              Test: editing/inserting/insert-thai-characters-001.html
      
              * platform/text/TextBreakIterator.h: Added a new function cursorMovementIterator().
              * platform/text/TextBreakIteratorICU.cpp: Implemented the cursorMovementIterator() function for ICU.
              (WebCore::setUpIteratorWithRules): Ditto.
              (WebCore::cursorMovementIterator): Ditto.
              * platform/text/qt/TextBreakIteratorQt.cpp: Implemented the cursorMovementIterator() function for Qt.
              (WebCore::cursorMovementIterator): Ditto.
              * rendering/RenderText.cpp: Call the cursorMovementIterator() function when moving an input cursor.
              (WebCore::RenderText::previousOffset): Ditto.
              (WebCore::RenderText::nextOffset): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1be2a70
  33. 01 Mar, 2009 1 commit
    • levin@chromium.org's avatar
      2009-03-01 Ojan Vafai <ojan@chromium.org> · d3ac7e6d
      levin@chromium.org authored
              Reviewed by Eric Seidel.
      
              Bug 24251: Cleanup: replace positionForCoordinates with positionForPoint
              <https://bugs.webkit.org/show_bug.cgi?id=24251>
      
              Make RenderObject::positionForCoordinate non-virtual and
              RenderObject::positionForPoint virtual in preparation for
              removing positionFor* from RenderObject/RenderText.
      
              * page/Frame.cpp:
              (WebCore::Frame::visiblePositionForPoint):
              * rendering/RenderBR.cpp:
              (WebCore::RenderBR::positionForPoint):
              * rendering/RenderBR.h:
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::positionForPoint):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::positionForPoint):
              * rendering/RenderBox.h:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::positionForPoint):
              * rendering/RenderInline.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::positionForCoordinates):
              (WebCore::RenderObject::positionForPoint):
              * rendering/RenderObject.h:
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::positionForPoint):
              * rendering/RenderReplaced.h:
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::positionForPoint):
              * rendering/RenderSVGInlineText.h:
              * rendering/RenderText.cpp:
              (WebCore::RenderText::positionForPoint):
              * rendering/RenderText.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3ac7e6d
  34. 15 Feb, 2009 1 commit
  35. 11 Feb, 2009 3 commits
    • hyatt@apple.com's avatar
      2009-02-11 David Hyatt <hyatt@apple.com> · c92b7358
      hyatt@apple.com authored
              Eliminate createInlineBox and dirtyLineBoxes from RenderObject.  These functions have been devirtualized.
              The single call site now calls a helper function that just bit checks and casts before calling the correct
              type.  RenderBlock's dirtyLineBoxes function was dead code (caused by the RenderFlow deletion), so it has
              just been removed.
      
              Reviewed by Eric Seidel
      
              * rendering/RenderBR.cpp:
              * rendering/RenderBR.h:
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::createRootInlineBox):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::createInlineBox):
              * rendering/RenderBox.h:
              * rendering/RenderCounter.cpp:
              * rendering/RenderCounter.h:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::createInlineFlowBox):
              * rendering/RenderInline.h:
              * rendering/RenderObject.cpp:
              * rendering/RenderObject.h:
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::createTextBox):
              * rendering/RenderSVGInlineText.h:
              (WebCore::RenderSVGInlineText::isSVGText):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::createTextBox):
              (WebCore::RenderText::createInlineTextBox):
              * rendering/RenderText.h:
              * rendering/bidi.cpp:
              (WebCore::createInlineBoxForRenderer):
              (WebCore::RenderBlock::createLineBoxes):
              (WebCore::RenderBlock::constructLine):
              (WebCore::RenderBlock::layoutInlineChildren):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c92b7358
    • hyatt@apple.com's avatar
      2009-02-11 David Hyatt <hyatt@apple.com> · 6a551ad7
      hyatt@apple.com authored
              Eliminate the virtual position() function from RenderObject.  Rename the position() overrides
              in RenderText and RenderBox to positionLineBox and devirtualize them.
              
              Patch the one call site to just check for isText() and isBox() and call the methods directly.
              
              Remove some unnecessary overrides of position() on table sections and rows.
          
              Reviewed by Simon Fraser
      
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::positionLineBox):
              * rendering/RenderBox.h:
              * rendering/RenderObject.h:
              * rendering/RenderSVGRoot.cpp:
              * rendering/RenderSVGRoot.h:
              * rendering/RenderTableRow.h:
              (WebCore::RenderTableRow::lineHeight):
              * rendering/RenderTableSection.h:
              (WebCore::RenderTableSection::lineHeight):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::positionLineBox):
              * rendering/RenderText.h:
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::computeVerticalPositionsForLine):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a551ad7
    • hyatt@apple.com's avatar
      2009-02-11 David Hyatt <hyatt@apple.com> · 7e03253f
      hyatt@apple.com authored
              Combine RenderObject::element() and RenderObject::node() into a single function.  
              node() now has the "anonymous bit" checking behavior of element() and will
              return 0 for anonymous content.  This patch switches all callers of element() 
              to node() and patches old callers of node() to deal with situations where they
              did not expect node() to be 0.  A bunch of node() calls were calling stuff on 
              Document that they clearly didn't intend, so overall this is a nice improvement.
          
              Reviewed by Sam Weinig
      
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::getUpperLeftCorner):
              * dom/Element.cpp:
              (WebCore::Element::offsetParent):
              * dom/Position.cpp:
              (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
              * editing/ModifySelectionListLevel.cpp:
              (WebCore::getStartEndListChildren):
              (WebCore::IncreaseSelectionListLevelCommand::doApply):
              (WebCore::DecreaseSelectionListLevelCommand::doApply):
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::advance):
              * editing/VisiblePosition.cpp:
              (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
              (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
              * editing/visible_units.cpp:
              (WebCore::startPositionForLine):
              (WebCore::endPositionForLine):
              * page/AXObjectCache.cpp:
              (WebCore::AXObjectCache::get):
              * page/AccessibilityList.cpp:
              (WebCore::AccessibilityList::isUnorderedList):
              (WebCore::AccessibilityList::isOrderedList):
              (WebCore::AccessibilityList::isDefinitionList):
              * page/AccessibilityListBox.cpp:
              (WebCore::AccessibilityListBox::doAccessibilityHitTest):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::isPasswordField):
              (WebCore::AccessibilityRenderObject::isFileUploadButton):
              (WebCore::AccessibilityRenderObject::isInputImage):
              (WebCore::AccessibilityRenderObject::isMultiSelect):
              (WebCore::AccessibilityRenderObject::isControl):
              (WebCore::AccessibilityRenderObject::getAttribute):
              (WebCore::AccessibilityRenderObject::anchorElement):
              (WebCore::AccessibilityRenderObject::actionElement):
              (WebCore::AccessibilityRenderObject::mouseButtonListener):
              (WebCore::AccessibilityRenderObject::helpText):
              (WebCore::AccessibilityRenderObject::textUnderElement):
              (WebCore::AccessibilityRenderObject::hasIntValue):
              (WebCore::AccessibilityRenderObject::intValue):
              (WebCore::AccessibilityRenderObject::labelElementContainer):
              (WebCore::AccessibilityRenderObject::title):
              (WebCore::AccessibilityRenderObject::accessibilityDescription):
              (WebCore::AccessibilityRenderObject::boundingBoxRect):
              (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
              (WebCore::AccessibilityRenderObject::titleUIElement):
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
              (WebCore::AccessibilityRenderObject::text):
              (WebCore::AccessibilityRenderObject::ariaSelectedTextDOMRange):
              (WebCore::AccessibilityRenderObject::accessKey):
              (WebCore::AccessibilityRenderObject::setSelectedTextRange):
              (WebCore::AccessibilityRenderObject::url):
              (WebCore::AccessibilityRenderObject::isFocused):
              (WebCore::AccessibilityRenderObject::setFocused):
              (WebCore::AccessibilityRenderObject::setValue):
              (WebCore::AccessibilityRenderObject::isEnabled):
              (WebCore::AccessibilityRenderObject::visiblePositionRange):
              (WebCore::AccessibilityRenderObject::index):
              (WebCore::AccessibilityRenderObject::activeDescendant):
              (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
              (WebCore::AccessibilityRenderObject::observableObject):
              (WebCore::AccessibilityRenderObject::roleValue):
              (WebCore::AccessibilityRenderObject::canSetFocusAttribute):
              (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
              * page/AccessibilityTable.cpp:
              (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
              (WebCore::AccessibilityTable::title):
              * page/AccessibilityTableCell.cpp:
              (WebCore::AccessibilityTableCell::titleUIElement):
              * page/AccessibilityTableColumn.cpp:
              (WebCore::AccessibilityTableColumn::headerObjectForSection):
              * page/AccessibilityTableRow.cpp:
              (WebCore::AccessibilityTableRow::headerObject):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::dispatchMouseEvent):
              (WebCore::EventHandler::canMouseDownStartSelect):
              (WebCore::EventHandler::canMouseDragExtendSelect):
              (WebCore::EventHandler::shouldDragAutoNode):
              * page/Frame.cpp:
              (WebCore::Frame::searchForLabelsAboveCell):
              (WebCore::Frame::setFocusedNodeIfNeeded):
              * page/FrameView.cpp:
              (WebCore::FrameView::updateOverflowStatus):
              * page/animation/AnimationBase.cpp:
              (WebCore::AnimationBase::updateStateMachine):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::updateAnimationTimer):
              (WebCore::AnimationController::cancelAnimations):
              (WebCore::AnimationController::updateAnimations):
              * page/animation/KeyframeAnimation.cpp:
              (WebCore::KeyframeAnimation::KeyframeAnimation):
              (WebCore::KeyframeAnimation::endAnimation):
              * page/mac/AccessibilityObjectWrapper.mm:
              (blockquoteLevel):
              (AXAttributeStringSetHeadingLevel):
              * page/mac/FrameMac.mm:
              (WebCore::Frame::searchForNSLabelsAboveCell):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::verticallyAlignBoxes):
              (WebCore::InlineFlowBox::paint):
              (WebCore::shouldDrawTextDecoration):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paintDocumentMarkers):
              * rendering/RenderBR.cpp:
              (WebCore::RenderBR::positionForCoordinates):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::layoutBlock):
              (WebCore::RenderBlock::handleRunInChild):
              (WebCore::RenderBlock::paintObject):
              (WebCore::RenderBlock::isSelectionRoot):
              (WebCore::RenderBlock::rightmostPosition):
              (WebCore::RenderBlock::positionForBox):
              (WebCore::RenderBlock::positionForRenderer):
              (WebCore::RenderBlock::positionForCoordinates):
              (WebCore::RenderBlock::hasLineIfEmpty):
              (WebCore::RenderBlock::updateFirstLetter):
              (WebCore::RenderBlock::updateHitTestResult):
              (WebCore::RenderBlock::addFocusRingRects):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::styleWillChange):
              (WebCore::RenderBox::updateBoxModelInfoFromStyle):
              (WebCore::RenderBox::paintRootBoxDecorations):
              (WebCore::RenderBox::positionForCoordinates):
              * rendering/RenderButton.cpp:
              (WebCore::RenderButton::updateFromElement):
              (WebCore::RenderButton::canHaveChildren):
              * rendering/RenderCounter.cpp:
              (WebCore::planCounter):
              * rendering/RenderFieldset.cpp:
              (WebCore::RenderFieldset::findLegend):
              * rendering/RenderFlexibleBox.cpp:
              (WebCore::RenderFlexibleBox::layoutVerticalBox):
              * rendering/RenderForeignObject.cpp:
              (WebCore::RenderForeignObject::translationForAttributes):
              (WebCore::RenderForeignObject::calculateLocalTransform):
              * rendering/RenderFrame.h:
              (WebCore::RenderFrame::element):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::paintReplaced):
              (WebCore::RenderImage::imageMap):
              (WebCore::RenderImage::nodeAtPoint):
              (WebCore::RenderImage::updateAltText):
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::cloneInline):
              (WebCore::RenderInline::updateHitTestResult):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::isTransparent):
              (WebCore::RenderLayer::scrollToOffset):
              (WebCore::RenderLayer::resize):
              (WebCore::RenderLayer::createScrollbar):
              (WebCore::RenderLayer::updateOverflowStatus):
              (WebCore::RenderLayer::updateScrollInfoAfterLayout):
              (WebCore::RenderLayer::enclosingElement):
              (WebCore::RenderLayer::updateHoverActiveState):
              (WebCore::RenderLayer::updateScrollCornerStyle):
              (WebCore::RenderLayer::updateResizerStyle):
              * rendering/RenderLayer.h:
              (WebCore::RenderLayer::isRootLayer):
              * rendering/RenderListItem.cpp:
              (WebCore::getParentOfFirstLineBox):
              * rendering/RenderMarquee.cpp:
              (WebCore::RenderMarquee::marqueeSpeed):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::RenderObject):
              (WebCore::RenderObject::isBody):
              (WebCore::RenderObject::isHR):
              (WebCore::RenderObject::isHTMLMarquee):
              (WebCore::RenderObject::isEditable):
              (WebCore::RenderObject::addPDFURLRect):
              (WebCore::RenderObject::showTreeForThis):
              (WebCore::RenderObject::draggableNode):
              (WebCore::RenderObject::hasOutlineAnnotation):
              (WebCore::RenderObject::positionForCoordinates):
              (WebCore::RenderObject::updateDragState):
              (WebCore::RenderObject::updateHitTestResult):
              (WebCore::RenderObject::getUncachedPseudoStyle):
              (WebCore::RenderObject::getTextDecorationColors):
              (WebCore::RenderObject::caretMaxOffset):
              (WebCore::RenderObject::offsetParent):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::isRoot):
              (WebCore::RenderObject::isInlineContinuation):
              (WebCore::RenderObject::node):
              (WebCore::RenderObject::setNode):
              * rendering/RenderObjectChildList.cpp:
              (WebCore::RenderObjectChildList::destroyLeftoverChildren):
              * rendering/RenderPart.cpp:
              (WebCore::RenderPart::updateWidgetPosition):
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::updateWidget):
              (WebCore::RenderPartObject::viewCleared):
              * rendering/RenderPath.cpp:
              (WebCore::RenderPath::calculateLocalTransform):
              (WebCore::RenderPath::layout):
              (WebCore::RenderPath::paint):
              (WebCore::RenderPath::drawMarkersIfNeeded):
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::positionForCoordinates):
              (WebCore::RenderReplaced::isSelected):
              * rendering/RenderSVGGradientStop.cpp:
              (WebCore::RenderSVGGradientStop::gradientElement):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::calculateLocalTransform):
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::positionForCoordinates):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::layout):
              (WebCore::RenderSVGRoot::applyContentTransforms):
              (WebCore::RenderSVGRoot::paint):
              (WebCore::RenderSVGRoot::calcViewport):
              (WebCore::RenderSVGRoot::absoluteTransform):
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::calculateLocalTransform):
              (WebCore::RenderSVGText::layout):
              * rendering/RenderSVGTextPath.cpp:
              (WebCore::RenderSVGTextPath::layoutPath):
              (WebCore::RenderSVGTextPath::startOffset):
              (WebCore::RenderSVGTextPath::exactAlignment):
              (WebCore::RenderSVGTextPath::stretchMethod):
              * rendering/RenderSVGTransformableContainer.cpp:
              (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
              * rendering/RenderSVGViewportContainer.cpp:
              (WebCore::RenderSVGViewportContainer::calcViewport):
              (WebCore::RenderSVGViewportContainer::viewportTransform):
              (WebCore::RenderSVGViewportContainer::nodeAtPoint):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::addChild):
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::updateFromElement):
              (WebCore::RenderTableCell::calcPrefWidths):
              * rendering/RenderTableCol.cpp:
              (WebCore::RenderTableCol::updateFromElement):
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::addChild):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::addChild):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::originalText):
              (WebCore::RenderText::positionForCoordinates):
              * rendering/RenderTextControlMultiLine.cpp:
              (WebCore::RenderTextControlMultiLine::nodeAtPoint):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::nodeAtPoint):
              * rendering/RenderTextFragment.cpp:
              (WebCore::RenderTextFragment::originalText):
              (WebCore::RenderTextFragment::previousCharacter):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::isActive):
              (WebCore::RenderTheme::isChecked):
              (WebCore::RenderTheme::isIndeterminate):
              (WebCore::RenderTheme::isEnabled):
              (WebCore::RenderTheme::isFocused):
              (WebCore::RenderTheme::isPressed):
              (WebCore::RenderTheme::isReadOnlyControl):
              (WebCore::RenderTheme::isHovered):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::updatePressedState):
              (WebCore::RenderThemeMac::paintMediaFullscreenButton):
              (WebCore::RenderThemeMac::paintMediaMuteButton):
              (WebCore::RenderThemeMac::paintMediaPlayButton):
              (WebCore::RenderThemeMac::paintMediaSeekBackButton):
              (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
              (WebCore::RenderThemeMac::paintMediaSliderTrack):
              (WebCore::RenderThemeMac::paintMediaSliderThumb):
              (WebCore::RenderThemeMac::paintMediaTimelineContainer):
              (WebCore::RenderThemeMac::paintMediaCurrentTime):
              (WebCore::RenderThemeMac::paintMediaTimeRemaining):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::paintMediaMuteButton):
              (WebCore::RenderThemeSafari::paintMediaPlayButton):
              (WebCore::RenderThemeSafari::paintMediaSliderTrack):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<):
              (WebCore::writeSelection):
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::setWidgetGeometry):
              (WebCore::RenderWidget::updateWidgetPosition):
              (WebCore::RenderWidget::nodeAtPoint):
              * rendering/RootInlineBox.cpp:
              (WebCore::isEditableLeaf):
              * rendering/SVGRenderSupport.cpp:
              (WebCore::prepareToRenderSVGContent):
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::write):
              * rendering/SVGRootInlineBox.cpp:
              (WebCore::SVGRootInlineBox::buildLayoutInformation):
              (WebCore::SVGRootInlineBox::layoutInlineBoxes):
              (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
              (WebCore::SVGRootInlineBox::buildTextChunks):
              * rendering/style/SVGRenderStyle.cpp:
              (WebCore::SVGRenderStyle::cssPrimitiveToLength):
              * svg/SVGFont.cpp:
              (WebCore::SVGTextRunWalker::walk):
              (WebCore::floatWidthOfSubStringUsingSVGFont):
              (WebCore::Font::drawTextUsingSVGFont):
              * svg/SVGTextContentElement.cpp:
              (WebCore::findInlineTextBoxInTextChunks):
              * svg/graphics/SVGPaintServer.cpp:
              (WebCore::SVGPaintServer::fillPaintServer):
              (WebCore::SVGPaintServer::strokePaintServer):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e03253f