[TextAutosizing] Refactoring to eliminate boolean parameter.
https://bugs.webkit.org/show_bug.cgi?id=110490

Patch by Anton Vayvod <avayvod@chromium.org> on 2013-02-22
Reviewed by Julien Chaffraix.

A follow-up to the recent change that introduced a boolean parameter to
processClusterInternal method of TextAutosizer. Boolean parameters are discouraged by the
WebKit style guide. See http://trac.webkit.org/changeset/142866

Refactoring so no new tests.

* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::clusterMultiplier):

        Calculates the font size multiplier for the specified cluster.

(WebCore::TextAutosizer::processClusterInternal):

        Accepts the font size multiplier instead of |shouldBeAutosized|.

(WebCore::TextAutosizer::processCluster):
(WebCore::TextAutosizer::processCompositeCluster):

        Both methods above now calculate the multiplier and then pass it to
        processClusterInternal.

* rendering/TextAutosizer.h:

        Updated method declarations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix after r143637.

* WebCore.exp.in: Unconditionally export ScriptController::javaScriptContext.
* bindings/js/ScriptController.h: Unconditionally define javaScriptContext for Mac builds.
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::javaScriptContext): Move the #if inside the function, and return 0 when false.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r143664, r143681): http/tests/security/feed-urls-from-remote.html fails
https://bugs.webkit.org/show_bug.cgi?id=110554

Reviewed by Adam Barth.

Will fix http/tests/security/feed-urls-from-remote.html for Mac WK1.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoading):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
text-overflow:ellipsis is not applied when the block contains nested blocks
https://bugs.webkit.org/show_bug.cgi?id=101879

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-02-22
Reviewed by Eric Seidel.

Source/WebCore:

Since text-overflow is not an inherited property, the anonymous blocks
don't know they should ellipse. This causes the anonymous blocks
created in the nested block situation to check their parent to find
out if they should ellipse.

Test: fast/css/text-overflow-ellipsis-anonymous-blocks.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):

LayoutTests:

Use the test from the specification that is supplied as part of the
bug.

* fast/css/text-overflow-ellipsis-anonymous-blocks-expected.html: Added.
* fast/css/text-overflow-ellipsis-anonymous-blocks.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[New Multicolumn] Correctly track whether or not a layer is paginated.
https://bugs.webkit.org/show_bug.cgi?id=110625.

Taking the first step towards implementing the correct spec-compliant painting
model for the new multi-column layout. Add code to make sure the paginated
bits in RenderLayer get propagated correctly for the new layout.
        
The main difference in bit propagation between the old multicolumn layout and
the new multicolumn layout is that the old layout only tracked pagination "roots",
since it has a broken layer painting model. It incorrectly treats a pagination
"root" inside a multi-column block as establishing a stacking context in each
column. This is incorrect.
        
The new multicolumn code is going to paint each paginated layer individually,
and this means the bits can't just be about roots. Instead they have to be set
on every layer that may be split across columns, without regard for whether parent
layers are also split or not. This is actually a simpler bit propagation model
than the old code.

Reviewed by Beth Dakin.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
Add code to set the m_isPaginated bit for in-flow RenderFlowThreads. This includes
only RenderMultiColumnFlowThread for now, but eventually it will also include
RenderPageFlowThread.

(WebCore::RenderLayer::useRegionBasedColumns):
Add a helper method to check if region-based columns are turned on, since we're
not attempting to alter the old column pagination model.

(WebCore::RenderLayer::updatePagination):
Added the code to propagate bits under the new model. Whether or not you're paginated
just depends on whether or not your enclosing layer along the containing block chain
is paginated.

(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestList):
Add code that avoids the old multi-column pagination model when the new column model
is enabled. For now there is no code in the new model that does anything with the bits,
but we're avoiding calling the old code, since it is broken for the new columns.

* rendering/RenderLayer.h:
(RenderLayer):
Added the useRegionBasedColumns method to check the Setting.

* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isInFlowRenderFlowThread):
(RenderObject):
Implement isInFlowRenderFlowThread, a virtual function for asking if a renderer is
an in-flow RenderFlowThread, which means that it is going to need paginated layers
because the flow thread has to split across "pages" that do not establish stacking
contexts.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Code cache size should adapt to workload
https://bugs.webkit.org/show_bug.cgi?id=110560

Reviewed by Antti Koivisto.

(*) 5% PLT arithmetic mean speedup
(*) 10% PLT geometric mean speedup
(*) 3.4X microbenchmark speedup
(*) Reduces initial cache capacity by 16X

* runtime/CodeCache.cpp:
(JSC::CodeCache::CodeCache): Updated for interface change.

* runtime/CodeCache.h:
(JSC::SourceCodeValue::SourceCodeValue):
(SourceCodeValue): Turned the cache value into a struct so it can track its age.

(CodeCacheMap):
(JSC::CodeCacheMap::CodeCacheMap):
(JSC::CodeCacheMap::find):
(JSC::CodeCacheMap::set):
(JSC::CodeCacheMap::clear):
(JSC::CodeCacheMap::pruneIfNeeded):
(CodeCache): Grow and shrink in response to usage.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add computeInstrinsicLogicalWidths functions to TableLayout subclasses
https://bugs.webkit.org/show_bug.cgi?id=110520

Reviewed by Tony Chang.

This is just a refactor in preparation for adding RenderTable::computeIntinsicLogicalWidths.
No change in behavior.

Split the computePreferredLogicalWidths functions into a computeIntinsicLogicalWidths
and a applyPreferredLogicalWidthQuirks. Also, move the addition of bordersPaddingAndSpacing
into RenderTable since both TableLayout subclasses need this.

This has the added readability benefit of better isolating the quirks that each table layout
mode requires.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
(WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
* rendering/AutoTableLayout.h:
(AutoTableLayout):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::computeIntrinsicLogicalWidths):
(WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
* rendering/FixedTableLayout.h:
(FixedTableLayout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computePreferredLogicalWidths):
* rendering/TableLayout.h:
(TableLayout):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac OS build broken by new ExpressionParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=110629

Unreviewed build fix. Regenerated ExpressionParser with Bison 2.3.

* src/compiler/preprocessor/ExpressionParser.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Two video contollers appear after exiting the fullscreen video when using menubar to exit.
https://bugs.webkit.org/show_bug.cgi?id=110506

Reviewed by Eric Carlson.

When we are notified that the fullscreen window is about to exit fullscreen mode unrequested,
call requestExitFullScreen(), as that will result in Document::webkitExitFullScreen() correctly
tearing down the fullscreen state.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):

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

Fix the 32-bit build by using the right data type.

* runtime/CodeCache.h:
(JSC::CodeCacheMap::find):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Region boxes should respect -shape-inside CSS property
https://bugs.webkit.org/show_bug.cgi?id=107880

Reviewed by David Hyatt.

The shape-inside CSS property modifies the shape of the inner inline flow content from rectangular content box
to an arbitrary geometry. The detailed documentation is located in the CSS-Exclusions specification:
http://dev.w3.org/csswg/css3-exclusions/#shape-inside-property. This change adds support for the shape-inside property
on CSS Regions.

Source/WebCore: 

Test: fast/regions/shape-inside-on-regions.html

* rendering/ExclusionShapeInfo.cpp:
(WebCore):
(WebCore::::logicalTopOffset): Shape dimension should be relative to the current region.
* rendering/ExclusionShapeInfo.h:
(ExclusionShapeInfo):
(WebCore::::logicalTopOffset): Move the implementation to ExclusionShapeInfo.cpp.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::logicalHeightForLine): Move the function prior to layoutExclusionShapeInsideInfo, since we need to use it there.
(WebCore):
(WebCore::layoutExclusionShapeInsideInfo): Add support for cases when shape-inside is a region-block property.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Update the exclusion shape information for every line, since the content
could flow through several region containers which can have different shape-inside properties.

LayoutTests: 

* fast/regions/shape-inside-on-regions-expected.html: Added.
* fast/regions/shape-inside-on-regions.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Accept key events even when composing region is active.
https://bugs.webkit.org/show_bug.cgi?id=110617

Reviewed by Rob Buis.

PR 293598.

Don't reject key events that arrive when composing region is active,
this can prevent navigation events from firing, instead end
the composition and process the key.

Reviewed Internally by Nima Ghanavatian.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::updateFormState):


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

Fix the 32-bit build by using the right data type in more places.

* runtime/CodeCache.h:
(CodeCacheMap):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Changed gman's primary address for auto-complete in Bugzilla.

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
INPUT_MULTIPLE_FIELDS_UI: Unable to enter "24" to hour field
https://bugs.webkit.org/show_bug.cgi?id=110431

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-02-22
Reviewed by Kent Tamura.

Source/WebCore:

Fixed a bug that hour-field does not accept "24" as a valid input when hour format is 1-24.
To test <input> against different time formats, added "pattern" attribute to DateTimeEditElement.

Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Overwrites layoutParameters.dateTimeFormat by pattern attribute of DateTimeEditElement (if exists).
* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeHourFieldElement::populateDateTimeFieldsState): Fixed a bug where AM/PM value was passed to setHour().
(WebCore::DateTimeHourFieldElement::setValueAsInteger): Clamps the given value to 0-24 when the range of the field is 1-12 or 1-24. Renamed the parameter as it may not be an hour23 value (0-23).

LayoutTests:

Added test cases for hour formats 0-11 and 1-24.

* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Binding tests rebaseline after r143737.

* bindings/scripts/test/V8/V8Float64Array.cpp:
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
* bindings/scripts/test/V8/V8TestException.cpp:
* bindings/scripts/test/V8/V8TestInterface.cpp:
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
* bindings/scripts/test/V8/V8TestNode.cpp:
* bindings/scripts/test/V8/V8TestObj.cpp:
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/V8/V8TestTypedefs.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Marking a bunch of (mostly Sputnik) tests as slow.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a Mac baseline for the test added in r142955.

* platform/mac/TestExpectations:
* platform/mac/svg/filters/filter-hidden-content-expected.png: Added.
* platform/mac/svg/filters/filter-hidden-content-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac WebKit2 rebaselines.

Partially revert http://trac.webkit.org/changeset/143709 since the expected result for
cross-origin-local-storage-wk1-expected.txt is different on Mac WebKit on the contrary to
the change log description in the changeset.

Also skip editing/spelling/spelling-changed-text.html on Mac since the test requires
the support for asynchronous spellchecking.

* platform/mac-wk2/http/tests/security/cross-origin-local-storage-wk1-expected.txt: Copied
    from platform/mac/http/tests/security/cross-origin-local-storage-wk1-expected.txt.
* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Removed expectations for tests that now pass. Adjusted an expectation for a flaky crasher.
Marked a few more sputnik tests as slow.

* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:


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