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