1. 26 Jan, 2009 2 commits
    • hyatt@apple.com's avatar
      2009-01-26 David Hyatt <hyatt@apple.com> · d0301a5e
      hyatt@apple.com authored
              Drop support for display:compact.
      
              (1) display:compact is no longer part of CSS2.1.
              (2) Shipping Safari has completely broken compact support with severely broken rendering
              (all of the compact text just piles on top of the text in the inserted block and on top of itself as well).
              (3) This has been broken in WebKit for years (ever since blocks converted to painting lines directly) without
              anyone even noticing.
      
              Reviewed by Eric Seidel
      
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesHorizontally):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::handleSpecialChild):
              (WebCore::RenderBlock::handleRunInChild):
              (WebCore::RenderBlock::layoutBlockChildren):
              (WebCore::RenderBlock::paint):
              (WebCore::RenderBlock::paintObject):
              (WebCore::RenderBlock::nodeAtPoint):
              (WebCore::RenderBlock::positionForCoordinates):
              (WebCore::shouldCheckLines):
              (WebCore::getHeightForLineCount):
              (WebCore::RenderBlock::renderName):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::sizesToIntrinsicWidth):
              * rendering/RenderBox.h:
              (WebCore::RenderBox::width):
              (WebCore::RenderBox::height):
              (WebCore::RenderBox::size):
              (WebCore::RenderBox::frameRect):
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::paintLines):
              (WebCore::RenderFlow::hitTestLines):
              (WebCore::RenderFlow::absoluteClippedOverflowRect):
              (WebCore::RenderFlow::linesBoundingBox):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::isInline):
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::computeHorizontalPositionsForLine):
              (WebCore::RenderBlock::layoutInlineChildren):
              * rendering/bidi.h:
              (WebCore::BidiRun::BidiRun):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d0301a5e
    • hyatt@apple.com's avatar
      2009-01-26 David Hyatt <hyatt@apple.com> · 831beecd
      hyatt@apple.com authored
              Change display:run-in handling so that we no longer reuse RenderBlock as though it is an inline flow.
              Instead we create a new RenderInline, move the RenderBlock's children underneath it, and then set the
              inline as the new element's renderer.
      
              Reviewed by Dan Bernstein
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::handleRunInChild):
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::renderName):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      831beecd
  2. 25 Jan, 2009 3 commits
    • hyatt@apple.com's avatar
      WebCore: · 8b2cd1fe
      hyatt@apple.com authored
      2009-01-25  David Hyatt  <hyatt@apple.com>
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=23524, lots of missing content in table sections.
      
              The new table code created a bug involving  markAllDescendantsWithFloatsForLayout, namely that it could
              end up marking ancestors of a block as needing layout when that block was still in the process of
              doing a layout.
      
              The fix is to add a parameter to markAllDescendantsWithFloatsForLayout that says whether or not
              we are "mid-layout."  If this flag is set, then the method will make sure to do only local dirtying
              of objects to avoid accidentally marking a clean ancestor as needing layout again.
      
              Ultimately the second parameter to setNeedsLayout and setChildNeedsLayout should just be removed,
              with a check of whether or not we are mid-layout being done by those methods instead.
      
              Reviewed by Oliver Hunt
      
              Added fast/repaint/dynamic-table-vertical-alignment-change.html
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::collapseMargins):
              (WebCore::RenderBlock::clearFloatsIfNeeded):
              (WebCore::RenderBlock::layoutBlockChildren):
              (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
              * rendering/RenderBlock.h:
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::removeFromObjectLists):
              * rendering/RenderObject.h:
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::layoutRows):
      
      LayoutTests:
      
      2009-01-25  David Hyatt  <hyatt@apple.com>
      
              Add layout test for https://bugs.webkit.org/show_bug.cgi?id=23524.
      
              Reviewed by Oliver Hunt
      
              * fast/repaint/dynamic-table-vertical-alignment-change.html: Added.
              * platform/mac/fast/repaint/dynamic-table-vertical-alignment-change-expected.checksum: Added.
              * platform/mac/fast/repaint/dynamic-table-vertical-alignment-change-expected.png: Added.
              * platform/mac/fast/repaint/dynamic-table-vertical-alignment-change-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b2cd1fe
    • darin@apple.com's avatar
      JavaScriptCore: · ba165bd3
      darin@apple.com authored
      2009-01-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Bug 23352: Turn on more compiler warnings in the Mac build
              https://bugs.webkit.org/show_bug.cgi?id=23352
      
              Fourth patch: Deal with the last few stray warnings.
      
              * parser/Parser.cpp: Only declare jscyyparse if it's not already declared.
              This makes both separate compilation and all-in-one compilation work with the
              -Wredundant-decls warning.
      
      WebCore:
      
      2009-01-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Bug 23352: Turn on more compiler warnings in the Mac build
              https://bugs.webkit.org/show_bug.cgi?id=23352
      
              Fourth patch: Deal with the last few stray warnings.
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::firstLineBlock): Handle the const_cast a little better.
              Also make the local variable be a RenderBlock so the cast is closer to the code
              that guarantees it's correct.
      
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::writeStyle): Put the enum into a local variable that's a built-in
              type before using it with TextStream, so we don't get a warning due to -Wsign-promo.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba165bd3
    • darin@apple.com's avatar
      WebCore: · 36744d67
      darin@apple.com authored
      2009-01-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Bug 23522: use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              Step one: RenderText.
      
              Also change set of RenderFlow* to be a ListHashSet as the comment in the
              header indicated.
      
              * dom/CharacterData.cpp:
              (WebCore::CharacterData::setData): Use toRenderText.
              (WebCore::CharacterData::appendData): Ditto.
              (WebCore::CharacterData::insertData): Ditto.
              (WebCore::CharacterData::deleteData): Ditto.
              (WebCore::CharacterData::replaceData): Ditto.
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::getUpperLeftCorner): Ditto.
              (WebCore::ContainerNode::getLowerRightCorner): Ditto.
              * dom/Position.cpp:
              (WebCore::nextRenderedEditable): Ditto.
              (WebCore::previousRenderedEditable): Ditto.
              (WebCore::Position::renderedOffset): Ditto. Also use function members
              instead of data members of InlineTextBox.
              (WebCore::Position::upstream): Ditto.
              (WebCore::Position::downstream): Ditto.
              (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): Ditto.
              (WebCore::Position::inRenderedText): Ditto.
              (WebCore::Position::isRenderedCharacter): Ditto.
              (WebCore::searchAheadForBetterMatch): Ditto.
              (WebCore::Position::getInlineBoxAndOffset): Ditto.
      
              * dom/Range.cpp: Added include of VisiblePosition.h now that it's no longer
              included in RenderObject.h.
      
              * dom/Text.cpp:
              (WebCore::Text::splitText): Use toRenderText.
              (WebCore::Text::recalcStyle): Ditto.
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::debugRenderer): Ditto.
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::handleTextNode): Ditto.
              (WebCore::TextIterator::handleTextBox): Ditto.
              (WebCore::TextIterator::emitText): Ditto.
              (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Ditto.
      
              * editing/VisiblePosition.cpp: Added include of FloatQuad.h now that it's
              no longer included in RenderObject.h.
              * inspector/InspectorController.cpp: Ditto.
              * page/Frame.cpp: Ditto.
              * rendering/RenderBox.cpp: Ditto.
              * rendering/RenderInline.cpp: Ditto.
              * rendering/RenderPath.cpp: Ditto.
              * rendering/RenderSVGContainer.cpp: Ditto.
              * rendering/RenderSVGImage.cpp: Ditto.
              * rendering/RenderSVGInlineText.cpp: Ditto.
              * rendering/RenderSVGTSpan.cpp: Ditto.
              * rendering/RenderSVGText.cpp: Ditto.
              * rendering/RenderSVGTextPath.cpp: Ditto.
              * rendering/RenderTableCell.cpp: Ditto.
              * rendering/RenderView.cpp: Ditto.
      
              * editing/visible_units.cpp:
              (WebCore::startPositionForLine): Use function members instead of data
              members of InlineTextBox.
              (WebCore::endPositionForLine): Ditto.
              (WebCore::startOfParagraph): Use toRenderText.
              (WebCore::endOfParagraph): Ditto.
      
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use toRenderText.
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesHorizontally): Ditto.
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::deleteLine): Ditto.
              (WebCore::InlineTextBox::extractLine): Ditto.
              (WebCore::InlineTextBox::attachLine): Ditto.
              (WebCore::InlineTextBox::placeEllipsisBox): Ditto.
              (WebCore::InlineTextBox::paintDecoration): Ditto.
              (WebCore::InlineTextBox::paintCompositionUnderline): Ditto.
              (WebCore::InlineTextBox::offsetForPosition): Ditto.
              (WebCore::InlineTextBox::positionForOffset): Ditto.
      
              * rendering/InlineTextBox.h: Made most members private. Use toRenderText.
      
              * rendering/RenderArena.cpp:
              (WebCore::RenderArena::allocate): Use static_cast instead of C-style cast.
              (WebCore::RenderArena::free): Ditto.
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::addContinuationWithOutline): Use ListHashSet<RenderFlow*>
              instead of RenderFlowSequencedSet.
              (WebCore::RenderBlock::paintContinuationOutlines): Ditto.
              (WebCore::stripTrailingSpace): Ditto.
              (WebCore::RenderBlock::calcInlinePrefWidths): Ditto.
              (WebCore::RenderBlock::updateFirstLetter): Ditto.
      
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::addChild): Use toRenderText.
      
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::dirtyLinesFromChangedChild): Use ListHashSet<RenderFlow*>
              instead of RenderFlowSequencedSet.
              (WebCore::RenderFlow::paintLines): Ditto.
      
              * rendering/RenderMenuList.cpp: Removed some unneeded includes.
      
              * rendering/RenderMenuList.h: Added now-needed forward declaration of RenderText.
              Made more members private.
      
              * rendering/RenderObject.cpp: Updated includes.
              (WebCore::RenderObject::isEditable): Use toRenderText.
              (WebCore::RenderObject::positionForPoint): Made non-inline so we wouldn't have to
              include VisiblePosition.h in the header just for this.
      
              * rendering/RenderObject.h: Removed unneeded includes and forward declarations.
              Changed special vertical position values to be constants rather than an enum.
              Eliminated RenderFlowSequencedSet, and changed clients to use ListHashSet<RenderFlow*>.
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::findNextInlineTextBox): Use function members instead of
              data members of InlineTextBox.
              (WebCore::RenderText::positionForCoordinates): Ditto.
              (WebCore::isInlineFlowOrEmptyText): Use toRenderText.
              (WebCore::RenderText::previousCharacter): Use function members instead of
              data members of InlineTextBox.
              (WebCore::RenderText::position): Ditto.
              (WebCore::RenderText::caretMinOffset): Ditto.
              (WebCore::RenderText::caretMaxOffset): Ditto.
              (WebCore::RenderText::caretMaxRenderedOffset): Ditto.
      
              * rendering/RenderText.h: Added definition of toRenderText.
      
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::textWithHardLineBreaks): Use toRenderText.
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<): Use toRenderText and toRenderBox.
              (WebCore::writeTextRun): Ditto.
              (WebCore::write): Ditto.
      
              * rendering/bidi.cpp:
              (WebCore::InlineIterator::increment): Use toRenderText.
              (WebCore::InlineIterator::current): Ditto.
              (WebCore::checkMidpoints): Ditto.
              (WebCore::RenderBlock::computeHorizontalPositionsForLine): Ditto.
              (WebCore::RenderBlock::layoutInlineChildren): Ditto.
              (WebCore::RenderBlock::determineStartPosition): Ditto.
              (WebCore::shouldSkipWhitespaceAfterStartObject): Ditto.
              (WebCore::RenderBlock::findNextLineBreak): Ditto.
      
      WebKit/mac:
      
      2009-01-25  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              Bug 23522: use checked casts for render tree
              https://bugs.webkit.org/show_bug.cgi?id=23522
      
              Step one: RenderText.
      
              * WebView/WebRenderNode.mm:
              (copyRenderNode): Use toRenderText.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      36744d67
  3. 23 Jan, 2009 4 commits
    • hyatt@apple.com's avatar
      2009-01-23 David Hyatt <hyatt@apple.com> · 0c305637
      hyatt@apple.com authored
              Make toRenderBox a non-member function.  Rename toConstRenderBox to just also be called toRenderBox.
      
              Reviewed by Oliver Hunt
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::sizingBox):
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::getUpperLeftCorner):
              (WebCore::ContainerNode::getLowerRightCorner):
              * dom/Element.cpp:
              (WebCore::Element::scrollByUnits):
              * dom/Position.cpp:
              (WebCore::endsOfNodeAreVisuallyDistinctPositions):
              (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
              (WebCore::Position::isCandidate):
              * editing/DeleteButtonController.cpp:
              (WebCore::isDeletableElement):
              * editing/EditorCommand.cpp:
              (WebCore::verticalScrollDistance):
              * editing/TextIterator.cpp:
              (WebCore::shouldEmitExtraNewlineForNode):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::isKeyboardFocusable):
              * html/HTMLFormControlElement.cpp:
              (WebCore::HTMLFormControlElement::isFocusable):
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::width):
              (WebCore::HTMLFrameElementBase::height):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleMouseDraggedEvent):
              (WebCore::EventHandler::autoscrollTimerFired):
              (WebCore::EventHandler::updateAutoscrollRenderer):
              (WebCore::EventHandler::stopAutoscrollTimer):
              (WebCore::EventHandler::scrollOverflow):
              * page/FrameView.cpp:
              (WebCore::FrameView::layout):
              * page/animation/AnimationBase.cpp:
              (WebCore::blendFunc):
              * rendering/InlineBox.cpp:
              (WebCore::InlineBox::adjustPosition):
              * rendering/InlineBox.h:
              (WebCore::InlineBox::renderBox):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::clearFloats):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::offsetFromContainer):
              (WebCore::RenderBox::computeAbsoluteRepaintRect):
              (WebCore::RenderBox::containingBlockWidthForPositioned):
              (WebCore::RenderBox::containingBlockHeightForPositioned):
              (WebCore::RenderBox::calcAbsoluteHorizontal):
              (WebCore::RenderBox::calcAbsoluteVertical):
              (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
              (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
              * rendering/RenderBox.h:
              (WebCore::toRenderBox):
              (WebCore::RenderBox::previousSiblingBox):
              (WebCore::RenderBox::nextSiblingBox):
              (WebCore::RenderBox::parentBox):
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::absoluteClippedOverflowRect):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::updateLayerPosition):
              (WebCore::RenderLayer::resize):
              (WebCore::RenderLayer::boundingBox):
              * rendering/RenderObject.cpp:
              (WebCore::addLayers):
              (WebCore::RenderObject::removeLayers):
              (WebCore::RenderObject::moveLayers):
              (WebCore::RenderObject::findNextLayer):
              (WebCore::RenderObject::enclosingLayer):
              (WebCore::RenderObject::setNeedsLayout):
              (WebCore::RenderObject::setNeedsPositionedMovementLayout):
              (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
              (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
              (WebCore::RenderObject::computeAbsoluteRepaintRect):
              (WebCore::RenderObject::localToAbsolute):
              (WebCore::RenderObject::absoluteToLocal):
              (WebCore::RenderObject::localToAbsoluteQuad):
              (WebCore::RenderObject::offsetFromContainer):
              (WebCore::RenderObject::removeFromObjectLists):
              (WebCore::RenderObject::destroy):
              (WebCore::RenderObject::updateHitTestResult):
              (WebCore::RenderObject::addDashboardRegions):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::layoutRows):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::hitTestMediaControlPart):
              (WebCore::RenderTheme::baselinePosition):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::hitTestMediaControlPart):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::externalRepresentation):
              * rendering/bidi.cpp:
              (WebCore::inlineWidth):
              (WebCore::RenderBlock::computeHorizontalPositionsForLine):
              (WebCore::requiresLineBox):
              (WebCore::RenderBlock::findNextLineBreak):
              * svg/SVGLength.cpp:
              (WebCore::SVGLength::PercentageOfViewport):
              * wml/WMLAElement.cpp:
              (WebCore::WMLAElement::isKeyboardFocusable):
              * wml/WMLInputElement.cpp:
              (WebCore::isInputFocusable):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c305637
    • hyatt@apple.com's avatar
      2009-01-23 David Hyatt <hyatt@apple.com> · ee16394f
      hyatt@apple.com authored
              Move layer() into RenderBox and make it non-virtual.  Move all of the scrolling functions from RenderObject
              to RenderBox and devirtualize as many as possible.  Clean up styleWillChange to factor code specific to
              RenderBox and RenderBlock into their appropriate subclasses.  Stubbed out an empty styleWillChange on
              RenderText, since none of the work done in styleWillChange was relevant to text nodes.
      
              Reviewed by Sam Weinig
      
              * dom/Document.cpp:
              (WebCore::Document::elementFromPoint):
              (WebCore::Document::renderView):
              (WebCore::Document::prepareMouseEvent):
              * dom/Document.h:
              * dom/Element.cpp:
              (WebCore::Element::scrollByUnits):
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::contains):
              * html/HTMLMarqueeElement.cpp:
              (WebCore::HTMLMarqueeElement::start):
              (WebCore::HTMLMarqueeElement::stop):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::topRenderer):
              (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
              (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
              * page/AccessibilityRenderObject.h:
              * page/EventHandler.cpp:
              (WebCore::scrollAndAcceptEvent):
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::handleMouseDraggedEvent):
              (WebCore::EventHandler::updateSelectionForMouseDrag):
              (WebCore::EventHandler::autoscrollTimerFired):
              (WebCore::EventHandler::updateAutoscrollRenderer):
              (WebCore::EventHandler::stopAutoscrollTimer):
              (WebCore::EventHandler::scrollOverflow):
              (WebCore::EventHandler::handleWheelEvent):
              (WebCore::EventHandler::hoverTimerFired):
              * page/Frame.cpp:
              (WebCore::Frame::clearTimers):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::styleWillChange):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::styleWillChange):
              (WebCore::RenderBox::verticalScrollbarWidth):
              (WebCore::RenderBox::horizontalScrollbarHeight):
              (WebCore::RenderBox::scroll):
              (WebCore::RenderBox::canBeProgramaticallyScrolled):
              (WebCore::RenderBox::autoscroll):
              (WebCore::RenderBox::panScroll):
              (WebCore::RenderBox::offsetFromContainer):
              (WebCore::RenderBox::computeAbsoluteRepaintRect):
              * rendering/RenderBox.h:
              (WebCore::RenderBox::layer):
              (WebCore::RenderBox::requiresLayer):
              (WebCore::RenderBox::stopAutoscroll):
              (WebCore::RenderBox::hasAutoVerticalScrollbar):
              (WebCore::RenderBox::hasAutoHorizontalScrollbar):
              (WebCore::RenderBox::scrollsOverflow):
              (WebCore::RenderBox::scrollsOverflowX):
              (WebCore::RenderBox::scrollsOverflowY):
              (WebCore::RenderBox::includeVerticalScrollbarSize):
              (WebCore::RenderBox::includeHorizontalScrollbarSize):
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::absoluteClippedOverflowRect):
              (WebCore::RenderFlow::addFocusRingRects):
              * rendering/RenderForeignObject.cpp:
              * rendering/RenderForeignObject.h:
              (WebCore::RenderForeignObject::requiresLayer):
              * rendering/RenderInline.cpp:
              * rendering/RenderInline.h:
              (WebCore::RenderInline::requiresLayer):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::childrenClipRect):
              (WebCore::RenderLayer::selfClipRect):
              * rendering/RenderListBox.cpp:
              * rendering/RenderListBox.h:
              * rendering/RenderObject.cpp:
              (WebCore::addLayers):
              (WebCore::RenderObject::removeLayers):
              (WebCore::RenderObject::moveLayers):
              (WebCore::RenderObject::findNextLayer):
              (WebCore::RenderObject::enclosingLayer):
              (WebCore::RenderObject::setNeedsLayout):
              (WebCore::RenderObject::setNeedsPositionedMovementLayout):
              (WebCore::RenderObject::computeAbsoluteRepaintRect):
              (WebCore::RenderObject::styleWillChange):
              (WebCore::RenderObject::localToAbsolute):
              (WebCore::RenderObject::absoluteToLocal):
              (WebCore::RenderObject::localToAbsoluteQuad):
              (WebCore::RenderObject::offsetFromContainer):
              (WebCore::RenderObject::destroy):
              * rendering/RenderObject.h:
              * rendering/RenderPath.cpp:
              * rendering/RenderPath.h:
              (WebCore::RenderPath::requiresLayer):
              * rendering/RenderReplica.h:
              (WebCore::RenderReplica::requiresLayer):
              * rendering/RenderSVGContainer.cpp:
              * rendering/RenderSVGContainer.h:
              (WebCore::RenderSVGContainer::requiresLayer):
              * rendering/RenderSVGHiddenContainer.cpp:
              * rendering/RenderSVGHiddenContainer.h:
              (WebCore::RenderSVGHiddenContainer::requiresLayer):
              * rendering/RenderSVGImage.cpp:
              * rendering/RenderSVGImage.h:
              (WebCore::RenderSVGImage::requiresLayer):
              * rendering/RenderSVGInline.h:
              (WebCore::RenderSVGInline::requiresLayer):
              * rendering/RenderSVGInlineText.h:
              (WebCore::RenderSVGInlineText::requiresLayer):
              * rendering/RenderSVGText.cpp:
              * rendering/RenderSVGText.h:
              (WebCore::RenderSVGText::requiresLayer):
              * rendering/RenderScrollbarPart.h:
              (WebCore::RenderScrollbarPart::requiresLayer):
              * rendering/RenderSlider.cpp:
              (WebCore::RenderSlider::setCurrentPosition):
              * rendering/RenderTableCell.cpp:
              * rendering/RenderTableCell.h:
              (WebCore::RenderTableCell::requiresLayer):
              * rendering/RenderTableCol.h:
              (WebCore::RenderTableCol::requiresLayer):
              * rendering/RenderTableRow.h:
              (WebCore::RenderTableRow::requiresLayer):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::layoutRows):
              * rendering/RenderText.h:
              (WebCore::RenderText::styleWillChange):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::autoscroll):
              (WebCore::RenderTextControl::scroll):
              * rendering/RenderTextControl.h:
              * rendering/RenderTreeAsText.cpp:
              (WebCore::write):
              (WebCore::externalRepresentation):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee16394f
    • andersca@apple.com's avatar
      2009-01-23 Anders Carlsson <andersca@apple.com> · d8dda094
      andersca@apple.com authored
              Reviewed by Sam Weinig.
      
              Turn on -Wmissing-prototypes and fix the resulting warnings.
              
              * Configurations/Base.xcconfig:
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::nonCachingStaticBackFunctionGetter):
              (WebCore::nonCachingStaticForwardFunctionGetter):
              (WebCore::nonCachingStaticGoFunctionGetter):
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::nonCachingStaticReplaceFunctionGetter):
              (WebCore::nonCachingStaticReloadFunctionGetter):
              (WebCore::nonCachingStaticAssignFunctionGetter):
              (WebCore::JSLocation::customGetOwnPropertySlot):
              * bindings/objc/DOMRGBColor.mm:
              (WebCore::getWrapperForRGB):
              (WebCore::setWrapperForRGB):
              (WebCore::removeWrapperForRGB):
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::globalExceptionString):
              * bridge/runtime_object.cpp:
              (JSC::callRuntimeConstructor):
              * css/CSSParser.cpp:
              (WebCore::parseGradientColorStop):
              * css/CSSPrimitiveValue.cpp:
              (WebCore::scaleFactorForConversion):
              * css/CSSStyleSelector.cpp:
              (WebCore::operator >):
              (WebCore::operator <=):
              (WebCore::getTransformOperationType):
              * dom/make_names.pl:
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::updatePositionForTextRemoval):
              * editing/EditorCommand.cpp:
              (WebCore::valueBackColor):
              (WebCore::valueFontName):
              (WebCore::valueFontSize):
              (WebCore::valueFontSizeDelta):
              (WebCore::valueForeColor):
              * editing/VisiblePosition.cpp:
              (WebCore::canonicalizeCandidate):
              * editing/htmlediting.cpp:
              * editing/markup.cpp:
              (WebCore::joinMarkups):
              * html/HTMLElement.cpp:
              (WebCore::inlineTagList):
              (WebCore::blockTagList):
              * html/HTMLMediaElement.cpp:
              (WebCore::serializeTimeOffset):
              (WebCore::parseTimeOffset):
              * page/mac/FrameMac.mm:
              (WebCore::regExpForLabels):
              * platform/Arena.cpp:
              * platform/graphics/Color.cpp:
              (WebCore::colorFloatToRGBAByte):
              * platform/graphics/cg/ImageSourceCG.cpp:
              (WebCore::imageSourceOptions):
              * platform/graphics/cg/PathCG.cpp:
              (WebCore::CGPathApplierToPathApplier):
              * platform/graphics/mac/SimpleFontDataMac.mm:
              (WebCore::initFontData):
              * platform/mac/PlatformMouseEventMac.mm:
              * platform/text/String.cpp:
              * rendering/RenderBlock.cpp:
              (WebCore::continuationOutlineTable):
              (WebCore::getHeightForLineCount):
              * rendering/RenderView.cpp:
              (WebCore::rendererAfterPosition):
              * rendering/RootInlineBox.cpp:
              (WebCore::isEditableLeaf):
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::hasFractions):
              * rendering/style/RenderStyle.cpp:
              (WebCore::positionedObjectMoved):
              * svg/SVGFont.cpp:
              (WebCore::floatWidthUsingSVGFontCallback):
              (WebCore::floatWidthMissingGlyphCallback):
              (WebCore::drawTextUsingSVGFontCallback):
              (WebCore::drawTextMissingGlyphCallback):
              * svg/SVGTransformable.cpp:
              (WebCore::parseTransformParamList):
              * svg/graphics/SVGPaintServerGradient.cpp:
              (WebCore::operator<<):
              * xml/XPathGrammar.y:
              * xml/XSLTExtensions.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8dda094
    • hyatt@apple.com's avatar
      2009-01-22 David Hyatt <hyatt@apple.com> · 55fe6bdd
      hyatt@apple.com authored
              Move the border and padding methods from RenderObject to RenderBox.
      
              Reviewed by Oliver Hunt
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * editing/DeleteButtonController.cpp:
              (WebCore::DeleteButtonController::createDeletionUI):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::hitTestResultAtPoint):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesVertically):
              * rendering/InlineFlowBox.h:
              (WebCore::InlineFlowBox::borderLeft):
              (WebCore::InlineFlowBox::borderRight):
              (WebCore::InlineFlowBox::paddingLeft):
              (WebCore::InlineFlowBox::paddingRight):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::clearFloats):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::paddingTop):
              (WebCore::RenderBox::paddingBottom):
              (WebCore::RenderBox::paddingLeft):
              (WebCore::RenderBox::paddingRight):
              (WebCore::RenderBox::calcHeight):
              (WebCore::RenderBox::containingBlockWidthForPositioned):
              (WebCore::RenderBox::containingBlockHeightForPositioned):
              (WebCore::RenderBox::calcAbsoluteHorizontal):
              (WebCore::RenderBox::calcAbsoluteHorizontalValues):
              (WebCore::RenderBox::calcAbsoluteVertical):
              (WebCore::RenderBox::calcAbsoluteVerticalValues):
              (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
              (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
              * rendering/RenderBox.h:
              (WebCore::RenderBox::borderTop):
              (WebCore::RenderBox::borderBottom):
              (WebCore::RenderBox::borderLeft):
              (WebCore::RenderBox::borderRight):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
              * rendering/RenderObject.h:
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::textBlockWidth):
              (WebCore::RenderTextControl::calcHeight):
              (WebCore::RenderTextControl::calcPrefWidths):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::preferredContentWidth):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::repaintViewRectangle):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55fe6bdd
  4. 22 Jan, 2009 3 commits
    • hyatt@apple.com's avatar
      2009-01-22 David Hyatt <hyatt@apple.com> · 774bbed5
      hyatt@apple.com authored
              Devirtualize the marginTop/Right/Left/Bottom functions and move them to RenderBox (along with some of the
              other margin functions that have to come along for the ride).
      
              Reviewed by Oliver Hunt
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * editing/TextIterator.cpp:
              (WebCore::shouldEmitExtraNewlineForNode):
              * rendering/InlineBox.cpp:
              * rendering/InlineBox.h:
              (WebCore::InlineBox::renderBox):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::marginLeft):
              (WebCore::InlineFlowBox::marginRight):
              (WebCore::InlineFlowBox::placeBoxesHorizontally):
              (WebCore::InlineFlowBox::computeLogicalBoxHeights):
              (WebCore::InlineFlowBox::placeBoxesVertically):
              (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::isSelfCollapsingBlock):
              (WebCore::RenderBlock::adjustPositionedBlock):
              (WebCore::RenderBlock::handleCompactChild):
              (WebCore::RenderBlock::estimateVerticalPosition):
              (WebCore::getBorderPaddingMargin):
              (WebCore::RenderBlock::calcInlinePrefWidths):
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::calcHeight):
              * rendering/RenderBox.h:
              (WebCore::RenderBox::hasHorizontalBordersPaddingOrMargin):
              (WebCore::RenderBox::hasHorizontalBordersOrPadding):
              (WebCore::RenderBox::marginTop):
              (WebCore::RenderBox::marginBottom):
              (WebCore::RenderBox::marginLeft):
              (WebCore::RenderBox::marginRight):
              (WebCore::RenderBox::isSelfCollapsingBlock):
              (WebCore::RenderBox::collapsedMarginTop):
              (WebCore::RenderBox::collapsedMarginBottom):
              (WebCore::RenderBox::isTopMarginQuirk):
              (WebCore::RenderBox::isBottomMarginQuirk):
              (WebCore::RenderBox::maxTopMargin):
              (WebCore::RenderBox::maxBottomMargin):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
              * rendering/RenderObject.h:
              * rendering/RenderSVGContainer.cpp:
              (WebCore::RenderSVGContainer::lineHeight):
              (WebCore::RenderSVGContainer::baselinePosition):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::calcHeight):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::baselinePosition):
              * rendering/bidi.cpp:
              (WebCore::getBorderPaddingMargin):
              (WebCore::inlineWidth):
              (WebCore::RenderBlock::computeHorizontalPositionsForLine):
              (WebCore::inlineFlowRequiresLineBox):
              (WebCore::requiresLineBox):
              (WebCore::RenderBlock::findNextLineBreak):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      774bbed5
    • hyatt@apple.com's avatar
      2009-01-22 David Hyatt <hyatt@apple.com> · a97f4677
      hyatt@apple.com authored
              Properly encapsulate m_frameRect.y() behind the RenderBox::y() method now that they are the same thing.
              Make m_frameRect private.
      
              Reviewed by Oliver Hunt
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paint):
              (WebCore::RenderBlock::clearFloats):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::offsetTop):
              (WebCore::RenderBox::nodeAtPoint):
              (WebCore::RenderBox::paint):
              (WebCore::RenderBox::paintCustomHighlight):
              (WebCore::RenderBox::containingBlockWidth):
              (WebCore::RenderBox::localToAbsolute):
              (WebCore::RenderBox::offsetFromContainer):
              (WebCore::RenderBox::computeAbsoluteRepaintRect):
              (WebCore::RenderBox::repaintDuringLayoutIfMoved):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::layout):
              * rendering/RenderFlexibleBox.cpp:
              (WebCore::RenderFlexibleBox::layoutBlock):
              * rendering/RenderFrameSet.cpp:
              (WebCore::RenderFrameSet::paint):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::paintReplaced):
              (WebCore::RenderImage::nodeAtPoint):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::paint):
              (WebCore::RenderListMarker::getRelativeMarkerRect):
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::paint):
              (WebCore::RenderReplaced::shouldPaint):
              * rendering/RenderReplica.cpp:
              (WebCore::RenderReplica::paint):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::applyContentTransforms):
              (WebCore::RenderSVGRoot::paint):
              (WebCore::RenderSVGRoot::absoluteTransform):
              (WebCore::RenderSVGRoot::nodeAtPoint):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::calcWidth):
              (WebCore::RenderTable::layout):
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::paint):
              (WebCore::RenderTableCell::paintBackgroundsBehindCell):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::setCellWidths):
              (WebCore::RenderTableSection::calcRowHeight):
              (WebCore::RenderTableSection::layoutRows):
              (WebCore::RenderTableSection::paint):
              (WebCore::RenderTableSection::nodeAtPoint):
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::paint):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a97f4677
    • hyatt@apple.com's avatar
      2009-01-22 David Hyatt <hyatt@apple.com> · 0bf6c84c
      hyatt@apple.com authored
              Fix for https://bugs.webkit.org/show_bug.cgi?id=23487.
      
              This patch completely reworks vertical alignment of table cells.  The current system uses methods called borderTopExtra() and borderBottomExtra() to
              add extra space above and below the content of a cell.  This system was not confined to the table code and spilled out into all the other RenderObjects.
              The y-position of the table cell box was set to the outer edge of the cell, but the y() method of RenderBox lied and added in borderTopExtra().  height()
              also excluded the extra space, so did not accurately reflect the true size of the cell.
              
              With the new system, the table cell box is completely accurate.  The extra space becomes part of the padding of the cell.  Padding has been reworked so that
              additional intrinsic padding can be added on to the specified padding from style.  Only the table code has to deal with the extra cell padding.
      
              localToAbsoluteForContent has now been removed, since there no longer has to be a special hacked content box.
      
              A number of table layout tests progress with this change, since the new layout system actually fixes existing bugs in baseline alignment of cells.
      
              Reviewed by Oliver Hunt
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              Make CSSComputedStyleDeclaration ask for padding values that exclude the built-in intrinsic padding.  This ensures that getComputedStyle continues
              to give the right answer.
          
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::getLowerRightCorner):
              * editing/visible_units.cpp:
              (WebCore::previousLinePosition):
              (WebCore::nextLinePosition):
              * rendering/LayoutState.cpp:
              (WebCore::LayoutState::LayoutState):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
              
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::overflowRect):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
              
              (WebCore::RenderBlock::layoutBlock):
              (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
              The expandsToEncloseOverhangingFloats logic has been reworked.  Table cells and fieldsets did not properly handle floats that spilled into the bottom padding.  The
              resulting box needed to not only expand to encompass the float, but also needed to place the full bottom padding after the float.  The switch to make the extra table cell
              space into padding exposed this issue.  No extra layout test is required, since an existing table layout test exposes this issue and progresses to match Firefox with
              this change.
          
              (WebCore::RenderBlock::selectionGapRects):
              (WebCore::RenderBlock::paintSelection):
              (WebCore::RenderBlock::fillSelectionGaps):
              (WebCore::RenderBlock::nodeAtPoint):
              (WebCore::RenderBlock::positionForCoordinates):
              (WebCore::RenderBlock::offsetForContents):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
          
              * rendering/RenderBlock.h:
              Add the new simplified method for expanding to encompass overhanging floats.  The method has been devirtualized and made to include all of the cases (and not just a subset).
      
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::absoluteRects):
              (WebCore::RenderBox::absoluteQuads):
              (WebCore::RenderBox::absoluteContentBox):
              (WebCore::RenderBox::paintBoxDecorations):
              (WebCore::RenderBox::paintMask):
              (WebCore::RenderBox::getOverflowClipRect):
              (WebCore::RenderBox::localToAbsolute):
              (WebCore::RenderBox::absoluteToLocal):
              (WebCore::RenderBox::localToAbsoluteQuad):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
              
              * rendering/RenderBox.h:
              (WebCore::RenderBox::y):
              (WebCore::RenderBox::location):
              (WebCore::RenderBox::borderBoxRect):
              (WebCore::RenderBox::offsetHeight):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
      
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::addLineBoxRects):
              * rendering/RenderFieldset.cpp:
              (WebCore::RenderFieldset::paintBoxDecorations):
              (WebCore::RenderFieldset::paintMask):
              * rendering/RenderFieldset.h:
              (WebCore::RenderFieldset::avoidsFloats):
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::localCaretRect):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::updateLayerPosition):
              (WebCore::RenderLayer::paintLayer):
              (WebCore::RenderLayer::hitTestLayer):
              (WebCore::RenderLayer::boundingBox):
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::isPointInOverflowControl):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::localToAbsolute):
              (WebCore::RenderObject::absoluteToLocal):
              (WebCore::RenderObject::localToAbsoluteQuad):
              (WebCore::RenderObject::offsetFromContainer):
              (WebCore::RenderObject::paddingTop):
              (WebCore::RenderObject::paddingBottom):
              (WebCore::RenderObject::paddingLeft):
              (WebCore::RenderObject::paddingRight):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::hasOverhangingFloats):
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::selectionRect):
              (WebCore::RenderReplaced::localSelectionRect):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.  Also modifed paddingLeft/Top/Right/Bottom to take an argument indicating
              whether or not the intrinsic padding of an object should be included (by default it is).  getComputedStyle needs to exclude it, which is why this argument is
              necessary.
      
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::RenderTableCell):
              (WebCore::RenderTableCell::paddingTop):
              (WebCore::RenderTableCell::paddingBottom):
              The new paddingTop() and paddingBottom() methods on table cells include the extra intrinsic padding.
          
              (WebCore::RenderTableCell::setOverrideSize):
              When a table's override size gets altered, the intrinsic padding needs to be cleared.
              
              (WebCore::RenderTableCell::absoluteClippedOverflowRect):
              (WebCore::RenderTableCell::computeAbsoluteRepaintRect):
              (WebCore::RenderTableCell::baselinePosition):
              (WebCore::RenderTableCell::paint):
              (WebCore::RenderTableCell::paintBackgroundsBehindCell):
              (WebCore::RenderTableCell::paintBoxDecorations):
              (WebCore::RenderTableCell::paintMask):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
              
              * rendering/RenderTableCell.h:
              (WebCore::RenderTableCell::setIntrinsicPaddingTop):
              (WebCore::RenderTableCell::setIntrinsicPaddingBottom):
              (WebCore::RenderTableCell::setIntrinsicPadding):
              (WebCore::RenderTableCell::clearIntrinsicPadding):
              (WebCore::RenderTableCell::intrinsicPaddingTop):
              (WebCore::RenderTableCell::intrinsicPaddingBottom):
              Add new helper methods for getting/setting a cell's intrinsic padding.
          
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::calcRowHeight):
              calcRowHeight has been modified to exclude the intrinsic padding when calculating the base height of rows prior to flexing.  Because a cell now includes that
              extra space, it has to be subtracted out in this method.
              
              (WebCore::RenderTableSection::layoutRows):
              Modify the code that sets up the intrinsic padding so that it does a relayout if the intrinsic padding changes.   There was also an error where the baseline
              position mismatched leading to negative intrinsic padding being added in (this error exists in ToT).  The code now properly ignores cells that don't establish
              a baseline.  A number of tests progress with this change.
              
              * rendering/RenderText.cpp:
              (WebCore::RenderText::addLineBoxRects):
              Remove borderTopExtra()/borderBottomExtra() hacks and localToAbsoluteForContent calls.
              
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<):
              (WebCore::writeTextRun):
              Modify the render tree dumping code to continue to produce the same results as before.  This is really a hack, since we're now capable of indicating the correct
              position for the descendants of cells with intrinsic padding (and also indicating what the correct cell box is).  A future patch can remove these hacks so that the
              layout test results can all be regenerated.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0bf6c84c
  5. 21 Jan, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: · d885df72
      hyatt@apple.com authored
      2009-01-21  David Hyatt  <hyatt@apple.com>
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=23453
      
              Devirtualize the width/height/x/y methods of the render tree.  The methods are now non-virtual on RenderBox.
              Many functions that were previously in RenderObject.cpp are now in RenderBox.cpp.
      
              Reviewed by Eric Seidel and Darin Adler
      
              * WebCore.base.exp:
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::sizingBox):
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::getUpperLeftCorner):
              (WebCore::ContainerNode::getLowerRightCorner):
              * dom/Element.cpp:
              (WebCore::Element::offsetLeft):
              (WebCore::Element::offsetTop):
              (WebCore::Element::offsetWidth):
              (WebCore::Element::offsetHeight):
              (WebCore::Element::offsetParent):
              (WebCore::Element::clientLeft):
              (WebCore::Element::clientTop):
              (WebCore::Element::clientWidth):
              (WebCore::Element::clientHeight):
              (WebCore::Element::scrollLeft):
              (WebCore::Element::scrollTop):
              (WebCore::Element::setScrollLeft):
              (WebCore::Element::setScrollTop):
              (WebCore::Element::scrollWidth):
              (WebCore::Element::scrollHeight):
              * dom/Node.cpp:
              (WebCore::Node::renderBox):
              (WebCore::Node::getRect):
              * dom/Node.h:
              * dom/Position.cpp:
              (WebCore::endsOfNodeAreVisuallyDistinctPositions):
              (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
              (WebCore::Position::isCandidate):
              * dom/PositionIterator.cpp:
              (WebCore::PositionIterator::isCandidate):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
              * editing/DeleteButtonController.cpp:
              (WebCore::isDeletableElement):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removeNode):
              * editing/Editor.cpp:
              (WebCore::Editor::insideVisibleArea):
              * editing/EditorCommand.cpp:
              (WebCore::verticalScrollDistance):
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::isKeyboardFocusable):
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::willDraw):
              * html/HTMLFormControlElement.cpp:
              (WebCore::HTMLFormControlElement::isFocusable):
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::width):
              (WebCore::HTMLFrameElementBase::height):
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::width):
              (WebCore::HTMLImageElement::height):
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::drawNodeHighlight):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
              * page/FrameView.cpp:
              (WebCore::FrameView::createScrollbar):
              (WebCore::FrameView::updateDashboardRegions):
              * page/animation/AnimationBase.cpp:
              (WebCore::blendFunc):
              * rendering/HitTestResult.cpp:
              (WebCore::HitTestResult::imageRect):
              * rendering/InlineBox.cpp:
              (WebCore::InlineBox::renderBox):
              (WebCore::InlineBox::adjustPosition):
              * rendering/InlineBox.h:
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::placeBoxesHorizontally):
              (WebCore::InlineFlowBox::verticallyAlignBoxes):
              (WebCore::InlineFlowBox::placeBoxesVertically):
              * rendering/InlineFlowBox.h:
              * rendering/RenderApplet.cpp:
              (WebCore::RenderApplet::createWidgetIfNecessary):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::overflowHeight):
              (WebCore::RenderBlock::overflowWidth):
              (WebCore::RenderBlock::overflowRect):
              (WebCore::RenderBlock::isSelfCollapsingBlock):
              (WebCore::RenderBlock::layout):
              (WebCore::RenderBlock::layoutBlock):
              (WebCore::RenderBlock::adjustPositionedBlock):
              (WebCore::RenderBlock::adjustFloatingBlock):
              (WebCore::RenderBlock::handleSpecialChild):
              (WebCore::RenderBlock::handlePositionedChild):
              (WebCore::RenderBlock::handleFloatingChild):
              (WebCore::RenderBlock::handleCompactChild):
              (WebCore::RenderBlock::insertCompactIfNeeded):
              (WebCore::RenderBlock::handleRunInChild):
              (WebCore::RenderBlock::collapseMargins):
              (WebCore::RenderBlock::clearFloatsIfNeeded):
              (WebCore::RenderBlock::estimateVerticalPosition):
              (WebCore::RenderBlock::determineHorizontalPosition):
              (WebCore::RenderBlock::handleBottomOfBlock):
              (WebCore::RenderBlock::layoutBlockChildren):
              (WebCore::RenderBlock::layoutOnlyPositionedObjects):
              (WebCore::RenderBlock::layoutPositionedObjects):
              (WebCore::RenderBlock::markPositionedObjectsForLayout):
              (WebCore::RenderBlock::repaintOverhangingFloats):
              (WebCore::RenderBlock::paint):
              (WebCore::RenderBlock::paintChildren):
              (WebCore::RenderBlock::paintObject):
              (WebCore::RenderBlock::paintFloats):
              (WebCore::RenderBlock::paintContinuationOutlines):
              (WebCore::clipOutPositionedObjects):
              (WebCore::RenderBlock::fillSelectionGaps):
              (WebCore::RenderBlock::fillBlockSelectionGaps):
              (WebCore::RenderBlock::leftSelectionOffset):
              (WebCore::RenderBlock::rightSelectionOffset):
              (WebCore::RenderBlock::insertPositionedObject):
              (WebCore::RenderBlock::removePositionedObject):
              (WebCore::RenderBlock::removePositionedObjects):
              (WebCore::RenderBlock::insertFloatingObject):
              (WebCore::RenderBlock::removeFloatingObject):
              (WebCore::RenderBlock::positionNewFloats):
              (WebCore::RenderBlock::newLine):
              (WebCore::RenderBlock::lowestPosition):
              (WebCore::RenderBlock::rightmostPosition):
              (WebCore::RenderBlock::leftmostPosition):
              (WebCore::RenderBlock::clearFloats):
              (WebCore::RenderBlock::addOverhangingFloats):
              (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
              (WebCore::RenderBlock::getClearDelta):
              (WebCore::RenderBlock::nodeAtPoint):
              (WebCore::RenderBlock::positionForCoordinates):
              (WebCore::RenderBlock::layoutColumns):
              (WebCore::RenderBlock::getBaselineOfFirstLineBox):
              (WebCore::RenderBlock::getBaselineOfLastLineBox):
              (WebCore::getHeightForLineCount):
              (WebCore::RenderBlock::adjustForBorderFit):
              * rendering/RenderBlock.h:
              (WebCore::RenderBlock::FloatWithRect::FloatWithRect):
              (WebCore::RenderBlock::hasOverhangingFloats):
              (WebCore::RenderBlock::CompactInfo::compact):
              (WebCore::RenderBlock::CompactInfo::set):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::RenderBox):
              (WebCore::RenderBox::offsetLeft):
              (WebCore::RenderBox::offsetTop):
              (WebCore::RenderBox::offsetParent):
              (WebCore::RenderBox::clientWidth):
              (WebCore::RenderBox::clientHeight):
              (WebCore::RenderBox::scrollWidth):
              (WebCore::RenderBox::scrollHeight):
              (WebCore::RenderBox::scrollLeft):
              (WebCore::RenderBox::scrollTop):
              (WebCore::RenderBox::setScrollLeft):
              (WebCore::RenderBox::setScrollTop):
              (WebCore::RenderBox::absoluteRects):
              (WebCore::RenderBox::absoluteQuads):
              (WebCore::RenderBox::absoluteContentBox):
              (WebCore::RenderBox::absoluteContentQuad):
              (WebCore::RenderBox::absoluteOutlineBounds):
              (WebCore::RenderBox::addFocusRingRects):
              (WebCore::RenderBox::reflectionBox):
              (WebCore::RenderBox::reflectionOffset):
              (WebCore::RenderBox::reflectedRect):
              (WebCore::RenderBox::overrideWidth):
              (WebCore::RenderBox::overrideHeight):
              (WebCore::RenderBox::nodeAtPoint):
              (WebCore::RenderBox::paint):
              (WebCore::RenderBox::maskClipRect):
              (WebCore::RenderBox::repaintLayerRectsForImage):
              (WebCore::RenderBox::paintCustomHighlight):
              (WebCore::RenderBox::getOverflowClipRect):
              (WebCore::RenderBox::getClipRect):
              (WebCore::RenderBox::containingBlockWidth):
              (WebCore::RenderBox::localToAbsolute):
              (WebCore::RenderBox::offsetFromContainer):
              (WebCore::RenderBox::position):
              (WebCore::RenderBox::computeAbsoluteRepaintRect):
              (WebCore::RenderBox::repaintDuringLayoutIfMoved):
              (WebCore::RenderBox::calcWidth):
              (WebCore::RenderBox::calcWidthUsing):
              (WebCore::RenderBox::calcHorizontalMargins):
              (WebCore::RenderBox::calcHeight):
              (WebCore::RenderBox::calcPercentageHeight):
              (WebCore::RenderBox::calcReplacedHeightUsing):
              (WebCore::RenderBox::containingBlockWidthForPositioned):
              (WebCore::RenderBox::containingBlockHeightForPositioned):
              (WebCore::RenderBox::calcAbsoluteHorizontal):
              (WebCore::RenderBox::calcAbsoluteVertical):
              (WebCore::RenderBox::calcAbsoluteVerticalValues):
              (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
              (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
              (WebCore::RenderBox::localCaretRect):
              (WebCore::RenderBox::lowestPosition):
              (WebCore::RenderBox::rightmostPosition):
              (WebCore::RenderBox::leftmostPosition):
              (WebCore::RenderBox::localTransform):
              * rendering/RenderBox.h:
              (WebCore::):
              (WebCore::RenderBox::x):
              (WebCore::RenderBox::y):
              (WebCore::RenderBox::width):
              (WebCore::RenderBox::height):
              (WebCore::RenderBox::setX):
              (WebCore::RenderBox::setY):
              (WebCore::RenderBox::setWidth):
              (WebCore::RenderBox::setHeight):
              (WebCore::RenderBox::location):
              (WebCore::RenderBox::size):
              (WebCore::RenderBox::setLocation):
              (WebCore::RenderBox::setSize):
              (WebCore::RenderBox::move):
              (WebCore::RenderBox::frameRect):
              (WebCore::RenderBox::setFrameRect):
              (WebCore::RenderBox::borderBoxRect):
              (WebCore::RenderBox::contentBoxRect):
              (WebCore::RenderBox::previousSiblingBox):
              (WebCore::RenderBox::nextSiblingBox):
              (WebCore::RenderBox::parentBox):
              (WebCore::RenderBox::overflowHeight):
              (WebCore::RenderBox::overflowWidth):
              (WebCore::RenderBox::setOverflowHeight):
              (WebCore::RenderBox::setOverflowWidth):
              (WebCore::RenderBox::overflowLeft):
              (WebCore::RenderBox::overflowTop):
              (WebCore::RenderBox::overflowRect):
              (WebCore::RenderBox::contentWidth):
              (WebCore::RenderBox::contentHeight):
              (WebCore::RenderBox::offsetWidth):
              (WebCore::RenderBox::offsetHeight):
              (WebCore::RenderBox::clientLeft):
              (WebCore::RenderBox::clientTop):
              (WebCore::RenderBox::availableWidth):
              (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
              * rendering/RenderButton.cpp:
              (WebCore::RenderButton::controlClipRect):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::layout):
              (WebCore::RenderContainer::positionForCoordinates):
              * rendering/RenderContainer.h:
              (WebCore::RenderContainer::firstChildBox):
              (WebCore::RenderContainer::lastChildBox):
              * rendering/RenderFieldset.cpp:
              (WebCore::RenderFieldset::calcPrefWidths):
              (WebCore::RenderFieldset::layoutLegend):
              (WebCore::RenderFieldset::findLegend):
              (WebCore::RenderFieldset::paintBoxDecorations):
              (WebCore::RenderFieldset::paintMask):
              * rendering/RenderFieldset.h:
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::RenderFileUploadControl::maxFilenameWidth):
              (WebCore::RenderFileUploadControl::paintObject):
              * rendering/RenderFlexibleBox.cpp:
              (WebCore::FlexBoxIterator::FlexBoxIterator):
              (WebCore::FlexBoxIterator::first):
              (WebCore::FlexBoxIterator::next):
              (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
              (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
              (WebCore::RenderFlexibleBox::layoutBlock):
              (WebCore::RenderFlexibleBox::layoutHorizontalBox):
              (WebCore::RenderFlexibleBox::layoutVerticalBox):
              (WebCore::RenderFlexibleBox::placeChild):
              (WebCore::RenderFlexibleBox::allowedChildFlex):
              * rendering/RenderFlexibleBox.h:
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::absoluteClippedOverflowRect):
              (WebCore::RenderFlow::lowestPosition):
              (WebCore::RenderFlow::rightmostPosition):
              (WebCore::RenderFlow::leftmostPosition):
              (WebCore::RenderFlow::localCaretRect):
              (WebCore::RenderFlow::addFocusRingRects):
              * rendering/RenderFrameSet.cpp:
              (WebCore::RenderFrameSet::paint):
              (WebCore::RenderFrameSet::layout):
              (WebCore::RenderFrameSet::positionFrames):
              * rendering/RenderHTMLCanvas.cpp:
              (WebCore::RenderHTMLCanvas::paintReplaced):
              (WebCore::RenderHTMLCanvas::canvasSizeChanged):
              * rendering/RenderImage.cpp:
              (WebCore::RenderImage::imageChanged):
              (WebCore::RenderImage::paintReplaced):
              (WebCore::RenderImage::nodeAtPoint):
              (WebCore::RenderImage::calcReplacedWidth):
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::absoluteRects):
              (WebCore::RenderInline::boundingBoxWidth):
              (WebCore::RenderInline::boundingBoxHeight):
              (WebCore::RenderInline::positionForCoordinates):
              * rendering/RenderInline.h:
              (WebCore::RenderInline::offsetWidth):
              (WebCore::RenderInline::offsetHeight):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::updateTransform):
              (WebCore::RenderLayer::updateLayerPosition):
              (WebCore::RenderLayer::scrollbarCornerPresent):
              (WebCore::RenderLayer::createScrollbar):
              (WebCore::RenderLayer::positionOverflowControls):
              (WebCore::RenderLayer::paintScrollCorner):
              (WebCore::RenderLayer::paintResizer):
              (WebCore::RenderLayer::paintLayer):
              (WebCore::RenderLayer::hitTestLayer):
              (WebCore::RenderLayer::calculateRects):
              (WebCore::RenderLayer::boundingBox):
              * rendering/RenderListBox.cpp:
              (WebCore::RenderListBox::calcHeight):
              (WebCore::RenderListBox::controlClipRect):
              * rendering/RenderListItem.cpp:
              (WebCore::RenderListItem::positionListMarker):
              (WebCore::RenderListItem::paint):
              * rendering/RenderListMarker.cpp:
              (WebCore::RenderListMarker::paint):
              (WebCore::RenderListMarker::layout):
              (WebCore::RenderListMarker::imageChanged):
              (WebCore::RenderListMarker::getRelativeMarkerRect):
              (WebCore::RenderListMarker::selectionRect):
              * rendering/RenderMarquee.cpp:
              (WebCore::RenderMarquee::computePosition):
              * rendering/RenderMedia.cpp:
              (WebCore::RenderMedia::layout):
              (WebCore::RenderMedia::lowestPosition):
              (WebCore::RenderMedia::rightmostPosition):
              (WebCore::RenderMedia::leftmostPosition):
              * rendering/RenderMenuList.cpp:
              (WebCore::RenderMenuList::controlClipRect):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::RenderObject):
              (WebCore::RenderObject::markAllDescendantsWithFloatsForLayout):
              (WebCore::RenderObject::paintOutline):
              (WebCore::RenderObject::addLineBoxRects):
              (WebCore::RenderObject::absoluteBoundingBoxRect):
              (WebCore::RenderObject::addAbsoluteRectForLayer):
              (WebCore::RenderObject::paintingRootRect):
              (WebCore::RenderObject::container):
              (WebCore::RenderObject::removeFromObjectLists):
              (WebCore::RenderObject::updateHitTestResult):
              (WebCore::RenderObject::addDashboardRegions):
              (WebCore::RenderObject::localTransform):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::isBox):
              (WebCore::RenderObject::hasMask):
              (WebCore::RenderObject::setIsText):
              (WebCore::RenderObject::setIsBox):
              (WebCore::RenderObject::borderTop):
              (WebCore::RenderObject::borderBottom):
              (WebCore::RenderObject::absoluteRects):
              (WebCore::RenderObject::collectAbsoluteLineBoxQuads):
              (WebCore::RenderObject::absoluteQuads):
              (WebCore::RenderObject::hasReflection):
              (WebCore::RenderObject::addFocusRingRects):
              (WebCore::RenderObject::absoluteOutlineBounds):
              * rendering/RenderPart.cpp:
              (WebCore::RenderPart::updateWidgetPosition):
              * rendering/RenderPath.cpp:
              (WebCore::RenderPath::layout):
              (WebCore::RenderPath::paint):
              (WebCore::RenderPath::absoluteOutlineBounds):
              * rendering/RenderPath.h:
              * rendering/RenderReplaced.cpp:
              (WebCore::RenderReplaced::layout):
              (WebCore::RenderReplaced::paint):
              (WebCore::RenderReplaced::shouldPaint):
              (WebCore::RenderReplaced::positionForCoordinates):
              (WebCore::RenderReplaced::localSelectionRect):
              (WebCore::RenderReplaced::adjustOverflowForBoxShadow):
              (WebCore::RenderReplaced::overflowRect):
              * rendering/RenderReplica.cpp:
              (WebCore::RenderReplica::layout):
              (WebCore::RenderReplica::calcPrefWidths):
              (WebCore::RenderReplica::paint):
              * rendering/RenderSVGContainer.cpp:
              (WebCore::RenderSVGContainer::paint):
              (WebCore::RenderSVGContainer::absoluteOutlineBounds):
              * rendering/RenderSVGContainer.h:
              (WebCore::RenderSVGContainer::width):
              (WebCore::RenderSVGContainer::height):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::layout):
              * rendering/RenderSVGInlineText.cpp:
              (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange):
              (WebCore::RenderSVGInlineText::positionForCoordinates):
              * rendering/RenderSVGRoot.cpp:
              (WebCore::RenderSVGRoot::layout):
              (WebCore::RenderSVGRoot::applyContentTransforms):
              (WebCore::RenderSVGRoot::paint):
              (WebCore::RenderSVGRoot::absoluteTransform):
              (WebCore::RenderSVGRoot::nodeAtPoint):
              * rendering/RenderSVGTSpan.cpp:
              (WebCore::RenderSVGTSpan::absoluteRects):
              (WebCore::RenderSVGTSpan::absoluteQuads):
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::layout):
              (WebCore::RenderSVGText::relativeBBox):
              * rendering/RenderSVGTextPath.cpp:
              (WebCore::RenderSVGTextPath::absoluteRects):
              (WebCore::RenderSVGTextPath::absoluteQuads):
              * rendering/RenderSVGViewportContainer.cpp:
              (WebCore::RenderSVGViewportContainer::nodeAtPoint):
              * rendering/RenderScrollbar.cpp:
              (WebCore::RenderScrollbar::createCustomScrollbar):
              (WebCore::RenderScrollbar::RenderScrollbar):
              (WebCore::RenderScrollbar::setParent):
              * rendering/RenderScrollbar.h:
              (WebCore::RenderScrollbar::owningRenderer):
              * rendering/RenderScrollbarPart.cpp:
              (WebCore::RenderScrollbarPart::layout):
              (WebCore::RenderScrollbarPart::layoutHorizontalPart):
              (WebCore::RenderScrollbarPart::layoutVerticalPart):
              (WebCore::RenderScrollbarPart::computeScrollbarWidth):
              (WebCore::RenderScrollbarPart::computeScrollbarHeight):
              (WebCore::RenderScrollbarPart::paintIntoRect):
              * rendering/RenderSlider.cpp:
              (WebCore::HTMLSliderThumbElement::defaultEventHandler):
              (WebCore::RenderSlider::layout):
              (WebCore::RenderSlider::mouseEventIsInThumb):
              (WebCore::RenderSlider::positionForOffset):
              (WebCore::RenderSlider::trackSize):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::calcWidth):
              (WebCore::RenderTable::layout):
              (WebCore::RenderTable::paint):
              (WebCore::RenderTable::getBaselineOfFirstLineBox):
              * rendering/RenderTableCell.cpp:
              (WebCore::RenderTableCell::updateWidth):
              (WebCore::RenderTableCell::computeAbsoluteRepaintRect):
              (WebCore::RenderTableCell::localToAbsolute):
              (WebCore::RenderTableCell::absoluteToLocal):
              (WebCore::RenderTableCell::localToAbsoluteQuad):
              (WebCore::RenderTableCell::paint):
              (WebCore::RenderTableCell::paintBackgroundsBehindCell):
              * rendering/RenderTableCell.h:
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::addChild):
              (WebCore::RenderTableSection::addCell):
              (WebCore::RenderTableSection::setCellWidths):
              (WebCore::RenderTableSection::calcRowHeight):
              (WebCore::RenderTableSection::layoutRows):
              (WebCore::RenderTableSection::lowestPosition):
              (WebCore::RenderTableSection::rightmostPosition):
              (WebCore::RenderTableSection::leftmostPosition):
              (WebCore::RenderTableSection::getBaselineOfFirstLineBox):
              (WebCore::RenderTableSection::paint):
              (WebCore::RenderTableSection::recalcCells):
              (WebCore::RenderTableSection::nodeAtPoint):
              * rendering/RenderTableSection.h:
              (WebCore::RenderTableSection::overflowWidth):
              (WebCore::RenderTableSection::overflowHeight):
              * rendering/RenderText.cpp:
              (WebCore::RenderText::RenderText):
              (WebCore::RenderText::boundingBoxX):
              (WebCore::RenderText::boundingBoxY):
              (WebCore::RenderText::firstRunX):
              (WebCore::RenderText::firstRunY):
              (WebCore::RenderText::boundingBoxHeight):
              (WebCore::RenderText::boundingBoxWidth):
              * rendering/RenderText.h:
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::textBlockHeight):
              (WebCore::RenderTextControl::textBlockWidth):
              (WebCore::RenderTextControl::setSelectionRange):
              (WebCore::RenderTextControl::calcHeight):
              (WebCore::RenderTextControl::hitInnerTextBlock):
              (WebCore::RenderTextControl::controlClipRect):
              * rendering/RenderTextControlMultiLine.cpp:
              (WebCore::RenderTextControlMultiLine::layout):
              (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
              * rendering/RenderTextControlSingleLine.cpp:
              (WebCore::RenderTextControlSingleLine::paint):
              (WebCore::RenderTextControlSingleLine::layout):
              (WebCore::RenderTextControlSingleLine::nodeAtPoint):
              (WebCore::RenderTextControlSingleLine::forwardEvent):
              (WebCore::RenderTextControlSingleLine::textBlockWidth):
              (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
              (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
              (WebCore::RenderTextControlSingleLine::clientPaddingRight):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::hitTestMediaControlPart):
              (WebCore::RenderTheme::baselinePosition):
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
              (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
              (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
              (WebCore::RenderThemeMac::hitTestMediaControlPart):
              * rendering/RenderTreeAsText.cpp:
              (WebCore::operator<<):
              * rendering/RenderVideo.cpp:
              (WebCore::RenderVideo::videoBox):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::RenderView):
              (WebCore::RenderView::calcHeight):
              (WebCore::RenderView::calcWidth):
              (WebCore::RenderView::layout):
              (WebCore::RenderView::viewRect):
              (WebCore::RenderView::docHeight):
              (WebCore::RenderView::docWidth):
              (WebCore::RenderView::setBestTruncatedAt):
              * rendering/RenderView.h:
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::paint):
              (WebCore::RenderWidget::updateWidgetPosition):
              (WebCore::RenderWidget::nodeAtPoint):
              * rendering/RootInlineBox.h:
              (WebCore::RootInlineBox::floats):
              (WebCore::RootInlineBox::floatsPtr):
              * rendering/SVGInlineFlowBox.cpp:
              (WebCore::SVGInlineFlowBox::verticallyAlignBoxes):
              * rendering/SVGInlineFlowBox.h:
              * rendering/SVGRenderTreeAsText.cpp:
              (WebCore::operator<<):
              (WebCore::write):
              * rendering/SVGRootInlineBox.cpp:
              (WebCore::SVGRootInlineBox::verticallyAlignBoxes):
              (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
              (WebCore::SVGRootInlineBox::layoutInlineBoxes):
              * rendering/SVGRootInlineBox.h:
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::computeHorizontalPositionsForLine):
              (WebCore::RenderBlock::computeVerticalPositionsForLine):
              (WebCore::RenderBlock::layoutInlineChildren):
              (WebCore::RenderBlock::determineStartPosition):
              (WebCore::RenderBlock::matchedEndLine):
              (WebCore::RenderBlock::skipTrailingWhitespace):
              (WebCore::RenderBlock::skipLeadingWhitespace):
              (WebCore::RenderBlock::fitBelowFloats):
              (WebCore::RenderBlock::findNextLineBreak):
              (WebCore::RenderBlock::checkLinesForOverflow):
              * svg/SVGLength.cpp:
              (WebCore::SVGLength::PercentageOfViewport):
      
      WebKit/mac:
      
      2009-01-21  David Hyatt  <hyatt@apple.com>
      
              Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
      
              Reviewed by Eric Seidel and Darin Adler
      
              * WebView/WebRenderNode.mm:
              (copyRenderNode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d885df72
  6. 16 Jan, 2009 2 commits
    • hyatt@apple.com's avatar
      2009-01-16 David Hyatt <hyatt@apple.com> · aa59fcd9
      hyatt@apple.com authored
              Add a new flag (similar to first-line and first-letter) to Document to track whether any before/after rules
              are being used.  If not, don't waste time probing for those pseudo element styles.
      
              Reviewed by Sam Weinig
      
              * css/CSSGrammar.y:
              * dom/Document.cpp:
              (WebCore::Document::Document):
              * dom/Document.h:
              (WebCore::Document::usesBeforeAfterRules):
              (WebCore::Document::setUsesBeforeAfterRules):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::styleDidChange):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::styleDidChange):
              (WebCore::RenderInline::addChildToFlow):
              (WebCore::RenderInline::splitInlines):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa59fcd9
    • hyatt@apple.com's avatar
      2009-01-16 David Hyatt <hyatt@apple.com> · cfa6d61d
      hyatt@apple.com authored
              Split continuation() into virtual and non-virtual versions so that the non-virtual version can
              be used whereever possible.  Eventually the virtual method can be eliminated completely.
      
              Reviewed by Sam Weinig and Oliver Hunt
      
              * html/HTMLAnchorElement.cpp:
              (WebCore::HTMLAnchorElement::isKeyboardFocusable):
              * page/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::anchorElement):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
              (WebCore::InlineFlowBox::paint):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::removeChild):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
              * rendering/RenderFlow.h:
              (WebCore::RenderFlow::virtualContinuation):
              (WebCore::RenderFlow::continuation):
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::positionForCoordinates):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::absoluteRects):
              (WebCore::RenderObject::absoluteQuads):
              (WebCore::RenderObject::addFocusRingRects):
              (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
              (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
              (WebCore::RenderObject::handleDynamicFloatPositionChange):
              (WebCore::RenderObject::hoverAncestor):
              (WebCore::RenderObject::updateDragState):
              (WebCore::RenderObject::updateHitTestResult):
              (WebCore::RenderObject::getTextDecorationColors):
              (WebCore::RenderObject::adjustRectForOutlineAndShadow):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::virtualContinuation):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cfa6d61d
  7. 12 Jan, 2009 1 commit
  8. 10 Jan, 2009 1 commit
  9. 05 Jan, 2009 2 commits
    • dino@apple.com's avatar
      2008-01-05 Dean Jackson <dino@apple.com> · 563bd1f6
      dino@apple.com authored
              Reviewed by David Hyatt.
      
              Implement 'pointer-events' for HTML content. This involved
              adding a new value 'auto' which behaves as 'visiblePainted'
              in SVG content.
      
              Moved the property out of the SVG CSS code and into
              the general CSS (both parsing and RenderStyle).
      
              Changes to the hit testing functionality of the Render tree,
              specifically the nodeAtPoint methods. Where they used to
              test for visibility, they now use a helper function defined
              on base classes (RenderObject and InlineBox) that checks both
              visibility and pointer-events.
      
              https://bugs.webkit.org/show_bug.cgi?id=11395
      
              Tests: fast/events/pointer-events-2.html
                     fast/events/pointer-events.html
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::):
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSParser.cpp:
              (WebCore::CSSParser::parseValue):
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator EPointerEvents):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * css/SVGCSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
              * css/SVGCSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applySVGProperty):
              * manual-tests/pointer-events.html: Added.
              * rendering/EllipsisBox.cpp:
              (WebCore::EllipsisBox::nodeAtPoint):
              * rendering/InlineBox.h:
              (WebCore::InlineBox::visibleToHitTesting):
              * rendering/InlineFlowBox.cpp:
              (WebCore::InlineFlowBox::nodeAtPoint):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::nodeAtPoint):
              * rendering/PointerEventsHitRules.cpp:
              (WebCore::PointerEventsHitRules::PointerEventsHitRules):
              * rendering/PointerEventsHitRules.h:
              (WebCore::PointerEventsHitRules::):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::nodeAtPoint):
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::nodeAtPoint):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::visibleToHitTesting):
              * rendering/RenderPath.cpp:
              (WebCore::RenderPath::nodeAtPoint):
              * rendering/RenderSVGImage.cpp:
              (WebCore::RenderSVGImage::nodeAtPoint):
              * rendering/RenderSVGText.cpp:
              (WebCore::RenderSVGText::nodeAtPoint):
              * rendering/RootInlineBox.cpp:
              (WebCore::RootInlineBox::nodeAtPoint):
              * rendering/TextControlInnerElements.cpp:
              (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
              * rendering/style/RenderStyle.h:
              (WebCore::):
              (WebCore::InheritedFlags::setBitDefaults):
              (WebCore::InheritedFlags::pointerEvents):
              (WebCore::InheritedFlags::setPointerEvents):
              (WebCore::InheritedFlags::initialPointerEvents):
              * rendering/style/RenderStyleConstants.h:
              (WebCore::):
              * rendering/style/SVGRenderStyle.h:
              (WebCore::SVGRenderStyle::InheritedFlags::operator==):
              (WebCore::SVGRenderStyle::setBitDefaults):
              * rendering/style/SVGRenderStyleDefs.h:
              * css/CSSValueKeywords.in:
              * css/SVGCSSValueKeywords.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      563bd1f6
    • darin@apple.com's avatar
      2009-01-05 Darin Adler <darin@apple.com> · 98a7ac69
      darin@apple.com authored
              Reviewed by Alexey Proskuryakov.
      
              Bug 23102: turn on unused parameter warnings in WebCore
              https://bugs.webkit.org/show_bug.cgi?id=23102
      
              First step: Fix the simple cases where we can just remove an argument name.
              Also made a few more things protected and private.
      
              * many files
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98a7ac69
  10. 06 Dec, 2008 1 commit
    • simon.fraser@apple.com's avatar
      2008-12-06 Simon Fraser <simon.fraser@apple.com> · 2b2b6ce0
      simon.fraser@apple.com authored
              Reviewed by Dave Hyatt
      
              https://bugs.webkit.org/show_bug.cgi?id=15671
      
              Fix caret rendering to behave correctly with transforms:
              * Rename caretRect() methods to localCaretRect() and
                absoluteCaretBounds() as appropriate
              * Fix localCaretRect() methods to return a rect in the
                appropriate coordinates.
              * Pass tx, ty down through the paintCaret() methods, after fixing them
                up to account for differences between contents coords, and renderer-local
                coords (via RenderBlock::offsetForContents()).
              * Remove m_caretPositionOnLayout from SelectionController, and instead
                call invalidateSelection() from RenderLayer::scrollToOffset(), because
                we can no longer assume simple x/y offsets from scrolling with transforms.
              * Move the logic to compute which RenderObject actually paints the caret into
                SelectionController::caretRenderer(), rather than having it in RenderBlock.
              * SelectionController now computes and caches a local caret rect. For invalidation,
                it computes the absolute bounds of that (possibly transformed) local rect.
                The local rect is computed in the coordinate system of the RenderObject that
                will paint the caret (this may require offsetting from the actual renderer
                at the start of the selection).
              * Fix LayoutState(RenderObject* root) to take transforms into account
              * Make offsetFromContainer() a virtual method on RenderObject, and implement
                the RenderObject version. It's used to map from selection start renderer
                to caret renderer.
      
              Test: fast/transforms/transformed-caret.html
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b2b6ce0
  11. 14 Nov, 2008 2 commits
    • bolsinga@apple.com's avatar
      Reviewed by Darin Adler. · 97e42c46
      bolsinga@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=21810
              Remove use of static C++ objects that are destroyed at exit time (destructors)
      
              Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid 
              exit-time destructor. Update code that was changed to fix this issue that ran 
              into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference 
              in gcc build 5465). Also typdefs for template types needed to be added in some 
              cases so the type could make it through the macro successfully.
      
              Basically code of the form:
              static T m;
              becomes:
              DEFINE_STATIC_LOCAL(T, m, ());
      
              Also any code of the form:
              static T& m = *new T;
              also becomes:
              DEFINE_STATIC_LOCAL(T, m, ());
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97e42c46
    • mitz@apple.com's avatar
      WebCore: · d6ceec82
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - <rdar://problem/6234307> Support action methods for setting and clearing character-level directionality
              - WebCore part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
      
              * WebCore.base.exp: Exported
              WebCore::Settings::setTextDirectionSubmenuInclusionBehavior().
      
              * editing/ApplyStyleCommand.cpp:
              (StyleChange::init): Changed to always include the direction property
              in the result if the unicode-bidi property is included.
              (ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Added. Finds the
              highest ancestor of the given node that establishes bidi embedding. If
              that embedding agrees with the given allowed direction, finds the
              second-highest embedding ancestor. Splits all nodes through that
              ancestor. If the highest embedding ancestor did not need to be split,
              it is returned.
              (ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Added. Removes
              bidi embedding attributes and styles from all ancestors of the given
              node up to its enclosing block or the given node.
              (ApplyStyleCommand::applyInlineStyle): Added code to handle the
              unicode-bidi property. Applying style the includes this property
              involves removing all bidi embedding in effect, except  for one-level
              embedding that agrees with the desired embedding, then applying the
              desired embedding where it is not already in effect.
              (ApplyStyleCommand::applyInlineStyleToRange): Factored out from
              applyInlineStyle().
              (ApplyStyleCommand::removeHTMLBidiEmbeddingStyle): Added. Removed the
              "dir" attribute if necessary and the element if it becomes an unstyled
              style span.
              (ApplyStyleCommand::removeCSSStyle): Changed to remove the direction
              property when removing the unicode-bidi property.
              (ApplyStyleCommand::removeInlineStyle): Added a call to
              removeHTMLBidiEmbeddingStyle().
      
              * editing/ApplyStyleCommand.h:
              * editing/Editor.cpp:
              (Editor::textDirectionForSelection): Added. Returns the character-level
              writing direction of the selection if it is uniform and simple (at most
              one level of embedding).
              (Editor::hasBidiSelection): Added. Returns true if the selection lies
              entirely within a single block, and that block has direction:rtl or
              contains any inline boxes with non-zero bidi embedding level.
      
              * editing/Editor.h:
              * editing/EditorCommand.cpp:
              (stateTextWritingDirection): Added this helper function for deciding
              the state of Text Direction submenu items.
              (executeMakeTextWritingDirectionLeftToRight): Added. Applies
              "unicode-bidi: embed; direction: ltr;".
              (executeMakeTextWritingDirectionNatural): Added. Applies
              "unicode-bidi: normal;"
              (executeMakeTextWritingDirectionRightToLeft): Added. Applies
              "unicode-bidi: embed; direction: rtl;".
              (stateTextWritingDirectionLeftToRight): Added.
              (stateTextWritingDirectionNatural): Added.
              (stateTextWritingDirectionRightToLeft): Added.
              (createCommandMap): Added "MakeTextWritingDirectionLeftToRight",
              "MakeTextWritingDirectionNatural",
              and "MakeTextWritingDirectionRightToLeft".
      
              * editing/InsertTextCommand.cpp:
              (InsertTextCommand::input): Added code to maintain the unicode-bidi
              and direction properties in the typing style. Even if they have the
              same values as the computed style at the caret, they need to be included
              in the typing style so that inserted text will not inherit any nested
              embedding.
      
              * page/ContextMenuController.cpp:
              (ContextMenuController::contextMenuItemSelected): Added calls to
              the editor for the text direction menu items.
      
              * page/Frame.cpp
              (Frame::computeAndSetTypingStyle): Added code to maintain the
              unicode-bidi and direction properties in the typing style.
      
              * page/Settings.cpp:
              (Settings::setTextDirectionSubmenuInclusionBehavior): Added this setter.
      
              * page/Settings.h: Added a TextDirectionSubmenuInclusionBehavior enum,
              an m_textDirectionSubmenuInclusionBehavior member, and accessors.
      
              * page/mac/WebCoreViewFactory.h:
              * platform/ContextMenu.cpp:
              (WebCore::createAndAppendTextDirectionSubMenu): Added.
              (ContextMenu::populate): Added the Text Direction submenu item based on
              the inclusion behavior and the existence of a bidi selection.
              (ContextMenu::checkOrEnableIfNeeded): Added code for the text direction
              menu items.
      
              * platform/ContextMenuItem.h:
              * platform/LocalizedStrings.h: Declared
              contextMenuItemTagTextDirectionMenu().
      
              * platform/mac/LocalizedStringsMac.mm: Defined
              contextMenuItemTagTextDirectionMenu().
      
              * rendering/RenderBlock.cpp:
              (RenderBlock::containsNonZeroBidiLevel): Added.
              * rendering/RenderBlock.h:
      
      WebKit:
      
              Reviewed by Darin Adler.
      
              - part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
      
              * English.lproj/Localizable.strings: Added the Text Direction submenu
              title.
      
      WebKit/mac:
      
              Reviewed by Darin Adler.
      
              - <rdar://problem/6234333> Implement action methods for setting and clearing character-level directionality
              - part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
      
              * WebCoreSupport/WebViewFactory.mm:
              (-[WebViewFactory contextMenuItemTagTextDirectionMenu]): Added.
              * WebView/WebFrame.mm:
              (core): Added a convertor from WebTextDirectionSubmenuInclusionBehavior
              to WebCore::TextDirectionSubmenuInclusionBehavior.
              * WebView/WebFrameInternal.h:
              * WebView/WebHTMLView.mm:
              Added makeTextWritingDirectionLeftToRight:,
              makeTextWritingDirectionNatural: and
              makeTextWritingDirectionRightToLeft: using the WEBCORE_COMMAND macro.
              * WebView/WebPreferenceKeysPrivate.h:
              Added WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey.
              * WebView/WebPreferences.mm:
              (+[WebPreferences initialize]): Set the default Text Direction
              submenu inclusion behavior to never include.
              (-[WebPreferences textDirectionSubmenuInclusionBehavior]): Added this
              accessor.
              (-[WebPreferences setTextDirectionSubmenuInclusionBehavior:]): Ditto.
              * WebView/WebPreferencesPrivate.h: Defined the
              WebTextDirectionSubmenuInclusionBehavior enum and declared
              accessors.
              * WebView/WebUIDelegatePrivate.h:
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]): Added code to transfer
              the Text Direction submenu inclusion behavior preference to WebCore
              settings.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6ceec82
  12. 12 Nov, 2008 1 commit
    • simon.fraser@apple.com's avatar
      2008-11-12 Simon Fraser <simon.fraser@apple.com> · d12c84b4
      simon.fraser@apple.com authored
              Reviewed by Dan Bernstein
      
              https://bugs.webkit.org/show_bug.cgi?id=22212
      
              Rename absoluteOutlineBox() to absoluteOutlineBounds(), to indicate that
              it may be the bounding outline box of a transformed element, and fix it
              to respect transforms by mapping the outline box to an absolute quad and
              taking the enclosing rect.
      
              RenderBox::localToAbsoluteQuad() can no longer assert that there is no
              LayoutState, but LayoutState cannot be used during quad mapping (it knows
              nothing about transforms).
      
              Finally, fix a bug in RenderBox::localToAbsoluteQuad() which was getting
              borderTopExtra() from the object, rather than its container (as localToAbsolute()
              does).
      
              Test: fast/repaint/transform-absolute-child.html
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d12c84b4
  13. 11 Nov, 2008 1 commit
    • eric@webkit.org's avatar
      Reviewed by Antti Koivisto and Sam Weinig. · 683713ff
      eric@webkit.org authored
              Clean up HTMLTokenizer a litle
              https://bugs.webkit.org/show_bug.cgi?id=22188
      
              Rename pendingScripts to m_pendingScripts
              Rename scriptNode to m_scriptNode make the type specific
              Rename pendingSrc to m_pendingSrc
              Rename currentPrependingSrc to m_currentPrependingSrc
              Rename noMoreData to m_noMoreData and cBuffer to m_cBuffer
              Remove long-since-dead kdDebug and qDebug calls
              Rename brokenComments to m_brokenComments
              Remove HTMLTokenizer includes and document the rest
              Rename src to m_src
              Rename parser to m_parser and make it an OwnPtr
              Rename inWrite to m_inWrite and jsProxy to scriptController
              Rename brokenServer to m_brokenServer
              Rename buffer to m_buffer and dest to m_dest
              Rename size to m_bufferSize
              Rename attrName to m_attrName
              Rename searchStopper to m_searchStopper and searchStopperLen to m_searchStopperLen
              Rename scriptCode* to m_scriptCode* and change scriptCodeMax to m_scriptCodeCapacity
              Rename scriptStartLineno to m_currentScriptTagStartLineNumber and tagStartLineno to m_currentTagStartLineNumber
              Rename scriptSrc to m_scriptTagSrcAttrValue and scriptSrcCharset to m_scriptTagCharsetAttrValue -- a bit unwieldy, but more precise
              Rename flat to selfClosingTag
              Rename currToken to m_currentToken
      
              * css/CSSParser.cpp:
              * dom/XMLTokenizer.cpp:
              * dom/XMLTokenizerLibxml2.cpp:
              * html/HTMLDocument.cpp:
              * html/HTMLElement.cpp:
              * html/HTMLFormControlElement.cpp:
              * html/HTMLParser.h:
              * html/HTMLTokenizer.cpp:
              (WebCore::Token::addAttribute):
              (WebCore::HTMLTokenizer::HTMLTokenizer):
              (WebCore::HTMLTokenizer::reset):
              (WebCore::HTMLTokenizer::begin):
              (WebCore::HTMLTokenizer::processListing):
              (WebCore::HTMLTokenizer::parseSpecial):
              (WebCore::HTMLTokenizer::scriptHandler):
              (WebCore::HTMLTokenizer::scriptExecution):
              (WebCore::HTMLTokenizer::parseComment):
              (WebCore::HTMLTokenizer::parseServer):
              (WebCore::HTMLTokenizer::parseProcessingInstruction):
              (WebCore::HTMLTokenizer::parseText):
              (WebCore::HTMLTokenizer::parseEntity):
              (WebCore::HTMLTokenizer::parseTag):
              (WebCore::HTMLTokenizer::write):
              (WebCore::HTMLTokenizer::processingData):
              (WebCore::HTMLTokenizer::end):
              (WebCore::HTMLTokenizer::finish):
              (WebCore::HTMLTokenizer::processToken):
              (WebCore::HTMLTokenizer::processDoctypeToken):
              (WebCore::HTMLTokenizer::~HTMLTokenizer):
              (WebCore::HTMLTokenizer::enlargeBuffer):
              (WebCore::HTMLTokenizer::enlargeScriptBuffer):
              (WebCore::HTMLTokenizer::notifyFinished):
              (WebCore::HTMLTokenizer::setSrc):
              * html/HTMLTokenizer.h:
              (WebCore::Token::Token):
              (WebCore::Token::reset):
              (WebCore::HTMLTokenizer::processingContentWrittenByScript):
              (WebCore::HTMLTokenizer::htmlParser):
              (WebCore::HTMLTokenizer::checkBuffer):
              (WebCore::HTMLTokenizer::checkScriptBuffer):
              * html/HTMLViewSourceDocument.h:
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::leftRelOffset):
              (WebCore::RenderBlock::rightRelOffset):
              (WebCore::RenderBlock::lineWidth):
              * xml/XSLTProcessor.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      683713ff
  14. 07 Nov, 2008 1 commit
    • simon.fraser@apple.com's avatar
      2008-11-07 Simon Fraser <simon.fraser@apple.com> · feaef2eb
      simon.fraser@apple.com authored
              Reviewed by Dan Bernstein
      
              https://bugs.webkit.org/show_bug.cgi?id=22122
      
              Use a stack-based object to simplify the pushLayoutState/popLayoutState
              code. LayoutStateMaintainer either pushes in the constructor, or allows
              an explicit push() later. Both cases require an explicit pop().
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::layoutBlock):
              (WebCore::RenderBlock::layoutOnlyPositionedObjects):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::layout):
              * rendering/RenderFlexibleBox.cpp:
              (WebCore::RenderFlexibleBox::layoutBlock):
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::layout):
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::layout):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::setCellWidths):
              (WebCore::RenderTableSection::calcRowHeight):
              (WebCore::RenderTableSection::layoutRows):
              * rendering/RenderView.h:
              (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
              (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer):
              (WebCore::LayoutStateMaintainer::pop):
              (WebCore::LayoutStateMaintainer::push):
              (WebCore::LayoutStateMaintainer::didPush):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      feaef2eb
  15. 06 Nov, 2008 4 commits
    • ddkilzer@apple.com's avatar
      BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0. · 58912bd4
      ddkilzer@apple.com authored
      WebCore:
      
              BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
      
              Apparently older versions of gcc have issues with this patch.
              Backing out a second time until the issues are resolved.
      
      WebKit/mac:
      
              BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
      
              Apparently older versions of gcc have issues with this patch.
              Backing out a second time until the issues are resolved.
      
      WebKitTools:
      
              BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
      
              Apparently older versions of gcc have issues with this patch.
              Backing out a second time until the issues are resolved.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58912bd4
    • ddkilzer@apple.com's avatar
      BUILD WAS NOT BROKEN: Rolling r38189 back in. · a8062f58
      ddkilzer@apple.com authored
      WebCore:
      
              BUILD WAS NOT BROKEN: Rolling r38189 back in.
      
              Please perform a clean build if you see crashes.
      
      WebKit/mac:
      
              BUILD WAS NOT BROKEN: Rolling r38189 back in.
      
              Please perform a clean build if you see crashes.
      
      WebKitTools:
      
              BUILD WAS NOT BROKEN: Rolling r38189 back in.
      
              Please perform a clean build if you see crashes.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a8062f58
    • ddkilzer@apple.com's avatar
      BUILD FIX: Backed out r38189 since it apparently broke the world. · 3df06c55
      ddkilzer@apple.com authored
      WebCore:
      
              BUILD FIX: Backed out r38189 since it apparently broke the world.
      
      WebKit/mac:
      
              BUILD FIX: Backed out r38189 since it apparently broke the world.
      
      WebKitTools:
      
              BUILD FIX: Backed out r38189 since it apparently broke the world.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3df06c55
    • ddkilzer@apple.com's avatar
      Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors) · 6f3816c3
      ddkilzer@apple.com authored
      WebCore:
      
      2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
      
              Reviewed by Darin Adler.
      
              Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
              https://bugs.webkit.org/show_bug.cgi?id=21810
      
              * bindings/js/GCController.cpp:
              (WebCore::gcController): Changed to leak an object to avoid an exit-time destructor.
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::wrapperSet): Ditto
              * bindings/js/JSInspectedObjectWrapper.cpp:
              (WebCore::wrappers): Ditto
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              (WebCore::wrappers): Ditto
              * bridge/runtime_root.cpp:
              (JSC::Bindings::rootObjectSet): Ditto
              * css/CSSMutableStyleDeclaration.cpp:
              (WebCore::CSSMutableStyleDeclaration::removeProperty): Ditto
              * css/CSSPrimitiveValue.cpp:
              (WebCore::CSSPrimitiveValue::cssText): Ditto
              * css/CSSSelector.cpp:
              (WebCore::CSSSelector::extractPseudoType): Ditto
              * css/CSSStyleSelector.cpp:
              (WebCore::screenEval): Ditto
              (WebCore::printEval): Ditto
              * dom/DOMImplementation.cpp:
              (WebCore::isSVG10Feature): Ditto
              (WebCore::isSVG11Feature): Ditto
              (WebCore::DOMImplementation::isXMLMIMEType): Ditto
              * dom/Document.cpp:
              (WebCore::Document::hasPrefixNamespaceMismatch): Ditto
              * dom/ScriptElement.cpp:
              (WebCore::isSupportedJavaScriptLanguage): Ditto
              * editing/ApplyStyleCommand.cpp:
              (WebCore::styleSpanClassString): Ditto
              * editing/HTMLInterchange.cpp:
              (WebCore::): Ditto
              * editing/IndentOutdentCommand.cpp:
              (WebCore::indentBlockquoteString): Ditto
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::isInterchangeNewlineNode): Ditto
              (WebCore::isInterchangeConvertedSpaceSpan): Ditto
              * editing/htmlediting.cpp:
              (WebCore::stringWithRebalancedWhitespace): Ditto
              (WebCore::nonBreakingSpaceString): Ditto
              * editing/markup.cpp:
              (WebCore::appendAttributeValue): Ditto
              (WebCore::appendEscapedContent): Ditto
              (WebCore::shouldAddNamespaceAttr): Ditto
              (WebCore::appendNamespace): Ditto
              (WebCore::appendStartMarkup): Ditto
              (WebCore::createMarkup): Ditto
              * html/HTMLButtonElement.cpp:
              (WebCore::HTMLButtonElement::type): Ditto
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::isRecognizedTagName): Ditto
              (WebCore::inlineTagList): Ditto
              (WebCore::blockTagList): Ditto
              * html/HTMLFieldSetElement.cpp:
              (WebCore::HTMLFieldSetElement::type): Ditto
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::type): Ditto
              * html/HTMLKeygenElement.cpp:
              (WebCore::HTMLKeygenElement::type): Ditto
              * html/HTMLLegendElement.cpp:
              (WebCore::HTMLLegendElement::type): Ditto
              * html/HTMLOptGroupElement.cpp:
              (WebCore::HTMLOptGroupElement::type): Ditto
              * html/HTMLOptionElement.cpp:
              (WebCore::HTMLOptionElement::type): Ditto
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::getNode): Ditto
              (WebCore::HTMLParser::isHeaderTag): Ditto
              (WebCore::HTMLParser::isResidualStyleTag): Ditto
              (WebCore::HTMLParser::isAffectedByResidualStyle): Ditto
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::type): Ditto
              * html/HTMLTextAreaElement.cpp:
              (WebCore::HTMLTextAreaElement::type): Ditto
              * inspector/InspectorController.cpp:
              (WebCore::platform): Ditto
              * inspector/JavaScriptDebugServer.cpp:
              (WebCore::JavaScriptDebugServer::shared): Ditto
              * inspector/JavaScriptProfile.cpp:
              (WebCore::profileCache): Ditto
              * inspector/JavaScriptProfileNode.cpp:
              (WebCore::profileNodeCache): Ditto
              * loader/FrameLoader.cpp:
              (WebCore::localSchemes): Ditto
              * loader/appcache/ApplicationCacheStorage.cpp:
              (WebCore::cacheStorage): Ditto
              * loader/archive/ArchiveFactory.cpp:
              (WebCore::archiveMIMETypes): Ditto
              * loader/icon/IconDatabase.cpp:
              (WebCore::IconDatabase::defaultDatabaseFilename): Ditto
              * page/EventHandler.cpp:
              (WebCore::EventHandler::dragState): Ditto
              * page/Frame.cpp:
              (WebCore::createRegExpForLabels): Ditto
              (WebCore::keepAliveSet): Ditto
              * page/Page.cpp:
              (WebCore::Page::groupName): Ditto
              * page/SecurityOrigin.cpp:
              (WebCore::isDefaultPortForProtocol): Ditto
              (WebCore::SecurityOrigin::databaseIdentifier): Ditto
              * page/mac/FrameMac.mm:
              (WebCore::regExpForLabels): Ditto
              * platform/KURL.cpp:
              (WebCore::blankURL): Ditto
              * platform/graphics/FontCache.cpp:
              (WebCore::alternateFamilyName): Ditto
              * platform/graphics/mac/FontCacheMac.mm:
              (WebCore::FontCache::getSimilarFontPlatformData): Ditto
              (WebCore::FontCache::getLastResortFallbackFont): Ditto
              * platform/mac/ScrollbarThemeMac.mm:
              (WebCore::ScrollbarTheme::nativeTheme): Ditto
              * platform/mac/ThemeMac.mm:
              (WebCore::platformTheme): Ditto
              * platform/mac/ThreadCheck.mm:
              (WebCoreReportThreadViolation): Ditto
              * platform/network/NetworkStateNotifier.cpp:
              (WebCore::networkStateNotifier): Ditto
              * platform/network/mac/FormDataStreamMac.mm:
              (WebCore::getStreamFormDataMap): Ditto
              (WebCore::getStreamResourceHandleMap): Ditto
              * platform/network/mac/ResourceResponseMac.mm:
              (WebCore::ResourceResponse::platformLazyInit): Ditto
              * platform/text/TextEncoding.cpp:
              (WebCore::TextEncoding::isJapanese): Ditto
              * rendering/RenderBlock.cpp:
              (WebCore::continuationOutlineTable): Ditto
              * rendering/RenderCounter.cpp:
              (WebCore::counterMaps): Ditto
              * rendering/RenderFlexibleBox.cpp:
              (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto
              * rendering/RenderListItem.cpp:
              (WebCore::RenderListItem::markerText): Ditto
              * rendering/RenderScrollbarTheme.cpp:
              (WebCore::RenderScrollbarTheme::renderScrollbarTheme): Ditto
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::systemFont): Ditto
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::checkLinesForTextOverflow): Ditto
              * rendering/style/RenderStyle.cpp:
              (WebCore::RenderStyle::initialDashboardRegions): Ditto
              (WebCore::RenderStyle::noneDashboardRegions): Ditto
              * storage/LocalStorage.cpp:
              (WebCore::localStorageMap): Ditto
              * svg/SVGAnimateMotionElement.cpp:
              (WebCore::SVGAnimateMotionElement::rotateMode): Ditto
              * svg/SVGAnimationElement.cpp:
              (WebCore::SVGAnimationElement::calcMode): Ditto
              (WebCore::SVGAnimationElement::attributeType): Ditto
              (WebCore::SVGAnimationElement::isAdditive): Ditto
              (WebCore::SVGAnimationElement::isAccumulated): Ditto
              * svg/SVGLangSpace.cpp:
              (WebCore::SVGLangSpace::xmlspace): Ditto
              * svg/SVGSVGElement.cpp:
              (WebCore::SVGSVGElement::contentScriptType): Ditto
              (WebCore::SVGSVGElement::contentStyleType): Ditto
              * svg/SVGStyleElement.cpp:
              (WebCore::SVGStyleElement::type): Ditto
              (WebCore::SVGStyleElement::media): Ditto
              * svg/SVGTextContentElement.cpp:
              (WebCore::SVGTextContentElement::parseMappedAttribute): Ditto
              * svg/animation/SVGSMILElement.cpp:
              (WebCore::SVGSMILElement::parseClockValue): Ditto
              (WebCore::SVGSMILElement::restart): Ditto
              (WebCore::SVGSMILElement::fill): Ditto
              (WebCore::SVGSMILElement::repeatCount): Ditto
              (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): Ditto
              * svg/graphics/SVGResource.cpp:
              (WebCore::clientMap): Ditto
              * svg/graphics/SVGResourceMarker.cpp:
              (WebCore::SVGResourceMarker::draw): Ditto
              * xml/XMLHttpRequest.cpp:
              (WebCore::preflightResultCache): Ditto
              (WebCore::isSafeRequestHeader): Ditto
              (WebCore::isOnAccessControlResponseHeaderWhitelist): Ditto
              * xml/XPathExpressionNode.cpp:
              (WebCore::XPath::Expression::evaluationContext): Ditto
              * xml/XPathParser.cpp:
              (WebCore::XPath::isAxisName): Ditto
              (WebCore::XPath::isNodeTypeName): Ditto
              * xml/XPathValue.cpp:
              (WebCore::XPath::Value::toNodeSet): Ditto
      
      WebKit/mac:
      
      2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
      
              Reviewed by Darin Adler.
      
              Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
              https://bugs.webkit.org/show_bug.cgi?id=21810
      
              * History/WebBackForwardList.mm:
              (backForwardLists): Changed to leak an object to avoid an exit-time destructor.
              * History/WebHistoryItem.mm:
              (historyItemWrappers): Ditto
              * Misc/WebStringTruncator.m:
              (fontFromNSFont): Ditto
              * Plugins/WebBaseNetscapePluginStream.mm:
              (streams): Ditto
              * WebView/WebView.mm:
              (aeDescFromJSValue): Ditto
      
      WebKitTools:
      
      2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
      
              Reviewed by Darin Adler.
      
              Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
              https://bugs.webkit.org/show_bug.cgi?id=21810
      
              Remove .o files from the exclude list that have had their exit-time destructors removed.
      
              * Scripts/check-for-exit-time-destructors:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f3816c3
  16. 04 Nov, 2008 1 commit
  17. 16 Oct, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-10-16 David Hyatt <hyatt@apple.com> · dec0cbf2
      hyatt@apple.com authored
              https://bugs.webkit.org/attachment.cgi?bugid=21647
      
              Make RenderStyle inherit from RefCounted so that it works with RefPtr.  RenderStyle was being malloced
              out of the RenderArena.  Years and years ago (before TCMalloc), the plan was to make RenderStyles and
              all their associated sub-structs use the arena.  However only the RenderStyle itself was ever changed
              to use the arena.
      
              At a later point style sharing was implemented, which made using the arena for styles pretty pointless,
              as the bulk of the styles on a given page are actually shared.  Not ever making the sub-structs use the
              arena also limited the usefulness.
      
              Now that we have RefPtr/PassRefPtr to eliminate manual ref/deref and now that we use TCMalloc for fast
              mallocs, there is no reason to keep RenderStyles in the arena.  The benefits of being able to eliminate
              manual ref/deref far outweigh keeping them in the arena.
      
              Reviewed by Adam Roben
      
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::CSSStyleSelector):
              (WebCore::CSSStyleSelector::~CSSStyleSelector):
              (WebCore::CSSStyleSelector::styleForElement):
              (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
              (WebCore::CSSStyleSelector::pseudoStyleForElement):
              These methods now return a PassRefPtr.  They will null out the m_style variable as they hand it back
              so that it isn't left pointing to the previous style resolve RenderStyle (which is what the old code did).
      
              (WebCore::CSSStyleSelector::updateFont):
              (WebCore::CSSStyleSelector::checkSelector):
              (WebCore::CSSStyleSelector::applyProperty):
              (WebCore::CSSStyleSelector::mapFillSize):
              (WebCore::CSSStyleSelector::mapFillXPosition):
              (WebCore::CSSStyleSelector::mapFillYPosition):
              * css/CSSStyleSelector.h:
              (WebCore::CSSStyleSelector::style):
              * dom/Document.cpp:
              (WebCore::Document::recalcStyle):
              * dom/Element.cpp:
              (WebCore::Element::styleForRenderer):
              (WebCore::Element::recalcStyle):
              (WebCore::Element::computedStyle):
              * dom/Element.h:
              * dom/ElementRareData.h:
              (WebCore::ElementRareData::ElementRareData):
              (WebCore::ElementRareData::resetComputedStyle):
              * dom/Node.cpp:
              (WebCore::Node::diff):
              (WebCore::Node::createRendererIfNeeded):
              (WebCore::Node::styleForRenderer):
              (WebCore::Node::setRenderStyle):
              * dom/Node.h:
              * html/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::setFont):
              * html/HTMLOptGroupElement.cpp:
              (WebCore::HTMLOptGroupElement::attach):
              (WebCore::HTMLOptGroupElement::detach):
              (WebCore::HTMLOptGroupElement::setRenderStyle):
              (WebCore::HTMLOptGroupElement::nonRendererRenderStyle):
              * html/HTMLOptGroupElement.h:
              * html/HTMLOptionElement.cpp:
              (WebCore::HTMLOptionElement::attach):
              (WebCore::HTMLOptionElement::detach):
              (WebCore::HTMLOptionElement::setRenderStyle):
              (WebCore::HTMLOptionElement::nonRendererRenderStyle):
              * html/HTMLOptionElement.h:
              * page/animation/AnimationBase.h:
              (WebCore::AnimationBase::animate):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationController::updateAnimations):
              * page/animation/AnimationController.h:
              * page/animation/CompositeAnimation.cpp:
              (WebCore::CompositeAnimationPrivate::updateTransitions):
              (WebCore::CompositeAnimationPrivate::updateKeyframeAnimations):
              (WebCore::CompositeAnimationPrivate::animate):
              (WebCore::CompositeAnimation::animate):
              * page/animation/CompositeAnimation.h:
              * page/animation/ImplicitAnimation.cpp:
              (WebCore::ImplicitAnimation::ImplicitAnimation):
              (WebCore::ImplicitAnimation::~ImplicitAnimation):
              (WebCore::ImplicitAnimation::animate):
              (WebCore::ImplicitAnimation::reset):
              (WebCore::ImplicitAnimation::isTargetPropertyEqual):
              (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
              * page/animation/ImplicitAnimation.h:
              (WebCore::ImplicitAnimation::create):
              * page/animation/KeyframeAnimation.cpp:
              (WebCore::KeyframeAnimation::KeyframeAnimation):
              (WebCore::KeyframeAnimation::~KeyframeAnimation):
              (WebCore::KeyframeAnimation::animate):
              (WebCore::KeyframeAnimation::validateTransformFunctionList):
              * page/animation/KeyframeAnimation.h:
              (WebCore::KeyframeAnimation::create):
              (WebCore::KeyframeAnimation::unanimatedStyle):
              * rendering/InlineTextBox.cpp:
              (WebCore::InlineTextBox::paint):
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
              (WebCore::MediaControlInputElement::MediaControlInputElement):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::styleDidChange):
              (WebCore::RenderBlock::updateFirstLetter):
              * rendering/RenderContainer.cpp:
              (WebCore::RenderContainer::addChild):
              (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
              * rendering/RenderFileUploadControl.cpp:
              (WebCore::RenderFileUploadControl::updateFromElement):
              (WebCore::RenderFileUploadControl::createButtonStyle):
              * rendering/RenderFileUploadControl.h:
              * rendering/RenderFlow.cpp:
              (WebCore::RenderFlow::createAnonymousFlow):
              * rendering/RenderFlow.h:
              * rendering/RenderInline.cpp:
              (WebCore::RenderInline::addChildToFlow):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::updateScrollCornerStyle):
              (WebCore::RenderLayer::updateResizerStyle):
              (WebCore::RenderLayer::updateReflectionStyle):
              * rendering/RenderListItem.cpp:
              (WebCore::RenderListItem::styleDidChange):
              * rendering/RenderMedia.cpp:
              (WebCore::RenderMedia::createPanel):
              (WebCore::RenderMedia::createTimeDisplay):
              (WebCore::RenderMedia::changeOpacity):
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::selectionBackgroundColor):
              (WebCore::RenderObject::selectionForegroundColor):
              (WebCore::RenderObject::createAnonymousBlock):
              (WebCore::RenderObject::setAnimatableStyle):
              (WebCore::RenderObject::setStyle):
              (WebCore::RenderObject::setStyleInternal):
              (WebCore::RenderObject::arenaDelete):
              (WebCore::RenderObject::firstLineStyle):
              (WebCore::RenderObject::getPseudoStyle):
              * rendering/RenderObject.h:
              (WebCore::RenderObject::style):
              * rendering/RenderSVGBlock.cpp:
              (WebCore::RenderSVGBlock::setStyle):
              * rendering/RenderSVGBlock.h:
              * rendering/RenderScrollbar.cpp:
              (WebCore::RenderScrollbar::getScrollbarPseudoStyle):
              (WebCore::RenderScrollbar::updateScrollbarPart):
              * rendering/RenderScrollbar.h:
              * rendering/RenderSlider.cpp:
              (WebCore::RenderSlider::styleDidChange):
              (WebCore::RenderSlider::createThumbStyle):
              (WebCore::RenderSlider::updateFromElement):
              * rendering/RenderSlider.h:
              * rendering/RenderTable.cpp:
              (WebCore::RenderTable::addChild):
              * rendering/RenderTableRow.cpp:
              (WebCore::RenderTableRow::addChild):
              * rendering/RenderTableSection.cpp:
              (WebCore::RenderTableSection::addChild):
              * rendering/RenderTextControl.cpp:
              (WebCore::RenderTextControl::styleDidChange):
              (WebCore::RenderTextControl::createInnerBlockStyle):
              (WebCore::RenderTextControl::createInnerTextStyle):
              (WebCore::RenderTextControl::createResultsButtonStyle):
              (WebCore::RenderTextControl::createCancelButtonStyle):
              (WebCore::RenderTextControl::createSubtreeIfNeeded):
              (WebCore::RenderTextControl::updatePlaceholderVisibility):
              * rendering/RenderTextControl.h:
              * rendering/TextControlInnerElements.cpp:
              (WebCore::TextControlInnerElement::attachInnerElement):
              * rendering/TextControlInnerElements.h:
              * rendering/style/KeyframeList.cpp:
              (WebCore::KeyframeList::clear):
              (WebCore::KeyframeList::operator==):
              (WebCore::KeyframeList::insert):
              * rendering/style/KeyframeList.h:
              (WebCore::KeyframeValue::KeyframeValue):
              (WebCore::KeyframeValue::~KeyframeValue):
              (WebCore::KeyframeValue::key):
              (WebCore::KeyframeValue::style):
              * rendering/style/RenderStyle.cpp:
              (WebCore::defaultStyle):
              (WebCore::RenderStyle::create):
              (WebCore::RenderStyle::createDefaultStyle):
              (WebCore::RenderStyle::clone):
              (WebCore::RenderStyle::RenderStyle):
              (WebCore::RenderStyle::getCachedPseudoStyle):
              (WebCore::RenderStyle::addCachedPseudoStyle):
              * rendering/style/RenderStyle.h:
              (WebCore::):
              (WebCore::InheritedFlags::operator!=):
              * svg/SVGClipPathElement.cpp:
              (WebCore::SVGClipPathElement::canvasResource):
              * svg/SVGGradientElement.cpp:
              (WebCore::SVGGradientElement::buildStops):
              * svg/SVGStyledElement.cpp:
              (WebCore::SVGStyledElement::resolveStyle):
              * svg/SVGStyledElement.h:
              * svg/SVGUseElement.cpp:
              (WebCore::SVGUseElement::recalcStyle):
              (WebCore::SVGUseElement::attachShadowTree):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dec0cbf2
  18. 09 Oct, 2008 1 commit
  19. 03 Oct, 2008 1 commit
  20. 02 Oct, 2008 1 commit
  21. 28 Sep, 2008 1 commit
    • darin@apple.com's avatar
      2008-09-28 Darin Adler <darin@apple.com> · 80c76ce7
      darin@apple.com authored
              Reviewed by Sam Weinig (except for a few comment and header tweaks).
      
              - https://bugs.webkit.org/show_bug.cgi?id=21158
                reduce use of virtual functions in Node for speed
      
              Speeds up Dromaeo a bit less than 1%.
      
              * bindings/js/JSNamedNodesCollection.cpp: Include Element.h instead of
              Node.h now that some inlines are in there.
      
              * dom/Attr.h: Override both the virtual and non-virtual name functions.
      
              * dom/ChildNodeList.cpp:
              (WebCore::ChildNodeList::nodeMatches): Updated to take an Element.
              * dom/ChildNodeList.h: Ditto.
              * dom/ClassNodeList.cpp:
              (WebCore::ClassNodeList::nodeMatches): Ditto.
              * dom/ClassNodeList.h: Ditto.
      
              * dom/Document.h: Put the Node::isDocumentNode() function's inline
              definition here where it can see the Document class definition.
      
              * dom/DynamicNodeList.cpp:
              (WebCore::DynamicNodeList::length): Changed to pass an Element.
              (WebCore::DynamicNodeList::itemForwardsFromCurrent): Ditto.
              (WebCore::DynamicNodeList::itemBackwardsFromCurrent): Ditto.
              (WebCore::DynamicNodeList::itemWithName): Ditto.
              * dom/DynamicNodeList.h: Ditto.
      
              * dom/Element.cpp: Removed virtualHasTagName.
              * dom/Element.h: Made localName, prefix, namespaceURI, and
              styleForRenderer non-virtual. Added virtualPrefix, virtualLocalName,
              virtualNamespaceURI, and removed virtualHasTagName. Put the
              Node::hasTagName, Node::hasAttributes, and Node::attributes
              functions' inline definitions here where they can see the Element
              class definition.
      
              * dom/NameNodeList.cpp:
              (WebCore::NameNodeList::nodeMatches): Updated to take an Element.
              * dom/NameNodeList.h: Ditto.
      
              * dom/Node.cpp:
              (WebCore::Node::virtualPrefix): Renamed from prefix.
              (WebCore::Node::virtualLocalName): Renamed from localName.
              (WebCore::Node::virtualNamespaceURI): Renamed from namespaceURI.
              (WebCore::Node::styleForRenderer): Handle the Element case here.
      
              * dom/Node.h: Removed definition of hasTagName that calls virtual,
              since we now have a non-virtual version. Made hasAttributes,
              attributes, remove, localName, namespaceURI, prefix, isDocumentNode,
              and styleForRenderer non-virtual. Added virtualPrefix,
              virtualLocalName, and virtualNamespaceURI. Removed isMalformed
              and setMalformed, which are used only on HTMLFormElement objects.
      
              * dom/TagNodeList.cpp:
              (WebCore::TagNodeList::nodeMatches): Updated to take an Element.
              * dom/TagNodeList.h: Ditto.
      
              * html/HTMLAnchorElement.cpp: Added a comment.
              * html/HTMLFormControlElement.cpp: Ditto.
      
              * html/HTMLAnchorElement.h: Removed unused, unimplemented setTabIndex
              function. Marked tabIndex function virtual explicitly for clarity.
      
              * html/HTMLAreaElement.h: Removed unused, unimplemented setTabIndex
              function. Marked isFocusable function virtual explicitly for clarity.
      
              * html/HTMLElement.h: Marked tabIndex function virtual explicitly for
              clarity.
              * html/HTMLFormControlElement.h: Ditto.
      
              * html/HTMLFormElement.h: Made isMalformed non-virtual.
      
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError): Use the already-cast-to-HTMLElement
              pointer to call localName since that one does not need to call a virtual
              function.
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::layoutBlock): Cast to HTMLFormElement before
              calling isMalformed. We already did a tag name check so we know it's
              an HTMLFormELement.
      
              * xml/XPathUtil.cpp:
              (WebCore::XPath::isValidContextNode): Rewrote to not make so many calls
              to nodeType(), since it's a virtual function.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80c76ce7
  22. 25 Sep, 2008 1 commit
    • hyatt@apple.com's avatar
      2008-09-25 David Hyatt <hyatt@apple.com> · c01fb23a
      hyatt@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=21129
      
              Refactor contents size and scroll offset to be cross-platform.  Reduce further the number
              of platform-specific methods required of ScrollView implementations.
      
              Reviewed by Tim Hatcher
      
              * dom/MouseRelatedEvent.cpp:
              (WebCore::contentsX):
              (WebCore::contentsY):
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::scrollLeft):
              (WebCore::HTMLBodyElement::setScrollLeft):
              (WebCore::HTMLBodyElement::scrollTop):
              (WebCore::HTMLBodyElement::setScrollTop):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem):
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::scrollX):
              (WebCore::DOMWindow::scrollY):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::hitTestResultAtPoint):
              * page/FrameView.cpp:
              (WebCore::FrameView::scrollTo):
              (WebCore::FrameView::windowClipRect):
              * platform/ScrollView.cpp:
              (WebCore::ScrollView::visibleContentRect):
              (WebCore::ScrollView::contentsSize):
              (WebCore::ScrollView::platformContentsSize):
              * platform/ScrollView.h:
              (WebCore::ScrollView::scrollPosition):
              (WebCore::ScrollView::scrollOffset):
              (WebCore::ScrollView::scrollX):
              (WebCore::ScrollView::scrollY):
              (WebCore::ScrollView::contentsWidth):
              (WebCore::ScrollView::contentsHeight):
              * platform/gtk/ScrollViewGtk.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
              (WebCore::ScrollView::setGtkAdjustments):
              (WebCore::ScrollView::resizeContents):
              (WebCore::ScrollView::contentsWidth):
              (WebCore::ScrollView::contentsHeight):
              (WebCore::ScrollView::scrollOffset):
              (WebCore::ScrollView::maximumScroll):
              (WebCore::ScrollView::scrollBy):
              (WebCore::ScrollView::suppressScrollbars):
              (WebCore::ScrollView::setHScrollbarMode):
              (WebCore::ScrollView::setVScrollbarMode):
              (WebCore::ScrollView::setScrollbarsMode):
              (WebCore::ScrollView::setFrameGeometry):
              (WebCore::ScrollView::updateScrollbars):
              * platform/mac/ScrollViewMac.mm:
              (WebCore::ScrollView::platformContentsSize):
              (WebCore::ScrollView::scrollBy):
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::convertFromContainingWindow):
              (WebCore::Widget::convertToContainingWindow):
              * platform/qt/ScrollViewQt.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
              (WebCore::ScrollView::resizeContents):
              (WebCore::ScrollView::setFrameGeometry):
              (WebCore::ScrollView::scrollOffset):
              (WebCore::ScrollView::maximumScroll):
              (WebCore::ScrollView::scrollBy):
              (WebCore::ScrollView::setHScrollbarMode):
              (WebCore::ScrollView::setVScrollbarMode):
              (WebCore::ScrollView::setScrollbarsMode):
              (WebCore::ScrollView::updateScrollbars):
              * platform/win/ScrollViewWin.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
              (WebCore::ScrollView::ScrollViewPrivate::setAllowsScrolling):
              (WebCore::ScrollView::resizeContents):
              (WebCore::ScrollView::setFrameGeometry):
              (WebCore::ScrollView::scrollOffset):
              (WebCore::ScrollView::maximumScroll):
              (WebCore::ScrollView::scrollBy):
              (WebCore::ScrollView::setHScrollbarMode):
              (WebCore::ScrollView::setVScrollbarMode):
              (WebCore::ScrollView::setScrollbarsMode):
              (WebCore::ScrollView::updateScrollbars):
              * platform/wx/ScrollViewWx.cpp:
              (WebCore::ScrollView::platformVisibleContentRect):
              (WebCore::ScrollView::platformContentsSize):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::nodeAtPoint):
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::scrollRectToVisible):
              (WebCore::RenderLayer::calculateClipRects):
              (WebCore::RenderLayer::calculateRects):
              * rendering/RenderView.cpp:
              (WebCore::RenderView::absolutePosition):
              (WebCore::RenderView::computeAbsoluteRepaintRect):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c01fb23a
  23. 16 Sep, 2008 2 commits
    • mitz@apple.com's avatar
      WebCore: · d9462a52
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=15129
                <rdar://problem/4644824> adding a new line with DOM does unnecessary additional repaint
      
              Covered by fast/repaint/4776765.html
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::layoutBlock): Avoid repainting this object if it
              did not have layout in the beginning.
              (WebCore::RenderBlock::layoutBlockChildren): If a child did not have
              layout in the beginning, repaint it in its new position, to compensate
              for the above (regardless of whether it "moved").
              * rendering/RenderObject.cpp:
              (WebCore::RenderObject::checkForRepaintDuringLayout): Added a comment
              about generalizing this fix in the future.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - updated results for https://bugs.webkit.org/show_bug.cgi?id=15129
                <rdar://problem/4644824> adding a new line with DOM does unnecessary additional repaint
      
              * platform/mac/fast/repaint/4776765-expected.checksum:
              * platform/mac/fast/repaint/4776765-expected.png:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9462a52
    • mitz@apple.com's avatar
      WebCore: · 6d92520b
      mitz@apple.com authored
              Reviewed by Dave Hyatt.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=15384
                Div does not notice when grandparent changes height
      
              Test: fast/block/basic/quirk-percent-height-grandchild.html
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=20714
                Resizing Gmail inbox vertically results in whitespace at the bottom of the window
      
              Test: fast/replaced/percent-height-in-anonymous-block.html
      
              Added a two-way mapping between boxes with percentage heights and
              their non-parent ancestors up to the one the height is computed relative
              to. In quirks mode (the first bug), this can be any number of containing
              block with auto height. In strict mode (the second bug) this can be
              the containing block of an anonymous block containing a replaced
              element.
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::~RenderBlock): Added code to remove the all the
              mapping to/from this block to percentage-height descendants.
              (WebCore::RenderBlock::layoutBlockChildren): Added code to mark
              percentage-height descendants (and their containing block ancestry chain
              up to this block) for layout. This ensures that those descendants whose
              height depends on the height of this block (or an ancestor) are updated.
              (WebCore::RenderBlock::addPercentHeightDescendant): Added. Establishes
              a two-way mapping between this block and the given box.
              (WebCore::RenderBlock::removePercentHeightDescendant): Added. Removes
              all the mapping to/from this box.
              * rendering/RenderBlock.h:
              * rendering/RenderBox.cpp:
              (WebCore::RenderBox::setStyle): Added calls to
              removePercentHeightDescendant() when style changes and the box
              previously had a percentage height. An exception is when the style
              change does not require layout, in which case the box still has
              a percentage height and the mappings are valid. In all other cases,
              any required mappings will be (re-)established during layout.
              (WebCore::RenderBox::destroy): Added a call to
              removePercentHeightDescendant.
              (WebCore::RenderBox::calcPercentageHeight): Added code that, in quirks
              mode, if a higher-than-parent containing block is affecting the box's
              height, creates a mapping between the box and that block.
              (WebCore::RenderBox::calcReplacedHeightUsing): Changed to skip over
              anonymous containing blocks, if any, and when that happens, use
              addPercentHeightDescendant() to ensure that the non-anonymous block
              is aware of the dependent percent-height box.
      
      LayoutTests:
      
              Reviewed by Dave Hyatt.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=15384
                Div does not notice when grandparent changes height
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=20714
                Resizing Gmail inbox vertically results in whitespace at the bottom of the window
      
              * fast/block/basic/quirk-percent-height-grandchild.html: Added.
              * fast/replaced/percent-height-in-anonymous-block.html: Added.
              * platform/mac/fast/block/basic/quirk-percent-height-grandchild-expected.checksum: Added.
              * platform/mac/fast/block/basic/quirk-percent-height-grandchild-expected.png: Added.
              * platform/mac/fast/block/basic/quirk-percent-height-grandchild-expected.txt: Added.
              * platform/mac/fast/replaced/percent-height-in-anonymous-block-expected.checksum: Added.
              * platform/mac/fast/replaced/percent-height-in-anonymous-block-expected.png: Added.
              * platform/mac/fast/replaced/percent-height-in-anonymous-block-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d92520b
  24. 14 Sep, 2008 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: · 064861af
      weinig@apple.com authored
      2008-09-14  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Mark Rowe.
      
              Remove extraneous semicolons.
      
              * kjs/nodes.cpp:
              (JSC::PrefixResolveNode::emitCode):
              * wtf/FastMalloc.cpp:
              (WTF::TCMalloc_PageHeap::GrowHeap):
      
      WebCore:
      
      2008-09-14  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Mark Rowe.
      
              Remove extraneous semicolons.
      
              * bindings/scripts/CodeGeneratorObjC.pm:
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::tokenizeRelAttribute):
              * html/HTMLScriptElement.cpp:
              (WebCore::HTMLScriptElement::charsetAttributeValue):
              (WebCore::HTMLScriptElement::typeAttributeValue):
              * platform/graphics/qt/GradientQt.cpp:
              (WebCore::Gradient::platformGradient):
              * platform/qt/ScrollViewQt.cpp:
              (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
              * platform/win/ScrollViewWin.cpp:
              (WebCore::ScrollView::updateScrollbars):
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::paintEllipsisBoxes):
              * svg/SVGPathSegList.cpp:
              (WebCore::SVGPathSegList::toPathData):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      064861af
  25. 04 Sep, 2008 1 commit
    • mitz@apple.com's avatar
      WebCore: · 89557c51
      mitz@apple.com authored
              Reviewed by Dave Hyatt.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=19717
                <rdar://problem/6026832> REGRESSION (r31876): menu items render horizontally at the Economist
      
              * rendering/RenderBlock.cpp:
              (WebCore::RenderBlock::layoutOnlyPositionedObjects): In the
              positioned movement only case, call
              tryLayoutDoingPositionedMovementOnly() and fall back on doing a full
              layout if that fails.
              (WebCore::RenderBlock::layoutPositionedObjects): Ditto.
              * rendering/RenderBox.h:
              (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly): Renamed
              layoutDoingPositionedMovementOnly to this, and made this function
              check if the width changed. If it did, return, leaving the object
              dirty. The caller can then call layout(). The width can change even
              in the "positioned movement only" case if the object is shrink-to-fit
              and the available width constraint is met. (This was the case in the
              bug).
              * rendering/RenderObject.h:
              (WebCore::RenderObject::tryLayoutDoingPositionedMovementOnly):
              Renamed layoutDoingPositionedMovementOnly() to this.
      
      LayoutTests:
      
              Reviewed by Dave Hyatt.
      
              - test for https://bugs.webkit.org/show_bug.cgi?id=19717
                <rdar://problem/6026832> REGRESSION (r31876): menu items render horizontally at the Economist
      
              * fast/block/positioning/move-with-auto-width.html: Added.
              * platform/mac/fast/block/positioning/move-with-auto-width-expected.checksum: Added.
              * platform/mac/fast/block/positioning/move-with-auto-width-expected.png: Added.
              * platform/mac/fast/block/positioning/move-with-auto-width-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89557c51