REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
https://bugs.webkit.org/show_bug.cgi?id=117747

Reviewed by Kent Tamura.

.:

* ManualTests/search-select-all-with-focus-style.html: Added.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28

r147612 added setNeedsLayout(true, MarkOnlyThis) for
TextControlInnerTextElement renderer. It's ok for input[type=text]
because RenderTextControlSingleLine also has needsLayout flag, and it
has only the inner text renderer as a child.

As for input[type=search], it doesn't work. Renderer structure for
input[type=search] is:

RenderTextControlSingleLine
└Renderer for TextControlInnerContainer
  └Renderer for TextControlInnerElement
    └Renderer for TextControlInnerTextElement

After r147612, there is a case that only RenderTextControlSingleLine
and TextControlInnerTextElement renderer have needsLayout flag, and
others don't.  It won't trigger layout for
TextControlInnerTextElement renderer.

We should set needsLayout flags of TextControlInnerContainer renderer
and TextControlInnerElement renderer by MarkContainingBlockChain.

Manual Tests: search-select-all-with-focus-style.html
(I tried but couldn't make a test that works in DRT)

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify FormKeyGenerator::willDeleteForm
https://bugs.webkit.org/show_bug.cgi?id=117751

Reviewed by Antti Koivisto.

Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac

* html/FormController.cpp:
(WebCore::FormKeyGenerator::willDeleteForm):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not all subtitle tracks are SDH
https://bugs.webkit.org/show_bug.cgi?id=117738

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, existing tests updated.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::isSDH): New.

* html/track/InbandTextTrack.h: Add isSDH override.
* html/track/TextTrack.h:

* page/CaptionUserPreferencesMac.mm:
(WebCore::trackDisplayName): Only add "SDH" label if a track claims to be SDH.

* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::isSDH): New.

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::isSDH): Return true if track has both "transcribes
    spoken dialog for accessibility" and "describes music and sound for accessibility"
    characteristics.

LayoutTests:

* media/video-controls-captions-trackmenu-localized.html:
* media/video-controls-captions-trackmenu-sorted.html:
* platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
* platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused bool argument from ReplacementFragment's constructor
https://bugs.webkit.org/show_bug.cgi?id=117752

Reviewed by Antti Koivisto.

Merge https://chromium.googlesource.com/chromium/blink/+/265586d9f154a9dff657511d09926429b8e1b53d.

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplaceSelectionCommand::doApply):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose a getMediaType method in WebKit
https://bugs.webkit.org/show_bug.cgi?id=117667

Patch by Ruth Fong <ruth_fong@apple.com> on 2013-06-18
Reviewed by Brady Eidson.

Source/WebCore: 

* WebCore.exp.in: Updated to add a symbol for 
HitTestResult::mediaIsVideo method
and alphabetize the list of exposed methods.

Source/WebKit2: 

* GNUmakefile.list.am:
* Target.pri:
Updated to include the added header file InjectedBundleHitTestResultMediaType.h
        
* UIProcess/API/C/WKAPICast.h:
(WebKit::toBundleHitTestResultMediaType):
(WebKit::toAPI):
Added methods to convert between BundleHitTestResultMediaType
and WKBundleHitTestResultMediaType.

* WebKit2.xcodeproj/project.pbxproj: Updated to include
InjectedBundleHitTestResultMediaType.h in the WebKit2 project.

* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultGetMediaType): Exposes the method getMediaType and
hooks into InjectedBundleHitTestResult::getMediaType.

* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:

* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::getMediaType): Added to return 
what type, if any, a media element is.

* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:

* WebProcess/InjectedBundle/InjectedBundleHitTestResultMediaType.h: Added
to contain new BundleHitTestResultMediaType enums.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
sandbox violation when Flash runs for the first time
https://bugs.webkit.org/show_bug.cgi?id=117753
<rdar://problem/14165466>

Patch by Simon Cooper <scooper@apple.com> on 2013-06-18
Reviewed by Alexey Proskuryakov.

Allow flash to try and change the ownership of directories it has just created.

* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make it possible to set a minimum height for auto-layout
https://bugs.webkit.org/show_bug.cgi?id=117758
<rdar://problem/12849080>

Reviewed by Tim Horton.

Change a bunch of minimumLayoutWidth declarations to minimumLayoutSize and add a new minimumLayoutSize property.
If minimumLayoutSize.height is greater than zero, use it to set the minimum layout size on the frame view.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setIntrinsicContentSize:]):
(-[WKView minimumLayoutWidth]):
(-[WKView setMinimumLayoutWidth:]):
(-[WKView minimumWidthForAutoLayout]):
(-[WKView setMinimumWidthForAutoLayout:]):
(-[WKView minimumSizeForAutoLayout]):
(-[WKView setMinimumSizeForAutoLayout:]):
* UIProcess/API/mac/WKViewPrivate.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::minimumLayoutSizeDidChange):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setMinimumLayoutSize):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::minimumLayoutSize):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setMinimumLayoutSize):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::minimumLayoutSize):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
widthMediaFeatureEval ends up with null FrameView during iframe unload.
https://bugs.webkit.org/show_bug.cgi?id=117754

Patch by Zalan Bujtas <zalan@apple.com> on 2013-06-18
Reviewed by Geoffrey Garen.

Ensure that MediaQueryEvaluator checks against NULL FrameView.

While frames are being unloaded, the Frame object does not necessarily have valid
FrameView anymore. Layout on the main frame can end up querying media values on such child
frames, while detaching.

Source/WebCore:

Test: fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery.html

* css/MediaQueryEvaluator.cpp:
(WebCore::orientationMediaFeatureEval):
(WebCore::aspect_ratioMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):
(WebCore::MediaQueryEvaluator::eval):

LayoutTests:

* fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery-expected.txt: Added.
* fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery.html: Added.
* fast/frames/resources/child-iframe-forces-parent-layout-on-unload.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Remove lineOverflowsFromShapeInside boolean from RenderBlock::layoutRunsAndFloatsInRange function
https://bugs.webkit.org/show_bug.cgi?id=117757

Reviewed by David Hyatt.

We don't need keep lineOverflowsFromShapeInside boolean in RenderBlock::layoutRunsAndFloatsInRange and in its
helpers because it's easy to decide whether we are in an shape content overflow state or not, so I got rid of
lineOverflowsFromShapeInside's occurences and updated the affected functions.

Covered by existing overflow tests in fast/exclusions/shape-inside and fast/regions/shape-inside.

* rendering/RenderBlock.h: Update helper's definition.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox): Add condition when overflow is already positioned.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Remove lineOverflowsFromShapeInside.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):  Remove lineOverflowsFromShapeInside.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):  Remove lineOverflowsFromShapeInside.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Infrequent uncaught exception with debugger popovers breaks inspector
https://bugs.webkit.org/show_bug.cgi?id=117755

Create the ZERO_SIZE and ZERO_RECT objects after we've setup the Size
and Rect prototypes, so they get the expected methods. We then need to
handle the ZERO_RECT case better, and not attempt to draw a background
in a canvas with a 0 size, which would produce an exception.

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-06-18
Reviewed by Timothy Hatcher.

* UserInterface/Geometry.js:
* UserInterface/Popover.js:
(WebInspector.Popover.prototype._update):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline after system update

Unreviewed.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-06-18

* http/tests/cache/partitioned-cache-expected.txt:
* http/tests/cache/partitioned-cache-iframe-expected.txt:
System fix, the tests pass.


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