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