Whitespace in particular source code changes rendering; does not in Firefox
https://bugs.webkit.org/show_bug.cgi?id=100943

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-04-09
Reviewed by Darin Adler.

Source/WebCore:

A render inline which requires a line box is considered a possible
trailing object. So, ensureLineBoxInsideIgnoredSpaces will be called
for it, even if it is placed after a text render ending with a single
space.

Tests: fast/text/whitespace/trailing-space-before-empty-span-1.html
       fast/text/whitespace/trailing-space-before-empty-span-2.html

* rendering/RenderBlockLineLayout.cpp:
(TrailingObjects):
(WebCore::TrailingObjects::appendBoxIfNeeded):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/text/whitespace/trailing-space-before-empty-span-1-expected.html: Added.
* fast/text/whitespace/trailing-space-before-empty-span-1.html: A test
    with a span whose text ends with a single span. A following span
    is empty but requires a line box (because it has some padding).
    The second span should be rendered.
* fast/text/whitespace/trailing-space-before-empty-span-2-expected.html: Added.
* fast/text/whitespace/trailing-space-before-empty-span-2.html: Same
    test as trailing-space-before-empty-span-1.html except that second
    span contains whitespace only text.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add webp to supported image mime types if WEBP feature is enabled/used
https://bugs.webkit.org/show_bug.cgi?id=112819

Patch by Jeff Rogers <jrogers@rim.com> on 2013-04-09
Reviewed by Darin Adler.

Add WebP to list of supported image types in MIMETypeRegistry if enabled.

No new tests: WebP image decoding already covered by exisiting tests.

* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Throttle resize events during live window resize.
<http://webkit.org/b/114292>
<rdar://problem/13411454>

Reviewed by Geoffrey Garen.

Limit resize events to one at max every 0.2 seconds during live window resize.
This mitigates heavy CPU usage during resize on pages with complex onresize handlers.
If there's a pending resize event when the live resize ends, it fires immediately.

* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEvent):

    Factored out dispatch of the resize event after layout so we can call it on a timer
    instead of immediately while live window resize is active.

(WebCore::FrameView::FrameView):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::delayedResizeEventTimerFired):
(WebCore::FrameView::willEndLiveResize):
(WebCore::FrameView::scheduleResizeEvent):
* page/FrameView.h:
* platform/ScrollableArea.h:

    Made willStartLiveResize() and willEndLiveResize() virtual so we can override
    them on FrameView.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the WebKit copy of GLU and the file using it
https://bugs.webkit.org/show_bug.cgi?id=114249

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-09
Reviewed by Darin Adler.

Source/ThirdParty: 

* glu/.gitignore: Removed.
* glu/LICENSE.txt: Removed.
* glu/README.webkit: Removed.
* glu/glu.gyp: Removed.
* glu/gluos.h: Removed.
* glu/internal_glu.h: Removed.
* glu/libtess/GNUmakefile: Removed.
* glu/libtess/Imakefile: Removed.
* glu/libtess/README: Removed.
* glu/libtess/alg-outline: Removed.
* glu/libtess/dict-list.h: Removed.
* glu/libtess/dict.c: Removed.
* glu/libtess/dict.h: Removed.
* glu/libtess/geom.c: Removed.
* glu/libtess/geom.h: Removed.
* glu/libtess/memalloc.c: Removed.
* glu/libtess/memalloc.h: Removed.
* glu/libtess/mesh.c: Removed.
* glu/libtess/mesh.h: Removed.
* glu/libtess/normal.c: Removed.
* glu/libtess/normal.h: Removed.
* glu/libtess/priorityq-heap.c: Removed.
* glu/libtess/priorityq-heap.h: Removed.
* glu/libtess/priorityq-sort.h: Removed.
* glu/libtess/priorityq.c: Removed.
* glu/libtess/priorityq.h: Removed.
* glu/libtess/render.c: Removed.
* glu/libtess/render.h: Removed.
* glu/libtess/sweep.c: Removed.
* glu/libtess/sweep.h: Removed.
* glu/libtess/tess.c: Removed.
* glu/libtess/tess.h: Removed.
* glu/libtess/tessmono.c: Removed.
* glu/libtess/tessmono.h: Removed.

Source/WebCore: 

* platform/graphics/gpu/LoopBlinnPathProcessor.cpp: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: The bounding paths should be made available through accessibility
https://bugs.webkit.org/show_bug.cgi?id=113817

Reviewed by David Kilzer.

Source/WebCore: 

This allows bounding paths to be returned for some web elements (image map areas and SVG shapes).
This provides more accuracy when assistive technologies highlight elements.
The Mac and iOS platforms share some code to help transform paths to their screen coordinates.

Tests: platform/iphone-simulator/accessibility/element-paths.html
       platform/mac/accessibility/element-paths.html

* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
(WebCore):
(WebCore::AccessibilityImageMapLink::elementPath):
(WebCore::AccessibilityImageMapLink::elementRect):
* accessibility/AccessibilityImageMapLink.h:
(AccessibilityImageMapLink):
(WebCore::AccessibilityImageMapLink::supportsPath):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::elementPath):
(WebCore::AccessibilityObject::supportsPath):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore):
(WebCore::AccessibilityRenderObject::supportsPath):
(WebCore::AccessibilityRenderObject::elementPath):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityPath]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
(-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
(-[WebAccessibilityObjectWrapper accessibilityFrame]):
(-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
(WebCore):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(PathConversionInfo):
(ConvertPathToScreenSpaceFunction):
(-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
(-[WebAccessibilityObjectWrapperBase convertPointToScreenSpace:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(WebTransformCGPathToNSBezierPath):
(-[WebAccessibilityObjectWrapper bezierPathFromPath:]):
(-[WebAccessibilityObjectWrapper path]):
(-[WebAccessibilityObjectWrapper position]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools: 

Add a pathDescription property for testing so that it's possible
to verify that a path is being returned correctly.

* DumpRenderTree/AccessibilityUIElement.cpp:
(getPathDescriptionCallback):
(AccessibilityUIElement::pathDescription):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(_CGPathEnumerationIteration):
(AccessibilityUIElement::pathDescription):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::pathDescription):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::pathDescription):
(WTR):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::pathDescription):
(WTR):

LayoutTests: 

Add new tests for Mac and iOS to verify that path output works.
Modify existing tests to indicate that there is a new AXAttribute, AXPath.

* platform/iphone-simulator/accessibility/element-paths-expected.txt: Added.
* platform/iphone-simulator/accessibility/element-paths.html: Added.
* platform/mac/accessibility/document-links-expected.txt:
* platform/mac/accessibility/element-paths-expected.txt: Added.
* platform/mac/accessibility/element-paths.html: Added.
* platform/mac/accessibility/image-map2-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] IconDatabase images should be decoded in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=112524
<rdar://problem/10133914>

Reviewed by Oliver Hunt.

In the interests of keeping decoding of data coming in from the greater Internet
in the WebProcess, move decoding of favicons from the UIProcess to the WebProcess.

* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::setIconBitmapForIconURL):
Receive a ShareableBitmap handle from the WebProcess instead of a DataReference.
Use the new setIconBitmapForIconURL IconDatabase method.

* UIProcess/WebIconDatabase.h:
(WebIconDatabase):
Rename setIconDataForIconURL to setIconBitmapForIconURL.

* UIProcess/WebIconDatabase.messages.in: Ditto.

* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
In the WebProcess, decode the incoming icon and draw it into a ShareableBitmap.

No testable behavior change.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::updateIconRecord):
Added updateIconRecord, which factors most of setIconDataForIconURL out so it can
be shared with setIconBitmapForIconURL. This function will set either a bitmap or
raw image data for the given icon URL.

(WebCore::IconDatabase::setIconBitmapForIconURL):
Added; make a copy of the bitmap for thread-safety purposes, and call updateIconRecord.

(WebCore::IconDatabase::setIconDataForIconURL):
Factored out of what is now updateIconRecord.

* loader/icon/IconDatabase.h:
(IconDatabase): Add setIconBitmapForIconURL and updateIconRecord.

* loader/icon/IconDatabaseBase.h:
(WebCore::IconDatabaseBase::setIconBitmapForIconURL): Added.
* loader/icon/IconRecord.cpp:
(WebCore::IconRecord::setImage): Set the image for an icon record directly (as opposed
to setting the image data, which causes the image to be decoded in the WebProcess).
* loader/icon/IconRecord.h:
(IconRecord): Add setImage.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[webkitpy] Remove chromium deprecated port support.
https://bugs.webkit.org/show_bug.cgi?id=114228

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port): Removed chromium ports from port name to port class mapping.
(ChromiumPort): Removed.
(ChromiumAndroidPort): Removed.
(ChromiumXVFBPort): Removed.
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_chromium_port): Removed.
(DeprecatedPortTest.test_chromium_android_port): Removed.
(DeprecatedPortTest.test_chromium_xvfb_port): Removed.
* Scripts/webkitpy/tool/steps/update_unittest.py:
(UpdateTest.test_update_command_non_interactive): Use mac instead of chromium ports.
(UpdateTest.test_update_command_interactive): Use mac instead of chromium ports.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly
https://bugs.webkit.org/show_bug.cgi?id=114235

Reviewed by Geoffrey Garen.

Due to the way that numCacheableSlots is currently calculated, checking an object's prototype for enumerable 
properties causes us not to cache any properties at all. We should only cache properties on the object itself
since we currently don't take advantage of any sort of name caching for properties in the prototype chain.
This fix undoes a ~2% SunSpider regression caused by http://trac.webkit.org/changeset/147570.

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnNonIndexPropertyNames):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't create another plugin process for restarted plugins
https://bugs.webkit.org/show_bug.cgi?id=114233

Reviewed by Geoff Garen.

A snapshotting plugin starts in a separate process from
regular plugins. This can be a little confusing to users
because they might see two plugin processes. We can set
the minimum life and timeout on the snapshotting process
to much smaller values, since the process doesn't need
to live that long. This will reduce some potential
confusion. Also, since there is another plugin process
running real plugins, it should be paged in if it needs
to restart.

There was, however, a bug in the process management. A
restarted plugin received a special PluginProcess::Type,
so that it could cross fade into the page nicely. This
caused it to start a *third* plugin process. Instead
mark a restarted flag directly on the PluginProxy and
revert back to two process types.

* PluginProcess/PluginProcess.h: Remove TypeRestartedProcess.

* UIProcess/Plugins/PluginProcessProxy.cpp: Add two new
    timeout values for snapshotting processes.
(WebKit::PluginProcessProxy::didFinishLaunching): Chose which
    of the timeout pairs to use.

* WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
(WebKit::PluginProxy::pluginLayer): Don't look at the process type, instead
    look at the process flag to see if we are restarted.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create): Copy the new flag into constructor.
(WebKit::PluginProxy::PluginProxy): Remember the flag.
* WebProcess/Plugins/PluginProxy.h: Add a new m_restartedProcess flag.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin): When we are creating the proxy, separate
    the concept of snapshotting and restarting.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Bounding paths should be made available through accessibility
https://bugs.webkit.org/show_bug.cgi?id=113817

Reviewed by Tim Horton.

Minor fix from review feedback.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mark mouse-events-scaled-iframe.html as flaky

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-09

* platform/mac-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Main page is rendered at wrong large scale after back from any zooming article at read.thestar.com
https://bugs.webkit.org/show_bug.cgi?id=114296

Patch by Jacky Jiang  <zhajiang@rim.com>.
Reviewed by Rob Buis.

PR: 308655
We were relying on the load state Committed to reset m_userPerformedManualZoom
and m_userPerformedManualScroll; however, the main resources of the
articles on read.thestar.com were preloaded and the WebPage didn't get
any load state change callbacks when going back to the main page from
the articles. Therefore, m_userPerformedManualZoom had never been reset
in this case and we picked up the wrong scale when restoring the main page.
Rset m_userPerformedManualScroll and m_userPerformedManualScroll when
we are going back or forward.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::goBackOrForward):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Bounding paths should be made available through accessibility
https://bugs.webkit.org/show_bug.cgi?id=113817

Unreviewed build fix.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(WebTransformCGPathToNSBezierPath):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
If we fail to decode a message name, pass the message length as the name
https://bugs.webkit.org/show_bug.cgi?id=114305
<rdar://problem/13605703>

Reviewed by Sam Weinig.

* Platform/CoreIPC/ArgumentDecoder.h:
(CoreIPC::ArgumentDecoder::length):
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::processIncomingMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Bounding paths should be made available through accessibility
https://bugs.webkit.org/show_bug.cgi?id=113817

Unreviewed build fix (again).

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LLInt conditional branch compilation fault on MIPS.
https://bugs.webkit.org/show_bug.cgi?id=114264

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-04-09
Reviewed by Filip Pizlo.

Fix conditional branch compilation in LLInt offlineasm.

* offlineasm/mips.rb:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Kill old processes between runs on WinEWS bots.
Temporarily disable tests to let bots catch up again.

* EWSTools/start-queue-win.sh:
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
window.internals.repaintRectsAsText() is hard to use because it doesn't force layout
https://bugs.webkit.org/show_bug.cgi?id=114219

Reviewed by Beth Dakin.

Force layout when setTracksRepaints() is set to true, to flush out any pending
repaints from a layout that hasn't happened yet. Also force layout in
trackedRepaintRectsAsText(), so that any pending layout happpens and thus
repaints.

* page/FrameView.cpp:
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::trackedRepaintRectsAsText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Repaint rect too small on elements with shadows
https://bugs.webkit.org/show_bug.cgi?id=114225

Source/WebCore:

Reviewed by Dain Adler.

We assumed that shadows (box-shadow, text-shadow, svg shadows)
only required inflating the repaint rect by the blur radius of
the shadow. However, this is incorrect; the shadow can extend
further, which resulted in clipped or incorrectly invalidated
shadows.

Fix by disambiguating the blur radius (which is 2x the standard
deviation of the Gaussian distribution used to generate the blur),
from the painting extent, which is how far the shadow visually
projects. Using a 1.4 multiplier of the blur radius is a good
approximation for the painting extent.

Renamed ShadowData::blur() to ShadowData::radius(), and added
ShadowData::paintingExtent(). Use the latter in all places
which relate to invalidation.

Test: fast/box-shadow/shadow-repaint.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForShadow):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontAttributesForSelectionStart):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::applyShadowToGraphicsContext):
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderBoxModelObject.cpp:
(WebCore::applyBoxShadowForBackground):
(WebCore::areaCastingShadowInHole):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getShadowExtent):
(WebCore::RenderStyle::getShadowInsetExtent):
(WebCore::RenderStyle::getShadowHorizontalExtent):
(WebCore::RenderStyle::getShadowVerticalExtent):
* rendering/style/ShadowData.cpp:
(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::operator==):
(WebCore::calculateShadowExtent):
* rendering/style/ShadowData.h:
(WebCore::ShadowData::ShadowData):
(WebCore::ShadowData::radius):
(WebCore::ShadowData::paintingExtent):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

LayoutTests:

Reviewed by Darin Alder.

New test for invalidation with box-shadow. Update test results affected
by shadow extent.

* compositing/geometry/foreground-layer-expected.txt:
* compositing/iframes/composited-parent-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* compositing/iframes/connect-compositing-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe2-expected.txt:
* compositing/iframes/connect-compositing-iframe3-expected.txt:
* compositing/iframes/enter-compositing-iframe-expected.txt:
* compositing/iframes/iframe-resize-expected.txt:
* compositing/iframes/invisible-nested-iframe-show-expected.txt:
* compositing/iframes/overlapped-iframe-expected.txt:
* compositing/iframes/page-cache-layer-tree-expected.txt:
* compositing/iframes/scrolling-iframe-expected.txt:
* compositing/visible-rect/iframe-and-layers-expected.txt:
* fast/box-shadow/shadow-repaint-expected.txt: Added.
* fast/box-shadow/shadow-repaint.html: Added.
* platform/mac/fast/multicol/shadow-breaking-expected.png:
* platform/mac/fast/multicol/shadow-breaking-expected.txt:
* platform/mac/fast/repaint/moving-shadow-on-container-expected.txt:
* platform/mac/fast/repaint/moving-shadow-on-path-expected.png:
* platform/mac/fast/repaint/moving-shadow-on-path-expected.txt:
* platform/mac/svg/css/arrow-with-shadow-expected.png:
* platform/mac/svg/css/circle-in-mask-with-shadow-expected.png:
* platform/mac/svg/css/clippath-with-shadow-expected.png:
* platform/mac/svg/css/composite-shadow-example-expected.png:
* platform/mac/svg/css/composite-shadow-example-expected.txt:
* platform/mac/svg/css/composite-shadow-text-expected.txt:
* platform/mac/svg/css/composite-shadow-with-opacity-expected.png:
* platform/mac/svg/css/composite-shadow-with-opacity-expected.txt:
* platform/mac/svg/css/group-with-shadow-expected.png:
* platform/mac/svg/css/group-with-shadow-expected.txt:
* platform/mac/svg/css/mask-with-shadow-expected.png:
* platform/mac/svg/css/path-with-shadow-expected.png:
* platform/mac/svg/css/path-with-shadow-expected.txt:
* platform/mac/svg/css/shadow-and-opacity-expected.png:
* platform/mac/svg/css/shadow-and-opacity-expected.txt:
* platform/mac/svg/css/shadow-changes-expected.png:
* platform/mac/svg/css/shadow-changes-expected.txt:
* platform/mac/svg/css/shadow-with-large-radius-expected.png:
* platform/mac/svg/css/shadow-with-negative-offset-expected.png:
* platform/mac/svg/css/stars-with-shadow-expected.png:
* platform/mac/svg/css/stars-with-shadow-expected.txt:
* platform/mac/svg/css/text-gradient-shadow-expected.png:
* platform/mac/svg/css/text-gradient-shadow-expected.txt:
* platform/mac/svg/css/text-shadow-multiple-expected.png:
* platform/mac/svg/custom/repaint-shadow-expected.png:
* platform/mac/svg/custom/transform-with-shadow-and-gradient-expected.txt:
* svg/css/arrow-with-shadow-expected.txt:
* svg/css/circle-in-mask-with-shadow-expected.txt:
* svg/css/clippath-with-shadow-expected.txt:
* svg/css/mask-with-shadow-expected.txt:
* svg/css/shadow-with-large-radius-expected.txt:
* svg/css/shadow-with-negative-offset-expected.txt:
* svg/css/text-shadow-multiple-expected.txt:
* svg/custom/repaint-shadow-expected.txt:
* svg/filters/shadow-on-rect-with-filter-expected.txt:
* svg/repaint/repaint-webkit-svg-shadow-container-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] user caption styles not applied to correct element
https://bugs.webkit.org/show_bug.cgi?id=114230

Reviewed by Jer Noble.

Source/WebCore: 

Test: media/track/track-css-user-override.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive by clean-up so we don't log excessively.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
    new member variables.
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Set cue font size when it is
    inserted into the tree.
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Update the font size of 
    all active cues.
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Set size-relative CSS properties
    after a time because this can be called during layout.
* html/shadow/MediaControlElements.h:

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged before updateSizes.

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setFontSize): New, set the cue's font size.
* html/track/TextTrackCue.h:

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set cue properties on the cue element
    instead of on the cue box to match what we do for the "cue" pseudo element.
(WebCore::TextTrackCueGeneric::setFontSize): New, set the cue's font size.
* html/track/TextTrackCueGeneric.h:

* html/track/TextTrackList.cpp:
(TextTrackList::remove): Drive-by cleanup, don't ASSERT when the media element is NULL.

* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride): New, allow user CSS overrides
    to be tested in DRT.
(WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): New, generate a user style
    sheet override. Moved here from CaptionUserPreferencesMac.
* page/CaptionUserPreferences.h:

* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Don't ignore background color importance.
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Implement even when we don't 
    have the media accessibility framework so this can be tested in DRT. Apply all cue properties
    to the element used for the "cue" pseudo element.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress): Drive-by cleanup, remove logging
    because this method is called so frequently and the logging is not especially useful.
(WebCore::MediaPlayerPrivateAVFoundation::updateStates): Only log when the ready/network
    state changes because this method is called so frequently.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): Drive-by cleanup, remove logging
    because this method is called so frequently and the logging is not especially useful.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Make the logging more useful.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState): Reset captions style sheet override.
(WebCore::Internals::captionsStyleSheetOverride): New, return the captions style sheet override.
(WebCore::Internals::setCaptionsStyleSheetOverride): New, override the captions style sheet override.
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests: 

* media/track/track-css-user-override-expected.txt: Added.
* media/track/track-css-user-override.html: Added.
* media/track/track-cue-container-rendering-position-expected.txt:
* media/track/track-cue-container-rendering-position.html:
* media/track/track-cue-rendering-expected.txt:
* media/track/track-cue-rendering.html: Font size is not applied instantly when a video element is
    resized, so check after a very short delay.


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