eb070819feaf0a7ba12606f89ce6b6b341300a7e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2
3         Bindings generation tests are failing
4         https://bugs.webkit.org/show_bug.cgi?id=118877
5
6         Reviewed by Kentaro Hara.
7
8         I inadvertently removed the wrong part of the if statement
9         in r152845, causing hasAttribute() to be used unconditionally
10         for reflected boolean attributes instead of fastHasAttribute().
11         This patch fixes the issue.
12
13         No new tests, covered by bindings tests.
14
15         * bindings/scripts/CodeGenerator.pm:
16         (GetterExpression):
17
18 2013-07-18  Kwang Yul Seo  <skyul@company100.net>
19
20         WorkerGlobalScope should support onoffline/ononline event handlers
21         https://bugs.webkit.org/show_bug.cgi?id=118832
22
23         Reviewed by Alexey Proskuryakov.
24
25         HTML5 spec says that WorkerGlobalScope should support
26         onoffline/ononline event handlers as stated in
27         http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#event-offline
28
29         Modified NetworkStateNotifier to support multiple callbacks and added a
30         callback to dispatch offline and online events to WorkerGlobalScope
31         when network state is changed.
32
33         No new test because the current test infrastructure does not provide a
34         mock network state notifier.
35
36         * page/Page.cpp:
37         (WebCore::networkStateChanged):
38         Change the function to take an additional argument, isOnLine so that we
39         can remove a call to NetworkStateNotifier::onLine().
40         (WebCore::Page::Page):
41         Use NetworkStateNotifier::addNetworkStateChangeListener which
42         allows us to add multiple callbacks.
43
44         * platform/network/NetworkStateNotifier.cpp:
45         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
46         Replace NetworkStateNotifier::setNetworkStateChangedFunction with
47         NetworkStateNotifier::addNetworkStateChangeListener.
48         (WebCore::NetworkStateNotifier::notifyNetworkStateChange):
49         A helper method to notify all registered network state change
50         callbacks.
51         * platform/network/NetworkStateNotifier.h:
52         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
53         * platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp:
54         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
55         (WebCore::NetworkStateNotifier::networkStateChange):
56         * platform/network/efl/NetworkStateNotifierEfl.cpp:
57         (WebCore::NetworkStateNotifier::networkInterfaceChanged):
58         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
59         * platform/network/mac/NetworkStateNotifierMac.cpp:
60         (WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
61         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
62         * platform/network/qt/NetworkStateNotifierQt.cpp:
63         (WebCore::NetworkStateNotifier::updateState):
64         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
65         * platform/network/win/NetworkStateNotifierWin.cpp:
66         (WebCore::NetworkStateNotifier::addressChanged):
67         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
68         Replace m_networkStateChangedFunction() with notifyNetworkStateChange().
69
70         * workers/Worker.cpp:
71         (WebCore::networkStateChanged):
72         Notify network state change by iterating all Workers.
73         (WebCore::Worker::Worker):
74         Initialize allWorkers and add networkStateChanged to
75         NetworkStateNotifier in first invocation. Add this Worker to
76         allWorkers.
77         (WebCore::Worker::~Worker):
78         Remove this Worker from allWorkers.
79         (WebCore::Worker::notifyNetworkStateChange):
80         * workers/Worker.h:
81         * workers/WorkerGlobalScope.h:
82         Add onoffline and ononline event handlers.
83         * workers/WorkerGlobalScope.idl:
84         Add onoffline and ononline event handlers
85         * workers/WorkerGlobalScopeProxy.h:
86
87         * workers/WorkerMessagingProxy.cpp:
88         (WebCore::NotifyNetworkStateChangeTask::create):
89         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
90         (WebCore::NotifyNetworkStateChangeTask::performTask):
91         A subclass of ScriptExecutionContext::Task to dispatch offline and
92         online events to WorkerGlobalScope.
93         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
94         Notify network state change using ScriptExecutionContext::postTask to
95         dispatch events across threads.
96         * workers/WorkerMessagingProxy.h:
97
98 2013-07-18  Ryosuke Niwa  <rniwa@webkit.org>
99
100         Build fix after r152876.
101
102         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
103         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
104
105 2013-07-18  Brent Fulgham  <bfulgham@apple.com>
106
107         [Media] Share more code between Mac and Windows implementation files.
108         https://bugs.webkit.org/show_bug.cgi?id=118801
109
110         Reviewed by Eric Carlson.
111
112         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
113         (WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Move
114         implementation from ObjC file to parent file.
115         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
116         Ditto.
117         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
118         Remove duplicate implementation.
119         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
120         Ditto.
121         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
122         Ditto.
123         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
124         Ditto.
125         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
126         Ditto.
127
128 2013-07-18  Alex Christensen  <achristensen@apple.com>
129
130         Fixed compile errors for non-Cairo platforms using EGL.
131         https://bugs.webkit.org/show_bug.cgi?id=118536
132
133         Reviewed by Brent Fulgham.
134
135         * platform/graphics/egl/GLContextEGL.cpp: Added #if USE(CAIRO) around cairo.h.
136         (WebCore::GLContextEGL::~GLContextEGL): Added #if USE(CAIRO) around cairo_device_destroy call. 
137
138 2013-07-18  Jer Noble  <jer.noble@apple.com>
139
140         New PDFPlugin doesn't support WebKitOmitPDFSupport, acts as if Plug-ins are off
141         https://bugs.webkit.org/show_bug.cgi?id=118858
142
143         Reviewed by Eric Carlson.
144
145         Expand the scope of rejecting non video/ or audio/ MIME types when
146         filling the MIME type cache.
147
148         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
149         (WebCore::shouldRejectMIMEType): Added utility function.
150
151 2013-07-17  Brent Fulgham  <bfulgham@apple.com>
152
153         [Windows] Support in-band text tracks.
154         https://bugs.webkit.org/show_bug.cgi?id=103770
155
156         Reviewed by Eric Carlson.
157
158         Existing media tests cover these features.
159
160         * WebCore.vcxproj/WebCore.vcxproj: Add new files for Windows captions
161         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
162         * config.h: Make sure proper buid flags are turned on when building
163         with AVCF_LEGIBLE_OUTPUT.
164         * page/CaptionUserPreferencesMediaAF.cpp: Revise to reduce soft linking
165         duplication between Mac and Windows.
166         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Update
167         to support Windows platform by removing compiler guards and adding
168         Windows declarations for soft-link functions.
169         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
170         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
171         Remove build guards preventing Windows from using LegibleOutput
172         features.
173         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
174         (WebCore::MediaPlayerPrivateAVFoundation::seek):
175         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
176         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
177         (WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged):
178         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
179         (WebCore::MediaPlayerPrivateAVFoundation::contentsNeedsDisplay): Ditto
180         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
181         Add new LegibleOutput support functions, and try to reduce duplication
182         between Windows and Mac soft link declarations.
183         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Ditto.
184         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: Added.
185         (WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
186         (WebCore::InbandTextTrackPrivateAVCF::disconnect):
187         (WebCore::InbandTextTrackPrivateAVCF::kind):
188         (WebCore::InbandTextTrackPrivateAVCF::isClosedCaptions):
189         (WebCore::InbandTextTrackPrivateAVCF::isSDH):
190         (WebCore::InbandTextTrackPrivateAVCF::containsOnlyForcedSubtitles):
191         (WebCore::InbandTextTrackPrivateAVCF::isMainProgramContent):
192         (WebCore::InbandTextTrackPrivateAVCF::isEasyToRead):
193         (WebCore::InbandTextTrackPrivateAVCF::label):
194         (WebCore::InbandTextTrackPrivateAVCF::language):
195         (WebCore::InbandTextTrackPrivateAVCF::isDefault):
196         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Added.
197         (WebCore::InbandTextTrackPrivateAVCF::create):
198         (WebCore::InbandTextTrackPrivateAVCF::~InbandTextTrackPrivateAVCF):
199         (WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
200         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp: Added.
201         (WebCore::InbandTextTrackPrivateLegacyAVCF::InbandTextTrackPrivateLegacyAVCF):
202         (WebCore::InbandTextTrackPrivateLegacyAVCF::disconnect):
203         (WebCore::InbandTextTrackPrivateLegacyAVCF::kind):
204         (WebCore::InbandTextTrackPrivateLegacyAVCF::isClosedCaptions):
205         (WebCore::InbandTextTrackPrivateLegacyAVCF::containsOnlyForcedSubtitles):
206         (WebCore::InbandTextTrackPrivateLegacyAVCF::isMainProgramContent):
207         (WebCore::InbandTextTrackPrivateLegacyAVCF::isEasyToRead):
208         (WebCore::InbandTextTrackPrivateLegacyAVCF::label):
209         (WebCore::InbandTextTrackPrivateLegacyAVCF::language):
210         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h: Added.
211         (WebCore::InbandTextTrackPrivateLegacyAVCF::create):
212         (WebCore::InbandTextTrackPrivateLegacyAVCF::~InbandTextTrackPrivateLegacyAVCF):
213         (WebCore::InbandTextTrackPrivateLegacyAVCF::avPlayerItemTrack):
214         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
215         Update to support LegibleOutput features for the Windows port.
216         (WebCore::AVFWrapper::currentTrack): Added.
217         (WebCore::AVFWrapper::legibleOutput): Added.
218         (WebCore::createMetadataKeyNames): Added missing key names.
219         (WebCore::avLegibleOutput): Added.
220         (WebCore::safeMediaSelectionGroupForLegibleMedia): Added.
221         (WebCore::MediaPlayerPrivateAVFoundationCF::cancelLoad): Clear text
222         tracks when cancelling.
223         (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Added.
224         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Added.
225         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Revised
226         to match logic in Objective C implementation.
227         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Revised
228         to match logic in Objective C implementation.
229         (WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext):
230         Check presence of metadata before proceeding. Revised to match logic
231         in Objective C implementation.
232         (WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
233         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Update for
234         in-band text tracks.
235         (WebCore::MediaPlayerPrivateAVFoundationCF::clearTextTracks): Added.
236         (WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
237         Added.
238         (WebCore::MediaPlayerPrivateAVFoundationCF::processNewAndRemovedTextTracks):
239         Added.
240         (WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
241         Added.
242         (WebCore::AVFWrapper::setCurrentTrack): Added.
243         (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack):
244         Added.
245         (WebCore::AVFWrapper::AVFWrapper): Add new initializers.
246         (WebCore::AVFWrapper::~AVFWrapper): Clean up text track information.
247         (WebCore::AVFWrapper::createPlayer): Add Legible Output support.
248         (WebCore::AVFWrapper::createPlayerItem): Ditto.
249         (WebCore::LegibleOutputData::LegibleOutputData): Added.
250         (WebCore::AVFWrapper::processCue): Added.
251         (WebCore::AVFWrapper::legibleOutputCallback): Added.
252         (WebCore::AVFWrapper::safeMediaSelectionGroupForLegibleMedia): Added.
253         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
254         Update to support LegibleOutput features for the Windows port.
255         * platform/win/SoftLinking.h: Change signature of variable accessor
256         to match Mac so reduce duplicate code.
257
258 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
259
260         Make atob() / btoa() argument non optional
261         https://bugs.webkit.org/show_bug.cgi?id=118844
262
263         Reviewed by Kentaro Hara.
264
265         According to the latest specification, the argument to atob() / btoa()
266         should not be optional:
267         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#windowbase64
268
269         This patch makes WebKit behave according to the specification. The argument
270         is also mandatory in Firefox, IE10 and Blink.
271
272         atob() / btoa() are also moved to their own WindowBase64 interface which
273         the Window interface implements. This does not change the behavior but
274         this is closer to the specification and it will make exposing those
275         methods to workers easier later on.
276
277         No new tests, already covered by:
278         fast/dom/Window/atob-btoa.html
279
280         * CMakeLists.txt:
281         * DerivedSources.make:
282         * DerivedSources.pri:
283         * GNUmakefile.list.am:
284         * page/DOMWindow.idl:
285         * page/WindowBase64.idl: Added.
286
287 2013-07-18  Antoine Quint  <graouts@apple.com>
288
289         Crash in WebCore::createMarkup()
290         https://bugs.webkit.org/show_bug.cgi?id=118847
291
292         Reviewed by Ryosuke Niwa.
293
294         Also check that we have a containingBlock() for the renderer() so that we
295         may safely call node() on it.
296
297         * editing/markup.cpp:
298         (WebCore::highestAncestorToWrapMarkup):
299
300 2013-07-18  Praveen R Jadhav  <praveen.j@samsung.com>
301
302         Only the first call to 'stop' method of AudioBufferSourceNode must be entertained.
303         https://bugs.webkit.org/show_bug.cgi?id=118776
304
305         Reviewed by Jer Noble.
306
307         Subsequent calls to 'stop' for a AudioSourceBufferNode throws an exception.
308         End time set by first 'stop' method is used for processing.
309
310         No new tests. audiobuffersource-exception.html is updated.
311
312         * Modules/webaudio/AudioScheduledSourceNode.cpp:
313         (WebCore::AudioScheduledSourceNode::stop):
314
315 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
316
317         Simplify SVG animated type handling in the JSC bindings generator
318         https://bugs.webkit.org/show_bug.cgi?id=118845
319
320         Reviewed by Kentaro Hara.
321
322         Simplify IsSVGAnimatedType subroutine in the bindings generator so that
323         we no longer need to hardcode SVG animated types. Also remove the
324         CanUseFastAttribute subroutine as it is equivalent to IsSVGAnimatedType.
325         This allows us to simplify the GetterExpression subroutine so that
326         we can use fastHasAttribute() unconditionally for boolean type.
327
328         No new tests, no behavior change.
329
330         * bindings/scripts/CodeGenerator.pm:
331         (IsSVGAnimatedType):
332         (GetterExpression):
333
334 2013-07-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
335
336         Use [ImplementedAs] instead of special casing in the bindings generators
337         https://bugs.webkit.org/show_bug.cgi?id=118848
338
339         Reviewed by Kentaro Hara.
340
341         In several instances, special casing were used in the bindings generator to avoid
342         name clashes in the implementation. The [ImplementedBy] IDL extended attribute is
343         meant to solve this issue so we now use it instead.
344
345         No new tests, no behavior change.
346
347         * bindings/scripts/CodeGenerator.pm:
348         (WK_ucfirst):
349         (AttributeNameForGetterAndSetter):
350         * bindings/scripts/CodeGeneratorJS.pm:
351         (GenerateImplementation):
352         (NativeToJSValue):
353         * bindings/scripts/CodeGeneratorObjC.pm:
354         (GenerateHeader):
355         (GenerateImplementation):
356         * svg/SVGAElement.idl:
357         * svg/SVGFECompositeElement.cpp:
358         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
359         (WebCore::SVGFECompositeElement::parseAttribute):
360         (WebCore::SVGFECompositeElement::setFilterEffectAttribute):
361         (WebCore::SVGFECompositeElement::build):
362         * svg/SVGFECompositeElement.h:
363         * svg/SVGFECompositeElement.idl:
364         * svg/SVGFEMorphologyElement.cpp:
365         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
366         (WebCore::SVGFEMorphologyElement::parseAttribute):
367         (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
368         (WebCore::SVGFEMorphologyElement::build):
369         * svg/SVGFEMorphologyElement.h:
370         * svg/SVGFEMorphologyElement.idl:
371         * svg/SVGTransform.cpp:
372         (WebCore::SVGTransform::updateSVGMatrix):
373         * svg/SVGTransform.h:
374         * svg/SVGTransform.idl:
375
376 2013-07-18  Zalan Bujtas  <zalan@apple.com>
377
378         Incorrect calculated width for mspace.
379         https://bugs.webkit.org/show_bug.cgi?id=118601
380
381         Reviewed by Chris Fleizach.
382
383         Use intrinsic logical widths to size <mspace> properly.
384         This patch also fixes an assert on isPreferredLogicalHeightDirty() which occurs
385         while layouting <mspace>. The assert fix is required, so that the sizing can be
386         fixed.
387
388         Test: mathml/presentation/mspace-prefered-width.html
389
390         * rendering/mathml/RenderMathMLBlock.cpp:
391         (WebCore::parseMathMLLength): switch to LayoutUnits.
392         (WebCore::parseMathMLNamedSpace): switch to LayoutUnits.
393         * rendering/mathml/RenderMathMLBlock.h:
394         * rendering/mathml/RenderMathMLFraction.cpp:
395         (WebCore::RenderMathMLFraction::updateFromElement):
396         * rendering/mathml/RenderMathMLFraction.h:
397         * rendering/mathml/RenderMathMLSpace.cpp:
398         (WebCore::RenderMathMLSpace::computeIntrinsicLogicalWidths):
399         * rendering/mathml/RenderMathMLSpace.h:
400
401 2013-07-18  Ryosuke Niwa  <rniwa@webkit.org>
402
403         willWriteSelectionToPasteboard and willPerformDragSourceAction editing callbacks are not called for drag and drop
404         https://bugs.webkit.org/show_bug.cgi?id=118828
405
406         Reviewed by Gavin Barraclough.
407
408         Call these two callbacks when we start a drag and drop.
409
410         No new tests for now but we should start logging these callbacks in DRT and WTR's EditorClients.
411
412         * page/DragController.cpp:
413         (WebCore::DragController::startDrag):
414
415 2013-07-18  Santosh Mahto  <santosh.ma@samsung.com>
416
417         ASSERTION FAILED: !listItems().size() || m_activeSelectionAnchorIndex >= 0 in WebCore::HTMLSelectElement::updateListBoxSelection
418         https://bugs.webkit.org/show_bug.cgi?id=118591
419
420         Reviewed by Kent Tamura.
421
422         Test: fast/forms/select/selectall-command-crash.html
423
424         * html/HTMLSelectElement.cpp:
425         (WebCore::HTMLSelectElement::selectAll):
426         We should return this function if activeSelectionAnchorIndex is not valid index
427
428 2013-07-18  Ryuan Choi  <ryuan.choi@samsung.com>
429
430         [EFL] Refactor spin.edc not to use offset
431         https://bugs.webkit.org/show_bug.cgi?id=118830
432
433         Reviewed by Gyuyoung Kim.
434
435         EDJE allows offset to specify the pixel based position,
436         but it's not good way if you want to locate object like arrow top or bottom.
437
438         Instead, this patch uses align property.
439
440         * platform/efl/DefaultTheme/widget/spinner/spinner.edc:
441
442 2013-07-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
443
444         [gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
445         https://bugs.webkit.org/show_bug.cgi?id=118827
446
447         Reviewed by Philippe Normand.
448
449         webKitWebAudioSrcLoop() currently calls g_slist_index for each element 
450         to get its index in a list it's iterating over. g_list_index function uses
451         a sequential search to find that element, which is clearly unecessary.
452         This patch adds a local variable to store the current index and use it 
453         instead of calling g_slist_index function.
454
455         No new tests, no behavior changes.
456
457         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
458         (webKitWebAudioSrcLoop):
459
460 2013-07-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
461
462         Introduce toSVGInlineFlowBox() and use it
463         https://bugs.webkit.org/show_bug.cgi?id=118794
464
465         Reviewed by Andreas Kling.
466
467         As a step to change static_cast with toSVGXXX, static_cast<SVGInlineFlowBox*> can
468         be changed with toSVGInlineFlowBox().
469
470         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154385
471
472         No new tests, no behavior change.
473
474         * rendering/svg/SVGInlineFlowBox.cpp:
475         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
476         * rendering/svg/SVGInlineFlowBox.h:
477         (WebCore::toSVGInlineFlowBox):
478         * rendering/svg/SVGRootInlineBox.cpp:
479         (WebCore::SVGRootInlineBox::paint):
480         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
481         (WebCore::SVGRootInlineBox::layoutChildBoxes):
482
483 2013-07-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
484
485         Use toSVGMarkerElement() instead of static_cast<>
486         https://bugs.webkit.org/show_bug.cgi?id=118800
487
488         Reviewed by Andreas Kling.
489
490         Though there is toSVGMarkerElement(), some files still use static_cast<SVGMarkerElement*>.
491         To remove all static_cast<> use, we need to change argument from SVGElement to Node.
492
493         No new tests, no behavior changes.
494
495         * rendering/svg/RenderSVGResourceMarker.cpp:
496         (WebCore::RenderSVGResourceMarker::referencePoint):
497         (WebCore::RenderSVGResourceMarker::angle):
498         (WebCore::RenderSVGResourceMarker::markerTransformation):
499         (WebCore::RenderSVGResourceMarker::viewportTransform):
500         (WebCore::RenderSVGResourceMarker::calcViewport):
501         * rendering/svg/RenderSVGResourceMarker.h:
502         (WebCore::RenderSVGResourceMarker::markerUnits):
503         * svg/SVGMarkerElement.h:
504         (WebCore::toSVGMarkerElement):
505
506 2013-07-17  Jacky Jiang  <zhajiang@blackberry.com>
507
508         Dereference null pointer crash in Length::decrementCalculatedRef()
509         https://bugs.webkit.org/show_bug.cgi?id=118686
510
511         Reviewed by Simon Fraser.
512
513         Length(Calculated) won't insert any CalculationValue to CalculationValueHandleMap;
514         therefore, we dereference null CalculationValue pointer when the temporary
515         Length object goes out of the scope.
516         Length(Calculated) is not allowed as it doesn't make sense that we construct
517         a Calculated Length object with uninitialized calc expression.
518         The code just wants to blend with zero. To fix the bug, we can just blend
519         with Length(0, Fixed) here as we currently can blend different type units
520         and zero has the same behavior regardless of unit.
521
522         Test: transitions/transition-transform-translate-calculated-length-crash.html
523
524         * platform/graphics/transforms/TranslateTransformOperation.cpp:
525         (WebCore::TranslateTransformOperation::blend):
526
527 2013-07-17  Tim Horton  <timothy_horton@apple.com>
528
529         Update blocked/missing plug-in UI
530         https://bugs.webkit.org/show_bug.cgi?id=118347
531         <rdar://problem/14209318>
532
533         Reviewed by Sam Weinig.
534
535         * WebCore.exp.in:
536         Export RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription.
537
538         * rendering/RenderEmbeddedObject.cpp:
539         (WebCore::replacementTextRoundedRectPressedColor):
540         (WebCore::replacementTextRoundedRectColor):
541         (WebCore::replacementTextColor):
542         Change colors to new design and add some more constants.
543
544         (WebCore::shouldUnavailablePluginMessageBeButton): Added.
545
546         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Added.
547         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
548         Call through to the -WithDescription variant.
549
550         (WebCore::RenderEmbeddedObject::paintReplaced):
551         Fill the background, and otherwise match the new design.
552
553         (WebCore::addReplacementArrowPath):
554         Add an arrow to the given path, inside the given rect.
555
556         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
557         Add a 1px padding to the bottom of the text.
558         Add a circle and an arrow into the indicator as per the new design.
559
560         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
561         Hit-test the indicator arrow as well; otherwise, the fact that the arrow
562         is a hole in the path means it won't be hit.
563
564         * rendering/RenderEmbeddedObject.h:
565
566 2013-07-17  Commit Queue  <commit-queue@webkit.org>
567
568         Unreviewed, rolling out r152701, r152703, r152739, r152754,
569         and r152756.
570         http://trac.webkit.org/changeset/152701
571         http://trac.webkit.org/changeset/152703
572         http://trac.webkit.org/changeset/152739
573         http://trac.webkit.org/changeset/152754
574         http://trac.webkit.org/changeset/152756
575         https://bugs.webkit.org/show_bug.cgi?id=118821
576
577         this was a buggy fix and we're going to try something
578         different (Requested by thorton on #webkit).
579
580         * CMakeLists.txt:
581         * DerivedSources.make:
582         * DerivedSources.pri:
583         * GNUmakefile.am:
584         * WebCore.exp.in:
585         * WebCore.vcxproj/WebCore.vcxproj:
586         * WebCore.vcxproj/WebCore.vcxproj.filters:
587         * WebCore.xcodeproj/project.pbxproj:
588         * css/CSSDefaultStyleSheets.cpp:
589         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
590         * css/unavailablePlugIns.css: Removed.
591         * dom/EventListener.h:
592         * html/HTMLAppletElement.cpp:
593         (WebCore::HTMLAppletElement::updateWidget):
594         * html/HTMLPlugInElement.cpp:
595         (WebCore::HTMLPlugInElement::defaultEventHandler):
596         * html/HTMLPlugInImageElement.cpp:
597         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
598         * loader/SubframeLoader.cpp:
599         (WebCore::SubframeLoader::createJavaAppletWidget):
600         * page/ChromeClient.h:
601         (WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
602         * rendering/RenderEmbeddedObject.cpp:
603         (WebCore::replacementTextRoundedRectPressedColor):
604         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
605         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
606         (WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
607         (WebCore::RenderEmbeddedObject::paint):
608         (WebCore::RenderEmbeddedObject::paintReplaced):
609         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
610         (WebCore::RenderEmbeddedObject::replacementTextRect):
611         (WebCore::RenderEmbeddedObject::isReplacementObscured):
612         (WebCore::RenderEmbeddedObject::layout):
613         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
614         (WebCore::shouldUnavailablePluginMessageBeButton):
615         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
616         (WebCore::RenderEmbeddedObject::getCursor):
617         (WebCore::RenderEmbeddedObject::canHaveChildren):
618         * rendering/RenderEmbeddedObject.h:
619         * rendering/RenderWidget.h:
620
621 2013-07-17  Simon Fraser  <simon.fraser@apple.com>
622
623         Optimize RenderLayerCompositor's OverlapMap
624         https://bugs.webkit.org/show_bug.cgi?id=118764
625
626         Reviewed by Tim Horton.
627
628         Overlap stack items can have RectLists with hundreds of rectangles.
629         This makes the linear search in OverlapMap::overlapsLayers() very slow.
630         
631         Optimize by storing the bounding rect of the list of rects, and doing an early
632         check on that. This reduces time spent in RenderLayer::scrollTo() by 13% in some
633         content with lots of layers inside an overflow:scroll.
634
635         * rendering/RenderLayerCompositor.cpp:
636         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
637         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
638         (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
639         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
640
641 2013-07-17  Bem Jones-Bey  <bjonesbe@adobe.com>
642
643         [CSS Shapes] Port refactoring of shape-outside code from Blink
644         https://bugs.webkit.org/show_bug.cgi?id=118757
645
646         Reviewed by Dean Jackson.
647
648         Refactor the left and right offset methods to reduce the number of
649         arguments by splitting the methods into smaller methods. This
650         refactoring was requested as part of porting support for stacked
651         floats with shape-outside to Blink.
652
653         Also add a variable when calling computeSegmentsForLine to make it
654         more readable and easier to follow the coordinate system change.
655
656         No new tests, no behavior change.
657
658         * rendering/RenderBlock.cpp:
659         (WebCore::RenderBlock::computeLogicalLocationForFloat): Update to use
660             the refactored IgnoringShapeOutside methods.
661         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): New method to
662             compute the offset contributed by left floats.
663         (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine): New method to
664             compute misc adjustments to the left offset.
665         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): New method to
666             compute the offset contributed by right floats.
667         (WebCore::RenderBlock::adjustLogicalRightOffsetForLine): New method to
668             compute misc adjustments to the right offset.
669         * rendering/RenderBlock.h:
670         (WebCore::RenderBlock::logicalRightOffsetForLine): Implement original
671             method in terms of the float offset computation method and the
672             offset adjustment method. This method takes into account the
673             shape-outside on any floats when computing the offset.
674         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
675         (WebCore::RenderBlock::logicalRightOffsetForLineIgnoringShapeOutside):
676             Compute the right offset as if there was no shape-outside on any
677             of the floats.
678         (WebCore::RenderBlock::logicalLeftOffsetForLineIgnoringShapeOutside):
679             Compute the left offset as if there was no shape-outside on any
680             of the floats.
681         * rendering/RenderBlockLineLayout.cpp:
682         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update
683             to use a variable to make the calls to computeSegmentsForLine more
684             explicit about the coordinate system conversion.
685
686 2013-07-17  Zalan Bujtas  <zalan@apple.com>
687
688         Wrong linebox height, when block element parent has vertical-align property defined.
689         https://bugs.webkit.org/show_bug.cgi?id=118245
690
691         Reviewed by David Hyatt.
692
693         Do not push the current element to the next, when it is still considered empty, even with
694         some object(s) in front. Behave as if it was actually empty.
695         Inline elements like <span></span> generate such lines.
696
697         Test: fast/css/empty-span-with-parent-div-and-vertical-align.html
698
699         * rendering/RenderBlockLineLayout.cpp:
700         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
701
702 2013-07-17  Andreas Kling  <akling@apple.com>
703
704         CSS selector list splitting should be by component, not by selector.
705         <http://webkit.org/b/118761>
706         <rdar://problem/14421609>
707
708         Reviewed by Antti Koivisto.
709
710         Test (amended): fast/css/rule-selector-overflow.html
711
712         * css/CSSSelectorList.h:
713         * css/CSSSelectorList.cpp:
714         (WebCore::CSSSelectorList::CSSSelectorList):
715         (WebCore::CSSSelectorList::componentCount):
716         * css/CSSStyleRule.cpp:
717         (WebCore::CSSStyleRule::setSelectorText):
718
719             Renamed CSSSelectorList::length() to componentCount() and made it public.
720
721         * css/RuleSet.h:
722
723             maximumSelectorCount => maximumSelectorComponentCount
724
725         * css/StyleRule.cpp:
726         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
727
728             Make the splits after accumulating 'maximumSelectorComponentCount' components.
729
730         * css/StyleRule.h:
731         * css/StyleSheetContents.cpp:
732         (WebCore::StyleSheetContents::parserAppendRule):
733
734             splitIntoMultipleRulesWithMaximumSelectorCount => splitIntoMultipleRulesWithMaximumSelectorComponentCount
735
736 2013-07-17  Rob Buis  <rwlbuis@webkit.org>
737
738         [Mac] REGRESSION(r152685): svg/custom/xlink-prefix-in-attributes.html failed unexpectedly
739         https://bugs.webkit.org/show_bug.cgi?id=118701
740
741         Reviewed by Ryosuke Niwa.
742
743         Use the computed attribute prefix, otherwise href being in xlink namespace but not having any prefix
744         will cause outputting the xlink namespace in appendNamespace.
745
746         Patch fixes svg/custom/xlink-prefix-in-attributes.html.
747
748         * editing/MarkupAccumulator.cpp:
749         (WebCore::MarkupAccumulator::appendAttribute):
750
751 2013-07-17  Chris Fleizach  <cfleizach@apple.com>
752
753         Regression: columnheader/rowheader roles not exposed correctly
754         https://bugs.webkit.org/show_bug.cgi?id=113628
755
756         Reviewed by Tim Horton.
757
758         When we determine the row and column headers we look at the ARIA role being returned, but
759         since TableCell overrides the determineAccessibilityRole method, the ARIA role is never set.
760
761         Test: platform/mac/accessibility/aria-columnrowheaders.html
762
763         * accessibility/AccessibilityTableCell.cpp:
764         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
765
766 2013-07-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
767
768         Get rid of SVGPoint special case from the bindings generator
769         https://bugs.webkit.org/show_bug.cgi?id=118783
770
771         Reviewed by Kentaro Hara.
772
773         Get rid of SVGPoint special case from the bindings generator by adding a
774         new SVGPoint.h header that contains a typedef to FloatPoint.
775
776         Also use SVGPoint type in the implementation API for consistency with
777         the IDL.
778
779         No new tests, no behavior change.
780
781         * bindings/scripts/CodeGenerator.pm:
782         (SkipIncludeHeader):
783         * bindings/scripts/test/JS/JSTestObj.cpp:
784         (WebCore::jsTestObjMutablePoint):
785         (WebCore::jsTestObjImmutablePoint):
786         (WebCore::setJSTestObjMutablePoint):
787         (WebCore::setJSTestObjImmutablePoint):
788         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
789         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
790         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
791         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
792         * bindings/scripts/test/ObjC/DOMTestObj.mm:
793         (-[DOMTestObj mutablePoint]):
794         (-[DOMTestObj immutablePoint]):
795         (-[DOMTestObj mutablePointFunction]):
796         (-[DOMTestObj immutablePointFunction]):
797         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
798         (-[DOMTestTypedefs immutablePointFunction]):
799         * rendering/svg/RenderSVGRoot.cpp:
800         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
801         * rendering/svg/SVGTextQuery.cpp:
802         (WebCore::SVGTextQuery::startPositionOfCharacter):
803         (WebCore::SVGTextQuery::endPositionOfCharacter):
804         (WebCore::SVGTextQuery::characterNumberAtPosition):
805         * rendering/svg/SVGTextQuery.h:
806         * svg/SVGPathElement.cpp:
807         (WebCore::SVGPathElement::getPointAtLength):
808         * svg/SVGPathElement.h:
809         * svg/SVGPathTraversalStateBuilder.cpp:
810         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
811         * svg/SVGPathTraversalStateBuilder.h:
812         * svg/SVGPathUtilities.cpp:
813         (WebCore::getPointAtLengthOfSVGPathByteStream):
814         * svg/SVGPathUtilities.h:
815         * svg/SVGPoint.h: Added.
816         * svg/SVGPointList.cpp:
817         (WebCore::SVGPointList::valueAsString):
818         * svg/SVGPointList.h:
819         * svg/SVGSVGElement.cpp:
820         (WebCore::SVGSVGElement::createSVGPoint):
821         * svg/SVGSVGElement.h:
822         * svg/SVGTextContentElement.cpp:
823         (WebCore::SVGTextContentElement::getStartPositionOfChar):
824         (WebCore::SVGTextContentElement::getEndPositionOfChar):
825         (WebCore::SVGTextContentElement::getCharNumAtPosition):
826         * svg/SVGTextContentElement.h:
827         * svg/SVGZoomEvent.cpp:
828         (WebCore::SVGZoomEvent::previousTranslate):
829         (WebCore::SVGZoomEvent::newTranslate):
830         * svg/SVGZoomEvent.h:
831
832 2013-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
833
834         [GStreamer] webkitwebsrc: use SubResourceLoader
835         https://bugs.webkit.org/show_bug.cgi?id=73743
836
837         Reviewed by Philippe Normand.
838
839         * GNUmakefile.list.am: Add new files to compilation.
840         * PlatformEfl.cmake: Ditto.
841         * PlatformGTK.cmake: Ditto.
842         * loader/SubresourceLoader.h: Add getOrCreateReadBuffer() when
843         using SOUP.
844         * loader/cache/CachedRawResource.h:
845         * loader/cache/CachedRawResourceClient.h:
846         (WebCore::CachedRawResourceClient::getOrCreateReadBuffer): Added
847         to allow the client to allocate the read buffer.
848         * loader/cache/CachedResource.h:
849         (WebCore::CachedResource::getOrCreateReadBuffer):
850         * loader/soup/CachedRawResourceSoup.cpp: Added.
851         (WebCore::CachedRawResource::getOrCreateReadBuffer): Iterate the
852         clients until one returns a valid read buffer or return NULL to
853         fallback to the default read buffer.
854         * loader/soup/SubresourceLoaderSoup.cpp: Added.
855         (WebCore::SubresourceLoader::getOrCreateReadBuffer): Call
856         CachedResource::getOrCreateReadBuffer().
857         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
858         (StreamingClient): Make this a CachedRawResourceClient.
859         (_WebKitWebSrcPrivate): Remove frame and resourceHandle and add a
860         cached resource handle.
861         (webKitWebSrcDispose): Clear the player pointer.
862         (webKitWebSrcStop): Remove the client from the cached resource.
863         (webKitWebSrcStart): Use CachedResourceLoader to schedule a
864         CachedRawResource load for the media without buffering the data.
865         (webKitWebSrcNeedDataMainCb): Call CachedResource::setDefersLoading.
866         (webKitWebSrcEnoughDataMainCb): Ditto.
867         (webKitWebSrcSetMediaPlayer): Simply update the player pointer.
868         (StreamingClient::responseReceived): Update to the
869         CachedRawResourceClient API.
870         (StreamingClient::dataReceived): Ditto.
871         (StreamingClient::getOrCreateReadBuffer): Ditto.
872         (StreamingClient::notifyFinished): Ditto.
873
874 2013-07-17  Kwang Yul Seo  <skyul@company100.net>
875
876         Remove unused member variable m_domURL from WorkerGlobalScope
877         https://bugs.webkit.org/show_bug.cgi?id=118784
878
879         Reviewed by Christophe Dumez.
880
881         WorkerContext::webkitURL() was removed in r107082, and this was the
882         only place where the member variable |m_domURL| in WorkerContext was
883         mutated. This variable is no longer needed and so it should be removed.
884
885         No behavior change.
886
887         * workers/WorkerGlobalScope.h:
888
889 2013-07-17  Mihai Maerean  <mmaerean@adobe.com>
890
891         ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage
892         https://bugs.webkit.org/show_bug.cgi?id=118587
893
894         Reviewed by David Hyatt.
895
896         The fix consists in not calling containingBlockLogicalHeightForPositioned for flow threads (in
897         RenderBox::availableLogicalHeightUsing) as it gets to handle the RenderView as it would have been flowed into
898         the flow thread.
899
900         Test: fast/regions/crash-div-outside-body-vertical-rl.html
901
902         * rendering/RenderBox.cpp:
903         (WebCore::RenderBox::availableLogicalHeightUsing):
904
905 2013-07-17  Kangil Han  <kangil.han@samsung.com>
906
907         Use toHTMLMediaElement
908         https://bugs.webkit.org/show_bug.cgi?id=118727
909
910         Reviewed by Ryosuke Niwa.
911
912         To avoid direct use of static_cast, this patch uses toHTMLMediaElement for code cleanup.
913
914         * bindings/js/JSHTMLMediaElementCustom.cpp:
915         (WebCore::JSHTMLMediaElement::setController):
916         * html/HTMLMediaElement.h:
917         (WebCore::toHTMLMediaElement):
918         * html/HTMLSourceElement.cpp:
919         (WebCore::HTMLSourceElement::insertedInto):
920         (WebCore::HTMLSourceElement::removedFrom):
921         * html/HTMLTrackElement.cpp:
922         (WebCore::HTMLTrackElement::removedFrom):
923         (WebCore::HTMLTrackElement::mediaElement):
924         * html/shadow/MediaControlElementTypes.cpp:
925         (WebCore::toParentMediaElement):
926         * loader/SubframeLoader.cpp:
927         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
928         * page/FrameView.cpp:
929         (WebCore::FrameView::updateWidget):
930         * platform/efl/RenderThemeEfl.cpp:
931         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
932         (WebCore::RenderThemeEfl::paintMediaMuteButton):
933         (WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton):
934         * platform/graphics/wince/MediaPlayerProxy.cpp:
935         (WebCore::WebMediaPlayerProxy::initEngine):
936         (WebCore::WebMediaPlayerProxy::element):
937         * platform/gtk/RenderThemeGtk.cpp:
938         (WebCore::getMediaElementFromRenderObject):
939         * rendering/HitTestResult.cpp:
940         (WebCore::HitTestResult::mediaElement):
941         * rendering/RenderLayerBacking.cpp:
942         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
943         * rendering/RenderLayerCompositor.cpp:
944         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
945         * rendering/RenderMedia.cpp:
946         (WebCore::RenderMedia::mediaElement):
947         * rendering/RenderThemeMac.mm:
948         (WebCore::RenderThemeMac::paintMediaSliderTrack):
949         * rendering/RenderThemeWinCE.cpp:
950         (WebCore::mediaElementParent):
951         * testing/Internals.cpp:
952         (WebCore::Internals::simulateAudioInterruption):
953
954 2013-07-16  Ryuan Choi  <ryuan.choi@samsung.com>
955
956         Remove Platform(EFL) guard from Widget::frameRectsChanged
957         https://bugs.webkit.org/show_bug.cgi?id=118782
958
959         Reviewed by Christophe Dumez.
960
961         Since r58487, Widget::frameRectsChanged was moved to cpp and guarded.
962         But we can move back to header because WebKit/Efl refactored related code in r145710.
963
964         No new tests, refactoring.
965
966         * platform/Widget.cpp: Removed platform guard and move frameRectsChangd() back to header.
967         * platform/Widget.h:
968         (WebCore::Widget::frameRectsChanged):
969         * platform/efl/WidgetEfl.cpp:
970
971 2013-07-16  Alex Christensen  <achristensen@apple.com>
972
973         Update ANGLE to r2426.
974         https://bugs.webkit.org/show_bug.cgi?id=118550
975
976         Reviewed by Dean Jackson.
977
978         * CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added builtin_symbol_table.
979
980 2013-07-16  Tim Horton  <timothy_horton@apple.com>
981
982         Many crashes loading Java applets after r152701
983         https://bugs.webkit.org/show_bug.cgi?id=118760
984         <rdar://problem/14462836>
985
986         Reviewed by Dean Jackson.
987
988         * html/HTMLAppletElement.cpp:
989         (WebCore::HTMLAppletElement::updateWidget):
990         Re-acquire the renderer after calling createJavaAppletWidget,
991         because it can cause reattach, leaving our renderer pointer stale.
992
993         * loader/SubframeLoader.cpp:
994         (WebCore::SubframeLoader::createJavaAppletWidget):
995         Null-check renderer, as element->renderEmbeddedObject() can very clearly
996         return null in some cases.
997
998 2013-07-16  Pratik Solanki  <psolanki@apple.com>
999
1000         Missing break in WebGLRenderingContext::validateCompressedTexFuncData()
1001         https://bugs.webkit.org/show_bug.cgi?id=118742
1002
1003         Reviewed by Ryosuke Niwa.
1004
1005         * html/canvas/WebGLRenderingContext.cpp:
1006         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
1007
1008 2013-07-16  Andreas Kling  <akling@apple.com>
1009
1010         Atomicize HTMLAnchorElement.hash before passing it to JS.
1011         <http://webkit.org/b/118748>
1012         <rdar://problem/14459780>
1013
1014         Reviewed by Sam Weinig.
1015
1016         Instead of generating a unique string from '#' + the URL hash every time HTMLAnchorElement.hash
1017         is queried, turn it into an AtomicString. This prevents massive memory usage in scripts that
1018         fetch .hash a lot.
1019
1020         Reduces memory consumption by 4.65 MB when viewing the full HTML5 spec at <http://whatwg.org/c>
1021
1022         * html/HTMLAnchorElement.cpp:
1023         (WebCore::HTMLAnchorElement::hash):
1024
1025 2013-07-16  Brendan Long  <b.long@cablelabs.com>
1026
1027         Make WebVTTParser return cue data instead of cue DOM objects
1028         https://bugs.webkit.org/show_bug.cgi?id=118687
1029
1030         Reviewed by Eric Carlson.
1031
1032         No new tests because this doesn't change functionality.
1033
1034         * html/track/InbandTextTrack.cpp:
1035         Make TextTrackCueMap handle WebVTTCues instead of just generic cues.
1036         m_dataToCueMap and m_cueToDataMap were renamed m_genericDataToCueMap
1037         and m_genericCueToDataMap. The cue maps were turned into pointers so we
1038         only allocate the ones we need.
1039         (WebCore::TextTrackCueMap::TextTrackCueMap): Initialize maps to 0.
1040         (WebCore::TextTrackCueMap::~TextTrackCueMap): Delete allocated maps.
1041         (WebCore::TextTrackCueMap::add): Changed to allocate cue maps as needed, and added WebVTT version.
1042         (WebCore::TextTrackCueMap::find): Checked to check if cue maps are allocated, and added WebVTT version.
1043         (WebCore::TextTrackCueMap::findGenericData): Changed to accept TextTrackCue instead of TextTrackCueGeneric.
1044         (WebCore::TextTrackCueMap::findWebVTTData): Same as findGenericData, except for WebVTTCueData.
1045         (WebCore::TextTrackCueMap::remove): Accept TextTrackCue instead of TextTrackCueGeneric, and look in both maps.
1046         (WebCore::InbandTextTrack::addWebVTTCue): Added, based on addGenericCue.
1047         (WebCore::InbandTextTrack::removeWebVTTCue): Added, almost identical to removeGenericCue.
1048         (WebCore::InbandTextTrack::removeCue): m_cueMap.remove() takes a TextTrackCue now so it can remove both types of cue.
1049         (WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Use ASSERT_UNUSED instead of UNUSED_PARAM + ASSERT.
1050         * html/track/InbandTextTrack.h: Add new functions above, change maps to pointers and add maps for holding WebVTT cues.
1051         * html/track/WebVTTParser.cpp:
1052         (WebCore::WebVTTParser::getNewCues): Return WebVTTCueData instead of TextTrackCue.
1053         (WebCore::WebVTTParser::createNewCue): Create WebVTTCueData instead of TextTrackCue.
1054         * html/track/WebVTTParser.h: Add WebVTTCueData class, based on GenericCueData.
1055         The following functions are just constructors, destructors, getters, or setters.
1056         (WebCore::WebVTTCueData::create):
1057         (WebCore::WebVTTCueData::~WebVTTCueData):
1058         (WebCore::WebVTTCueData::startTime):
1059         (WebCore::WebVTTCueData::setStartTime):
1060         (WebCore::WebVTTCueData::endTime):
1061         (WebCore::WebVTTCueData::setEndTime):
1062         (WebCore::WebVTTCueData::id):
1063         (WebCore::WebVTTCueData::setId):
1064         (WebCore::WebVTTCueData::content):
1065         (WebCore::WebVTTCueData::setContent):
1066         (WebCore::WebVTTCueData::settings):
1067         (WebCore::WebVTTCueData::setSettings):
1068         (WebCore::WebVTTCueData::WebVTTCueData):
1069         * loader/TextTrackLoader.cpp:
1070         (WebCore::TextTrackLoader::getNewCues): Convert WebVTTCueData to TextTrackCue when we get them.
1071         * platform/graphics/InbandTextTrackPrivateClient.h: Add addWebVTTCue and removeWebVTTCue functions to the interface.
1072
1073 2013-07-16  Tim Horton  <timothy_horton@apple.com>
1074
1075         Use the correct cursor value for the unavailable plugin indicator
1076         https://bugs.webkit.org/show_bug.cgi?id=118747
1077         <rdar://problem/14456498>
1078
1079         Reviewed by Dean Jackson.
1080
1081         CSS says "pointer" is the hand cursor, not "hand".
1082
1083         * css/unavailablePlugIns.css:
1084         (object::-webkit-unavailable-plugin-content > div):
1085         (object::-webkit-unavailable-plugin-content > div > span):
1086
1087 2013-07-16  Simon Fraser  <simon.fraser@apple.com>
1088
1089         Protect against the LayerFlushController being deleted inside its flushLayers() callback
1090         https://bugs.webkit.org/show_bug.cgi?id=118741
1091
1092         Reviewed by Tim Horton.
1093
1094         It's possible (especially on iOS) for the LayerFlushController to be destroyed
1095         inside its callback, via -[WebView _close]. Protect against this by making
1096         it refcounted, and holding a ref across the callback.
1097         
1098         Due to the odd relationship in which LayerFlushController owns its LayerFlushScheduler
1099         by value, we achieve this by allowing subclasses of LayerFlushScheduler
1100         to override runLoopObserverCallback(). WebViewLayerFlushScheduler uses the
1101         override to protect the owner of the LayerFlushScheduler, which is the
1102         LayerFlushController, when the callback is firing.
1103
1104         * WebCore.exp.in:
1105         * platform/graphics/ca/LayerFlushScheduler.h: Make runLoopObserverCallback() and the dtor virtual.
1106
1107 2013-07-16  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1108
1109         Get rid of multiple inheritance support from the bindings generators
1110         https://bugs.webkit.org/show_bug.cgi?id=118353
1111
1112         Reviewed by Kentaro Hara.
1113
1114         Remove multiple inheritance support from the bindings generators (except
1115         the ObjC one which still needs it for now). Multiple inheritance is no
1116         longer supported in Web IDL and it makes the scripts more complex than
1117         they needs to be.
1118
1119         Multiple inheritance support is no longer needed now that our SVG
1120         interfaces have been updated to use the simpler SVG2 inheritance model
1121         and use Web IDL 'implements' statements.
1122
1123         Note that the IDL parser still support multiple inheritance for now in
1124         order not to break the ObjC bindings generator.
1125
1126         No new tests, no behavior change.
1127
1128         * bindings/scripts/CodeGenerator.pm:
1129         * bindings/scripts/CodeGeneratorCPP.pm:
1130         (GetParentImplClassName):
1131         (GetParent):
1132         (GenerateImplementation):
1133         * bindings/scripts/CodeGeneratorGObject.pm:
1134         (GetParentClassName):
1135         (GetParentImplClassName):
1136         (GetParentGObjType):
1137         * bindings/scripts/CodeGeneratorJS.pm:
1138         (GetParentClassName):
1139         (GenerateHeader):
1140         (GenerateImplementation):
1141         (GenerateConstructorDefinition):
1142         * bindings/scripts/CodeGeneratorObjC.pm:
1143         (AddMethodsConstantsAndAttributesFromParentInterfaces):
1144         (GenerateImplementation):
1145         * bindings/scripts/IDLParser.pm:
1146         (parseInterface):
1147         (parseException):
1148         (parseInheritance):
1149
1150 2013-07-16  Eric Carlson  <eric.carlson@apple.com>
1151
1152         HTMLMediaElement should not add cues for disabled text tracks
1153         https://bugs.webkit.org/show_bug.cgi?id=118682
1154
1155         Reviewed by Ryosuke Niwa.
1156
1157         Merge https://src.chromium.org/viewvc/blink?view=rev&revision=153810
1158
1159         Tests: media/track/track-disabled-addcue.html
1160                media/track/track-disabled.html
1161
1162         * html/HTMLMediaElement.cpp:
1163         (WebCore::HTMLMediaElement::textTrackAddCues): Do nothing if the track is disabled.
1164         (WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
1165
1166 2013-07-16  Krzysztof Czech  <k.czech@ymail.com>
1167
1168         [ATK] Adds support for aria-haspopup property.
1169         https://bugs.webkit.org/show_bug.cgi?id=117834
1170
1171         Reviewed by Christophe Dumez.
1172
1173         Adds support for aria-haspopup property.
1174
1175         Tests: accessibility/element-haspopup.html
1176                accessibility/popup-button-title.html
1177
1178         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1179         (webkitAccessibleGetAttributes):
1180
1181 2013-07-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1182
1183         [texmap][GStreamer] upload onto the texture only the buffer to be painted
1184         https://bugs.webkit.org/show_bug.cgi?id=118471
1185
1186         Reviewed by Philippe Normand.
1187
1188         Right now all the buffers are uploaded onto the texture. With this
1189         logic pose situations where buffers that will not be painted are
1190         uploaded.
1191
1192         This patch uploads only the buffers that are going to be shown.
1193
1194         With this approach, the buffers may arrive before a GraphicsLayer is
1195         set, so we should be more cautious with GraphicsLayerTextureMapper's
1196         client.
1197
1198         No new tests, covered by existing tests.
1199
1200         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1201         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1202         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1203         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1204         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1205         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
1206         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1207         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1208         (WebCore::GraphicsLayerTextureMapper::~GraphicsLayerTextureMapper):
1209         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
1210
1211 2013-07-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1212
1213         [GStreamer] verify and log the received caps in the video sink
1214         https://bugs.webkit.org/show_bug.cgi?id=118559
1215
1216         Reviewed by Philippe Normand.
1217
1218         Verify the correctness of the received caps in the video sink, and
1219         also log them for debugging purposes.
1220
1221         No new tests, no behavior change.
1222
1223         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1224         (webkitVideoSinkSetCaps):
1225
1226 2013-07-16  Kangil Han  <kangil.han@samsung.com>
1227
1228         Use toHTMLSelectElement and dismiss isHTMLSelectElement
1229         https://bugs.webkit.org/show_bug.cgi?id=118714
1230
1231         Reviewed by Ryosuke Niwa.
1232
1233         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
1234         Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names.
1235
1236         * html/HTMLSelectElement.h:
1237         (WebCore::toHTMLSelectElement):
1238         * testing/Internals.cpp:
1239         (WebCore::Internals::isSelectPopupVisible):
1240
1241 2013-07-15  Yuta Kitamura  <yutak@chromium.org>
1242
1243         Fix a crash in Range::processContents().
1244
1245         NULL ptr in WebCore::Range::processAncestorsAndTheirSiblings
1246         https://bugs.webkit.org/show_bug.cgi?id=77614
1247
1248         Reviewed by Ryosuke Niwa.
1249
1250         This change is ported from Blink revision 153483:
1251         https://src.chromium.org/viewvc/blink?revision=153483&view=revision
1252
1253         This crash can be initiated by calling Range.detach() while deleteContents()
1254         is processing the same range. Range::processContents() should save the state
1255         of the range since mutation events can change the state of the range.
1256
1257         Test: fast/dom/Range/detach-range-during-deletecontents.html
1258
1259         * dom/Range.cpp:
1260         (WebCore::Range::processContents):
1261         * dom/RangeBoundaryPoint.h:
1262         (WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
1263
1264 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
1265
1266         Input element that becomes visible during a simulated click event from an associated label element doesn't get focused
1267         https://bugs.webkit.org/show_bug.cgi?id=118700
1268
1269         Reviewed by Kent Tamura.
1270
1271         Inspired by https://chromium.googlesource.com/chromium/blink/+/6435f70d53403b250e261a914f30d55142f81476.
1272
1273         The bug was caused by isMouseFocusable() check in HTMLLabelElement::defaultEventHandler not updating the layout even
1274         though the call to dispatchSimulatedClick may have dirtied the render tree.
1275
1276         Explicitly update the layout so that we have up-to-date render tree.
1277
1278         Test: fast/forms/label/label-becomes-visible-while-clicking-on-label.html
1279
1280         * html/HTMLLabelElement.cpp:
1281         (WebCore::HTMLLabelElement::defaultEventHandler):
1282
1283 2013-07-15  Kangil Han  <kangil.han@samsung.com>
1284
1285         Introduce toHTMLIFrameElement
1286         https://bugs.webkit.org/show_bug.cgi?id=118672
1287
1288         Reviewed by Ryosuke Niwa.
1289
1290         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
1291
1292         * bindings/js/JSHTMLDocumentCustom.cpp:
1293         (WebCore::JSHTMLDocument::nameGetter):
1294         * css/StyleResolver.cpp:
1295         (WebCore::StyleResolver::adjustRenderStyle):
1296         * dom/Document.cpp:
1297         (WebCore::Document::seamlessParentIFrame):
1298         * html/HTMLIFrameElement.h:
1299         (WebCore::toHTMLIFrameElement):
1300         * rendering/RenderEmbeddedObject.cpp:
1301         (WebCore::RenderEmbeddedObject::viewCleared):
1302         * rendering/RenderIFrame.cpp:
1303         (WebCore::RenderIFrame::isSeamless):
1304         (WebCore::RenderIFrame::flattenFrame):
1305
1306 2013-07-15  Chris Rogers  <crogers@google.com>
1307
1308         Add support for WaveShaperNode.oversample
1309         https://bugs.webkit.org/show_bug.cgi?id=117435
1310
1311         Reviewed by Kenneth Russell.
1312
1313         Adapted from Blink:
1314         https://codereview.chromium.org/15619003/
1315
1316         Please see specification for details:
1317         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveShaperNode
1318
1319         .oversample specifies what type of oversampling (if any) should be used when applying the shaping curve.
1320         The default value is "none", meaning the curve will be applied directly to the input samples.
1321         A value of "2x" or "4x" can improve the quality of the processing by avoiding some aliasing,
1322         with the "4x" value yielding the highest quality.
1323
1324         Tests: webaudio/waveshaper-oversample-2x.html
1325                webaudio/waveshaper-oversample-4x.html
1326
1327         * CMakeLists.txt:
1328         * GNUmakefile.list.am:
1329         * Modules/webaudio/WaveShaperDSPKernel.cpp:
1330         (WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
1331         (WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
1332         (WebCore::WaveShaperDSPKernel::process):
1333         (WebCore::WaveShaperDSPKernel::processCurve):
1334         (WebCore::WaveShaperDSPKernel::processCurve2x):
1335         (WebCore::WaveShaperDSPKernel::processCurve4x):
1336         (WebCore::WaveShaperDSPKernel::reset):
1337         (WebCore::WaveShaperDSPKernel::latencyTime):
1338         * Modules/webaudio/WaveShaperDSPKernel.h:
1339         * Modules/webaudio/WaveShaperNode.cpp:
1340         (WebCore::WaveShaperNode::WaveShaperNode):
1341         (WebCore::WaveShaperNode::setOversample):
1342         (WebCore::WaveShaperNode::oversample):
1343         * Modules/webaudio/WaveShaperNode.h:
1344         (WebCore::WaveShaperNode::latency):
1345         * Modules/webaudio/WaveShaperNode.idl:
1346         * Modules/webaudio/WaveShaperProcessor.cpp:
1347         (WebCore::WaveShaperProcessor::WaveShaperProcessor):
1348         (WebCore::WaveShaperProcessor::setOversample):
1349         * Modules/webaudio/WaveShaperProcessor.h:
1350         (WebCore::WaveShaperProcessor::oversample):
1351         * WebCore.xcodeproj/project.pbxproj:
1352         * platform/audio/DownSampler.cpp: Added.
1353         (WebCore::DownSampler::DownSampler):
1354         (WebCore::DownSampler::initializeKernel):
1355         (WebCore::DownSampler::process):
1356         (WebCore::DownSampler::reset):
1357         (WebCore::DownSampler::latencyFrames):
1358         * platform/audio/DownSampler.h: Added.
1359         * platform/audio/UpSampler.cpp: Added.
1360         (WebCore::UpSampler::UpSampler):
1361         (WebCore::UpSampler::initializeKernel):
1362         (WebCore::UpSampler::process):
1363         (WebCore::UpSampler::reset):
1364         (WebCore::UpSampler::latencyFrames):
1365         * platform/audio/UpSampler.h: Added.
1366
1367 2013-07-15  Tim Horton  <timothy_horton@apple.com>
1368
1369         Update blocked/missing plug-in UI
1370         https://bugs.webkit.org/show_bug.cgi?id=118347
1371         <rdar://problem/14209318>
1372
1373         Reviewed by Sam Weinig.
1374         Patch by Anders Carlsson, Antoine Quint, Sam Weinig, and myself.
1375
1376         * CMakeLists.txt:
1377         * DerivedSources.make:
1378         * DerivedSources.pri:
1379         * GNUmakefile.am:
1380         * WebCore.exp.in:
1381         * WebCore.vcxproj/WebCore.vcxproj:
1382         * WebCore.vcxproj/WebCore.vcxproj.filters:
1383         * WebCore.xcodeproj/project.pbxproj:
1384         * css/CSSDefaultStyleSheets.cpp:
1385         * css/unavailablePlugIns.css: Added.
1386         Add new Source/WebCore/css/unavailablePlugIns.css stylesheet.
1387
1388         * dom/EventListener.h:
1389         New event listener type to support the creation of an event listener
1390         for the label and icon for missing / blocked plug-in UI.
1391
1392         * html/HTMLPlugInElement.cpp:
1393         (WebCore::HTMLPlugInElement::defaultEventHandler):
1394         Remove explicit event handling since we're now using a DOM event handler
1395         on the label and icon in the shadow root.
1396
1397         * html/HTMLPlugInImageElement.cpp:
1398         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
1399         Don't populate the shadow root with plugin snapshotting elements
1400         if we're not planning on showing a snapshot, because this means that
1401         the shadow root was created for the unavailable plugin indicator instead.
1402
1403         * page/ChromeClient.h:
1404         (WebCore::ChromeClient::shouldUnavailablePluginMessageIncludeButton):
1405         * rendering/RenderEmbeddedObject.cpp:
1406         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
1407         (WebCore::shouldUnavailablePluginMessageIncludeButton):
1408         Rename from shouldUnavailablePluginMessageBeButton to
1409         shouldUnavailablePluginMessageIncludeButton for accuracy.
1410
1411         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonDescription):
1412         Set custom text to be displayed in the unavailability indicator.
1413
1414         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
1415         (WebCore::RenderEmbeddedObject::handleUnavailablePluginButtonClickEvent):
1416         (WebCore::RenderEmbeddedObject::willBeDestroyed):
1417         (WebCore::RenderEmbeddedObject::isReplacementObscured):
1418         (WebCore::RenderEmbeddedObjectEventListener::handleEvent):
1419         (WebCore::RenderEmbeddedObjectEventListener::operator==):
1420         Remove the old code used to render the missing / blocked plug-in UI in C++ in favor
1421         of populating a shadow root in setPluginUnavailabilityReason(). We add a DOM event
1422         listener in the shadow root to eventually call into unavailablePluginButtonClicked()
1423         on the ChromeClient.
1424
1425         (WebCore::RenderEmbeddedObject::paint):
1426         (WebCore::RenderEmbeddedObject::layout):
1427         Paint and lay out UA shadow root children.
1428
1429         (WebCore::RenderEmbeddedObject::canHaveChildren):
1430         canHaveChildren can use the existence of a UA shadow root to decide
1431         whether a RenderEmbeddedObject can have children.
1432
1433         * rendering/RenderEmbeddedObject.h:
1434         (WebCore::RenderEmbeddedObjectEventListener::create):
1435         (WebCore::RenderEmbeddedObjectEventListener::cast):
1436         (WebCore::RenderEmbeddedObjectEventListener::RenderEmbeddedObjectEventListener):
1437         Create the new event listener class necessary to handle events in the shadow root.
1438
1439         (WebCore::RenderEmbeddedObject::pluginUnavailabilityReasonDescription): Added.
1440
1441         * rendering/RenderWidget.h:
1442         Promote willBeDestroyed() to be public so we may override it in the RenderEmbeddedObject subclass.
1443
1444 2013-07-15  Andreas Kling  <akling@apple.com>
1445
1446         Pack WebCore::Font slightly better.
1447         <http://webkit.org/b/118681>
1448         <rdar://problem/14446014>
1449
1450         Reviewed by Sam Weinig.
1451
1452         Knock 8 bytes off of Font by packing the members better. Reduces memory consumption by 429 kB when
1453         viewing the full HTML5 spec at <http://whatwg.org/c>
1454
1455         * platform/graphics/Font.h:
1456         (WebCore::Font::typesettingFeatures):
1457
1458 2013-07-15  Rob Buis  <rwlbuis@webkit.org>
1459
1460         XMLSerializer doesn't include namespaces on nodes in HTML documents
1461         https://bugs.webkit.org/show_bug.cgi?id=16496
1462
1463         Reviewed by Ryosuke Niwa.
1464
1465         Introduce a xml fragment serialization mode as indicated by
1466         http://html5.org/specs/dom-parsing.html#xmlserializer (commit 00b84d2). In this mode
1467         the XML fragment serialization algorithm is respected, the changes in this patch do the following:
1468
1469         - elements are self-closing if otherwise this would lead to invalid xml syntax.
1470         - the resulting xml is XML namespace-well-formed (http://www.w3.org/TR/xml-names11/#Conformance).
1471         This is achieved by always, when in xml fragment serialization mode, attempting to write out the element/attribute namespace,
1472         preventing using the XML namespace as a default namespace and special casing the use of element's in XML namespace by using the xml prefix.
1473
1474         The chosen approach matches FireFox 25 behavior.
1475
1476         Test: fast/dom/dom-serialize-namespace.html
1477
1478         * WebCore.order: Adapt to changed createMarkup signature.
1479         * editing/MarkupAccumulator.cpp:
1480         (WebCore::MarkupAccumulator::MarkupAccumulator):
1481         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): makes sure xml namespace/prefix is known so it is never used in namespace declarations.
1482         (WebCore::MarkupAccumulator::appendNamespace): Avoid adding namespace declarations that do not differ from current default namespace.
1483         (WebCore::MarkupAccumulator::appendOpenTag): Print xml prefix if the element's namespace is XML to avoid conflicts.
1484         (WebCore::MarkupAccumulator::appendAttribute):
1485         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): Also take into account xmlns attributes with no namespace.
1486         (WebCore::MarkupAccumulator::shouldSelfClose): Force self-closing to create well-formed XML elements.
1487         * editing/MarkupAccumulator.h: Use EFragmentSerialization.
1488         (WebCore::MarkupAccumulator::inXMLFragmentSerialization):
1489         * editing/markup.cpp:
1490         (WebCore::createMarkup):
1491         * editing/markup.h: Add EFragmentSerialization enum.
1492         * xml/XMLSerializer.cpp:
1493         (WebCore::XMLSerializer::serializeToString):
1494
1495 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
1496
1497         MediaFragmentURIParser::parseFragments shouldn't upconvert 8-bit string
1498         https://bugs.webkit.org/show_bug.cgi?id=118692
1499
1500         Reviewed by Michael Saboff.
1501
1502         Merge https://chromium.googlesource.com/chromium/blink/+/2aa17cc56a807f7e05d386d6eb66cda25e6b0542.
1503
1504         * html/MediaFragmentURIParser.cpp:
1505         (WebCore::MediaFragmentURIParser::parseFragments):
1506
1507 2013-07-15  Kwang Yul Seo  <skyul@company100.net>
1508
1509         NetworkStorageSession::createDefaultSession is only implemented by Soup
1510         https://bugs.webkit.org/show_bug.cgi?id=118679
1511
1512         Reviewed by Alexey Proskuryakov.
1513
1514         Remove NetworkStorageSession::createDefaultSession() because
1515         NetworkStorageSession::defaultStorageSession() returns the default
1516         session.
1517
1518         No new tests, no behavior change.
1519
1520         * platform/network/NetworkStorageSession.h:
1521         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1522
1523 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
1524
1525         compositionstart event should contain the text to be replaced
1526         https://bugs.webkit.org/show_bug.cgi?id=118684
1527
1528         Reviewed by Alexey Proskuryakov.
1529
1530         Merge https://chromium.googlesource.com/chromium/blink/+/9e04f728a95ad7d4783b1d31c3cdc1412dd6cc4d.
1531
1532         DOM3 level 3 specifies compositionstart event's data to be the text to be replaced.
1533         http://www.w3.org/TR/DOM-Level-3-Events/#event-type-compositionstart
1534
1535         According to the author of the Blink change, IE10 on Windows and Firefox22 on Linux confirms
1536         to the specified behavior.
1537
1538         Test: fast/events/ime-composition-events-001.html
1539
1540         * editing/Editor.cpp:
1541         (WebCore::Editor::setComposition):
1542
1543 2013-07-15  Ryosuke Niwa  <rniwa@webkit.org>
1544
1545         xmlDocPtrForString shouldn't upconvert 8-bit string
1546         https://bugs.webkit.org/show_bug.cgi?id=118693
1547
1548         Reviewed by Michael Saboff.
1549
1550         Merge https://chromium.googlesource.com/chromium/blink/+/5d9b240db74591c3689415c7b7c5180fadb379e9
1551
1552         Prior to this changeset, we were upconverting the entire XML document.
1553         Let xmllib2 parse a document as iso-8859-1 when it's a 8-bit string.
1554
1555         * xml/parser/XMLDocumentParserLibxml2.cpp:
1556         (WebCore::nativeEndianUTF16Encoding):
1557         (WebCore::xmlDocPtrForString):
1558
1559 2013-07-15  Roger Fong  <roger_fong@apple.com>
1560
1561         Replace WKCACFTypes include with d3d9 include.
1562
1563         Rubberstamped by Eric Carlson.
1564
1565         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1566
1567 2013-07-15  Antoine Quint  <graouts@apple.com>
1568
1569         Text with "text-overflow:ellipsis" and an SVG font do not render correctly
1570         https://bugs.webkit.org/show_bug.cgi?id=118669
1571
1572         Reviewed by David Kilzer.
1573
1574         Partial runs may be routed through the complex path in several Font functions. While incomplete,
1575         we can check for a non-NULL run.renderingContext() and exempt runs that have it from being forced
1576         down the complex path. A more thorough fix is already tracked by http://webkit.org/b/100050.
1577
1578         Adding a new testcase which is a copy of svg/text/text-overflow-ellipsis-svgfont.html with kerning
1579         and ligatures turned on explicitly since DRT runs with those off by default and this option is required
1580         to be on for the issue to reproduce.
1581
1582         Fix courtesy of Dan Bernstein.
1583
1584         Test: svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
1585
1586         * platform/graphics/Font.cpp:
1587         (WebCore::Font::drawText):
1588         (WebCore::Font::drawEmphasisMarks):
1589         (WebCore::Font::selectionRectForText):
1590
1591 2013-07-15  peavo@outlook.com  <peavo@outlook.com>
1592
1593         [Curl] Download does not replace existing file.
1594         https://bugs.webkit.org/show_bug.cgi?id=118356
1595
1596         Reviewed by Brent Fulgham.
1597
1598         If the download target file already exists, it is not replaced after the download has finished.
1599         At this point, the user would have already approved to replace the file, so it should be replaced.
1600
1601         * platform/network/curl/CurlDownload.cpp:
1602         (CurlDownload::moveFileToDestination): Move file and replace it if it already exists.
1603         If the new file is on a different volume, do a copy/delete operation.
1604
1605 2013-07-15  Luciano Wolf  <luciano.wolf@openbossa.org>
1606
1607         [CoordinatedGraphics] Crash at CoordinatedGraphicsScene::updateImageBacking
1608         https://bugs.webkit.org/show_bug.cgi?id=118613
1609
1610         The operations of creating/removing/updating/clearing weren't in the
1611         right sequence. Changing the order solves the issue because when an image is
1612         replaced the old one is deleted before the new one is created, and IDs are
1613         not unique in cairo (they're based on the image pointer).
1614
1615         Reviewed by Noam Rosenthal.
1616
1617         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1618         (WebCore::CoordinatedGraphicsScene::syncImageBackings):
1619
1620 2013-07-15  Brian Holt  <brian.holt@samsung.com>
1621
1622         [ATK] Leak: Leak in WebKitAccessibleTextGetText
1623         https://bugs.webkit.org/show_bug.cgi?id=118596
1624
1625         Reviewed by Carlos Garcia Campos.
1626
1627         Fixed memory leak.
1628
1629         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1630         (getGailTextUtilForAtk):
1631
1632 2013-07-14  Jon Lee  <jonlee@apple.com>
1633
1634         Origins with invalid ports are not marked as unique (118652)
1635         https://bugs.webkit.org/show_bug.cgi?id=118652
1636         <rdar://problem/14437753>
1637
1638         Reviewed by Sam Weinig.
1639
1640         * page/SecurityOrigin.cpp:
1641         (WebCore::SecurityOrigin::create): Return a unique origin if the port is out of range.
1642
1643 2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1644
1645         Another Qt build fix attempt after r152619.
1646
1647         * dom/QualifiedName.cpp:
1648         (WebCore::QualifiedName::toString):
1649
1650 2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1651
1652         Qt build fix attempt after r152619.
1653
1654         * dom/QualifiedName.cpp:
1655         (WebCore::QualifiedName::toString):
1656
1657 2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1658
1659         Mac build fix attempt after r152615.
1660
1661         * svg/SVGFilterElement.h:
1662
1663 2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1664
1665         Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
1666         https://bugs.webkit.org/show_bug.cgi?id=118299
1667
1668         Reviewed by Andreas Kling.
1669
1670         Address Ben's review comment.
1671
1672         * dom/QualifiedName.cpp:
1673         (WebCore::QualifiedName::toString):
1674
1675 2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1676
1677         HTMLTextFormControlElement::valueWithHardLineBreaks shouldn't upconvert 8-bit string
1678         https://bugs.webkit.org/show_bug.cgi?id=118631
1679
1680         Reviewed by Andreas Kling.
1681
1682         Merge https://chromium.googlesource.com/chromium/blink/+/2c7c70a7bd3d61bfbf97de95c459ec9f40b46e31.
1683
1684         * html/HTMLTextFormControlElement.cpp:
1685         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
1686
1687 2013-07-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1688
1689         Add toSVGFilterElement() and use it.
1690         https://bugs.webkit.org/show_bug.cgi?id=118653
1691
1692         Reviewed by Ryosuke Niwa.
1693
1694         We can use toSVGFilterElement() instead of using static_cast<..> to improve readability.
1695         Blink also uses it.
1696
1697         No new tests, no behavior change.
1698
1699         * rendering/svg/RenderSVGResourceFilter.cpp:
1700         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1701         (WebCore::RenderSVGResourceFilter::applyResource):
1702         (WebCore::RenderSVGResourceFilter::resourceBoundingBox):
1703         * rendering/svg/RenderSVGResourceFilter.h:
1704         (WebCore::RenderSVGResourceFilter::filterUnits):
1705         (WebCore::RenderSVGResourceFilter::primitiveUnits):
1706         * rendering/svg/SVGResources.cpp:
1707         (WebCore::targetReferenceFromResource):
1708         * svg/SVGFilterElement.h:
1709         (WebCore::toSVGFilterElement):
1710
1711 2013-07-14  Kangil Han  <kangil.han@samsung.com>
1712
1713         Introduce toHTMLVideoElement
1714         https://bugs.webkit.org/show_bug.cgi?id=118582
1715
1716         Reviewed by Ryosuke Niwa.
1717
1718         To avoid direct use of static_cast, this patch introduces toHTMLVideoElement.
1719
1720         * html/HTMLMediaElement.cpp:
1721         (WebCore::HTMLMediaElement::getPluginProxyParams):
1722         * html/HTMLVideoElement.h:
1723         (WebCore::toHTMLVideoElement):
1724         * html/MediaDocument.cpp:
1725         (WebCore::MediaDocumentParser::createDocumentStructure):
1726         (WebCore::descendentVideoElement):
1727         (WebCore::ancestorVideoElement):
1728         * html/shadow/MediaControlElements.cpp:
1729         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1730         * rendering/HitTestResult.cpp:
1731         (WebCore::HitTestResult::enterFullscreenForVideo):
1732         * rendering/RenderVideo.cpp:
1733         (WebCore::RenderVideo::videoElement):
1734
1735 2013-07-13  Commit Queue  <commit-queue@webkit.org>
1736
1737         Unreviewed, rolling out r151978.
1738         http://trac.webkit.org/changeset/151978
1739         https://bugs.webkit.org/show_bug.cgi?id=118651
1740
1741         Caused regressions at least 3 websites (Requested by rniwa on
1742         #webkit).
1743
1744         * bindings/js/JSDOMBinding.cpp:
1745         * bindings/js/JSDOMBinding.h:
1746         * bindings/scripts/CodeGeneratorJS.pm:
1747         (GetNativeTypeFromSignature):
1748         (JSValueToNative):
1749         * bindings/scripts/IDLAttributes.txt:
1750         * bindings/scripts/test/JS/JSTestObj.cpp:
1751         (WebCore::setJSTestObjReflectedStringAttr):
1752         (WebCore::setJSTestObjReflectedURLAttr):
1753         (WebCore::setJSTestObjReflectedCustomURLAttr):
1754         * dom/Document.idl:
1755         * dom/Element.idl:
1756         * dom/Node.idl:
1757
1758 2013-07-13  Joone Hur  <joone.hur@intel.com>
1759
1760         Caret should respect text background color
1761         https://bugs.webkit.org/show_bug.cgi?id=117493
1762
1763         Reviewed by Ryosuke Niwa.
1764
1765         This patch allows the caret to become visible in the black background
1766         by getting the caret color from the color of the element containing
1767         the text, not the parent element that has the contentEditable attribute.
1768
1769         Test: editing/caret/caret-color.html
1770
1771         * editing/FrameSelection.cpp:
1772         (WebCore::CaretBase::paintCaret):
1773
1774 2013-07-13  Ryosuke Niwa  <rniwa@webkit.org>
1775
1776         Avoid upconverting strings in various places in WebCore
1777         https://bugs.webkit.org/show_bug.cgi?id=118632
1778
1779         Reviewed by Andreas Kling.
1780
1781         Avoid calling String::characters() in various places since it upconverts 8-bit strings to 16-bit strings.
1782
1783         Merge
1784         https://chromium.googlesource.com/chromium/blink/+/a6162e2ad7c7870e22445d3c463d17e7ac871e80
1785         https://chromium.googlesource.com/chromium/blink/+/18095209b3f467758b83894e7b14f813f6953f81
1786         https://chromium.googlesource.com/chromium/blink/+/fefcf2b95d55f24c60fd2e95978cf4544f3c92ca
1787         https://chromium.googlesource.com/chromium/blink/+/8e0527b0fb33998318aedfd74b3511025f7ff294
1788         https://chromium.googlesource.com/chromium/blink/+/feaf798b04597b0849b4000fc305264895d3eac5
1789         https://chromium.googlesource.com/chromium/blink/+/bd1a49103a6e07b1023d2c742d8217769efbffb4
1790
1791         * css/CSSParser.cpp:
1792         (WebCore::CSSParser::setupParser):
1793         (WebCore::CSSParser::parseImageSet):
1794         (WebCore::CSSParser::rewriteSpecifiers):
1795         * css/CSSParserValues.h:
1796         (WebCore::CSSParserString::init):
1797         (WebCore::CSSParserString::clear):
1798         * dom/DatasetDOMStringMap.cpp:
1799         (WebCore::isValidAttributeName):
1800         (WebCore::convertAttributeNameToPropertyName):
1801         (WebCore::propertyNameMatchesAttributeName):
1802         (WebCore::isValidPropertyName):
1803         (WebCore::convertPropertyNameToAttributeName):
1804         * dom/Range.cpp:
1805         (WebCore::Range::toString):
1806         * dom/SecurityContext.cpp:
1807         (WebCore::SecurityContext::parseSandboxPolicy):
1808         * html/canvas/CanvasRenderingContext2D.cpp:
1809         (WebCore::CanvasRenderingContext2D::measureText):
1810         * html/track/TextTrackCue.cpp:
1811         (WebCore::TextTrackCue::markFutureAndPastNodes):
1812
1813 2013-07-13  Ryosuke Niwa  <rniwa@webkit.org>
1814
1815         parseHTMLInteger shouldn't upconvert 8-bit string
1816         https://bugs.webkit.org/show_bug.cgi?id=118629
1817
1818         Reviewed by Sam Weinig.
1819
1820         Merge https://chromium.googlesource.com/chromium/blink/+/e0ebab23e0c16b49dc90c9c39b8bbbf4f243a01e.
1821
1822         * html/parser/HTMLParserIdioms.cpp:
1823         (WebCore::parseHTMLInteger):
1824
1825 2013-07-12  Eric Carlson  <eric.carlson@apple.com>
1826
1827         [iOS] TextTrackRepresentation not cleared when captions are disabled
1828         https://bugs.webkit.org/show_bug.cgi?id=118623
1829
1830         Reviewed by Dean Jackson.
1831
1832         * html/shadow/MediaControlElements.cpp:
1833         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Do not return immediately
1834             when captions are disabled so the necessary cleanup happens.
1835
1836 2013-07-12  Brent Fulgham  <bfulgham@apple.com>
1837
1838         [Windows] Attempt to satisfy the Open Source Windows bots.
1839
1840         * DerivedSources.make: Restore the HAVE_AVCF macro detection.
1841         * config.h: Return to using HAVE_AVCF to activate AVFoundation code.
1842
1843 2013-07-12  peavo@outlook.com  <peavo@outlook.com>
1844
1845         [WinCairo] Compile fix.
1846         https://bugs.webkit.org/show_bug.cgi?id=118461
1847
1848         Reviewed by Brent Fulgham.
1849
1850         * config.h: Only enable AVFOUNDATION for Windows if CoreGraphics is used.
1851
1852 2013-07-12  Oleg Beletski  <oleg.beletski@gmail.com>
1853
1854         [EFL] --minimal build fails while linking libwebcore_efl.so
1855         https://bugs.webkit.org/show_bug.cgi?id=118549
1856
1857         Reviewed by Christophe Dumez.
1858
1859         * CMakeLists.txt:
1860         Moving file plugins/PluginPackage.cpp to ENABLE_NETSCAPE_PLUGIN_API block.
1861
1862 2013-07-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1863
1864         Insufficient viewport repaints when FrameView::paintsEntireContents
1865         https://bugs.webkit.org/show_bug.cgi?id=118562
1866
1867         Reviewed by Simon Fraser.
1868
1869         When the frameview paints entire content, the visualOverflowRect of RenderView
1870         should be the same as the layoutOverflowRect.
1871
1872         This affects the requested repaints on resize of the frameview.
1873
1874         * rendering/RenderView.cpp:
1875         (WebCore::RenderView::visualOverflowRect):
1876         * rendering/RenderView.h:
1877
1878 2013-07-10  Roger Fong  <roger_fong@apple.com>
1879
1880         Plugins that don't support snapshotting should not all autostart.
1881         https://bugs.webkit.org/show_bug.cgi?id=118572
1882         <rdar://problem/14324391>.
1883
1884         Reviewed by Dean Jackson.
1885
1886         Test: plugins/snapshotting/quicktime-plugin-snapshotted.html
1887
1888         * html/HTMLPlugInImageElement.cpp:
1889         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Pass in information about whether or not a snapshot exists
1890         to the shadow dom.
1891         * plugins/PluginViewBase.h:
1892         (WebCore::PluginViewBase::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
1893         It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
1894         * rendering/RenderLayerBacking.cpp:
1895         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): We should only add the layer to the tree when the plugin
1896         is actually playing. Otherwise we run into an issue where the contents of the layer initially appear on the screen briefly 
1897         on page load before we display the substitute for a plugin that doesn't support snapshotting.
1898
1899 2013-07-11  Dan Bernstein  <mitz@apple.com>
1900
1901         [mac] No API for getting the page visibility state of a WebView
1902         https://bugs.webkit.org/show_bug.cgi?id=118578
1903
1904         Reviewed by Simon Fraser.
1905
1906         * WebCore.exp.in: Export WebCore::Page::visibilityState().
1907
1908 2013-07-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1909
1910         [GTK] Layout Test accessibility/deleting-iframe-destroys-axcache.html, platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html are failing
1911         https://bugs.webkit.org/show_bug.cgi?id=118552
1912
1913         Reviewed by Chris Fleizach.
1914
1915         Do not assume always that we have a RenderText renderer when
1916         calling to toRenderText(), since we might be executing that part
1917         of the code due to have requested to include all the children.
1918
1919         * accessibility/AccessibilityRenderObject.cpp:
1920         (WebCore::AccessibilityRenderObject::textUnderElement): Add
1921         missing guard for RenderText, needed after r152537.
1922
1923 2013-07-11  Andrei Bucur  <abucur@adobe.com>
1924
1925         [CSS Regions] In a region chain with auto-height regions, lines get their length based only on the first region
1926         https://bugs.webkit.org/show_bug.cgi?id=118531
1927
1928         Reviewed by Alexandru Chiculita.
1929
1930         When computing the height a flow thread it's possible to overflow the maximum LayoutUnit and obtain a negative value.
1931         This leads to invalid results during layout when computing the region range and the RenderBoxRegion info for the
1932         descendant boxes of the flow thread.
1933     
1934         This issue appears especially during the auto-height algorithm because it initializes the auto-height regions
1935         height with the LayoutUnit::max() / 2 value. Summing two such regions overflows and results in a negative value.
1936
1937         The fix clamps the maximum height of the flow thread to LayoutUnit::max() / 2. This doesn't affect the auto-height
1938         algorithm because regionAtBlockOffset() will still return the correct values as the auto-height regions content
1939         is established and their height updated.
1940
1941         Tests: fast/regions/autoheight-correct-region-for-lines-2.html
1942                fast/regions/autoheight-correct-region-for-lines.html
1943
1944         * rendering/RenderBlock.cpp:
1945         (WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
1946         * rendering/RenderFlowThread.cpp:
1947         (WebCore::RenderFlowThread::computeLogicalHeight):
1948         (WebCore::RenderFlowThread::setRegionRangeForBox):
1949         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1950         * rendering/RenderFlowThread.h:
1951         * rendering/RenderRegion.cpp:
1952         (WebCore::RenderRegion::maxPageLogicalHeight):
1953
1954 2013-07-11  Timothy Hatcher  <timothy@apple.com>
1955
1956         Revert r152267 and soft link WebInspectorUI.framework again.
1957
1958         https://bugs.webkit.org/show_bug.cgi?id=118544
1959
1960         Reviewed by David Kilzer.
1961
1962         * platform/mac/SoftLinking.h: Rename SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL
1963         to SOFT_LINK_STAGED_FRAMEWORK and ASSERT since we don't want to silently
1964         fail anymore when using this macro.
1965
1966 2013-07-11  Jae Hyun Park  <jae.park@company100.net>
1967
1968         [Coordinated Graphics] Parameter of commitSceneState should be const
1969         https://bugs.webkit.org/show_bug.cgi?id=118564
1970
1971         Reviewed by Noam Rosenthal.
1972
1973         Parameter of commitSceneState should be const as there should not be any
1974         modifications to the passed CoordinatedGraphicsState.
1975
1976         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
1977
1978 2013-07-11  Radu Stavila  <stavila@adobe.com>
1979
1980         NamedFlowCollection getters should follow the same pattern as HTMLCollection
1981         https://bugs.webkit.org/show_bug.cgi?id=118561
1982
1983         Reviewed by Christophe Dumez.
1984
1985         Modified item and namedItem methods from DOMNamedFlowCollection to return null instead of undefined.
1986         https://www.w3.org/Bugs/Public/show_bug.cgi?id=22617
1987         Completely removed the TreatReturnedNullObjectAs attribute as it was only used by the DOMNamedFlowCollection interface.
1988
1989         Test: fast/regions/webkit-named-flow-collection-empty-getters.html
1990
1991         * bindings/scripts/CodeGeneratorJS.pm:
1992         (GenerateImplementationFunctionCall):
1993         * bindings/scripts/IDLAttributes.txt:
1994         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1995         (WebDOMTestObj::treatReturnedNullObjectAsUndefined):
1996         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1997         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1998         (webkit_dom_test_obj_treat_returned_null_object_as_undefined):
1999         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2000         * bindings/scripts/test/JS/JSTestObj.cpp:
2001         (WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
2002         * bindings/scripts/test/JS/JSTestObj.h:
2003         * bindings/scripts/test/ObjC/DOMTestObj.h:
2004         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2005         (-[DOMTestObj treatReturnedNullObjectAsUndefined]):
2006         * bindings/scripts/test/TestObj.idl:
2007         * dom/DOMNamedFlowCollection.idl:
2008
2009 2013-07-11  Andreas Kling  <akling@apple.com>
2010
2011         Revert r149313: Don't check for @media rules affected by viewport changes in every layout.
2012         <rdar://problem/14277905>
2013
2014         Rubber-stamped by Antti Koivisto.
2015
2016         This changed caused more harm than good. setFrameRect() is not the only path in FrameView
2017         that can cause media queries to need invalidation.
2018
2019         * page/FrameView.cpp:
2020         (WebCore::FrameView::setFrameRect):
2021         (WebCore::FrameView::layout):
2022
2023 2013-07-11  Kangil Han  <kangil.han@samsung.com>
2024
2025         Introduce isHTMLTitleElement and toHTMLTitleElement
2026         https://bugs.webkit.org/show_bug.cgi?id=118558
2027
2028         Reviewed by Andreas Kling.
2029
2030         To enhance readability, this patch introduces isHTMLTitleElement and toHTMLTitleElement.
2031         This also helps out to reduce duplicated use of static_cast.
2032
2033         * dom/Document.cpp:
2034         (WebCore::Document::setTitle):
2035         (WebCore::Document::removeTitle):
2036         * editing/ReplaceSelectionCommand.cpp:
2037         (WebCore::removeHeadContents):
2038         * html/HTMLTitleElement.h:
2039         (WebCore::isHTMLTitleElement):
2040         (WebCore::toHTMLTitleElement):
2041
2042 2013-07-11  Patrick Gansterer  <paroga@webkit.org>
2043
2044         Remove unused Windows CE files
2045         https://bugs.webkit.org/show_bug.cgi?id=118557
2046
2047         Reviewed by Andreas Kling.
2048
2049         * platform/wince/CursorWinCE.cpp: Removed.
2050         * platform/wince/PasteboardWinCE.cpp: Removed.
2051         * platform/wince/SearchPopupMenuWinCE.cpp: Removed.
2052
2053 2013-07-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2054
2055         Get rid of SVGPathSeg* special casing in the bindings generator
2056         https://bugs.webkit.org/show_bug.cgi?id=118525
2057
2058         Reviewed by Kentaro Hara.
2059
2060         Have one header per SVGPathSeg* type so that we no longer need special casing
2061         for them in the JSC bindings generator.
2062
2063         No new tests, no behavior change.
2064
2065         * GNUmakefile.list.am:
2066         * Target.pri:
2067         * WebCore.vcxproj/WebCore.vcxproj:
2068         * WebCore.vcxproj/WebCore.vcxproj.filters:
2069         * WebCore.xcodeproj/project.pbxproj:
2070         * bindings/js/JSSVGPathSegCustom.cpp:
2071         * bindings/scripts/CodeGeneratorJS.pm:
2072         (AddIncludesForType):
2073         (NativeToJSValue):
2074         * svg/SVGPathElement.cpp:
2075         * svg/SVGPathSegArc.h:
2076         * svg/SVGPathSegArcAbs.h: Added.
2077         (WebCore::SVGPathSegArcAbs::create):
2078         (WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
2079         (WebCore::SVGPathSegArcAbs::pathSegType):
2080         (WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
2081         * svg/SVGPathSegArcRel.h: Added.
2082         (WebCore::SVGPathSegArcRel::create):
2083         (WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
2084         (WebCore::SVGPathSegArcRel::pathSegType):
2085         (WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
2086         * svg/SVGPathSegCurvetoCubic.h:
2087         * svg/SVGPathSegCurvetoCubicAbs.h: Added.
2088         (WebCore::SVGPathSegCurvetoCubicAbs::create):
2089         (WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
2090         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
2091         (WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
2092         * svg/SVGPathSegCurvetoCubicRel.h: Added.
2093         (WebCore::SVGPathSegCurvetoCubicRel::create):
2094         (WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
2095         (WebCore::SVGPathSegCurvetoCubicRel::pathSegType):
2096         (WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
2097         * svg/SVGPathSegCurvetoCubicSmooth.h:
2098         * svg/SVGPathSegCurvetoCubicSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
2099         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2100         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
2101         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
2102         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
2103         * svg/SVGPathSegCurvetoCubicSmoothRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
2104         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2105         (WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
2106         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
2107         (WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
2108         * svg/SVGPathSegCurvetoQuadratic.h:
2109         * svg/SVGPathSegCurvetoQuadraticAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
2110         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2111         (WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
2112         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
2113         (WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
2114         * svg/SVGPathSegCurvetoQuadraticRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
2115         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
2116         (WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
2117         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
2118         (WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
2119         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
2120         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
2121         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
2122         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegType):
2123         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
2124         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h: Renamed from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
2125         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
2126         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
2127         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegType):
2128         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
2129         * svg/SVGPathSegLinetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegLineto.h.
2130         (WebCore::SVGPathSegLinetoAbs::create):
2131         (WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
2132         (WebCore::SVGPathSegLinetoAbs::pathSegType):
2133         (WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
2134         * svg/SVGPathSegLinetoHorizontal.h:
2135         * svg/SVGPathSegLinetoHorizontalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
2136         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2137         (WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
2138         (WebCore::SVGPathSegLinetoHorizontalAbs::pathSegType):
2139         (WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
2140         * svg/SVGPathSegLinetoHorizontalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
2141         (WebCore::SVGPathSegLinetoHorizontalRel::create):
2142         (WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
2143         (WebCore::SVGPathSegLinetoHorizontalRel::pathSegType):
2144         (WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
2145         * svg/SVGPathSegLinetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegLineto.h.
2146         (WebCore::SVGPathSegLinetoRel::create):
2147         (WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
2148         (WebCore::SVGPathSegLinetoRel::pathSegType):
2149         (WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
2150         * svg/SVGPathSegLinetoVertical.h:
2151         * svg/SVGPathSegLinetoVerticalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
2152         (WebCore::SVGPathSegLinetoVerticalAbs::create):
2153         (WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
2154         (WebCore::SVGPathSegLinetoVerticalAbs::pathSegType):
2155         (WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
2156         * svg/SVGPathSegLinetoVerticalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
2157         (WebCore::SVGPathSegLinetoVerticalRel::create):
2158         (WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
2159         (WebCore::SVGPathSegLinetoVerticalRel::pathSegType):
2160         (WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
2161         * svg/SVGPathSegListBuilder.cpp:
2162         * svg/SVGPathSegMovetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegMoveto.h.
2163         (WebCore::SVGPathSegMovetoAbs::create):
2164         (WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
2165         (WebCore::SVGPathSegMovetoAbs::pathSegType):
2166         (WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
2167         * svg/SVGPathSegMovetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegMoveto.h.
2168         (WebCore::SVGPathSegMovetoRel::create):
2169         (WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
2170         (WebCore::SVGPathSegMovetoRel::pathSegType):
2171         (WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):
2172
2173 2013-07-11  Patrick Gansterer  <paroga@webkit.org>
2174
2175         Build fix for WinCE after r152426.
2176
2177         * config.h:
2178
2179 2013-07-11  Fabienne Semeria   <fsemeria@nds.com>
2180
2181         [Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
2182         https://bugs.webkit.org/show_bug.cgi?id=118532
2183
2184         Reviewed by Allan Sandfeld Jensen.
2185
2186         * platform/graphics/qt/FontCacheQt.cpp:
2187         (WebCore::FontCache::getLastResortFallbackFont):
2188
2189 2013-07-11  Mario Sanchez Prada  <mario.prada@samsung.com>
2190
2191         [ATK] Refactor code for translating offsets between WebCore a11y and ATK
2192         https://bugs.webkit.org/show_bug.cgi?id=118179
2193
2194         Reviewed by Chris Fleizach.
2195
2196         Encapsulate better and make more clear the translation of offsets
2197         between our ATK implementation and WebCore's accessibility layer.
2198
2199         Values for offsets can differ sometimes between those two worlds
2200         due to some extra flattening we need to do in ATK based ports to
2201         properly expose the accessibility hierarchy to ATs, which
2202         sometimes means adding extra text elements in the exposed text
2203         through the AtkText interface (e.g. list items markers).
2204
2205         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2206         (offsetAdjustmentForListItem): Helper function to refactor code
2207         needed to translate offsets from WebCore to ATK worlds. Currently
2208         related to considering list item markers in LTR text only.
2209         (webCoreOffsetToAtkOffset): Convenience function for code
2210         readability purposes. It just calls offsetAdjustmentForListItem.
2211         (atkOffsetToWebCoreOffset): Likewise.
2212         (getSelectionOffsetsForObject): Use webCoreOffsetToAtkOffset.
2213         (webkitAccessibleTextGetCaretOffset): Use webCoreOffsetToAtkOffset
2214         to translate an offset from WebCore to ATK before returning it.
2215         (webkitAccessibleTextSetSelection): Use atkOffsetToWebCoreOffset
2216         to translate an offset from WebCore to ATK before using it.
2217         (webkitAccessibleTextSetCaretOffset): Likewise.
2218
2219 2013-07-10  Sam Weinig  <sam@webkit.org>
2220
2221         Range.getClientRects() not working correctly for partially contained vertically styled text nodes
2222         <rdar://problem/14305675>
2223         https://bugs.webkit.org/show_bug.cgi?id=118447
2224
2225         Reviewed by David Hyatt.
2226
2227         Original patch by Mac Murrett, tweaked by me.
2228
2229         Test: fast/dom/Range/getClientRects-vertical.html
2230
2231         * rendering/RenderText.cpp:
2232         (WebCore::localQuadForTextBox):
2233         Use the physical accessors rather than the logical ones to get the correct metrics.
2234
2235 2013-07-10  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2236
2237         Reduce number of header includes in SVG
2238         https://bugs.webkit.org/show_bug.cgi?id=118474
2239
2240         Reviewed by Rob Buis.
2241
2242         Reduce number of header includes in SVG. In particular, SVGAnimatedPropertyMacros.h
2243         no longer brings SVGElement.h header include. This means that the SVGElement
2244         class can now have animated properties.
2245
2246         This patch is a prerequirement to merge SVGStyledElement into SVGElement.
2247
2248         No new tests, no behavior change.
2249
2250         * CMakeLists.txt:
2251         * GNUmakefile.list.am:
2252         * Target.pri:
2253         * WebCore.vcxproj/WebCore.vcxproj:
2254         * WebCore.vcxproj/WebCore.vcxproj.filters:
2255         * WebCore.xcodeproj/project.pbxproj:
2256         * svg/GradientAttributes.h:
2257         * svg/SVGAllInOne.cpp:
2258         * svg/SVGAnimateMotionElement.cpp:
2259         * svg/SVGAnimateMotionElement.h:
2260         * svg/SVGAnimatedTypeAnimator.cpp: Added.
2261         (WebCore::SVGElementAnimatedProperties::SVGElementAnimatedProperties):
2262         (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
2263         (WebCore::SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator):
2264         (WebCore::SVGAnimatedTypeAnimator::calculateFromAndToValues):
2265         (WebCore::SVGAnimatedTypeAnimator::calculateFromAndByValues):
2266         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
2267         * svg/SVGAnimatedTypeAnimator.h:
2268         * svg/SVGAnimationElement.h:
2269         * svg/SVGCursorElement.cpp:
2270         * svg/SVGDocumentExtensions.h:
2271         * svg/SVGElement.cpp:
2272         * svg/SVGElementInstanceList.cpp:
2273         * svg/SVGElementInstanceList.h:
2274         * svg/SVGElementRareData.h:
2275         * svg/SVGFEImageElement.cpp:
2276         * svg/SVGFilterElement.cpp:
2277         * svg/SVGFitToViewBox.h:
2278         * svg/SVGFontData.cpp:
2279         * svg/SVGFontData.h:
2280         * svg/SVGFontElement.h:
2281         * svg/SVGForeignObjectElement.cpp:
2282         * svg/SVGGlyphMap.h:
2283         * svg/SVGGradientElement.cpp:
2284         * svg/SVGMPathElement.cpp:
2285         * svg/SVGMPathElement.h:
2286         * svg/SVGPathBlender.cpp:
2287         * svg/SVGPathBlender.h:
2288         * svg/SVGPathBuilder.cpp:
2289         * svg/SVGPathBuilder.h:
2290         * svg/SVGPathParser.cpp:
2291         * svg/SVGPathParser.h:
2292         * svg/SVGPathSegListBuilder.h:
2293         * svg/SVGPathTraversalStateBuilder.cpp:
2294         * svg/SVGPathTraversalStateBuilder.h:
2295         * svg/SVGPathUtilities.h:
2296         * svg/SVGPatternElement.cpp:
2297         * svg/SVGPointList.h:
2298         * svg/SVGScriptElement.cpp:
2299         * svg/SVGStyledElement.h:
2300         * svg/SVGTests.h:
2301         * svg/SVGTextElement.h:
2302         * svg/SVGTextPathElement.cpp:
2303         * svg/SVGTransformable.h:
2304         * svg/SVGURIReference.cpp:
2305         * svg/SVGURIReference.h:
2306         * svg/SVGVKernElement.cpp:
2307         * svg/SVGVKernElement.h:
2308         * svg/SVGZoomAndPan.h:
2309         * svg/properties/SVGAnimatedProperty.cpp: Added.
2310         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
2311         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
2312         (WebCore::SVGAnimatedProperty::commitChange):
2313         (WebCore::SVGAnimatedProperty::animatedPropertyCache):
2314         * svg/properties/SVGAnimatedProperty.h:
2315         * svg/properties/SVGAnimatedPropertyMacros.h:
2316         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
2317         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
2318         * svg/properties/SVGListProperty.h:
2319
2320 2013-07-10  Dominique Leuenberger  <dimstar@opensuse.org>
2321
2322         Fix build against GTK+ 2.0
2323         https://bugs.webkit.org/show_bug.cgi?id=117895
2324
2325         Reviewed by Martin Robinson.
2326
2327         GTK2 build fails for undefined GDK_IS_X11_DISPLAY
2328         GTK 2.0 does define GDK_WINDOWING_X11,but GDK_IS_X11_DISPLAY is not
2329         present in GTK+ 2.0. A dummy defines is sufficient, as GTK 2.0 is not
2330         that multiple backend aware anyway...
2331
2332         * platform/gtk/GtkVersioning.h: Define GDK_IS_X11_DISPLAY for GTK+ 2.0
2333           and compatibility for gtk_widget_get_preferred_size()
2334         * plugins/gtk/gtk2xtbin.c: Include config.h
2335
2336 2013-07-10  Tim Horton  <timothy_horton@apple.com>
2337
2338         Deferring layer flushes can cause painting without layout being done
2339         https://bugs.webkit.org/show_bug.cgi?id=118493
2340
2341         Reviewed by Simon Fraser.
2342
2343         r147797 added a mechanism for the TileController to inform RenderLayerCompositor
2344         that it had performed an action (setNeedsDisplay, etc.) that would cause CoreAnimation
2345         to call back into us to paint in this runloop, and that it shouldn't throttle the next
2346         layer flush.
2347
2348         However, if tiles were created and left unparented (because the TileController was
2349         out-of-window), when they are later parented, we failed to inform RenderLayerCompositor
2350         that they were about to call back for painting, and so it would happily throttle the
2351         next layer flush, and layout would be out of date, and garbage and corruption could result.
2352
2353         To resolve this, rework the logic surrounding parenting existing-but-unparented tiles
2354         to ensure that they get added to the TileController's dirtyRect.
2355
2356         No new tests; the bug only reproduces under specific timing circumstances, and
2357         manifests itself as an assertion failure or garbage on the screen, so it's quite
2358         hard to make a workable test.
2359
2360         * platform/graphics/ca/mac/TileController.mm:
2361         (WebCore::TileController::revalidateTiles):
2362         - Factor out the code to parent unparented tiles so that it is shared between the
2363             created-new-tile and reparenting-existing-tile cases.
2364         - Keep track of whether we updated the frame of a pre-existing tile.
2365         - If the tile is dirty and needed to be parented (because either it's new
2366             or hadn't been parented before), add it to the dirty rect list.
2367         - If the tile changed size, add it to the dirty rect list.
2368
2369         (WebCore::TileController::ensureTilesForRect):
2370         Ditto everything from revalidateTiles.
2371
2372         (WebCore::TileController::createTileLayer):
2373         - Explicitly mark fresh tiles as needing display, so that we can depend on
2374             [WebTileLayer needsDisplay] in revalidateTiles to tell us that it's dirty.
2375
2376 2013-07-10  Eric Carlson  <eric.carlson@apple.com>
2377
2378         [Mac] every enabled text track should be listed in the track menu
2379         https://bugs.webkit.org/show_bug.cgi?id=118477
2380
2381         Reviewed by Jer Noble.
2382
2383         Test: media/video-controls-captions-trackmenu-includes-enabled-track.html
2384
2385         * html/shadow/MediaControlElements.cpp:
2386         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Don't select the
2387             "Off" menu item if a track is enabled.
2388
2389         * page/CaptionUserPreferencesMediaAF.cpp:
2390         (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Always include a track
2391             that is showing in the menu. Add more diagnostic logging.
2392
2393 2013-07-10  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2394
2395         Remove ElementTimeControl and expose SVGAnimationElement
2396         https://bugs.webkit.org/show_bug.cgi?id=118349
2397
2398         Reviewed by Rob Buis.
2399
2400         Remove ElementTimeControl IDL interface and move its attributes
2401         to the SVGAnimationElement IDL interface as per the latest SVG2
2402         specification:
2403         https://svgwg.org/svg2-draft/animate.html#InterfaceSVGAnimationElement
2404
2405         Also remove [NoInterfaceObject] IDL extended attribute from
2406         SVGAnimationElement as it is not present in the specification.
2407
2408         This is one step towards removing IDL multiple inheritance in SVG and
2409         complying with the latest SVG2 specification.
2410
2411         No new tests, covered by existing test cases.
2412
2413         * DerivedSources.make:
2414         * GNUmakefile.list.am:
2415         * WebCore.vcxproj/WebCore.vcxproj:
2416         * WebCore.vcxproj/WebCore.vcxproj.filters:
2417         * WebCore.xcodeproj/project.pbxproj:
2418         * bindings/scripts/CodeGeneratorObjC.pm:
2419         * svg/ElementTimeControl.h: Removed.
2420         * svg/ElementTimeControl.idl: Removed.
2421         * svg/SVGAnimationElement.h:
2422         * svg/SVGAnimationElement.idl:
2423
2424 2013-07-10  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2425
2426         Web Inspector: "Always enable" profiling does not work
2427         https://bugs.webkit.org/show_bug.cgi?id=118487
2428
2429         Enable profiler when loading panel if profiler is enabled in inspector
2430         settings.
2431
2432         Reviewed by Timothy Hatcher.
2433
2434         * inspector/front-end/ProfilesPanel.js:
2435
2436 2013-07-09  Roger Fong  <roger_fong@apple.com>
2437
2438         HTMLPluginElement's state should be Playing before firing mouse click event.
2439         https://bugs.webkit.org/show_bug.cgi?id=118398.
2440         <rdar://problem/14262126>
2441
2442         Reviewed by Dean Jackson.
2443
2444         Test: plugins/snapshotting/plugin-receives-click-event.html
2445
2446         * html/HTMLPlugInImageElement.cpp:
2447         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
2448         The defaultEventHandler returns early if the state is not Playing.
2449         This is because we only want the plugin to deal with user interaction normally if the
2450         plugin is actually enabled (not being snapshotted).
2451         When we click on the snapshotted plugin to start it, we mimic what would happen to the plugin
2452         normally by dispatching another click event on top of where we just clicked.
2453         However, we were sending the click event before setting the state to Playing which meant that our
2454         simulated click was not being handled. 
2455         We should be setting this state before sending the click, not after.
2456
2457 2013-07-10  Nick Diego Yamane  <nick.yamane@openbossa.org>
2458
2459         Fix a bug in MediaStreamDescriptor::removeVideoComponent
2460         https://bugs.webkit.org/show_bug.cgi?id=118446
2461
2462         Reviewed by Eric Carlson.
2463
2464         MediaStreamDescriptor::removeVideoComponent is currently trying to
2465         remove the 'videoComponent' from the wrong vector.
2466
2467         * platform/mediastream/MediaStreamDescriptor.h:
2468         (WebCore::MediaStreamDescriptor::removeVideoComponent):
2469
2470 2013-07-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2471
2472         AX: Allow requesting the full plain text for an object with textUnderElement()
2473         https://bugs.webkit.org/show_bug.cgi?id=105214
2474
2475         Reviewed by Chris Fleizach.
2476
2477         Allow specifying different function modes for textUnderElement(),
2478         so we can effectively ask for the "normal" result (e.g to retrieve
2479         test to be exposed as the 'title') or for the full text under the
2480         element (without omitting any child in the subtree). This is
2481         needed for the implementation of atk_text_get_text() in GTK/EFL.
2482
2483         * accessibility/AccessibilityObject.h: Add new enumeration to
2484         specify the different modes for textUnderElement().
2485         (WebCore::AccessibilityObject::textUnderElement): Added parameter.
2486
2487         * accessibility/AccessibilityNodeObject.cpp:
2488         (WebCore::shouldUseAccessiblityObjectInnerText): Always return
2489         'true' when using the "include all children" mode.
2490         (WebCore::AccessibilityNodeObject::textUnderElement): Updated call
2491         to shouldUseAccessiblityObjectInnerText().
2492         * accessibility/AccessibilityNodeObject.h:
2493
2494         * accessibility/AccessibilityRenderObject.cpp:
2495         (WebCore::AccessibilityRenderObject::textUnderElement): Removed
2496         GTK specific code and expand the usage of text iterators beyond
2497         text render objects, using it also when in the "include all
2498         children" mode.
2499         * accessibility/AccessibilityRenderObject.h:
2500
2501         * accessibility/atk/AccessibilityObjectAtk.cpp:
2502         (WebCore::AccessibilityObject::getLengthForTextRange): Updated
2503         call to textUnderElement(), preserving the previous behavior.
2504
2505         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2506         (webkitAccessibleTextGetText): Updated call to textUnderElement(),
2507         using the "include all children" mode.
2508
2509 2013-07-10  Sergio Correia  <sergio.correia@openbossa.org>
2510
2511         Remove the meshType from CoordinatedCustomFilterOperation
2512         https://bugs.webkit.org/show_bug.cgi?id=118529
2513
2514         Reviewed by Noam Rosenthal.
2515
2516         Following the removal of the meshType from CustomFilterOperation in r149153,
2517         remove also the meshType from CoordinatedCustomFilterOperation.
2518
2519         No new tests, no new functionality.
2520
2521         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
2522         (WebCore::CoordinatedCustomFilterOperation::create): Remove unused meshType parameter.
2523         (WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation): Ditto.
2524  Ditto.
2525 2013-07-10  James Craig  <james@cookiecrook.com>
2526
2527         AX: AccessibilityNodeObject::supportsRequiredAttribute() should switch on CellRole
2528         https://bugs.webkit.org/show_bug.cgi?id=117817
2529
2530         Reviewed by Chris Fleizach.
2531
2532         CellRole supports the required attribute now for accessibility, according to ARIA spec. 
2533         Updated existing test coverage.
2534
2535         * accessibility/AccessibilityNodeObject.cpp:
2536         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
2537
2538 2013-07-10  Csaba Osztrogonác  <ossy@webkit.org>
2539
2540         REGRESSION(r151957): WebGL textures do not show
2541         https://bugs.webkit.org/show_bug.cgi?id=118464
2542
2543         Reviewed by Christophe Dumez.
2544
2545         After r151957 decoder.frameIsCompleteAtIndex(0) doesn't trigger image decoding,
2546         we have to call decoder.createFrameAtIndex(0) explicitly to ensure it.
2547
2548         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2549         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2550         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2551         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2552
2553 2013-07-10  Karol Świniarski  <k.swiniarsk2@samsung.com>
2554
2555         Change recently ratified extensions prefixes from WEBKIT_WEBGL_ to WEBGL_
2556         https://bugs.webkit.org/show_bug.cgi?id=117786
2557
2558         Reviewed by Dean Jackson.
2559
2560         According to WebGL's revision 10, extensions should be named: WEBGL_lose_context,
2561         WEBGL_depth_texture, WEBGL_compressed_texture_s3tc.
2562
2563         No new tests. Covered by existing tests:
2564         LayoutTests/webgl/conformance/extensions/get-extension.html
2565         LayoutTests/webgl/conformance/context/context-lost.html
2566         LayoutTests/webgl/conformance/extensions/webgl-depth-texture.html
2567         LayoutTests/webgl/conformance/extensions/webgl-compressed-texture-s3tc.html
2568
2569         * html/canvas/WebGLRenderingContext.cpp:
2570         (WebCore::WebGLRenderingContext::getExtension):
2571         (WebCore::WebGLRenderingContext::getSupportedExtensions):
2572
2573 2013-07-09  Byungwoo Lee  <bw80.lee@samsung.com>
2574
2575         Unreviewed build fix.
2576
2577         * svg/SVGImageElement.cpp:
2578         (WebCore::SVGImageElement::SVGImageElement):
2579
2580 2013-07-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2581
2582         Introduce isSVGFontElement() and isSVGImageElement(), use them
2583         https://bugs.webkit.org/show_bug.cgi?id=118504
2584
2585         Reviewed by Benjamin Poulain.
2586
2587         Let's use isFoo() to enhance readibility in svg element classes along with html's.
2588
2589         No new tests, there is no behavior changes.
2590
2591         * loader/cache/CachedFont.cpp:
2592         (WebCore::CachedFont::getSVGFontById):
2593         * rendering/HitTestResult.cpp:
2594         (WebCore::HitTestResult::absoluteImageURL):
2595         * svg/SVGAnimateMotionElement.cpp:
2596         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
2597         * svg/SVGElement.cpp:
2598         (WebCore::SVGElement::viewportElement):
2599         * svg/SVGFontElement.cpp:
2600         (WebCore::SVGFontElement::SVGFontElement):
2601         * svg/SVGFontElement.h:
2602         (WebCore::toSVGFontElement):
2603         (WebCore::isSVGFontElement):
2604         * svg/SVGFontFaceElement.cpp:
2605         (WebCore::SVGFontFaceElement::associatedFontElement):
2606         (WebCore::SVGFontFaceElement::rebuildFontFace):
2607         * svg/SVGGlyphElement.cpp:
2608         (WebCore::SVGGlyphElement::invalidateGlyphCache):
2609         * svg/SVGHKernElement.cpp:
2610         (WebCore::SVGHKernElement::insertedInto):
2611         (WebCore::SVGHKernElement::removedFrom):
2612         * svg/SVGImageElement.cpp:
2613         (WebCore::SVGImageElement::SVGImageElement):
2614         * svg/SVGImageElement.h:
2615         (WebCore::toSVGImageElement):
2616         (WebCore::isSVGImageElement):
2617         * svg/SVGLocatable.cpp:
2618         (WebCore::isViewportElement):
2619         * svg/SVGVKernElement.cpp:
2620         (WebCore::SVGVKernElement::insertedInto):
2621         (WebCore::SVGVKernElement::removedFrom):
2622
2623 2013-07-09  Ryuan Choi  <ryuan.choi@samsung.com>
2624
2625         [EFL] Add ewk_view_device_pixel_ratio_set
2626         https://bugs.webkit.org/show_bug.cgi?id=118521
2627
2628         Reviewed by Gyuyoung Kim.
2629
2630         No new tests, covered by existing tests.
2631
2632         * dom/ViewportArguments.cpp: Remove PLATFORM(EFL) not to use deprecatedTargetDPI
2633         * dom/ViewportArguments.h: Ditto.
2634         * platform/efl/EflScreenUtilities.cpp: Removed getDPI() which is not used anymore.
2635         * platform/efl/EflScreenUtilities.h: Ditto.
2636
2637 2013-07-09  James Craig  <james@cookiecrook.com>
2638
2639         @readonly and @aria-readonly="false" are not exposed correctly to accessibility
2640         https://bugs.webkit.org/show_bug.cgi?id=118475
2641
2642         Reviewed by Chris Fleizach.
2643
2644         Account for implicit and explicit @readonly/@aria-readonly mismatches. Updated existing test coverage.
2645
2646         * accessibility/AccessibilityRenderObject.cpp:
2647         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
2648
2649 2013-07-09  Jer Noble  <jer.noble@apple.com>
2650
2651         Reviewed by Simon Fraser.
2652
2653         Remember the scroll position and restore after exiting full-screen mode.
2654         https://bugs.webkit.org/show_bug.cgi?id=61956
2655
2656         No new tests, adds a client callback used by WebKit and WebKit2 win.
2657
2658         * platform/graphics/win/FullScreenController.cpp:
2659         (FullScreenController::enterFullScreen):
2660         (FullScreenController::exitFullScreen):
2661         * platform/graphics/win/FullScreenControllerClient.h:
2662
2663 2013-07-09  Jeff Miller  <jeffm@apple.com>
2664
2665         AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate in WebCore::mac()
2666         https://bugs.webkit.org/show_bug.cgi?id=118518
2667
2668         Reviewed by Alexey Proskuryakov.
2669
2670         * platform/network/mac/AuthenticationMac.mm:
2671         (WebCore::mac):
2672         Map ProtectionSpaceAuthenticationSchemeNegotiate to NSURLAuthenticationMethodNegotiate.
2673
2674 2013-07-09  Jeff Miller  <jeffm@apple.com>
2675
2676         AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate
2677         https://bugs.webkit.org/show_bug.cgi?id=118517
2678
2679         Reviewed by Brady Eidson.
2680
2681         * platform/network/mac/AuthenticationMac.mm:
2682         (WebCore::core):
2683         Map "NSURLAuthenticationMethodNegotiate" to ProtectionSpaceAuthenticationSchemeNegotiate.
2684
2685 2013-07-09  peavo@outlook.com  <peavo@outlook.com>
2686
2687         [Windows] Compile fix.
2688         https://bugs.webkit.org/show_bug.cgi?id=106558
2689
2690         Reviewed by Brent Fulgham.
2691
2692         On Windows, dispatch.h needs to be included before certain CFNetwork headers.
2693
2694         * WebCorePrefix.h: Include dispatch.h.
2695
2696 2013-07-09  Mark Lam  <mark.lam@apple.com>
2697
2698         Fix 30% JSBench regression (caused by adding column numbers to stack traces).
2699         https://bugs.webkit.org/show_bug.cgi?id=118481.
2700
2701         Reviewed by Mark Hahnenberg and Geoffrey Garen.
2702
2703         Test: fast/js/line-column-numbers.html
2704
2705         Updated the bindings to use StackFrame::computeLineAndColumn(). The old
2706         StackFrame::line() and StackFrame::column() has been removed. The new
2707         algorithm always computes the 2 values together anyway. Hence it is more
2708         efficient to return them as a pair instead of doing the same computation
2709         twice for each half of the result.
2710
2711         * bindings/js/ScriptCallStackFactory.cpp:
2712         (WebCore::createScriptCallStack):
2713         (WebCore::createScriptCallStackFromException):
2714         * bindings/js/ScriptSourceCode.h:
2715         (WebCore::ScriptSourceCode::ScriptSourceCode):
2716
2717 2013-07-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2718
2719         Use toSVGFontElement() instead of static_cast<SVGFontElement*>
2720         https://bugs.webkit.org/show_bug.cgi?id=118496
2721
2722         Reviewed by Andreas Kling.
2723
2724         As a step to change static_cast with toXXX, static_cast<SVGFontElement*> can
2725         be changed with toSVGFontElement().
2726
2727         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153761
2728
2729         * svg/SVGFontElement.h:
2730         (WebCore::toSVGFontElement):
2731         * svg/SVGFontFaceElement.cpp:
2732         (WebCore::SVGFontFaceElement::rebuildFontFace):
2733         * svg/SVGGlyphElement.cpp:
2734         (WebCore::SVGGlyphElement::invalidateGlyphCache):
2735         * svg/SVGHKernElement.cpp:
2736         (WebCore::SVGHKernElement::insertedInto):
2737         (WebCore::SVGHKernElement::removedFrom):
2738         * svg/SVGVKernElement.cpp:
2739         (WebCore::SVGVKernElement::insertedInto):
2740         (WebCore::SVGVKernElement::removedFrom):
2741
2742 2013-07-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2743
2744         Remove support for [PassThisToCallback] extended attribute
2745         https://bugs.webkit.org/show_bug.cgi?id=118391
2746
2747         Reviewed by Kentaro Hara.
2748
2749         The [PassThisToCallback] Webkit-specific IDL extended attribute is supported
2750         by the JSC bindings generator but is no longer used. The attribute is not
2751         even documented.
2752
2753         We can therefore drop support for this from the generator to simplify the
2754         code.
2755
2756         No new tests, no behavior change.
2757
2758         * bindings/scripts/CodeGeneratorJS.pm:
2759         (GenerateCallbackImplementation):
2760         * bindings/scripts/IDLAttributes.txt:
2761         * bindings/scripts/test/JS/JSTestCallback.cpp:
2762         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2763         * bindings/scripts/test/TestCallback.idl:
2764
2765 2013-07-09  Praveen R Jadhav  <praveen.j@samsung.com>
2766
2767         Update Exception handling in WebAudio.
2768         https://bugs.webkit.org/show_bug.cgi?id=118405.
2769
2770         Reviewed by Chris Rogers.
2771
2772         AudioBufferSourceNode, OscillatorNode and AnalyserNode don't
2773         propagate exception mentioned in WebAudio spec.
2774         Code updated to throw DOM exception as expected.
2775
2776         Tests: webaudio/analyser-exception.html
2777                webaudio/audiobuffersource-exception.html
2778
2779         * Modules/webaudio/AnalyserNode.cpp:
2780         (WebCore::AnalyserNode::setFftSize):
2781         (WebCore::AnalyserNode::setMinDecibels):
2782         (WebCore::AnalyserNode::setMaxDecibels):
2783         (WebCore::AnalyserNode::setSmoothingTimeConstant):
2784         * Modules/webaudio/AnalyserNode.h:
2785         * Modules/webaudio/AnalyserNode.idl:
2786         * Modules/webaudio/AudioBufferSourceNode.cpp:
2787         (WebCore::AudioBufferSourceNode::startGrain):
2788         (WebCore::AudioBufferSourceNode::noteGrainOn):
2789         * Modules/webaudio/AudioBufferSourceNode.h:
2790         * Modules/webaudio/AudioBufferSourceNode.idl:
2791         * Modules/webaudio/AudioContext.cpp:
2792         (WebCore::AudioContext::createBuffer):
2793         (WebCore::AudioContext::createScriptProcessor):
2794         (WebCore::AudioContext::createPeriodicWave):
2795         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2796         (WebCore::AudioScheduledSourceNode::start):
2797         (WebCore::AudioScheduledSourceNode::stop):
2798         (WebCore::AudioScheduledSourceNode::noteOn):
2799         (WebCore::AudioScheduledSourceNode::noteOff):
2800         * Modules/webaudio/AudioScheduledSourceNode.h:
2801         * Modules/webaudio/OscillatorNode.idl:
2802
2803 2013-07-08  Martin Robinson  <mrobinson@igalia.com>
2804
2805         [CSS Grid Layout] Rename grid-{rows|columns} to grid-definition-{rows|columns}
2806         https://bugs.webkit.org/show_bug.cgi?id=103336
2807
2808         Reviewed by Tony Chang.
2809
2810         Rename -webkit-grid-{rows|columns} to -webkit-grid-definition-{rows|columns}.
2811         The latest version of the spec has renamed these properties.
2812
2813         * css/CSSComputedStyleDeclaration.cpp:
2814         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle the new names.
2815         * css/CSSParser.cpp:
2816         (WebCore::CSSParser::parseValue): Ditto.
2817         * css/CSSProperty.cpp:
2818         (WebCore::CSSProperty::isInheritedProperty): Ditto.
2819         * css/CSSPropertyNames.in: Add support for the new names.
2820         * css/StyleResolver.cpp:
2821         (WebCore::StyleResolver::applyProperty): Handle the new names.
2822
2823 2013-07-08  Enrica Casucci  <enrica@apple.com>
2824
2825         DeleteSelectionCommand does not handle correctly deletion with two consecutive BR element.
2826         https://bugs.webkit.org/show_bug.cgi?id=118457
2827         <rdar://problem/14160912>
2828
2829         Reviewed by Simon Fraser.
2830
2831         In DeleteSelectionCommand::handleSpecialCareBRDelete we did not
2832         handle correctly the case where we had <br><br> in the markup and
2833         nothing was being deleted. We should consider this like
2834         the case where the <br> is on the line by itself and remove it.
2835
2836         Test: editing/deleting/delete-image-followed-by-two-br.html
2837
2838         * editing/DeleteSelectionCommand.cpp:
2839         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
2840
2841 2013-07-08  Radu Stavila  <stavila@adobe.com>
2842
2843         NamedFlowCollection getters should return undefined when there's no NamedFlow
2844         https://bugs.webkit.org/show_bug.cgi?id=118463
2845
2846         Reviewed by Christophe Dumez.
2847
2848         Added new TreatReturnedNullObjectAs attribute for generated methods and set it to Undefined
2849         for the item and namedItem methods of DOMNamedFlowCollection.
2850
2851         Test: fast/regions/webkit-named-flow-collection-undefined.html
2852
2853         * bindings/scripts/CodeGeneratorJS.pm:
2854         (GenerateImplementationFunctionCall):
2855         * bindings/scripts/IDLAttributes.txt:
2856         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
2857         (WebDOMTestObj::treatReturnedNullObjectAsUndefined):
2858         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2859         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2860         (webkit_dom_test_obj_treat_returned_null_object_as_undefined):
2861         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2862         * bindings/scripts/test/JS/JSTestObj.cpp:
2863         (WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
2864         * bindings/scripts/test/JS/JSTestObj.h:
2865         * bindings/scripts/test/ObjC/DOMTestObj.h:
2866         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2867         (-[DOMTestObj treatReturnedNullObjectAsUndefined]):
2868         * bindings/scripts/test/TestObj.idl:
2869         * dom/DOMNamedFlowCollection.idl:
2870
2871 2013-07-06 Changhun Kang <temoochin@company100.net>
2872
2873         Remove unused variables in FocusCandidate.
2874         https://bugs.webkit.org/show_bug.cgi?id=118449
2875
2876         Reviewed by Antonio Gomes.
2877
2878         The variables for parent in FocusCandidate are not used anymore.
2879
2880         No new tests. No change in behavior.
2881
2882         * page/SpatialNavigation.cpp:
2883         (WebCore::FocusCandidate::FocusCandidate):
2884         * page/SpatialNavigation.h:
2885         (WebCore::FocusCandidate::FocusCandidate):
2886
2887 2013-07-08  Chris Fleizach  <cfleizach@apple.com>
2888
2889         AX: iOS: SVG paths are not offset by the parent bounding box
2890         https://bugs.webkit.org/show_bug.cgi?id=118433
2891
2892         The path for SVG shapes is in terms of its parent's view space. We need to offset
2893         the path by that amount so that it's in the right location.
2894
2895         Reviewed by Tim Horton.
2896
2897         * accessibility/AccessibilityRenderObject.cpp:
2898         (WebCore::AccessibilityRenderObject::elementPath):
2899
2900 2013-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2901
2902         Unreviewed. Fix make distcheck.
2903
2904         * GNUmakefile.list.am: Add missing header files.
2905
2906 2013-07-08  Ruth Fong  <ruth_fong@apple.com>
2907
2908         Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
2909         https://bugs.webkit.org/show_bug.cgi?id=117815
2910         <rdar://problem/14211041>
2911
2912         Reviewed by Eric Carlson.
2913
2914         Merge https://src.chromium.org/viewvc/blink?revision=153206&view=revision
2915         
2916         No new tests, only behavior change is preventing a crash in the release build.
2917         cueIndex() is only used for sorting cues, so returning an invalidCueIndex in the case
2918         where track()->cues() is null makes sense and won't modify behavior.
2919
2920         * html/track/TextTrackCue.cpp:
2921         (WebCore::TextTrackCue::cueIndex):
2922
2923 2013-07-08  Commit Queue  <commit-queue@webkit.org>
2924
2925         Unreviewed, rolling out r152416.
2926         http://trac.webkit.org/changeset/152416
2927         https://bugs.webkit.org/show_bug.cgi?id=118476
2928
2929         Wrong fix for the bug (Requested by ap on #webkit).
2930
2931         * platform/text/TextEncodingRegistry.cpp:
2932         (WebCore::newTextCodec):
2933
2934 2013-07-08  Andreas Kling  <akling@apple.com>
2935
2936         REGRESSION(r125294): A style rule with more than 8192 selectors can cause style corruption.
2937         <http://webkit.org/b/118369>
2938         <rdar://problem/14291428>
2939
2940         Reviewed by Antti Koivisto.
2941
2942         Add a semi-hard cap of 8192 selectors per CSS rule. Rules with longer selector lists will be split into
2943         multiple rules (with 8192 selectors per rule.) The style properties are shared behind the scenes
2944         so it's all pretty efficient.
2945
2946         This does generate a different CSSOM for gigantic selector lists, I've added a test to document this.
2947         Note that setting CSSStyleRule.selectorText with over 8192 selectors will now fail, the splitting into
2948         multiple rules only happens when parsing full style sheets.
2949
2950         Test: fast/css/rule-selector-overflow.html
2951
2952         * css/CSSSelectorList.cpp:
2953         (WebCore::CSSSelectorList::selectorCount):
2954
2955             Add a helper to count the number of selectors in a list (not the number of raw selector components.)
2956
2957         * css/RuleSet.h:
2958         * css/CSSStyleRule.cpp:
2959         (WebCore::CSSStyleRule::setSelectorText):
2960
2961             Add RuleData::maximumSelectorCount constant and cap CSSStyleRule.selectorText to that many selectors.
2962
2963         * css/CSSSelectorList.h:
2964         (WebCore::CSSSelectorList::adoptSelectorArray):
2965         * css/StyleRule.cpp:
2966         (WebCore::StyleRule::create):
2967         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorCount):
2968         * css/StyleRule.h:
2969         (WebCore::StyleRule::parserAdoptSelectorArray):
2970         * css/StyleSheetContents.cpp:
2971         (WebCore::StyleSheetContents::parserAppendRule):
2972
2973             The meat of this change. Split rules with >8K selectors into multiple rules with 8K selectors in each.
2974
2975         * css/StyleRule.h:
2976         (WebCore::toStyleRule):
2977
2978             Added a toStyleRule() helper for good measure.
2979
2980 2013-07-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2981
2982         Introduce DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER() macro
2983         https://bugs.webkit.org/show_bug.cgi?id=118408
2984
2985         Reviewed by Philip Rogers.
2986
2987         Split DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER() macro into separate
2988         DECLARE and DEFINE macros to reduce the number of header includes in
2989         SVG.
2990
2991         No new tests, no behavior change.
2992
2993         * dom/EventTarget.h:
2994         * svg/SVGElementInstance.cpp:
2995         (WebCore::SVGElementInstance::create):
2996         (WebCore::SVGElementInstance::toNode):
2997         (WebCore::SVGElementInstance::ownerDocument):
2998         * svg/SVGElementInstance.h:
2999
3000 2013-07-08  Jae Hyun Park  <jae.park@company100.net>
3001
3002         [Coordinated Graphics] Rename variables in UpdateAtlas
3003         https://bugs.webkit.org/show_bug.cgi?id=118403
3004
3005         Reviewed by Noam Rosenthal.
3006
3007         As of r149292, non-composited contents layer was removed from
3008         CoordinatedGraphics. So, the variables should be renamed for
3009         clarification.
3010
3011         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
3012         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
3013
3014 2013-07-08  Ádám Kallai  <kadam@inf.u-szeged.hu>
3015
3016         [Qt] Incremental build fix after r145712.
3017         https://bugs.webkit.org/show_bug.cgi?id=112576.
3018
3019         Reviewed by Jocelyn Turcotte.
3020
3021         * DerivedSources.pri: Added dependence to INSPECTOR_JSON.
3022         * inspector/front-end/WebKit.qrc: Added missing JS file.
3023
3024 2013-07-08  Kihong Kwon  <kihong.kwon@samsung.com>
3025
3026         vibrate function have to return boolean value.
3027         https://bugs.webkit.org/show_bug.cgi?id=118288
3028
3029         Reviewed by Gyuyoung Kim.
3030
3031         According to latest Vibration API which is LC, vibrate() needs to return boolean value
3032         and exception code is removed also. In addition, remove condition for canceling vibration
3033         can be called when visibility state is hidden.
3034         http://www.w3.org/TR/vibration/
3035
3036         No new tests. vibration/navigator-vibration.html is changed.
3037
3038         * Modules/vibration/NavigatorVibration.cpp:
3039         (WebCore::NavigatorVibration::vibrate):
3040         * Modules/vibration/NavigatorVibration.h:
3041         * Modules/vibration/NavigatorVibration.idl:
3042         * Modules/vibration/Vibration.cpp:
3043         (WebCore::Vibration::vibrate):
3044         * Modules/vibration/Vibration.h:
3045
3046 2013-07-07  Kangil Han  <kangil.han@samsung.com>
3047
3048         Adopt is/toHTMLTableElement for code cleanup
3049         https://bugs.webkit.org/show_bug.cgi?id=118393
3050
3051         Reviewed by Andreas Kling.
3052
3053         To enhance readability, this patch adopts is/toHTMLTableElement.
3054         This also helps out to reduce duplicated use of static_cast.
3055
3056         * accessibility/AccessibilityRenderObject.cpp:
3057         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3058         * accessibility/AccessibilityTable.cpp:
3059         (WebCore::AccessibilityTable::isDataTable):
3060         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
3061         (WebCore::AccessibilityTable::title):
3062         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
3063         (webkitAccessibleTableGetCaption):
3064         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3065         (webkitAccessibleGetDescription):
3066         * css/StyleResolver.cpp:
3067         (WebCore::StyleResolver::adjustRenderStyle):
3068         * dom/Position.cpp:
3069         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
3070         * editing/DeleteSelectionCommand.cpp:
3071         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3072         * editing/InsertLineBreakCommand.cpp:
3073         (WebCore::InsertLineBreakCommand::doApply):
3074         * editing/htmlediting.cpp:
3075         (WebCore::isNonTableCellHTMLBlockElement):
3076         * editing/markup.cpp:
3077         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
3078         * html/FTPDirectoryDocument.cpp:
3079         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3080         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
3081         * html/HTMLFormElement.cpp:
3082         (WebCore::HTMLFormElement::rendererIsNeeded):
3083         * html/HTMLTableElement.h:
3084         (WebCore::isHTMLTableElement):
3085         (WebCore::toHTMLTableElement):
3086         * html/HTMLTablePartElement.cpp:
3087         (WebCore::HTMLTablePartElement::findParentTable):
3088         * html/HTMLTableRowElement.cpp:
3089         (WebCore::HTMLTableRowElement::rowIndex):
3090         * html/HTMLTableRowsCollection.cpp:
3091         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
3092         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
3093         * html/parser/HTMLElementStack.cpp:
3094         (WebCore::HTMLNames::isScopeMarker):
3095         (WebCore::HTMLNames::isTableScopeMarker):
3096         * html/parser/HTMLTreeBuilder.cpp:
3097         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
3098         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
3099         * platform/mac/HTMLConverter.mm:
3100         (-[WebHTMLConverter _computedStringForNode:property:]):
3101         * rendering/RenderObject.cpp:
3102         (WebCore::RenderObject::offsetParent):
3103         * rendering/RenderTable.cpp:
3104         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
3105         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3106
3107 2013-07-06  Rob Buis  <rbuis@rim.com>
3108
3109         createElement("image") creates an HTMLImageElement, although this hack should exist in parser only
3110         https://bugs.webkit.org/show_bug.cgi?id=88360
3111
3112         Reviewed by Sam Weinig.
3113
3114         Create a HTMLElement when using createElement('image'), but keep the HTML5 parser constructing HTMLImageelement for it.
3115
3116         * html/HTMLTagNames.in:
3117
3118 2013-07-06  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3119
3120         Stop hardcoding interfaces that have indexed getters returning strings
3121         https://bugs.webkit.org/show_bug.cgi?id=118414
3122
3123         Reviewed by Kentaro Hara.
3124
3125         Stop hardcoding the names of interfaces that have indexed getters returning
3126         strings in the bindings generator. Now that we use the latest Web IDL indexed
3127         getter, more information is provided in the IDL files and the generator is
3128         able to figure out if the indexed getter is returning a DOMString on its own.
3129
3130         No new tests, no behavior change.
3131
3132         * bindings/scripts/CodeGeneratorJS.pm:
3133         (GenerateGetOwnPropertySlotBody):
3134         (GenerateImplementation):
3135
3136 2013-07-05  Tim Horton  <timothy_horton@apple.com>
3137
3138         Tons of crashes on bots after r152425
3139         https://bugs.webkit.org/show_bug.cgi?id=118440
3140         <rdar://problem/14366772>
3141
3142         Reviewed by Sam Weinig.
3143
3144         Null-check the frame's page and early return. It's OK to do this
3145         because it only happens when we're being torn down.
3146
3147         * page/FrameView.cpp:
3148         (WebCore::FrameView::minimumScrollPosition):
3149         (WebCore::FrameView::maximumScrollPosition):
3150
3151 2013-07-05  Tim Horton  <timothy_horton@apple.com>
3152
3153         Fix r152265: FrameView's pagination mode is only one of two, and the logic was totally wrong
3154         https://bugs.webkit.org/show_bug.cgi?id=118439
3155         <rdar://problem/14366120>
3156
3157         Reviewed by Anders Carlsson.
3158
3159         * page/FrameView.cpp:
3160         (WebCore::FrameView::maximumScrollPosition):
3161         - Test both Page and FrameView's pagination modes.
3162         - *Don't* clamp negatives to zero if we are paginated with scroll offset set,
3163             like the original changelog claimed, but the code did the opposite.
3164         - Don't clamp in *all* pagination modes; with 'direction: RTL' it's still possible
3165             to have a negative maximum position in LTR/TB pagination modes.
3166
3167 2013-07-05  Sam Weinig  <sam@webkit.org>
3168
3169         WKPageFindStringMatches with kWKFindOptionsBackwards still doesn't work
3170         <rdar://problem/13881024>
3171         https://bugs.webkit.org/show_bug.cgi?id=118436
3172
3173         Reviewed by Tim Horton.
3174
3175         * page/Page.cpp:
3176         (WebCore::Page::findStringMatchingRanges):
3177         - When searching backwards, use END_TO_START rather than START_TO_END.
3178         - If there is no selection and we are searching backwards, we now select the last item,
3179           not the first.
3180
3181 2013-07-05  Tullio Lucena  <tullio.lucena@openbossa.org>
3182
3183         Nix upstreaming - Adding Nix render theme files
3184         https://bugs.webkit.org/show_bug.cgi?id=118368
3185
3186         Reviewed by Benjamin Poulain.
3187
3188         All files related to render theme stuff.
3189
3190         No new tests. They will be uploaded on another patch during the upstreaming process.
3191
3192         * platform/nix/RenderThemeNix.cpp: Added.
3193         * platform/nix/RenderThemeNix.h: Added.
3194         * platform/nix/ScrollbarThemeNix.cpp: Added.
3195         * platform/nix/ScrollbarThemeNix.h: Added.
3196
3197 2013-07-05  Brent Fulgham  <bfulgham@apple.com>
3198
3199         [Windows] Identify OS-level at build-time.
3200         https://bugs.webkit.org/show_bug.cgi?id=118428
3201
3202         Reviewed by Anders Carlsson.
3203
3204         * DerivedSources.make: Activate legible output features if present.
3205         * WebCorePrefix.h: Activate MSVC 2010 workarounds for CGFloat if
3206         building with VS2010.
3207         * config.h: Activate legible output features if present.
3208
3209 2013-07-05  Tim Horton  <timothy_horton@apple.com>
3210
3211         [wk2] Add API to lock the scroll position at the top or bottom of the page
3212         https://bugs.webkit.org/show_bug.cgi?id=118429
3213         <rdar://problem/14120323>
3214
3215         Reviewed by Anders Carlsson.
3216
3217         Test (API): WebKit2.ScrollPinningBehaviors
3218
3219         * WebCore.exp.in:
3220         Expose FrameView::setScrollPinningBehavior.
3221
3222         * page/FrameView.cpp:
3223         (WebCore::FrameView::FrameView):
3224         Our pinning behavior should be DoNotPin by default.
3225
3226         * page/FrameView.cpp:
3227         (WebCore::FrameView::minimumScrollPosition):
3228         (WebCore::FrameView::maximumScrollPosition):
3229         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3230         (WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
3231         (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
3232         Fix the minimum scroll position's vertical location to the maximum if
3233         we're pinned to the bottom, and vice-versa if we're pinned to the top.
3234
3235         (WebCore::FrameView::setScrollPinningBehavior): Added.
3236         If scroll pinning behavior has changed, inform ScrollingCoordinator
3237         and update scrollbars (which will also re-pin the scroll position).
3238
3239         * page/FrameView.h:
3240         Override minimumScrollPosition, add setScrollPinningBehavior,
3241         and storage for m_scrollPinningBehavior.
3242
3243         * page/scrolling/ScrollingCoordinator.h:
3244         (WebCore::ScrollingCoordinator::setScrollPinningBehavior): Added.
3245
3246         * page/scrolling/ScrollingTree.cpp:
3247         (WebCore::ScrollingTree::ScrollingTree):
3248         Our pinning behavior should be DoNotPin by default.
3249
3250         (WebCore::ScrollingTree::setScrollPinningBehavior):
3251         (WebCore::ScrollingTree::scrollPinningBehavior):
3252         Getter/setter for m_scrollPinningBehavior, scrolling-thread-safe.
3253
3254         * page/scrolling/ScrollingTree.h:
3255         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3256         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3257         (WebCore::ScrollingCoordinatorMac::setScrollPinningBehavior):
3258         Inform ScrollingTree of the scroll pinning behavior change.
3259         
3260         * platform/ScrollTypes.h:
3261         Add ScrollPinningBehavior enum.
3262
3263 2013-07-05  Zalan Bujtas  <zalan@apple.com>
3264
3265         iframe constrained by max-width in full screen
3266         https://bugs.webkit.org/show_bug.cgi?id=118250
3267
3268         Reviewed by Antti Koivisto.
3269
3270         Ensure that contents inside iframe can go full screen properly.
3271
3272         Set max-width and max-height values to the default 'none', so that iframes are not
3273         constrained when entering full screen.
3274
3275         Test: fullscreen/full-screen-iframe-with-max-width-height.html
3276
3277         * css/fullscreen.css:
3278         (iframe:-webkit-full-screen):
3279
3280 2013-07-05  Eric Carlson  <eric.carlson@apple.com>
3281
3282         [Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
3283         https://bugs.webkit.org/show_bug.cgi?id=118319
3284
3285         Reviewed by Jer Noble.
3286
3287         Track when captions are enabled with the old 'webkitClosedCaptionsVisible' attribute and
3288         consider that when determining which track should be enabled.
3289
3290         Test: media/track/track-legacyapi-with-automatic-mode.html
3291
3292         * html/HTMLMediaElement.cpp:
3293         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_webkitLegacyClosedCaptionOverride.
3294         (WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Set m_webkitLegacyClosedCaptionOverride.
3295         (WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Return m_webkitLegacyClosedCaptionOverride.
3296         * html/HTMLMediaElement.h:
3297
3298         * page/CaptionUserPreferencesMediaAF.cpp:
3299         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
3300             logic when captions were enabled with .webkitClosedCaptionsVisible.
3301
3302 2013-07-05  Benjamin Dupont   <bdupont@nds.com>
3303
3304         Segmentation fault occurred when ICU data library doesn't embed the expected encoding.
3305         https://bugs.webkit.org/show_bug.cgi?id=118410
3306
3307         Reviewed by Allan Sandfeld Jensen.
3308
3309         * platform/text/TextEncodingRegistry.cpp:
3310         (WebCore::newTextCodec):
3311
3312 2013-07-05  Denis Nomiyama  <d.nomiyama@samsung.com>
3313
3314         [GTK] fast/text/font-kerning.html fails
3315         https://bugs.webkit.org/show_bug.cgi?id=76048
3316
3317         Reviewed by Martin Robinson.
3318
3319         Added kerning to the list of features for hb_shade() according to FontDescription::kerning().
3320         Removed font-kerning.html from gtk/TestExpectations, which was failing before this fix.
3321
3322         * platform/graphics/harfbuzz/HarfBuzzFace.cpp:
3323         (WebCore):
3324         * platform/graphics/harfbuzz/HarfBuzzFace.h:
3325         (HarfBuzzFace):
3326         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3327         (WebCore::HarfBuzzShaper::setFontFeatures):
3328
3329 2013-07-05  Gwang Yoon Hwang  <ryumiel@company100.net>
3330
3331         Build fix GTK after r152404.
3332         https://bugs.webkit.org/show_bug.cgi?id=118407
3333
3334         Reviewed by Christophe Dumez.
3335
3336         * GNUmakefile.list.am:
3337
3338 2013-07-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3339
3340         Have SVGTextContentElement inherit SVGGraphicsElement
3341         https://bugs.webkit.org/show_bug.cgi?id=118351
3342
3343         Reviewed by Dirk Schulze.
3344
3345         Have SVGTextContentElement inherit SVGGraphicsElement instead of
3346         SVGStyledElement in order to match the latest SVG2 specification:
3347         https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextContentElement
3348
3349         This patch also removes the SVGTransformable and SVGLocatable IDL
3350         interfaces as they are no longer needed (were merged into
3351         SVGGraphicsElement in the latest specification).
3352
3353         This is one step towards getting rid of multiple inheritance in
3354         SVG, and complying with the latest SVG2 specification.
3355
3356         No new tests, covered by existing tests.
3357
3358         * DerivedSources.make:
3359         * WebCore.xcodeproj/project.pbxproj:
3360         * bindings/scripts/CodeGeneratorJS.pm:
3361         (GetGnuVTableOffsetForType):
3362         * bindings/scripts/CodeGeneratorObjC.pm:
3363         * svg/SVGAnimateMotionElement.cpp:
3364         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
3365         * svg/SVGElement.cpp:
3366         (WebCore::SVGElement::getBoundingBox):
3367         * svg/SVGLocatable.idl: Removed.
3368         * svg/SVGTextContentElement.cpp:
3369         (WebCore::SVGTextContentElement::SVGTextContentElement):
3370         (WebCore::SVGTextContentElement::isSupportedAttribute):
3371         (WebCore::SVGTextContentElement::isPresentationAttribute):
3372         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute):
3373         (WebCore::SVGTextContentElement::parseAttribute):
3374         (WebCore::SVGTextContentElement::svgAttributeChanged):
3375         * svg/SVGTextContentElement.h:
3376         * svg/SVGTextContentElement.idl:
3377         * svg/SVGTextElement.cpp:
3378         (WebCore::SVGTextElement::SVGTextElement):
3379         (WebCore::SVGTextElement::animatedLocalTransform):
3380         * svg/SVGTextElement.h:
3381         * svg/SVGTextElement.idl:
3382         * svg/SVGTransformable.idl: Removed.
3383
3384 2013-07-03  Gavin Barraclough  <barraclough@apple.com>
3385
3386         Remove PageThrottler::m_activeThrottleBlockers
3387         https://bugs.webkit.org/show_bug.cgi?id=118375
3388
3389         Reviewed by Mark Rowe.
3390
3391         This is simply m_activityTokens.size().
3392
3393         Also, fold preventThrottling into addActivityToken & allowThrottling into removeActivityToken
3394         (these should no longer be called directly, and should not be public).
3395
3396         * page/PageThrottler.cpp:
3397         (WebCore::PageThrottler::PageThrottler):
3398             - removed m_activeThrottleBlockers
3399         (WebCore::PageThrottler::startThrottleHysteresisTimer):
3400             - m_activeThrottleBlockers -> m_activityTokens.size()
3401         (WebCore::PageThrottler::throttleHysteresisTimerFired):
3402             - m_activeThrottleBlockers -> m_activityTokens.size()
3403         (WebCore::PageThrottler::addActivityToken):
3404             - added functionality from preventThrottling
3405         (WebCore::PageThrottler::removeActivityToken):
3406             - added functionality from allowThrottling
3407         * page/PageThrottler.h:
3408             - removed preventThrottling, allowThrottling, and m_activeThrottleBlockers.
3409
3410 2013-07-01  Antti Koivisto  <antti@apple.com>
3411
3412         Take document height into account when determining when it is considered visually non-empy
3413         https://bugs.webkit.org/show_bug.cgi?id=118272
3414
3415         Reviewed by Darin Adler.
3416
3417         The current visually non-empy mechanism takes into account only the amount of contents in renderers. 
3418         Add a simple layout dependency so that we don't consider page non-empty until the document height
3419         exceed a (low) height threshold (or the load completes).
3420
3421         * page/FrameView.cpp:
3422         (WebCore::FrameView::performPostLayoutTasks):
3423         
3424             Don't send layout callbacks until we have actually some content.
3425
3426         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
3427         (WebCore::FrameView::updateIsVisuallyNonEmpty):
3428         
3429             Factor into functions.
3430
3431         * page/FrameView.h:
3432         (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
3433         (WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
3434         * rendering/RenderEmbeddedObject.cpp:
3435         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
3436         * rendering/RenderHTMLCanvas.cpp:
3437         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
3438         
3439              The size is not known but the estimate provided here is always bigger than the threshold so
3440              the functionality is unchanged.
3441
3442 2013-07-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3443
3444         Unreviewed build fix after r152399.
3445
3446         Add missing header include for SVGNames.h.
3447
3448         * svg/SVGImageElement.h:
3449
3450 2013-07-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3451
3452         Change static_cast<SVGImageElement*> with toSVGImageElement
3453         https://bugs.webkit.org/show_bug.cgi?id=118387
3454
3455         Reviewed by Andreas Kling.
3456
3457         As a step to change static_cast with toXXX, static_cast<SVGImageElement*> can
3458         be changed with toSVGImageElement().
3459
3460         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153557
3461
3462         * rendering/svg/RenderSVGImage.cpp:
3463         (WebCore::RenderSVGImage::updateImageViewport):
3464         (WebCore::RenderSVGImage::layout):
3465         (WebCore::RenderSVGImage::paintForeground):
3466         * svg/SVGImageElement.h:
3467         (WebCore::toSVGImageElement):
3468         * svg/SVGImageLoader.cpp:
3469         (WebCore::SVGImageLoader::dispatchLoadEvent):
3470
3471 2013-07-04  Brian Holt  <brian.holt@samsung.com>
3472
3473         [GTK] Leak: Free PangoFontDescription* in RenderThemeGtk3
3474         https://bugs.webkit.org/show_bug.cgi?id=118386
3475
3476         Reviewed by Carlos Garcia Campos.
3477
3478         Free PangoFontDescription* allocated by gtk_style_context_get (transfer full).
3479
3480         * platform/gtk/RenderThemeGtk3.cpp:
3481         (WebCore::spinButtonArrowSize):
3482
3483 2013-07-04  Brian Holt  <brian.holt@samsung.com>
3484
3485         [ATK] Leak: AtkAttributeSet* should be freed
3486         https://bugs.webkit.org/show_bug.cgi?id=118307
3487
3488         Reviewed by Christophe Dumez.
3489
3490         Use AtkAttributeSet* instead of GSList*.
3491
3492         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3493         (webkitAccessibleGetObjectLocale):
3494
3495 2013-07-04  Mario Sanchez Prada  <mario.prada@samsung.com>
3496
3497         [ATK] Do not expose '\n' for wrapped lines with ATK_TEXT_BOUNDARY_CHAR
3498         https://bugs.webkit.org/show_bug.cgi?id=118359
3499
3500         Reviewed by Carlos Garcia Campos.
3501
3502         Do not expose a '\n' character for every visual line break.
3503
3504         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3505         (webkitAccessibleTextGetChar): Removed wrong code.
3506
3507 2013-07-04  Patrick Gansterer  <paroga@webkit.org>
3508
3509         Port FileSystemWin.cpp to WinCE
3510         https://bugs.webkit.org/show_bug.cgi?id=117935
3511
3512         Reviewed by Brent Fulgham.
3513
3514         Add #if !OS(WINCE) around a few lines of the code, so it can be used by the WinCE port too.
3515
3516         * PlatformWinCE.cmake:
3517         * platform/win/FileSystemWin.cpp:
3518         (WebCore::storageDirectory):
3519         * platform/wince/FileSystemWinCE.cpp: Removed.
3520
3521 2013-07-04  Balazs Kelemen  <b.kelemen@samsung.com>
3522
3523         [GStreamer] support preload="metadata"
3524         https://bugs.webkit.org/show_bug.cgi?id=116817
3525
3526         Reviewed by Eric Carlson.
3527
3528         Add appropriate behavior for preload="metadata". Delay enabling download buffering
3529         until playback is started in this case. This behavior fits with the standard quite
3530         well and this is the most exact match we can get (at least without adding too much
3531         extra complexity). What matters mostly is that we can avoid loading the media
3532         before playback but we have the first frame and the metadata.
3533
3534         Test: media/video-load-preload-metadata.html
3535
3536         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3537         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Set |m_preload| to |Auto|
3538         so we will start download buffering if we did not start it yet.
3539         (WebCore::MediaPlayerPrivateGStreamer::play): Ditto.
3540         (MediaPlayerPrivateGStreamer::setDownloadBuffering): Only start download
3541         buffering if |m_preload == Auto|. Also make sure we don't clear the download
3542         flag once we started downloading because it would result in not well defined
3543         behavior and it does not really makes sense.
3544         (MediaPlayerPrivateGStreamer::setPreload): Set download buffering accordingly.
3545
3546 2013-07-03  Jae Hyun Park  <jae.park@company100.net>
3547
3548         [Coordinated Graphics] Don't use && operator in ASSERT
3549         https://bugs.webkit.org/show_bug.cgi?id=118377
3550
3551         Reviewed by Noam Rosenthal.
3552
3553         We don't use && opeartor in ASSERT because it's impossible to know which
3554         condition caused the assertion.
3555
3556         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3557         (WebCore::CoordinatedBackingStoreTile::swapBuffers):
3558         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3559         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
3560
3561 2013-07-03  KyungTae Kim  <ktf.kim@samsung.com>
3562
3563         [EFL] Support some more editing keyboard events
3564         https://bugs.webkit.org/show_bug.cgi?id=118346
3565
3566         Reviewed by Gyuyoung Kim.
3567
3568         For editable contents, support the shortcuts for copy, page, cut, select all, undo and redo.
3569
3570         * platform/efl/EflKeyboardUtilities.cpp:
3571
3572 2013-07-03  Chris Fleizach  <cfleizach@apple.com>
3573
3574         AX: Items the img aria role aren't inserting an object replacement character
3575         https://bugs.webkit.org/show_bug.cgi?id=118259
3576
3577         Reviewed by Tim Horton.
3578
3579         VoiceOver relies on object replacement characters being emitted when asking for selected text.
3580         This has worked if a real <img> is used, but if role="img" is used on a <div>, for example,
3581         no emission is performed, which leads to missed elements in text.
3582
3583         Test: platform/mac/accessibility/aria-image-emits-object-replacement.html
3584
3585         * editing/TextIterator.cpp:
3586         (WebCore::isRendererReplacedElement):
3587         (WebCore::TextIterator::advance):
3588
3589 2013-07-03  Kangil Han  <kangil.han@samsung.com>
3590
3591         Adopt is/toHTMLMapElement for code cleanup
3592         https://bugs.webkit.org/show_bug.cgi?id=118235
3593
3594         Reviewed by Andreas Kling.
3595
3596         To enhance readability, this patch adopts is/toHTMLMapElement.
3597         This also helps out to reduce duplicated use of static_cast.
3598
3599         * accessibility/AccessibilityRenderObject.cpp:
3600         (WebCore::AccessibilityRenderObject::getDocumentLinks):
3601         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
3602         * dom/DocumentOrderedMap.cpp:
3603         (WebCore::keyMatchesMapName):
3604         (WebCore::keyMatchesLowercasedMapName):
3605         * dom/TreeScope.cpp:
3606         (WebCore::TreeScope::getImageMap):
3607         * html/HTMLAreaElement.cpp:
3608         (WebCore::HTMLAreaElement::imageElement):
3609         * html/HTMLMapElement.h:
3610         (WebCore::isHTMLMapElement):
3611         (WebCore::toHTMLMapElement):
3612
3613 2013-07-03  Brent Fulgham  <bfulgham@apple.com>
3614
3615         [Windows] Unreviewed build correction after r15283.
3616
3617         * WebCorePrefix.h: Remove include directive for CGFloat.h, as it
3618         is not present in all Windows build environments.
3619
3620 2013-07-03  Brent Fulgham  <bfulgham@apple.com>
3621
3622         [Windows] Exclude unsupported QuartzCore Features.
3623         https://bugs.webkit.org/show_bug.cgi?id=118374
3624
3625         Reviewed by Anders Carlsson.
3626
3627         * WebCore.vcxproj/WebCoreCG.props: Exclude a few non-Windows
3628         concepts from the QuartzCore headers.
3629
3630 2013-07-03  Gavin Barraclough  <barraclough@apple.com>
3631
3632         Simplify PageThrottler ownership.
3633         https://bugs.webkit.org/show_bug.cgi?id=118372
3634
3635         Reviewed by Sam Weinig.
3636
3637         * page/Page.cpp:
3638         (WebCore::Page::~Page):
3639             - 'clearPage' method removed - just clear the own pointer.
3640         * page/Page.h:
3641             - make m_pageThrottler an OwnPtr.
3642         * page/PageThrottler.cpp:
3643         (WebCore::PageThrottler::~PageThrottler):
3644             - moved 'setThrottled(false)' from 'clearPage' (removed).
3645         (WebCore::PageThrottler::throttlePage):
3646         (WebCore::PageThrottler::unthrottlePage):
3647             - no need to check 'm_page'
3648         * page/PageThrottler.h:
3649         (WebCore::PageThrottler::create):
3650             - create a PassOwnPtr, not PassRefPtr.
3651
3652 2013-07-03  Brent Fulgham  <bfulgham@apple.com>
3653
3654         [Windows] Updates to support changes in CoreGraphics libraries.
3655         https://bugs.webkit.org/show_bug.cgi?id=118373
3656
3657         Reviewed by Anders Carlsson.
3658
3659         * WebCorePrefix.h: Include definitions for isnan/round/roundf for versions of
3660         Visual Studio that do not provide them natively.
3661
3662 2013-07-03  Gordon Sheridan  <gordon_sheridan@apple.com>
3663
3664         Implement mechanism to detect (partially) hidden blocked plugins.
3665         https://bugs.webkit.org/show_bug.cgi?id=117998
3666
3667         Reviewed by Dean Jackson.
3668
3669         * rendering/RenderEmbeddedObject.cpp:
3670         (WebCore::RenderEmbeddedObject::replacementTextRect):
3671         Added private method for calculating the size of the replacement text for blocked plugins.
3672
3673         (WebCore::RenderEmbeddedObject::isReplacementObscured):
3674         Added public method to determine if the EMBED element used for a blocked plugin is inaccessible to the user.
3675         * rendering/RenderEmbeddedObject.h:
3676         Declare the two new methods mentioned above.
3677
3678         * WebCore.exp.in:
3679         Export RenderEmbeddedObject::isReplacementObscured().
3680
3681 2013-07-03  Jessie Berlin  <jberlin@apple.com>
3682
3683         Speculative build fix after r152340.
3684
3685         * WebCore.exp.in:
3686
3687 2013-07-03  Kangil Han  <kangil.han@samsung.com>
3688
3689         Append overloading function for isFooElement
3690         https://bugs.webkit.org/show_bug.cgi?id=118334
3691
3692         Reviewed by Antti Koivisto.
3693
3694         Node::hasTagName needs additional isElementNode() check when it is triggered.
3695         So conversion from Element* to Node* in isFooElement should be avoided.
3696         Therefore, to support both Node* and Element* as an argument of isFooElement,
3697         this patch appends overloading inline function.
3698
3699         * css/CSSStyleSheet.cpp:
3700         (WebCore::isAcceptableCSSStyleSheetParent):
3701         * css/StyleScopeResolver.cpp:
3702         (WebCore::StyleScopeResolver::scopeFor):
3703         * dom/Node.cpp:
3704         (WebCore::Node::numberOfScopedHTMLStyleChildren):
3705         * html/HTMLAnchorElement.h:
3706         (WebCore::isHTMLAnchorElement):
3707         * html/HTMLAreaElement.h:
3708         (WebCore::isHTMLAreaElement):
3709         * html/HTMLAudioElement.h:
3710         (WebCore::isHTMLAudioElement):
3711         * html/HTMLFormElement.h:
3712         (WebCore::isHTMLFormElement):
3713         * html/HTMLImageElement.h:
3714         (WebCore::isHTMLImageElement):
3715         * html/HTMLInputElement.h:
3716         (WebCore::isHTMLInputElement):
3717         * html/HTMLLabelElement.h:
3718         (WebCore::isHTMLLabelElement):
3719         * html/HTMLOptGroupElement.h:
3720         (WebCore::isHTMLOptGroupElement):
3721         * html/HTMLOptionElement.h:
3722         (WebCore::isHTMLOptionElement):
3723         * html/HTMLStyleElement.h:
3724         (WebCore::isHTMLStyleElement):
3725         (WebCore::toHTMLStyleElement):
3726         * html/HTMLTextAreaElement.h:
3727         (WebCore::isHTMLTextAreaElement):
3728
3729 2013-07-03  Balazs Kelemen  <b.kelemen@samsung.com>
3730
3731         Gif: zero filling should use memset instead of setRGBA for every pixel
3732         https://bugs.webkit.org/show_bug.cgi?id=118350
3733
3734         Reviewed by Allan Sandfeld Jensen.
3735
3736         No new tests. Actually it is not covered by existing tests. Surprisingly we haven't got pixel
3737         tests for animated images. Given that this patch is pretty trivial I don't think it's worth the
3738         cost to start introducing such tests.
3739         I added a manual test: animated-gif-dispose-background.html.
3740
3741         GIFImageDecoder::initializeFrameBuffer use a loop to fill a subrect with tranparent pixels.
3742         This is extremely ineffecient. The use case for this code path is not frequent on the web
3743         but it's still better to fix it.
3744
3745         * platform/image-decoders/ImageDecoder.cpp:
3746         (WebCore::ImageFrame::zeroFillFrameRect):
3747         * platform/image-decoders/ImageDecoder.h:
3748         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3749         (WebCore::GIFImageDecoder::initFrameBuffer):
3750         Fixed indentation in addition.
3751
3752 2013-07-03  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
3753
3754         TextureUnit code optimization
3755         https://bugs.webkit.org/show_bug.cgi?id=117868
3756
3757         Reviewed by Noam Rosenthal.
3758
3759         According to OpenGL ES 2.0 specification it is not possible to use both
3760         texture2D and textureCubeMap in one texture unit.
3761         This patch reduces amount of code, slightly increases rendering performance
3762         and makes WebKit more consistent with OpenGL.
3763
3764         No new tests. Covered by existing tests:
3765         LayoutTests/webgl/conformance/textures/tex-image-webgl.html
3766         LayoutTests/webgl/conformance/textures/texture-complete.html
3767
3768         * html/canvas/WebGLRenderingContext.cpp:
3769         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
3770         (WebCore::WebGLRenderingContext::reshape):
3771         (WebCore::WebGLRenderingContext::bindTexture):
3772         (WebCore::WebGLRenderingContext::deleteTexture):
3773         (WebCore::WebGLRenderingContext::getParameter):
3774         (WebCore::WebGLRenderingContext::handleNPOTTextures):
3775         (WebCore::WebGLRenderingContext::validateTextureBinding):
3776         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
3777         * html/canvas/WebGLRenderingContext.h:
3778
3779 2013-07-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3780
3781         Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG
3782         https://bugs.webkit.org/show_bug.cgi?id=118305
3783
3784         Reviewed by Kentaro Hara.
3785
3786         Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG and use
3787         Web IDL implements instead to get rid of multiple inheritance and
3788         follow the latest specification:
3789         - http://www.w3.org/TR/filter-effects/#DOMInterfaces
3790
3791         No new tests, no behavior change.
3792
3793         * CMakeLists.txt:
3794         * DerivedSources.pri:
3795         * GNUmakefile.list.am:
3796         * svg/SVGFEBlendElement.idl:
3797         * svg/SVGFEColorMatrixElement.idl:
3798         * svg/SVGFEComponentTransferElement.idl:
3799         * svg/SVGFECompositeElement.idl:
3800         * svg/SVGFEConvolveMatrixElement.idl:
3801         * svg/SVGFEDiffuseLightingElement.idl:
3802         * svg/SVGFEDisplacementMapElement.idl:
3803         * svg/SVGFEDropShadowElement.idl:
3804         * svg/SVGFEFloodElement.idl:
3805         * svg/SVGFEGaussianBlurElement.idl:
3806         * svg/SVGFEImageElement.idl:
3807         * svg/SVGFEMergeElement.idl:
3808         * svg/SVGFEMorphologyElement.idl:
3809         * svg/SVGFEOffsetElement.idl:
3810         * svg/SVGFESpecularLightingElement.idl:
3811         * svg/SVGFETileElement.idl:
3812         * svg/SVGFETurbulenceElement.idl:
3813
3814 2013-07-03  Zalan Bujtas  <zalan@apple.com>
3815
3816         H&R Block 2010 Help window can not be reopened.
3817         https://bugs.webkit.org/show_bug.cgi?id=118342
3818
3819         Reviewed by Antti Koivisto.
3820
3821         http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
3822         only the opener can (re)focus() a particular window.
3823         H&R Block app relies on the relaxed window.focus() rules.
3824
3825         * WebCore.exp.in:
3826         * platform/RuntimeApplicationChecks.cpp:
3827         (WebCore::applicationIsHRBlock):
3828         * platform/RuntimeApplicationChecks.h:
3829
3830 2013-07-03  Zan Dobersek  <zdobersek@igalia.com>
3831
3832         Further build fixing for build configurations that disable CSS regions support.
3833
3834         * dom/PseudoElement.h: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
3835
3836 2013-07-03  Zan Dobersek  <zdobersek@igalia.com>
3837
3838         Unreviewed build fix after r152320 and r152345 for build configurations that enable
3839         SVG support but disable CSS regions support.
3840
3841         * svg/SVGElement.cpp: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
3842         * svg/SVGElement.h: Ditto.
3843
3844 2013-07-03  Radu Stavila  <stavila@adobe.com>
3845
3846         [CSS Regions] Improve implementation of elements in region being flowed to another flow thread
3847         https://bugs.webkit.org/show_bug.cgi?id=118300
3848
3849         Based on patch by Zoltán Árvai <zarvai@inf.u-szeged.hu>
3850
3851         Reviewed by Csaba Osztrogonác.
3852
3853         Fixed CSS_REGIONS guard.
3854
3855         * dom/Element.h:
3856         * dom/NodeRenderingContext.cpp:
3857         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
3858         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
3859
3860 2013-07-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3861
3862         Move SVGTests attributes parsing to SVGGraphicsElement
3863         https://bugs.webkit.org/show_bug.cgi?id=118292
3864
3865         Reviewed by Darin Adler.
3866
3867         Move SVGTests attributes parsing to SVGGraphicsElement instead of doing
3868         this in each of its subclasses. SVGGraphicsElement is now the one
3869         subclassing SVGTests after r152167.
3870
3871         No new tests, no behavior change.
3872
3873         * svg/SVGAElement.cpp:
3874         (WebCore::SVGAElement::isSupportedAttribute):
3875         (WebCore::SVGAElement::parseAttribute):
3876         * svg/SVGCircleElement.cpp:
3877         (WebCore::SVGCircleElement::isSupportedAttribute):
3878         (WebCore::SVGCircleElement::parseAttribute):
3879         (WebCore::SVGCircleElement::svgAttributeChanged):
3880         * svg/SVGClipPathElement.cpp:
3881         (WebCore::SVGClipPathElement::isSupportedAttribute):
3882         (WebCore::SVGClipPathElement::parseAttribute):
3883         * svg/SVGEllipseElement.cpp:
3884         (WebCore::SVGEllipseElement::isSupportedAttribute):
3885         (WebCore::SVGEllipseElement::parseAttribute):
3886         (WebCore::SVGEllipseElement::svgAttributeChanged):
3887         * svg/SVGForeignObjectElement.cpp:
3888         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
3889         (WebCore::SVGForeignObjectElement::parseAttribute):
3890         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
3891         * svg/SVGGElement.cpp:
3892         (WebCore::SVGGElement::isSupportedAttribute):
3893         (WebCore::SVGGElement::parseAttribute):
3894         (WebCore::SVGGElement::svgAttributeChanged):
3895         * svg/SVGGraphicsElement.cpp:
3896         (WebCore::SVGGraphicsElement::isSupportedAttribute):
3897         (WebCore::SVGGraphicsElement::parseAttribute):
3898         (WebCore::SVGGraphicsElement::svgAttributeChanged):
3899         * svg/SVGImageElement.cpp:
3900         (WebCore::SVGImageElement::isSupportedAttribute):
3901         (WebCore::SVGImageElement::parseAttribute):
3902         (WebCore::SVGImageElement::svgAttributeChanged):
3903         * svg/SVGLineElement.cpp:
3904         (WebCore::SVGLineElement::isSupportedAttribute):
3905         (WebCore::SVGLineElement::parseAttribute):
3906         (WebCore::SVGLineElement::svgAttributeChanged):
3907         * svg/SVGPathElement.cpp:
3908         (WebCore::SVGPathElement::isSupportedAttribute):
3909         (WebCore::SVGPathElement::parseAttribute):
3910         (WebCore::SVGPathElement::svgAttributeChanged):
3911         * svg/SVGPolyElement.cpp:
3912         (WebCore::SVGPolyElement::isSupportedAttribute):
3913         (WebCore::SVGPolyElement::parseAttribute):
3914         (WebCore::SVGPolyElement::svgAttributeChanged):
3915         * svg/SVGRectElement.cpp:
3916         (WebCore::SVGRectElement::isSupportedAttribute):
3917         (WebCore::SVGRectElement::parseAttribute):
3918         (WebCore::SVGRectElement::svgAttributeChanged):
3919         * svg/SVGSVGElement.cpp:
3920         (WebCore::SVGSVGElement::parseAttribute):
3921         (WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling
3922         SVGGraphicsElement::svgAttributeChanged() instead of
3923         SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the
3924         parent class and it takes care of parsing SVGTests attributes now.
3925         * svg/SVGUseElement.cpp:
3926         (WebCore::SVGUseElement::isSupportedAttribute):
3927         (WebCore::SVGUseElement::parseAttribute):
3928         (WebCore::SVGUseElement::svgAttributeChanged):
3929
3930 2013-07-02  Ryosuke Niwa  <rniwa@webkit.org>
3931
3932         Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
3933         https://bugs.webkit.org/show_bug.cgi?id=118299
3934
3935         Reviewed by Andreas Kling.
3936
3937         Did cleanups.
3938
3939         * dom/QualifiedName.cpp:
3940         (WebCore::qualifiedNameCache): Added to wrap gNameCache.
3941         (WebCore::QualifiedName::QualifiedName):
3942         (WebCore::QualifiedName::QualifiedNameImpl::~QualifiedNameImpl):
3943         (WebCore::QualifiedName::toString): Use early exit and StringBuilder.
3944         (WebCore::QualifiedName::init): Use early exit.
3945
3946 2013-07-02  Simon Fraser  <simon.fraser@apple.com>
3947
3948         Don't set z-index: 0 on lots of elements with -webkit-overflow-scrolling: touch
3949         https://bugs.webkit.org/show_bug.cgi?id=118337
3950
3951         Reviewed by Benjamin Poulain.
3952
3953         -webkit-overflow-scrolling: touch is an inherited property that, on iOS, controls
3954         the behavior of overflow scrolling content, and causes overflow scrolling elements
3955         to become CSS stacking contexts.
3956
3957         However, the code was too aggressive in setting style->setZIndex(0), doing so
3958         for any element with overflow != hidden. Since the default for overflow is visible,
3959         that meant almost every element.
3960
3961         Previously, this didn't really matter. However, since r125693, any renderer with non-auto
3962         z-index gets a RenderLayer, and that RenderLayer will become a stacking context. The result
3963         was too many RenderLayers and incorrect stacking context behavior.
3964
3965         Fix by ensuring that -webkit-overflow-scrolling: touch  only affects elements which
3966         are actually scrollable.
3967
3968         Also move the code that does this to below the code that adjust overflow style
3969         for different elements.
3970
3971         * css/StyleResolver.cpp:
3972         (WebCore::isScrollableOverflow):
3973         (WebCore::StyleResolver::adjustRenderStyle):
3974
3975 2013-07-02  Commit Queue  <commit-queue@webkit.org>
3976
3977         Unreviewed, rolling out r152318.
3978         http://trac.webkit.org/changeset/152318
3979         https://bugs.webkit.org/show_bug.cgi?id=118333
3980
3981         This patch broke media/track/track-automatic-subtitles.html on
3982         Mac (Requested by dfarler on #webkit).
3983
3984         * page/CaptionUserPreferencesMediaAF.cpp:
3985         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
3986
3987 2013-07-02  Ruth Fong  <ruth_fong@apple.com>
3988
3989         Change event should not be dispatched by clicking a scrollbar of select listbox
3990         https://bugs.webkit.org/show_bug.cgi?id=118019
3991         <rdar://problem/14297760>
3992
3993         Reviewed by Dean Jackson.
3994
3995         Test: fast/forms/select/listbox-click-on-scrollbar.html
3996
3997         Merge the following:
3998         http://src.chromium.org/viewvc/blink?view=revision&revision=151689
3999         https://chromium.googlesource.com/chromium/blink/+/492549b0fcaa58a85aa0797446b62985a263704f
4000
4001         Previously, a select element with the multiple attribute would dispatch
4002         an onChanged event when the scrollbar is clicked. This patch corrects this
4003         issue by only calling listBoxOnChange(), which fires the onChanged event,
4004         when an actual option is clicked.
4005
4006         * html/HTMLSelectElement.cpp:
4007         (WebCore::HTMLSelectElement::childrenChanged): Updated to clear the list
4008         of selected items when when an <option> element is added to/deleted from its <select> element.
4009         (Without this addition, if a option was selected, and then JavaScript was used to modify
4010         the <select> element, and then the scrollbar was clicked, an onChanged event would fire
4011         because it remembers the previously selected option.)
4012
4013         (WebCore::HTMLSelectElement::listBoxOnChange):
4014
4015         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Updated to
4016         only call listBoxOnChange() if at least one option is selected.
4017
4018 2013-07-02  Alex Christensen  <achristensen@apple.com>
4019
4020         Preparing Windows WebGL build system.
4021         https://bugs.webkit.org/show_bug.cgi?id=118325
4022
4023         Reviewed by Brent Fulgham.
4024
4025         * WebCore.vcxproj/WebCore.vcxproj: Added EGL files, removed unused GraphicsContext3DOpenGL.cpp.
4026         * WebCore.vcxproj/WebCore.vcxproj.filters: Added EGL filter and files, removed unused GraphicsContext3DOpenGL.cpp.
4027
4028 2013-07-02  Jessie Berlin  <jberlin@apple.com>
4029
4030         The callback for WKPageGetPlugInInformation needs info about whether or not there are any
4031         non-playing instances of the plug-in on the page
4032         https://bugs.webkit.org/show_bug.cgi?id=118330
4033
4034         Reviewed by Anders Carlsson.
4035
4036         * WebCore.exp.in:
4037         Expose a symbol so it can be used in WebKit2.
4038
4039 2013-07-02  Alex Christensen  <achristensen@apple.com>
4040
4041         Added getProcAddress implementation for Windows in OpenGLShims.
4042         https://bugs.webkit.org/show_bug.cgi?id=118312
4043
4044         Reviewed by Brent Fulgham.
4045
4046         * platform/graphics/OpenGLShims.cpp:
4047         (WebCore::getProcAddress): Added for Windows.
4048
4049 2013-07-02  Jer Noble  <jer.noble@apple.com>
4050
4051         media/unsupported-rtsp.html is failing
4052         https://bugs.webkit.org/show_bug.cgi?id=118327
4053
4054         Reviewed by Eric Carlson.
4055
4056         Fixes the media/unsupported-rtsp.html test.
4057
4058         Set the contentType field of contentInformationRequest in order to trigger AVFoundation to
4059         notice that loading failed and generate an error.
4060
4061         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
4062         (WebCore::WebCoreAVFResourceLoader::notifyFinished):
4063
4064 2013-07-02  Alex Christensen  <achristensen@apple.com>
4065
4066         Fixed compile error in non-X11 platforms using EGL.
4067         https://bugs.webkit.org/show_bug.cgi?id=118323
4068
4069         Reviewed by Brent Fulgham.
4070
4071         * platform/graphics/egl/GLContextEGL.cpp:
4072         (WebCore::GLContextEGL::createPixmapContext): Put all X11-specific code into #if PLATFORM(X11).
4073
4074 2013-07-02  Radu Stavila  <stavila@adobe.com>
4075
4076         [CSS Regions] Improve implementation of elements in region being flowed to another flow thread
4077         https://bugs.webkit.org/show_bug.cgi?id=118300
4078
4079         Reviewed by David Hyatt.
4080
4081         Methods that must be const have been turned back into const. Code has been better organized.
4082         Performance is better. Tests have been added to.
4083
4084         * dom/Element.cpp:
4085         (WebCore::Element::detach):
4086         (WebCore::Element::setIsInsideRegion):
4087         (WebCore::Element::isInsideRegion):
4088         (WebCore::Element::shouldMoveToFlowThread):
4089         * dom/Element.h:
4090         * dom/ElementRareData.h:
4091         (WebCore::ElementRareData::isInsideRegion):
4092         (WebCore::ElementRareData::setIsInsideRegion):
4093         (WebCore::ElementRareData::ElementRareData):
4094         * dom/Node.cpp:
4095         (WebCore::Node::isRegisteredWithNamedFlow):
4096         * dom/Node.h:
4097         * dom/NodeRenderingContext.cpp:
4098         (WebCore::NodeRenderingContext::parentRenderer):
4099         (WebCore::NodeRenderingContext::shouldCreateRenderer):
4100         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
4101         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
4102         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
4103         * dom/NodeRenderingContext.h:
4104         * dom/PseudoElement.h:
4105         * dom/Text.cpp: