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