1. 21 Aug, 2013 2 commits
  2. 19 Aug, 2013 2 commits
    • rniwa@webkit.org's avatar
      <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow · c23cc2ca
      rniwa@webkit.org authored
      Reviewed by Simon Fraser.
      
      Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
      
      They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::computeOverflow):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c23cc2ca
    • psolanki@apple.com's avatar
      <https://webkit.org/b/119918> Frame::selection() should return a reference · 87ae63d7
      psolanki@apple.com authored
      Reviewed by Darin Adler.
      
      m_selection is never NULL so return a reference from Frame::selection(). Also removed some
      unnecessary null checks and assert diff ts exposed as a result.
      
      Source/WebCore:
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::selection):
      (WebCore::AccessibilityRenderObject::setSelectedTextRange):
      (WebCore::AccessibilityRenderObject::isFocused):
      (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
      (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
      * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
      (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
      (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
      (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
      (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::isFrameFocused):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::setDataAndUpdate):
      * dom/Document.cpp:
      (WebCore::Document::nodeChildrenWillBeRemoved):
      (WebCore::Document::nodeWillBeRemoved):
      * dom/Element.cpp:
      (WebCore::Element::updateFocusAppearance):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::stopPendingCorrection):
      (WebCore::AlternativeTextController::applyAlternativeTextToRange):
      (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
      (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
      (WebCore::AlternativeTextController::timerFired):
      (WebCore::AlternativeTextController::respondToChangedSelection):
      * editing/DeleteButtonController.cpp:
      (WebCore::DeleteButtonController::respondToChangedSelection):
      (WebCore::DeleteButtonController::enable):
      (WebCore::DeleteButtonController::deleteTarget):
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
      * editing/DictationCommand.cpp:
      (WebCore::DictationCommand::insertText):
      * editing/EditCommand.cpp:
      (WebCore::EditCommand::EditCommand):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::mergeTypingStyle):
      * editing/Editor.cpp:
      (WebCore::Editor::selectionForCommand):
      (WebCore::Editor::canEdit):
      (WebCore::Editor::canEditRichly):
      (WebCore::Editor::canDHTMLCut):
      (WebCore::Editor::canDHTMLCopy):
      (WebCore::Editor::canCopy):
      (WebCore::Editor::canDelete):
      (WebCore::Editor::canSmartCopyOrDelete):
      (WebCore::Editor::deleteWithDirection):
      (WebCore::Editor::deleteSelectionWithSmartDelete):
      (WebCore::Editor::replaceSelectionWithFragment):
      (WebCore::Editor::selectedRange):
      (WebCore::Editor::tryDHTMLCopy):
      (WebCore::Editor::tryDHTMLCut):
      (WebCore::Editor::hasBidiSelection):
      (WebCore::Editor::selectionUnorderedListState):
      (WebCore::Editor::selectionOrderedListState):
      (WebCore::Editor::increaseSelectionListLevel):
      (WebCore::Editor::increaseSelectionListLevelOrdered):
      (WebCore::Editor::increaseSelectionListLevelUnordered):
      (WebCore::Editor::decreaseSelectionListLevel):
      (WebCore::Editor::findEventTargetFromSelection):
      (WebCore::Editor::applyStyle):
      (WebCore::Editor::applyParagraphStyle):
      (WebCore::Editor::applyStyleToSelection):
      (WebCore::Editor::applyParagraphStyleToSelection):
      (WebCore::Editor::selectionStartHasStyle):
      (WebCore::Editor::selectionHasStyle):
      (WebCore::Editor::selectionStartCSSPropertyValue):
      (WebCore::Editor::appliedEditing):
      (WebCore::Editor::insertTextWithoutSendingTextEvent):
      (WebCore::Editor::insertLineBreak):
      (WebCore::Editor::insertParagraphSeparator):
      (WebCore::Editor::cut):
      (WebCore::Editor::copy):
      (WebCore::Editor::paste):
      (WebCore::Editor::baseWritingDirectionForSelectionStart):
      (WebCore::Editor::selectComposition):
      (WebCore::Editor::setComposition):
      (WebCore::Editor::ignoreSpelling):
      (WebCore::Editor::learnSpelling):
      (WebCore::Editor::advanceToNextMisspelling):
      (WebCore::Editor::misspelledWordAtCaretOrRange):
      (WebCore::Editor::isSelectionUngrammatical):
      (WebCore::Editor::guessesForMisspelledOrUngrammatical):
      (WebCore::Editor::markMisspellingsAfterTypingToWord):
      (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
      (WebCore::Editor::markAndReplaceFor):
      (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
      (WebCore::Editor::revealSelectionAfterEditingOperation):
      (WebCore::Editor::getCompositionSelection):
      (WebCore::Editor::transpose):
      (WebCore::Editor::changeSelectionAfterCommand):
      (WebCore::Editor::selectedText):
      (WebCore::Editor::computeAndSetTypingStyle):
      (WebCore::Editor::findString):
      (WebCore::Editor::respondToChangedSelection):
      (WebCore::Editor::selectionStartHasMarkerFor):
      (WebCore::Editor::toggleOverwriteModeEnabled):
      * editing/EditorCommand.cpp:
      (WebCore::executeToggleStyleInList):
      (WebCore::expandSelectionToGranularity):
      (WebCore::stateTextWritingDirection):
      (WebCore::executeDelete):
      (WebCore::executeDeleteToMark):
      (WebCore::executeMoveBackward):
      (WebCore::executeMoveBackwardAndModifySelection):
      (WebCore::executeMoveDown):
      (WebCore::executeMoveDownAndModifySelection):
      (WebCore::executeMoveForward):
      (WebCore::executeMoveForwardAndModifySelection):
      (WebCore::executeMoveLeft):
      (WebCore::executeMoveLeftAndModifySelection):
      (WebCore::executeMovePageDown):
      (WebCore::executeMovePageDownAndModifySelection):
      (WebCore::executeMovePageUp):
      (WebCore::executeMovePageUpAndModifySelection):
      (WebCore::executeMoveRight):
      (WebCore::executeMoveRightAndModifySelection):
      (WebCore::executeMoveToBeginningOfDocument):
      (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
      (WebCore::executeMoveToBeginningOfLine):
      (WebCore::executeMoveToBeginningOfLineAndModifySelection):
      (WebCore::executeMoveToBeginningOfParagraph):
      (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
      (WebCore::executeMoveToBeginningOfSentence):
      (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
      (WebCore::executeMoveToEndOfDocument):
      (WebCore::executeMoveToEndOfDocumentAndModifySelection):
      (WebCore::executeMoveToEndOfSentence):
      (WebCore::executeMoveToEndOfSentenceAndModifySelection):
      (WebCore::executeMoveToEndOfLine):
      (WebCore::executeMoveToEndOfLineAndModifySelection):
      (WebCore::executeMoveToEndOfParagraph):
      (WebCore::executeMoveToEndOfParagraphAndModifySelection):
      (WebCore::executeMoveParagraphBackwardAndModifySelection):
      (WebCore::executeMoveParagraphForwardAndModifySelection):
      (WebCore::executeMoveUp):
      (WebCore::executeMoveUpAndModifySelection):
      (WebCore::executeMoveWordBackward):
      (WebCore::executeMoveWordBackwardAndModifySelection):
      (WebCore::executeMoveWordForward):
      (WebCore::executeMoveWordForwardAndModifySelection):
      (WebCore::executeMoveWordLeft):
      (WebCore::executeMoveWordLeftAndModifySelection):
      (WebCore::executeMoveWordRight):
      (WebCore::executeMoveWordRightAndModifySelection):
      (WebCore::executeMoveToLeftEndOfLine):
      (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
      (WebCore::executeMoveToRightEndOfLine):
      (WebCore::executeMoveToRightEndOfLineAndModifySelection):
      (WebCore::executeSelectAll):
      (WebCore::executeSelectToMark):
      (WebCore::executeSetMark):
      (WebCore::executeSwapWithMark):
      (WebCore::executeUnselect):
      (WebCore::enabledInRichlyEditableText):
      (WebCore::enabledRangeInEditableText):
      (WebCore::enabledRangeInRichlyEditableText):
      (WebCore::valueFormatBlock):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::setSelection):
      (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
      * editing/InsertLineBreakCommand.cpp:
      (WebCore::InsertLineBreakCommand::doApply):
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::doApply):
      * editing/ModifySelectionListLevel.cpp:
      (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
      (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
      * editing/RemoveFormatCommand.cpp:
      (WebCore::RemoveFormatCommand::doApply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::doApply):
      * editing/SetSelectionCommand.cpp:
      (WebCore::SetSelectionCommand::doApply):
      (WebCore::SetSelectionCommand::doUnapply):
      * editing/SpellingCorrectionCommand.cpp:
      (WebCore::SpellingCorrectionCommand::doApply):
      * editing/TextInsertionBaseCommand.cpp:
      (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
      * editing/TypingCommand.cpp:
      (WebCore::TypingCommand::deleteSelection):
      (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
      (WebCore::TypingCommand::insertText):
      (WebCore::TypingCommand::deleteKeyPressed):
      (WebCore::TypingCommand::forwardDeleteKeyPressed):
      * editing/ios/EditorIOS.mm:
      (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
      (WebCore::styleForSelectionStart):
      (WebCore::Editor::fontForSelection):
      * editing/mac/EditorMac.mm:
      (WebCore::styleForSelectionStart):
      (WebCore::Editor::fontForSelection):
      (WebCore::Editor::canCopyExcludingStandaloneImages):
      (WebCore::Editor::readSelectionFromPasteboard):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::defaultEventHandler):
      (WebCore::HTMLAnchorElement::setActive):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateFocusAppearance):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updateFocusAppearance):
      (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::setSelectionRange):
      (WebCore::HTMLTextFormControlElement::computeSelectionStart):
      (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
      (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
      (WebCore::HTMLTextFormControlElement::selectionChanged):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::clear):
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::createFromSelection):
      * page/ContextMenuController.cpp:
      (WebCore::insertUnicodeCharacter):
      (WebCore::ContextMenuController::contextMenuItemSelected):
      (WebCore::selectionContainsPossibleWord):
      (WebCore::ContextMenuController::populate):
      (WebCore::ContextMenuController::checkOrEnableIfNeeded):
      * page/DOMSelection.cpp:
      (WebCore::selectionShadowAncestor):
      (WebCore::DOMSelection::visibleSelection):
      (WebCore::DOMSelection::isCollapsed):
      (WebCore::DOMSelection::type):
      (WebCore::DOMSelection::rangeCount):
      (WebCore::DOMSelection::collapse):
      (WebCore::DOMSelection::collapseToEnd):
      (WebCore::DOMSelection::collapseToStart):
      (WebCore::DOMSelection::empty):
      (WebCore::DOMSelection::setBaseAndExtent):
      (WebCore::DOMSelection::setPosition):
      (WebCore::DOMSelection::modify):
      (WebCore::DOMSelection::extend):
      (WebCore::DOMSelection::getRangeAt):
      (WebCore::DOMSelection::removeAllRanges):
      (WebCore::DOMSelection::addRange):
      (WebCore::DOMSelection::deleteFromDocument):
      (WebCore::DOMSelection::containsNode):
      (WebCore::DOMSelection::toString):
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove):
      (WebCore::setSelectionToDragCaret):
      (WebCore::DragController::concludeEditDrag):
      (WebCore::DragController::draggableElement):
      (WebCore::selectElement):
      (WebCore::dragLocForSelectionDrag):
      (WebCore::DragController::startDrag):
      * page/DragController.h:
      * page/EventHandler.cpp:
      (WebCore::setSelectionIfNeeded):
      (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
      (WebCore::EventHandler::handleMousePressEventDoubleClick):
      (WebCore::EventHandler::handleMousePressEventSingleClick):
      (WebCore::EventHandler::updateSelectionForMouseDrag):
      (WebCore::EventHandler::lostMouseCapture):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::nodeIsNotBeingEdited):
      (WebCore::EventHandler::selectCursor):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::handleMouseDoubleClickEvent):
      (WebCore::EventHandler::dispatchMouseEvent):
      (WebCore::EventHandler::sendContextMenuEvent):
      (WebCore::EventHandler::sendContextMenuEventForKey):
      (WebCore::handleKeyboardSelectionMovement):
      (WebCore::EventHandler::handleDrag):
      * page/FocusController.cpp:
      (WebCore::FocusController::setFocusedFrame):
      (WebCore::FocusController::setFocused):
      (WebCore::FocusController::advanceFocusInDocumentOrder):
      (WebCore::clearSelectionIfNeeded):
      (WebCore::FocusController::setActive):
      * page/Frame.cpp:
      (WebCore::Frame::dragImageForSelection):
      * page/Frame.h:
      (WebCore::Frame::selection):
      * page/FrameView.cpp:
      (WebCore::FrameView::performPostLayoutTasks):
      (WebCore::FrameView::paintContentsForSnapshot):
      * page/Page.cpp:
      (WebCore::Page::findString):
      (WebCore::Page::findStringMatchingRanges):
      (WebCore::Page::selection):
      * page/mac/FrameMac.mm:
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.mm:
      (WebCore::selectionImage):
      * page/win/FrameWin.cpp:
      (WebCore::imageFromSelection):
      (WebCore::Frame::dragImageForSelection):
      * platform/ios/PasteboardIOS.mm:
      (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::isSelected):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paintCaret):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintAreaElementFocusRing):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollTo):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::paintItemForeground):
      (WebCore::RenderListBox::paintItemBackground):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::selectionBackgroundColor):
      (WebCore::RenderObject::selectionColor):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isFocused):
      * rendering/RenderThemeWin.cpp:
      (WebCore::RenderThemeWin::adjustSearchFieldStyle):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::writeSelection):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::setSelection):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::deselectAll):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::selectSubString):
      * testing/Internals.cpp:
      (WebCore::Internals::absoluteCaretBounds):
      (WebCore::Internals::selectionBounds):
      
      Source/WebKit/blackberry:
      
      * Api/InRegionScroller.cpp:
      (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
      * WebKitSupport/DatePickerClient.cpp:
      (BlackBerry::WebKit::DatePickerClient::setValueAndClosePopup):
      * WebKitSupport/InPageSearchManager.cpp:
      (BlackBerry::WebKit::InPageSearchManager::findNextString):
      (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
      (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
      (BlackBerry::WebKit::InputHandler::setElementUnfocused):
      (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
      (BlackBerry::WebKit::InputHandler::setElementFocused):
      (BlackBerry::WebKit::InputHandler::openDatePopup):
      (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
      (BlackBerry::WebKit::InputHandler::selectionPosition):
      (BlackBerry::WebKit::InputHandler::setSelection):
      (BlackBerry::WebKit::InputHandler::deleteSelection):
      (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::SelectionHandler::cancelSelection):
      (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
      (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
      (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
      (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
      (BlackBerry::WebKit::SelectionHandler::setSelection):
      (BlackBerry::WebKit::SelectionHandler::startCaretViewportRect):
      (BlackBerry::WebKit::SelectionHandler::selectNextParagraph):
      (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity):
      (BlackBerry::WebKit::SelectionHandler::selectObject):
      (BlackBerry::WebKit::directionOfEnclosingBlock):
      (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
      (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded):
      (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
      (BlackBerry::WebKit::SelectionHandler::selectionContains):
      * WebKitSupport/SpellingHandler.cpp:
      (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::selectionRectangle):
      (DumpRenderTreeSupportEfl::firstRectForCharacterRange):
      (DumpRenderTreeSupportEfl::selectedRange):
      * WebCoreSupport/EditorClientEfl.cpp:
      (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      * ewk/ewk_frame.cpp:
      (ewk_frame_text_selection_type_get):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      (WebKit::ChromeClient::paint):
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::firstRectForCharacterRange):
      (DumpRenderTreeSupportGtk::selectedRange):
      (DumpRenderTreeSupportGtk::rectangleForSelection):
      * WebCoreSupport/EditorClientGtk.cpp:
      (WebKit::collapseSelection):
      (WebKit::setSelectionPrimaryClipboardIfNeeded):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_get_range_for_word_around_caret):
      * webkit/webkitwebview.cpp:
      (getLocationForKeyboardGeneratedContextMenu):
      
      Source/WebKit/mac:
      
      * Plugins/WebPluginController.mm:
      * WebView/WebFrame.mm:
      (-[WebFrame _hasSelection]):
      (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
      (-[WebFrame _selectionGranularity]):
      (-[WebFrame _convertToNSRange:]):
      (-[WebFrame _convertToDOMRange:]):
      (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
      (-[WebFrame _typingStyle]):
      (-[WebFrame _selectedNSRange]):
      (-[WebFrame _selectNSRange:]):
      (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
      (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
      * WebView/WebHTMLRepresentation.mm:
      (-[WebHTMLRepresentation currentForm]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView readSelectionFromPasteboard:]):
      (-[WebHTMLView _selectedRange]):
      (-[WebHTMLView _hasSelection]):
      (-[WebHTMLView _hasSelectionOrInsertionPoint]):
      (-[WebHTMLView _hasInsertionPoint]):
      (-[WebHTMLView _isEditable]):
      (-[WebHTMLView jumpToSelection:]):
      (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
      (-[WebHTMLView maintainsInactiveSelection]):
      (isTextInput):
      (isInPasswordField):
      (-[WebHTMLView centerSelectionInVisibleArea:]):
      (-[WebHTMLView _canSmartCopyOrDelete]):
      (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
      (-[WebHTMLView _updateSelectionForInputManager]):
      (-[WebHTMLView selectionRect]):
      (-[WebHTMLView selectionTextRects]):
      (-[WebHTMLView selectionImageRect]):
      (-[WebHTMLView selectAll]):
      (-[WebHTMLView deselectAll]):
      (-[WebHTMLView selectedAttributedString]):
      * WebView/WebTextCompletionController.mm:
      (-[WebTextCompletionController doCompletion]):
      * WebView/WebView.mm:
      (-[WebView setSelectedDOMRange:affinity:]):
      (-[WebView selectedDOMRange]):
      (-[WebView selectionAffinity]):
      (-[WebView setEditable:]):
      (-[WebView _selectionIsCaret]):
      (-[WebView _selectionIsAll]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::selectedRange):
      (DumpRenderTreeSupportQt::firstRectForCharacterRange):
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::respondToChangedSelection):
      (WebCore::EditorClientQt::handleKeyboardEvent):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::hasSelection):
      (QWebPageAdapter::selectedText):
      (QWebPageAdapter::findText):
      (QWebPageAdapter::inputMethodEvent):
      (QWebPageAdapter::inputMethodQuery):
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      (WebFrame::currentForm):
      * WebView.cpp:
      (WebView::updateFocusedAndActiveState):
      (WebView::selectionRect):
      (WebView::centerSelectionInVisibleArea):
      (WebView::hasSelectedRange):
      (WebView::replaceSelectionWithText):
      (WebView::clearSelection):
      (WebView::prepareCandidateWindow):
      (WebView::onIMERequestCharPosition):
      (WebView::onIMERequestReconvertString):
      (WebView::firstRectForCharacterRangeForTesting):
      (WebView::selectedRangeForTesting):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/EditorClientWinCE.cpp:
      (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::updateGlobalSelection):
      * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
      (WebKit::collapseSelection):
      (WebKit::WebEditorClient::updateGlobalSelection):
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
      (WebKit::WebContextMenuClient::lookUpInDictionary):
      (WebKit::WebContextMenuClient::searchWithSpotlight):
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::frameWithSelection):
      (WebKit::FindController::updateFindUIAfterPageScroll):
      (WebKit::FindController::getFindIndicatorBitmapAndRect):
      (WebKit::FindController::getImageForFindMatch):
      (WebKit::FindController::selectFindMatch):
      (WebKit::FindController::updateFindIndicator):
      (WebKit::FindController::drawRect):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::editorState):
      (WebKit::WebPage::scaledSnapshotWithOptions):
      (WebKit::WebPage::centerSelectionInVisibleArea):
      (WebKit::frameWithSelection):
      (WebKit::WebPage::clearSelection):
      (WebKit::WebPage::confirmComposition):
      (WebKit::WebPage::setComposition):
      (WebKit::WebPage::currentSelectionAsRange):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::setComposition):
      (WebKit::WebPage::insertText):
      (WebKit::WebPage::insertDictatedText):
      (WebKit::WebPage::getMarkedRange):
      (WebKit::WebPage::getSelectedRange):
      (WebKit::WebPage::getAttributedSubstringFromRange):
      (WebKit::WebPage::characterIndexForPoint):
      (WebKit::convertToRange):
      (WebKit::WebPage::performDictionaryLookupAtLocation):
      (WebKit::WebPage::readSelectionFromPasteboard):
      (WebKit::WebPage::getStringSelectionForPasteboard):
      (WebKit::WebPage::getDataSelectionForPasteboard):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87ae63d7
  3. 18 Aug, 2013 1 commit
  4. 17 Aug, 2013 2 commits
  5. 16 Aug, 2013 1 commit
    • antti@apple.com's avatar
      <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared · f269b27a
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
      pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
      want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
      traversing through.
              
      This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
      member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
      now always null in the root node.
              
      ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::pushParentShadowRoot):
      (WebCore::StyleResolver::popParentShadowRoot):
      * dom/Attr.cpp:
      (WebCore::Attr::createTextChild):
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::removeBetween):
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::appendChildToContainer):
      (WebCore::Private::addChildNodesToDeletionQueue):
      * dom/Document.h:
      (WebCore::Node::Node):
      * dom/Element.cpp:
      (WebCore::Element::addShadowRoot):
      (WebCore::Element::removeShadowRoot):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::releasePseudoElement):
      * dom/EventPathWalker.cpp:
      (WebCore::EventPathWalker::moveToParent):
      * dom/EventRetargeter.cpp:
      (WebCore::determineDispatchBehavior):
      * dom/EventRetargeter.h:
      (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
      * dom/Node.cpp:
      (WebCore::Node::shadowHost):
      (WebCore::Node::deprecatedShadowAncestorNode):
      (WebCore::Node::parentOrShadowHostElement):
      * dom/Node.h:
      (WebCore::Node::hasTreeSharedParent):
              
          Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
      
      (WebCore::Node::setParentNode):
      (WebCore::Node::parentNode):
      (WebCore::Node::parentNodeGuaranteedHostFree):
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::PseudoElement):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::ShadowRoot):
      (WebCore::ShadowRoot::setInnerHTML):
      (WebCore::ShadowRoot::setApplyAuthorStyles):
      (WebCore::ShadowRoot::setResetStyleInheritance):
      * dom/ShadowRoot.h:
              
          Rename host() -> hostElement() for clarity.
      
      (WebCore::Node::parentOrShadowHostNode):
      * dom/Text.cpp:
      (WebCore::isSVGShadowText):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::focusedElement):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::ensureDistribution):
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::insertedInto):
      (WebCore::InsertionPoint::removedFrom):
      (WebCore::InsertionPoint::parseAttribute):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::instanceAssociatedWithShadowTreeElement):
      * page/FocusController.cpp:
      (WebCore::FocusNavigationScope::owner):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::hasLineIfEmpty):
      * rendering/RenderLayer.cpp:
      (WebCore::rendererForScrollbar):
      * svg/SVGElementInstance.h:
      (WebCore::SVGElementInstance::setParentNode):
                  
          Renamed so it works with appendChildToContainer template.
      
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::title):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f269b27a
  6. 14 Aug, 2013 3 commits
    • hmuller@adobe.com's avatar
      [CSS Exclusions] Minimal support for using an image to define a shape · 416daaac
      hmuller@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=116643
      
      Source/WebCore:
      
      Reviewed by Alexandru Chiculita.
      
      This is a first small step towards supporting CSS shapes defined by an
      image URL and a alpha channel threshold. To keep the patch as small as
      possible, there are many limitations and remaining work items. For
      example images are currently restricted to same-origin, although CORS
      should be supported. See https://bugs.webkit.org/show_bug.cgi?id=116348
      for the current list.
      
      Test: fast/exclusions/shape-inside/shape-inside-image-001.html
      Test: fast/exclusions/shape-inside/shape-inside-image-002.html
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::imageChanged): When the image has finished loading, request a layout.
      * rendering/RenderBlock.h:
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::setStyle): Add notify clients for shape images.
      (WebCore::RenderObject::updateShapeImage):
      (WebCore::removeShapeImageClient):
      (WebCore::RenderObject::arenaDelete): Remove notify clients for shape images.
      * rendering/RenderObject.h:
      * rendering/shapes/RasterShape.cpp: Added. A Shape defined by thresholding an image's alpha channel.
      (WebCore::RasterShapeIntervals::bounds):
      (WebCore::RasterShapeIntervals::addInterval): Add a single run to the shape.
      (WebCore::alignedRect):
      (WebCore::RasterShapeIntervals::getIntervals): Return the shape's runs that fall within a horizonal box.
      (WebCore::RasterShape::marginIntervals): Internal representation of the shape with shape-margin factored in.  Currently only a stub.
      (WebCore::RasterShape::paddingIntervals): Internal representation of the shape with shape-padding factored in.  Currently only a stub.
      (WebCore::RasterShape::getExcludedIntervals):
      (WebCore::RasterShape::getIncludedIntervals):
      (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
      * rendering/shapes/RasterShape.h:
      (WebCore::RasterShapeIntervals::RasterShapeIntervals): Internal run length encoded representation of a RasterShape.
      (WebCore::RasterShapeIntervals::isEmpty):
      (WebCore::RasterShape::RasterShape):
      * rendering/shapes/Shape.cpp:
      (WebCore::Shape::createShape): Support for creating a Shape based on a RasterShapeIntervals object.
      * rendering/shapes/Shape.h:
      * rendering/shapes/ShapeInfo.cpp:
      (WebCore::::computedShape): Added support for the Image ShapeValue type.
      * rendering/shapes/ShapeInsideInfo.cpp:
      (WebCore::ShapeInsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
      * rendering/shapes/ShapeOutsideInfo.cpp:
      (WebCore::ShapeOutsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
      * rendering/style/ShapeValue.h:
      (WebCore::ShapeValue::isImageValid): True if the shape's image is ready to be be processed.
      
      LayoutTests:
      
      Two tests to verify that the initial implementation of shape valued images is working
      for shape-inside.
      
      Reviewed by Alexandru Chiculita.
      
      * fast/exclusions/shape-inside/shape-inside-image-001-expected.html: Added.
      * fast/exclusions/shape-inside/shape-inside-image-001.html: Added.
      * fast/exclusions/shape-inside/shape-inside-image-002-expected.html: Added.
      * fast/exclusions/shape-inside/shape-inside-image-002.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      416daaac
    • achicu@adobe.com's avatar
      [CSS Regions] RenderRegions should have a RenderLayer+Backing when they... · f471af3a
      achicu@adobe.com authored
      [CSS Regions] RenderRegions should have a RenderLayer+Backing when they contain a Composited RenderLayer
      https://bugs.webkit.org/show_bug.cgi?id=117365
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      After the RenderFlowThread has a new layout we need to check if any of the children layers
      had been moved to a new render region. We are only checking for the first level of layers,
      as they are the only ones supported right now. Also, added code to make Regions require a layer
      based on the layers that fit in their clipping area.
      
      Tests: fast/regions/layers/dynamic-layer-added-with-no-layout.html
             fast/regions/layers/dynamic-layer-removed-with-no-layout.html
             fast/regions/layers/float-region-promoted-to-layer.html
             fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html
             fast/regions/layers/regions-promoted-to-layers-vertical-lr.html
             fast/regions/layers/regions-promoted-to-layers-vertical-rl.html
             fast/regions/layers/regions-promoted-to-layers.html
      
      * rendering/FlowThreadController.cpp:
      (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded): Iterate on all the flow threads and updateLayerToRegionMappings if needed.
      * rendering/FlowThreadController.h:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer): Checks if the FloatingObject
      needs to be painted by the current block or not.
      (WebCore::RenderBlock::updateFloatingObjectsPaintingContainer): Helper function to lookup what is the right
      container that would need to paint a FloatingObject.
      (WebCore::RenderBlock::updateAllDescendantsFloatingObjectsPaintingContainer):
      * rendering/RenderBlock.h:
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::outermostBlockContainingFloatingObject): Looks up the ancestor RenderBlock that contains all
      the FloatingObjects of a float.
      (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): Extracted the code for outermostBlockContainingFloatingObject
      into its own method.
      (WebCore::RenderBox::updatePaintingContainerForFloatingObject): Helper method to update the "m_shouldPaint" flag
      of all the FloatingObjects created for a floating RenderObject. Normally, that flag is maintained during layout,
      but we need to patch it for the floating RenderRegions after the layout is already finished.
      (WebCore::RenderBox::updateLayerIfNeeded): Overwrite of the RenderLayerModelObject::updateLayerIfNeeded that is also
      calling updatePaintingContainerForFloatingObject if a new layer was created or destroyed.
      * rendering/RenderBox.h:
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::layout): Added code to call updateLayerToRegionMappings when needed.
      (WebCore::RenderFlowThread::regionForCompositedLayer): Looks up the first RenderRegion to display a specific layer.
      It only cares about the top most point of the element and ignores transforms.
      (WebCore::RenderFlowThread::updateRegionForRenderLayer): Helper method to update the mapped region of a layer.
      (WebCore::RenderFlowThread::updateLayerToRegionMappings): Iterates all the first level layers of the flow thread
      and updates the region. Will return true if there was any change.
      * rendering/RenderFlowThread.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::dirtyZOrderLists): When new layers are added or removed we need to update the layer map in the flow thread.
      (WebCore::RenderLayer::dirtyNormalFlowList):
      (WebCore::RenderLayer::shouldBeNormalFlowOnly): CSS Regions might become layers because they contain RenderLayers,
      but they should not become stacking contexts for that reason. This will prevent the RenderRegions from rendering
      in front of other layers.
      (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateCompositingLayers): Call updateRenderFlowThreadLayersIfNeeded when there's a layer hierarchy update.
      (WebCore::RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded): Update the render flow thread layer maps when they are dirty.
      * rendering/RenderLayerCompositor.h:
      * rendering/RenderLayer.h:
      (WebCore::RenderLayer::isDirtyRenderFlowThread): Used to check if the RenderLayers had changed their order,
      so that we can update the list of layers associated with a region. In a following patch we will need to
      rebuild the composited layers.
      * rendering/RenderLayerModelObject.cpp:
      (WebCore::RenderLayerModelObject::updateLayerIfNeeded): Adds or removes a layer when the "requiresLayer" changes
      after the styleDidChange already happened. This is needed for Regions as we only know if they still require a layer,
      only after the content of the flow thread is computed.
      * rendering/RenderLayerModelObject.h:
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::RenderRegion):
      (WebCore::RenderRegion::setRequiresLayerForCompositing):
      * rendering/RenderRegion.h:
      (WebCore::RenderRegion::requiresLayer):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::writeRenderRegionList): Updated the output to print the fact that the layer has a layer.
      
      LayoutTests:
      
      Added new tests for cases when CSS Regions are promoted to RenderLayers because
      they contain elements that might need to become composited.
      
      * fast/regions/layers/dynamic-layer-added-with-no-layout-expected.png: Added.
      * fast/regions/layers/dynamic-layer-added-with-no-layout-expected.txt: Added.
      * fast/regions/layers/dynamic-layer-added-with-no-layout.html: Added.
      * fast/regions/layers/dynamic-layer-removed-with-no-layout-expected.png: Added.
      * fast/regions/layers/dynamic-layer-removed-with-no-layout-expected.txt: Added.
      * fast/regions/layers/dynamic-layer-removed-with-no-layout.html: Added.
      * fast/regions/layers/float-region-promoted-to-layer-expected.html: Added.
      * fast/regions/layers/float-region-promoted-to-layer.html: Added.
      * fast/regions/layers/regions-promoted-to-layers-expected.txt: Added.
      * fast/regions/layers/regions-promoted-to-layers-horizontal-bt-expected.txt: Added.
      * fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html: Added.
      * fast/regions/layers/regions-promoted-to-layers-vertical-lr-expected.txt: Added.
      * fast/regions/layers/regions-promoted-to-layers-vertical-lr.html: Added.
      * fast/regions/layers/regions-promoted-to-layers-vertical-rl-expected.txt: Added.
      * fast/regions/layers/regions-promoted-to-layers-vertical-rl.html: Added.
      * fast/regions/layers/regions-promoted-to-layers.html: Added.
      
      Updated existing tests that now have CSS Regions that require a RenderLayer.
      * fast/regions/autoheight-regions-mark-expected.txt:
      * fast/repaint/overflow-flipped-writing-mode-block-in-regions-expected.txt:
      * fast/repaint/region-painting-via-layout-expected.txt:
      * platform/mac/fast/regions/overflow-in-uniform-regions-dynamic-expected.txt:
      * platform/mac/fast/regions/overflow-in-variable-width-regions-expected.txt:
      * platform/mac/fast/regions/overflow-moving-below-floats-in-variable-width-regions-expected.txt:
      * platform/mac/fast/regions/overflow-not-moving-below-floats-in-variable-width-regions-expected.txt:
      * platform/mac/fast/regions/overflow-rtl-in-variable-width-regions-expected.txt:
      * platform/mac/fast/regions/overflow-size-change-in-variable-width-regions-expected.txt:
      * platform/mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt:
      * platform/mac/fast/repaint/line-flow-with-floats-in-regions-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f471af3a
    • bjonesbe@adobe.com's avatar
      Finish making FloatingObject a real class with private members · a9c6666f
      bjonesbe@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119807
      
      This is a port from Blink of
      http://src.chromium.org/viewvc/blink?view=revision&revision=155964
      Original patch by Eric Seidel.
      
      From his comments on the Blink change:
      
      Previously FloatingObject was in a half-done state where it had
      accessors for many members, but also many members were public.
      
      This CL makes all members private and adds the necessary remaining
      accessors.
      
      Reviewed by David Hyatt.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::deleteLineBoxTree):
      (WebCore::RenderBlock::addOverflowFromFloats):
      (WebCore::RenderBlock::repaintOverhangingFloats):
      (WebCore::RenderBlock::paintFloats):
      (WebCore::RenderBlock::selectionGaps):
      (WebCore::RenderBlock::insertFloatingObject):
      (WebCore::RenderBlock::removeFloatingObject):
      (WebCore::RenderBlock::removeFloatingObjectsBelow):
      (WebCore::RenderBlock::positionNewFloats):
      (WebCore::RenderBlock::clearFloats):
      (WebCore::RenderBlock::addOverhangingFloats):
      (WebCore::RenderBlock::addIntrudingFloats):
      (WebCore::RenderBlock::hitTestFloats):
      (WebCore::RenderBlock::adjustForBorderFit):
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::FloatingObject::paginationStrut):
      (WebCore::RenderBlock::FloatingObject::setPaginationStrut):
      (WebCore::RenderBlock::FloatingObject::setRenderer):
      (WebCore::RenderBlock::FloatingObject::originatingLine):
      (WebCore::RenderBlock::FloatingObject::setOriginatingLine):
      (WebCore::RenderBlock::FloatingObjectHashFunctions::hash):
      (WebCore::RenderBlock::FloatingObjectHashFunctions::equal):
      (WebCore::RenderBlock::FloatingObjectHashTranslator::equal):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::appendFloatingObjectToLastLine):
      (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
      (WebCore::RenderBlock::linkToEndLineIfNeeded):
      (WebCore::RenderBlock::determineStartPosition):
      (WebCore::RenderBlock::positionNewFloatOnLine):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9c6666f
  7. 13 Aug, 2013 2 commits
    • abucur@adobe.com's avatar
      Unreviewed. · de330072
      abucur@adobe.com authored
      Fix the build after http://trac.webkit.org/changeset/153990.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Add the default return value if CSS Shapes are disabled.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de330072
    • abucur@adobe.com's avatar
      [CSS Regions] Compute correct region ranges for boxes · 33159da0
      abucur@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=116296
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      The patch extends the region ranges implementation with the following behavior:
      - the range of a box is always included in the range of its containing block (even for floats); this will simplify how overflow
      is propagated to the regions and it should later change on a case by case basis.
      - if the range of a box is not correctly estimated before the layout it will be marked for relayout; this is necessary to correctly
      position boxes that overflow naturally, like floats.
      - all the boxes have a range now, not only the blocks.
      - regionAtBlockOffset can clamp to a box.
      - an unsplittable box has a region range of a single region, the one where the box top falls into.
      
      When the layout of a child box starts it tries to give an estimate based on the maximal height of the box. After the layout,
      if the estimation was wrong, the box is relaid out. For example, if a block with a float is laid out in a region but the float
      overflows in the next region a relayout is needed for the float so it can be positioned relative to the containing block
      region (this step can be optimized by making a layout pass only for the children that don't have the region range enclosed in the
      containing block range).
      
      Tests: fast/regions/bottom-overflow-out-of-first-region-absolute.html
             fast/regions/float-pushed-width-change-2.html
             fast/regions/scrollable-paragraph-unsplittable.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Doesn't do anything for regions now.
      (WebCore::RenderBlock::updateShapesAfterBlockLayout): Doesn't do anything for regions now.
      (WebCore::RenderBlock::relayoutToAvoidWidows): The layout to avoid widows. Widows use the line index to determine the break point,
      not the RootLineBox pointer as before. This is necessary to prevent stale pointers in further layouts.
      (WebCore::RenderBlock::layoutBlock):
      (WebCore::RenderBlock::layoutBlockChild):
      (WebCore::RenderBlock::layoutPositionedObjects):
      (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Relayout for widows during layoutBlock(). Don't wait to exit the block layout.
      (WebCore::RenderBlock::positionNewFloats):
      (WebCore::RenderBlock::hasNextPage):
      (WebCore::RenderBlock::applyBeforeBreak):
      (WebCore::RenderBlock::applyAfterBreak):
      (WebCore::RenderBlock::setPageBreak):
      (WebCore::RenderBlock::updateMinimumPageHeight):
      (WebCore::RenderBlock::regionAtBlockOffset): This function can now clamp at a box.
      (WebCore::RenderBlock::computeRegionRangeForBoxChild): Calculate the box region range using the box height.
      (WebCore::RenderBlock::estimateRegionRangeForBoxChild): Estimate the box region range using a huge height for the box.
      (WebCore::RenderBlock::updateRegionRangeForBoxChild): Determine the final region range of a box.
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::logicalWidthForChild):
      (WebCore::RenderBlock::logicalHeightForChild):
      (WebCore::RenderBlock::logicalTopForChild):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::layoutInlineChildren):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::clampToStartAndEndRegions):
      (WebCore::RenderBox::borderBoxRectInRegion):
      * rendering/RenderBox.h:
      * rendering/RenderDeprecatedFlexibleBox.cpp:
      (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::layoutBlock):
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::validateRegions):
      (WebCore::RenderFlowThread::regionAtBlockOffset):
      (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
      (WebCore::RenderFlowThread::pageLogicalTopForOffset):
      (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
      (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
      (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
      (WebCore::RenderFlowThread::mapFromFlowToRegion):
      (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
      (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
      (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
      (WebCore::RenderFlowThread::setRegionRangeForBox):
      (WebCore::RenderFlowThread::applyBreakAfterContent):
      (WebCore::RenderFlowThread::addForcedRegionBreak):
      * rendering/RenderFlowThread.h:
      * rendering/RenderGrid.cpp:
      (WebCore::RenderGrid::layoutBlock):
      * rendering/RenderMultiColumnFlowThread.cpp:
      (WebCore::RenderMultiColumnFlowThread::setPageBreak):
      (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
      * rendering/RenderMultiColumnFlowThread.h:
      
      LayoutTests:
      
      Tests for the changes in how region ranges are computed and applied.
      
      * fast/regions/bottom-overflow-out-of-first-region-absolute-expected.html: Added.
      * fast/regions/bottom-overflow-out-of-first-region-absolute.html: Added.
      * fast/regions/float-pushed-width-change-2-expected.html: Copied from LayoutTests/fast/regions/float-pushed-width-change-expected.html.
      * fast/regions/float-pushed-width-change-2.html: Copied from LayoutTests/fast/regions/float-pushed-width-change.html.
      * fast/regions/float-pushed-width-change-expected.html:
      * fast/regions/float-pushed-width-change.html:
      * fast/regions/scrollable-paragraph-unsplittable-expected.html: Added.
      * fast/regions/scrollable-paragraph-unsplittable.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33159da0
  8. 08 Aug, 2013 1 commit
    • abucur@adobe.com's avatar
      [CSS Regions] Propagate overflow from the flow thread to the first and last region · 34af464e
      abucur@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118526
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      The patch implements layout overflow propagation for the first and last regions. The approach
      taken is triggering a simple layout on the regions after the named flows are laid out
      that extracts the layout overflow from the flow thread and adds it to the regions.
      
      The process is based on adding two new layout phases: the overflow phase and the final phase.
      The overflow phase is set after the flow threads are laid out and it marks the regions as
      needing to extract the overflow from the flow thread. In case there are blocks with auto overflow
      it's possible the overflow to create scrollbars that shrink the regions. In this case the flow
      thread is relaid out and set in the final phase, forcing the regions to recollect the layout
      overflow. In theory this would be an N-step layout because scrollbars can force content to change
      regions and create overflow for other blocks (and thus creating more scrollbars). For now, we are
      limiting this to the first pass by inserting this new final layout phase.
      
      A short description of the processing model for a document:
      - layout the document (all the flow threads should be in the constrained layout phase after this step)
      - reverse iterate through the flow threads and mark the regions for simplified layout (we need to
      reverse iterate so the overflow can correctly propagate with nested regions)
      - if the layout changes the size of a region, invalidate the flow thread and when laying it out mark
      it as needing a new pass
      - make a secondary pass through the flow threads that changed after scrollbars have been added and
      recompute the overflow for their regions; mark the flow threads in the final phase (flow threads can't
      be invalidated in the final phase)
      - after the overflow was propagated update all the flow threads in the normal layout phase
      
      There are some issues with the patch:
      - the simplified layout doesn't compute correct overflow values for inline blocks
      - the layout overflow from the flow thread doesn't take the region size into account
      
      The first issue is not related to regions and will be fixed in a future patch. The second issue
      will be fixed when box overflow will be region bound.
      
      Tests: fast/regions/overflow-scrollable-1.html
             fast/regions/overflow-scrollable-2.html
             fast/regions/overflow-scrollable-3.html
             fast/regions/overflow-scrollable-fit-complex.html
             fast/regions/overflow-scrollable-fit.html
             fast/regions/overflow-scrollable-nested.html
      
      * rendering/FlowThreadController.cpp: Flow threads layout driver functions.
      (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
      (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
      (WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
      (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
      (WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
      * rendering/FlowThreadController.h:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::simplifiedNormalFlowLayout):
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::RenderFlowThread):
      (WebCore::RenderFlowThread::invalidateRegions):
      (WebCore::RenderFlowThread::validateRegions):
      (WebCore::RenderFlowThread::layout):
      (WebCore::RenderFlowThread::firstRegion): This getter should work even though the region chain is invalid.
      (WebCore::RenderFlowThread::lastRegion): This getter should work even though the region chain is invalid.
      (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
      (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): If the flow thread has no overflow do nothing.
      (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
      (WebCore::RenderFlowThread::addForcedRegionBreak):
      * rendering/RenderFlowThread.h:
      * rendering/RenderMultiColumnSet.cpp:
      (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::pageLogicalHeight):
      (WebCore::RenderRegion::maxPageLogicalHeight):
      (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
      (WebCore::RenderRegion::flowThreadPortionOverflowRect):
      (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Used to get the flow thread visual or layout overflow.
      (WebCore::RenderRegion::layoutBlock):
      (WebCore::RenderRegion::computeOverflowFromFlowThread):
      (WebCore::RenderRegion::updateLogicalHeight):
      * rendering/RenderRegion.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::layoutContentToComputeOverflowInRegions):
      (WebCore::RenderView::layout):
      * rendering/RenderView.h:
      
      LayoutTests:
      
      Add tests for scrolling of regions in containers in different situations: regions with
      transforms, nested regions, regions affected by scrollbars etc.
      
      * fast/regions/overflow-scrollable-1-expected.html: Added.
      * fast/regions/overflow-scrollable-1.html: Added.
      * fast/regions/overflow-scrollable-2-expected.html: Added.
      * fast/regions/overflow-scrollable-2.html: Added.
      * fast/regions/overflow-scrollable-3-expected.html: Added.
      * fast/regions/overflow-scrollable-3.html: Added.
      * fast/regions/overflow-scrollable-fit-complex-expected.html: Added.
      * fast/regions/overflow-scrollable-fit-complex.html: Added.
      * fast/regions/overflow-scrollable-fit-expected.html: Added.
      * fast/regions/overflow-scrollable-fit.html: Added.
      * fast/regions/overflow-scrollable-nested-expected.txt: Added.
      * fast/regions/overflow-scrollable-nested.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34af464e
  9. 07 Aug, 2013 2 commits
    • antti@apple.com's avatar
      Move style recalculation out from Element · e6cf411a
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119497
      
      Reviewed by Andreas Kling.
      
      Element currently does too much. Element::recalcStyle() and the related functions can be turned into
      standalone functions that operate on DOM tree. This will also give more freedom for future refactoring,
      for example making style recalculation non-recursive.
      
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolveTree.cpp: Added.
      (WebCore::Style::determineChange):
                      
          - moved and renamed from Node::diff
          - factored to use early return style
          - simplifield the null input logic
      
      (WebCore::Style::pseudoStyleCacheIsInvalid):
              
          - moved from Element::pseudoStyleCacheIsInvalid
          - narrowed to take RenderObject rather than operate on Element
      
      (WebCore::Style::resolveLocal):
              
          - split from Element::recalcStyle
          - factored to use early return style
      
      (WebCore::Style::resolveTree):
              
          - moved and renamed from Element::recalcStyle
      
      * css/StyleResolveTree.h: Added.
              
          - introcuduce Style namespace for style related classes and functions
          - move and rename Node::StyleChange -> Style::Change
      
      * css/StyleResolver.h:
      (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
      (WebCore::StyleResolverParentPusher::push):
      (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
              
          Moved this stack helper to StyleResolver.h for now since it is needed by both
          StyleRecalculation and Element.
      
      * dom/Document.cpp:
      (WebCore::Document::recalcStyle):
      (WebCore::Document::updateStyleIfNeeded):
      (WebCore::Document::updateLayoutIgnorePendingStylesheets):
      (WebCore::Document::attach):
      (WebCore::Document::styleResolverChanged):
      (WebCore::Document::webkitWillEnterFullScreenForElement):
      * dom/Document.h:
      * dom/Element.cpp:
      (WebCore::shouldIgnoreAttributeCase):
      (WebCore::Element::updatePseudoElement):
      (WebCore::Element::resetComputedStyle):
      (WebCore::Element::willRecalcStyle):
      (WebCore::Element::didRecalcStyle):
      * dom/Element.h:
              
          - remove Element::recalcStyle
          - make a few private functions needed by StyleRecalculation public
      
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::recalcStyle):
      * dom/ElementShadow.h:
      * dom/Node.cpp:
      * dom/Node.h:
      
          - remove Node::StyleChange
          - remove Node::diff
      
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::didRecalcStyle):
      * dom/PseudoElement.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::recalcStyle):
      (WebCore::ShadowRoot::setResetStyleInheritance):
      * dom/ShadowRoot.h:
      * dom/Text.cpp:
      (WebCore::Text::recalcTextStyle):
      * dom/Text.h:
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::didRecalcStyle):
      * html/HTMLFormControlElement.h:
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::willRecalcStyle):
      * html/HTMLFrameSetElement.h:
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::didRecalcStyle):
      * html/HTMLIFrameElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::didRecalcStyle):
      * html/HTMLMediaElement.h:
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::didRecalcStyle):
      * html/HTMLOptionElement.h:
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::willRecalcStyle):
      (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
      (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
      * html/HTMLPlugInImageElement.h:
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::update):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::reportDataReceived):
      * page/Frame.cpp:
      (WebCore::Frame::setPageAndTextZoomFactors):
      * page/Page.cpp:
      (WebCore::Page::setPageScaleFactor):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateFirstLetterStyle):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::willRecalcStyle):
      * svg/SVGElement.h:
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::willRecalcStyle):
      * svg/SVGUseElement.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6cf411a
    • mihnea@adobe.com's avatar
      [CSSRegions] Wrong auto-height region computation for nested named flows · 3cb7870e
      mihnea@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119517
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      Test: fast/regions/abspos-autoheight-nested-region.html
      
      In the case of an (inner) auto-height region that is absolutely positioned in a named flow that is displayed in an (outer) auto-height region,
      when we are doing the layout for the named flow we need to add a "forced region break" also for the case of simplified layout, otherwise
      the outer auto-height region will not get the chance to compute its auto-height, ending up with a huge value that was used to initialize
      the auto-height computed value before the start of the layout algorithm.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::simplifiedLayout):
      
      LayoutTests:
      
      * fast/regions/abspos-autoheight-nested-region-expected.txt: Added.
      * fast/regions/abspos-autoheight-nested-region.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3cb7870e
  10. 03 Aug, 2013 1 commit
  11. 25 Jul, 2013 1 commit
    • betravis@adobe.com's avatar
      [CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag · 17694594
      betravis@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117277
      
      Reviewed by Alexandru Chiculita.
      
      This patch adds some compile guards that were missing from the RenderStyle and
      StyleRareNonInheritedData files. When the compile guard caused parameters to
      not be used, the parameters were marked using UNUSED_PARAM.
      
      * css/CSSPropertyNames.in: Inserting a line to trigger build.
      * rendering/RenderBlock.cpp:
      (WebCore::shapeInfoRequiresRelayout):
      (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
      (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
      * rendering/RenderBox.cpp:
      (WebCore::isCandidateForOpaquenessTest):
      * rendering/RenderBox.h:
      * rendering/RenderObject.h:
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::changeRequiresLayout):
      (WebCore::RenderStyle::changeRequiresRepaint):
      * rendering/style/RenderStyle.h:
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
      (WebCore::StyleRareNonInheritedData::operator==):
      * rendering/style/StyleRareNonInheritedData.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17694594
  12. 23 Jul, 2013 2 commits
    • ap@apple.com's avatar
      Dictionary hotkey does not work on vertical text · 4da41dc6
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=118993
              <rdar://problem/14478260>
      
              Reviewed by Enrica Casucci.
      
              Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html
      
              * editing/Editor.cpp:
              (WebCore::collapseCaretWidth): A helper function.
              (WebCore::Editor::firstRectForRange): Many changes:
              - use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
              that's more direct that getting caret rects and computing bounding rect from those.
              - handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
              doesn't provide the needed result, and because it can be done faster.
              - wherever we use carets to compute the result, account for vertical text (in a hackish
              way, as we don't have layout information at Editor level).
      
              * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
              dead code.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4da41dc6
    • commit-queue@webkit.org's avatar
      [CSS Shapes] New positioning model: Borders · 105a51fa
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118822
      
      Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-23
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      Converting to the shape coordinate system was not properly accounting
      for borders and padding. This has been fixed and a new convienence
      method added because of the added complexity of the conversion.
      
      Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
          computeSegmentsForContainingBlockLine to do the coordinate
          conversion.
      (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
      * rendering/shapes/ShapeOutsideInfo.cpp:
      (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
          Add new method to do the coordinate conversion from the containing
          block coordinate system to the coordinate system of the shape so
          that the segments can be correctly calculated.
      
      LayoutTests:
      
      Test that the shape is properly respected when the float has a border.
      
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html: Added.
      * csswg/submitted/shapes/shape-outside/w3c-import.log: Updated with new
          import information.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      105a51fa
  13. 19 Jul, 2013 1 commit
    • hyatt@apple.com's avatar
      OSX: ePub: Unable to select text in vertical Japanese book · ac9fa61e
      hyatt@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118864
      <rdar://problem/14109351>
      
      Reviewed by Dan Bernstein and Sam Weinig.
      
      Source/WebCore: 
      
      This patch fixes all of the various writing-mode and pagination combinations
      so that the columns are painted in the correct location. The code that sets up
      the initial painting translation offset in the block direction and that advances
      that offset has been pulled into two helper functions, initialBlockOffsetForPainting
      and blockDeltaForPaintingNextColumn, and that code is now shared by the four call
      sites that need it (painting and hit testing in RenderBlock and painting and hit testing
      in RenderLayer).
              
      This patch also backs out the maximumScrollPosition change, since it only occurred because
      of incorrect sizing of the RenderView, and this sizing issue has now been corrected by
      ensuring that computeLogicalHeight() always makes sure you are the size of the viewport
      and does not shrink you to the column height.
              
      There was also a race condition that caused pagination to be incorrect if layout occurred
      before the html/body renderer that set the writing-mode were available. When this happened,
      the writing mode got propagated up to the view, but the column styles didn't get
      adjusted to compensate for the writing mode change.
      
      Added tests for every pagination and writing-mode combination in fast/multicol/pagination.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::styleForDocument):
      (WebCore::StyleResolver::adjustRenderStyle):
      Move setStylesForPaginationMode into RenderStyle and make it a member function. This is
      necessary so that the style can be adjusted dynamically to fix the race condition mentioned
      above.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::maximumScrollPosition):
      Back out this change since the symptom it was fixing only occurred because the logical
      height of the view was being set incorrectly.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
      Patch the column code that sets up the initial page height to use the pagination API's
      page height rather than the viewport logical height. This allows the view to still match
      the viewport in dimensions rather than being incorrectly sized to the column height.
              
      (WebCore::RenderBlock::initialBlockOffsetForPainting):
      (WebCore::RenderBlock::blockDeltaForPaintingNextColumn):
      Two new helper functions used to set up the block direction paint/hit testing translation.
      The major bug fix that occurred in this code is that the old block axis code didn't handle
      reversal correctly and it also used physical coordinates to try to determine the translation
      offset, when you really need to use logical coordinates in the original writing mode coordinate
      system to determine the offset.
      
      (WebCore::RenderBlock::paintColumnContents):
      Patched to call the new helper functions.
      
      (WebCore::ColumnRectIterator::ColumnRectIterator):
      (WebCore::ColumnRectIterator::adjust):
      (WebCore::ColumnRectIterator::update):
      Patched to call the new helper functions.
      
      * rendering/RenderBlock.h:
      Add the two new helper functions to the RenderBlock header.
      
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::styleDidChange):
      If the writing mode of the html/body propagates to the viewport and changes its writing mode,
      also change our column styles to match if we're in paginated mode.
      
      (WebCore::RenderBox::computeLogicalHeight):
      (WebCore::RenderBox::computePercentageLogicalHeight):
      Call the new pageOrViewLogicalHeight function on RenderView instead of
      RenderBox::viewLogicalHeightForPercentages (which is now removed).
      
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::paintChildLayerIntoColumns):
      (WebCore::RenderLayer::hitTestChildLayerColumns):
      Patched to use the two new helper functions for block direction paint offset setup and
      advancement.
      
      * rendering/RenderView.cpp:
      (WebCore::RenderView::pageOrViewLogicalHeight):
      New helper function that does what viewLogicalHeightForPercentages used to do but also
      handles returning the page length for block axis column progression. Again, this is to
      allow the view to retain its correct size (matching the viewport).
      
      (WebCore::RenderView::viewLogicalHeight):
      Back out the code that made the view grow or shrink to the size of the Pagination API page
      length when the progression was block axis. This was the source of most of the scroll origin
      and scrolling issues.
      
      * rendering/RenderView.h:
      Add the new pageOrViewLogicalHeight() function.
      
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
      This is the old StyleResolver function for setting up the column styles. It's in RenderStyle
      now so that it can be called at any time to change a style rather than only at style resolution
      time.
      
      * rendering/style/RenderStyle.h:
      Declaration of the setColumnStylesFromPaginationMode function.
      
      LayoutTests: 
      
      * fast/multicol/pagination: Added.
      * fast/multicol/pagination/BottomToTop-bt.html: Added.
      * fast/multicol/pagination/BottomToTop-lr.html: Added.
      * fast/multicol/pagination/BottomToTop-rl.html: Added.
      * fast/multicol/pagination/BottomToTop-tb.html: Added.
      * fast/multicol/pagination/LeftToRight-bt.html: Added.
      * fast/multicol/pagination/LeftToRight-lr.html: Added.
      * fast/multicol/pagination/LeftToRight-rl.html: Added.
      * fast/multicol/pagination/LeftToRight-tb.html: Added.
      * fast/multicol/pagination/RightToLeft-bt.html: Added.
      * fast/multicol/pagination/RightToLeft-lr.html: Added.
      * fast/multicol/pagination/RightToLeft-rl.html: Added.
      * fast/multicol/pagination/RightToLeft-tb.html: Added.
      * fast/multicol/pagination/TopToBottom-bt.html: Added.
      * fast/multicol/pagination/TopToBottom-lr.html: Added.
      * fast/multicol/pagination/TopToBottom-rl.html: Added.
      * fast/multicol/pagination/TopToBottom-tb.html: Added.
      * platform/mac/fast/multicol/pagination: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.png: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.png: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.png: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.png: Added.
      * platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.png: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.png: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.png: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.png: Added.
      * platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.png: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.png: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.png: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.png: Added.
      * platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.png: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.png: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.png: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.txt: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.png: Added.
      * platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.txt: Added.
      * platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.png:
      * platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac9fa61e
  14. 17 Jul, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [CSS Shapes] Port refactoring of shape-outside code from Blink · 812562cb
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118757
      
      Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-17
      Reviewed by Dean Jackson.
      
      Refactor the left and right offset methods to reduce the number of
      arguments by splitting the methods into smaller methods. This
      refactoring was requested as part of porting support for stacked
      floats with shape-outside to Blink.
      
      Also add a variable when calling computeSegmentsForLine to make it
      more readable and easier to follow the coordinate system change.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::computeLogicalLocationForFloat): Update to use
          the refactored IgnoringShapeOutside methods.
      (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): New method to
          compute the offset contributed by left floats.
      (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine): New method to
          compute misc adjustments to the left offset.
      (WebCore::RenderBlock::logicalRightFloatOffsetForLine): New method to
          compute the offset contributed by right floats.
      (WebCore::RenderBlock::adjustLogicalRightOffsetForLine): New method to
          compute misc adjustments to the right offset.
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::logicalRightOffsetForLine): Implement original
          method in terms of the float offset computation method and the
          offset adjustment method. This method takes into account the
          shape-outside on any floats when computing the offset.
      (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
      (WebCore::RenderBlock::logicalRightOffsetForLineIgnoringShapeOutside):
          Compute the right offset as if there was no shape-outside on any
          of the floats.
      (WebCore::RenderBlock::logicalLeftOffsetForLineIgnoringShapeOutside):
          Compute the left offset as if there was no shape-outside on any
          of the floats.
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update
          to use a variable to make the calls to computeSegmentsForLine more
          explicit about the coordinate system conversion.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      812562cb
  15. 11 Jul, 2013 1 commit
    • abucur@adobe.com's avatar
      [CSS Regions] In a region chain with auto-height regions, lines get their... · cd6dcad0
      abucur@adobe.com authored
      [CSS Regions] In a region chain with auto-height regions, lines get their length based only on the first region
      https://bugs.webkit.org/show_bug.cgi?id=118531
      
      Reviewed by Alexandru Chiculita.
      
      Source/WebCore:
      
      When computing the height a flow thread it's possible to overflow the maximum LayoutUnit and obtain a negative value.
      This leads to invalid results during layout when computing the region range and the RenderBoxRegion info for the
      descendant boxes of the flow thread.
      
      This issue appears especially during the auto-height algorithm because it initializes the auto-height regions
      height with the LayoutUnit::max() / 2 value. Summing two such regions overflows and results in a negative value.
      
      The fix clamps the maximum height of the flow thread to LayoutUnit::max() / 2. This doesn't affect the auto-height
      algorithm because regionAtBlockOffset() will still return the correct values as the auto-height regions content
      is established and their height updated.
      
      Tests: fast/regions/autoheight-correct-region-for-lines-2.html
             fast/regions/autoheight-correct-region-for-lines.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::computeLogicalHeight):
      (WebCore::RenderFlowThread::setRegionRangeForBox):
      (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
      * rendering/RenderFlowThread.h:
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::maxPageLogicalHeight):
      
      LayoutTests:
      
      Add tests verifying the lines widths are correctly computed in auto-height regions with and without a max-height set.
      
      * fast/regions/autoheight-correct-region-for-lines-2-expected.html: Added.
      * fast/regions/autoheight-correct-region-for-lines-2.html: Added.
      * fast/regions/autoheight-correct-region-for-lines-expected.html: Added.
      * fast/regions/autoheight-correct-region-for-lines.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd6dcad0
  16. 27 Jun, 2013 2 commits
    • kangil.han@samsung.com's avatar
      Adopt is/toHTMLInputElement for code cleanup · c559372b
      kangil.han@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118130
      
      Reviewed by Antti Koivisto.
      
      To enhance readability, this patch adopts is/toHTMLInputElement.
      This also helps out to reduce duplicated use of static_cast.
      
      Source/WebCore:
      
      * accessibility/AccessibilityMediaControls.cpp:
      (WebCore::AccessibilityMediaTimeline::valueDescription):
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
      (WebCore::AccessibilityNodeObject::isNativeTextControl):
      (WebCore::AccessibilityNodeObject::isNativeImage):
      (WebCore::AccessibilityNodeObject::isInputImage):
      (WebCore::AccessibilityNodeObject::isReadOnly):
      (WebCore::AccessibilityNodeObject::valueForRange):
      (WebCore::AccessibilityNodeObject::maxValueForRange):
      (WebCore::AccessibilityNodeObject::minValueForRange):
      (WebCore::AccessibilityNodeObject::actionElement):
      (WebCore::AccessibilityNodeObject::titleElementText):
      (WebCore::AccessibilityNodeObject::visibleText):
      (WebCore::AccessibilityNodeObject::title):
      (WebCore::AccessibilityNodeObject::text):
      (WebCore::AccessibilityNodeObject::colorValue):
      (WebCore::accessibleNameForNode):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::isFileUploadButton):
      (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
      (WebCore::AccessibilityRenderObject::url):
      (WebCore::AccessibilityRenderObject::setValue):
      (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
      (WebCore::AccessibilityRenderObject::addTextFieldChildren):
      * accessibility/AccessibilitySlider.cpp:
      (WebCore::AccessibilitySlider::element):
      * accessibility/ios/AccessibilityObjectIOS.mm:
      (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
      * bindings/js/JSHTMLInputElementCustom.cpp:
      (WebCore::JSHTMLInputElement::selectionStart):
      (WebCore::JSHTMLInputElement::setSelectionStart):
      (WebCore::JSHTMLInputElement::selectionEnd):
      (WebCore::JSHTMLInputElement::setSelectionEnd):
      (WebCore::JSHTMLInputElement::selectionDirection):
      (WebCore::JSHTMLInputElement::setSelectionDirection):
      (WebCore::JSHTMLInputElement::setSelectionRange):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::adjustRenderStyle):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::isInPasswordField):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
      * html/HTMLFormControlElement.cpp:
      (WebCore::shouldAutofocus):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::getTextFieldValues):
      * html/HTMLInputElement.h:
      (WebCore::isHTMLInputElement):
      (WebCore::toHTMLInputElement):
      * html/RadioInputType.cpp:
      (WebCore::RadioInputType::handleKeydownEvent):
      (WebCore::RadioInputType::isKeyboardFocusable):
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::mediaControlElementType):
      * html/shadow/TextControlInnerElements.cpp:
      (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
      (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
      (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
      (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
      (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
      (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
      (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
      * loader/FormSubmission.cpp:
      (WebCore::FormSubmission::create):
      * page/Chrome.cpp:
      (WebCore::Chrome::setToolTip):
      * page/EventHandler.cpp:
      (WebCore::isSubmitImage):
      (WebCore::EventHandler::handleMousePressEvent):
      * page/FocusController.cpp:
      (WebCore::clearSelectionIfNeeded):
      * platform/gtk/PasteboardGtk.cpp:
      (WebCore::getURLForImageNode):
      * platform/qt/RenderThemeQt.cpp:
      (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
      * platform/qt/RenderThemeQtMobile.cpp:
      (WebCore::RenderThemeQtMobile::paintSliderTrack):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::altDisplayString):
      (WebCore::HitTestResult::absoluteImageURL):
      (WebCore::HitTestResult::isContentEditable):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::hasLineIfEmpty):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::sizesLogicalWidthToFitContent):
      * rendering/RenderButton.cpp:
      (WebCore::RenderButton::updateFromElement):
      (WebCore::RenderButton::canHaveGeneratedChildren):
      * rendering/RenderDetailsMarker.cpp:
      (WebCore::RenderDetailsMarker::isOpen):
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::updateFromElement):
      (WebCore::RenderFileUploadControl::maxFilenameWidth):
      (WebCore::RenderFileUploadControl::paintObject):
      (WebCore::RenderFileUploadControl::uploadButton):
      (WebCore::RenderFileUploadControl::fileTextValue):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::updateAltText):
      * testing/Internals.cpp:
      (WebCore::Internals::selectColorInColorChooser):
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::webContext):
      (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
      * WebCoreSupport/CredentialTransformData.cpp:
      (WebCore::CredentialTransformData::findPasswordFormFields):
      * WebCoreSupport/EditorClientBlackBerry.cpp:
      (WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
      * WebKitSupport/DOMSupport.cpp:
      (BlackBerry::WebKit::DOMSupport::isPasswordElement):
      (BlackBerry::WebKit::DOMSupport::inputElementText):
      (BlackBerry::WebKit::DOMSupport::isDateTimeInputField):
      (BlackBerry::WebKit::DOMSupport::isColorInputField):
      (BlackBerry::WebKit::DOMSupport::elementIdOrNameIndicatesNoAutocomplete):
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::elementType):
      (BlackBerry::WebKit::InputHandler::setInputValue):
      (BlackBerry::WebKit::InputHandler::extractedTextRequest):
      (BlackBerry::WebKit::InputHandler::showTextInputTypeSuggestionBox):
      
      Source/WebKit/efl:
      
      * ewk/ewk_view.cpp:
      (ewk_view_input_method_state_set):
      
      Source/WebKit/mac:
      
      * DOM/WebDOMOperations.mm:
      (-[DOMHTMLInputElement _setAutofilled:]):
      * WebCoreSupport/WebChromeClient.mm:
      (WebChromeClient::focusedNodeChanged):
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::textFieldDidBeginEditing):
      (WebEditorClient::textFieldDidEndEditing):
      (WebEditorClient::textDidChangeInTextField):
      (WebEditorClient::doTextFieldCommandFromEvent):
      (WebEditorClient::textWillBeDeletedInTextField):
      * WebView/WebHTMLRepresentation.mm:
      (inputElementFromDOMElement):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::setInputMethodState):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::inputMethodQuery):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::createInstance):
      * DOMHTMLClasses.cpp:
      (DOMHTMLInputElement::form):
      (DOMHTMLInputElement::disabled):
      (DOMHTMLInputElement::readOnly):
      (DOMHTMLInputElement::setType):
      (DOMHTMLInputElement::value):
      (DOMHTMLInputElement::setValue):
      (DOMHTMLInputElement::setValueForUser):
      (DOMHTMLInputElement::select):
      (DOMHTMLInputElement::setSelectionStart):
      (DOMHTMLInputElement::selectionStart):
      (DOMHTMLInputElement::setSelectionEnd):
      (DOMHTMLInputElement::selectionEnd):
      (DOMHTMLInputElement::isTextField):
      (DOMHTMLInputElement::rectOnScreen):
      (DOMHTMLInputElement::replaceCharactersInRange):
      (DOMHTMLInputElement::selectedRange):
      (DOMHTMLInputElement::setAutofilled):
      (DOMHTMLInputElement::isAutofilled):
      (DOMHTMLInputElement::isUserEdited):
      * WebFrame.cpp:
      (inputElementFromDOMElement):
      
      Source/WebKit2:
      
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
      (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
      (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
      (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
      * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
      (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::focusedNodeChanged):
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::textFieldDidBeginEditing):
      (WebKit::WebEditorClient::textFieldDidEndEditing):
      (WebKit::WebEditorClient::textDidChangeInTextField):
      (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
      (WebKit::WebEditorClient::textWillBeDeletedInTextField):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::containsAnyFormControls):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::editorState):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c559372b
    • commit-queue@webkit.org's avatar
      [CSS Shapes] New positioning model: basic support for rectangle shape-outside · 6362c309
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=118080
      
      Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-06-27
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      With the latest Editor's Draft of the CSS Shapes specification,
      shape-outside no longer affects the positioning of floats. This is the
      first step in changing the implementation to reflect this
      specification change. The bulk of this change is reverting the code
      that was needed to position floats based on the bounding box of the
      shape.
      
      Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html
             csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html
             csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html
             csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html
             csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html
             csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html
             csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html
      
      * rendering/LayoutState.cpp:
      (WebCore::LayoutState::LayoutState): Revert changes to support float
          positioning from shape-outside.
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::blockSelectionGaps): Ditto.
      (WebCore::RenderBlock::insertFloatingObject): Ditto.
      (WebCore::RenderBlock::positionNewFloats): Ditto.
      (WebCore::RenderBlock::logicalLeftOffsetForLine): Instead of
          converting to shape bounding box coordinates, convert to the
          float's margin box coordinates.
      (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
      (WebCore::positionForPointRespectingEditingBoundaries): Revert changes
          to support float positioning from shape-outside.
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Ditto.
      (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Ditto.
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Instead
          of converting to shape bounding box coordinates, convert to the
          float's margin box coordinates.
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::mapLocalToContainer): Revert changes to support
          float positioning from shape-outside.
      (WebCore::RenderBox::offsetFromContainer): Ditto.
      (WebCore::RenderBox::computeRectForRepaint): Ditto.
      (WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
      * rendering/RenderBoxModelObject.cpp: Ditto.
      * rendering/RenderBoxModelObject.h: Ditto.
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::clippedOverflowRectForRepaint): Ditto.
      (WebCore::RenderInline::computeRectForRepaint): Ditto.
      (WebCore::RenderInline::mapLocalToContainer): Ditto.
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::updateLayerPosition): Ditto.
      (WebCore::RenderLayer::calculateClipRects): Ditto.
      (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
      * rendering/RenderLayer.h:
      (WebCore::RenderLayer::offsetForInFlowPosition): Ditto.
      * rendering/RenderObject.h: Ditto.
      * rendering/shapes/ShapeInfo.h: Make m_renderer protected, since we
          now need it in the subclass to compute the segments.
      * rendering/shapes/ShapeOutsideInfo.cpp:
      (WebCore::ShapeOutsideInfo::computeSegmentsForLine): Update segment
          computation to use the float's margin box instead of the shape's
          bounding box for computing the deltas.
      (WebCore::ShapeOutsideInfo::leftSegmentMarginBoxDelta): This used to
          be leftSegmentShapeBoundingBoxDelta, which has been renamed in the
          obvious way.
      (WebCore::ShapeOutsideInfo::rightSegmentMarginBoxDelta): This used to
          be rightSegmentShapeBoundingBoxDelta, which has been renamed in the
          obvious way.
      * rendering/shapes/ShapeOutsideInfo.h: Revert changes to support float
          positioning from shape-outside.
      * rendering/style/RenderStyle.h: Ditto.
      
      LayoutTests:
      
      Added new tests for the new model. These tests are also spec tests, so
      their canonical location is now in the CSS WG's repository. They have
      been imported to WebKit using the import-w3c-tests script, and that's
      why they live under the csswg directory.
      
      The new tests replace the shape-outside-floats-simple-rectangle.html
      test, which was anything but simple.
      
      Tests that have not been rewritten yet have been marked as skipped.
      Tests for the old positioning behavior that are not applicable to the
      new behavior have been deleted.
      
      * TestExpectations: Skip all the tests that need to be rewritten.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002-expected.html: Added.
      * csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html: Added.
      * csswg/submitted/shapes/shape-outside/w3c-import.log: Added.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored-expected.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-non-zero-y-expected.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-non-zero-y.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden-expected.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-overflow-hidden.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-overhang-expected.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-positioning-expected.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-positioning.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-expected.html: Removed.
      * fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6362c309
  17. 26 Jun, 2013 1 commit
    • hyatt@apple.com's avatar
      Flex boxes (both old and new) don't handle max-height images correctly. · b9f60e12
      hyatt@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118000
      
      Reviewed by Beth Dakin.
      
      Source/WebCore: 
      
      Tests: css3/flexbox/image-percent-max-height.html
             fast/flexbox/image-percent-max-height.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
      (WebCore::RenderBlock::layoutBlockChildren):
      Pull the percentage height descendant code that dirties those descendants
      out of layoutBlockChildren and into a protected helper function,
      dirtyForLayoutFromPercentageHeightDescendants, that can be called from the 
      flex box code.
              
      Also patch dirtyForLayoutFromPercentageHeightDescendants so that it will dirty
      preferred logical widths when a child has an aspect ratio, since we know that
      percentage height changes will potentially affect the preferred widths of the image and
      its ancestor blocks.
      
      * rendering/RenderBlock.h:
      Declaration of the new dirtyForLayoutFromPercentageHeightDescendants function.
      
      * rendering/RenderDeprecatedFlexibleBox.cpp:
      (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
      Make the old flex box code call dirtyForLayoutFromPercentageHeightDescendants so
      that everything is dirtied properly.
      
      (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
      (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
      Remove the isReplaced()/percentage height/width dirtying now that the old flexible
      box is using the same dirtying mechanism as RenderBlock.
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::layoutBlock):
      Patch the new flexible box code to use the dirtying mechanism that RenderBlock
      uses for percentage heights/widths on replaced descendants.
      
      * rendering/RenderObject.h:
      (WebCore::RenderObject::hasAspectRatio):
      Pulled the static helper function from RenderReplaced into a full-blown method
      on RenderObject, so that dirtyForLayoutFromPercentageHeightDescendants can call
      it to check if an object has an aspect ratio.
      
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
      (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
      Patch the call sites of the static helper function to use hasAspectRatio instead
      and get rid of the static in the cpp file.
      
      LayoutTests: 
      
      * css3/flexbox/image-percent-max-height-expected.html: Added.
      * css3/flexbox/image-percent-max-height.html: Added.
      * css3/flexbox/resources/hero.png: Added.
      * fast/flexbox/image-percent-max-height-expected.html: Added.
      * fast/flexbox/image-percent-max-height.html: Added.
      * fast/flexbox/resources/hero.png: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9f60e12
  18. 24 Jun, 2013 1 commit
  19. 21 Jun, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [CSS Regions] Move overset compute code from flow thread to named flow thread · e18bcd84
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117835
      
      Patch by Radu Stavila <stavila@adobe.com> on 2013-06-21
      Reviewed by Andreas Kling.
      
      Moved computeOversetStateForRegions() and overset() methods from RenderFlowThread to RenderNamedFlowThread.
      Added ASSERTS in RenderRegion::regionOversetState and RenderRegion::setRegionOversetState to ensure
      the region was created from an element.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::computeOverflow):
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::RenderFlowThread):
      * rendering/RenderFlowThread.h:
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
      (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
      * rendering/RenderNamedFlowThread.h:
      (WebCore::RenderNamedFlowThread::overset):
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::regionOversetState):
      (WebCore::RenderRegion::setRegionOversetState):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e18bcd84
  20. 20 Jun, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [CSS Regions] Add new regionOversetChange event · 75d76c46
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117508
      
      Source/WebCore:
      
      Added regionOversetChange event and tests for it. The overset value of the region has been moved to the ElementRareData
      object instead of the RenderRegion object. This was needed for the case when a reattach is performed (for instance by changing
      the display type of the region's containing block) and the RenderRegion object is destroyed. When computing the overset again,
      there would be no "previous" value to compare it to and decide whether the regionOversetChange event must be dispatched.
      
      Patch by Radu Stavila <stavila@adobe.com> on 2013-06-20
      Reviewed by Antti Koivisto.
      
      Tests:  fast/regions/webkit-named-flow-event-add-to-flow.html:
              fast/regions/webkit-named-flow-event-auto-height.html:
              fast/regions/webkit-named-flow-event-crash.html:
              fast/regions/webkit-named-flow-event-no-regions.html:
              fast/regions/webkit-named-flow-event-region-in-flexbox-no-overset-change.html: Added.
              fast/regions/webkit-named-flow-event-region-in-flexbox-overset-change.html: Added.
              fast/regions/webkit-named-flow-event-remove-from-dom.html:
              fast/regions/webkit-named-flow-event-remove-from-flow.html:
              fast/regions/webkit-named-flow-event-target.html:
              fast/regions/webkit-named-flow-event-to-null.html:
              fast/regions/webkit-named-flow-event.html:
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/Element.cpp:
      (WebCore::Element::setRegionOversetState):
      (WebCore::Element::regionOversetState):
      (WebCore::Element::webkitRegionOverset):
      * dom/Element.h:
      * dom/ElementRareData.cpp:
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::regionOversetState):
      (WebCore::ElementRareData::setRegionOversetState):
      (WebCore::ElementRareData::ElementRareData):
      * dom/EventNames.h:
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
      (WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
      * dom/WebKitNamedFlow.h:
      (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
      (WebCore::ChangeRegionOversetTask::scheduleFor):
      (WebCore::ChangeRegionOversetTask::unschedule):
      (WebCore::ChangeRegionOversetTask::reset):
      (WebCore::ChangeRegionOversetTask::onTimer):
      * rendering/RegionOversetState.h: Added.
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::computeOverflow):
      * rendering/RenderFlowThread.cpp:
      (WebCore::RenderFlowThread::RenderFlowThread):
      (WebCore::RenderFlowThread::layout):
      (WebCore::RenderFlowThread::computeOversetStateForRegions):
      * rendering/RenderFlowThread.h:
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
      (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
      (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
      * rendering/RenderNamedFlowThread.h:
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::RenderRegion):
      (WebCore::RenderRegion::regionOversetState):
      (WebCore::RenderRegion::setRegionOversetState):
      * rendering/RenderRegion.h:
      
      LayoutTests:
      
      Changed regionLayoutUpdate tests to regionOversetChange and added new tests for regionOversetChange.
      
      Patch by Radu Stavila <stavila@adobe.com> on 2013-06-20
      Reviewed by Antti Koivisto.
      
      * fast/regions/webkit-named-flow-event-add-to-flow-expected.txt:
      * fast/regions/webkit-named-flow-event-add-to-flow.html:
      * fast/regions/webkit-named-flow-event-auto-height-expected.txt:
      * fast/regions/webkit-named-flow-event-auto-height.html: Added.
      * fast/regions/webkit-named-flow-event-crash-expected.txt:
      * fast/regions/webkit-named-flow-event-crash.html:
      * fast/regions/webkit-named-flow-event-expected.txt:
      * fast/regions/webkit-named-flow-event-no-regions-expected.txt:
      * fast/regions/webkit-named-flow-event-no-regions.html:
      * fast/regions/webkit-named-flow-event-region-in-flexbox-no-overset-change-expected.txt:
      * fast/regions/webkit-named-flow-event-region-in-flexbox-no-overset-change.html: Added.
      * fast/regions/webkit-named-flow-event-region-in-flexbox-overset-change-expected.txt:
      * fast/regions/webkit-named-flow-event-region-in-flexbox-overset-change.html: Added.
      * fast/regions/webkit-named-flow-event-remove-from-dom-expected.txt:
      * fast/regions/webkit-named-flow-event-remove-from-dom.html:
      * fast/regions/webkit-named-flow-event-remove-from-flow-expected.txt:
      * fast/regions/webkit-named-flow-event-remove-from-flow.html:
      * fast/regions/webkit-named-flow-event-target-expected.txt:
      * fast/regions/webkit-named-flow-event-target.html:
      * fast/regions/webkit-named-flow-event-to-null-expected.txt:
      * fast/regions/webkit-named-flow-event-to-null.html:
      * fast/regions/webkit-named-flow-event.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75d76c46
  21. 19 Jun, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Fix a few missed renames from Exclusions -> Shapes · 1e070c0d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117803
      
      Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-06-19
      Reviewed by David Hyatt.
      
      In the great CSS Exclusions to CSS Shapes rename, a few instances were
      missed. This fixes those instances.
      
      No new tests, no behavior change, just renames.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
      (WebCore::RenderBlock::updateRegionsAndShapesAfterChildLayout):
      (WebCore::RenderBlock::layoutBlock):
      (WebCore::RenderBlock::logicalLeftOffsetForLine):
      (WebCore::RenderBlock::logicalRightOffsetForLine):
      * rendering/RenderBlock.h:
      * rendering/RenderDeprecatedFlexibleBox.cpp:
      (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::layoutBlock):
      * rendering/RenderGrid.cpp:
      (WebCore::RenderGrid::layoutBlock):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e070c0d
    • robert@webkit.org's avatar
      Incorrect computation of shrink-to-fit width for block with white-space:nowrap... · 92b77971
      robert@webkit.org authored
      Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
      https://bugs.webkit.org/show_bug.cgi?id=114879
      
      Source/WebCore:
      
      Reviewed by David Hyatt.
      Per http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when width is auto then floating non-replaced,
      absolute non-replaced, and inline-block non-replaced elements should use shrink-to-fit width. This trumps any no-wrap property
      on the element so if we are shrinking to fit ensure our minimum width respects all possible line breaks.
      
      Test: fast/block/shrink-to-fit-width-container-with-floating-children.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
      
      LayoutTests:
      
      Reviewed by David Hyatt.
      
      * fast/block/shrink-to-fit-width-container-with-floating-children-expected.txt: Added.
      * fast/block/shrink-to-fit-width-container-with-floating-children.html: Added.
      * platform/qt/fast/css/word-space-extra-expected.txt:
      * platform/qt/fast/replaced/width100percent-image-expected.txt:
      * platform/qt/fast/replaced/width100percent-searchfield-expected.txt:
      * platform/qt/fast/replaced/width100percent-textfield-expected.txt:
      * platform/qt/tables/mozilla/bugs/bug57828-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92b77971
  22. 17 Jun, 2013 1 commit
  23. 13 Jun, 2013 2 commits
    • zoltan@webkit.org's avatar
      Use borderAndPadding[Before,After]() instead of border[Before,After]() + padding[Before,After]() · 8e79cc29
      zoltan@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117611
      
      Reviewed by Dirk Schulze.
      
      I added a new function called borderAndPaddingAfter(), since we already had borderAndPaddingBefore(). I changed
      every separate additions to the old/new function. This change makes the code shorter and more straightforward.
      
      Behavior hasn't changed, no new tests were needed.
      
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::layoutBlock):
      (WebCore::RenderBlock::marginBeforeEstimateForChild):
      (WebCore::RenderBlock::layoutBlockChildren):
      (WebCore::RenderBlock::paintColumnRules):
      (WebCore::RenderBlock::columnRectAt):
      (WebCore::RenderBlock::relayoutForPagination):
      (WebCore::RenderBlock::adjustRectForColumns):
      (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
      (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
      (WebCore::RenderBlock::adjustForColumns):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
      (WebCore::RenderBlock::layoutInlineChildren):
      * rendering/RenderBoxModelObject.h:
      (WebCore::RenderBoxModelObject::borderAndPaddingStart):
      (WebCore::RenderBoxModelObject::borderAndPaddingBefore):
      (WebCore::RenderBoxModelObject::borderAndPaddingAfter):
      (WebCore::RenderBoxModelObject::borderAndPaddingLogicalHeight):
      * rendering/RenderMultiColumnBlock.cpp:
      (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
      * rendering/RenderMultiColumnSet.cpp:
      (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
      (WebCore::RenderMultiColumnSet::prepareForLayout):
      (WebCore::RenderMultiColumnSet::columnRectAt):
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::computeIntrinsicPadding):
      (WebCore::RenderTableCell::cellBaselinePosition):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::calcRowLogicalHeight):
      (WebCore::RenderTableSection::layoutRows):
      (WebCore::RenderTableSection::firstLineBoxBaseline):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::lineSnapAdjustment):
      (WebCore::RootInlineBox::selectionTop):
      (WebCore::RootInlineBox::ascentAndDescentForBox):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e79cc29
    • commit-queue@webkit.org's avatar
      Column balancing support in the region based multicol implementation · 2a7d9989
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=116033
      
      Source/WebCore:
      
      Start by setting the column height to the flow thread's height divided
      by the number of columns. Then stretch the column height until
      contents fits without creating overflowing columns, or until the
      maximum allowed column height is reached, whichever comes first. This
      may require several layout iterations (but normally only a
      couple). For each time we stretch, stretch by the least amount
      required to make a difference to which box goes where.
      
      Also make sure that the columns get tall enough to honor orphans
      and widows settings.
      
      This change takes some tiny steps in preparing for multiple column
      set support. There is also some minor cleanup and bugfixing; see
      details below.
      
      Patch by Morten Stenshorne <mstensho@opera.com> on 2013-06-13
      Reviewed by David Hyatt.
      
      Tests: fast/multicol/newmulticol/balance-images.html
             fast/multicol/newmulticol/balance-maxheight1.html
             fast/multicol/newmulticol/balance-maxheight2.html
             fast/multicol/newmulticol/balance1.html
             fast/multicol/newmulticol/balance2.html
             fast/multicol/newmulticol/balance3.html
             fast/multicol/newmulticol/balance4.html
             fast/multicol/newmulticol/balance5.html
             fast/multicol/newmulticol/balance6.html
             fast/multicol/newmulticol/balance7.html
             fast/multicol/newmulticol/balance8.html
             fast/multicol/newmulticol/balance9.html
             fast/multicol/newmulticol/cell-shrinkback.html
             fast/multicol/newmulticol/columns-shorthand-parsing.html
             fast/multicol/newmulticol/orphans-and-widows-balance.html
             fast/multicol/newmulticol/single-line.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::adjustForUnsplittableChild):
      (WebCore::RenderBlock::setPageBreak):
      (WebCore):
      (WebCore::RenderBlock::updateMinimumPageHeight):
      (WebCore::calculateMinimumPageHeight):
      (WebCore::RenderBlock::adjustLinePositionForPagination):
      (WebCore::RenderBlock::adjustBlockChildForPagination): If no lines
      cross the boundaries, we need to report where blocks cross
      instead, so that the column balancer knows how much to stretch
      columns if necessary.
      * rendering/RenderBlock.h:
      * rendering/RenderFlowThread.h:
      * rendering/RenderMultiColumnBlock.cpp:
      (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
      (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
      (WebCore::RenderMultiColumnBlock::relayoutForPagination):
      (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
      * rendering/RenderMultiColumnBlock.h:
      (WebCore::RenderMultiColumnBlock::columnHeightAvailable):
      (WebCore::RenderMultiColumnBlock::requiresBalancing):
      (RenderMultiColumnBlock):
      * rendering/RenderMultiColumnFlowThread.cpp:
      (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
      (WebCore::RenderMultiColumnFlowThread::setPageBreak):
      (WebCore):
      (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
      * rendering/RenderMultiColumnFlowThread.h:
      (RenderMultiColumnFlowThread):
      * rendering/RenderMultiColumnSet.cpp: Get rid of
      RenderMultiColumnSet::updateLogicalHeight() override. Make
      RenderMultiColumnSet behave more like normal blocks, by having
      computeLogicalHeight() calculate logical top in addition to
      height, just like any other block.
      (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
      (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset): This
      method will become more meaningful once we add support for
      multiple column sets.
      (WebCore):
      (WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
      (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
      (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
      (WebCore::RenderMultiColumnSet::recordSpaceShortage):
      (WebCore::RenderMultiColumnSet::updateLogicalWidth):
      (WebCore::RenderMultiColumnSet::prepareForLayout):
      (WebCore::RenderMultiColumnSet::computeLogicalHeight):
      (WebCore::RenderMultiColumnSet::columnCount):
      (WebCore::RenderMultiColumnSet::columnIndexAtOffset):
      repaintFlowThreadContent() could end up in an infinite loop
      because columnIndexAtOffset() could return UINT_MAX
      (subtracting 1 from unsigned 0, which columnCount() could return),
      which an unsigned integer obviously can never become larger
      than. Also always call columnIndexAtOffset() if we want to get the
      column index for some offset, rather than doing it on our own
      sometimes. To make this work also during layout, we cannot just
      return the last column created so far if we're past it, since
      adding new columns is exactly what we want to do at this point.
      * rendering/RenderMultiColumnSet.h:
      (RenderMultiColumnSet):
      
      LayoutTests:
      
      Patch by Morten Stenshorne <mstensho@opera.com> on 2013-06-13
      Reviewed by David Hyatt.
      
      * fast/multicol/newmulticol/balance-images-expected.txt: Added.
      * fast/multicol/newmulticol/balance-images.html: Added.
      * fast/multicol/newmulticol/balance-maxheight1-expected.txt: Added.
      * fast/multicol/newmulticol/balance-maxheight1.html: Added.
      * fast/multicol/newmulticol/balance-maxheight2-expected.txt: Added.
      * fast/multicol/newmulticol/balance-maxheight2.html: Added.
      * fast/multicol/newmulticol/balance1-expected.txt: Added.
      * fast/multicol/newmulticol/balance1.html: Added.
      * fast/multicol/newmulticol/balance2-expected.txt: Added.
      * fast/multicol/newmulticol/balance2.html: Added.
      * fast/multicol/newmulticol/balance3-expected.txt: Added.
      * fast/multicol/newmulticol/balance3.html: Added.
      * fast/multicol/newmulticol/balance4-expected.txt: Added.
      * fast/multicol/newmulticol/balance4.html: Added.
      * fast/multicol/newmulticol/balance5-expected.txt: Added.
      * fast/multicol/newmulticol/balance5.html: Added.
      * fast/multicol/newmulticol/balance6-expected.txt: Added.
      * fast/multicol/newmulticol/balance6.html: Added.
      * fast/multicol/newmulticol/balance7-expected.txt: Added.
      * fast/multicol/newmulticol/balance7.html: Added.
      * fast/multicol/newmulticol/balance8-expected.txt: Added.
      * fast/multicol/newmulticol/balance8.html: Added.
      * fast/multicol/newmulticol/balance9-expected.txt: Added.
      * fast/multicol/newmulticol/balance9.html: Added.
      * fast/multicol/newmulticol/cell-shrinkback-expected.html: Added.
      * fast/multicol/newmulticol/cell-shrinkback.html: Added.
      * fast/multicol/newmulticol/columns-shorthand-parsing-expected.html: Added.
      * fast/multicol/newmulticol/columns-shorthand-parsing.html: Added.
      * fast/multicol/newmulticol/orphans-and-widows-balance-expected.txt: Added.
      * fast/multicol/newmulticol/orphans-and-widows-balance.html: Added.
      * fast/multicol/newmulticol/single-line-expected.html: Added.
      * fast/multicol/newmulticol/single-line.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a7d9989
  24. 11 Jun, 2013 2 commits
  25. 10 Jun, 2013 2 commits
    • betravis@adobe.com's avatar
      [CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code · cf7cba66
      betravis@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117162
      
      Reviewed by Alexandru Chiculita.
      
      Source/WebCore:
      
      With the split between the CSS Exclusions and CSS Shapes specifications,
      some renaming is necessary. In general, this patch removes 'Exclusion' from
      any Shapes code, while organizing the rendering shapes code into a 'shapes'
      folder.
      
      Renames:
      ExclusionShape -> Shape
      Exclusion[Rectangle|Polygon] -> [Rectangle|Polygon]Shape
      Exclusion -> Shape
      
      Refactoring, no new tests.
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::ComputedStyleExtractor::propertyValue):
      * css/CSSPrimitiveValue.h:
      * css/DeprecatedStyleBuilder.cpp:
      (WebCore::ApplyPropertyShape::setValue):
      (WebCore::ApplyPropertyShape::applyValue):
      (WebCore::ApplyPropertyShape::createHandler):
      (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
      * page/animation/CSSPropertyAnimation.cpp:
      (WebCore::blendFunc):
      (WebCore::PropertyWrapperShape::PropertyWrapperShape):
      (WebCore::CSSPropertyAnimation::ensurePropertyMap):
      * rendering/LayoutState.cpp:
      (WebCore::LayoutState::LayoutState):
      * rendering/LayoutState.h:
      (WebCore::LayoutState::LayoutState):
      (WebCore::LayoutState::shapeInsideInfo):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::styleDidChange):
      (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
      (WebCore::shapeInfoRequiresRelayout):
      (WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
      (WebCore::RenderBlock::computeShapeSize):
      (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
      (WebCore::RenderBlock::insertFloatingObject):
      (WebCore::RenderBlock::computeLogicalLocationForFloat):
      (WebCore::RenderBlock::positionNewFloats):
      (WebCore::RenderBlock::logicalLeftOffsetForLine):
      (WebCore::RenderBlock::logicalRightOffsetForLine):
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::ensureShapeInsideInfo):
      (WebCore::RenderBlock::shapeInsideInfo):
      (WebCore::RenderBlock::setShapeInsideInfo):
      (WebCore::RenderBlock::allowsShapeInsideInfoSharing):
      (WebCore::RenderBlock::xPositionForFloatIncludingMargin):
      (WebCore::RenderBlock::yPositionForFloatIncludingMargin):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::layoutShapeInsideInfo):
      (WebCore::LineWidth::LineWidth):
      (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
      (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
      (WebCore::constructBidiRunsForLine):
      (WebCore::adjustLogicalLineTop):
      (WebCore::RenderBlock::updateLineBoundariesForShapes):
      (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
      (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
      (WebCore::RenderBlock::LineBreaker::nextLineBreak):
      (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::willBeDestroyed):
      (WebCore::RenderBox::styleDidChange):
      (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
      * rendering/RenderBox.h:
      (WebCore::RenderBox::shapeOutsideInfo):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintOffset):
      * rendering/RenderView.h:
      (WebCore::RenderView::pushLayoutState):
      * rendering/shapes/PolygonShape.cpp: Renamed from Source/WebCore/rendering/ExclusionPolygon.cpp.
      (WebCore::leftSide):
      (WebCore::isReflexVertex):
      (WebCore::computeXIntersection):
      (WebCore::inwardEdgeNormal):
      (WebCore::outwardEdgeNormal):
      (WebCore::appendArc):
      (WebCore::snapVerticesToLayoutUnitGrid):
      (WebCore::computeShapePaddingBounds):
      (WebCore::computeShapeMarginBounds):
      (WebCore::PolygonShape::shapePaddingBounds):
      (WebCore::PolygonShape::shapeMarginBounds):
      (WebCore::getVertexIntersectionVertices):
      (WebCore::appendIntervalX):
      (WebCore::compareEdgeIntersectionX):
      (WebCore::computeXIntersections):
      (WebCore::computeOverlappingEdgeXProjections):
      (WebCore::PolygonShape::getExcludedIntervals):
      (WebCore::PolygonShape::getIncludedIntervals):
      (WebCore::firstFitRectInPolygon):
      (WebCore::aboveOrToTheLeft):
      (WebCore::PolygonShape::firstIncludedIntervalLogicalTop):
      * rendering/shapes/PolygonShape.h: Renamed from Source/WebCore/rendering/ExclusionPolygon.h.
      (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
      (WebCore::OffsetPolygonEdge::edgeIndex):
      (WebCore::OffsetPolygonEdge::basis):
      (WebCore::PolygonShape::PolygonShape):
      * rendering/shapes/RectangleShape.cpp: Renamed from Source/WebCore/rendering/ExclusionRectangle.cpp.
      (WebCore::ellipseXIntercept):
      (WebCore::ellipseYIntercept):
      (WebCore::FloatRoundedRect::paddingBounds):
      (WebCore::FloatRoundedRect::marginBounds):
      (WebCore::FloatRoundedRect::cornerInterceptForWidth):
      (WebCore::RectangleShape::shapePaddingBounds):
      (WebCore::RectangleShape::shapeMarginBounds):
      (WebCore::RectangleShape::getExcludedIntervals):
      (WebCore::RectangleShape::getIncludedIntervals):
      (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
      * rendering/shapes/RectangleShape.h: Renamed from Source/WebCore/rendering/ExclusionRectangle.h.
      (WebCore::FloatRoundedRect::FloatRoundedRect):
      (WebCore::FloatRoundedRect::rx):
      (WebCore::FloatRoundedRect::ry):
      (WebCore::RectangleShape::RectangleShape):
      * rendering/shapes/Shape.cpp: Renamed from Source/WebCore/rendering/ExclusionShape.cpp.
      (WebCore::createRectangleShape):
      (WebCore::createShapeCircle):
      (WebCore::createShapeEllipse):
      (WebCore::createPolygonShape):
      (WebCore::physicalRectToLogical):
      (WebCore::physicalPointToLogical):
      (WebCore::physicalSizeToLogical):
      (WebCore::Shape::createShape):
      * rendering/shapes/Shape.h: Renamed from Source/WebCore/rendering/ExclusionShape.h.
      (WebCore::LineSegment::LineSegment):
      (WebCore::Shape::~Shape):
      (WebCore::Shape::shapeMargin):
      (WebCore::Shape::shapePadding):
      * rendering/shapes/ShapeInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.cpp.
      (WebCore::::computedShape):
      (WebCore::::computeSegmentsForLine):
      * rendering/shapes/ShapeInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.h.
      (WebCore::MappedInfo::ensureInfo):
      (WebCore::MappedInfo::removeInfo):
      (WebCore::MappedInfo::info):
      (WebCore::MappedInfo::infoMap):
      (WebCore::ShapeInfo::~ShapeInfo):
      (WebCore::ShapeInfo::setShapeSize):
      (WebCore::ShapeInfo::clearSegments):
      (WebCore::ShapeInfo::shapeLogicalTop):
      (WebCore::ShapeInfo::shapeLogicalBottom):
      (WebCore::ShapeInfo::shapeLogicalLeft):
      (WebCore::ShapeInfo::shapeLogicalRight):
      (WebCore::ShapeInfo::shapeLogicalWidth):
      (WebCore::ShapeInfo::shapeLogicalHeight):
      (WebCore::ShapeInfo::logicalLineTop):
      (WebCore::ShapeInfo::logicalLineBottom):
      (WebCore::ShapeInfo::shapeContainingBlockHeight):
      (WebCore::ShapeInfo::lineOverlapsShapeBounds):
      (WebCore::ShapeInfo::lineWithinShapeBounds):
      (WebCore::ShapeInfo::dirtyShapeSize):
      (WebCore::ShapeInfo::shapeSizeDirty):
      (WebCore::ShapeInfo::owner):
      (WebCore::ShapeInfo::ShapeInfo):
      (WebCore::ShapeInfo::logicalTopOffset):
      (WebCore::ShapeInfo::logicalLeftOffset):
      * rendering/shapes/ShapeInsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp.
      (WebCore::LineSegmentRange::LineSegmentRange):
      (WebCore::ShapeInsideInfo::isEnabledFor):
      (WebCore::ShapeInsideInfo::adjustLogicalLineTop):
      * rendering/shapes/ShapeInsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.h.
      (WebCore::LineSegmentIterator::LineSegmentIterator):
      (WebCore::ShapeInsideInfo::createInfo):
      (WebCore::ShapeInsideInfo::hasSegments):
      (WebCore::ShapeInsideInfo::segments):
      (WebCore::ShapeInsideInfo::segmentRanges):
      (WebCore::ShapeInsideInfo::currentSegment):
      (WebCore::ShapeInsideInfo::setNeedsLayout):
      (WebCore::ShapeInsideInfo::needsLayout):
      (WebCore::ShapeInsideInfo::ShapeInsideInfo):
      * rendering/shapes/ShapeInterval.cpp: Renamed from Source/WebCore/rendering/ExclusionInterval.cpp.
      (WebCore::IntervalX1Comparator::operator()):
      (WebCore::ShapeInterval::intersect):
      (WebCore::sortShapeIntervals):
      (WebCore::mergeShapeIntervals):
      (WebCore::intersectShapeIntervals):
      (WebCore::subtractShapeIntervals):
      * rendering/shapes/ShapeInterval.h: Renamed from Source/WebCore/rendering/ExclusionInterval.h.
      (WebCore::ShapeInterval::ShapeInterval):
      * rendering/shapes/ShapeOutsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp.
      (WebCore::ShapeOutsideInfo::isEnabledFor):
      (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
      * rendering/shapes/ShapeOutsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.h.
      (WebCore::ShapeOutsideInfo::shapeLogicalOffset):
      (WebCore::ShapeOutsideInfo::leftSegmentShapeBoundingBoxDelta):
      (WebCore::ShapeOutsideInfo::rightSegmentShapeBoundingBoxDelta):
      (WebCore::ShapeOutsideInfo::createInfo):
      (WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::initialShapeInside):
      * rendering/style/RenderStyle.h:
      * rendering/style/ShapeValue.h: Renamed from Source/WebCore/rendering/style/ExclusionShapeValue.h.
      (WebCore::ShapeValue::createShapeValue):
      (WebCore::ShapeValue::createOutsideValue):
      (WebCore::ShapeValue::createImageValue):
      (WebCore::ShapeValue::type):
      (WebCore::ShapeValue::shape):
      (WebCore::ShapeValue::image):
      (WebCore::ShapeValue::setImage):
      (WebCore::ShapeValue::operator==):
      (WebCore::ShapeValue::ShapeValue):
      * rendering/style/StyleRareNonInheritedData.h:
      
      Source/WebKit:
      
      Adding the WebCore/rendering/shapes directory to the include list.
      
      * CMakeLists.txt:
      
      Source/WebKit2:
      
      Adding the WebCore/rendering/shapes directory to the include list.
      
      * CMakeLists.txt:
      
      Tools:
      
      Adding the WebCore/rendering/shapes directory to the include list.
      
      * DumpRenderTree/efl/CMakeLists.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf7cba66
    • commit-queue@webkit.org's avatar
      [CSS Regions] Rename region-overflow to region-fragment · afd67199
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=117397
      
      PerformanceTests:
      
      Renamed -webkit-region-overflow to -webkit-region-fragment according to the new working draft
      at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
      
      Patch by Radu Stavila <stavila@adobe.com> on 2013-06-10
      Reviewed by Alexander Pavlov.
      
      * Layout/resources/regions.css:
      
      Source/WebCore:
      
      Renamed -webkit-region-overflow to -webkit-region-fragment and
      webkitRegionOverflow to webkitRegionFragment according to the new working draft
      at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
      
      Patch by Radu Stavila <stavila@adobe.com> on 2013-06-10
      Reviewed by Alexander Pavlov.
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::ComputedStyleExtractor::propertyValue):
      * css/CSSParser.cpp:
      (WebCore::isValidKeywordPropertyAndValue):
      (WebCore::isKeywordPropertyID):
      (WebCore::CSSParser::parseValue):
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
      (WebCore::CSSPrimitiveValue::operator RegionFragment):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::isInheritedProperty):
      * css/CSSPropertyNames.in:
      * css/CSSValueKeywords.in:
      * css/DeprecatedStyleBuilder.cpp:
      (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::applyProperty):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::hasNextPage):
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::changeRequiresLayout):
      * rendering/style/RenderStyle.h:
      * rendering/style/RenderStyleConstants.h:
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
      (WebCore::StyleRareNonInheritedData::operator==):
      * rendering/style/StyleRareNonInheritedData.h:
      
      LayoutTests:
      
      Renamed -webkit-region-overflow to -webkit-region-fragment and
      webkitRegionOverflow to webkitRegionFragment according to the new working draft
      at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
      
      Patch by Radu Stavila <stavila@adobe.com> on 2013-06-10
      Reviewed by Alexander Pavlov.
      
      * fast/regions/autoheight-breakafteralways-maxheight.html:
      * fast/regions/autoheight-breakbeforealways.html:
      * fast/regions/autoheight-singleregion-breakafteralways-maxheight.html:
      * fast/regions/autoheight-singleregion-breakafteralways.html:
      * fast/regions/autoheight-singleregion-breakaftermargin.html:
      * fast/regions/autoheight-singleregion-breakbeforealways-minheight.html:
      * fast/regions/autoheight-singleregion-breakbeforealways.html:
      * fast/regions/autoheight-singleregion-multiplebreaks.html:
      * fast/regions/css-regions-disabled-expected.txt:
      * fast/regions/region-overflow-auto-overflow-hidden.html:
      * fast/regions/region-overflow-auto-overflow-visible.html:
      * fast/regions/region-overflow-break.html:
      * fast/regions/regions-widows-and-orphans.html:
      * fast/regions/script-tests/css-regions-disabled.js:
      * fast/regions/script-tests/webkit-region-overflow-parsing.js:
      * fast/regions/webkit-region-overflow-parsing-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151394 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afd67199
  26. 09 Jun, 2013 1 commit
    • roger_fong@apple.com's avatar
      Layout info should never be cleared before delayed scroll information updates. · adc9c902
      roger_fong@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=116689.
      
      Reviewed by Darin Adler.
      
      Test: fast/flexbox/clear-overflow-before-scroll-update.html
      
      Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
      Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic in RenderBlock.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::finishDelayUpdateScrollInfo): Call clearLayoutOverflow here.
      (WebCore::RenderBlock::layout): Only call clearLayoutOverflow here if scrolling isn't being delayed.
      (WebCore::RenderBlock::clearLayoutOverflow): Remove clearLayoutOverflow, move into RenderBlock to keep delayed scrolling logic in the same file.
      * rendering/RenderBlock.h:
      * rendering/RenderBox.cpp:
      * rendering/RenderBox.h:
      * rendering/RenderDeprecatedFlexibleBox.cpp: Should call updateScrollInfoAfterLayout, not layer()->updateScrollInfoAfterLayout(), so that it takes delayed scrolling logic into account.
      (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
      * rendering/RenderGrid.cpp: Ditto
      (WebCore::RenderGrid::layoutBlock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      adc9c902
  27. 06 Jun, 2013 1 commit