18fef6b4773f6894b40386dd188e7a6fc2ec64d0
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-21  Jae Hyun Park  <jae.park@company100.net>
2
3         [Qt] Remove unused code path in PluginView
4         https://bugs.webkit.org/show_bug.cgi?id=113173
5
6         Reviewed by Anders Carlsson.
7
8         m_platformLayer in PluginView has been removed in r121710, but there are
9         still some leftover code path related to m_platformLayer. This patch
10         removes unused code path.
11
12         No new tests, removing unused code paths.
13
14         * plugins/PluginView.h:
15         (PluginView):
16         * plugins/qt/PluginViewQt.cpp:
17         (WebCore::PluginView::updatePluginWidget):
18         (WebCore::PluginView::paint):
19
20 2013-08-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
21
22         Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled 
23         https://bugs.webkit.org/show_bug.cgi?id=100050
24
25         Reviewed by Antti Koivisto.
26
27         Always let WidthIterator iterate over an entire TextRun to avoid problems
28         with pixel rounding or shaping on partial runs.
29
30         This fix is necessary for Qt because the complex font-path can not disable
31         shaping, leading to the complex path painting slighly different from the
32         fast path, which messes up selection painting.
33
34         No change in functionality, no new tests.
35
36         * platform/graphics/Font.cpp:
37         (WebCore::Font::drawText):
38         (WebCore::Font::drawEmphasisMarks):
39         (WebCore::Font::selectionRectForText):
40         (WebCore::Font::offsetForPosition):
41         * platform/graphics/FontFastPath.cpp:
42         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
43         (WebCore::Font::selectionRectForSimpleText):
44         (WebCore::Font::offsetForPositionForSimpleText):
45         * platform/graphics/GlyphBuffer.h:
46         (WebCore::GlyphBuffer::add):
47         (GlyphBuffer):
48         * platform/graphics/WidthIterator.cpp:
49         (WebCore::WidthIterator::advanceInternal):
50         * platform/graphics/WidthIterator.h:
51         (WidthIterator): Removed now unused advanceOneCharacter method.
52
53 2013-08-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
54
55         Harden RenderBox::canBeScrolledAndHasScrollableArea logic
56         https://bugs.webkit.org/show_bug.cgi?id=104373
57
58         Reviewed by Simon Fraser.
59
60         Previously if a say div has a overflown content on 'y' but is
61         styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
62         would still return true. It interfers, among other things, with the way
63         autoscroll works.
64
65         Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
66         scrollability in a given axis (x or y); They are used when checking if a given box is in
67         fact programatically scrollable.
68
69         Test: fast/events/autoscroll-overflow-hidden-longhands.html
70
71         WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
72         in that sense.
73
74         * rendering/RenderBox.cpp:
75         (WebCore::RenderBox::canBeProgramaticallyScrolled):
76         * rendering/RenderBox.h:
77         (WebCore::RenderBox::hasScrollableOverflowX):
78         (WebCore::RenderBox::hasScrollableOverflowY):
79
80 2013-08-19  Antonio Gomes  <a1.gomes@sisa.samsung.com>
81
82         Text dragging can scroll overflow:hidden boxes
83         https://bugs.webkit.org/show_bug.cgi?id=119760
84
85         Reviewed by Darin Adler.
86
87         Consider the case of the following HTML:
88         <div style="overflow:hidden; width: 100px; height: 100px" >
89           <input id="input" type="text" size=10 value="any text here!"/>
90           <button style="position:relative; top: 100px; left: 100px"/>
91         </div>
92
93         If ones starts a text selection by dragging the mouse from within the input
94         field, and continues to drag beyong the outer div boundary, the latter will
95         be scrolled no matter its overflow:hidden style.
96         That happens because when the autoscroll has started, it gets propagated up
97         to the current layer's parent layer, instead of the to current layer's enclosing
98         scrollable layer.
99
100         Patch fixes the issue by hardening the way scrolling is
101         propagated upwards when autoscroll is being performed.
102
103         RenderLayer::enclosingScrollableLayer method also got rewritten
104         in terms of RenderLayer tree traversing, instead of RenderObject tree.
105         The rewrite adds support for cross frame upwards traversal.
106
107         Test: fast/events/autoscroll-upwards-propagation.html
108
109         * rendering/RenderLayer.cpp:
110         (WebCore::parentLayerCrossFrame):
111         (WebCore::RenderLayer::enclosingScrollableLayer):
112         (WebCore::RenderLayer::scrollRectToVisible):
113
114 2013-08-20  Jer Noble  <jer.noble@apple.com>
115
116         <https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
117
118         Reviewed by Eric Carlson.
119
120         Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
121         rateChanged() notifications.
122
123         * html/HTMLMediaElement.cpp:
124         (WebCore::HTMLMediaElement::clearMediaPlayer):
125         (WebCore::HTMLMediaElement::stop):
126
127 2013-08-20  David Barr <davidbarr@chromium.org>, Gyuyoung Kim  <gyuyoung.kim@samsung.com>
128
129         <https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
130
131         Reviewed by Beth Dakin.
132
133         In support of ongoing css3-images image-orientation implementation. This patch passes
134         an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
135         can know information of image orientation by the argument.
136
137         Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
138
139         * html/HTMLCanvasElement.cpp:
140         (WebCore::HTMLCanvasElement::paint):
141         * html/canvas/CanvasRenderingContext2D.cpp:
142         (WebCore::CanvasRenderingContext2D::drawImage):
143         (WebCore::drawImageToContext):
144         * platform/graphics/ImageOrientation.h: Add setter functions.
145         (WebCore::ImageOrientationDescription::setRespectImageOrientation):
146         (WebCore::ImageOrientationDescription::setImageOrientationEnum):
147         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
148         (WebCore::BitmapTextureImageBuffer::updateContents):
149         * rendering/RenderBoxModelObject.cpp:
150         (WebCore::RenderBoxModelObject::paintNinePieceImage):
151         * rendering/RenderImage.cpp:
152         (WebCore::RenderImage::paintReplaced):
153         (WebCore::RenderImage::paintIntoRect):
154         * rendering/RenderSnapshottedPlugIn.cpp:
155         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
156
157 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
158
159         https://bugs.webkit.org/show_bug.cgi?id=120093
160         Remove getOwnPropertyDescriptor trap
161
162         Reviewed by Geoff Garen.
163
164         All implementations of this method are now called via the method table, and equivalent in behaviour.
165         Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
166
167         * WebCore.exp.in:
168         * bindings/js/JSDOMWindowCustom.cpp:
169         * bindings/scripts/CodeGeneratorJS.pm:
170         (GenerateHeader):
171         (GenerateImplementation):
172         (GenerateConstructorDeclaration):
173         (GenerateConstructorHelperMethods):
174         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
175         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
176         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
177         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
178         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
179         * bindings/scripts/test/JS/JSTestEventConstructor.h:
180         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
181         * bindings/scripts/test/JS/JSTestEventTarget.h:
182         * bindings/scripts/test/JS/JSTestException.cpp:
183         * bindings/scripts/test/JS/JSTestException.h:
184         * bindings/scripts/test/JS/JSTestInterface.cpp:
185         * bindings/scripts/test/JS/JSTestInterface.h:
186         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
187         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
188         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
189         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
190         * bindings/scripts/test/JS/JSTestNode.cpp:
191         * bindings/scripts/test/JS/JSTestNode.h:
192         * bindings/scripts/test/JS/JSTestObj.cpp:
193         * bindings/scripts/test/JS/JSTestObj.h:
194         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
195         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
196         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
197         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
198         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
199         * bindings/scripts/test/JS/JSTestTypedefs.h:
200         * bridge/jsc/BridgeJSC.h:
201         (JSC::Bindings::Instance::getOwnPropertySlot):
202         * bridge/objc/objc_runtime.h:
203         * bridge/objc/objc_runtime.mm:
204         * bridge/runtime_array.cpp:
205         * bridge/runtime_array.h:
206         * bridge/runtime_method.cpp:
207         * bridge/runtime_method.h:
208         * bridge/runtime_object.cpp:
209         * bridge/runtime_object.h:
210             - remove getOwnPropertyDescriptor
211
212 2013-08-20  Antti Koivisto  <antti@apple.com>
213
214         <https://webkit.org/b/120071> Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
215
216         Reviewed by Darin Adler.
217
218         This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
219
220         * dom/ContainerNode.h:
221         (WebCore::ContainerNode::childShouldCreateRenderer):
222         * dom/Element.cpp:
223         (WebCore::Element::childShouldCreateRenderer):
224         * dom/Element.h:
225         * dom/NodeRenderingContext.cpp:
226         (WebCore::NodeRenderingContext::shouldCreateRenderer):
227         * dom/NodeRenderingContext.h:
228         
229             Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
230             Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
231
232         * dom/ShadowRoot.h:
233         (WebCore::hasShadowRootParent):
234         * html/HTMLDetailsElement.cpp:
235         (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
236         * html/HTMLDetailsElement.h:
237         * html/HTMLFormControlElement.cpp:
238         (WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
239         * html/HTMLFormControlElement.h:
240         * html/HTMLMediaElement.cpp:
241         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
242         * html/HTMLMediaElement.h:
243         * html/HTMLMeterElement.cpp:
244         (WebCore::HTMLMeterElement::childShouldCreateRenderer):
245         * html/HTMLMeterElement.h:
246         * html/HTMLOptGroupElement.h:
247         (WebCore::isHTMLOptGroupElement):
248         * html/HTMLOptionElement.h:
249         (WebCore::isHTMLOptionElement):
250         * html/HTMLProgressElement.cpp:
251         (WebCore::HTMLProgressElement::childShouldCreateRenderer):
252         * html/HTMLProgressElement.h:
253         * html/HTMLSelectElement.cpp:
254         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
255         * html/HTMLSelectElement.h:
256         * html/HTMLSummaryElement.cpp:
257         (WebCore::HTMLSummaryElement::childShouldCreateRenderer):
258         * html/HTMLSummaryElement.h:
259         * html/HTMLTextFormControlElement.cpp:
260         (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
261         (WebCore::enclosingTextFormControl):
262         * html/HTMLTextFormControlElement.h:
263         * html/ValidationMessage.cpp:
264         (WebCore::ValidationMessage::shadowTreeContains):
265         * html/ValidationMessage.h:
266         * html/shadow/InsertionPoint.cpp:
267         (WebCore::InsertionPoint::rendererIsNeeded):
268         * html/shadow/InsertionPoint.h:
269         (WebCore::isActiveInsertionPoint):
270         
271             Remove isShadowBoundary() as it was equivalent to isActive(). 
272             Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
273
274         (WebCore::hasShadowRootOrActiveInsertionPointParent):
275         
276             Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
277
278         * svg/SVGAElement.cpp:
279         (WebCore::SVGAElement::childShouldCreateRenderer):
280         * svg/SVGAElement.h:
281         * svg/SVGAltGlyphElement.cpp:
282         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
283         * svg/SVGAltGlyphElement.h:
284         * svg/SVGDocument.cpp:
285         (WebCore::SVGDocument::childShouldCreateRenderer):
286         * svg/SVGDocument.h:
287         * svg/SVGElement.cpp:
288         (WebCore::SVGElement::childShouldCreateRenderer):
289         * svg/SVGElement.h:
290         * svg/SVGFilterElement.cpp:
291         (WebCore::SVGFilterElement::childShouldCreateRenderer):
292         * svg/SVGFilterElement.h:
293         * svg/SVGFilterPrimitiveStandardAttributes.h:
294         * svg/SVGForeignObjectElement.cpp:
295         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
296         * svg/SVGForeignObjectElement.h:
297         * svg/SVGSVGElement.h:
298         (WebCore::toSVGSVGElement):
299         * svg/SVGSwitchElement.cpp:
300         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
301         * svg/SVGSwitchElement.h:
302         * svg/SVGTRefElement.cpp:
303         (WebCore::SVGTRefElement::childShouldCreateRenderer):
304         * svg/SVGTRefElement.h:
305         * svg/SVGTSpanElement.cpp:
306         (WebCore::SVGTSpanElement::childShouldCreateRenderer):
307         * svg/SVGTSpanElement.h:
308         * svg/SVGTextElement.cpp:
309         (WebCore::SVGTextElement::childShouldCreateRenderer):
310         * svg/SVGTextElement.h:
311         * svg/SVGTextPathElement.cpp:
312         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
313         * svg/SVGTextPathElement.h:
314
315 2013-08-20  Benjamin Poulain  <benjamin@webkit.org>
316
317         <https://webkit.org/b/120050> Don't bother using a Vector for the ouput of querySelector, just return the first element found
318
319         Reviewed by Ryosuke Niwa.
320
321         Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
322         simply use a trait to define what to do in the loop.
323
324         * dom/SelectorQuery.cpp:
325         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
326         (WebCore::SelectorDataList::queryAll):
327         (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
328         (WebCore::SelectorDataList::queryFirst):
329         (WebCore::SelectorDataList::executeFastPathForIdSelector):
330         (WebCore::elementsForLocalName):
331         (WebCore::anyElement):
332         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
333         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
334         (WebCore::SelectorDataList::executeSingleSelectorData):
335         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
336         (WebCore::SelectorDataList::execute):
337         * dom/SelectorQuery.h:
338
339 2013-08-20  Antti Koivisto  <antti@apple.com>
340
341         Rollout the previous patch for landing with the correct ChangeLog.
342
343 013-08-20  Jacky Jiang  <zhajiang@blackberry.com>
344
345         <https://webkit.org/b/120082> [BlackBerry] Remove unused previousTextureRect in LayerTiler
346
347         Reviewed by Rob Buis.
348         Internally reviewed by Mike Lattanzio and Jakob Petsovits.
349
350         * platform/graphics/blackberry/LayerTiler.cpp:
351         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
352
353 2013-08-20  Antti Koivisto  <antti@apple.com>
354
355         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
356
357         Reviewed by Darin Adler.
358
359         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
360
361         * dom/Element.cpp:
362         (WebCore::Element::rendererIsNeeded):
363         * dom/Element.h:
364         * dom/NodeRenderingContext.cpp:
365         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
366         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
367         * dom/PseudoElement.cpp:
368         (WebCore::PseudoElement::rendererIsNeeded):
369         * dom/PseudoElement.h:
370         * html/HTMLAppletElement.cpp:
371         (WebCore::HTMLAppletElement::rendererIsNeeded):
372         * html/HTMLAppletElement.h:
373         * html/HTMLElement.cpp:
374         (WebCore::HTMLElement::rendererIsNeeded):
375         * html/HTMLElement.h:
376         * html/HTMLEmbedElement.cpp:
377         (WebCore::HTMLEmbedElement::rendererIsNeeded):
378         * html/HTMLEmbedElement.h:
379         * html/HTMLFormElement.cpp:
380         (WebCore::HTMLFormElement::rendererIsNeeded):
381         * html/HTMLFormElement.h:
382         * html/HTMLFrameElement.cpp:
383         (WebCore::HTMLFrameElement::rendererIsNeeded):
384         * html/HTMLFrameElement.h:
385         * html/HTMLFrameSetElement.cpp:
386         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
387         * html/HTMLFrameSetElement.h:
388         * html/HTMLIFrameElement.cpp:
389         (WebCore::HTMLIFrameElement::rendererIsNeeded):
390         * html/HTMLIFrameElement.h:
391         * html/HTMLInputElement.cpp:
392         (WebCore::HTMLInputElement::rendererIsNeeded):
393         * html/HTMLInputElement.h:
394         * html/HTMLMediaElement.cpp:
395         (WebCore::HTMLMediaElement::rendererIsNeeded):
396         * html/HTMLMediaElement.h:
397         * html/HTMLObjectElement.cpp:
398         (WebCore::HTMLObjectElement::rendererIsNeeded):
399         * html/HTMLObjectElement.h:
400         * html/HTMLOptGroupElement.h:
401         * html/HTMLOptionElement.h:
402         * html/HTMLVideoElement.cpp:
403         (WebCore::HTMLVideoElement::rendererIsNeeded):
404         * html/HTMLVideoElement.h:
405         * html/shadow/DetailsMarkerControl.cpp:
406         (WebCore::DetailsMarkerControl::rendererIsNeeded):
407         * html/shadow/DetailsMarkerControl.h:
408         * html/shadow/InsertionPoint.cpp:
409         (WebCore::InsertionPoint::rendererIsNeeded):
410         * html/shadow/InsertionPoint.h:
411         * html/shadow/MeterShadowElement.cpp:
412         (WebCore::MeterShadowElement::rendererIsNeeded):
413         (WebCore::MeterInnerElement::rendererIsNeeded):
414         * html/shadow/MeterShadowElement.h:
415         * html/shadow/ProgressShadowElement.cpp:
416         (WebCore::ProgressShadowElement::rendererIsNeeded):
417         (WebCore::ProgressInnerElement::rendererIsNeeded):
418         * html/shadow/ProgressShadowElement.h:
419         * svg/SVGDescElement.h:
420         * svg/SVGElement.h:
421         (WebCore::SVGElement::rendererIsNeeded):
422         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
423         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
424         * svg/SVGFilterPrimitiveStandardAttributes.h:
425         * svg/SVGFontElement.h:
426         * svg/SVGForeignObjectElement.cpp:
427         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
428         * svg/SVGForeignObjectElement.h:
429         * svg/SVGGElement.cpp:
430         (WebCore::SVGGElement::rendererIsNeeded):
431         * svg/SVGGElement.h:
432         * svg/SVGGlyphElement.h:
433         * svg/SVGGlyphRefElement.h:
434         * svg/SVGHKernElement.h:
435         * svg/SVGMarkerElement.h:
436         * svg/SVGMissingGlyphElement.h:
437         * svg/SVGSVGElement.cpp:
438         (WebCore::SVGSVGElement::rendererIsNeeded):
439         * svg/SVGSVGElement.h:
440         * svg/SVGStopElement.cpp:
441         (WebCore::SVGStopElement::rendererIsNeeded):
442         * svg/SVGStopElement.h:
443         * svg/SVGStyledElement.cpp:
444         (WebCore::SVGStyledElement::rendererIsNeeded):
445         * svg/SVGStyledElement.h:
446         * svg/SVGTRefElement.cpp:
447         (WebCore::SVGTRefElement::rendererIsNeeded):
448         * svg/SVGTRefElement.h:
449         * svg/SVGTSpanElement.cpp:
450         (WebCore::SVGTSpanElement::rendererIsNeeded):
451         * svg/SVGTSpanElement.h:
452         * svg/SVGTextPathElement.cpp:
453         (WebCore::SVGTextPathElement::rendererIsNeeded):
454         * svg/SVGTextPathElement.h:
455         * svg/SVGTitleElement.h:
456         * svg/SVGVKernElement.h:
457         * svg/SVGViewElement.h:
458
459 2013-08-20  Daniel Bates  <dabates@apple.com>
460
461         <https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
462
463         Reviewed by Darin Adler.
464
465         Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
466         such support is enabled.
467
468         * dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
469         * dom/Clipboard.h: Ditto.
470
471 2013-08-20  Antti Koivisto  <antti@apple.com>
472
473         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
474
475         Reviewed by Darin Adler.
476
477         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
478
479         * dom/Element.cpp:
480         (WebCore::Element::rendererIsNeeded):
481         * dom/Element.h:
482         * dom/NodeRenderingContext.cpp:
483         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
484         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
485         * dom/PseudoElement.cpp:
486         (WebCore::PseudoElement::rendererIsNeeded):
487         * dom/PseudoElement.h:
488         * html/HTMLAppletElement.cpp:
489         (WebCore::HTMLAppletElement::rendererIsNeeded):
490         * html/HTMLAppletElement.h:
491         * html/HTMLElement.cpp:
492         (WebCore::HTMLElement::rendererIsNeeded):
493         * html/HTMLElement.h:
494         * html/HTMLEmbedElement.cpp:
495         (WebCore::HTMLEmbedElement::rendererIsNeeded):
496         * html/HTMLEmbedElement.h:
497         * html/HTMLFormElement.cpp:
498         (WebCore::HTMLFormElement::rendererIsNeeded):
499         * html/HTMLFormElement.h:
500         * html/HTMLFrameElement.cpp:
501         (WebCore::HTMLFrameElement::rendererIsNeeded):
502         * html/HTMLFrameElement.h:
503         * html/HTMLFrameSetElement.cpp:
504         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
505         * html/HTMLFrameSetElement.h:
506         * html/HTMLIFrameElement.cpp:
507         (WebCore::HTMLIFrameElement::rendererIsNeeded):
508         * html/HTMLIFrameElement.h:
509         * html/HTMLInputElement.cpp:
510         (WebCore::HTMLInputElement::rendererIsNeeded):
511         * html/HTMLInputElement.h:
512         * html/HTMLMediaElement.cpp:
513         (WebCore::HTMLMediaElement::rendererIsNeeded):
514         * html/HTMLMediaElement.h:
515         * html/HTMLObjectElement.cpp:
516         (WebCore::HTMLObjectElement::rendererIsNeeded):
517         * html/HTMLObjectElement.h:
518         * html/HTMLOptGroupElement.h:
519         * html/HTMLOptionElement.h:
520         * html/HTMLVideoElement.cpp:
521         (WebCore::HTMLVideoElement::rendererIsNeeded):
522         * html/HTMLVideoElement.h:
523         * html/shadow/DetailsMarkerControl.cpp:
524         (WebCore::DetailsMarkerControl::rendererIsNeeded):
525         * html/shadow/DetailsMarkerControl.h:
526         * html/shadow/InsertionPoint.cpp:
527         (WebCore::InsertionPoint::rendererIsNeeded):
528         * html/shadow/InsertionPoint.h:
529         * html/shadow/MeterShadowElement.cpp:
530         (WebCore::MeterShadowElement::rendererIsNeeded):
531         (WebCore::MeterInnerElement::rendererIsNeeded):
532         * html/shadow/MeterShadowElement.h:
533         * html/shadow/ProgressShadowElement.cpp:
534         (WebCore::ProgressShadowElement::rendererIsNeeded):
535         (WebCore::ProgressInnerElement::rendererIsNeeded):
536         * html/shadow/ProgressShadowElement.h:
537         * svg/SVGDescElement.h:
538         * svg/SVGElement.h:
539         (WebCore::SVGElement::rendererIsNeeded):
540         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
541         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
542         * svg/SVGFilterPrimitiveStandardAttributes.h:
543         * svg/SVGFontElement.h:
544         * svg/SVGForeignObjectElement.cpp:
545         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
546         * svg/SVGForeignObjectElement.h:
547         * svg/SVGGElement.cpp:
548         (WebCore::SVGGElement::rendererIsNeeded):
549         * svg/SVGGElement.h:
550         * svg/SVGGlyphElement.h:
551         * svg/SVGGlyphRefElement.h:
552         * svg/SVGHKernElement.h:
553         * svg/SVGMarkerElement.h:
554         * svg/SVGMissingGlyphElement.h:
555         * svg/SVGSVGElement.cpp:
556         (WebCore::SVGSVGElement::rendererIsNeeded):
557         * svg/SVGSVGElement.h:
558         * svg/SVGStopElement.cpp:
559         (WebCore::SVGStopElement::rendererIsNeeded):
560         * svg/SVGStopElement.h:
561         * svg/SVGStyledElement.cpp:
562         (WebCore::SVGStyledElement::rendererIsNeeded):
563         * svg/SVGStyledElement.h:
564         * svg/SVGTRefElement.cpp:
565         (WebCore::SVGTRefElement::rendererIsNeeded):
566         * svg/SVGTRefElement.h:
567         * svg/SVGTSpanElement.cpp:
568         (WebCore::SVGTSpanElement::rendererIsNeeded):
569         * svg/SVGTSpanElement.h:
570         * svg/SVGTextPathElement.cpp:
571         (WebCore::SVGTextPathElement::rendererIsNeeded):
572         * svg/SVGTextPathElement.h:
573         * svg/SVGTitleElement.h:
574         * svg/SVGVKernElement.h:
575         * svg/SVGViewElement.h:
576
577 2013-08-20  Tim Horton  <timothy_horton@apple.com>
578
579         <https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
580         <rdar://problem/12958038>
581
582         Reviewed by Joseph Pecoraro.
583
584         Update the inspector overlay's layout before painting, if it is stale.
585
586         No new tests; fixes an intermittent assertion failure in some existing tests.
587
588         * inspector/InspectorOverlay.cpp:
589         (WebCore::InspectorOverlay::paint):
590
591 2013-08-20  Daniel Bates  <dabates@apple.com>
592
593         Build fix after <http://trac.webkit.org/changeset/154260> (https://webkit.org/b/119949);
594         declare Clipboard::hasData() when building with and without drag support
595
596         * dom/Clipboard.h:
597
598 2013-08-20  Hans Muller  <hmuller@adobe.com>
599
600         <https://webkit.org/b/119849> [CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
601
602         Reviewed by Alexandru Chiculita.
603
604         Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
605         method now computes first logical top location where a line segment can be laid
606         out within a RasterShape, i.e. a shape derived from an image valued URL resource.
607
608         A detailed description of the algorithm can be found in
609         http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
610
611         The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
612         with a vertical gap that spans the entire line now causes the method to short circuit
613         and return an empty interval list.
614
615         Tests: fast/shapes/shape-inside/shape-inside-image-003.html
616                fast/shapes/shape-inside/shape-inside-image-004.html
617                fast/shapes/shape-inside/shape-inside-image-005.html
618
619         * rendering/shapes/RasterShape.cpp:
620         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
621         (WebCore::RasterShapeIntervals::getIncludedIntervals):
622         (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
623         * rendering/shapes/RasterShape.h:
624
625 2013-08-20  Pratik Solanki  <psolanki@apple.com>
626
627         <https://webkit.org/b/120029> Document::markers() should return a reference
628
629         Reviewed by Andreas Kling.
630
631         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
632         m_markers as const and initialize it in member initialization.
633
634         * dom/Document.cpp:
635         (WebCore::Document::Document):
636         * dom/Document.h:
637         (WebCore::Document::markers):
638         * editing/AlternativeTextController.cpp:
639         (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
640         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
641         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
642         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
643         (WebCore::AlternativeTextController::respondToChangedSelection):
644         (WebCore::AlternativeTextController::respondToAppliedEditing):
645         (WebCore::AlternativeTextController::respondToUnappliedEditing):
646         (WebCore::AlternativeTextController::markReversed):
647         (WebCore::AlternativeTextController::markCorrection):
648         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
649         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
650         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
651         (WebCore::AlternativeTextController::applyDictationAlternative):
652         * editing/CompositeEditCommand.cpp:
653         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
654         * editing/DeleteSelectionCommand.cpp:
655         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
656         * editing/DictationCommand.cpp:
657         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
658         * editing/Editor.cpp:
659         (WebCore::Editor::ignoreSpelling):
660         (WebCore::Editor::learnSpelling):
661         (WebCore::Editor::advanceToNextMisspelling):
662         (WebCore::Editor::clearMisspellingsAndBadGrammar):
663         (WebCore::Editor::markAndReplaceFor):
664         (WebCore::Editor::changeBackToReplacedString):
665         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
666         (WebCore::Editor::countMatchesForText):
667         (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
668         (WebCore::Editor::respondToChangedSelection):
669         (WebCore::Editor::selectionStartHasMarkerFor):
670         * editing/SpellChecker.cpp:
671         (WebCore::SpellChecker::didCheckSucceed):
672         * editing/SplitTextNodeCommand.cpp:
673         (WebCore::SplitTextNodeCommand::doApply):
674         (WebCore::SplitTextNodeCommand::doUnapply):
675         * editing/TextCheckingHelper.cpp:
676         (WebCore::TextCheckingHelper::findFirstMisspelling):
677         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
678         * page/FrameView.cpp:
679         (WebCore::FrameView::getTickmarks):
680         (WebCore::FrameView::paintContents):
681         * page/Page.cpp:
682         (WebCore::Page::unmarkAllTextMatches):
683         * rendering/HitTestResult.cpp:
684         (WebCore::HitTestResult::spellingToolTip):
685         (WebCore::HitTestResult::replacedString):
686         (WebCore::HitTestResult::dictationAlternatives):
687         * rendering/InlineTextBox.cpp:
688         (WebCore::InlineTextBox::paintDocumentMarkers):
689         * rendering/svg/SVGInlineFlowBox.cpp:
690         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
691         * testing/Internals.cpp:
692         (WebCore::Internals::markerCountForNode):
693         (WebCore::Internals::markerAt):
694         (WebCore::Internals::addTextMatchMarker):
695
696 2013-08-20  Pratik Solanki  <psolanki@apple.com>
697
698         <https://webkit.org/b/119875> localeToScriptCodeForFontSelection should use hash tables with larger default capacity
699
700         Reviewed by Darin Adler.
701
702         The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
703         these hash tables so we don't have to expand them during initialization.
704
705         No new tests because no functional changes.
706
707         * platform/text/LocaleToScriptMappingDefault.cpp:
708         (WebCore::scriptNameToCode):
709         (WebCore::localeToScriptCodeForFontSelection):
710
711 2013-08-20  Eric Carlson  <eric.carlson@apple.com>
712
713         <https://webkit.org/b/120068> Media controls can be attached lazily
714
715         Reviewed by Jer Noble.
716
717         Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
718
719         * html/HTMLMediaElement.cpp:
720         (WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
721
722 2013-08-20  Daniel Bates  <dabates@apple.com>
723
724         <https://webkit.org/b/120072> Use nullAtom instead of defining static local in
725         Accessibility{Object, RenderObject}::actionVerb()
726
727         Reviewed by Chris Fleizach.
728
729         * accessibility/AccessibilityObject.cpp:
730         (WebCore::AccessibilityObject::actionVerb):
731         * accessibility/AccessibilityRenderObject.cpp:
732         (WebCore::AccessibilityRenderObject::actionVerb):
733
734 2013-08-20  Daniel Bates  <dabates@apple.com>
735
736         <https://webkit.org/b/119914> [iOS] Upstream changes to WebCore/accessibility
737
738         Reviewed by Darin Adler and Chris Fleizach.
739
740         * accessibility/AccessibilityMenuList.cpp:
741         (WebCore::AccessibilityMenuList::press):
742         (WebCore::AccessibilityMenuList::isCollapsed):
743         * accessibility/AccessibilityObject.cpp:
744         (WebCore::AccessibilityObject::headingElementForNode):
745         (WebCore::AccessibilityObject::actionVerb):
746         * accessibility/AccessibilityObject.h:
747         * accessibility/AccessibilityRenderObject.cpp:
748         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
749         (WebCore::AccessibilityRenderObject::actionVerb):
750         * accessibility/AccessibilityTableColumn.cpp:
751         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
752         * accessibility/AccessibilityTableHeaderContainer.cpp:
753         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
754         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
755
756 2013-08-20  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
757
758         [css3-text] Implement CSS3 text-decoration shorthand
759         https://bugs.webkit.org/show_bug.cgi?id=92000
760
761         Reviewed by Darin Adler.
762
763         Implements the text-decoration shorthand (with -webkit- prefix), as specified by the CSS3 Text Decoration specification:
764         http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-property
765
766         Backported from Blink:
767         https://src.chromium.org/viewvc/blink?revision=156266&view=revision
768
769         Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html
770                fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
771
772         * css/CSSComputedStyleDeclaration.cpp:
773         (WebCore::ComputedStyleExtractor::propertyValue):
774         * css/CSSParser.cpp:
775         (WebCore::CSSParser::parseValue):
776         (WebCore::CSSParser::addTextDecorationProperty):
777         (WebCore::CSSParser::parseTextDecoration):
778         * css/CSSProperty.cpp:
779         (WebCore::CSSProperty::isInheritedProperty):
780         * css/CSSPropertyNames.in:
781         * css/StylePropertyShorthand.cpp:
782         (WebCore::webkitTextDecorationShorthand):
783         (WebCore::shorthandForProperty):
784         (WebCore::matchingShorthandsForLonghand):
785         * css/StylePropertyShorthand.h:
786
787 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
788
789         https://bugs.webkit.org/show_bug.cgi?id=120054
790         Remove some dead code following getOwnPropertyDescriptor cleanup
791
792         Reviewed by Oliver Hunt.
793
794         * bindings/js/JSPluginElementFunctions.cpp:
795         * bindings/js/JSPluginElementFunctions.h:
796             - remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
797
798 2013-08-20  Alex Christensen  <achristensen@apple.com>
799
800         Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
801         https://bugs.webkit.org/show_bug.cgi?id=119512
802
803         Reviewed by Brent Fulgham.
804
805         * WebCore.vcxproj/WebCore.vcxproj:
806         * WebCore.vcxproj/WebCore.vcxproj.filters:
807         * WebCore.vcxproj/WebCoreCommon.props:
808         * WebCore.vcxproj/WebCoreGeneratedCommon.props:
809         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
810         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
811         Replaced obj32, bin32, and lib32 with macros for 64-bit build.
812
813 2013-08-20  Jessie Berlin  <jberlin@apple.com>
814
815         Remove a string no longer used after r154251.
816
817         Rubber-stamped by Brady Eidson.
818
819         * English.lproj/Localizable.strings:
820
821 2013-08-20  Jakob Petsovits  <jpetsovits@blackberry.com>
822
823         [BlackBerry] Avoid an assertion from calling releaseBufferDrawable(nullptr)
824         https://bugs.webkit.org/show_bug.cgi?id=119862
825         JIRA 470760
826
827         Reviewed by Antonio Gomes.
828
829         destroyBuffer() finds a null pointer valid but
830         releaseBufferDrawable() does not. Fix by adding a
831         null pointer check.
832
833         No new tests, caught by existing layout test runs.
834
835         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
836         (WebCore::ImageBuffer::~ImageBuffer):
837
838 2013-08-19  Gustavo Noronha Silva  <gns@gnome.org>
839
840         <https://webkit.org/b/120048> [GTK] Add stubs for APIs that went missing in the DOM bindings
841
842         Reviewed by Martin Robinson.
843
844         No new tests, these are just stubs for the DOM bindings API.
845
846         * bindings/gobject/WebKitDOMCustom.cpp:
847         (webkit_dom_bar_info_get_property):
848         (webkit_dom_bar_info_class_init):
849         (webkit_dom_bar_info_init):
850         (webkit_dom_bar_info_get_visible):
851         (webkit_dom_console_get_memory):
852         (webkit_dom_css_style_declaration_get_property_css_value):
853         (webkit_dom_document_get_webkit_hidden):
854         (webkit_dom_document_get_webkit_visibility_state):
855         (webkit_dom_html_document_open):
856         (webkit_dom_html_element_set_item_id):
857         (webkit_dom_html_element_get_item_id):
858         (webkit_dom_html_element_get_item_ref):
859         (webkit_dom_html_element_get_item_prop):
860         (webkit_dom_html_element_set_item_scope):
861         (webkit_dom_html_element_get_item_scope):
862         (webkit_dom_html_element_get_item_type):
863         (webkit_dom_html_properties_collection_get_property):
864         (webkit_dom_html_properties_collection_class_init):
865         (webkit_dom_html_properties_collection_init):
866         (webkit_dom_html_properties_collection_item):
867         (webkit_dom_html_properties_collection_named_item):
868         (webkit_dom_html_properties_collection_get_length):
869         (webkit_dom_html_properties_collection_get_names):
870         (webkit_dom_node_get_attributes):
871         (webkit_dom_node_has_attributes):
872         (webkit_dom_memory_info_get_property):
873         (webkit_dom_memory_info_class_init):
874         (webkit_dom_memory_info_init):
875         (webkit_dom_memory_info_get_total_js_heap_size):
876         (webkit_dom_memory_info_get_used_js_heap_size):
877         (webkit_dom_memory_info_get_js_heap_size_limit):
878         (webkit_dom_micro_data_item_value_class_init):
879         (webkit_dom_micro_data_item_value_init):
880         (webkit_dom_performance_get_memory):
881         (webkit_dom_property_node_list_get_property):
882         (webkit_dom_property_node_list_class_init):
883         (webkit_dom_property_node_list_init):
884         (webkit_dom_property_node_list_item):
885         (webkit_dom_property_node_list_get_length):
886         * bindings/gobject/WebKitDOMCustom.h:
887
888 2013-08-20  Antti Koivisto  <antti@apple.com>
889
890         <https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
891
892         Reviewed by Andreas Kling.
893
894         Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
895         
896         Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
897
898         * css/StyleResolver.cpp:
899         (WebCore::StyleResolver::State::initForStyleResolve):
900         (WebCore::StyleResolver::styleForElement):
901         * css/StyleResolver.h:
902         (WebCore::StyleResolver::State::State):
903         (WebCore::StyleResolver::State::elementLinkState):
904         
905             Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
906
907         * dom/ComposedShadowTreeWalker.cpp:
908         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
909         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
910         (WebCore::ComposedShadowTreeWalker::traverseParent):
911         
912             Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
913
914         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
915         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
916         * dom/ComposedShadowTreeWalker.h:
917         * dom/Node.cpp:
918         (WebCore::Node::insertionParentForBinding):
919         * dom/NodeRenderingContext.cpp:
920         (WebCore::NodeRenderingContext::NodeRenderingContext):
921         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
922         
923             Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
924             a few non-performance critical places.
925
926         (WebCore::NodeRenderingContext::resetStyleInheritance):
927         
928             Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
929
930         * dom/NodeRenderingContext.h:
931         * dom/NodeRenderingTraversal.cpp:
932         (WebCore::NodeRenderingTraversal::parentSlow):
933         * dom/NodeRenderingTraversal.h:
934         (WebCore::NodeRenderingTraversal::parent):
935         
936             Remove ParentDetails.
937
938         * html/HTMLAttributeNames.in:
939         * html/shadow/InsertionPoint.cpp:
940         
941             Remove unused resetStyleInheritance attribute.
942
943         (WebCore::InsertionPoint::removedFrom):
944         (WebCore::findInsertionPointOf):
945         
946             Renamed for clarity.
947
948         * html/shadow/InsertionPoint.h:
949         * testing/Internals.cpp:
950         (WebCore::Internals::includerFor):
951
952 2013-08-20  Antti Koivisto  <antti@apple.com>
953
954         <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
955
956         Reviewed by Anders Carlsson.
957
958         * html/HTMLDocument.cpp:
959         (WebCore::HTMLDocument::isFrameSet):
960         * html/HTMLFrameElement.cpp:
961         (WebCore::HTMLFrameElement::didAttachRenderers):
962         
963             Make helper public in HTMLFrameSetElement.
964
965         * html/HTMLFrameSetElement.cpp:
966         (WebCore::HTMLFrameSetElement::findContaining):
967         
968             Static function for finding containing frameset, if any.
969
970         (WebCore::HTMLFrameSetElement::willAttachRenderers):
971         
972             This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more.
973
974         * html/HTMLFrameSetElement.h:
975         (WebCore::isHTMLFrameSetElement):
976         (WebCore::toHTMLFrameSetElement):
977         
978             Add casting functions.
979
980         * rendering/RenderFrameSet.cpp:
981         (WebCore::RenderFrameSet::frameSet):
982
983 2013-08-20  Antti Koivisto  <antti@apple.com>
984
985         <https://webkit.org/b/120023> REGRESSION(r154257): svg/custom/bug78807.svg and svg/custom/use-invalid-style.svg failing
986
987         Reviewed by Andreas Kling.
988
989         * xml/XMLErrors.cpp:
990         (WebCore::XMLErrors::insertErrorMessageBlock): "reattach" had accidentally turned into "detach" in refactoring.
991
992 2013-08-20  Antti Koivisto  <antti@apple.com>
993
994         <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp
995
996         Reviewed by Andreas Kling.
997         
998         PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it.
999
1000         Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached
1001         along with rendering. However in this case the page inserts a <style> that uses ::before along with an element
1002         that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly
1003         insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash.
1004
1005         Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html
1006
1007         * dom/Element.cpp:
1008         (WebCore::Element::insertedInto):
1009         (WebCore::Element::removedFrom):
1010         
1011             Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document.
1012             When they are added normally during render tree attach these calls don't happen either.
1013
1014 2013-08-20  Ryosuke Niwa  <rniwa@webkit.org>
1015
1016         Windows build fix after r154314.
1017
1018         * platform/graphics/cg/PathCG.cpp:
1019         (WebCore::Path::platformAddPathForRoundedRect):
1020
1021 2013-08-19  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
1022
1023         [Cairo] Canvas putImageData is not working as expected
1024         https://bugs.webkit.org/show_bug.cgi?id=119992
1025
1026         Reviewed by Darin Adler.
1027
1028         ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
1029         If the alpha value is not 255, image data should always be pre-multiplied.
1030
1031         Test: fast/canvas/canvas-putImageData-zero-alpha.html
1032
1033         * platform/graphics/cairo/ImageBufferCairo.cpp:
1034         (WebCore::ImageBuffer::putByteArray):
1035
1036 2013-08-19  Santosh Mahto  <santosh.ma@samsung.com>
1037
1038         <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset  to calculateLocalTimeOffset
1039
1040         Reviewed by Darin Adler.
1041
1042         Resolving code error.
1043
1044         * html/BaseDateAndTimeInputType.cpp:
1045         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
1046         * html/MonthInputType.cpp:
1047         (WebCore::MonthInputType::defaultValueForStepUp):
1048         * html/TimeInputType.cpp:
1049         (WebCore::TimeInputType::defaultValueForStepUp):
1050
1051 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1052
1053         <https://webkit.org/b/120049> Delete code for Snow Leopard
1054
1055         Reviewed by Benjamin Poulain.
1056
1057         Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
1058
1059         * WebCore.exp.in:
1060         * WebCore.xcodeproj/project.pbxproj:
1061         * editing/mac/EditorMac.mm:
1062         (WebCore::Editor::pasteWithPasteboard):
1063         * page/ContextMenuController.cpp:
1064         (WebCore::ContextMenuController::populate):
1065         * platform/LocalizedStrings.cpp:
1066         (WebCore::truncatedStringForLookupMenuItem):
1067         (WebCore::contextMenuItemTagSearchWeb):
1068         (WebCore::contextMenuItemTagLookUpInDictionary):
1069         * platform/MemoryPressureHandler.cpp:
1070         * platform/audio/mac/AudioBusMac.mm:
1071         (WebCore::AudioBus::loadPlatformResource):
1072         * platform/graphics/ca/GraphicsLayerCA.cpp:
1073         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1074         * platform/graphics/ca/PlatformCALayer.h:
1075         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1076         (PlatformCALayer::acceleratesDrawing):
1077         (PlatformCALayer::setAcceleratesDrawing):
1078         (PlatformCALayer::contentsScale):
1079         (PlatformCALayer::setContentsScale):
1080         (PlatformCALayer::synchronouslyDisplayTilesInRect):
1081         * platform/graphics/ca/mac/TileController.mm:
1082         (WebCore::TileController::setScale):
1083         (WebCore::TileController::setAcceleratesDrawing):
1084         (WebCore::TileController::createTileLayer):
1085         * platform/graphics/cg/ImageBufferDataCG.cpp:
1086         (WebCore::ImageBufferData::getData):
1087         (WebCore::ImageBufferData::putData):
1088         * platform/graphics/cg/ImageBufferDataCG.h:
1089         * platform/graphics/cg/PathCG.cpp:
1090         (WebCore::Path::platformAddPathForRoundedRect):
1091         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1092         (WebCore::FontPlatformData::FontPlatformData):
1093         (WebCore::FontPlatformData::setFont):
1094         * platform/graphics/mac/FontMac.mm:
1095         (WebCore::showGlyphsWithAdvances):
1096         * platform/graphics/mac/GraphicsContextMac.mm:
1097         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1098         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1099         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
1100         (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
1101         * platform/graphics/mac/WebLayer.mm:
1102         (drawLayerContents):
1103         * platform/mac/CursorMac.mm:
1104         (WebCore::Cursor::ensurePlatformCursor):
1105         * platform/mac/EmptyProtocolDefinitions.h: Removed.
1106         * platform/mac/MemoryPressureHandlerMac.mm:
1107         (WebCore::MemoryPressureHandler::releaseMemory):
1108         * platform/mac/NSScrollerImpDetails.h:
1109         * platform/mac/PlatformEventFactoryMac.mm:
1110         (WebCore::momentumPhaseForEvent):
1111         (WebCore::phaseForEvent):
1112         * platform/mac/ScrollAnimatorMac.mm:
1113         * platform/mac/SharedTimerMac.mm:
1114         * platform/mac/WebCoreSystemInterface.h:
1115         * platform/mac/WebCoreSystemInterface.mm:
1116         * platform/network/mac/ResourceHandleMac.mm:
1117         * platform/network/mac/ResourceRequestMac.mm:
1118         (WebCore::ResourceRequest::doUpdateResourceRequest):
1119         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1120         * platform/text/cf/HyphenationCF.cpp:
1121         * platform/text/mac/HyphenationMac.mm: Removed.
1122         * rendering/RenderLayerBacking.cpp:
1123         (WebCore::RenderLayerBacking::containsPaintedContent):
1124         * rendering/RenderThemeMac.mm:
1125         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
1126
1127 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1128
1129         <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
1130
1131         Reviewed by Simon Fraser.
1132
1133         Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
1134
1135         They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
1136
1137         * rendering/RenderBlock.cpp:
1138         (WebCore::RenderBlock::computeOverflow):
1139
1140 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1141
1142         <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
1143
1144         Reviewed by Kent Tamura.
1145
1146         Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
1147
1148         In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
1149         which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
1150
1151         Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
1152
1153         Test: fast/forms/range/range-type-change-oninput.html
1154
1155         * html/shadow/SliderThumbElement.cpp:
1156         (WebCore::SliderThumbElement::isDisabledFormControl):
1157         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
1158         (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
1159         (WebCore::SliderThumbElement::setPositionFromPoint):
1160         (WebCore::SliderThumbElement::hostInput):
1161
1162 2013-08-19  Alexey Proskuryakov  <ap@apple.com>
1163
1164         https://bugs.webkit.org/show_bug.cgi?id=120028
1165         ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
1166         when navigating to an uncached subframe
1167
1168         Reviewed by Brady Eidson.
1169
1170         Test: http/tests/navigation/post-frames-goback1-uncached.html
1171
1172         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
1173         Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
1174
1175         * loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
1176         Now that we always set m_requestedHistoryItem, there is no need to traverse frame
1177         tree to see if this document is being loaded as part of b/f navigation (which was
1178         add in bug 90870).
1179
1180 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
1181
1182         https://bugs.webkit.org/show_bug.cgi?id=120034
1183         Remove custom getOwnPropertyDescriptor for global objects
1184
1185         Reviewed by Geoff Garen.
1186
1187         Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
1188
1189         * bindings/js/JSDOMWindowCustom.cpp:
1190         (WebCore::JSDOMWindow::getOwnPropertySlot):
1191             - Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
1192               all properties are marked as read-only, non-configurable to prevent defineProperty.
1193
1194 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
1195
1196         https://bugs.webkit.org/show_bug.cgi?id=119995
1197         Start removing custom implementations of getOwnPropertyDescriptor
1198
1199         Reviewed by Sam Weinig.
1200
1201         This can now typically implemented in terms of getOwnPropertySlot.
1202         Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
1203         Switch over most classes in JSC & the WebCore bindings generator to use this.
1204
1205         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1206         * bindings/js/JSHTMLAppletElementCustom.cpp:
1207         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1208         * bindings/js/JSHTMLObjectElementCustom.cpp:
1209         * bindings/js/JSHistoryCustom.cpp:
1210         (WebCore::JSHistory::getOwnPropertySlotDelegate):
1211         * bindings/js/JSLocationCustom.cpp:
1212         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1213         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1214             - Remove getOwnPropertyDescriptorDelegate methods,
1215               Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
1216         * bindings/scripts/CodeGeneratorJS.pm:
1217         (GenerateHeader):
1218         (GenerateImplementation):
1219         (GenerateConstructorHelperMethods):
1220             - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
1221         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1222         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1223         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1224         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1225         * bindings/scripts/test/JS/JSTestException.cpp:
1226         * bindings/scripts/test/JS/JSTestInterface.cpp:
1227         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1228         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1229         * bindings/scripts/test/JS/JSTestNode.cpp:
1230         * bindings/scripts/test/JS/JSTestObj.cpp:
1231         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1232         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1233         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1234             - Update test expectations.
1235
1236 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
1237
1238         <https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
1239
1240         Reviewed by Darin Adler.
1241
1242         None of the attributes of RuleSet should be modified directly.
1243
1244         * css/DocumentRuleSets.cpp:
1245         (WebCore::DocumentRuleSets::initUserStyle):
1246         * css/ElementRuleCollector.cpp:
1247         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
1248         * css/RuleSet.h:
1249         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
1250         (WebCore::RuleSet::regionSelectorsAndRuleSets):
1251         (WebCore::RuleSet::ruleCount):
1252         * css/StyleResolver.cpp:
1253         (WebCore::StyleResolver::checkRegionStyle):
1254
1255 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
1256
1257         <https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
1258
1259         Reviewed by Darin Adler.
1260
1261         The value DoesNotCrossBoundary is the default behavior boundary of SelectorChecker,
1262         and it is never changed by ElementRuleCollector.
1263
1264         * css/ElementRuleCollector.cpp:
1265         (WebCore::ElementRuleCollector::collectMatchingRules):
1266         (WebCore::ElementRuleCollector::ruleMatches):
1267         * css/ElementRuleCollector.h:
1268         (WebCore::ElementRuleCollector::ElementRuleCollector):
1269
1270 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
1271
1272         <https://webkit.org/b/119934> Remove a repeated "private:" from ElementRuleCollector
1273
1274         Reviewed by Darin Adler.
1275
1276         * css/ElementRuleCollector.h:
1277
1278 2013-08-19  Pratik Solanki  <psolanki@apple.com>
1279
1280         <https://webkit.org/b/120019> Document::visitedLinkState() should return a reference
1281
1282         Reviewed by Andreas Kling.
1283
1284         Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
1285
1286         * css/StyleResolver.cpp:
1287         (WebCore::StyleResolver::State::initElement):
1288         * dom/Document.h:
1289         (WebCore::Document::visitedLinkState):
1290         * history/CachedPage.cpp:
1291         (WebCore::CachedPage::restore):
1292         * page/Page.cpp:
1293         (WebCore::Page::allVisitedStateChanged):
1294         (WebCore::Page::visitedStateChanged):
1295
1296 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1297
1298         ASSERTION FAILED: !node || node->isShadowRoot() in WebCore::EventRetargeter::eventTargetRespectingTargetRules
1299         https://bugs.webkit.org/show_bug.cgi?id=119720
1300
1301         Reviewed by Andy Estes.
1302
1303         Merge https://chromium.googlesource.com/chromium/blink/+/4ce9bfbf54410179cd0f18b3d1a912045fc0ec3d
1304
1305         * dom/EventRetargeter.h:
1306         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
1307
1308 2013-08-19  Darin Adler  <darin@apple.com>
1309
1310         <https://webkit.org/b/120013> Tighten up logic in HTMLTableRowsCollection
1311
1312         Reviewed by Andy Estes.
1313
1314         I was looking for incorrect uses of hasLocalName in places where hasTagName should be used.
1315         The use in HTMLTableRowsCollection looked like that kind of mistake, but when I tried to
1316         make a test case to show the mistake, I found I could not. So I wrote assertions to restate
1317         what I learned, and removed an unneeded null check and tightened up the code a bit. This
1318         should make code size slightly smaller.
1319
1320         * html/HTMLTableRowsCollection.cpp:
1321         (WebCore::assertRowIsInTable): Added. Asserts that the row's position in the table is consistent
1322         with the invariants of how the collection class works. A row that is processed here would have
1323         to be an immediate child of the table, or an immediate child of a table section that in turn is
1324         an immediate child of the table.
1325         (WebCore::isInSection): Added. Replaces the three more-specific helper functions. Unlike those,
1326         this does not do a null check.
1327         (WebCore::HTMLTableRowsCollection::rowAfter): Changed to use the two new functions.
1328
1329 2013-08-19  Pratik Solanki  <psolanki@apple.com>
1330
1331         <https://webkit.org/b/119918> Frame::selection() should return a reference
1332
1333         Reviewed by Darin Adler.
1334
1335         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
1336         unnecessary null checks and assert diff ts exposed as a result.
1337
1338         * accessibility/AccessibilityRenderObject.cpp:
1339         (WebCore::AccessibilityRenderObject::selection):
1340         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1341         (WebCore::AccessibilityRenderObject::isFocused):
1342         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
1343         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1344         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1345         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
1346         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
1347         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1348         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
1349         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1350         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1351         * css/SelectorChecker.cpp:
1352         (WebCore::SelectorChecker::isFrameFocused):
1353         * dom/CharacterData.cpp:
1354         (WebCore::CharacterData::setDataAndUpdate):
1355         * dom/Document.cpp:
1356         (WebCore::Document::nodeChildrenWillBeRemoved):
1357         (WebCore::Document::nodeWillBeRemoved):
1358         * dom/Element.cpp:
1359         (WebCore::Element::updateFocusAppearance):
1360         * editing/AlternativeTextController.cpp:
1361         (WebCore::AlternativeTextController::stopPendingCorrection):
1362         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1363         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
1364         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1365         (WebCore::AlternativeTextController::timerFired):
1366         (WebCore::AlternativeTextController::respondToChangedSelection):
1367         * editing/DeleteButtonController.cpp:
1368         (WebCore::DeleteButtonController::respondToChangedSelection):
1369         (WebCore::DeleteButtonController::enable):
1370         (WebCore::DeleteButtonController::deleteTarget):
1371         * editing/DeleteSelectionCommand.cpp:
1372         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1373         * editing/DictationCommand.cpp:
1374         (WebCore::DictationCommand::insertText):
1375         * editing/EditCommand.cpp:
1376         (WebCore::EditCommand::EditCommand):
1377         * editing/EditingStyle.cpp:
1378         (WebCore::EditingStyle::mergeTypingStyle):
1379         * editing/Editor.cpp:
1380         (WebCore::Editor::selectionForCommand):
1381         (WebCore::Editor::canEdit):
1382         (WebCore::Editor::canEditRichly):
1383         (WebCore::Editor::canDHTMLCut):
1384         (WebCore::Editor::canDHTMLCopy):
1385         (WebCore::Editor::canCopy):
1386         (WebCore::Editor::canDelete):
1387         (WebCore::Editor::canSmartCopyOrDelete):
1388         (WebCore::Editor::deleteWithDirection):
1389         (WebCore::Editor::deleteSelectionWithSmartDelete):
1390         (WebCore::Editor::replaceSelectionWithFragment):
1391         (WebCore::Editor::selectedRange):
1392         (WebCore::Editor::tryDHTMLCopy):
1393         (WebCore::Editor::tryDHTMLCut):
1394         (WebCore::Editor::hasBidiSelection):
1395         (WebCore::Editor::selectionUnorderedListState):
1396         (WebCore::Editor::selectionOrderedListState):
1397         (WebCore::Editor::increaseSelectionListLevel):
1398         (WebCore::Editor::increaseSelectionListLevelOrdered):
1399         (WebCore::Editor::increaseSelectionListLevelUnordered):
1400         (WebCore::Editor::decreaseSelectionListLevel):
1401         (WebCore::Editor::findEventTargetFromSelection):
1402         (WebCore::Editor::applyStyle):
1403         (WebCore::Editor::applyParagraphStyle):
1404         (WebCore::Editor::applyStyleToSelection):
1405         (WebCore::Editor::applyParagraphStyleToSelection):
1406         (WebCore::Editor::selectionStartHasStyle):
1407         (WebCore::Editor::selectionHasStyle):
1408         (WebCore::Editor::selectionStartCSSPropertyValue):
1409         (WebCore::Editor::appliedEditing):
1410         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1411         (WebCore::Editor::insertLineBreak):
1412         (WebCore::Editor::insertParagraphSeparator):
1413         (WebCore::Editor::cut):
1414         (WebCore::Editor::copy):
1415         (WebCore::Editor::paste):
1416         (WebCore::Editor::baseWritingDirectionForSelectionStart):
1417         (WebCore::Editor::selectComposition):
1418         (WebCore::Editor::setComposition):
1419         (WebCore::Editor::ignoreSpelling):
1420         (WebCore::Editor::learnSpelling):
1421         (WebCore::Editor::advanceToNextMisspelling):
1422         (WebCore::Editor::misspelledWordAtCaretOrRange):
1423         (WebCore::Editor::isSelectionUngrammatical):
1424         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
1425         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1426         (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
1427         (WebCore::Editor::markAndReplaceFor):
1428         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1429         (WebCore::Editor::revealSelectionAfterEditingOperation):
1430         (WebCore::Editor::getCompositionSelection):
1431         (WebCore::Editor::transpose):
1432         (WebCore::Editor::changeSelectionAfterCommand):
1433         (WebCore::Editor::selectedText):
1434         (WebCore::Editor::computeAndSetTypingStyle):
1435         (WebCore::Editor::findString):
1436         (WebCore::Editor::respondToChangedSelection):
1437         (WebCore::Editor::selectionStartHasMarkerFor):
1438         (WebCore::Editor::toggleOverwriteModeEnabled):
1439         * editing/EditorCommand.cpp:
1440         (WebCore::executeToggleStyleInList):
1441         (WebCore::expandSelectionToGranularity):
1442         (WebCore::stateTextWritingDirection):
1443         (WebCore::executeDelete):
1444         (WebCore::executeDeleteToMark):
1445         (WebCore::executeMoveBackward):
1446         (WebCore::executeMoveBackwardAndModifySelection):
1447         (WebCore::executeMoveDown):
1448         (WebCore::executeMoveDownAndModifySelection):
1449         (WebCore::executeMoveForward):
1450         (WebCore::executeMoveForwardAndModifySelection):
1451         (WebCore::executeMoveLeft):
1452         (WebCore::executeMoveLeftAndModifySelection):
1453         (WebCore::executeMovePageDown):
1454         (WebCore::executeMovePageDownAndModifySelection):
1455         (WebCore::executeMovePageUp):
1456         (WebCore::executeMovePageUpAndModifySelection):
1457         (WebCore::executeMoveRight):
1458         (WebCore::executeMoveRightAndModifySelection):
1459         (WebCore::executeMoveToBeginningOfDocument):
1460         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
1461         (WebCore::executeMoveToBeginningOfLine):
1462         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
1463         (WebCore::executeMoveToBeginningOfParagraph):
1464         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
1465         (WebCore::executeMoveToBeginningOfSentence):
1466         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
1467         (WebCore::executeMoveToEndOfDocument):
1468         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
1469         (WebCore::executeMoveToEndOfSentence):
1470         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
1471         (WebCore::executeMoveToEndOfLine):
1472         (WebCore::executeMoveToEndOfLineAndModifySelection):
1473         (WebCore::executeMoveToEndOfParagraph):
1474         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
1475         (WebCore::executeMoveParagraphBackwardAndModifySelection):
1476         (WebCore::executeMoveParagraphForwardAndModifySelection):
1477         (WebCore::executeMoveUp):
1478         (WebCore::executeMoveUpAndModifySelection):
1479         (WebCore::executeMoveWordBackward):
1480         (WebCore::executeMoveWordBackwardAndModifySelection):
1481         (WebCore::executeMoveWordForward):
1482         (WebCore::executeMoveWordForwardAndModifySelection):
1483         (WebCore::executeMoveWordLeft):
1484         (WebCore::executeMoveWordLeftAndModifySelection):
1485         (WebCore::executeMoveWordRight):
1486         (WebCore::executeMoveWordRightAndModifySelection):
1487         (WebCore::executeMoveToLeftEndOfLine):
1488         (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
1489         (WebCore::executeMoveToRightEndOfLine):
1490         (WebCore::executeMoveToRightEndOfLineAndModifySelection):
1491         (WebCore::executeSelectAll):
1492         (WebCore::executeSelectToMark):
1493         (WebCore::executeSetMark):
1494         (WebCore::executeSwapWithMark):
1495         (WebCore::executeUnselect):
1496         (WebCore::enabledInRichlyEditableText):
1497         (WebCore::enabledRangeInEditableText):
1498         (WebCore::enabledRangeInRichlyEditableText):
1499         (WebCore::valueFormatBlock):
1500         * editing/FrameSelection.cpp:
1501         (WebCore::FrameSelection::setSelection):
1502         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
1503         * editing/InsertLineBreakCommand.cpp:
1504         (WebCore::InsertLineBreakCommand::doApply):
1505         * editing/InsertTextCommand.cpp:
1506         (WebCore::InsertTextCommand::doApply):
1507         * editing/ModifySelectionListLevel.cpp:
1508         (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
1509         (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
1510         * editing/RemoveFormatCommand.cpp:
1511         (WebCore::RemoveFormatCommand::doApply):
1512         * editing/ReplaceSelectionCommand.cpp:
1513         (WebCore::ReplaceSelectionCommand::doApply):
1514         * editing/SetSelectionCommand.cpp:
1515         (WebCore::SetSelectionCommand::doApply):
1516         (WebCore::SetSelectionCommand::doUnapply):
1517         * editing/SpellingCorrectionCommand.cpp:
1518         (WebCore::SpellingCorrectionCommand::doApply):
1519         * editing/TextInsertionBaseCommand.cpp:
1520         (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
1521         * editing/TypingCommand.cpp:
1522         (WebCore::TypingCommand::deleteSelection):
1523         (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
1524         (WebCore::TypingCommand::insertText):
1525         (WebCore::TypingCommand::deleteKeyPressed):
1526         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1527         * editing/ios/EditorIOS.mm:
1528         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1529         (WebCore::styleForSelectionStart):
1530         (WebCore::Editor::fontForSelection):
1531         * editing/mac/EditorMac.mm:
1532         (WebCore::styleForSelectionStart):
1533         (WebCore::Editor::fontForSelection):
1534         (WebCore::Editor::canCopyExcludingStandaloneImages):
1535         (WebCore::Editor::readSelectionFromPasteboard):
1536         * html/HTMLAnchorElement.cpp:
1537         (WebCore::HTMLAnchorElement::defaultEventHandler):
1538         (WebCore::HTMLAnchorElement::setActive):
1539         * html/HTMLInputElement.cpp:
1540         (WebCore::HTMLInputElement::updateFocusAppearance):
1541         * html/HTMLTextAreaElement.cpp:
1542         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
1543         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
1544         * html/HTMLTextFormControlElement.cpp:
1545         (WebCore::HTMLTextFormControlElement::setSelectionRange):
1546         (WebCore::HTMLTextFormControlElement::computeSelectionStart):
1547         (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
1548         (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
1549         (WebCore::HTMLTextFormControlElement::selectionChanged):
1550         * html/TextFieldInputType.cpp:
1551         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
1552         * loader/FrameLoader.cpp:
1553         (WebCore::FrameLoader::clear):
1554         * loader/archive/cf/LegacyWebArchive.cpp:
1555         (WebCore::LegacyWebArchive::createFromSelection):
1556         * page/ContextMenuController.cpp:
1557         (WebCore::insertUnicodeCharacter):
1558         (WebCore::ContextMenuController::contextMenuItemSelected):
1559         (WebCore::selectionContainsPossibleWord):
1560         (WebCore::ContextMenuController::populate):
1561         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1562         * page/DOMSelection.cpp:
1563         (WebCore::selectionShadowAncestor):
1564         (WebCore::DOMSelection::visibleSelection):
1565         (WebCore::DOMSelection::isCollapsed):
1566         (WebCore::DOMSelection::type):
1567         (WebCore::DOMSelection::rangeCount):
1568         (WebCore::DOMSelection::collapse):
1569         (WebCore::DOMSelection::collapseToEnd):
1570         (WebCore::DOMSelection::collapseToStart):
1571         (WebCore::DOMSelection::empty):
1572         (WebCore::DOMSelection::setBaseAndExtent):
1573         (WebCore::DOMSelection::setPosition):
1574         (WebCore::DOMSelection::modify):
1575         (WebCore::DOMSelection::extend):
1576         (WebCore::DOMSelection::getRangeAt):
1577         (WebCore::DOMSelection::removeAllRanges):
1578         (WebCore::DOMSelection::addRange):
1579         (WebCore::DOMSelection::deleteFromDocument):
1580         (WebCore::DOMSelection::containsNode):
1581         (WebCore::DOMSelection::toString):
1582         * page/DragController.cpp:
1583         (WebCore::DragController::dragIsMove):
1584         (WebCore::setSelectionToDragCaret):
1585         (WebCore::DragController::concludeEditDrag):
1586         (WebCore::DragController::draggableElement):
1587         (WebCore::selectElement):
1588         (WebCore::dragLocForSelectionDrag):
1589         (WebCore::DragController::startDrag):
1590         * page/DragController.h:
1591         * page/EventHandler.cpp:
1592         (WebCore::setSelectionIfNeeded):
1593         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
1594         (WebCore::EventHandler::handleMousePressEventDoubleClick):
1595         (WebCore::EventHandler::handleMousePressEventSingleClick):
1596         (WebCore::EventHandler::updateSelectionForMouseDrag):
1597         (WebCore::EventHandler::lostMouseCapture):
1598         (WebCore::EventHandler::handleMouseReleaseEvent):
1599         (WebCore::nodeIsNotBeingEdited):
1600         (WebCore::EventHandler::selectCursor):
1601         (WebCore::EventHandler::handleMousePressEvent):
1602         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1603         (WebCore::EventHandler::dispatchMouseEvent):
1604         (WebCore::EventHandler::sendContextMenuEvent):
1605         (WebCore::EventHandler::sendContextMenuEventForKey):
1606         (WebCore::handleKeyboardSelectionMovement):
1607         (WebCore::EventHandler::handleDrag):
1608         * page/FocusController.cpp:
1609         (WebCore::FocusController::setFocusedFrame):
1610         (WebCore::FocusController::setFocused):
1611         (WebCore::FocusController::advanceFocusInDocumentOrder):
1612         (WebCore::clearSelectionIfNeeded):
1613         (WebCore::FocusController::setActive):
1614         * page/Frame.cpp:
1615         (WebCore::Frame::dragImageForSelection):
1616         * page/Frame.h:
1617         (WebCore::Frame::selection):
1618         * page/FrameView.cpp:
1619         (WebCore::FrameView::performPostLayoutTasks):
1620         (WebCore::FrameView::paintContentsForSnapshot):
1621         * page/Page.cpp:
1622         (WebCore::Page::findString):
1623         (WebCore::Page::findStringMatchingRanges):
1624         (WebCore::Page::selection):
1625         * page/mac/FrameMac.mm:
1626         (WebCore::Frame::dragImageForSelection):
1627         * page/mac/FrameSnapshottingMac.mm:
1628         (WebCore::selectionImage):
1629         * page/win/FrameWin.cpp:
1630         (WebCore::imageFromSelection):
1631         (WebCore::Frame::dragImageForSelection):
1632         * platform/ios/PasteboardIOS.mm:
1633         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
1634         * rendering/HitTestResult.cpp:
1635         (WebCore::HitTestResult::isSelected):
1636         * rendering/RenderBlock.cpp:
1637         (WebCore::RenderBlock::paintCaret):
1638         * rendering/RenderImage.cpp:
1639         (WebCore::RenderImage::paintAreaElementFocusRing):
1640         * rendering/RenderLayer.cpp:
1641         (WebCore::RenderLayer::scrollTo):
1642         * rendering/RenderListBox.cpp:
1643         (WebCore::RenderListBox::paintItemForeground):
1644         (WebCore::RenderListBox::paintItemBackground):
1645         * rendering/RenderObject.cpp:
1646         (WebCore::RenderObject::selectionBackgroundColor):
1647         (WebCore::RenderObject::selectionColor):
1648         * rendering/RenderTextControlSingleLine.cpp:
1649         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
1650         * rendering/RenderTheme.cpp:
1651         (WebCore::RenderTheme::isFocused):
1652         * rendering/RenderThemeWin.cpp:
1653         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
1654         * rendering/RenderTreeAsText.cpp:
1655         (WebCore::writeSelection):
1656         * rendering/RenderView.cpp:
1657         (WebCore::RenderView::setSelection):
1658         * svg/SVGSVGElement.cpp:
1659         (WebCore::SVGSVGElement::deselectAll):
1660         * svg/SVGTextContentElement.cpp:
1661         (WebCore::SVGTextContentElement::selectSubString):
1662         * testing/Internals.cpp:
1663         (WebCore::Internals::absoluteCaretBounds):
1664         (WebCore::Internals::selectionBounds):
1665
1666 2013-08-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1667
1668         <https://webkit.org/b/119679> Remove the cast-align warnings for ARM
1669
1670         Reviewed by Darin Adler.
1671
1672         While compiling WebKitGTK+ for ARM a lot of warnings of this form
1673         where shown (gcc 4.7.3):
1674
1675         ../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
1676 ../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
1677
1678         This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
1679         which is part of WTF for this purpose, silencing the compiler.
1680
1681         * css/StylePropertySet.h:
1682         (WebCore::ImmutableStylePropertySet::metadataArray):
1683
1684 2013-08-19  Antti Koivisto  <antti@apple.com>
1685
1686         <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
1687
1688         Reviewed by Dan Bernstein.
1689
1690         * html/HTMLStyleElement.cpp:
1691         (WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
1692
1693 2013-08-19  Chris Fleizach  <cfleizach@apple.com>
1694
1695         <https://webkit.org/b/119916> AX: WebKit is not exposing AXLanguage correctly
1696
1697         Reviewed by Darin Adler.
1698
1699         Expose the AXLanguage attribute for all objects.
1700
1701         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1702         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1703
1704 2013-08-19  Brent Fulgham  <bfulgham@apple.com>
1705
1706         [Windows] Unreviewed gardening.
1707
1708         * WebCore.vcxproj/WebCore.vcxproj: Add missing header for easy access/editing.
1709         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1710
1711 2013-08-19  Mario Sanchez Prada  <mario.prada@samsung.com>
1712
1713         <https://webkit.org/b/119882> Speed up moving cursor/selection up or down past non-rendered elements.
1714
1715         Reviewed by Darin Adler.
1716
1717         This is a port from Blink originally written by Dominic Mazzoni:
1718         https://src.chromium.org/viewvc/blink?revision=154977&view=revision
1719
1720         From the original commit:
1721
1722         Skips calling firstPositionInOrBeforeNode when a node doesn't have a
1723         renderer, since there couldn't possibly be a visible position there.
1724         This was particularly wasteful when trying to move the cursor up when at
1725         the beginning of a document, as it did a O(n^2) scan through the document head.
1726
1727         Test: editing/execCommand/move-up-down-should-skip-hidden-elements.html
1728
1729         * editing/VisibleUnits.cpp:
1730         (WebCore::previousRootInlineBoxCandidatePosition): Updated.
1731         (WebCore::nextRootInlineBoxCandidatePosition): Updates.
1732
1733 2013-08-19  Andreas Kling  <akling@apple.com>
1734
1735         <https://webkit.org/b/120000> Chrome::client() should return a reference.
1736
1737         Reviewed by Antti Koivisto.
1738
1739         Chrome::m_client should never be null.
1740
1741 2013-08-19  Antti Koivisto  <antti@apple.com>
1742
1743         <https://webkit.org/b/120004> Rename StyleElement to InlineStyleSheetOwner and stop inheriting from it
1744
1745         Reviewed by Andreas Kling.
1746         
1747         Saner names and class relations.
1748
1749         * CMakeLists.txt:
1750         * GNUmakefile.list.am:
1751         * Target.pri:
1752         * WebCore.vcxproj/WebCore.vcxproj:
1753         * WebCore.xcodeproj/project.pbxproj:
1754         * dom/DOMAllInOne.cpp:
1755         * dom/InlineStyleSheetOwner.cpp: Copied from Source/WebCore/dom/StyleElement.cpp.
1756         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
1757         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
1758         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
1759         (WebCore::InlineStyleSheetOwner::removedFromDocument):
1760         (WebCore::InlineStyleSheetOwner::clearDocumentData):
1761         (WebCore::InlineStyleSheetOwner::childrenChanged):
1762         (WebCore::InlineStyleSheetOwner::finishParsingChildren):
1763         (WebCore::InlineStyleSheetOwner::createSheetFromTextContents):
1764         (WebCore::InlineStyleSheetOwner::clearSheet):
1765         (WebCore::InlineStyleSheetOwner::createSheet):
1766         (WebCore::InlineStyleSheetOwner::isLoading):
1767         (WebCore::InlineStyleSheetOwner::sheetLoaded):
1768         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
1769         * dom/InlineStyleSheetOwner.h: Copied from Source/WebCore/dom/StyleElement.h.
1770         * dom/StyleElement.cpp: Removed.
1771         * dom/StyleElement.h: Removed.
1772         * html/HTMLStyleElement.cpp:
1773         (WebCore::HTMLStyleElement::HTMLStyleElement):
1774         (WebCore::HTMLStyleElement::~HTMLStyleElement):
1775         (WebCore::HTMLStyleElement::parseAttribute):
1776         (WebCore::HTMLStyleElement::finishParsingChildren):
1777         (WebCore::HTMLStyleElement::insertedInto):
1778         (WebCore::HTMLStyleElement::removedFrom):
1779         (WebCore::HTMLStyleElement::childrenChanged):
1780         * html/HTMLStyleElement.h:
1781         * svg/SVGStyleElement.cpp:
1782         (WebCore::SVGStyleElement::SVGStyleElement):
1783         (WebCore::SVGStyleElement::~SVGStyleElement):
1784         (WebCore::SVGStyleElement::parseAttribute):
1785         (WebCore::SVGStyleElement::finishParsingChildren):
1786         (WebCore::SVGStyleElement::insertedInto):
1787         (WebCore::SVGStyleElement::removedFrom):
1788         (WebCore::SVGStyleElement::childrenChanged):
1789         * svg/SVGStyleElement.h:
1790
1791 2013-08-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1792
1793         [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
1794         https://bugs.webkit.org/show_bug.cgi?id=28113
1795
1796         Reviewed by Jocelyn Turcotte.
1797
1798         StylePainter::init() was called twice making it clobber the previous antialiasing setting.
1799
1800         This patch cleans up the construction so we only have one constructor with init inlined.
1801
1802         * platform/qt/RenderThemeQStyle.cpp:
1803         (WebCore::StylePainterQStyle::StylePainterQStyle):
1804         (WebCore::StylePainterQStyle::setupStyleOption):
1805         * platform/qt/RenderThemeQStyle.h:
1806         * platform/qt/RenderThemeQt.cpp:
1807         (WebCore::StylePainter::StylePainter):
1808         * platform/qt/RenderThemeQt.h:
1809         * platform/qt/RenderThemeQtMobile.cpp:
1810         (WebCore::StylePainterMobile::StylePainterMobile):
1811
1812 2013-08-19  Julien Brianceau  <jbrianceau@nds.com>
1813
1814         <https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
1815
1816         Reviewed by Andreas Kling.
1817
1818         Element::attach() doesn't exist anymore since r154257.
1819
1820         * xml/parser/XMLDocumentParserQt.cpp:
1821         (WebCore::XMLDocumentParser::parseStartElement):
1822
1823 2013-08-19  Antti Koivisto  <antti@apple.com>
1824
1825         <https://webkit.org/b/120001> Clean up StyleElement
1826
1827         Reviewed by Andreas Kling.
1828
1829         - Make it non-virtual so we don't use virtual multiple inheritance
1830         - Improve names
1831         - Improve code clarity
1832
1833         * dom/StyleElement.cpp:
1834         (WebCore::StyleElement::StyleElement):
1835         (WebCore::StyleElement::insertedIntoDocument):
1836         (WebCore::StyleElement::clearDocumentData):
1837         (WebCore::StyleElement::childrenChanged):
1838         (WebCore::StyleElement::finishParsingChildren):
1839         (WebCore::StyleElement::createSheetFromTextContents):
1840         (WebCore::isValidCSSContentType):
1841         (WebCore::StyleElement::createSheet):
1842         (WebCore::StyleElement::isLoading):
1843         * dom/StyleElement.h:
1844         (WebCore::StyleElement::setStyleSheetContentType):
1845         (WebCore::StyleElement::setStyleSheetMedia):
1846         * html/HTMLStyleElement.cpp:
1847         (WebCore::HTMLStyleElement::parseAttribute):
1848         * html/HTMLStyleElement.h:
1849         * svg/SVGStyleElement.cpp:
1850         (WebCore::SVGStyleElement::isSupportedAttribute):
1851         (WebCore::SVGStyleElement::parseAttribute):
1852         * svg/SVGStyleElement.h:
1853
1854 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1855
1856         <https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>
1857
1858         Reviewed by Darin Adler.
1859
1860         Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).
1861
1862         * rendering/svg/SVGRenderTreeAsText.cpp:
1863         (WebCore::writeSVGGradientStop):
1864
1865 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1866
1867         <https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
1868
1869         Reviewed by Andreas Kling.
1870
1871         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
1872         with toSVGAnimateElement().
1873
1874         * svg/SVGAnimateElement.cpp:
1875         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1876         * svg/SVGAnimateElement.h:
1877         (WebCore::toSVGAnimateElement):
1878         * svg/SVGAnimationElement.cpp:
1879         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1880
1881 2013-08-19  Andreas Kling  <akling@apple.com>
1882
1883         <https://webkit.org/b/119997> Page::progress() should return a reference.
1884
1885         Reviewed by Antti Koivisto.
1886
1887         Page::m_progress is never null.
1888
1889 2013-08-18  Darin Adler  <darin@apple.com>
1890
1891         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
1892
1893         Reviewed by Sam Weinig.
1894
1895         * dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
1896         deleted functions, it is instead overrides the base class function with one that is
1897         private and not defined, which accomplishes almost the same thing: An error, either
1898         at compile time or link time.
1899
1900         * bindings/js/JSHTMLElementCustom.cpp:
1901         (WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
1902         * dom/Document.cpp:
1903         (WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
1904         * inspector/InspectorInstrumentation.h:
1905         (WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
1906         (WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
1907         * inspector/InspectorStyleSheet.cpp:
1908         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
1909         * plugins/PluginView.cpp:
1910         (WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
1911         returns 0. It will never return anything other than 0 in that case.
1912         * rendering/RenderVideo.cpp:
1913         (WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
1914         Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
1915         fix that when/if we change the return type of Element::document to a reference.
1916         * svg/SVGFEImageElement.cpp:
1917         (WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.
1918
1919 2013-08-18  Darin Adler  <darin@apple.com>
1920
1921         <https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class
1922
1923         Reviewed by Sam Weinig.
1924
1925         * GNUmakefile.list.am: Removed ClipboardGtk.cpp.
1926         * PlatformEfl.cmake: Removed ClipboardEfl.cpp.
1927         * PlatformGTK.cmake: Removed ClipboardGtk.cpp.
1928         * PlatformWinCE.cmake: Removed ClipboardWin.cpp.
1929         * Target.pri: Removed ClipboardQt.cpp.
1930         * WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
1931         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.
1932
1933         * dom/Clipboard.cpp:
1934         (WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
1935         other than Mac, identical to the old one used in GTK and Qt, and close to the one used
1936         on Windows.
1937
1938         * platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.
1939
1940         * platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
1941         to a now-nonexistent class.
1942
1943         * platform/efl/ClipboardEfl.cpp: Removed.
1944         * platform/gtk/ClipboardGtk.cpp: Removed.
1945         * platform/qt/ClipboardQt.cpp: Removed.
1946         * platform/win/ClipboardWin.cpp: Removed.
1947
1948 2013-08-17  Darin Adler  <darin@apple.com>
1949
1950         <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
1951
1952         Reviewed by Sam Weinig.
1953
1954         * dom/Clipboard.cpp:
1955         (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
1956         Initialize strings more efficiently. Put drag-specific data members inside an if statement.
1957         Replace m_clipboardType with m_forDrag.
1958         (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
1959         Removed explicit clipboard type since constructor now defaults to copy and paste style.
1960         (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
1961         (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
1962         (WebCore::Clipboard::setData): Ditto.
1963         (WebCore::Clipboard::files): Ditto.
1964         (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
1965         be used when !ENABLE(DRAG_SUPPORT).
1966         (WebCore::Clipboard::setDropEffect): Ditto.
1967         (WebCore::Clipboard::effectAllowed): Ditto.
1968         (WebCore::Clipboard::setEffectAllowed): Ditto.
1969         (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
1970         to this, and kep the overload that does not as well. Made the DragData argument a const&.
1971         (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
1972         (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
1973         calling a dragStarted function.
1974         (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
1975         (WebCore::IEOpFromDragOp): Ditto.
1976         (WebCore::Clipboard::sourceOperation): Ditto.
1977         (WebCore::Clipboard::destinationOperation): Ditto.
1978         (WebCore::Clipboard::setSourceOperation): Ditto.
1979         (WebCore::Clipboard::setDestinationOperation): Ditto.
1980
1981         * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
1982         class declarations as required. Removed non-helpful comment. Made ClipboardType a private
1983         implementation detail. Moved functions that are not part of the DOM API down to a separate
1984         section lower down in the class, and sorted the functions to match the order they appear
1985         in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
1986         effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
1987         implementation since it's an implementation detail. Since this class is no longer polymorphic,
1988         use only private, not protected. Make m_dragImageElement an Element, not a Node.
1989
1990         * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
1991         these string properties can never return null strings anyway.
1992
1993         * page/DragController.cpp:
1994         (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
1995         (WebCore::DragController::performDrag): Ditto.
1996         (WebCore::DragController::tryDHTMLDrag): Ditto.
1997
1998         * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
1999         longer includes it.
2000
2001 2013-08-18  David Kilzer  <ddkilzer@apple.com>
2002
2003         WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
2004         <http://webkit.org/b/119932>
2005         <rdar://problem/14764085>
2006
2007         Reviewed by Darin Adler.
2008
2009         Add pragma statements to ignore -Wdeprecated-register warnings
2010         in generated code.  Also ignore -Wunknown-pragmas so this
2011         doesn't cause a build failure in older versions of clang.
2012
2013         * css/makeprop.pl:
2014         (WebCore::findProperty): Remove register hints from parameters.
2015         * css/makevalues.pl:
2016         (WebCore::findValue): Ditto.
2017         * platform/ColorData.gperf:
2018         (WebCore::findColor): Ditto.
2019
2020 2013-08-18  Antti Koivisto  <antti@apple.com>
2021
2022         <https://webkit.org/b/119987> Make Element::attach standalone function
2023
2024         Reviewed by Andreas Kling.
2025
2026         This patch turns Element::attach() and the related functions into standalone functions.
2027
2028         * dom/ContainerNode.cpp:
2029         (WebCore::attachChild):
2030         (WebCore::detachChild):
2031         * dom/ContainerNode.h:
2032         * dom/Document.cpp:
2033         (WebCore::Document::attach):
2034         (WebCore::Document::detach):
2035         * dom/Element.cpp:
2036         (WebCore::Element::~Element):
2037         (WebCore::Element::lazyReattach):
2038         (WebCore::Element::removeShadowRoot):
2039         
2040             Shadow root should be detached by now. Remove the detach call.
2041
2042         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
2043         (WebCore::Element::updatePseudoElement):
2044         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
2045         (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
2046         
2047             Factor some parts of former Element::attach/detach() into member functions.
2048
2049         * dom/Element.h:
2050         * dom/ElementRareData.h:
2051         (WebCore::ElementRareData::releasePseudoElement):
2052         * dom/NodeRenderingContext.cpp:
2053         (WebCore::NodeRenderingContext::NodeRenderingContext):
2054         * dom/NodeRenderingContext.h:
2055         * dom/ShadowRoot.cpp:
2056         * dom/ShadowRoot.h:
2057         * html/HTMLDetailsElement.cpp:
2058         (WebCore::HTMLDetailsElement::parseAttribute):
2059         * html/HTMLInputElement.cpp:
2060         (WebCore::HTMLInputElement::updateType):
2061         (WebCore::HTMLInputElement::parseAttribute):
2062         * html/HTMLObjectElement.cpp:
2063         (WebCore::HTMLObjectElement::renderFallbackContent):
2064         * html/HTMLPlugInImageElement.cpp:
2065         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2066         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
2067         * html/HTMLSelectElement.cpp:
2068         (WebCore::HTMLSelectElement::parseAttribute):
2069         (WebCore::HTMLSelectElement::parseMultipleAttribute):
2070         * html/HTMLViewSourceDocument.cpp:
2071         (WebCore::HTMLViewSourceDocument::createContainingTable):
2072         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
2073         (WebCore::HTMLViewSourceDocument::addLine):
2074         (WebCore::HTMLViewSourceDocument::finishLine):
2075         (WebCore::HTMLViewSourceDocument::addBase):
2076         (WebCore::HTMLViewSourceDocument::addLink):
2077         * html/parser/HTMLConstructionSite.cpp:
2078         (WebCore::executeTask):
2079         * html/parser/HTMLTreeBuilder.cpp:
2080         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2081         * html/shadow/InsertionPoint.cpp:
2082         (WebCore::InsertionPoint::willAttachRenderers):
2083         (WebCore::InsertionPoint::willDetachRenderers):
2084         * loader/PlaceholderDocument.cpp:
2085         (WebCore::PlaceholderDocument::attach):
2086         * style/StyleResolveTree.cpp:
2087         (WebCore::Style::createRendererIfNeeded):
2088         
2089             From Element::createRendererIfNeeded()
2090
2091         (WebCore::Style::attachShadowRoot):
2092         
2093             From ShadowRoot::attach()
2094
2095         (WebCore::Style::childAttachedAllowedWhenAttachingChildren):
2096         (WebCore::Style::attachChildren):
2097         
2098             From Element::attachChildren()
2099
2100         (WebCore::Style::attachRenderTree):
2101         
2102             From Element::attach()
2103
2104         (WebCore::Style::detachShadowRoot):
2105         
2106             From ShadowRoot::detach()
2107
2108         (WebCore::Style::detachChildren):
2109         
2110             From Element::detachChildren()
2111
2112         (WebCore::Style::detachRenderTree):
2113         
2114             From Element::deatach()
2115
2116         (WebCore::Style::reattachRenderTree):
2117         
2118              From Element::reattach()
2119
2120         (WebCore::Style::resolveLocal):
2121         * style/StyleResolveTree.h:
2122         (WebCore::Style::AttachContext::AttachContext):
2123         
2124             From Element::AttachContext
2125
2126         * svg/SVGTests.cpp:
2127         (WebCore::SVGTests::handleAttributeChange):
2128         * xml/XMLErrors.cpp:
2129         (WebCore::XMLErrors::insertErrorMessageBlock):
2130         * xml/parser/XMLDocumentParserLibxml2.cpp:
2131         (WebCore::XMLDocumentParser::startElementNs):
2132
2133 2013-08-18  Antti Koivisto  <antti@apple.com>
2134
2135         Fix crashing plugin tests caused by a logic error in the previous patch.
2136         
2137         Not reviewed.
2138
2139         * html/HTMLPlugInImageElement.cpp:
2140         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
2141
2142 2013-08-18  Antti Koivisto  <antti@apple.com>
2143
2144         <https://webkit.org/b/119982> Make Element::attach non-virtual
2145
2146         Reviewed by Andreas Kling.
2147
2148         This will give us more future refactoring options.
2149
2150         * dom/Element.cpp:
2151         (WebCore::Element::attach):
2152         (WebCore::Element::detach):
2153         
2154             Make non-virtual. Call element type specific custom functions as needed.
2155
2156         (WebCore::Element::styleForRenderer):
2157         (WebCore::Element::willRecalcStyle):
2158         (WebCore::Element::didRecalcStyle):
2159         (WebCore::Element::willAttachRenderers):
2160         (WebCore::Element::didAttachRenderers):
2161         (WebCore::Element::willDetachRenderers):
2162         (WebCore::Element::didDetachRenderers):
2163         
2164             Add virtual custom callbacks.
2165
2166         (WebCore::Element::customStyleForRenderer):
2167         * dom/Element.h:
2168         * dom/Node.h:
2169         (WebCore::Node::pseudoId):
2170         (WebCore::Node::hasCustomStyleResolveCallbacks):
2171         (WebCore::Node::setHasCustomStyleResolveCallbacks):
2172         
2173             Use the existing bit as it largely overlaps. Rename for clarity.
2174
2175         (WebCore::Node::customPseudoId):
2176         * dom/PseudoElement.cpp:
2177         (WebCore::PseudoElement::PseudoElement):
2178         (WebCore::PseudoElement::didAttachRenderers):
2179         * dom/PseudoElement.h:
2180         * html/HTMLCanvasElement.cpp:
2181         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2182         (WebCore::HTMLCanvasElement::willAttachRenderers):
2183         * html/HTMLCanvasElement.h:
2184         * html/HTMLFormControlElement.cpp:
2185         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2186         (WebCore::HTMLFormControlElement::didAttachRenderers):
2187         * html/HTMLFormControlElement.h:
2188         * html/HTMLFrameElement.cpp:
2189         (WebCore::HTMLFrameElement::HTMLFrameElement):
2190         (WebCore::HTMLFrameElement::didAttachRenderers):
2191         * html/HTMLFrameElement.h:
2192         * html/HTMLFrameElementBase.cpp:
2193         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2194         (WebCore::HTMLFrameElementBase::didAttachRenderers):
2195         * html/HTMLFrameElementBase.h:
2196         * html/HTMLFrameSetElement.cpp:
2197         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
2198         (WebCore::HTMLFrameSetElement::willAttachRenderers):
2199         * html/HTMLFrameSetElement.h:
2200         * html/HTMLIFrameElement.cpp:
2201         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2202         * html/HTMLImageElement.cpp:
2203         (WebCore::HTMLImageElement::HTMLImageElement):
2204         (WebCore::HTMLImageElement::didAttachRenderers):
2205         * html/HTMLImageElement.h:
2206         * html/HTMLInputElement.cpp:
2207         (WebCore::HTMLInputElement::HTMLInputElement):
2208         (WebCore::HTMLInputElement::willAttachRenderers):
2209         (WebCore::HTMLInputElement::didAttachRenderers):
2210         (WebCore::HTMLInputElement::didDetachRenderers):
2211         * html/HTMLInputElement.h:
2212         * html/HTMLLIElement.cpp:
2213         (WebCore::HTMLLIElement::HTMLLIElement):
2214         (WebCore::HTMLLIElement::didAttachRenderers):
2215         * html/HTMLLIElement.h:
2216         * html/HTMLMediaElement.cpp:
2217         (WebCore::HTMLMediaElement::HTMLMediaElement):
2218         (WebCore::HTMLMediaElement::willAttachRenderers):
2219         (WebCore::HTMLMediaElement::didAttachRenderers):
2220         * html/HTMLMediaElement.h:
2221         * html/HTMLOptGroupElement.cpp:
2222         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
2223         (WebCore::HTMLOptGroupElement::didAttachRenderers):
2224         (WebCore::HTMLOptGroupElement::willDetachRenderers):
2225         * html/HTMLOptGroupElement.h:
2226         * html/HTMLOptionElement.cpp:
2227         (WebCore::HTMLOptionElement::HTMLOptionElement):
2228         (WebCore::HTMLOptionElement::didAttachRenderers):
2229         (WebCore::HTMLOptionElement::willDetachRenderers):
2230         * html/HTMLOptionElement.h:
2231         * html/HTMLPlugInElement.cpp:
2232         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2233         (WebCore::HTMLPlugInElement::willDetachRenderers):
2234         * html/HTMLPlugInElement.h:
2235         * html/HTMLPlugInImageElement.cpp:
2236         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2237         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
2238         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
2239         * html/HTMLPlugInImageElement.h:
2240         * html/HTMLProgressElement.cpp:
2241         (WebCore::HTMLProgressElement::HTMLProgressElement):
2242         (WebCore::HTMLProgressElement::didAttachRenderers):
2243         * html/HTMLProgressElement.h:
2244         * html/HTMLTextAreaElement.cpp:
2245         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2246         (WebCore::HTMLTextAreaElement::didAttachRenderers):
2247         * html/HTMLTextAreaElement.h:
2248         * html/HTMLVideoElement.cpp:
2249         (WebCore::HTMLVideoElement::HTMLVideoElement):
2250         (WebCore::HTMLVideoElement::didAttachRenderers):
2251         * html/HTMLVideoElement.h:
2252         * html/shadow/InsertionPoint.cpp:
2253         (WebCore::InsertionPoint::InsertionPoint):
2254         (WebCore::InsertionPoint::willAttachRenderers):
2255         (WebCore::InsertionPoint::willDetachRenderers):
2256         * html/shadow/InsertionPoint.h:
2257         * html/shadow/SliderThumbElement.cpp:
2258         (WebCore::SliderThumbElement::SliderThumbElement):
2259         (WebCore::SliderThumbElement::willDetachRenderers):
2260         * html/shadow/SliderThumbElement.h:
2261         * html/shadow/SpinButtonElement.cpp:
2262         (WebCore::SpinButtonElement::SpinButtonElement):
2263         (WebCore::SpinButtonElement::willDetachRenderers):
2264         * html/shadow/SpinButtonElement.h:
2265         * html/shadow/TextControlInnerElements.cpp:
2266         (WebCore::TextControlInnerElement::TextControlInnerElement):
2267         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
2268         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2269         (WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
2270         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2271         (WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
2272         (WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
2273         * html/shadow/TextControlInnerElements.h:
2274         * style/StyleResolveTree.cpp:
2275         (WebCore::Style::resolveTree):
2276         * svg/SVGElement.cpp:
2277         (WebCore::SVGElement::SVGElement):
2278         * svg/SVGImageElement.cpp:
2279         (WebCore::SVGImageElement::SVGImageElement):
2280         (WebCore::SVGImageElement::didAttachRenderers):
2281         * svg/SVGImageElement.h:
2282         * svg/SVGUseElement.cpp:
2283         (WebCore::SVGUseElement::SVGUseElement):
2284
2285 2013-08-18  Gavin Barraclough  <barraclough@apple.com>
2286
2287         https://bugs.webkit.org/show_bug.cgi?id=119972
2288         Add attributes field to PropertySlot
2289
2290         Reviewed by Geoff Garen.
2291
2292         For all JSC types, this makes getOwnPropertyDescriptor redundant.
2293         There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
2294         (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
2295
2296         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2297         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
2298         * bindings/js/JSDOMWindowCustom.cpp:
2299         (WebCore::JSDOMWindow::getOwnPropertySlot):
2300         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2301         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
2302         * bindings/js/JSHistoryCustom.cpp:
2303         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2304         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
2305         * bindings/js/JSLocationCustom.cpp:
2306         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2307         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
2308         * bindings/js/JSPluginElementFunctions.cpp:
2309         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
2310         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
2311         * bindings/scripts/CodeGeneratorJS.pm:
2312         (GenerateGetOwnPropertySlotBody):
2313         (GenerateGetOwnPropertyDescriptorBody):
2314         (GenerateImplementation):
2315         * bridge/runtime_array.cpp:
2316         (JSC::RuntimeArray::getOwnPropertySlot):
2317         (JSC::RuntimeArray::getOwnPropertyDescriptor):
2318         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
2319         * bridge/runtime_method.cpp:
2320         (JSC::RuntimeMethod::getOwnPropertySlot):
2321         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
2322         * bridge/runtime_object.cpp:
2323         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
2324         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2325             - Pass attributes to PropertySlot::set* methods.
2326
2327 2013-08-18  Ryosuke Niwa  <rniwa@webkit.org>
2328
2329         <https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines
2330
2331         Reviewed by Darin Adler.
2332
2333         Inspired by https://chromium.googlesource.com/chromium/blink/+/6152a12f7ace27beea4d284ff8416631e8aa5217.
2334
2335         The bug was caused by createFragmentFromText's falsely assuming that the newline were not preserved
2336         if the first node's renderer didn't exist.
2337
2338         Fixed the bug by obtaining the renderer of the container of the first visible position in the context.
2339
2340         Test: editing/pasteboard/paste-into-textarea-with-new-line.html
2341
2342         * editing/markup.cpp:
2343         (WebCore::contextPreservesNewline):
2344         (WebCore::createFragmentFromText):
2345
2346 2013-08-18  Andreas Kling  <akling@apple.com>
2347
2348         <https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
2349
2350         Reviewed by Antti Koivisto.
2351
2352         * html/HTMLLinkElement.cpp:
2353         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2354
2355 2013-08-18  Andreas Kling  <akling@apple.com>
2356
2357         <https://webkit.org/b/119981> Move ElementData & co to their own files.
2358
2359         Reviewed by Antti Koivisto.
2360
2361         I like to move it move it.
2362
2363 2013-08-18  David Kilzer  <ddkilzer@apple.com>
2364
2365         BUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled
2366
2367         Fixes the following build failure:
2368
2369             WebCore/rendering/RenderBlock.cpp:1529:53: error: unused parameter 'heightChanged' [-Werror,-Wunused-parameter]
2370             void RenderBlock::updateShapesAfterBlockLayout(bool heightChanged)
2371                                                                 ^
2372             1 error generated.
2373
2374         * rendering/RenderBlock.cpp:
2375         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Add
2376         UNUSED_PARAM(heightChanged) when CSS_SHAPES is disabled.
2377
2378 2013-08-18  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
2379
2380         [EFL] minor method name fix for the textTrackOffMenuItemText method
2381         https://bugs.webkit.org/show_bug.cgi?id=119978
2382
2383         the method textTrackOffMenuItemText was renamed in
2384         https://bugs.webkit.org/show_bug.cgi?id=113822
2385
2386         Reviewed by Christophe Dumez.
2387
2388         * platform/efl/LocalizedStringsEfl.cpp:
2389         (WebCore::textTrackOffMenuItemText):
2390
2391 2013-08-17  Antti Koivisto  <antti@apple.com>
2392
2393         <https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement
2394
2395         Reviewed by Andreas Kling.
2396
2397         * dom/StyleElement.cpp:
2398         (WebCore::StyleElement::process):
2399         
2400             Use TextNodeTraversal::contentsAsString for the sheet text. The overflow check is removed as StringBuilder 
2401             (which is used by contentsAsString) does that itself. The behavior in case of overflow changes from empty
2402             sheet to CRASH(). Thats what we do elsewhere in similar situations too (scripts for example). Continuing
2403             with > 4GB of style sheet text nodes is probably not going to go well anyway.
2404
2405 2013-08-17  Antti Koivisto  <antti@apple.com>
2406
2407         <https://webkit.org/b/119960> Remove some optimizations made obsolete by use of StringBuilder
2408
2409         Reviewed by Andreas Kling.
2410
2411         * dom/ScriptElement.cpp:
2412         (WebCore::ScriptElement::scriptContent):
2413         
2414             StringBuilder already optimizes for the single string case. If there is only one the original string is returned.
2415
2416         * dom/Text.cpp:
2417         (WebCore::Text::wholeText):
2418         
2419             No need to traverse twice to compute the capacity. StringBuilder handles this efficiently. 
2420             Also in the common case there is only one string and the optimization here is actually hurting by disabling the StringBuilder one.
2421
2422 2013-08-17  Antti Koivisto  <antti@apple.com>
2423
2424         <https://webkit.org/b/119959> Add TextNodeTraversal
2425
2426         Reviewed by Andreas Kling.
2427
2428         Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.
2429         
2430         Use it where appropriate.
2431
2432         * WebCore.xcodeproj/project.pbxproj:
2433         * dom/Attr.cpp:
2434         (WebCore::Attr::childrenChanged):
2435         * dom/NodeTraversal.h:
2436         (WebCore::NodeTraversal::next):
2437         * dom/ScriptElement.cpp:
2438         (WebCore::ScriptElement::scriptContent):
2439         * dom/Text.cpp:
2440         (WebCore::Text::wholeText):
2441         * dom/Text.h:
2442         (WebCore::toText):
2443         * dom/TextNodeTraversal.cpp: Added.
2444         (WebCore::TextNodeTraversal::appendContents):
2445         (WebCore::TextNodeTraversal::contentsAsString):
2446         
2447             Helpers for getting text content of a subtree.
2448
2449         * dom/TextNodeTraversal.h: Added.
2450         (WebCore::TextNodeTraversal::firstTextChildTemplate):
2451         (WebCore::TextNodeTraversal::firstChild):
2452         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
2453         (WebCore::TextNodeTraversal::firstWithin):
2454         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
2455         (WebCore::TextNodeTraversal::next):
2456         (WebCore::TextNodeTraversal::nextSibling):
2457         * editing/ApplyStyleCommand.cpp:
2458         (WebCore::ApplyStyleCommand::joinChildTextNodes):
2459         * html/HTMLTextAreaElement.cpp:
2460         (WebCore::HTMLTextAreaElement::defaultValue):
2461         (WebCore::HTMLTextAreaElement::setDefaultValue):
2462         * html/HTMLTitleElement.cpp:
2463         (WebCore::HTMLTitleElement::text):
2464         * html/track/TextTrackCue.cpp:
2465         (WebCore::TextTrackCue::determineTextDirection):
2466         * page/Frame.cpp:
2467         (WebCore::Frame::searchForLabelsAboveCell):
2468         * xml/XPathUtil.cpp:
2469         (WebCore::XPath::stringValue):
2470
2471 2013-08-17  Andreas Kling  <akling@apple.com>
2472
2473         <https://webkit.org/b/119957> Page::contextMenuController() should return a reference.
2474
2475         Reviewed by Antti Koivisto.
2476
2477         Page::m_contextMenuController is never null.
2478
2479         * page/Page.h:
2480         (WebCore::Page::contextMenuController):
2481
2482 2013-08-17  Andreas Kling  <akling@apple.com>
2483
2484         <https://webkit.org/b/119954> Page::dragCaretController() should return a reference.
2485
2486         Reviewed by Antti Koivisto.
2487
2488         Page::m_dragCaretController is never null.
2489
2490         * dom/Document.cpp:
2491         (WebCore::Document::nodeChildrenWillBeRemoved):
2492         (WebCore::Document::nodeWillBeRemoved):
2493         * page/DragController.cpp:
2494         (WebCore::DragController::cancelDrag):
2495         (WebCore::DragController::dragEnded):
2496         (WebCore::DragController::tryDocumentDrag):
2497         (WebCore::DragController::dispatchTextInputEventFor):
2498         (WebCore::DragController::concludeEditDrag):
2499         (WebCore::DragController::placeDragCaret):
2500         * page/Page.h:
2501         (WebCore::Page::dragCaretController):
2502         * rendering/RenderBlock.cpp:
2503         (WebCore::RenderBlock::paintCaret):
2504
2505 2013-08-17  Andreas Kling  <akling@apple.com>
2506
2507         <https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.
2508
2509         Reviewed by Antti Koivisto.
2510
2511         Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
2512         has no interest in observing frame destruction since its own destruction will soon follow.
2513
2514         Editor::m_frame is now a reference instead of a pointer. Removed some null checking.
2515
2516 2013-08-17  Andreas Kling  <akling@apple.com>
2517
2518         <https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.
2519
2520         Reviewed by Antti Koivisto.
2521
2522         This callback was only used by the Chromium port.
2523
2524         * editing/Editor.h:
2525         * editing/Editor.cpp:
2526
2527             Remove override of FrameDestructionObserver::willDetachPage().
2528
2529         * page/EditorClient.h:
2530
2531             Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.
2532
2533 2013-08-16  Antti Koivisto  <antti@apple.com>
2534
2535         <https://webkit.org/b/119886> PseudoElement is abusing parent node pointer
2536
2537         Reviewed by Darin Adler.
2538
2539         PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
2540         the basic tree consistency (a node is a child node of its parent node).
2541         
2542         This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
2543         impact is negligible as there are not that many ::befores and ::afters.
2544
2545         * dom/ComposedShadowTreeWalker.cpp:
2546         (WebCore::ComposedShadowTreeWalker::traverseParent):
2547         * dom/EventPathWalker.cpp:
2548         (WebCore::EventPathWalker::moveToParent):
2549         * dom/EventRetargeter.h:
2550         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
2551         * dom/Node.cpp:
2552         (WebCore::Node::~Node):
2553         
2554             Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.
2555
2556         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
2557         * dom/PseudoElement.cpp:
2558         (WebCore::PseudoElement::PseudoElement):
2559         (WebCore::PseudoElement::customStyleForRenderer):
2560         * dom/PseudoElement.h:
2561         (WebCore::toPseudoElement):
2562         
2563             Add casting functions.
2564
2565         * inspector/InspectorLayerTreeAgent.cpp:
2566         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2567         * rendering/HitTestResult.cpp:
2568         (WebCore::HitTestResult::setInnerNode):
2569         (WebCore::HitTestResult::setInnerNonSharedNode):
2570
2571 2013-08-17  Darin Adler  <darin@apple.com>
2572
2573         <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
2574
2575         Reviewed by Andreas Kling.
2576
2577         * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
2578         All three are just unneeded forwarding to pasteboard.
2579         * dom/Clipboard.h: Ditto.
2580
2581         * page/DragController.cpp:
2582         (WebCore::DragController::startDrag): Move the logic in here. Later we might
2583         want to straighten this out a bit, perhaps using functions in Editor, but it's
2584         not much code so fine to just have it here for now.
2585
2586 2013-08-17  Darin Adler  <darin@apple.com>
2587
2588         <https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
2589
2590         Reviewed by Andreas Kling.
2591
2592         * dom/Clipboard.cpp:
2593         (WebCore::Clipboard::Clipboard):
2594         (WebCore::Clipboard::~Clipboard):
2595         * dom/Clipboard.h:
2596         Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS, LEGACY_VIRTUAL, and LEGACY_PURE.
2597         Keep only the !USE(LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS) side of all conditionals.
2598
2599 2013-08-17  Darin Adler  <darin@apple.com>
2600
2601         <https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler
2602
2603         Reviewed by Andreas Kling.
2604
2605         Later it would be good to move this all to DragController, but there is no reason to have
2606         these functions as member functions of the DOM-exposed Clipboard class.
2607
2608         * dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
2609         convertDragOperationToDropZoneOperation.
2610         * dom/Clipboard.h: Ditto.
2611
2612         * page/EventHandler.cpp:
2613         (WebCore::convertDropZoneOperationToDragOperation): Moved here.
2614         (WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
2615         (WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
2616         canReadTypes check because Clipboard::files already takes care of that.
2617         (WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
2618         Added a check for the null string because HashSet::contains will not work on a null string.
2619         (WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
2620         (WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.
2621
2622 2013-08-17  Darin Adler  <darin@apple.com>
2623
2624         <https://webkit.org/b/119943> Clean up the Document class a bit
2625
2626         Reviewed by Antti Koivisto.
2627
2628         * dom/Document.cpp:
2629         (WebCore::Document::~Document): Fixed typo in comment.
2630         (WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
2631         Also name local variable just loader rather than documentLoader.
2632         (WebCore::Document::updateTitle): Call loader rather than going indirectly
2633         through frame to get to the loader.
2634         (WebCore::Document::setTitleElement): Fixed formatting (add braces).
2635         (WebCore::Document::removeTitle): Iterate elements instead of nodes.
2636         (WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
2637         styleForPage to avoid the need for a simple forwarding function. Also
2638         eliminated local variable to increase clarity.
2639         (WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
2640         to call styleForPage to avoid the need for a simple forwarding function.
2641         (WebCore::Document::setIsViewSource): Renamed a local variable.
2642
2643         * dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
2644         styleForPage functions.
2645
2646         * loader/FrameLoader.cpp: Removed unnneeded setTitle function.
2647         * loader/FrameLoader.h: Ditto.
2648
2649         * page/PrintContext.cpp:
2650         (WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
2651         styleForPage to avoid the need for a simple forwarding function.
2652
2653 2013-08-17  Darin Adler  <darin@apple.com>
2654
2655         <https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code
2656
2657         Reviewed by Andreas Kling.
2658
2659         * PlatformWinCE.cmake: Removed EditorWin.cpp.
2660         * WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
2661         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
2662         * WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
2663         ClipboardIOS.mm, and also let Xcode edit/reorder this file.
2664
2665         * editing/Editor.cpp:
2666         (WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
2667         class code. Will remove the rest later.
2668
2669         * editing/Editor.h: Removed declaration of newGeneralClipboard.
2670
2671         * platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
2672         comment to make it clearer.
2673
2674         * platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
2675         * platform/efl/PasteboardEfl.cpp: Ditto.
2676         * platform/ios/PasteboardIOS.mm: Ditto.
2677         * platform/win/PasteboardWin.cpp: Ditto.
2678
2679         * platform/ios/ClipboardIOS.h: Removed. Was an empty file.
2680         * platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
2681         * platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
2682         a function that is never called.
2683
2684 2013-08-17  Darin Adler  <darin@apple.com>
2685
2686         <https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation
2687
2688         Reviewed by Andreas Kling.
2689
2690         * dom/Clipboard.h: Removed unused dragLocation member function.
2691         Renamed m_dragLoc to m_dragLocation.
2692
2693         * dom/Clipboard.cpp:
2694         (WebCore::Clipboard::setDragImage):
2695         * platform/gtk/ClipboardGtk.cpp:
2696         (WebCore::Clipboard::createDragImage):
2697         * platform/mac/ClipboardMac.mm:
2698         (WebCore::Clipboard::createDragImage):
2699         * platform/qt/ClipboardQt.cpp:
2700         (WebCore::Clipboard::createDragImage):
2701         * platform/win/ClipboardWin.cpp:
2702         (WebCore::Clipboard::createDragImage):
2703         Updated for new name.
2704
2705 2013-08-17  Darin Adler  <darin@apple.com>
2706
2707         <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument
2708
2709         Reviewed by Andreas Kling.
2710
2711         The Element::document is a simpler faster alternative to Element::ownerDocument.
2712         The only behavior difference between the two is that ownerDocument returns 0 when
2713         called on a Document.
2714
2715         * html/HTMLMediaElement.cpp:
2716         (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
2717         (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
2718         document and call to ownerDocument, since ownerDocument will never return non-null
2719         if document returns null.
2720         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
2721         of ownerDocument.
2722
2723         * inspector/DOMEditor.cpp:
2724         (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
2725
2726         * inspector/InspectorCSSAgent.cpp:
2727         (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
2728         (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
2729         (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
2730
2731         * inspector/InspectorDOMAgent.cpp:
2732         (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
2733         does the same thing in a roundabout way.
2734         (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
2735         (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
2736         does the same thing in a roundabout way.
2737
2738         * page/DragController.cpp:
2739         (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
2740
2741         * svg/SVGElementInstance.cpp:
2742         (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
2743
2744 2013-08-17  Darin Adler  <darin@apple.com>
2745
2746         <https://webkit.org/b/119941> Make Page::dragController return a reference
2747
2748         Reviewed by Andreas Kling.
2749
2750         * page/Page.h:
2751         (WebCore::Page::dragController): Return a reference instead of a pointer.
2752
2753         * page/DragController.cpp:
2754         (WebCore::DragController::concludeEditDrag):
2755         * page/EventHandler.cpp:
2756         (WebCore::EventHandler::eventMayStartDrag):
2757         (WebCore::EventHandler::updateDragSourceActionsAllowed):
2758         (WebCore::EventHandler::handleDrag):
2759         * page/mac/EventHandlerMac.mm:
2760         (WebCore::EventHandler::passSubframeEventToSubframe):
2761         Updated call sites.
2762
2763 2013-08-17  Morten Stenshorne  <mstensho@opera.com>
2764
2765         <https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
2766
2767         Reviewed by Darin Adler.
2768
2769         Since the flow thread is a direct child of RenderView, it doesn't inherit
2770         proper writing-mode automatically. It should be mentioned that if the thread's
2771         contents' writing-mode differs from that of the first region, things are
2772         typically going to look useless (although perhaps that's how it should be),
2773         but as long as writing-mode is only specified on a common parent of the
2774         thread's contents and the regions, things look fine, and also, we're now
2775         following what the spec has to say on the matter:
2776
2777         http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-flow-into-property
2778
2779             "The first region defines the principal writing mode for the entire flow.
2780              The writing mode on subsequent regions is ignored."
2781
2782         This is a back-port of the fix for Blink bug 257965.
2783         Reviewed by esprehn and mihnea there.
2784         Blink review URL: https://chromiumcodereview.appspot.com/18374008
2785
2786         Tests: fast/regions/changing-writing-mode-2.html
2787                fast/regions/changing-writing-mode-3.html
2788                fast/regions/changing-writing-mode-4.html
2789                fast/regions/changing-writing-mode-5.html
2790                fast/regions/changing-writing-mode.html
2791                fast/regions/invalid-first-region-with-writing-mode-2.html
2792                fast/regions/invalid-first-region-with-writing-mode.html
2793                fast/regions/subtree-with-horiz-bt.html
2794                fast/regions/subtree-with-horiz-tb.html
2795                fast/regions/subtree-with-vert-lr.html
2796                fast/regions/subtree-with-vert-rl.html
2797
2798         * rendering/RenderFlowThread.cpp:
2799         (WebCore::RenderFlowThread::styleDidChange):
2800         * rendering/RenderFlowThread.h:
2801         * rendering/RenderNamedFlowThread.cpp:
2802         (WebCore::RenderNamedFlowThread::updateWritingMode):
2803         (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread):
2804         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
2805         (WebCore::RenderNamedFlowThread::regionChangedWritingMode):
2806         * rendering/RenderNamedFlowThread.h:
2807         * rendering/RenderRegion.cpp:
2808         (WebCore::RenderRegion::styleDidChange):
2809
2810 2013-08-16  Andreas Kling  <akling@apple.com>
2811
2812         <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
2813
2814         Reviewed by Geoff Garen.
2815
2816         Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
2817         It now also returns a reference, as it can never be null.
2818
2819         Removed 8.8 million lines of null-checking as a result.
2820
2821 2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
2822
2823         <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
2824
2825         Reviewed by Benjamin Poulain.
2826
2827         Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
2828         the first root editable element exactly once.
2829
2830         * dom/Node.cpp:
2831         (WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
2832         when we don't have to check RenderStyle's value.
2833         * editing/htmlediting.cpp:
2834         (WebCore::highestEditableRoot):
2835
2836 2013-08-16  Benjamin Poulain  <benjamin@webkit.org>
2837
2838         Remove a useless #include of SelectorChecker.h
2839
2840         Rubber-stamped by Ryosuke Niwa.
2841
2842         * dom/DocumentStyleSheetCollection.cpp:
2843
2844 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
2845
2846         [Windows] Update RenderMediaControls for new API
2847         https://bugs.webkit.org/show_bug.cgi?id=119910
2848
2849         Reviewed by Eric Carlson.
2850
2851         * rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
2852         the changed API.
2853
2854 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
2855
2856         <https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
2857
2858         Reviewed by Simon Fraser.
2859
2860         No new tests required, just a build fix.
2861
2862         Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
2863         keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.
2864
2865         * css/CSSValueKeywords.in:
2866         * css/SVGCSSValueKeywords.in:
2867
2868 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
2869
2870         <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
2871
2872         Reviewed by Alexey Proskuryakov.
2873
2874         WTF::currentTime() is prone to DST changes and NTP adjustments, so use
2875         WTF::monotonicallyIncreasingTime() to measure elapsed time.
2876         
2877         * Modules/filesystem/FileWriter.cpp:
2878         (WebCore::FileWriter::didWrite):
2879         * dom/Document.cpp:
2880         (WebCore::Document::Document):
2881         (WebCore::Document::elapsedTime):
2882         (WebCore::Document::resetLastHandledUserGestureTimestamp):
2883         * dom/Element.cpp:
2884         (WebCore::Element::setActive):
2885         * fileapi/FileReader.cpp:
2886         (WebCore::FileReader::didReceiveData):
2887         * html/HTMLMediaElement.cpp:
2888         (WebCore::HTMLMediaElement::HTMLMediaElement):
2889         (WebCore::HTMLMediaElement::startProgressEventTimer):
2890         (WebCore::HTMLMediaElement::progressEventTimerFired):
2891         (WebCore::HTMLMediaElement::refreshCachedTime):
2892         (WebCore::HTMLMediaElement::invalidateCachedTime):
2893         (WebCore::HTMLMediaElement::currentTime):
2894         (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
2895         (WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
2896         * html/HTMLMediaElement.h:
2897         * html/HTMLPlugInImageElement.cpp:
2898         (WebCore::documentHadRecentUserGesture):
2899         * html/MediaController.cpp:
2900         (MediaController::scheduleTimeupdateEvent):
2901         * html/parser/HTMLDocumentParser.cpp:
2902         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2903         * html/parser/HTMLParserScheduler.h:
2904         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
2905         * inspector/InspectorCSSAgent.cpp:
2906         (WebCore::SelectorProfile::SelectorProfile):
2907         (WebCore::SelectorProfile::totalMatchingTimeMs):
2908         (WebCore::SelectorProfile::startSelector):
2909         (WebCore::SelectorProfile::commitSelector):
2910         (WebCore::SelectorProfile::commitSelectorTime):
2911         * inspector/InspectorProfilerAgent.cpp:
2912         (WebCore::InspectorProfilerAgent::willProcessTask):
2913         (WebCore::InspectorProfilerAgent::didProcessTask):
2914         * inspector/InspectorTimelineAgent.cpp:
2915         (WebCore::InspectorTimelineAgent::timestamp):
2916         * inspector/TimelineTraceEventProcessor.cpp:
2917         (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
2918         * page/FrameView.cpp:
2919         (WebCore::FrameView::adjustedDeferredRepaintDelay):
2920         (WebCore::FrameView::paintContents):
2921         * platform/ClockGeneric.cpp:
2922         (ClockGeneric::now):
2923         * platform/ScrollAnimatorNone.cpp:
2924         (WebCore::ScrollAnimatorNone::scroll):
2925         (WebCore::ScrollAnimatorNone::animationTimerFired):
2926         * platform/graphics/cg/ImageBufferCG.cpp:
2927         (WebCore::ImageBuffer::ImageBuffer):
2928         (WebCore::ImageBuffer::flushContextIfNecessary):
2929         (WebCore::ImageBuffer::flushContext):
2930         (WebCore::ImageBuffer::copyNativeImage):
2931
2932 2013-08-16  peavo@outlook.com  <peavo@outlook.com>
2933
2934         <https://webkit.org/b/119891> [WinCairo] Compile error.
2935
2936         Reviewed by Brent Fulgham.
2937
2938         * rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
2939         * rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.
2940
2941 2013-08-16  Zan Dobersek  <zdobersek@igalia.com>
2942
2943         <https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have a proper SoupSession
2944
2945         Reviewed by Martin Robinson.
2946
2947         After r154144, a testing NetworkStorageSession is enforced when running the layout tests
2948         through WebKitTestRunner. Ports using the Soup networking backend don't assign any SoupSession
2949         objects to such NetworkStorageSession objects as it's usually the case. This is causing problems
2950         as the ResourceHandleInternal uses the SoupSession that's provided by the NetworkingContext's
2951         NetworkStorageSession, which ends up being null if the testing-specific NetworkStorageSession is used.
2952         As a result, all the layout tests are crashing under WKTR.
2953
2954         * platform/network/NetworkStorageSession.h: Make the SoupSession member a GRefPtr.
2955         (WebCore::NetworkStorageSession::soupSession): Return the GRefPtr's pointer.
2956         * platform/network/ResourceHandle.h: Declare the new createTestingSession method.
2957         * platform/network/soup/CookieJarSoup.cpp: 
2958         (WebCore::cookieJarForSession): Instead of returning the default SoupCookieJar when there's no SoupSession
2959         provided by the NetworkStorageSession, assert that there now always is one, and return the session's cookie
2960         jar. For testing NetworkStorageSession objects, their SoupSession objects will always use the default cookie jar.
2961         * platform/network/soup/NetworkStorageSessionSoup.cpp:
2962         (WebCore::NetworkStorageSession::NetworkStorageSession): Adopt the given SoupSession reference pointer.
2963         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a newly-created, testing-specific SoupSession.
2964         * platform/network/soup/ResourceHandleSoup.cpp:
2965         (WebCore::ResourceHandle::createTestingSession): Define the new createTestingSession method. It creates a new
2966         SoupSession through createSoupSession, but uses the default SoupCookieJar, as provided by WebCore::soupCookieJar.
2967
2968 2013-08-16  Pratik Solanki  <psolanki@apple.com>
2969
2970         <https://webkit.org/b/119852> Frame::scriptController() should return a reference
2971
2972         Reviewed by Andreas Kling.
2973
2974         m_script is never NULL so we can just return a reference. Also remove some pointless null
2975         checks as a result of doing this.
2976
2977         * Modules/websockets/WebSocket.cpp:
2978         (WebCore::WebSocket::connect):
2979         * bindings/js/JSDOMWindowBase.cpp:
2980         (WebCore::toJS):
2981         (WebCore::toJSDOMWindow):
2982         * bindings/js/JSDOMWindowShell.cpp:
2983         (WebCore::toJS):
2984         (WebCore::toJSDOMWindowShell):
2985         * bindings/js/JSEventListener.cpp:
2986         (WebCore::JSEventListener::handleEvent):
2987         * bindings/js/JSLazyEventListener.cpp:
2988         (WebCore::JSLazyEventListener::initializeJSFunction):
2989         * bindings/js/PageScriptDebugServer.cpp:
2990         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
2991         * bindings/js/ScheduledAction.cpp:
2992         (WebCore::ScheduledAction::execute):
2993         * bindings/js/ScriptCachedFrameData.cpp:
2994         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2995         (WebCore::ScriptCachedFrameData::restore):
2996         * bindings/js/ScriptEventListener.cpp:
2997         (WebCore::createAttributeEventListener):
2998         (WebCore::eventListenerHandlerScriptState):
2999         * bindings/js/ScriptState.cpp:
3000         (WebCore::mainWorldScriptState):
3001         (WebCore::scriptStateFromNode):
3002         (WebCore::scriptStateFromPage):
3003         * bindings/objc/DOM.mm:
3004         (-[DOMNode JSC::Bindings::]):
3005         * bindings/objc/DOMInternal.mm:
3006         (-[WebScriptObject _initializeScriptDOMNodeImp]):
3007         * dom/Document.cpp:
3008         (WebCore::Document::disableEval):
3009         (WebCore::Document::ensurePlugInsInjectedScript):
3010         * dom/ScriptElement.cpp:
3011         (WebCore::ScriptElement::prepareScript):
3012         (WebCore::ScriptElement::executeScript):
3013         * history/CachedFrame.cpp:
3014         (WebCore::CachedFrameBase::restore):
3015         * html/HTMLCanvasElement.cpp:
3016         (WebCore::HTMLCanvasElement::createRenderer):
3017         * html/HTMLElement.cpp:
3018         (WebCore::HTMLElement::rendererIsNeeded):
3019         * html/HTMLMediaElement.cpp:
3020         (WebCore::HTMLMediaElement::controls):
3021         * html/HTMLPlugInElement.cpp:
3022         (WebCore::HTMLPlugInElement::getInstance):
3023         (WebCore::HTMLPlugInElement::getNPObject):
3024         * html/HTMLPlugInImageElement.cpp:
3025         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3026         * html/parser/HTMLParserOptions.cpp:
3027         (WebCore::HTMLParserOptions::HTMLParserOptions):
3028         * inspector/InspectorAgent.cpp:
3029         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
3030         * inspector/InspectorClient.cpp:
3031         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
3032         * inspector/InspectorFrontendClientLocal.cpp:
3033         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
3034         (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
3035         * inspector/InspectorOverlay.cpp:
3036         (WebCore::InspectorOverlay::evaluateInOverlay):
3037         * inspector/InspectorPageAgent.cpp:
3038         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
3039         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
3040         * inspector/PageRuntimeAgent.cpp:
3041         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3042         * loader/DocumentWriter.cpp:
3043         (WebCore::DocumentWriter::begin):
3044         * loader/FrameLoader.cpp:
3045         (WebCore::FrameLoader::urlSelected):
3046         (WebCore::FrameLoader::submitForm):
3047         (WebCore::FrameLoader::cancelAndClear):
3048         (WebCore::FrameLoader::clear):
3049         (WebCore::FrameLoader::prepareForCachedPageRestore):
3050         (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
3051         (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
3052         * loader/SubframeLoader.cpp:
3053         (WebCore::SubframeLoader::requestFrame):
3054         * loader/cache/CachedResourceLoader.cpp:
3055         (WebCore::CachedResourceLoader::canRequest):
3056         * page/EventSource.cpp:
3057         (WebCore::EventSource::create):
3058         * page/Frame.cpp:
3059         (WebCore::Frame::willDetachPage):
3060         * page/Frame.h:
3061         (WebCore::Frame::script):
3062         * page/Navigator.cpp:
3063         (WebCore::shouldHideFourDot):
3064         * page/Page.cpp:
3065         (WebCore::Page::setDebugger):
3066         * platform/graphics/wince/MediaPlayerProxy.cpp:
3067         (WebCore::WebMediaPlayerProxy::pluginInstance):
3068         (WebCore::WebMediaPlayerProxy::invokeMethod):
3069         * plugins/PluginView.cpp:
3070         (WebCore::PluginView::~PluginView):
3071         (WebCore::PluginView::performRequest):
3072         (WebCore::PluginView::load):
3073         (WebCore::PluginView::bindingInstance):
3074         (WebCore::PluginView::getValue):
3075         * plugins/efl/PluginViewEfl.cpp:
3076         (WebCore::PluginView::platformGetValue):
3077         * xml/XMLHttpRequest.cpp:
3078         (WebCore::XMLHttpRequest::open):
3079         * xml/XMLTreeViewer.cpp:
3080         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
3081
3082 2013-08-16  Andreas Kling  <akling@apple.com>
3083
3084         Attempt to fix the Qt/MountainLion build after r154142.
3085
3086         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3087         (WebCore::MediaPlayerPrivateQt::commitLoad):
3088
3089 2013-08-16  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3090
3091         [Qt] Kerning in fast font path breaks letter-spacing
3092         https://bugs.webkit.org/show_bug.cgi?id=119838
3093
3094         Reviewed by Jocelyn Turcotte.
3095
3096         Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.
3097
3098         Test: fast/text/letter-spacing-kerned.html
3099
3100         * platform/graphics/WidthIterator.h:
3101         (WebCore::WidthIterator::supportsTypesettingFeatures):
3102
3103 2013-08-16  Andreas Kling  <akling@apple.com>
3104
3105         <https://webkit.org/b/119893> FrameView::frame() should return a reference.
3106
3107         Reviewed by Antti Koivisto.
3108
3109         FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
3110         Leave it alone instead, and update the assertion that depended on this behavior.
3111         This enables us to make FrameView::frame() return a Frame&, exposing a ton of
3112         unnecessary null checks.
3113
3114         * history/CachedFrame.cpp:
3115         (WebCore::CachedFrame::destroy):
3116
3117             Remove call to FrameView::clearFrame() that was the only way to get a null
3118             FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
3119             the FrameView would get destroyed anyway.
3120
3121         (WebCore::CachedFrame::clear):
3122
3123             Update an assertion to support the case where the Document's Frame pointer has
3124             been cleared out and CachedFrame is still clinging to the FrameView.
3125
3126         * history/CachedPage.h:
3127
3128             Made CachedPage::destroy() private as it was only called by ~CachedPage().
3129
3130         * /:
3131
3132             Frame* FrameView::frame() => Frame& FrameView::frame()
3133
3134 2013-08-16  Brady Eidson  <beidson@apple.com>
3135
3136         (NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
3137         https://bugs.webkit.org/show_bug.cgi?id=119493
3138
3139         Reviewed by Alexey Proskuryakov.
3140
3141         No new tests (Covered by plenty of existing tests).
3142
3143         * WebCore.exp.in:
3144         * WebCore.xcodeproj/project.pbxproj:
3145
3146         * platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public
3147
3148         * platform/network/mac/ResourceHandleMac.mm:
3149         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.
3150
3151 2013-08-16  peavo@outlook.com  <peavo@outlook.com>
3152
3153         <https://webkit.org/b/119889> [WinCairo] Compile error.
3154
3155         Reviewed by Brent Fulgham.
3156
3157         * platform/network/curl/ResourceHandleManager.cpp:
3158         (WebCore::certificatePath): Use correct function name.
3159
3160 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
3161
3162         [Windows] Unreviewed build correction after r154165.
3163
3164         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
3165         to WebKit include location.
3166
3167 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
3168
3169         [Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
3170         https://bugs.webkit.org/show_bug.cgi?id=119818
3171
3172         Reviewed by Darin Adler.
3173
3174         Covered by existing: compositing/tiling/empty-to-tiled.html
3175
3176         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3177         (PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
3178         parent layer 
3179
3180 2013-08-16  Andreas Kling  <akling@apple.com>
3181
3182         <https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
3183
3184         Reviewed by Anders Carlsson.
3185
3186         Frame::m_eventHandler is never null.
3187
3188 2013-08-16  Commit Queue  <commit-queue@webkit.org>
3189
3190         Unreviewed, rolling out r153749.
3191         http://trac.webkit.org/changeset/153749
3192         https://bugs.webkit.org/show_bug.cgi?id=119892
3193
3194         The bison generation of the glslang* files has now been fixed. (Requested by zdobersek on #webkit).
3195
3196         * GNUmakefile.am:
3197
3198 2013-08-16  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
3199
3200         [GTK] fixing localizedString method name
3201         https://bugs.webkit.org/show_bug.cgi?id=119884
3202
3203         The method name defined in LocalizedStringsGtk.cpp doesn't not match
3204         the one used in LocalizedStrings.h
3205
3206         Reviewed by Gustavo Noronha Silva.
3207
3208         * platform/gtk/LocalizedStringsGtk.cpp:
3209         (WebCore::textTrackOffMenuItemText):
3210
3211 2013-08-16  Andrei Parvu  <parvu@adobe.com>
3212
3213         [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
3214         https://bugs.webkit.org/show_bug.cgi?id=119614
3215
3216         Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
3217         luminance. The default value is auto. This patch contains only the parsing of the property,
3218         not the actual implementation of the types of masks. The parsing of mask-source-type in the
3219         -webkit-mask property will be handled in a separate patch.
3220
3221         Reviewed by Dirk Schulze.
3222
3223         Test: fast/masking/parsing-mask-source-type.html
3224
3225         * css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
3226         (WebCore::ComputedStyleExtractor::propertyValue):
3227         * css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
3228         (WebCore::CSSParser::parseValue):
3229         (WebCore::CSSParser::parseFillProperty):
3230         * css/CSSProperty.cpp:
3231         (WebCore::CSSProperty::isInheritedProperty):
3232         * css/CSSPropertyNames.in: Added -webkit-mask-type property.
3233         * css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
3234         (WebCore::CSSToStyleMap::mapFillMaskType):
3235         * css/CSSToStyleMap.h:
3236         * css/DeprecatedStyleBuilder.cpp:
3237         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3238         * css/StyleResolver.cpp:
3239         (WebCore::StyleResolver::applyProperty):
3240         * rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
3241         (WebCore::FillLayer::FillLayer):
3242         (WebCore::FillLayer::operator=):
3243         (WebCore::FillLayer::operator==):
3244         * rendering/style/FillLayer.h: Added methods for working with m_maskType.
3245         (WebCore::FillLayer::maskType):
3246         (WebCore::FillLayer::isMaskTypeSet):
3247         (WebCore::FillLayer::setMaskType):
3248         (WebCore::FillLayer::clearMaskType):
3249         (WebCore::FillLayer::initialMaskType):
3250         * rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.
3251
3252 2013-08-16  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
3253
3254         <https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp
3255
3256         Reviewed by Gyuyoung Kim.
3257
3258         Now that r154109 has landed, all Bison versions (at least from 2.3 up
3259         to the latest 3.0) should be able to generate versions of glslang* that
3260         build correctly.
3261
3262         Since the idea is to remove the prebuilt files from future imports of
3263         ANGLE, always building our own versions is a good idea, and allows us
3264         to get rid of some very ugly CMake checks.
3265
3266         * CMakeLists.txt: Always build glslang.cpp and glslang_tab.cpp from
3267         DERIVED_SOURCES_WEBCORE_DIR.
3268
3269 2013-08-16  Julien Brianceau  <jbrianceau@nds.com>
3270
3271         <https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
3272
3273         Reviewed by Gyuyoung Kim.
3274
3275         Since r154142, Frame::loader() is a reference (and not a pointer anymore).
3276
3277         * xml/parser/XMLDocumentParserQt.cpp:
3278         (WebCore::XMLDocumentParser::parseStartElement):
3279
3280 2013-08-16  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
3281
3282         [WebGL] Vertex attribute binding validation method
3283         https://bugs.webkit.org/show_bug.cgi?id=119515
3284
3285         This patch refactors WebGLRenderingContext code by moving the vertex
3286         attribute binding validation to a separate method. It is now
3287         possible to use that validation in other parts of the code. The
3288         code is more clear now. 
3289
3290         Reviewed by Christophe Dumez.
3291
3292         No new tests. Covered by existing tests. No behaviour changed.
3293         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
3294         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
3295         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html
3296
3297         * html/canvas/WebGLRenderingContext.cpp:
3298         (WebCore::WebGLRenderingContext::validateVertexAttributes):
3299         * html/canvas/WebGLVertexArrayObjectOES.h:
3300         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
3301         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):
3302
3303 2013-08-15  Antti Koivisto  <antti@apple.com>
3304
3305         <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared
3306
3307         Reviewed by Andreas Kling.
3308
3309         Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
3310         pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
3311         want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
3312         traversing through.
3313         
3314         This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
3315         member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
3316         now always null in the root node.
3317         
3318         ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
3319
3320         * css/StyleResolver.cpp:
3321         (WebCore::StyleResolver::pushParentShadowRoot):
3322         (WebCore::StyleResolver::popParentShadowRoot):
3323         * dom/Attr.cpp:
3324         (WebCore::Attr::createTextChild):
3325         * dom/ComposedShadowTreeWalker.cpp:
3326         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
3327         * dom/ContainerNode.cpp:
3328         (WebCore::ContainerNode::insertBeforeCommon):
3329         (WebCore::ContainerNode::removeBetween):
3330         * dom/ContainerNodeAlgorithms.cpp:
3331         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3332         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
3333         * dom/ContainerNodeAlgorithms.h:
3334         (WebCore::appendChildToContainer):
3335         (WebCore::Private::addChildNodesToDeletionQueue):
3336         * dom/Document.h:
3337         (WebCore::Node::Node):
3338         * dom/Element.cpp:
3339         (WebCore::Element::addShadowRoot):
3340         (WebCore::Element::removeShadowRoot):
3341         * dom/ElementRareData.h:
3342         (WebCore::ElementRareData::releasePseudoElement):
3343         * dom/EventPathWalker.cpp:
3344         (WebCore::EventPathWalker::moveToParent):
3345         * dom/EventRetargeter.cpp:
3346         (WebCore::determineDispatchBehavior):
3347         * dom/EventRetargeter.h:
3348         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
3349         * dom/Node.cpp:
3350         (WebCore::Node::shadowHost):
3351         (WebCore::Node::deprecatedShadowAncestorNode):
3352         (WebCore::Node::parentOrShadowHostElement):
3353         * dom/Node.h:
3354         (WebCore::Node::hasTreeSharedParent):
3355         
3356             Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
3357
3358         (WebCore::Node::setParentNode):
3359         (WebCore::Node::parentNode):
3360         (WebCore::Node::parentNodeGuaranteedHostFree):
3361         * dom/PseudoElement.cpp:
3362         (WebCore::PseudoElement::PseudoElement):
3363         * dom/ShadowRoot.cpp:
3364         (WebCore::ShadowRoot::ShadowRoot):
3365         (WebCore::ShadowRoot::setInnerHTML):
3366         (WebCore::ShadowRoot::setApplyAuthorStyles):
3367         (WebCore::ShadowRoot::setResetStyleInheritance):
3368         * dom/ShadowRoot.h:
3369         
3370             Rename host() -> hostElement() for clarity.
3371
3372         (WebCore::Node::parentOrShadowHostNode):
3373         * dom/Text.cpp:
3374         (WebCore::isSVGShadowText):
3375         * dom/TreeScope.cpp:
3376         (WebCore::TreeScope::focusedElement):
3377         * html/shadow/ContentDistributor.cpp:
3378         (WebCore::ContentDistributor::ensureDistribution):
3379         * html/shadow/InsertionPoint.cpp:
3380         (WebCore::InsertionPoint::insertedInto):
3381         (WebCore::InsertionPoint::removedFrom):
3382         (WebCore::InsertionPoint::parseAttribute):
3383         * page/DragController.cpp:
3384         (WebCore::asFileInput):
3385         * page/EventHandler.cpp:
3386         (WebCore::EventHandler::handleMousePressEvent):
3387         (WebCore::instanceAssociatedWithShadowTreeElement):
3388         * page/FocusController.cpp:
3389         (WebCore::FocusNavigationScope::owner):
3390         * rendering/RenderBlock.cpp:
3391         (WebCore::RenderBlock::hasLineIfEmpty):
3392         * rendering/RenderLayer.cpp:
3393         (WebCore::rendererForScrollbar):
3394         * svg/SVGElementInstance.h:
3395         (WebCore::SVGElementInstance::setParentNode):
3396             
3397             Renamed so it works with appendChildToContainer template.
3398
3399         * svg/SVGStyledElement.cpp:
3400         (WebCore::SVGStyledElement::title):
3401
3402 2013-08-13  Darin Adler  <darin@apple.com>
3403
3404         [iOS] Get iOS port off legacy clipboard
3405         https://bugs.webkit.org/show_bug.cgi?id=116412
3406
3407         Reviewed by Daniel Bates.
3408
3409         * dom/Clipboard.h: Turn off legacy style clipboard for iOS.
3410         Next patch will be able to remove legacy style entirely!
3411
3412         * editing/Editor.cpp:
3413         (WebCore::Editor::dispatchCPPEvent): Attach the frame to the
3414         pasteboard directly explicitly. This is a layering violation, but
3415         is needed until we change how iOS pasteboard communicates with the
3416         host to use platform strategies instead of the editor client.
3417
3418         * editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
3419         the include of ClipboardIOS.h.
3420
3421         * platform/Pasteboard.h: Added the setFrame function (iOS-only) and
3422         frame and change count data members.
3423
3424         * platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
3425         * platform/ios/ClipboardIOS.mm: Ditto.
3426
3427         * platform/ios/PasteboardIOS.mm:
3428         (WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
3429         (WebCore::Pasteboard::createForCopyAndPaste): Added.
3430         (WebCore::Pasteboard::createPrivate): Added.
3431         (WebCore::Pasteboard::writePasteboard): Added. Empty function, like
3432         writeClipboard. Eventually need to remove or implement this.
3433         (WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
3434         (WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
3435         (WebCore::utiTypeFromCocoaType): Ditto.
3436         (WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
3437         (WebCore::Pasteboard::clear): Ditto.
3438         (WebCore::Pasteboard::readString): Ditto.
3439         (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
3440         (WebCore::Pasteboard::writeString): Ditto.
3441         (WebCore::Pasteboard::types): Ditto.
3442         (WebCore::Pasteboard::readFilenames): Ditto.
3443
3444         * WebCore.exp.in: Move Clipboard destructor from Mac-only section to
3445         common section shared by Mac and iOS.
3446
3447 2013-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
3448
3449         [EFL] Unreviewed build fix after r154142 and r154144.
3450
3451         * platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
3452         (WebCore::printError):
3453         (WebCore::printerNotFoundError):
3454         (WebCore::invalidPageRangeToPrint):
3455
3456 2013-08-15  Hans Muller  <hmuller@adobe.com>
3457
3458         [CSS Shapes] Add support for shape-outside image values
3459         https://bugs.webkit.org/show_bug.cgi?id=119809
3460
3461         Added minimal support for shape-outside image values. A new method that computes
3462         the excluded intervals for a horizontal line segment was added to the RasterIntervals
3463         class. The stub RasterShape getExcludedIntervals() method has been replaced by
3464         one that uses the new method.
3465
3466         Image shapes are represented by a RasterIntervals object, which just encapsulates a
3467         Region object. The new getExcludedIntervals() method computes the excluded intervals
3468         for a horizontal line segment between y1 and y2. To find the excluded intervals we
3469         vertically expand each of the image shape Region's rectangles that fall within the line
3470         segment, so that they begin at y1 and have height = y2 - y1. The union of the expanded
3471         rectangles produces a new Region whose horizontal projection defines the excluded intervals.
3472
3473         Reviewed by Alexandru Chiculita.
3474
3475         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html
3476                fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html
3477
3478         * rendering/shapes/RasterShape.cpp:
3479         (WebCore::RasterShapeIntervals::getExcludedIntervals): See above.
3480         (WebCore::RasterShape::getExcludedIntervals): Stub method has been replaced by one that uses RasterShapeIntervals::getExcludedIntervals().
3481         * rendering/shapes/RasterShape.h:
3482         * rendering/shapes/ShapeOutsideInfo.cpp:
3483         (WebCore::ShapeOutsideInfo::isEnabledFor): Enable Image valued shapes.
3484
3485 2013-08-15  Simon Fraser  <simon.fraser@apple.com>
3486
3487         <https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
3488
3489         Reviewed by Tim Horton.
3490         
3491         When starting a show on Hulu, there's a layer that gets marked as
3492         opaque because it has a child RenderLayer whose background fills the
3493         compositing layer. That child RenderLayer was recently position:fixed
3494         but outside the viewport, so its viewportConstrainedNotCompositedReason
3495         was set to a non-zero value.
3496         
3497         However, we failed to clear the viewportConstrainedNotCompositedReason
3498         when the layer became non-fixed. This caused painting the opaque
3499         layer to bail in RenderLayer::paintLayer(), leaving garbage.
3500
3501         Test: compositing/contents-opaque/fixed-to-nonfixed.html
3502
3503         * rendering/RenderLayer.cpp:
3504         (WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
3505         * rendering/RenderLayerCompositor.cpp:
3506         (WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
3507         ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
3508
3509 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
3510
3511         [Windows] Consolidate WebKit Bundle Handling
3512         https://bugs.webkit.org/show_bug.cgi?id=119869
3513
3514         Reviewed by Tim Horton.
3515
3516         * WebCore.vcxproj/WebCore.vcxproj: Add new WebCoreBundleWin files.
3517         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3518         * platform/network/curl/ResourceHandleManager.cpp:
3519         (WebCore::certificatePath): Use correct bundle handling logic.
3520         * platform/win/LocalizedStringsWin.cpp: Move bundle implementation to
3521         new WebCoreBundleWin.cpp file.
3522         * platform/win/WebCoreBundleWin.cpp: Added.
3523         (WebCore::createWebKitBundle):
3524         (WebCore::webKitBundle):
3525         * platform/win/WebCoreBundleWin.h: Added.
3526
3527 2013-08-15  Anders Carlsson  <andersca@apple.com>
3528
3529         <https://webkit.org/b/119859> Frame::loader() should return a reference
3530
3531         Reviewed by Andreas Kling.
3532
3533         * Modules/websockets/WebSocketChannel.cpp:
3534         (WebCore::WebSocketChannel::willOpenSocketStream):
3535         * WebCore.xcodeproj/project.pbxproj:
3536         * accessibility/AccessibilityObject.cpp:
3537         (WebCore::AccessibilityObject::press):
3538         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3539         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
3540         * bindings/ScriptControllerBase.cpp:
3541         (WebCore::ScriptController::canExecuteScripts):
3542         * bindings/js/ScriptController.cpp:
3543         (WebCore::ScriptController::initScript):
3544         * css/CSSFontSelector.cpp:
3545         (WebCore::CSSFontSelector::beginLoadTimerFired):
3546         * dom/DOMImplementation.cpp:
3547         (WebCore::DOMImplementation::createDocument):
3548         * dom/Document.cpp:
3549         (WebCore::Document::Document):
3550         (WebCore::Document::setVisualUpdatesAllowed):
3551         (WebCore::Document::updateTitle):
3552         (WebCore::Document::open):
3553         (WebCore::Document::explicitClose):
3554         (WebCore::Document::implicitClose):
3555         (WebCore::Document::userAgent):
3556         (WebCore::Document::canNavigate):
3557         (WebCore::Document::processHttpEquiv):
3558         (WebCore::Document::referrer):
3559         (WebCore::Document::documentDidResumeFromPageCache):
3560         (WebCore::Document::openSearchDescriptionURL):
3561         (WebCore::Document::finishedParsing):
3562         (WebCore::Document::addIconURL):
3563         (WebCore::Document::initSecurityContext):
3564         (WebCore::Document::updateURLForPushOrReplaceState):
3565         (WebCore::Document::loadEventDelayTimerFired):
3566         (WebCore::Document::loader):
3567         (WebCore::Document::decrementActiveParserCount):
3568         * history/CachedFrame.cpp:
3569         (WebCore::CachedFrameBase::CachedFrameBase):
3570         (WebCore::CachedFrameBase::restore):
3571         (WebCore::CachedFrame::CachedFrame):
3572         (WebCore::CachedFrame::open):
3573         (WebCore::CachedFrame::destroy):
3574         * history/PageCache.cpp:
3575         (WebCore::logCanCacheFrameDecision):
3576         (WebCore::logCanCachePageDecision):
3577         (WebCore::PageCache::canCachePageContainingThisFrame):
3578         (WebCore::PageCache::canCache):
3579         * html/HTMLAnchorElement.cpp:
3580         (WebCore::HTMLAnchorElement::handleClick):
3581         * html/HTMLAppletElement.cpp:
3582         (WebCore::HTMLAppletElement::updateWidget):
3583         * html/HTMLElement.cpp:
3584         (WebCore::HTMLElement::rendererIsNeeded):
3585         * html/HTMLEmbedElement.cpp:
3586         (WebCore::HTMLEmbedElement::updateWidget):
3587         * html/HTMLFormElement.cpp:
3588         (WebCore::HTMLFormElement::prepareForSubmission):
3589         (WebCore::HTMLFormElement::submit):
3590         * html/HTMLFrameElementBase.cpp:
3591         (WebCore::HTMLFrameElementBase::openURL):
3592         * html/HTMLFrameOwnerElement.cpp:
3593         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
3594         * html/HTMLFrameSetElement.cpp:
3595         (WebCore::HTMLFrameSetElement::insertedInto):
3596         (WebCore::HTMLFrameSetElement::removedFrom):
3597         * html/HTMLHtmlElement.cpp:
3598         (WebCore::HTMLHtmlElement::insertedByParser):
3599         * html/HTMLMediaElement.cpp:
3600         (WebCore::HTMLMediaElement::createRenderer):
3601         (WebCore::HTMLMediaElement::attach):
3602         (WebCore::HTMLMediaElement::loadResource):
3603         (WebCore::HTMLMediaElement::getPluginProxyParams):
3604         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
3605         (WebCore::HTMLMediaElement::updateWidget):
3606         (WebCore::HTMLMediaElement::mediaPlayerReferrer):
3607         (WebCore::HTMLMediaElement::mediaPlayerUserAgent):
3608         * html/HTMLObjectElement.cpp:
3609         (WebCore::HTMLObjectElement::parametersForPlugin):
3610         (WebCore::HTMLObjectElement::updateWidget):
3611         * html/HTMLPlugInImageElement.cpp:
3612         (WebCore::HTMLPlugInImageElement::isImageType):
3613         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
3614         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
3615         * html/HTMLVideoElement.cpp:
3616         (WebCore::HTMLVideoElement::setDisplayMode):
3617         * html/ImageDocument.cpp:
3618         (WebCore::ImageDocumentParser::appendBytes):
3619         (WebCore::ImageDocumentParser::finish):
3620         (WebCore::ImageDocument::createDocumentStructure):
3621         * html/MediaDocument.cpp:
3622         (WebCore::MediaDocumentParser::createDocumentStructure):
3623         * html/PluginDocument.cpp:
3624         (WebCore::PluginDocumentParser::createDocumentStructure):
3625         (WebCore::PluginDocumentParser::appendBytes):
3626         (WebCore::PluginDocument::detach):
3627         (WebCore::PluginDocument::cancelManualPluginLoad):
3628         * html/canvas/WebGLRenderingContext.cpp:
3629         (WebCore::WebGLRenderingContext::create):
3630         (WebCore::WebGLRenderingContext::loseContextImpl):
3631         (WebCore::WebGLRenderingContext::maybeRestoreContext):
3632         * html/parser/HTMLConstructionSite.cpp:
3633         (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
3634         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3635         * html/parser/HTMLParserOptions.cpp:
3636         (WebCore::HTMLParserOptions::HTMLParserOptions):
3637         * html/parser/XSSAuditor.cpp:
3638         (WebCore::XSSAuditor::init):
3639         * html/parser/XSSAuditorDelegate.cpp:
3640         (WebCore::XSSAuditorDelegate::generateViolationReport):
3641         (WebCore::XSSAuditorDelegate::didBlockScript):
3642         * inspector/InspectorApplicationCacheAgent.cpp:
3643         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
3644         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
3645         * inspector/InspectorFrontendClientLocal.cpp:
3646         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3647         * inspector/InspectorFrontendHost.cpp:
3648         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
3649         * inspector/InspectorOverlay.cpp:
3650         (WebCore::InspectorOverlay::overlayPage):
3651         * inspector/InspectorPageAgent.cpp:
3652         (WebCore::InspectorPageAgent::mainResourceContent):
3653         (WebCore::InspectorPageAgent::reload):
3654         (WebCore::InspectorPageAgent::navigate):
3655         (WebCore::allResourcesURLsForFrame):
3656         (WebCore::InspectorPageAgent::searchInResource):
3657         (WebCore::InspectorPageAgent::assertDocumentLoader):
3658         (WebCore::InspectorPageAgent::buildObjectForFrame):
3659         * inspector/InspectorResourceAgent.cpp:
3660         (WebCore::InspectorResourceAgent::didFailLoading):
3661         * loader/CookieJar.cpp:
3662         (WebCore::networkingContext):
3663         * loader/DocumentLoader.cpp:
3664         (WebCore::DocumentLoader::frameLoader):
3665         (WebCore::DocumentLoader::document):
3666         (WebCore::DocumentLoader::stopLoading):
3667         (WebCore::DocumentLoader::removeSubresourceLoader):
3668         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
3669         (WebCore::DocumentLoader::iconLoadDecisionAvailable):
3670         (WebCore::DocumentLoader::continueIconLoadWithDecision):
3671         * loader/DocumentThreadableLoader.cpp:
3672         (WebCore::DocumentThreadableLoader::didReceiveResponse):
3673         (WebCore::DocumentThreadableLoader::didFinishLoading):
3674         (WebCore::DocumentThreadableLoader::didFail):
3675         (WebCore::DocumentThreadableLoader::preflightFailure):
3676         (WebCore::DocumentThreadableLoader::loadRequest):
3677         * loader/DocumentWriter.cpp:
3678         (WebCore::DocumentWriter::replaceDocument):
3679         (WebCore::DocumentWriter::createDocument):
3680         (WebCore::DocumentWriter::begin):
3681         * loader/FrameLoader.cpp:
3682         (WebCore::FrameLoader::~FrameLoader):
3683         (WebCore::FrameLoader::allChildrenAreComplete):
3684         (WebCore::FrameLoader::allAncestorsAreComplete):
3685         (WebCore::FrameLoader::loadURLIntoChildFrame):
3686         (WebCore::FrameLoader::outgoingReferrer):
3687         (WebCore::FrameLoader::setOpener):
3688         (WebCore::FrameLoader::completed):
3689         (WebCore::FrameLoader::started):
3690         (WebCore::FrameLoader::loadFrameRequest):
3691         (WebCore::FrameLoader::loadURL):
3692         (WebCore::FrameLoader::load):
3693         (WebCore::FrameLoader::loadWithDocumentLoader):
3694         (WebCore::FrameLoader::stopAllLoaders):
3695         (WebCore::FrameLoader::closeOldDataSources):
3696         (WebCore::FrameLoader::subframeIsLoading):
3697         (WebCore::FrameLoader::subresourceCachePolicy):
3698         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3699         (WebCore::FrameLoader::detachChildren):
3700         (WebCore::FrameLoader::checkLoadComplete):
3701         (WebCore::FrameLoader::detachFromParent):
3702         (WebCore::FrameLoader::loadPostRequest):
3703         (WebCore::FrameLoader::loadResourceSynchronously):
3704         (WebCore::FrameLoader::shouldClose):
3705         (WebCore::FrameLoader::handleBeforeUnloadEvent):
3706         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3707         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3708         (WebCore::createWindow):
3709         * loader/HistoryController.cpp:
3710         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
3711         (WebCore::HistoryController::restoreScrollPositionAndViewState):
3712         (WebCore::HistoryController::saveDocumentState):
3713         (WebCore::HistoryController::saveDocumentAndScrollState):
3714         (WebCore::isAssociatedToRequestedHistoryItem):
3715         (WebCore::HistoryController::restoreDocumentState):
3716         (WebCore::HistoryController::shouldStopLoadingForHistoryItem):
3717         (WebCore::HistoryController::goToItem):
3718         (WebCore::HistoryController::updateForBackForwardNavigation):
3719         (WebCore::HistoryController::updateForReload):
3720         (WebCore::HistoryController::updateForStandardLoad):
3721         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
3722         (WebCore::HistoryController::updateForClientRedirect):
3723         (WebCore::HistoryController::updateForCommit):
3724         (WebCore::HistoryController::recursiveUpdateForCommit):
3725         (WebCore::HistoryController::updateForSameDocumentNavigation):
3726         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
3727         (WebCore::HistoryController::initializeItem):
3728         (WebCore::HistoryController::createItemTree):
3729         (WebCore::HistoryController::recursiveSetProvisionalItem):
3730         (WebCore::HistoryController::recursiveGoToItem):
3731         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
3732         (WebCore::HistoryController::updateCurrentItem):
3733         (WebCore::HistoryController::pushState):
3734         (WebCore::HistoryController::replaceState):
3735         * loader/ImageLoader.cpp:
3736         (WebCore::pageIsBeingDismissed):
3737         * loader/MixedContentChecker.cpp:
3738         (WebCore::MixedContentChecker::client):
3739         * loader/NavigationScheduler.cpp:
3740         (WebCore::ScheduledURLNavigation::fire):
3741         (WebCore::ScheduledURLNavigation::didStartTimer):
3742         (WebCore::ScheduledURLNavigation::didStopTimer):
3743         (WebCore::ScheduledRedirect::shouldStartTimer):
3744         (WebCore::ScheduledRedirect::fire):
3745         (WebCore::ScheduledRefresh::fire):
3746         (WebCore::ScheduledHistoryNavigation::fire):
3747         (WebCore::ScheduledFormSubmission::fire):
3748         (WebCore::ScheduledFormSubmission::didStartTimer):
3749         (WebCore::ScheduledFormSubmission::didStopTimer):
3750         (WebCore::NavigationScheduler::mustLockBackForwardList):
3751         (WebCore::NavigationScheduler::scheduleLocationChange):
3752         (WebCore::NavigationScheduler::scheduleFormSubmission):
3753         (WebCore::NavigationScheduler::scheduleRefresh):
3754         (WebCore::NavigationScheduler::schedule):
3755         * loader/PingLoader.cpp:
3756         (WebCore::PingLoader::loadImage):
3757         (WebCore::PingLoader::sendPing):
3758         (WebCore::PingLoader::sendViolationReport):
3759         (WebCore::PingLoader::PingLoader):
3760         * loader/PolicyChecker.cpp:
3761         (WebCore::PolicyChecker::checkNavigationPolicy):
3762         (WebCore::PolicyChecker::checkNewWindowPolicy):
3763         (WebCore::PolicyChecker::checkContentPolicy):
3764         (WebCore::PolicyChecker::cancelCheck):
3765         (WebCore::PolicyChecker::stopCheck):
3766         (WebCore::PolicyChecker::cannotShowMIMEType):
3767         (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
3768         (WebCore::PolicyChecker::continueAfterNavigationPolicy):
3769         (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
3770         (WebCore::PolicyChecker::handleUnimplementablePolicy):
3771         * loader/ProgressTracker.cpp:
3772         (WebCore::ProgressTracker::progressStarted):
3773         (WebCore::ProgressTracker::progressCompleted):
3774         (WebCore::ProgressTracker::finalProgressComplete):
3775         (WebCore::ProgressTracker::incrementProgress):
3776         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
3777         * loader/ResourceLoadNotifier.cpp:
3778         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
3779         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
3780         (WebCore::ResourceLoadNotifier::willSendRequest):
3781         (WebCore::ResourceLoadNotifier::didFailToLoad):
3782         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
3783         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
3784         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
3785         (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
3786         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
3787         (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
3788         * loader/ResourceLoader.cpp:
3789         (WebCore::ResourceLoader::ResourceLoader):
3790         (WebCore::ResourceLoader::start):
3791         (WebCore::ResourceLoader::frameLoader):
3792         (WebCore::ResourceLoader::willSendRequest):
3793         * loader/SubframeLoader.cpp:
3794         (WebCore::SubframeLoader::pluginIsLoadable):
3795         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
3796         (WebCore::SubframeLoader::createJavaAppletWidget):
3797         (WebCore::SubframeLoader::loadOrRedirectSubframe):
3798         (WebCore::SubframeLoader::loadSubframe):
3799         (WebCore::SubframeLoader::allowPlugins):
3800         (WebCore::SubframeLoader::shouldUsePlugin):
3801         (WebCore::SubframeLoader::loadPlugin):
3802         * loader/appcache/ApplicationCacheGroup.cpp:
3803         (WebCore::ApplicationCacheGroup::selectCache):
3804         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3805         (WebCore::ApplicationCacheGroup::update):
3806         (WebCore::ApplicationCacheGroup::createResourceHandle):
3807         (WebCore::ApplicationCacheGroup::didReceiveResponse):
3808         (WebCore::ApplicationCacheGroup::didFinishLoading):
3809         (WebCore::ApplicationCacheGroup::didFail):
3810         (WebCore::ApplicationCacheGroup::addEntry):
3811         (WebCore::CallCacheListenerTask::performTask):
3812         (WebCore::ApplicationCacheGroup::postListenerTask):
3813         * loader/appcache/DOMApplicationCache.cpp:
3814         (WebCore::DOMApplicationCache::applicationCacheHost):
3815         * loader/archive/cf/LegacyWebArchive.cpp:
3816         (WebCore::LegacyWebArchive::create):
3817         (WebCore::LegacyWebArchive::createFromSelection):
3818         * loader/cache/CachedResource.cpp:
3819         (WebCore::CachedResource::addAdditionalRequestHeaders):
3820         (WebCore::CachedResource::load):
3821         * loader/cache/CachedResourceLoader.cpp:
3822         (WebCore::CachedResourceLoader::requestImage):
3823         (WebCore::CachedResourceLoader::checkInsecureContent):
3824         (WebCore::CachedResourceLoader::canRequest):
3825         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
3826         (WebCore::CachedResourceLoader::requestResource):
3827         (WebCore::CachedResourceLoader::clientDefersImage):
3828         (WebCore::CachedResourceLoader::cachePolicy):
3829         (WebCore::CachedResourceLoader::loadDone):
3830         * loader/icon/IconController.cpp:
3831         (WebCore::IconController::commitToDatabase):
3832         (WebCore::IconController::startLoader):
3833         (WebCore::IconController::continueLoadWithDecision):
3834         * loader/icon/IconLoader.cpp:
3835         (WebCore::IconLoader::startLoading):
3836         (WebCore::IconLoader::notifyFinished):
3837         * page/Chrome.cpp:
3838         (WebCore::canRunModalIfDuringPageDismissal):
3839         * page/ContextMenuController.cpp:
3840         (WebCore::openNewWindow):
3841         (WebCore::ContextMenuController::contextMenuItemSelected):
3842         (WebCore::ContextMenuController::populate):
3843         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
3844         * page/DOMWindow.cpp:
3845         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
3846         (WebCore::DOMWindow::postMessageTimerFired):
3847         (WebCore::DOMWindow::close):
3848         (WebCore::DOMWindow::print):
3849         (WebCore::DOMWindow::stop):
3850         (WebCore::DOMWindow::setName):
3851         (WebCore::DOMWindow::opener):
3852         (WebCore::DOMWindow::dispatchLoadEvent):
3853         (WebCore::DOMWindow::setLocation):
3854         (WebCore::DOMWindow::createWindow):
3855         (WebCore::DOMWindow::open):
3856         * page/DOMWindowExtension.cpp:
3857         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
3858         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
3859         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
3860         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
3861         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
3862         * page/DragController.cpp:
3863         (WebCore::DragController::performDrag):
3864         * page/EventHandler.cpp:
3865         (WebCore::EventHandler::handleMousePressEvent):
3866         (WebCore::EventHandler::keyEvent):
3867         * page/Frame.cpp:
3868         (WebCore::Frame::~Frame):
3869         (WebCore::Frame::setView):
3870         (WebCore::Frame::injectUserScripts):
3871         (WebCore::Frame::willDetachPage):
3872         * page/Frame.h:
3873         (WebCore::Frame::loader):
3874         * page/FrameView.cpp:
3875         (WebCore::FrameView::mediaType):
3876         (WebCore::FrameView::setFixedVisibleContentRect):
3877         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
3878         (WebCore::FrameView::performPostLayoutTasks):
3879         (WebCore::FrameView::autoSizeIfEnabled):
3880         (WebCore::FrameView::scrollTo):
3881         (WebCore::FrameView::shouldSuspendScrollAnimations):
3882         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
3883         (WebCore::FrameView::wheelEvent):
3884         (WebCore::FrameView::firePaintRelatedMilestones):
3885         * page/History.cpp:
3886         (WebCore::History::stateInternal):
3887         (WebCore::History::stateObjectAdded):
3888         * page/Location.cpp:
3889         (WebCore::Location::setLocation):
3890         * page/Navigator.cpp:
3891         (WebCore::Navigator::userAgent):
3892         * page/Page.cpp:
3893         (WebCore::Page::goToItem):
3894         (WebCore::Page::refreshPlugins):
3895         (WebCore::Page::setDefersLoading):
3896         (WebCore::Page::setMemoryCacheClientCallsEnabled):
3897         (WebCore::Page::addRelevantRepaintedObject):
3898         * page/Performance.cpp:
3899         (WebCore::Performance::now):
3900         * page/PerformanceNavigation.cpp:
3901         (WebCore::PerformanceNavigation::type):
3902         (WebCore::PerformanceNavigation::redirectCount):
3903         * page/PerformanceResourceTiming.cpp:
3904         (WebCore::monotonicTimeToDocumentMilliseconds):
3905         * page/mac/PageMac.cpp:
3906         (WebCore::Page::addSchedulePair):
3907         (WebCore::Page::removeSchedulePair):
3908         * platform/ios/PasteboardIOS.mm:
3909         (WebCore::documentFragmentWithImageResource):
3910         (WebCore::documentFragmentWithRTF):
3911         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
3912         * platform/mac/HTMLConverter.mm:
3913         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
3914         (-[WebHTMLConverter _loadFromDOMRange]):
3915         * platform/mac/PasteboardMac.mm:
3916         (WebCore::documentFragmentWithImageResource):
3917         (WebCore::documentFragmentWithRTF):
3918         (WebCore::fragmentFromWebArchive):
3919         * plugins/DOMMimeType.cpp:
3920         (WebCore::DOMMimeType::enabledPlugin):
3921         * rendering/RenderLayer.cpp:
3922         (WebCore::RenderLayer::scrollTo):
3923         * svg/SVGAElement.cpp:
3924         (WebCore::SVGAElement::defaultEventHandler):
3925         * svg/graphics/SVGImage.cpp:
3926         (WebCore::SVGImage::~SVGImage):
3927         (WebCore::SVGImage::dataChanged):
3928         * testing/Internals.cpp:
3929         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
3930         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
3931         (WebCore::Internals::getReferencedFilePaths):
3932         (WebCore::Internals::forceReload):
3933         * xml/XSLTProcessorLibxslt.cpp:
3934         (WebCore::docLoaderFunc):
3935         * xml/parser/XMLDocumentParserLibxml2.cpp:
3936         (WebCore::openFunc):
3937         (WebCore::XMLDocumentParser::startElementNs):
3938
3939 2013-08-15  Daniel Bates  <dabates@apple.com>
3940
3941         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
3942
3943         Reviewed by David Kilzer.
3944
3945         Use the same UUIDs for EditorIOS.mm and the group ios as in the iOS tree
3946         so as to make it straightforward to merge changes to the WebCore Xcode
3947         project file on WebKit.org with changes to the same file in the iOS tree.
3948
3949         * WebCore.xcodeproj/project.pbxproj:
3950
3951 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
3952
3953         [Windows] Unreviewed build fix after r15417.
3954
3955         * DerivedSources.cpp: Remove classes that now live in JSC.
3956         * WebCore.vcxproj/WebCore.vcxproj: Remove classes no longer included in WebCore.
3957         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3958         * bindings/js/WebCoreTypedArrayController.cpp: Add explicit namespace to avoid conflict
3959         with Windows 'Unknown' type.
3960         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
3961         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
3962
3963 2013-08-15  Daniel Bates  <dabates@apple.com>
3964
3965         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
3966
3967         Reviewed by David Kilzer.
3968
3969         * WebCore.xcodeproj/project.pbxproj:
3970         * editing/ios/EditorIOS.mm: Added.
3971         (WebCore::Editor::newGeneralClipboard):
3972         (WebCore::Editor::showFontPanel):
3973         (WebCore::Editor::showStylesPanel):
3974         (WebCore::Editor::showColorPanel):
3975         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3976         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
3977         (WebCore::styleForSelectionStart):
3978         (WebCore::Editor::fontForSelection):
3979         (WebCore::Editor::fontAttributesForSelectionStart):
3980         (WebCore::Editor::removeUnchangeableStyles):
3981
3982 2013-08-15  Dirk Schulze  <krit@webkit.org>
3983
3984         Implement CSS Image filter() function
3985         https://bugs.webkit.org/show_bug.cgi?id=119845
3986
3987         Reviewed by Dean Jackson.
3988
3989         The Filter Effects specification defines a new CSS Image function called
3990         filter(). This function takes another CSS Image as well as a filter function
3991         list as input and can be used by various CSS properties.
3992
3993         Example:
3994
3995             background-image: -webkit-filter(url(image.png), brightness(0.5))
3996
3997         This patch implements the current definition of filter() based on other
3998         image generation classes like CSSCrossfadeValue.
3999         A new class called CSSFilterImageValue was added together with an
4000         image observer.
4001
4002         The function is implemented prefixed and behind the compiler flag CSS_FILTERS.
4003
4004         Tests: fast/filter-image/filter-image.html
4005                fast/filter-image/parse-filter-image.html
4006
4007         * CMakeLists.txt: Added new files to build systems.
4008         * GNUmakefile.list.am:
4009         * Target.pri:
4010         * WebCore.vcxproj/WebCore.vcxproj:
4011         * WebCore.xcodeproj/project.pbxproj:
4012         * css/CSSAllInOne.cpp:
4013         * css/CSSCrossfadeValue.cpp: Share code together with CSSFilterImageValue
4014             in CSSImageGeneratorValue.cpp.
4015         (WebCore::CSSCrossfadeValue::isPending):
4016         (WebCore::CSSCrossfadeValue::loadSubimages):
4017         * css/CSSFilterImageValue.cpp: Added.
4018         (WebCore::CSSFilterImageValue::~CSSFilterImageValue):
4019         (WebCore::CSSFilterImageValue::customCssText):
4020         (WebCore::CSSFilterImageValue::fixedSize):
4021         (WebCore::CSSFilterImageValue::isPending):
4022         (WebCore::CSSFilterImageValue::knownToBeOpaque):
4023         (WebCore::CSSFilterImageValue::loadSubimages):
4024         (WebCore::CSSFilterImageValue::image):
4025         (WebCore::CSSFilterImageValue::filterImageChanged):
4026         (WebCore::CSSFilterImageValue::createFilterOperations):
4027         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged):
4028         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources):
4029         (WebCore::CSSFilterImageValue::equals):
4030         * css/CSSFilterImageValue.h: Added.
4031         (WebCore::CSSFilterImageValue::create):
4032         (WebCore::CSSFilterImageValue::isFixedSize):
4033         (WebCore::CSSFilterImageValue::CSSFilterImageValue):
4034         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::FilterSubimageObserverProxy):
4035         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::~FilterSubimageObserverProxy):
4036         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::setReady):
4037         * css/CSSImageGeneratorValue.cpp: Shared code between CSSCrossfadeValue and
4038             CSSFilterImageValue.
4039         (WebCore::CSSImageGeneratorValue::image):
4040         (WebCore::CSSImageGeneratorValue::isFixedSize):
4041         (WebCore::CSSImageGeneratorValue::fixedSize):
4042         (WebCore::CSSImageGeneratorValue::isPending):
4043         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
4044         (WebCore::CSSImageGeneratorValue::loadSubimages):
4045         (WebCore::CSSImageGeneratorValue::subimageIsPending):
4046         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
4047         * css/CSSImageGeneratorValue.h:
4048         * css/CSSParser.cpp: Added parsing information for new image function.
4049         (WebCore::CSSParser::parseValue):