Replace tools32 folder with tools and update WebKit Windows solution accordingly.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-06-18  Roger Fong  <roger_fong@apple.com>
2
3         Replace tools32 folder with tools and update WebKit Windows solution accordingly.
4         <rdar://problem/14118143>.
5
6         Rubberstamped by Brent Fulgham.
7
8         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
9         * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props:
10         * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props:
11         * WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props:
12         * WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd:
13         * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props:
14         * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
15         * WebCore.vcxproj/WebCore.vcxproj:
16         * WebCore.vcxproj/WebCoreDebug.props:
17         * WebCore.vcxproj/WebCoreDebugWinCairo.props:
18         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
19         * WebCore.vcxproj/WebCoreGeneratedDebug.props:
20         * WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props:
21         * WebCore.vcxproj/WebCoreGeneratedProduction.props:
22         * WebCore.vcxproj/WebCoreGeneratedRelease.props:
23         * WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props:
24         * WebCore.vcxproj/WebCoreProduction.props:
25         * WebCore.vcxproj/WebCoreRelease.props:
26         * WebCore.vcxproj/WebCoreReleaseWinCairo.props:
27         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
28         * WebCore.vcxproj/build-generated-files.sh:
29
30 2013-06-18  Zoltan Horvath  <zoltan@webkit.org>
31
32         [CSS Shapes] Remove lineOverflowsFromShapeInside boolean from RenderBlock::layoutRunsAndFloatsInRange function
33         https://bugs.webkit.org/show_bug.cgi?id=117757
34
35         Reviewed by David Hyatt.
36
37         We don't need keep lineOverflowsFromShapeInside boolean in RenderBlock::layoutRunsAndFloatsInRange and in its
38         helpers because it's easy to decide whether we are in an shape content overflow state or not, so I got rid of
39         lineOverflowsFromShapeInside's occurences and updated the affected functions.
40
41         Covered by existing overflow tests in fast/exclusions/shape-inside and fast/regions/shape-inside.
42
43         * rendering/RenderBlock.h: Update helper's definition.
44         * rendering/RenderBlockLineLayout.cpp:
45         (WebCore::pushShapeContentOverflowBelowTheContentBox): Add condition when overflow is already positioned.
46         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Remove lineOverflowsFromShapeInside.
47         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):  Remove lineOverflowsFromShapeInside.
48         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):  Remove lineOverflowsFromShapeInside.
49
50 2013-06-18  Zalan Bujtas  <zalan@apple.com>
51
52         widthMediaFeatureEval ends up with null FrameView during iframe unload.
53         https://bugs.webkit.org/show_bug.cgi?id=117754
54
55         Reviewed by Geoffrey Garen.
56
57         Ensure that MediaQueryEvaluator checks against NULL FrameView.
58
59         While frames are being unloaded, the Frame object does not necessarily have valid
60         FrameView anymore. Layout on the main frame can end up querying media values on such child
61         frames, while detaching.
62
63         Test: fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery.html
64
65         * css/MediaQueryEvaluator.cpp:
66         (WebCore::orientationMediaFeatureEval):
67         (WebCore::aspect_ratioMediaFeatureEval):
68         (WebCore::evalResolution):
69         (WebCore::heightMediaFeatureEval):
70         (WebCore::widthMediaFeatureEval):
71         (WebCore::MediaQueryEvaluator::eval):
72
73 2013-06-18  Ruth Fong  <ruth_fong@apple.com>
74
75         Expose a getMediaType method in WebKit
76         https://bugs.webkit.org/show_bug.cgi?id=117667
77
78         Reviewed by Brady Eidson.
79
80         * WebCore.exp.in: Updated to add a symbol for 
81         HitTestResult::mediaIsVideo method
82         and alphabetize the list of exposed methods.
83
84 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
85
86         Remove unused bool argument from ReplacementFragment's constructor
87         https://bugs.webkit.org/show_bug.cgi?id=117752
88
89         Reviewed by Antti Koivisto.
90
91         Merge https://chromium.googlesource.com/chromium/blink/+/265586d9f154a9dff657511d09926429b8e1b53d.
92
93         * editing/ReplaceSelectionCommand.cpp:
94         (WebCore::ReplacementFragment::ReplacementFragment):
95         (WebCore::ReplaceSelectionCommand::doApply):
96
97 2013-06-18  Eric Carlson  <eric.carlson@apple.com>
98
99         Not all subtitle tracks are SDH
100         https://bugs.webkit.org/show_bug.cgi?id=117738
101
102         Reviewed by Dean Jackson.
103
104         No new tests, existing tests updated.
105
106         * html/track/InbandTextTrack.cpp:
107         (WebCore::InbandTextTrack::isSDH): New.
108
109         * html/track/InbandTextTrack.h: Add isSDH override.
110         * html/track/TextTrack.h:
111
112         * page/CaptionUserPreferencesMac.mm:
113         (WebCore::trackDisplayName): Only add "SDH" label if a track claims to be SDH.
114
115         * platform/graphics/InbandTextTrackPrivate.h:
116         (WebCore::InbandTextTrackPrivate::isSDH): New.
117
118         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
119         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
120         (WebCore::InbandTextTrackPrivateAVFObjC::isSDH): Return true if track has both "transcribes
121             spoken dialog for accessibility" and "describes music and sound for accessibility" 
122             characteristics.
123
124 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
125
126         Simplify FormKeyGenerator::willDeleteForm
127         https://bugs.webkit.org/show_bug.cgi?id=117751
128
129         Reviewed by Antti Koivisto.
130
131         Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac
132
133         * html/FormController.cpp:
134         (WebCore::FormKeyGenerator::willDeleteForm):
135
136 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
137
138         REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
139         https://bugs.webkit.org/show_bug.cgi?id=117747
140
141         Reviewed by Kent Tamura.
142
143         Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28
144
145         r147612 added setNeedsLayout(true, MarkOnlyThis) for
146         TextControlInnerTextElement renderer. It's ok for input[type=text]
147         because RenderTextControlSingleLine also has needsLayout flag, and it
148         has only the inner text renderer as a child.
149
150         As for input[type=search], it doesn't work. Renderer structure for
151         input[type=search] is:
152
153         RenderTextControlSingleLine
154         └Renderer for TextControlInnerContainer
155           └Renderer for TextControlInnerElement
156             └Renderer for TextControlInnerTextElement
157
158         After r147612, there is a case that only RenderTextControlSingleLine
159         and TextControlInnerTextElement renderer have needsLayout flag, and
160         others don't.  It won't trigger layout for
161         TextControlInnerTextElement renderer.
162
163         We should set needsLayout flags of TextControlInnerContainer renderer
164         and TextControlInnerElement renderer by MarkContainingBlockChain.
165
166         Manual Tests: search-select-all-with-focus-style.html
167         (I tried but couldn't make a test that works in DRT)
168
169         * rendering/RenderTextControlSingleLine.cpp:
170         (WebCore::RenderTextControlSingleLine::styleDidChange):
171
172 2013-06-18  Dean Jackson  <dino@apple.com>
173
174         Attempted build fix for non-Mac.
175
176         * platform/graphics/SimpleFontData.cpp:
177         (WebCore::SimpleFontData::nonSyntheticItalicFontData):
178
179 2013-06-18  Dean Jackson  <dino@apple.com>
180
181         Synthesized vertical italics on rotated glyphs are transformed incorrectly
182         https://bugs.webkit.org/show_bug.cgi?id=117726
183
184         Reviewed by Enrica Casucci.
185
186         If a font does not have italic glyphs, and is in a vertical flow, then
187         the synthesis of italics was skewing in the wrong direction. While here,
188         ensure that no CJK text will get italics in vertical layout.
189
190         This is a topic under discussion in the CSS Working Group. The resolution
191         at the June 2013 face-to-face was that:
192         - italics in Japanese (and Chinese) text are rare in vertical layout
193         - most people wanted Latin text to italicize in the direction of the line flow
194
195         The final behaviour was left undefined, but we consider the change here
196         to be sufficient for now. In all cases, the best solution is to avoid
197         synthesized italics by specifying a font that includes such forms.
198
199         Tests: fast/text/international/synthesized-italic-vertical-latin.html
200                fast/text/international/synthesized-italic-vertical.html
201
202         * platform/graphics/FontGlyphs.cpp:
203         (WebCore::glyphDataAndPageForCJKCharacterWithoutSyntheticItalic): New function
204             that makes a new glyph data pair that is marked as NOT using a synthesized italic.
205         (WebCore::FontGlyphs::glyphDataAndPageForCharacter): If this is a CJK character and
206             has a synthesized oblique, then run it through the function above to make a new glyph data pair.
207         * platform/graphics/SimpleFontData.cpp:
208         (WebCore::SimpleFontData::nonSyntheticItalicFontData): Creates/returns a new SimpleFontData that will
209             not synthesize italics.
210         * platform/graphics/SimpleFontData.h: New method nonSyntheticItalicFontData.
211         * platform/graphics/mac/FontMac.mm:
212         (WebCore::Font::drawGlyphs): This is the actual bug fix. If you are in a vertical flow, the
213             skew direction should be downwards, not leftwards.
214
215 2013-06-18  Commit Queue  <commit-queue@webkit.org>
216
217         Unreviewed, rolling out r151549.
218         http://trac.webkit.org/changeset/151549
219         https://bugs.webkit.org/show_bug.cgi?id=117741
220
221         broke selection in the web inspector source after scrolling
222         (Requested by smfr on #webkit).
223
224         * rendering/RenderBox.cpp:
225         (WebCore::RenderBox::computeRectForRepaint):
226         * rendering/RenderLayerModelObject.cpp:
227         * rendering/RenderLayerModelObject.h:
228
229 2013-06-18  Santosh Mahto  <santosh.ma@samsung.com>
230
231         <video> element delays document load event for ~ 3 seconds
232         https://bugs.webkit.org/show_bug.cgi?id=90272
233
234         Reviewed by Eric Carlson.
235
236         Test: media/media-preload-no-delay-loadevent.html
237
238         * html/HTMLMediaElement.cpp:
239         (WebCore::HTMLMediaElement::prepareForLoad):
240         No need to delay document load event here  when preload="none"
241
242 2013-06-18  Diego Pino Garcia  <dpino@igalia.com>
243
244         [GTK] Remove comment about possibility of handling ObjCPolymorphic (it's used by ObjC bindings only)
245         https://bugs.webkit.org/show_bug.cgi?id=117546
246
247         Reviewed by Xan Lopez.
248
249         According to the WebKit IDL spec the modifier ObjCPolymorphic only
250         applies to the Objective-C bindings generator
251
252         * bindings/scripts/CodeGeneratorGObject.pm:
253         (IsPolymorphic): Remove comment. Search parameter 'type' in array, instead of
254         concatening a series of 'or' conditionals.
255
256 2013-06-18  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
257
258         Fix after r151673
259         https://bugs.webkit.org/show_bug.cgi?id=116042
260
261         Reviewed by Philippe Normand.
262
263         Removed a spurious semicolon in the video sink caps definition.
264
265         No new tests, no behavior change.
266
267         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
268
269 2013-06-18  Praveen R Jadhav  <praveen.j@samsung.com>
270
271         [WebSpeech] Speech Recognition requires convertValue support in JSDictionary
272         https://bugs.webkit.org/show_bug.cgi?id=117731
273
274         Reviewed by Christophe Dumez.
275
276         Build fails after enabling ENABLE_SCRIPTED_SPEECH feature. This patch
277         resolves the issue.
278
279         No new tests. No change in behaviour.
280
281         * bindings/js/JSDictionary.cpp:
282         (WebCore::JSDictionary::convertValue):
283         * bindings/js/JSDictionary.h:
284
285 2013-06-18  Mary Wu  <mary.wu@torchmobile.com.cn>
286
287         [BlackBerry] only notify download client when download error
288         https://bugs.webkit.org/show_bug.cgi?id=117687
289
290         Reviewed by Rob Buis.
291
292         When met network error in downloading, we notify the error to download
293         client through download stream, we shouldn't notify page client the error.
294         RIM JIRA 419985
295
296         * platform/network/blackberry/NetworkJob.cpp:
297         (WebCore::NetworkJob::shouldNotifyClientFailed):
298
299 2013-06-18  Mario Sanchez Prada  <mario.prada@samsung.com>
300
301         Shader compiler not properly configured for GLES on cairo based ports
302         https://bugs.webkit.org/show_bug.cgi?id=117705
303
304         Reviewed by Martin Robinson.
305
306         Configure the shader compiler with SH_ESSL_OUTPUT for GLESv2
307         compliant platforms, and with SH_GLSL_OUTPUT otherwise.
308
309         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
310         (WebCore::GraphicsContext3D::GraphicsContext3D):
311
312 2013-06-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
313
314         touching any idl rebuilds all derived sources
315         https://bugs.webkit.org/show_bug.cgi?id=117708
316
317         Reviewed by Kentaro Hara.
318
319         Fix preprocess-idls.pl script to update the following files only
320         if they have changed:
321         DerivedSources/WebCore/supplemental_dependency.tmp
322         DerivedSources/WebCore/DOMWindowConstructors.idl
323         DerivedSources/WebCore/WorkerContextConstructors.idl
324
325         This avoids triggering uselessly bindings generation for all IDL
326         files whenever an IDL file is touched.
327
328         No new tests, no behavior change.
329
330         * bindings/scripts/preprocess-idls.pl:
331         (WriteFileIfChanged):
332         (GeneratePartialInterface):
333
334 2013-06-18  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
335
336         [GStreamer] [texmap] upload a video buffer into the video texture
337         https://bugs.webkit.org/show_bug.cgi?id=116042
338
339         Reviewed by Philippe Normand.
340
341         This patch prepares more quickly the texture when the video frame is
342         already in the GPU memory.
343
344         It is done using a new buffer's metadata available in GStreamer 1.2,
345         and its purpose is to upload buffers into a OpenGL texture.
346
347         If the decoder provides buffers with this metadata, the buffer will be
348         uploaded into the texture used for the video display and it will be
349         rendered, avoiding a expensive mem copies. This is particularly useful
350         for Full HD videos, where all the processing and display will be done
351         in the GPU.
352
353         No new tests, covered by existing tests.
354
355         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
356         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
357         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
358         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
359         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
360         (webkitVideoSinkProposeAllocation):
361
362 2013-06-17  Peter Gal  <galpeter@inf.u-szeged.hu>
363
364         [curl] Set the http response status text
365         https://bugs.webkit.org/show_bug.cgi?id=117307
366
367         Reviewed by Brent Fulgham.
368
369         No new tests, covered by existing ones.
370
371         * platform/network/curl/ResourceHandleManager.cpp:
372         (WebCore::headerCallback):
373
374 2013-06-14  Brent Fulgham  <bfulgham@apple.com>
375
376         AX: Correct accessibility role when -webkit-box:display is used.
377         https://bugs.webkit.org/show_bug.cgi?id=117706
378
379         Reviewed by Chris Fleizach.
380
381         accessibility/box-styled-lists.html
382
383         * accessibility/AccessibilityRenderObject.cpp:
384         (WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
385         of the list element type, treat it as a ListItemRole accessibility role, regardless
386         of what specific renderer is being used.
387
388 2013-06-17  Roger Fong  <roger_fong@apple.com>
389
390         Add some UNUSED_PARAMs to RenderBlock.cpp so that it builds properly if CSS_EXCLUSIONS is disabled.
391         https://bugs.webkit.org/show_bug.cgi?id=117722.
392
393         Rubberstamped by Jon Lee.
394
395         * rendering/RenderBlock.cpp:
396         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
397         (WebCore::RenderBlock::logicalLeftOffsetForLine):
398         (WebCore::RenderBlock::logicalRightOffsetForLine):
399
400 2013-06-17  Beth Dakin  <bdakin@apple.com>
401
402         PageBanners appear over HTML5 video when media element is in full screen mode
403         https://bugs.webkit.org/show_bug.cgi?id=117721
404         -and corresponding-
405         <rdar://problem/13686998>
406
407         Reviewed by Sam Weinig.
408
409         Update the scrolling tree when a header/footer has been removed.
410         * rendering/RenderLayerCompositor.cpp:
411         (WebCore::RenderLayerCompositor::updateLayerForHeader):
412         (WebCore::RenderLayerCompositor::updateLayerForFooter):
413
414 2013-06-17  Roger Fong  <roger_fong@apple.com>
415
416         Modify Windows makefiles to copy some bin output into Program Files.
417         https://bugs.webkit.org/show_bug.cgi?id=117714.
418         <rdar://problem/14179054>
419
420         Reviewed by Brent Fulgham.
421
422         * WebCore.vcxproj/WebCore.make:
423
424 2013-06-17  Max Vujovic  <mvujovic@adobe.com>
425
426         Crash in loadPendingShaders
427         https://bugs.webkit.org/show_bug.cgi?id=117665
428
429         Reviewed by Dean Jackson.
430
431         Speculative fix because the crash reports do not contain a test case.
432
433         Rearrange the conditions to check m_state.hasPendingShaders() first. Additionally, check if
434         m_state.style() is non-null.
435
436         No new tests. We don't know how to reproduce this crash yet.
437
438         * css/StyleResolver.cpp:
439         (WebCore::StyleResolver::loadPendingShaders):
440
441 2013-06-17  Ruth Fong  <ruth_fong@apple.com>
442
443         REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
444         https://bugs.webkit.org/show_bug.cgi?id=20599
445
446         Add a "Download Video"/"Download Audio" context menu item to download media
447         elements.
448
449         Reviewed by Beth Dakin.
450
451         No new tests. media/context-menu-action.html,
452         which has been disabled by bug 116651, is used to test context menus.
453
454         * English.lproj/Localizable.strings: Updated to
455         include localizable strings for "Download Video" and "Download Audio".
456
457         * page/ContextMenuController.cpp: Updated to 
458         include and handle a "Download Video/Audio" context menu item.
459
460         * platform/ContextMenuItem.h:
461
462         * platform/LocalizedStrings.cpp: 
463         * platform/LocalizedStrings.h:
464         * platform/efl/LocalizedStringsEfl.cpp:
465         * platform/gtk/LocalizedStringsGtk.cpp:
466         * platform/qt/LocalizedStringsQt.cpp: 
467         Updated to include localizable strings for "Download Video" and "Download Audio".
468
469 2013-06-17  Zoltan Horvath  <zoltan@webkit.org>
470
471         [CSS Shapes] Consider bottom borders when calculating the position of the overflow
472         https://bugs.webkit.org/show_bug.cgi?id=117663
473
474         Reviewed by Alexandru Chiculita.
475
476         When you have a shape and the content overflows from the shape we need to push the overflow below the content box,
477         not below the border box. We didn't consider the bottom borders of the content box, now I fixed it too and the overflow
478         just starts after the content box. I added a new helper function called pushShapeContentOverflowBelowTheContentBox. Now
479         both the shape in flow thread and the shape overflow use the same function. I added a new test and modified the existing
480         tests to cover all the affected cases.
481
482         Test: fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
483         Existing overflow tests also modified to test the behavior:
484               fast/exclusions/shape-inside/shape-inside-empty-expected.html
485               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content-expected.html
486               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
487               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html
488               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html
489               fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html
490               fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
491
492         * rendering/RenderBlockLineLayout.cpp:
493         (WebCore::pushShapeContentOverflowBelowTheContentBox):
494         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine):
495         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
496
497 2013-06-17  Igor Oliveira  <igor.o@sisa.samsung.com>
498
499         [CSS Regions] ::before and ::after pseudo-elements are not displayed for regions
500         https://bugs.webkit.org/show_bug.cgi?id=80163
501
502         When the implementation of the before/after was moved to the DOM, before/after generated
503         content stoppped to work with css regions. The problem happens when:
504         1. RenderRegion can not have children and when the PseudoElement::attach tries to create a renderer for the
505         generated content, it fails.
506         2. RenderRegion::canHaveGeneratedChildren should not be false because regions can have generated content.
507
508         Reviewed by David Hyatt.
509
510         Tests: fast/regions/region-dynamic-after-before.html
511                fast/regions/region-generated-content-before-after.html
512
513         * dom/NodeRenderingContext.cpp:
514         (WebCore::NodeRenderingContext::shouldCreateRenderer):
515         * rendering/RenderRegion.h:
516
517 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
518
519         [Mac] Remove unmaintained GStreamer specific video code.
520         https://bugs.webkit.org/show_bug.cgi?id=117694
521
522         Reviewed by Philippe Normand.
523
524         No new tests, no behaviour change.
525
526         * platform/mac/WebVideoFullscreenController.mm:
527         (-[WebVideoFullscreenController setupVideoOverlay:]):
528         (-[WebVideoFullscreenController windowDidLoad]):
529         (-[WebVideoFullscreenController setMediaElement:]):
530         (-[WebVideoFullscreenController windowDidExitFullscreen]):
531
532 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
533
534         [Qt] Remove Qt specific QTKIT flagged code.
535         https://bugs.webkit.org/show_bug.cgi?id=117635
536
537         Reviewed by Simon Hausmann.
538
539         Due to disabling QTKIT for Qt in r151546, the
540         code the flags that are not taken into account
541         anymore and the code that has been rendered
542         unreachable by this are removed.
543
544         No new tests, no behavioural change.
545
546         * Target.pri:
547         * WebCore.exp.in:
548         * page/Settings.cpp:
549         * page/Settings.h:
550         * platform/KURL.h:
551         * platform/SharedBuffer.h:
552         * platform/cf/KURLCFNet.cpp:
553         (WebCore::KURL::fileSystemPath):
554         * platform/cf/SharedBufferCF.cpp:
555         * platform/graphics/FloatSize.h:
556         * platform/graphics/IntRect.h:
557         * platform/graphics/IntSize.h:
558         * platform/graphics/MediaPlayer.cpp:
559         (WebCore::installedMediaEngines):
560         * platform/graphics/cg/FloatSizeCG.cpp:
561         * platform/graphics/cg/IntRectCG.cpp:
562         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
563         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
564         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
565         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
566         (WebCore::MediaPlayerPrivateQTKit::paint):
567         (-[WebCoreMovieObserver layerHostChanged:]):
568         * platform/mac/SharedBufferMac.mm:
569         (+[WebCoreSharedBufferData initialize]):
570         (WebCore::SharedBuffer::createWithContentsOfFile):
571
572 2013-06-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
573
574         REGRESSSION(r151632) : Build error on ASSERT(WTF_USE_GRAMMAR_CHECKING)
575         https://bugs.webkit.org/show_bug.cgi?id=117692
576
577         Reviewed by Jocelyn Turcotte.
578
579         Ifdef the feature-depending code and fix the assertions to check runtime conditions.
580
581         * editing/Editor.cpp:
582         (WebCore::Editor::advanceToNextMisspelling):
583         (WebCore::Editor::markMisspellingsOrBadGrammar):
584         (WebCore::Editor::markBadGrammar):
585         * editing/TextCheckingHelper.cpp:
586         (WebCore::findBadGrammars):
587         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
588         (WebCore::TextCheckingHelper::findFirstBadGrammar):
589         (WebCore::TextCheckingHelper::isUngrammatical):
590         (WebCore::TextCheckingHelper::markAllBadGrammar):
591         (WebCore::checkTextOfParagraph):
592         * editing/TextCheckingHelper.h:
593
594 2013-06-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
595
596         Unreviewed, rolling out r151632.
597         http://trac.webkit.org/changeset/151632
598         https://bugs.webkit.org/show_bug.cgi?id=117585
599
600         Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
601         platforms
602
603         * page/ContextMenuController.cpp:
604         (WebCore::ContextMenuController::contextMenuItemSelected):
605         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
606         (WebCore::ContextMenuController::populate):
607         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
608         * platform/LocalizedStrings.cpp:
609         (WebCore::contextMenuItemTagSpellingMenu):
610         (WebCore::contextMenuItemTagShowSpellingPanel):
611         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
612         * platform/LocalizedStrings.h:
613         * platform/efl/LocalizedStringsEfl.cpp:
614         (WebCore::contextMenuItemTagSpellingMenu):
615         (WebCore::contextMenuItemTagShowSpellingPanel):
616         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
617         * platform/gtk/LocalizedStringsGtk.cpp:
618         (WebCore::contextMenuItemTagSpellingMenu):
619         (WebCore::contextMenuItemTagShowSpellingPanel):
620         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
621         * platform/qt/LocalizedStringsQt.cpp:
622         (WebCore::contextMenuItemTagSpellingMenu):
623         (WebCore::contextMenuItemTagShowSpellingPanel):
624         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
625
626 2013-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
627
628         Unreviewed. Fix make distcheck.
629
630         * GNUmakefile.list.am: Remove non existent files from compilation
631         and add a missing header file.
632
633 2013-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
634
635         Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
636         https://bugs.webkit.org/show_bug.cgi?id=117585
637
638         Reviewed by Anders Carlsson.
639
640         Do not add "Check Grammar With Spelling" and "Ignore Grammar" to the context menu
641         when GRAMMAR_CHECKING is off.
642         Replace "Spelling and Grammar" with "Spelling" as the sub menu title and "Show/Hide Spelling
643         and Grammar" with "Show/Hide Spelling" when GRAMMAR_CHECKING is off.
644
645         Additionally, guard grammar checking in context menu code to not necessarily
646         compile it.
647
648         No new layout tests because every port has a different way of showing
649         spelling/grammar context menu items.
650
651         * page/ContextMenuController.cpp:
652         (WebCore::ContextMenuController::contextMenuItemSelected):
653         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
654         (WebCore::ContextMenuController::populate):
655         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
656         * platform/LocalizedStrings.cpp:
657         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
658         (WebCore::contextMenuItemTagSpellingMenu):
659         (WebCore::contextMenuItemTagShowSpellingPanel):
660         * platform/LocalizedStrings.h:
661         * platform/efl/LocalizedStringsEfl.cpp:
662         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
663         (WebCore::contextMenuItemTagSpellingMenu):
664         (WebCore::contextMenuItemTagShowSpellingPanel):
665         * platform/gtk/LocalizedStringsGtk.cpp:
666         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
667         (WebCore::contextMenuItemTagSpellingMenu):
668         (WebCore::contextMenuItemTagShowSpellingPanel):
669         * platform/qt/LocalizedStringsQt.cpp:
670         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
671         (WebCore::contextMenuItemTagSpellingMenu):
672         (WebCore::contextMenuItemTagShowSpellingPanel):
673
674 2013-06-16  Simon Fraser  <simon.fraser@apple.com>
675
676         Fix test assertion after r151624
677
678         An assertion was hit in RenderObject::willBeDestroyed()
679         for fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
680         because the code asserted that the RenderObject had been removed from
681         the FrameView's slowRepaintObject set before remove() was called,
682         so move the assertion to after that call.
683
684         * rendering/RenderObject.cpp:
685         (WebCore::RenderObject::willBeDestroyed):
686
687 2013-06-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
688
689         Remove a redundant virtual call to hostWindow() in FrameView::invalidateRect()
690         https://bugs.webkit.org/show_bug.cgi?id=117685
691
692         Reviewed by Andreas Kling.
693
694         From Blink r152490 by <vivek.vg@samsung.com>
695
696         * page/FrameView.cpp:
697         (WebCore::FrameView::invalidateRect): Avoid hostWindow() twice call.
698
699 2013-06-16  Kent Tamura  <tkent@chromium.org>
700
701         Fix two assertion failures in Range::insertNode
702         https://bugs.webkit.org/show_bug.cgi?id=116511
703
704         Reviewed by Ryosuke Niwa.
705
706         > ASSERTION FAILED: childBefore == (offset ? container->childNode(offset - 1) : 0)
707         > third_party/WebKit/Source/WebCore/dom/RangeBoundaryPoint.h(115) : void WebCore::RangeBoundaryPoint::set(PassRefPtr<WebCore::Node>, int, WebCore::Node *)
708
709         > ASSERTION FAILED: child->parentNode()
710         > ../../third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h(133) : void WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node *)
711         >  1   0x87594b2 WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node*)
712         >  2   0x87534a9 WebCore::Range::insertNode(WTF::PassRefPtr<WebCore::Node>, int&)
713
714         Range::insertNode calls Node::insertBefore, in which an event handler
715         can update the DOM structure so that RangeBoundaryPoint don't like. We
716         postpone event dispatching by EventQueueScope.
717
718         Also, remove old comments about Acid3. The behavior is standardized.
719         (Step 9 of http://dom.spec.whatwg.org/#dom-range-insertnode)
720
721         This patch imports http://src.chromium.org/viewvc/blink?view=revision&revision=150470 .
722
723         Test: fast/dom/Range/range-insertNode-assertion.html
724
725         * dom/Range.cpp:
726         (WebCore::Range::insertNode):
727          - Add EventQueueScope
728          - Remove obsolete comments
729
730 2013-06-16  Simon Fraser  <simon.fraser@apple.com>
731
732         Fixed backgrounds in composited layers not repainted on scrolling
733         https://bugs.webkit.org/show_bug.cgi?id=117684
734
735         Reviewed by Tim Horton.
736         
737         FrameView is aware that "slow-repaint objects" (i.e. renderers with 
738         background-attachment:fixed) require a slow-scrolling path. However,
739         it was ignorant of the fact that such objects could be painting into
740         compositing layers; it simply dirtied the main tiles, and nothing else.
741         
742         Fix by having FrameView track the slow-repaints objects explicitly, as we
743         do for position:fixed, and repaint each of them on scrolling.
744
745         Test: compositing/repaint/fixed-background-scroll.html
746
747         * page/FrameView.cpp:
748         (WebCore::FrameView::FrameView): No need to initialize m_slowRepaintObjectCount,
749         which is now an OwnPtr<RenderObjectSet>.
750         (WebCore::FrameView::useSlowRepaints): Use hasSlowRepaintObjects() now.
751         (WebCore::FrameView::addSlowRepaintObject): Now adds the object to a set,
752         allocating the set if necessary.
753         (WebCore::FrameView::removeSlowRepaintObject): Remove the object from the set,
754         and deallocate the set if empty.
755         (WebCore::FrameView::scrollContentsSlowPath): Call repaintSlowRepaintObjects();
756         this is the change that fixes the bug for always-composited implementations (e.g.
757         tile cache). This is a conservative change; we still invalidate the tile cache
758         as well. This could be optimized later.
759         (WebCore::FrameView::repaintSlowRepaintObjects): Repaint each object in the set.
760         Their appropriate compositing ancestor will be repainted.
761         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Call
762         repaintSlowRepaintObjects() so that fixed backgrounds in composited layers are
763         correctly repainted; this fixes the bug for WebKit1.
764         * page/FrameView.h: Replace m_slowRepaintObjectCount with a HashSet of
765         RenderObjects.
766         (WebCore::FrameView::hasSlowRepaintObject): Takes a RenderObject* now.
767         (WebCore::FrameView::hasSlowRepaintObjects): Ditto.
768         * rendering/RenderObject.cpp:
769         (WebCore::RenderObject::styleWillChange): Pass the RenderObject.
770         (WebCore::RenderObject::willBeDestroyed): Assert that this RenderObject
771         has been removed from FrameView's set of slow-repaint objects already, if
772         the document is not being destroyed.
773         (WebCore::RenderObject::willBeRemovedFromTree): Pass the RenderObject.
774
775 2013-06-15  Simon Fraser  <simon.fraser@apple.com>
776
777         Painting of fixed background images is wrong in composited layers
778         https://bugs.webkit.org/show_bug.cgi?id=65793
779
780         Reviewed by Sam Weinig.
781         
782         The code that computed background image geometry for background-attachment:fixed
783         images was unaware of compositing, so often painting the image at the wrong location.
784         
785         Fix by having RenderBoxModelObject::calculateBackgroundImageGeometry() do the correct
786         math for fixed backgrounds in composited layer by offsetting the viewport rect by
787         the paint container's absolute position.
788
789         Tests: compositing/backgrounds/fixed-background-on-descendant.html
790                compositing/backgrounds/fixed-backgrounds.html
791
792         * rendering/RenderBox.cpp:
793         (WebCore::RenderBox::getBackgroundPaintedExtent): Now returns a bool indicating
794         whether it is returning a reliable extent rect. It can return false in the case where
795         a background is fixed, since computing the correct extent would require finding
796         the appropriate composited ancestor to pass to calculateBackgroundImageGeometry().
797         This is OK since this function is used for "background opaque" optimizations.
798         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured): If getBackgroundPaintedExtent()
799         returns false, return false.
800         (WebCore::RenderBox::maskClipRect): We removed mask-attachment, so we never need to
801         compute the composited ancestor here and can pass null.
802         (WebCore::RenderBox::repaintLayerRectsForImage): Unwrap a comment.
803         If the changed image is related to a fixed background, geometry.hasNonLocalGeometry()
804         will be true. In that cause, just repaint the entire renderer rather than groveling
805         around for a composited ancestor.
806         * rendering/RenderBox.h: Changed name and signature of backgroundPaintedExtent.
807         * rendering/RenderBoxModelObject.cpp:
808         (WebCore::RenderBoxModelObject::paintFillLayerExtended): calculateBackgroundImageGeometry()
809         now needs to know the painting container.
810         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Now takes a painting
811         container, that is required to correctly compute the viewport-relative offset for fixed
812         backgrounds. geometry.setHasNonLocalGeometry() is set for fixed backgrounds to indicate
813         to callers that, if they didn't pass a paint container, the destRect is not accurate.
814         The main bug fix is also here: we move the viewportRect by the absolute location of
815         paint container, which is equivalent to the composited layer offset.
816         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): calculateBackgroundImageGeometry()
817         takes a paint container.
818         * rendering/RenderBoxModelObject.h:
819         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::BackgroundImageGeometry):
820         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setHasNonLocalGeometry):
821         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::hasNonLocalGeometry):
822         * rendering/RenderImage.cpp:
823         (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured): If getBackgroundPaintedExtent()
824         can't cheaply give an accurate answer, return false.
825         * rendering/RenderLayerBacking.cpp:
826         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Pass the paint container,
827         which is our own renderer.
828
829 2013-06-15  Simon Fraser  <simon.fraser@apple.com>
830
831         webkit-backface-visibility on a parent element stops background-position from updating
832         https://bugs.webkit.org/show_bug.cgi?id=116319
833
834         Reviewed by Darin Adler.
835
836         The optimization added in r102952 was incorrect in the case where a style change
837         resulted in a positioned-movement-only layout but also required a repaint; it assumed
838         that a composited layer did not need to be repainted for a a positioned-movement-only layout.
839         
840         Fix by making RenderObject::setNeedsLayoutForPositionedMovement() check whether the
841         style change requires a repaint, and calling setLayerNeedsFullRepaint() in that situation.
842
843         Test: compositing/repaint/positioned-movement.html
844
845         * rendering/RenderLayer.h: RepaintStatus values do not need to be bit flags.
846         * rendering/RenderObject.cpp:
847         (WebCore::RenderObject::setStyle): Pass the old style to setNeedsPositionedMovementLayout().
848         (WebCore::RenderObject::styleDidChange): Ditto.
849         * rendering/RenderObject.h:
850         (WebCore::RenderObject::setNeedsPositionedMovementLayout): Now takes a const RenderStyle*.
851         * rendering/style/RenderStyle.cpp:
852         (WebCore::RenderStyle::diff): Remove a comment now that this bug is fixed.
853         (WebCore::RenderStyle::diffRequiresRepaint): Public wrapper for changeRequiresRepaint().
854         That function never uses contextSensitiveProperties so we can safely ignore them.
855         * rendering/style/RenderStyle.h: Expose a way to call changeRequiresRepaint().
856
857 2013-06-15  Darin Adler  <darin@apple.com>
858
859         Try to fix iOS after last Pasteboard change.
860
861         * platform/ios/PasteboardIOS.mm:
862         (WebCore::Pasteboard::writeSelection): Put the new code inline here because the
863         stringSelectionForPasteboard function is currently Mac-only.
864
865 2013-06-15  Darin Adler  <darin@apple.com>
866
867         Move Pasteboard::getStringSelection to Editor, fixing a layering violation
868         https://bugs.webkit.org/show_bug.cgi?id=117673
869
870         Reviewed by Ryosuke Niwa.
871
872         * editing/Editor.h: Added stringSelectionForPasteboardWithImageAltText.
873
874         * editing/mac/EditorMac.mm:
875         (WebCore::Editor::stringSelectionForPasteboard): Moved code here from the Pasteboard
876         class, since all the Pasteboard class did really was turn around and call back here.
877         (WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Added. Variant of
878         the function above that includes image alt text. Separate named functions are often
879         the best pattern for something like this unless there are many different combinations.
880
881         * platform/Pasteboard.h: Remove the Mac-only Pasteboard::getStringSelectioon.
882
883         * platform/ios/PasteboardIOS.mm:
884         (WebCore::Pasteboard::writeSelection):
885         * platform/mac/PasteboardMac.mm:
886         (WebCore::Pasteboard::writeSelectionForTypes):
887         Call the two new functions instead of the old Pasteboard::getStringSelection.
888
889 2013-06-15  Darin Adler  <darin@apple.com>
890
891         Support using clang instead of gcc for bindings preprocessing
892         https://bugs.webkit.org/show_bug.cgi?id=117674
893
894         Reviewed by Sam Weinig.
895
896         I couldn't build on my computer because I don't have gcc installed.
897         This is my cut at fixing it.
898
899         * bindings/scripts/CodeGeneratorObjC.pm:
900         (ReadPublicInterfaces): Use clang if present.
901         * bindings/scripts/preprocessor.pm:
902         (applyPreprocessor): Ditto.
903
904 2013-06-14  Robert Hogan  <robert@webkit.org>
905
906         REGRESSION (r148367): Facebook and Twitter icons at macworld.com are stacked vertically, obscuring Twitter one
907         https://bugs.webkit.org/show_bug.cgi?id=117284
908
909         Reviewed by David Hyatt.
910
911         Test: fast/text/whitespace/inline-whitespace-wrapping-7.html
912
913         We were looking for line breaks in trailing collapsed whitespace even when inside a nowrap inline.
914         It's wrong to do this as we don't know yet if we will want or need to break - that decision has to
915         be deferred until we enter a part of the line that is autowrap.
916
917         * rendering/RenderBlockLineLayout.cpp:
918         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
919
920 2013-06-14  Lukasz Gajowy  <l.gajowy@samsung.com>
921
922         background-color is not preserved when inserting a new paragraph
923         https://bugs.webkit.org/show_bug.cgi?id=117138
924
925         Reviewed by Ryosuke Niwa.
926
927         The style isn't copied because background-color isn't defined as inheritable property.
928
929         Test: editing/inserting/insert-paragraph-not-preserving-background-color.html
930
931         * editing/InsertParagraphSeparatorCommand.cpp:
932         (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
933         Passing EditingPropertiesInEffect instead of implicit parameter OnlyEditingInheritableProperties.
934
935 2013-06-14  Adam Barth  <abarth@webkit.org>
936
937         Threaded HTML parser can ASSERT in some situations
938         https://bugs.webkit.org/show_bug.cgi?id=117662
939
940         Reviewed by Ryosuke Niwa.
941
942         This patch merges https://chromium.googlesource.com/chromium/blink/+/3c0a112b42d72c7623f78463166dd7f04d680b4c
943
944         --->8---
945         The parser is supposed to stop processing data when there's a pending
946         location change, but before this CL we would actually process the first
947         token from every chunk when there was a pending location change.
948
949         If the first token in a chunk was a "script" start tag, that would put
950         the tree builder into TextMode, which can only process character
951         tokens. If the next chunk starts with another start tag token, the tree
952         builder would be sad and hit an ASSERT.
953
954         This CL reorders a couple lines in HTMLDocumentParser so that we check
955         for pending location changes before processing any tokens. This change
956         stops us from processing the first token from each chunk while there is
957         a pending location change.
958
959         This issue can reproduce on any platform, but it reproduced often on
960         Android because mobile markup often elides spaces between consecutive
961         script tags. If there are space characters between the script tags,
962         then those space characters will be the first ones processes in the
963         chunk, which doesn't trigger the ASSERT.
964         ---8<---
965
966         Since we landed this patch in Blink, we've been able to reproduce this
967         issue on desktops as well. I spoke with rniwa in #webkit and he said
968         that WebKit doesn't have any current plans to enable the threaded
969         parser but that it was probably worth merging this patch anyway.
970
971         Test: http/tests/navigation/pending-location-change-assert.html
972
973         * html/parser/HTMLDocumentParser.cpp:
974         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
975
976 2013-06-14  Patrick Gansterer  <paroga@webkit.org>
977
978         Introduce USE(WINGDI) for the Windows port
979         https://bugs.webkit.org/show_bug.cgi?id=116138
980
981         Reviewed by Ryosuke Niwa.
982
983         Using USE(WINGDI) instead of OS(WINCE) will allow us to
984         compile the GDI based Windows port on WinNT too.
985
986         * config.h:
987         * platform/graphics/BitmapImage.h:
988         * platform/graphics/FontPlatformData.h:
989         * platform/graphics/GlyphBuffer.h:
990         (WebCore):
991         (GlyphBuffer):
992         * platform/graphics/Gradient.h:
993         (Gradient):
994         * platform/graphics/GraphicsContext.cpp:
995         (WebCore):
996         * platform/graphics/GraphicsContext.h:
997         (WebCore):
998         (GraphicsContext):
999         * platform/graphics/ImageBufferData.h:
1000         * platform/graphics/NativeImagePtr.h:
1001         (WebCore):
1002         * platform/graphics/Path.h:
1003         * platform/graphics/Pattern.h:
1004         * plugins/win/PluginViewWin.cpp:
1005         (WebCore::PluginView::paintWindowedPluginIntoContext):
1006         (WebCore::PluginView::paint):
1007         (WebCore::PluginView::snapshot):
1008
1009 2013-06-13  Jer Noble  <jer.noble@apple.com>
1010
1011         Report the memory cost of HTMLMediaElements to GC.
1012         https://bugs.webkit.org/show_bug.cgi?id=117608
1013
1014         Reviewed by Darin Adler.
1015
1016         Report the extra memory cost of a HTMLMediaElement to the VM, in order to
1017         encourage GC to occur after a media element is removed from the DOM.
1018
1019         Because we cannot know for sure the memory cost of our underlying media
1020         framework objects, use the worst case scenario for the media memory cost:
1021         the buffered percentage of movie * the total data length of the movie.
1022
1023         * html/HTMLMediaElement.cpp:
1024         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedExtraMemoryCost.
1025         (WebCore::HTMLMediaElement::removedFrom): Report the extra memory cost.
1026         * html/HTMLMediaElement.h:
1027         * html/TimeRanges.cpp:
1028         (TimeRanges::totalDuration): Added convenience function.
1029         * html/TimeRanges.h:
1030         * platform/graphics/MediaPlayer.cpp:
1031         (WebCore::MediaPlayer::extraMemoryCost): Pass to MediaPlayerPrivate.
1032         * platform/graphics/MediaPlayer.h:
1033         * platform/graphics/MediaPlayerPrivate.h:
1034         (WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default to 0.
1035         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1036         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Return the percentage
1037             loaded * total data length.
1038         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1039
1040 2013-06-13  Jer Noble  <jer.noble@apple.com>
1041
1042         Add support for AVFoundation-backed HTMLMediaElements in the WebVideoFullScreenController.
1043         https://bugs.webkit.org/show_bug.cgi?id=117597
1044
1045         Reviewed by Eric Carlson.
1046
1047         Check for media elements with AVFoundation media types and create a AVPlayerLayer
1048         rather than a QTMovieLayer.
1049
1050         * platform/mac/WebVideoFullscreenController.h:
1051         * platform/mac/WebVideoFullscreenController.mm:
1052         (-[WebVideoFullscreenController setupVideoOverlay:]): Take a CALayer rather than a
1053             QTMovieLayer. Move the code which connects the layer with it's media source into
1054             setMediaElement.
1055         (-[WebVideoFullscreenController windowDidLoad]): Give the window's contentView a generic
1056             CALayer instaead of a QTMovieLayer.
1057         (-[WebVideoFullscreenController setMediaElement:]): Test whether the incoming media 
1058             element is backed by a QTMovie or an AVPlayer, and create the appropriate layer.
1059         (-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the observer of
1060             AVPlayer's rate property.
1061         (-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
1062             If the keyPath is "rate", call rateChanged.
1063
1064 2013-06-14  Enrica Casucci  <enrica@apple.com>
1065
1066         WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
1067         https://bugs.webkit.org/show_bug.cgi?id=117647
1068         <rdar://problem/13881024>
1069
1070         Reviewed by Darin Adler.
1071         
1072         The API returns the matched ranges in the DOM order regardless of the
1073         find direction, but the index of the first match after the user selection
1074         should take the find direction into account.
1075
1076         Extended existing test in TestWebKitAPI.
1077
1078         * page/Page.cpp:
1079         (WebCore::Page::findStringMatchingRanges): Added handling of the Backwards case.
1080         * page/Page.h: Fixed incorrect name of the enum.
1081
1082 2013-06-14  Jer Noble  <jer.noble@apple.com>
1083
1084         REGRESSION (r150651): Web Audio doesn't work at all (silence or squawks) on Mountain Lion
1085         https://bugs.webkit.org/show_bug.cgi?id=117652
1086
1087         Reviewed by Eric Carlson.
1088
1089         r150651 disabled setting the buffer size to a large value, but in so doing, also
1090         disabled setting the buffer size to a small value for Web Audio. Narrow the Mountain
1091         Lion protection to just the <video> element case.
1092         
1093         * platform/audio/mac/AudioSessionManagerMac.cpp:
1094         (AudioSessionManager::updateSessionState):
1095
1096 2013-06-14  Ryosuke Niwa  <rniwa@webkit.org>
1097
1098         Function names on Object.prototype should be common identifiers
1099         https://bugs.webkit.org/show_bug.cgi?id=117614
1100
1101         Reviewed by Darin Adler.
1102
1103         Use the added common identifiers.
1104
1105         * bindings/js/JSDOMWindowBase.cpp:
1106         (WebCore::JSDOMWindowBase::finishCreation):
1107         (WebCore::JSDOMWindowBase::updateDocument):
1108
1109 2013-06-14  Arpita Bahuguna  <a.bah@samsung.com>
1110
1111         Editing: wrong text position when you click enter on the text behind the image
1112         https://bugs.webkit.org/show_bug.cgi?id=115023
1113
1114         Reviewed by Ryosuke Niwa.
1115
1116         When trying to break a line after an image followed by some text, contrary
1117         to the expected behavior the text doesn't move to a new line, instead, the
1118         caret position just shifts to the end of line.
1119
1120         As per the existing implementation for inserting a paragraph separator,
1121         the insertion position obtained corresponds to the point after the image
1122         element.
1123         Since the insertion position doesn't resolve to being offset in the
1124         following text node (0 offset), no splitting of text occurs and the block
1125         to be inserted is placed after the containing (start) block (thereby
1126         causing the caret position to shift).
1127
1128         If the computed insertionPosition points to an element that shall be
1129         ignored for editing purposes (i.e. cannot have a VisiblePosition inside
1130         it), and the position lies either at the start or at the end of such
1131         an element, we should move our Position either upstream or
1132         downstream (respectively) so as to obtain a valid position which can
1133         be used further for splitting of the text.
1134         
1135         Test: editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
1136
1137         * editing/InsertParagraphSeparatorCommand.cpp:
1138         (WebCore::InsertParagraphSeparatorCommand::doApply):
1139         Moving the insertionPosition either upstream or downstream, if the point
1140         lies either at the start or at the end of the anchor node.
1141         The ensuing position, if a text node, can then be used for splitting of
1142         the text correctly.
1143
1144 2013-06-14  Alberto Garcia  <agarcia@igalia.com>
1145
1146         [BlackBerry] Remove implementation of ContextMenu classes
1147         https://bugs.webkit.org/show_bug.cgi?id=114860
1148
1149         Reviewed by Rob Buis.
1150
1151         This code is not being used so we can safely remove it.
1152
1153         * PlatformBlackBerry.cmake:
1154         * platform/blackberry/ContextMenuBlackBerry.cpp: Removed.
1155         * platform/blackberry/ContextMenuItemBlackBerry.cpp: Removed.
1156         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1157
1158 2013-06-14  Brent Fulgham  <bfulgham@apple.com>
1159
1160         [Windows] Provide simple <meter> drawing logic for testing.
1161         https://bugs.webkit.org/show_bug.cgi?id=117645.
1162
1163         Reviewed by Anders Carlsson.
1164
1165         accessbility/meter-element.html
1166
1167         * rendering/RenderThemeSafari.cpp: Simple test implementation
1168         (WebCore::RenderThemeSafari::adjustMeterStyle): Added.
1169         (WebCore::RenderThemeSafari::supportsMeter): Added.
1170         (WebCore::RenderThemeSafari::meterSizeForBounds): Added.
1171         (WebCore::RenderThemeSafari::paintMeter): Added.
1172         * rendering/RenderThemeSafari.h:
1173         * rendering/RenderThemeWin.cpp:
1174         (WebCore::RenderThemeWin::progressBarTheme): Added.
1175         (WebCore::RenderThemeWin::getClassicThemeData): Support meters.
1176         (WebCore::RenderThemeWin::getThemeData): Support meter theme.
1177         (WebCore::RenderThemeWin::adjustMeterStyle): Added.
1178         (WebCore::RenderThemeWin::supportsMeter): Added.
1179         (WebCore::RenderThemeWin::meterSizeForBounds): Added.
1180         (WebCore::RenderThemeWin::paintMeter): Added.
1181         * rendering/RenderThemeWin.h:
1182
1183 2013-06-14  Eric Carlson  <eric.carlson@apple.com>
1184
1185         Potential use-after-free with an event fired at a HTMLMediaElement which is currently being deleted
1186         https://bugs.webkit.org/show_bug.cgi?id=117466
1187
1188         Reviewed by Oliver Hunt.
1189         
1190         Merge https://chromium.googlesource.com/chromium/blink/+/f4200a0093b3d9376f703961615359ec7fb712b4
1191         
1192         If an event is created using as target an HTMLMediaElement which is
1193         currently being deleted it becomes a heap-use-after free situation.
1194
1195         The GenericEventQueue instance is already owned by the HTMLMediaElement,
1196         and there already is an underlying mechanism to set the target of the
1197         event to NULL, if their target is owner of the queue.
1198
1199         In order to avoid creating this reference in the first place, we enqueue
1200         the event with a NULL target to defer the refcount increment until the
1201         timer for dispatching the event happens (which won't happen at all if
1202         garbage collection is already destroying the objects).
1203
1204         Test: media/track/media-element-enqueue-event-crash.html
1205
1206         * dom/GenericEventQueue.cpp:
1207         (WebCore::GenericEventQueue::enqueueEvent): Don't ASSERT if the event has no target.
1208
1209         * html/HTMLMediaElement.cpp:
1210         (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the event queue so it won't try to
1211             dispatch any pending events.
1212         (WebCore::HTMLMediaElement::scheduleEvent): Don't set the event target, it will happen just
1213             prior to event dispatch.
1214         (WebCore::HTMLMediaElement::stop): Close the event queue.
1215
1216 2013-06-14  Dean Jackson  <dino@apple.com>
1217
1218         Clicking on snapshotting plug-ins does not restart them
1219         https://bugs.webkit.org/show_bug.cgi?id=117620
1220         <rdar://problem/13821729>
1221
1222         Follow-up review comments from Darin Adler, with some
1223         discussion on IRC.
1224
1225         Sprinkle OVERRIDE on virtual functions where needed. Also
1226         make sure that the Event is a MouseEvent before casting to it.
1227
1228         * html/HTMLPlugInElement.h: Move defaultEventHandler back to protected and add OVERRIDE.
1229         * html/HTMLPlugInImageElement.cpp:
1230         (WebCore::HTMLPlugInImageElement::defaultEventHandler): Check for MouseEvent and
1231         use toMouseEvent().
1232         * html/HTMLPlugInImageElement.h: Sprinkle some OVERRIDEs, and move defaultEventHandler
1233         to private.
1234
1235 2013-06-14  Timothy Hatcher  <timothy@apple.com>
1236
1237         Remove front-end from the WebCore Xcode project.
1238         https://bugs.webkit.org/show_bug.cgi?id=117640
1239
1240         Reviewed by Darin Adler.
1241
1242         * WebCore.xcodeproj/project.pbxproj:
1243
1244 2013-06-14  Jaehun Lim  <ljaehun.lim@samsung.com>
1245
1246         CSSParser::parseImageSet() doesn't need a parameter.
1247         https://bugs.webkit.org/show_bug.cgi?id=117617
1248
1249         Reviewed by Darin Adler.
1250
1251         parseImageSet() can get m_valueList directly.
1252         And minor fixes.
1253
1254         No new tests, no behavior change.
1255
1256         * css/CSSParser.cpp:
1257         (WebCore::CSSParser::parseValue):
1258         (WebCore::CSSParser::parseContent):
1259         (WebCore::CSSParser::parseFillImage):
1260         (WebCore::CSSParser::parseBorderImage):
1261         (WebCore::CSSParser::parseImageSet):
1262         * css/CSSParser.h:
1263
1264 2013-06-14  Tiancheng Jiang  <tijiang@rim.com>
1265
1266         [BlackBerry] Dropdown button UX updates.
1267         https://bugs.webkit.org/show_bug.cgi?id=117642.
1268
1269         Reviewed by Rob Buis.
1270
1271         JIRA 388652
1272         Internally Reviewed by Jeff Rogers.
1273
1274         Change arrow assert.
1275
1276         * platform/blackberry/RenderThemeBlackBerry.cpp:
1277         (WebCore::RenderThemeBlackBerry::paintMenuList):
1278
1279 2013-06-14  Arvid Nilsson  <anilsson@rim.com>
1280
1281         [BlackBerry] LayerTiler fails to tile really big layers
1282         https://bugs.webkit.org/show_bug.cgi?id=117211
1283
1284         Reviewed by Carlos Garcia Campos.
1285
1286         PR 273550
1287
1288         The cause for this bug was that LayerTiler computed which tiles are
1289         visible by exhaustively mapping every tile to normalized device
1290         coordinates and checking if it intersected the viewport. If there was a
1291         lot of tiles, it would get stuck in this loop, iterating over all
1292         tiles, for a very long time. Also, the visibility information was
1293         transferred to the WebKit thread using mutexes, which added unnecessary
1294         mutex contention to the mix.
1295
1296         Fixed by doing the reverse calculation, unprojecting the visible part
1297         of the layer to layer coordinate space to find which tiles are visible.
1298         Instead of doing a traditional unprojection of point to line and see
1299         where the line intersects the layer, this patch uses the w-coordinates
1300         of triangle vertices to perform "perspective correct texturing" of the
1301         intersection points in device space, which is equivalent to
1302         unprojection since perspective correct texturing computes a 2D
1303         coordinate in (normalized) layer coordinate space which is easily
1304         scaled up to the layer bounds and get the visible region expressed in
1305         layer coordinate space.
1306
1307         The visible area is approximated by a rectangle, and a set of tiles
1308         needing render are added to the mix, and  we have a swappable data
1309         structure so visbility can be transferred to WebKit thread without
1310         mutexes, but instead using atomic swap.
1311
1312         No new tests, covered by existing tests.
1313
1314         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
1315         (CanvasLayerCompositingThreadClient):
1316         (WebCore::CanvasLayerCompositingThreadClient::drawTextures):
1317         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
1318         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
1319         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.h:
1320         (EGLImageLayerCompositingThreadClient):
1321         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1322         (WebCore::LayerCompositingThread::drawTextures):
1323         (WebCore::LayerCompositingThread::drawSurface):
1324         * platform/graphics/blackberry/LayerCompositingThread.h:
1325         (LayerCompositingThread):
1326         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
1327         (WebCore):
1328         (LayerCompositingThreadClient):
1329         * platform/graphics/blackberry/LayerRenderer.cpp:
1330         (WebCore::LayerRenderer::compositeLayersRecursive):
1331         * platform/graphics/blackberry/LayerTile.cpp:
1332         (WebCore::LayerTile::LayerTile):
1333         (WebCore::LayerTile::setContents):
1334         (WebCore::LayerTile::updateContents):
1335         (WebCore::LayerTile::discardContents):
1336         * platform/graphics/blackberry/LayerTile.h:
1337         (LayerTile):
1338         (WebCore::LayerTile::contentsScale):
1339         (WebCore::LayerTile::setContentsDirty):
1340         * platform/graphics/blackberry/LayerTiler.cpp:
1341         (LayerVisibility):
1342         (WebCore::LayerVisibility::LayerVisibility):
1343         (WebCore::LayerVisibility::visibleRect):
1344         (WebCore::LayerVisibility::setVisibleRect):
1345         (WebCore::LayerVisibility::needsRender):
1346         (WebCore::LayerVisibility::tileNeedsRender):
1347         (WebCore::LayerVisibility::willRenderTile):
1348         (WebCore::LayerVisibility::swapTilesNeedingRender):
1349         (WebCore::LayerVisibility::merge):
1350         (WebCore):
1351         (WebCore::LayerTiler::LayerTiler):
1352         (WebCore::LayerTiler::~LayerTiler):
1353         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1354         (WebCore::LayerTiler::swapFrontVisibility):
1355         (WebCore::LayerTiler::setFrontVisibility):
1356         (WebCore::LayerTiler::layerVisibilityChanged):
1357         (WebCore::LayerTiler::uploadTexturesIfNeeded):
1358         (WebCore::LayerTiler::processTextureJob):
1359         (WebCore::LayerTiler::addTileJob):
1360         (WebCore::LayerTiler::performTileJob):
1361         (WebCore::LayerTiler::drawTile):
1362         (WebCore::inflateViewport):
1363         (WebCore::LayerTiler::drawTextures):
1364         (WebCore::LayerTiler::pruneTextures):
1365         (WebCore::LayerTiler::rectForTile):
1366         * platform/graphics/blackberry/LayerTiler.h:
1367         (WebCore):
1368         (LayerTiler):
1369         (WebCore::LayerTiler::TextureJob::TextureJob):
1370         (WebCore::LayerTiler::takeFrontVisibility):
1371         * platform/graphics/blackberry/LayerUtilities.h:
1372         (WebCore):
1373         (WebCore::det):
1374         (WebCore::dot):
1375         (LayerClipEdge):
1376         (WebCore::LayerClipEdge::LayerClipEdge):
1377         (WebCore::LayerClipEdge::isPointInside):
1378         (WebCore::LayerClipEdge::computeIntersection):
1379         (WebCore::intersectPolygonWithRect):
1380         (WebCore::computeBarycentricCoordinates):
1381         (WebCore::manhattanDistanceToViewport):
1382         (UnprojectionVertex):
1383         (WebCore::compareManhattanDistanceToViewport):
1384         (WebCore::unproject):
1385
1386 2013-06-14  Antoine Quint  <graouts@apple.com>
1387
1388         [Mac] clicking caption track glyph should dismiss menu
1389         https://bugs.webkit.org/show_bug.cgi?id=117621
1390
1391         We now correctly capture all click events while the captions track menu
1392         is showing, and ensure that no other control in the media player can be
1393         activated as the track list gets dismissed by clicking anywhere but on
1394         itself.
1395
1396         Reviewed by Eric Carlson.
1397
1398         * html/shadow/MediaControlsApple.cpp:
1399         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
1400         Make the controls panel non-interactive and track click events in the
1401         capture phase also on the controls container itself such that we can
1402         identify correctly whether a click in the <video> shadow tree is on
1403         the track list or another element (the target could only be resolved
1404         to a shadow tree node if the event is handled within the shadow tree).
1405
1406         (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
1407         Make the controls panel interactive again and remove the new click
1408         event handler on the controls container.
1409
1410         (WebCore::MediaControlsApple::handleClickEvent):
1411         Capture any click event that targets a node anywhere outside of the track
1412         list container and its subtree and hide the track list in this condition.
1413
1414         (WebCore::MediaControlsAppleEventListener::handleEvent):
1415         Call handleClickEvent() on the media controls when a click event is handled.
1416
1417         * html/shadow/MediaControlsApple.h:
1418         New public handleClickEvent() API such that it can be called from
1419         MediaControlsAppleEventListener::handleEvent().
1420
1421 2013-06-14  Arvid Nilsson  <anilsson@rim.com>
1422
1423         [BlackBerry] Accelerated compositing layers that intersect the image plane are incorrectly transformed
1424         https://bugs.webkit.org/show_bug.cgi?id=117067
1425
1426         Reviewed by Carlos Garcia Campos.
1427
1428         PR 273550
1429
1430         The BlackBerry port used to mathematically project each corner of each
1431         layer bounds rectangle, which gives the wrong results when the layer
1432         intersects the image plane.
1433
1434         For display lists, we still got the correct appearance of the layer
1435         contents, since the display list results in geometry that's transformed
1436         in the vertex shader, on the GPU.
1437
1438         However, the transformed bounds are used for drawing the debug border,
1439         performing visibility calculations on the CPU and drawing of WebGL,
1440         masks/reflections and filters. Using the mathematical projection of
1441         points that lie behind the image plane gives the wrong results.
1442
1443         The most important consequence of this bug was that the wrong area of
1444         the layer would be considered visible, so a tiled layer would not
1445         populate the right tiles (or any tiles at all).
1446
1447         Fixed by implementing something along the lines of the recipe in
1448         section 6.2 of http://www.w3.org/TR/css3-transforms.
1449
1450         No new tests, manually testable by enabling debug border on
1451         https://developer.mozilla.org/en-US/demos/detail/the-box/launch.
1452
1453         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
1454         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
1455         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1456         (WebCore::LayerCompositingThread::LayerCompositingThread):
1457         (WebCore::LayerCompositingThread::setDrawTransform):
1458         (WebCore):
1459         (WebCore::LayerCompositingThread::textureCoordinates):
1460         (WebCore::LayerCompositingThread::drawTextures):
1461         * platform/graphics/blackberry/LayerCompositingThread.h:
1462         (LayerCompositingThread):
1463         (WebCore::LayerCompositingThread::transformedBounds):
1464         (WebCore::LayerCompositingThread::ws):
1465         (WebCore::LayerCompositingThread::centerW):
1466         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1467         (WebCore::LayerFilterRenderer::applyActions):
1468         * platform/graphics/blackberry/LayerRenderer.cpp:
1469         (WebCore::compareLayerW):
1470         (WebCore::LayerRenderer::compositeLayers):
1471         (WebCore::LayerRenderer::drawDebugBorder):
1472         (WebCore):
1473         (WebCore::LayerRenderer::updateLayersRecursive):
1474         (WebCore::LayerRenderer::compositeLayersRecursive):
1475         * platform/graphics/blackberry/LayerRenderer.h:
1476         (WebCore):
1477         (LayerRenderer):
1478         * platform/graphics/blackberry/LayerRendererSurface.cpp:
1479         (WebCore::LayerRendererSurface::boundingBox):
1480         (WebCore::LayerRendererSurface::transformedBounds):
1481         * platform/graphics/blackberry/LayerRendererSurface.h:
1482         (WebCore::LayerRendererSurface::setDrawTransform):
1483         (WebCore::LayerRendererSurface::setReplicaDrawTransform):
1484         (LayerRendererSurface):
1485         * platform/graphics/blackberry/LayerUtilities.h: Added.
1486         (WebCore):
1487         (LayerClipPlane):
1488         (WebCore::LayerClipPlane::LayerClipPlane):
1489         (WebCore::LayerClipPlane::isPointInside):
1490         (WebCore::LayerClipPlane::computeIntersection):
1491         (WebCore::intersect):
1492         (WebCore::boundingBox):
1493         (WebCore::multVecMatrix):
1494         (WebCore::toVector):
1495
1496 2013-06-14  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1497
1498         [Qt] Map rewind and fast forward keys to match GoogleTV
1499         https://bugs.webkit.org/show_bug.cgi?id=117634
1500
1501         Reviewed by Jocelyn Turcotte.
1502
1503         Set the same keycode for media keys rewind and fast-forward as
1504         GoogleTV does.
1505
1506         * platform/qt/PlatformKeyboardEventQt.cpp:
1507         (WebCore::windowsKeyCodeForKeyEvent):
1508
1509 2013-06-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1510
1511         Avoid unnecessary data copies when loading subresources with DoNotBufferData option
1512         https://bugs.webkit.org/show_bug.cgi?id=115804
1513
1514         Reviewed by Darin Adler.
1515
1516         When DoNotBufferData option is used to load a resource its data
1517         is always copied before sending it to the CachedResource. Most
1518         of the cached resources ignore the incremental data and wait
1519         until all data has been received to save the ResourceBuffer,
1520         that will be NULL anyway when DoNotBufferData is used.
1521         CachedRawResource notifies its clients about the incremental
1522         data, but it doesn't save the data when DoNotBufferData option
1523         is present. In those cases we are unnecessary copying the data.
1524
1525         CachedResource::data has been split into
1526         CachedResource::addDataBuffer() used for incremental data chunks
1527         when buffering data, CachedResource::addData() used for
1528         incremental data chunks when not buffering and
1529         CachedResource::finishLoading() used to finish the loading. This
1530         way we get rid of the allDataReceived boolean parameter and cached
1531         resources not interested in incremenetal data chunks only have to
1532         implement finishLoading() without having to check if all data have
1533         been received or not.
1534
1535         SubresourceLoader::sendDataToResource was always called after
1536         checking if loading multipart content, and then it was checked
1537         again to decided whether to copy the data or not. It has been
1538         removed in favor of calling directly the resource methods,
1539         finishLoading for multipart content, addDataBuffer for data chunks
1540         when buffering and addData for data chunks when not buffering.
1541
1542         No new functionality, covered by existing tests.
1543
1544         * html/ImageDocument.cpp:
1545         (WebCore::ImageDocumentParser::appendBytes): Update to API changes.
1546         (WebCore::ImageDocumentParser::finish): Ditto.
1547         * loader/SubresourceLoader.cpp:
1548         (WebCore::SubresourceLoader::didReceiveResponse): Call
1549         finishLoading() for multipart content.
1550         (WebCore::SubresourceLoader::didReceiveDataOrBuffer): Add data to
1551         the resource using addDataBuffer or addData depending on whether
1552         we are buffering or not.
1553         (WebCore::SubresourceLoader::didFinishLoading): Call
1554         finishLoading() for the cached resource instead of data.
1555         * loader/SubresourceLoader.h:
1556         * loader/cache/CachedCSSStyleSheet.cpp:
1557         (WebCore::CachedCSSStyleSheet::finishLoading):
1558         * loader/cache/CachedCSSStyleSheet.h:
1559         * loader/cache/CachedFont.cpp:
1560         (WebCore::CachedFont::finishLoading):
1561         * loader/cache/CachedFont.h:
1562         * loader/cache/CachedImage.cpp:
1563         (WebCore::CachedImage::isValidDecodedImageSize): Helper function
1564         to check if the image size is valid.
1565         (WebCore::CachedImage::addIncrementalDataBuffer): Helper function
1566         to add incremental data buffer.
1567         (WebCore::CachedImage::addDataBuffer): Call
1568         addIncrementalDataBuffer().
1569         (WebCore::CachedImage::addData): Create a ResourceBuffer and call
1570         addIncrementalDataBuffer().
1571         (WebCore::CachedImage::finishLoading):
1572         * loader/cache/CachedImage.h:
1573         * loader/cache/CachedRawResource.cpp:
1574         (WebCore::CachedRawResource::calculateIncrementalDataChunk):
1575         Returns a pointer to the data corresponding to the current chunk
1576         and its length.
1577         (WebCore::CachedRawResource::addDataBuffer): Assert to make sure
1578         this is only called when BufferData option is present. Use
1579         calculateIncrementalDataChunk().
1580         (WebCore::CachedRawResource::addData): Assert to make sure this is
1581         only called when DoNotBufferData option is present.
1582         (WebCore::CachedRawResource::finishLoading):
1583         (WebCore::CachedRawResource::notifyClientsDataWasReceived): Helper
1584         private function to notify the clients about data received.
1585         * loader/cache/CachedRawResource.h:
1586         * loader/cache/CachedResource.cpp:
1587         (WebCore::CachedResource::addDataBuffer):
1588         (WebCore::CachedResource::addData):
1589         (WebCore::CachedResource::finishLoading):
1590         * loader/cache/CachedResource.h:
1591         * loader/cache/CachedSVGDocument.cpp:
1592         (WebCore::CachedSVGDocument::finishLoading):
1593         * loader/cache/CachedSVGDocument.h:
1594         * loader/cache/CachedScript.cpp:
1595         (WebCore::CachedScript::finishLoading):
1596         * loader/cache/CachedScript.h:
1597         * loader/cache/CachedShader.cpp:
1598         (WebCore::CachedShader::finishLoading):
1599         * loader/cache/CachedShader.h:
1600         * loader/cache/CachedTextTrack.cpp:
1601         (WebCore::CachedTextTrack::addDataBuffer):
1602         (WebCore::CachedTextTrack::finishLoading):
1603         * loader/cache/CachedTextTrack.h:
1604         * loader/cache/CachedXSLStyleSheet.cpp:
1605         (WebCore::CachedXSLStyleSheet::finishLoading):
1606         * loader/cache/CachedXSLStyleSheet.h:
1607
1608 2013-06-14  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1609
1610         [EFL] Fix build when DRAG_SUPPORT is set OFF
1611         https://bugs.webkit.org/show_bug.cgi?id=117628
1612
1613         Reviewed by Gyuyoung Kim.
1614
1615         Add guard around Clipboard::declareAndWriteDragImage.
1616
1617         * platform/efl/ClipboardEfl.cpp:
1618
1619 2013-06-13  Simon Fraser  <simon.fraser@apple.com>
1620
1621         Sometimes we stick in slow scrolling mode even after leaving a page
1622         https://bugs.webkit.org/show_bug.cgi?id=117622
1623
1624         Reviewed by Sam Weinig.
1625         
1626         ScrollingCoordinator, and thus the scrolling state tree, is owned by Page,
1627         and so persists when navigating between cached pages. We do give the ScrollingStateTree
1628         a new ScrollingStateScrollingNode on navigation, however the ScrollingStateScrollingNode
1629         would not have dirty flags set for, say, WheelEventHandlerCount if the document had
1630         no wheel handlers. And because that dirty flag wasn't set, ScrollingTree::commitNewTreeState()
1631         would fail to update m_hasWheelEventHandlers, so we'd remain in slow scrolling.
1632         
1633         Fix by having ScrollingStateTree remember if it's been given a new root ScrollingStateScrollingNode,
1634         and making ScrollingTree::commitNewTreeState() to the right thing in that case.
1635         
1636         Also fix a couple of issues with the tiled scrolling indicator. First, on cached page
1637         navigation, the indicator color would show the state for the old page, because
1638         ScrollingCoordinatorMac::commitTreeState() checked scrollingTree()->hasWheelEventHandlers()
1639         before the scrolling thread has committed the new scrolling tree.
1640         
1641         Second, the color change would animate, so stop that.
1642
1643         Not testable, since tests can only dump the scrolling state tree.
1644
1645         * page/scrolling/ScrollingStateTree.cpp:
1646         (WebCore::ScrollingStateTree::ScrollingStateTree):
1647         (WebCore::ScrollingStateTree::attachNode):
1648         (WebCore::ScrollingStateTree::commit):
1649         * page/scrolling/ScrollingStateTree.h:
1650         (WebCore::ScrollingStateTree::hasNewRootStateNode):
1651         * page/scrolling/ScrollingTree.cpp:
1652         (WebCore::ScrollingTree::commitNewTreeState):
1653         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1654         (WebCore::ScrollingCoordinatorMac::commitTreeState):
1655         * platform/graphics/ca/mac/TileController.mm:
1656         (-[WebTiledScrollingIndicatorLayer init]): Turn off borderColor implicit animations.
1657
1658 2013-06-13  Peter Gal  <galpeter@inf.u-szeged.hu>
1659
1660         [curl] Merge http response header values
1661         https://bugs.webkit.org/show_bug.cgi?id=117342
1662
1663         Reviewed by Brent Fulgham.
1664
1665         According to the HTTP RFC some HTTP header values should be
1666         merged if multiple entries for the same header exists.
1667
1668         * platform/network/curl/ResourceHandleManager.cpp:
1669         (WebCore::isAppendableHeader):
1670         (WebCore::headerCallback):
1671
1672 2013-06-13  Simon Fraser  <simon.fraser@apple.com>
1673
1674         Should not call firePaintRelatedMilestones() for "update control tints" paint pass
1675         https://bugs.webkit.org/show_bug.cgi?id=117624
1676
1677         Reviewed by Sam Weinig.
1678
1679         When window activation changes, we do a fake paint pass that is just used to
1680         invalidate controls that change their appearance in background windows. This fake
1681         paint should not be recorded in the inspector, and it should not cause paint-related
1682         milestones to fire.
1683
1684         * page/FrameView.cpp:
1685         (WebCore::FrameView::paintContents):
1686
1687 2013-06-13  Dean Jackson  <dino@apple.com>
1688
1689         Clicking on snapshotting plug-ins does not restart them
1690         https://bugs.webkit.org/show_bug.cgi?id=117620
1691         <rdar://problem/13821729>
1692
1693         Reviewed by Simon Fraser.
1694
1695         HTMLPlugInElement has an event handler which would return
1696         immediately if the element was not snapshotted, restarting
1697         or playing. There is a case it missed, which was snapshotting
1698         (WaitingForSnapshot to be precise). If we get a click in this
1699         state then it should immediately restart.
1700
1701         * html/HTMLPlugInElement.h: Move defaultEventHandler to public (we call it from the child class).
1702         * html/HTMLPlugInImageElement.cpp:
1703         (WebCore::HTMLPlugInImageElement::defaultEventHandler): If there is a click on a snapshotting
1704         plug-in, then call restart.
1705         * html/HTMLPlugInImageElement.h: Virtual defaultEventHandler declaration.
1706
1707 2013-06-13  Zoltan Horvath  <zoltan@webkit.org>
1708
1709         Use borderAndPadding[Before,After]() instead of border[Before,After]() + padding[Before,After]()
1710         https://bugs.webkit.org/show_bug.cgi?id=117611
1711
1712         Reviewed by Dirk Schulze.
1713
1714         I added a new function called borderAndPaddingAfter(), since we already had borderAndPaddingBefore(). I changed
1715         every separate additions to the old/new function. This change makes the code shorter and more straightforward.
1716
1717         Behavior hasn't changed, no new tests were needed.
1718
1719         * rendering/InlineFlowBox.cpp:
1720         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1721         * rendering/RenderBlock.cpp:
1722         (WebCore::RenderBlock::layoutBlock):
1723         (WebCore::RenderBlock::marginBeforeEstimateForChild):
1724         (WebCore::RenderBlock::layoutBlockChildren):
1725         (WebCore::RenderBlock::paintColumnRules):
1726         (WebCore::RenderBlock::columnRectAt):
1727         (WebCore::RenderBlock::relayoutForPagination):
1728         (WebCore::RenderBlock::adjustRectForColumns):
1729         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
1730         (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
1731         (WebCore::RenderBlock::adjustForColumns):
1732         * rendering/RenderBlockLineLayout.cpp:
1733         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
1734         (WebCore::RenderBlock::layoutInlineChildren):
1735         * rendering/RenderBoxModelObject.h:
1736         (WebCore::RenderBoxModelObject::borderAndPaddingStart):
1737         (WebCore::RenderBoxModelObject::borderAndPaddingBefore):
1738         (WebCore::RenderBoxModelObject::borderAndPaddingAfter):
1739         (WebCore::RenderBoxModelObject::borderAndPaddingLogicalHeight):
1740         * rendering/RenderMultiColumnBlock.cpp:
1741         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
1742         * rendering/RenderMultiColumnSet.cpp:
1743         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
1744         (WebCore::RenderMultiColumnSet::prepareForLayout):
1745         (WebCore::RenderMultiColumnSet::columnRectAt):
1746         * rendering/RenderTableCell.cpp:
1747         (WebCore::RenderTableCell::computeIntrinsicPadding):
1748         (WebCore::RenderTableCell::cellBaselinePosition):
1749         * rendering/RenderTableSection.cpp:
1750         (WebCore::RenderTableSection::calcRowLogicalHeight):
1751         (WebCore::RenderTableSection::layoutRows):
1752         (WebCore::RenderTableSection::firstLineBoxBaseline):
1753         * rendering/RootInlineBox.cpp:
1754         (WebCore::RootInlineBox::lineSnapAdjustment):
1755         (WebCore::RootInlineBox::selectionTop):
1756         (WebCore::RootInlineBox::ascentAndDescentForBox):
1757
1758 2013-06-13  Andreas Kling  <akling@apple.com>
1759
1760         Move Node::shouldUseInputMethod() to Element.
1761         <http://webkit.org/b/117603>
1762
1763         Reviewed by Antti Koivisto.
1764
1765         This method is only ever called on Elements, so move it off of Node.
1766
1767         * dom/Element.cpp:
1768         (WebCore::Element::shouldUseInputMethod):
1769         * dom/Element.h:
1770         * dom/Node.cpp:
1771         * dom/Node.h:
1772         * html/HTMLInputElement.h:
1773         * html/HTMLTextAreaElement.h:
1774
1775 2013-06-13  Max Vujovic  <mvujovic@adobe.com>
1776
1777         [CSS Regions] Selection dragged from a region paints its background
1778         https://bugs.webkit.org/show_bug.cgi?id=117607
1779
1780         Reviewed by Alexandru Chiculita.
1781
1782         When a RenderFlowThread is in the selection paint phase, tell its layer to paint with the
1783         selection only behavior. This way, only foregrounds and not backgrounds will be painted in
1784         the dragged selection.
1785
1786         Manual test: ManualTests/regions/drag-selection-painting.html
1787
1788         * rendering/RenderFlowThread.cpp:
1789         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
1790
1791 2013-06-13  Zoltan Horvath  <zoltan@webkit.org>
1792
1793         [CSS Shapes][CSS Regions] Respect bottom positioned shapes and content adjustment inside shapes
1794         https://bugs.webkit.org/show_bug.cgi?id=117599
1795
1796         Reviewed by David Hyatt.
1797
1798         In r150478 I added support for multiple positioned shape-insides on regions, this patch covers the cases when a shape
1799         is positioned to the bottom of the region or the region contains a shape which forces the content to be adjusted inside
1800         the shape (e.g. we have a triangle shape and the first line needs to be started at the first position where it fits).
1801         I introduced a new helper function to update the current shape and the current line segments in the flow thread cases. With
1802         this new helper function all the logic which calculates the segments for shape-inside on regions is located in one function.
1803
1804         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html
1805                fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment.html
1806                fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html
1807                fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment.html
1808
1809         * rendering/RenderBlock.h: Add new helper's declaration
1810         * rendering/RenderBlockLineLayout.cpp:
1811         (WebCore::LineLayoutState::LineLayoutState): Add a member to carry adjustment for flow thread cases.
1812         (WebCore::LineLayoutState::adjustedLogicalLineTop): Add new member.
1813         (WebCore::LineLayoutState::setAdjustedLogicalLineTop): Add new setter for the new member.
1814         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Move flow thread case to its helper function.
1815         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Added new helper for flow thread cases.
1816         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Save adjustment for flow thread cases.
1817
1818 2013-06-13  Mihai Tica  <mitica@adobe.com>
1819
1820         [CSS Background Blending] Enable CSS Background blending for layers with SVGs.
1821
1822         The change implies adding the blending parameter for SVGImage
1823         https://bugs.webkit.org/show_bug.cgi?id=117588
1824
1825         Reviewed by Dirk Schulze.
1826
1827         Tests: css3/compositing/background-blend-mode-image-svg.html
1828                css3/compositing/background-blend-mode-svg-color.html
1829
1830         * svg/graphics/SVGImage.cpp:
1831         (WebCore::SVGImage::draw):
1832
1833 2013-06-13  Mihai Tica  <mitica@adobe.com>
1834
1835         Updating the -webkit-background-blend-mode property dynamically does not trigger a redraw of the element.
1836
1837         Adding krit's fix: actual blending values should be compared, not the sets.
1838         https://bugs.webkit.org/show_bug.cgi?id=117223
1839
1840         Reviewed by Dirk Schulze.
1841
1842         Test: css3/compositing/background-blend-mode-image-color-dynamic.html
1843
1844         * rendering/style/FillLayer.cpp:
1845         (WebCore::FillLayer::operator==):
1846
1847 2013-06-13  Beth Dakin  <bdakin@apple.com>
1848
1849         Headers and footers should be pinned to the left edge of the window when scrolling 
1850         horizontally, even when zoomed
1851         https://bugs.webkit.org/show_bug.cgi?id=117562
1852         -and corresponding-
1853         <rdar://problem/14006745>
1854
1855         Reviewed by Sam Weinig.
1856
1857         We really want to use the width value from scrollOffsetForFixedPosition() for the 
1858         banner with a scaled factor of 1. So if there is a different scale factor, re-
1859         compute this value specifically for the banners. 
1860         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1861         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1862
1863 2013-06-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1864
1865         Support byte and octet types in bindings generators
1866         https://bugs.webkit.org/show_bug.cgi?id=117547
1867
1868         Reviewed by Kentaro Hara.
1869
1870         Add support for byte and octet IDL types to the bindings
1871         generator:
1872         http://dev.w3.org/2006/webapi/WebIDL/#idl-byte
1873         http://dev.w3.org/2006/webapi/WebIDL/#idl-octet
1874
1875         No new tests, covered by existing layout tests and by new
1876         bindings tests.
1877
1878         No new tests, covered by bindings tests and:
1879         fast/js/webidl-type-mapping.html
1880
1881         * WebCore.exp.in: Export new symbols for mac port.
1882         * bindings/js/JSDOMBinding.cpp:
1883         * bindings/js/JSDOMBinding.h: Add toInt8() / toUInt8()
1884         methods to convert from JSValue to int8_t / uint8_t as
1885         specified by Web IDL.
1886
1887         * bindings/js/JSDataViewCustom.cpp: Remove custom code for
1888         getInt8, getUInt8, setInt8, setUInt8 now that byte and octet
1889         types are supported by the bindings generator.
1890
1891         * bindings/scripts/CodeGeneratorCPP.pm:
1892         * bindings/scripts/CodeGeneratorGObject.pm:
1893         * bindings/scripts/CodeGeneratorJS.pm:
1894         * bindings/scripts/CodeGeneratorObjC.pm:
1895         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1896         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1897         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1898         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1899         * bindings/scripts/test/JS/JSTestObj.cpp:
1900         * bindings/scripts/test/JS/JSTestObj.h:
1901         * bindings/scripts/test/ObjC/DOMTestObj.h:
1902         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1903         * bindings/scripts/test/TestObj.idl: Add tests for byte and octet types.
1904         * html/canvas/DataView.idl: Remove [Custom] extended attribute for
1905         getInt8, getUInt8, setInt8, setUInt8 and use newly supported byte / octet
1906         types.
1907
1908 2013-06-13  Timothy Hatcher  <timothy@apple.com>
1909
1910         Revert r150339 since it causes a hang while paused in the Web Inspector in other apps.
1911
1912         https://bugs.webkit.org/show_bug.cgi?id=117596
1913
1914         Reviewed by Joseph Pecoraro.
1915
1916         * platform/mac/EventLoopMac.mm:
1917         (WebCore::EventLoop::cycle):
1918
1919 2013-06-13  Brent Fulgham  <bfulgham@apple.com>
1920
1921         [Windows] Unreviewed gardening.  Remove dangling 'strings' folder from solution.
1922
1923         * WebCore.vcxproj/WebCore.vcxproj.filters: Get rid of 'strings' that was orphaned by
1924         recent file reorganization.
1925
1926 2013-06-13  Praveen R Jadhav  <praveen.j@samsung.com>
1927
1928         Avoid unwanted thread hops in ScriptProcessorNode when 'onaudioprocess' listener is not set.
1929         https://bugs.webkit.org/show_bug.cgi?id=117578.
1930
1931         Reviewed by Darin Adler.
1932
1933         ScriptProcessorNode process operation continues to dispatch AudioProcessingEvent
1934         even though 'onaudioprocess' listener is not set. This results in unwanted thread hops.
1935         Code is optimized to dispatch AudioProcessingEvent only if the listener is set.
1936
1937         No new tests, already covered by existing tests.
1938
1939         * Modules/webaudio/ScriptProcessorNode.cpp:
1940         (WebCore::ScriptProcessorNode::ScriptProcessorNode):
1941         (WebCore::ScriptProcessorNode::process):
1942         (WebCore::ScriptProcessorNode::setOnaudioprocess):
1943         * Modules/webaudio/ScriptProcessorNode.h:
1944         (WebCore::ScriptProcessorNode::onaudioprocess):
1945
1946 2013-06-13  Max Vujovic  <mvujovic@adobe.com>
1947
1948         [CSS Regions] -webkit-background-clip: text; does not clip the background in regions
1949         https://bugs.webkit.org/show_bug.cgi?id=117566
1950
1951         Reviewed by Alexandru Chiculita.
1952
1953         This patch enables -webkit-background-clip: text; on regions.
1954
1955         Test: fast/regions/webkit-background-clip-text.html
1956
1957         * rendering/RenderFlowThread.cpp:
1958         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
1959             Force black text if we're in the text clip paint phase. This makes sure the text's alpha
1960             channel does not affect the final opacity of the background clipping result. Rather,
1961             the text's alpha channel affects the amount of blending between the text color
1962             and the background.
1963         * rendering/RenderRegion.cpp:
1964         (WebCore::shouldPaintRegionContentsInPhase):
1965             Factor out a function to check if we should paint the region contents in a particular
1966             phase. Add "PaintPhaseTextClip" so that we draw the contents in the text clipping phase.
1967         (WebCore::RenderRegion::paintObject):
1968             Call shouldPaintRegionContentsInPhase instead of doing the phase checks directly in this
1969             function. Move, update, and clarify the surrounding comments.
1970
1971 2013-06-13  Anton Obzhirov  <a.obzhirov@samsung.com>
1972
1973         [CSS Regions] Regions auto-height and absolute positioning bug
1974         https://bugs.webkit.org/show_bug.cgi?id=111092
1975
1976         Reviewed by David Hyatt.
1977
1978         During last layout that should update the auto-height regions new auto-height region height
1979         is calculated correctly based on the text content, but it requires extra step 
1980         to reposition the render block after new logical height is set (correct logical height becomes
1981         available only during last layout). 
1982
1983         Tests: fast/regions/autoheight-abspos-bottom-align.html
1984
1985         * rendering/RenderRegion.cpp:
1986         (WebCore::RenderRegion::updateLogicalHeight):
1987
1988 2013-06-13  Brent Fulgham  <bfulgham@webkit.org>
1989
1990         [WinCairo] Unreviewed build correction.
1991
1992         * WebCore.vcxproj/WebCoreCairo.props: Use proper WebKit_Libraries
1993         environment variable, rather than older WebKitLibraries.
1994
1995 2013-06-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1996
1997         Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
1998         https://bugs.webkit.org/show_bug.cgi?id=117593
1999
2000         Reviewed by Geoffrey Garen.
2001
2002         Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
2003         calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
2004         when we already know the value is a int32 / uint32.
2005
2006         No new tests, no behavior change.
2007
2008         * bindings/js/JSDOMBinding.cpp:
2009
2010 2013-06-13  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2011
2012         Setting overflow:hidden on position:absolute does not repaint hidden content
2013         https://bugs.webkit.org/show_bug.cgi?id=116994
2014
2015         Reviewed by Simon Fraser.
2016
2017         Since a container which has overflow clip of RenderBox which has self painting layer doesn't have a rect of the RenderBox as visual overflow,
2018         the container should not clip request repainting rect of the RenderBox.
2019
2020         Test: fast/repaint/change-overflow-and-display-of-relative.html
2021
2022         * rendering/RenderBox.cpp:
2023         (WebCore::RenderBox::computeRectForRepaint):
2024         * rendering/RenderLayerModelObject.cpp:
2025         (WebCore::RenderLayerModelObject::shouldUseClipForRepaint): If this has self painting layer, we should not clip for repaint.
2026         * rendering/RenderLayerModelObject.h:
2027
2028 2013-06-13  Mihai Tica  <mitica@adobe.com>
2029
2030         [CSS Background Blending] Gradients don't blend with any of the layers behind.
2031         First, allow the layers behind opaque gradients to be drawn, then add the blending filters
2032         when working with gradients.
2033
2034         https://bugs.webkit.org/show_bug.cgi?id=117532
2035
2036         Reviewed by Dirk Schulze.
2037
2038         Tests: css3/compositing/background-blend-mode-gradient-color.html
2039                css3/compositing/background-blend-mode-gradient-gradient.html
2040                css3/compositing/background-blend-mode-gradient-image.html
2041                css3/compositing/background-blend-mode-multiple-background-layers.html
2042
2043         * platform/graphics/GeneratorGeneratedImage.cpp:
2044         (WebCore::GeneratorGeneratedImage::draw):
2045         * rendering/RenderBox.cpp:
2046         (WebCore::RenderBox::paintFillLayers):
2047
2048 2013-06-13  Michael Brüning  <michael.bruning@digia.com>
2049
2050         [Qt][Mac] Disable QTKit video on OS X.
2051         https://bugs.webkit.org/show_bug.cgi?id=117591
2052
2053         Reviewed by Tor Arne Vestbø.
2054
2055         Deployment of the same Qt binaries to different
2056         Mac OS X version makes it impossible to link against
2057         the correct WebKitSystemInterface version at build time.
2058
2059         No new tests, no behavioural change.
2060
2061         * WebCore.pri:
2062
2063 2013-06-13  Morten Stenshorne  <mstensho@opera.com>
2064
2065         Column balancing support in the region based multicol implementation
2066         https://bugs.webkit.org/show_bug.cgi?id=116033
2067
2068         Start by setting the column height to the flow thread's height divided
2069         by the number of columns. Then stretch the column height until
2070         contents fits without creating overflowing columns, or until the
2071         maximum allowed column height is reached, whichever comes first. This
2072         may require several layout iterations (but normally only a
2073         couple). For each time we stretch, stretch by the least amount
2074         required to make a difference to which box goes where.
2075
2076         Also make sure that the columns get tall enough to honor orphans
2077         and widows settings.
2078
2079         This change takes some tiny steps in preparing for multiple column
2080         set support. There is also some minor cleanup and bugfixing; see
2081         details below.
2082
2083         Reviewed by David Hyatt.
2084
2085         Tests: fast/multicol/newmulticol/balance-images.html
2086                fast/multicol/newmulticol/balance-maxheight1.html
2087                fast/multicol/newmulticol/balance-maxheight2.html
2088                fast/multicol/newmulticol/balance1.html
2089                fast/multicol/newmulticol/balance2.html
2090                fast/multicol/newmulticol/balance3.html
2091                fast/multicol/newmulticol/balance4.html
2092                fast/multicol/newmulticol/balance5.html
2093                fast/multicol/newmulticol/balance6.html
2094                fast/multicol/newmulticol/balance7.html
2095                fast/multicol/newmulticol/balance8.html
2096                fast/multicol/newmulticol/balance9.html
2097                fast/multicol/newmulticol/cell-shrinkback.html
2098                fast/multicol/newmulticol/columns-shorthand-parsing.html
2099                fast/multicol/newmulticol/orphans-and-widows-balance.html
2100                fast/multicol/newmulticol/single-line.html
2101
2102         * rendering/RenderBlock.cpp:
2103         (WebCore::RenderBlock::adjustForUnsplittableChild):
2104         (WebCore::RenderBlock::setPageBreak):
2105         (WebCore):
2106         (WebCore::RenderBlock::updateMinimumPageHeight):
2107         (WebCore::calculateMinimumPageHeight):
2108         (WebCore::RenderBlock::adjustLinePositionForPagination):
2109         (WebCore::RenderBlock::adjustBlockChildForPagination): If no lines
2110         cross the boundaries, we need to report where blocks cross
2111         instead, so that the column balancer knows how much to stretch
2112         columns if necessary.
2113         * rendering/RenderBlock.h:
2114         * rendering/RenderFlowThread.h:
2115         * rendering/RenderMultiColumnBlock.cpp:
2116         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
2117         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
2118         (WebCore::RenderMultiColumnBlock::relayoutForPagination):
2119         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
2120         * rendering/RenderMultiColumnBlock.h:
2121         (WebCore::RenderMultiColumnBlock::columnHeightAvailable):
2122         (WebCore::RenderMultiColumnBlock::requiresBalancing):
2123         (RenderMultiColumnBlock):
2124         * rendering/RenderMultiColumnFlowThread.cpp:
2125         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
2126         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
2127         (WebCore):
2128         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
2129         * rendering/RenderMultiColumnFlowThread.h:
2130         (RenderMultiColumnFlowThread):
2131         * rendering/RenderMultiColumnSet.cpp: Get rid of
2132         RenderMultiColumnSet::updateLogicalHeight() override. Make
2133         RenderMultiColumnSet behave more like normal blocks, by having
2134         computeLogicalHeight() calculate logical top in addition to
2135         height, just like any other block.
2136         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2137         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset): This
2138         method will become more meaningful once we add support for
2139         multiple column sets.
2140         (WebCore):
2141         (WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
2142         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
2143         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
2144         (WebCore::RenderMultiColumnSet::recordSpaceShortage):
2145         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
2146         (WebCore::RenderMultiColumnSet::prepareForLayout):
2147         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
2148         (WebCore::RenderMultiColumnSet::columnCount):
2149         (WebCore::RenderMultiColumnSet::columnIndexAtOffset):
2150         repaintFlowThreadContent() could end up in an infinite loop
2151         because columnIndexAtOffset() could return UINT_MAX
2152         (subtracting 1 from unsigned 0, which columnCount() could return),
2153         which an unsigned integer obviously can never become larger
2154         than. Also always call columnIndexAtOffset() if we want to get the
2155         column index for some offset, rather than doing it on our own
2156         sometimes. To make this work also during layout, we cannot just
2157         return the last column created so far if we're past it, since
2158         adding new columns is exactly what we want to do at this point.
2159         * rendering/RenderMultiColumnSet.h:
2160         (RenderMultiColumnSet):
2161
2162 2013-06-12  Anders Carlsson  <andersca@apple.com>
2163
2164         Remove the notion of inactive plug-ins
2165         https://bugs.webkit.org/show_bug.cgi?id=117570
2166         <rdar://problem/13484213>
2167
2168         Reviewed by Tim Horton.
2169
2170         Remove RenderEmbeddedObject::PluginInactive and the replacement text.
2171
2172         * English.lproj/Localizable.strings:
2173         * platform/LocalizedStrings.cpp:
2174         * platform/LocalizedStrings.h:
2175         * rendering/RenderEmbeddedObject.cpp:
2176         (WebCore::unavailablePluginReplacementText):
2177         * rendering/RenderEmbeddedObject.h:
2178
2179 2013-06-12  Dean Jackson  <dino@apple.com>
2180
2181         [Mac] Change default Traditional Chinese serif font on 10.9
2182         https://bugs.webkit.org/show_bug.cgi?id=117568
2183
2184         Reviewed by Alexey Proskuryakov.
2185
2186         Change default font on newer versions of OS X.
2187
2188         * page/mac/SettingsMac.mm:
2189         (WebCore::Settings::initializeDefaultFontFamilies): Use 'Songti TC'
2190         on 10.9 and above.
2191
2192 2013-06-12  Dean Jackson  <dino@apple.com>
2193
2194         [Mac] Change default Simplified Chinese serif font on 10.9
2195         https://bugs.webkit.org/show_bug.cgi?id=117567
2196
2197         Reviewed by Alexey Proskuryakov.
2198
2199         Change default font on newer versions of OS X.
2200
2201         * page/mac/SettingsMac.mm:
2202         (WebCore::Settings::initializeDefaultFontFamilies): Use 'Songti SC'
2203         instead of 'STSong' on newer systems.
2204
2205 2013-06-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2206
2207         Fix crashes due to failed ImageBuffer allocation
2208         https://bugs.webkit.org/show_bug.cgi?id=117541
2209
2210         Reviewed by Andreas Kling.
2211
2212         From Blink r152268 by <pdr@chromium.org>
2213
2214         A crash can happen due to a failed ImageBuffer allocation in
2215         SVGImage::drawPatternForContainer(). Added a check for that failed allocation.
2216
2217         * svg/graphics/SVGImage.cpp:
2218         (WebCore::SVGImage::drawPatternForContainer):
2219
2220 2013-06-12  Eduardo Lima Mitev  <elima@igalia.com>
2221
2222         [atk] Replace deprecated call to atk_document_get_locale() in DumpRenderTree
2223         https://bugs.webkit.org/show_bug.cgi?id=115647
2224
2225         Reviewed by Martin Robinson.
2226
2227         Override the get_object_locale() method of WebkitAccessibleWrapperAtk's internal
2228         AtkObject, to include custom implementations for AtkDocument and AtkText objects,
2229         taking the logic as-is from AtkDocument::get_document_locale() and DumpRenderTree's
2230         AccessibilityUIElementAtk::language(), respectively.
2231
2232         Apart from improving encapsulation, this avoids calling deprecated get_document_locale()
2233         method.
2234
2235         No new functionality, no new tests.
2236
2237         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
2238         (webkitAccessibleDocumentInterfaceInit): Chains implementation of
2239         AtkDocument::get_document_locale() to AtkObject::get_object_locale().
2240         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2241         (webkitAccessibleGetObjectLocale): Add implementation of locale resolution for
2242         objects of type AtkDocument and AtkText.
2243         (webkitAccessibleClassInit): Override AtkObject::get_object_locale() method.
2244
2245 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
2246
2247         [GTK] Move more build targets for source code that's free of layer violations into libPlatform
2248         https://bugs.webkit.org/show_bug.cgi?id=115936
2249
2250         Reviewed by Martin Robinson.
2251
2252         No new tests - no new functionality.
2253
2254         * GNUmakefile.list.am: Move more build targets under the platform_sources and platformgtk_sources listing.
2255         These build targets represent source files that are already free of platform layer violations and are as such
2256         ready to be pushed down from the WebCore layer into the Platform layer.
2257
2258 2013-06-12  Ruth Fong  <ruth_fong@apple.com>
2259
2260         "Open Video in New Window" doesn't make sense in fullscreen
2261         https://bugs.webkit.org/show_bug.cgi?id=117556
2262
2263         Reviewed by Beth Dakin.
2264
2265         No new tests needed.
2266
2267         * WebCore.exp.in: Added WebKit2 hook for mediaIsInFullscreen() method.
2268
2269 2013-06-12  Ryosuke Niwa  <rniwa@webkit.org>
2270
2271         Accessibility code assumes an area element's parent is a map element
2272         https://bugs.webkit.org/show_bug.cgi?id=117496
2273
2274         Reviewed by Chris Fleizach.
2275
2276         We can't make such an assumption. Scripts can insert any element between area and map elements.
2277
2278         Merge https://chromium.googlesource.com/chromium/blink/+/b6f486284f08c52904701c93e1ec0b7d6e76af9f.
2279
2280         Test: accessibility/image-map-with-indirect-area-crash.html
2281
2282         * accessibility/AccessibilityRenderObject.cpp:
2283         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
2284
2285 2013-06-12  Robert Hogan  <robert@webkit.org>
2286
2287         Whitespace between inlines with nowrap and a shrink-to-fit parent gets a line-break when it shouldn't
2288         https://bugs.webkit.org/show_bug.cgi?id=117370
2289
2290         Reviewed by David Hyatt.
2291
2292         Test: fast/text/whitespace/inline-whitespace-wrapping-8.html
2293
2294         A no-wrap inline shouldn't include trailing space when deciding whether it fits on a line. 
2295         Likewise when we finish iterating through the objects on a line we should clear our linebreak
2296         if the only thing that prevents us fitting on the line is our collapsed trailing whitespace.
2297          
2298         Removing the trailing space from this measurement means we need to watch out for potential
2299         breaks between no-wrap inlines, in particular if we leave a no-wrap inline ignoring spaces
2300         and enter an autowrap inline then we need to mark the beginning of the autowrap inline
2301         as a potential linebreak. The test fast/text/whitespace/inline-whitespace-wrapping-5.html 
2302         is an example of such a case.
2303
2304         * rendering/RenderBlockLineLayout.cpp:
2305         (WebCore::LineWidth::LineWidth):
2306         (WebCore::LineWidth::fitsOnLine):
2307         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
2308         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
2309         (WebCore::LineWidth::setTrailingWhitespaceWidth):
2310         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2311
2312 2013-06-12  Bem Jones-Bey  <bjonesbe@adobe.com>
2313
2314         [CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry
2315         https://bugs.webkit.org/show_bug.cgi?id=116745
2316
2317         Reviewed by Dirk Schulze.
2318
2319         If ry is not supplied, it now defaults to the rx value. Also, if rx
2320         and ry are not supplied, they default to 0px. This also has the effect
2321         that the computed style for any rectangle or inset-rectangle now
2322         contains all six parameters.
2323
2324         If rx > width/2 then it is clamped to width/2, and if ry > height/2,
2325         then it is clamped to height/2. This happens at layout time because
2326         given mixed units and relative units, that is the only time this
2327         determination can be made.
2328
2329         Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius.html
2330                fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius.html
2331
2332         * css/BasicShapeFunctions.cpp:
2333         (WebCore::valueForBasicShape): Remove checks for undefined, since rx
2334             and ry cannot be undefined in BasicShapes anymore.
2335         (WebCore::basicShapeForValue): If radii are undefined in CSS, set
2336             default values in the BasicShape, per the spec.
2337         * rendering/ExclusionShape.cpp:
2338         (WebCore::ensureRadiiDoNotOverlap): Utility method to ensure radii
2339             don't overlap.
2340         (WebCore::ExclusionShape::createExclusionShape): Remove defaulting to
2341             zero, clamp radii per the spec.
2342         * rendering/style/BasicShapes.cpp:
2343         (WebCore::BasicShapeRectangle::path): Remove defaulting.
2344         (WebCore::BasicShapeRectangle::blend): Ditto.
2345         (WebCore::BasicShapeInsetRectangle::path): Ditto.
2346         (WebCore::BasicShapeInsetRectangle::blend): Ditto.
2347         * rendering/style/BasicShapes.h:
2348         (WebCore::BasicShapeRectangle::BasicShapeRectangle): Remove defaulting
2349             to undefined for radii.
2350         (WebCore::BasicShapeRectangle::setCornerRadiusX): Add assert to
2351             prevent undefined.
2352        (WebCore::BasicShapeRectangle::setCornerRadiusY): Add assert to
2353             prevent undefined.
2354         (WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle): Ditto.
2355         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX): Add assert to
2356             prevent undefined.
2357        (WebCore::BasicShapeInsetRectangle::setCornerRadiusY): Add assert to
2358             prevent undefined.
2359
2360 2013-06-11  Brent Fulgham  <bfulgham@apple.com>
2361
2362         [Windows] Support Title UI Element Accessibility Attribute
2363         https://bugs.webkit.org/show_bug.cgi?id=117530
2364
2365         Reviewed by Anders Carlsson.
2366
2367         Fixes: accessibility/list-item-role.html
2368                accessibility/hidden-legend.html
2369
2370         * accessibility/win/AccessibilityObjectWrapperWin.cpp:
2371         (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Extend to support access
2372         for the Title UI Element object.
2373         * accessibility/win/AccessibilityObjectWrapperWin.h: Revise interface to use Variant output,
2374         which is more in keeping with the Mac's 'id' method signature.
2375
2376 2013-06-12  Ralph Thomas  <ralpht@gmail.com>
2377
2378         [CSS Shaders] Animations and transitions should use validated custom programs
2379         https://bugs.webkit.org/show_bug.cgi?id=117550
2380
2381         Run filters used for animations and transitions through RenderLayer::computeFilterOperations
2382         in order to validate custom filter operations.
2383
2384         Reviewed by Alexandru Chiculita.
2385
2386         No new tests as no platform can run custom filters with accelerated animations yet.
2387
2388         * rendering/RenderLayerBacking.cpp:
2389         (WebCore::RenderLayerBacking::startAnimation):
2390         (WebCore::RenderLayerBacking::startTransition):
2391
2392 2013-06-12  Ruth Fong  <ruth_fong@apple.com>
2393
2394         Allow for toggling fullscreen on <video> elements
2395         https://bugs.webkit.org/show_bug.cgi?id=117220
2396
2397         Reviewed by Dean Jackson.
2398
2399         This patch adds the ability for fullscreen
2400         context menu item on <video> elements to switch between "Enter Fullscreen"
2401         and "Exit Fullscreen" and behave appropriately.
2402
2403         No new tests. media/context-menu-action.html,
2404         which has been disabled by bug 116651, is used to test context menus.
2405
2406         * English.lproj/Localizable.strings: Add "Exit Fullscreen" string.
2407         * html/HTMLMediaElement.cpp:
2408         (WebCore::HTMLMediaElement::toggleFullscreenState): Added to appropriately enter/exit fullscreen.
2409         * html/HTMLMediaElement.h:
2410         * page/ContextMenuController.cpp:
2411         * platform/ContextMenuItem.h:
2412         * platform/LocalizedStrings.cpp:
2413         * platform/LocalizedStrings.h:
2414         Updated to rename variables more appropriately to reflect the toggle-ability of video fullscreen.
2415         * rendering/HitTestResult.cpp:
2416         (WebCore::HitTestResult::mediaIsInFullscreen): Added to check if an element
2417         was a media element in fullscreen.
2418         (WebCore::HitTestResult::toggleMediaFullscreenState): Added to hook into
2419         HTMLMediaElement::toggleFullscreenState.
2420         * rendering/HitTestResult.h:
2421
2422 2013-06-12  Sergio Villar Senin  <svillar@igalia.com>
2423
2424         Skipping {}, () and [] blocks while error recovering in CSS
2425         https://bugs.webkit.org/show_bug.cgi?id=116071
2426
2427         Reviewed by Darin Adler.
2428
2429         From Blink r150201 and r150755 by <serya@chromium.org>
2430
2431         Test: fast/css/parsing-expr-error-recovery.html
2432
2433         The CSS parser should properly recover from invalid {}, () and []
2434         blocks skipping them instead of discarding the whole declaration
2435         as invalid. This merge is actually made of two different changes
2436         from Blink, the original one that fixes the bug and another one
2437         which refactors a bit the code making it more legible.
2438
2439         * css/CSSGrammar.y.in:
2440
2441 2013-06-12  Alberto Garcia  <agarcia@igalia.com>
2442
2443         [BlackBerry] Remove dead WebDOM code
2444         https://bugs.webkit.org/show_bug.cgi?id=113370
2445
2446         Reviewed by Anders Carlsson.
2447
2448         BlackBerry PR 347565
2449         Internally reviewed by Charles Wei.
2450
2451         * PlatformBlackBerry.cmake:
2452
2453 2013-06-12  Daniel Bates  <dabates@apple.com>
2454
2455         window.find() case-insensitive search doesn't match diacritical marks
2456         https://bugs.webkit.org/show_bug.cgi?id=117353
2457         <rdar://problem/8535227>
2458
2459         Reviewed by Darin Adler.
2460
2461         Currently, a case-insensitive window.find() search will return true for a word w
2462         (e.g. café) with diacritical characters when w appears on the page without
2463         diacritical marks (e.g. cafe). This leads to bad results, especially when
2464         searching for a non-English word (e.g. qué) where the presence of an accented
2465         character(s) may change the meaning of the word. Instead window.find() should
2466         return false when case-insensitively matching a word with diacritical marks to
2467         the same word without diacritical marks.
2468
2469         Test: fast/text/find-diacritical-mark.html
2470
2471         * editing/TextIterator.cpp:
2472         (WebCore::SearchBuffer::SearchBuffer):
2473
2474 2013-06-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2475
2476         Support latest Web IDL indexed property getters
2477         https://bugs.webkit.org/show_bug.cgi?id=117507
2478
2479         Reviewed by Kentaro Hara.
2480
2481         Support latest Web IDL indexed property getters:
2482         http://www.w3.org/TR/WebIDL/#dfn-support-indexed-properties
2483
2484         Drop support for outdated [IndexedGetter] and [NumericIndexedGetter]
2485         IDL extended attributes. Since the new getter format specifies the
2486         return type, the bindings generator is now smart enough to know if
2487         the indexed getter is numeric or not on its own.
2488
2489         Based on Blink r149564 by <kojih@chromium.org>.
2490
2491         No new tests, no behavior change.
2492
2493         * Modules/filesystem/EntryArray.idl:
2494         * Modules/filesystem/EntryArraySync.idl:
2495         * Modules/gamepad/GamepadList.idl:
2496         * Modules/mediasource/SourceBufferList.idl:
2497         * Modules/speech/SpeechGrammarList.idl:
2498         * Modules/speech/SpeechRecognitionResult.idl:
2499         * Modules/speech/SpeechRecognitionResultList.idl:
2500         * bindings/scripts/CodeGenerator.pm:
2501         (IsNumericType):
2502         * bindings/scripts/CodeGeneratorJS.pm:
2503         (GenerateGetOwnPropertySlotBody):
2504         (GenerateGetOwnPropertyDescriptorBody):
2505         (GetIndexedGetterFunction):
2506         (GenerateHeader):
2507         (GenerateImplementation):
2508         * bindings/scripts/IDLAttributes.txt:
2509         * bindings/scripts/test/TestEventTarget.idl:
2510         * bindings/scripts/test/TestTypedArray.idl:
2511         * css/CSSRuleList.idl:
2512         * css/CSSStyleDeclaration.idl:
2513         * css/CSSValueList.idl:
2514         * css/MediaList.idl:
2515         * css/StyleSheetList.idl:
2516         * css/WebKitCSSFilterValue.idl:
2517         * css/WebKitCSSKeyframesRule.idl:
2518         * css/WebKitCSSTransformValue.idl:
2519         * dom/ClientRectList.idl:
2520         * dom/DOMNamedFlowCollection.idl:
2521         * dom/DOMStringList.idl:
2522         * dom/DataTransferItemList.idl:
2523         * dom/NamedNodeMap.idl:
2524         * dom/NodeList.idl:
2525         * dom/PropertyNodeList.idl:
2526         * dom/TouchList.idl:
2527         * fileapi/FileList.idl:
2528         * html/DOMSettableTokenList.idl:
2529         * html/DOMTokenList.idl:
2530         * html/HTMLAllCollection.idl:
2531         * html/HTMLCollection.idl:
2532         * html/HTMLFormControlsCollection.idl:
2533         * html/HTMLFormElement.idl:
2534         * html/HTMLPropertiesCollection.idl:
2535         * html/HTMLSelectElement.idl:
2536         * html/RadioNodeList.idl:
2537         * html/canvas/Float32Array.idl:
2538         * html/canvas/Float64Array.idl:
2539         * html/canvas/Int16Array.idl:
2540         * html/canvas/Int32Array.idl:
2541         * html/canvas/Int8Array.idl:
2542         * html/canvas/Uint16Array.idl:
2543         * html/canvas/Uint32Array.idl:
2544         * html/canvas/Uint8Array.idl:
2545         * html/canvas/Uint8ClampedArray.idl:
2546         * html/track/AudioTrackList.idl:
2547         * html/track/TextTrackCueList.idl:
2548         * html/track/TextTrackList.idl:
2549         * html/track/TextTrackRegionList.idl:
2550         * html/track/VideoTrackList.idl:
2551         * page/PerformanceEntryList.idl:
2552         * page/SpeechInputResultList.idl:
2553         * plugins/DOMMimeTypeArray.idl:
2554         * plugins/DOMPlugin.idl:
2555         * plugins/DOMPluginArray.idl:
2556
2557 2013-06-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2558
2559         Rename [CallWith] to [ConstructorCallWith] for IDL interfaces
2560         https://bugs.webkit.org/show_bug.cgi?id=117531
2561
2562         Reviewed by Kentaro Hara.
2563
2564         Rename [CallWith] to [ConstructorCallWith] for IDL interfaces as the
2565         meaning is slightly different when [CallWith] is used for IDL operations
2566         or attributes. This improves IDL readability a bit and makes it more
2567         directly understandable.
2568
2569         Also removed [ConstructorCallWith] statements from interfaces with custom
2570         constructors or no constructor, as this does not have any effect.
2571
2572         No new tests, no behavior change.
2573
2574         * Modules/filesystem/FileWriter.idl:
2575         * Modules/mediasource/MediaSource.idl:
2576         * Modules/mediasource/SourceBufferList.idl:
2577         * Modules/mediastream/MediaStream.idl:
2578         * Modules/mediastream/RTCPeerConnection.idl:
2579         * Modules/notifications/Notification.idl:
2580         * Modules/speech/SpeechRecognition.idl:
2581         * Modules/speech/SpeechSynthesisUtterance.idl:
2582         * Modules/webaudio/OfflineAudioContext.idl:
2583         * Modules/websockets/WebSocket.idl:
2584         * bindings/scripts/CodeGeneratorJS.pm:
2585         (GenerateConstructorDefinition):
2586         * bindings/scripts/IDLAttributes.txt:
2587         * bindings/scripts/test/TestInterface.idl:
2588         * dom/MessageChannel.idl:
2589         * fileapi/FileReader.idl:
2590         * html/MediaController.idl:
2591         * html/track/TextTrackCue.idl:
2592         * page/EventSource.idl:
2593         * workers/SharedWorker.idl:
2594         * workers/Worker.idl:
2595         * xml/XMLHttpRequest.idl:
2596
2597 2013-06-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2598
2599         [Qt] Set windows key-code for multimedia keys
2600         https://bugs.webkit.org/show_bug.cgi?id=117535
2601
2602         Reviewed by Jocelyn Turcotte.
2603
2604         Map Qt Key-events to their defined windows keycode values.
2605
2606         * platform/qt/PlatformKeyboardEventQt.cpp:
2607         (WebCore::windowsKeyCodeForKeyEvent):
2608
2609 2013-06-12  Sergio Villar Senin  <svillar@igalia.com>
2610
2611         [Soup] Use ResourceLoadPriority
2612         https://bugs.webkit.org/show_bug.cgi?id=112902
2613
2614         Reviewed by Carlos Garcia Campos.
2615
2616         Use the ResourceLoadPriority from the ResourceRequest to set the
2617         correnpondent priority to each SoupMessage.
2618
2619         No new tests required as there is no change in functionality,
2620         we're just enabling a new feature in the underlying network stack.
2621
2622         * platform/network/soup/ResourceHandleSoup.cpp:
2623         (WebCore::createSoupMessageForHandleAndRequest):
2624         * platform/network/soup/ResourceRequest.h:
2625         (WebCore):
2626         (WebCore::toSoupMessagePriority): Translates ResourceLoadPriority
2627         to SoupMessagePriority.
2628
2629 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
2630
2631         Remove memoryInfoEnabled, quantizedMemoryInfoEnabled settings
2632         https://bugs.webkit.org/show_bug.cgi?id=117512
2633
2634         Reviewed by Darin Adler.
2635
2636         * page/Settings.in: Remove the memoryInfoEnabled and the quantizedMemoryInfoEnabled settings. These are not used
2637         anywhere anymore after r151199 which simplified and moved the MemoryInfo interface under window.internals.
2638
2639 2013-06-12  Diego Pino Garcia  <dpino@igalia.com>
2640
2641         [GTK] Parameter 'pseudoElement' from function 'webkit_dom_dom_window_get_computed_style' should be allowed to be NULL
2642         https://bugs.webkit.org/show_bug.cgi?id=117332
2643
2644         Reviewed by Xan Lopez.
2645
2646         Add parameter 'pseudoElement' to the list of parameters that are allowed to
2647         be NULL.
2648
2649         * bindings/scripts/CodeGeneratorGObject.pm:
2650         (GetGReturnMacro):
2651
2652 2013-06-12  Sergio Villar Senin  <svillar@igalia.com>
2653
2654         Add CSS parsing recovery to functions
2655         https://bugs.webkit.org/show_bug.cgi?id=117500
2656
2657         Reviewed by Andreas Kling.
2658
2659         From Blink r150205 by <serya@chromium.org>
2660
2661         Add parsing recovery capabilities to functions. Errors were
2662         correctly detected without this change but then the whole
2663         declaration was invalidated. By using expr_recovery to handle them
2664         we can recover from those errors and go on with the parsing.
2665
2666         * css/CSSGrammar.y.in:
2667
2668 2013-06-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2669
2670         Unreviewed, rolling out r151378.
2671         http://trac.webkit.org/changeset/151378
2672         https://bugs.webkit.org/show_bug.cgi?id=117400
2673
2674         Decreased IDL readability a bit.
2675
2676         * Modules/encryptedmedia/MediaKeys.idl:
2677         * Modules/mediastream/RTCIceCandidate.idl:
2678         * Modules/mediastream/RTCPeerConnection.idl:
2679         * Modules/mediastream/RTCSessionDescription.idl:
2680         * Modules/webaudio/OfflineAudioContext.idl:
2681         * Modules/websockets/WebSocket.idl:
2682         * bindings/scripts/CodeGeneratorJS.pm:
2683         (GenerateConstructorDefinition):
2684         * bindings/scripts/IDLAttributes.txt:
2685         * bindings/scripts/test/TestInterface.idl:
2686         * bindings/scripts/test/TestNamedConstructor.idl:
2687         * css/WebKitCSSMatrix.idl:
2688         * html/HTMLOptionElement.idl:
2689         * page/EventSource.idl:
2690         * workers/SharedWorker.idl:
2691         * workers/Worker.idl:
2692
2693 2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
2694
2695         Have to invalidate the mute button when changing the volume
2696         https://bugs.webkit.org/show_bug.cgi?id=117464
2697
2698         Reviewed by Darin Adler.
2699
2700         Merge https://chromium.googlesource.com/chromium/blink/+/c4c685c82908449526fd8c251cc551e729ebed08
2701         but without a test since the test doesn't work in WebKit.
2702
2703         * html/shadow/MediaControls.cpp:
2704         (WebCore::MediaControls::changedVolume):
2705
2706 2013-06-11  Max Vujovic  <mvujovic@adobe.com>
2707
2708         [CSS Regions] Regions don't create a stacking context for their contents
2709         https://bugs.webkit.org/show_bug.cgi?id=114268
2710
2711         Reviewed by Alexandru Chiculita.
2712
2713         Paint the region content (from RenderFlowThread) during the background phase instead of the
2714         foreground phase.
2715
2716         Let's assume there is a region and a sibling element. The sibling partially overlaps the
2717         region and appears after the region in DOM order.
2718
2719         Before this patch, we would paint in this order:
2720         1) Region background
2721         2) Sibling background
2722         3) Region content
2723         4) Sibling content
2724
2725         As a result, the sibling background would incorrectly paint between the region
2726         background and the region content. Instead, the sibling background should paint over the
2727         region background and the region content.
2728
2729         After this patch, we paint in this order:
2730         1) Region background
2731         2) Region content
2732         3) Sibling background
2733         4) Sibling content
2734
2735         Test: fast/regions/region-sibling-paint-order.html
2736
2737         * rendering/RenderRegion.cpp:
2738         (WebCore::RenderRegion::paintObject):
2739
2740 2013-06-11  Jer Noble  <jer.noble@apple.com>
2741
2742         REGRESSION: (r149232) videos on disney.com are initially scrambled on load
2743         https://bugs.webkit.org/show_bug.cgi?id=117517
2744
2745         Reviewed by Eric Carlson.
2746
2747         Set a background color on the AVPlayerLayer to avoid corruption when no
2748         frames are available to display.
2749
2750         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2751         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2752
2753 2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
2754
2755         Use HTMLElementFactory to create equivalent elements in WebVTTElement
2756         https://bugs.webkit.org/show_bug.cgi?id=117423
2757
2758         Reviewed by Eric Carlson.
2759
2760         Merge https://chromium.googlesource.com/chromium/blink/+/3d60bec8e5dabfe877c482797d9ef430bfde31
2761
2762         This change forces the calls through the factory so that we create appropriate sub-classes based upon the passed tag name,
2763         rather than just creating a concrete HTMLElement class with an inappropriate tag name.
2764
2765         Test: media/track/getCueAsHTMLCrash.html
2766
2767         * html/track/WebVTTElement.cpp:
2768         (WebCore::WebVTTElement::createEquivalentHTMLElement):
2769
2770 2013-06-11  Benjamin Poulain  <bpoulain@apple.com>
2771
2772         Split SelectorDataList::executeSingleTagNameSelectorData() into the 4 kinds of traversal
2773         https://bugs.webkit.org/show_bug.cgi?id=117486
2774
2775         Reviewed by Ryosuke Niwa.
2776
2777         Since this is pretty common, split the name selector to have the constant conditions
2778         outside the traversal.
2779
2780         * dom/SelectorQuery.cpp:
2781         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2782
2783 2013-06-11  Eric Carlson  <eric.carlson@apple.com>
2784
2785         [Mac] Update text track menu
2786         https://bugs.webkit.org/show_bug.cgi?id=117351
2787
2788         Reviewed by Darin Adler.
2789
2790         No new tests, existing tests updated.
2791
2792         * English.lproj/Localizable.strings: Update the menu title.
2793
2794         * page/CaptionUserPreferencesMac.mm: System language is no longer needed.
2795
2796         * platform/LocalizedStrings.cpp: Ditto.
2797         * platform/LocalizedStrings.h:
2798
2799 2013-06-11  Benjamin Poulain  <bpoulain@apple.com>
2800
2801         Fix the element type in the selector checkers
2802         https://bugs.webkit.org/show_bug.cgi?id=117450
2803
2804         Reviewed by Anders Carlsson.
2805
2806         * css/SelectorCheckerFastPath.cpp:
2807         (WebCore::HTMLNames::checkClassValue):
2808         * dom/SelectorQuery.cpp:
2809         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
2810
2811 2013-06-11  Benjamin Poulain  <bpoulain@apple.com>
2812
2813         Clean up the initializer mess in Document
2814         https://bugs.webkit.org/show_bug.cgi?id=117448
2815
2816         Reviewed by Ryosuke Niwa.
2817
2818         Basic cleaning from
2819         https://chromium.googlesource.com/chromium/blink/+/e54ba8d3b62b0245ecdf2f3ec11cd33b4035a4d7
2820
2821         * dom/Document.cpp:
2822         (WebCore::Document::Document):
2823         * dom/Document.h:
2824
2825 2013-06-11  Jer Noble  <jer.noble@apple.com>
2826
2827         Set the font size for in-band captions on the display box, not the :cue.
2828         https://bugs.webkit.org/show_bug.cgi?id=117515
2829
2830         Reviewed by Eric Carlson.
2831
2832         Make the in-band font size behavior match the out-of-band behavior.
2833
2834         * html/track/TextTrackCueGeneric.cpp:
2835         (WebCore::TextTrackCueGeneric::setFontSize):
2836
2837 2013-06-11  Brent Fulgham  <bfulgham@apple.com>
2838
2839         [Windows] Implement 'attributeValue' accessor to support testing.
2840         https://bugs.webkit.org/show_bug.cgi?id=117513
2841
2842         Reviewed by Anders Carlsson.
2843
2844         * WebCore.vcxproj/WebCore.vcxproj: Add new implementation file.
2845         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2846         * accessibility/win/AccessibilityObjectWrapperWin.cpp: Added.
2847         * accessibility/win/AccessibilityObjectWrapperWin.h: Add declaration
2848
2849 2013-05-27  Robert Hogan  <robert@webkit.org>
2850
2851         Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
2852         https://bugs.webkit.org/show_bug.cgi?id=93735
2853
2854         Reviewed by Darin Adler.
2855
2856         Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an 
2857         intrinsic height or width. This causes them to go down the wrong height and width computation
2858         path in RenderBox when they are absolute positioned. 
2859         
2860         The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really 
2861         possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
2862         of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
2863         To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
2864         the helpers for returning their approximation of intrinsic height and width.
2865
2866         Test: fast/replaced/width-and-height-of-positioned-replaced-elements.html
2867
2868         * rendering/RenderBox.cpp:
2869         (WebCore::isReplacedElement):
2870         (WebCore::RenderBox::computePositionedLogicalWidth):
2871         (WebCore::RenderBox::computePositionedLogicalHeight):
2872         * rendering/RenderBox.h:
2873         (WebCore::RenderBox::intrinsicSize):
2874         * rendering/RenderButton.h:
2875         * rendering/RenderListBox.cpp:
2876         (WebCore::RenderListBox::RenderListBox):
2877         (WebCore::RenderListBox::computeLogicalHeight):
2878         * rendering/RenderListBox.h:
2879         * rendering/RenderMenuList.h:
2880         * rendering/RenderReplaced.h:
2881         * rendering/RenderTextControl.cpp:
2882         (WebCore::RenderTextControl::RenderTextControl):
2883         (WebCore::RenderTextControl::computeLogicalHeight):
2884         * rendering/RenderTextControl.h:
2885
2886 2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
2887
2888         There are unused variables in ApplyStyleCommand::mergeEndWithNextIfIdentical and ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds
2889         https://bugs.webkit.org/show_bug.cgi?id=117475
2890
2891         Reviewed by Andreas Kling.
2892
2893         Removed.
2894
2895         * editing/ApplyStyleCommand.cpp:
2896         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2897         * editing/ReplaceSelectionCommand.cpp:
2898         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2899
2900 2013-06-11  Robert Hogan  <robert@webkit.org>
2901
2902         Fix typo in r151445
2903
2904         Unreviewed build fix.
2905
2906         * rendering/RenderBlock.cpp:
2907         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2908
2909 2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
2910
2911         Remove redundant calls to ceilToFloat in RenderBlock::computeInlinePreferredLogicalWidths
2912         https://bugs.webkit.org/show_bug.cgi?id=117490
2913
2914         Reviewed by Andreas Kling.
2915
2916         Merge https://chromium.googlesource.com/chromium/blink/+/be336b14325b2938ff6a4fb6191073a6e717a57c.
2917
2918         * rendering/RenderBlock.cpp:
2919         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2920
2921 2013-06-03  Robert Hogan  <robert@webkit.org>
2922
2923         Painting collapsed borders during scrolling
2924         https://bugs.webkit.org/show_bug.cgi?id=85658
2925
2926         Reviewed by David Hyatt.
2927
2928         Test: fast/repaint/table-cell-collapsed-border-scroll.html
2929
2930         WHen painting collapsed borders we need to paint the borders of the row above
2931         the topmost dirtied row so that we compute the correct value for the dirtied row's collapsed border.
2932
2933         * rendering/RenderTableSection.cpp:
2934         (WebCore::RenderTableSection::paintObject):
2935
2936 2013-06-11  Peter Gal  <galpeter@inf.u-szeged.hu>
2937
2938         [curl] Custom HTTP method support
2939         https://bugs.webkit.org/show_bug.cgi?id=117302
2940
2941         Reviewed by Kenneth Rohde Christiansen.
2942
2943         No new tests, already covered by existing ones like:
2944         http/tests/xmlhttprequest/workers/methods.html
2945         http/tests/xmlhttprequest/workers/methods-async.html
2946
2947         * platform/network/curl/ResourceHandleManager.cpp:
2948         (WebCore::ResourceHandleManager::initializeHandle):
2949
2950 2013-06-11  Seokju Kwon  <seokju.kwon@gmail.com>
2951
2952         Web Inspector: Remove 'using namespace std'
2953         https://bugs.webkit.org/show_bug.cgi?id=117498
2954
2955         Reviewed by Anders Carlsson.
2956
2957         No new tests, no behavior change.
2958
2959         * inspector/InspectorAgent.cpp: Remove unneeded 'using namespace std'.
2960         * inspector/InspectorFrontendClientLocal.cpp: Use explicit std:: qualifiers instead.
2961         (WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowHeight):
2962         (WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
2963         * inspector/InspectorFrontendHost.cpp: Remove unneeded 'using namespace std'.
2964         * inspector/InspectorPageAgent.cpp: Remove unneeded 'using namespace std'.
2965
2966 2013-06-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2967
2968         Support latest Web IDL named property getters
2969         https://bugs.webkit.org/show_bug.cgi?id=117403
2970
2971         Reviewed by Kentaro Hara.
2972
2973         Add support for the latest Web IDL named property getters to the JSC
2974         bindings generator:
2975         http://www.w3.org/TR/WebIDL/#idl-named-properties
2976
2977         Drop support for outdated [NamedGetter] IDL extended attribute.
2978
2979         Support for other kinds of named properties will be added in later
2980         patches. This patch only brings named property getters.
2981
2982         This patch is based on Blink r149247 by kojih@chromium.org.
2983
2984         No new tests, no behavior change.
2985
2986         * bindings/scripts/CodeGeneratorJS.pm:
2987         (GenerateGetOwnPropertySlotBody):
2988         (GenerateGetOwnPropertyDescriptorBody):
2989         (GetSpecialAccessorFunctionForType):
2990         (GetNamedGetterFunction):
2991         (GenerateHeader):
2992         (GenerateImplementation):
2993         * bindings/scripts/IDLAttributes.txt:
2994         * bindings/scripts/IDLParser.pm:
2995         (applyTypedefs):
2996         (parseSpecialOperation):
2997         (parseSpecials):
2998         (applyMemberList):
2999         * bindings/scripts/test/TestEventTarget.idl:
3000         * css/StyleSheetList.idl:
3001         * dom/DOMNamedFlowCollection.idl:
3002         * dom/DOMStringMap.idl:
3003         * dom/NamedNodeMap.idl:
3004         * dom/NodeList.idl:
3005         * html/HTMLAllCollection.idl:
3006         * html/HTMLCollection.idl:
3007         * html/HTMLFormControlsCollection.idl:
3008         * html/HTMLPropertiesCollection.idl:
3009         * plugins/DOMMimeTypeArray.idl:
3010         * plugins/DOMPlugin.idl:
3011         * plugins/DOMPluginArray.idl:
3012         * storage/Storage.idl:
3013
3014 2013-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3015
3016         [BlackBerry] Test editing/execCommand/indent-paragraphs.html times out
3017         https://bugs.webkit.org/show_bug.cgi?id=117235
3018
3019         Reviewed by Rob Buis.
3020
3021         PR 346414.
3022
3023         After r150224 ResourceHandle::start() can fail returning false so
3024         that the ResourceHandle is destroyed and the error not
3025         handled. Handle the errors by scheduling a InvalidURLFailure and
3026         returning true when startJob fails to make sure the ResourceHandle
3027         is not destroyed and the error is handled and notified to the
3028         client.
3029
3030         Fixes timeout in editing/execCommand/indent-paragraphs.html.
3031
3032         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
3033         (WebCore::ResourceHandle::start):
3034
3035 2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
3036
3037         Remove IntRect::pixelSnapped* and its enclosingRect since they are no longer used
3038         https://bugs.webkit.org/show_bug.cgi?id=117494
3039
3040         Reviewed by Darin Adler.
3041
3042         Merge: https://chromium.googlesource.com/chromium/blink/+/9433dc00e882e2808ac1db3c1fd89090896d7b58
3043                https://chromium.googlesource.com/chromium/blink/+/7beaa73aa099170cb2cad02c12c5e0a448b12c21
3044
3045         * inspector/InspectorLayerTreeAgent.cpp:
3046         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3047         * inspector/InspectorOverlay.cpp:
3048         (WebCore::InspectorOverlay::update):
3049         * platform/graphics/IntRect.h:
3050         * rendering/RenderInline.cpp:
3051         (WebCore::RenderInline::hitTestCulledInline):
3052         * rendering/RenderObject.cpp:
3053         (WebCore::RenderObject::repaintUsingContainer):
3054
3055 2013-06-11  Sergio Villar Senin  <svillar@igalia.com>
3056
3057         Autoclose braces and parentheses at the end of style sheet
3058         https://bugs.webkit.org/show_bug.cgi?id=117414
3059
3060         Reviewed by Andreas Kling.
3061
3062         From Blink r150202 by <serya@chromium.org>
3063
3064         Use closing_parenthesis and closing_brace instead of the literals
3065         '}' and ')'. This allows the parser to treat expressions with
3066         unmatched closing braces/parenthesis as if all of them were
3067         actually closed.
3068
3069         Tests: animations/keyframe-autoclose-brace.html
3070                css3/autoclose-braces-and-parentheses.html
3071
3072         * css/CSSGrammar.y.in:
3073
3074 2013-06-10  Jae Hyun Park  <jae.park@company100.net>
3075
3076         [CoordinatedGraphics] Typos in custom shader support
3077         https://bugs.webkit.org/show_bug.cgi?id=117413
3078
3079         Reviewed by Noam Rosenthal.
3080
3081         Wrong keyframe is passed when assigning filterValue.
3082
3083         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3084         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
3085
3086 2013-06-10  Ryosuke Niwa  <rniwa@webkit.org>
3087
3088         text-transform: capitalize shouldn't upconvert
3089         https://bugs.webkit.org/show_bug.cgi?id=117485
3090
3091         Reviewed by Adam Barth.
3092
3093         Avoid the upconversion. Merge https://chromium.googlesource.com/chromium/blink/+/c5a221d6da2443df0639c01c40aac6040908ec79.
3094
3095         * rendering/RenderText.cpp:
3096         (WebCore::makeCapitalized):
3097
3098 2013-06-10  Ryosuke Niwa  <rniwa@webkit.org>
3099
3100         DocType strings should be 8 bit wide
3101         https://bugs.webkit.org/show_bug.cgi?id=117487
3102
3103         Reviewed by Michael Saboff.
3104
3105         Merge https://chromium.googlesource.com/chromium/blink/+/8da02d0ce3965c4e6bf227db856bce930393429a.
3106
3107         * html/parser/HTMLConstructionSite.cpp:
3108         (WebCore::HTMLConstructionSite::insertDoctype):
3109
3110 2013-06-10  Ryosuke Niwa  <rniwa@webkit.org>
3111
3112         Make more functions const
3113         https://bugs.webkit.org/show_bug.cgi?id=117455
3114
3115         Reviewed by Benjamin Poulain.
3116
3117         Merge https://chromium.googlesource.com/chromium/blink/+/886866f5034d7f30f8aa607b909313f99db1f3b4.
3118
3119         * editing/VisibleUnits.cpp:
3120         (WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
3121         * html/canvas/WebGLRenderingContext.cpp:
3122         * page/ContentSecurityPolicy.cpp:
3123         (WebCore::CSPDirectiveList::evalDisabledErrorMessage):
3124         * rendering/RenderBlockLineLayout.cpp:
3125         (WebCore::LineWidth::shouldIndentText):
3126
3127 2013-06-10  Jer Noble  <jer.noble@apple.com>
3128
3129         REGRESSION(r151302): Many broken webaudio/ tests on Mac port.
3130         https://bugs.webkit.org/show_bug.cgi?id=117446
3131
3132         Reviewed by Chris Rogers.
3133
3134         The new "pageConsentRequiredForAudioStart()" restriction was blocking playback event
3135         even when page consent was given. Remvoe the restriction immediately in that case.
3136
3137         * Modules/webaudio/AudioContext.cpp:
3138         (WebCore::AudioContext::startRendering):
3139
3140 2013-06-10  Andreas Kling  <akling@apple.com>
3141
3142         REGRESSION(r150633): Find on page non-focused text highlight color is bright yellow.
3143         <rdar://problem/14098882>
3144         <http://webkit.org/b/117371>
3145
3146         Reviewed by Anders Carlsson.
3147
3148         There was a mistake in the parameter ordering which still compiled because of
3149         implicit bool/unsigned conversion.
3150         Changed the interface of Page::findMatchesForText() to use enums instead of bools.
3151
3152         No test because the color of the highlighted matches is not available through APIs.
3153
3154         * page/Page.h:
3155         * page/Page.cpp:
3156         (WebCore::Page::findMatchesForText):
3157         (WebCore::Page::markAllMatchesForText):
3158         (WebCore::Page::countFindMatches):
3159
3160 2013-06-10  Bear Travis  <betravis@adobe.com>
3161
3162         [CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
3163         https://bugs.webkit.org/show_bug.cgi?id=117162
3164
3165         Reviewed by Alexandru Chiculita.
3166
3167         With the split between the CSS Exclusions and CSS Shapes specifications,
3168         some renaming is necessary. In general, this patch removes 'Exclusion' from
3169         any Shapes code, while organizing the rendering shapes code into a 'shapes'
3170         folder.
3171
3172         Renames:
3173         ExclusionShape -> Shape
3174         Exclusion[Rectangle|Polygon] -> [Rectangle|Polygon]Shape
3175         Exclusion -> Shape
3176
3177         Refactoring, no new tests.
3178
3179         * CMakeLists.txt:
3180         * GNUmakefile.am:
3181         * GNUmakefile.list.am:
3182         * Target.pri:
3183         * WebCore.pri:
3184         * WebCore.vcxproj/WebCore.vcxproj:
3185         * WebCore.vcxproj/WebCore.vcxproj.filters:
3186         * WebCore.xcodeproj/project.pbxproj:
3187         * css/CSSComputedStyleDeclaration.cpp:
3188         (WebCore::ComputedStyleExtractor::propertyValue):
3189         * css/CSSPrimitiveValue.h:
3190         * css/DeprecatedStyleBuilder.cpp:
3191         (WebCore::ApplyPropertyShape::setValue):
3192         (WebCore::ApplyPropertyShape::applyValue):
3193         (WebCore::ApplyPropertyShape::createHandler):
3194         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3195         * page/animation/CSSPropertyAnimation.cpp:
3196         (WebCore::blendFunc):
3197         (WebCore::PropertyWrapperShape::PropertyWrapperShape):
3198         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
3199         * rendering/LayoutState.cpp:
3200         (WebCore::LayoutState::LayoutState):
3201         * rendering/LayoutState.h:
3202         (WebCore::LayoutState::LayoutState):
3203         (WebCore::LayoutState::shapeInsideInfo):
3204         * rendering/RenderBlock.cpp:
3205         (WebCore::RenderBlock::styleDidChange):
3206         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
3207         (WebCore::shapeInfoRequiresRelayout):
3208         (WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
3209         (WebCore::RenderBlock::computeShapeSize):
3210         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
3211         (WebCore::RenderBlock::insertFloatingObject):
3212         (WebCore::RenderBlock::computeLogicalLocationForFloat):
3213         (WebCore::RenderBlock::positionNewFloats):
3214         (WebCore::RenderBlock::logicalLeftOffsetForLine):
3215         (WebCore::RenderBlock::logicalRightOffsetForLine):
3216         * rendering/RenderBlock.h:
3217         (WebCore::RenderBlock::ensureShapeInsideInfo):
3218         (WebCore::RenderBlock::shapeInsideInfo):
3219         (WebCore::RenderBlock::setShapeInsideInfo):
3220         (WebCore::RenderBlock::allowsShapeInsideInfoSharing):
3221         (WebCore::RenderBlock::xPositionForFloatIncludingMargin):
3222         (WebCore::RenderBlock::yPositionForFloatIncludingMargin):
3223         * rendering/RenderBlockLineLayout.cpp:
3224         (WebCore::RenderBlock::layoutShapeInsideInfo):
3225         (WebCore::LineWidth::LineWidth):
3226         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
3227         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
3228         (WebCore::constructBidiRunsForLine):
3229         (WebCore::adjustLogicalLineTop):
3230         (WebCore::RenderBlock::updateLineBoundariesForShapes):
3231         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
3232         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
3233         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
3234         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
3235         * rendering/RenderBox.cpp:
3236         (WebCore::RenderBox::willBeDestroyed):
3237         (WebCore::RenderBox::styleDidChange):
3238         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
3239         * rendering/RenderBox.h:
3240         (WebCore::RenderBox::shapeOutsideInfo):
3241         * rendering/RenderBoxModelObject.cpp:
3242         (WebCore::RenderBoxModelObject::paintOffset):
3243         * rendering/RenderView.h:
3244         (WebCore::RenderView::pushLayoutState):
3245         * rendering/shapes/PolygonShape.cpp: Renamed from Source/WebCore/rendering/ExclusionPolygon.cpp.
3246         (WebCore::leftSide):
3247         (WebCore::isReflexVertex):
3248         (WebCore::computeXIntersection):
3249         (WebCore::inwardEdgeNormal):
3250         (WebCore::outwardEdgeNormal):
3251         (WebCore::appendArc):
3252         (WebCore::snapVerticesToLayoutUnitGrid):
3253         (WebCore::computeShapePaddingBounds):
3254         (WebCore::computeShapeMarginBounds):
3255         (WebCore::PolygonShape::shapePaddingBounds):
3256         (WebCore::PolygonShape::shapeMarginBounds):
3257         (WebCore::getVertexIntersectionVertices):
3258         (WebCore::appendIntervalX):
3259         (WebCore::compareEdgeIntersectionX):
3260         (WebCore::computeXIntersections):
3261         (WebCore::computeOverlappingEdgeXProjections):
3262         (WebCore::PolygonShape::getExcludedIntervals):
3263         (WebCore::PolygonShape::getIncludedIntervals):
3264         (WebCore::firstFitRectInPolygon):
3265         (WebCore::aboveOrToTheLeft):
3266         (WebCore::PolygonShape::firstIncludedIntervalLogicalTop):
3267         * rendering/shapes/PolygonShape.h: Renamed from Source/WebCore/rendering/ExclusionPolygon.h.
3268         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
3269         (WebCore::OffsetPolygonEdge::edgeIndex):
3270         (WebCore::OffsetPolygonEdge::basis):
3271         (WebCore::PolygonShape::PolygonShape):
3272         * rendering/shapes/RectangleShape.cpp: Renamed from Source/WebCore/rendering/ExclusionRectangle.cpp.
3273         (WebCore::ellipseXIntercept):
3274         (WebCore::ellipseYIntercept):
3275         (WebCore::FloatRoundedRect::paddingBounds):
3276         (WebCore::FloatRoundedRect::marginBounds):
3277         (WebCore::FloatRoundedRect::cornerInterceptForWidth):
3278         (WebCore::RectangleShape::shapePaddingBounds):
3279         (WebCore::RectangleShape::shapeMarginBounds):
3280         (WebCore::RectangleShape::getExcludedIntervals):
3281         (WebCore::RectangleShape::getIncludedIntervals):
3282         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
3283         * rendering/shapes/RectangleShape.h: Renamed from Source/WebCore/rendering/ExclusionRectangle.h.
3284         (WebCore::FloatRoundedRect::FloatRoundedRect):
3285         (WebCore::FloatRoundedRect::rx):
3286         (WebCore::FloatRoundedRect::ry):
3287         (WebCore::RectangleShape::RectangleShape):
3288         * rendering/shapes/Shape.cpp: Renamed from Source/WebCore/rendering/ExclusionShape.cpp.
3289         (WebCore::createRectangleShape):
3290         (WebCore::createShapeCircle):
3291         (WebCore::createShapeEllipse):
3292         (WebCore::createPolygonShape):
3293         (WebCore::physicalRectToLogical):
3294         (WebCore::physicalPointToLogical):
3295         (WebCore::physicalSizeToLogical):
3296         (WebCore::Shape::createShape):
3297         * rendering/shapes/Shape.h: Renamed from Source/WebCore/rendering/ExclusionShape.h.
3298         (WebCore::LineSegment::LineSegment):
3299         (WebCore::Shape::~Shape):
3300         (WebCore::Shape::shapeMargin):
3301         (WebCore::Shape::shapePadding):
3302         * rendering/shapes/ShapeInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.cpp.
3303         (WebCore::::computedShape):
3304         (WebCore::::computeSegmentsForLine):
3305         * rendering/shapes/ShapeInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.h.
3306         (WebCore::MappedInfo::ensureInfo):
3307         (WebCore::MappedInfo::removeInfo):
3308         (WebCore::MappedInfo::info):
3309         (WebCore::MappedInfo::infoMap):
3310         (WebCore::ShapeInfo::~ShapeInfo):
3311         (WebCore::ShapeInfo::setShapeSize):
3312         (WebCore::ShapeInfo::clearSegments):
3313         (WebCore::ShapeInfo::shapeLogicalTop):
3314         (WebCore::ShapeInfo::shapeLogicalBottom):
3315         (WebCore::ShapeInfo::shapeLogicalLeft):
3316         (WebCore::ShapeInfo::shapeLogicalRight):
3317         (WebCore::ShapeInfo::shapeLogicalWidth):
3318         (WebCore::ShapeInfo::shapeLogicalHeight):
3319         (WebCore::ShapeInfo::logicalLineTop):
3320         (WebCore::ShapeInfo::logicalLineBottom):
3321         (WebCore::ShapeInfo::shapeContainingBlockHeight):
3322         (WebCore::ShapeInfo::lineOverlapsShapeBounds):
3323         (WebCore::ShapeInfo::lineWithinShapeBounds):
3324         (WebCore::ShapeInfo::dirtyShapeSize):
3325         (WebCore::ShapeInfo::shapeSizeDirty):
3326         (WebCore::ShapeInfo::owner):
3327         (WebCore::ShapeInfo::ShapeInfo):
3328         (WebCore::ShapeInfo::logicalTopOffset):
3329         (WebCore::ShapeInfo::logicalLeftOffset):
3330         * rendering/shapes/ShapeInsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp.
3331         (WebCore::LineSegmentRange::LineSegmentRange):
3332         (WebCore::ShapeInsideInfo::isEnabledFor):
3333         (WebCore::ShapeInsideInfo::adjustLogicalLineTop):
3334         * rendering/shapes/ShapeInsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.h.
3335         (WebCore::LineSegmentIterator::LineSegmentIterator):
3336         (WebCore::ShapeInsideInfo::createInfo):
3337         (WebCore::ShapeInsideInfo::hasSegments):
3338         (WebCore::ShapeInsideInfo::segments):
3339         (WebCore::ShapeInsideInfo::segmentRanges):
3340         (WebCore::ShapeInsideInfo::currentSegment):
3341         (WebCore::ShapeInsideInfo::setNeedsLayout):
3342         (WebCore::ShapeInsideInfo::needsLayout):
3343         (WebCore::ShapeInsideInfo::ShapeInsideInfo):
3344         * rendering/shapes/ShapeInterval.cpp: Renamed from Source/WebCore/rendering/ExclusionInterval.cpp.
3345         (WebCore::IntervalX1Comparator::operator()):
3346         (WebCore::ShapeInterval::intersect):
3347         (WebCore::sortShapeIntervals):
3348         (WebCore::mergeShapeIntervals):
3349         (WebCore::intersectShapeIntervals):
3350         (WebCore::subtractShapeIntervals):
3351         * rendering/shapes/ShapeInterval.h: Renamed from Source/WebCore/rendering/ExclusionInterval.h.
3352         (WebCore::ShapeInterval::ShapeInterval):
3353         * rendering/shapes/ShapeOutsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp.
3354         (WebCore::ShapeOutsideInfo::isEnabledFor):
3355         (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
3356         * rendering/shapes/ShapeOutsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.h.
3357         (WebCore::ShapeOutsideInfo::shapeLogicalOffset):
3358         (WebCore::ShapeOutsideInfo::leftSegmentShapeBoundingBoxDelta):
3359         (WebCore::ShapeOutsideInfo::rightSegmentShapeBoundingBoxDelta):
3360         (WebCore::ShapeOutsideInfo::createInfo):
3361         (WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
3362         * rendering/style/RenderStyle.cpp:
3363         (WebCore::RenderStyle::initialShapeInside):
3364         * rendering/style/RenderStyle.h:
3365         * rendering/style/ShapeValue.h: Renamed from Source/WebCore/rendering/style/ExclusionShapeValue.h.
3366         (WebCore::ShapeValue::createShapeValue):
3367         (WebCore::ShapeValue::createOutsideValue):
3368         (WebCore::ShapeValue::createImageValue):
3369         (WebCore::ShapeValue::type):
3370         (WebCore::ShapeValue::shape):
3371         (WebCore::ShapeValue::image):
3372         (WebCore::ShapeValue::setImage):
3373         (WebCore::ShapeValue::operator==):
3374         (WebCore::ShapeValue::ShapeValue):
3375         * rendering/style/StyleRareNonInheritedData.h:
3376
3377 2013-06-10  Iago Toral Quiroga  <itoral@igalia.com>
3378
3379         Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland
3380         https://bugs.webkit.org/show_bug.cgi?id=116717
3381
3382         Reviewed by Martin Robinson.
3383
3384         Refactored WidgetBackingStore to be an abstract base class and make
3385         GtkWidgetBackingStoreX11 and WidgetBackingStoreCairo inherit from it.
3386         GtkWidgetBackingStoreX11 renamed to WidgetBackingStoreGtkX11.
3387
3388         * GNUmakefile.list.am:
3389         * platform/cairo/WidgetBackingStore.h:
3390         (WebCore):
3391         (WidgetBackingStore):
3392         (WebCore::WidgetBackingStore::WidgetBackingStore):
3393         (WebCore::WidgetBackingStore::~WidgetBackingStore):
3394         * platform/cairo/WidgetBackingStoreCairo.cpp:
3395         (WebCore::WidgetBackingStoreCairo::create):
3396         (WebCore):
3397         (WebCore::WidgetBackingStoreCairo::WidgetBackingStoreCairo):
3398         (WebCore::WidgetBackingStoreCairo::~WidgetBackingStoreCairo):
3399         (WebCore::WidgetBackingStoreCairo::cairoSurface):
3400         (WebCore::WidgetBackingStoreCairo::scroll):
3401         * platform/cairo/WidgetBackingStoreCairo.h: Added.
3402         (WebCore):
3403         (WidgetBackingStoreCairo):
3404         * platform/gtk/GtkWidgetBackingStoreX11.cpp:
3405         (WebCore::WidgetBackingStoreGtkX11::create):
3406         (WebCore):
3407         (WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
3408         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
3409         (WebCore::WidgetBackingStoreGtkX11::cairoSurface):
3410         (WebCore::WidgetBackingStoreGtkX11::scroll):
3411         * platform/gtk/GtkWidgetBackingStoreX11.h: Added.
3412         (WebCore):
3413         (WidgetBackingStoreGtkX11):
3414
3415 2013-06-10  Otto Derek Cheung  <otcheung@rim.com>
3416
3417         [BlackBerry] Store ParsedCookies as RefPtrs instead of PassRefPtrs in CookieDatabaseBackingStore
3418         https://bugs.webkit.org/show_bug.cgi?id=117411
3419
3420         JIRA388672
3421         BRWSR-11465
3422         Reviewed by Rob Buis.
3423
3424         When we queue up ParsedCookie objects for modification, we should be storing them as a refptr instead
3425         of a PassRefPtr.
3426
3427         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
3428
3429 2013-06-10  Mihnea Ovidenie  <mihnea@adobe.com>
3430
3431         [CSSRegions] ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in RenderGeometryMap::mapToContainer
3432         https://bugs.webkit.org/show_bug.cgi?id=117395
3433
3434         Reviewed by Alexandru Chiculita.
3435
3436         Test: fast/regions/assert-flow-thread-compositing.html
3437
3438         We should not allow RenderNamedFlowThread layers to be composited, rather their collected children should checked
3439         for compositing through their associated RenderRegions.
3440
3441         The assert in RenderGeometryMap::mapToContainer was hit because after https://bugs.webkit.org/show_bug.cgi?id=117270
3442         the render named flow threads are hooked in RenderView layer tree - with the caveat that they are not directly involved
3443         in hit testing/paint which is done through their associated regions.
3444
3445         * rendering/RenderLayerCompositor.cpp:
3446         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Bail out if we hit a render named flow thread layer.
3447         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
3448
3449 2013-06-10  Sergio Villar Senin  <svillar@igalia.com>
3450
3451         Refactor CALCFUNCTION rules in the CSS grammar
3452         https://bugs.webkit.org/show_bug.cgi?id=117401
3453
3454         Reviewed by Andreas Kling.