45c2e89735a0a9b62c1a870e73e2bda6a4e7b402
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-04  Robert Hogan  <robert@webkit.org>
2
3         Whitespace between nowrap elements ignored after collapsed trailing space in a text run
4         https://bugs.webkit.org/show_bug.cgi?id=17705
5
6         Reviewed by Ryosuke Niwa.
7
8         Bug 93448 and r138654 fixed the treatment of line-breaks between nowrap elements. This augments
9         that fix by recognizing that we have a potential break not only in situations where the next character is a 
10         space and the current character is not, but also where the next character is a space and the current character 
11         *is* a space *and* we are ignoring spaces. This is so because any spaces we have ignored up to this point 
12         after the actual word end will get collapsed away even if we don't end up taking the line break. 
13
14         In a nutshell, if we allow whitespace collapsing 'word  ' and 'word' are equivalent when before a whitespace
15         character, so treat the first as well as the second as a potential linebreak.
16
17         Test: fast/text/whitespace/inline-whitespace-wrapping-5.html
18
19         * rendering/RenderBlockLineLayout.cpp:
20         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
21
22 2013-04-13  Andreas Kling  <akling@apple.com>
23
24         Rename/tweak some StylePropertySet/CSSStyleDeclaration copying functions.
25         <http://webkit.org/b/114569>
26
27         Reviewed by Anders Carlsson.
28
29         - StylePropertySet::copy() -> mutableCopy()
30
31             This function now returns a MutableStylePropertySet, and this is also reflected in the name.
32
33         - CSSStyleDeclaration::copy() -> copyProperties()
34
35             Renamed to reflect that it's the properties being copied, not the CSSStyleDeclaration.
36             They also now return MutableStylePropertySets.
37
38         - StylePropertySet::copyPropertiesInSet()
39         - CSSStyleDeclaration::copyPropertiesInSet()
40
41             These functions now return MutableStylePropertySets.
42
43         * css/CSSComputedStyleDeclaration.cpp:
44         (WebCore::CSSComputedStyleDeclaration::copyProperties):
45         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
46         * css/CSSComputedStyleDeclaration.h:
47         (CSSComputedStyleDeclaration):
48         * css/CSSStyleDeclaration.h:
49         (CSSStyleDeclaration):
50         * css/PropertySetCSSStyleDeclaration.cpp:
51         (WebCore::PropertySetCSSStyleDeclaration::copyProperties):
52         * css/PropertySetCSSStyleDeclaration.h:
53         * css/StylePropertySet.cpp:
54         (WebCore::StylePropertySet::mutableCopy):
55         (WebCore::StylePropertySet::copyPropertiesInSet):
56         * css/StylePropertySet.h:
57         (StylePropertySet):
58         * css/StyleRule.cpp:
59         (WebCore::StyleRule::StyleRule):
60         (WebCore::StyleRule::mutableProperties):
61         (WebCore::StyleRulePage::StyleRulePage):
62         (WebCore::StyleRulePage::mutableProperties):
63         (WebCore::StyleRuleFontFace::StyleRuleFontFace):
64         (WebCore::StyleRuleFontFace::mutableProperties):
65         (WebCore::StyleRuleViewport::StyleRuleViewport):
66         (WebCore::StyleRuleViewport::mutableProperties):
67         (WebCore::StyleRuleFilter::StyleRuleFilter):
68         (WebCore::StyleRuleFilter::mutableProperties):
69         * css/ViewportStyleResolver.cpp:
70         (WebCore::ViewportStyleResolver::addViewportRule):
71         * css/WebKitCSSKeyframeRule.cpp:
72         (WebCore::StyleKeyframe::mutableProperties):
73         * dom/Element.cpp:
74         (WebCore::UniqueElementData::UniqueElementData):
75         * dom/StyledElement.cpp:
76         (WebCore::StyledElement::ensureMutableInlineStyle):
77         * editing/ApplyStyleCommand.cpp:
78         (WebCore::copyStyleOrCreateEmpty):
79         * editing/EditingStyle.cpp:
80         (WebCore::copyEditingProperties):
81         (WebCore::editingStyleFromComputedStyle):
82         (WebCore::EditingStyle::EditingStyle):
83         (WebCore::EditingStyle::init):
84         (WebCore::EditingStyle::copy):
85         (WebCore::EditingStyle::mergeStyle):
86         (WebCore::getPropertiesNotIn):
87         * editing/FrameSelection.cpp:
88         (WebCore::FrameSelection::copyTypingStyle):
89
90 2013-04-13  Dirk Schulze  <krit@webkit.org>
91
92         Rename StyleBuilder to DeprecatedStyleBuilder
93         https://bugs.webkit.org/show_bug.cgi?id=114532
94
95         Reviewed by Benjamin Poulain.
96
97         The StyleBuilder code is hard to read and maintain. People should
98         not add new properties to this class. To make this clear, this
99         patch renames the class to DeprecatedStyleBuilder.
100
101         Pure refactoring, no change in functionality.
102
103         * CMakeLists.txt:
104         * GNUmakefile.list.am:
105         * Target.pri:
106         * WebCore.vcproj/WebCore.vcproj:
107         * WebCore.vcxproj/WebCore.vcxproj.filters:
108         * WebCore.xcodeproj/project.pbxproj:
109         * css/CSSAllInOne.cpp:
110         * css/DeprecatedStyleBuilder.cpp: Renamed from Source/WebCore/css/StyleBuilder.cpp.
111         * css/DeprecatedStyleBuilder.h: Renamed from Source/WebCore/css/StyleBuilder.h.
112         * css/StyleResolver.cpp:
113         (WebCore::StyleResolver::StyleResolver):
114         (WebCore::StyleResolver::applyProperty):
115         (WebCore::StyleResolver::reportMemoryUsage):
116         * css/StyleResolver.h:
117         (StyleResolver):
118         * rendering/style/RenderStyle.h:
119
120 2013-04-13  Andreas Kling  <akling@apple.com>
121
122         Remove unused method CSSStyleDeclaration::makeMutable().
123         <http://webkit.org/b/114567>
124
125         Reviewed by Anders Carlsson.
126
127         * css/CSSComputedStyleDeclaration.cpp:
128         * css/CSSComputedStyleDeclaration.h:
129         (CSSComputedStyleDeclaration):
130         * css/CSSStyleDeclaration.h:
131         (CSSStyleDeclaration):
132         * css/PropertySetCSSStyleDeclaration.cpp:
133         * css/PropertySetCSSStyleDeclaration.h:
134
135 2013-04-13  Antoine Quint  <graouts@apple.com>
136
137         Width of last of consecutive tabs may be incorrect with "white-space: pre-wrap"
138         https://bugs.webkit.org/show_bug.cgi?id=114562
139
140         Reviewed by Dan Bernstein.
141
142         When we measure the last word of a RenderText, make sure we use the correct x
143         position taking into account the current accumulated word measurements up to
144         this character. This is of particular importance in the case of tabs where the
145         measured width would differ based on the x position.
146
147         Test: fast/text/tab-last-word-in-renderer-pre-wrap.html
148
149         * rendering/RenderBlockLineLayout.cpp:
150         (WebCore::setLogicalWidthForTextRun):
151
152 2013-04-13  Mark Salisbury  <mark.salisbury@hp.com>
153
154         [Windows, WinCairo] ImageBufferCairo.cpp fails to compile after 148247, 148264.
155         https://bugs.webkit.org/show_bug.cgi?id=114540
156         
157         Reviewed by Brent Fulgham.
158
159         * platform/graphics/cairo/ImageBufferCairo.cpp:
160
161 2013-04-13  Zan Dobersek  <zdobersek@igalia.com>
162
163         Unreviewed GTK build fix after r148305.
164
165         * GNUmakefile.list.am: Adding the TrackListBase build targets to the build.
166
167 2013-04-09  Roger Fong  <roger_fong@apple.com>
168
169         Update AVFoundationCF code following http://trac.webkit.org/changeset/148291.
170         https://bugs.webkit.org/show_bug.cgi?id=114548.
171
172         Reviewed by Eric Carlson.
173
174         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
175         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
176         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
177         (WebCore):
178         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
179         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
180         (MediaPlayerPrivateAVFoundationCF):
181
182 2013-04-12  Simon Fraser  <simon.fraser@apple.com>
183
184         Demystify some code in RenderLayer::updateScrollableAreaSet()
185         https://bugs.webkit.org/show_bug.cgi?id=114543
186
187         Reviewed by Tim Horton.
188
189         Clean up some code that called functions with important side effects
190         inside a ternary operator, and clean up the #ifdefs.
191
192         * rendering/RenderLayer.cpp:
193         (WebCore::RenderLayer::updateScrollableAreaSet):
194
195 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
196
197         <rdar://problem/13277362> REGRESSION (r141981): Crash when closing a Google Docs document
198         https://bugs.webkit.org/show_bug.cgi?id=114541
199
200         Reviewed by Brady Eidson.
201
202         Test: http/tests/ssl/ping-with-unsafe-redirect.html
203
204         * loader/FrameNetworkingContext.h:
205         (WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
206         Added a null check. All NetworkingContext functions except for this one had it already.
207
208 2013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
209
210         [Mac] REGRESSION: Auto substitution strips new lines
211         https://bugs.webkit.org/show_bug.cgi?id=114537
212
213         Reviewed by Enrica Casucci.
214
215         The bug was caused by SpellingCorrectionCommand's use of InsertTextCommand. This command can't insert
216         new lines and there's even an assertion for it. Use TypingCommand::insertText instead.
217
218         Since TypingCommand::insertText calls appliedEditing on its own, we need to avoid calling that again in
219         CompositeEditCommand::apply after SpellingCorrectionCommand::doApply. Replaced the check in apply to use
220         callsAppliedEditingInDoApply instead of isTypingCommand, and added callsAppliedEditingInDoApply to both
221         TypingCommand and SpellingCorrectionCommand to return true (it returns false by default).
222
223         Test: platform/mac/editing/spelling/autocorrection-with-multi-line-text.html
224
225         * editing/CompositeEditCommand.cpp:
226         (WebCore::CompositeEditCommand::apply): Use TypingCommand::insertText instead of InsertTextCommand
227         (WebCore::CompositeEditCommand::callsAppliedEditingInDoApply): Added. Returns false.
228         * editing/CompositeEditCommand.h:
229         (CompositeEditCommand):
230         * editing/SpellingCorrectionCommand.cpp:
231         (WebCore::SpellingCorrectionCommand::doApply):
232         (WebCore::SpellingCorrectionCommand::callsAppliedEditingInDoApply): Added. Returns true.
233         * editing/SpellingCorrectionCommand.h:
234         (SpellingCorrectionCommand):
235         * editing/TypingCommand.cpp:
236         (WebCore::TypingCommand::callsAppliedEditingInDoApply): Added. Returns true.
237         * editing/TypingCommand.h:
238         (TypingCommand):
239
240 2013-04-12  Brendan Long  <b.long@cablelabs.com>
241
242         Refactor TextTrack and TextTrackList to make it easier to add audio and video tracks
243         https://bugs.webkit.org/show_bug.cgi?id=114330
244
245         Reviewed by Jer Noble.
246
247         No new tests because this doesn't add new functionality.
248
249         * CMakeLists.txt: Only compile text track files if ENABLE(VIDEO_TRACK), and add TrackListBase
250         * Target.pri: Add TrackListBase
251         * WebCore.vcproj/WebCore.vcproj: Correct InbandTextTrackPrivate.h's location and add TrackListBase
252         * WebCore.xcodeproj/project.pbxproj: Add TrackListBase
253         * html/HTMLMediaElement.cpp: Renamed "track" functions to "textTrack"
254         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Renamed.
255         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Renamed.
256         (WebCore::HTMLMediaElement::addTextTrack): Renamed.
257         (WebCore::HTMLMediaElement::removeTextTrack): Renamed.
258         (WebCore::HTMLMediaElement::removeAllInbandTracks): Use renamed functions.
259         (WebCore::HTMLMediaElement::didAddTextTrack): Renamed.
260         (WebCore::HTMLMediaElement::didRemoveTextTrack): Renamed.
261         * html/HTMLMediaElement.h:
262         Renamed "track" functions to "textTrack" and only forward-declare TextTrackList if ENABLE(VIDEO_TRACK)
263         * html/HTMLTrackElement.cpp: Renamed "track" functions to "textTrack"
264         (WebCore::HTMLTrackElement::insertedInto):
265         (WebCore::HTMLTrackElement::removedFrom):
266         * html/track/TextTrack.cpp:
267         Move media element, label, language and kind into TrackBase and move EventTarget functions into TextTrack.
268         (WebCore::TextTrack::TextTrack): Added.
269         (WebCore::TextTrack::interfaceName): Added.
270         (WebCore::TextTrack::scriptExecutionContext): Added.
271         (WebCore::TextTrack::eventTargetData): Added.
272         (WebCore::TextTrack::ensureEventTargetData): Added.
273         (WebCore::TextTrack::isValidKind): Added to support TrackBase::setKind()
274         (WebCore::TextTrack::setKind): Override to support textTrackKindChanged()
275         (WebCore::TextTrack::isRendered): Use kind(), label() and language() instead of m_kind, etc.
276         (WebCore::TextTrack::platformTextTrack): Ditto.
277         (WebCore::TextTrack::isMainProgramContent): Ditto.
278         * html/track/TextTrack.h:
279         Same as TextTrack.cpp, plus added defaultKindKeyword() so TrackBase::setKind() will work and added
280         toTextTrack().
281         * html/track/TextTrackList.cpp:
282         Move functionality into TrackListBase, add toTextTrack() casts, use
283         TrackBase where necesssary and use owner() instead of m_owner.
284
285         Moved EventTarget functions into TrackListBase.
286         (TextTrackList::TextTrackList):
287         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
288         (TextTrackList::item):
289         (TextTrackList::invalidateTrackIndexesAfterTrack):
290         (TextTrackList::append):
291         (TextTrackList::remove):
292         (TextTrackList::contains):
293         * html/track/TextTrackList.h:
294         Move EventTarget, RefCounted and m_inbandTracks into TrackListBase.
295         Override length(), contains() and remove().
296         * html/track/TrackBase.cpp: Remove EventTarget functions.
297         (WebCore::TrackBase::TrackBase):
298         Remove EventTarget, add label and language
299         (WebCore::TrackBase::setKind): Added
300         * html/track/TrackBase.h:
301         Don't extend EventTarget (AudioTrack and VideoTrack aren't). Handle
302         kind, label, language and media element.
303         (WebCore::TrackBase::setMediaElement): Added.
304         (WebCore::TrackBase::mediaElement): Added.
305         (WebCore::TrackBase::kind): Added.
306         (WebCore::TrackBase::label): Added.
307         (WebCore::TrackBase::setLabel): Added.
308         (WebCore::TrackBase::language): Added.
309         (WebCore::TrackBase::setLanguage): Added.
310         * html/track/TrackListBase.cpp:
311         Added. Handles functionality common to TextTrackList, AudioTrackList and
312         VideoTrackList.
313         (TrackListBase::TrackListBase): Added.
314         (TrackListBase::~TrackListBase): Added.
315         (TrackListBase::length): Added.
316         (TrackListBase::remove): Added.
317         (TrackListBase::contains): Added.
318         (TrackListBase::scheduleAddTrackEvent): Added.
319         (TrackListBase::scheduleRemoveTrackEvent): Added.
320         (TrackListBase::scheduleChangeEvent): Added.
321         (TrackListBase::asyncEventTimerFired): Added.
322         * html/track/TrackListBase.h:
323         Copied from Source/WebCore/html/track/TextTrackList.h. Handles
324         functionality common to TextTrackList, AudioTrackList and VideoTrackList.
325         (WebCore::TrackListBase::scriptExecutionContext): Added.
326         (WebCore::TrackListBase::clearOwner): Added.
327         (WebCore::TrackListBase::owner): Added.
328         (WebCore::TrackListBase::isFiringEventListeners): Added.
329         * platform/graphics/MediaPlayer.cpp:
330         (WebCore::MediaPlayer::addTextTrack): Renamed (was addTrack)
331         (WebCore::MediaPlayer::removeTextTrack): Renamed (was removeTrack)
332         * platform/graphics/MediaPlayer.h:
333         (WebCore::MediaPlayerClient::mediaPlayerDidAddTextTrack): Renamed (was mediaPlayerDidAddTrack)
334         (WebCore::MediaPlayerClient::mediaPlayerDidRemoveTextTrack): Renamed (was mediaPlayerDidRemoveTrack)
335
336 2013-04-12  Oliver Hunt  <oliver@apple.com>
337
338         make the codegenerator actually emit polymorphism check in the "no vtable" path
339         https://bugs.webkit.org/show_bug.cgi?id=114533
340
341         Reviewed by David Kilzer.
342
343         Make the "no vtable" check correct so that we actually plant a polymorphism
344         check.  Update a few interfaces to have the correct validation attributes.        
345
346         * Modules/webdatabase/SQLTransaction.idl:
347         * bindings/scripts/CodeGeneratorJS.pm:
348         (GenerateImplementation):
349         * bindings/scripts/test/JS/JSTestInterface.cpp:
350         (WebCore::toJS):
351         * bindings/scripts/test/TestInterface.idl:
352         * html/track/TextTrackCue.idl:
353         * svg/SVGAnimatedAngle.idl:
354         * svg/SVGAnimatedBoolean.idl:
355         * svg/SVGAnimatedEnumeration.idl:
356         * svg/SVGAnimatedInteger.idl:
357         * svg/SVGAnimatedLength.idl:
358         * svg/SVGAnimatedLengthList.idl:
359         * svg/SVGAnimatedNumber.idl:
360         * svg/SVGAnimatedNumberList.idl:
361         * svg/SVGAnimatedPreserveAspectRatio.idl:
362         * svg/SVGAnimatedRect.idl:
363         * svg/SVGAnimatedString.idl:
364         * svg/SVGAnimatedTransformList.idl:
365
366 2013-04-12  Oliver Hunt  <oliver@apple.com>
367
368         Make CodeGeneratorJS plant comments to explain failures in the binding validation
369         https://bugs.webkit.org/show_bug.cgi?id=114528
370
371         Reviewed by Sam Weinig.
372
373         No change in behaviour, just make the generated bindings include comments
374         to aid diagnosing issues that may be non-obvious.
375
376         * bindings/scripts/CodeGeneratorJS.pm:
377         (GenerateImplementation):
378         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
379         (WebCore::toJS):
380         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
381         (WebCore::toJS):
382         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
383         (WebCore::toJS):
384         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
385         (WebCore::toJS):
386         * bindings/scripts/test/JS/JSTestException.cpp:
387         (WebCore::toJS):
388         * bindings/scripts/test/JS/JSTestInterface.cpp:
389         (WebCore::toJS):
390         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
391         (WebCore::toJS):
392         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
393         (WebCore::toJS):
394         * bindings/scripts/test/JS/JSTestObj.cpp:
395         (WebCore::toJS):
396         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
397         (WebCore::toJS):
398         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
399         (WebCore::toJS):
400         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
401         (WebCore::toJS):
402
403 2013-04-12  Tim Horton  <timothy_horton@apple.com>
404
405         REGRESSION (r138858): GIFs don't start playing when they come out of background tabs
406         https://bugs.webkit.org/show_bug.cgi?id=108864
407         <rdar://problem/13140489>
408
409         Reviewed by Antti Koivisto.
410
411         * loader/cache/CachedImage.cpp:
412         (WebCore::CachedImage::resumeAnimatingImagesForLoader): Added.
413         Iterate through all of the loader's cached resources. If they are bitmap images
414         which claim to be animatable, notify the image's observers that the animation advanced
415         by one frame. In reality, the image is still on the same frame, but will now be repainted,
416         restarting the animation loop.
417         * loader/cache/CachedImage.h:
418         * page/FrameView.cpp:
419         (WebCore::FrameView::setIsInWindow):
420         When the FrameView is brought into a window, repaint all animated images.
421         * platform/graphics/BitmapImage.cpp:
422         (WebCore::BitmapImage::canAnimate): Added. 
423         Return whether or not the image should animate (claims to animate, has not already
424         finished its animation, and has an ImageObserver) *and* has more than one frame.
425         * platform/graphics/BitmapImage.h:
426         (BitmapImage): Add canAnimate.
427
428 2013-04-12  Martin Robinson  <mrobinson@igalia.com>
429
430         r148197 broke the GTK+ build
431         https://bugs.webkit.org/show_bug.cgi?id=114525
432
433         Reviewed by Anders Carlsson.
434
435         Re-add the ENABLE(SCROLLING_THREAD) guards to scrolling thread files
436         and extend them with USE(COORDINATED_GRAPHICS). This code is unused
437         by other configurations currently.
438
439         * page/scrolling/ScrollingStateFixedNode.cpp: Re-add guards.
440         * page/scrolling/ScrollingStateFixedNode.h: Ditto.
441         * page/scrolling/ScrollingStateNode.cpp: Ditto.
442         * page/scrolling/ScrollingStateNode.h: Ditto.
443         * page/scrolling/ScrollingStateScrollingNode.cpp: Ditto.
444         * page/scrolling/ScrollingStateScrollingNode.h: Ditto.
445         * page/scrolling/ScrollingStateStickyNode.cpp: Ditto.
446         * page/scrolling/ScrollingStateStickyNode.h: Ditto.
447         * page/scrolling/ScrollingStateTree.cpp: Ditto.
448         * page/scrolling/ScrollingStateTree.h: Ditto.
449         * page/scrolling/mac/ScrollingStateNodeMac.mm: Ditto.
450         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: Ditto.
451
452 2013-04-12  Jer Noble  <jer.noble@apple.com>
453
454         (AVFoundation) WebKit fails to detect live stream.
455         https://bugs.webkit.org/show_bug.cgi?id=114474
456
457         Reviewed by Eric Carlson.
458
459         Remove a workaround (added by r88944) for an error in an Apple.com javascript
460         media controller. The error has been fixed, and the workaround is causing problems
461         with other media streams.
462
463         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
464         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
465
466 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
467
468         [GTK] Split GtkAuthenticationDialog in two widgets
469         https://bugs.webkit.org/show_bug.cgi?id=103644
470
471         Reviewed by Xan Lopez.
472
473         The current GtkAuthenticationDialog implements both the common
474         logic and widgets to implement a real GtkDialog and a widget to be
475         embedded in any container. WebKit1 uses a GtkDialog while WebKit2
476         embeds the dialog in the WebView. This patch splits the code to
477         leave in Platform only the code that is actually common, leaving
478         the widget implementation to the WebKit layer, using a dialog in
479         WebKit1 and embedding auth widget in the WebView in WebKit2.
480
481         * GNUmakefile.list.am: Add new files to compilation.
482         * platform/gtk/GtkAuthenticationDialog.cpp: Removed.
483         * platform/gtk/GtkAuthenticationDialog.h: Removed.
484         * platform/gtk/WebKitAuthenticationWidget.cpp: Added.
485         (_WebKitAuthenticationWidgetPrivate):
486         (packTwoColumnLayoutInBox):
487         (createLabel):
488         (createEntry):
489         (webkitAuthenticationWidgetInitialize):
490         (webkitAuthenticationWidgetFinalize):
491         (webkit_authentication_widget_init):
492         (webkit_authentication_widget_class_init):
493         (webkitAuthenticationWidgetNew):
494         (webkitAuthenticationWidgetCreateCredential):
495         (webkitAuthenticationWidgetGetChallenge):
496         * platform/gtk/WebKitAuthenticationWidget.h: Added.
497         (_WebKitAuthenticationWidget):
498         (_WebKitAuthenticationWidgetClass):
499
500 2013-04-11  Jer Noble  <jer.noble@apple.com>
501
502         Add support for MediaPlayer::minTimeSeekable()
503         https://bugs.webkit.org/show_bug.cgi?id=114484
504
505         Reviewed by Eric Carlson.
506
507         Plumb a new minTimeSeekable() method through MediaPlayer and
508         MediaPlayerPrivate and use this new method in the existing
509         HTMLMediaElement::minTimeSeekable() method.
510
511         * html/HTMLMediaElement.cpp:
512         (WebCore::HTMLMediaElement::minTimeSeekable): Pass to MediaPlayer.
513         * platform/graphics/MediaPlayer.cpp:
514         (WebCore::NullMediaPlayerPrivate::minTimeSeekable): Return 0.
515         (WebCore::MediaPlayer::minTimeSeekable): Pass to MediaPlayerPrivate.
516         * platform/graphics/MediaPlayer.h:
517         * platform/graphics/MediaPlayerPrivate.h:
518         (WebCore::MediaPlayerPrivateInterface::seekable): Define in terms of 
519             minTimeSeekable()
520         (WebCore::MediaPlayerPrivateInterface::minTimeSeekable): Default to 0.
521         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
522         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
523             Initialize new m_cachedMinTimeSeekable ivar.
524         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble):
525             Renamed from maxTimeSeekable().
526         (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Added.
527             Cache value of platformMinTimeSeekable().
528         (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
529             Reset m_cachedMinTimeSeekable.
530         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
531         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
532         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
533         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): float -> double.
534         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
535             Added. Retrieve the lowest value from -[m_playerItem seekableTimeRanges].
536         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
537             float -> double.
538
539 2013-04-12  Commit Queue  <rniwa@webkit.org>
540
541         Unreviewed, rolling out r147942, r148026, and r148092.
542         http://trac.webkit.org/changeset/147942
543         http://trac.webkit.org/changeset/148026
544         http://trac.webkit.org/changeset/148092
545         https://bugs.webkit.org/show_bug.cgi?id=114521
546
547         "r147942 is buggy. Rollback all the patches depending on it."
548         (Requested by abucur on #webkit).
549
550         * dom/ContainerNode.cpp:
551         (WebCore::willRemoveChildren):
552         (WebCore):
553         (WebCore::ContainerNode::removeChildren):
554         * dom/Document.cpp:
555         (WebCore::Document::nodeChildrenWillBeRemoved):
556         (WebCore):
557         * dom/Document.h:
558         (Document):
559         * dom/Node.cpp:
560         * dom/Node.h:
561         (Node):
562         * dom/NodeTraversal.cpp:
563         * dom/NodeTraversal.h:
564         (ElementTraversal):
565         (NodeTraversal):
566         * dom/Range.cpp:
567         (WebCore::boundaryNodeChildrenWillBeRemoved):
568         (WebCore):
569         (WebCore::Range::nodeChildrenWillBeRemoved):
570         * dom/Range.h:
571         * html/HTMLLIElement.cpp:
572         (WebCore::HTMLLIElement::attach):
573         * html/HTMLOListElement.cpp:
574         (WebCore::HTMLOListElement::updateItemValues):
575         (WebCore::HTMLOListElement::recalculateItemCount):
576         * rendering/RenderCounter.cpp:
577         (WebCore::previousInPreOrder):
578         (WebCore::previousSiblingOrParent):
579         (WebCore::parentElement):
580         (WebCore::nextInPreOrder):
581         * rendering/RenderListItem.cpp:
582         (WebCore::enclosingList):
583         (WebCore::RenderListItem::nextListItem):
584         (WebCore::previousListItem):
585         (WebCore::RenderListItem::calcValue):
586         (WebCore::RenderListItem::explicitValueChanged):
587         (WebCore::previousOrNextItem):
588         (WebCore::RenderListItem::updateListMarkerNumbers):
589         * rendering/RenderListItem.h:
590         (RenderListItem):
591
592 2013-04-12  Jer Noble  <jer.noble@apple.com>
593
594         TimeRanges::nearest() returns incorrect results.
595         https://bugs.webkit.org/show_bug.cgi?id=114483
596
597         Reviewed by Eric Carlson.
598
599         Test: media/timeranges-nearest.html
600
601         TimeRanges::nearest() has had an incorrect algorithm since its
602         addition, which has gone unnoticed because no media engine supports
603         seekable ranges with greater than one entry, and no media engine
604         seekable ranges with startTime values > 0.
605
606         Fix the algorithm used to walk a TimeRanges object; return the closest
607         time, not the smallest delta between range and target time.
608         * html/TimeRanges.cpp:
609         (TimeRanges::nearest):
610
611         Add some internal functions to allow us to write LayoutTests for
612         TimeRanges objects:
613         * WebCore.exp.in:
614         * testing/Internals.cpp:
615         (WebCore::Internals::createTimeRanges):
616         (WebCore::Internals::closestTimeToTimeRanges):
617         * testing/Internals.h:
618         * testing/Internals.idl:
619
620 2013-04-12  Eric Carlson  <eric.carlson@apple.com>
621
622         Support "forced" subtitles
623         https://bugs.webkit.org/show_bug.cgi?id=114460
624
625         Reviewed by Jer Noble.
626
627         Test: media/track/track-forced-subtitles.html
628
629         * html/HTMLMediaElement.cpp:
630         (WebCore::HTMLMediaElement::configureTextTrackGroup): Enable a forced track if nothing else is enabled.
631         (WebCore::HTMLMediaElement::configureTextTracks): Include forced tracks with captions+subtitles.
632
633         * html/track/InbandTextTrack.cpp:
634         (WebCore::InbandTextTrack::InbandTextTrack): Deal with kind=forced.
635
636         * html/track/TextTrack.cpp:
637         (WebCore::TextTrack::forcedKeyword): New keyword.
638         (WebCore::TextTrack::isValidKindKeyword): Include forced.
639         (WebCore::TextTrack::platformTextTrack): Ditto.
640         * html/track/TextTrack.h:
641
642         * page/CaptionUserPreferences.cpp:
643         (WebCore::CaptionUserPreferences::primaryAudioTrackLanguageOverride): New override to support testing.
644         * page/CaptionUserPreferences.h:
645
646         * page/CaptionUserPreferencesMac.mm:
647         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Support forced tracks.
648         * platform/graphics/InbandTextTrackPrivate.h:
649
650         * platform/graphics/PlatformTextTrack.h: Add Forced, minor cleanup.
651
652         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
653         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by enhancement: log cue position.
654
655         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
656         (WebCore::InbandTextTrackPrivateAVFObjC::kind): Support forced.
657         (WebCore::InbandTextTrackPrivateAVFObjC::label): Drive-by cleanup.
658
659         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
660         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Don't filter out forced tracks.
661         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Log the language returned.
662
663         * testing/Internals.cpp:
664         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): New.
665         (WebCore::Internals::setCaptionDisplayMode): New.
666         * testing/Internals.h:
667         * testing/Internals.idl:
668
669 2013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
670
671         [Mac] Some ligatures are applied across different fronts
672         https://bugs.webkit.org/show_bug.cgi?id=113604
673
674         Reviewed by Darin Adler.
675
676         The bug was caused by applyFontTransforms applying ligatures without updating the font data in the glyph buffer.
677
678         Suppose we have characters AB and A uses font X and B uses font Y. Further suppose that we have ligatures for AB
679         in Y. The problem was that WithIterator::advanceInternal calls applyFontTransforms on AB to apply this ligature
680         even though A and B use different fonts. Since X doesn't contain the same ligature for A to be paired with that
681         of B in X, we get a blank A.
682
683         Fixed the bug by resetting lastGlyphCount after calling applyFontTransforms. This ensures that we don't call
684         applyFontTransforms across different fonts.
685
686         No new tests since this requires a variant of Osaka font that doesn't come with OS X.
687
688         The bug 114482 tracks the effort to add a test for this bug fix. I've already asked someone to create a custom
689         font for us so that we can test this bug fix but that's going to a while.
690
691         * platform/graphics/WidthIterator.cpp:
692         (WebCore::WidthIterator::advanceInternal):
693
694 2013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
695
696         [Mac] Enable spellchecking tests added in r141471
697         https://bugs.webkit.org/show_bug.cgi?id=108525
698
699         Reviewed by Darin Adler.
700
701         Made automatic quote substitution, dash substitution, text replacement, and spelling correction
702         togglable via internals object. These functions are no-op when text replacement is not used.
703
704         This allows us to disable automatic spelling correction in spellcheck tests.
705
706         Enabled several tests added in r141471.
707
708         * WebCore.exp.in:
709         * testing/Internals.cpp:
710         (WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
711         null whenever frame() is not null.
712         (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
713         (WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
714         (WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
715         (WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
716         (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
717         * testing/Internals.h:
718         * testing/Internals.idl:
719
720 2013-04-12  Alberto Garcia  <agarcia@igalia.com>
721
722         [BlackBerry] Upstream the filesystem code
723         https://bugs.webkit.org/show_bug.cgi?id=114437
724
725         Reviewed by Rob Buis.
726
727         These are the changes for AsyncFileSystemBlackBerry.
728
729         This patch contains contributions from many members of the
730         BlackBerry WebKit team.
731
732         * platform/blackberry/AsyncFileSystemBlackBerry.cpp:
733         (WebCore::AsyncFileSystem::isAvailable):
734         (WebCore):
735         (WebCore::AsyncFileSystem::create):
736         (WebCore::AsyncFileSystem::openFileSystem):
737         (WebCore::AsyncFileSystemBlackBerry::openFileSystem):
738         (WebCore::AsyncFileSystem::deleteFileSystem):
739         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
740         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
741         (WebCore::AsyncFileSystemBlackBerry::move):
742         (WebCore::AsyncFileSystemBlackBerry::copy):
743         (WebCore::AsyncFileSystemBlackBerry::remove):
744         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
745         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
746         (WebCore::AsyncFileSystemBlackBerry::createFile):
747         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
748         (WebCore::AsyncFileSystemBlackBerry::fileExists):
749         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
750         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
751         (WebCore::AsyncFileSystemBlackBerry::createWriter):
752         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
753         (WebCore::AsyncFileSystemBlackBerry::fileSystemURLToPath):
754         * platform/blackberry/AsyncFileSystemBlackBerry.h:
755         (WTF):
756         (WTF::BlackBerry::Platform::WebFileSystem):
757         (WebCore::AsyncFileSystemBlackBerry::create):
758         (AsyncFileSystemBlackBerry):
759
760 2013-04-12  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
761
762         Apply our MSVC 2012 optimizer bug workaround to all minor releases
763         https://bugs.webkit.org/show_bug.cgi?id=114436
764
765         Reviewed by Alexey Proskuryakov.
766
767         The bug has only been partially fixed in Update 2 but our Update 1 workaround
768         still avoids the crash.
769
770         * platform/text/TextEncodingRegistry.cpp:
771         (WebCore::TextEncodingNameHash::equal):
772
773 2013-04-12  Mark Rowe  <mrowe@apple.com>
774
775         And again, with the correct case this time.
776
777         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
778
779 2013-04-12  Mark Rowe  <mrowe@apple.com>
780
781         Build fix.
782
783         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
784         Add missing #include and forward declaration.
785
786 2013-04-12  Zan Dobersek  <zdobersek@igalia.com>
787
788         Unreviewed functionality fix for ports enabling the MicroData feature.
789
790         * html/DOMSettableTokenList.idl: Add the SkipVTableValidation IDL attribute to the DOMSettableTokenList interface.
791         This removes crashes in the MicroData layout tests that are occurring on EFL and GTK builders, the two ports being
792         the only ports that enable this feature.
793
794 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
795
796         Move CachedRawResourceClient into a separate file
797         https://bugs.webkit.org/show_bug.cgi?id=114491
798
799         Reviewed by Mark Rowe.
800
801         * GNUmakefile.list.am:
802         * Target.pri:
803         * WebCore.vcproj/WebCore.vcproj:
804         * WebCore.vcxproj/WebCore.vcxproj:
805         * WebCore.vcxproj/WebCore.vcxproj.filters:
806         * WebCore.xcodeproj/project.pbxproj:
807         * loader/DocumentLoader.cpp:
808         * loader/DocumentLoader.h:
809         * loader/DocumentThreadableLoader.h:
810         * loader/archive/cf/LegacyWebArchive.cpp:
811         * loader/cache/CachedRawResource.cpp:
812         * loader/cache/CachedRawResource.h:
813         * loader/cache/CachedRawResourceClient.h: Added.
814         * loader/icon/IconLoader.h:
815         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
816
817 2013-04-12  Commit Queue  <rniwa@webkit.org>
818
819         Unreviewed, rolling out r148262.
820         http://trac.webkit.org/changeset/148262
821         https://bugs.webkit.org/show_bug.cgi?id=114493
822
823         Cairo dep should now build, rolling r148247 back in (Requested
824         by zdobersek on #webkit).
825
826         * platform/graphics/GraphicsContext.cpp:
827         (WebCore):
828         * platform/graphics/ImageBuffer.cpp:
829         (WebCore):
830         * platform/graphics/cairo/GLContext.h:
831         (GLContext):
832         * platform/graphics/cairo/GraphicsContextCairo.cpp:
833         (WebCore::GraphicsContext::isAcceleratedContext):
834         (WebCore):
835         * platform/graphics/cairo/ImageBufferCairo.cpp:
836         (WebCore::ImageBufferData::ImageBufferData):
837         (WebCore):
838         (WebCore::createCairoGLSurface):
839         (WebCore::ImageBuffer::ImageBuffer):
840         (WebCore::ImageBuffer::platformTransformColorSpace):
841         (WebCore::mapSurfaceToImage):
842         (WebCore::unmapSurfaceFromImage):
843         (WebCore::getImageData):
844         (WebCore::ImageBuffer::putByteArray):
845         (WebCore::ImageBufferData::paintToTextureMapper):
846         (WebCore::ImageBuffer::platformLayer):
847         * platform/graphics/cairo/ImageBufferDataCairo.h:
848         (ImageBufferData):
849         * platform/graphics/egl/GLContextEGL.cpp:
850         (WebCore::GLContextEGL::GLContextEGL):
851         (WebCore::GLContextEGL::~GLContextEGL):
852         (WebCore::GLContextEGL::cairoDevice):
853         (WebCore):
854         * platform/graphics/egl/GLContextEGL.h:
855         * platform/graphics/glx/GLContextGLX.cpp:
856         (WebCore::GLContextGLX::GLContextGLX):
857         (WebCore::GLContextGLX::~GLContextGLX):
858         (WebCore::GLContextGLX::cairoDevice):
859         (WebCore):
860         * platform/graphics/glx/GLContextGLX.h:
861         (GLContextGLX):
862
863 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
864
865         Reduce includes of CachedSVGDocument.h
866         https://bugs.webkit.org/show_bug.cgi?id=114489
867
868         Reviewed by Jon Honeycutt.
869
870         * loader/cache/CachedSVGDocumentReference.cpp: Added.
871         * loader/cache/CachedSVGDocumentReference.h:
872         Moved function implementations to newly added .cpp file, and removed an include
873         of CachedSVGDocument.h.
874
875         * css/WebKitCSSSVGDocumentValue.h: Just removed an unnecessary include.
876
877         * CMakeLists.txt:
878         * GNUmakefile.list.am:
879         * Target.pri:
880         * WebCore.vcproj/WebCore.vcproj:
881         * WebCore.vcxproj/WebCore.vcxproj:
882         * WebCore.vcxproj/WebCore.vcxproj.filters:
883         * WebCore.xcodeproj/project.pbxproj:
884
885 2013-04-11  Commit Queue  <rniwa@webkit.org>
886
887         Unreviewed, rolling out r148247.
888         http://trac.webkit.org/changeset/148247
889         https://bugs.webkit.org/show_bug.cgi?id=114490
890
891         Cairo dep fails to build on builders due to missing EGL
892         headers (Requested by zdobersek on #webkit).
893
894         * platform/graphics/GraphicsContext.cpp:
895         (WebCore):
896         * platform/graphics/ImageBuffer.cpp:
897         (WebCore):
898         * platform/graphics/cairo/GLContext.h:
899         (GLContext):
900         * platform/graphics/cairo/GraphicsContextCairo.cpp:
901         * platform/graphics/cairo/ImageBufferCairo.cpp:
902         (WebCore::ImageBufferData::ImageBufferData):
903         (WebCore::ImageBuffer::ImageBuffer):
904         (WebCore::ImageBuffer::platformTransformColorSpace):
905         (WebCore::getImageData):
906         (WebCore::ImageBuffer::putByteArray):
907         (WebCore):
908         * platform/graphics/cairo/ImageBufferDataCairo.h:
909         (ImageBufferData):
910         * platform/graphics/egl/GLContextEGL.cpp:
911         (WebCore::GLContextEGL::GLContextEGL):
912         (WebCore::GLContextEGL::~GLContextEGL):
913         * platform/graphics/egl/GLContextEGL.h:
914         * platform/graphics/glx/GLContextGLX.cpp:
915         (WebCore::GLContextGLX::GLContextGLX):
916         (WebCore::GLContextGLX::~GLContextGLX):
917         * platform/graphics/glx/GLContextGLX.h:
918         (GLContextGLX):
919
920 2013-04-11  Nico Weber  <thakis@chromium.org>
921
922         Remove debugging code that is no longer used with current mac sdks.
923         https://bugs.webkit.org/show_bug.cgi?id=114486
924
925         Reviewed by Dan Bernstein.
926
927         This code compared __MAC_OS_X_VERSION_MAX_ALLOWED and friends to
928         107 and 106 instead of the correct 1070 and 1060. Instead of fixing
929         this, rip the code out completely: Since WebKit now only targets
930         current systems, the ifdef is always false anyways.
931
932         No tests, as this only removes debugging code.
933
934         * platform/graphics/mac/SimpleFontDataMac.mm:
935         (WebCore::SimpleFontData::platformInit):
936
937 2013-04-11  Oliver Hunt  <oliver@apple.com>
938
939         Fix windows build and land new binding test results
940
941         * bindings/scripts/CodeGeneratorJS.pm:
942         (GenerateImplementation):
943         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
944         (WebCore):
945         (WebCore::toJS):
946         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
947         (WebCore):
948         (WebCore::toJS):
949         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
950         (WebCore):
951         (WebCore::toJS):
952         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
953         (WebCore):
954         (WebCore::toJS):
955         * bindings/scripts/test/JS/JSTestException.cpp:
956         (WebCore):
957         (WebCore::toJS):
958         * bindings/scripts/test/JS/JSTestInterface.cpp:
959         (WebCore):
960         (WebCore::toJS):
961         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
962         (WebCore):
963         (WebCore::toJS):
964         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
965         (WebCore):
966         (WebCore::toJS):
967         * bindings/scripts/test/JS/JSTestObj.cpp:
968         (WebCore):
969         (WebCore::toJS):
970         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
971         (WebCore):
972         (WebCore::toJS):
973         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
974         (WebCore):
975         (WebCore::toJS):
976         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
977         (WebCore):
978         (WebCore::toJS):
979
980 2013-04-11  Shezan Baig  <sbaig1@bloomberg.net>
981
982         Selection gaps don't repaint correctly with transforms
983         https://bugs.webkit.org/show_bug.cgi?id=111000
984
985         Reviewed by Simon Fraser.
986
987         When computing offsetFromRepaintContainer, we need to add UseTransforms
988         to the MapCoordinateFlags argument. Note that ApplyContainerFlip is
989         the default value for the flag, so this change effectively only adds
990         the UseTransforms flag.
991
992         Tests: fast/repaint/selection-gap-absolute-child.html
993                fast/repaint/selection-gap-fixed-child.html
994                fast/repaint/selection-gap-flipped-absolute-child.html
995                fast/repaint/selection-gap-flipped-fixed-child.html
996                fast/repaint/selection-gap-transformed-absolute-child.html
997                fast/repaint/selection-gap-transformed-fixed-child.html
998
999         * rendering/RenderBlock.cpp:
1000         (WebCore::RenderBlock::selectionGapRectsForRepaint):
1001
1002 2013-04-11  Oliver Hunt  <oliver@apple.com>
1003
1004         Add more type validation to debug builds
1005         https://bugs.webkit.org/show_bug.cgi?id=114478
1006
1007         Reviewed by Mark Hahnenberg.
1008
1009         Add a bunch more type checks to the JS DOM bindings.
1010
1011         * Modules/mediastream/MediaStream.idl:
1012         * Modules/webaudio/AudioDestinationNode.idl:
1013         * WebCore.xcodeproj/project.pbxproj:
1014         * bindings/js/JSDOMBinding.h:
1015         (WebCore::getExistingWrapper):
1016         (WebCore):
1017         (WebCore::createNewWrapper):
1018         * bindings/scripts/CodeGeneratorJS.pm:
1019         (GetNativeTypeForConversions):
1020         (GetGnuVTableRefForInterface):
1021         (GetGnuVTableNameForInterface):
1022         (GetGnuMangledNameForInterface):
1023         (GetGnuVTableOffsetForType):
1024         (GetWinVTableRefForInterface):
1025         (GetWinVTableNameForInterface):
1026         (GetWinMangledNameForInterface):
1027         (GetNamespaceForInterface):
1028         (GetImplementationLacksVTableForInterface):
1029         (GetSkipVTableValidationForInterface):
1030         (GenerateImplementation):
1031         * bindings/scripts/IDLAttributes.txt:
1032         * css/CSSRuleList.idl:
1033         * css/CSSStyleDeclaration.idl:
1034         * dom/Clipboard.idl:
1035         * dom/DOMStringMap.idl:
1036         * dom/MutationRecord.idl:
1037         * dom/NodeList.idl:
1038         * html/DOMTokenList.idl:
1039         * html/track/TextTrack.idl:
1040         * inspector/ScriptProfileNode.idl:
1041         * storage/Storage.idl:
1042         * xml/XPathNSResolver.idl:
1043
1044 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
1045
1046         Remove ResourceLoadInfo
1047         https://bugs.webkit.org/show_bug.cgi?id=113302
1048
1049         Reviewed by Benjamin Poulain.
1050
1051         Co-authored by Christophe Dumez.
1052
1053         Removed ResourceLoadInfo since it had been only used by Chromium port.
1054
1055         * GNUmakefile.list.am:
1056         * Target.pri:
1057         * WebCore.order:
1058         * WebCore.vcproj/WebCore.vcproj:
1059         * WebCore.vcxproj/WebCore.vcxproj:
1060         * WebCore.vcxproj/WebCore.vcxproj.filters:
1061         * WebCore.xcodeproj/project.pbxproj:
1062         * inspector/InspectorResourceAgent.cpp:
1063         (WebCore::buildObjectForResourceResponse):
1064         * loader/FrameLoader.cpp:
1065         (WebCore::FrameLoader::loadResourceSynchronously):
1066         * platform/network/ResourceLoadInfo.h: Removed.
1067         * platform/network/ResourceResponseBase.cpp:
1068         (WebCore):
1069         (WebCore::ResourceResponseBase::reportMemoryUsage):
1070         * platform/network/ResourceResponseBase.h:
1071         (ResourceResponseBase):
1072
1073 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
1074
1075         Another Mac Lion build fix attempt after r148197.
1076
1077         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
1078
1079 2013-04-11  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1080
1081         Unable to paste twice in input field when specific CSS present
1082         https://bugs.webkit.org/show_bug.cgi?id=108675
1083
1084         Reviewed by Ryosuke Niwa.
1085
1086         When we are pre-rendering text in ReplaceSelectionCommand, we shouldn't care
1087         whether the content is clipped by its ancestors or not. This bug was caused
1088         by the fact the plainText() method returned an empty string because the text
1089         was fully clipped by its ancestors. Make plainText ignore style visibility.
1090
1091         Test: editing/inserting/insert-text-into-text-field.html
1092
1093         * editing/ReplaceSelectionCommand.cpp:
1094         (WebCore::ReplacementFragment::ReplacementFragment):
1095
1096 2013-04-11  Martin Robinson  <mrobinson@igalia.com>
1097
1098         [GTK] Add accelerated 2D canvas support using cairo-gl
1099         https://bugs.webkit.org/show_bug.cgi?id=104672
1100
1101         Reviewed by Alejandro G. Castro.
1102
1103         No new tests. We do not yet have the ability to run tests against
1104         accelerated content.
1105
1106         * platform/graphics/GraphicsContext.cpp:
1107         (WebCore): We don't use the stub implementation of isAcceleratedContext any longer.
1108         * platform/graphics/ImageBuffer.cpp:
1109         (WebCore): Ditto for ImageBuffer::platformLayer.
1110         * platform/graphics/cairo/GLContext.h:
1111         (GLContext): Added method to get a cairo_device_t from the context.
1112         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1113         (WebCore::GraphicsContext::isAcceleratedContext): Return true when we are a CairoGL surface.
1114         * platform/graphics/cairo/ImageBufferCairo.cpp:
1115         (WebCore::ImageBufferData::ImageBufferData): Initialize the size and the texture to 0.
1116         (WebCore::createCairoGLSurface): Added this helper.
1117         (WebCore::ImageBuffer::ImageBuffer): When we are in accelerated rendering mode, create
1118         a CairoGL surface.
1119         (WebCore::ImageBuffer::platformTransformColorSpace): Do not implement this for accelerated
1120         contexts yet.
1121         (WebCore::mapSurfaceToImage): Added this helper, since we don't require Cairo 1.12 yet,
1122         which provides an builtin implementation.
1123         (WebCore::unmapSurfaceFromImage): Ditto.
1124         (WebCore::getImageData): Map the surface to an image surface first.
1125         (WebCore::ImageBuffer::putByteArray): Ditto.
1126         (WebCore::ImageBufferData::paintToTextureMapper): Connect the accelerated canvas into the
1127         TextureMapper infrastructure.
1128         (WebCore::ImageBuffer::platformLayer): This lets the TextureMapper at the ImageBufferData.
1129         * platform/graphics/cairo/ImageBufferDataCairo.h:
1130         (ImageBufferData): Subclass TexturMapperPlatformLayer where appropriate.
1131         * platform/graphics/egl/GLContextEGL.cpp: Added implementation of cairoDevice.
1132         * platform/graphics/egl/GLContextEGL.h: Ditto.
1133         * platform/graphics/glx/GLContextGLX.cpp: Ditto
1134         * platform/graphics/glx/GLContextGLX.h: Ditto.
1135
1136 2013-04-11  Anders Carlsson  <andersca@apple.com>
1137
1138         Implement removing storage area items
1139         https://bugs.webkit.org/show_bug.cgi?id=114472
1140
1141         Reviewed by Beth Dakin.
1142
1143         Export StorageMap::removeItem.
1144
1145         * WebCore.exp.in:
1146
1147 2013-04-11  Brendan Long  <b.long@cablelabs.com>
1148
1149         TextTrackList's .onremovetrack is missing from IDL
1150         https://bugs.webkit.org/show_bug.cgi?id=103421
1151
1152         Reviewed by Eric Carlson.
1153
1154         Fixed test media/track/opera/interfaces/TextTrackList/onremovetrack.html
1155
1156         * html/track/TextTrackList.cpp:
1157         (TextTrackList::remove):
1158         (TextTrackList::scheduleRemoveTrackEvent):
1159         * html/track/TextTrackList.h:
1160         (TextTrackList):
1161         * html/track/TextTrackList.idl:
1162
1163 2013-04-11  Alberto Garcia  <agarcia@igalia.com>
1164
1165         [BlackBerry] Upstream the filesystem code
1166         https://bugs.webkit.org/show_bug.cgi?id=114437
1167
1168         Reviewed by Rob Buis.
1169
1170         This patch contains contributions from many members of the
1171         BlackBerry WebKit team.
1172
1173         * platform/blackberry/AsyncFileWriterBlackBerry.cpp: Added.
1174         (WebCore):
1175         (WebCore::AsyncFileWriterBlackBerry::write):
1176         * platform/blackberry/AsyncFileWriterBlackBerry.h: Added.
1177         (WTF):
1178         (WTF::BlackBerry::Platform::WebFileWriter):
1179         (WebCore):
1180         * platform/blackberry/DOMFileSystemBlackBerry.cpp: Added.
1181         (WebCore):
1182         (WebCore::DOMFileSystemBase::createFileSystemURL):
1183         (WebCore::DOMFileSystemBase::crackFileSystemURL):
1184         (WebCore::DOMFileSystemBase::supportsToURL):
1185         (WebCore::DOMFileSystemBase::isValidType):
1186         * platform/blackberry/LocalFileSystemBlackBerry.cpp: Added.
1187         (WebCore):
1188         (WebCore::fileSystemTypeString):
1189         (WebCore::openFileSystem):
1190         (WebCore::LocalFileSystem::deleteFileSystem):
1191         (WebCore::LocalFileSystem::readFileSystem):
1192         (WebCore::LocalFileSystem::requestFileSystem):
1193         * platform/blackberry/PlatformAsyncFileSystemCallbacks.cpp: Added.
1194         (WebCore):
1195         (WebCore::PlatformAsyncFileSystemCallbacks::notifyOpenFileSystem):
1196         (WebCore::PlatformAsyncFileSystemCallbacks::notifySucceed):
1197         (WebCore::PlatformAsyncFileSystemCallbacks::notifyFail):
1198         (WebCore::getFileMetadata):
1199         (WebCore::PlatformAsyncFileSystemCallbacks::notifyReadMetadata):
1200         (WebCore::PlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata):
1201         (WebCore::PlatformAsyncFileSystemCallbacks::notifyReadDirectory):
1202         (WebCore::PlatformAsyncFileSystemCallbacks::notifyCreateFileWriter):
1203         (WebCore::PlatformAsyncFileSystemCallbacks::createAsyncFileSystem):
1204         (WebCore::PlatformAsyncFileSystemCallbacks::createAsyncFileWriter):
1205         (WebCore::PlatformAsyncFileSystemCallbacks::deleteMe):
1206         * platform/blackberry/PlatformAsyncFileSystemCallbacks.h: Added.
1207         (WebCore):
1208         * platform/blackberry/PlatformBlob.cpp: Added.
1209         (WebCore):
1210         (WebCore::PlatformBlob::nextDataItem):
1211         * platform/blackberry/PlatformBlob.h: Added.
1212         (WebCore):
1213         * platform/blackberry/PlatformFileWriterClient.cpp: Added.
1214         (WebCore):
1215         (WebCore::PlatformFileWriterClient::notifyWrite):
1216         (WebCore::PlatformFileWriterClient::notifyTruncate):
1217         (WebCore::PlatformFileWriterClient::notifyFail):
1218         * platform/blackberry/PlatformFileWriterClient.h: Added.
1219         (WebCore):
1220         (WTF):
1221         (WTF::WebCore::PlatformFileWriterClient):
1222         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp: Added.
1223         (WebCore):
1224         (WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
1225         (WebCore::WorkerAsyncFileSystemBlackBerry::~WorkerAsyncFileSystemBlackBerry):
1226         (WebCore::WorkerAsyncFileSystemBlackBerry::waitForOperationToComplete):
1227         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread):
1228         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread):
1229         (WebCore::WorkerAsyncFileSystemBlackBerry::moveOnMainThread):
1230         (WebCore::WorkerAsyncFileSystemBlackBerry::copyOnMainThread):
1231         (WebCore::WorkerAsyncFileSystemBlackBerry::removeOnMainThread):
1232         (WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread):
1233         (WebCore::WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread):
1234         (WebCore::WorkerAsyncFileSystemBlackBerry::createFileOnMainThread):
1235         (WebCore::WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread):
1236         (WebCore::WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread):
1237         (WebCore::WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread):
1238         (WebCore::WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread):
1239         (WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread):
1240         (WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread):
1241         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
1242         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
1243         (WebCore::WorkerAsyncFileSystemBlackBerry::move):
1244         (WebCore::WorkerAsyncFileSystemBlackBerry::copy):
1245         (WebCore::WorkerAsyncFileSystemBlackBerry::remove):
1246         (WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursively):
1247         (WebCore::WorkerAsyncFileSystemBlackBerry::readMetadata):
1248         (WebCore::WorkerAsyncFileSystemBlackBerry::createFile):
1249         (WebCore::WorkerAsyncFileSystemBlackBerry::createDirectory):
1250         (WebCore::WorkerAsyncFileSystemBlackBerry::fileExists):
1251         (WebCore::WorkerAsyncFileSystemBlackBerry::directoryExists):
1252         (WebCore::WorkerAsyncFileSystemBlackBerry::readDirectory):
1253         (WebCore::WorkerAsyncFileSystemBlackBerry::createWriter):
1254         (WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
1255         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.h: Added.
1256         (WebCore):
1257         (WorkerAsyncFileSystemBlackBerry):
1258         (WebCore::WorkerAsyncFileSystemBlackBerry::create):
1259         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.cpp: Added.
1260         (WebCore):
1261         (WebCore::WorkerAsyncFileWriterBlackBerry::writeOnMainThread):
1262         (WebCore::WorkerAsyncFileWriterBlackBerry::truncateOnMainThread):
1263         (WebCore::WorkerAsyncFileWriterBlackBerry::abortOnMainThread):
1264         (WebCore::WorkerAsyncFileWriterBlackBerry::write):
1265         (WebCore::WorkerAsyncFileWriterBlackBerry::truncate):
1266         (WebCore::WorkerAsyncFileWriterBlackBerry::abort):
1267         (WebCore::WorkerAsyncFileWriterBlackBerry::waitForOperationToComplete):
1268         (WebCore::WorkerAsyncFileWriterBlackBerry::platformWriterClient):
1269         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.h: Added.
1270         (WebCore):
1271         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp: Added.
1272         (WebCore):
1273         (WebCore::performTaskOnMainThread):
1274         (WebCore::postTaskToMainThread):
1275         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyStop):
1276         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyOpenFileSystem):
1277         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifySucceed):
1278         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyFail):
1279         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadMetadata):
1280         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectory):
1281         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateFileWriter):
1282         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::createAsyncFileSystem):
1283         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::createAsyncFileWriter):
1284         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::deleteMe):
1285         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
1286         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyOpenFileSystemOnWorkerThread):
1287         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifySucceedOnWorkerThread):
1288         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyFailOnWorkerThread):
1289         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadMetadataOnWorkerThread):
1290         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectoryEntryOnWorkerThread):
1291         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateFileWriterOnWorkerThread):
1292         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h: Added.
1293         (WebCore):
1294         * platform/blackberry/WorkerPlatformFileWriterClient.cpp: Added.
1295         (WebCore):
1296         (WebCore::WorkerPlatformFileWriterClient::notifyWriteOnWorkerThread):
1297         (WebCore::WorkerPlatformFileWriterClient::notifyFailOnWorkerThread):
1298         (WebCore::WorkerPlatformFileWriterClient::notifyTruncateOnWorkerThread):
1299         (WebCore::WorkerPlatformFileWriterClient::notifyWrite):
1300         (WebCore::WorkerPlatformFileWriterClient::notifyTruncate):
1301         (WebCore::WorkerPlatformFileWriterClient::notifyFail):
1302         (WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
1303         * platform/blackberry/WorkerPlatformFileWriterClient.h: Added.
1304         (WebCore):
1305         (WTF):
1306         (WTF::WebCore::WorkerPlatformFileWriterClient):
1307
1308 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
1309
1310         Mac Lion build fix attempt after r148197.
1311
1312         * page/scrolling/mac/ScrollingStateNodeMac.mm:
1313
1314 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
1315
1316         <rdar://problem/10416316> [Mac] WebSocket doesn't work with authenticating proxies
1317         https://bugs.webkit.org/show_bug.cgi?id=114464
1318
1319         Reviewed by Brady Eidson.
1320
1321         * platform/mac/WebCoreSystemInterface.h:
1322         * platform/mac/WebCoreSystemInterface.mm:
1323         Updated for new wkCopyCONNECTProxyResponse signature.
1324
1325         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1326         (WebCore::SocketStreamHandle::executePACFileURL): Fixed a typo in a comment.
1327         (WebCore::SocketStreamHandle::addCONNECTCredentials): Don't crash even if the rest
1328         of the fix didn't work (which would be the case on some OS versions).
1329         (WebCore::SocketStreamHandle::readStreamCallback): Replaced most breaks with returns,
1330         because breaks were confusing in such a huge switch. Changed null proxyResponse
1331         to not be treated as authentication success, because it's not. Merged two parts
1332         of WaitingForConnect state handling for clarity.
1333         (WebCore::SocketStreamHandle::writeStreamCallback): Don't blindly assume that we
1334         can start WebSocket handshake after kCFStreamEventCanAcceptBytes. Perhaps it's
1335         nothing but a failed CONNECT, and a read callback still needs to send authentication.
1336         Without this, establishing connections was flaky. Added a check for Closed state,
1337         matching read callback.
1338
1339 2013-04-11  Sukolsak Sakshuwong  <sukolsak@gmail.com>
1340
1341         MutationRecord is not exposed
1342         https://bugs.webkit.org/show_bug.cgi?id=114288
1343
1344         Reviewed by Darin Adler.
1345
1346         Expose MutationRecord on DOMWindow. This patch is copied from a patch
1347         by Adam Klein. https://codereview.chromium.org/13861028
1348
1349         Test: fast/dom/MutationObserver/mutation-record-constructor.html
1350
1351         * page/DOMWindow.idl:
1352
1353 2013-04-11  Beth Dakin  <bdakin@apple.com>
1354
1355         Cannot scroll to footer on a page with overflow:hidden on the body
1356         https://bugs.webkit.org/show_bug.cgi?id=114462
1357         -and corresponding-
1358         <rdar://problem/13530042>
1359
1360         Reviewed by Simon Fraser.
1361
1362         Add a new scenario in which we want to overrideHidden -- whenever we are the 
1363         mainFrame and there is a header or footer.
1364
1365         * page/FrameView.cpp:
1366         (WebCore::FrameView::applyOverflowToViewport):
1367
1368 2013-04-11  Commit Queue  <rniwa@webkit.org>
1369
1370         Unreviewed, rolling out r148034, r148052, r148097, and
1371         r148194.
1372         http://trac.webkit.org/changeset/148034
1373         http://trac.webkit.org/changeset/148052
1374         http://trac.webkit.org/changeset/148097
1375         http://trac.webkit.org/changeset/148194
1376         https://bugs.webkit.org/show_bug.cgi?id=114463
1377
1378         broke mutiresolution favicons, among other things (Requested
1379         by thorton on #webkit).
1380
1381         * loader/icon/IconDatabase.cpp:
1382         (WebCore::IconDatabase::setIconDataForIconURL):
1383         * loader/icon/IconDatabase.h:
1384         (IconDatabase):
1385         * loader/icon/IconDatabaseBase.h:
1386         * loader/icon/IconRecord.cpp:
1387         * loader/icon/IconRecord.h:
1388         (IconRecord):
1389
1390 2013-04-11  ChangSeok Oh  <changseok.oh@collabora.com>
1391
1392         [GTK][AC] Implement GraphicsLayerClutter::moveOrCopyAnimations
1393         https://bugs.webkit.org/show_bug.cgi?id=114019
1394
1395         Reviewed by Gustavo Noronha Silva.
1396
1397         Fill moveOrCopyAnimations that is based on Mac port implementation.
1398
1399         Tests: animations/3d/change-transform-in-end-event.html
1400                animations/3d/transform-origin-vs-functions.html
1401                compositing/animation/state-at-end-event-transform-layer.html
1402
1403         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1404         (WebCore::GraphicsLayerClutter::moveOrCopyLayerAnimation):
1405         (WebCore):
1406         (WebCore::GraphicsLayerClutter::moveOrCopyAnimations):
1407         * platform/graphics/clutter/GraphicsLayerClutter.h:
1408
1409 2013-04-11  Anders Carlsson  <andersca@apple.com>
1410
1411         Implement StorageManager::getValues
1412         https://bugs.webkit.org/show_bug.cgi?id=114461
1413
1414         Reviewed by Beth Dakin.
1415
1416         Expose the item hash map.
1417
1418         * storage/StorageMap.h:
1419         (WebCore::StorageMap::items):
1420
1421 2013-04-11  Eli Fidler  <efidler@blackberry.com>
1422
1423         [BlackBerry] Use the platform list of languages with fonts instead of hardcoding
1424         https://bugs.webkit.org/show_bug.cgi?id=114452
1425
1426         Reviewed by Rob Buis.
1427
1428         BlackBerry PR 325244
1429         Internally reviewed by Jeff Rogers
1430
1431         No functional change, but platform font changes won't need a WebKit change
1432         going forward.
1433
1434         * page/blackberry/SettingsBlackBerry.cpp:
1435         (WebCore::Settings::initializeDefaultFontFamilies):
1436
1437 2013-04-11  Dirk Schulze  <krit@webkit.org>
1438
1439         [CSS Shaders] Parse parameters descriptor
1440         https://bugs.webkit.org/show_bug.cgi?id=114455
1441
1442         Reviewed by Dean Jackson.
1443
1444         Add support for the 'parameters' descriptor in the filter at-rule to support
1445         parameterization of CSS Shaders.
1446
1447         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-parameters
1448
1449         Tests: css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html
1450                css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html
1451
1452         * css/CSSComputedStyleDeclaration.cpp:
1453         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1454         * css/CSSParser.cpp: Added 'parameters' property and fail parsing if not inside
1455             of an @filter rule.
1456         (WebCore::CSSParser::parseValue):
1457         (WebCore::CSSParser::parseFilterRuleParameters): New helper function to verify
1458             values.
1459         (WebCore):
1460         * css/CSSParser.h:
1461         * css/CSSProperty.cpp:
1462         (WebCore::CSSProperty::isInheritedProperty):
1463         * css/CSSPropertyNames.in: Added new property name 'parameters'.
1464         * css/StyleResolver.cpp:
1465         (WebCore::StyleResolver::applyProperty):
1466
1467 2013-04-11  Arunprasad Rajkumar  <arunprasadr@nds.com>
1468
1469         Default Implementation of toString for NPObject shouldn't return NPClass & NPObject address as String
1470         https://bugs.webkit.org/show_bug.cgi?id=114450
1471
1472         Reviewed by Anders Carlsson.
1473
1474         * bridge/c/c_instance.cpp:
1475         (JSC::Bindings::CInstance::stringValue):
1476
1477 2013-04-11  Robert Hogan  <robert@webkit.org>
1478
1479         REGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespace to ignore after leading empty inlines
1480         https://bugs.webkit.org/show_bug.cgi?id=114311
1481
1482         Reviewed by Emil A Eklund.
1483
1484         When we hit an empty inline in line layout and try to detect whether it has any whitespace after it that we ought to ignore, then
1485         we need to skip past out-of-flow and floating objects when looking for that whitespace. Failure to do so will result in us
1486         adding the width from the first space we encounter to our line width and over-estimating the real width of the line.
1487
1488         We're hitting this bug now because we have broadened the category of empty inlines that get lineboxes so we go into line layout 
1489         and have to deal with them and their subsequent whitespace there. Previously this sort of whitespace would have been simply
1490         consumed by |skipLeadingWhitespace|.
1491
1492         Test: fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html
1493
1494         * rendering/RenderBlockLineLayout.cpp:
1495         (WebCore::shouldSkipWhitespaceAfterStartObject):
1496
1497 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
1498
1499         Autocorrected text doesn't have a marker of type autocorrected
1500         https://bugs.webkit.org/show_bug.cgi?id=114337
1501
1502         Reviewed by Darin Adler.
1503
1504         The bug was caused by markAndReplaceFor's text replacement errornously assuming that there are
1505         no other text checking result starting at the same offset. That resulted in us adjusting location
1506         offsets of the subsequent results pointing at the replaced text, hit an assertion, and blow up.
1507
1508         Fixed the bug by skipping all remaining results for the replaced text since they're no longer
1509         applicable.
1510
1511         Tests: Existing autocorection tests have been updated to assert new behavior.
1512
1513         * editing/Editor.cpp:
1514         (WebCore::Editor::markAndReplaceFor):
1515
1516 2013-04-11  Michelangelo De Simone  <michelangelo@webkit.org>
1517
1518         [CSS Shaders] Parse the geometry descriptor
1519         https://bugs.webkit.org/show_bug.cgi?id=110815
1520
1521         Added initial parsing for the "geometry" descriptor, as per specification:
1522         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#geometry
1523         This descriptor allows to specify the mesh geometry for custom filters.
1524
1525         Reviewed by Dirk Schulze.
1526
1527         Tests: css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html
1528                css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html
1529
1530         * css/CSSComputedStyleDeclaration.cpp:
1531         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1532         * css/CSSParser.cpp:
1533         (WebCore::CSSParser::parseValue):
1534         (WebCore::CSSParser::parseGeometry): New method that parses the geometry
1535         descriptor (grid()).
1536         (WebCore):
1537         * css/CSSParser.h:
1538         * css/CSSProperty.cpp:
1539         (WebCore::CSSProperty::isInheritedProperty):
1540         * css/CSSPropertyNames.in: Added conditional "geometry" property.
1541         * css/CSSValueKeywords.in: Added conditional "attached" value keyword; detached
1542         was already there.
1543
1544 2013-04-11  Anders Carlsson  <andersca@apple.com>
1545
1546         Make StorageAreaMap dispatch session storage events
1547         https://bugs.webkit.org/show_bug.cgi?id=114454
1548
1549         Reviewed by Beth Dakin.
1550
1551         Export storage symbols and headers needed by WebKit2.
1552
1553         * WebCore.exp.in:
1554         * WebCore.xcodeproj/project.pbxproj:
1555
1556 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1557
1558         handleMouseMoveEvent should let hit-testing hit-test scrollbars
1559         https://bugs.webkit.org/show_bug.cgi?id=114430
1560
1561         Reviewed by Antonio Gomes.
1562
1563         Allow hit-testing to hit-test frame scrollbars so handleMouseMoveEvent
1564         does not have to do it itself.
1565
1566         * page/EventHandler.cpp:
1567         (WebCore::EventHandler::handleMouseMoveEvent):
1568
1569 2013-04-11  Brian Holt  <brian.holt@samsung.com>
1570
1571         [Gtk] Combo boxes should be arrow-out-of-able similar to list boxes when caret-browsing is enabled.
1572         https://bugs.webkit.org/show_bug.cgi?id=76796
1573
1574         Reviewed by Chris Fleizach.
1575
1576         When using caret-browsing with the right and left arrows, the
1577         behaviour of menuLists should be the same as listBoxes. This means
1578         not default-handling the event and passing it up the stack instead.
1579
1580         * html/HTMLSelectElement.cpp:
1581         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1582
1583 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
1584
1585         Remove some ResourceHandle.h includes
1586         https://bugs.webkit.org/show_bug.cgi?id=114416
1587
1588         Reviewed by Ryosuke Niwa.
1589
1590         * loader/CrossOriginAccessControl.h:
1591         * loader/CrossOriginPreflightResultCache.h:
1592         These files don't need ResourceHandle.h, just ResourceHandleTypes.h.
1593
1594         * loader/TextTrackLoader.cpp:
1595         * loader/ThreadableLoader.h:
1596         * loader/appcache/ApplicationCacheGroup.h:
1597         * loader/cache/MemoryCache.h:
1598         * loader/mac/ResourceLoaderMac.mm:
1599         * page/Settings.cpp:
1600         * platform/network/AuthenticationChallengeBase.cpp:
1601         * platform/network/cf/CookieJarCFNet.cpp:
1602         * platform/network/cf/ResourceRequestCFNet.cpp:
1603         * xml/XSLTProcessorLibxslt.cpp:
1604         * xml/parser/XMLDocumentParser.cpp:
1605         * xml/parser/XMLDocumentParserLibxml2.cpp:
1606         Just straightforward removal of includes.
1607
1608 2013-04-04  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1609
1610         Use CSS4 image-rendering to determing image scaling quality
1611         https://bugs.webkit.org/show_bug.cgi?id=113405
1612
1613         Reviewed by Simon Fraser.
1614
1615         Implement the new CSS4 image-rendering property values.
1616
1617         Image scaling now uses low-quality (pixelated) scaling for
1618         crisp-edges, pixelated and optimizeSpeed values, and always
1619         use high quality (smooth) scaling for -webkit-smooth and
1620         optimizeQuality. The latter can be used to disable low quality
1621         scaling during CSS animations or live resizing.
1622
1623         The new values are protected with a new CSS4_IMAGES feature, but
1624         the crisp-edge value has been introduced before to displace the
1625         deprecated -webkit-optimize-contrast value, and optimizeSpeed
1626         and optimizeQuality values are supported for SVG compatibility.
1627
1628         * css/CSSParser.cpp:
1629         (WebCore::isValidKeywordPropertyAndValue):
1630         * css/CSSPrimitiveValueMappings.h:
1631         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1632         (WebCore::CSSPrimitiveValue::operator EImageRendering):
1633         * css/CSSValueKeywords.in:
1634         * rendering/RenderBoxModelObject.cpp:
1635         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1636         * rendering/RenderHTMLCanvas.cpp:
1637         (WebCore::RenderHTMLCanvas::paintReplaced):
1638         * rendering/style/RenderStyleConstants.h:
1639
1640 2013-04-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1641
1642         Build fix: use of uninitialized variable in ScrollingStateTree
1643         https://bugs.webkit.org/show_bug.cgi?id=114443
1644
1645         Reviewed by Anders Carlsson.
1646
1647         Initialize pointer to zero before use, fixes build.
1648         No new tests, no changes on behavior.
1649
1650         * page/scrolling/ScrollingStateTree.cpp:
1651         (WebCore::ScrollingStateTree::attachNode):
1652
1653 2013-04-11  Dirk Schulze  <krit@webkit.org>
1654
1655         [CSS Shaders] Parse mix descriptor
1656         https://bugs.webkit.org/show_bug.cgi?id=114414
1657
1658         Reviewed by Antti Koivisto.
1659
1660         Add support for the 'mix' descriptor in the filter at-rule to support blend modes
1661         and composite operators in CSS Shaders.
1662         Each pixel in the fragment shader will be blended and composited with the
1663         backdrop by taking these values into account.
1664
1665         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-mix
1666
1667         Tests: css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html
1668                css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html
1669
1670         * css/CSSComputedStyleDeclaration.cpp:
1671         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1672         * css/CSSParser.cpp: Added 'mix' property and fail parsing if not inside
1673             of an @filter rule.
1674         (WebCore::CSSParser::parseValue):
1675         (WebCore::CSSParser::parseFilterRuleMix): New helper function to verify
1676             values.
1677         (WebCore):
1678         * css/CSSParser.h:
1679         * css/CSSProperty.cpp:
1680         (WebCore::CSSProperty::isInheritedProperty):
1681         * css/CSSPropertyNames.in: Added new property name 'mix'.
1682         * css/StyleResolver.cpp:
1683         (WebCore::StyleResolver::applyProperty):
1684
1685 2013-04-11  Zalan Bujtas  <zalan@apple.com>
1686
1687         Parent box with background-size auto and gradient image does not get properly repainted when child box is resized. 
1688         https://bugs.webkit.org/show_bug.cgi?id=114424
1689
1690         Reviewed by Antti Koivisto.
1691         
1692         Initiate full repaint on fill layer, when the image is generated and the background
1693         property defines auto size.
1694         http://www.w3.org/TR/css3-background/#background-size
1695         'If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for 'contain'.'
1696
1697         Extended fast/repaint/background-shorthand-with-gradient-and-height-changes.html
1698         to cover this case too.
1699
1700         * rendering/RenderObject.cpp:
1701         (WebCore::mustRepaintFillLayers):
1702
1703 2013-04-11  ChangSeok Oh  <changseok.oh@collabora.com>
1704
1705         [GTK][AC] use a smart pointer for GList and ClutterCanvas
1706         https://bugs.webkit.org/show_bug.cgi?id=114057
1707
1708         Reviewed by Gustavo Noronha Silva.
1709
1710         We can make simple code & prevent possible memory leak by using a proper smart pointer.
1711         Especially if we get children by clutter_actor_get_children, we should free it after using.
1712
1713         No functionality changed.
1714
1715         * platform/graphics/clutter/GraphicsLayerActor.cpp:
1716         (graphicsLayerActorUpdateTexture):
1717         (graphicsLayerActorRemoveAll):
1718
1719 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
1720
1721         [BlackBerry][CSS Filters] Blur filter fails to recompute blur size when layer size changes
1722         https://bugs.webkit.org/show_bug.cgi?id=114272
1723
1724         Reviewed by Rob Buis.
1725
1726         Blur appeared blocky or pixelated when surface changed size after
1727         creating the filter actions. The initial image size was used to
1728         determine the blur size (expressed in texture coordinate system).
1729         Fixed by recomputing the blur size when the surface size changes, using
1730         a new Uniform1f subclass that can use a functor to compute the uniform
1731         value per-frame.
1732
1733         This fixes css3/filters/effect-blur-hw.html. This can only be verified
1734         by manual inspection because the BlackBerry port is not currently using
1735         pixel tests.
1736
1737         PR 323730
1738
1739         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1740         (WebCore):
1741         (SurfaceFunctor):
1742         (WebCore::SurfaceFunctor::SurfaceFunctor):
1743         (InverseSurfaceWidth):
1744         (WebCore::InverseSurfaceWidth::InverseSurfaceWidth):
1745         (WebCore::InverseSurfaceWidth::operator()):
1746         (InverseSurfaceHeight):
1747         (WebCore::InverseSurfaceHeight::InverseSurfaceHeight):
1748         (WebCore::LayerFilterRenderer::actionsForOperations):
1749         * platform/graphics/blackberry/LayerFilterRenderer.h:
1750         (Uniform1f):
1751         (WebCore):
1752         (Uniform1fWithFunctor):
1753         (WebCore::Uniform1fWithFunctor::create):
1754         (WebCore::Uniform1fWithFunctor::Uniform1fWithFunctor):
1755         (WebCore::Uniform1fWithFunctor::apply):
1756         (WebCore::Uniform1f::createWithFunctor):
1757
1758 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
1759
1760         [BlackBerry] Accelerated compositing debug rectangle incorrectly drawn for layers with surfaces
1761         https://bugs.webkit.org/show_bug.cgi?id=114275
1762
1763         Reviewed by Carlos Garcia Campos.
1764
1765         The drawDebugBorder method was updated to mirror the logic in
1766         compositeLayersRecursive, i.e. if we're compositing a surface to the
1767         screen, use the transformed bounds stored in the surface. The bounds
1768         stored in the layer should only be used when drawing the layer to the
1769         surface.
1770
1771         Speaking of which, also update the code to skip border drawing when
1772         drawing a layer to a surface. Drawing the borders inside the surface
1773         would only result in messing up the surface contents, especially when
1774         CSS filters like blur were the reason for having a surface in the first
1775         place - the border would be blurred and hard to discern.
1776
1777         Only manually testable, the debug border is disabled during layout
1778         tests.
1779
1780         PR 323746
1781
1782         * platform/graphics/blackberry/LayerRenderer.cpp:
1783         (WebCore::LayerRenderer::drawDebugBorder):
1784         * platform/graphics/blackberry/LayerRendererSurface.cpp:
1785         (WebCore::LayerRendererSurface::drawRect):
1786         (WebCore::LayerRendererSurface::transformedBounds): Added.
1787         (WebCore):
1788         * platform/graphics/blackberry/LayerRendererSurface.h:
1789         (LayerRendererSurface):
1790
1791 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
1792
1793         [BlackBerry] Compiler warning in LayerWebKitThread.cpp
1794         https://bugs.webkit.org/show_bug.cgi?id=114277
1795
1796         Reviewed by Carlos Garcia Campos.
1797
1798         All the relevant WTF::Vector APIs use size_t, storing the position in
1799         an int resulted in a compiler warning. Fixed by switching to size_t.
1800
1801         No change in behavior, no new tests.
1802
1803         PR 323753
1804
1805         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1806         (WebCore::LayerWebKitThread::remove):
1807         (WebCore::LayerWebKitThread::replaceSublayer):
1808
1809 2013-04-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1810
1811         [CoordinatedGraphics] Use ScrollingStateTree to handle fixed elements positioning while scrolling
1812         https://bugs.webkit.org/show_bug.cgi?id=114353
1813
1814         Reviewed by Noam Rosenthal.
1815         
1816         ScrollingCoordinatorCoordinatedGraphics should implement threaded scrolling interface and
1817         re-use threaded scrolling approach (ScrollingStateTree and ViewportConstraints) to handle
1818         fixed/sticky elements positioning while scrolling. The rationals are below.
1819
1820         Before the change ScrollingCoordinatorCoordinatedGraphics was implementing Chromium-specific
1821         interface which is going to be removed eventually as there is no ScrollingCoordinatorChromium
1822         existing.
1823
1824         Tested by existing manual tests (fixed-position.html for example.
1825
1826         * CMakeLists.txt:
1827         * Target.pri:
1828             Included ScrollingStateTree files.
1829
1830         * page/scrolling/ScrollingStateFixedNode.cpp:
1831         * page/scrolling/ScrollingStateFixedNode.h:
1832         * page/scrolling/ScrollingStateNode.cpp:
1833         * page/scrolling/ScrollingStateNode.h:
1834         * page/scrolling/ScrollingStateScrollingNode.cpp:
1835         * page/scrolling/ScrollingStateScrollingNode.h:
1836         * page/scrolling/ScrollingStateStickyNode.cpp:
1837         * page/scrolling/ScrollingStateStickyNode.h:
1838         * page/scrolling/ScrollingStateTree.cpp:
1839         * page/scrolling/ScrollingStateTree.h:
1840             Removed ENABLE(THREADED_SCROLLING) code guards.
1841
1842         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1843         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
1844         (WebCore::ScrollingCoordinatorCoordinatedGraphics::~ScrollingCoordinatorCoordinatedGraphics):
1845         (WebCore):
1846         (WebCore::ScrollingCoordinatorCoordinatedGraphics::attachToStateTree):
1847         (WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree):
1848         (WebCore::ScrollingCoordinatorCoordinatedGraphics::clearStateTree):
1849         (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
1850         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
1851             ScrollingCoordinatorCoordinatedGraphics is using threaded scrolling approach to handle fixed
1852             elements positioning while scrolling.
1853
1854         (WebCore):
1855         (ScrollingCoordinatorCoordinatedGraphics):
1856         * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp: Added.
1857         (WebCore):
1858         (WebCore::ScrollingStateNode::platformScrollLayer):
1859         (WebCore::ScrollingStateNode::setScrollPlatformLayer):
1860         (WebCore::ScrollingStateNode::setScrollLayer):
1861         * page/scrolling/coordinatedgraphics/ScrollingStateScrollingNodeCoordinatedGraphics.cpp: Added.
1862         (WebCore):
1863         (WebCore::ScrollingStateScrollingNode::counterScrollingPlatformLayer):
1864         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
1865
1866 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1867
1868         [Qt] EventHandler should handle Space and BackSpace 
1869         https://bugs.webkit.org/show_bug.cgi?id=114428
1870
1871         Reviewed by Jocelyn Turcotte.
1872
1873         Enable default space-handling for Qt.
1874
1875         * page/EventHandler.cpp:
1876
1877 2013-04-11  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1878
1879         IconDatabase: Simplify boolean logic in assertion.
1880         https://bugs.webkit.org/show_bug.cgi?id=114425
1881
1882         Reviewed by Andreas Kling.
1883
1884         Follow-up to r148097; drop the overzealous use of !! to turn a
1885         PassRefPtr into a boolean.
1886
1887         * loader/icon/IconDatabase.cpp:
1888         (WebCore::IconDatabase::updateIconRecord):
1889
1890 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
1891
1892         [BlackBerry] LayerTexture refactoring
1893         https://bugs.webkit.org/show_bug.cgi?id=114276
1894
1895         Reviewed by Carlos Garcia Campos.
1896
1897         Remove the GpuHandle and HostType typedefs from LayerTexture, they
1898         don't make any sense now that we removed the Skia code paths. With Skia
1899         they used to be an OpenGL texture ID and an SkBitmap respectively, but
1900         now it's just BlackBerry::Platform::Graphics::Buffer all around.
1901
1902         This allows us to rename textureId() into buffer() which is more to the
1903         point. The texture ID concept is now up for grabs and can be used to
1904         consolidate all the various code for extracting an OpenGL texture from
1905         a BlackBerry::Platform::Graphics::Buffer. This opportunity is seized in
1906         LayerTexture::platformTexture(), a name which makes more sense than
1907         textureId() for anyone familiar with the GraphicsContext3D code. We can
1908         also leverage the Platform3DObject typedef to avoid including gl2.h.
1909
1910         The vertex attribute state was getting trampled when interacting with
1911         BlackBerry::Platform::Graphics in the LayerFilterRenderer. Some
1912         additional GL state save/restore incantations when accessing the OpenGL
1913         texture for a LayerTexture in the new LayerTexture::platformTexture()
1914         method fixes various CSS Filters test cases.
1915
1916         Since we removed the Skia integration from LayerTiler, nobody cares
1917         about the dirty rect, tile rect or opaqueness of the tile contents. So
1918         remove those parameters from the updateContents code path.
1919
1920         No change in behavior except for fixing CSS Filters tests like
1921         css3/filters/effect-blur-hw.html. This can only be verified by manually
1922         looking at the tests, we don't have pixel test support to catch this
1923         kind of regression.
1924
1925         PR 322882
1926
1927         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1928         (WebCore::LayerCompositingThread::drawSurface):
1929         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1930         (WebCore::LayerFilterRenderer::ping):
1931         (WebCore::LayerFilterRenderer::pong):
1932         (WebCore::LayerFilterRenderer::pushSnapshot):
1933         (WebCore::LayerFilterRenderer::popSnapshot):
1934         (WebCore::LayerFilterRenderer::applyActions):
1935         * platform/graphics/blackberry/LayerRenderer.cpp:
1936         (WebCore::LayerRenderer::useSurface):
1937         * platform/graphics/blackberry/LayerTexture.cpp:
1938         (WebCore::LayerTexture::LayerTexture):
1939         (WebCore::LayerTexture::updateContents):
1940         (WebCore::LayerTexture::setContentsToColor):
1941         (WebCore::LayerTexture::protect):
1942         (WebCore::LayerTexture::platformTexture):
1943         (WebCore):
1944         * platform/graphics/blackberry/LayerTexture.h:
1945         (WebCore::LayerTexture::isDirty):
1946         (WebCore::LayerTexture::buffer):
1947         (LayerTexture):
1948         (WebCore::LayerTexture::setBuffer):
1949         * platform/graphics/blackberry/LayerTile.cpp:
1950         (WebCore::LayerTile::setContents):
1951         (WebCore::LayerTile::updateContents):
1952         * platform/graphics/blackberry/LayerTile.h:
1953         (WebCore::LayerTile::hasTexture):
1954         (LayerTile):
1955         * platform/graphics/blackberry/LayerTiler.cpp:
1956         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1957         (WebCore::LayerTiler::uploadTexturesIfNeeded):
1958         (WebCore::LayerTiler::performTileJob):
1959         (WebCore::LayerTiler::drawTile):
1960         * platform/graphics/blackberry/LayerTiler.h:
1961         (WebCore::LayerTiler::TextureJob::TextureJob):
1962         (WebCore::LayerTiler::TextureJob::setContents):
1963         (WebCore::LayerTiler::TextureJob::updateContents):
1964         (TextureJob):
1965         (LayerTiler):
1966         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
1967         (WebCore::TextureCacheCompositingThread::createBuffer):
1968         (WebCore::TextureCacheCompositingThread::collectGarbage):
1969         (WebCore::TextureCacheCompositingThread::install):
1970         (WebCore::TextureCacheCompositingThread::resizeTexture):
1971         (WebCore::TextureCacheCompositingThread::evict):
1972         (WebCore::TextureCacheCompositingThread::textureForContents):
1973         (WebCore::TextureCacheCompositingThread::updateContents):
1974         * platform/graphics/blackberry/TextureCacheCompositingThread.h:
1975         (TextureCacheCompositingThread):
1976         (WebCore::TextureCacheCompositingThread::ZombieTexture::ZombieTexture):
1977         (ZombieTexture):
1978
1979 2013-04-11  Alberto Garcia  <agarcia@igalia.com>
1980
1981         [BlackBerry] RenderThemeBlackBerry: upstream missing code
1982         https://bugs.webkit.org/show_bug.cgi?id=114343
1983
1984         Reviewed by Xan Lopez.
1985
1986         Add implementations of sliderTickSize() and
1987         sliderTickOffsetFromTrackCenter(), as well as a missing header.
1988
1989         * platform/blackberry/RenderThemeBlackBerry.cpp:
1990         (WebCore):
1991         (WebCore::RenderThemeBlackBerry::sliderTickSize):
1992         (WebCore::RenderThemeBlackBerry::sliderTickOffsetFromTrackCenter):
1993         * platform/blackberry/RenderThemeBlackBerry.h:
1994         (RenderThemeBlackBerry):
1995
1996 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1997
1998         HitTestRequest::AllowFrameScrollbars does not test main frame scrollbar
1999         https://bugs.webkit.org/show_bug.cgi?id=112563
2000
2001         Reviewed by Antonio Gomes.
2002
2003         Move the frame scrollbar testing from RenderPart to RenderView, so that it is
2004         tested by all frame and not just child frames. At the same time remove the 
2005         main frame test from the one current callsite using the option.
2006
2007         Tested by fast/events/touch/gesture/gesture-scrollbar.html.
2008
2009         * page/EventHandler.cpp:
2010         (WebCore::EventHandler::handleGestureEvent):
2011         * rendering/RenderPart.cpp:
2012         (WebCore::RenderPart::nodeAtPoint):
2013         * rendering/RenderView.cpp:
2014         (WebCore::RenderView::hitTest):
2015
2016 2013-04-11  Rune Lillesveen  <rune@opera.com>
2017
2018         Incorrect evaluation of resolution media queries
2019         https://bugs.webkit.org/show_bug.cgi?id=114029
2020
2021         Reviewed by Kenneth Rohde Christiansen.
2022
2023         The implementation used the physical resolution to evaluate the
2024         resolution media features. Changed to use the actual CSS resolution,
2025         also known as the device-pixel-ratio, instead. Unified the code for
2026         evaluating the resolution and device-pixel-ratio media features.
2027
2028         No new tests, covered by existing tests.
2029
2030         * WebCore.exp.in:
2031         * css/CSSPrimitiveValue.h:
2032         (WebCore::CSSPrimitiveValue::isResolution):
2033         * css/MediaQueryEvaluator.cpp:
2034         (WebCore::evalResolution):
2035         (WebCore::device_pixel_ratioMediaFeatureEval):
2036         (WebCore::resolutionMediaFeatureEval):
2037         * page/Screen.cpp:
2038         * page/Screen.h:
2039         * page/Settings.cpp:
2040         (WebCore):
2041         * page/Settings.h:
2042         (Settings):
2043         * testing/InternalSettings.cpp:
2044         (WebCore::InternalSettings::Backup::Backup):
2045         (WebCore::InternalSettings::Backup::restoreTo):
2046         * testing/InternalSettings.h:
2047         (Backup):
2048         (InternalSettings):
2049         * testing/InternalSettings.idl:
2050
2051 2013-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2052
2053         FrameLoaderClient::assignIdentifierToInitialRequest() not called for the main resource when loaded from the memory cache
2054         https://bugs.webkit.org/show_bug.cgi?id=112418
2055
2056         Reviewed by Darin Adler.
2057
2058         When the main resource is loaded from the memory cache the
2059         response is not added to the ResponseVector of the document
2060         loader, so that when committing the provisional load the remaining
2061         delegate messages are not called because the ResponseVector of the
2062         document loader is empty. When the main resource is loaded from
2063         the memory cache, there's no resource loader, and the client is
2064         notified about the response received using
2065         ResourceLoadNotifier::dispatchDidReceiveResponse() directly
2066         instead of ResourceLoadNotifier::didReceiveResponse() which is the
2067         one adding the response to the ResponseVector of the document
2068         loader. So, the problem can be fixed by adding the response to the
2069         ResponseVector before calling dispatchDidReceiveResponse() when
2070         loading the main resource without a resource loade
2071
2072         Test: loader/go-back-cached-main-resource.html
2073
2074         * loader/DocumentLoader.cpp:
2075         (WebCore::DocumentLoader::responseReceived):
2076
2077 2013-04-10  Alexey Proskuryakov  <ap@apple.com>
2078
2079         Remove some includes of CachedImage.h
2080         https://bugs.webkit.org/show_bug.cgi?id=114411
2081
2082         Reviewed by Dan Bernstein.
2083
2084         * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
2085         definition of a class it holds, but default construction does not.
2086
2087         * rendering/RenderImageResource.cpp:
2088         * rendering/RenderImageResource.h:
2089         Moved definitions of virtual functions to a .cpp file. There is no win from having
2090         them inline, and now we don't need CachedImage.h in the header.
2091
2092         * bindings/js/JSNodeCustom.cpp:
2093         * dom/Clipboard.cpp:
2094         (WebCore::Clipboard::Clipboard):
2095         * platform/mac/ClipboardMac.h:
2096         * rendering/InlineFlowBox.cpp:
2097         * rendering/RenderBox.cpp:
2098         * rendering/RenderListItem.cpp:
2099         * rendering/RenderListMarker.cpp:
2100         * rendering/RenderTableCol.cpp:
2101         * rendering/RenderTableRow.cpp:
2102         * rendering/RenderTableSection.cpp:
2103         * svg/graphics/SVGImageCache.cpp:
2104         Removed unnecessary includes.
2105
2106         * platform/mac/PasteboardMac.mm:
2107         * rendering/RenderSnapshottedPlugIn.cpp:
2108         Added ones where they are now necessary.
2109
2110 2013-04-10  No'am Rosenthal  <noam@webkit.org>
2111
2112         Allow direct compositing of background images
2113         https://bugs.webkit.org/show_bug.cgi?id=108203
2114
2115         Reviewed by Simon Fraser.
2116
2117         Use setContentsToImage for background images, if the GraphicsLayer has only a background
2118         bitmap image and nothing else. Compute the contentsRect/contentsTileRect from the box model.
2119         Added new properties to GraphicsLayer, contentsTilePhase and contentsTileSize, which controls the "single tile rect",
2120         which allows us to compute the pattern-space transform of a tile, thus allowing background-size
2121         and other characteristics of background images.
2122
2123         This feature is explicitly disabled when there is any composition with a background color or if
2124         there are several background images, as in that case having a single backing store has some
2125         advantages over directly compositing in hardware.
2126
2127         Currently, this feature is disabled for all ports, allowing ports to implement their backend
2128         and decide when to enable it.
2129
2130         Note that RenderBoxModelObject::getGeometryForBackgroundImage crops the contents rect to the 
2131         area that contains the tiles, which allows us to assume full tiling in GraphicsLayer.
2132         In this way contentsTileSize/Phase is equivalent to GraphicsContext::drawTiledImage.
2133
2134         Tests: compositing/patterns/direct-pattern-compositing-add-text.html
2135                compositing/patterns/direct-pattern-compositing-change.html
2136                compositing/patterns/direct-pattern-compositing-contain.html
2137                compositing/patterns/direct-pattern-compositing-cover.html
2138                compositing/patterns/direct-pattern-compositing-load.html
2139                compositing/patterns/direct-pattern-compositing-padding.html
2140                compositing/patterns/direct-pattern-compositing-position.html
2141                compositing/patterns/direct-pattern-compositing-rotation.html
2142                compositing/patterns/direct-pattern-compositing-size.html
2143                compositing/patterns/direct-pattern-compositing.html
2144
2145         * platform/graphics/GraphicsLayer.h:
2146         (GraphicsLayer):
2147         (WebCore::GraphicsLayer::setContentsTileSize):
2148         (WebCore::GraphicsLayer::setContentsTilePhase):
2149         (WebCore::GraphicsLayer::contentsTileSize):
2150         (WebCore::GraphicsLayer::contentsTilePhase):
2151         (WebCore::GraphicsLayer::supportsContentsTiling):
2152                 Add a contentsTileRect property that enables tile-repeat of background images.
2153
2154         * rendering/RenderBox.cpp:
2155         (WebCore::RenderBox::imageChanged):
2156                 Pass background image changes to the layer backing.
2157
2158         * rendering/RenderBoxModelObject.cpp:
2159         * rendering/RenderBoxModelObject.h:
2160         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2161                 Expose a function that performs the geometry calculations needed to determine 
2162                 the tileRect for a background image. This function is also responsible
2163                 for cropping the contentsRect to fit the area that is drawn into.
2164
2165         * rendering/RenderLayerBacking.h:
2166         * rendering/RenderLayerBacking.cpp:
2167         (WebCore::RenderLayerBacking::contentChanged):
2168         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2169         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2170         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
2171         (WebCore::RenderLayerBacking::resetContentsRect):
2172         (WebCore::hasBoxDecorationsOrBackgroundImage):
2173         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
2174         (WebCore::canCreateTiledImage):
2175         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2176         (WebCore::backgroundRectForBox):
2177                 Allow background images to be directly composited if conditions allow (see bug description).
2178
2179 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
2180
2181         Replace ENABLE_LEGACY_WEB_AUDIO preprocessor statements in IDL files with Conditional attribute
2182         https://bugs.webkit.org/show_bug.cgi?id=114351
2183
2184         Reviewed by Ryosuke Niwa.
2185
2186         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
2187
2188         * Modules/webaudio/AudioBufferSourceNode.idl:
2189         * Modules/webaudio/AudioContext.idl:
2190         * Modules/webaudio/AudioParam.idl:
2191         * Modules/webaudio/OscillatorNode.idl:
2192
2193 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
2194
2195         Replace ENABLE_DIRECTORY_UPLOAD preprocessor statements in IDL files with Conditional attribute
2196         https://bugs.webkit.org/show_bug.cgi?id=114350
2197
2198         Reviewed by Ryosuke Niwa.
2199
2200         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
2201
2202         * fileapi/File.idl:
2203
2204 2013-04-10  Ryosuke Niwa  <rniwa@webkit.org>
2205
2206         Cleanup local variables in Editor::markAndReplaceFor
2207         https://bugs.webkit.org/show_bug.cgi?id=114383
2208
2209         Reviewed by Enrica Casucci.
2210
2211         Added resultEndLocation, which is the sum of resultLocation and resultLength.
2212
2213         Also replaced ambiguousBoundaryOffset by useAmbiguousBoundaryOffset since the ambiguous offset is always
2214         selectionOffset -1 to avoid the extra house keeping and obnoxious -1 check.
2215
2216         * editing/Editor.cpp:
2217         (WebCore::Editor::markAndReplaceFor):
2218
2219 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
2220
2221         Mass remove all the empty directories
2222
2223         Rubberstamped by Ryosuke Niwa.
2224
2225         * Modules/intents: Removed.
2226         * Modules/protocolhandler: Removed.
2227         * Modules/speech/mac: Removed.
2228         * accessibility/efl: Removed.
2229         * accessibility/gtk: Removed.
2230         * bridge/jni/jsc: Removed.
2231         * editing/android: Removed.
2232         * editing/gtk: Removed.
2233         * history/android: Removed.
2234         * page/android: Removed.
2235         * platform/android: Removed.
2236         * platform/clutter: Removed.
2237         * platform/graphics/blackberry/skia: Removed.
2238         * platform/graphics/harfbuzz/ng: Removed.
2239         * platform/graphics/pango: Removed.
2240         * platform/image-decoders/cg: Removed.
2241         * platform/image-decoders/qt: Removed.
2242         * platform/network/android: Removed.
2243         * platform/network/soup/cache/webkit: Removed.
2244         * platform/text/android: Removed.
2245         * platform/text/wince: Removed.
2246         * platform/track: Removed.
2247
2248 2013-04-10  Simon Fraser  <simon.fraser@apple.com>
2249
2250         Log when the animation timer fires
2251         https://bugs.webkit.org/show_bug.cgi?id=114393
2252
2253         Reviewed by Dean Jackson.
2254
2255         Logging to the Animations log channel when the updateAnimationTimer
2256         fires is useful, because it indicates whether we're running
2257         software animations.
2258
2259         * page/animation/AnimationController.cpp:
2260         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
2261
2262 2013-04-10  Beth Dakin  <bdakin@apple.com>
2263
2264         Inspector highlights are offset when the WKView has a header
2265         https://bugs.webkit.org/show_bug.cgi?id=114389
2266         -and corresponding-
2267         <rdar://problem/13522434>
2268
2269         Reviewed by Sam Weinig.
2270
2271         rootViewToContents() and contentsToRootView() need to factor in the 
2272         headerHeight(), much like windowToContents() and contentsToWindow() do already. 
2273         * platform/ScrollView.cpp:
2274         (WebCore::ScrollView::rootViewToContents):
2275         (WebCore::ScrollView::contentsToRootView):
2276
2277 2013-04-10  Simon Fraser  <simon.fraser@apple.com>
2278
2279         Flesh out the Animations logging
2280         https://bugs.webkit.org/show_bug.cgi?id=114388
2281
2282         Reviewed by Dean Jackson.
2283
2284         Log state changes and transition/animation creation and destruction
2285         to the Animations log channel.
2286
2287         * page/animation/AnimationBase.cpp:
2288         (WebCore::nameForState):
2289         (WebCore::AnimationBase::updateStateMachine):
2290         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2291         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
2292         (WebCore::AnimationBase::freezeAtTime):
2293         * page/animation/CompositeAnimation.cpp:
2294         (WebCore::CompositeAnimation::updateTransitions):
2295         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2296         * page/animation/KeyframeAnimation.h:
2297         (WebCore::KeyframeAnimation::keyframes):
2298         (KeyframeAnimation):
2299
2300 2013-04-10  Alexey Proskuryakov  <ap@apple.com>
2301
2302         <rdar://problem/13047266> External XML entities are not loaded with modern libxml2
2303         https://bugs.webkit.org/show_bug.cgi?id=114377
2304
2305         Reviewed by Darin Adler.
2306
2307         Covered by http/tests/security/xss-DENIED-xml-external-entity.xhtml when using
2308         new enough libxml2.
2309
2310         * xml/parser/XMLDocumentParserLibxml2.cpp:
2311         (WebCore::switchToUTF16): Added a FIXME with an idea for improvement.
2312         (WebCore::XMLParserContext::createStringParser): Apply XML_PARSE_NOENT in a non-hacky
2313         way, so that the new libxml2 check doesn't fail.
2314         (WebCore::XMLParserContext::createMemoryParser): Updated an unhelpful and incorrect
2315         comment (XML_PARSE_NODICT actually means "Do not reuse the context dictionary").
2316
2317 2013-04-10  Eric Carlson  <eric.carlson@apple.com>
2318
2319         [Mac] in-band tracks sometimes not recognized
2320         https://bugs.webkit.org/show_bug.cgi?id=114380
2321
2322         Reviewed by Jer Noble.
2323
2324         No new tests, covered by existing in-band tests.
2325
2326         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2327         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't call selectMediaOption,
2328             availableMediaCharacteristicsWithMediaSelectionOptions is unlikely to be loaded at this time.
2329         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Disable automatic text track
2330             selection.
2331         (WebCore::assetMetadataKeyNames): Watch for the status of availableMediaCharacteristicsWithMediaSelectionOptions
2332             to change.
2333
2334 2013-04-10  Hans Muller  <hmuller@adobe.com>
2335
2336         [CSS Exclusions] Zoom causes shape-inside to fail when shape-padding is specified
2337         https://bugs.webkit.org/show_bug.cgi?id=113730
2338
2339         Reviewed by Dirk Schulze.
2340
2341         Snap computed margin and polygon boundaries to the LayoutUnit grid to ensure
2342         that they fall within the shape's LayoutUnit bounding box.
2343
2344         Test: fast/exclusions/shape-inside/shape-inside-polygon-zoom.html
2345
2346         * rendering/ExclusionPolygon.cpp:
2347         (WebCore::snapVerticesToLayoutUnitGrid): Convert the FloatPoint coordinates to LayoutUnits and then back to floats.
2348         (WebCore::computeShapePaddingBounds): Now calls snapVerticesToLayoutUnitGrid() before creating a FloatPolygon.
2349         (WebCore::computeShapeMarginBounds): Ditto.
2350
2351 2013-04-10  Csaba Osztrogonác  <ossy@webkit.org>
2352
2353         One more unreviewed buildfix after r148123.
2354
2355         * platform/graphics/filters/CustomFilterMeshGenerator.h:
2356
2357 2013-04-10  Beth Dakin  <bdakin@apple.com>
2358
2359         FindBanner matches are offset when the WKView has a header or footer
2360         https://bugs.webkit.org/show_bug.cgi?id=114314
2361         -and corresponding-
2362         <rdar://problem/13522434>
2363
2364         Reviewed by Simon Fraser.
2365
2366         There were already a few places in the code where we needed to adjust the 
2367         scrollOffset() to pretend that (0,0) is that the top of the Document rather than 
2368         the top of the header. To fix the FindBanner issues, we need to know that version 
2369         of the offset in a few more places, so I added a function on ScrollView to fetch 
2370         it called scrollOffsetRelativeToDocument().
2371
2372         New function subtracts out the headerHeight() to treat the top of 
2373         the document as (0,0).
2374         * WebCore.exp.in:
2375         * platform/ScrollView.cpp:
2376         (WebCore::ScrollView::scrollOffsetRelativeToDocument):
2377
2378         Use scrollOffsetRelativeToDocument() where we were previously making this 
2379         calculation. Also re-name an inaccurately named variable where we are actually 
2380         converting FROM a document offset to a ScrollableArea offset.
2381         (WebCore::ScrollView::windowToContents):
2382         * platform/ScrollView.h:
2383         (ScrollView):
2384
2385         getRectToExpose needs to know about the actual visibleContentRect and the 
2386         visibleContentRect that is relative to the Document. So this 
2387         patch adds a new parameter to getRectToExpose for that purpose.
2388         * rendering/RenderLayer.cpp:
2389         (WebCore::RenderLayer::scrollRectToVisible):
2390         (WebCore::RenderLayer::getRectToExpose):
2391         * rendering/RenderLayer.h:
2392
2393 2013-04-10  Chris Fleizach  <cfleizach@apple.com>
2394
2395         when ARIA button contains a link, label text is ignored (affects main buttons on m.facebook.com)
2396         https://bugs.webkit.org/show_bug.cgi?id=113906
2397
2398         Reviewed by Tim Horton.
2399
2400         If an element does not expose any children, then it's safe to include all of its sub children when determining
2401         the visible text.
2402         The bug is that all elements were ignoring focusable elements (like <a>) when determining visible children text
2403
2404         Test: accessibility/link-inside-button-accessible-text.html
2405
2406         * accessibility/AccessibilityNodeObject.cpp:
2407         (WebCore::shouldUseAccessiblityObjectInnerText):
2408         * accessibility/AccessibilityNodeObject.h:
2409         (AccessibilityNodeObject):
2410         * accessibility/AccessibilityObject.h:
2411         (WebCore::AccessibilityObject::isDescendantOfBarrenParent):
2412         (AccessibilityObject):
2413
2414 2013-04-10  Chris Fleizach  <cfleizach@apple.com>
2415
2416         AX: Make sure all AX methods called from outside call prepareAccessibility
2417         https://bugs.webkit.org/show_bug.cgi?id=113818
2418
2419         Reviewed by Darin Adler.
2420
2421         Make sure any calls that can be made from outside WebCore are protected with the
2422         prepareAccessibility method.
2423
2424         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2425         (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
2426         (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
2427         (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
2428         (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
2429         (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
2430         (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
2431         (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
2432         (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
2433         (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
2434         (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
2435         (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
2436         (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
2437         (-[WebAccessibilityObjectWrapper accessibilityMathType]):
2438
2439 2013-04-10  Csaba Osztrogonác  <ossy@webkit.org>
2440
2441         Unreviewed buildfix after r148123.
2442
2443         * inspector/InspectorInstrumentation.h:
2444         (WebCore):
2445
2446 2013-04-10  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2447
2448         Clicking on the volume slider of HTML5 elements is pausing sometimes
2449         https://bugs.webkit.org/show_bug.cgi?id=112548
2450
2451         Reviewed by Eric Carlson.
2452
2453         Test: media/click-volume-bar-not-pausing.html
2454
2455         * html/shadow/MediaControlElementTypes.cpp:
2456         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
2457         Calling the setDefaultHandled() method on the event prevents it
2458         from being incorrectly propagated from the volume button up to the
2459         MediaDocument.
2460
2461 2013-04-10  Arvid Nilsson  <anilsson@rim.com>
2462
2463         [BlackBerry] Rename BlackBerry specific Texture class
2464         https://bugs.webkit.org/show_bug.cgi?id=95781
2465
2466         Reviewed by Rob Buis.
2467
2468         Texture was a bit too generic and prone to name conflicts. Renamed it
2469         to LayerTexture.
2470
2471         No change in behavior, no new tests.
2472
2473         PR 322882
2474
2475         * PlatformBlackBerry.cmake:
2476         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2477         (WebCore::LayerCompositingThread::drawSurface):
2478         (WebCore::LayerCompositingThread::contentsTexture):
2479         * platform/graphics/blackberry/LayerCompositingThread.h:
2480         (LayerCompositingThread):
2481         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
2482         (WebCore):
2483         (WebCore::LayerCompositingThreadClient::contentsTexture):
2484         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2485         (WebCore::LayerFilterRenderer::applyActions):
2486         * platform/graphics/blackberry/LayerFilterRenderer.h:
2487         (LayerFilterRenderer):
2488         * platform/graphics/blackberry/LayerRendererSurface.h:
2489         (WebCore::LayerRendererSurface::texture):
2490         (LayerRendererSurface):
2491         * platform/graphics/blackberry/LayerTexture.cpp: Renamed from Source/WebCore/platform/graphics/blackberry/Texture.cpp.
2492         (WebCore):
2493         (WebCore::LayerTexture::LayerTexture):
2494         (WebCore::LayerTexture::~LayerTexture):
2495         (WebCore::LayerTexture::updateContents):
2496         (WebCore::LayerTexture::setContentsToColor):
2497         (WebCore::LayerTexture::protect):
2498         * platform/graphics/blackberry/LayerTexture.h: Renamed from Source/WebCore/platform/graphics/blackberry/Texture.h.
2499         (WebCore):
2500         (LayerTexture):
2501         (WebCore::LayerTexture::create):
2502         (WebCore::LayerTexture::textureId):
2503         (WebCore::LayerTexture::isDirty):
2504         (WebCore::LayerTexture::hasTexture):
2505         (WebCore::LayerTexture::isColor):
2506         (WebCore::LayerTexture::isOpaque):
2507         (WebCore::LayerTexture::isProtected):
2508         (WebCore::LayerTexture::protect):
2509         (WebCore::LayerTexture::unprotect):
2510         (WebCore::LayerTexture::size):
2511         (WebCore::LayerTexture::width):
2512         (WebCore::LayerTexture::height):
2513         (WebCore::LayerTexture::bytesPerPixel):
2514         (WebCore::LayerTexture::sizeInBytes):
2515         (WebCore::LayerTexture::setTextureId):
2516         (WebCore::LayerTexture::setSize):
2517         * platform/graphics/blackberry/LayerTile.cpp:
2518         (WebCore::LayerTile::setContents):
2519         (WebCore::LayerTile::updateContents):
2520         (WebCore::LayerTile::setTexture):
2521         * platform/graphics/blackberry/LayerTile.h:
2522         (WebCore::LayerTile::texture):
2523         (LayerTile):
2524         * platform/graphics/blackberry/LayerTiler.cpp:
2525         (WebCore::LayerTiler::drawTile):
2526         (WebCore::LayerTiler::contentsTexture):
2527         * platform/graphics/blackberry/LayerTiler.h:
2528         (LayerTiler):
2529         (WebCore::LayerTiler::TextureJob::TextureJob):
2530         (WebCore::LayerTiler::TextureJob::setContents):
2531         (WebCore::LayerTiler::TextureJob::updateContents):
2532         (TextureJob):
2533         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
2534         (WebCore::TextureProtector::TextureProtector):
2535         (TextureProtector):
2536         (WebCore::TextureCacheCompositingThread::allocateTextureId):
2537         (WebCore::freeTextureId):
2538         (WebCore::TextureCacheCompositingThread::textureResized):
2539         (WebCore::TextureCacheCompositingThread::textureSizeInBytesChanged):
2540         (WebCore::TextureCacheCompositingThread::textureDestroyed):
2541         (WebCore::TextureCacheCompositingThread::install):
2542         (WebCore::TextureCacheCompositingThread::resizeTexture):
2543         (WebCore::TextureCacheCompositingThread::evict):
2544         (WebCore::TextureCacheCompositingThread::textureAccessed):
2545         (WebCore::TextureCacheCompositingThread::prune):
2546         (WebCore::TextureCacheCompositingThread::textureForTiledContents):
2547         (WebCore::TextureCacheCompositingThread::textureForColor):
2548         (WebCore::TextureCacheCompositingThread::updateContents):
2549         * platform/graphics/blackberry/TextureCacheCompositingThread.h:
2550         (WebCore::TextureCacheCompositingThread::createTexture):
2551         (TextureCacheCompositingThread):
2552         (WebCore::TextureCacheCompositingThread::ZombieTexture::ZombieTexture):
2553         (ZombieTexture):
2554
2555 2013-04-10  Andreas Kling  <akling@apple.com>
2556
2557         Disallow programmatic movement of the browser window while user gestures are in progress.
2558         <http://webkit.org/b/114271>
2559         <rdar://problem/13226530>
2560
2561         Reviewed by Oliver Hunt.
2562
2563         * page/DOMWindow.cpp:
2564         (WebCore::DOMWindow::moveBy):
2565         (WebCore::DOMWindow::moveTo):
2566         (WebCore::DOMWindow::resizeBy):
2567         (WebCore::DOMWindow::resizeTo):
2568
2569 2013-04-10  Ryosuke Niwa  <rniwa@webkit.org>
2570
2571         Refactor Editor::markAndReplaceFor before fixing autocorrection bugs
2572         https://bugs.webkit.org/show_bug.cgi?id=114344
2573
2574         Reviewed by Enrica Casucci.
2575
2576         This patch refactors Editor::markAndReplaceFor so that we can start fixing bugs in a sane state.
2577         Extracted isAutomaticTextReplacementType and correctSpellcheckingPreservingTextCheckingParagraph,
2578         and made convenience local variables const.
2579
2580         In particular, shouldMarkSpelling used to be assigned of false when shouldShowCorrectionPanel was true
2581         in a middle of a function but this was removed in favor of explicitly checking this condition later
2582         since shouldMarkSpelling was only referenced once after the assignment.
2583
2584         * editing/Editor.cpp:
2585         (WebCore::isAutomaticTextReplacementType): Extracted.
2586
2587         (WebCore::correctSpellcheckingPreservingTextCheckingParagraph): Extracted.  Used highestAncestor
2588         and rangeFromLocationAndLength to match the rest of the up-to-date editing code.
2589
2590         (WebCore::Editor::markAndReplaceFor): See above.
2591
2592 2013-04-08  Anders Carlsson  <andersca@apple.com>
2593
2594         Remove unneeded headers from FrameLoader.h
2595         https://bugs.webkit.org/show_bug.cgi?id=114223
2596
2597         Reviewed by Geoffrey Garen.
2598
2599         Remove unneeded headers from FrameLoader.h and add them back into the respective .cpp files where needed.
2600
2601         * dom/Document.cpp:
2602         * history/CachedFrame.cpp:
2603         * history/PageCache.cpp:
2604         * inspector/InspectorResourceAgent.cpp:
2605         * loader/DocumentLoader.cpp:
2606         * loader/FrameLoader.cpp:
2607         (WebCore::FrameLoader::FrameLoader):
2608         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
2609         * loader/FrameLoader.h:
2610         (WebCore):
2611         (WebCore::FrameLoader::policyChecker):
2612         (WebCore::FrameLoader::history):
2613         (WebCore::FrameLoader::icon):
2614         * loader/MixedContentChecker.h:
2615         * loader/icon/IconLoader.cpp:
2616         * page/History.cpp:
2617         * page/Page.cpp:
2618         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2619         * testing/Internals.cpp:
2620
2621 2013-04-10  Simon Fraser  <simon.fraser@apple.com>
2622
2623         Minor code cleanup in AnimationBase::progress
2624         https://bugs.webkit.org/show_bug.cgi?id=114371
2625
2626         Reviewed by Dean Jackson.
2627
2628         Convert some "return; else if" to just "return; if".
2629
2630         * page/animation/AnimationBase.cpp:
2631         (WebCore::AnimationBase::progress):
2632
2633 2013-04-10  Robert Hogan  <robert@webkit.org>
2634
2635         Empty inline continuations should only get lineboxes if the padding applies to their side of the inline
2636         https://bugs.webkit.org/show_bug.cgi?id=113896
2637
2638         Reviewed by David Hyatt.
2639
2640         Test: fast/inline/inline-with-empty-inline-continuations.html
2641
2642         Where an empty inline is split across anonymous blocks we should only give lineboxes to the 'sides' of the
2643         inline that have borders, padding or margin.
2644
2645         * rendering/RenderBlockLineLayout.cpp:
2646         (WebCore::shouldApplyStartBorderPaddingOrMargin):
2647         (WebCore):
2648         (WebCore::shouldApplyEndBorderPaddingOrMargin):
2649         (WebCore::hasInlineDirectionBordersPaddingOrMargin):
2650         (WebCore::alwaysRequiresLineBox):
2651
2652 2013-04-10  Zoltan Horvath  <zoltan@webkit.org>
2653
2654         [CSS Exclusions] Increasing padding does not correctly layout child blocks
2655         https://bugs.webkit.org/show_bug.cgi?id=112929
2656
2657         Reviewed by David Hyatt.
2658
2659         If a child block has changed dimension inside a shape and it has affected the block siblings
2660         we need to relayout the content inside the shape.
2661
2662         Test: fast/exclusions/shape-inside/shape-inside-sibling-block-dimension-change-needs-relayout.html
2663
2664         * rendering/RenderBlock.cpp:
2665         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout): Add condition for dimension change.
2666         (WebCore::RenderBlock::layoutBlock): Call updateRegionsAndExclusionsAfterChildLayout with the new parameter.
2667         * rendering/RenderBlock.h:
2668         (RenderBlock): Add extra parameter to updateRegionsAndExclusionsAfterChildLayout(...)
2669
2670 2013-04-10  Geoffrey Garen  <ggaren@apple.com>
2671
2672         Removed bitrotted TimeoutChecker code
2673         https://bugs.webkit.org/show_bug.cgi?id=114336
2674
2675         Reviewed by Alexey Proskuryakov.
2676
2677         This mechanism hasn't worked for a while.
2678
2679         MarkL is working on a new version of this feature with a distinct
2680         implementation.
2681
2682         * bindings/js/JSCallbackData.cpp:
2683         (WebCore::JSCallbackData::invokeCallback):
2684         * bindings/js/JSCustomXPathNSResolver.cpp:
2685         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2686         * bindings/js/JSDOMWindowBase.cpp:
2687         (WebCore::JSDOMWindowBase::commonJSGlobalData):
2688         * bindings/js/JSErrorHandler.cpp:
2689         (WebCore::JSErrorHandler::handleEvent):
2690         * bindings/js/JSEventListener.cpp:
2691         (WebCore::JSEventListener::handleEvent):
2692         * bindings/js/JSMutationCallback.cpp:
2693         (WebCore::JSMutationCallback::call):
2694         * bindings/js/ScheduledAction.cpp:
2695         (WebCore::ScheduledAction::executeFunctionInContext):
2696         * bindings/js/ScriptController.cpp:
2697         (WebCore::ScriptController::evaluateInWorld):
2698         * bindings/js/SerializedScriptValue.cpp:
2699         (WebCore::CloneBase::CloneBase):
2700         (WebCore::CloneSerializer::serialize):
2701         (WebCore::CloneDeserializer::deserialize):
2702         * bindings/js/WorkerScriptController.cpp:
2703         (WebCore::WorkerScriptController::evaluate):
2704         * bindings/objc/WebScriptObject.mm:
2705         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2706         (-[WebScriptObject evaluateWebScript:]):
2707
2708 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
2709
2710         Replace ENABLE_JAVASCRIPT_DEBUGGER preprocessor statements in IDL files with Conditional attribute
2711         https://bugs.webkit.org/show_bug.cgi?id=114352
2712
2713         Reviewed by Timothy Hatcher.
2714
2715         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
2716
2717         * page/Console.idl:
2718
2719 2013-04-10  Alexandru Chiculita  <achicu@adobe.com>
2720
2721         Layers with opacity and blur filters are reported as opaque to the compositor
2722         https://bugs.webkit.org/show_bug.cgi?id=114295
2723
2724         Reviewed by Simon Fraser.
2725
2726         Test: compositing/contents-opaque/filter.html
2727
2728         Some filters like opacity and blur might still trigger transparency in the layer, even though the
2729         background is opaque. I've added the special case in RenderLayer::backgroundIsKnownToBeOpaqueInRect to check
2730         for filters that might have transparency. Note that this special case is required only for software drawn
2731         filters, as the transparency is going to be backed in the GraphicsLayer content. Composited filters can
2732         figure it out in the compositor.
2733
2734         * rendering/RenderLayer.cpp:
2735         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2736
2737 2013-04-10  Noam Rosenthal  <noam@webkit.org>
2738
2739         [Texmap] In certain situations nested blending with overflow:hidden displays clipped results
2740         https://bugs.webkit.org/show_bug.cgi?id=114290
2741
2742         Reviewed by Allan Sandfeld Jensen.
2743
2744         Always apply the clip when binding a surface, even if it hasn't changed.
2745         Otherwise when binding a nested surface and rebinding its container surface,
2746         the clip wouldn't apply.
2747
2748         Test: compositing/overlap-blending/nested-overlap-overflow.html
2749
2750         * platform/graphics/texmap/TextureMapperGL.cpp:
2751         (WebCore::BitmapTextureGL::bind):
2752
2753 2013-04-10  Antti Koivisto  <antti@apple.com>
2754
2755         Use minimal tiles during live resize
2756         https://bugs.webkit.org/show_bug.cgi?id=114364
2757
2758         Reviewed by Darin Adler.
2759
2760         We currently update non-visible speculative tiles during resizing. We should just drop them.
2761
2762         * page/FrameView.cpp:
2763         (WebCore::FrameView::willStartLiveResize):
2764         (WebCore::FrameView::willEndLiveResize):
2765         * page/FrameView.h:
2766         * rendering/RenderLayerBacking.cpp:
2767         (WebCore::computeTileCoverage):
2768         
2769             Use minimal coverage in live resize state.
2770
2771 2013-04-10  Victor Costan  <costan@gmail.com>
2772
2773         Blob content type normalization.
2774         https://bugs.webkit.org/show_bug.cgi?id=111380
2775
2776         Reviewed by Alexey Proskuryakov.
2777
2778         Tests: http/tests/fast/files/blob-constructor.js
2779                http/tests/fileapi/xhr-send-form-data-filename-escaping.html
2780                http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html
2781
2782         * WebCore.exp.in: exported Blob::isNormalizedContentType()
2783         * bindings/js/JSBlobCustom.cpp:
2784         (WebCore::JSBlobConstructor::constructJSBlob): remove checks on Blob type, BlobBuilder will normalize it
2785         * fileapi/Blob.cpp:
2786         (BlobType): utilities for normalizing a Blob's type according to the File API spec
2787         (WebCore::BlobType::isValid): content type validity checks in the File API spec
2788         (WebCore::BlobType::normalize): implements the normalization rules in the File API spec
2789         (WebCore::BlobType::isNormalized): useful for ASSERTing that a Blob type has been normalized
2790         (WebCore): implement Blob type normalization according to the File API spec
2791         (WebCore::Blob::Blob): normalize the Blob type in the data URL
2792         (WebCore::Blob::slice): normalize the Blob type argument
2793         * fileapi/Blob.h:
2794         (BlobType): utilities for normalizing a Blob's type according to the File API spec
2795         (WebCore::Blob::create): assert that the deserialized Blob's type was normalized
2796         * fileapi/File.cpp:
2797         (WebCore::createBlobDataForFileWithType): assert that the File's MIME type is a normalized Blob type
2798         * fileapi/WebKitBlobBuilder.cpp:
2799         (WebCore::BlobBuilder::getBlob): normalize the Blob's type before building it
2800         * platform/network/BlobData.h:
2801         (WebCore::BlobData::setContentType): assert that the Blob type has been normalized
2802         * platform/network/FormData.cpp:
2803         (WebCore::FormData::appendKeyValuePairItems): assert that Blob's type has been normalized
2804         * platform/network/FormDataBuilder.cpp:
2805         (WebCore::FormDataBuilder::addContentTypeToMultiPartHeader): assert that the Content-Type field is normalized
2806         * xml/XMLHttpRequest.cpp: when responseType is blob, normalize Content-Type before passing to Blob constructor
2807
2808 2013-04-10  Tim Horton  <timothy_horton@apple.com>
2809
2810         TileController doesn't remove tiles when the view is resized, leading to stale content
2811         https://bugs.webkit.org/show_bug.cgi?id=114323
2812         <rdar://problem/13520671>
2813
2814         Reviewed by Simon Fraser.
2815
2816         Ensure that tiles are removed if the view shrinks, so that they are not displayed
2817         with stale content if the view later grows again (they will not be repainted by WebCore
2818         while out-of-view).
2819
2820         * platform/graphics/ca/mac/TileController.h:
2821         * platform/graphics/ca/mac/TileController.mm:
2822         (WebCore::TileController::revalidateTiles):
2823
2824 2013-04-10  Jessie Berlin  <jberlin@apple.com>
2825
2826         Update the localizable strings file.
2827
2828         Rubber-stamped by Dan Bernstein.
2829
2830         * English.lproj/Localizable.strings:
2831
2832 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
2833
2834         Replace ENABLE_CHANNEL_MESSAGING preprocessor statements in IDL files with Conditional attribute
2835         https://bugs.webkit.org/show_bug.cgi?id=114346
2836
2837         Reviewed by Geoffrey Garen.
2838
2839         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
2840
2841         * page/DOMWindow.idl:
2842         * workers/WorkerContext.idl:
2843
2844 2013-04-10  Eric Carlson  <eric.carlson@apple.com>
2845
2846         Update all float attributes in HTMLMediaElement to double
2847         https://bugs.webkit.org/show_bug.cgi?id=113615
2848
2849         Reviewed by Geoffrey Garen
2850         Patch by Aaron Colwell
2851
2852         No new tests. Primary behavior doesn't change. Just time, playbackRate, and volume precision.
2853         All existing LayoutTests/media tests still pass.
2854
2855         * WebCore.exp.in: Remove function that no longer need to be exported.
2856
2857         * html/HTMLMediaElement.cpp: Change all float attributes to double.
2858         * html/HTMLMediaElement.h: Ditto.
2859         * html/HTMLMediaElement.idl: Ditto.
2860         * html/MediaController.cpp: Ditto.
2861         * html/MediaController.h: Ditto.
2862         * html/MediaControllerInterface.h: Ditto.
2863         * html/TimeRanges.cpp: Ditto.
2864         * html/TimeRanges.idl: Ditto.
2865         * html/shadow/MediaControlElementTypes.cpp: Ditto.
2866         * html/shadow/MediaControlElementTypes.h: Ditto.
2867         * html/shadow/MediaControlElements.cpp: Ditto.
2868         * html/shadow/MediaControlElements.h: Ditto.
2869         * html/shadow/MediaControls.cpp: Ditto.
2870         * html/shadow/MediaControlsApple.cpp: Ditto.
2871         * html/shadow/MediaControlsBlackBerry.cpp: Ditto.
2872         * html/shadow/MediaControlsBlackBerry.h: Ditto.
2873         * html/shadow/MediaControlsGtk.cpp: Ditto.
2874         * html/track/TextTrackCue.cpp: Ditto.
2875         * html/track/TextTrackCue.h: Ditto.
2876         * platform/Clock.h: Ditto.
2877         * platform/ClockGeneric.cpp: Ditto.
2878         * platform/ClockGeneric.h: Ditto.
2879         * platform/graphics/MediaPlayer.cpp: Ditto.
2880         * platform/graphics/MediaPlayer.h: Ditto.
2881         * platform/graphics/MediaPlayerPrivate.h: Ditto.
2882         * platform/mac/PlatformClockCA.cpp: Ditto.
2883         * platform/mac/PlatformClockCA.h: Ditto.
2884         * platform/mac/PlatformClockCM.h: Ditto.
2885         * platform/mac/PlatformClockCM.mm: Ditto.
2886
2887 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
2888
2889         Replace ENABLE_MICRODATA preprocessor statements in IDL files with Conditional attribute
2890         https://bugs.webkit.org/show_bug.cgi?id=114349
2891
2892         Reviewed by Geoffrey Garen.
2893
2894         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
2895
2896         * dom/Document.idl:
2897         * html/HTMLElement.idl:
2898
2899 2013-04-10  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2900
2901         REGRESSION(r148034): IconDatabase::updateIconRecord crashes with null iconData and iconBitmap.
2902         https://bugs.webkit.org/show_bug.cgi?id=114356
2903
2904         Reviewed by Tim Horton.
2905
2906         When loading an icon fails (for example, when a non-existent URI is
2907         passed to the loader), updateIconRecord can be called with both
2908         iconData and iconBitmap having no data.
2909
2910         This used to be fine before r148034, but causes an assertion now.
2911
2912         No new tests, existing tests such as fast/encoding/mispositioned-meta.html
2913         were crashing.
2914
2915         * loader/icon/IconDatabase.cpp:
2916         (WebCore::IconDatabase::updateIconRecord): Change the ASSERT() to check
2917         for a NAND condition that only fails if both iconData and iconBitmap
2918         are not 0.
2919
2920 2013-04-10  JungJik Lee  <jungjik.lee@samsung.com>
2921
2922         [Texmap] Update a dirty region which is not covered with keepRect.
2923         https://bugs.webkit.org/show_bug.cgi?id=113752
2924
2925         Reviewed by Jocelyn Turcotte.
2926
2927         There can be a dirty region which is not covered with keepRect. 
2928         However the dirty could be inside the tile area. In this case, 
2929         currently we ignore the dirty by intersecting with keepRect 
2930         and the dirty region will not be invalidated until the tile is 
2931         recreated. We must expand the keep rect to its intersecting tiles 
2932         to make sure that the dirty region is applied to existing tiles. 
2933
2934         No tests needed, change is unobservable.
2935
2936         * platform/graphics/TiledBackingStore.cpp:
2937         (WebCore::TiledBackingStore::invalidate):
2938
2939 2013-04-10  Laszlo Gombos  <l.gombos@samsung.com>
2940
2941         Remove ENABLE_3D_PLUGIN
2942         https://bugs.webkit.org/show_bug.cgi?id=108002
2943
2944         Remove ENABLE_3D_PLUGIN, it was only used by Chromium.
2945
2946         Reviewed by Antti Koivisto.
2947
2948         No new tests, removing dead code.
2949
2950         * loader/SubframeLoader.cpp:
2951         (WebCore::SubframeLoader::loadPlugin):
2952
2953 2013-04-10  Noam Rosenthal  <noam@webkit.org>
2954
2955         [Texmap] Hierarchy of layers with opacity may result in wrong blending.
2956         https://bugs.webkit.org/show_bug.cgi?id=113732
2957
2958         Reviewed by Allan Sandfeld Jensen.
2959
2960         This is a combination of three issues with nested intermediate surfaces:
2961         - glScissor inside an intermediate surface should not be mirrored.
2962         - The current surface should be passed to the next surface in paintOptions.
2963         - When clipping for the non-overlap region, the containing surface offset 
2964         should be applied.
2965
2966         Though the changes are separate, they cannot be tested separately as neither
2967         fixes a testable case on its own. 
2968
2969         Tests: compositing/overlap-blending/nested-non-overlap-clipping.html
2970                compositing/overlap-blending/nested-overlap.html
2971
2972         * platform/graphics/texmap/TextureMapperGL.cpp:
2973         (WebCore::TextureMapperGL::ClipStack::reset):
2974         (WebCore::TextureMapperGL::ClipStack::apply):
2975         (WebCore::TextureMapperGL::beginPainting):
2976         (WebCore::BitmapTextureGL::clearIfNeeded):
2977         * platform/graphics/texmap/TextureMapperGL.h:
2978         (ClipStack):
2979             Do not mirror the scissor clip when painting to an FBO.
2980             Also a minor refactor to avoid reading the viewport values from the driver.
2981
2982         * platform/graphics/texmap/TextureMapperLayer.cpp:
2983         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
2984             Apply the offset when clipping for a non-overlap region.
2985         (WebCore::TextureMapperLayer::paintIntoSurface):
2986             Make sure the current surface is passed to the next one.
2987
2988 2013-04-10  Antti Koivisto  <antti@apple.com>
2989
2990         Create fewer tiles when page is loading
2991         https://bugs.webkit.org/show_bug.cgi?id=114294
2992
2993         Reviewed by Anders Carlsson.
2994
2995         We currently create speculative tiles immediately. Page is often changing rapidly during loading and
2996         keeping the speculative tiles up to date creates extra work.
2997         
2998         Tests: platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html
2999                platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html
3000         
3001        * loader/FrameLoader.cpp:
3002         (WebCore::FrameLoader::loadProgressingStatusChanged):
3003         * page/FrameView.cpp:
3004         (WebCore::FrameView::adjustTiledBackingCoverage):
3005         (WebCore::FrameView::setWasScrolledByUser):
3006         
3007             User scrolling enables speculative tiling no matter what the load status.
3008
3009         * page/FrameView.h:
3010         * rendering/RenderLayerBacking.cpp:
3011         (WebCore::computeTileCoverage):
3012         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
3013         
3014             Cover only the viewport during loading.
3015
3016 2013-04-10  Alberto Garcia  <agarcia@igalia.com>
3017
3018         [BlackBerry] RenderThemeBlackBerry: get rid of all the SKIA code
3019         https://bugs.webkit.org/show_bug.cgi?id=114339
3020
3021         Reviewed by Carlos Garcia Campos.
3022
3023         * platform/blackberry/RenderThemeBlackBerry.cpp:
3024         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
3025         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
3026         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
3027         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderThumb):
3028
3029 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
3030
3031         REGRESSION (r147719): Failures in two a11y tests on GTK
3032         https://bugs.webkit.org/show_bug.cgi?id=114259
3033
3034         Reviewed by Ryosuke Niwa.
3035
3036         No new tests - covered by existing tests.
3037
3038         Partially revert r147719, restoring the possible creation of the AXObject cache 
3039         and the subsequent call to its handleFocusedUIElementChanged method. Removing this
3040         code caused regressions in accessibility tests on the GTK port, so the comment about
3041         the AXObject cache is adjusted accordingly.
3042
3043         * dom/Document.cpp:
3044         (WebCore::Document::setFocusedNode):
3045
3046 2013-04-09  Philippe Normand  <pnormand@igalia.com>
3047
3048         [GStreamer] playbin uri getter is invalid
3049         https://bugs.webkit.org/show_bug.cgi?id=113884
3050
3051         Reviewed by Martin Robinson.
3052
3053         When loading a new media location use the url stored as a member
3054         variable instead of the one stored as a playbin property. The uri
3055         property semantic changed in playbin since 0.10.36+. One should
3056         now use current-uri but to avoid ifdefs depending on GStreamer
3057         version we simply use the url already known as member variable.
3058
3059         Test: http/tests/media/video-redirect.html
3060
3061         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3062
3063 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
3064
3065         [JSC] Script run from an isolated world should bypass a page's CSP
3066         https://bugs.webkit.org/show_bug.cgi?id=100815
3067
3068         Reviewed by Oliver Hunt.
3069
3070         * bindings/js/ScriptController.cpp:
3071         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
3072         * bindings/js/ScriptController.h: Test the current caller's DOM wrapper
3073         world to decide whether CSP should be enforced.
3074
3075         Like most of CSP, this is a stupid policy because it doesn't address
3076         second-order effects like <script> parsing or event handler execution,
3077         which might be triggered indirectly by privileged scripts. These indirect
3078         effects are still broken. Oh well.
3079
3080 2013-04-09  Benjamin Poulain  <bpoulain@apple.com>
3081
3082         Remove chromium exceptions from WebCore's gitattributes
3083         https://bugs.webkit.org/show_bug.cgi?id=114327
3084
3085         Reviewed by Darin Adler.
3086
3087         * .gitattributes:
3088
3089 2013-04-09  Adam Klein  <adamk@chromium.org>
3090
3091         Update Document's event listener type bitfield when adopting a Node
3092         https://bugs.webkit.org/show_bug.cgi?id=114322
3093
3094         Reviewed by Darin Adler.
3095
3096         Without this, moving a Node between documents can silently deactivate
3097         an event listener, if it's one of the types that whose creation is
3098         optimized away by Document::hasListenerType.
3099
3100         An alternate approach would be to simply copy the old document's
3101         bitfield over. It's a tradeoff between making adoption fast and making
3102         the operation of any operation depending on these event types fast.
3103         The latter seems like the right optimization given that adoption
3104         doesn't happen very often.
3105
3106         Test: fast/events/event-listener-moving-documents.html
3107
3108         * dom/Node.cpp:
3109         (WebCore::Node::didMoveToNewDocument): For each event listener type on the adopted node, update the new document's list of listener types.
3110
3111 2013-04-09  Dean Jackson  <dino@apple.com>
3112
3113         Add logging channel for animations
3114         https://bugs.webkit.org/show_bug.cgi?id=114325
3115
3116         Reviewed by Simon Fraser.
3117
3118         * platform/Logging.cpp: Add LogAnimations.
3119         (WebCore::getChannelFromName): Return LogAnimations for "Animations".
3120         * platform/Logging.h: Add LogAnimations.
3121         * platform/mac/LoggingMac.mm:
3122         (WebCore::initializeLoggingChannelsIfNecessary): Copy preference.
3123         * platform/win/LoggingWin.cpp:
3124         (WebCore::initializeLoggingChannelsIfNecessary): Copy preference.
3125
3126 2013-04-09  Dongwoo Joshua Im  <dw.im@samsung.com>
3127
3128         [CSS3] Parsing the property, text-justify.
3129         https://bugs.webkit.org/show_bug.cgi?id=100058
3130
3131         Reviewed by Andreas Kling.
3132
3133         This patch implements the parsing side of the "text-justify" property specified
3134         in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag.
3135         Specification link : http://www.w3.org/TR/css3-text/#text-justify
3136
3137         Tests: fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html
3138                fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html
3139
3140         * css/CSSComputedStyleDeclaration.cpp:
3141         (WebCore):
3142         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3143         * css/CSSParser.cpp:
3144         (WebCore::isValidKeywordPropertyAndValue):
3145         (WebCore::isKeywordPropertyID):
3146         (WebCore::CSSParser::parseValue):
3147         * css/CSSPrimitiveValueMappings.h:
3148         (WebCore):
3149         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3150         (WebCore::CSSPrimitiveValue::operator TextJustify):
3151         * css/CSSProperty.cpp:
3152         (WebCore::CSSProperty::isInheritedProperty):
3153         * css/CSSPropertyNames.in:
3154         * css/CSSValueKeywords.in:
3155         * css/StyleBuilder.cpp:
3156         (WebCore::StyleBuilder::StyleBuilder):
3157         * css/StylePropertySet.cpp:
3158         (WebCore):
3159         * css/StyleResolver.cpp:
3160         (WebCore::StyleResolver::applyProperty):
3161         * rendering/style/RenderStyle.h:
3162         * rendering/style/RenderStyleConstants.h:
3163         * rendering/style/StyleRareInheritedData.cpp:
3164         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3165         (WebCore::StyleRareInheritedData::operator==):
3166         * rendering/style/StyleRareInheritedData.h:
3167         (StyleRareInheritedData):
3168
3169 2013-04-09  Joone Hur  <joone.hur@intel.com>
3170
3171         [GTK][AC] Adding contentsLayer for image and video
3172         https://bugs.webkit.org/show_bug.cgi?id=113912
3173
3174         Reviewed by Gustavo Noronha Silva.
3175
3176         contentsLayer is a ClutterActor, which is added to the main layer 
3177         as a child when GraphicsLayer needs to render an image or video. 
3178
3179         No new tests, already covered by existing AC tests.
3180
3181         * platform/graphics/clutter/GraphicsLayerActor.cpp:
3182         (graphicsLayerActorUpdateTexture):
3183         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
3184         (WebCore::GraphicsLayerClutter::GraphicsLayerClutter):
3185         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
3186         (WebCore):
3187         (WebCore::GraphicsLayerClutter::setContentsToImage): Pass a Cairo surface to GraphicsLayer.
3188         (WebCore::GraphicsLayerClutter::setContentsNeedsDisplay):
3189         (WebCore::GraphicsLayerClutter::setContentsRect):
3190         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
3191         (WebCore::GraphicsLayerClutter::setupContentsLayer):
3192         (WebCore::GraphicsLayerClutter::updateContentsImage): Set the Cairo surface for contentsLayer 
3193         to upload it as a texture.
3194         (WebCore::GraphicsLayerClutter::updateContentsNeedsDisplay):
3195         (WebCore::GraphicsLayerClutter::updateContentsRect):
3196         (WebCore::GraphicsLayerClutter::updateSublayerList):
3197         * platform/graphics/clutter/GraphicsLayerClutter.h:
3198         (WebCore::GraphicsLayerClutter::hasContentsLayer):
3199         (GraphicsLayerClutter):
3200         (WebCore::GraphicsLayerClutter::contentsLayer):
3201
3202 2013-04-09  Alexey Proskuryakov  <ap@apple.com>
3203
3204         REGRESSION: Blob URLs broken with NetworkProcess
3205         https://bugs.webkit.org/show_bug.cgi?id=114320
3206
3207         Reviewed by Brady Eidson.
3208
3209         Update BlobResourceHandle to use modern resource client calls.
3210
3211         * platform/network/BlobResourceHandle.cpp:
3212         (WebCore::BlobResourceHandle::readSync): Don't call notifyReceiveData if there is
3213         no data (it's especially egregious when length is -1, signaling an error).
3214         (WebCore::BlobResourceHandle::notifyResponseOnSuccess): Use didReceiveResponseAsync
3215         when a client wants async callbacks. This is not very clean, as we don't wait
3216         for response, but should be workable for blobs.
3217         (WebCore::BlobResourceHandle::notifyResponseOnError): Ditto.
3218         (WebCore::BlobResourceHandle::notifyReceiveData): Use didReceiveBuffer (clients
3219         that only implement didReceiveData will have it automatically unwrapped).
3220
3221 2013-04-09  Jer Noble  <jer.noble@apple.com>
3222
3223         REGRESSION (r123837): Full screen transition is broken at apple.com
3224         https://bugs.webkit.org/show_bug.cgi?id=95650
3225
3226         Reviewed by Simon Fraser.
3227
3228         Cancel any outstanding animations on <video> elements as they enter full screen, so as to
3229         not confuse the WebKit/WebKit2 full screen window animation about the starting and destination
3230         screen rects.
3231
3232         * css/fullscreen.css:
3233         (video:-webkit-full-screen, audio:-webkit-full-screen):
3234
3235 2013-04-09  Jer Noble  <jer.noble@apple.com>
3236
3237         hang in mediaSelectionGroupForMediaCharacteristic
3238         https://bugs.webkit.org/show_bug.cgi?id=114054
3239
3240         Reviewed by Eric Carlson.
3241
3242         No new tests; Fixes sporadic hangs in media/ tests.
3243
3244         -[AVURLAsset mediaSelectionGroupForMediaCharacteristic:] can deadlock in certain situations: When AVURLAsset
3245         posts a synchronous AVAssetResourceLoader notification to the main thread, calling -mediaSelectionGroupForMediaCharacteristic:
3246         on the main thread requires IO to occur if the media characteristics are not yet loaded. Instead of blocking,
3247         bail out early if the media characteristics are not yet known.
3248         
3249         Add a new method, safeMediaSelectionGroupForLegibleMedia(), which first checks selection group availability
3250         before calling mediaSelectionGroupForMediaCharacteristic:.
3251
3252         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3253         (MediaPlayerPrivateAVFoundationObjC):
3254         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3255         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Added.
3256         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use new safe method.
3257         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Ditto.
3258         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Ditto.
3259         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Ditto.
3260
3261 2013-04-09  Chris Fleizach  <cfleizach@apple.com>
3262
3263         AX: Bounding paths should be made available through accessibility
3264         https://bugs.webkit.org/show_bug.cgi?id=113817
3265
3266         Unreviewed build fix for iOS.
3267
3268         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3269         (-[WebAccessibilityObjectWrapper _accessibilityPath]):
3270         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3271
3272 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
3273
3274         Unreviewed correctness fix: use lroundf instead of lround for a float to int conversion.
3275
3276         * html/shadow/MediaControlElements.cpp:
3277         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
3278
3279 2013-04-06  Roger Fong  <roger_fong@apple.com>
3280
3281         Change requisite hardware checks for enabling antialiasing.
3282         https://bugs.webkit.org/show_bug.cgi?id=114101
3283         <rdar://problem/12342776>.
3284
3285         m_maySupportMultisampling should be true by default for all platforms/hardware now except older versions of AMD.
3286
3287         Reviewed by Dean Jackson.
3288
3289         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3290         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
3291
3292 2013-04-09  Commit Queue  <rniwa@webkit.org>
3293
3294         Unreviewed, rolling out r148010.
3295         http://trac.webkit.org/changeset/148010
3296         https://bugs.webkit.org/show_bug.cgi?id=114310
3297
3298         Causes problems with focus rings (Requested by anttik on
3299         #webkit).
3300
3301         * css/StyleBuilder.cpp:
3302         (WebCore::ApplyPropertyComputeLength::applyValue):
3303         (WebCore::ApplyPropertyComputeLength::createHandler):
3304         (WebCore::StyleBuilder::StyleBuilder):
3305
3306 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
3307
3308         Unreviewed, another fix for the Windows build after r148050.
3309
3310         * html/track/TextTrackCueGeneric.cpp:
3311         (WebCore::TextTrackCueGeneric::setFontSize): Use lround().
3312
3313 2013-04-09  Bem Jones-Bey  <bjonesbe@adobe.com>
3314
3315         [CSS Exclusions] Properly position multiple stacked floats with non rectangular shape outside
3316         https://bugs.webkit.org/show_bug.cgi?id=110372
3317
3318         Reviewed by Dean Jackson.
3319
3320         Stacked floats get positioned based on the bounding box of the shape,
3321         not on the shape contours itself. This patch causes that to happen.
3322
3323         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-stacked.html
3324
3325         * rendering/RenderBlock.cpp:
3326         (WebCore::RenderBlock::computeLogicalLocationForFloat): Use the
3327             "BoundingBoxOffset" mode so that we compute offsets based on the shape
3328             bounding boxes of previous floats, not the shape contour.
3329         (WebCore::RenderBlock::logicalLeftOffsetForLine): Check the
3330             ShapeOutsideFloatOffsetMode to determine if the offset should be
3331             adjusted for the shape contour or not.
3332         (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
3333         * rendering/RenderBlock.h:
3334         (WebCore::RenderBlock::logicalRightOffsetForLine): Add parameter for offset mode.
3335         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
3336         (RenderBlock):
3337         * rendering/RenderBlockLineLayout.cpp:
3338         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): If the
3339             new float is being added on top of a previous float on the same line,
3340             undo the offset for the previous float's shape contour so that we
3341             position the new float based on the bounding box.
3342
3343 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
3344
3345         Unreviewed, fix the Windows build after r148050.
3346
3347         * html/shadow/MediaControlElements.cpp:
3348         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Use lround().
3349
3350 2013-04-09  Tim Horton  <timothy_horton@apple.com>
3351
3352         [wk2] IconDatabase images should be decoded in the WebProcess
3353         ​https://bugs.webkit.org/show_bug.cgi?id=112524
3354         <rdar://problem/10133914>
3355
3356         Reviewed by Simon Fraser.
3357
3358         Move an ASSERT that dereferenced a pointer inside the null-check for that pointer.
3359
3360         * loader/icon/IconDatabase.cpp:
3361         (WebCore::IconDatabase::setIconBitmapForIconURL):
3362
3363 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
3364
3365         [Mac] user caption styles not applied to correct element
3366         https://bugs.webkit.org/show_bug.cgi?id=114230
3367
3368         Reviewed by Jer Noble.
3369
3370         Test: media/track/track-css-user-override.html
3371
3372         * html/HTMLMediaElement.cpp:
3373         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive by clean-up so we don't log excessively.
3374
3375         * html/shadow/MediaControlElements.cpp:
3376         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
3377             new member variables.
3378         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Set cue font size when it is
3379             inserted into the tree.
3380         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Update the font size of 
3381             all active cues.
3382         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set size-relative CSS properties
3383             after a time because this can be called during layout.
3384         * html/shadow/MediaControlElements.h:
3385
3386         * html/shadow/MediaControls.cpp:
3387         (WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged before updateSizes.
3388
3389         * html/track/TextTrackCue.cpp:
3390         (WebCore::TextTrackCue::setFontSize): New, set the cue's font size.
3391         * html/track/TextTrackCue.h:
3392
3393         * html/track/TextTrackCueGeneric.cpp:
3394         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set cue properties on the cue element
3395             instead of on the cue box to match what we do for the "cue" pseudo element.
3396         (WebCore::TextTrackCueGeneric::setFontSize): New, set the cue's font size.
3397         * html/track/TextTrackCueGeneric.h:
3398
3399         * html/track/TextTrackList.cpp:
3400         (TextTrackList::remove): Drive-by cleanup, don't ASSERT when the media element is NULL.
3401
3402         * page/CaptionUserPreferences.cpp:
3403         (WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride): New, allow user CSS overrides
3404             to be tested in DRT.
3405         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): New, generate a user style
3406             sheet override. Moved here from CaptionUserPreferencesMac.
3407         * page/CaptionUserPreferences.h:
3408
3409         * page/CaptionUserPreferencesMac.h:
3410         * page/CaptionUserPreferencesMac.mm:
3411         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Don't ignore background color importance.
3412         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Implement even when we don't 
3413             have the media accessibility framework so this can be tested in DRT. Apply all cue properties
3414             to the element used for the "cue" pseudo element.
3415
3416         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3417         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress): Drive-by cleanup, remove logging
3418             because this method is called so frequently and the logging is not especially useful.
3419         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Only log when the ready/network
3420             state changes because this method is called so frequently.
3421
3422         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3423         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): Drive-by cleanup, remove logging
3424             because this method is called so frequently and the logging is not especially useful.
3425         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Make the logging more useful.
3426
3427         * testing/Internals.cpp:
3428         (WebCore::Internals::resetToConsistentState): Reset captions style sheet override.
3429         (WebCore::Internals::captionsStyleSheetOverride): New, return the captions style sheet override.
3430         (WebCore::Internals::setCaptionsStyleSheetOverride): New, override the captions style sheet override.
3431         * testing/Internals.h:
3432         * testing/Internals.idl:
3433
3434 2013-04-08  Simon Fraser  <simon.fraser@apple.com>
3435
3436         Repaint rect too small on elements with shadows
3437         https://bugs.webkit.org/show_bug.cgi?id=114225
3438
3439         Reviewed by Dain Adler.
3440         
3441         We assumed that shadows (box-shadow, text-shadow, svg shadows)
3442         only required inflating the repaint rect by the blur radius of
3443         the shadow. However, this is incorrect; the shadow can extend
3444         further, which resulted in clipped or incorrectly invalidated
3445         shadows.
3446         
3447         Fix by disambiguating the blur radius (which is 2x the standard
3448         deviation of the Gaussian distribution used to generate the blur),
3449         from the painting extent, which is how far the shadow visually
3450         projects. Using a 1.4 multiplier of the blur radius is a good
3451         approximation for the painting extent.
3452         
3453         Renamed ShadowData::blur() to ShadowData::radius(), and added
3454         ShadowData::paintingExtent(). Use the latter in all places
3455         which relate to invalidation.
3456
3457         Test: fast/box-shadow/shadow-repaint.html
3458
3459         * css/CSSComputedStyleDeclaration.cpp:
3460         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
3461         * editing/mac/EditorMac.mm:
3462         (WebCore::Editor::fontAttributesForSelectionStart):
3463         * page/animation/CSSPropertyAnimation.cpp:
3464         (WebCore::blendFunc):
3465         * rendering/EllipsisBox.cpp: