Widows and orphans test4 fails if isolated
https://bugs.webkit.org/show_bug.cgi?id=106006

Patch by Andrei Bucur <abucur@adobe.com> on 2013-01-17
Reviewed by Dean Jackson.

Source/WebCore:

To determine if the orphans condition is not respected, every time a fragmentation break is encountered adjustLinePositionForPagination() is called for the current line.
If the index on the line in the block is smaller than the number of orphans specified in the style object, the block is shifted in the next fragmentainer. The index of
the line is obtained by calling RenderBlock::lineCount. However, this only works in a full layout when lineCount() will coincidentally return the index of the line.
In subsequent layouts, during the determineStartPosition() phase, lineCount() returns all the lines in the block so the orphans condition is never triggered.
The patch modifies the lineCount() function to have two optional parameters. The first parameter is the line where lineCount should stop counting lines. The second
is an output boolean parameter indicating if the line was found or not. This change makes the lineCount() more flexible and allows retreiving the index of a
specific line (e.g. the index of the current line inside adjustLinePositionForPagination()).

Tests: fast/multicol/orphans-relayout.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineCount): See the detailed description.
(WebCore::RenderBlock::adjustLinePositionForPagination): Make use of the modified lineCount() function.
* rendering/RenderBlock.h:
(RenderBlock):

LayoutTests:

This is the "Basic Orphans" test extracted from fast/multicol/widows-and-orphans.html. It was minimized and modified to include a relayout step.

* fast/multicol/orphans-relayout-expected.txt: Added.
* fast/multicol/orphans-relayout.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add ontransitionend attribute on HTML elements.
https://bugs.webkit.org/show_bug.cgi?id=107134

Reviewed by Simon Fraser.

Source/WebCore:

Add ontransitionend attribute on HTML elements to match the prefixed
attribute onwebkittransitionend. As it uses the same plumbing as a
regular event listener, it behaves the same which means that if
ontransitionend only is defined then only the code attached to this
attribute will be called, if only onwebkittransitionend is defined then
only the code attached to this attribute will be called and finally if
both attributes are defined then only the code attached to the
unprefixed attribute will be called.

Tests: transitions/transition-end-event-unprefixed-03.html
       transitions/transition-end-event-unprefixed-04.html

* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl: only define the property if the unprefixing is
turn on.

LayoutTests:

Add tests to cover the new attribute. It also make sure that event if
we use the old attribute and the new one at the same time only the new
event handler will be called.

* transitions/transition-end-event-unprefixed-03-expected.txt: Added.
* transitions/transition-end-event-unprefixed-03.html: Added.
* transitions/transition-end-event-unprefixed-04-expected.txt: Added.
* transitions/transition-end-event-unprefixed-04.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled Chromium DEPS to r177369.  Requested by
ajuma via sheriffbot.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-17

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Open resource dialog has poor performance.
https://bugs.webkit.org/show_bug.cgi?id=107122

Reviewed by Pavel Feldman.

Open resource dialog does not make linear number of relayouts on highlight anymore.
Replaced localeCompare with string compare since it is significantly faster.

* inspector/front-end/FilteredItemSelectionDialog.js:
(WebInspector.FilteredItemSelectionDialog.prototype._highlightItems):
(WebInspector.OpenResourceDialog.compareFunction):
(WebInspector.OpenResourceDialog):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Content flows incorrectly in autoheight regions with min/max-height set
https://bugs.webkit.org/show_bug.cgi?id=102099

Patch by Andrei Bucur <abucur@adobe.com> on 2013-01-17
Reviewed by David Hyatt.

Source/WebCore:

The current layout algorithm for auto-height regions is gives wrong results when the max-height property is set on them. The reason is we
consider the max-height restriction too late in the layout, when applying a forced break. This is what happens when content is laid out
in an auto-height region.
1. The content flows without a limit until a forced break appears. If there's no forced break in the content, one is forced anyway at the end
of the layout.
2. The region where the forced break is placed is not always the one where content is laid out because of max-height restrictions.
3. All the regions with max-height are iterated and their height accumulated until the break offset is reached and the region at that point is ended.
This gives wrong results because the forced break position in the content was computed assuming there's only one region where the content is laid out.
The regions with max-height could have generated unforced breaks at their height and the forced break actually should have a different position.

This patch changes the algorithm in this way:
1. From the flow thread perspective all the regions start with a height: max-height for auto-height regions (or LayoutSize.max()/2 if not defined)
or the fixed height value when specified.
2. When the content is laid out, if there's no forced break, the height of the content is correctly estimated because the layout sees unforced breaks
at the max-height values.
3. If a forced break appears, the affected region can be obtained only by looking at the break offset in the region chain. If the region has auto-height,
its height is updated by the forced break.
4. At the end of the layout, there's the additional task to clear the height of all the regions that didn't receive content. This can be done optimally
without adding a new iteration through the regions by attaching to the RegionOverset computation loop.

Tests:  fast/regions/autoheight-maxheight-mixed-break.html
        fast/regions/autoheight-maxheight-simple-break.html
        fast/regions/autoheight-maxheight-simple-nobreak.html
        fast/regions/autoheight-minmaxheight-mixed-break-hbt.html
        fast/regions/autoheight-minmaxheight-mixed-break-vlr.html
        fast/regions/autoheight-minmaxheight-mixed-break-vrl.html
        fast/regions/autoheight-minmaxheight-mixed-break.html
        fast/regions/autoheight-minmaxheight-simple-break.html
        fast/regions/autoheight-minmaxheight-simple-nobreak.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::computeOverflowStateForRegions): Attach to the loop in this function to clear the overrideLogicalHeight on empty regions.
(WebCore):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect): Add an ASSERT that a region always has overrideLogicalHeight or a fixed height.
(WebCore::RenderFlowThread::initializeRegionsOverrideLogicalContentHeight): A new function that updates the region chain height to use the max-height value
for auto-height regions.
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::pageLogicalHeight): the decorations size is incorrectly considered in the page height.
(WebCore):
(WebCore::RenderRegion::maxPageLogicalHeight): new function that returns the max page size for a region. It shouldn't be called too often
or the returned value can be cached
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent): the decorations size is incorrectly considered in the logical height of
the flow thread content.
* rendering/RenderRegion.h:
(RenderRegion):

LayoutTests:

All the tests have a description about how the breaking should happen. They pass if the height of the region chain is
correctly computed by using the max-height, min-height, height and writing mode conditions.

* fast/regions/autoheight-maxheight-mixed-break-expected.txt: Added.
* fast/regions/autoheight-maxheight-mixed-break.html: Added.
* fast/regions/autoheight-maxheight-simple-break-expected.txt: Added.
* fast/regions/autoheight-maxheight-simple-break.html: Added.
* fast/regions/autoheight-maxheight-simple-nobreak-expected.txt: Added.
* fast/regions/autoheight-maxheight-simple-nobreak.html: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-expected.txt: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-hbt-expected.txt: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-hbt.html: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-vlr-expected.txt: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-vlr.html: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-vrl-expected.txt: Added.
* fast/regions/autoheight-minmaxheight-mixed-break-vrl.html: Added.
* fast/regions/autoheight-minmaxheight-mixed-break.html: Added.
* fast/regions/autoheight-minmaxheight-simple-break-expected.txt: Added.
* fast/regions/autoheight-minmaxheight-simple-break.html: Added.
* fast/regions/autoheight-minmaxheight-simple-nobreak-expected.txt: Added.
* fast/regions/autoheight-minmaxheight-simple-nobreak.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: InstrumentingAgents should be registered in InspectorInstrumentation only when there is a front-end
https://bugs.webkit.org/show_bug.cgi?id=107127

Reviewed by Vsevolod Vlasov.

InspectorInstrumentation::registerInstrumentingAgents is called when front-end
is connected to corresponding InspectorController. When the front-end disconnects
InspectorInstrumentation::unregisterInstrumentingAgents is called.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Move all ExtraDataContainers into anonymous namespaces
https://bugs.webkit.org/show_bug.cgi?id=107128

Reviewed by Kentaro Hara.

Tests not needed.

* platform/chromium/support/WebMediaStreamDescriptor.cpp:
* platform/chromium/support/WebMediaStreamSource.cpp:
* platform/chromium/support/WebRTCSessionDescriptionRequest.cpp:
* platform/chromium/support/WebRTCVoidRequest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Wire BackgroundHTMLParser to HTMLDocumentParser
https://bugs.webkit.org/show_bug.cgi?id=107140

Reviewed by Adam Barth.

With this patch, we now pass the majority of html5lib and fast/parser tests with threaded HTML parsing enabled.

No new tests because covered by existing fast/parser tests.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::TokenDelivery::execute):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser):
(WebCore::HTMLDocumentParser::~HTMLDocumentParser):
(WebCore::HTMLDocumentParser::processingData):
(WebCore::HTMLDocumentParser::resumeParsingAfterYield):
(WebCore::HTMLDocumentParser::canTakeNextToken):
(WebCore::HTMLDocumentParser::feedTokens):
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore):
(WebCore::HTMLDocumentParser::startBackgroundParser):
(WebCore::HTMLDocumentParser::stopBackgroundParser):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::end):
(WebCore::HTMLDocumentParser::finish):
(WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
* html/parser/HTMLDocumentParser.h:
(WebCore):
(HTMLDocumentParser):
(WebCore::HTMLDocumentParser::hasPreloadScanner):
(WebCore::HTMLDocumentParser::shouldUseThreading):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Build with LevelDB when IndexedDB is enabled
https://bugs.webkit.org/show_bug.cgi?id=103220

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-01-17
Reviewed by Gustavo Noronha Silva.

.:

* configure.ac: Detect whether the IndexedDatabase feature is enabled. We cannot
use the typical approach for feature detection since we need to adjust the automake
file output based on whether or not IndexedDatabase is enabled.

Source/ThirdParty:

Add the leveldb 1.9.0 source code to the ThirdParty dependencies.
We cannot depend on leveldb provided by the distribution, because
it sometimes breaks API compatibility.

* leveldb: Imported from the 1.9.0 leveldb source tarball.

Source/WebCore:

No new tests. This is just a build change. IndexedDatabase support
is already covered by the suite of storage layout tests.

* GNUmakefile.am: Add the leveldb convenience library.
* GNUmakefile.list.am: Add the list of sources.

Source/WebKit/gtk:

* GNUmakefile.am: When IndexedDatabase is enabled add the leveldb convenience
library to the shared library link phase.

Source/WebKit2:

* GNUmakefile.am: When IndexedDatabase is enabled add the leveldb convenience
library to the shared library link phase.

Tools:

* Scripts/webkitpy/style/checker.py: Do not style check the leveldb source code
as it does not conform to WebKit style.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Update Authentication Type and Scheme implementation
https://bugs.webkit.org/show_bug.cgi?id=107045
PR #281292

Reviewed by Yong Li.

Reviewed internally by Joe Mason. A typo is also fixed by Joe Mason.

The BlackBerry platform layer has defined both authentication type and authentication scheme.
This patch is adapting the porting layer to the platform layer change.

No functionalities changed no new tests.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make renderer constructors take Element where possible
https://bugs.webkit.org/show_bug.cgi?id=107138

Reviewed by David Hyatt.
        
Tighter typing prevents bugs and enables optimizations.

The patch changes how anonymous rendererer are constructed. Previously Document* as the node parameter
indicated that the renderer was anonymous. This forced the code to operate on ContainerNodes (Document
is not an Element). Now anonymous renderers are constructed by passing null and the document is set by
separate setDocumentForAnonymous() call. The patch uses RenderFoo::createAnonymous() pattern consistently.

Most constructors are switched to take Element. RenderBlock still takes ContainerNode due to a few subclasses
(RenderView and RenderFlowThread) that pass in a Document.

* page/FrameView.cpp:
(WebCore::FrameView::updateScrollCorner):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymous):
(WebCore):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
(WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
(WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer):
(WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
(WebCore::RenderDeprecatedFlexibleBox::createAnonymous):
(WebCore):
* rendering/RenderDeprecatedFlexibleBox.h:
(RenderDeprecatedFlexibleBox):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::RenderDetailsMarker):
* rendering/RenderDetailsMarker.h:
(RenderDetailsMarker):
* rendering/RenderDialog.h:
(WebCore::RenderDialog::RenderDialog):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::RenderFieldset):
* rendering/RenderFieldset.h:
(RenderFieldset):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
* rendering/RenderFlowThread.cpp:
(WebCore):
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderFullScreen.cpp:
(RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
(RenderFullScreen::RenderFullScreen):
(RenderFullScreen::createAnonymous):
(RenderFullScreen::wrapRenderer):
* rendering/RenderFullScreen.h:
(RenderFullScreen):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::RenderGrid):
* rendering/RenderGrid.h:
(RenderGrid):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::createAnonymous):
(WebCore):
* rendering/RenderImage.h:
(RenderImage):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::RenderInline):
(WebCore::RenderInline::createAnonymous):
(WebCore):
(WebCore::RenderInline::addChildIgnoringContinuation):
* rendering/RenderInline.h:
(RenderInline):
(WebCore::RenderInline::node):
        
    Add version with covariant Element return type.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollCornerStyle):
(WebCore::RenderLayer::updateResizerStyle):
(WebCore::RenderLayer::createReflection):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::styleDidChange):
* rendering/RenderListItem.h:
(RenderListItem):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::RenderListMarker):
(WebCore::RenderListMarker::createAnonymous):
(WebCore):
* rendering/RenderListMarker.h:
(RenderListMarker):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
(WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
(WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
* rendering/RenderMediaControlElements.h:
(RenderMediaVolumeSliderContainer):
(RenderMediaControlTimeDisplay):
(RenderTextTrackContainerElement):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::ensureColumnSets):
* rendering/RenderMultiColumnBlock.h:
(RenderMultiColumnBlock):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnFlowThread.h:
(RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::createAnonymous):
(WebCore):
* rendering/RenderMultiColumnSet.h:
(RenderMultiColumnSet):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
* rendering/RenderNamedFlowThread.h:
(RenderNamedFlowThread):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
* rendering/RenderObject.h:
        
     Passed in null node indicates that the renderer is anonymous. Remove now unnecessary setIsAnonymous() function.

(WebCore::RenderObject::isAnonymous):
(WebCore::RenderObject::setDocumentForAnonymous):
(RenderObject):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
* rendering/RenderRegion.h:
(RenderRegion):
* rendering/RenderRegionSet.cpp:
(WebCore::RenderRegionSet::RenderRegionSet):
* rendering/RenderRegionSet.h:
(RenderRegionSet):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::RenderReplaced):
* rendering/RenderReplaced.h:
(RenderReplaced):
* rendering/RenderReplica.cpp:
(WebCore::RenderReplica::RenderReplica):
(WebCore::RenderReplica::createAnonymous):
(WebCore):
* rendering/RenderReplica.h:
(RenderReplica):
* rendering/RenderRuby.cpp:
(WebCore::createAnonymousRubyInlineBlock):
(WebCore::RenderRubyAsInline::RenderRubyAsInline):
(WebCore):
(WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
* rendering/RenderRuby.h:
(RenderRubyAsInline):
(RenderRubyAsBlock):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::RenderRubyBase):
(WebCore::RenderRubyBase::createAnonymous):
(WebCore):
* rendering/RenderRubyBase.h:
(RenderRubyBase):
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::createRubyBase):
(WebCore::RenderRubyRun::staticCreateRubyRun):
* rendering/RenderRubyRun.h:
(RenderRubyRun):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::RenderRubyText):
* rendering/RenderRubyText.h:
(RenderRubyText):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::updateScrollbarPart):
* rendering/RenderScrollbarPart.cpp:
(WebCore::RenderScrollbarPart::RenderScrollbarPart):
(WebCore::RenderScrollbarPart::createAnonymous):
(WebCore):
* rendering/RenderScrollbarPart.h:
(RenderScrollbarPart):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::RenderSearchField):
* rendering/RenderSearchField.h:
(RenderSearchField):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable):
(WebCore::RenderTable::createAnonymousWithParentRenderer):
* rendering/RenderTable.h:
(RenderTable):
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::RenderTableCaption):
* rendering/RenderTableCaption.h:
(RenderTableCaption):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
(WebCore::RenderTableCell::createAnonymousWithParentRenderer):
* rendering/RenderTableCell.h:
(RenderTableCell):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::RenderTableCol):
* rendering/RenderTableCol.h:
(RenderTableCol):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::RenderTableRow):
(WebCore::RenderTableRow::createAnonymousWithParentRenderer):
* rendering/RenderTableRow.h:
(RenderTableRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::RenderTableSection):
(WebCore::RenderTableSection::createAnonymousWithParentRenderer):
* rendering/RenderTableSection.h:
(RenderTableSection):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
* rendering/RenderTextControl.h:
(RenderTextControl):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
* rendering/RenderTextControlMultiLine.h:
(RenderTextControlMultiLine):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
(WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::RenderTextTrackCue):
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::RenderWidget):
* rendering/RenderWidget.h:
(RenderWidget):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
(WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
(RenderMathMLBlock):
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::createMathMLOperator):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::RenderMathMLOperator):
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/mathml/RenderMathMLOperator.h:
(RenderMathMLOperator):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::RenderMathMLRow):
(WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):
* rendering/mathml/RenderMathMLRow.h:
(RenderMathMLRow):
* rendering/style/ContentData.cpp:
(WebCore::ImageContentData::createRenderer):
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::RenderSVGBlock):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::RenderSVGInline):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGTSpan.cpp:
(WebCore::RenderSVGTSpan::RenderSVGTSpan):
* rendering/svg/RenderSVGTSpan.h:
(RenderSVGTSpan):
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::RenderSVGTextPath):
* rendering/svg/RenderSVGTextPath.h:
(RenderSVGTextPath):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Nested fixed position element not staying with parent
https://bugs.webkit.org/show_bug.cgi?id=65477

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/inline/fixed-pos-moves-with-abspos-inline-parent.html
       fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html
       fast/inline/fixed-pos-moves-with-abspos-parent.html
       fast/inline/fixed-pos-with-transform-container-moves-with-abspos-parent.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
If an absolute position element inside a relative positioned container moves, and the absolute element has a fixed position
child, neither the container nor the fixed element learn of the movement since posChildNeedsLayout() is only marked as far as the
relative positioned container. So if our positioned objects list can contain fixed position elements perform the
checks in markFixedPositionObjectForLayoutIfNeeded for each fixed pos object in the container's positioned object list.
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
For a fixed position element in the positioned objects list that has a static x or y position check for an absolute positioned ancestor
and if we find one, see if the static x or y position of the fixed pos element has changed. If it has, mark it for layout.
(WebCore):
(WebCore::RenderBlock::layoutPositionedObjects):
A fixed position element with an absolute position ancestor has no way of learning if the latter has changed position. So perform the
checks in markFixedPositionObjectForLayoutIfNeeded for each fixed pos object in the container's positioned object list.
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock): Use new helper function canContainFixedPositionObjects().
* rendering/RenderObject.h:
(WebCore::RenderObject::canContainFixedPositionObjects):
(RenderObject):

LayoutTests:

* fast/inline/fixed-pos-moves-with-abspos-inline-parent-expected.txt: Added.
* fast/inline/fixed-pos-moves-with-abspos-inline-parent.html: Added.
* fast/inline/fixed-pos-moves-with-abspos-parent-expected.txt: Added.
* fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor-expected.txt: Added.
* fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html: Added.
* fast/inline/fixed-pos-moves-with-abspos-parent.html: Added.
* fast/inline/fixed-pos-with-transform-container-moves-with-abspos-parent-expected.txt: Added.
* fast/inline/fixed-pos-with-transform-container-moves-with-abspos-parent.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Make new-style page scale work with fixed layout
https://bugs.webkit.org/show_bug.cgi?id=106951

Reviewed by Adam Barth.

This makes non-CSS-transform page scaling work with fixed-layout mode,
including viewport tag support.

- dispatchViewportPropertiesDidChange() now works entirely with DIP
pixels instead of physical pixels, and is made compatible with
separating deviceScaleFactor from pageScaleFactor.

- In this mode, the "layout viewport" size in the pinch-zoom model is
made a first-class concept separate from the device size.  This
is a viewport with the same aspect ratio as the device but with the
layout width of the page.  This viewport is used:
  - As FrameView::visibleContentRect.
  - Returned from WebView::size().
  - Given to the compositor as layoutViewportSize.

- m_deviceScaleInCompositor is deleted as it's clearer to use the
applyDeviceScaleInCompositor setting directly.

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::size):
(WebKit):
(WebKit::WebViewImpl::resize):
(WebKit::WebViewImpl::setPageScaleFactor):
(WebKit::WebViewImpl::setDeviceScaleFactor):
(WebKit::WebViewImpl::layoutSize):
(WebKit::WebViewImpl::computePageScaleFactorLimits):
(WebKit::WebViewImpl::dipSize):
(WebKit::WebViewImpl::didChangeContentsSize):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
(WebKit::WebViewImpl::updateLayerTreeViewport):
* src/WebViewImpl.h:
(WebViewImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replaced specifiers variable with is_debug in builders.py
https://bugs.webkit.org/show_bug.cgi?id=107057

Patch by Timothy Loh <timloh@google.com> on 2013-01-17
Reviewed by Dirk Pranke.

Replaced specifiers variable with is_debug in builders.py to simplify
Bug 106259. The other specifiers are not used elsewhere in the code.
Fixed builder_name_for_port_name to return a debug builder if we don't
have a release builder.

* Scripts/webkitpy/layout_tests/port/builders.py:
(all_port_names):
(builder_name_for_port_name):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaselineExpectations.test_rebaseline_expectations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Prevent crash dereferencing null if script context has stopped
https://bugs.webkit.org/show_bug.cgi?id=107146

Reviewed by Tony Chang.

We have crash reports from Chromium users (but no local repro) for a crash coming
from IDBRequest::dispatchEvent() that looks like it's calling toV8Context() after
the script execution context has stopped. The dispatch shouldn't be occurring
and we ASSERT as such, but something weird is going on during Worker tear down.
If this patch prevents the crash it would indicate that stop() is called before
dispatchEvent() which shouldn't be happening, and would let us continue chasing
the issue.

No new tests - this shouldn't be happening.

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] svg/custom/foreign-object-skew-expected.png differs Debug/Release on SnowLeopard
https://bugs.webkit.org/show_bug.cgi?id=99138

Unreviewed test expectations update.

* platform/chromium-mac-snowleopard/svg/custom/foreign-object-skew-expected.png: Use the Release result.
* platform/chromium/TestExpectations: Mark the test as failing, and won't fix.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32-bit build for Qt5 on Mac OS fails.
https://bugs.webkit.org/show_bug.cgi?id=107094

We need to define NS_BUILD_32_LIKE_64 for 32-bit build for Mac OS.
Fixed 32-bit build detection for support Qt5.

Source/WebCore:

Patch by Poul Sysolyatin <psytonx@gmail.com> on 2013-01-17
Reviewed by Benjamin Poulain.

* Target.pri:

Source/WebKit:

Patch by Poul Sysolyatin <psytonx@gmail.com> on 2013-01-17
Reviewed by Benjamin Poulain.

* WebKit1.pro:

Source/WebKit2:

Patch by Poul Sysolyatin <psytonx@gmail.com> on 2013-01-17
Reviewed by Benjamin Poulain.

* Target.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG Node::ref() and Node::deref() should not return bool, and should have postfixRef variants
https://bugs.webkit.org/show_bug.cgi?id=107147

Reviewed by Mark Hahnenberg.
        
This small refactoring will enable a world where ref() returns Node*, which is useful for
https://bugs.webkit.org/show_bug.cgi?id=106868.  Also, while this refactoring does lead to
slightly less terse code, it's also slightly more self-explanatory.  I could never quite
remember what the meaning of the bool return from ref() and deref() was.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::collectGarbage):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::ref):
(JSC::DFG::Graph::deref):
* dfg/DFGNode.h:
(JSC::DFG::Node::ref):
(Node):
(JSC::DFG::Node::postfixRef):
(JSC::DFG::Node::deref):
(JSC::DFG::Node::postfixDeref):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Objective-C API: Clean up JSValue
https://bugs.webkit.org/show_bug.cgi?id=107156

Reviewed by Oliver Hunt.

JSContext m_protectCounts, protect, unprotect are all now unnecessary overhead, and should all be removed.  
These exist to handle the context going away before the value does; the context needs to be able to unprotect 
values early.  Since the value is now keeping the context alive there is no longer any danger of this happening; 
instead we should just protect/unprotect the value in JSValue's init/dealloc methods.

* API/JSContext.mm:
(-[JSContext dealloc]):
* API/JSContextInternal.h:
* API/JSValue.mm:
(-[JSValue initWithValue:inContext:]):
(-[JSValue dealloc]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MathML padding overrides only need to be on RenderMathMLRoot
https://bugs.webkit.org/show_bug.cgi?id=107151

Reviewed by Tony Chang.

RenderMathMLRoot is the only class that uses these.
No need for them to be on the generic MathML superclass.

* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::RenderMathMLRoot):
(WebCore::RenderMathMLRoot::paddingTop):
(WebCore::RenderMathMLRoot::paddingBottom):
(WebCore::RenderMathMLRoot::paddingLeft):
(WebCore::RenderMathMLRoot::paddingRight):
(WebCore::RenderMathMLRoot::paddingBefore):
(WebCore::RenderMathMLRoot::paddingAfter):
(WebCore::RenderMathMLRoot::paddingStart):
(WebCore::RenderMathMLRoot::paddingEnd):
* rendering/mathml/RenderMathMLRoot.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140032 268f45cc-cd09-0410-ab3c-d52691b4dbfc