Move Node::isFocusable() to Element.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-25  Andreas Kling  <akling@apple.com>
2
3         Move Node::isFocusable() to Element.
4         <http://webkit.org/b/116777>
5
6         Reviewed by Anders Carlsson.
7
8         Nodes cannot be focusable, so move isFocusable() from Node to Element.
9
10         * dom/Node.cpp:
11         * dom/Node.h:
12         * dom/Element.h:
13         * dom/Element.cpp:
14         (WebCore::Element::isFocusable):
15
16             Moved here from Node.
17
18         * dom/Document.cpp:
19         (WebCore::Document::setFocusedNode):
20         * accessibility/AccessibilityNodeObject.cpp:
21         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
22
23             Check that the underlying node is an Element before asking if it's focusable.
24
25         * page/FrameView.cpp:
26         (WebCore::FrameView::scrollToAnchor):
27
28             Renamed the 'anchorNode' variable to 'anchorElement' because reasons.
29
30         * html/HTMLAreaElement.h:
31         * html/HTMLFormControlElement.h:
32         * html/HTMLLabelElement.h:
33         * html/HTMLOptionElement.h:
34         * svg/SVGAElement.h:
35
36             Sprinkle OVERRIDE.
37
38         * html/ValidationMessage.cpp:
39         (WebCore::ValidationMessage::setMessage):
40
41             Update a comment to refer to Element::isFocusable() instead of Node.
42
43 2013-05-25  Andreas Kling  <akling@apple.com>
44
45         Move Node::tabIndex() to Element.
46         <http://webkit.org/b/116772>
47
48         Reviewed by Ryosuke Niwa.
49
50         Since only Elements are keyboard-focusable, it doesn't make sense for Node to have a tabIndex().
51
52         * dom/Element.h:
53         * dom/Node.cpp:
54         * dom/Node.h:
55
56             A Node can't have a tab index, so move tabIndex() to Element.
57
58         * page/FocusController.h:
59         * page/FocusController.cpp:
60         (WebCore::adjustedTabIndex):
61         (WebCore::FocusController::findElementWithExactTabIndex):
62         (WebCore::nextElementWithGreaterTabIndex):
63         (WebCore::previousElementWithLowerTabIndex):
64         (WebCore::FocusController::nextFocusableNode):
65         (WebCore::FocusController::previousFocusableNode):
66
67             Make this code deal in Element* when doing tab index stuff. FocusController needs
68             more Node->Element cleanup, but let's do that separately.
69
70         * html/HTMLAnchorElement.h:
71         * html/HTMLElement.h:
72         * html/HTMLFormControlElement.h:
73
74             Sprinkle OVERRIDE.
75
76 2013-05-25  Andreas Kling  <akling@apple.com>
77
78         Don't instantiate ChildNodeLists just to get a child count.
79         <http://webkit.org/b/116776>
80
81         Reviewed by Ryosuke Niwa.
82
83         Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().
84
85         * editing/ApplyStyleCommand.cpp:
86         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
87
88 2013-05-25  Andreas Kling  <akling@apple.com>
89
90         PluginDocument::pluginNode() should be pluginElement() instead.
91         <http://webkit.org/b/116774>
92
93         Reviewed by Anders Carlsson.
94
95         Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
96
97         * dom/Document.cpp:
98         (WebCore::eventTargetNodeForDocument):
99         * html/PluginDocument.h:
100         * html/PluginDocument.cpp:
101         (WebCore::PluginDocumentParser::createDocumentStructure):
102         (WebCore::PluginDocument::pluginWidget):
103         (WebCore::PluginDocument::setPluginElement):
104         (WebCore::PluginDocument::detach):
105
106 2013-05-25  Andreas Kling  <akling@apple.com>
107
108         Remove Document::getFocusableNodes().
109         <http://webkit.org/b/116773>
110
111         Reviewed by Joseph Pecoraro.
112
113         This was added in r42191 and there are no remaining clients of the API.
114
115         * dom/Document.cpp:
116         * dom/Document.h:
117         * WebCore.exp.in:
118
119 2013-05-25  Andreas Kling  <akling@apple.com>
120
121         Move Node::focusDelegate() to Element.
122         <http://webkit.org/b/116768>
123
124         Reviewed by Anders Carlsson.
125
126         Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
127         so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.
128
129         * dom/Node.cpp:
130         * dom/Node.h:
131         * dom/Element.h:
132         * dom/Element.cpp:
133         * html/shadow/SliderThumbElement.cpp:
134         (WebCore::SliderThumbElement::focusDelegate):
135         * html/shadow/SliderThumbElement.h:
136         * rendering/RenderTheme.cpp:
137         (WebCore::RenderTheme::isFocused):
138         * rendering/RenderThemeMac.mm:
139         (WebCore::RenderThemeMac::paintSliderThumb):
140
141 2013-05-25  Alberto Garcia  <agarcia@igalia.com>
142
143         Path: clean up addPathForRoundedRect()
144         https://bugs.webkit.org/show_bug.cgi?id=116765
145
146         Reviewed by Andreas Kling.
147
148         Reorganize code that is a bit redundant.
149
150         No new tests, no behavior change.
151
152         * platform/graphics/Path.cpp:
153         (WebCore::Path::addPathForRoundedRect):
154
155 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
156
157         Unprefix Page Visibility API
158         https://bugs.webkit.org/show_bug.cgi?id=102340
159
160         Reviewed by Tim Horton.
161         
162         Remove prefixes from the document properties, and the visibilitychanged event.
163         
164         Rename the "preview" state to "unloaded". The "unloaded" state is never
165         reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).
166         
167         Add some comments to places where we should update the visibility state
168         when going in and out of the page cache, but cannot safely do so yet.
169
170         Tested by existing Page Visibility tests.
171
172         * dom/Document.cpp:
173         (WebCore::Document::pageVisibilityState):
174         (WebCore::Document::visibilityState):
175         (WebCore::Document::hidden):
176         (WebCore::Document::dispatchVisibilityStateChangeEvent):
177         * dom/Document.h:
178         * dom/Document.idl:
179         * dom/EventNames.h:
180         * history/CachedFrame.cpp:
181         (WebCore::CachedFrameBase::restore):
182         * loader/FrameLoader.cpp:
183         (WebCore::FrameLoader::stopLoading):
184         * page/Page.cpp:
185         (WebCore::Page::setVisibilityState):
186         * page/PageVisibilityState.cpp:
187         (WebCore::pageVisibilityStateString):
188         * page/PageVisibilityState.h:
189
190 2013-05-25  Andreas Kling  <akling@apple.com>
191
192         Move Node::isMouseFocusable() to Element.
193         <http://webkit.org/b/116762>
194
195         Reviewed by Anders Carlsson.
196
197         Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
198         since Node::supportsFocus() always returns false. So move it to Element!
199
200         * dom/Node.h:
201         * dom/Node.cpp:
202         * dom/Element.h:
203         * dom/Element.cpp:
204         (WebCore::Element::isMouseFocusable):
205
206             Moved here from Node.
207
208         * editing/FrameSelection.cpp:
209         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
210         * page/EventHandler.cpp:
211         (WebCore::EventHandler::dispatchMouseEvent):
212
213             Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
214             Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
215             Elements and thus cannot be mouse-focusable.
216
217         * page/TouchAdjustment.cpp:
218         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
219
220             Check that the Node is an Element before asking if it's mouse-focusable.
221
222         * html/HTMLAnchorElement.h:
223         * html/HTMLAreaElement.h:
224         * html/HTMLFormControlElement.h:
225         * html/HTMLInputElement.h:
226         * html/HTMLMediaElement.h:
227         * html/HTMLSelectElement.h:
228         * html/HTMLTextAreaElement.h:
229         * html/shadow/ClearButtonElement.h:
230         * html/shadow/TextControlInnerElements.h:
231         * svg/SVGAElement.h:
232         * svg/SVGStyledElement.h:
233
234             Sprinkle OVERRIDE.
235
236 2013-05-25  Andreas Kling  <akling@apple.com>
237
238         Move Node::isKeyboardFocusable() to Element.
239         <http://webkit.org/b/116761>
240
241         Reviewed by Antti Koivisto.
242
243         Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
244         and sprinkle OVERRIDE on subclass overrides.
245         FocusController gets some temporary type checks that will go away as that code moves to dealing in
246         Elements instead of Node.
247
248         * dom/Node.h:
249         * dom/Node.cpp:
250         * dom/Element.h:
251         * dom/Element.cpp:
252         (WebCore::Element::isKeyboardFocusable):
253
254             Move isKeyboardFocusable() from Node to Element.
255
256         * page/FocusController.cpp:
257         (WebCore::isNonFocusableShadowHost):
258         (WebCore::isFocusableShadowHost):
259         (WebCore::shouldVisit):
260         (WebCore::FocusController::advanceFocusInDocumentOrder):
261
262             Check that the inspected Node is an Element before querying isKeyboardFocusable().
263
264         * html/HTMLAnchorElement.h:
265         * html/HTMLAreaElement.h:
266         * html/HTMLFormControlElement.h:
267         * html/HTMLFrameOwnerElement.h:
268         * html/HTMLInputElement.h:
269         * html/HTMLPlugInElement.h:
270         * html/HTMLSelectElement.h:
271         * html/HTMLTextAreaElement.h:
272         * svg/SVGAElement.h:
273         * svg/SVGStyledElement.h:
274
275             Sprinkle OVERRIDE.
276
277 2013-05-25  Andreas Kling  <akling@apple.com>
278
279         Begin moving "focus" state logic from Node to Element.
280         <http://webkit.org/b/116760>
281
282         Reviewed by Antti Koivisto.
283
284         Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
285         and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
286         with setFocus(bool) and focused().
287
288         * dom/Node.h:
289         * dom/ContainerNode.cpp:
290         * dom/ContainerNode.h:
291         * dom/Element.cpp:
292         (WebCore::Element::isUserActionElementFocused):
293         (WebCore::Element::setFocus):
294         * dom/Element.h:
295         (WebCore::Element::focused):
296         * dom/Node.cpp:
297
298             Move focused() and setFocus(bool) from Node/ContainerNode to Element.
299
300         * dom/Document.cpp:
301         (WebCore::Document::setFocusedNode):
302         * page/EventHandler.cpp:
303         (WebCore::EventHandler::dispatchMouseEvent):
304
305             Check if the inspected Node is an Element before asking if it's focused.
306
307 2013-05-25  Noam Rosenthal  <noam.rosenthal@nokia.com>
308
309         Direct pattern compositing breaks when no-repeat is set on a large layer
310         https://bugs.webkit.org/show_bug.cgi?id=116140
311
312         Reviewed by Antti Koivisto.
313
314         In some cases the directly composited background color logic overrides the layer's
315         contentsRect, which results in wrong rendering of tiled images.
316         This patch makes sure that the background image is applied after the solid color,
317         which ensures the correct contentsRect.
318
319         Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
320
321         * rendering/RenderLayerBacking.cpp:
322         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
323
324 2013-05-24  Andreas Kling  <akling@apple.com>
325
326         Move "hover" state logic from Node to Element.
327         <http://webkit.org/b/116757>
328
329         Reviewed by Antti Koivisto.
330
331         Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
332         and moving it all to Element instead.
333
334         * dom/Node.cpp:
335         (WebCore::Node::detach):
336         * dom/Element.cpp:
337         (WebCore::Element::detach):
338
339             Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().
340
341         (WebCore::Element::isUserActionElementHovered):
342         (WebCore::Element::setHovered):
343         * dom/Element.h:
344         (WebCore::Element::hovered):
345
346             Moved here from Node/ContainerNode.
347
348         * dom/UserActionElementSet.h:
349         (WebCore::UserActionElementSet::setHovered):
350         (WebCore::UserActionElementSet::setFlags):
351
352             Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
353             of these methods eventually, so added a setFlags() helper with the tighter type.
354
355         * html/HTMLLabelElement.h:
356         * html/shadow/SpinButtonElement.h:
357
358             Sprinkle OVERRIDE on setHovered() overrides.
359
360         * dom/Document.cpp:
361         (WebCore::Document::updateHoverActiveState):
362         * accessibility/AccessibilityNodeObject.cpp:
363         (WebCore::AccessibilityNodeObject::isHovered):
364         * rendering/RenderTheme.cpp:
365         (WebCore::RenderTheme::isHovered):
366
367             Check if the inspected Node is an element before asking if it's hovered.
368
369 2013-05-25  Andreas Kling  <akling@apple.com>
370
371         Document::formController() should return a reference.
372         <http://webkit.org/b/116758>
373
374         Reviewed by Antti Koivisto.
375
376         The formController() is created on demand, so return a reference instead.
377
378         * dom/Document.h:
379         * dom/Document.cpp:
380         (WebCore::Document::formController):
381         (WebCore::Document::setStateForNewFormElements):
382         * html/HTMLFormControlElementWithState.cpp:
383         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
384         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
385         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
386         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
387         * html/HTMLFormElement.cpp:
388         (WebCore::HTMLFormElement::~HTMLFormElement):
389         (WebCore::HTMLFormElement::finishParsingChildren):
390         * html/HTMLInputElement.cpp:
391         (WebCore::HTMLInputElement::~HTMLInputElement):
392         (WebCore::HTMLInputElement::didMoveToNewDocument):
393         (WebCore::HTMLInputElement::checkedRadioButtons):
394
395 2013-05-25  Sergio Villar Senin  <svillar@igalia.com>
396
397         Reducing CSS code duplication in declaration list error recovery
398         https://bugs.webkit.org/show_bug.cgi?id=115157
399
400         Reviewed by Andreas Kling.
401
402         From Blink r148974 by <serya@chromium.org>
403
404         Refactor "invalid_block_list error | /* empty */" in a new
405         decl_list_recovery rule that allows to remove 4 redundant rules.
406
407         No new test required as we're just refactoring code, no new behaviour.
408
409         * css/CSSGrammar.y.in:
410
411 2013-05-24  Ryosuke Niwa  <rniwa@webkit.org>
412
413         Build fix after r150664.
414
415         * bindings/scripts/test/JS/JSTestObj.cpp:
416         (WebCore):
417
418 2013-05-24  Sergio Villar Senin  <svillar@igalia.com>
419
420         Fixing invalid block recovery in some declaration list.
421         https://bugs.webkit.org/show_bug.cgi?id=115159
422
423         Reviewed by Darin Adler.
424
425         From Blink r148889 by <serya@chromium.org>
426
427         Improves the detection of some invalid block declarations inside a
428         declaration list. This allows the parser not to completely discard
429         a whole declaration list that contains an invalid block. In
430         particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
431         new test added by this change.
432
433         Test: fast/css/parsing-invalid-block-recovery.html
434
435         * css/CSSGrammar.y.in:
436
437
438 2013-05-24  Beth Dakin  <bdakin@apple.com>
439
440         DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
441         https://bugs.webkit.org/show_bug.cgi?id=116749
442         -and corresponding-
443         <rdar://problem/13886753>
444
445         Reviewed by Simon Fraser.
446
447         Only start m_paintRelatedMilestonesTimer if we have actually painted.
448         * rendering/RenderLayerCompositor.cpp:
449         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
450
451 2013-05-24  Anders Carlsson  <andersca@apple.com>
452
453         Fix Windows build.
454
455         * WebCore.vcproj/WebCore.vcproj:
456         * WebCore.vcxproj/WebCore.vcxproj:
457         * WebCore.vcxproj/WebCore.vcxproj.filters:
458
459 2013-05-24  Tim Horton  <timothy_horton@apple.com>
460
461         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
462         https://bugs.webkit.org/show_bug.cgi?id=116744
463         <rdar://problem/13973514>
464
465         Reviewed by Simon Fraser.
466
467         * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
468         * page/FrameView.cpp:
469         (WebCore::FrameView::setIsInWindow):
470         (WebCore::FrameView::resumeAnimatingImages):
471         Factor the code to restart animated images out of frameView::setIsInWindow.
472
473         * page/FrameView.h:
474         (FrameView):
475
476 2013-05-24  Anders Carlsson  <andersca@apple.com>
477
478         Move history property list writer to WebKit
479         https://bugs.webkit.org/show_bug.cgi?id=116746
480
481         Reviewed by Tim Horton.
482
483         Remove files from the Xcode project and remove symbols that now live in WebKit.
484
485         * WebCore.exp.in:
486         * WebCore.xcodeproj/project.pbxproj:
487
488 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
489
490         Global constructors exposed in worker environment have wrong attributes
491         https://bugs.webkit.org/show_bug.cgi?id=116708
492
493         Reviewed by Geoffrey Garen.
494
495         Fix JSC bindings generator so that Global constructors exposed in worker environment
496         have the following attributes:
497         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
498
499         This is now consistent with global constructors on DOMWindow and with the Web IDL
500         specification:
501         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
502
503         Test: fast/js/global-constructors-attributes-worker.html
504
505         * bindings/scripts/CodeGeneratorJS.pm:
506         (GenerateAttributesHashTable):
507
508 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
509
510         Remove custom code for webkitAudioContext global constructor getter
511         https://bugs.webkit.org/show_bug.cgi?id=116530
512
513         Reviewed by Geoffrey Garen.
514
515         Get rid of custom code for webkitAudioContext global constructor getter. The
516         global DOMWindow attribute is now automatically generated by leveraging support
517         for [EnabledAtRuntime] extended attribute and the existing methods in
518         RuntimeEnabledFeatures class.
519
520         No new tests, no behavior change.
521
522         * GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
523         * Modules/webaudio/AudioContext.idl:
524         Remove [NoInterfaceObject] extended attribute so that the global constructor is
525         automatically generated instead of automatically added. Add [EnabledAtRuntime]
526         extended attribute since this global constructor can be disabled at runtime and
527         so that we can getter rid of the [CustomGetter] for the corresponding global
528         constructor. Use [InterfaceName] extended attribute so that the interface name
529         matches the global constructor on DOMWindow (webkitAudioContext).
530
531         * Target.pri: Remove JSDOMWindowWebAudioCustom.*.
532         * UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
533         * WebCore.exp.in: Export additional symbol.
534         * WebCore.order: Export additional symbol.
535         * WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
536         * WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
537         * WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
538         * WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
539         * bindings/generic/RuntimeEnabledFeatures.h:
540         (WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
541         * bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
542         * bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
543         the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
544         bindings generator now.
545         * page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
546         generated.
547         * page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
548         in RuntimeEnabledFeatures now.
549
550 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
551
552         [AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
553         https://bugs.webkit.org/show_bug.cgi?id=116712
554
555         Reviewed by Andreas Kling.
556
557         renderView is used when ACCELERATED_COMPOSITING is enabled.
558         So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).
559
560         No new tests, no behavior change.
561
562         * page/FrameView.cpp:
563         (WebCore::FrameView::setFrameRect):
564
565 2013-05-24  Thomas Deniau  <deniau@apple.com>
566
567         Add more lines to the context during Dictionary lookups
568         https://bugs.webkit.org/show_bug.cgi?id=115256
569
570         Reviewed by Ryosuke Niwa.
571
572         No new tests - no new functionality.
573
574         * WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
575         to call previousLinePosition(), nextLinePosition(), startOfLine() and
576         endOfLine() in WebPageMac.mm when determining the context while looking
577         up a dictionary definition. These symbols used to be exported for iOS
578         only, export them on the desktop too.
579
580 2013-05-24  Anders Carlsson  <andersca@apple.com>
581
582         Remove PagePopup code
583         https://bugs.webkit.org/show_bug.cgi?id=116732
584
585         Reviewed by Andreas Kling.
586
587         Remove all page popup code.
588
589         * GNUmakefile.list.am:
590         * WebCore.xcodeproj/project.pbxproj:
591         * dom/ContextFeatures.cpp:
592         * dom/ContextFeatures.h:
593         * loader/EmptyClients.h:
594         * page/ChromeClient.h:
595         * page/DOMWindowPagePopup.cpp: Removed.
596         * page/DOMWindowPagePopup.h: Removed.
597         * page/DOMWindowPagePopup.idl: Removed.
598         * page/PagePopup.h: Removed.
599         * page/PagePopupClient.cpp: Removed.
600         * page/PagePopupClient.h: Removed.
601         * page/PagePopupController.cpp: Removed.
602         * page/PagePopupController.h: Removed.
603         * page/PagePopupController.idl: Removed.
604         * page/PagePopupDriver.h: Removed.
605         * testing/Internals.cpp:
606         (WebCore::Internals::resetToConsistentState):
607         (WebCore):
608         * testing/Internals.h:
609         (WebCore):
610         (Internals):
611         * testing/Internals.idl:
612         * testing/MockPagePopupDriver.cpp: Removed.
613         * testing/MockPagePopupDriver.h: Removed.
614
615 2013-05-24  Jer Noble  <jer.noble@apple.com>
616
617         Mac: Set the default audio buffer size to a large value for <video> elements.
618         https://bugs.webkit.org/show_bug.cgi?id=116342
619
620         Reviewed by Eric Carlson.
621         Roll-in rubber stamped by Eric Carlson.
622
623         To enable power savings by waking up the audio hardware less often, set the
624         requested buffer frame size to a large value, such as 4096. Since this results
625         in approximately 100ms worth of buffer, set the buffer size to a much lower
626         value when playing WebAudio, which is much more sensitive to latency than video
627         or audio elements.
628
629         Introduce a new class, AudioSessionManager, as well as a helper class,
630         AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
631         nodes will create and retain a token, and release the token in their destructor.
632         This allows the AudioSessionManager to track how many of what type of audio-
633         generating objects are in existence.
634
635         This requires implementing AudioSession for Mac platforms. Move the implementation
636         for retrieving the hardware sample rate and setting the buffer duration into
637         AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.
638
639         Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
640         as the callers really want to specify a buffer size, not a buffer duration. On iOS,
641         where the available API requires a duration, perform the conversion from duration to
642         size on behalf of the caller.
643
644         However, since the original version of this patch caused media test
645         failures on the Mac ML and Lion bots, only enable the buffer size
646         change for OS X > ML.
647
648         * html/HTMLMediaElement.h:  Add a AudioSessionManagerToken member.
649         * html/HTMLMediaElement.cpp:
650         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
651         * platform/audio/AudioSession.cpp:
652         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
653         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
654         * platform/audio/AudioSession.h:
655         * platform/audio/AudioSessionManager.cpp:
656         (AudioSessionManagerToken::create): Simple factory method.
657         (AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
658         (AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
659         (AudioSessionManager::sharedManager): Simple singleton method.
660         (AudioSessionManager::AudioSessionManager): Simple constructor.
661         (AudioSessionManager::has): Return whether the type is present.
662         (AudioSessionManager::incrementCount): Increment, then call updateSessionState()
663         (AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
664         (AudioSessionManager::updateSessionState): Stub, does nothing.
665         * platform/audio/AudioSessionManager.h:
666         * platform/audio/ios/AudioDestinationIOS.cpp:
667         (WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
668         * platform/audio/ios/AudioSessionIOS.mm:
669         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
670         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
671         * platform/audio/mac/AudioDestinationMac.cpp:
672         (WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
673         (WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
674         (WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
675         * platform/audio/mac/AudioDestinationMac.h:
676         * platform/audio/mac/AudioSessionMac.cpp: Added.
677         (WebCore::defaultDevice): Added, returns the default audio device.
678         (WebCore::AudioSession::AudioSession): Simple constructor.
679         (WebCore::AudioSession::~AudioSession): Simple destructor.
680         (WebCore::AudioSession::category): Stub, unimplemented.
681         (WebCore::AudioSession::setCategory): Ditto.
682         (WebCore::AudioSession::categoryOverride): Ditto.
683         (WebCore::AudioSession::setCategoryOverride): Ditto.
684         (WebCore::AudioSession::numberOfOutputChannels): Ditto.
685         (WebCore::AudioSession::setActive): Ditto.
686         (WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
687         (WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
688         (WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
689         * platform/audio/mac/AudioSessionManagerMac.cpp:
690         (AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
691         * WebCore.xcodeproj/project.pbxproj: Add the new files to the project.
692
693 2013-05-24  Alberto Garcia  <agarcia@igalia.com>
694
695         Path: upstream the missing bits from the BlackBerry port
696         https://bugs.webkit.org/show_bug.cgi?id=116658
697
698         Reviewed by Xan Lopez.
699
700         PathBlackBerry was upstreamed a while ago (r144612) but a few bits
701         were missing from the cross-platform code.
702
703         * platform/graphics/Path.cpp:
704         (WebCore::Path::addPathForRoundedRect):
705         * platform/graphics/Path.h:
706         (Graphics):
707         (Path):
708
709 2013-05-24  Noam Rosenthal  <noam@webkit.org>
710
711         WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
712         https://bugs.webkit.org/show_bug.cgi?id=115135
713
714         Reviewed by Antti Koivisto.
715
716         Issue is invoked when there is a visibility:hidden layer with a non-compositable
717         background image (e.g. a radial gradient).
718         The layer is treated as a no-contents layer because of its visibility, however
719         updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
720         with direct background-image compositing.
721
722         Fixed by returning early from updating directly composited contents for layers
723         with hidden contents.
724
725         Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
726
727         * rendering/RenderLayerBacking.cpp:
728         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
729         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
730         (WebCore::RenderLayerBacking::paintsChildren):
731         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
732
733 2013-05-24  Robert Hogan  <robert@webkit.org>
734
735         Refactor shouldAddBorderPaddingMargin()
736         https://bugs.webkit.org/show_bug.cgi?id=98803
737
738         Reviewed by Ryosuke Niwa.
739
740         Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
741         for the sake of concision.
742
743         No new tests, refactoring.
744
745         * rendering/RenderBlockLineLayout.cpp:
746         (WebCore::shouldAddBorderPaddingMargin):
747         (WebCore::inlineLogicalWidth):
748
749 2013-05-24  Xiaobo Wang  <xiaobwang@blackberry.com>
750
751         [BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
752         https://bugs.webkit.org/show_bug.cgi?id=116654
753
754         Reviewed by Carlos Garcia Campos.
755
756         PR 331552.
757         Internally reviewed and amended by Arvid Nilsson.
758
759         No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
760         The instance of GraphicsContext3D has already been destroyed but
761         WebGLLayerWebKitThread is not aware of that. This is because compositor
762         layer of the WebGL graphics context was referenced outside the context.
763         So when destructing GraphicsContext3D the compositing layer was not
764         destructed.
765         Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
766         after releasing the compositor layer, so that it won't be de-referenced
767         again later.
768
769         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
770         (WebCore::GraphicsContext3D::~GraphicsContext3D):
771         * platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
772         (WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
773         (WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
774         (WebCore):
775         * platform/graphics/blackberry/WebGLLayerWebKitThread.h:
776         (WebGLLayerWebKitThread):
777
778 2013-05-24  Andreas Kling  <akling@apple.com>
779
780         Typing in Safari's unified field causes unnecessary web content repaints.
781         <http://webkit.org/b/116703>
782
783         Reviewed by Andy Estes.
784
785         Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
786         a string occurs in the page, but doesn't try to mark the occurrences.
787         This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
788         location bar without causing tile repaints.
789
790         * WebCore.exp.in:
791         * page/Page.h:
792         * page/Page.cpp:
793         (WebCore::Page::findMatchesForText):
794         (WebCore::Page::markAllMatchesForText):
795         (WebCore::Page::countFindMatches):
796
797             Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
798             matches should be marked or not. countFindMatches() is the new helper that doesn't mark.
799
800 2013-05-23  Beth Dakin  <bdakin@apple.com>
801
802         https://bugs.webkit.org/show_bug.cgi?id=116702
803         REGRESSION (r150399): Scrollbar missing for all overflow scroll
804         -and corresponding-
805         <rdar://problem/13963712>
806
807         Reviewed by Simon Fraser.
808
809         This was a silly copy-paste error.
810         * rendering/RenderLayer.cpp:
811         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
812
813 2013-05-23  peavo@outlook.com  <peavo@outlook.com>
814
815         [WinCairo] Build fails to link.
816         https://bugs.webkit.org/show_bug.cgi?id=116671
817
818         Reviewed by Brent Fulgham.
819
820         * page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.
821
822 2013-05-23  Roger Fong  <roger_fong@apple.com>
823
824         Unreviewed. Modify WebCore for AppleWin 2010 production build.
825
826         * WebCore.vcxproj/WebCoreGenerated.make:
827         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
828         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
829
830 2013-05-23  Yongjun Zhang  <yongjun_zhang@apple.com>
831
832         We need to clear main resource when detaching DocumentLoader from the frame.
833         https://bugs.webkit.org/show_bug.cgi?id=116680
834
835         Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
836         in stopLoading().  There is possibility that main resource not being cleared, and this could cause crash later
837         since docLoader could still receive resource callbacks.  To avoid that, we can remove docLoader from main resource's
838         client set in detachFromFrame.
839
840         Reviewed by Brady Eidson.
841
842         No new tests, this doesn't happen on OS X.
843
844         * loader/DocumentLoader.cpp:
845         (WebCore::DocumentLoader::detachFromFrame):
846         (WebCore::DocumentLoader::clearMainResource):
847         * loader/cache/CachedResource.h: make hasClient accessible publicly.
848         (WebCore::CachedResource::hasClient):
849         (CachedResource):
850
851 2013-05-23  Mihai Maerean  <mmaerean@adobe.com>
852
853         assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
854         https://bugs.webkit.org/show_bug.cgi?id=116614
855
856         Reviewed by David Hyatt.
857
858         Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
859         the only child has column-span:all.
860
861         Test: fast/multicol/newmulticol/direct-child-column-span-all.html
862
863         * rendering/RenderBlock.cpp:
864         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
865
866 2013-05-23  Anders Carlsson  <andersca@apple.com>
867
868         Crash in convertMainResourceLoadToDownload when downloading file by option-return
869         https://bugs.webkit.org/show_bug.cgi?id=116451
870
871         Reviewed by Andreas Kling.
872
873         Handle MainResourceLoader being null here which will happen when loading a cached main resource.
874
875         * loader/DocumentLoader.cpp:
876         (WebCore::DocumentLoader::continueAfterContentPolicy):
877
878 2013-05-23  Benjamin Poulain  <bpoulain@apple.com>
879
880         KURL::createCFURL() should return a RetainPtr<CFURLRef>
881         https://bugs.webkit.org/show_bug.cgi?id=116644
882
883         Reviewed by Andreas Kling.
884
885         For consistency with the other createCFType() APIs in WebKit, KURL should
886         return a RetainPtr<> instead of raw +1 CFURLRef.
887
888         No leak were discovered while making this change.
889
890         * platform/KURL.h:
891         * platform/cf/KURLCFNet.cpp:
892         (WebCore):
893         (WebCore::createCFURLFromBuffer):
894         (WebCore::KURL::createCFURL):
895         (WebCore::KURL::fileSystemPath):
896         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
897         (WebCore::AVFWrapper::createAssetForURL):
898         * platform/graphics/cg/GraphicsContextCG.cpp:
899         (WebCore::GraphicsContext::setURLForRect):
900         * platform/mac/KURLMac.mm:
901         (WebCore):
902         (WebCore::KURL::operator NSURL *):
903         (WebCore::KURL::createCFURL):
904         * platform/network/cf/CookieJarCFNet.cpp:
905         (WebCore::setCookiesFromDOM):
906         (WebCore::cookiesForDOM):
907         (WebCore::cookieRequestHeaderFieldValue):
908         (WebCore::getRawCookies):
909         (WebCore::deleteCookie):
910         * platform/network/cf/DNSCFNet.cpp:
911         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
912         * platform/network/cf/ProxyServerCFNet.cpp:
913         (WebCore::addProxyServersForURL):
914         * platform/network/cf/ResourceRequestCFNet.cpp:
915         (WebCore::ResourceRequest::doUpdatePlatformRequest):
916         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
917         * platform/network/cf/ResourceResponseCFNet.cpp:
918         (WebCore::ResourceResponse::cfURLResponse):
919         * platform/network/cf/SocketStreamHandleCFNet.cpp:
920         (WebCore::SocketStreamHandle::SocketStreamHandle):
921
922 2013-05-18  Robert Hogan  <robert@webkit.org>
923
924         The ellipsis in a text overflow should not avoid floats
925         https://bugs.webkit.org/show_bug.cgi?id=115746
926
927         Reviewed by David Hyatt.
928
929         When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
930         That is to say, if there is a float in the box we overflow we should let our no-wrap text,
931         including the ellipsis, render inside the float just as we would if overflow was hidden but
932         a text-overflow rendering had not been specified.
933
934         Test: fast/css/text-overflow-ellipsis-behind-floats.html
935
936         * rendering/RenderBlockLineLayout.cpp:
937         (WebCore::RenderBlock::checkLinesForTextOverflow):
938
939 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
940
941         Unreviewed, rolling out r150586.
942         http://trac.webkit.org/changeset/150586
943         https://bugs.webkit.org/show_bug.cgi?id=116660
944
945         Those constructors should be exposed on the WorkerContext, not
946         the DOMWindow
947
948         * fileapi/FileReaderSync.idl:
949         * workers/WorkerLocation.idl:
950
951 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
952
953         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation
954         https://bugs.webkit.org/show_bug.cgi?id=116660
955
956         Reviewed by Kentaro Hara.
957
958         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation to match their
959         respective specifications:
960         - http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
961         - http://dev.w3.org/html5/workers/#workerlocation
962
963         No new tests, covered by existing tests.
964
965         * fileapi/FileReaderSync.idl:
966         * workers/WorkerLocation.idl:
967
968 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
969
970         Remove special case for MessagePortArray from bindings generator
971         https://bugs.webkit.org/show_bug.cgi?id=116653
972
973         Reviewed by Kentaro Hara.
974
975         Use MessagePort[] instead of MessagePortArray type in the IDL as MessagePortArray
976         is not defined on IDL side. This allows us to remove the special case for
977         MessagePortArray from the bindings generator.
978
979         No new tests, no behavior change.
980
981         * bindings/js/JSMessageEventCustom.cpp:
982         (WebCore::JSMessageEvent::data):
983         * bindings/scripts/CodeGeneratorJS.pm:
984         (NativeToJSValue): Remove special case for MessagePortArray.
985         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
986         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
987         (WebDOMTestSerializedScriptValueInterface):
988         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
989         (webkit_dom_test_serialized_script_value_interface_get_property):
990         (webkit_dom_test_serialized_script_value_interface_class_init):
991         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
992         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
993         (WebCore::jsTestSerializedScriptValueInterfacePorts):
994         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
995         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
996         * bindings/scripts/test/TestSerializedScriptValueInterface.idl: Replace MessagePortArray
997         by MessagePort[].
998         * dom/MessageEvent.h:
999         (WebCore::MessageEvent::ports): The method should return a Vector, not a Vector*
1000         as the array on JavaScript side is not nullable.
1001         * dom/MessageEvent.idl: Replace MessagePortArray by MessagePort[].
1002
1003 2013-05-23  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1004
1005         [EFL] Back, Forward and Stop should be hidden in context menu
1006         https://bugs.webkit.org/show_bug.cgi?id=116615
1007
1008         Reviewed by Christophe Dumez.
1009
1010         Context menu items: Back, Forward, Stop, Reload, should be shown only when
1011         they are able to perform action.
1012
1013         No new tests - no new functionality.
1014
1015         * page/ContextMenuController.cpp:
1016         (WebCore::ContextMenuController::populate):
1017
1018 2013-05-22  Dean Jackson  <dino@apple.com>
1019
1020         Rolling out r150555. It borked about 30 media tests.
1021
1022         * WebCore.xcodeproj/project.pbxproj:
1023         * html/HTMLMediaElement.cpp:
1024         (WebCore::HTMLMediaElement::HTMLMediaElement):
1025         * html/HTMLMediaElement.h:
1026         * platform/audio/AudioSession.cpp:
1027         (WebCore):
1028         (WebCore::AudioSession::AudioSession):
1029         (WebCore::AudioSession::preferredBufferDuration):
1030         (WebCore::AudioSession::setPreferredBufferDuration):
1031         * platform/audio/AudioSession.h:
1032         * platform/audio/AudioSessionListener.h:
1033         (AudioSessionListener):
1034         * platform/audio/AudioSessionManager.cpp: Removed.
1035         * platform/audio/AudioSessionManager.h: Removed.
1036         * platform/audio/ios/AudioDestinationIOS.cpp:
1037         (WebCore::AudioDestinationIOS::configure):
1038         * platform/audio/ios/AudioSessionIOS.mm:
1039         (WebCore::AudioSession::preferredBufferDuration):
1040         (WebCore::AudioSession::setPreferredBufferDuration):
1041         * platform/audio/mac/AudioDestinationMac.cpp:
1042         (WebCore::AudioDestination::hardwareSampleRate):
1043         (WebCore::AudioDestinationMac::AudioDestinationMac):
1044         (WebCore::AudioDestinationMac::configure):
1045         * platform/audio/mac/AudioDestinationMac.h:
1046         (AudioDestinationMac):
1047         * platform/audio/mac/AudioSessionMac.cpp: Removed.
1048         * platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
1049
1050 2013-05-20  Jeffrey Pfau  <jpfau@apple.com>
1051
1052         Active DOM object resumption should match reason for suspending
1053         https://bugs.webkit.org/show_bug.cgi?id=116476
1054
1055         Add a reason to the arguments for resuming active DOM object and
1056         scheduled tasks and ensure that it matches the suspend reason before
1057         actually resuming the objects.
1058
1059         Reviewed by Joseph Pecoraro.
1060
1061         No new tests, no change in functionality.
1062
1063         * bindings/js/PageScriptDebugServer.cpp:
1064         (WebCore::PageScriptDebugServer::setJavaScriptPaused): Add matching resume reason
1065         * dom/Document.cpp:
1066         (WebCore::Document::resumeActiveDOMObjects): Check for matching resume reason
1067         (WebCore::Document::resumeScheduledTasks): Check for matching resume reason
1068         * dom/Document.h:
1069         (Document):
1070         * dom/ScriptExecutionContext.cpp:
1071         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Check for matching resume reason
1072         * dom/ScriptExecutionContext.h:
1073         (ScriptExecutionContext):
1074         (WebCore::ScriptExecutionContext::reasonForSuspendingActiveDOMObjects): Expose suspend reason to subclasses
1075         * history/CachedFrame.cpp:
1076         (WebCore::CachedFrameBase::restore): Add matching resume reason
1077         * page/Frame.cpp:
1078         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Add matching resume reason
1079         * page/PageGroupLoadDeferrer.cpp:
1080         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): Add matching resume reason
1081
1082 2013-05-22  Dean Jackson  <dino@apple.com>
1083
1084         Don't snapshot plugins that can't be snapshotted
1085         https://bugs.webkit.org/show_bug.cgi?id=116490
1086
1087         Reviewed by Tim Horton.
1088
1089         Some plugins, such as QuickTime, don't support snapshotting. We're
1090         planning on another way to capture snapshots, but in the meantime make
1091         sure that they don't fail to initialise because they were told to
1092         not use accelerated rendering.
1093
1094         * WebCore.exp.in: Export restartSnapshottedPlugin so that it can be used from WK2.
1095         * html/HTMLPlugInImageElement.cpp:
1096         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Don't set the play state before restarting.
1097         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Make sure we indicated that this snapshotted plugin was clicked.
1098         * html/HTMLPlugInImageElement.h: Move restartSnapshottedPlugin from protected to public.
1099         * rendering/RenderSnapshottedPlugIn.cpp:
1100         (WebCore::RenderSnapshottedPlugIn::handleEvent): Don't set play state here. Let the restart functions do it.
1101
1102 2013-05-22  Max Vujovic  <mvujovic@adobe.com>
1103
1104         [CSS Shaders] valueForCustomFilterTransformParameter should check that renderer is a RenderBox
1105         https://bugs.webkit.org/show_bug.cgi?id=116464
1106
1107         Reviewed by Alexandru Chiculita.
1108
1109         If the renderer is not a RenderBox, we just use a zero size to compute the transform,
1110         like in CSSComputedStyleDeclaration::computedTransform.
1111
1112         Test: css3/filters/custom/custom-filter-crash-inline-computed-style.html
1113
1114         * css/CSSComputedStyleDeclaration.cpp:
1115         (WebCore::valueForCustomFilterTransformParameter):
1116
1117 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
1118
1119         Fix assertion in the getComputedStyle-background-shorthand.html test
1120         https://bugs.webkit.org/show_bug.cgi?id=116639
1121
1122         Reviewed by Ryosuke Niwa.
1123
1124         getComputedStyle-background-shorthand.html was asserting under the newly added
1125         code in willBeRemovedFromTree(). The assertion was caused by too many calls to
1126         FrameView::removeSlowRepaintObject(), which happened because we called it for
1127         RenderTexts, which share style with their parent renderer.
1128         
1129         RenderText overrides styleWillChange() to do nothing, so we never
1130         call add/removeSlowRepaintObject() for them. Thus we should also skip this
1131         work in willBeRemovedFromTree() for RenderTexts.
1132
1133         * rendering/RenderObject.cpp:
1134         (WebCore::RenderObject::willBeRemovedFromTree):
1135
1136 2013-05-22  Bem Jones-Bey  <bjonesbe@adobe.com>
1137
1138         Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
1139         https://bugs.webkit.org/show_bug.cgi?id=116626
1140
1141         Reviewed by David Hyatt.
1142
1143         This is a port of a Blink bug fix by Emil Eklund.
1144
1145         Account for saturated estimated position in RenderBlock::layoutBlockChild.
1146
1147         If the estimated top position is saturated the comparison with oldLogicalTop
1148         might yield a false negative as adding and removing margins, borders etc from
1149         a saturated number might yield incorrect results. If this is the case always
1150         mark for layout.
1151
1152         Minimal test case impractical. See bug for raw fuzzer test case.
1153
1154         * platform/LayoutUnit.h:
1155         (WebCore::LayoutUnit::mightBeSaturated): Add helper method for checking whether
1156             a number might be saturated.
1157         * rendering/RenderBlock.cpp:
1158         (WebCore::RenderBlock::layoutBlockChild): Check if logicalTopEstimate is likely
1159             to be saturated and if so mark for layout.
1160
1161 2013-05-22  Benjamin Poulain  <benjamin@webkit.org>
1162
1163         Remove CSSPropertySourceData emptyCSSPropertySourceData
1164         https://bugs.webkit.org/show_bug.cgi?id=116517
1165
1166         Reviewed by Darin Adler.
1167
1168         This was added for chromium and does not seem to be used
1169         anywhere anymore.
1170
1171         * css/CSSParser.cpp:
1172         (WebCore::CSSParser::CSSParser):
1173         * css/CSSPropertySourceData.cpp:
1174         * css/CSSPropertySourceData.h:
1175
1176 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
1177
1178         Buildfix for !ENABLE(FULLSCREEN_API) platforms.
1179
1180         Rubber-stamped by Ryosuke Niwa.
1181
1182         * rendering/RenderInline.cpp: Missing #if guard added.
1183         (WebCore::RenderInline::splitInlines):
1184
1185 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
1186
1187         Fix a typo in 150469.
1188
1189         * editing/Editor.cpp:
1190         (WebCore::dispatchEditableContentChangedEvents):
1191
1192 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
1193
1194         REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
1195         https://bugs.webkit.org/show_bug.cgi?id=110622
1196
1197         Reviewed by David Hyatt.
1198
1199         Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
1200
1201         Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
1202         since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
1203         inline splitting to be aware of RenderFullScreen.
1204
1205         Test: fullscreen/full-screen-inline-split-crash.html
1206
1207         * rendering/RenderInline.cpp:
1208         (WebCore::RenderInline::splitInlines):
1209
1210 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
1211
1212         Fix issues with focus rings on search fields
1213         https://bugs.webkit.org/show_bug.cgi?id=116591
1214
1215         Reviewed by Darin Adler.
1216         
1217         On a future OS, the rect returned by _focusRingVisibleRect should
1218         be in the coordinate system of the that NSView, not the base
1219         coordinate system, so fix the code that sets and reads the global
1220         focusRingClipRect variable accordingly.
1221
1222         * platform/graphics/mac/WebLayer.mm:
1223         (drawLayerContents):
1224         * platform/mac/ThemeMac.mm:
1225         (-[WebCoreFlippedView _focusRingVisibleRect]):
1226
1227 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
1228
1229         New Flickr doesn't get fast scrolling but should
1230         https://bugs.webkit.org/show_bug.cgi?id=116514
1231
1232         Reviewed by Darin Adler.
1233         
1234         RenderObject increments and decrements a counter of slow repaint objects on
1235         FrameView when it sees style changes related to background-attachment:fixed.
1236         However, it omitted to decrement the count when a renderer with a fixed background
1237         was destroyed.
1238         
1239         This caused Flickr to never fall into fast scrolling mode, since it toggled
1240         display:none on an element with a fixed background during loading, then removed
1241         the fixed background.
1242         
1243         Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
1244
1245         Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
1246                platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
1247                platform/mac-wk2/tiled-drawing/slow-scrolling.html
1248
1249         * rendering/RenderObject.cpp:
1250         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
1251         (WebCore::RenderObject::styleWillChange):
1252         (WebCore::RenderObject::willBeRemovedFromTree):
1253
1254 2013-05-22  Robert Hogan  <robert@webkit.org>
1255
1256         Need to Remove Anonymous Wrappers When All Children Become Inline
1257         https://bugs.webkit.org/show_bug.cgi?id=115687
1258
1259         Reviewed by David Hyatt.
1260
1261         Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
1262         when a block becoming float or positioned removes the need for them.
1263
1264         Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
1265
1266         * rendering/RenderBlock.h:
1267         (RenderBlock):
1268         * rendering/RenderObject.cpp:
1269         (WebCore):
1270         (WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
1271         (WebCore::RenderObject::styleWillChange):
1272         (WebCore::RenderObject::styleDidChange):
1273         * rendering/RenderObject.h:
1274         (RenderObject):
1275
1276 2013-05-22  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1277
1278         [css] Update ETextDecorations enum to TextDecorations
1279         https://bugs.webkit.org/show_bug.cgi?id=116581
1280
1281         Reviewed by Andreas Kling.
1282
1283         Currently, ETextDecorations enum uses a C-like coding style for its
1284         enumeration values, as well as a 'E' prefix that surely had some meaning
1285         in the past, but not nowadays.
1286
1287         No behavior changes, covered by existing tests.
1288
1289         * accessibility/AccessibilityRenderObject.cpp:
1290         (WebCore::AccessibilityRenderObject::hasPlainText):
1291         (WebCore::AccessibilityRenderObject::hasUnderline):
1292         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1293         (getAttributeSetForAccessibilityObject):
1294         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1295         (AXAttributeStringSetStyle):
1296         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1297         (AXAttributeStringSetStyle):
1298         * css/CSSComputedStyleDeclaration.cpp:
1299         (WebCore::renderTextDecorationFlagsToCSSValue):
1300         * css/CSSPrimitiveValueMappings.h:
1301         (WebCore::CSSPrimitiveValue::operator TextDecoration):
1302         * css/DeprecatedStyleBuilder.cpp:
1303         (WebCore::ApplyPropertyTextDecoration::applyValue):
1304         (WebCore::ApplyPropertyTextDecoration::createHandler):
1305         * editing/mac/EditorMac.mm:
1306         (WebCore::Editor::fontAttributesForSelectionStart):
1307         * platform/mac/HTMLConverter.mm:
1308         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1309         * rendering/InlineTextBox.cpp:
1310         (WebCore::InlineTextBox::paint):
1311         (WebCore::InlineTextBox::paintDecoration):
1312         * rendering/InlineTextBox.h:
1313         * rendering/RenderObject.cpp:
1314         (WebCore::RenderObject::getTextDecorationColors):
1315         * rendering/style/RenderStyle.h:
1316         * rendering/style/RenderStyleConstants.h:
1317         (WebCore::operator|):
1318         (WebCore::operator|=):
1319         * rendering/style/StyleVisualData.h:
1320         (StyleVisualData):
1321         * rendering/svg/SVGInlineTextBox.cpp:
1322         (WebCore::SVGInlineTextBox::paint):
1323         (WebCore::positionOffsetForDecoration):
1324         (WebCore::thicknessForDecoration):
1325         (WebCore::findRenderObjectDefininingTextDecoration):
1326         (WebCore::SVGInlineTextBox::paintDecoration):
1327         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
1328         * rendering/svg/SVGInlineTextBox.h:
1329
1330 2013-05-22  Lori Anderson  <lori@rkymtnhi.com>
1331
1332         [GStreamer] Allow multiple log levels in media player
1333         https://bugs.webkit.org/show_bug.cgi?id=116618
1334
1335         Reviewed by Philippe Normand.
1336
1337         No new tests, just changing logging.
1338
1339         * platform/graphics/gstreamer/GStreamerUtilities.h:
1340         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1341         (WebCore::MediaPlayerPrivateGStreamer::load):
1342         (WebCore::MediaPlayerPrivateGStreamer::pause):
1343         (WebCore::MediaPlayerPrivateGStreamer::seek):
1344         (WebCore::MediaPlayerPrivateGStreamer::setRate):
1345         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1346
1347 2013-05-22  Beth Dakin  <bdakin@apple.com>
1348
1349         The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
1350         https://bugs.webkit.org/show_bug.cgi?id=116623
1351
1352         Reviewed by Geoffrey Garen.
1353
1354         Make sure we have actually achieved some milestones before calling didLayout().
1355         * page/FrameView.cpp:
1356         (WebCore::FrameView::performPostLayoutTasks):
1357
1358 2013-05-22  Mario Sanchez Prada  <mario.prada@samsung.com>
1359
1360         [GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
1361         https://bugs.webkit.org/show_bug.cgi?id=114870
1362
1363         Reviewed by Martin Robinson.
1364
1365         Re-implement this functions without using GailTextUtil nor Pango.
1366
1367         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1368         (webkitAccessibleTextGetChar): New function.
1369         (webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
1370
1371 2013-05-22  Antoine Quint  <graouts@apple.com>
1372
1373         [Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
1374         https://bugs.webkit.org/show_bug.cgi?id=116605
1375
1376         Reviewed by Eric Carlson.
1377
1378         Ensure that rtl languages are properly recognized by the captions menu such that text
1379         layout and alignment is natural.
1380
1381         * css/mediaControls.css:
1382         (::-webkit-media-controls):
1383         Remove the forced "direction: ltr" property which was forcing all layout to be
1384         left-to-right.
1385
1386         * css/mediaControlsQuickTime.css:
1387         (video::-webkit-media-controls-closed-captions-track-list):
1388         Remove the forced "text-align: left" property which was forcing all caption
1389         titles to be left-aligned.
1390
1391         (video::-webkit-media-controls-closed-captions-track-list h3):
1392         Use "-webkit-margin-start" instead of "padding-left" to position the heading
1393         such that it adds the margin on the left for ltr languages and on the right
1394         for rtl languages.
1395
1396         (video::-webkit-media-controls-closed-captions-track-list li):
1397         Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
1398         to position itself relative to the caption title rather than the list element.
1399
1400         (video::-webkit-media-controls-closed-captions-track-list li.selected::before):
1401         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
1402         Make the checkmarks a ::before pseudo-class rather than a background-image such that
1403         we may control its positioning using the internationlization-friendly "-webkit-margin-start"
1404         property.
1405
1406         * html/shadow/MediaControlElements.cpp:
1407         (WebCore::MediaControlClosedCaptionsContainerElement::create):
1408         Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
1409         means that the first string displayed within the captions container, currently the
1410         "Subtitles" <h3> element, defines the direction for the whole container. It is therefore
1411         crucial that this string is properly localized in rtl languages as falling back to
1412         english would mean the entire caption container is using ltr.
1413
1414 2013-05-22  Hugo Parente Lima  <hugo.lima@openbossa.org>
1415
1416         WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
1417         https://bugs.webkit.org/show_bug.cgi?id=116340
1418
1419         Reviewed by Christophe Dumez.
1420
1421         No new tests, just a simple build fix.
1422
1423         * inspector/InspectorDOMStorageAgent.cpp:
1424         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
1425         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
1426
1427 2013-05-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1428
1429         Have IDL interface names match their global constructor
1430         https://bugs.webkit.org/show_bug.cgi?id=116520
1431
1432         Reviewed by Kentaro Hara.
1433
1434         Have IDL interface names match their global constructor name on DOMWindow.idl
1435         using [InterfaceName] extended attribute. This affects in particular webkit
1436         prefixed constructors. This is mandated by Web IDL specification:
1437         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
1438
1439         As a consequence, we can now get rid of [NoInterfaceObject] extended attribute
1440         for those interfaces and have their global constructors automatically generated
1441         by the bindings generator.
1442
1443         No new tests, no behavior change for layout tests.
1444
1445         * Modules/mediasource/MediaSource.idl:
1446         * Modules/mediasource/SourceBuffer.idl:
1447         * Modules/mediasource/SourceBufferList.idl:
1448         * Modules/mediastream/MediaStream.idl:
1449         * Modules/mediastream/RTCPeerConnection.idl:
1450         * Modules/speech/SpeechGrammar.idl:
1451         * Modules/speech/SpeechGrammarList.idl:
1452         * Modules/speech/SpeechRecognition.idl:
1453         * Modules/speech/SpeechRecognitionError.idl:
1454         * Modules/speech/SpeechRecognitionEvent.idl:
1455         * Modules/webaudio/OfflineAudioContext.idl:
1456         * Modules/webaudio/PannerNode.idl:
1457         * dom/ShadowRoot.idl:
1458         * page/DOMWindow.idl:
1459
1460 2013-05-21  Mihai Tica  <mitica@adobe.com>
1461         
1462         Update the background blending implementation to match the changes done
1463         in the spec. This implies that background color blending is removed and
1464         the background layers won't blend with the content behind the element
1465         any more.
1466         https://bugs.webkit.org/show_bug.cgi?id=116212
1467
1468         Reviewed by Dean Jackson.
1469
1470         * rendering/RenderBox.cpp:
1471         (WebCore::RenderBox::paintFillLayers):
1472         * rendering/RenderBoxModelObject.cpp:
1473         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1474
1475 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1476
1477         Use-after-free in DOMSelection::containsNode
1478         https://bugs.webkit.org/show_bug.cgi?id=116468
1479
1480         Reviewed by Andreas Kling.
1481
1482         Retain the node pointer. Also bail out early if the node was not in the document
1483         since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise.
1484
1485         Test: editing/selection/contains-node-crash.html
1486
1487         * page/DOMSelection.cpp:
1488         (WebCore::DOMSelection::containsNode):
1489         * page/DOMSelection.h:
1490         (DOMSelection):
1491
1492 2013-05-21  Joseph Pecoraro  <pecoraro@apple.com>
1493
1494         Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
1495         https://bugs.webkit.org/show_bug.cgi?id=116569
1496
1497         Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
1498
1499         Reviewed by Timothy Hatcher.
1500
1501         Test: inspector/load-resource-synchronously-utf8.html
1502
1503         * inspector/InspectorFrontendHost.cpp:
1504         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
1505
1506 2013-05-21  Andy Estes  <aestes@apple.com>
1507
1508         Allow session storage for third-party origins even if third-party data access is blocked.
1509         https://bugs.webkit.org/show_bug.cgi?id=116532
1510
1511         Reviewed by Anders Carlsson.
1512
1513         In http://trac.webkit.org/changeset/149326 we relaxed our policy for
1514         localStorage when third-party data blocking is enabled to create a
1515         transient, session-scoped storage area for the third-party origin
1516         instead of throwing an exception. Since this gives essentially the same
1517         behavior as sessionStorage, we might as well also allow sessionStorage
1518         for third-party origins.
1519
1520         Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
1521
1522         * WebCore.exp.in: Updated the symbol for
1523         SecurityOrigin::canAccessStorage.
1524         * page/DOMWindow.cpp:
1525         (WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
1526         rather than canAccessLocalStorage().
1527         * page/SecurityOrigin.cpp:
1528         (WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
1529         indicating if access should be allowed from third-party origins.
1530         * page/SecurityOrigin.h:
1531         (WebCore::SecurityOrigin::canAccessSessionStorage): Called
1532         canAccessStorage() with AlwaysAllowFromThirdParty.
1533         (SecurityOrigin):
1534
1535 2013-05-21  Hugo Parente Lima  <hugo.lima@openbossa.org>
1536
1537         [EFL] Add missing #if guards on drag support methods
1538         https://bugs.webkit.org/show_bug.cgi?id=116574
1539
1540         Reviewed by Christophe Dumez.
1541
1542         * platform/efl/PasteboardEfl.cpp:
1543         (WebCore):
1544
1545 2013-05-21  Antti Koivisto  <antti@apple.com>
1546
1547         Remove stub HTMLContentElement
1548         https://bugs.webkit.org/show_bug.cgi?id=116580
1549
1550         Reviewed by Andreas Kling.
1551
1552         Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.
1553
1554         * html/HTMLDetailsElement.cpp:
1555         (WebCore::DetailsContentElement::DetailsContentElement):
1556         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
1557         * html/HTMLSummaryElement.cpp:
1558         (WebCore::SummaryContentElement::SummaryContentElement):
1559         * html/shadow/HTMLContentElement.cpp:
1560         (WebCore::HTMLContentElement::contentTagName):
1561         * html/shadow/HTMLContentElement.h:
1562         (WebCore::isHTMLContentElement):
1563         * html/shadow/InsertionPoint.cpp:
1564         (WebCore::InsertionPoint::setResetStyleInheritance):
1565         * html/shadow/InsertionPoint.h:
1566         
1567             Also remove some leftover selector code.
1568
1569         (WebCore::InsertionPoint::insertionPointType):
1570
1571 2013-05-21  Andreas Kling  <akling@apple.com>
1572
1573         Robustify repaint of previous caret node when moving FrameSelection.
1574         <http://webkit.org/b/116558>
1575
1576         Reviewed by Ryosuke Niwa.
1577
1578         As a follow-up to r150396, also repaint the caret rects if the previous node is contenteditable.
1579
1580         * editing/FrameSelection.cpp:
1581         (WebCore::FrameSelection::recomputeCaretRect):
1582
1583 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1584
1585         Unreviewed build fix after r150469. We need to bail out here when DOM is mutated by an event listener such that
1586         the split text nodes no longer exist right next to each other.
1587
1588         * editing/InsertParagraphSeparatorCommand.cpp:
1589         (WebCore::InsertParagraphSeparatorCommand::doApply):
1590
1591 2013-05-21  Antti Koivisto  <antti@apple.com>
1592
1593         Remove ScopeContentDistribution
1594         https://bugs.webkit.org/show_bug.cgi?id=116576
1595
1596         Reviewed by Andreas Kling.
1597
1598         With maximum one ShadowRoot per Element this can be smashed into ContentDistributor.
1599
1600         * dom/ShadowRoot.cpp:
1601         (WebCore):
1602         * dom/ShadowRoot.h:
1603         (WebCore):
1604         * html/shadow/ContentDistributor.cpp:
1605         (WebCore::ContentDistributor::ContentDistributor):
1606         (WebCore):
1607         (WebCore::ContentDistributor::~ContentDistributor):
1608         (WebCore::ContentDistributor::invalidateInsertionPointList):
1609         (WebCore::ContentDistributor::ensureInsertionPointList):
1610         (WebCore::ContentDistributor::distribute):
1611         (WebCore::ContentDistributor::invalidate):
1612         * html/shadow/ContentDistributor.h:
1613         (WebCore):
1614         (ContentDistributor):
1615         * html/shadow/InsertionPoint.cpp:
1616         (WebCore::InsertionPoint::InsertionPoint):
1617         (WebCore::InsertionPoint::insertedInto):
1618         (WebCore::InsertionPoint::removedFrom):
1619         
1620             Simplify insertion point list invalidation.
1621
1622         * html/shadow/InsertionPoint.h:
1623
1624 2013-05-21  Zoltan Horvath  <zoltan@webkit.org>
1625
1626         [CSS Regions][CSS Exclusions] Multiple regions with shape-insides should respect positioned shapes and overflow
1627         https://bugs.webkit.org/show_bug.cgi?id=115001
1628
1629         Reviewed by David Hyatt.
1630
1631         In r150375 I implemented the new overflow behavior for shape-inside on regions, but it covered only the simple cases
1632         when you had only one region. This patch adds support for the new overflow behavior for multiple regions with multiple
1633         positioned shape-insides and overflow.
1634
1635         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
1636                fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html
1637
1638         * rendering/RenderBlockLineLayout.cpp:
1639         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Cover cases when content flows into the next region, update the
1640         line segments for the overflow.
1641         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): In flow thread case we don't want to adjust the height
1642         in two places.
1643
1644 2013-05-21  Commit Queue  <commit-queue@webkit.org>
1645
1646         Unreviewed, rolling out r150425.
1647         http://trac.webkit.org/changeset/150425
1648         https://bugs.webkit.org/show_bug.cgi?id=116573
1649
1650         Not the right fix for WebKit2 (Requested by rniwa on #webkit).
1651
1652         * testing/Internals.cpp:
1653         (WebCore::Internals::resetToConsistentState):
1654
1655 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
1656
1657         dispatchEvent call can execute javascript and blow away endRoot from underneath
1658         https://bugs.webkit.org/show_bug.cgi?id=116483
1659
1660         Reviewed by Andreas Kling.
1661         
1662         Merge https://chromium.googlesource.com/chromium/blink/+/798cba0af9b2aff21e475e2e08ea3ca5e97dfc2c.
1663
1664         Test: editing/undo/undo-after-event-edited.html
1665
1666         * editing/Editor.cpp:
1667         (WebCore::dispatchEditableContentChangedEvents):
1668
1669 2013-05-21  Antti Koivisto  <antti@apple.com>
1670
1671         Remove ContentDistribution
1672         https://bugs.webkit.org/show_bug.cgi?id=116527
1673
1674         Reviewed by Andreas Kling.
1675
1676         Resolving distribution on traversal is simpler.
1677
1678         * WebCore.exp.in:
1679         * dom/ComposedShadowTreeWalker.cpp:
1680         (WebCore::ComposedShadowTreeWalker::traverseNode):
1681         (WebCore::ComposedShadowTreeWalker::traverseDistributedNodes):
1682         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
1683         * html/HTMLDetailsElement.cpp:
1684         * html/shadow/ContentDistributor.cpp:
1685         (WebCore::ContentDistributor::distributeSelectionsTo):
1686         * html/shadow/ContentDistributor.h:
1687         * html/shadow/HTMLContentElement.idl:
1688         
1689             Remove getDistributedNodes().
1690
1691         * html/shadow/InsertionPoint.cpp:
1692         (WebCore::InsertionPoint::InsertionPoint):
1693         (WebCore::InsertionPoint::attach):
1694         (WebCore::InsertionPoint::detach):
1695         (WebCore):
1696         (WebCore::InsertionPoint::firstDistributed):
1697         (WebCore::InsertionPoint::lastDistributed):
1698         (WebCore::InsertionPoint::nextDistributedTo):
1699         (WebCore::InsertionPoint::previousDistributedTo):
1700         
1701             Rename for clarity.
1702
1703         * html/shadow/InsertionPoint.h:
1704         (WebCore::InsertionPoint::hasDistribution):
1705         (WebCore::InsertionPoint::setHasDistribution):
1706         (WebCore::InsertionPoint::clearDistribution):
1707         (WebCore::InsertionPoint::matchTypeFor):
1708         (InsertionPoint):
1709
1710 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
1711
1712         [GTK] [CMake] Add support for building WebKit2
1713         https://bugs.webkit.org/show_bug.cgi?id=116372
1714
1715         Reviewed by Gustavo Noronha Silva.
1716
1717         * PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
1718
1719 2013-05-21  Jer Noble  <jer.noble@apple.com>
1720
1721         REGRESSION(r101810): Media controls status text missing for live-stream videos.
1722         https://bugs.webkit.org/show_bug.cgi?id=116547
1723
1724         Reviewed by Eric Carlson.
1725
1726         Un-reverse the logic in loadedMetadata() so that the status text isn't
1727         hidden (when it should be shown) for live-stream videos.
1728
1729         * html/shadow/MediaControlsApple.cpp:
1730         (WebCore::MediaControlsApple::loadedMetadata):
1731
1732 2013-05-21  Jer Noble  <jer.noble@apple.com>
1733
1734         Implement overlap-avoidance for in-band text track cues.
1735         https://bugs.webkit.org/show_bug.cgi?id=116540
1736
1737         Reviewed by Eric Carlson.
1738
1739         In-band (or Generic) cues need special casing for certain features
1740         present in in-band tracks, like paint-on and roll-up modes. To avoid
1741         the problem of overlap avoidance forcing a caption meant to appear
1742         below a cue to appear above it when a larger font size is selected,
1743         impose an additional sort ordering for "generic cues". Instead of
1744         cues being ordered by the order they appear in the track, "generic
1745         cues" further sorted by their position within the video area, such
1746         that cues at the bottom of the video area appear first, and later
1747         cues are pushed up to avoid them, preserving the desired apparent
1748         ordering.
1749
1750         * html/HTMLMediaElement.cpp:
1751         (WebCore::compareCueInterval): Added; wrapper around
1752             TextTrackCue::isOrderedBefore.
1753         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1754             After creating the list of current cues, sort them.
1755         * html/track/TextTrackCue.cpp:
1756         (WebCore::TextTrackCue::isOrderedBefore): Added; implementation moved
1757             from TextTrackCueList::add().
1758         * html/track/TextTrackCue.h:
1759         * html/track/TextTrackCueGeneric.cpp:
1760         (WebCore::TextTrackCueGeneric::isOrderedBefore): Added override;
1761             impose additional oredring on generic cues.
1762         * html/track/TextTrackCueGeneric.h:
1763         * html/track/TextTrackCueList.cpp:
1764         (WebCore::TextTrackCueList::add): Moved ordering test into
1765             isOrderedBefore().
1766         * rendering/RenderTextTrackCue.cpp:
1767         (WebCore::RenderTextTrackCue::repositionGenericCue):
1768             Call repositionCueSnapToLinesNotSet() after positioning the cue.
1769
1770 2013-05-20  Jer Noble  <jer.noble@apple.com>
1771
1772         Implement overlap avoidance for cues with snap-to-lines flag not set
1773         https://bugs.webkit.org/show_bug.cgi?id=84296
1774
1775         Reviewed by Eric Carlson.
1776
1777         Test: media/track/track-cue-overlap-snap-to-lines-not-set.html
1778
1779         Support overlap avoidance for the non-snap-to-lines part of the WebVTT spec.
1780
1781         * rendering/RenderTextTrackCue.cpp:
1782         (WebCore::RenderTextTrackCue::isOutside): Split implementation into rectIsWithinContainer().
1783         (WebCore::RenderTextTrackCue::rectIsWithinContainer): Ditto.
1784         (WebCore::RenderTextTrackCue::isOverlapping): Split into overlappingObject() and overlappingObjectForRect().
1785         (WebCore::RenderTextTrackCue::overlappingObject): Ditto.
1786         (WebCore::RenderTextTrackCue::overlappingObjectForRect): Ditto.
1787         (WebCore::RenderTextTrackCue::moveIfNecessaryToKeepWithinContainer): Added.
1788         (WebCore::RenderTextTrackCue::findNonOverlappingPosition): When an overlapping object is found, move the
1789             cue to just above or below that object and try again.
1790         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Move implementation into moveIfNecessaryToKeepWithinContainer().
1791         (WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Add implementanton based on above.
1792         * rendering/RenderTextTrackCue.h:
1793
1794 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1795
1796         Remove GraphicsLayerClient::contentsVisible()
1797         https://bugs.webkit.org/show_bug.cgi?id=116523
1798
1799         Reviewed by Darin Adler.
1800
1801         This is dead code from the BlackBerry port.
1802
1803         * platform/graphics/GraphicsLayerClient.h:
1804         * rendering/RenderLayerBacking.cpp:
1805
1806 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
1807
1808         PLATFORM(*) macros used in Source/WebCore/loader/archive/ArchiveFactory.cpp
1809         https://bugs.webkit.org/show_bug.cgi?id=116453
1810
1811         Reviewed by Alexey Proskuryakov.
1812
1813         * loader/archive/ArchiveFactory.cpp: Remove a redundant PLATFORM(QT) macro when checking whether
1814         to include the LegacyWebArchive.h header that's specific to the WebArchive support. The Qt port
1815         does not enable the WebArchive feature at all (which is enabled only on AppleMac, AppleWin and iOS
1816         platforms) so there's no reason to additionally condition the header include with building on
1817         non-Qt platforms.
1818
1819 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1820
1821         Add BlackBerry definition of NativeImagePtr
1822         https://bugs.webkit.org/show_bug.cgi?id=116526
1823
1824         Reviewed by Darin Adler.
1825
1826         * platform/graphics/NativeImagePtr.h:
1827         (Graphics):
1828         (WebCore):
1829
1830 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1831
1832         [BlackBerry] FontCache::getFontDataForCharacters() returns nullptr
1833         https://bugs.webkit.org/show_bug.cgi?id=116529
1834
1835         Reviewed by Andreas Kling.
1836
1837         This cannot be converted to a PassRefPtr and breaks the build.
1838
1839         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1840         (WebCore::FontCache::getFontDataForCharacters):
1841
1842 2013-05-21  Iago Toral Quiroga  <itoral@igalia.com>
1843
1844         [GTK] Always use EGL to create the GL context when running on Wayland
1845         https://bugs.webkit.org/show_bug.cgi?id=115721
1846
1847         Reviewed by Martin Robinson.
1848
1849         * platform/graphics/cairo/GLContext.cpp:
1850         (WebCore::GLContext::createContextForWindow):
1851         (WebCore::GLContext::createOffscreenContext): Always use EGL to create the GL context
1852         instead of GLX when running on Wayland and make createOffScreenContext reuse the code
1853         in createContextWindow.
1854
1855 2013-05-21  Alberto Garcia  <agarcia@igalia.com>
1856
1857         Add FloatRect::normalized() for BlackBerry
1858         https://bugs.webkit.org/show_bug.cgi?id=116531
1859
1860         Reviewed by Carlos Garcia Campos.
1861
1862         This was added to FloatRectBlackBerry.cpp in r111072 when the
1863         graphics platform code was upstreamed, but this change was
1864         missing.
1865
1866         * platform/graphics/FloatRect.h:
1867         (FloatRect):
1868
1869 2013-05-21  Balazs Kelemen  <kbalazs@webkit.org>
1870
1871         [GStreamer] cleanup duration query
1872         https://bugs.webkit.org/show_bug.cgi?id=116228
1873
1874         Reviewed by Philippe Normand.
1875
1876         Covered by existing tests.
1877
1878         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1879         (WebCore::MediaPlayerPrivateGStreamer::duration):
1880         We can also cache the duration here if the query succeeds.
1881         (MediaPlayerPrivateGStreamer::updateStates):
1882         Don't query when we are in GST_STATE_READY state because it never succeeds.
1883         Do it instead when we reached a stable state.
1884         (MediaPlayerPrivateGStreamer::cacheDuration): Return early if it is already
1885         cached. Recaching is not necessary and now we call it a lot of times.
1886         Only look into the state if the query failed.
1887         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1888         (MediaPlayerPrivateGStreamer): Made m_mediaDuration mutable to be
1889         able to cache it in duration(). Internal cached values is one of
1890         the sensible uses of mutable.
1891
1892 2013-05-21  Patrick Gansterer  <paroga@webkit.org>
1893
1894         Build fix for !USE(ACCELERATED_COMPOSITING) after r150307.
1895
1896         * rendering/RenderLayerCompositor.h: Added missing #if USE(ACCELERATED_COMPOSITING).
1897
1898 2013-05-20  Antti Koivisto  <antti@apple.com>
1899
1900         Simplify Shadow DOM distribution code
1901         https://bugs.webkit.org/show_bug.cgi?id=116454
1902
1903         Reviewed by Andreas Kling.
1904         
1905         Remove code supporting nested insertion points and distributing to multiple insertion points.
1906     
1907         * html/HTMLDetailsElement.cpp:
1908         (DetailsContentElement):
1909         
1910             Make distribution to <details> and <summary> mutually exclusive.
1911
1912         * html/shadow/ContentDistributor.cpp:
1913         (WebCore):
1914         (WebCore::ContentDistributor::distribute):
1915         (WebCore::ContentDistributor::invalidate):
1916         (WebCore::ContentDistributor::distributeSelectionsTo):
1917         * html/shadow/ContentDistributor.h:
1918         * html/shadow/InsertionPoint.cpp:
1919         (WebCore::resolveReprojection):
1920
1921 2013-05-21  Mihnea Ovidenie  <mihnea@adobe.com>
1922
1923         [CSSRegions] Constrain auto-height region computation in a different way
1924         https://bugs.webkit.org/show_bug.cgi?id=116310
1925
1926         Reviewed by Alexandru Chiculita.
1927
1928         After https://bugs.webkit.org/show_bug.cgi?id=74132, the region is a render block. We can use RenderBox::constrainContentBoxLogicalHeightByMinMax
1929         instead of RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight to better reflect the fact that the region is not a replaced element.
1930         Covered by existing regions tests, since when replaced-based the region had an intrinsic height of 0 and now, block-based, it does not have any children.
1931
1932         * rendering/RenderFlowThread.cpp:
1933         (WebCore::RenderFlowThread::addForcedRegionBreak):
1934
1935 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1936
1937         REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
1938         https://bugs.webkit.org/show_bug.cgi?id=116516
1939
1940         Reviewed by Antti Koivisto.
1941
1942         The bug was caused by DRT not resetting various auto correction states.
1943         Do that in Internals::resetToConsistentState.
1944
1945         * testing/Internals.cpp:
1946         (WebCore::Internals::resetToConsistentState):
1947
1948 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
1949
1950         [GTK] Fix concatenations of string literals that are not C++11-compliant
1951         https://bugs.webkit.org/show_bug.cgi?id=116449
1952
1953         Reviewed by Martin Robinson.
1954
1955         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
1956         is simply a matter of separating the string and the string literal that are being concatenated with a space.
1957
1958         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
1959         * platform/gtk/FileSystemGtk.cpp:
1960         (WebCore::sharedResourcesPath):
1961
1962 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
1963
1964         [GTK] Support application/x-mimearchive mimetype for MHTML archives instead of message/rfc822
1965         https://bugs.webkit.org/show_bug.cgi?id=116442
1966
1967         Reviewed by Martin Robinson.
1968
1969         * loader/archive/ArchiveFactory.cpp:
1970         (WebCore::archiveMIMETypes): Like EFL and Qt, register the application/x-mimearchive mime type as a MHTML archive type
1971         and stop propagating the message/rfc822 mime type as such. This also removes a couple of PLATFORM ifdefs.
1972
1973 2013-05-20  Benjamin Poulain  <bpoulain@apple.com>
1974
1975         Minor String fixes in CSS
1976         https://bugs.webkit.org/show_bug.cgi?id=116291
1977
1978         Reviewed by Darin Adler.
1979
1980         Some trival changes to make up for a bad day :)
1981
1982         * css/CSSImageSetValue.cpp:
1983         (WebCore::CSSImageSetValue::customCssText):
1984         * css/CSSImageValue.cpp:
1985         (WebCore::CSSImageValue::customCssText):
1986         * css/CSSImportRule.cpp:
1987         (WebCore::CSSImportRule::cssText):
1988         * css/CSSInheritedValue.cpp:
1989         (WebCore::CSSInheritedValue::customCssText):
1990         * css/CSSInitialValue.cpp:
1991         (WebCore::CSSInitialValue::customCssText):
1992         * css/CSSPrimitiveValue.cpp:
1993         (WebCore::CSSPrimitiveValue::customCssText):
1994         * css/CSSPropertySourceData.cpp:
1995         (WebCore::CSSPropertySourceData::toString):
1996         * css/CSSSelector.cpp:
1997         (WebCore::CSSSelector::selectorText):
1998         * css/CSSStyleRule.cpp:
1999         (WebCore::CSSStyleRule::generateSelectorText):
2000         * css/CSSStyleSheet.h:
2001         (WebCore::CSSStyleSheet::type):
2002         * css/CSSTimingFunctionValue.cpp:
2003         (WebCore::CSSLinearTimingFunctionValue::customCssText):
2004         (WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
2005         * css/CSSValueList.cpp:
2006         (WebCore::CSSValueList::customCssText):
2007         (WebCore::CSSValueList::customSerializeResolvingVariables):
2008         * css/MediaQueryExp.cpp:
2009         (WebCore::MediaQueryExp::serialize):
2010         * css/WebKitCSSFilterValue.cpp:
2011         (WebCore::WebKitCSSFilterValue::customCssText):
2012         * css/WebKitCSSKeyframesRule.cpp:
2013         (WebCore::StyleRuleKeyframes::findKeyframeIndex):
2014         (WebCore::WebKitCSSKeyframesRule::cssText):
2015         * css/WebKitCSSMatFunctionValue.cpp:
2016         (WebCore::WebKitCSSMatFunctionValue::customCssText):
2017         * css/WebKitCSSMixFunctionValue.cpp:
2018         (WebCore::WebKitCSSMixFunctionValue::customCssText):
2019
2020 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
2021
2022         Null pointer deference in WebCore::AppendNodeCommand::create
2023         https://bugs.webkit.org/show_bug.cgi?id=116479
2024
2025         Reviewed by Andreas Kling.
2026         
2027         Merge https://chromium.googlesource.com/chromium/blink/+/5cb43002a44f67a60ecf5a7ed76de2d0bcf89eb2
2028
2029         DeleteSelection::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss() make style and link elements
2030         to be the direct children of the editable root. However, these style and link elements are not necessary editable
2031         and WebKit crashes when they are not.
2032
2033         Test: editing/deleting/delete-uneditable-style.html
2034
2035         * editing/DeleteSelectionCommand.cpp:
2036         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
2037
2038 2013-05-20  Beth Dakin  <bdakin@apple.com>
2039
2040         Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations() 
2041         is set
2042         https://bugs.webkit.org/show_bug.cgi?id=116493
2043         -and corresponding-
2044         <rdar://problem/13912871>
2045
2046         Reviewed by Dean Jackson.
2047
2048         We need to be more aggressive with our approach since AppKit may still ask the 
2049         scrollbars to paint here.
2050
2051         scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has 
2052         been set.
2053         * page/FrameView.cpp:
2054         (WebCore::FrameView::scrollbarAnimationsAreSuppressed):
2055         * page/FrameView.h:
2056         * platform/ScrollableArea.h:
2057         (WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
2058         * rendering/RenderLayer.cpp:
2059         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
2060         * rendering/RenderLayer.h:
2061         (RenderLayer):
2062         * rendering/RenderListBox.cpp:
2063         (WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
2064         * rendering/RenderListBox.h:
2065
2066         Don’t allow animations if scrollbars are suppressed.
2067         * platform/mac/ScrollAnimatorMac.mm:
2068         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2069
2070         Call cancelAnimations() to prevent a just-started animation from continuing.
2071         (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
2072
2073 2013-05-20  Andreas Kling  <akling@apple.com>
2074
2075         Avoid caret repaints if we're not showing carets anyway.
2076         <http://webkit.org/b/116489>
2077
2078         Reviewed by Simon Fraser.
2079
2080         When moving the selection, check if we're inside a contenteditable element (or in caret browsing mode)
2081         before repainting the caret's previous location.
2082
2083         * editing/FrameSelection.cpp:
2084         (WebCore::FrameSelection::recomputeCaretRect):
2085
2086 2013-05-20  Simon Fraser  <simon.fraser@apple.com>
2087
2088         position:sticky should stick for the enclosing overflow ancestor
2089         https://bugs.webkit.org/show_bug.cgi?id=100054
2090
2091         Reviewed by Beth Dakin.
2092         
2093         Make position: -webkit-sticky be constrained by an enclosing ancestor
2094         with non-visible overflow if there is one, rather than being constained
2095         always by the viewport.
2096
2097         Test: fast/css/sticky/sticky-top-overflow.html
2098
2099         * rendering/RenderBoxModelObject.cpp:
2100         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Rename
2101         viewportRect to constrainingRect, since it isn't just about the viewport any more.
2102         Fix an issue where just adding stickyLocation to absContainerFrame.location() was
2103         incorrect when the container is scrolled; we also have to take the scroll offset
2104         into account, and that offset is stored in the layer tree.
2105         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2106         Look for an enclosing layer with overflow clipping, and, if found, use it to
2107         compute the sticky constraint rect.
2108         * rendering/RenderLayer.h: Add a helpful IncludeSelfOrNot, and fix several member functions
2109         to use it place of hard-to-read boolean arguments.
2110         Add enclosingOverflowClipLayer(IncludeSelfOrNot).
2111         (WebCore::RenderLayer::ancestorCompositingLayer):
2112         * rendering/RenderLayer.cpp:
2113         (WebCore::RenderLayer::enclosingOverflowClipLayer): New function, finds the enclosing
2114         layer with overflow clip.
2115         (WebCore::RenderLayer::enclosingCompositingLayer): Use IncludeSelfOrNot.
2116         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint): Ditto.
2117         (WebCore::RenderLayer::enclosingFilterLayer): Ditto.
2118         * rendering/RenderLayerCompositor.cpp:
2119         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor): Use IncludeSelfOrNot.
2120         (WebCore::isViewportConstrainedFixedOrStickyLayer): Renamed from isRootmostFixedOrStickyLayer
2121         and moved up so we can use it in requiresCompositingForPosition().
2122         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Only make sticky composited if
2123         it's viewport-constrained.
2124         (WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
2125         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Declare StickyPositionViewportConstraints
2126         one line down to just before it gets used.
2127
2128 2013-05-20  Jeff Rogers  <jrogers@blackberry.com>
2129
2130         Remove DISABLE_ROUNDED_CORNER_CLIPPING
2131         https://bugs.webkit.org/show_bug.cgi?id=115531
2132
2133         Reviewed by Andreas Kling.
2134
2135         BlackBerry port is no longer using this.
2136
2137         * rendering/RenderLayer.cpp:
2138         (WebCore::inContainingBlockChain):
2139         (WebCore::RenderLayer::clipToRect):
2140
2141 2013-05-20  Tim Horton  <timothy_horton@apple.com>
2142
2143         Clients should have a way to extend rendering suppression
2144         https://bugs.webkit.org/show_bug.cgi?id=116463
2145         <rdar://problem/13738496>
2146
2147         Reviewed by Andy Estes.
2148
2149         * WebCore.exp.in:
2150         Export FrameView::setVisualUpdatesAllowedByClient.
2151
2152         * dom/Document.cpp:
2153         (WebCore::Document::setVisualUpdatesAllowed):
2154         Move rendering-suppression watchdog into setVisualUpdatesAllowed(bool).
2155         setVisualUpdatesAllowed(ReadyState) should not re-enable visual updates
2156         if the client is itself disabling visual updates.
2157
2158         (WebCore::Document::visualUpdatesSuppressionTimerFired):
2159         If the watchdog fires and the client is still disabling visual
2160         updates, we should not re-enable visual updates, but instead
2161         wait for the client.
2162
2163         (WebCore::Document::setVisualUpdatesAllowedByClient):
2164         Actually re-enable visual updates if we deferred the re-enabling above
2165         (when the page finishes loading, but the client had them disabled).
2166
2167         * dom/Document.h:
2168         (Document): Add setVisualUpdatesAllowedByClient.
2169         * page/FrameView.cpp:
2170         (WebCore::FrameView::FrameView): Visual updates are allowed by default.
2171         (WebCore::FrameView::setVisualUpdatesAllowedByClient):
2172         Forward through to the document, but we also need to persist the state
2173         here in FrameView so that it survives through navigation.
2174
2175         * page/FrameView.h:
2176         (WebCore::FrameView::setVisualUpdatesAllowedByClient): Added.
2177         (WebCore::FrameView::visualUpdatesAllowedByClient): Added.
2178         Added storage for m_visualUpdatesAllowedByClient.
2179
2180 2013-05-20  Hans Muller  <hmuller@adobe.com>
2181
2182         [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
2183         https://bugs.webkit.org/show_bug.cgi?id=116349
2184
2185         Reviewed by Alexandru Chiculita.
2186
2187         Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
2188         Extended the ExclusionShapeValue class to support tracking the property's StyleImage value.
2189
2190         The ExclusionShapeValue::type enums were changed from all upper case to "Intercase" by order
2191         of the style bot.
2192
2193         The existing CSS parsing tests were extended to check URI values.
2194
2195         * css/CSSComputedStyleDeclaration.cpp:
2196         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2197         * css/CSSParser.cpp:
2198         (WebCore::CSSParser::parseValue):
2199         * css/DeprecatedStyleBuilder.cpp:
2200         (WebCore::ApplyPropertyExclusionShape::applyValue):
2201         * css/StyleResolver.cpp:
2202         (WebCore::StyleResolver::loadPendingImages):
2203         * rendering/style/ExclusionShapeValue.h:
2204         (WebCore::ExclusionShapeValue::createImageValue):
2205         (ExclusionShapeValue):
2206         (WebCore::ExclusionShapeValue::image):
2207         (WebCore::ExclusionShapeValue::setImage):
2208         (WebCore::ExclusionShapeValue::ExclusionShapeValue):
2209
2210 2013-05-20  Radu Stavila  <stavila@adobe.com>
2211
2212         [CSSRegions] Fix offsetLeft / offsetTop for elements inside named flow
2213         https://bugs.webkit.org/show_bug.cgi?id=115899
2214
2215         Reviewed by David Hyatt.
2216
2217         Elements in named flows that have the body as their offsetParent, need to compute their
2218         offsetLeft and offsetTop values relative to the body.
2219
2220         Tests: fast/regions/offsetLeft-offsetTop-in-multiple-regions.html
2221                fast/regions/offsetLeft-offsetTop-in-region-absolute-sticky-fixed.html
2222                fast/regions/offsetLeft-offsetTop-in-region-float-vert-rl.html
2223                fast/regions/offsetLeft-offsetTop-in-region-float.html
2224                fast/regions/offsetLeft-offsetTop-inlines-region-in-element.html
2225
2226         * rendering/RenderBoxModelObject.cpp:
2227         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2228         * rendering/RenderFlowThread.cpp:
2229         (WebCore):
2230         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
2231         * rendering/RenderFlowThread.h:
2232
2233 2013-05-20  Zoltan Horvath  <zoltan@webkit.org>
2234
2235         [CSS Regions][CSS Exclusions] shape-inside on regions should respect positioned shapes and overflow
2236         https://bugs.webkit.org/show_bug.cgi?id=116252
2237
2238         Reviewed by David Hyatt.
2239
2240         Regions should respect shape-inside properties which have specified top offset. Since the content which overflows from the
2241         shape should be pushed after the content box (for details check out r148975), I implemented  overflowthe behavior for simple
2242         cases when you have only one region. I'm going to implement it for additional regions in a follow up patch.
2243
2244         Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html
2245                fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html
2246
2247         * rendering/RenderBlockLineLayout.cpp:
2248         (WebCore::RenderBlock::updateLineBoundariesForExclusions): Handle the flow thread case, push the overflowing content after the
2249         content box. Respect existing shape-inside on region tests.
2250         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Set the correct logical top position for the shape-inside in
2251         the case of regions. Respect the region's margins and paddings.
2252
2253 2013-05-20  Darin Adler  <darin@apple.com>
2254
2255         Remove custom binding for the Clipboard clearData function
2256         https://bugs.webkit.org/show_bug.cgi?id=116421
2257
2258         Reviewed by Andreas Kling.
2259
2260         * bindings/js/JSClipboardCustom.cpp: Removed the clearData binding.
2261
2262         * dom/Clipboard.idl: Removed [Custom].
2263
2264         * dom/Clipboard.cpp:
2265         (WebCore::Clipboard::clearData): Renamed from clearAllData.
2266         * dom/Clipboard.h: Rename clearAllData to clearData so we just use
2267         overloading for the one with and without a MIME type.
2268         * platform/ios/ClipboardIOS.h: Rename clearAllData to clearData.
2269         * platform/ios/ClipboardIOS.mm:
2270         (WebCore::ClipboardIOS::clearData): Ditto.
2271         * platform/qt/ClipboardQt.cpp:
2272         (WebCore::ClipboardQt::clearData). Ditto.
2273         * platform/qt/ClipboardQt.h: Ditto.
2274         * platform/win/ClipboardWin.cpp:
2275         (WebCore::ClipboardWin::clearData): Ditto.
2276         * platform/win/ClipboardWin.h: Ditto.
2277
2278 2013-05-20  Eric Carlson  <eric.carlson@apple.com>
2279
2280         [iOS] media/event-queue-crash.html ASSERTs in notifyChildInserted
2281         https://bugs.webkit.org/show_bug.cgi?id=116444
2282
2283         Reviewed by Jer Noble.
2284
2285         No new tests, covered by existing tests.
2286
2287         * html/HTMLMediaElement.cpp:
2288         (WebCore::HTMLMediaElement::configureMediaControls): Only create media controls when the
2289             element is in a Document.
2290
2291 2013-05-20  Antoine Quint  <graouts@apple.com>
2292
2293         [Mac] captions menu should behave more like a menu
2294         https://bugs.webkit.org/show_bug.cgi?id=116436
2295
2296         Reviewed by Eric Carlson.
2297
2298         Let the captions menu behave more like a native Mac menu by hiding it when
2299         clicking anywhere on the page and preventing the page from scrolling when
2300         attempting to scroll the captions menu when it cannot scroll in the requested
2301         direction.
2302
2303         Test: media/video-controls-captions-trackmenu-hide-on-click-outside.html
2304
2305         * dom/EventListener.h:
2306         Add the new MediaControlsAppleEventListenerType.
2307
2308         * html/shadow/MediaControlsApple.cpp:
2309         (WebCore::MediaControlsApple::defaultEventHandler):
2310         (WebCore::MediaControlsApple::hide):
2311         (WebCore::MediaControlsApple::makeTransparent):
2312         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility):
2313         (WebCore::MediaControlsApple::reportedError):
2314         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList):
2315         Use the hideClosedCaptionTrackList() and showClosedCaptionTrackList()
2316         methods to hide and show the captions menu instead of calling hide()
2317         and show() directly on m_closedCaptionsContainer.
2318
2319         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
2320         Show the m_closedCaptionsContainer and register a "mousewheel" event
2321         listener on it as well as a "click" event listener on the entire document.
2322
2323         (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
2324         Hide the m_closedCaptionsContainer and remove the "mousewheel" event
2325         listener on it as well as the "click" event listener on the entire document.
2326
2327         (WebCore::MediaControlsApple::shouldClosedCaptionsContainerPreventPageScrolling):
2328         New private utility to determine whether the m_closedCaptionsContainer can scroll
2329         in the provided scroll direction.
2330
2331         (WebCore::MediaControlsApple::eventListener):
2332         Obtain the event listener used for "mousewheel" and "click" event handlers.
2333
2334         (WebCore::MediaControlsAppleEventListener::handleEvent):
2335         Event handler for the "mousewheel" and "click" events. If we get a "click" event, we
2336         toggle the captions menu visibility and if we get a "mousewheel" event, we call into
2337         shouldClosedCaptionsContainerPreventPageScrolling() to see if we can scroll in the
2338         current scroll direction, and if not prevent the event from resulting in a scroll by
2339         calling preventDefault().
2340
2341         (WebCore::MediaControlsAppleEventListener::operator==):
2342         Required for the successful subclassing of EventListener.
2343
2344         * html/shadow/MediaControlsApple.h:
2345         (MediaControlsAppleEventListener):
2346         (WebCore::MediaControlsAppleEventListener::create):
2347         (WebCore::MediaControlsAppleEventListener::cast):
2348         (WebCore::MediaControlsAppleEventListener::MediaControlsAppleEventListener):
2349         New subclass of EventListener required to provide a custom event listener for the
2350         "mousewheel" and "click" events registered in showClosedCaptionTrackList() and
2351         hideClosedCaptionTrackList().
2352
2353 2013-05-18  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
2354
2355         [Cairo] Canvas-shadow behavior is not being as expected
2356         https://bugs.webkit.org/show_bug.cgi?id=108897
2357
2358         Reviewed by Martin Robinson.
2359
2360         ShadowBlur::endShadowLayer copies the image from shadowContext to cairoContext.
2361         CairoContext-path should be empty for doing this copy. Otherwise, the 
2362         original-image area will also get filled with the shadow.
2363
2364         Test: fast/canvas/canvas-image-shadow.html
2365
2366         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2367         (WebCore::drawPathShadow):
2368
2369 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2370
2371         -webkit-text-underline-position should not be inherited
2372         https://bugs.webkit.org/show_bug.cgi?id=116363
2373
2374         Reviewed by Dean Jackson.
2375
2376         Specification says text-underline-position should not be inherited.
2377
2378         No new tests, this updates existing tests.
2379
2380         * css/CSSProperty.cpp:
2381         (WebCore::CSSProperty::isInheritedProperty): Make
2382         CSSPropertyWebkitTextUnderlinePosition return false.
2383         * rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
2384         non-inherited.
2385         * rendering/style/StyleRareInheritedData.cpp:
2386         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2387         (WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
2388         * rendering/style/StyleRareInheritedData.h:
2389         (StyleRareInheritedData):
2390         * rendering/style/StyleRareNonInheritedData.cpp:
2391         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2392         (WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
2393         * rendering/style/StyleRareNonInheritedData.h:
2394         (StyleRareNonInheritedData):
2395
2396 2013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2397
2398         Add compile asserts for the size of RootInlineBox and InlineTextbox
2399         https://bugs.webkit.org/show_bug.cgi?id=116337
2400
2401         Reviewed by Darin Adler.
2402
2403         Add compile asserts to ensure RootInlineBox and InlineTextbox stay small.
2404
2405         * rendering/InlineTextBox.cpp:
2406         (SameSizeAsInlineTextBox):
2407         (WebCore):
2408         * rendering/RootInlineBox.cpp:
2409         (SameSizeAsRootInlineBox):
2410         (WebCore):
2411
2412 2013-05-20  Xan Lopez  <xlopez@igalia.com>
2413
2414         [BlackBerry] LocalizedStringsBlackBerry: add dummy text track strings
2415         https://bugs.webkit.org/show_bug.cgi?id=116300
2416
2417         Reviewed by Rob Buis.
2418
2419         These are dummy implementations necessary to make WebKit link.
2420
2421         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2422         (WebCore::weekFormatInLDML):
2423         (WebCore):
2424         (WebCore::textTrackClosedCaptionsText):
2425         (WebCore::textTrackSubtitlesText):
2426         (WebCore::textTrackOffText):
2427         (WebCore::textTrackNoLabelText):
2428
2429 2013-05-19  Darin Adler  <darin@apple.com>
2430
2431         [Mac] Improve string use in PasteboardMac
2432         https://bugs.webkit.org/show_bug.cgi?id=116418
2433
2434         Reviewed by Sam Weinig.
2435
2436         Did a Ben Poulain all over this file.
2437
2438         * platform/mac/PasteboardMac.mm:
2439         (WebCore::Pasteboard::plainText): Add the newline separately to the string builder.
2440         Prepending it to the string first just does more allocations for no good reason.
2441         (WebCore::Pasteboard::documentFragment): Use emptyString() instead of "" and use
2442         ASCIILiteral where appropriate.
2443         (WebCore::cocoaTypeFromHTMLClipboardType): More ASCIILiteral.
2444         (WebCore::Pasteboard::clear): Use early return instead of a nested if here.
2445         Use emptyString() instead of "".
2446         (WebCore::addHTMLClipboardTypesForCocoaType): More ASCIILiteral.
2447
2448 2013-05-19  Anders Carlsson  <andersca@apple.com>
2449
2450         Remove link prerendering code
2451         https://bugs.webkit.org/show_bug.cgi?id=116415
2452
2453         Reviewed by Darin Adler.
2454
2455         * Configurations/FeatureDefines.xcconfig:
2456         * GNUmakefile.list.am:
2457         * Target.pri:
2458         * WebCore.vcproj/WebCore.vcproj:
2459         * WebCore.vcxproj/WebCore.vcxproj:
2460         * WebCore.vcxproj/WebCore.vcxproj.filters:
2461         * WebCore.xcodeproj/project.pbxproj:
2462         * dom/Document.cpp:
2463         (WebCore::Document::Document):
2464         * dom/Document.h:
2465         (WebCore):
2466         (Document):
2467         * dom/EventNames.h:
2468         (WebCore):
2469         * html/HTMLLinkElement.cpp:
2470         * html/HTMLLinkElement.h:
2471         * html/LinkRelAttribute.cpp:
2472         (WebCore::LinkRelAttribute::LinkRelAttribute):
2473         * html/LinkRelAttribute.h:
2474         (LinkRelAttribute):
2475         * loader/LinkLoader.cpp:
2476         (WebCore::LinkLoader::~LinkLoader):
2477         (WebCore::LinkLoader::loadLink):
2478         (WebCore::LinkLoader::released):
2479         * loader/LinkLoader.h:
2480         (WebCore):
2481         (LinkLoader):
2482         * loader/LinkLoaderClient.h:
2483         (LinkLoaderClient):
2484         * loader/Prerenderer.cpp: Removed.
2485         * loader/Prerenderer.h: Removed.
2486         * loader/PrerendererClient.cpp: Removed.
2487         * loader/PrerendererClient.h: Removed.
2488         * platform/PrerenderClient.h: Removed.
2489         * platform/PrerenderHandle.h: Removed.
2490
2491 2013-05-19  Simon Fraser  <simon.fraser@apple.com>
2492
2493         Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
2494         https://bugs.webkit.org/show_bug.cgi?id=116417
2495
2496         Reviewed by Sam Weinig.
2497         
2498         PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
2499         FrameView::setNodeToDraw() has been called and is used to restrict painting to
2500         some part of the subtree, but it could easily be misinterpreted, and confused with
2501         the "rootLayer" used by RenderLayer (which is usually not the layer associated with
2502         the paintingRoot).
2503         
2504         Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
2505         purpose of this variable more obvious.
2506
2507         No behavior change.
2508
2509         * page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
2510         be called setSubtreePaintRoot() or something. Not done in this patch to avoid
2511         risk; this function is exported from WebCore.
2512         * rendering/InlineFlowBox.cpp:
2513         (WebCore::InlineFlowBox::paint):
2514         * rendering/PaintInfo.h:
2515         (WebCore::PaintInfo::PaintInfo):
2516         (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
2517         (WebCore::PaintInfo::shouldPaintWithinRoot):
2518         * rendering/RenderBlock.cpp:
2519         (WebCore::RenderBlock::paintContents):
2520         * rendering/RenderBox.cpp:
2521         (WebCore::RenderBox::paint):
2522         * rendering/RenderLayer.cpp:
2523         (WebCore::RenderLayer::paint):
2524         (WebCore::RenderLayer::paintOverlayScrollbars):
2525         (WebCore::RenderLayer::paintLayerContents):
2526         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2527         (WebCore::RenderLayer::paintBackgroundForFragments):
2528         (WebCore::RenderLayer::paintForegroundForFragments):
2529         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
2530         (WebCore::RenderLayer::paintOutlineForFragments):
2531         (WebCore::RenderLayer::paintMaskForFragments):
2532         * rendering/RenderLayer.h:
2533         (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
2534         * rendering/RenderObject.cpp: Add a comment to recommend changing the name of
2535         paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
2536         risk; this function is exported from WebCore.
2537         * rendering/RenderSnapshottedPlugIn.cpp:
2538         (WebCore::RenderSnapshottedPlugIn::paint):
2539         * rendering/RenderTable.cpp:
2540         (WebCore::RenderTable::paintObject):
2541         * rendering/svg/RenderSVGContainer.cpp:
2542         (WebCore::RenderSVGContainer::paint):
2543
2544 2013-05-19  Darin Adler  <darin@apple.com>
2545
2546         Use Element instead of Node in DragState, also redo DragState struct
2547         https://bugs.webkit.org/show_bug.cgi?id=116411
2548
2549         Reviewed by Sam Weinig.
2550
2551         The drag source is an element, so use RefPtr<Element> instead of RefPtr<Node>.
2552
2553         Also, the entire drag state is about dragging, so no need for the word "drag" in the
2554         name of its members. Also, it's a struct, so the members don't need m_ prefixes.
2555
2556         * page/DragController.cpp: Removed unneeded include of Node.h since it's included by
2557         Element.h, which is also included.
2558         (WebCore::DragController::draggableElement): Renamed from Node to Element and changed
2559         the types and names of arguments accordingly. Also made this function handle a
2560         startElement of 0 so callers don't need to. Also updated for changes to DragState members.
2561         (WebCore::DragController::startDrag): Updated for changes to DragState members.
2562         Since dragSource can only be an element, was able to get rid of isElementNode checks.
2563
2564         * page/DragController.h: Fixed style of forward declarations of structs. Updated for
2565         change of draggableNode to draggableElement. Also removed declarations of nonexistent
2566         selectionDraggingRect and doDrag functions.
2567
2568         * page/DragState.h: Rewrote practically this whole header. Added an include of Element
2569         instead of Node since that's what we use now. Removed includes that are redundant.
2570         There's no problem copying a DragState, so removed WTF_MAKE_NONCOPYABLE. There's no need
2571         to allocate a DragState on the heap, so removed WTF_MAKE_FAST_ALLOCATED. The event dispatch
2572         boolean is never set to a constant, so there's no need for a policy enum; it can just be
2573         a boolean. Removed the "m_" prefixes from the struct members, since this is a struct with
2574         public members and we don't use the prefix in those cases. Removed the word "drag" from the
2575         struct member names since this entire struct is about dragging and has drag in its name.
2576         Left the comments mostly intact, even though I'm not certain of their value.
2577
2578         * page/EventHandler.cpp:
2579         (WebCore::EventHandler::handleMousePressEvent): Updated for changes to DragState.
2580         (WebCore::EventHandler::eventMayStartDrag):
2581         Use innerElement instead of innerNode to call draggableElement instead of draggableNode.
2582         (WebCore::EventHandler::updateDragAndDrop): Updated for changes to DragState.
2583         (WebCore::EventHandler::cancelDragAndDrop): Ditto.
2584         (WebCore::EventHandler::handleWheelEvent): Added FIXME.
2585         (WebCore::EventHandler::dragHysteresisExceeded): Updated for changes to DragState.
2586         (WebCore::EventHandler::freeClipboard): Updated for changes to DragState. Also re-added
2587         code to release the clipboard object, which is needed here to avoid keeping it around in
2588         memory until the next drag.
2589         (WebCore::EventHandler::dragSourceEndedAt): Updated for changes to DragState.
2590         (WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
2591         (WebCore::EventHandler::dispatchDragSrcEvent): Ditto.
2592         (WebCore::EventHandler::handleDrag): Updated for changes to DragState. Use innerElement
2593         instead of innerNode to call draggableElement instead of draggableNode. No longer need to
2594         null check innerElement because draggableElement does that. Removed unneeded else that was
2595         setting m_dragSrc to zero since it's guaranteed to already be zero.
2596
2597 2013-05-19  Anders Carlsson  <andersca@apple.com>
2598
2599         Remove ChromeClient::webView()
2600         https://bugs.webkit.org/show_bug.cgi?id=116054
2601
2602         Reviewed by Darin Adler.
2603
2604         This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
2605         client or not. We already have a (slightly less horrible) way to do that.
2606
2607         * loader/EmptyClients.h:
2608         * page/ChromeClient.h:
2609         (ChromeClient):
2610
2611 2013-05-19  Darin Adler  <darin@apple.com>
2612
2613         Eliminate the Editor::newGeneralClipboard function
2614         https://bugs.webkit.org/show_bug.cgi?id=116410
2615
2616         Reviewed by Andreas Kling.
2617
2618         This is one of the clean-ups made possible by the changes to the DOM clipboard class.
2619         I had been waiting until all the platforms were moved over to it, but it turns out to be
2620         easy to do this now, just with #ifdefs.
2621
2622         * PlatformBlackBerry.cmake: Deleted EditorBlackBerry.cpp.
2623
2624         * editing/Editor.cpp:
2625         (WebCore::Editor::dispatchCPPEvent): Call Clipboard::createForCopyAndPaste directly when
2626         using the new version of the Clipboard class. Also some small style cleanup nearby.
2627
2628         * editing/blackberry/EditorBlackBerry.cpp: Removed. The only function in this file was
2629         newGeneralClipboard.
2630
2631         * editing/mac/EditorMac.mm: Deleted newGeneralClipboard.
2632         * platform/efl/ClipboardEfl.cpp: Ditto.
2633         * platform/gtk/ClipboardGtk.cpp: Ditto.
2634
2635 2013-05-19  Martin Robinson  <mrobinson@igalia.com>
2636
2637         GtkSelectionData length is off by one
2638         https://bugs.webkit.org/show_bug.cgi?id=113962
2639
2640         Reviewed by Anders Carlsson.
2641
2642         No new tests. Since drag data is interpreted as a null-terminated string
2643         this is difficult to test with a C program and we have no infrastructure
2644         built for using GIR tests.
2645
2646         * platform/gtk/PasteboardHelper.cpp:
2647         (WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
2648         character in the paste data length, just include the string. This matches the behavior
2649         of Firefox.
2650
2651 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
2652
2653         Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
2654         https://bugs.webkit.org/show_bug.cgi?id=116406
2655
2656         Reviewed by Andreas Kling.
2657         
2658         RenderLayer::paintLayerContents() was getting polluted with code related to filters,
2659         clipping and font subpixel quantization, and hard to follow.
2660         
2661         Move three hunks of code into new functions:
2662         setupFontSubpixelQuantization() now contains the code related to whether we disable
2663         font subpixel quantization on the context.
2664         setupClipPath() now contains code related to clipping to shapes and references.
2665         setupFilters() and applyFilters() contain code related to CSS filters.
2666         
2667         As part of this, the interaction with FilterEffectRendererHelper was simplified.
2668         It was convenient for setupFilters() to return a FilterEffectRendererHelper object
2669         if successful, so we use an OwnPtr<FilterEffectRendererHelper> now. In addition,
2670         the GraphicsContext swapping was moved from FilterEffectRendererHelper code into RenderLayer
2671         to make it easier to follow. FilterEffectRendererHelper no longer holds on to
2672         the old GraphicsContext.
2673
2674         No behavior change.
2675
2676         * rendering/FilterEffectRenderer.cpp:
2677         (WebCore::FilterEffectRendererHelper::filterContext):
2678         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
2679         (WebCore::FilterEffectRendererHelper::applyFilterEffect):
2680         * rendering/FilterEffectRenderer.h:
2681         (WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper):
2682         (WebCore::FilterEffectRendererHelper::hasStartedFilterEffect):
2683         (FilterEffectRendererHelper):
2684         * rendering/RenderLayer.cpp:
2685         (WebCore::RenderLayer::setupFontSubpixelQuantization):
2686         (WebCore::RenderLayer::setupClipPath):
2687         (WebCore::RenderLayer::setupFilters):
2688         (WebCore::RenderLayer::applyFilters):
2689         (WebCore::RenderLayer::paintLayerContents):
2690         * rendering/RenderLayer.h:
2691
2692 2013-05-18  Simon Fraser  <simon.fraser@apple.com>
2693
2694         Refactor RenderStyle::diff()
2695         https://bugs.webkit.org/show_bug.cgi?id=116397
2696
2697         Reviewed by Andreas Kling.
2698         
2699         RenderStyle::diff() was prone to being changed incorrectly, since there was
2700         a poorly documented ordering requirement: style changes that cause layout
2701         have to be detected before those that cause only repainting.
2702         
2703         In addition, the existing code made it impossible to separately ask whether
2704         a given style change requires a repaint, if we've already detected that it
2705         requires a positioned-movement-only layout.
2706         
2707         Fix by factoring the code into member functions that check for each type
2708         of style change.
2709         
2710         No behavior change.
2711
2712         * rendering/style/RenderStyle.cpp:
2713         (WebCore::positionChangeIsMovementOnly):
2714         (WebCore::RenderStyle::changeRequiresLayout):
2715         (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
2716         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2717         (WebCore::RenderStyle::changeRequiresRepaint):
2718         (WebCore::RenderStyle::changeRequiresRepaintIfText):
2719         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
2720         (WebCore::RenderStyle::diff):
2721         * rendering/style/RenderStyle.h:
2722
2723 2013-05-18  Anders Carlsson  <andersca@apple.com>
2724
2725         Simplify the StorageArea setter functions
2726         https://bugs.webkit.org/show_bug.cgi?id=116402
2727
2728         Reviewed by Sam Weinig.
2729
2730         Move more security checking code to Storage so more code can be shared between WebKit1 and WebKit2.
2731
2732         * inspector/InspectorDOMStorageAgent.cpp:
2733         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2734         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2735         * storage/Storage.cpp:
2736         (WebCore::Storage::setItem):
2737         (WebCore::Storage::removeItem):
2738         (WebCore::Storage::clear):
2739         * storage/StorageArea.h:
2740         (StorageArea):
2741         * storage/StorageAreaImpl.cpp:
2742         (WebCore::StorageAreaImpl::setItem):
2743         (WebCore::StorageAreaImpl::removeItem):
2744         (WebCore::StorageAreaImpl::clear):
2745         * storage/StorageAreaImpl.h:
2746         (StorageAreaImpl):
2747
2748 2013-05-18  Anders Carlsson  <andersca@apple.com>
2749
2750         Simplify StorageArea getter functions
2751         https://bugs.webkit.org/show_bug.cgi?id=116399
2752
2753         Reviewed by Sam Weinig.
2754
2755         Move the security and private browsing checks from StorageArea to Storage so we can share
2756         more code between WebKit1 and WebKit2.
2757
2758         * inspector/InspectorDOMStorageAgent.cpp:
2759         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2760         Update to new StorageArea interface. The security checks are unnecessary here anyway because
2761         InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
2762         by the frame's security origin.
2763         
2764         * storage/Storage.cpp:
2765         (WebCore::Storage::key):
2766         (WebCore::Storage::getItem):
2767         (WebCore::Storage::contains):
2768         * storage/StorageArea.h:
2769         (StorageArea):
2770         * storage/StorageAreaImpl.cpp:
2771         (WebCore::StorageAreaImpl::key):
2772         (WebCore::StorageAreaImpl::item):
2773         (WebCore::StorageAreaImpl::contains):
2774         * storage/StorageAreaImpl.h:
2775         (StorageAreaImpl):
2776
2777 2013-05-17  Simon Fraser  <simon.fraser@apple.com>
2778
2779         Garbage on page background while http://canberraballoons.com.au is loading
2780         https://bugs.webkit.org/show_bug.cgi?id=116384
2781         <rdar://problem/13930328>
2782
2783         Reviewed by Dan Bernstein.
2784
2785         This page loads a large JPEG image as the body background.
2786         ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
2787         are opaque, but this isn't true if the frame is only partially loaded.
2788         However, this would cause FillLayer::hasOpaqueImage() to report that the
2789         background image is opaque, so we'd skip painting the background color.
2790         Unpainted content in an opaque layer results in garbage.
2791         
2792         Fix by having ImageSource::frameHasAlphaAtIndex() always return true
2793         for frames that are not complete. When the image load completes, we
2794         recompute metadata and correctly determine that the frame is opaque.
2795
2796         * platform/graphics/cg/ImageSourceCG.cpp:
2797         (WebCore::ImageSource::frameHasAlphaAtIndex):
2798
2799 2013-05-18  Timothy Hatcher  <timothy@apple.com>
2800
2801         Simplify EventLoop::cycle() on Mac.
2802
2803         https://webkit.org/b/116392
2804
2805         Reviewed by Anders Carlsson.
2806
2807         * platform/mac/EventLoopMac.mm:
2808         (WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
2809
2810 2013-05-18  Andreas Kling  <akling@apple.com>
2811
2812         Use CSSParserSelector::appendTagHistory() from CSS grammar.
2813         <http://webkit.org/b/116382>
2814
2815         Reviewed by Antti Koivisto.
2816
2817         CSSParserSelector already knows how to append another component to itself,
2818         no need to duplicate that logic in the grammar.
2819
2820         * css/CSSGrammar.y.in:
2821
2822 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
2823
2824         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
2825         https://bugs.webkit.org/show_bug.cgi?id=114554
2826
2827         Reviewed by Gyuyoung Kim.
2828
2829         Using variables as target names is very uncommon in CMake.
2830         The usual way to specify the name of the resulting binary
2831         is to set the OUTPUT_NAME target property.
2832
2833         * CMakeLists.txt:
2834
2835 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2836
2837         [GTK] Move GTK port off legacy clipboard
2838         https://bugs.webkit.org/show_bug.cgi?id=116221
2839
2840         Reviewed by Martin Robinson.
2841
2842         Merge clipboard methods into PasteboardGtk that now wraps a
2843         DataObjectGtk.
2844
2845         * GNUmakefile.list.am: Remove ClipboardGtk.h.
2846         * dom/Clipboard.h: Remove GTK from the list of ports using legacy
2847         clipboard.
2848         * page/gtk/EventHandlerGtk.cpp:
2849         (WebCore::EventHandler::createDraggingClipboard): Use
2850         Clipboard::createForDragAndDrop().
2851         * platform/Pasteboard.h:
2852         (Pasteboard):
2853         * platform/gtk/ClipboardGtk.cpp:
2854         (WebCore::Editor::newGeneralClipboard): Use
2855         Clipboard::createForCopyAndPaste().
2856         (WebCore::Clipboard::createDragImage):
2857         (WebCore::Clipboard::declareAndWriteDragImage):
2858         * platform/gtk/ClipboardGtk.h: Removed.
2859         * platform/gtk/DragDataGtk.cpp:
2860         * platform/gtk/PasteboardGtk.cpp:
2861         (WebCore::Pasteboard::create): Create a new Pasteboard for a given
2862         GtkClipboard or DataObjectGtk.
2863         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
2864         for the GDK_SELECTION_CLIPBOARD clipboard.
2865         (WebCore::Pasteboard::createPrivate): Create a Pasteboard without
2866         a GtkClipboard associated.
2867         (WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
2868         for drag and drop operations.
2869         (WebCore::selectionClipboard): Return a static Pasteboard for the
2870         GDK_SELECTION_CLIPBOARD clipboard.
2871         (WebCore::primaryClipboard): Return a static Pasteboard for the
2872         GDK_SELECTION_PRIMARY clipboard.
2873         (WebCore::Pasteboard::generalPasteboard): Return
2874         selectionClipboard() or primaryClipboard() depending on whether
2875         primary selection clipboard is the active one or not.
2876         (WebCore::Pasteboard::Pasteboard):
2877         (WebCore::Pasteboard::~Pasteboard):
2878         (WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
2879         (WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
2880         ClipboardGtk.cpp.
2881         (WebCore::Pasteboard::writeString): Adapted to upate the wrapped
2882         DataObjectGtk and the GtkClipboard if needed.
2883         (WebCore::Pasteboard::writeSelection): Ditto.
2884         (WebCore::Pasteboard::writePlainText): Ditto.
2885         (WebCore::Pasteboard::writeURL): Ditto.
2886         (WebCore::Pasteboard::writeImage): Ditto.
2887         (WebCore::Pasteboard::writePasteboard): Copy the wrapped
2888         DataObjectGtk from the DataObjectGtk of the given Pasteboard and
2889         upsate the GtkClipboard if needed.
2890         (WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
2891         (WebCore::Pasteboard::canSmartReplace): Check if current
2892         GtkClipboard supports smart replace.
2893         (WebCore::Pasteboard::setDragImage):
2894         (WebCore::Pasteboard::documentFragment): Adapted to use the
2895         wrapped DataObjectGtk reading from the current GtkClipboard if
2896         present.
2897         (WebCore::Pasteboard::plainText): Ditto.
2898         (WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
2899         (WebCore::Pasteboard::types): Ditto.
2900         (WebCore::Pasteboard::readString): Ditto.
2901         (WebCore::Pasteboard::readFilenames): Ditto.
2902
2903 2013-05-18  Alberto Garcia  <agarcia@igalia.com>
2904
2905         [GTK] Parallel build fails if gtk-doc is enabled
2906         https://bugs.webkit.org/show_bug.cgi?id=116227
2907
2908         Reviewed by Martin Robinson.
2909
2910         * GNUmakefile.am:
2911         Don't overwrite noinst_DATA, modify its existing value instead.
2912
2913 2013-05-17  Michelangelo De Simone  <michelangelo@webkit.org>
2914
2915         CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
2916         https://bugs.webkit.org/show_bug.cgi?id=116370
2917
2918         CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
2919
2920         Reviewed by Alexandru Chiculita.
2921
2922         No new test possible, the feature is not implemented nor exposed.
2923
2924         * css/CSSParser.cpp:
2925         (WebCore::CSSParser::parseValue):
2926
2927 2013-05-17  Timothy Hatcher  <timothy@apple.com>
2928
2929         Force the script debug server to continue when disabling the debugger.
2930
2931         There might be some cases where the debugger will stay in the nested run loop
2932         which cause weird issues.
2933
2934         Speculative fix for: https://webkit.org/b/111438
2935
2936         Reviewed by Joseph Pecoraro.
2937
2938         * inspector/InspectorDebuggerAgent.cpp:
2939         (WebCore::InspectorDebuggerAgent::disable):
2940
2941 2013-05-16  Darin Adler  <darin@apple.com>
2942
2943         [BlackBerry] Get BlackBerry port off legacy clipboard
2944         https://bugs.webkit.org/show_bug.cgi?id=116287
2945
2946         Reviewed by Rob Buis.
2947
2948         * PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
2949
2950         * dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
2951         use the legacy clipboard.
2952
2953         * editing/blackberry/EditorBlackBerry.cpp:
2954         (WebCore::Editor::newGeneralClipboard): Changed to just create a copy
2955         and paste clipboard.
2956
2957         * page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
2958         function that wasn't doing any good.
2959
2960         * platform/blackberry/ClipboardBlackBerry.cpp: Removed.
2961         * platform/blackberry/ClipboardBlackBerry.h: Removed.
2962
2963         * platform/blackberry/PasteboardBlackBerry.cpp:
2964         (WebCore::Pasteboard::createForCopyAndPaste): Added.
2965         (WebCore::Pasteboard::createPrivate): Added.
2966         (WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
2967         (WebCore::Pasteboard::clear): Ditto.
2968         (WebCore::Pasteboard::readString): Ditto.
2969         (WebCore::Pasteboard::writeString): Ditto.
2970         (WebCore::Pasteboard::types): Ditto.
2971         (WebCore::Pasteboard::readFilenames): Ditto.
2972
2973 2013-05-17  Andreas Kling  <akling@apple.com>
2974
2975         Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
2976         <http://webkit.org/b/116344>
2977
2978         Reviewed by Darin Adler.
2979
2980         Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
2981
2982         * rendering/style/RenderStyle.cpp:
2983         (WebCore::RenderStyle::diff):
2984         * rendering/style/StyleBackgroundData.cpp:
2985         (WebCore::StyleBackgroundData::isEquivalentForPainting):
2986         * rendering/style/StyleBackgroundData.h:
2987         (StyleBackgroundData):
2988
2989 2013-05-17  Andreas Kling  <akling@apple.com>
2990
2991         Plug leak in CSSSelectorList::deleteSelectors().
2992         <http://webkit.org/b/116371>
2993         <rdar://problem/13930698>
2994
2995         Reviewed by Ryosuke Niwa.
2996
2997         Don't forget to destroy the very last selector in the list.
2998
2999         * css/CSSSelectorList.cpp:
3000         (WebCore::CSSSelectorList::deleteSelectors):
3001
3002 2013-05-17  Anders Carlsson  <andersca@apple.com>
3003
3004         Share code between WebKit1 and WebKit2 StorageArea subclasses
3005         https://bugs.webkit.org/show_bug.cgi?id=116367
3006
3007         Reviewed by Andreas Kling.
3008
3009         * inspector/InspectorDOMStorageAgent.cpp:
3010         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
3011         Remove ec parameter.
3012
3013         * inspector/InspectorDOMStorageAgent.h:
3014         Add forward declaration.
3015
3016         * page/DOMWindow.cpp:
3017         (WebCore::DOMWindow::sessionStorage):
3018         (WebCore::DOMWindow::localStorage):
3019         Storage::StorageArea returns a reference now.
3020
3021         * storage/Storage.cpp:
3022         (WebCore::Storage::length):
3023         Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
3024         Then call down to the (now simplified) StorageArea::length().
3025
3026         (WebCore::Storage::isDisabledByPrivateBrowsing):
3027         New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
3028         to make it easier to follow.
3029
3030         * storage/Storage.h:
3031         (WebCore::Storage::area):
3032         Return a reference.
3033
3034         * storage/StorageAreaImpl.cpp:
3035         (WebCore::StorageAreaImpl::storageType):
3036         Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
3037
3038         (WebCore::StorageAreaImpl::length):
3039         Remove unneeded code.
3040
3041 2013-05-17  Commit Queue  <commit-queue@webkit.org>
3042
3043         Unreviewed, rolling out r150294.
3044         http://trac.webkit.org/changeset/150294
3045         https://bugs.webkit.org/show_bug.cgi?id=116369
3046
3047         Caused 31 tests to fail (Requested by rniwa on #webkit).
3048
3049         * WebCore.exp.in:
3050         * rendering/InlineFlowBox.h:
3051         * rendering/InlineTextBox.h:
3052         (InlineTextBox):
3053         * rendering/RenderApplet.h:
3054         * rendering/RenderBR.h:
3055         * rendering/RenderBlock.h:
3056         (RenderBlock):
3057         (WebCore::RenderBlock::virtualContinuation):
3058         * rendering/RenderBox.h:
3059         (WebCore::RenderBox::borderBoundingBox):
3060         (RenderBox):
3061         (WebCore::RenderBox::marginLogicalLeft):
3062         (WebCore::RenderBox::marginLogicalRight):
3063         * rendering/RenderBoxModelObject.h:
3064         (WebCore::RenderBoxModelObject::isBoxModelObject):
3065         * rendering/RenderButton.h:
3066         * rendering/RenderCombineText.h:
3067         * rendering/RenderCounter.h:
3068         * rendering/RenderDeprecatedFlexibleBox.h:
3069         * rendering/RenderDetailsMarker.h:
3070         * rendering/RenderEmbeddedObject.h:
3071         (RenderEmbeddedObject):
3072         (WebCore::RenderEmbeddedObject::isEmbeddedObject):
3073         (WebCore::RenderEmbeddedObject::virtualChildren):
3074         * rendering/RenderFieldset.h:
3075         * rendering/RenderFileUploadControl.h:
3076         * rendering/RenderFlexibleBox.h:
3077         * rendering/RenderFlowThread.h:
3078         * rendering/RenderFrame.h:
3079         * rendering/RenderFrameSet.h:
3080         * rendering/RenderFullScreen.cpp:
3081         * rendering/RenderFullScreen.h:
3082         * rendering/RenderGrid.h:
3083         * rendering/RenderHTMLCanvas.h:
3084         * rendering/RenderIFrame.h:
3085         * rendering/RenderImage.h:
3086         (RenderImage):
3087         (WebCore::RenderImage::isRenderImage):
3088         * rendering/RenderInline.h:
3089         (RenderInline):
3090         (WebCore::RenderInline::virtualContinuation):
3091         (WebCore::RenderInline::virtualChildren):
3092         (WebCore::RenderInline::isRenderInline):
3093         (WebCore::RenderInline::layout):
3094         (WebCore::RenderInline::requiresLayer):
3095         (WebCore::RenderInline::offsetWidth):
3096         (WebCore::RenderInline::offsetHeight):
3097         (WebCore::RenderInline::borderBoundingBox):
3098         (WebCore::RenderInline::dirtyLinesFromChangedChild):
3099         * rendering/RenderLayerModelObject.h:
3100         * rendering/RenderListBox.h:
3101         * rendering/RenderListItem.h:
3102         * rendering/RenderListMarker.h:
3103         * rendering/RenderMedia.h:
3104         (WebCore::RenderMedia::virtualChildren):
3105         (WebCore::RenderMedia::canHaveChildren):
3106         (WebCore::RenderMedia::isMedia):
3107         (WebCore::RenderMedia::isImage):
3108         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
3109         * rendering/RenderMediaControlElements.h:
3110         * rendering/RenderMenuList.h:
3111         * rendering/RenderMeter.h:
3112         * rendering/RenderMultiColumnBlock.h:
3113         * rendering/RenderMultiColumnFlowThread.h:
3114         * rendering/RenderMultiColumnSet.h:
3115         * rendering/RenderNamedFlowThread.h:
3116         * rendering/RenderPart.h:
3117         (RenderPart):
3118         (WebCore::RenderPart::isRenderPart):
3119         (WebCore::RenderPart::renderName):
3120         * rendering/RenderProgress.h:
3121         * rendering/RenderRegion.h:
3122         (WebCore::RenderRegion::isRenderRegion):
3123         * rendering/RenderRegionSet.h:
3124         * rendering/RenderReplaced.h:
3125         (RenderReplaced):
3126         (WebCore::RenderReplaced::renderName):
3127         * rendering/RenderReplica.h:
3128         * rendering/RenderRuby.h:
3129         * rendering/RenderRubyBase.h:
3130         * rendering/RenderRubyRun.h:
3131         * rendering/RenderRubyText.h:
3132         * rendering/RenderScrollbarPart.h:
3133         * rendering/RenderSearchField.h:
3134         * rendering/RenderSlider.h:
3135         * rendering/RenderSnapshottedPlugIn.h:
3136         (RenderSnapshottedPlugIn):
3137         * rendering/RenderTable.h:
3138         (RenderTable):
3139         (WebCore::RenderTable::renderName):
3140         (WebCore::RenderTable::isTable):
3141         (WebCore::RenderTable::avoidsFloats):
3142         * rendering/RenderTableCaption.h:
3143         * rendering/RenderTableCell.h:
3144         * rendering/RenderTableCol.h:
3145         * rendering/RenderTableRow.h:
3146         * rendering/RenderTableSection.h:
3147         * rendering/RenderText.h:
3148         (RenderText):
3149         (WebCore::RenderText::marginLeft):
3150         (WebCore::RenderText::marginRight):
3151         (WebCore::RenderText::styleWillChange):
3152         (WebCore::RenderText::length):
3153         (WebCore::RenderText::paint):
3154         (WebCore::RenderText::layout):
3155         * rendering/RenderTextControl.h:
3156         (RenderTextControl):
3157         (WebCore::RenderTextControl::renderName):
3158         (WebCore::RenderTextControl::isTextControl):
3159         (WebCore::RenderTextControl::avoidsFloats):
3160         * rendering/RenderTextControlMultiLine.h:
3161         * rendering/RenderTextControlSingleLine.h:
3162         (RenderTextControlSingleLine):
3163         (WebCore::RenderTextControlSingleLine::isTextField):
3164         * rendering/RenderTextFragment.h:
3165         * rendering/RenderTextTrackCue.h:
3166         * rendering/RenderVideo.h:
3167         * rendering/RenderView.h:
3168         * rendering/RenderWidget.h:
3169         (RenderWidget):
3170         (WebCore::RenderWidget::isWidget):
3171         * rendering/RenderWordBreak.h:
3172         * rendering/RootInlineBox.h:
3173         (RootInlineBox):
3174         * rendering/mathml/RenderMathMLBlock.h:
3175         * rendering/svg/RenderSVGBlock.h:
3176         (RenderSVGBlock):
3177         * rendering/svg/RenderSVGContainer.h:
3178         (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
3179         (WebCore::RenderSVGContainer::virtualChildren):
3180         (WebCore::RenderSVGContainer::isSVGContainer):
3181         (WebCore::RenderSVGContainer::renderName):
3182         (RenderSVGContainer):
3183         (WebCore::RenderSVGContainer::objectBoundingBox):
3184         (WebCore::RenderSVGContainer::strokeBoundingBox):
3185         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
3186         * rendering/svg/RenderSVGEllipse.h:
3187         * rendering/svg/RenderSVGForeignObject.h:
3188         * rendering/svg/RenderSVGGradientStop.h:
3189         * rendering/svg/RenderSVGHiddenContainer.h:
3190         (WebCore::RenderSVGHiddenContainer::renderName):
3191         (RenderSVGHiddenContainer):
3192         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
3193         * rendering/svg/RenderSVGImage.h:
3194         * rendering/svg/RenderSVGInline.h:
3195         (WebCore::RenderSVGInline::renderName):
3196         (WebCore::RenderSVGInline::requiresLayer):
3197         (WebCore::RenderSVGInline::isSVGInline):
3198         (RenderSVGInline):
3199         * rendering/svg/RenderSVGInlineText.h:
3200         * rendering/svg/RenderSVGModelObject.h:
3201         (WebCore::RenderSVGModelObject::requiresLayer):
3202         (RenderSVGModelObject):
3203         * rendering/svg/RenderSVGPath.h:
3204         * rendering/svg/RenderSVGRect.h:
3205         * rendering/svg/RenderSVGResourceClipper.h:
3206         * rendering/svg/RenderSVGResourceContainer.h:
3207         (RenderSVGResourceContainer):
3208         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
3209         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
3210         * rendering/svg/RenderSVGResourceFilter.h:
3211         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
3212         * rendering/svg/RenderSVGResourceGradient.h:
3213         (RenderSVGResourceGradient):
3214         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
3215         * rendering/svg/RenderSVGResourceLinearGradient.h:
3216         * rendering/svg/RenderSVGResourceMarker.h:
3217         * rendering/svg/RenderSVGResourceMasker.h:
3218         * rendering/svg/RenderSVGResourcePattern.h:
3219         * rendering/svg/RenderSVGResourceRadialGradient.h:
3220         * rendering/svg/RenderSVGRoot.h:
3221         * rendering/svg/RenderSVGShape.h:
3222         (WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
3223         (WebCore::RenderSVGShape::setNeedsTransformUpdate):
3224         (WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
3225         (WebCore::RenderSVGShape::localToParentTransform):
3226         (WebCore::RenderSVGShape::localTransform):
3227         (WebCore::RenderSVGShape::isSVGShape):
3228         (RenderSVGShape):
3229         (WebCore::RenderSVGShape::objectBoundingBox):
3230         (WebCore::RenderSVGShape::strokeBoundingBox):
3231         * rendering/svg/RenderSVGTSpan.h:
3232         * rendering/svg/RenderSVGText.h:
3233         * rendering/svg/RenderSVGTextPath.h:
3234         * rendering/svg/RenderSVGTransformableContainer.h:
3235         * rendering/svg/RenderSVGViewportContainer.h:
3236
3237 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3238
3239         Get rid of Custom code for Audio global constructor
3240         https://bugs.webkit.org/show_bug.cgi?id=116343
3241
3242         Reviewed by Geoffrey Garen.
3243
3244         Remove custom code for Audio global constructor. It is no longer needed
3245         now that the the bindings generator no longer require custom code for
3246         named constructors and now that [EnabledAtRuntime] extended attribute is
3247         supported for global constructors.
3248
3249         HTMLAudioElement global constructors are now automatically generated.
3250
3251         No new tests, no behavior change for layout tests.
3252
3253         * bindings/js/JSDOMWindowCustom.cpp:
3254         * html/HTMLAudioElement.idl:
3255         * page/DOMWindow.idl:
3256
3257 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3258
3259         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
3260         https://bugs.webkit.org/show_bug.cgi?id=116359
3261
3262         Reviewed by Anders Carlsson.
3263
3264         This feature was already RuntimeEnabled. Call through layers to get the answer from
3265         a platform strategy.
3266
3267         * workers/DefaultSharedWorkerRepository.cpp:
3268         (WebCore::DefaultSharedWorkerRepository::isAvailable):
3269         * workers/DefaultSharedWorkerRepository.h:
3270         * workers/SharedWorkerRepository.cpp:
3271         (WebCore::SharedWorkerRepository::isAvailable):
3272         * workers/SharedWorkerStrategy.h:
3273         (WebCore::SharedWorkerStrategy::isAvailable):
3274
3275 2013-05-17  Anders Carlsson  <andersca@apple.com>
3276
3277         Move Storage member functions out of line
3278         https://bugs.webkit.org/show_bug.cgi?id=116364
3279
3280         Reviewed by Andreas Kling.
3281
3282         This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
3283         Also remove unnecessary null checks and make m_storageArea const.
3284
3285         * storage/Storage.cpp:
3286         (WebCore::Storage::length):
3287         (WebCore::Storage::key):
3288         (WebCore::Storage::getItem):
3289         (WebCore::Storage::setItem):
3290         (WebCore::Storage::removeItem):
3291         (WebCore::Storage::clear):
3292         (WebCore::Storage::contains):
3293         * storage/Storage.h:
3294         (WebCore::Storage::area):
3295
3296 2013-05-17  Beth Dakin  <bdakin@apple.com>
3297
3298         Headers and footers will sometimes disappear and re-appear during page loads
3299         https://bugs.webkit.org/show_bug.cgi?id=116336
3300         -and corresponding-
3301         <rdar://problem/13886753>
3302
3303         Reviewed by Simon Fraser.
3304
3305         This patch changes the WebCore-level API that WebKit uses to create a banner. 
3306         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
3307         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
3308         layer has been created, it will call back into WK2 via ChromeClient. This will 
3309         allow WebCore to re-create the header/footer layers as needed whenever the 
3310         FrameView/RenderLayerCompositor have been destroyed and recreated.
3311
3312         Remove references to old FrameView functions. Add references to new Page 
3313         functions.
3314         * WebCore.exp.in:
3315
3316         New ChromeClient functions will pass the new layers up to WK2.
3317         * page/ChromeClient.h:
3318         (WebCore::ChromeClient::didAddHeaderLayer):
3319         (WebCore::ChromeClient::didAddFooterLayer):
3320         (ChromeClient):
3321
3322         Remove setWantsLayerForHeader/Footer.
3323         * page/FrameView.cpp:
3324         * page/FrameView.h:
3325         (FrameView):
3326
3327         Page now caches the header and footer height. When the FrameView/RLC have been 
3328         destroyed, and the cached layer/height information on those classes has been lost, 
3329         this data on Page will persist so that we can build the layers back up.
3330         * page/Page.cpp:
3331         (WebCore::Page::Page):
3332         (WebCore::Page::addHeaderWithHeight):
3333         (WebCore::Page::addFooterWithHeight):
3334         * page/Page.h:
3335         (WebCore::Page::headerHeight):
3336         (WebCore::Page::footerHeight):
3337
3338         As soon as the root gets a backing, recreate the header and footer layers if 
3339         needed.
3340         * rendering/RenderLayerCompositor.cpp:
3341         (WebCore::RenderLayerCompositor::updateBacking):
3342
3343         Call into ChromeClient.
3344         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3345         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3346
3347 2013-05-18  Claudio Saavedra  <csaavedra@igalia.com>
3348
3349         [CSS] Minor cleanups in CSS variables handling
3350         https://bugs.webkit.org/show_bug.cgi?id=116318
3351
3352         Reviewed by Ryosuke Niwa.
3353
3354         No new tests, only a cleanup.
3355
3356         * css/CSSParser.cpp:
3357         (WebCore::CSSParserString::substring): Optimize.
3358         (WebCore::CSSParser::createPrimitiveVariableNameValue):
3359         Remove intermediate variable.
3360
3361 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3362
3363         [Mac] Add DOMWindowConstructors.idl to Xcode project file
3364         https://bugs.webkit.org/show_bug.cgi?id=116351
3365
3366         Reviewed by Anders Carlsson.
3367
3368         * WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
3369         in searches.
3370
3371 2013-05-17  Ryosuke Niwa  <rniwa@webkit.org>
3372
3373         Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
3374
3375         * dom/Element.h:
3376         (Element):
3377
3378 2013-05-17  Anders Carlsson  <andersca@apple.com>
3379
3380         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
3381         https://bugs.webkit.org/show_bug.cgi?id=116346
3382         <rdar://problem/13852829>
3383
3384         Reviewed by Andreas Kling.
3385
3386         Export the UTF8Encoding symbol.
3387
3388         * WebCore.exp.in:
3389
3390 2013-05-17  Andreas Kling  <akling@apple.com>
3391
3392         Apply FINAL to the RenderObject hierarchy.
3393         <http://webkit.org/b/115977>
3394
3395         Mostly from Blink r148795 by <cevans@chromium.org>
3396         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
3397
3398         Re-landing without devirtualization tweaks.
3399
3400         * rendering/: Beat things with the FINAL stick.
3401         * WebCore.exp.in: Export a now-needed symbol.
3402
3403 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3404
3405         Build fix.
3406
3407         * loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
3408         Frame:editor() now returns a reference.
3409
3410 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3411
3412         Get rid of [ConstructorParameters] extended attributes
3413         https://bugs.webkit.org/show_bug.cgi?id=116308
3414
3415         Reviewed by Kentaro Hara.
3416
3417         Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
3418         [CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
3419         arguments and the constructor object's "length" property is now automatically
3420         computed for custom constructors as well.
3421
3422         This is less error-prone as the value is not hardcoded, more consistent with
3423         [Constructor] extended attribute and gives more information about the custom constructor
3424         in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
3425         nice.
3426
3427         No new tests, already covered by fast/js/constructor-length.html.
3428
3429         * Modules/mediastream/MediaStream.idl:
3430         * Modules/webaudio/AudioContext.idl:
3431         * Modules/websockets/WebSocket.idl:
3432         * bindings/scripts/CodeGeneratorJS.pm:
3433         (GenerateConstructorHelperMethods):
3434         * bindings/scripts/IDLAttributes.txt:
3435         * bindings/scripts/IDLParser.pm:
3436         (applyTypedefs):
3437         (parseAttributeRest):
3438         (copyExtendedAttributes):
3439         (parseExtendedAttributeRest):
3440         (applyExtendedAttributeList):
3441         * bindings/scripts/test/JS/JSFloat64Array.cpp:
3442         (WebCore::JSFloat64ArrayConstructor::finishCreation):
3443         * bindings/scripts/test/TestTypedArray.idl:
3444         * dom/MutationObserver.idl:
3445         * fileapi/Blob.idl:
3446         * html/DOMFormData.idl:
3447         * html/canvas/ArrayBuffer.idl:
3448         * html/canvas/DataView.idl:
3449         * page/WebKitPoint.idl:
3450         * workers/SharedWorker.idl:
3451         * workers/Worker.idl:
3452
3453 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3454
3455         Text input is largely broken when there are subframes loading
3456         http://bugs.webkit.org/show_bug.cgi?id=59121
3457         <rdar://problem/9320468>
3458
3459         Reviewed by Darin Adler.
3460
3461         This addresses text input being abandoned when another frame in a page is navigated.
3462
3463         There are still many opportunities for improvement:
3464         - Track other cases where WebCore interferes may want to cancel input without
3465         direct user action (e.g. deleting the whole editable element on a timer).
3466         - Fix how dictionary panel and autocorrection are dismissed (they still have the
3467         same issue, and get dismissed with any frame navigation).
3468
3469         Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
3470
3471         * loader/FrameLoader.h:
3472         * loader/FrameLoader.cpp:
3473         (WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
3474         do not keep an inline session in a frame that's no longer active, as WebKit2 no
3475         longer takes care of this case (and more of the logic should be in WebCore anyway).
3476         (WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
3477         before transitioning to committed state starts. We may want to move more code here
3478         eventually, e.g. from Frame::setView.
3479
3480 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3481
3482         Get rid of [CustomGetter] for global named constructors
3483         https://bugs.webkit.org/show_bug.cgi?id=116116
3484
3485         Reviewed by Geoffrey Garen.
3486
3487         Improve the JSC bindings generator so that global named constructors no longer
3488         require a [CustomGetter] IDL extended attribute. As a consequence, attributes
3489         on the global window object can now be automatically generated for interfaces
3490         that have a [NamedConstructor], namely HTMLOptionElement.
3491
3492         The HTMLAudioElement global constructors are still manually defined because it
3493         requires custom code at the moment to check if the media player is available.
3494
3495         No new tests, no behavior change.
3496
3497         * bindings/js/JSDOMWindowCustom.cpp:
3498         * bindings/scripts/CodeGeneratorJS.pm:
3499         * bindings/scripts/preprocess-idls.pl:
3500         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3501         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3502         * html/HTMLOptionElement.idl:
3503         * page/DOMWindow.idl:
3504
3505 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
3506
3507         Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
3508         https://bugs.webkit.org/show_bug.cgi?id=116292
3509
3510         Add a newline after the expression so a single line comment doesn't
3511         erroneously comment out the closing brace of the with block.
3512
3513         Reviewed by Timothy Hatcher.
3514
3515         Test: inspector/console/console-eval-comment.html
3516
3517         * inspector/InjectedScriptSource.js:
3518
3519 2013-05-17  David Hyatt  <hyatt@apple.com>
3520
3521         fast/flexbox/auto-height-with-flex.html failing only on release builds.
3522         https://bugs.webkit.org/show_bug.cgi?id=116240
3523
3524         Reviewed by Darin Adler.
3525
3526         Fix the mainAxisContentExtent method so no overflow occurs, since it
3527         doesn't work right on release builds.
3528
3529         * rendering/RenderFlexibleBox.cpp:
3530         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
3531
3532 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3533
3534         Add [EnabledAtRuntime] extended attribute support for global constructors
3535         https://bugs.webkit.org/show_bug.cgi?id=116147
3536
3537         Reviewed by Geoffrey Garen.
3538
3539         Add [EnabledAtRuntime] extended attribute support for global constructors.
3540         This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
3541         WebSocket IDL interfaces so that their global constructors on the global
3542         Window object can now be automatically generated.
3543
3544         The behavior on JavaScript side is unchanged. We simply leverage
3545         RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
3546         attribute to generate the code for global constructors getters instead
3547         of using custom code.
3548
3549         No new tests, no behavior change for layout tests.
3550
3551         * GNUmakefile.list.am:
3552         * Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
3553         * Modules/websockets/WebSocket.idl:
3554         * Target.pri:
3555         * UseJSC.cmake:
3556         * WebCore.vcproj/WebCore.vcproj:
3557         * WebCore.vcxproj/WebCore.vcxproj:
3558         * WebCore.vcxproj/WebCore.vcxproj.filters:
3559         * WebCore.xcodeproj/project.pbxproj:
3560         * bindings/js/JSBindingsAllInOne.cpp:
3561         * bindings/js/JSDOMWindowCustom.cpp:
3562         (WebCore):
3563         * bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
3564         * bindings/scripts/CodeGeneratorJS.pm:
3565         (ToMethodName):
3566         (GetRuntimeEnableFunctionName):
3567         (GenerateImplementation):
3568         * bindings/scripts/IDLAttributes.txt:
3569         * page/DOMWindow.idl:
3570         * workers/SharedWorker.idl:
3571
3572 2013-05-17  Darin Adler  <darin@apple.com>
3573
3574         [EFL] Move EFL port off legacy clipboard
3575         https://bugs.webkit.org/show_bug.cgi?id=116181
3576
3577         Reviewed by Anders Carlsson.
3578
3579         * dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
3580
3581         * page/efl/EventHandlerEfl.cpp:
3582         (WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
3583
3584         * platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
3585         (WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
3586         (WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
3587         (WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
3588         (WebCore::Clipboard::items): Ditto.
3589
3590         * platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
3591         has no code in it other than notImplemented lines! I didn't add a new one.
3592         (WebCore::Pasteboard::createForCopyAndPaste): Added.
3593         (WebCore::Pasteboard::createPrivate): Added.
3594         (WebCore::Pasteboard::createForDragAndDrop): Added.
3595         (WebCore::Pasteboard::hasData): Added.
3596         (WebCore::Pasteboard::readString): Added.
3597         (WebCore::Pasteboard::writeString): Added.
3598         (WebCore::Pasteboard::types): Added.
3599         (WebCore::Pasteboard::readFilenames): Added.
3600         (WebCore::Pasteboard::setDragImage): Added.
3601         (WebCore::Pasteboard::writePasteboard): Added.
3602
3603 2013-05-17  Frédéric Wang  <fred.wang@free.fr>
3604
3605         Bad spacing inside MathML formulas when text-indent is specified
3606         https://bugs.webkit.org/show_bug.cgi?id=106600
3607
3608         Reviewed by Martin Robinson.
3609
3610         When MathML is used in a HTML page that modifies the CSS text-indent,
3611         large gaps appear inside the mathematical expressions. Resetting it to
3612         0 on the math root (as Gecko does) fixes the issue.
3613
3614         Tests: mathml/presentation/text-indent.html
3615                mathml/presentation/text-indent-expected.html
3616
3617         * css/mathml.css:
3618         (math): reset text-indent to its default value.
3619
3620 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
3621
3622         Fix code that expects Page::chrome() to return a pointer
3623         https://bugs.webkit.org/show_bug.cgi?id=116313
3624
3625         Reviewed by Darin Adler.
3626
3627         Page::chrome() returns a reference after r150214.
3628
3629         * platform/network/blackberry/NetworkManager.cpp:
3630         (WebCore::NetworkManager::startJob):
3631         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
3632         (WebCore::SocketStreamHandle::SocketStreamHandle):
3633         * testing/Internals.cpp:
3634         (WebCore::Internals::resetToConsistentState):
3635         (WebCore::Internals::setEnableMockPagePopup):
3636
3637 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
3638
3639         [BlackBerry] ImageBlackBerry: add missing BlendMode parameter
3640         https://bugs.webkit.org/show_bug.cgi?id=116316
3641
3642         Reviewed by Carlos Garcia Campos.
3643
3644         When the new BitmapImage::draw() method was added in r147110 it
3645         didn't include the BlendMode parameter, which has been there since
3646         r137011.
3647
3648         * platform/graphics/blackberry/ImageBlackBerry.cpp:
3649         (WebCore::BitmapImage::draw):
3650
3651 2013-05-16  Jer Noble  <jer.noble@apple.com>
3652
3653         Some media/track tests fail or assert on Mac
3654         https://bugs.webkit.org/show_bug.cgi?id=97132
3655
3656         Reviewed by Simon Fraser.
3657
3658         Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
3659         values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
3660         Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
3661         layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
3662         to the box exclusively.
3663
3664         Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
3665         element(), which previously returned a PassRefPtr<> instead of a plain pointer.
3666
3667         * css/mediaControls.css:
3668         (video::-webkit-media-text-track-container): Move the font size to the display selector.
3669         (video::cue): Remove the display:inline and padding:2px declarations.
3670         (video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
3671         * html/track/TextTrackCue.cpp:
3672         (WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
3673         (WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
3674         (WebCore::TextTrackCue::getDisplayTree): Ditto.
3675         (WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
3676         * html/track/TextTrackCue.h:
3677         (WebCore::TextTrackCue::element): Return a plain pointer.
3678         * html/track/TextTrackCueGeneric.cpp:
3679         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
3680         * page/CaptionUserPreferencesMac.mm:
3681         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
3682         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
3683
3684 2013-05-16  Andreas Kling  <akling@apple.com>
3685
3686         Changes in text-only properties shouldn't cause repaints unless there is actually text.
3687         <http://webkit.org/b/116250>
3688
3689         Reviewed by Antti Koivisto.
3690
3691         Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
3692         This result means that the renderer only needs to repaint if one of its immediate children contains text.
3693
3694         This lets us avoid repainting the same pixels when hovering over constructs like:
3695
3696             <style>
3697                 a { text-decoration: none; }
3698                 a:hover { text-decoration: underline; }
3699             </style>
3700             <a href="http://is.gd/andersca">
3701                 <img src="cool-hat.jpg">
3702             </a>
3703
3704         Since the change in text-decoration has no effect on the rendering of the <img> element,
3705         we'll now be smart enough to avoid repainting it.
3706
3707         * rendering/style/RenderStyleConstants.h:
3708         * rendering/style/RenderStyle.cpp:
3709         (WebCore::RenderStyle::diff):
3710
3711             Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
3712             in case a difference is found, giving precedence to StyleDifferenceRepaint.
3713
3714         * rendering/RenderObject.h:
3715         * rendering/RenderObject.cpp:
3716         (WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
3717
3718             Helper to check if a RenderObject has at least one RenderText child containing more than just
3719             collapsible whitespace.
3720
3721         (WebCore::RenderObject::shouldRepaintForStyleDifference):
3722
3723             Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
3724             has an immediate text child.
3725
3726         (WebCore::RenderObject::styleWillChange):
3727         (WebCore::RenderObject::setStyle):
3728
3729             Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
3730
3731         * rendering/RenderBox.cpp:
3732         (WebCore::RenderBox::styleDidChange):
3733         * rendering/svg/SVGResourcesCache.cpp:
3734         (WebCore::SVGResourcesCache::clientStyleChanged):
3735
3736             Tweak for new StyleDifference enum value.
3737
3738         * rendering/RenderText.h:
3739         * rendering/RenderText.cpp:
3740         (WebCore::RenderText::isAllCollapsibleWhitespace):
3741
3742             Made this const.
3743
3744 2013-05-17  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
3745
3746         Improve -webkit-text-underline-position memory usage.
3747         https://bugs.webkit.org/show_bug.cgi?id=116108
3748
3749         Reviewed by Benjamin Poulain.
3750
3751         Remove m_maxLogicalTop private variable from RootInlineBox to reduce
3752         the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
3753         instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
3754         the maxLogicalTop value everytime it is called. In a typical page
3755         computeMaxLogicalTop is called less than 10 times for each
3756         InlineTextBox that uses -webkit-text-underline-position. That is a small
3757         price users of -webkit-text-underline-position will pay so that
3758         everybody can benefit from the memory reduction in RootInlineBox.
3759
3760         No new tests, no change in behavior.
3761
3762         * rendering/InlineFlowBox.cpp:
3763         (WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
3764         * rendering/InlineFlowBox.h:
3765         * rendering/RootInlineBox.cpp:
3766         (WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
3767         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
3768         computeMaxLogicalTop call and obsolete comment.
3769         (WebCore):
3770         (WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
3771         returning its value.
3772         * rendering/RootInlineBox.h:
3773         (RootInlineBox):
3774
3775 2013-05-17  Alexis Menard  <alexis@webkit.org>
3776
3777         Make sure to call release() on our smart pointers when we should.
3778         https://bugs.webkit.org/show_bug.cgi?id=116307
3779
3780         Reviewed by Andreas Kling.
3781
3782         Call release() when we should call it. There is probably more occurence
3783         of this problem on the codebase but this is a first bunch of fixes.
3784
3785         No new tests : existing ones should cover.
3786
3787         * css/CSSComputedStyleDeclaration.cpp:
3788         (WebCore::valueForNinePieceImage):
3789         (WebCore::getBorderRadiusShorthandValue):
3790         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
3791         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3792         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
3793         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
3794         * css/CSSParser.cpp:
3795         (WebCore::CSSParser::parseBorderImage):
3796         * html/HTMLBodyElement.cpp:
3797         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
3798
3799 2013-05-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3800
3801         Make PNGImageDecoder::rowAvailable auto-vectorizable
3802         https://bugs.webkit.org/show_bug.cgi?id=116151
3803
3804         Reviewed by Benjamin Poulain.
3805
3806         Changed the main loops under PNGImageDecoder::rowAvailable so that they
3807         avoid branches and non-sequential table look ups.
3808
3809         Together with automatic vectorization by the compiler this provides around
3810         4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
3811         PNG decoding in general.
3812
3813         * platform/graphics/Color.cpp:
3814         (WebCore::premultipliedARGBFromColor):
3815         * platform/graphics/Color.h:
3816         (WebCore::fastDivideBy255):
3817         * platform/graphics/filters/FEBlend.cpp:
3818         * platform/image-decoders/png/PNGImageDecoder.cpp:
3819         (WebCore::setPixelRGB):
3820         (WebCore::setPixelRGBA):
3821         (WebCore::setPixelRGBA_Premultiplied):
3822         (WebCore::PNGImageDecoder::rowAvailable):
3823
3824 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
3825
3826         Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
3827         https://bugs.webkit.org/show_bug.cgi?id=116290
3828
3829         Follow an update to the spec and support the new and old syntax.
3830
3831         Reviewed by Timothy Hatcher.
3832
3833         * inspector/ContentSearchUtils.cpp:
3834         (WebCore::ContentSearchUtils::scriptCommentPattern):
3835         (WebCore::ContentSearchUtils::stylesheetCommentPattern):
3836         * inspector/front-end/SASSSourceMapping.js:
3837         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
3838
3839 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3840
3841         Remove custom code for MessageEvent.ports getter
3842         https://bugs.webkit.org/show_bug.cgi?id=116304
3843
3844         Reviewed by Kentaro Hara.
3845
3846         Remove Custom code for the "ports" attribute getter in MessageEvent
3847         IDL interface. The JSC bindings generator already supports attributes
3848         of type MessagePortArray.
3849
3850         No new tests, already covered by existing layout tests and bindings
3851         tests.
3852
3853         * bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
3854         * bindings/scripts/CodeGeneratorJS.pm:
3855         (NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
3856         returns NULL and avoid crashing in this case.
3857         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
3858         to bindings generator tweak.
3859         * dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
3860         and switch to MessagePortArray type.
3861
3862 2013-05-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3863
3864         Add stubs for ContextMenu and ContextMenuItem
3865         https://bugs.webkit.org/show_bug.cgi?id=116235
3866
3867         Reviewed by Antonio Gomes.
3868
3869         No new tests needed, only a refactor.
3870
3871         Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
3872         so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
3873         need to replicate these stubs.
3874
3875         * PlatformEfl.cmake:
3876         * Target.pri:
3877         * platform/ContextMenuNone.cpp: Added.
3878         (WebCore):
3879         (WebCore::ContextMenu::ContextMenu):
3880         (WebCore::ContextMenu::getContextMenuItems):
3881         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
3882         (WebCore::ContextMenu::platformContextMenu):
3883         * platform/ContextMenuItemNone.cpp: Added.
3884         (WebCore):
3885         (WebCore::ContextMenuItem::platformContextMenuItem):
3886         * platform/efl/ContextMenuEfl.cpp: Removed.
3887         * platform/efl/ContextMenuItemEfl.cpp: Removed.
3888         * platform/qt/ContextMenuQt.cpp: Removed.
3889         * platform/qt/ContextMenuItemQt.cpp: Removed.
3890
3891 2013-05-16  Alexis Menard  <alexis@webkit.org>
3892
3893         Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
3894         https://bugs.webkit.org/show_bug.cgi?id=115656
3895
3896         Reviewed by Darin Adler.
3897
3898         If we create a prefixed event to dispatch it (in the case we have only
3899         prefixed event listeners in client's code) then we need to make sure to
3900         keep it in sync with the original unprefixed event after it has been
3901         dispatched. While being dispatched the event can be modified by
3902         client's code and when propagated back to outer elements, attributes were
3903         not updated. This patch changes the old design of creating a separate event
3904         for the prefixed case and now change the type of the event (so the name) before
3905         dispatching it, keeping the attributes if changed and then rename it
3906         back to unprefixed when the dispatching is finished.
3907
3908         Tests: transitions/transition-end-event-prefixed-01.html
3909                transitions/transition-end-event-prefixed-02.html
3910                transitions/transition-end-event-prefixed-03.html
3911
3912         * dom/Event.h:
3913         (WebCore::Event::setType):
3914         * dom/EventTarget.cpp:
3915         (WebCore::EventTarget::fireEventListeners):
3916
3917 2013-05-16  Mike Fenton  <mifenton@rim.com>
3918
3919         [BlackBerry] Strip invoke URLs when writing to the clipboard.
3920         https://bugs.webkit.org/show_bug.cgi?id=116226
3921
3922         Reviewed by Rob Buis.
3923
3924         PR 333516.
3925
3926         Invoke URLs should not be included in the paste data.
3927
3928         Internally Reviewed by Gen Mak.
3929
3930         * platform/blackberry/PasteboardBlackBerry.cpp:
3931         (WebCore::Pasteboard::writeSelection):
3932
3933 2013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
3934
3935         Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
3936         https://bugs.webkit.org/show_bug.cgi?id=116230
3937
3938         Reviewed by Chris Fleizach.
3939
3940         No new functionality, no new tests.
3941
3942         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3943         (webkitAccessibleTextGetTextForOffset): List textPosition argument as
3944         unused parameter for all platforms except GTK.
3945
3946 2013-05-16  Jaehun Lim  <ljaehun.lim@samsung.com>
3947
3948         Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
3949         https://bugs.webkit.org/show_bug.cgi?id=115884
3950         
3951         Reviewed by Antonio Gomes.
3952
3953         Frame flattening should be applied when the frame owner is frame or iframe. But when
3954         the frame owner is object element, frame flattening prevents it from having scrollbars.
3955         In this situation, we can't scroll the html document in object element.
3956
3957         This patch adds two helper functions to verify flattening conditions.
3958         
3959         Test: fast/frames/flattening/scrolling-in-object.html
3960
3961         * page/FrameView.cpp:
3962         (WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
3963         (WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
3964         (WebCore::FrameView::avoidScrollbarCreation):
3965         (WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
3966         (WebCore::FrameView::layout): Use frameFlatteningEnabled().
3967         (WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
3968
3969 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
3970
3971         Port functions for pathhandling to Windows CE in FileSystemWin
3972         https://bugs.webkit.org/show_bug.cgi?id=116208
3973
3974         Reviewed by Darin Adler.
3975
3976         This will allow us to remove FileSystemWinCE in a next step.
3977
3978         * platform/win/FileSystemWin.cpp:
3979         (WebCore::pathByAppendingComponent):
3980         (WebCore::pathGetFileName):
3981
3982 2013-05-16  Tim Horton  <timothy_horton@apple.com>
3983
3984         PDFPlugins don't load when plugins are disabled, but they should
3985         https://bugs.webkit.org/show_bug.cgi?id=75790
3986         <rdar://problem/11650197>
3987
3988         Reviewed by Anders Carlsson.
3989
3990         Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
3991         say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
3992         functionality which happens to use the plug-in infrastructure, and which also doesn't
3993         unexpectedly disappear for users with plug-ins off.
3994
3995         * WebCore.exp.in:
3996         Export SubframeLoader::allowPlugins().
3997         Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
3998
3999         * dom/DOMImplementation.cpp:
4000         (WebCore::DOMImplementation::createDocument):
4001         Load PluginData even if plug-ins are disabled, but if that is the case, only
4002         create a PluginDocument for application plug-ins.
4003
4004         * html/PluginDocument.cpp:
4005         (WebCore::PluginDocumentParser::appendBytes):
4006         Don't bail if plug-ins are disabled, because we could still be a PluginDocument
4007         for an application plug-in.
4008
4009         * page/Page.cpp:
4010         (WebCore::Page::pluginData):
4011         Allow PluginData to be constructed even if plug-ins are disabled, as there might
4012         be application plug-ins that we want to load anyway.
4013
4014         * platform/mac/MIMETypeRegistryMac.mm:
4015         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
4016         On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
4017
4018         * plugins/PluginData.cpp:
4019         (WebCore::PluginData::supportsMimeType):
4020         Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
4021         whether they are looking for any plug-in, or are looking only for application plug-ins.
4022
4023         * plugins/PluginData.h:
4024         (PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
4025         (PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
4026
4027 2013-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
4028
4029         [BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
4030         https://bugs.webkit.org/show_bug.cgi?id=114944
4031
4032         Reviewed by Rob Buis.
4033
4034         It crashes in network platform code when trying to save an
4035         invalid URL in the disk cache. That test contains references to
4036         empty URLs like http://. Those empty URLs, are parsed as http:/ by
4037         KURL and considered valid. BlackBerry network platform uses GURL
4038         which considers those URLs invalid. We needed to check that the
4039         URLs are valid for our platform before starting the network
4040         operation.
4041
4042         Fixes a crash running test
4043         editing/execCommand/indent-paragraphs.html.
4044
4045         * platform/network/blackberry/NetworkManager.cpp:
4046         (WebCore::NetworkManager::startJob): Check if the request URL is
4047         valid from the platform point of view right after creating the
4048         platform network request and return early if the URL is invalid
4049         with StatusErrorInvalidUrl error.
4050
4051 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
4052
4053         Remove unused function safeCreateFile() from WebCore
4054         https://bugs.webkit.org/show_bug.cgi?id=116211
4055
4056         Reviewed by Anders Carlsson.
4057
4058         * platform/FileSystem.h:
4059         * platform/win/FileSystemWin.cpp:
4060
4061 2013-05-16  Peter Gal  <galpeter@inf.u-szeged.hu>
4062
4063         [curl] MIME type should be in lowercase
4064         https://bugs.webkit.org/show_bug.cgi?id=116218
4065
4066         Reviewed by Benjamin Poulain.
4067
4068         Existing testcase: http/tests/mime/uppercase-mime-type.html