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