59ee305b94464e80f3767a0faec2e0a002440e31
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-06-25  David Hyatt  <hyatt@apple.com>
2
3         Flex boxes (both old and new) don't handle max-height images correctly.
4         https://bugs.webkit.org/show_bug.cgi?id=118000
5
6         Reviewed by Beth Dakin.
7
8         Tests: css3/flexbox/image-percent-max-height.html
9                fast/flexbox/image-percent-max-height.html
10
11         * rendering/RenderBlock.cpp:
12         (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
13         (WebCore::RenderBlock::layoutBlockChildren):
14         Pull the percentage height descendant code that dirties those descendants
15         out of layoutBlockChildren and into a protected helper function,
16         dirtyForLayoutFromPercentageHeightDescendants, that can be called from the 
17         flex box code.
18         
19         Also patch dirtyForLayoutFromPercentageHeightDescendants so that it will dirty
20         preferred logical widths when a child has an aspect ratio, since we know that
21         percentage height changes will potentially affect the preferred widths of the image and
22         its ancestor blocks.
23
24         * rendering/RenderBlock.h:
25         Declaration of the new dirtyForLayoutFromPercentageHeightDescendants function.
26
27         * rendering/RenderDeprecatedFlexibleBox.cpp:
28         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
29         Make the old flex box code call dirtyForLayoutFromPercentageHeightDescendants so
30         that everything is dirtied properly.
31
32         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
33         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
34         Remove the isReplaced()/percentage height/width dirtying now that the old flexible
35         box is using the same dirtying mechanism as RenderBlock.
36
37         * rendering/RenderFlexibleBox.cpp:
38         (WebCore::RenderFlexibleBox::layoutBlock):
39         Patch the new flexible box code to use the dirtying mechanism that RenderBlock
40         uses for percentage heights/widths on replaced descendants.
41
42         * rendering/RenderObject.h:
43         (WebCore::RenderObject::hasAspectRatio):
44         Pulled the static helper function from RenderReplaced into a full-blown method
45         on RenderObject, so that dirtyForLayoutFromPercentageHeightDescendants can call
46         it to check if an object has an aspect ratio.
47
48         * rendering/RenderReplaced.cpp:
49         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
50         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
51         Patch the call sites of the static helper function to use hasAspectRatio instead
52         and get rid of the static in the cpp file.
53
54 2013-06-26  Kangil Han  <kangil.han@samsung.com>
55
56         Adopt is/toHTMLAreaElement for code cleanup
57         https://bugs.webkit.org/show_bug.cgi?id=117980
58
59         Reviewed by Antonio Gomes.
60
61         To enhance readibility, this patch adopts is/toHTMLAreaElement.
62         This also helps out to reduce duplicated use of static_cast.
63
64         * accessibility/AXObjectCache.cpp:
65         (WebCore::AXObjectCache::focusedUIElementForPage):
66         * accessibility/AccessibilityRenderObject.cpp:
67         (WebCore::AccessibilityRenderObject::getDocumentLinks):
68         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
69         (WebCore::AccessibilityRenderObject::addImageMapChildren):
70         * html/HTMLAreaElement.h:
71         (WebCore::isHTMLAreaElement):
72         (WebCore::toHTMLAreaElement):
73         * html/HTMLMapElement.cpp:
74         (WebCore::HTMLMapElement::mapMouseEvent):
75         * page/FocusController.cpp:
76         (WebCore::FocusController::advanceFocusDirectionally):
77         * page/SpatialNavigation.cpp:
78         (WebCore::FocusCandidate::FocusCandidate):
79         (WebCore::areElementsOnSameLine):
80         * rendering/HitTestResult.cpp:
81         (WebCore::HitTestResult::absoluteLinkURL):
82         * rendering/RenderImage.cpp:
83         (WebCore::RenderImage::paintAreaElementFocusRing):
84
85 2013-06-26  Brady Eidson  <beidson@apple.com>
86
87         [Mac] Document URL is not updated by HSTS
88         <rdar://problem/14241270> and https://bugs.webkit.org/show_bug.cgi?id=118003
89         
90         Patch started by Alexey Proskuryakov, finished by Brady Eidson.
91
92         Reviewed by Brady Eidson and then Alexey Proskuryakov.
93
94         Synthesize a response and properly handle willSendRequest when the URL changes in a way that's typical for HSTS.
95
96         * platform/network/mac/WebCoreURLResponse:
97         * platform/network/mac/WebCoreURLResponse:
98         (WebCore::synthesizeRedirectResponseIfNecessary): Synthesize a redirect response and when the URL changes in a way that's
99           typical for HSTS connections.
100
101         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
102         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Call synthesizeRedirectResponseIfNecessary.
103
104         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
105         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): Ditto.
106
107 2013-06-26  Andrei Bucur  <abucur@adobe.com>
108
109         [CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
110         https://bugs.webkit.org/show_bug.cgi?id=117797
111
112         Reviewed by Antti Koivisto.
113
114         The seamless iframes inherit the current RenderFlowThread during layout. This means getting
115         the LayoutState object from the flow thread RenderView object is not always correct.
116         For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
117         of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
118         layout when pushing a new state.
119
120         Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
121
122         * rendering/RenderFlowThread.cpp:
123         (WebCore::RenderFlowThread::currentActiveRenderBox):
124         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
125         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
126
127 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
128
129         Remove many static_casts to Element types from AccessibilityNodeObject
130         https://bugs.webkit.org/show_bug.cgi?id=118021
131
132         Reviewed by Chris Fleizach.
133
134         Merge https://chromium.googlesource.com/chromium/blink/+/ecd837f94996a20fdb8798e24f26cf6edea2a423.
135
136         * accessibility/AccessibilityNodeObject.cpp:
137         (WebCore::AccessibilityNodeObject::isReadOnly):
138         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
139         (WebCore::AccessibilityNodeObject::text):
140
141 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
142
143         Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
144         https://bugs.webkit.org/show_bug.cgi?id=118029
145
146         Reviewed by Kentaro Hara.
147
148         Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
149         in the IDL and use implements statements instead.
150
151         This is one step towards getting rid of multiple inheritance in the SVG code
152         and matching the latest specification:
153         http://www.w3.org/TR/SVG2/types.html#BasicDOMInterfaces
154
155         There is no webexposed behavior change.
156
157         No new tests, no behavior change.
158
159         * svg/SVGAnimationElement.idl:
160         * svg/SVGCircleElement.idl:
161         * svg/SVGClipPathElement.idl:
162         * svg/SVGCursorElement.idl:
163         * svg/SVGDefsElement.idl:
164         * svg/SVGEllipseElement.idl:
165         * svg/SVGFEImageElement.idl:
166         * svg/SVGFilterElement.idl:
167         * svg/SVGForeignObjectElement.idl:
168         * svg/SVGGElement.idl:
169         * svg/SVGGradientElement.idl:
170         * svg/SVGImageElement.idl:
171         * svg/SVGLineElement.idl:
172         * svg/SVGMPathElement.idl:
173         * svg/SVGMarkerElement.idl:
174         * svg/SVGMaskElement.idl:
175         * svg/SVGPathElement.idl:
176         * svg/SVGPatternElement.idl:
177         * svg/SVGPolygonElement.idl:
178         * svg/SVGPolylineElement.idl:
179         * svg/SVGRectElement.idl:
180         * svg/SVGSVGElement.idl:
181         * svg/SVGScriptElement.idl:
182         * svg/SVGSwitchElement.idl:
183         * svg/SVGSymbolElement.idl:
184         * svg/SVGTextContentElement.idl:
185         * svg/SVGUseElement.idl:
186         * svg/SVGViewSpec.idl:
187
188 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
189
190         Use-after-free in RadioInputType::handleKeydownEvent
191         https://bugs.webkit.org/show_bug.cgi?id=118035
192
193         Reviewed by Kent Tamura.
194
195         Use RefPtr for inputElement since setFocusedNode could blow it away.
196
197         * html/RadioInputType.cpp:
198         (WebCore::RadioInputType::handleKeydownEvent):
199
200 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
201
202         Get rid of multiple inheritence for SVGViewElement interface
203         https://bugs.webkit.org/show_bug.cgi?id=118014
204
205         Reviewed by Kentaro Hara.
206
207         Web IDL no longer supports multiple inheritence. As per the latest
208         specification SVGViewElement should only inherit from SVGElement.
209         'implements' statements are used for the rest. This patch refactors
210         the IDL files to match the latest specification:
211         http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement
212
213         Note that there is a WebExposed change as SVGZoomAndPan used to be
214         exposed on the Window and it is not anymore. SVGZoomAndPan merely
215         supplements SVGViewElement and should not be exposed to JavaScript
216         according to the latest specification.
217
218         No new tests, covered by existing tests.
219
220         * CMakeLists.txt:
221         * DerivedSources.pri:
222         * GNUmakefile.list.am:
223         * svg/SVGExternalResourcesRequired.idl:
224         * svg/SVGFitToViewBox.idl:
225         * svg/SVGViewElement.idl:
226         * svg/SVGZoomAndPan.idl:
227
228 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
229
230         Mark SVG(Circle|Path|Rect)Element::createRenderer() with OVERRIDE
231         https://bugs.webkit.org/show_bug.cgi?id=118037
232
233         Reviewed by Philip Rogers.
234
235         Merge https://chromium.googlesource.com/chromium/blink/+/e8196920e769ab0786b2b4b21d3fdc2d87afef0d.
236
237         * svg/SVGCircleElement.h:
238         * svg/SVGPathElement.h:
239         * svg/SVGRectElement.h:
240
241 2013-06-26  Kangil Han  <kangil.han@samsung.com>
242
243         Adopt is/toHTMLAudioElement for code cleanup
244         https://bugs.webkit.org/show_bug.cgi?id=117985
245
246         Reviewed by Jer Noble.
247
248         To enhance readibility, this patch adopts is/toHTMLAudioElement.
249         This also helps out to reduce duplicated use of static_cast.
250
251         * bindings/js/JSNodeCustom.cpp:
252         (WebCore::isReachableFromDOM):
253         * css/CSSDefaultStyleSheets.cpp:
254         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
255         * css/StyleResolver.cpp:
256         (WebCore::StyleResolver::canShareStyleWithElement):
257         * html/HTMLAudioElement.h:
258         (WebCore::isHTMLAudioElement):
259         (WebCore::toHTMLAudioElement):
260         * loader/SubframeLoader.cpp:
261         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
262         * rendering/HitTestResult.cpp:
263         (WebCore::HitTestResult::mediaElement):
264         * rendering/RenderLayerCompositor.cpp:
265         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
266         * rendering/RenderThemeMac.mm:
267         (WebCore::RenderThemeMac::paintMediaMuteButton):
268         (WebCore::RenderThemeMac::paintMediaPlayButton):
269
270 2013-06-26  Ryosuke Niwa  <rniwa@webkit.org>
271
272         Refactoring: Fold Document::focusedNodeRemoved into Document::removeFocusedNodeOfSubtree
273         https://bugs.webkit.org/show_bug.cgi?id=118036
274
275         Reviewed by Kent Tamura.
276
277         Merge https://chromium.googlesource.com/chromium/blink/+/3391beabe75548cc638a6c88982f913621a4410f.
278
279         * dom/Document.cpp:
280         (WebCore::Document::removeFocusedNodeOfSubtree):
281         * dom/Document.h:
282
283 2013-06-25  Ryosuke Niwa  <rniwa@webkit.org>
284
285         JSString should remember AtomicString
286         https://bugs.webkit.org/show_bug.cgi?id=117386
287
288         Reviewed by Geoffrey Garen.
289
290         Added "Atomic" attribute as a WebKit extension to WebIDL, and deployed it in Element.idl and Node.idl so that
291         the binding code can use newly added JSValue::toAtomic to update JSString's m_value.
292
293         * bindings/js/JSDOMBinding.cpp:
294         (WebCore::valueToAtomicStringWithNullCheck): Added.
295         (WebCore::valueToAtomicStringWithUndefinedOrNullCheck): Added.
296
297         * bindings/js/JSDOMBinding.h:
298
299         * bindings/scripts/CodeGeneratorJS.pm:
300         (GetNativeTypeFromSignature): Return const AtomicString& when either Atomic attribute is specified or the type is
301         Reflect. Note that setAttribute and getAttribute both use AtomicString for all arguments.
302         (JSValueToNative): Use AtomicString equivalents when possible when converting DOMString to a WebCore object.
303
304         * bindings/scripts/IDLAttributes.txt: Added "Atomic" attribute.
305
306         * bindings/scripts/test/JS/JSTestObj.cpp: Baselined test cases.
307         (WebCore::setJSTestObjReflectedStringAttr):
308         (WebCore::setJSTestObjReflectedURLAttr):
309         (WebCore::setJSTestObjReflectedCustomURLAttr):
310
311         * dom/Document.idl:
312         * dom/Element.idl:
313         * dom/Node.idl:
314
315 2013-06-25  Kangil Han  <kangil.han@samsung.com>
316
317         Adopt is/toHTMLAnchorElement for code cleanup
318         https://bugs.webkit.org/show_bug.cgi?id=117973
319
320         Reviewed by Andreas Kling.
321
322         To enhance readibility, this patch adopts is/toHTMLAnchorElement.
323         This also helps out to reduce duplicated use of static_cast.
324
325         * accessibility/AccessibilityNodeObject.cpp:
326         (WebCore::AccessibilityNodeObject::anchorElement):
327         * accessibility/AccessibilityRenderObject.cpp:
328         (WebCore::AccessibilityRenderObject::anchorElement):
329         (WebCore::AccessibilityRenderObject::internalLinkElement):
330         (WebCore::AccessibilityRenderObject::url):
331         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
332         (WebCore::AccessibilityRenderObject::isLinked):
333         * css/CSSDefaultStyleSheets.cpp:
334         (WebCore::elementCanUseSimpleDefaultStyle):
335         * css/SelectorChecker.cpp:
336         (WebCore::SelectorChecker::checkOne):
337         * dom/Document.cpp:
338         (WebCore::Document::updateBaseURL):
339         * dom/TreeScope.cpp:
340         (WebCore::TreeScope::findAnchor):
341         * dom/VisitedLinkState.cpp:
342         (WebCore::linkHashForElement):
343         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
344         * html/HTMLAnchorElement.h:
345         (WebCore::isHTMLAnchorElement):
346         (WebCore::toHTMLAnchorElement):
347         * page/DragController.cpp:
348         (WebCore::DragController::draggableElement):
349         * rendering/HitTestResult.cpp:
350         (WebCore::HitTestResult::absoluteLinkURL):
351         (WebCore::HitTestResult::isLiveLink):
352         * rendering/RenderObject.cpp:
353         (WebCore::RenderObject::getTextDecorationColors):
354
355 2013-06-25  Dean Jackson  <dino@apple.com>
356
357         Don't snapshot plug-ins that come from the same host as the page
358         https://bugs.webkit.org/show_bug.cgi?id=117969
359         <rdar://problem/12885400>
360
361         Reviewed by Tim Horton.
362
363         If a page is serving plug-in content directly, then that content
364         is typically very important to the page. For example, embedding
365         a video or audio player. In this case, don't snapshot the plug-ins.
366
367         * html/HTMLPlugInImageElement.cpp:
368         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Add a test
369         that compares the plug-in's URL against the main page's URL and don't snapshot
370         if they are the same.
371
372 2013-06-25  Alex Christensen  <achristensen@apple.com>
373
374         Added PLATFORM(WIN) to many places where it was missing for compiling WebGL for Windows.
375         https://bugs.webkit.org/show_bug.cgi?id=117955
376
377         Reviewed by Brent Fulgham.
378
379         * platform/graphics/GraphicsContext3D.cpp:
380         * platform/graphics/OpenGLShims.cpp:
381         * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Include new location of ShaderLang.h on Windows as of r151854.
382         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
383         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
384         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
385         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
386         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
387         * platform/graphics/opengl/Extensions3DOpenGL.h:
388         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
389         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
390         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Added PLATFORM(WIN) when necessary to each file.
391
392 2013-06-25  Bruno de Oliveira Abinader  <brunoabinader@gmail.com>
393
394         Fixes a typo in renderTextDecorationFlagsToCSSValue
395         https://bugs.webkit.org/show_bug.cgi?id=117989
396
397         Reviewed by Gyuyoung Kim.
398
399         Return value should be PassRefPtr instead of RefPtr.
400
401         Backported from Blink:
402         https://src.chromium.org/viewvc/blink?view=rev&revision=152994
403
404         No new tests, no behavior change.
405
406         * css/CSSComputedStyleDeclaration.cpp:
407         (WebCore::renderTextDecorationFlagsToCSSValue):
408
409 2013-06-25  Santosh Mahto  <santosh.ma@samsung.com>
410
411         "application/x-mimearchive" should be included in finding remoteWebArchive while document loading
412         https://bugs.webkit.org/show_bug.cgi?id=117734
413
414         Reviewed by Alexey Proskuryakov.
415
416         "application/x-mimearchive" is also used  while checking for
417          RemoteArchive.
418
419         * loader/DocumentLoader.cpp:
420         (WebCore::DocumentLoader::continueAfterContentPolicy):
421
422 2013-06-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
423
424         HTMLMediaElement should inherit from MediaPlayerClient privately
425         https://bugs.webkit.org/show_bug.cgi?id=117874
426
427         Reviewed by Andreas Kling.
428
429         Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
430         MediaPlayerClient due to the Chromium and Qt port.
431
432         The Qt port is changed to not cast from MediaPlayerClient to HTMLMediaElement.
433
434         * html/HTMLMediaElement.h:
435         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
436         (WebCore::MediaPlayerPrivateQt::commitLoad):
437
438 2013-06-25  Csaba Osztrogonác  <ossy@webkit.org>
439
440         Checking if frame is complete and access duration doesn't need a decode
441         https://bugs.webkit.org/show_bug.cgi?id=116041
442
443         Reviewed by Allan Sandfeld Jensen.
444
445         This change is to avoid image decoding for these two operations:
446         1. frameIsCompleteAtIndex
447         2. frameDurationAtIndex
448         These two operations are moved to ImageDecoder interface and are now const
449         to prevent future regression.
450
451         We are now able to check if a frame is complete by parsing the entire GIF file
452         without decoding. This also provides information like frame duration such that
453         controller the animation doesn't require any decoding.
454
455         Based on the Blink patch by Hin-Chung Lam <hclam@google.com>
456         https://src.chromium.org/viewvc/blink?revision=149883&view=revision
457
458         * platform/graphics/BitmapImage.cpp:
459         (WebCore::BitmapImage::frameIsCompleteAtIndex):
460         (WebCore::BitmapImage::frameDurationAtIndex):
461         * platform/graphics/ImageSource.cpp:
462         (WebCore::ImageSource::frameDurationAtIndex):
463         (WebCore::ImageSource::frameHasAlphaAtIndex):
464         (WebCore::ImageSource::frameIsCompleteAtIndex):
465         * platform/graphics/ImageSource.h:
466         * platform/image-decoders/ImageDecoder.cpp:
467         (WebCore::ImageDecoder::frameHasAlphaAtIndex):
468         (WebCore::ImageDecoder::frameIsCompleteAtIndex):
469         * platform/image-decoders/ImageDecoder.h:
470         (WebCore::ImageDecoder::frameDurationAtIndex):
471         * platform/image-decoders/gif/GIFImageDecoder.cpp:
472         (WebCore::GIFImageDecoder::frameIsCompleteAtIndex):
473         (WebCore::GIFImageDecoder::frameDurationAtIndex):
474         (WebCore::GIFImageDecoder::haveDecodedRow):
475         (WebCore::GIFImageDecoder::gifComplete):
476         (WebCore::GIFImageDecoder::decode):
477         (WebCore::GIFImageDecoder::initFrameBuffer):
478         * platform/image-decoders/gif/GIFImageDecoder.h:
479         * platform/image-decoders/gif/GIFImageReader.h:
480         (GIFImageReader::frameContext):
481         (GIFImageReader::parseCompleted):
482
483 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
484
485         Update AbstractWorker, Worker and SharedWorker to match the specification
486         https://bugs.webkit.org/show_bug.cgi?id=117930
487
488         Reviewed by Kentaro Hara.
489
490         Update AbstractWorker, Worker and SharedWorker to match the spec:
491         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#abstractworker
492         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#worker
493         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworker
494
495         Worker and SharedWorker no longer inherit from AbstractWorker. Web IDL 'implements'
496         statements are used instead. Worker and SharedWorker can now inherit from EventTarget
497         as per the specification.
498
499         No new tests, no behavior change.
500
501         * workers/AbstractWorker.idl:
502         * workers/SharedWorker.idl:
503         * workers/Worker.idl:
504
505 2013-06-24  Andy Estes  <aestes@apple.com>
506
507         DerivedSources.make should optionally include SupplementalDependencies.dep
508         https://bugs.webkit.org/show_bug.cgi?id=117972
509
510         Reviewed by Dan Bernstein.
511
512         make(1) logs a non-fatal error to stderr when an included Makefile can't
513         be found. This error is non-fatal because after make(1) reads in all the
514         Makefiles it runs the recipe for any rule that specifies one of the
515         Makefiles as a target. Only if the Makefile is still missing after
516         applying these rules does the error become fatal.
517
518         Since SupplementalDependencies.dep is generated by running a script on
519         SupplementalDependencies.txt, the file won't exist during clean builds.
520         Each time make(1) logs this non-fatal error, Xcode sees it and itself
521         logs a non-fatal error. This is annoying.
522
523         We don't care about this error. We only care if the recipe to generate
524         SupplementalDependencies.dep fails, which is already a fatal error.
525         Suppress the error by including SupplementalDependencies.dep optionally.
526
527         * DerivedSources.make:
528
529 2013-06-24  Kangil Han  <kangil.han@samsung.com>
530
531         Add support for document.currentScript
532         https://bugs.webkit.org/show_bug.cgi?id=104221
533
534         Reviewed by Ryosuke Niwa.
535
536         Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152230
537         document.currentScript reflects the script that is currently being executed.
538
539         Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152237
540         Following up patch for code clean-up.
541
542         Tests: fast/dom/Document/document-current-script-async.html
543                fast/dom/Document/document-current-script.html
544
545         * dom/Document.cpp:
546         (WebCore::Document::pushCurrentScript):
547         (WebCore::Document::popCurrentScript):
548         * dom/Document.h:
549         (WebCore::Document::currentScript):
550         * dom/Document.idl:
551         * dom/ScriptElement.cpp:
552         (WebCore::isHTMLScriptElement):
553         (WebCore::isSVGScriptElement):
554         (WebCore::ScriptElement::executeScript):
555         (WebCore::toScriptElementIfPossible):
556         * html/HTMLScriptElement.h:
557         (WebCore::toHTMLScriptElement):
558         * svg/SVGScriptElement.cpp:
559         * svg/SVGScriptElement.h:
560         (WebCore::toSVGScriptElement):
561
562 2013-06-24  Kangil Han  <kangil.han@samsung.com>
563
564         Adopt is/toHTMLFormElement for code cleanup
565         https://bugs.webkit.org/show_bug.cgi?id=117937
566
567         Reviewed by Andreas Kling.
568
569         This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859
570
571         To enhance readibility, this patch adopts is/toHTMLFormElement.
572         This also helps out to reduce duplicated use of static_cast.
573
574         * accessibility/AccessibilityRenderObject.cpp:
575         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
576         * bindings/js/JSDOMFormDataCustom.cpp:
577         (WebCore::toHTMLFormElement):
578         * bindings/js/JSHTMLFormElementCustom.cpp:
579         (WebCore::JSHTMLFormElement::nameGetter):
580         * editing/FrameSelection.cpp:
581         (WebCore::scanForForm):
582         (WebCore::FrameSelection::currentForm):
583         * editing/InsertParagraphSeparatorCommand.cpp:
584         (WebCore::InsertParagraphSeparatorCommand::doApply):
585         * html/FormAssociatedElement.cpp:
586         (WebCore::FormAssociatedElement::findAssociatedForm):
587         * html/HTMLElement.cpp:
588         (WebCore::HTMLElement::findFormAncestor):
589         * html/HTMLFormControlsCollection.cpp:
590         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
591         (WebCore::HTMLFormControlsCollection::formControlElements):
592         (WebCore::HTMLFormControlsCollection::formImageElements):
593         (WebCore::HTMLFormControlsCollection::updateNameCache):
594         * html/HTMLFormElement.h:
595         (WebCore::isHTMLFormElement):
596         (WebCore::toHTMLFormElement):
597         * html/HTMLImageElement.cpp:
598         (WebCore::HTMLImageElement::insertedInto):
599         * html/HTMLNameCollection.cpp:
600         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
601         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
602         (WebCore::DocumentNameCollection::nodeMatches):
603         * html/RadioInputType.cpp:
604         (WebCore::RadioInputType::handleKeydownEvent):
605         * html/RadioNodeList.cpp:
606         (WebCore::RadioNodeList::RadioNodeList):
607         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
608         * html/parser/HTMLConstructionSite.cpp:
609         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
610         * html/parser/HTMLTreeBuilder.cpp:
611         (WebCore::closestFormAncestor):
612         * page/Frame.cpp:
613         (WebCore::Frame::searchForLabelsBeforeElement):
614
615 2013-06-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
616
617         Remove unneeded include header files from WebCore
618         https://bugs.webkit.org/show_bug.cgi?id=117926
619
620         Reviewed by Andreas Kling.
621
622         Merge from https://chromiumcodereview.appspot.com/17388003. 
623
624         Cleanup unused includes from WebCore.
625
626         * editing/CompositeEditCommand.cpp:
627         * editing/DeleteSelectionCommand.cpp:
628         * editing/EditingStyle.cpp:
629         * editing/Editor.cpp:
630         * editing/FrameSelection.cpp:
631         * editing/HTMLInterchange.cpp:
632         * editing/IndentOutdentCommand.cpp:
633         * editing/InsertListCommand.cpp:
634         * editing/InsertTextCommand.cpp:
635         * editing/SpellChecker.h:
636         * editing/VisibleUnits.cpp:
637         * editing/VisibleUnits.h:
638         * editing/markup.cpp:
639         * fileapi/Blob.h:
640         * fileapi/File.h:
641         * fileapi/WebKitBlobBuilder.h:
642         * history/HistoryItem.cpp:
643         * history/HistoryItem.h:
644         * html/BaseDateAndTimeInputType.cpp:
645         * html/BaseDateAndTimeInputType.h:
646         * html/ClassList.cpp:
647         * html/ClassList.h:
648         * html/DOMSettableTokenList.h:
649         * html/DOMURL.cpp:
650         * html/DateInputType.h:
651         * html/FormController.h:
652         * html/HTMLCanvasElement.cpp:
653         * html/HTMLCollection.cpp:
654         * html/HTMLCollection.h:
655         * html/HTMLDocument.h:
656         * html/HTMLEmbedElement.cpp:
657         * html/HTMLFieldSetElement.h:
658         * html/HTMLFormElement.cpp:
659         * html/HTMLFrameOwnerElement.h:
660         * html/HTMLIFrameElement.cpp:
661         * html/HTMLInputElement.cpp:
662         * html/HTMLLegendElement.cpp:
663         * html/HTMLLinkElement.h:
664         * html/HTMLMediaElement.cpp:
665         * html/HTMLMeterElement.cpp:
666         * html/HTMLOptionElement.cpp:
667         * html/HTMLOutputElement.h:
668         * html/HTMLPlugInImageElement.cpp:
669         * html/HTMLPlugInImageElement.h:
670         * html/HTMLProgressElement.cpp:
671         * html/HTMLSelectElement.cpp:
672         * html/HTMLTableElement.cpp:
673         * html/HTMLTitleElement.cpp:
674         * html/HTMLTrackElement.cpp:
675         * html/ImageInputType.h:
676         * html/InputType.h:
677         * html/MediaController.h:
678         * html/MediaFragmentURIParser.h:
679         * html/NumberInputType.cpp:
680         * html/RadioNodeList.h:
681         * html/TextFieldInputType.h:
682         * html/TypeAhead.cpp:
683         * html/ValidityState.cpp:
684         * html/canvas/CanvasPathMethods.h:
685         * html/canvas/CanvasRenderingContext2D.cpp:
686         * html/canvas/CanvasRenderingContext2D.h:
687         * html/canvas/OESVertexArrayObject.h:
688         * html/canvas/WebGLBuffer.cpp:
689         * html/canvas/WebGLBuffer.h:
690         * html/canvas/WebGLCompressedTextureATC.h:
691         * html/canvas/WebGLCompressedTextureS3TC.cpp:
692         * html/canvas/WebGLCompressedTextureS3TC.h:
693         * html/canvas/WebGLContextObject.h:
694         * html/canvas/WebGLDebugShaders.cpp:
695         * html/canvas/WebGLObject.h:
696         * html/canvas/WebGLProgram.h:
697         * html/canvas/WebGLRenderingContext.cpp:
698         * html/canvas/WebGLRenderingContext.h:
699         * html/canvas/WebGLShader.h:
700         * html/canvas/WebGLTexture.h:
701         * html/canvas/WebGLUniformLocation.h:
702         * html/canvas/WebGLVertexArrayObjectOES.h:
703         * html/parser/BackgroundHTMLParser.cpp:
704         * html/parser/BackgroundHTMLParser.h:
705         * html/parser/CSSPreloadScanner.cpp:
706         * html/parser/HTMLConstructionSite.cpp:
707         * html/parser/HTMLConstructionSite.h:
708         * html/parser/HTMLDocumentParser.h:
709         * html/parser/HTMLElementStack.h:
710         * html/parser/HTMLParserIdioms.cpp:
711         * html/parser/HTMLParserIdioms.h:
712         * html/parser/HTMLParserScheduler.h:
713         * html/parser/HTMLPreloadScanner.cpp:
714         * html/parser/HTMLSourceTracker.h:
715         * html/parser/HTMLTreeBuilder.h:
716         * html/parser/HTMLTreeBuilderSimulator.h:
717         * html/parser/XSSAuditor.cpp:
718         * html/parser/XSSAuditorDelegate.h:
719         * html/shadow/HTMLContentElement.cpp:
720         * html/shadow/HTMLContentElement.h:
721         * html/shadow/MediaControlElements.cpp:
722         * html/shadow/MediaControls.h:
723         * html/shadow/SliderThumbElement.cpp:
724         * html/shadow/SliderThumbElement.h:
725         * html/shadow/TextControlInnerElements.cpp:
726         * html/track/InbandTextTrack.h:
727         * html/track/LoadableTextTrack.cpp:
728         * html/track/LoadableTextTrack.h:
729         * html/track/TextTrackCueGeneric.h:
730
731 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
732
733         Don't crash if renderName() is called on a renderer with no style
734         https://bugs.webkit.org/show_bug.cgi?id=117960
735
736         Reviewed by Dave Hyatt.
737
738         Calling renderName() at the top of RenderObject::willChangeStyle() when
739         adding debug logging would often crash because various functions called
740         from renderName() assume style is non-null. Fix this.
741
742         * rendering/RenderBlock.cpp:
743         (WebCore::RenderBlock::renderName):
744         * rendering/RenderInline.cpp:
745         (WebCore::RenderInline::renderName):
746
747 2013-06-24  Alex Christensen  <achristensen@apple.com>
748
749         Added /d option to xcopy to prevent unnecessary copying and compiling.
750         https://bugs.webkit.org/show_bug.cgi?id=117951
751
752         Reviewed by Brent Fulgham.
753
754         * WebCore.vcxproj/WebCorePreBuild.cmd:
755
756 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
757
758         Fix various crashes on sites with fixed backgrounds
759         https://bugs.webkit.org/show_bug.cgi?id=117959
760
761         Reviewed by Andy Estes.
762         
763         FrameView::removeSlowRepaintObject() would assume that addSlowRepaintObject()
764         had been called before it, but this isn't always the case. For example, if
765         a page has a fixed background on the body, this falls into the accelerated
766         path in WK2 tiled mode, so addSlowRepaintObject() is never called. However,
767         we still call removeSlowRepaintObject() if the body is removed.
768         
769         So null-check m_slowRepaintObjects to avoid crashing.
770
771         Test: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html
772
773         * page/FrameView.cpp:
774         (WebCore::FrameView::removeSlowRepaintObject):
775
776 2013-06-24  Ruth Fong  <ruth_fong@apple.com>
777
778         Expose the mediaHasAudio() function in WK2
779         https://bugs.webkit.org/show_bug.cgi?id=117946
780         <rdar://problem/14250527>
781
782         Reviewed by Beth Dakin.
783
784         * WebCore.exp.in: Updated to include symbol for
785         HTMLMediaElement::mediaHasAudio() function.
786
787 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
788
789         Move displayID stuff from Widget to Chrome
790         https://bugs.webkit.org/show_bug.cgi?id=117944
791
792         Reviewed by Anders Carlsson.
793
794         In r151877 I polluted Widget with displayID-related stuff. This would
795         be better on HostWindow, so move it there. This is a net code reduction,
796         and eliminates PlatformScreenMac.h, and the NSScreen category.
797
798         * WebCore.exp.in: Remove some functions from the exports list.
799         * WebCore.xcodeproj/project.pbxproj: PlatformScreenMac.h is gone!
800         * dom/Document.cpp:
801         (WebCore::Document::requestAnimationFrame): Get the displayID from page->chrome()
802         * page/Chrome.cpp:
803         (WebCore::Chrome::Chrome): Initialize m_displayID.
804         (WebCore::Chrome::displayID):
805         (WebCore::Chrome::windowScreenDidChange): Code moved from Page; save the
806         displayID, and tell all subframes that the displayID changed.
807         * page/Chrome.h: Add displayID-related functions.
808         * page/FrameView.cpp: Removed windowDisplayID().
809         * page/FrameView.h: Ditto.
810         * page/Page.cpp: Removed code.
811         (WebCore::Page::Page):
812         * page/Page.h:
813         * platform/HostWindow.h: Added virtual displayID-related functions.
814         * platform/Widget.cpp: Removed code.
815         * platform/Widget.h: Ditto.
816         * platform/mac/PlatformScreenMac.h: Removed.
817         * platform/mac/PlatformScreenMac.mm: Removed the NSScreen category.
818         (WebCore::displayIDFromScreen):
819         (WebCore::screenForDisplayID):
820         (WebCore::displayFromWidget):
821         (WebCore::screenForWidget):
822         * platform/mac/WidgetMac.mm: Removed windowDisplayID().
823         * rendering/RenderLayerCompositor.cpp:
824         (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Get
825         the displayID via chrome().
826
827 2013-06-24  Andreas Kling  <akling@apple.com>
828
829         Don't create Document's selector query cache just to invalidate it.
830         <http://webkit.org/b/117942>
831
832         Reviewed by Anders Carlsson.
833
834         If Document::m_selectorQueryCache is null, there's nothing to invalidate,
835         so don't go through the trouble of creating a query cache.
836
837         * dom/Document.cpp:
838         (WebCore::Document::setCompatibilityMode):
839         (WebCore::Document::updateBaseURL):
840
841 2013-06-24  Robert Hogan  <robert@webkit.org>
842
843         Refactor adding a line break
844         https://bugs.webkit.org/show_bug.cgi?id=117907
845
846         Reviewed by Ryosuke Niwa.
847
848         Reduce code duplication when adding a line break.
849         
850         No new tests, refactoring.
851
852         * rendering/RenderBlockLineLayout.cpp:
853         (WebCore::addLineBreak):
854         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
855
856 2013-06-24  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
857
858         HashMap: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
859         https://bugs.webkit.org/show_bug.cgi?id=117911
860
861         Reviewed by Anders Carlsson.
862
863         The order of the template arguments at HashMap alternate 'find', 'contains' and
864         'add' methods is reversed so that callers can just pass the translator
865         and let the compiler deduce input argument type.
866
867         Another rational is consistency with HashSet class.
868
869         * platform/network/HTTPHeaderMap.cpp:
870         (WebCore::HTTPHeaderMap::get):
871         (WebCore::HTTPHeaderMap::contains):
872         (WebCore::HTTPHeaderMap::add):
873
874 2013-06-24  Robert Hogan  <robert@webkit.org>
875
876         Remove unnecessary check in RenderBlockLineLayout::nextSegmentBreak()
877         https://bugs.webkit.org/show_bug.cgi?id=117713
878
879         Reviewed by David Hyatt.
880
881         Changeset r151613 should have done this instead. Since r151518 changed
882         nextSegmentBreak() to detect line-break opportunities between no-wrap
883         inlines there is no need to force the break later.
884
885         No new tests, covered by existing tests.
886
887         * rendering/RenderBlockLineLayout.cpp:
888         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
889
890 2013-06-24  Eric Carlson  <eric.carlson@apple.com>
891
892         Potential crash when in-band track is removed
893         https://bugs.webkit.org/show_bug.cgi?id=117938
894         <rdar://problem/14246763>
895
896         Reviewed by Jer Noble.
897
898         This is timing dependent and I was unable to come up with a reliable test.
899
900         * html/track/InbandTextTrack.cpp:
901         (WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Early return if the media element
902             has been cleared.
903
904 2013-06-24  Chris Rogers  <crogers@google.com>
905
906         WaveTable name has changed to PeriodicWave
907         https://bugs.webkit.org/show_bug.cgi?id=117748
908
909         Reviewed by Jer Noble.
910
911         See related Web Audio bug and spec change:
912         https://www.w3.org/Bugs/Public/show_bug.cgi?id=19561
913         https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57
914
915         * CMakeLists.txt:
916         * DerivedSources.make:
917         * DerivedSources.pri:
918         * GNUmakefile.list.am:
919         * Modules/webaudio/AudioContext.cpp:
920         (WebCore::AudioContext::createPeriodicWave):
921         * Modules/webaudio/AudioContext.h:
922         * Modules/webaudio/AudioContext.idl:
923         * Modules/webaudio/OscillatorNode.cpp:
924         (WebCore::OscillatorNode::OscillatorNode):
925         (WebCore::OscillatorNode::setType):
926         (WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
927         (WebCore::OscillatorNode::process):
928         (WebCore::OscillatorNode::setPeriodicWave):
929         (WebCore::OscillatorNode::propagatesSilence):
930         * Modules/webaudio/OscillatorNode.h:
931         * Modules/webaudio/OscillatorNode.idl:
932         * Modules/webaudio/PeriodicWave.cpp: Renamed from Source/WebCore/Modules/webaudio/WaveTable.cpp.
933         (WebCore::PeriodicWave::create):
934         (WebCore::PeriodicWave::createSine):
935         (WebCore::PeriodicWave::createSquare):
936         (WebCore::PeriodicWave::createSawtooth):
937         (WebCore::PeriodicWave::createTriangle):
938         (WebCore::PeriodicWave::PeriodicWave):
939         (WebCore::PeriodicWave::waveDataForFundamentalFrequency):
940         (WebCore::PeriodicWave::maxNumberOfPartials):
941         (WebCore::PeriodicWave::numberOfPartialsForRange):
942         (WebCore::PeriodicWave::createBandLimitedTables):
943         (WebCore::PeriodicWave::generateBasicWaveform):
944         * Modules/webaudio/PeriodicWave.h: Renamed from Source/WebCore/Modules/webaudio/WaveTable.h.
945         (WebCore::PeriodicWave::rateScale):
946         (WebCore::PeriodicWave::periodicWaveSize):
947         (WebCore::PeriodicWave::sampleRate):
948         (WebCore::PeriodicWave::numberOfRanges):
949         * Modules/webaudio/PeriodicWave.idl: Renamed from Source/WebCore/Modules/webaudio/WaveTable.idl.
950         * Target.pri:
951         * WebCore.xcodeproj/project.pbxproj:
952
953 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
954
955         Commented IDL implements statements should not impact code generation
956         https://bugs.webkit.org/show_bug.cgi?id=117932
957
958         Reviewed by Kentaro Hara.
959
960         Fix regular expression in preprocess-idls.pl script so that commented
961         IDL implements statements no longer cause any code to be generated.
962
963         No new tests, covered by TestObj.idl.
964
965         * bindings/scripts/preprocess-idls.pl:
966         (getImplementedInterfacesFromIDL):
967         * bindings/scripts/test/TestObj.idl:
968
969 2013-06-24  Kangil Han  <kangil.han@samsung.com>
970
971         Adopt is/toHTMLStyleElement for minor code cleanup
972         https://bugs.webkit.org/show_bug.cgi?id=117917
973
974         Reviewed by Antti Koivisto.
975
976         This patch refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152853
977
978         There are some usages of static_cast to HTMLStyleElement so this patch creates toHTMLStyleElement
979         function for code cleanup. Plus, isHTMLStyleElement is also made for same purpose.
980
981         * css/CSSStyleSheet.cpp:
982         (WebCore::isAcceptableCSSStyleSheetParent):
983         * css/StyleScopeResolver.cpp:
984         (WebCore::StyleScopeResolver::scopeFor):
985         * css/StyleSheetList.cpp:
986         (WebCore::StyleSheetList::getNamedItem):
987         * dom/DocumentStyleSheetCollection.cpp:
988         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
989         * dom/Node.cpp:
990         (WebCore::Node::numberOfScopedHTMLStyleChildren):
991         * html/HTMLStyleElement.h:
992         (WebCore::isHTMLStyleElement):
993         (WebCore::toHTMLStyleElement):
994         * inspector/InspectorCSSAgent.cpp:
995         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
996         * inspector/InspectorStyleSheet.cpp:
997         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
998         * page/PageSerializer.cpp:
999         (WebCore::PageSerializer::serializeFrame):
1000
1001 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
1002
1003         Cleanup RenderThemeWin after r151783 and r151794.
1004         https://bugs.webkit.org/show_bug.cgi?id=117936
1005
1006         Reviewed by Alexis Menard.
1007
1008         GetSysColor() takes an integer as argument. Let cssValueIdToSysColorIndex()
1009         return an int instead of casting the values to the CSSValueID type.
1010
1011         * rendering/RenderThemeWin.cpp:
1012         (WebCore::cssValueIdToSysColorIndex):
1013         (WebCore::RenderThemeWin::systemColor):
1014
1015 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
1016
1017         Use SetFilePointer instead of SetFilePointerEx in FileSystemWin
1018         https://bugs.webkit.org/show_bug.cgi?id=116205
1019
1020         Reviewed by Ryosuke Niwa.
1021
1022         SetFilePointerEx is not available on Windows CE, so use SetFilePointer.
1023         Also add a extra return for the case of an failure.
1024
1025         * platform/win/FileSystemWin.cpp:
1026         (WebCore::seekFile):
1027
1028 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1029
1030         Introduce WindowTimers IDL interface
1031         https://bugs.webkit.org/show_bug.cgi?id=117929
1032
1033         Reviewed by Kentaro Hara.
1034
1035         Introduce WindowTimers IDL interface and have both DOMWindow and WorkerContext
1036         implement it to match the latest specification and avoid IDL duplication:
1037         - http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#windowtimers
1038         - http://dev.w3.org/html5/workers/#apis-available-to-workers
1039
1040         No new tests, no behavior change.
1041
1042         * CMakeLists.txt:
1043         * DerivedSources.make:
1044         * DerivedSources.pri:
1045         * GNUmakefile.list.am:
1046         * page/DOMWindow.idl:
1047         * page/WindowTimers.idl:
1048         * workers/WorkerContext.idl:
1049
1050 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
1051
1052         Build fix for WinCE after r151563.
1053
1054         * bindings/js/JSDOMBinding.cpp:
1055         (WebCore::toInt8): Use fabs() instead of abs().
1056         (WebCore::toUInt8): Ditto.
1057
1058 2013-06-24  Patrick Gansterer  <paroga@webkit.org>
1059
1060         Build fix for WinCE after r151783.
1061
1062         * rendering/RenderThemeWinCE.cpp:
1063         (WebCore::cssValueIdToSysColorIndex):
1064         (WebCore::RenderThemeWinCE::systemColor):
1065
1066 2013-06-24  Commit Queue  <commit-queue@webkit.org>
1067
1068         Unreviewed, rolling out r151021.
1069         http://trac.webkit.org/changeset/151021
1070         https://bugs.webkit.org/show_bug.cgi?id=117924
1071
1072         caused regressions on Qt and GTK (#117141 and #117688)
1073         (Requested by philn on #webkit).
1074
1075         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1076         (webkit_web_src_init):
1077         (webKitWebSrcFinalize):
1078         (webKitWebSrcSetProperty):
1079         (webKitWebSrcGetProperty):
1080         (webKitWebSrcStop):
1081         (webKitWebSrcStart):
1082         (webKitWebSrcChangeState):
1083         (webKitWebSrcQueryWithParent):
1084         (webKitWebSrcGetUri):
1085         (webKitWebSrcSetUri):
1086         (webKitWebSrcNeedDataMainCb):
1087         (webKitWebSrcEnoughDataMainCb):
1088         (webKitWebSrcSeekMainCb):
1089         (webKitWebSrcSeekDataCb):
1090         (StreamingClient::StreamingClient):
1091         (StreamingClient::~StreamingClient):
1092         (StreamingClient::didReceiveResponse):
1093         (StreamingClient::didReceiveData):
1094         (StreamingClient::didFinishLoading):
1095         (StreamingClient::wasBlocked):
1096         (StreamingClient::cannotShowURL):
1097
1098 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1099
1100         Move IDL implements statements to IDL files that implement the interface
1101         https://bugs.webkit.org/show_bug.cgi?id=117921
1102
1103         Reviewed by Kentaro Hara.
1104
1105         Move IDL implements statements to IDL files that implement the interface
1106         so that we can more easily know that a given IDL interface implements
1107         another.
1108
1109         The generator now enforces this as well for consistency.
1110
1111         No new tests, covered by TestImplements.idl.
1112
1113         * bindings/scripts/preprocess-idls.pl:
1114         (getImplementedInterfacesFromIDL):
1115         * bindings/scripts/test/TestImplements.idl:
1116         * bindings/scripts/test/TestInterface.idl:
1117         * dom/CharacterData.idl:
1118         * dom/ChildNode.idl:
1119         * dom/DocumentType.idl:
1120         * dom/Element.idl:
1121
1122 2013-06-24  Zalan Bujtas  <zalan@apple.com>
1123
1124         Hittest finds the truncated text instead of the floating input, when the input is clicked.
1125         https://bugs.webkit.org/show_bug.cgi?id=115675
1126
1127         Reviewed by David Hyatt.
1128
1129         Ignore truncated text on inline textbox and everything beyond the ellipsis box on
1130         the root inlinebox while hittesting. (provided that nodeAtPoint finds no hit for any of
1131         the root inline's children.)
1132
1133         Test: fast/css/text-overflow-ellipsis-and-floating-input-hittest.html
1134
1135         * rendering/InlineFlowBox.cpp:
1136         (WebCore::InlineFlowBox::nodeAtPoint):
1137         * rendering/InlineTextBox.cpp:
1138         (WebCore::InlineTextBox::nodeAtPoint):
1139         (WebCore::InlineTextBox::paint):
1140
1141 2013-06-17  Darin Adler  <darin@apple.com>
1142
1143         Sort all the Xcode project files
1144         https://bugs.webkit.org/show_bug.cgi?id=117696
1145
1146         Reviewed by Anders Carlsson.
1147
1148         * WebCore.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
1149
1150 2013-06-22  Zalan Bujtas  <zalan@apple.com>
1151
1152         Remove redundant helper from RenderRegion.
1153         https://bugs.webkit.org/show_bug.cgi?id=117915
1154
1155         Reviewed by Andreas Kling.
1156
1157         Minor code cleanup.
1158
1159         * rendering/RenderRegion.cpp:
1160         (WebCore::RenderRegion::regionOversetState):
1161         (WebCore::RenderRegion::setRegionOversetState):
1162         * rendering/RenderRegion.h:
1163
1164 2013-06-22  Mark Rowe  <mrowe@apple.com>
1165
1166         Build fix after r151878.
1167
1168         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1169         (WebCore::WebCoreAVFResourceLoader::startLoading): Pass the new UseDefaultOriginRestrictionsForType
1170         argument to the ResourceLoaderOptions constructor.
1171
1172 2013-06-22  Simon Fraser  <simon.fraser@apple.com>
1173
1174         Followup from r151877 .
1175         Fix crash in fast/frames/iframe-access-screen-of-deleted.html by null-checking the widget.
1176
1177         * platform/mac/PlatformScreenMac.mm:
1178         (WebCore::screenForWidget):
1179
1180 2013-06-22  Hans Muller  <hmuller@adobe.com>
1181
1182         [CSS Shapes] limit shape image values to same origin
1183         https://bugs.webkit.org/show_bug.cgi?id=117610
1184
1185         Reviewed by Alexey Proskuryakov.
1186
1187         Restrict the image URL values for shape-inside and shape-outside to
1188         the same origin as the document. The alpha channel of image shape values
1189         will be thresholded to produce the shape's boundaries (see bug 116643)
1190         so normal image access rules aren't secure enough.
1191
1192         Added a RequestOriginPolicy ResourceLoaderOption which is used by
1193         StyleResolver::loadPendingShapeImage() to request the additional restriction.
1194         The change should have no other effect although it does enable one to apply
1195         the same restriction to other resources which can currently be loaded from
1196         any origin - see CachedResourceLoader::canRequest().
1197
1198         Test: http/tests/security/shape-inside-image-origin.html
1199
1200         * css/CSSImageValue.cpp:
1201         (WebCore::CSSImageValue::cachedImage): Add an effectively optional ResourceLoaderOptions parameter.
1202         * css/CSSImageValue.h:
1203         (WebCore::CSSImageValue::cachedImage): Ditto.
1204         * css/StyleResolver.cpp:
1205         (WebCore::StyleResolver::loadPendingShapeImage): Load the image with the default CachedResourceLoader options plus RestrictToSameOrigin.
1206         (WebCore::StyleResolver::loadPendingImages): Call loadPendingShapeImage().
1207         * css/StyleResolver.h:
1208         * loader/DocumentLoader.cpp:
1209         (WebCore::DocumentLoader::startLoadingMainResource): Update the ResourceLoaderOptions static variable.
1210         * loader/NetscapePlugInStreamLoader.cpp:
1211         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Ditto.
1212         * loader/ResourceLoader.h:
1213         (WebCore::ResourceLoader::options):
1214         * loader/ResourceLoaderOptions.h: Add RequestOriginPolicy enum.
1215         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
1216         * loader/SubresourceLoader.cpp:
1217         (WebCore::SubresourceLoader::willSendRequest): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
1218         * loader/cache/CachedResourceLoader.cpp:
1219         (WebCore::CachedResourceLoader::requestImage):
1220         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Update load() ResourceLoaderOptions.
1221         (WebCore::CachedResourceLoader::canRequest): Replaced ContentSecurityPolicyCheck parameter with ResourceLoaderOptions.
1222         (WebCore::CachedResourceLoader::requestResource): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
1223         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Added UseDefaultOriginRestrictionsForType initializer.
1224         * loader/cache/CachedResourceLoader.h:
1225         * loader/icon/IconLoader.cpp:
1226         (WebCore::IconLoader::startLoading): Added UseDefaultOriginRestrictionsForType intializer.
1227
1228 2013-06-22  Simon Fraser  <simon.fraser@apple.com>
1229
1230         screen.availWidth always returns width of primary display
1231         https://bugs.webkit.org/show_bug.cgi?id=117863
1232
1233         Reviewed by Geoffrey Garen.
1234
1235         In WebKit2, Widgets have no platformWidget, so trying to get to the
1236         NSScreen via the platform widget's window never succeeded, and we always
1237         fell back on getting info for the main display.
1238
1239         However, we were already pushing the WKView's displayID down to the
1240         WebProcess for the requestAnimationFrame infrastructure, so use that.
1241
1242         Add a virtual function on Widget windowDisplayID(), that is overridden
1243         in FrameView to return the PlatformDisplayID which Page has.
1244
1245         Fix PlatformScreenMac to fall back to Widget::windowDisplayID() when it fails
1246         to get an NSWindow from the Widget.
1247
1248         Add a utility category on NSScreen to get an NSScreen's displayID, and to
1249         find an NSScreen given a displayID.
1250
1251         * WebCore.exp.in:
1252         * WebCore.xcodeproj/project.pbxproj:
1253         * page/FrameView.cpp:
1254         (WebCore::FrameView::windowDisplayID):
1255         * page/FrameView.h:
1256         * platform/Widget.cpp:
1257         (WebCore::Widget::windowDisplayID):
1258         * platform/Widget.h:
1259         * platform/mac/PlatformScreenMac.h: Added.
1260         * platform/mac/PlatformScreenMac.mm:
1261         (+[NSScreen screenForDislayID:]):
1262         (-[NSScreen displayID]):
1263         (WebCore::screenRect):
1264         (WebCore::screenAvailableRect):
1265         * platform/mac/WidgetMac.mm:
1266         (WebCore::Widget::windowDisplayID):
1267
1268 2013-06-21  Geoffrey Garen  <ggaren@apple.com>
1269
1270         Crashes due to NULL dereference beneath WebCore::StyleResolver::loadPendingSVGDocuments and related functions
1271         https://bugs.webkit.org/show_bug.cgi?id=117903
1272         <rdar://problem/14202130>
1273
1274         Reviewed by Darin Adler.
1275
1276         * css/StyleResolver.cpp:
1277         (WebCore::StyleResolver::loadPendingSVGDocuments): Add a NULL check for
1278         RenderStyle here...
1279         (WebCore::StyleResolver::loadPendingResources): ...and here.
1280
1281 2013-06-21  Simon Fraser  <simon.fraser@apple.com>
1282
1283         Occasional crash swiping between pages
1284         https://bugs.webkit.org/show_bug.cgi?id=117902
1285
1286         Reviewed by Beth Dakin.
1287
1288         m_scrollingStateTree->rootStateNode() can be null when quickly swiping between pages,
1289         so check this in ScrollingCoordinatorMac::commitTreeState().
1290
1291         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1292         (WebCore::ScrollingCoordinatorMac::commitTreeState):
1293
1294 2013-06-21  Brent Fulgham  <bfulgham@apple.com>
1295
1296         AX: Title for ListItemRole should consist of concatenated child text elements.
1297         https://bugs.webkit.org/show_bug.cgi?id=117892
1298
1299         Reviewed by Chris Fleizach.
1300
1301         accessibility/listitem-title.html
1302
1303         * accessibility/AccessibilityNodeObject.cpp:
1304         (WebCore::AccessibilityNodeObject::visibleText): Add ListItemRole to set of
1305         elements that concatenate their children for display purposes.
1306         (WebCore::AccessibilityNodeObject::title): Ditto.
1307
1308 2013-06-21  Sergio Correia  <sergio.correia@openbossa.org>
1309
1310         [MediaStream]: Remove ``>= 0'' assertion from a size_t variable
1311         https://bugs.webkit.org/show_bug.cgi?id=117890
1312
1313         Reviewed by Adam Barth.
1314
1315         This patch fixes a strict build by removing the ``>= 0'' assertion from
1316         a size_t (unsigned type) variable in RTCStatsResponse.cpp.
1317
1318         No new tests; build fix.
1319
1320         * Modules/mediastream/RTCStatsResponse.cpp:
1321         (WebCore::RTCStatsResponse::addStatistic): Remove ``>=0''assertion,
1322         since the variable is unsigned and is always >= 0.
1323
1324 2013-06-21  Alex Christensen  <achristensen@apple.com>
1325
1326         GraphicsContext3DNEON.h cannot be found on Windows and does not need to be found.
1327         https://bugs.webkit.org/show_bug.cgi?id=117894
1328
1329         Reviewed by Brent Fulgham.
1330
1331         * platform/graphics/GraphicsContext3D.cpp:
1332         Added #if HAVE(ARM_NEON_INTRINSICS) around #include "GraphicsContext3DNEON.h"
1333
1334 2013-06-21  Robert Hogan  <robert@webkit.org>
1335
1336         Ignoring padding-right of inline elements in containers with undefined width
1337         https://bugs.webkit.org/show_bug.cgi?id=76451
1338
1339         Reviewed by David Hyatt.
1340
1341         Collapsed trailing space on a normal wrap line should not cause a line-break 
1342         if it is the difference between fitting on the line and breaking. Likewise, on a line that
1343         has a mix of auto-wrap and no-wrap inlines we don't want a trailing space at the end of a no-wrap inline
1344         to be the difference between that no-wrap inline fitting or breaking the line. This latter
1345         scenario is covered already by inline-whitespace-wrapping-8.html.
1346
1347         Test: fast/text/whitespace/inline-whitespace-wrapping-9.html
1348
1349         * rendering/RenderBlockLineLayout.cpp:
1350         (WebCore::LineWidth::fitsOnLine):
1351         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
1352         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
1353         (WebCore::LineWidth::currentWidth):
1354         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
1355         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1356
1357 2013-06-21  Alex Christensen  <achristensen@apple.com>
1358
1359         Added WebGL source files to Windows build and made Windows build successfully with them.
1360         https://bugs.webkit.org/show_bug.cgi?id=117853
1361
1362         Reviewed by Brent Fulgham.
1363
1364         * WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
1365         * WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
1366         * WebCore.vcxproj/WebCorePreBuild.cmd: Copy ANGLE headers and glext.h before building WebCore (which now uses them).
1367         * platform/graphics/ANGLEWebKitBridge.h: Look in newly copied directory for ShaderLang.h.
1368         * platform/graphics/OpenGLShims.h: Include GL/glext.h.
1369         * platform/graphics/gpu/LoopBlinnShader.cpp: 
1370         (WebCore::LoopBlinnShader::use): Fixed parameter ordering in call to uniformMatrix4fv.
1371         * platform/graphics/opengl/GLPlatformSurface.cpp:
1372         (WebCore::GLPlatformSurface::createOffScreenSurface): Added notImplemented for non-EGL builds for now.
1373
1374 2013-06-21  Eric Carlson  <eric.carlson@apple.com>
1375
1376         Update platform text track menu
1377         https://bugs.webkit.org/show_bug.cgi?id=117884
1378
1379         Reviewed by Jer Noble.
1380
1381         * html/HTMLMediaElement.cpp:
1382         (WebCore::HTMLMediaElement::setSelectedTextTrack):
1383         * html/track/TextTrack.cpp:
1384         (WebCore::TextTrack::platformTextTrack):
1385         * platform/graphics/PlatformTextTrack.h:
1386         (WebCore::PlatformTextTrack::create): 
1387         (WebCore::PlatformTextTrack::uniqueId):
1388         (WebCore::PlatformTextTrack::captionMenuOffItem):
1389         (WebCore::PlatformTextTrack::captionMenuAutomaticItem):
1390         (WebCore::PlatformTextTrack::PlatformTextTrack):
1391
1392 2013-06-21  James Craig  <james@cookiecrook.com>
1393
1394         AX: audio/video playback control timers (elapsed and remaining) should be exposed as ApplicationTimerRole
1395         https://bugs.webkit.org/show_bug.cgi?id=117883
1396
1397         Reviewed by Chris Fleizach.
1398
1399         Some of the media controls were returning the wrong role. Updated existing test coverage.
1400
1401         * accessibility/AccessibilityMediaControls.h:
1402         (WebCore::AccessibilityMediaTimeDisplay::roleValue):
1403
1404 2013-06-21  Alex Christensen  <achristensen@apple.com>
1405
1406         Added glext.h from http://www.opengl.org/registry/oldspecs/glext.h for Windows
1407         This file does not meet WebKit style guidelines.
1408         Part of https://bugs.webkit.org/show_bug.cgi?id=117853
1409         
1410         Reviewed by Brent Fulgham.
1411
1412         * platform/graphics/win/GL: Added.
1413         * platform/graphics/win/GL/glext.h: Added.
1414
1415 2013-06-21  Ruth Fong  <ruth_fong@apple.com>
1416
1417         Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
1418         https://bugs.webkit.org/show_bug.cgi?id=117815
1419         <rdar://problem/14211041> 
1420
1421         Reviewed by Ryosuke Niwa.
1422
1423         This patch adds assert statements to try to catch when 
1424         track()->cues() returns a null pointer.
1425
1426         * html/track/TextTrackCue.cpp:
1427         (WebCore::TextTrackCue::cueIndex):
1428
1429 2013-06-21  Jer Noble  <jer.noble@apple.com>
1430
1431         [iOS] Hang drawing captions after pressing the home button while playing a video
1432         https://bugs.webkit.org/show_bug.cgi?id=117882
1433
1434         Reviewed by Eric Carlson.
1435
1436         Instead of rendering in a callback on the main thread, pre-render the captions and pass to the main
1437         thread as a CGImage. As such, rename paintTextTrackRepresentation() to createTextTrackRepresentationImage().
1438
1439         * html/shadow/MediaControlElements.cpp:
1440         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Renamed from
1441             paintTextTrackRepresentation. Now returns an Image object.
1442         * html/shadow/MediaControlElements.h:
1443         * platform/graphics/MediaPlayer.h:
1444         * platform/graphics/TextTrackRepresentation.h:
1445
1446 2013-06-21  Radu Stavila  <stavila@adobe.com>
1447
1448         [CSS Regions] Move overset compute code from flow thread to named flow thread
1449         https://bugs.webkit.org/show_bug.cgi?id=117835
1450
1451         Reviewed by Andreas Kling.
1452
1453         Moved computeOversetStateForRegions() and overset() methods from RenderFlowThread to RenderNamedFlowThread. 
1454         Added ASSERTS in RenderRegion::regionOversetState and RenderRegion::setRegionOversetState to ensure
1455         the region was created from an element.
1456
1457         * rendering/RenderBlock.cpp:
1458         (WebCore::RenderBlock::computeOverflow):
1459         * rendering/RenderFlowThread.cpp:
1460         (WebCore::RenderFlowThread::RenderFlowThread):
1461         * rendering/RenderFlowThread.h:
1462         * rendering/RenderNamedFlowThread.cpp:
1463         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1464         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
1465         * rendering/RenderNamedFlowThread.h:
1466         (WebCore::RenderNamedFlowThread::overset):
1467         * rendering/RenderRegion.cpp:
1468         (WebCore::RenderRegion::regionOversetState):
1469         (WebCore::RenderRegion::setRegionOversetState):
1470
1471 2013-06-21  Commit Queue  <commit-queue@webkit.org>
1472
1473         Unreviewed, rolling out r151838.
1474         http://trac.webkit.org/changeset/151838
1475         https://bugs.webkit.org/show_bug.cgi?id=117880
1476
1477         Breaks MediaPlayerPrivateQt on Mac (Requested by carewolf on
1478         #webkit).
1479
1480         * html/HTMLMediaElement.h:
1481
1482 2013-06-20  Brent Fulgham  <bfulgham@apple.com>
1483
1484         [Windows] AX: Radio buttons with "tab" role should describe themselves as tabs
1485         https://bugs.webkit.org/show_bug.cgi?id=117837
1486
1487         Reviewed by Chris Fleizach.
1488
1489         accessibility/aria-tab-role-on-buttons.html
1490
1491         * accessibility/AccessibilityNodeObject.cpp:
1492         (WebCore::AccessibilityNodeObject::canSetSelectedAttribute): Indicate that certain accessibility
1493         types (such as Tabs) can be selected.
1494         * accessibility/AccessibilityNodeObject.h: Signature for canSelectAttribute override.
1495
1496 2013-06-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1497
1498         Remove unused GesturePinch events
1499         https://bugs.webkit.org/show_bug.cgi?id=117875
1500
1501         Reviewed by Andreas Kling.
1502
1503         The gesturePinch events have not been used for some time, even Chromium
1504         had stop using them before moving out of webkit.
1505
1506         * dom/GestureEvent.cpp:
1507         (WebCore::GestureEvent::create):
1508         * page/EventHandler.cpp:
1509         (WebCore::EventHandler::handleGestureEvent):
1510         * platform/PlatformEvent.h:
1511
1512 2013-06-21  Radu Stavila  <stavila@adobe.com>
1513
1514         Improve the reattaching process while applying the :hover style
1515         https://bugs.webkit.org/show_bug.cgi?id=117590
1516
1517         Reviewed by Andreas Kling.
1518
1519         Changes made:
1520             - context is properly propagated to the element's children and to Shadow DOM elements.
1521             - context is properly set on the lazyReattach method.
1522             - another hit-testing is triggered when needed.
1523             - when a hovered element is detached, it's ancestors are also removed from the hovered state.
1524
1525         Tests: fast/css/hover-display-block-inline.html
1526                fast/css/hover-display-block-none.html
1527
1528         * dom/ContainerNode.cpp:
1529         (WebCore::ContainerNode::attach):
1530         (WebCore::ContainerNode::detach):
1531         * dom/ContainerNode.h:
1532         (WebCore::ContainerNode::attachChildren):
1533         (WebCore::ContainerNode::detachChildrenIfNeeded):
1534         (WebCore::ContainerNode::detachChildren):
1535         * dom/Document.cpp:
1536         (WebCore::Document::recalcStyle):
1537         (WebCore::Document::updateHoverActiveState):
1538         * dom/Element.cpp:
1539         (WebCore::Element::attach):
1540         (WebCore::Element::detach):
1541         * dom/ElementShadow.cpp:
1542         (WebCore::ElementShadow::attach):
1543         (WebCore::ElementShadow::detach):
1544         * dom/ElementShadow.h:
1545         * dom/Node.h:
1546         (WebCore::Node::lazyReattach):
1547
1548 2013-06-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1549
1550         HTMLMediaElement should inherit from MediaPlayerClient privately
1551         https://bugs.webkit.org/show_bug.cgi?id=117874
1552
1553         Reviewed by Andreas Kling.
1554
1555         Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
1556         MediaPlayerClient due to the Chromium port.
1557         This can now be fixed to a private inheritance.
1558
1559         * html/HTMLMediaElement.h:
1560
1561 2013-06-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1562
1563         Remove Chromium-only TouchDisambiguation
1564         https://bugs.webkit.org/show_bug.cgi?id=117873
1565
1566         Reviewed by Andreas Kling.
1567
1568         * page/TouchDisambiguation.cpp: Removed.
1569         * page/TouchDisambiguation.h: Removed.
1570
1571 2013-06-21  Zalan Bujtas  <zalan@apple.com>
1572
1573         Rollout r150602: Restoring text-overflow vs. floating rendering behaviour.
1574         https://bugs.webkit.org/show_bug.cgi?id=117871
1575
1576         Unreviewed. Rolling out r150602.
1577         Undesirable rendering behaviour.
1578
1579         * rendering/RenderBlockLineLayout.cpp:
1580         (WebCore::RenderBlock::checkLinesForTextOverflow):
1581
1582 2013-06-21  Radu Stavila  <stavila@adobe.com>
1583
1584         Web Inspector: Integrate new regionOversetChange event into inspector
1585         https://bugs.webkit.org/show_bug.cgi?id=117833
1586
1587         Added the new regionOversetChange event to the WebInspector.
1588
1589         Reviewed by Joseph Pecoraro.
1590
1591         Tests:  inspector/styles/protocol-css-regions-commands.html:
1592
1593         * inspector/Inspector.json:
1594         * inspector/InspectorCSSAgent.cpp:
1595         (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
1596         (WebCore::ChangeRegionOversetTask::scheduleFor):
1597         (WebCore::ChangeRegionOversetTask::unschedule):
1598         (WebCore::ChangeRegionOversetTask::reset):
1599         (WebCore::ChangeRegionOversetTask::onTimer):
1600         (WebCore::InspectorCSSAgent::resetNonPersistentData):
1601         (WebCore::InspectorCSSAgent::willRemoveNamedFlow):
1602         (WebCore::InspectorCSSAgent::didChangeRegionOverset):
1603         (WebCore::InspectorCSSAgent::regionOversetChanged):
1604         * inspector/InspectorCSSAgent.h:
1605         * inspector/InspectorInstrumentation.cpp:
1606         (WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
1607         * inspector/InspectorInstrumentation.h:
1608         (WebCore::InspectorInstrumentation::didChangeRegionOverset):
1609         * inspector/front-end/CSSNamedFlowCollectionsView.js:
1610         (WebInspector.CSSNamedFlowCollectionsView.prototype._regionOversetChanged):
1611         (WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
1612         (WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):
1613         * inspector/front-end/CSSStyleModel.js:
1614         (WebInspector.CSSStyleModel.prototype._regionOversetChanged):
1615         (WebInspector.CSSDispatcher.prototype.regionLayoutUpdated):
1616         (WebInspector.CSSDispatcher.prototype.regionOversetChanged):
1617         * rendering/RenderNamedFlowThread.cpp:
1618         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
1619
1620 2013-06-21  Sergio Correia  <sergio.correia@openbossa.org>
1621
1622         [EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping for EINTR on close
1623         https://bugs.webkit.org/show_bug.cgi?id=117872
1624
1625         Reviewed by Christophe Dumez.
1626
1627         closeWithRetry works around the Linux behavior of closing the file descriptor
1628         unconditionally even if the close() call is interrupted.
1629
1630         No new tests, no behavior change.
1631
1632         * platform/network/efl/NetworkStateNotifierEfl.cpp:
1633         (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Use closeWithRetry instead of
1634         looping for EINTR on close.
1635
1636 2013-06-21  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1637
1638         REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
1639         https://bugs.webkit.org/show_bug.cgi?id=117825
1640
1641         Reviewed by Kentaro Hara.
1642
1643         Partially revert r150663 so that we use Settings to enable WebAudio instead of
1644         RuntimeEnabledFeatures.
1645
1646         Introduce a new [EnabledBySetting] IDL extended attribute which behaves similarly to
1647         the existing [EnabledAtRuntime] but relies on Settings instead of RuntimeEnabledFeatures
1648         to determine if the feature should be enabled. Make use of this new IDL attribute for
1649         webkitAudioContext interface.
1650
1651         No new tests, no behavior change.
1652
1653         * Modules/webaudio/AudioContext.idl:
1654         * WebCore.exp.in:
1655         * WebCore.order:
1656         * bindings/generic/RuntimeEnabledFeatures.cpp:
1657         * bindings/generic/RuntimeEnabledFeatures.h:
1658         * bindings/scripts/CodeGeneratorJS.pm:
1659         (GenerateImplementation):
1660         * bindings/scripts/IDLAttributes.txt:
1661         * bindings/scripts/preprocess-idls.pl:
1662         (GenerateConstructorAttribute):
1663         * bindings/scripts/test/JS/JSTestObj.cpp:
1664         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
1665         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
1666         * bindings/scripts/test/JS/JSTestObj.h:
1667         * bindings/scripts/test/ObjC/DOMTestObj.h:
1668         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1669         (-[DOMTestObj TestSubObjEnabledBySetting]):
1670         (-[DOMTestObj setTestSubObjEnabledBySetting:]):
1671         * bindings/scripts/test/TestObj.idl:
1672         * page/Settings.in:
1673
1674 2013-06-21  Krzysztof Czech  <k.czech@samsung.com>
1675
1676         [ATK] Added support for aria-required attribute.
1677         https://bugs.webkit.org/show_bug.cgi?id=117730
1678
1679         Reviewed by Chris Fleizach.
1680
1681         Tests: accessibility/aria-required.html
1682                accessibility/html5-required-attribute.html
1683
1684         The aria-required attribute is used to indicate that user input is required on an
1685         element before a form can be submitted.
1686
1687         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1688         (setAtkStateSetFromCoreObject):
1689
1690 2013-06-21  Chris Fleizach  <cfleizach@apple.com>
1691
1692         IndieUI: Add basic IndieUI infrastructure
1693         https://bugs.webkit.org/show_bug.cgi?id=117367
1694
1695         Unreviewed. Revert erroneous file that was included accidentally.
1696
1697         * accessibility/AccessibilityNodeObject.h:
1698
1699 2013-06-21  Chris Fleizach  <cfleizach@apple.com>
1700
1701         IndieUI: Add basic IndieUI infrastructure
1702         https://bugs.webkit.org/show_bug.cgi?id=117367
1703
1704         Reviewed by Ryosuke Niwa.
1705
1706         IndieUI is a new W3C spec that aims to abstract the connection between input and action, so that
1707         a user (possibly using assistive technologies like a screen reader) does not need a specific kind
1708         of device (like a mouse) to interact with an object.
1709         http://www.w3.org/WAI/IndieUI/
1710
1711         This initial patch adds in the basic support for UIRequestEvent and the uiactions attribute.
1712         It modifies the config files to enable and build this feature.
1713
1714         Tests: indieui/create-uirequestevent.html
1715                indieui/uiactions.html
1716
1717         * CMakeLists.txt:
1718         * Configurations/FeatureDefines.xcconfig:
1719         * DerivedSources.make:
1720         * GNUmakefile.am:
1721         * Modules/indieui: Added.
1722         * Modules/indieui/UIRequestEvent.cpp: Added.
1723         (WebCore::UIRequestEventInit::UIRequestEventInit):
1724         (WebCore::UIRequestEvent::create):
1725         (WebCore::UIRequestEvent::UIRequestEvent):
1726         (WebCore::UIRequestEvent::~UIRequestEvent):
1727         (WebCore::UIRequestEvent::interfaceName):
1728         (WebCore::UIRequestEventDispatchMediator::UIRequestEventDispatchMediator):
1729         (WebCore::UIRequestEventDispatchMediator::event):
1730         (WebCore::UIRequestEventDispatchMediator::dispatchEvent):
1731         * Modules/indieui/UIRequestEvent.h: Added.
1732         (WebCore::UIRequestEvent::receiver):
1733         (WebCore::UIRequestEventDispatchMediator::create):
1734         * Modules/indieui/UIRequestEvent.idl: Added.
1735         * WebCore.xcodeproj/project.pbxproj:
1736         * accessibility/AccessibilityNodeObject.h:
1737         * dom/Element.cpp:
1738         (WebCore::Element::setUIActions):
1739         (WebCore::Element::UIActions):
1740         * dom/Element.h:
1741         * dom/Element.idl:
1742         * dom/Event.cpp:
1743         (WebCore::EventInit::EventInit):
1744         * dom/Event.h:
1745         * dom/EventNames.in:
1746         * dom/Node.cpp:
1747         (WebCore::Node::dispatchUIRequestEvent):
1748         * dom/Node.h:
1749         * dom/UIEvent.cpp:
1750         (WebCore::UIEventInit::UIEventInit):
1751         * dom/UIEvent.h:
1752         * html/HTMLAttributeNames.in:
1753
1754 2013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
1755
1756         REGRESSION(r145788): mouse drag on canvas shouldn't start selection
1757         https://bugs.webkit.org/show_bug.cgi?id=117860
1758
1759         Reviewed by Benjamin Poulain.
1760
1761         Like HTMLImageElement, HTMLCanvasElement shouldn't start selection.
1762
1763         Also uninline some virtual function overrides.
1764
1765         Test: fast/events/mosuedrag-on-canvas-should-not-start-selection.html
1766
1767         * html/HTMLCanvasElement.cpp:
1768         (WebCore::HTMLCanvasElement::areAuthorShadowsAllowed):
1769         (WebCore::HTMLCanvasElement::canContainRangeEndPoint):
1770         (WebCore::HTMLCanvasElement::canStartSelection):
1771         * html/HTMLCanvasElement.h:
1772
1773 2013-06-20  Ryosuke Niwa  <rniwa@webkit.org>
1774
1775         REGRESSION(r149652): accessing items in .children via id doesn't work when element is not rooted in DOM tree
1776         https://bugs.webkit.org/show_bug.cgi?id=117836
1777
1778         Reviewed by Benjamin Poulain.
1779
1780         When the root node of a HTML collection is not in the document or in a shadow tree,
1781         we shouldn't use its tree scope's id and name maps to find name getters.
1782
1783         Always use the slow path in such cases.
1784
1785         Test: fast/dom/htmlallcollection-detached-node-children.html
1786
1787         * html/HTMLCollection.cpp:
1788         (WebCore::HTMLCollection::namedItem):
1789
1790 2013-06-20  Alexey Proskuryakov  <ap@apple.com>
1791
1792         https://bugs.webkit.org/show_bug.cgi?id=116495
1793         Fix null-pointer deref in DocumentLoader::responseReceived()
1794
1795         Patch by Nate Chapin, reviewed by Mike West and myself.
1796
1797         Test: http/tests/security/XFrameOptions/x-frame-options-deny-delete-frame-in-load-event.html
1798
1799         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::responseReceived): Added
1800         a null check.
1801
1802 2013-06-20  Roger Fong  <roger_fong@apple.com>
1803
1804         Unreviewed. Roll out part of r150618.
1805
1806         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1807
1808 2013-06-20  Enrica Casucci  <enrica@apple.com>
1809
1810         Initial advance on the first glyph of the run is not correctly set for rtl text.
1811         https://bugs.webkit.org/show_bug.cgi?id=117839
1812         <rdar://problem/13860717>
1813
1814         Reviewed by Sam Weinig.
1815
1816         We need to set the initial advance to the glyphBuffer, using the
1817         initial advance of the complex run that will be drawn first.
1818         In order to choose the run correctly we must consider the text direction.
1819
1820         Test: fast/text/complex-first-glyph-with-initial-advance.html
1821
1822         * platform/graphics/mac/ComplexTextController.cpp:
1823         (WebCore::ComplexTextController::advance):
1824
1825 2013-06-20  Alex Christensen  <achristensen@apple.com>
1826
1827         Fixed WebGL compile errors on Windows.
1828         https://bugs.webkit.org/show_bug.cgi?id=117805
1829
1830         Reviewed by Brent Fulgham.
1831
1832         * html/canvas/WebGLRenderingContext.cpp: Included CString.h.
1833         Added PLATFORM(WIN) to existing lists of platform macros.
1834         * platform/graphics/ANGLEWebKitBridge.h:
1835         * platform/graphics/GraphicsContext3D.h:
1836         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
1837         * platform/graphics/OpenGLESShims.h:
1838
1839 2013-06-20  Simon Fraser  <simon.fraser@apple.com>
1840
1841         FrameView needs to initialize paintsEntireContents on creation
1842         https://bugs.webkit.org/show_bug.cgi?id=117844
1843
1844         Reviewed by Anders Carlsson.
1845
1846         In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
1847         In this mode, FrameView::paintsEntireContents() is true. However,
1848         we would only call setPaintsEntireContents(true) on the FrameView
1849         when the view's layer-backed status changes. FrameView also needs
1850         to fetch this state when it is initialized, because we may be creating
1851         a new FrameView for an already layer-backed WebHTMLView.
1852
1853         * page/ChromeClient.h:
1854         (WebCore::ChromeClient::shouldPaintEntireContents):
1855         * page/FrameView.cpp:
1856         (WebCore::FrameView::init):
1857
1858 2013-06-20  Simon Fraser  <simon.fraser@apple.com>
1859
1860         Sticky elements are missing or misplaced sometimes when reloading a page that scrolls to a named anchor
1861         https://bugs.webkit.org/show_bug.cgi?id=117819
1862
1863         Reviewed by Anders Carlsson.
1864         
1865         At the end of FrameView::performPostLayoutTasks() we call scrollToAnchor() which attempts
1866         to restore the scroll position to a named anchor, even when the document has been
1867         changed by layout. This ends up in a call to ScrollView::scrollTo(), which in turn
1868         calls repaintFixedElementsAfterScrolling(). However, repaintFixedElementsAfterScrolling()
1869         would bail if m_nestedLayoutCount != 0, so we never updated layer positions which
1870         depend on scroll position (but which would not be updated by layout, since their
1871         renderers are not marked for layout when scrolling happens).
1872         
1873         We've solved this problem once before in updateFixedElementsAfterScrolling() which
1874         checks for m_nestedLayoutCount <= 1, so that we do work on the outermost nested layout.
1875         Apply that same fix to repaintFixedElementsAfterScrolling().
1876
1877         Very timing-dependent, so hard to make a test.
1878
1879         * page/FrameView.cpp:
1880         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
1881
1882 2013-06-20  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1883
1884         HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
1885         https://bugs.webkit.org/show_bug.cgi?id=117830
1886
1887         Reviewed by Anders Carlsson.
1888
1889         The order of the template arguments at HashSet alternate 'find', 'contains' and
1890         'add' methods is reversed so that callers can just pass the translator
1891         and let the compiler deduce input argument type.
1892
1893         No new tests. No new functionality.
1894
1895         * dom/QualifiedName.cpp:
1896         (WebCore::QualifiedName::QualifiedName):
1897         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
1898         (WebCore::SubimageCacheWithTimer::getSubimage):
1899         * svg/SVGAElement.cpp:
1900         (WebCore::SVGAElement::isSupportedAttribute):
1901         * svg/SVGAnimateMotionElement.cpp:
1902         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
1903         * svg/SVGAnimateTransformElement.cpp:
1904         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
1905         * svg/SVGAnimationElement.cpp:
1906         (WebCore::SVGAnimationElement::isSupportedAttribute):
1907         * svg/SVGCircleElement.cpp:
1908         (WebCore::SVGCircleElement::isSupportedAttribute):
1909         * svg/SVGClipPathElement.cpp:
1910         (WebCore::SVGClipPathElement::isSupportedAttribute):
1911         * svg/SVGComponentTransferFunctionElement.cpp:
1912         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
1913         * svg/SVGCursorElement.cpp:
1914         (WebCore::SVGCursorElement::isSupportedAttribute):
1915         * svg/SVGEllipseElement.cpp:
1916         (WebCore::SVGEllipseElement::isSupportedAttribute):
1917         * svg/SVGFEBlendElement.cpp:
1918         (WebCore::SVGFEBlendElement::isSupportedAttribute):
1919         * svg/SVGFEColorMatrixElement.cpp:
1920         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
1921         * svg/SVGFEComponentTransferElement.cpp:
1922         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
1923         * svg/SVGFECompositeElement.cpp:
1924         (WebCore::SVGFECompositeElement::isSupportedAttribute):
1925         * svg/SVGFEConvolveMatrixElement.cpp:
1926         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
1927         * svg/SVGFEDiffuseLightingElement.cpp:
1928         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
1929         * svg/SVGFEDisplacementMapElement.cpp:
1930         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
1931         * svg/SVGFEDropShadowElement.cpp:
1932         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
1933         * svg/SVGFEGaussianBlurElement.cpp:
1934         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
1935         * svg/SVGFEImageElement.cpp:
1936         (WebCore::SVGFEImageElement::isSupportedAttribute):
1937         * svg/SVGFELightElement.cpp:
1938         (WebCore::SVGFELightElement::isSupportedAttribute):
1939         * svg/SVGFEMergeNodeElement.cpp:
1940         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
1941         * svg/SVGFEMorphologyElement.cpp:
1942         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
1943         * svg/SVGFEOffsetElement.cpp:
1944         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
1945         * svg/SVGFESpecularLightingElement.cpp:
1946         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
1947         * svg/SVGFETileElement.cpp:
1948         (WebCore::SVGFETileElement::isSupportedAttribute):
1949         * svg/SVGFETurbulenceElement.cpp:
1950         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
1951         * svg/SVGFilterElement.cpp:
1952         (WebCore::SVGFilterElement::isSupportedAttribute):
1953         (WebCore::SVGFilterElement::childShouldCreateRenderer):
1954         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1955         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
1956         * svg/SVGForeignObjectElement.cpp:
1957         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
1958         * svg/SVGGElement.cpp:
1959         (WebCore::SVGGElement::isSupportedAttribute):
1960         * svg/SVGGradientElement.cpp:
1961         (WebCore::SVGGradientElement::isSupportedAttribute):
1962         * svg/SVGImageElement.cpp:
1963         (WebCore::SVGImageElement::isSupportedAttribute):
1964         * svg/SVGLineElement.cpp:
1965         (WebCore::SVGLineElement::isSupportedAttribute):
1966         * svg/SVGLinearGradientElement.cpp:
1967         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
1968         * svg/SVGMPathElement.cpp:
1969         (WebCore::SVGMPathElement::isSupportedAttribute):
1970         * svg/SVGMarkerElement.cpp:
1971         (WebCore::SVGMarkerElement::isSupportedAttribute):
1972         * svg/SVGMaskElement.cpp:
1973         (WebCore::SVGMaskElement::isSupportedAttribute):
1974         * svg/SVGPathElement.cpp:
1975         (WebCore::SVGPathElement::isSupportedAttribute):
1976         * svg/SVGPatternElement.cpp:
1977         (WebCore::SVGPatternElement::isSupportedAttribute):
1978         * svg/SVGPolyElement.cpp:
1979         (WebCore::SVGPolyElement::isSupportedAttribute):
1980         * svg/SVGRadialGradientElement.cpp:
1981         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
1982         * svg/SVGRectElement.cpp:
1983         (WebCore::SVGRectElement::isSupportedAttribute):
1984         * svg/SVGScriptElement.cpp:
1985         (WebCore::SVGScriptElement::isSupportedAttribute):
1986         * svg/SVGStopElement.cpp:
1987         (WebCore::SVGStopElement::isSupportedAttribute):
1988         * svg/SVGStyleElement.cpp:
1989         (WebCore::SVGStyleElement::isSupportedAttribute):
1990         * svg/SVGStyledTransformableElement.cpp:
1991         (WebCore::SVGStyledTransformableElement::isSupportedAttribute):
1992         * svg/SVGSymbolElement.cpp:
1993         (WebCore::SVGSymbolElement::isSupportedAttribute):
1994         * svg/SVGTRefElement.cpp:
1995         (WebCore::SVGTRefElement::isSupportedAttribute):
1996         * svg/SVGTextContentElement.cpp:
1997         (WebCore::SVGTextContentElement::isSupportedAttribute):
1998         * svg/SVGTextElement.cpp:
1999         (WebCore::SVGTextElement::isSupportedAttribute):
2000         * svg/SVGTextPathElement.cpp:
2001         (WebCore::SVGTextPathElement::isSupportedAttribute):
2002         * svg/SVGTextPositioningElement.cpp:
2003         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
2004         * svg/SVGUseElement.cpp:
2005         (WebCore::SVGUseElement::isSupportedAttribute):
2006         (WebCore::isDisallowedElement):
2007         * svg/SVGViewElement.cpp:
2008         (WebCore::SVGViewElement::isSupportedAttribute):
2009         * svg/animation/SVGSMILElement.cpp:
2010         (WebCore::SVGSMILElement::isSupportedAttribute):
2011
2012 2013-06-20  Commit Queue  <commit-queue@webkit.org>
2013
2014         Unreviewed, rolling out r151451.
2015         http://trac.webkit.org/changeset/151451
2016         https://bugs.webkit.org/show_bug.cgi?id=117848
2017
2018         "Broke quite a lot of sites" (Requested by rhogan on #webkit).
2019
2020         * rendering/RenderBox.cpp:
2021         (WebCore::RenderBox::computePositionedLogicalWidth):
2022         (WebCore::RenderBox::computePositionedLogicalHeight):
2023         * rendering/RenderBox.h:
2024         (WebCore::RenderBox::intrinsicSize):
2025         * rendering/RenderButton.h:
2026         * rendering/RenderListBox.cpp:
2027         (WebCore::RenderListBox::RenderListBox):
2028         (WebCore::RenderListBox::computeLogicalHeight):
2029         * rendering/RenderListBox.h:
2030         * rendering/RenderMenuList.h:
2031         * rendering/RenderReplaced.h:
2032         * rendering/RenderTextControl.cpp:
2033         (WebCore::RenderTextControl::RenderTextControl):
2034         (WebCore::RenderTextControl::computeLogicalHeight):
2035         * rendering/RenderTextControl.h:
2036
2037 2013-06-20  Commit Queue  <commit-queue@webkit.org>
2038
2039         Unreviewed, rolling out r151788.
2040         http://trac.webkit.org/changeset/151788
2041         https://bugs.webkit.org/show_bug.cgi?id=117847
2042
2043         "This is the wrong fix" (Requested by rhogan on #webkit).
2044
2045         * rendering/RenderTextControl.cpp:
2046         (WebCore::RenderTextControl::computeLogicalHeight):
2047         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2048
2049 2013-05-24  Balazs Kelemen  <kbalazs@webkit.org>
2050
2051         [Gstreamer] cleanup buffering and state updates
2052         https://bugs.webkit.org/show_bug.cgi?id=116642
2053
2054         Reviewed by Philippe Normand.
2055
2056         Covered by existing media tests, especially the ones that have been unskipped.
2057
2058         Always do download buffering. It should not differ if preload is "none" because
2059         it's about when to start buffering, not about how. Fix a bunch other subtle issues
2060         to make this change go smoothly with the tests. As a bonus some tests that were
2061         failing so far started to pass.
2062         It is possible to further tweak the buffering in a way that will enable us to support
2063         a different and appropriate behavior for preload="metadata" but it should be managed
2064         a bit differently. I will implement it in a follow-up.
2065
2066         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2067         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2068         (WebCore::MediaPlayerPrivateGStreamer::load): Don't call setDownloadBuffering
2069         yet. Now it also responsible for starting the fill timer and it turned out that
2070         setting the download flag before the pipeline is set to a state has negative
2071         effect on some tests. Most probably GStreamer starts buffering too early if
2072         we set the download flag.
2073         (WebCore::MediaPlayerPrivateGStreamer::commitLoad): Call setDownloadBuffering now.
2074         (WebCore::MediaPlayerPrivateGStreamer::play): Ditto, plus set m_delayingLoad to false
2075         because otherwise setPreload will wrongly assume that the load has not been committed
2076         yet if prepareToPlay is not called before play.
2077         (WebCore::MediaPlayerPrivateGStreamer::pause): Make sure we don't commit a load here
2078         if it was not committed yet by looking in the pipeline state.
2079         (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): No need to observe the
2080         type of buffering.
2081         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Introduced m_downloadFinished to update
2082         ready and network states in updateStates based on it. The previously used condition
2083         - (maxTimeLoaded() == duration()) - was not correct in the case when duration is not known.
2084         (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): Removed a lie. If the fill timer is not active
2085         it does not necesarily means that download has been finished. This lie was actually ensuring
2086         a lot of tests to pass because it made the condition (maxTimeLoaded() == duration()) true.
2087         Now that state updates has been cleaned up we don't need to lie.
2088         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Merge all the parts that takes part in updating
2089         ready and network states. It was untrackable. Unset download buffering for for live streams early so
2090         we don't need to restart them.
2091         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2092         (MediaPlayerPrivateGStreamer): Removed m_startedBuffering because there is no need for it now.
2093
2094 2013-06-20  Eric Carlson  <eric.carlson@apple.com>
2095
2096         ASSERT removing then adding a <track> element
2097         https://bugs.webkit.org/show_bug.cgi?id=117814
2098
2099         Reviewed by Jer Noble.
2100
2101         Test: media/track/add-and-remove-track.html
2102
2103         * html/HTMLTrackElement.cpp:
2104         (WebCore::HTMLTrackElement::insertedInto): Always call ensureTrack before adding the track
2105             to the parent <video> element.
2106         (WebCore::HTMLTrackElement::ensureTrack): Call m_track->setTrackElement() in case the
2107             parent was cleared after m_track was created.
2108
2109         * html/track/LoadableTextTrack.cpp:
2110         (WebCore::LoadableTextTrack::setTrackElement): New, set m_trackElement.
2111         * html/track/LoadableTextTrack.h:
2112
2113 2013-06-20  Roger Fong  <roger_fong@apple.com>
2114
2115         Unreviewed. Build fix for Apple Windows port.
2116
2117         * rendering/RenderThemeWin.cpp:
2118         (WebCore::cssValueIdToSysColorIndex):
2119
2120 2013-06-20  Alexey Proskuryakov  <ap@apple.com>
2121
2122         [Mac] Downloaded file name encoding is incorrect when download link opens in a new window
2123         https://bugs.webkit.org/show_bug.cgi?id=117818
2124         <rdar://problem/14212635>
2125
2126         Reviewed by Brady Eidson.
2127
2128         No tests added. The machinery we have for logging downloaded file name is very
2129         far from being able to work in a secondary window.
2130
2131         * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest):
2132         Made a targeted fix - don't update encoding fallback array if we already have one,
2133         there is no chance for it to be more correct. In this case, it's incorrect because
2134         it comes from a new blank window, instead of original referer.
2135         We have a lot of code in addExtraFieldsToRequest() to struggle with this, and we have
2136         a FIXME to try not calling it from policy delegate.
2137
2138 2013-06-18  Robert Hogan  <robert@webkit.org>
2139
2140         REGRESSION (r151451): Text not vertically centered correctly on icloud.com
2141         https://bugs.webkit.org/show_bug.cgi?id=117744
2142
2143         Reviewed by David Hyatt.
2144
2145         The positioned height and width computation adds in the element's border and padding so 
2146         don't add it to the intrinsic height and preferred widths of text controls that are
2147         absolutely positioned.
2148
2149         Test: fast/replaced/height-of-positioned-text-control.html
2150
2151         * rendering/RenderTextControl.cpp:
2152         (WebCore::RenderTextControl::computeLogicalHeight):
2153         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2154
2155 2013-06-20  Roger Fong  <roger_fong@apple.com>
2156
2157         Make Windows makefile copy build output to a different folder.
2158         <rdar://problem/14219184>.
2159
2160         * WebCore.vcxproj/WebCore.make:
2161
2162 2013-06-19  Jer Noble  <jer.noble@apple.com>
2163
2164         Roll-on in-band captions are displayed bottom-to-top rather than top-to-bottom.
2165         https://bugs.webkit.org/show_bug.cgi?id=117811
2166
2167         Reviewed by Eric Carlson.
2168
2169         When comparing Generic cues, we should check that their type is Generic, not WebVTT.
2170
2171         * html/track/TextTrackCueGeneric.cpp:
2172         (WebCore::TextTrackCueGeneric::isOrderedBefore):
2173
2174 2013-06-20  Ralph Thomas  <ralpht@gmail.com>
2175
2176         [CMake][CSS Shaders] Add WebCore files for CSS Shaders to CMakeLists.txt
2177         https://bugs.webkit.org/show_bug.cgi?id=117711
2178
2179         Reviewed by Laszlo Gombos.
2180
2181         No new tests, no CMake platforms currently enable this functionality.
2182
2183         * CMakeLists.txt:
2184
2185 2013-06-20  Alexis Menard  <alexis@webkit.org>
2186
2187         Cleanup usage of CSSPropertyID and CSSValueID inside WebKit.
2188         https://bugs.webkit.org/show_bug.cgi?id=117829
2189
2190         Reviewed by Andreas Kling.
2191
2192         A lot of call sites were using integers to represent them. While it's
2193         not incorrect per se, it's not ideal for various reason such as type
2194         safety or to remove ambiguity.
2195
2196         This patch eradicate the wrong usage by not letting any integer based
2197         API for getting CSSValueIDs or CSSPropertyIDs from CSSPrimitiveValues.
2198
2199         Instead we use new but typed functions to construct the values as well
2200         as getting them. Two customs and internal types were added to CSSPrimitiveValue
2201         to handle correctly the new APIs.
2202
2203         It's good to note that in order to preserve compatibility on the
2204         CSSPrimitiveValue type whenever CSSPrimitiveValue handles a CSSValueID
2205         or a CSSPropertyID the return type for the public API will be CSS_IDENT
2206         despite it is a separate internal type.
2207
2208         No new tests: refactor, existing tests should cover.
2209
2210         * css/CSSComputedStyleDeclaration.cpp:
2211         (WebCore::ComputedStyleExtractor::propertyMatches):
2212         * css/CSSFontSelector.cpp:
2213         (WebCore::CSSFontSelector::addFontFaceRule):
2214         * css/CSSGradientValue.cpp:
2215         (WebCore::positionFromValue):
2216         (WebCore::CSSLinearGradientValue::customCssText):
2217         (WebCore::CSSLinearGradientValue::createGradient):
2218         (WebCore::CSSRadialGradientValue::customCssText):
2219         (WebCore::CSSRadialGradientValue::createGradient):
2220         * css/CSSParser.cpp:
2221         (WebCore::CSSParser::parseSystemColor):
2222         (WebCore::isFillPositionKeyword):
2223         (WebCore::CSSParser::parse4ValuesFillPosition):
2224         (WebCore::CSSParser::parse3ValuesFillPosition):
2225         (WebCore::CSSParser::parseFillPosition):
2226         (WebCore::CSSParser::parseFillRepeat):
2227         (WebCore::CSSParser::parseRadialGradient):
2228         (WebCore::CSSParser::isBlendMode):
2229         (WebCore::CSSParser::isCompositeOperator):
2230         * css/CSSParser.h:
2231         * css/CSSParserValues.cpp:
2232         (WebCore::CSSParserValue::createCSSValue):
2233         * css/CSSPrimitiveValue.cpp:
2234         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2235         (WebCore::CSSPrimitiveValue::primitiveType):
2236         (WebCore::propertyName):
2237         (WebCore::valueName):
2238         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2239         (WebCore::CSSPrimitiveValue::cleanup):
2240         (WebCore::CSSPrimitiveValue::getStringValue):
2241         (WebCore::CSSPrimitiveValue::customCssText):
2242         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2243         (WebCore::CSSPrimitiveValue::equals):
2244         * css/CSSPrimitiveValue.h:
2245         (WebCore::CSSPrimitiveValue::isFontRelativeLength):
2246         (WebCore::CSSPrimitiveValue::isValueID):
2247         (WebCore::CSSPrimitiveValue::createIdentifier):
2248         (WebCore::CSSPrimitiveValue::createParserOperator):
2249         (WebCore::CSSPrimitiveValue::getPropertyID):
2250         (WebCore::CSSPrimitiveValue::getValueID):
2251         * css/CSSPrimitiveValueMappings.h:
2252         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2253         (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
2254         (WebCore::CSSPrimitiveValue::operator ColumnSpan):
2255         (WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
2256         (WebCore::CSSPrimitiveValue::operator EBorderStyle):
2257         (WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
2258         (WebCore::CSSPrimitiveValue::operator CompositeOperator):
2259         (WebCore::CSSPrimitiveValue::operator ControlPart):
2260         (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
2261         (WebCore::CSSPrimitiveValue::operator EFillAttachment):
2262         (WebCore::CSSPrimitiveValue::operator EFillBox):
2263         (WebCore::CSSPrimitiveValue::operator EFillRepeat):
2264         (WebCore::CSSPrimitiveValue::operator EBoxPack):
2265         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
2266         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
2267         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
2268         (WebCore::CSSPrimitiveValue::operator EBoxSizing):
2269         (WebCore::CSSPrimitiveValue::operator EBoxDirection):
2270         (WebCore::CSSPrimitiveValue::operator EBoxLines):
2271         (WebCore::CSSPrimitiveValue::operator EBoxOrient):
2272         (WebCore::CSSPrimitiveValue::operator ECaptionSide):
2273         (WebCore::CSSPrimitiveValue::operator EClear):
2274         (WebCore::CSSPrimitiveValue::operator ECursor):
2275         (WebCore::CSSPrimitiveValue::operator CursorVisibility):
2276         (WebCore::CSSPrimitiveValue::operator EDisplay):
2277         (WebCore::CSSPrimitiveValue::operator EEmptyCell):
2278         (WebCore::CSSPrimitiveValue::operator EAlignItems):
2279         (WebCore::CSSPrimitiveValue::operator EJustifyContent):
2280         (WebCore::CSSPrimitiveValue::operator EFlexDirection):
2281         (WebCore::CSSPrimitiveValue::operator EAlignContent):
2282         (WebCore::CSSPrimitiveValue::operator EFlexWrap):
2283         (WebCore::CSSPrimitiveValue::operator EFloat):
2284         (WebCore::CSSPrimitiveValue::operator LineBreak):
2285         (WebCore::CSSPrimitiveValue::operator EListStylePosition):
2286         (WebCore::CSSPrimitiveValue::operator EListStyleType):
2287         (WebCore::CSSPrimitiveValue::operator EMarginCollapse):
2288         (WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
2289         (WebCore::CSSPrimitiveValue::operator RegionFragment):
2290         (WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
2291         (WebCore::CSSPrimitiveValue::operator ENBSPMode):
2292         (WebCore::CSSPrimitiveValue::operator EOverflow):
2293         (WebCore::CSSPrimitiveValue::operator EPageBreak):
2294         (WebCore::CSSPrimitiveValue::operator EPosition):
2295         (WebCore::CSSPrimitiveValue::operator EResize):
2296         (WebCore::CSSPrimitiveValue::operator ETableLayout):
2297         (WebCore::CSSPrimitiveValue::operator ETextAlign):
2298         (WebCore::CSSPrimitiveValue::operator TextAlignLast):
2299         (WebCore::CSSPrimitiveValue::operator TextJustify):
2300         (WebCore::CSSPrimitiveValue::operator TextDecoration):
2301         (WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
2302         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
2303         (WebCore::CSSPrimitiveValue::operator ETextSecurity):
2304         (WebCore::CSSPrimitiveValue::operator ETextTransform):
2305         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
2306         (WebCore::CSSPrimitiveValue::operator EUserDrag):
2307         (WebCore::CSSPrimitiveValue::operator EUserModify):
2308         (WebCore::CSSPrimitiveValue::operator EUserSelect):
2309         (WebCore::CSSPrimitiveValue::operator EVerticalAlign):
2310         (WebCore::CSSPrimitiveValue::operator EVisibility):
2311         (WebCore::CSSPrimitiveValue::operator EWhiteSpace):
2312         (WebCore::CSSPrimitiveValue::operator EWordBreak):
2313         (WebCore::CSSPrimitiveValue::operator EOverflowWrap):
2314         (WebCore::CSSPrimitiveValue::operator TextDirection):
2315         (WebCore::CSSPrimitiveValue::operator WritingMode):
2316         (WebCore::CSSPrimitiveValue::operator TextCombine):
2317         (WebCore::CSSPrimitiveValue::operator RubyPosition):
2318         (WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
2319         (WebCore::CSSPrimitiveValue::operator TextOverflow):
2320         (WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
2321         (WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
2322         (WebCore::CSSPrimitiveValue::operator TextOrientation):
2323         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
2324         (WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
2325         (WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
2326         (WebCore::CSSPrimitiveValue::operator FontWeight):
2327         (WebCore::CSSPrimitiveValue::operator FontItalic):
2328         (WebCore::CSSPrimitiveValue::operator FontSmallCaps):
2329         (WebCore::CSSPrimitiveValue::operator TextRenderingMode):
2330         (WebCore::CSSPrimitiveValue::operator ColorSpace):
2331         (WebCore::CSSPrimitiveValue::operator Hyphens):
2332         (WebCore::CSSPrimitiveValue::operator LineSnap):
2333         (WebCore::CSSPrimitiveValue::operator LineAlign):
2334         (WebCore::CSSPrimitiveValue::operator Order):
2335         (WebCore::CSSPrimitiveValue::operator ESpeak):
2336         (WebCore::CSSPrimitiveValue::operator BlendMode):
2337         (WebCore::CSSPrimitiveValue::operator LineCap):
2338         (WebCore::CSSPrimitiveValue::operator LineJoin):
2339         (WebCore::CSSPrimitiveValue::operator WindRule):
2340         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
2341         (WebCore::CSSPrimitiveValue::operator EBorderCollapse):
2342         (WebCore::CSSPrimitiveValue::operator EBorderFit):
2343         (WebCore::CSSPrimitiveValue::operator EImageRendering):
2344         (WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
2345         (WebCore::CSSPrimitiveValue::operator ColumnAxis):
2346         (WebCore::CSSPrimitiveValue::operator ColumnProgression):
2347         (WebCore::CSSPrimitiveValue::operator WrapFlow):
2348         (WebCore::CSSPrimitiveValue::operator WrapThrough):
2349         (WebCore::CSSPrimitiveValue::operator GridAutoFlow):
2350         (WebCore::CSSPrimitiveValue::convertToLength):
2351         (WebCore::CSSPrimitiveValue::operator EBufferedRendering):
2352         (WebCore::CSSPrimitiveValue::operator EColorInterpolation):
2353         (WebCore::CSSPrimitiveValue::operator EColorRendering):
2354         (WebCore::CSSPrimitiveValue::operator EDominantBaseline):
2355         (WebCore::CSSPrimitiveValue::operator EShapeRendering):
2356         (WebCore::CSSPrimitiveValue::operator ETextAnchor):
2357         (WebCore::CSSPrimitiveValue::operator SVGWritingMode):
2358         (WebCore::CSSPrimitiveValue::operator EVectorEffect):
2359         (WebCore::CSSPrimitiveValue::operator EMaskType):
2360         * css/CSSToStyleMap.cpp:
2361         (WebCore::CSSToStyleMap::mapFillAttachment):
2362         (WebCore::CSSToStyleMap::mapFillSize):
2363         (WebCore::CSSToStyleMap::mapAnimationDirection):
2364         (WebCore::CSSToStyleMap::mapAnimationFillMode):
2365         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
2366         (WebCore::CSSToStyleMap::mapAnimationName):
2367         (WebCore::CSSToStyleMap::mapAnimationPlayState):
2368         (WebCore::CSSToStyleMap::mapAnimationProperty):
2369         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
2370         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
2371         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
2372         * css/Counter.h:
2373         (WebCore::Counter::listStyleIdent):
2374         * css/DeprecatedStyleBuilder.cpp:
2375         (WebCore::ApplyPropertyNumber::applyValue):
2376         (WebCore::ApplyPropertyAuto::applyValue):
2377         (WebCore::ApplyPropertyClip::applyValue):
2378         (WebCore::ApplyPropertyColor::applyValue):
2379         (WebCore::ApplyPropertyLength::applyValue):
2380         (WebCore::ApplyPropertyString::applyValue):
2381         (WebCore::ApplyPropertyComputeLength::applyValue):
2382         (WebCore::ApplyPropertyFontFamily::applyValue):
2383         (WebCore::ApplyPropertyFontSize::applyValue):
2384         (WebCore::ApplyPropertyFontWeight::applyValue):
2385         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
2386         (WebCore::ApplyPropertyCounter::applyValue):
2387         (WebCore::ApplyPropertyCursor::applyValue):
2388         (WebCore::ApplyPropertyTextAlign::applyValue):
2389         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
2390         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
2391         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
2392         (WebCore::ApplyPropertyLineHeight::applyValue):
2393         (WebCore::ApplyPropertyPageSize::getPageSizeFromName):
2394         (WebCore::ApplyPropertyPageSize::applyValue):
2395         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
2396         (WebCore::ApplyPropertyResize::applyValue):
2397         (WebCore::ApplyPropertyVerticalAlign::applyValue):
2398         (WebCore::ApplyPropertyZoom::applyValue):
2399         (WebCore::ApplyPropertyClipPath::applyValue):
2400         (WebCore::ApplyPropertyShape::applyValue):
2401         (WebCore::ApplyPropertyImageResolution::applyValue):
2402         (WebCore::ApplyPropertyTextIndent::applyValue):
2403         * css/MediaQueryEvaluator.cpp:
2404         (WebCore::orientationMediaFeatureEval):
2405         (WebCore::view_modeMediaFeatureEval):
2406         (WebCore::pointerMediaFeatureEval):
2407         * css/SVGCSSParser.cpp:
2408         (WebCore::CSSParser::parseSVGValue):
2409         * css/SVGCSSStyleSelector.cpp:
2410         (WebCore::StyleResolver::applySVGProperty):
2411         * css/StylePropertySet.cpp:
2412         (WebCore::StylePropertySet::getLayeredShorthandValue):
2413         * css/StyleResolver.cpp:
2414         (WebCore::createGridTrackBreadth):
2415         (WebCore::createGridTrackList):
2416         (WebCore::createGridPosition):
2417         (WebCore::StyleResolver::applyProperty):
2418         (WebCore::colorForCSSValue):
2419         (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
2420         (WebCore::StyleResolver::colorFromPrimitiveValue):
2421         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
2422         (WebCore::StyleResolver::createFilterOperations):
2423         * css/ViewportStyleResolver.cpp:
2424         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
2425         * css/WebKitCSSMatrix.cpp:
2426         (WebCore::WebKitCSSMatrix::setMatrixValue):
2427         * editing/ApplyStyleCommand.cpp:
2428         (WebCore::toIdentifier):
2429         * editing/EditingStyle.cpp:
2430         (WebCore::identifierForStyleProperty):
2431         (WebCore::HTMLElementEquivalent::create):
2432         (WebCore::HTMLElementEquivalent::HTMLElementEquivalent):
2433         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
2434         (WebCore::HTMLTextDecorationEquivalent::create):
2435         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent):
2436         (WebCore::EditingStyle::textDirection):
2437         (WebCore::EditingStyle::prepareToApplyAt):
2438         (WebCore::EditingStyle::textDirectionForSelection):
2439         (WebCore::fontWeightIsBold):
2440         (WebCore::legacyFontSizeFromCSSValue):
2441         (WebCore::isTransparentColorValue):
2442         * editing/EditingStyle.h:
2443         * editing/markup.cpp:
2444         (WebCore::propertyMissingOrEqualToNone):
2445         * platform/blackberry/RenderThemeBlackBerry.cpp:
2446         (WebCore::RenderThemeBlackBerry::systemFont):
2447         * platform/blackberry/RenderThemeBlackBerry.h:
2448         (WebCore::RenderThemeBlackBerry::systemFont):
2449         * platform/blackberry/RenderThemeEfl.cpp:
2450         (WebCore::RenderThemeEfl::systemFont):
2451         * platform/blackberry/RenderThemeEfl.h:
2452         (WebCore::RenderThemeEfl::systemFont):
2453         * platform/gtk/RenderThemeGtk.cpp:
2454         (WebCore::RenderThemeGtk::systemFont):
2455         * platform/gtk/RenderThemeGtk.h:
2456         * platform/gtk/RenderThemeGtk2.cpp:
2457         (WebCore::RenderThemeGtk::systemColor):
2458         * platform/gtk/RenderThemeGtk3.cpp:
2459         (WebCore::RenderThemeGtk::systemColor):
2460         * platform/qt/RenderThemeQt.cpp:
2461         (WebCore::RenderThemeQt::systemFont):
2462         (WebCore::RenderThemeQt::systemColor):
2463         * platform/qt/RenderThemeQt.h:
2464         * rendering/RenderTheme.cpp:
2465         (WebCore::RenderTheme::systemColor):
2466         * rendering/RenderTheme.h:
2467         * rendering/RenderThemeMac.h:
2468         * rendering/RenderThemeMac.mm:
2469         (WebCore::RenderThemeMac::systemFont):
2470         (WebCore::RenderThemeMac::systemColor):
2471         * rendering/RenderThemeSafari.h:
2472         (WebCore::RenderThemeSafari::systemFont):
2473         * rendering/RenderThemeSafari.cpp:
2474         (WebCore::RenderThemeSafari::systemFont):
2475         * rendering/RenderThemeWin.cpp:
2476         (WebCore::RenderThemeWin::systemFont):
2477         (WebCore::cssValueIdToSysColorIndex):
2478         (WebCore::RenderThemeWin::systemColor):
2479         * rendering/RenderThemeWin.h:
2480         * rendering/RenderThemeWinCE.cpp:
2481         (WebCore::RenderThemeWinCE::systemFont):
2482         (WebCore::cssValueIdToSysColorIndex):
2483         (WebCore::RenderThemeWinCE::systemColor):
2484         * rendering/RenderThemeWinCE.h:
2485
2486 2013-06-19  Brent Fulgham  <bfulgham@apple.com>
2487
2488         AX: List Items should support a default action
2489         https://bugs.webkit.org/show_bug.cgi?id=117812
2490
2491         Reviewed by Chris Fleizach.
2492
2493         * accessibility/AccessibilityObject.cpp:
2494         (WebCore::AccessibilityObject::actionVerb): Provide a "select" verb
2495         for use in ListItemRole objects.
2496         * platform/LocalizedStrings.cpp:
2497         (WebCore::AXListItemActionVerb): Added.
2498         * platform/LocalizedStrings.h:
2499         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2500         (WebCore::AXListItemActionVerb):
2501         * platform/efl/LocalizedStringsEfl.cpp:
2502         (WebCore::AXListItemActionVerb):
2503         * platform/gtk/LocalizedStringsGtk.cpp:
2504         (WebCore::AXListItemActionVerb):
2505
2506 2013-06-20  Radu Stavila  <stavila@adobe.com>
2507
2508         [CSS Regions] Add new regionOversetChange event
2509         https://bugs.webkit.org/show_bug.cgi?id=117508
2510
2511         Added regionOversetChange event and tests for it. The overset value of the region has been moved to the ElementRareData
2512         object instead of the RenderRegion object. This was needed for the case when a reattach is performed (for instance by changing
2513         the display type of the region's containing block) and the RenderRegion object is destroyed. When computing the overset again,
2514         there would be no "previous" value to compare it to and decide whether the regionOversetChange event must be dispatched.
2515
2516         Reviewed by Antti Koivisto.
2517
2518         Tests:  fast/regions/webkit-named-flow-event-add-to-flow.html:
2519                 fast/regions/webkit-named-flow-event-auto-height.html:
2520                 fast/regions/webkit-named-flow-event-crash.html:
2521                 fast/regions/webkit-named-flow-event-no-regions.html:
2522                 fast/regions/webkit-named-flow-event-region-in-flexbox-no-overset-change.html: Added.
2523                 fast/regions/webkit-named-flow-event-region-in-flexbox-overset-change.html: Added.
2524                 fast/regions/webkit-named-flow-event-remove-from-dom.html:
2525                 fast/regions/webkit-named-flow-event-remove-from-flow.html:
2526                 fast/regions/webkit-named-flow-event-target.html:
2527                 fast/regions/webkit-named-flow-event-to-null.html:
2528                 fast/regions/webkit-named-flow-event.html:
2529
2530
2531         * GNUmakefile.list.am:
2532         * Target.pri:
2533         * WebCore.xcodeproj/project.pbxproj:
2534         * dom/Element.cpp:
2535         (WebCore::Element::setRegionOversetState):
2536         (WebCore::Element::regionOversetState):
2537         (WebCore::Element::webkitRegionOverset):
2538         * dom/Element.h:
2539         * dom/ElementRareData.cpp:
2540         * dom/ElementRareData.h:
2541         (WebCore::ElementRareData::regionOversetState):
2542         (WebCore::ElementRareData::setRegionOversetState):
2543         (WebCore::ElementRareData::ElementRareData):
2544         * dom/EventNames.h:
2545         * dom/WebKitNamedFlow.cpp:
2546         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
2547         (WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
2548         * dom/WebKitNamedFlow.h:
2549         (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
2550         (WebCore::ChangeRegionOversetTask::scheduleFor):
2551         (WebCore::ChangeRegionOversetTask::unschedule):
2552         (WebCore::ChangeRegionOversetTask::reset):
2553         (WebCore::ChangeRegionOversetTask::onTimer):
2554         * rendering/RegionOversetState.h: Added.
2555         * rendering/RenderBlock.cpp:
2556         (WebCore::RenderBlock::computeOverflow):
2557         * rendering/RenderFlowThread.cpp:
2558         (WebCore::RenderFlowThread::RenderFlowThread):
2559         (WebCore::RenderFlowThread::layout):
2560         (WebCore::RenderFlowThread::computeOversetStateForRegions):
2561         * rendering/RenderFlowThread.h:
2562         * rendering/RenderNamedFlowThread.cpp:
2563         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2564         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
2565         (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
2566         * rendering/RenderNamedFlowThread.h:
2567         * rendering/RenderRegion.cpp:
2568         (WebCore::RenderRegion::RenderRegion):
2569         (WebCore::RenderRegion::regionOversetState):
2570         (WebCore::RenderRegion::setRegionOversetState):
2571         * rendering/RenderRegion.h:
2572
2573 2013-06-20  James Craig  <james@cookiecrook.com>
2574
2575         AX: aria-required is not exposed on all expected roles
2576         https://bugs.webkit.org/show_bug.cgi?id=115123
2577
2578         Reviewed by Chris Fleizach.
2579
2580         aria-required is now exposed on more roles. Updated existing test file.
2581
2582         * accessibility/AccessibilityNodeObject.cpp:
2583         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
2584         * accessibility/AccessibilityNodeObject.h:
2585         * accessibility/AccessibilityObject.h:
2586         (WebCore::AccessibilityObject::supportsRequiredAttribute):
2587         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2588         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2589
2590 2013-06-20  Seokju Kwon  <seokju.kwon@gmail.com>
2591
2592         Web Inspector: Use console.timeStamp instead of console.markTimeline
2593         https://bugs.webkit.org/show_bug.cgi?id=117810
2594
2595         Reviewed by Joseph Pecoraro.
2596
2597         Webkit supports both console.timeStamp and console.markTimeline.
2598         And they do the exact same thing.
2599         This patch gets rid of console.markTimeline for Chrome/Firebug compatibility.
2600
2601         No new functionality, no new tests.
2602
2603         * WebCore.order:
2604         * page/Console.cpp:
2605         * page/Console.h:
2606         * page/Console.idl:
2607
2608 2013-06-20  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2609
2610         background-color and text-decoration are not preserved when merging paragraphs
2611         https://bugs.webkit.org/show_bug.cgi?id=116215
2612
2613         Reviewed by Ryosuke Niwa.
2614
2615         In mergeInlineAndImplicitStyleOfElement(), style from matched rules are retrieved.
2616         If they contain either background-color or text-decoration they will be removed
2617         by removeNonEditingProperties() due to copyEditingProperties() implicit
2618         'OnlyInheritableEditingProperties' parameter.
2619         We have already had similar issue at https://bugs.webkit.org/show_bug.cgi?id=53196
2620
2621         Tests: editing/deleting/merge-div-from-span-with-style.html
2622                editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration.html
2623                editing/deleting/merge-paragraph-from-span-with-style.html
2624
2625         * editing/EditingStyle.cpp:
2626         (WebCore::copyEditingProperties):
2627         (WebCore::editingStyleFromComputedStyle):
2628         Add EditingStyle:: due to move EditingPropertiesToInclude to EditingStyle.h.
2629
2630         (WebCore::toEditingProperties):
2631         Add a helper to easy convert PropertiesToInclude to EditingPropertiesToInclude,
2632         needed in mergeInlineAndImplicitStyleOfElement().
2633
2634         (WebCore::EditingStyle::removeAllButEditingProperties):
2635         Add a parameter to choose which editing properties should be preserved while
2636         removing all properties (OnlyInheritableEditingProperties implicite).
2637
2638         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
2639         Call removeAllButEditingProperties with parameter.
2640
2641         * editing/EditingStyle.h:
2642         Move EditingPropertiesType to the header as it's needed by removeAllButEditingProperties().
2643         Change EditingPropertiesType to EditingPropertiesToInclude to be consistent with
2644         PropertiesToInclude.
2645         Change removeNonEditingProperties() to removeAllButEditingProperties().
2646
2647 2013-06-19  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2648
2649         The order of the generated supplemental code is not guaranteed
2650         https://bugs.webkit.org/show_bug.cgi?id=117820
2651
2652         Reviewed by Kentaro Hara.
2653
2654         Sort the supplemental idl files before generating the code so that it is
2655         generated in a consistent order.
2656
2657         No new tests, covered by existing bindings tests.
2658
2659         * bindings/scripts/generate-bindings.pl:
2660
2661 2013-06-19  Commit Queue  <commit-queue@webkit.org>
2662
2663         Unreviewed, rolling out r151769.
2664         http://trac.webkit.org/changeset/151769
2665         https://bugs.webkit.org/show_bug.cgi?id=117821
2666
2667         Broke windows build due to missing GL/glext.h header.
2668         (Requested by bfulgham on #webkit).
2669
2670         * WebCore.vcxproj/WebCore.vcxproj:
2671         * WebCore.vcxproj/WebCore.vcxproj.filters:
2672
2673 2013-06-19  Alex Christensen  <alex.christensen@flexsim.com>
2674
2675         Added WebGL files to Windows build without enabling them.
2676         https://bugs.webkit.org/show_bug.cgi?id=117809
2677
2678         Reviewed by Brent Fulgham.
2679
2680         * WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
2681         * WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
2682
2683 2013-06-19  Alex Christensen  <achristensen@apple.com>
2684
2685         Windows build should include WebGL generated files if WebGL is enabled.
2686         https://bugs.webkit.org/show_bug.cgi?id=117802
2687
2688         Reviewed by Brent Fulgham.
2689
2690         Added WebGL generated files to Windows build if WebGL is enabled.
2691         * DerivedSources.cpp:
2692         * WebCore.vcxproj/WebCore.vcxproj:
2693         * WebCore.vcxproj/WebCore.vcxproj.filters:
2694
2695 2013-06-19  Alexey Proskuryakov  <ap@apple.com>
2696
2697         [Mac] Common crashes when playing media
2698         https://bugs.webkit.org/show_bug.cgi?id=117813
2699         <rdar://problem/13837412>
2700
2701         Reviewed by Eric Carlson.
2702
2703         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2704         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
2705         This method may be called from a secondary thread, but it does things that are
2706         not thread safe.
2707
2708 2013-06-19  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2709
2710         Incomplete repaint of input elements in writing-mode overflow
2711         https://bugs.webkit.org/show_bug.cgi?id=110246
2712
2713         Reviewed by Simon Fraser.
2714
2715         We calculate repaint rect using unflipped rect.
2716         However, RenderBox::applyCachedClipAndScrollOffsetForRepaint() which is called from repaint rect calculation
2717         wants that its argument rect is flipped.
2718         The reason is:
2719         - paintRect.move(-scrolledContentOffset()); cannot scroll if the rect is unflipped.
2720         - It cannot clip using intersect.
2721         Passing unflipped rect to applyCachedClipAndScrollOffsetForRepaint() cause invalid clipping.
2722         Therefore, this patch flipped the rect at the first part of the function and unflipped it at the last part of the function.
2723
2724         Scroll bar rect is absolute rect, so it is flipped rect.
2725         RenderLayer::invalidateScrollbarRect() pass the rect to repaintRectangle() which expects an argument rect is unflipped.
2726         This cause part of overlapping scroll bar doesn't fade out.
2727         Therefore, this patch flipped the rect and pass it to repaintRectangle().
2728
2729         Tests: fast/repaint/horizontal-bt-overflow-child.html
2730                fast/repaint/horizontal-bt-overflow-parent.html
2731                fast/repaint/horizontal-bt-overflow-same.html
2732                fast/repaint/vertical-overflow-child.html
2733                fast/repaint/vertical-overflow-parent.html
2734                fast/repaint/vertical-overflow-same.html
2735
2736         * rendering/RenderBox.cpp:
2737         (WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint):
2738         * rendering/RenderLayer.cpp:
2739         (WebCore::RenderLayer::invalidateScrollbarRect):
2740
2741 2013-06-19  Benjamin Poulain  <bpoulain@apple.com>
2742
2743         Use the PlatformEvent timestamp when creating a DOM Event
2744         https://bugs.webkit.org/show_bug.cgi?id=117179
2745
2746         Reviewed by Darin Adler.
2747
2748         Previously, the platform event's timestamp was ignored by WebCore and each
2749         new event would get a new timestamp by calling WTF::currentTime().
2750
2751         The problem is there can be a significant delay between the input event and
2752         it being dispatched to JavaScript. Computing the velocity/acceleration of the cursor
2753         is impossible since the delay vary from event to events.
2754         On WebKit2, the delay per event typically vary between 0 and 30ms.
2755
2756         This patch changes the Event creation code to use the timer passed by the underlying platform event.
2757
2758         * WebCore.exp.in:
2759         * dom/Event.cpp:
2760         (WebCore::Event::Event):
2761         * dom/Event.h:
2762         * dom/GestureEvent.cpp:
2763         (WebCore::GestureEvent::create):
2764         (WebCore::GestureEvent::GestureEvent):
2765         * dom/GestureEvent.h:
2766         * dom/KeyboardEvent.cpp:
2767         (WebCore::KeyboardEvent::KeyboardEvent):
2768         * dom/KeyboardEvent.h:
2769         * dom/MouseEvent.cpp:
2770         (WebCore::MouseEvent::create):
2771         (WebCore::MouseEvent::MouseEvent):
2772         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
2773         * dom/MouseEvent.h:
2774         * dom/MouseRelatedEvent.cpp:
2775         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
2776         * dom/MouseRelatedEvent.h:
2777         * dom/TouchEvent.cpp:
2778         (WebCore::TouchEvent::TouchEvent):
2779         * dom/UIEvent.cpp:
2780         (WebCore::UIEvent::UIEvent):
2781         * dom/UIEvent.h:
2782         * dom/UIEventWithKeyState.h:
2783         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
2784         * dom/WheelEvent.cpp:
2785         (WebCore::WheelEvent::WheelEvent):
2786         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
2787         * dom/WheelEvent.h:
2788         (WebCore::WheelEvent::create):
2789         * page/EventHandler.cpp:
2790         (WebCore::EventHandler::dispatchDragEvent):
2791         * platform/mac/PlatformEventFactoryMac.mm:
2792         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
2793         (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
2794         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
2795         (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
2796
2797 2013-06-19  Alexis Menard  <alexis@webkit.org>
2798
2799         Make sure to use CSSValueID and CSSPropertyID rather than integers
2800         https://bugs.webkit.org/show_bug.cgi?id=117481
2801
2802         Reviewed by Benjamin Poulain.
2803
2804         This will ensure that types are enforced when passing arguments in various
2805         css functions. Having a compile time check make sure that no mistakes
2806         will be done over the type.
2807
2808         The parser was also patched to directly use CSSValueID over integers.
2809         This patch also fixes various call sites abusing the usage of integers.
2810         This is part 1 of 2.
2811
2812         No new tests : existing ones should cover.
2813
2814         * WebCore.xcodeproj/project.pbxproj: copy CSSValueKeywords.h as it could be used in WebKit/ for example.
2815         * css/CSSComputedStyleDeclaration.cpp:
2816         (WebCore::valueForRepeatRule):
2817         (WebCore::cssIdentifierForFontSizeKeyword):
2818         (WebCore::identifierForFamily):
2819         (WebCore::valueForFamily):
2820         * css/CSSGrammar.y.in:
2821         * css/CSSParser.cpp:
2822         (WebCore::parseColorValue):
2823         (WebCore::parseKeywordValue):
2824         (WebCore::CSSParser::parseValidPrimitive):
2825         (WebCore::CSSParser::parseValue):
2826         (WebCore::CSSParser::parseContent):
2827         (WebCore::CSSParser::parseBackgroundColor):
2828         (WebCore::CSSParser::parseFillPositionComponent):
2829         (WebCore::CSSParser::parse3ValuesFillPosition):
2830         (WebCore::CSSParser::parseFillRepeat):
2831         (WebCore::CSSParser::parseAnimationProperty):
2832         (WebCore::CSSParser::parseCounterContent):
2833         (WebCore::CSSParser::parseLineHeight):
2834         (WebCore::CSSParser::parseFontSize):
2835         (WebCore::CSSParser::createFontWeightValueKeyword):
2836         (WebCore::CSSParser::parseFontWeight):
2837         (WebCore::parseDeprecatedGradientColorStop):
2838         (WebCore::parseGradientColorOrKeyword):
2839         (WebCore::CSSParser::parseDeprecatedRadialGradient):
2840         (WebCore::CSSParser::rewriteSpecifiers):
2841         * css/CSSParser.h:
2842         * css/CSSParserValues.h:
2843         * css/CSSPrimitiveValue.h:
2844         * css/CSSValuePool.cpp:
2845         (WebCore::CSSValuePool::createIdentifierValue):
2846         * css/CSSValuePool.h:
2847         * css/StylePropertySet.cpp:
2848         (WebCore::MutableStylePropertySet::setProperty):
2849         * css/StylePropertySet.h:
2850         * dom/StyledElement.cpp:
2851         (WebCore::StyledElement::setInlineStyleProperty):
2852         (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
2853         * dom/StyledElement.h:
2854         * editing/EditingStyle.cpp:
2855         (WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
2856         (WebCore::EditingStyle::prepareToApplyAt):
2857         * editing/EditorCommand.cpp:
2858         (WebCore::executeApplyStyle):
2859         (WebCore::executeFontSize):
2860         * html/HTMLElement.cpp:
2861         (WebCore::unicodeBidiAttributeForDirAuto):
2862         (WebCore::HTMLElement::applyAlignmentAttributeToStyle):
2863         * html/HTMLFontElement.cpp:
2864         (WebCore::HTMLFontElement::cssValueFromFontSizeNumber):
2865         (WebCore::HTMLFontElement::collectStyleForPresentationAttribute):
2866         * html/HTMLFontElement.h:
2867         * html/HTMLTableElement.cpp:
2868         (WebCore::leakBorderStyle):
2869         * html/track/TextTrackCue.cpp:
2870         (WebCore::TextTrackCue::getCSSWritingDirection):
2871         (WebCore::TextTrackCue::getCSSWritingMode):
2872         * html/track/TextTrackCue.h:
2873
2874 2013-06-19  Bem Jones-Bey  <bjonesbe@adobe.com>
2875
2876         Fix a few missed renames from Exclusions -> Shapes
2877         https://bugs.webkit.org/show_bug.cgi?id=117803
2878
2879         Reviewed by David Hyatt.
2880
2881         In the great CSS Exclusions to CSS Shapes rename, a few instances were
2882         missed. This fixes those instances.
2883
2884         No new tests, no behavior change, just renames.
2885
2886         * rendering/RenderBlock.cpp:
2887         (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
2888         (WebCore::RenderBlock::updateRegionsAndShapesAfterChildLayout):
2889         (WebCore::RenderBlock::layoutBlock):
2890         (WebCore::RenderBlock::logicalLeftOffsetForLine):
2891         (WebCore::RenderBlock::logicalRightOffsetForLine):
2892         * rendering/RenderBlock.h:
2893         * rendering/RenderDeprecatedFlexibleBox.cpp:
2894         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2895         * rendering/RenderFlexibleBox.cpp:
2896         (WebCore::RenderFlexibleBox::layoutBlock):
2897         * rendering/RenderGrid.cpp:
2898         (WebCore::RenderGrid::layoutBlock):
2899
2900 2013-06-19  Oliver Hunt  <oliver@apple.com>
2901
2902         Incorrect use of jsCast in a finalizer
2903         https://bugs.webkit.org/show_bug.cgi?id=117807
2904
2905         Reviewed by Geoffrey Garen.
2906
2907         We can't use jsCast in a finalizer as it checks an object's structure,
2908         and the structure may already have been swept by that point.  Use a
2909         static_cast instead.
2910
2911         * bridge/runtime_array.cpp:
2912         (JSC::RuntimeArray::destroy):
2913
2914 2013-06-19  Brent Fulgham  <bfulgham@apple.com>
2915
2916         [Windows] AX: Extend notification handling
2917         https://bugs.webkit.org/show_bug.cgi?id=117761.
2918
2919         Reviewed by Anders Carlsson.
2920
2921         accessibility/press-works-on-control-types.html
2922
2923         * accessibility/win/AXObjectCacheWin.cpp:
2924         (WebCore::AXObjectCache::postPlatformNotification): Add handlers for more event notifications.
2925         * accessibility/win/AccessibilityObjectWrapperWin.cpp:
2926         (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Protect against null
2927         pointer dereference found during testing.
2928         * dom/Document.cpp:
2929         (WebCore::Document::implicitClose): Execute notification handler for Windows as well as Mac.
2930         * page/FrameView.cpp:
2931         (WebCore::FrameView::layout): Ditto.
2932
2933 2013-06-19  peavo@outlook.com  <peavo@outlook.com>
2934
2935         [WinCairo] Webfont rendering is broken.
2936         https://bugs.webkit.org/show_bug.cgi?id=117695
2937
2938         Reviewed by Brent Fulgham.
2939
2940         The native font handle created from webfont data is invalid.
2941         In much the same way it's done in WinApple, we first need to install the webfont,
2942         create a native font handle from the new font name,
2943         and pass the font handle to the FontPlatformData object, where it's needed to get the glyphs.
2944
2945         * platform/graphics/FontPlatformData.h: Added HFONT parameter to constructor.
2946         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2947         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Release installed webfont.
2948         (WebCore::FontCustomPlatformData::fontPlatformData): Create valid HFONT handle for webfont.
2949         (WebCore::createUniqueFontName): Added method to create webfont name.
2950         (WebCore::createFontCustomPlatformData): Install font from webfont data.
2951         * platform/graphics/win/FontCustomPlatformDataCairo.h: Removed.
2952         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2953         (WebCore::FontPlatformData::FontPlatformData): Added HFONT parameter to constructor.
2954
2955 2013-06-19  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2956
2957         Implement WebIDL implements
2958         https://bugs.webkit.org/show_bug.cgi?id=117785
2959
2960         Reviewed by Kentaro Hara.
2961
2962         Add support for Web IDL 'implements' statements to the bindings generator:
2963         http://www.w3.org/TR/WebIDL/#dfn-implements-statement
2964
2965         Introduce ChildNode IDL interface and have Element, DocumentType and
2966         CharacterData implement it, to match the specification:
2967         http://dom.spec.whatwg.org/#childnode
2968
2969         There is no change in behavior, merely refactoring to match the
2970         specification by leveraging support for Web IDL implements statements.
2971
2972         No new tests, no behavior change.
2973
2974         * CMakeLists.txt:
2975         * DerivedSources.make:
2976         * DerivedSources.pri:
2977         * GNUmakefile.list.am:
2978         * bindings/scripts/generate-bindings.pl:
2979         * bindings/scripts/preprocess-idls.pl:
2980         (GeneratePartialInterface):
2981         (getImplementersFromIDL):
2982         * bindings/scripts/test/CPP/WebDOMTestImplements.cpp: Added.
2983         * bindings/scripts/test/CPP/WebDOMTestImplements.h: Added.
2984         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
2985         (WebDOMTestInterface::implementsStr1):
2986         (WebDOMTestInterface::implementsStr2):
2987         (WebDOMTestInterface::setImplementsStr2):
2988         (WebDOMTestInterface::implementsNode):
2989         (WebDOMTestInterface::setImplementsNode):
2990         (WebDOMTestInterface::implementsMethod1):
2991         (WebDOMTestInterface::implementsMethod4):
2992         * bindings/scripts/test/CPP/WebDOMTestInterface.h:
2993         * bindings/scripts/test/GObject/WebKitDOMTestImplements.cpp: Added.
2994         * bindings/scripts/test/GObject/WebKitDOMTestImplements.h: Added.
2995         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2996         (webkit_dom_test_interface_set_property):
2997         (webkit_dom_test_interface_get_property):
2998         (webkit_dom_test_interface_class_init):
2999         (webkit_dom_test_interface_implements_method1):
3000         (webkit_dom_test_interface_implements_method2):
3001         (webkit_dom_test_interface_implements_method4):
3002         (webkit_dom_test_interface_get_implements_str1):
3003         (webkit_dom_test_interface_get_implements_str2):
3004         (webkit_dom_test_interface_set_implements_str2):
3005         (webkit_dom_test_interface_get_implements_node):
3006         (webkit_dom_test_interface_set_implements_node):
3007         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
3008         * bindings/scripts/test/JS/JSTestImplements.cpp: Added.
3009         * bindings/scripts/test/JS/JSTestImplements.h: Added.
3010         * bindings/scripts/test/JS/JSTestInterface.cpp:
3011         (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
3012         (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
3013         (WebCore::jsTestInterfaceImplementsStr1):
3014         (WebCore::jsTestInterfaceImplementsStr2):
3015         (WebCore::jsTestInterfaceImplementsStr3):
3016         (WebCore::jsTestInterfaceImplementsNode):
3017         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
3018         (WebCore::setJSTestInterfaceImplementsStr2):
3019         (WebCore::setJSTestInterfaceImplementsStr3):
3020         (WebCore::setJSTestInterfaceImplementsNode):
3021         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
3022         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
3023         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
3024         (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
3025         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
3026         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
3027         * bindings/scripts/test/JS/JSTestInterface.h:
3028         * bindings/scripts/test/ObjC/DOMTestImplements.cpp: Added.
3029         * bindings/scripts/test/ObjC/DOMTestImplements.h: Added.
3030         * bindings/scripts/test/ObjC/DOMTestInterface.h:
3031         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
3032         (-[DOMTestInterface implementsStr1]):
3033         (-[DOMTestInterface implementsStr2]):
3034         (-[DOMTestInterface setImplementsStr2:]):
3035         (-[DOMTestInterface implementsStr3]):
3036         (-[DOMTestInterface setImplementsStr3:]):
3037         (-[DOMTestInterface implementsNode]):
3038         (-[DOMTestInterface setImplementsNode:]):
3039         (-[DOMTestInterface implementsMethod1]):
3040         (-[DOMTestInterface implementsMethod2:objArg:]):
3041         (-[DOMTestInterface implementsMethod3]):
3042         (-[DOMTestInterface implementsMethod4]):
3043         * bindings/scripts/test/TestImplements.idl: Added.
3044         * dom/CharacterData.idl:
3045         * dom/ChildNode.idl: Copied from Source/WebCore/dom/DocumentType.idl.
3046         * dom/DocumentType.idl:
3047         * dom/Element.idl:
3048
3049 2013-06-19  Robert Hogan  <robert@webkit.org>
3050
3051         Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
3052         https://bugs.webkit.org/show_bug.cgi?id=114879
3053
3054         Reviewed by David Hyatt.
3055         Per http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when width is auto then floating non-replaced,
3056         absolute non-replaced, and inline-block non-replaced elements should use shrink-to-fit width. This trumps any no-wrap property 
3057         on the element so if we are shrinking to fit ensure our minimum width respects all possible line breaks.
3058
3059         Test: fast/block/shrink-to-fit-width-container-with-floating-children.html
3060
3061         * rendering/RenderBlock.cpp:
3062         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
3063
3064 2013-06-19  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3065
3066         Do not require JS*Custom.h header if [CustomPutFunction] / [CustomNamedSetter] is used
3067         https://bugs.webkit.org/show_bug.cgi?id=117795
3068
3069         Reviewed by Kentaro Hara.
3070
3071         Fix the JS bindings generator so that it stops including JS*Custom.h header whenever
3072         [CustomPutFunction] or [CustomNamedSetter] IDL extended attributes are used. We don't
3073         really need this custom header and this forces the developer to create dummy custom
3074         headers so that it builds.
3075
3076         If the developer really needs such custom header to be included, he can still use
3077         [JSCustomHeader] IDL extended attribute to do so.
3078
3079         This patch also remove the dummy custom headers that were created but are no longer
3080         required to build.
3081
3082         No new tests, no behavior change. Already covered by the following bindings test:
3083         TestInterface.idl
3084
3085         * GNUmakefile.list.am:
3086         * Target.pri:
3087         * WebCore.vcxproj/WebCore.vcxproj:
3088         * WebCore.vcxproj/WebCore.vcxproj.filters:
3089         * WebCore.xcodeproj/project.pbxproj:
3090         * bindings/js/JSDOMStringMapCustom.h: Removed.
3091         * bindings/js/JSHTMLAppletElementCustom.cpp:
3092         * bindings/js/JSHTMLAppletElementCustom.h: Removed.
3093         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3094         * bindings/js/JSHTMLEmbedElementCustom.h: Removed.
3095         * bindings/js/JSHTMLObjectElementCustom.cpp:
3096         * bindings/js/JSHTMLObjectElementCustom.h: Removed.
3097         * bindings/js/JSHistoryCustom.cpp:
3098         * bindings/js/JSHistoryCustom.h: Removed.
3099         * bindings/js/JSLocationCustom.cpp:
3100         * bindings/js/JSLocationCustom.h: Removed.
3101         * bindings/js/JSStorageCustom.cpp:
3102         * bindings/js/JSStorageCustom.h: Removed.
3103         * bindings/scripts/CodeGeneratorJS.pm:
3104         (GenerateHeader):
3105
3106 2013-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3107
3108         [BlackBerry] Several tests crash due to an assert when creating an ImageBuffer
3109         https://bugs.webkit.org/show_bug.cgi?id=117793
3110
3111         Reviewed by Rob Buis.
3112
3113         JIRA 388741
3114
3115         Fixes a crash in several layout tests due to an assert when
3116         creating an ImageBuffer with an empty size.
3117
3118         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
3119         (WebCore::ImageBuffer::ImageBuffer): Return early if the given
3120         size is empty.
3121
3122 2013-06-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3123
3124         [GStreamer] [texmap] the bytesPerLine is wrong when updating the texture
3125         https://bugs.webkit.org/show_bug.cgi?id=117551
3126
3127         Reviewed by Philippe Normand.
3128
3129         The bytesPerLine (or stride) is wrong when updating the texture
3130         content. This is because the naturalSize() is not updated to the
3131         current buffer. This patch extracts the current value of the size and
3132         the stride.
3133
3134         No tests required.
3135
3136         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3137         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
3138         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
3139
3140 2013-06-19  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
3141
3142         Adjust internal size on gstreamer source element when receiving data if necessary
3143         https://bugs.webkit.org/show_bug.cgi?id=116534
3144
3145         Reviewed by Philippe Normand.
3146
3147         If the size received in didReceiveResponse is smaller than the actual size of the received data
3148         update the internal size and the appsrc size to the proper value.
3149
3150         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3151         (StreamingClient::didReceiveData):
3152
3153 2013-06-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3154
3155         [GStreamer] Potential race condition when getting the video sink caps.
3156         https://bugs.webkit.org/show_bug.cgi?id=117736
3157
3158         Reviewed by Philippe Normand.
3159
3160         There is a potential race condition with the pad setting caps, as the
3161         buffer and the caps won't match when renegotiation happens, and might
3162         cause a crash.
3163
3164         This patch keeps an instance of the current caps in the video sink,
3165         and it is accessible through a getter method. Hence the player can ask
3166         for the current caps without running into a race condition.
3167
3168         No new tests. No change in behaviour.
3169
3170         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3171         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
3172         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3173         (WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
3174         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
3175         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3176         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3177         (webkitVideoSinkGetProperty):
3178         (webkitVideoSinkStop):
3179         (webkitVideoSinkSetCaps):
3180         (webkit_video_sink_class_init):
3181
3182 2013-06-19  Kihong Kwon  <kihong.kwon@samsung.com>
3183
3184         Vibration can be canceled even if page visibility status is hidden
3185         https://bugs.webkit.org/show_bug.cgi?id=117333
3186
3187         Reviewed by Gyuyoung Kim.
3188
3189         vibration can be canceled in the onvisibilitychange listener even if page visibility is changed to hidden status.
3190         Therefore cancelVibration needs to work when page visibility is hidden.
3191
3192         Tests: vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html
3193
3194         * Modules/vibration/NavigatorVibration.cpp:
3195         (WebCore::NavigatorVibration::vibrate):
3196         * Modules/vibration/Vibration.h:
3197         (WebCore::Vibration::isVibrating):
3198         * testing/Internals.cpp:
3199         (WebCore::Internals::isVibrating):
3200         * testing/Internals.h:
3201         * testing/Internals.idl:
3202
3203 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
3204
3205         Input type range slider is not updated when min or max are changed
3206         https://bugs.webkit.org/show_bug.cgi?id=117778
3207
3208         Reviewed by Kent Tamura.
3209
3210         Merge https://chromium.googlesource.com/chromium/blink/+/089c7a0ba2d85b9b59632c2603fbc6472b310be1.
3211
3212         Test: fast/forms/range/range-change-min-max.html
3213
3214         * html/RangeInputType.cpp:
3215         (WebCore::RangeInputType::minOrMaxAttributeChanged):
3216
3217 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
3218
3219         Remove two superfluous overrides of supportsFocus
3220         https://bugs.webkit.org/show_bug.cgi?id=117770
3221
3222         Reviewed by Benjamin Poulain.
3223
3224         Merge https://chromium.googlesource.com/chromium/blink/+/4228964a63e3a889a40efce0d01866629fdcd9b9.
3225
3226         * html/HTMLOptGroupElement.cpp:
3227         * html/HTMLOptGroupElement.h:
3228         * html/HTMLOptionElement.cpp:
3229         * html/HTMLOptionElement.h:
3230
3231 2013-06-18  Darin Adler  <darin@apple.com>
3232
3233         Improve style of null checks in FrameView::setFrameRect
3234         https://bugs.webkit.org/show_bug.cgi?id=117681
3235
3236         Reviewed by Sam Weinig.
3237
3238         * page/FrameView.cpp:
3239         (WebCore::FrameView::setFrameRect): Used nested if statements and local variables
3240         to tighten this code up a little.
3241
3242 2013-06-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3243
3244         Move IDL extended attributes to their correct location
3245         https://bugs.webkit.org/show_bug.cgi?id=117732
3246
3247         Reviewed by Kentaro Hara.
3248
3249         Move IDL extended attributes to their correct location according to the
3250         latest Web IDL specification. We used to be inconsistent in the positioning
3251         of the extended attributes. This simplifies a lot the code of the IDL parser
3252         and makes our IDL files more standard.
3253
3254         Based on Blink r148345 by Kentaro Hara <haraken@chromium.org>.
3255
3256         No new tests, no behavior change.
3257
3258         * Modules/encryptedmedia/MediaKeyMessageEvent.idl:
3259         * Modules/notifications/Notification.idl:
3260         * Modules/speech/SpeechSynthesisVoice.idl:
3261         * bindings/scripts/IDLParser.pm:
3262         (parseDefinitions):
3263         (parseInterfaceMembers):
3264         (parseInterfaceMember):
3265         (parseDictionaryMembers):
3266         (parseAttributeOrOperationOrIterator):
3267         (parseAttribute):
3268         * css/CSSFontFaceLoadEvent.idl:
3269         * dom/Document.idl:
3270         * dom/Element.idl:
3271         * dom/Node.idl:
3272         * html/HTMLBodyElement.idl:
3273         * html/HTMLEmbedElement.idl:
3274         * html/HTMLFrameSetElement.idl:
3275         * html/HTMLMediaElement.idl:
3276         * html/HTMLSelectElement.idl:
3277         * html/HTMLSourceElement.idl:
3278         * page/DOMWindow.idl:
3279         * svg/SVGElementInstance.idl:
3280         * svg/SVGScriptElement.idl:
3281         * testing/TypeConversions.idl:
3282
3283 2013-06-18  Jessie Berlin  <jberlin@apple.com>
3284
3285         Let the script to update the Localizable.strings file do the reordering it wants to do.
3286
3287         Rubber-stamped by Anders Carlsson.
3288
3289         * English.lproj/Localizable.strings:
3290
3291 2013-06-18  Brent Fulgham  <bfulgham@apple.com>
3292
3293         [Windows] Unreviewed gardening -- show missing AccessibilityNodeObject source
3294         files in Visual Studio.
3295
3296         * WebCore.vcxproj/WebCore.vcxproj: Add missing files.
3297         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3298
3299 2013-06-18  Commit Queue  <commit-queue@webkit.org>
3300
3301         Unreviewed, rolling out r151513.
3302         http://trac.webkit.org/changeset/151513
3303         https://bugs.webkit.org/show_bug.cgi?id=117763
3304
3305         It causes assertions in debug (Requested by benjaminp on
3306         #webkit).
3307
3308         * rendering/RenderLayerBacking.cpp:
3309         (WebCore::RenderLayerBacking::startAnimation):
3310         (WebCore::RenderLayerBacking::startTransition):
3311
3312 2013-06-18  Roger Fong  <roger_fong@apple.com>
3313
3314         Replace tools32 folder with tools and update WebKit Windows solution accordingly.
3315         <rdar://problem/14118143>.
3316
3317         Rubberstamped by Brent Fulgham.
3318
3319         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
3320         * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props:
3321         * WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props:
3322         * WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props:
3323         * WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd:
3324         * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props:
3325         * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
3326         * WebCore.vcxproj/WebCore.vcxproj:
3327         * WebCore.vcxproj/WebCoreDebug.props:
3328         * WebCore.vcxproj/WebCoreDebugWinCairo.props:
3329         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
3330         * WebCore.vcxproj/WebCoreGeneratedDebug.props:
3331         * WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props:
3332         * WebCore.vcxproj/WebCoreGeneratedProduction.props:
3333         * WebCore.vcxproj/WebCoreGeneratedRelease.props:
3334         * WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props:
3335         * WebCore.vcxproj/WebCoreProduction.props:
3336         * WebCore.vcxproj/WebCoreRelease.props:
3337         * WebCore.vcxproj/WebCoreReleaseWinCairo.props:
3338         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
3339         * WebCore.vcxproj/build-generated-files.sh:
3340
3341 2013-06-18  Zoltan Horvath  <zoltan@webkit.org>
3342
3343         [CSS Shapes] Remove lineOverflowsFromShapeInside boolean from RenderBlock::layoutRunsAndFloatsInRange function
3344         https://bugs.webkit.org/show_bug.cgi?id=117757
3345
3346         Reviewed by David Hyatt.
3347
3348         We don't need keep lineOverflowsFromShapeInside boolean in RenderBlock::layoutRunsAndFloatsInRange and in its
3349         helpers because it's easy to decide whether we are in an shape content overflow state or not, so I got rid of
3350         lineOverflowsFromShapeInside's occurences and updated the affected functions.
3351
3352         Covered by existing overflow tests in fast/exclusions/shape-inside and fast/regions/shape-inside.
3353
3354         * rendering/RenderBlock.h: Update helper's definition.
3355         * rendering/RenderBlockLineLayout.cpp:
3356         (WebCore::pushShapeContentOverflowBelowTheContentBox): Add condition when overflow is already positioned.
3357         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Remove lineOverflowsFromShapeInside.
3358         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):  Remove lineOverflowsFromShapeInside.
3359         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):  Remove lineOverflowsFromShapeInside.
3360
3361 2013-06-18  Zalan Bujtas  <zalan@apple.com>
3362
3363         widthMediaFeatureEval ends up with null FrameView during iframe unload.
3364         https://bugs.webkit.org/show_bug.cgi?id=117754
3365
3366         Reviewed by Geoffrey Garen.
3367
3368         Ensure that MediaQueryEvaluator checks against NULL FrameView.
3369
3370         While frames are being unloaded, the Frame object does not necessarily have valid
3371         FrameView anymore. Layout on the main frame can end up querying media values on such child
3372         frames, while detaching.
3373
3374         Test: fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery.html
3375
3376         * css/MediaQueryEvaluator.cpp:
3377         (WebCore::orientationMediaFeatureEval):
3378         (WebCore::aspect_ratioMediaFeatureEval):
3379         (WebCore::evalResolution):
3380         (WebCore::heightMediaFeatureEval):
3381         (WebCore::widthMediaFeatureEval):
3382         (WebCore::MediaQueryEvaluator::eval):
3383
3384 2013-06-18  Ruth Fong  <ruth_fong@apple.com>
3385
3386         Expose a getMediaType method in WebKit
3387         https://bugs.webkit.org/show_bug.cgi?id=117667
3388
3389         Reviewed by Brady Eidson.
3390
3391         * WebCore.exp.in: Updated to add a symbol for 
3392         HitTestResult::mediaIsVideo method
3393         and alphabetize the list of exposed methods.
3394
3395 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
3396
3397         Remove unused bool argument from ReplacementFragment's constructor
3398         https://bugs.webkit.org/show_bug.cgi?id=117752
3399
3400         Reviewed by Antti Koivisto.
3401
3402         Merge https://chromium.googlesource.com/chromium/blink/+/265586d9f154a9dff657511d09926429b8e1b53d.
3403
3404         * editing/ReplaceSelectionCommand.cpp:
3405         (WebCore::ReplacementFragment::ReplacementFragment):
3406         (WebCore::ReplaceSelectionCommand::doApply):
3407
3408 2013-06-18  Eric Carlson  <eric.carlson@apple.com>
3409
3410         Not all subtitle tracks are SDH
3411         https://bugs.webkit.org/show_bug.cgi?id=117738
3412
3413         Reviewed by Dean Jackson.
3414
3415         No new tests, existing tests updated.
3416
3417         * html/track/InbandTextTrack.cpp:
3418         (WebCore::InbandTextTrack::isSDH): New.
3419
3420         * html/track/InbandTextTrack.h: Add isSDH override.
3421         * html/track/TextTrack.h:
3422
3423         * page/CaptionUserPreferencesMac.mm:
3424         (WebCore::trackDisplayName): Only add "SDH" label if a track claims to be SDH.
3425
3426         * platform/graphics/InbandTextTrackPrivate.h:
3427         (WebCore::InbandTextTrackPrivate::isSDH): New.
3428
3429         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
3430         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3431         (WebCore::InbandTextTrackPrivateAVFObjC::isSDH): Return true if track has both "transcribes
3432             spoken dialog for accessibility" and "describes music and sound for accessibility" 
3433             characteristics.
3434
3435 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
3436
3437         Simplify FormKeyGenerator::willDeleteForm
3438         https://bugs.webkit.org/show_bug.cgi?id=117751
3439
3440         Reviewed by Antti Koivisto.
3441
3442         Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac
3443
3444         * html/FormController.cpp:
3445         (WebCore::FormKeyGenerator::willDeleteForm):
3446
3447 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
3448
3449         REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
3450         https://bugs.webkit.org/show_bug.cgi?id=117747
3451
3452         Reviewed by Kent Tamura.
3453
3454         Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28
3455
3456         r147612 added setNeedsLayout(true, MarkOnlyThis) for
3457         TextControlInnerTextElement renderer. It's ok for input[type=text]
3458         because RenderTextControlSingleLine also has needsLayout flag, and it
3459         has only the inner text renderer as a child.
3460
3461         As for input[type=search], it doesn't work. Renderer structure for
3462         input[type=search] is:
3463
3464         RenderTextControlSingleLine
3465         └Renderer for TextControlInnerContainer
3466           └Renderer for TextControlInnerElement
3467             └Renderer for TextControlInnerTextElement
3468
3469         After r147612, there is a case that only RenderTextControlSingleLine
3470         and TextControlInnerTextElement renderer have needsLayout flag, and
3471         others don't.  It won't trigger layout for
3472         TextControlInnerTextElement renderer.
3473
3474         We should set needsLayout flags of TextControlInnerContainer renderer
3475         and TextControlInnerElement renderer by MarkContainingBlockChain.
3476
3477         Manual Tests: search-select-all-with-focus-style.html
3478         (I tried but couldn't make a test that works in DRT)
3479
3480         * rendering/RenderTextControlSingleLine.cpp:
3481         (WebCore::RenderTextControlSingleLine::styleDidChange):
3482
3483 2013-06-18  Dean Jackson  <dino@apple.com>
3484
3485         Attempted build fix for non-Mac.
3486
3487         * platform/graphics/SimpleFontData.cpp:
3488         (WebCore::SimpleFontData::nonSyntheticItalicFontData):
3489
3490 2013-06-18  Dean Jackson  <dino@apple.com>
3491
3492         Synthesized vertical italics on rotated glyphs are transformed incorrectly
3493         https://bugs.webkit.org/show_bug.cgi?id=117726
3494
3495         Reviewed by Enrica Casucci.
3496
3497         If a font does not have italic glyphs, and is in a vertical flow, then
3498         the synthesis of italics was skewing in the wrong direction. While here,
3499         ensure that no CJK text will get italics in vertical layout.
3500
3501         This is a topic under discussion in the CSS Working Group. The resolution
3502         at the June 2013 face-to-face was that:
3503         - italics in Japanese (and Chinese) text are rare in vertical layout
3504         - most people wanted Latin text to italicize in the direction of the line flow
3505
3506         The final behaviour was left undefined, but we consider the change here
3507         to be sufficient for now. In all cases, the best solution is to avoid
3508         synthesized italics by specifying a font that includes such forms.
3509
3510         Tests: fast/text/international/synthesized-italic-vertical-latin.html
3511                fast/text/international/synthesized-italic-vertical.html
3512
3513         * platform/graphics/FontGlyphs.cpp:
3514         (WebCore::glyphDataAndPageForCJKCharacterWithoutSyntheticItalic): New function
3515             that makes a new glyph data pair that is marked as NOT using a synthesized italic.
3516         (WebCore::FontGlyphs::glyphDataAndPageForCharacter): If this is a CJK character and
3517             has a synthesized oblique, then run it through the function above to make a new glyph data pair.
3518         * platform/graphics/SimpleFontData.cpp:
3519         (WebCore::SimpleFontData::nonSyntheticItalicFontData): Creates/returns a new SimpleFontData that will
3520             not synthesize italics.
3521         * platform/graphics/SimpleFontData.h: New method nonSyntheticItalicFontData.
3522         * platform/graphics/mac/FontMac.mm:
3523         (WebCore::Font::drawGlyphs): This is the actual bug fix. If you are in a vertical flow, the
3524             skew direction should be downwards, not leftwards.
3525
3526 2013-06-18  Commit Queue  <commit-queue@webkit.org>
3527
3528         Unreviewed, rolling out r151549.
3529         http://trac.webkit.org/changeset/151549
3530         https://bugs.webkit.org/show_bug.cgi?id=117741
3531
3532         broke selection in the web inspector source after scrolling
3533         (Requested by smfr on #webkit).
3534
3535         * rendering/RenderBox.cpp:
3536         (WebCore::RenderBox::computeRectForRepaint):
3537         * rendering/RenderLayerModelObject.cpp:
3538         * rendering/RenderLayerModelObject.h:
3539
3540 2013-06-18  Santosh Mahto  <santosh.ma@samsung.com>
3541
3542         <video> element delays document load event for ~ 3 seconds
3543         https://bugs.webkit.org/show_bug.cgi?id=90272
3544
3545         Reviewed by Eric Carlson.
3546
3547         Test: media/media-preload-no-delay-loadevent.html
3548
3549         * html/HTMLMediaElement.cpp:
3550         (WebCore::HTMLMediaElement::prepareForLoad):
3551         No need to delay document load event here  when preload="none"
3552
3553 2013-06-18  Diego Pino Garcia  <dpino@igalia.com>
3554
3555         [GTK] Remove comment about possibility of handling ObjCPolymorphic (it's used by ObjC bindings only)
3556         https://bugs.webkit.org/show_bug.cgi?id=117546
3557
3558         Reviewed by Xan Lopez.
3559
3560         According to the WebKit IDL spec the modifier ObjCPolymorphic only
3561         applies to the Objective-C bindings generator
3562
3563         * bindings/scripts/CodeGeneratorGObject.pm:
3564         (IsPolymorphic): Remove comment. Search parameter 'type' in array, instead of
3565         concatening a series of 'or' conditionals.
3566
3567 2013-06-18  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3568
3569         Fix after r151673
3570         https://bugs.webkit.org/show_bug.cgi?id=116042
3571
3572         Reviewed by Philippe Normand.
3573
3574         Removed a spurious semicolon in the video sink caps definition.
3575
3576         No new tests, no behavior change.
3577
3578         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3579
3580 2013-06-18  Praveen R Jadhav  <praveen.j@samsung.com>
3581
3582         [WebSpeech] Speech Recognition requires convertValue support in JSDictionary
3583         https://bugs.webkit.org/show_bug.cgi?id=117731
3584
3585         Reviewed by Christophe Dumez.
3586
3587         Build fails after enabling ENABLE_SCRIPTED_SPEECH feature. This patch
3588         resolves the issue.
3589
3590         No new tests. No change in behaviour.
3591
3592         * bindings/js/JSDictionary.cpp:
3593         (WebCore::JSDictionary::convertValue):
3594         * bindings/js/JSDictionary.h:
3595
3596 2013-06-18  Mary Wu  <mary.wu@torchmobile.com.cn>
3597
3598         [BlackBerry] only notify download client when download error
3599         https://bugs.webkit.org/show_bug.cgi?id=117687
3600
3601         Reviewed by Rob Buis.
3602
3603         When met network error in downloading, we notify the error to download
3604         client through download stream, we shouldn't notify page client the error.
3605         RIM JIRA 419985
3606
3607         * platform/network/blackberry/NetworkJob.cpp:
3608         (WebCore::NetworkJob::shouldNotifyClientFailed):
3609
3610 2013-06-18  Mario Sanchez Prada  <mario.prada@samsung.com>
3611
3612         Shader compiler not properly configured for GLES on cairo based ports
3613         https://bugs.webkit.org/show_bug.cgi?id=117705
3614
3615         Reviewed by Martin Robinson.
3616
3617         Configure the shader compiler with SH_ESSL_OUTPUT for GLESv2
3618         compliant platforms, and with SH_GLSL_OUTPUT otherwise.
3619
3620         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3621         (WebCore::GraphicsContext3D::GraphicsContext3D):
3622
3623 2013-06-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3624
3625         touching any idl rebuilds all derived sources
3626         https://bugs.webkit.org/show_bug.cgi?id=117708
3627
3628         Reviewed by Kentaro Hara.
3629
3630         Fix preprocess-idls.pl script to update the following files only
3631         if they have changed:
3632         DerivedSources/WebCore/supplemental_dependency.tmp
3633         DerivedSources/WebCore/DOMWindowConstructors.idl
3634         DerivedSources/WebCore/WorkerContextConstructors.idl
3635
3636         This avoids triggering uselessly bindings generation for all IDL
3637         files whenever an IDL file is touched.
3638
3639         No new tests, no behavior change.
3640
3641         * bindings/scripts/preprocess-idls.pl:
3642         (WriteFileIfChanged):
3643         (GeneratePartialInterface):
3644
3645 2013-06-18  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3646
3647         [GStreamer] [texmap] upload a video buffer into the video texture
3648         https://bugs.webkit.org/show_bug.cgi?id=116042
3649
3650         Reviewed by Philippe Normand.
3651
3652         This patch prepares more quickly the texture when the video frame is
3653         already in the GPU memory.
3654
3655         It is done using a new buffer's metadata available in GStreamer 1.2,
3656         and its purpose is to upload buffers into a OpenGL texture.
3657
3658         If the decoder provides buffers with this metadata, the buffer will be
3659         uploaded into the texture used for the video display and it will be
3660         rendered, avoiding a expensive mem copies. This is particularly useful
3661         for Full HD videos, where all the processing and display will be done
3662         in the GPU.
3663
3664         No new tests, covered by existing tests.
3665
3666         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3667         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
3668         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
3669         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3670         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3671         (webkitVideoSinkProposeAllocation):
3672
3673 2013-06-17  Peter Gal  <galpeter@inf.u-szeged.hu>
3674
3675         [curl] Set the http response status text
3676         https://bugs.webkit.org/show_bug.cgi?id=117307
3677
3678         Reviewed by Brent Fulgham.
3679
3680         No new tests, covered by existing ones.
3681
3682         * platform/network/curl/ResourceHandleManager.cpp:
3683         (WebCore::headerCallback):
3684
3685 2013-06-14  Brent Fulgham  <bfulgham@apple.com>
3686
3687         AX: Correct accessibility role when -webkit-box:display is used.
3688         https://bugs.webkit.org/show_bug.cgi?id=117706
3689
3690         Reviewed by Chris Fleizach.
3691
3692         accessibility/box-styled-lists.html
3693
3694         * accessibility/AccessibilityRenderObject.cpp:
3695         (WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
3696         of the list element type, treat it as a ListItemRole accessibility role, regardless
3697         of what specific renderer is being used.
3698
3699 2013-06-17  Roger Fong  <roger_fong@apple.com>
3700
3701         Add some UNUSED_PARAMs to RenderBlock.cpp so that it builds properly if CSS_EXCLUSIONS is disabled.
3702         https://bugs.webkit.org/show_bug.cgi?id=117722.
3703
3704         Rubberstamped by Jon Lee.
3705
3706         * rendering/RenderBlock.cpp:
3707         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
3708         (WebCore::RenderBlock::logicalLeftOffsetForLine):
3709         (WebCore::RenderBlock::logicalRightOffsetForLine):
3710
3711 2013-06-17  Beth Dakin  <bdakin@apple.com>
3712
3713         PageBanners appear over HTML5 video when media element is in full screen mode
3714         https://bugs.webkit.org/show_bug.cgi?id=117721
3715         -and corresponding-
3716         <rdar://problem/13686998>
3717
3718         Reviewed by Sam Weinig.
3719
3720         Update the scrolling tree when a header/footer has been removed.
3721         * rendering/RenderLayerCompositor.cpp:
3722         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3723         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3724
3725 2013-06-17  Roger Fong  <roger_fong@apple.com>
3726
3727         Modify Windows makefiles to copy some bin output into Program Files.
3728         https://bugs.webkit.org/show_bug.cgi?id=117714.
3729         <rdar://problem/14179054>
3730
3731         Reviewed by Brent Fulgham.
3732
3733         * WebCore.vcxproj/WebCore.make:
3734
3735 2013-06-17  Max Vujovic  <mvujovic@adobe.com>
3736
3737         Crash in loadPendingShaders
3738         https://bugs.webkit.org/show_bug.cgi?id=117665
3739
3740         Reviewed by Dean Jackson.
3741
3742         Speculative fix because the crash reports do not contain a test case.
3743
3744         Rearrange the conditions to check m_state.hasPendingShaders() first. Additionally, check if
3745         m_state.style() is non-null.
3746
3747         No new tests. We don't know how to reproduce this crash yet.
3748
3749         * css/StyleResolver.cpp:
3750         (WebCore::StyleResolver::loadPendingShaders):
3751
3752 2013-06-17  Ruth Fong  <ruth_fong@apple.com>
3753
3754         REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
3755         https://bugs.webkit.org/show_bug.cgi?id=20599
3756
3757         Add a "Download Video"/"Download Audio" context menu item to download media
3758         elements.
3759
3760         Reviewed by Beth Dakin.
3761
3762         No new tests. media/context-menu-action.html,
3763         which has been disabled by bug 116651, is used to test context menus.
3764
3765         * English.lproj/Localizable.strings: Updated to
3766         include localizable strings for "Download Video" and "Download Audio".
3767
3768         * page/ContextMenuController.cpp: Updated to 
3769         include and handle a "Download Video/Audio" context menu item.
3770
3771         * platform/ContextMenuItem.h:
3772
3773         * platform/LocalizedStrings.cpp: 
3774         * platform/LocalizedStrings.h:
3775         * platform/efl/LocalizedStringsEfl.cpp:
3776         * platform/gtk/LocalizedStringsGtk.cpp:
3777         * platform/qt/LocalizedStringsQt.cpp: 
3778         Updated to include localizable strings for "Download Video" and "Download Audio".
3779
3780 2013-06-17  Zoltan Horvath  <zoltan@webkit.org>
3781
3782         [CSS Shapes] Consider bottom borders when calculating the position of the overflow
3783         https://bugs.webkit.org/show_bug.cgi?id=117663
3784
3785         Reviewed by Alexandru Chiculita.
3786
3787         When you have a shape and the content overflows from the shape we need to push the overflow below the content box,
3788         not below the border box. We didn't consider the bottom borders of the content box, now I fixed it too and the overflow
3789         just starts after the content box. I added a new helper function called pushShapeContentOverflowBelowTheContentBox. Now
3790         both the shape in flow thread and the shape overflow use the same function. I added a new test and modified the existing
3791         tests to cover all the affected cases.
3792
3793         Test: fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
3794         Existing overflow tests also modified to test the behavior:
3795               fast/exclusions/shape-inside/shape-inside-empty-expected.html
3796               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content-expected.html
3797               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
3798               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html
3799               fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html
3800               fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html
3801               fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
3802
3803         * rendering/RenderBlockLineLayout.cpp:
3804         (WebCore::pushShapeContentOverflowBelowTheContentBox):
3805         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine):
3806         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
3807
3808 2013-06-17  Igor Oliveira  <igor.o@sisa.samsung.com>
3809
3810         [CSS Regions] ::before and ::after pseudo-elements are not displayed for regions
3811         https://bugs.webkit.org/show_bug.cgi?id=80163
3812
3813         When the implementation of the before/after was moved to the DOM, before/after generated
3814         content stoppped to work with css regions. The problem happens when:
3815         1. RenderRegion can not have children and when the PseudoElement::attach tries to create a renderer for the
3816         generated content, it fails.
3817         2. RenderRegion::canHaveGeneratedChildren should not be false because regions can have generated content.
3818
3819         Reviewed by David Hyatt.
3820
3821         Tests: fast/regions/region-dynamic-after-before.html
3822                fast/regions/region-generated-content-before-after.html
3823
3824         * dom/NodeRenderingContext.cpp:
3825         (WebCore::NodeRenderingContext::shouldCreateRenderer):
3826         * rendering/RenderRegion.h:
3827
3828 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
3829
3830         [Mac] Remove unmaintained GStreamer specific video code.
3831         https://bugs.webkit.org/show_bug.cgi?id=117694
3832
3833         Reviewed by Philippe Normand.
3834
3835         No new tests, no behaviour change.
3836
3837         * platform/mac/WebVideoFullscreenController.mm:
3838         (-[WebVideoFullscreenController setupVideoOverlay:]):
3839         (-[WebVideoFullscreenController windowDidLoad]):
3840         (-[WebVideoFullscreenController setMediaElement:]):
3841         (-[WebVideoFullscreenController windowDidExitFullscreen]):
3842
3843 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
3844
3845         [Qt] Remove Qt specific QTKIT flagged code.
3846         https://bugs.webkit.org/show_bug.cgi?id=117635
3847
3848         Reviewed by Simon Hausmann.
3849
3850         Due to disabling QTKIT for Qt in r151546, the
3851         code the flags that are not taken into account
3852         anymore and the code that has been rendered
3853         unreachable by this are removed.
3854
3855         No new tests, no behavioural change.
3856
3857         * Target.pri:
3858         * WebCore.exp.in:
3859         * page/Settings.cpp:
3860         * page/Settings.h:
3861         * platform/KURL.h:
3862         * platform/SharedBuffer.h:
3863         * platform/cf/KURLCFNet.cpp:
3864         (WebCore::KURL::fileSystemPath):
3865         * platform/cf/SharedBufferCF.cpp:
3866         * platform/graphics/FloatSize.h:
3867         * platform/graphics/IntRect.h:
3868         * platform/graphics/IntSize.h:
3869         * platform/graphics/MediaPlayer.cpp:
3870         (WebCore::installedMediaEngines):
3871         * platform/graphics/cg/FloatSizeCG.cpp:
3872         * platform/graphics/cg/IntRectCG.cpp:
3873         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3874         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3875         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
3876         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
3877         (WebCore::MediaPlayerPrivateQTKit::paint):
3878         (-[WebCoreMovieObserver layerHostChanged:]):
3879         * platform/mac/SharedBufferMac.mm:
3880         (+[WebCoreSharedBufferData initialize]):
3881         (WebCore::SharedBuffer::createWithContentsOfFile):
3882
3883 2013-06-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3884
3885         REGRESSSION(r151632) : Build error on ASSERT(WTF_USE_GRAMMAR_CHECKING)
3886         https://bugs.webkit.org/show_bug.cgi?id=117692
3887
3888         Reviewed by Jocelyn Turcotte.
3889
3890         Ifdef the feature-depending code and fix the assertions to check runtime conditions.
3891
3892         * editing/Editor.cpp:
3893         (WebCore::Editor::advanceToNextMisspelling):
3894         (WebCore::Editor::markMisspellingsOrBadGrammar):
3895         (WebCore::Editor::markBadGrammar):
3896         * editing/TextCheckingHelper.cpp:
3897         (WebCore::findBadGrammars):
3898         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
3899         (WebCore::TextCheckingHelper::findFirstBadGrammar):
3900         (WebCore::TextCheckingHelper::isUngrammatical):
3901         (WebCore::TextCheckingHelper::markAllBadGrammar):
3902         (WebCore::checkTextOfParagraph):
3903         * editing/TextCheckingHelper.h:
3904
3905 2013-06-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3906
3907         Unreviewed, rolling out r151632.
3908         http://trac.webkit.org/changeset/151632
3909         https://bugs.webkit.org/show_bug.cgi?id=117585
3910
3911         Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
3912         platforms
3913
3914         * page/ContextMenuController.cpp:
3915         (WebCore::ContextMenuController::contextMenuItemSelected):
3916         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
3917         (WebCore::ContextMenuController::populate):
3918         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
3919         * platform/LocalizedStrings.cpp:
3920         (WebCore::contextMenuItemTagSpellingMenu):
3921         (WebCore::contextMenuItemTagShowSpellingPanel):
3922         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3923         * platform/LocalizedStrings.h:
3924         * platform/efl/LocalizedStringsEfl.cpp:
3925         (WebCore::contextMenuItemTagSpellingMenu):
3926         (WebCore::contextMenuItemTagShowSpellingPanel):
3927         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3928         * platform/gtk/LocalizedStringsGtk.cpp:
3929         (WebCore::contextMenuItemTagSpellingMenu):
3930         (WebCore::contextMenuItemTagShowSpellingPanel):
3931         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3932         * platform/qt/LocalizedStringsQt.cpp:
3933         (WebCore::contextMenuItemTagSpellingMenu):
3934         (WebCore::contextMenuItemTagShowSpellingPanel):
3935         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3936
3937 2013-06-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3938
3939         Unreviewed. Fix make distcheck.
3940
3941         * GNUmakefile.list.am: Remove non existent files from compilation
3942         and add a missing header file.
3943
3944 2013-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3945
3946         Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
3947         https://bugs.webkit.org/show_bug.cgi?id=117585
3948
3949         Reviewed by Anders Carlsson.
3950
3951         Do not add "Check Grammar With Spelling" and "Ignore Grammar" to the context menu
3952         when GRAMMAR_CHECKING is off.
3953         Replace "Spelling and Grammar" with "Spelling" as the sub menu title and "Show/Hide Spelling
3954         and Grammar" with "Show/Hide Spelling" when GRAMMAR_CHECKING is off.
3955
3956         Additionally, guard grammar checking in context menu code to not necessarily
3957         compile it.
3958
3959         No new layout tests because every port has a different way of showing
3960         spelling/grammar context menu items.
3961
3962         * page/ContextMenuController.cpp:
3963         (WebCore::ContextMenuController::contextMenuItemSelected):
3964         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
3965         (WebCore::ContextMenuController::populate):
3966         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
3967         * platform/LocalizedStrings.cpp:
3968         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3969         (WebCore::contextMenuItemTagSpellingMenu):
3970         (WebCore::contextMenuItemTagShowSpellingPanel):
3971         * platform/LocalizedStrings.h:
3972         * platform/efl/LocalizedStringsEfl.cpp:
3973         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3974         (WebCore::contextMenuItemTagSpellingMenu):
3975         (WebCore::contextMenuItemTagShowSpellingPanel):
3976         * platform/gtk/LocalizedStringsGtk.cpp:
3977         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3978         (WebCore::contextMenuItemTagSpellingMenu):
3979         (WebCore::contextMenuItemTagShowSpellingPanel):
3980         * platform/qt/LocalizedStringsQt.cpp:
3981         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
3982         (WebCore::contextMenuItemTagSpellingMenu):
3983         (WebCore::contextMenuItemTagShowSpellingPanel):
3984
3985 2013-06-16  Simon Fraser  <simon.fraser@apple.com>
3986
3987         Fix test assertion after r151624
3988
3989         An assertion was hit in RenderObject::willBeDestroyed()
3990         for fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
3991         because the code asserted that the RenderObject had been removed from
3992         the FrameView's slowRepaintObject set before remove() was called,
3993         so move the assertion to after that call.
3994
3995         * rendering/RenderObject.cpp:
3996         (WebCore::RenderObject::willBeDestroyed):
3997
3998 2013-06-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3999
4000         Remove a redundant virtual call to hostWindow() in FrameView::invalidateRect()
4001         https://bugs.webkit.org/show_bug.cgi?id=117685
4002
4003         Reviewed by Andreas Kling.
4004
4005         From Blink r152490 by <vivek.vg@samsung.com>
4006
4007         * page/FrameView.cpp:
4008         (WebCore::FrameView::invalidateRect): Avoid hostWindow() twice call.
4009
4010 2013-06-16  Kent Tamura  <tkent@chromium.org>
4011
4012         Fix two assertion failures in Range::insertNode
4013         https://bugs.webkit.org/show_bug.cgi?id=116511
4014
4015         Reviewed by Ryosuke Niwa.
4016
4017         > ASSERTION FAILED: childBefore == (offset ? container->childNode(offset - 1) : 0)
4018         > third_party/WebKit/Source/WebCore/dom/RangeBoundaryPoint.h(115) : void WebCore::RangeBoundaryPoint::set(PassRefPtr<WebCore::Node>, int, WebCore::Node *)
4019
4020         > ASSERTION FAILED: child->parentNode()
4021         > ../../third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h(133) : void WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node *)
4022         >  1   0x87594b2 WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node*)
4023         >  2   0x87534a9 WebCore::Range::insertNode(WTF::PassRefPtr<WebCore::Node>, int&)
4024
4025         Range::insertNode calls Node::insertBefore, in which an event handler
4026         can update the DOM structure so that RangeBoundaryPoint don't like. We
4027         postpone event dispatching by EventQueueScope.
4028
4029         Also, remove old comments about Acid3. The behavior is standardized.
4030         (Step 9 of http://dom.spec.whatwg.org/#dom-range-insertnode)
4031
4032         This patch imports http://src.chromium.org/viewvc/blink?view=revision&revision=150470 .
4033
4034         Test: fast/dom/Range/range-insertNode-assertion.html
4035
4036         * dom/Range.cpp:
4037         (WebCore::Range::insertNode):
4038          - Add EventQueueScope
4039          - Remove obsolete comments
4040
4041 2013-06-16  Simon Fraser  <simon.fraser@apple.com>
4042
4043         Fixed backgrounds in composited layers not repainted on scrolling
4044         https://bugs.webkit.org/show_bug.cgi?id=117684
4045
4046         Reviewed by Tim Horton.
4047         
4048         FrameView is aware that "slow-repaint objects" (i.e. renderers with 
4049         background-attachment:fixed) require a slow-scrolling path. However,
4050         it was ignorant of the fact that such objects could be painting into
4051         compositing layers; it simply dirtied the main tiles, and nothing else.
4052         
4053         Fix by having FrameView track the slow-repaints objects explicitly, as we
4054         do for position:fixed, and repaint each of them on scrolling.
4055
4056         Test: compositing/repaint/fixed-background-scroll.html
4057
4058         * page/FrameView.cpp:
4059         (WebCore::FrameView::FrameView): No need to initialize m_slowRepaintObjectCount,
4060         which is now an OwnPtr<RenderObjectSet>.
4061         (WebCore::FrameView::useSlowRepaints): Use hasSlowRepaintObjects() now.
4062         (WebCore::FrameView::addSlowRepaintObject): Now adds the object to a set,
4063         allocating the set if necessary.
4064         (WebCore::FrameView::removeSlowRepaintObject): Remove the object from the set,
4065         and deallocate the set if empty.
4066         (WebCore::FrameView::scrollContentsSlowPath): Call repaintSlowRepaintObjects();
4067         this is the change that fixes the bug for always-composited implementations (e.g.
4068         tile cache). This is a conservative change; we still invalidate the tile cache
4069         as well. This could be optimized later.
4070         (WebCore::FrameView::repaintSlowRepaintObjects): Repaint each object in the set.
4071         Their appropriate compositing ancestor will be repainted.
4072         (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Call
4073         repaintSlowRepaintObjects() so that fixed backgrounds in composited layers are
4074         correctly repainted; this fixes the bug for WebKit1.
4075         * page/FrameView.h: Replace m_slowRepaintObjectCount with a HashSet of
4076         RenderObjects.
4077         (WebCore::FrameView::hasSlowRepaintObject): Takes a RenderObject* now.
4078         (WebCore::FrameView::hasSlowRepaintObjects): Ditto.
4079         * rendering/RenderObject.cpp:
4080         (WebCore::RenderObject::styleWillChange): Pass the RenderObject.
4081         (WebCore::RenderObject::willBeDestroyed): Assert that this RenderObject
4082         has been removed from FrameView's set of slow-repaint objects already, if
4083 &n