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