Web Inspector: show whitespace characters in DTE
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-09  Andrey Lushnikov  <lushnikov@chromium.org>
2
3         Web Inspector: show whitespace characters in DTE
4         https://bugs.webkit.org/show_bug.cgi?id=108947
5
6         Reviewed by Pavel Feldman.
7
8         New test: inspector/editor/text-editor-show-whitespaces.html
9
10         Split consecutive whitespace characters into groups of 16, 8, 4, 2 and 1 and
11         add ::before pseudoclass for this groups which contains necessary
12         amount of "dots" (u+00b7). Add a setting "Show whitespace" for this
13         option in "Sources" section of "General" tab.
14
15         * English.lproj/localizedStrings.js:
16         * inspector/front-end/DefaultTextEditor.js:
17         (WebInspector.TextEditorMainPanel.prototype.wasShown):
18         (WebInspector.TextEditorMainPanel.prototype.willHide):
19         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
20         (WebInspector.TextEditorMainPanel.prototype._renderWhitespaceCharsWithFixedSizeSpans):
21         (WebInspector.TextEditorMainPanel.prototype._paintLine):
22         * inspector/front-end/Settings.js:
23         * inspector/front-end/SettingsScreen.js:
24         (WebInspector.GenericSettingsTab):
25         * inspector/front-end/inspectorSyntaxHighlight.css:
26         (.webkit-whitespace-1::before):
27         (.webkit-whitespace-2::before):
28         (.webkit-whitespace-4::before):
29         (.webkit-whitespace-8::before):
30         (.webkit-whitespace-16::before):
31         (.webkit-whitespace::before):
32
33 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
34
35         [Mac] respect in-band caption color
36         https://bugs.webkit.org/show_bug.cgi?id=109203
37
38         Reviewed by Dean Jackson.
39
40         Test: media/track/track-in-band-style.html
41
42         * WebCore.xcodeproj/project.pbxproj: Add HTMLDivElement.h to private headers because it is 
43             included by HTMLTextElement, which is included by HTMLMediaElement.h, which is included 
44             by files in WebKit/WebKit2.
45         * html/track/InbandTextTrack.cpp:
46         (WebCore::InbandTextTrack::addGenericCue): Set cue colors if necessary.
47
48         * html/track/TextTrackCue.h:
49         (WebCore::TextTrackCue::element): New, accessor for the cue element so it can be styled.
50
51         * html/track/TextTrackCueGeneric.cpp:
52         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set container and cue background 
53             color if necessary.
54         (WebCore::TextTrackCueGeneric::operator==): Compare cue colors.
55         * html/track/TextTrackCueGeneric.h:
56         (WebCore::TextTrackCueGeneric::foregroundColor): Add color accessors.
57         (WebCore::TextTrackCueGeneric::setForegroundColor):
58         (WebCore::TextTrackCueGeneric::backgroundColor):
59         (WebCore::TextTrackCueGeneric::setBackgroundColor):
60
61         * page/CaptionUserPreferencesMac.mm:
62         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Always
63             regenerate override CSS when an element registers for callbacks.
64         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Drive by fix of "window color" padding.
65         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Log the stylesheet generated
66             for easier debugging.
67
68         * platform/graphics/InbandTextTrackPrivateClient.h:
69         (WebCore::GenericCueData::foregroundColor): Add color getters/setters.
70         (WebCore::GenericCueData::setForegroundColor):
71         (WebCore::GenericCueData::backgroundColor):
72         (WebCore::GenericCueData::setBackgroundColor):
73
74         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
75         (WebCore::makeRGBA32FromARGBCFArray): Initialize a RGBA32 from a CFArray of color values.
76         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process cue colors.
77
78 2013-02-08  Benjamin Poulain  <bpoulain@apple.com>
79
80         Move workerThreadCount from TestRunner to WebCore Internals
81         https://bugs.webkit.org/show_bug.cgi?id=109239
82
83         Reviewed by Darin Adler.
84
85         Add the new read-only property workerThreadCount.
86
87         * testing/Internals.cpp:
88         (WebCore::Internals::workerThreadCount):
89         (WebCore):
90         * testing/Internals.h:
91         (Internals):
92         * testing/Internals.idl:
93
94 2013-02-08  Dean Jackson  <dino@apple.com>
95
96         Snapshotted plug-in should use shadow root
97         https://bugs.webkit.org/show_bug.cgi?id=108284
98
99         Reviewed by Simon Fraser.
100
101         Take two! This time with updated exports file.
102
103         A snapshotted plugin needs to indicate to the user that it can be clicked
104         to be restarted. Previously this was done with an image that had embedded
105         text. Instead, we now use an internal shadow root to embed some markup that
106         will display instructions that can be localised.
107
108         The UA stylesheet for plug-ins provides a default styling for the label, which
109         can be overridden by ports.
110
111         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
112         since it is only responsible for drawing a paused plug-in. The snapshot creation
113         can work with the default renderer, but a shadow root requires something like
114         RenderBlock in order to draw its children. We swap from one renderer to another when
115         necessary either by creating the shadow root or by explicitly detaching and attaching
116         the plugin element.
117
118         Unfortunately this is difficult to test, because the snapshotting requires
119         time to execute, and also a PluginView to be instantiated.
120
121         * WebCore.exp.in: Export the InlineBox interface.
122
123         * css/plugIns.css:
124         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
125
126         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
127         * platform/LocalizedStrings.h:
128         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
129         * platform/chromium/LocalizedStringsChromium.cpp:
130         * platform/efl/LocalizedStringsEfl.cpp:
131         * platform/gtk/LocalizedStringsGtk.cpp:
132         * platform/qt/LocalizedStringsQt.cpp:
133
134         * html/HTMLPlugInElement.cpp:
135         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
136         that RenderSnapshottedPlugIn no longer is an embedded object.
137
138         * html/HTMLPlugInImageElement.cpp:
139         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
140         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
141         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
142         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
143             a renderer, otherwise use the typical plug-in path.
144         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
145             need to give it to the renderer.
146         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
147         * html/HTMLPlugInImageElement.h:
148         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
149             should show immediately.
150         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
151             to swap to the Shadow Root.
152         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
153             in being recreated. Make sure we reattach so that a plugin renderer will be created.
154         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
155             displayState for snapshots.
156         * html/HTMLPlugInImageElement.h:
157         (HTMLPlugInImageElement): The new methods listed above.
158         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
159             a snapshot should be immediately labeled.
160
161         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
162
163         * rendering/RenderSnapshottedPlugIn.cpp:
164         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
165         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
166         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
167         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
168         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
169         (WebCore::RenderSnapshottedPlugIn::getCursor):
170         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
171         * rendering/RenderSnapshottedPlugIn.h:
172         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
173
174 2013-02-08  Dean Jackson  <dino@apple.com>
175
176         Rolling out r142333 and r142337 which broke Mac Release builds.
177
178 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
179
180         Unreviewed, rolling out r142337.
181         http://trac.webkit.org/changeset/142337
182         https://bugs.webkit.org/show_bug.cgi?id=109339
183
184         Breaking Mac release builds (Requested by dino_ on #webkit).
185
186         * rendering/RenderSnapshottedPlugIn.h:
187
188 2013-02-08  Dean Jackson  <dino@apple.com>
189
190         Attempted Mac and GTK build fix after r142333.
191
192         * rendering/RenderSnapshottedPlugIn.h: Include InlineBox.h.
193
194 2013-02-08  Andy Estes  <aestes@apple.com>
195
196         Restore pre-r118852 behavior for EllipsisBox::nodeAtPoint()
197         https://bugs.webkit.org/show_bug.cgi?id=109277
198
199         Reviewed by Simon Fraser.
200
201         Test: fast/flexbox/line-clamp-link-after-ellipsis.html
202
203         Roll out r118852. Enough time has passed that this can't be done
204         mechanically, so transcribe the old method definition to current
205         WebCore interfaces.
206
207         * rendering/EllipsisBox.cpp:
208         (WebCore::EllipsisBox::markupBox): EllipsisBox no longer has
209         m_markupBox, so break the logic for finding the markup box from
210         paintMarkupBox() into its own function.
211         (WebCore::EllipsisBox::paintMarkupBox): Call markupBox().
212         (WebCore::EllipsisBox::nodeAtPoint): Transcribe the pre-r118852 implementation.
213         * rendering/EllipsisBox.h:
214         (EllipsisBox): Declare markupBox().
215
216 2013-02-08  Eric Carlson  <eric.carlson@apple.com>
217
218         [Mac] In-band closed caption tracks are not always initialized correctly
219         https://bugs.webkit.org/show_bug.cgi?id=109323
220
221         Reviewed by Dean Jackson.
222
223         No new tests, this fix makes existing tests less flakey.
224
225         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
226         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Create and configure legible output
227             here instad of in tracksChanged.
228         (WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing in a build with
229             in-band track support.
230         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Move legible output creation to 
231             createAVPlayerItem, don't set look at track media type to see if the movie has captions 
232             when we have support for in-band captions.
233
234 2013-02-08  Dean Jackson  <dino@apple.com>
235
236         Snapshotted plug-in should use shadow root
237         https://bugs.webkit.org/show_bug.cgi?id=108284
238
239         Reviewed by Simon Fraser.
240
241         A snapshotted plugin needs to indicate to the user that it can be clicked
242         to be restarted. Previously this was done with an image that had embedded
243         text. Instead, we now use an internal shadow root to embed some markup that
244         will display instructions that can be localised.
245
246         The UA stylesheet for plug-ins provides a default styling for the label, which
247         can be overridden by ports.
248
249         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
250         since it is only responsible for drawing a paused plug-in. The snapshot creation
251         can work with the default renderer, but a shadow root requires something like
252         RenderBlock in order to draw its children. We swap from one renderer to another when
253         necessary either by creating the shadow root or by explicitly detaching and attaching
254         the plugin element.
255
256         Unfortunately this is difficult to test, because the snapshotting requires
257         time to execute, and also a PluginView to be instantiated.
258
259         * css/plugIns.css:
260         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
261
262         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
263         * platform/LocalizedStrings.h:
264         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
265         * platform/chromium/LocalizedStringsChromium.cpp:
266         * platform/efl/LocalizedStringsEfl.cpp:
267         * platform/gtk/LocalizedStringsGtk.cpp:
268         * platform/qt/LocalizedStringsQt.cpp:
269
270         * html/HTMLPlugInElement.cpp:
271         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
272         that RenderSnapshottedPlugIn no longer is an embedded object.
273
274         * html/HTMLPlugInImageElement.cpp:
275         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
276         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
277         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
278         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
279             a renderer, otherwise use the typical plug-in path.
280         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
281             need to give it to the renderer.
282         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
283         * html/HTMLPlugInImageElement.h:
284         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
285             should show immediately.
286         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
287             to swap to the Shadow Root.
288         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
289             in being recreated. Make sure we reattach so that a plugin renderer will be created.
290         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
291             displayState for snapshots.
292         * html/HTMLPlugInImageElement.h:
293         (HTMLPlugInImageElement): The new methods listed above.
294         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
295             a snapshot should be immediately labeled.
296
297         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
298
299         * rendering/RenderSnapshottedPlugIn.cpp:
300         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
301         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
302         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
303         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
304         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
305         (WebCore::RenderSnapshottedPlugIn::getCursor):
306         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
307         * rendering/RenderSnapshottedPlugIn.h:
308         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
309
310 2013-02-08  Kentaro Hara  <haraken@chromium.org>
311
312         {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator should be in FocusEvent.cpp
313         https://bugs.webkit.org/show_bug.cgi?id=109265
314
315         Reviewed by Dimitri Glazkov.
316
317         Conventionally we put XXXEventDispatchMediator to XXXEvent.cpp.
318         We should move {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator to FocusEvent.cpp.
319
320         No tests. No change in behavior.
321
322         * dom/EventDispatchMediator.cpp:
323         * dom/EventDispatchMediator.h:
324         * dom/FocusEvent.cpp:
325         (WebCore::FocusEventDispatchMediator::create):
326         (WebCore):
327         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
328         (WebCore::FocusEventDispatchMediator::dispatchEvent):
329         (WebCore::BlurEventDispatchMediator::create):
330         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
331         (WebCore::BlurEventDispatchMediator::dispatchEvent):
332         (WebCore::FocusInEventDispatchMediator::create):
333         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
334         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
335         (WebCore::FocusOutEventDispatchMediator::create):
336         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
337         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
338         * dom/FocusEvent.h:
339         (WebCore):
340         (FocusEventDispatchMediator):
341         (BlurEventDispatchMediator):
342         (FocusInEventDispatchMediator):
343         (FocusOutEventDispatchMediator):
344         * dom/UIEvent.cpp:
345         * dom/UIEvent.h:
346
347 2013-02-08  Jer Noble  <jer.noble@apple.com>
348
349         Unreviewed build fix. MSVC (and other compilers) need a default: case in switch statement.
350
351         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
352         (WebCore::notificationName):
353
354 2013-02-08  Jer Noble  <jer.noble@apple.com>
355
356         Bring WebKit up to speed with latest Encrypted Media spec.
357         https://bugs.webkit.org/show_bug.cgi?id=97037
358
359         Reviewed by Eric Carlson.
360
361         The most recent version of the Encrypted Media Extensions spec breaks functionality out of the
362         HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality
363         has been pulled out of the media element, we create a proxy CDM class and factory system for
364         creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent
365         into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and
366         keymessage events, respectively.
367
368         Tests: media/encrypted-media/encrypted-media-v2-events.html
369                media/encrypted-media/encrypted-media-v2-syntax.html
370
371         CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM
372         implementation is registered with the CDMFactory and will be created if that implementation supports
373         the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed
374         by concrete CDMPrivate subclasses.  Its lifetime is owned by MediaKeySession.
375         * Modules/encryptedmedia/CDM.cpp: Added.
376         (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here.
377         (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers.
378         (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system.
379         (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported.
380         (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string.
381         (WebCore::CDM::create): Simple constructor wrapper.
382         (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation.
383         (WebCore::CDM::~CDM): Simple destructor.
384         (WebCore::CDM::createSession): Creates a new CDMSession.
385         * Modules/encryptedmedia/CDM.h: Added.
386         (WebCore::CDM::keySystem): Simple accessor for m_keySystem.
387         (WebCore::CDMSession::CDMSession): Simple constructor.
388         (WebCore::CDMSession::~CDMSession): Simple destructor.
389         * Modules/encryptedmedia/CDMPrivate.h: Added.
390         (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor.
391         (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor.
392
393         The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of
394         the original MediaKeyMessageEvent.
395         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp.
396         (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL
397             parameters.
398         (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor.
399         (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor.
400         (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName.
401         * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
402         (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper.
403         (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message.
404         (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL.
405         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
406         * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h.
407         (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter.
408         (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor.
409         (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor.
410         (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName.
411         * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h.
412         (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper.
413         (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData.
414         * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl.
415
416         MediaKeySession is a new class that maps keys and key requests to a given session ID:
417         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
418         (WebCore::MediaKeySession::create): Simple construction wrapper.
419         (WebCore::MediaKeySession::MediaKeySession): Simple constructor.
420         (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close().
421         (WebCore::MediaKeySession::setError): Simple setter for m_error;
422         (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys.
423         (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired.
424         (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request.
425         (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired.
426         (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM.
427         * Modules/encryptedmedia/MediaKeySession.h: Added.
428         (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem.
429         (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId.
430         (WebCore::MediaKeySession::error): Simple accessor for m_error;
431         * Modules/encryptedmedia/MediaKeySession.idl:
432
433         MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class:
434         * Modules/encryptedmedia/MediaKeySession.cpp: Added.
435         (WebCore::MediaKeySession::interfaceName):
436         * Modules/encryptedmedia/MediaKeySession.h: Added.
437         (WebCore::MediaKeySession::refEventTarget):
438         (WebCore::MediaKeySession::derefEventTarget):
439         (WebCore::MediaKeySession::eventTargetData):
440         (WebCore::MediaKeySession::ensureEventTargetData):
441         (WebCore::MediaKeySession::scriptExecutionContext):
442
443         MediaKeys is a new class that encapsulates a CDM and a number of key sessions:
444         * Modules/encryptedmedia/MediaKeys.cpp: Added.
445         (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object
446             and a new MediaKeys session.
447         (WebCore::MediaKeys::MediaKeys): Simple constructor.
448         (WebCore::MediaKeys::~MediaKeys): Simple destructor.
449         (WebCore::MediaKeys::createSession): Follow the spec and create a new key session.
450         * Modules/encryptedmedia/MediaKeys.h: Added.
451         * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl.
452
453         Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system:
454         * html/HTMLMediaElement.cpp:
455         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
456         * platform/graphics/MediaPlayer.cpp:
457         (WebCore::MediaPlayer::keyNeeded):
458
459         MediaKeyError now has a systemCode parameter and member variable.
460         * html/MediaKeyError.h:
461         (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value.
462         (WebCore::MediaKeyError::MediaKeyError): Ditto.
463         (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode.
464         * html/MediaKeyError.idl:
465
466         Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer
467         for the MediaKeyNeededEvent.
468         * html/HTMLMediaElement.cpp:
469         (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys.
470         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters
471             than the deprecated version.
472         * html/HTMLMediaElement.h:
473         (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys.
474         * html/HTMLMediaElement.idl: Add the mediaKeys attribute.
475
476         Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one:
477         * html/MediaError.h:
478         * html/MediaError.idl:
479         * platform/graphics/MediaPlayer.cpp:
480         (WebCore::bestMediaEngineForTypeAndCodecs):
481         (WebCore::MediaPlayer::supportsType):
482         * platform/graphics/MediaPlayer.h:
483         (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the
484             deprecated version.
485
486         Support the new version of canPlayType which takes an extra parameter:
487         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
488         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
489         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
490         (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType):
491         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
492         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
493         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
494         (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType):
495
496         Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession
497         APIs and events:
498         * testing/Internals.cpp:
499         (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories.
500         * testing/Internals.h:
501         * testing/Internals.idl: Add the initializeMockCDM() method.
502         * testing/MockCDM.cpp: Added.
503         (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system.
504         (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type.
505         (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'.
506         (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'.
507         (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'.
508         (WebCore::generateSessionId): Return a monotonically increasing number.
509         (WebCore::MockCDMSession::MockCDMSession): Simple constructor.
510         (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array.
511         (WebCore::MockCDMSession::releaseKeys): No-op.
512         (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array.
513         * testing/MockCDM.h: Added.
514         (WebCore::MockCDM::create):
515         (WebCore::MockCDM::~MockCDM): Simple destructor.
516         (WebCore::MockCDM::MockCDM): Simple constructor.
517
518         Add the new classes to the built system:
519         * Configurations/FeatureDefines.xcconfig:
520         * DerivedSources.make:
521         * WebCore.exp.in:
522         * WebCore.xcodeproj/project.pbxproj:
523
524         Miscelaneous changes:
525         * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent.
526         * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession.
527         * page/DOMWindow.idl: Add constructors for the new classes to the window object.
528
529 2013-02-08  Chris Fleizach  <cfleizach@apple.com>
530
531         Refactor platform-specific code in SpeechSynthesis
532         https://bugs.webkit.org/show_bug.cgi?id=107414
533
534         Reviewed by Sam Weinig.
535
536         Refactor WebSpeech code to use a platform mechanism to provide access to platform resources.
537
538         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
539         (WebCore::DOMWindowSpeechSynthesis::from):
540         * Modules/speech/SpeechSynthesis.cpp:
541         (WebCore::SpeechSynthesis::SpeechSynthesis):
542         (WebCore):
543         (WebCore::SpeechSynthesis::voicesDidChange):
544         (WebCore::SpeechSynthesis::getVoices):
545         (WebCore::SpeechSynthesis::pending):
546         (WebCore::SpeechSynthesis::speaking):
547         (WebCore::SpeechSynthesis::paused):
548         (WebCore::SpeechSynthesis::speak):
549         (WebCore::SpeechSynthesis::cancel):
550         (WebCore::SpeechSynthesis::pause):
551         (WebCore::SpeechSynthesis::resume):
552         * Modules/speech/SpeechSynthesis.h:
553         (WebCore):
554         (SpeechSynthesis):
555         (WebCore::SpeechSynthesis::didStartSpeaking):
556         (WebCore::SpeechSynthesis::didFinishSpeaking):
557         (WebCore::SpeechSynthesis::speakingErrorOccurred):
558         * Modules/speech/SpeechSynthesisUtterance.cpp:
559         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
560         * Modules/speech/SpeechSynthesisUtterance.h:
561         (WebCore::SpeechSynthesisUtterance::text):
562         (WebCore::SpeechSynthesisUtterance::setText):
563         (WebCore::SpeechSynthesisUtterance::lang):
564         (WebCore::SpeechSynthesisUtterance::setLang):
565         (WebCore::SpeechSynthesisUtterance::voiceURI):
566         (WebCore::SpeechSynthesisUtterance::setVoiceURI):
567         (WebCore::SpeechSynthesisUtterance::volume):
568         (WebCore::SpeechSynthesisUtterance::setVolume):
569         (WebCore::SpeechSynthesisUtterance::rate):
570         (WebCore::SpeechSynthesisUtterance::setRate):
571         (WebCore::SpeechSynthesisUtterance::pitch):
572         (WebCore::SpeechSynthesisUtterance::setPitch):
573         (SpeechSynthesisUtterance):
574         (WebCore::SpeechSynthesisUtterance::platformUtterance):
575         * Modules/speech/SpeechSynthesisVoice.cpp:
576         (WebCore::SpeechSynthesisVoice::create):
577         (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
578         * Modules/speech/SpeechSynthesisVoice.h:
579         (SpeechSynthesisVoice):
580         (WebCore::SpeechSynthesisVoice::voiceURI):
581         (WebCore::SpeechSynthesisVoice::name):
582         (WebCore::SpeechSynthesisVoice::lang):
583         (WebCore::SpeechSynthesisVoice::localService):
584         (WebCore::SpeechSynthesisVoice::isDefault):
585         * Modules/speech/mac/SpeechSynthesisMac.mm:
586         * WebCore.xcodeproj/project.pbxproj:
587         * platform/PlatformSpeechSynthesis.h: Added.
588         (WebCore):
589         (PlatformSpeechSynthesis):
590         * platform/PlatformSpeechSynthesisUtterance.cpp: Added.
591         (WebCore):
592         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
593         * platform/PlatformSpeechSynthesisUtterance.h: Added.
594         (WebCore):
595         (PlatformSpeechSynthesisUtteranceClient):
596         (WebCore::PlatformSpeechSynthesisUtteranceClient::~PlatformSpeechSynthesisUtteranceClient):
597         (PlatformSpeechSynthesisUtterance):
598         (WebCore::PlatformSpeechSynthesisUtterance::text):
599         (WebCore::PlatformSpeechSynthesisUtterance::setText):
600         (WebCore::PlatformSpeechSynthesisUtterance::lang):
601         (WebCore::PlatformSpeechSynthesisUtterance::setLang):
602         (WebCore::PlatformSpeechSynthesisUtterance::voiceURI):
603         (WebCore::PlatformSpeechSynthesisUtterance::setVoiceURI):
604         (WebCore::PlatformSpeechSynthesisUtterance::volume):
605         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
606         (WebCore::PlatformSpeechSynthesisUtterance::rate):
607         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
608         (WebCore::PlatformSpeechSynthesisUtterance::pitch):
609         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
610         * platform/PlatformSpeechSynthesisVoice.cpp: Added.
611         (WebCore):
612         (WebCore::PlatformSpeechSynthesisVoice::create):
613         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
614         * platform/PlatformSpeechSynthesisVoice.h: Added.
615         (WebCore):
616         (PlatformSpeechSynthesisVoice):
617         (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
618         (WebCore::PlatformSpeechSynthesisVoice::name):
619         (WebCore::PlatformSpeechSynthesisVoice::lang):
620         (WebCore::PlatformSpeechSynthesisVoice::localService):
621         (WebCore::PlatformSpeechSynthesisVoice::isDefault):
622         * platform/PlatformSpeechSynthesizer.cpp: Added.
623         (WebCore):
624         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
625         * platform/PlatformSpeechSynthesizer.h: Added.
626         (WebCore):
627         (PlatformSpeechSynthesizerClient):
628         (WebCore::PlatformSpeechSynthesizerClient::~PlatformSpeechSynthesizerClient):
629         (PlatformSpeechSynthesizer):
630         (WebCore::PlatformSpeechSynthesizer::voiceList):
631         * platform/mac/PlatformSpeechSynthesisMac.mm: Added.
632         (WebCore):
633         (WebCore::PlatformSpeechSynthesis::create):
634         (WebCore::PlatformSpeechSynthesis::PlatformSpeechSynthesis):
635         (WebCore::PlatformSpeechSynthesis::platformSpeak):
636         * platform/mac/PlatformSpeechSynthesizerMac.mm: Added.
637         (WebCore):
638         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
639         (WebCore::PlatformSpeechSynthesizer::speak):
640
641 2013-02-08  Dean Jackson  <dino@apple.com>
642
643         Put snapshotting label text into localizable strings
644         https://bugs.webkit.org/show_bug.cgi?id=108268
645
646         Reviewed by Simon Fraser.
647
648         In preparation for a snapshotted plug-in using a ShadowRoot, allow
649         its label to be localized.
650
651         * English.lproj/Localizable.strings:
652         * platform/LocalizedStrings.cpp:
653         (WebCore::snapshottedPlugInLabelTitle): New method for returning title.
654         (WebCore::snapshottedPlugInLabelSubtitle): New method for returning subtitle.
655         * platform/LocalizedStrings.h:
656
657 2013-02-08  Dean Jackson  <dino@apple.com>
658
659         Do not register autostart for plugins from file:// (or nowhere)
660         https://bugs.webkit.org/show_bug.cgi?id=108271
661
662         Reviewed by Tim Horton.
663
664         If the page url origin is treated as a local URL, don't attempt
665         to add it to the auto-start list.
666
667         * html/HTMLPlugInImageElement.cpp:
668         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
669
670 2013-02-08  Adam Barth  <abarth@webkit.org>
671
672         Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
673         https://bugs.webkit.org/show_bug.cgi?id=107190
674
675         Reviewed by Eric Seidel.
676
677         This patch replaces the parser map with WeakPtr. We now use WeakPtrs to
678         communicate from the main thread to the background thread. (We were
679         already using WeakPtrs to communicate from the background thread to the
680         main thread.) This change lets us remove a bunch of boilerplate code.
681
682         * html/parser/BackgroundHTMLParser.cpp:
683         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
684         (WebCore::BackgroundHTMLParser::stop):
685         (WebCore):
686         * html/parser/BackgroundHTMLParser.h:
687         (WebCore::BackgroundHTMLParser::create):
688         (BackgroundHTMLParser):
689         * html/parser/HTMLDocumentParser.cpp:
690         (WebCore::HTMLDocumentParser::didFailSpeculation):
691         (WebCore::HTMLDocumentParser::startBackgroundParser):
692         (WebCore::HTMLDocumentParser::stopBackgroundParser):
693         (WebCore::HTMLDocumentParser::append):
694         (WebCore::HTMLDocumentParser::finish):
695         * html/parser/HTMLDocumentParser.h:
696         (WebCore):
697         (HTMLDocumentParser):
698
699 2013-02-07  Roger Fong  <roger_fong@apple.com>
700
701         VS2010 WebCore TestSupport project.
702         https://bugs.webkit.org/show_bug.cgi?id=107034.
703
704         Reviewed by Brent Fulgham.
705
706         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Added.
707         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Added.
708
709 2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
710
711         [GTK][AC] GraphicsLayerActor code clean up after clutter version up.
712         https://bugs.webkit.org/show_bug.cgi?id=109304
713
714         Reviewed by Gustavo Noronha Silva.
715
716         This patch cleans up GraphicsLayerActor functions by using new clutter apis
717         and makes existing functions simple & readable.
718
719         No new tests since no change in functionality
720
721         * platform/graphics/clutter/GraphicsLayerActor.cpp:
722         (_GraphicsLayerActorPrivate):
723         (graphicsLayerActorApplyTransform):
724         (graphicsLayerActorPaint):
725         (graphicsLayerActorDraw):
726         (graphicsLayerActorUpdateTexture):
727         (drawLayerContents):
728         (graphicsLayerActorNew):
729         (graphicsLayerActorInvalidateRectangle):
730         (graphicsLayerActorSetTransform):
731         (graphicsLayerActorSetAnchorPoint):
732         (graphicsLayerActorGetAnchorPoint):
733         (graphicsLayerActorSetScrollPosition):
734         * platform/graphics/clutter/PlatformClutterAnimation.h:
735
736 2013-02-08  Harald Alvestrand  <hta@google.com>
737
738         Fix and test for missing return statement
739
740         RTCPeerConnection.getStats() failed when remote stats were instantiated.
741         https://bugs.webkit.org/show_bug.cgi?id=109292
742
743         Reviewed by Adam Barth.
744
745         Tested by extending the existing mock's behaviour.
746
747         * Modules/mediastream/RTCStatsReport.cpp:
748         (WebCore::RTCStatsReport::addElement):
749
750 2013-02-08  Anton Vayvod  <avayvod@chromium.org>
751
752         [Text Autosizing] Split isAutosizingCluster into three independent checks
753         https://bugs.webkit.org/show_bug.cgi?id=109093
754
755         Refactoring to create more flexible version of isAutosizingCluster since there're more types
756         of autosizing cluster now: narrower than the parent cluster, wider than the parent cluster
757         and the one that doesn't depend on the parent cluster.
758
759         Reviewed by Kenneth Rohde Christiansen.
760
761         Refactoring, no test changes.
762
763         * rendering/TextAutosizer.cpp:
764
765         (WebCore::TextAutosizer::isNarrowDescendant):
766
767             Separate check for the container to be of the narrow-descendant type. Was a part of
768             isAutosizingCluster().
769
770         (WebCore::TextAutosizer::isWiderDescendant):
771
772             Separate check for the container to be of the wider-descendant type. Was a part of
773             isAutosizingCluster().
774
775         (WebCore::TextAutosizer::isIndependentDescendant):
776
777             Separate check for the container to be autosized separately from the ancestor cluster.
778             Checks for conditions independent of the aforementioned cluster.
779
780         (WebCore::TextAutosizer::isAutosizingCluster):
781
782             Handy method to check all separate conditions together.
783
784         (WebCore::TextAutosizer::processSubtree):
785         (WebCore::TextAutosizer::processCluster):
786         (WebCore::TextAutosizer::processContainer):
787         (WebCore::TextAutosizer::clusterShouldBeAutosized):
788         (WebCore::TextAutosizer::measureDescendantTextWidth):
789         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
790
791             The methods above were updated to use new functions/arguments.
792
793         * rendering/TextAutosizer.h:
794
795             Updated/added method definitions.
796
797 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
798
799         Web Inspector: Extension sever should use Workspace.projectForType() instead of Workspace.project()
800         https://bugs.webkit.org/show_bug.cgi?id=109301
801
802         Reviewed by Alexander Pavlov.
803
804         * inspector/front-end/ExtensionServer.js:
805         (WebInspector.ExtensionServer.prototype._onGetPageResources):
806
807 2013-02-04  Yury Semikhatsky  <yurys@chromium.org>
808
809         Web Inspector: simplify Memory.getDOMNodeCount implementation
810         https://bugs.webkit.org/show_bug.cgi?id=108821
811
812         Reviewed by Alexander Pavlov.
813
814         Removed Memory.getDOMNodeCount command from the protocol. Memory.getDOMCounters
815         should be used instead.
816
817         * inspector/Inspector.json:
818         * inspector/InspectorMemoryAgent.cpp:
819         * inspector/InspectorMemoryAgent.h:
820         (InspectorMemoryAgent):
821
822 2013-02-08  Yury Semikhatsky  <yurys@chromium.org>
823
824         Web Inspector: refactor MemoryStatistics.js
825         https://bugs.webkit.org/show_bug.cgi?id=109299
826
827         Reviewed by Vsevolod Vlasov.
828
829         Extracted functionality specific to DOM counter graphs drawing into
830         separate methods on MemoryStatistics class.
831         Introduced CounterUIBase base class for DOMCounterUI that contains
832         functionality which can be shared with native memory graph.
833
834         * inspector/front-end/MemoryStatistics.js:
835         (WebInspector.MemoryStatistics):
836         (WebInspector.CounterUIBase):
837         (WebInspector.CounterUIBase.prototype.updateCurrentValue):
838         (WebInspector.CounterUIBase.prototype.clearCurrentValueAndMarker):
839         (WebInspector.CounterUIBase.prototype.get visible):
840         (WebInspector.DOMCounterUI):
841         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
842         (WebInspector.MemoryStatistics.prototype._onMouseOut):
843         (WebInspector.MemoryStatistics.prototype._clearCurrentValueAndMarker):
844         (WebInspector.MemoryStatistics.prototype._refreshCurrentValues):
845         (WebInspector.MemoryStatistics.prototype._updateCurrentValue):
846         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
847         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
848         (WebInspector.MemoryStatistics.prototype._saveImageUnderMarker):
849         (WebInspector.MemoryStatistics.prototype._drawMarker):
850         (WebInspector.MemoryStatistics.prototype._clear):
851         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
852
853 2013-02-08  Mike West  <mkwst@chromium.org>
854
855         Add a new IGNORE_EXCEPTION helper to ignore ExceptionCodes when they are expected but uninteresting
856         https://bugs.webkit.org/show_bug.cgi?id=108771
857
858         Reviewed by Eric Seidel.
859
860         In cases where the ExceptionCode passed into a function is completely
861         ignored, this patch replaces it with a new IGNORE_EXCEPTION macro. This
862         makes our expectations about possible exceptions (or lack thereof)
863         explicit, rather than relying on implicit assumptions about whether a
864         variable is intentionally uninitialized or not. It also removes
865         knowledge about the internals of ExceptionCodes (that they're currently
866         ints, for instance) from code that shouldn't care, which will help with
867         future refactorings.
868
869         The implementation is entirely based upon ASSERT_NO_EXCEPTION, and
870         shouldn't have any visible effect on the web. As long as all the
871         current tests pass, we're good.
872
873         * Modules/indexeddb/IDBRequest.cpp:
874         (WebCore::IDBRequest::dispatchEvent):
875         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
876         * Modules/indexeddb/IDBTransaction.cpp:
877         (WebCore::IDBTransaction::stop):
878         * Modules/websockets/WebSocketChannel.cpp:
879         (WebCore::WebSocketChannel::processBuffer):
880         * dom/Document.cpp:
881         (WebCore::Document::processHttpEquiv):
882         * dom/ExceptionCodePlaceholder.h:
883         (WebCore):
884         * dom/Node.cpp:
885         (WebCore::Node::normalize):
886         * dom/Text.cpp:
887         (WebCore::Text::replaceWholeText):
888         * editing/AlternativeTextController.cpp:
889         (WebCore::AlternativeTextController::insertDictatedText):
890         * editing/AppendNodeCommand.cpp:
891         (WebCore::AppendNodeCommand::doApply):
892         (WebCore::AppendNodeCommand::doUnapply):
893         * editing/CompositeEditCommand.cpp:
894         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt):
895         * editing/DeleteFromTextNodeCommand.cpp:
896         (WebCore::DeleteFromTextNodeCommand::doUnapply):
897         * editing/Editor.cpp:
898         (WebCore::dispatchEditableContentChangedEvents):
899         (WebCore::Editor::applyEditingStyleToElement):
900         * editing/EditorCommand.cpp:
901         (WebCore::executeFormatBlock):
902         * editing/FormatBlockCommand.cpp:
903         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
904         * editing/InsertIntoTextNodeCommand.cpp:
905         (WebCore::InsertIntoTextNodeCommand::doApply):
906         (WebCore::InsertIntoTextNodeCommand::doUnapply):
907         * editing/InsertListCommand.cpp:
908         (WebCore::InsertListCommand::doApplyForSingleParagraph):
909         * editing/InsertNodeBeforeCommand.cpp:
910         (WebCore::InsertNodeBeforeCommand::doApply):
911         (WebCore::InsertNodeBeforeCommand::doUnapply):
912         * editing/RemoveCSSPropertyCommand.cpp:
913         (WebCore::RemoveCSSPropertyCommand::doApply):
914         (WebCore::RemoveCSSPropertyCommand::doUnapply):
915         * editing/RemoveNodeCommand.cpp:
916         (WebCore::RemoveNodeCommand::doApply):
917         (WebCore::RemoveNodeCommand::doUnapply):
918         * editing/ReplaceSelectionCommand.cpp:
919         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
920         * editing/TextIterator.cpp:
921         (WebCore::TextIterator::getLocationAndLengthFromRange):
922         * editing/WrapContentsInDummySpanCommand.cpp:
923         (WebCore::WrapContentsInDummySpanCommand::executeApply):
924         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
925         * editing/htmlediting.cpp:
926         (WebCore::comparePositions):
927         * editing/markup.cpp:
928         (WebCore::highestAncestorToWrapMarkup):
929         * html/FTPDirectoryDocument.cpp:
930         (WebCore::FTPDirectoryDocumentParser::appendEntry):
931         (WebCore::FTPDirectoryDocumentParser::createTDForFilename):
932         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
933         (WebCore::FTPDirectoryDocumentParser::createBasicDocument):
934         * html/HTMLMediaElement.cpp:
935         (WebCore::HTMLMediaElement::rewind):
936         (WebCore::HTMLMediaElement::returnToRealtime):
937         (WebCore::HTMLMediaElement::playInternal):
938         (WebCore::HTMLMediaElement::percentLoaded):
939         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
940         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
941         (WebCore::HTMLMediaElement::applyMediaFragmentURI):
942         * html/HTMLOutputElement.cpp:
943         (WebCore::HTMLOutputElement::setTextContentInternal):
944         * html/HTMLSelectElement.cpp:
945         (WebCore::HTMLSelectElement::remove):
946         * html/HTMLTableElement.cpp:
947         (WebCore::HTMLTableElement::createTHead):
948         (WebCore::HTMLTableElement::deleteTHead):
949         (WebCore::HTMLTableElement::createTFoot):
950         (WebCore::HTMLTableElement::deleteTFoot):
951         (WebCore::HTMLTableElement::createCaption):
952         (WebCore::HTMLTableElement::deleteCaption):
953         * html/HTMLTextAreaElement.cpp:
954         (WebCore::HTMLTextAreaElement::setDefaultValue):
955         * html/ImageDocument.cpp:
956         (WebCore::ImageDocument::createDocumentStructure):
957         * html/InputType.cpp:
958         (WebCore::InputType::stepUpFromRenderer):
959         * html/MediaController.cpp:
960         (MediaController::bringElementUpToSpeed):
961         (MediaController::asyncEventTimerFired):
962         * html/MediaDocument.cpp:
963         (WebCore::MediaDocumentParser::createDocumentStructure):
964         (WebCore::MediaDocument::replaceMediaElementTimerFired):
965         * html/PluginDocument.cpp:
966         (WebCore::PluginDocumentParser::createDocumentStructure):
967         * html/RangeInputType.cpp:
968         (WebCore::RangeInputType::handleKeydownEvent):
969         * html/TimeRanges.cpp:
970         (TimeRanges::contain):
971         (TimeRanges::nearest):
972         * html/canvas/CanvasRenderingContext2D.cpp:
973         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
974         * html/shadow/MediaControlElementTypes.cpp:
975         (WebCore::MediaControlSeekButtonElement::seekTimerFired):
976         * html/shadow/MediaControlElements.cpp:
977         (WebCore::MediaControlPanelElement::setPosition):
978         (WebCore::MediaControlPanelElement::resetPosition):
979         (WebCore::MediaControlStatusDisplayElement::update):
980         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
981         (WebCore::MediaControlTimelineElement::defaultEventHandler):
982         * html/shadow/MediaControls.cpp:
983         (WebCore::MediaControls::updateCurrentTimeDisplay):
984         (WebCore::MediaControls::createTextTrackDisplay):
985         * html/shadow/MediaControlsApple.cpp:
986         (WebCore::MediaControlsApple::updateCurrentTimeDisplay):
987         * html/shadow/MediaControlsBlackBerry.cpp:
988         (WebCore::MediaControlEmbeddedPanelElement::setPosition):
989         (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
990         (WebCore::MediaControlFullscreenTimelineElement::defaultEventHandler):
991         (WebCore::MediaControlsBlackBerry::updateCurrentTimeDisplay):
992         * html/shadow/MediaControlsChromium.cpp:
993         (WebCore::MediaControlsChromium::updateCurrentTimeDisplay):
994         * html/track/InbandTextTrack.cpp:
995         (WebCore::InbandTextTrack::addGenericCue):
996         * inspector/InspectorCSSAgent.cpp:
997         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
998         * inspector/InspectorHistory.cpp:
999         (WebCore::InspectorHistory::markUndoableState):
1000         * inspector/InspectorResourceAgent.cpp:
1001         (WebCore::InspectorResourceAgent::replayXHR):
1002         * page/ContextMenuController.cpp:
1003         (WebCore::ContextMenuController::contextMenuItemSelected):
1004         * page/DOMWindow.cpp:
1005         (WebCore::didAddStorageEventListener):
1006         * page/DragController.cpp:
1007         (WebCore::documentFragmentFromDragData):
1008         * page/EventHandler.cpp:
1009         (WebCore::EventHandler::dispatchDragEvent):
1010         (WebCore::EventHandler::keyEvent):
1011         (WebCore::EventHandler::handleTextInputEvent):
1012         * page/Page.cpp:
1013         (WebCore::Page::findStringMatchingRanges):
1014         * platform/efl/RenderThemeEfl.cpp:
1015         (WebCore::RenderThemeEfl::paintMediaSliderTrack):
1016         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1017         (WebCore::MediaPlayerPrivate::percentLoaded):
1018         * platform/gtk/RenderThemeGtk.cpp:
1019         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
1020         * platform/mac/PasteboardMac.mm:
1021         (WebCore::Pasteboard::getDataSelection):
1022         (WebCore::documentFragmentWithImageResource):
1023         (WebCore::Pasteboard::documentFragment):
1024         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1025         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
1026         (-[WebVideoFullscreenHUDWindowController setVolume:]):
1027         * platform/qt/RenderThemeQt.cpp:
1028         (WebCore::RenderThemeQt::paintMediaSliderTrack):
1029         * rendering/RenderNamedFlowThread.cpp:
1030         (WebCore::RenderNamedFlowThread::getRanges):
1031         * rendering/RenderThemeMac.mm:
1032         (WebCore::RenderThemeMac::paintMediaSliderTrack):
1033         * svg/SVGTRefElement.cpp:
1034         (WebCore::SVGTRefElement::detachTarget):
1035         * xml/XMLTreeViewer.cpp:
1036         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
1037         * xml/parser/XMLDocumentParserLibxml2.cpp:
1038         (WebCore::XMLDocumentParser::endElementNs):
1039         * xml/parser/XMLDocumentParserQt.cpp:
1040         (WebCore::XMLDocumentParser::parseEndElement):
1041
1042 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
1043
1044         Web Inspector: Introduce workspace provider/project type, encapsulate uri creation in SimpleWorkspaceProvider.
1045         https://bugs.webkit.org/show_bug.cgi?id=109282
1046
1047         Reviewed by Alexander Pavlov.
1048
1049         SimpleWorkspaceProvider now fully takes care of creating uri based on project/workspace provider type.
1050         This is the first step on the way to project-per-domain mode for non file system project types.
1051         Workspace is now partly aware of the possibility that several projects with the same type exist.
1052         Drive-by: ScriptsPanel now uses FileMapping to show anchor location properly.
1053
1054         * inspector/front-end/DefaultScriptMapping.js:
1055         (WebInspector.DefaultScriptMapping):
1056         (WebInspector.DefaultScriptMapping.prototype.addScript):
1057         * inspector/front-end/ExtensionServer.js:
1058         (WebInspector.ExtensionServer.prototype._onGetPageResources):
1059         * inspector/front-end/FileMapping.js:
1060         (WebInspector.FileMapping.prototype.uriForURL):
1061         * inspector/front-end/FileSystemWorkspaceProvider.js:
1062         (WebInspector.FileSystemWorkspaceProvider.prototype.type):
1063         * inspector/front-end/JavaScriptSourceFrame.js:
1064         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
1065         * inspector/front-end/LiveEditSupport.js:
1066         (WebInspector.LiveEditSupport):
1067         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
1068         * inspector/front-end/ScriptSnippetModel.js:
1069         (WebInspector.ScriptSnippetModel):
1070         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
1071         * inspector/front-end/ScriptsNavigator.js:
1072         (WebInspector.ScriptsNavigator.prototype._navigatorViewForUISourceCode):
1073         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
1074         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
1075         (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
1076         * inspector/front-end/ScriptsPanel.js:
1077         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
1078         (WebInspector.ScriptsPanel.prototype._projectWillReset):
1079         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
1080         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1081         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
1082         * inspector/front-end/SimpleWorkspaceProvider.js:
1083         (WebInspector.SimpleWorkspaceProvider):
1084         (WebInspector.SimpleWorkspaceProvider.uriForURL):
1085         (WebInspector.SimpleWorkspaceProvider.prototype.type):
1086         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
1087         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
1088         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
1089         (WebInspector.SimpleWorkspaceProvider.prototype._uniqueURI):
1090         * inspector/front-end/Workspace.js:
1091         (WebInspector.WorkspaceProvider.prototype.type):
1092         (WebInspector.Project.prototype.type):
1093         (WebInspector.Project.prototype.isServiceProject):
1094         (WebInspector.Workspace.prototype.uiSourceCodeForOriginURL):
1095         (WebInspector.Workspace.prototype.uiSourceCodesForProjectType):
1096         (WebInspector.Workspace.prototype.projectsForType):
1097         * inspector/front-end/inspector.js:
1098
1099 2013-02-08  ChangSeok Oh  <shivamidow@gmail.com>
1100
1101         [GTK][AC] GraphicsLayerClutter doesn't need to recalculate its position after changing anchor position.
1102         https://bugs.webkit.org/show_bug.cgi?id=109226
1103
1104         Reviewed by Gustavo Noronha Silva.
1105
1106         Clutter has a different coordinate system from mac port's, so we don't need to
1107         recalulate GraphicsLayer position after changing its anchor position.
1108
1109         Covered by existing ac tests.
1110
1111         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1112         (WebCore::GraphicsLayerClutter::updateGeometry):
1113
1114 2013-02-08  Mike West  <mkwst@chromium.org>
1115
1116         Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
1117         https://bugs.webkit.org/show_bug.cgi?id=109266
1118
1119         Reviewed by Jochen Eisinger.
1120
1121         The pattern:
1122
1123             ExceptionCode ec = 0;
1124             methodThatGeneratesException(ec);
1125             ASSERT(!ec);
1126
1127         is more clearly and succinctly written as:
1128
1129             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
1130
1131         This patch replaces the occurances of the former in IDB code that never
1132         touch 'ec' again with the latter. No change in behavior should result
1133         from this refactoring.
1134
1135         * Modules/indexeddb/IDBCursor.cpp:
1136         (WebCore::IDBCursor::advance):
1137         (WebCore::IDBCursor::continueFunction):
1138         (WebCore::IDBCursor::deleteFunction):
1139             These methods checked the value of the ExceptionCode without first
1140             initializing it to 0. Now the ExceptionCode is explicitly set to 0
1141             before doing potentially exception-generating work.
1142         (WebCore::IDBCursor::direction):
1143         * Modules/indexeddb/IDBObjectStore.cpp:
1144         (WebCore):
1145         * Modules/indexeddb/IDBTransaction.cpp:
1146         (WebCore::IDBTransaction::mode):
1147             Replace the above pattern with ASSERT_NO_EXCEPTION.
1148
1149 2013-02-08  Mike West  <mkwst@chromium.org>
1150
1151         Migrate ExceptionCode ASSERTs in SVG to ASSERT_NO_EXCEPTION.
1152         https://bugs.webkit.org/show_bug.cgi?id=109267
1153
1154         Reviewed by Jochen Eisinger.
1155
1156         The pattern:
1157
1158             ExceptionCode ec = 0;
1159             methodThatGeneratesException(ec);
1160             ASSERT(!ec);
1161
1162         is more clearly and succinctly written as:
1163
1164             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
1165
1166         This patch replaces the occurances of the former in SVG code that never
1167         touch 'ec' again with the latter. No change in behavior should result
1168         from this refactoring.
1169
1170         * svg/SVGLength.cpp:
1171         (WebCore::SVGLength::SVGLength):
1172         (WebCore::SVGLength::setValue):
1173             This method checked the value of the ExceptionCode without first
1174             initializing it to 0. Now it initializes before doing potentially
1175             exception-generating work.
1176         * rendering/style/SVGRenderStyle.h:
1177         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
1178         (WebCore::SVGRenderStyle::initialKerning):
1179         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
1180         (WebCore::SVGRenderStyle::initialStrokeWidth):
1181         * svg/SVGAnimatedLength.cpp:
1182         (WebCore::sharedSVGLength):
1183         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
1184         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
1185         * svg/SVGAnimatedLengthList.cpp:
1186         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
1187         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
1188         * svg/SVGTextContentElement.cpp:
1189         (WebCore::SVGTextContentElement::textLengthAnimated):
1190         * svg/animation/SVGSMILElement.cpp:
1191         (WebCore::constructQualifiedName):
1192             Replace the above pattern with ASSERT_NO_EXCEPTION.
1193
1194 2013-02-08  Vsevolod Vlasov  <vsevik@chromium.org>
1195
1196         Web Inspector: Replace workspace with project in UISourceCode constructor.
1197         https://bugs.webkit.org/show_bug.cgi?id=109256
1198
1199         Reviewed by Alexander Pavlov.
1200
1201         Replaced workspace with project in UISourceCode constructor since every UISourceCode
1202         operation is delegated to project anyway.
1203
1204         * inspector/front-end/UISourceCode.js:
1205         (WebInspector.UISourceCode):
1206         (WebInspector.UISourceCode.prototype.project):
1207         (WebInspector.UISourceCode.prototype.requestContent):
1208         (WebInspector.UISourceCode.prototype.requestOriginalContent):
1209         (WebInspector.UISourceCode.prototype._commitContent):
1210         (WebInspector.UISourceCode.prototype.searchInContent):
1211         * inspector/front-end/Workspace.js:
1212         (WebInspector.Project.prototype._fileAdded):
1213         (WebInspector.Project.prototype.requestFileContent):
1214         (WebInspector.Project.prototype.setFileContent):
1215         (WebInspector.Project.prototype.searchInFileContent):
1216
1217 2013-02-08  Patrick Gansterer  <paroga@webkit.org>
1218
1219         Build fix for Windows after r141981.
1220
1221         * platform/network/win/ResourceHandleWin.cpp:
1222         (WebCore::ResourceHandle::loadResourceSynchronously):
1223
1224 2013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1225
1226         Unreviewed, rolling out r141695 and r141697.
1227         http://trac.webkit.org/changeset/141695
1228         http://trac.webkit.org/changeset/141697
1229         https://bugs.webkit.org/show_bug.cgi?id=109279
1230
1231         broke on-disk buffering for http(s) media (Requested by philn
1232         on #webkit).
1233
1234         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1235         (WebCore::MediaPlayerPrivateGStreamer::load):
1236         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1237         (MediaPlayerPrivateGStreamer):
1238         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1239         (webKitWebSrcGetProtocols):
1240         (webKitWebSrcSetUri):
1241
1242 2013-02-08  Dan Carney  <dcarney@google.com>
1243
1244         [v8] isolate parameter added to all v8::peristent calls
1245         https://bugs.webkit.org/show_bug.cgi?id=109268
1246
1247         Reviewed by Kentaro Hara.
1248
1249         No new tests. No change in functionality.
1250
1251         * bindings/scripts/CodeGeneratorV8.pm:
1252         (GenerateDomainSafeFunctionGetter):
1253         (GenerateNamedConstructorCallback):
1254         (GenerateImplementation):
1255         * bindings/scripts/test/V8/V8Float64Array.cpp:
1256         (WebCore::V8Float64Array::GetRawTemplate):
1257         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1258         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
1259         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
1260         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1261         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
1262         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1263         (WebCore::V8TestEventConstructor::GetRawTemplate):
1264         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1265         (WebCore::V8TestEventTarget::GetRawTemplate):
1266         * bindings/scripts/test/V8/V8TestException.cpp:
1267         (WebCore::V8TestException::GetRawTemplate):
1268         * bindings/scripts/test/V8/V8TestInterface.cpp:
1269         (WebCore::V8TestInterface::GetRawTemplate):
1270         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1271         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
1272         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1273         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
1274         (WebCore::V8TestNamedConstructor::GetRawTemplate):
1275         * bindings/scripts/test/V8/V8TestNode.cpp:
1276         (WebCore::V8TestNode::GetRawTemplate):
1277         * bindings/scripts/test/V8/V8TestObj.cpp:
1278         (WebCore::V8TestObj::GetRawTemplate):
1279         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1280         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
1281         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1282         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
1283         * bindings/v8/DOMWrapperMap.h:
1284         (WebCore::DOMWrapperMap::clear):
1285         * bindings/v8/DOMWrapperWorld.cpp:
1286         (WebCore::isolatedWorldWeakCallback):
1287         (WebCore::DOMWrapperWorld::makeContextWeak):
1288         * bindings/v8/NPV8Object.cpp:
1289         (WebCore::freeV8NPObject):
1290         (WebCore::npCreateV8ScriptObject):
1291         * bindings/v8/ScheduledAction.cpp:
1292         (WebCore::ScheduledAction::ScheduledAction):
1293         (WebCore::ScheduledAction::~ScheduledAction):
1294         * bindings/v8/ScopedPersistent.h:
1295         (WebCore::ScopedPersistent::ScopedPersistent):
1296         (WebCore::ScopedPersistent::set):
1297         (WebCore::ScopedPersistent::clear):
1298         * bindings/v8/ScriptWrappable.h:
1299         (WebCore::ScriptWrappable::setWrapper):
1300         (WebCore::ScriptWrappable::disposeWrapper):
1301         (WebCore::ScriptWrappable::weakCallback):
1302         * bindings/v8/V8Binding.cpp:
1303         (WebCore::createRawTemplate):
1304         * bindings/v8/V8Binding.h:
1305         (WebCore):
1306         * bindings/v8/V8GCController.cpp:
1307         (WebCore::gcTree):
1308         (WebCore::V8GCController::gcPrologue):
1309         (WebCore::V8GCController::minorGCPrologue):
1310         * bindings/v8/V8GCController.h:
1311         (V8GCController):
1312         * bindings/v8/V8HiddenPropertyName.cpp:
1313         (WebCore::V8HiddenPropertyName::createString):
1314         * bindings/v8/V8LazyEventListener.cpp:
1315         (WebCore::V8LazyEventListener::prepareListenerObject):
1316         * bindings/v8/V8NPObject.cpp:
1317         (WebCore::V8NPTemplateMap::dispose):
1318         (WebCore::npObjectGetProperty):
1319         (WebCore::createV8ObjectForNPObject):
1320         * bindings/v8/V8PerContextData.cpp:
1321         (WebCore::V8PerContextData::dispose):
1322         (WebCore::V8PerContextData::createWrapperFromCacheSlowCase):
1323         (WebCore::V8PerContextData::constructorForTypeSlowCase):
1324         * bindings/v8/V8ValueCache.cpp:
1325         (WebCore::makeExternalString):
1326         * bindings/v8/WrapperTypeInfo.h:
1327         (WebCore::WrapperConfiguration::configureWrapper):
1328         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1329         (WebCore::V8HTMLDocument::wrapInShadowObject):
1330         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1331         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
1332         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1333         (WebCore::WeakReferenceCallback):
1334         (WebCore::createInjectedScriptHostV8Wrapper):
1335         * bindings/v8/custom/V8LocationCustom.cpp:
1336         (WebCore::V8Location::reloadAccessorGetter):
1337         (WebCore::V8Location::replaceAccessorGetter):
1338         (WebCore::V8Location::assignAccessorGetter):
1339
1340 2013-02-08  Kent Tamura  <tkent@chromium.org>
1341
1342         Adjust usage of ENABLE flags to enable whole content
1343         https://bugs.webkit.org/show_bug.cgi?id=109270
1344
1345         Reviewed by Eric Seidel.
1346
1347         Our common usage of ENABLE flags to enable whole content of files is:
1348
1349         For .cpp files:
1350           #include "config.h"
1351           #if ENABLE(FOOBAR)
1352           #include "FooBar.h"
1353
1354         For .h files:
1355           #ifndef FooBar_h
1356           #define FooBar_h
1357           #if ENABLE(FOOBAR)
1358
1359         Fix files which have uncommon usage, and fix CodeGeneratorV8.pm so that
1360         it generates the common pattern. Note that CodeGeneratorJS.pm already
1361         generates code in this order.
1362
1363         * bindings/scripts/CodeGeneratorV8.pm:
1364         (GenerateHeaderContentHeader):
1365         (GenerateImplementationContentHeader):
1366         * bindings/scripts/test/V8/V8TestCallback.cpp:
1367         * bindings/scripts/test/V8/V8TestCallback.h:
1368         * bindings/scripts/test/V8/V8TestInterface.cpp:
1369         * bindings/scripts/test/V8/V8TestInterface.h:
1370         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1371         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1372         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1373         * html/ColorInputType.cpp:
1374         * html/ColorInputType.h:
1375         * html/DateInputType.cpp:
1376         * html/DateTimeInputType.cpp:
1377         * html/DateTimeInputType.h:
1378         * html/DateTimeLocalInputType.cpp:
1379         * html/HTMLAudioElement.cpp:
1380         * html/HTMLAudioElement.h:
1381         * html/HTMLDataListElement.cpp:
1382         * html/HTMLDialogElement.cpp:
1383         * html/HTMLDialogElement.h:
1384         * html/HTMLMediaElement.cpp:
1385         * html/HTMLMediaElement.h:
1386         * html/HTMLMeterElement.cpp:
1387         * html/HTMLProgressElement.cpp:
1388         * html/HTMLSourceElement.cpp:
1389         * html/HTMLSourceElement.h:
1390         * html/HTMLTrackElement.cpp:
1391         * html/HTMLTrackElement.h:
1392         * html/HTMLVideoElement.cpp:
1393         * html/HTMLVideoElement.h:
1394         * html/MonthInputType.cpp:
1395         * html/TimeInputType.cpp:
1396         * html/WeekInputType.cpp:
1397         * html/shadow/DateTimeFieldElement.h:
1398         * html/shadow/DetailsMarkerControl.cpp:
1399         * html/shadow/MeterShadowElement.cpp:
1400         * html/shadow/ProgressShadowElement.cpp:
1401         * rendering/RenderDetailsMarker.cpp:
1402         * rendering/RenderInputSpeech.cpp:
1403         * rendering/RenderMeter.cpp:
1404         * rendering/RenderProgress.cpp:
1405
1406 2013-02-08  Mike West  <mkwst@chromium.org>
1407
1408         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
1409         https://bugs.webkit.org/show_bug.cgi?id=109044
1410
1411         Reviewed by Darin Adler.
1412
1413         The pattern:
1414
1415             ExceptionCode ec = 0;
1416             methodThatGeneratesException(ec);
1417             ASSERT(!ec);
1418
1419         is more clearly and succinctly written as:
1420
1421             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
1422
1423         This patch replaces the occurances of the former that never touch 'ec'
1424         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
1425         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
1426         where it does indeed matter that 'ec' get set properly.
1427
1428         No change in behavior should result from this refactoring.
1429
1430         * dom/ContainerNode.cpp:
1431         (WebCore::ContainerNode::takeAllChildrenFrom):
1432         * dom/Document.cpp:
1433         (WebCore::Document::setTitle):
1434         * dom/MessagePort.cpp:
1435         (WebCore::MessagePort::dispatchMessages):
1436         (WebCore::MessagePort::disentanglePorts):
1437         * editing/DeleteButtonController.cpp:
1438         (WebCore::enclosingDeletableElement):
1439         (WebCore::DeleteButtonController::createDeletionUI):
1440             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
1441         (WebCore::DeleteButtonController::show):
1442             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
1443         * editing/EditorCommand.cpp:
1444         (WebCore::unionDOMRanges):
1445         * editing/ReplaceNodeWithSpanCommand.cpp:
1446         (WebCore::swapInNodePreservingAttributesAndChildren):
1447         * editing/ReplaceSelectionCommand.cpp:
1448         (WebCore::ReplacementFragment::ReplacementFragment):
1449         (WebCore::ReplacementFragment::removeNode):
1450         (WebCore::ReplacementFragment::insertNodeBefore):
1451         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
1452         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
1453         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1454         * editing/SplitTextNodeCommand.cpp:
1455         (WebCore::SplitTextNodeCommand::doUnapply):
1456         * editing/TextIterator.cpp:
1457         (WebCore::CharacterIterator::range):
1458         (WebCore::BackwardsCharacterIterator::range):
1459         (WebCore::TextIterator::rangeFromLocationAndLength):
1460         (WebCore::collapsedToBoundary):
1461         * editing/htmlediting.cpp:
1462         (WebCore::createTabSpanElement):
1463         * editing/mac/EditorMac.mm:
1464         (WebCore::Editor::fontForSelection):
1465         (WebCore::Editor::fontAttributesForSelectionStart):
1466         * editing/markup.cpp:
1467         (WebCore::createMarkup):
1468         (WebCore::trimFragment):
1469         (WebCore::createFragmentFromMarkupWithContext):
1470         (WebCore::fillContainerFromString):
1471         (WebCore::createFragmentFromText):
1472         (WebCore::createFragmentFromNodes):
1473         * html/ColorInputType.cpp:
1474         (WebCore::ColorInputType::createShadowSubtree):
1475             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
1476         * html/HTMLOptionsCollection.cpp:
1477         (WebCore::HTMLOptionsCollection::add):
1478             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
1479         * html/HTMLTextAreaElement.cpp:
1480         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
1481         * html/HTMLTextFormControlElement.cpp:
1482         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
1483         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1484         * html/TextFieldInputType.cpp:
1485         (WebCore::TextFieldInputType::updatePlaceholderText):
1486         * html/ValidationMessage.cpp:
1487         (WebCore::ValidationMessage::buildBubbleTree):
1488         * html/shadow/MediaControlElementTypes.cpp:
1489         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
1490         * inspector/InspectorPageAgent.cpp:
1491         (WebCore::InspectorPageAgent::getCookies):
1492         * inspector/InspectorStyleSheet.cpp:
1493         (WebCore::InspectorStyleSheet::addRule):
1494         * loader/appcache/ApplicationCacheHost.cpp:
1495         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
1496         * page/DOMSelection.cpp:
1497         (WebCore::DOMSelection::deleteFromDocument):
1498         * page/DragController.cpp:
1499         (WebCore::prepareClipboardForImageDrag):
1500         * rendering/RenderTextControl.cpp:
1501         (WebCore::RenderTextControl::visiblePositionForIndex):
1502             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
1503
1504 2013-02-08  Alexei Filippov  <alph@chromium.org>
1505
1506         Web Inspector: disable profile type switching while profile in progress
1507         https://bugs.webkit.org/show_bug.cgi?id=109178
1508
1509         Reviewed by Yury Semikhatsky.
1510
1511         Disables profile type selection controls when a profiling session
1512         is in progress.
1513
1514         * inspector/front-end/HeapSnapshotView.js:
1515         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
1516         * inspector/front-end/ProfileLauncherView.js:
1517         (WebInspector.ProfileLauncherView.prototype._updateControls):
1518         * inspector/front-end/ProfilesPanel.js:
1519         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
1520
1521 2013-02-08  Ilya Tikhonovsky  <loislo@chromium.org>
1522
1523         Web Inspector: Native Memory Instrumentation: adjust chunk transfer size for better speed.
1524         https://bugs.webkit.org/show_bug.cgi?id=109263
1525
1526         Reviewed by Yury Semikhatsky.
1527
1528         The chunk size is changed from 100 to 10000.
1529         addString counts only first 256 symbols of the string.o
1530
1531         * inspector/HeapGraphSerializer.cpp:
1532         (WebCore::HeapGraphSerializer::pushUpdateIfNeeded):
1533         (WebCore::HeapGraphSerializer::addString):
1534         * inspector/front-end/NativeMemorySnapshotView.js:
1535
1536 2013-02-08  Kentaro Hara  <haraken@chromium.org>
1537
1538         Support a relatedTarget attribute on focus/blur events
1539         https://bugs.webkit.org/show_bug.cgi?id=109176
1540
1541         Reviewed by Ojan Vafai.
1542
1543         In bug 76216, we supported a relatedTarget attribute on
1544         focusin/focusout events. We should also support it on focus/blur events.
1545
1546         See http://lists.w3.org/Archives/Public/www-dom/2012OctDec/0061.html
1547         for the www-dom discussion.
1548
1549         Test: fast/dom/shadow/shadow-boundary-events.html
1550               fast/events/related-target-focusevent.html
1551
1552         * dom/EventDispatchMediator.cpp:
1553         (WebCore::FocusEventDispatchMediator::create):
1554         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1555         (WebCore::BlurEventDispatchMediator::create):
1556         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1557         * dom/EventDispatchMediator.h:
1558         (FocusEventDispatchMediator):
1559         (BlurEventDispatchMediator):
1560         * dom/Node.cpp:
1561         (WebCore::Node::dispatchFocusInEvent):
1562         (WebCore::Node::dispatchFocusOutEvent):
1563         (WebCore::Node::dispatchFocusEvent):
1564         (WebCore::Node::dispatchBlurEvent):
1565
1566 2013-02-07  Yury Semikhatsky  <yurys@chromium.org>
1567
1568         Web Inspector: reduce number of native memory instrumentation categories
1569         https://bugs.webkit.org/show_bug.cgi?id=109146
1570
1571         Reviewed by Pavel Feldman.
1572
1573         Merged some of memory instrumentation categories.
1574
1575         * dom/WebCoreMemoryInstrumentation.cpp:
1576         (WebCore):
1577         * inspector/front-end/NativeMemorySnapshotView.js:
1578         (WebInspector.MemoryBlockViewProperties._initialize):
1579         * platform/PlatformMemoryInstrumentation.cpp:
1580         (WebCore):
1581
1582 2013-02-07  Mike West  <mkwst@chromium.org>
1583
1584         <iframe seamless> should avoid vertical scrollbars during the initial layout passes.
1585         https://bugs.webkit.org/show_bug.cgi?id=87707
1586
1587         Reviewed by Eric Seidel.
1588
1589         Seamless documents currently render incorrectly when their content fills
1590         the width of the container into which they're placed. Because FrameView
1591         assumes that the container's size is properly set before the first pass
1592         of layout, vertical scrollbars are incorrectly forced onto seamless
1593         content, because seamless sets the container's height to 0 before
1594         handing it off to FrameView for layout. The scrollbars make the
1595         available width for the seamless document ~15px smaller than it should
1596         be, resulting in content getting bumped to the next line.
1597
1598         This patch special-cases FrameView::calculateScrollbarModesForLayout in
1599         order to force scrollbars off for seamless documents with a full visible
1600         height of 0px. Once the layout pass has grabbed the content height and
1601         applied it to the visible height, scrollbars will again be applicable.
1602
1603         The change should be covered by rebaselines for the newly-passing
1604         results in fast/frame/seamless-{float,inline}.html
1605
1606         * page/FrameView.cpp:
1607         (WebCore::FrameView::calculateScrollbarModesForLayout):
1608             If we're rendering a seamless document, and the full visible height
1609             is 0, and the vertical scrollbar would otherwise be ScrollbarAuto,
1610             then force ScrollbarAlwaysOff.
1611
1612 2013-02-07  Kent Tamura  <tkent@chromium.org>
1613
1614         document.activeElement should not return a non-focusable element
1615         https://bugs.webkit.org/show_bug.cgi?id=86707
1616
1617         Reviewed by Hajime Morita.
1618
1619         This is based on a patch by Arpita Bahuguna.
1620
1621         Test: fast/dom/HTMLDocument/set-focus-on-valid-element.html
1622
1623         * dom/Document.cpp:
1624         (WebCore::Document::setFocusedNode):
1625         Added check for verifying that the node to be focused is
1626         focusable. However, this check should be skipped for HTMLPlugInElement
1627         because it has special behavior.
1628
1629 2013-02-07  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1630
1631         Web Inspector: Fix front-end compilation warnings related to WebInspector.SidebarPane
1632         https://bugs.webkit.org/show_bug.cgi?id=109259
1633
1634         Reviewed by Vsevolod Vlasov.
1635
1636         * inspector/front-end/DOMBreakpointsSidebarPane.js:
1637         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
1638         * inspector/front-end/SidebarPane.js:
1639
1640 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1641
1642         [V8] enum V8HiddenPropertyCreationType is not used
1643         https://bugs.webkit.org/show_bug.cgi?id=109250
1644
1645         Reviewed by Adam Barth.
1646
1647         V8HiddenPropertyCreationType is always NewSymbol. We can remove the enum.
1648
1649         No tests. No change in behavior.
1650
1651         * bindings/v8/V8HiddenPropertyName.cpp:
1652         (WebCore::hiddenReferenceName):
1653         * bindings/v8/V8HiddenPropertyName.h:
1654         (WebCore):
1655
1656 2013-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1657
1658         Unreviewed, rolling out r142212.
1659         http://trac.webkit.org/changeset/142212
1660         https://bugs.webkit.org/show_bug.cgi?id=109255
1661
1662         Causes ASSERT(!m_installed) on launch (Requested by smfr on
1663         #webkit).
1664
1665         * WebCore.exp.in:
1666         * platform/MemoryPressureHandler.cpp:
1667         (WebCore):
1668         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1669         * platform/MemoryPressureHandler.h:
1670         (MemoryPressureHandler):
1671         * platform/mac/MemoryPressureHandlerMac.mm:
1672         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1673
1674 2013-02-07  Hanyee Kim  <choco@company100.net>
1675
1676         NamedFlowCollection should be a ContextDestructionObserver
1677         https://bugs.webkit.org/show_bug.cgi?id=99239
1678
1679         Reviewed by Adam Barth
1680
1681         This patch removes the raw pointer of Document in NamedFlowCollection.
1682         It could be replaced with ContextDestructionObserver.
1683         ContextDestructionObserver has the pointer and clears the pointer
1684         automatically when the document is destroyed. 
1685
1686         * dom/Document.cpp:
1687         (WebCore::Document::~Document):
1688         * dom/NamedFlowCollection.cpp:
1689         (WebCore::NamedFlowCollection::NamedFlowCollection):
1690         (WebCore::NamedFlowCollection::ensureFlowWithName):
1691         (WebCore::NamedFlowCollection::discardNamedFlow):
1692         (WebCore::NamedFlowCollection::document):
1693         (WebCore):
1694         * dom/NamedFlowCollection.h:
1695         (NamedFlowCollection):
1696
1697 2013-02-07  Dean Jackson  <dino@apple.com>
1698
1699         Followup review suggestions from Alexey Proskuryakov on
1700         https://bugs.webkit.org/show_bug.cgi?id=109215
1701
1702         Don't provide a charset on embedded SVG, especially
1703         with incorrect syntax :)
1704
1705         * css/mediaControlsQuickTime.css:
1706         (video::-webkit-media-controls-toggle-closed-captions-button):
1707         (video::-webkit-media-controls-closed-captions-track-list li.selected):
1708         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover):
1709
1710 2013-02-07  Seulgi Kim  <seulgikim@company100.net>
1711
1712         [Gtk] RunLoop::run shuold run current thread's run loop.
1713         https://bugs.webkit.org/show_bug.cgi?id=107887
1714
1715         Reviewed by Martin Robinson.
1716
1717         Currently, RunLoop in Gtk can use just main thread's event loop.
1718         But the other ports are implemented to use RunLoop in sub threads.
1719
1720         This patch makes RunLoop constructor create new context, not use default
1721         context.
1722         But in the main thread still uses default context to use main event loop
1723         since there is some codes using glib directly (e.g. in
1724         LayerTreeHostGtk::scheduleLayerFlush).
1725
1726         No new tests. There is no case that uses RunLoop in off the main thread
1727         yet.
1728
1729         * platform/gtk/RunLoopGtk.cpp:
1730         (WebCore::RunLoop::RunLoop):
1731         (WebCore::RunLoop::run):
1732
1733 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1734
1735         [V8] Move V8DOMWrapper::setNamedHiddenReference() to V8HiddenPropertyName.h
1736         https://bugs.webkit.org/show_bug.cgi?id=109186
1737
1738         Reviewed by Adam Barth.
1739
1740         V8HiddenPropertyName.h is a right place for setNamedHiddenReference().
1741
1742         No tests. No change in behavior.
1743
1744         * bindings/scripts/CodeGeneratorV8.pm:
1745         (GenerateNormalAttrGetter):
1746         * bindings/scripts/test/V8/V8TestObj.cpp:
1747         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
1748         * bindings/v8/V8DOMWrapper.cpp:
1749         * bindings/v8/V8DOMWrapper.h:
1750         (V8DOMWrapper):
1751         * bindings/v8/V8HiddenPropertyName.cpp:
1752         (WebCore::V8HiddenPropertyName::hiddenReferenceName):
1753         (WebCore::V8HiddenPropertyName::setNamedHiddenReference):
1754         (WebCore):
1755         * bindings/v8/V8HiddenPropertyName.h:
1756         (V8HiddenPropertyName):
1757         (WebCore::V8HiddenPropertyName::V8HiddenPropertyName):
1758         * bindings/v8/custom/V8MessageChannelCustom.cpp:
1759         (WebCore::V8MessageChannel::constructorCallbackCustom):
1760         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1761         (WebCore::toV8Object):
1762
1763 2013-02-07  Elliott Sprehn  <esprehn@chromium.org>
1764
1765         getComputedStyle() doesn't report intermediate values during a transition of a pseudo element
1766         https://bugs.webkit.org/show_bug.cgi?id=106535
1767
1768         Reviewed by Ojan Vafai.
1769
1770         Element::computedStyle and CSSComputedStyleDeclaration::getPropertyCSSValue
1771         should use the PseudoElement and it's renderer if they exist so that
1772         querying the computed style while an animation is running returns
1773         the intermediate values.
1774
1775         No new tests, updated existing tests.
1776
1777         * css/CSSComputedStyleDeclaration.cpp:
1778         (WebCore::CSSComputedStyleDeclaration::styledNode): Added, returns either the PseudoElement or the Node.
1779         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to use styledNode.
1780         * css/CSSComputedStyleDeclaration.h:
1781         (CSSComputedStyleDeclaration):
1782         * dom/Element.cpp:
1783         (WebCore::Element::computedStyle): Check the PseudoElement, not just the cached pseudo style.
1784         * dom/ElementRareData.h:
1785         (WebCore::ElementRareData::pseudoElement): Remove ASSERT_NOT_REACHED so passing other pseudos returns 0.
1786
1787 2013-02-07  Mark Lam  <mark.lam@apple.com>
1788
1789         Add a comment about how the SQLTransaction state machine works.
1790         https://bugs.webkit.org/show_bug.cgi?id=109243.
1791
1792         Rubber stamped by Anders Carlsson.
1793
1794         No new tests.
1795
1796         * Modules/webdatabase/SQLTransactionBackend.cpp:
1797
1798 2013-02-06  Gavin Barraclough  <barraclough@apple.com>
1799
1800         PluginProcess should quit immediately if idle in response to low-memory notifications
1801         https://bugs.webkit.org/show_bug.cgi?id=109103
1802         <rdar://problem/12679827>
1803
1804         Reviewed by Darin Adler.
1805
1806         This patch allows a process to set a custom callback for low memory warnings
1807         (defaulting to the current behaviour, as implemented in releaseMemory).
1808
1809         MemoryPressureHandler::install is currently used for two purposes - it is
1810         called when first initializing a low memory handler for a process, and also
1811         used to reinstall the handler (on a delay) after the notification has occured.
1812         Since reinstallation doesn't change the callback, split these behaviours out -
1813         MemoryPressureHandler::initialize is added to initialization, and accepts a
1814         custom callback, install in made private.
1815
1816         * WebCore.exp.in:
1817             - Added export for releaseMemory.
1818         * platform/MemoryPressureHandler.cpp:
1819         (WebCore::MemoryPressureHandler::releaseMemory):
1820             - Added null implementation for non-Mac builds.
1821         * platform/MemoryPressureHandler.h:
1822         (WebCore::MemoryPressureHandler::initialize):
1823             - distinguish initialization from reinstallations, allow handler to be set.
1824         (MemoryPressureHandler):
1825             - Added m_lowMemoryHandler function pointer member variable.
1826         * platform/mac/MemoryPressureHandlerMac.mm:
1827         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1828             - Call m_lowMemoryHandler instead of releaseMemory.
1829
1830 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1831
1832         [V8] #ifndef NDEBUG is redundant for assertContextHasCorrectPrototype()
1833         https://bugs.webkit.org/show_bug.cgi?id=109167
1834
1835         Reviewed by Andreas Kling.
1836
1837         Given that assertContextHasCorrectPrototype() is anyway empty in a release
1838         build, we don't need to surround it with #ifndef NDEBUG.
1839
1840         No tests. No change in behavior.
1841
1842         * bindings/v8/DOMWrapperWorld.cpp:
1843         (WebCore::DOMWrapperWorld::assertContextHasCorrectPrototype):
1844         * bindings/v8/DOMWrapperWorld.h:
1845         (DOMWrapperWorld):
1846         (WebCore::DOMWrapperWorld::isolated):
1847
1848 2013-02-07  Alexei Svitkine  <asvitkine@chromium.org>
1849
1850         Chromium: Hang parsing bidi control chars on Mac OS X 10.6
1851         https://bugs.webkit.org/show_bug.cgi?id=108877
1852
1853         This was broken a while ago by:
1854             https://bugs.webkit.org/show_bug.cgi?id=83045
1855
1856         On 10.6, CoreText will not produce any runs covering the
1857         Unicode BiDi RTL mark control char, which causes an infinite
1858         loop in ComplexTextController::indexOfCurrentRun() due to no
1859         run covering the character at offset 0.
1860
1861         This patch fixes that issue by finding the earliest run
1862         explicitly via the minimum stringBegin() index instead of
1863         relying on a run existing that covers offset 0.
1864
1865         Fixes hang on many BiDi wikipedia pages on Chromium/Mac10.6.
1866         Chromium bug: http://crbug.com/167844
1867
1868         New test in the same style as the harfbuzz-buffer-overrun.html
1869         test (in the same folder).
1870
1871         Reviewed by Eric Seidel.
1872
1873         Test: fast/text/international/rtl-mark.html
1874
1875         * platform/graphics/mac/ComplexTextController.cpp:
1876         (WebCore::ComplexTextController::indexOfCurrentRun):
1877
1878 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1879
1880         Implement FocusEvent constructor
1881         https://bugs.webkit.org/show_bug.cgi?id=109170
1882
1883         Reviewed by Adam Barth.
1884
1885         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
1886
1887         FocusEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR
1888         flag, which is enabled on Chromium and Safari.
1889
1890         Test: fast/events/constructors/focus-event-constructor.html
1891
1892         * dom/FocusEvent.cpp:
1893         (WebCore::FocusEventInit::FocusEventInit):
1894         (WebCore):
1895         (WebCore::FocusEvent::FocusEvent):
1896         * dom/FocusEvent.h:
1897         (FocusEventInit):
1898         (WebCore):
1899         (WebCore::FocusEvent::create):
1900         (FocusEvent):
1901         * dom/FocusEvent.idl:
1902         * page/DOMWindow.idl:
1903
1904 2013-02-07  Elliott Sprehn  <esprehn@chromium.org>
1905
1906         HTML parser should queue MutationRecords for its operations
1907         https://bugs.webkit.org/show_bug.cgi?id=89351
1908
1909         Reviewed by Eric Seidel.
1910
1911         Generate mutation records inside the parser. This is done by using a
1912         ChildListMutationScope in the ContainerNode::parser* methods and then
1913         adding delivery before each <script> element would be processed by
1914         the parser.
1915
1916         Test: fast/dom/MutationObserver/parser-mutations.html
1917
1918         * dom/ContainerNode.cpp:
1919         (WebCore::ContainerNode::takeAllChildrenFrom):
1920         (WebCore::ContainerNode::parserInsertBefore):
1921         (WebCore::ContainerNode::parserRemoveChild):
1922         (WebCore::ContainerNode::parserAppendChild):
1923         * html/parser/HTMLScriptRunner.cpp:
1924         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
1925         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1926         (WebCore::HTMLScriptRunner::execute):
1927         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
1928         (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
1929         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1930         (WebCore::HTMLScriptRunner::runScript):
1931
1932 2013-02-07  Kentaro Hara  <haraken@chromium.org>
1933
1934         Fix FIXMEs in WindowFeatures.h
1935         https://bugs.webkit.org/show_bug.cgi?id=109151
1936
1937         Reviewed by Adam Barth.
1938
1939         1. // FIXME: We can delete this constructor once V8 showModalDialog is
1940            // changed to use DOMWindow.
1941
1942         This FIXME is not right. The WindowFeatures() constructor is used by
1943         other ports too (e.g. WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp).
1944         So we should remove the FIXME.
1945
1946         2. // FIXME: We can make these functions private non-member functions
1947            // once V8 showModalDialog is changed to use DOMWindow.
1948
1949         Given that V8 now uses DOMWindow in showModalDialog(), we can make the
1950         methods private.
1951
1952         No tests. No change in behavior.
1953
1954         * page/WindowFeatures.h:
1955         (WebCore):
1956         (WebCore::WindowFeatures::WindowFeatures):
1957         (WindowFeatures):
1958
1959 2013-02-07  Adam Barth  <abarth@webkit.org>
1960
1961         fast/parser/document-write-noscript.html fails for threaded HTML parser
1962         https://bugs.webkit.org/show_bug.cgi?id=109237
1963
1964         Reviewed by Eric Seidel.
1965
1966         If there are multiple calls to document.write in an external script, we
1967         need to wait for them all to complete before invalidating the
1968         speculative tokens. Instead of doing this when we unwind the
1969         document.write call stack, we do this when we're about to resume
1970         parsing after script execution.
1971
1972         Test: fast/parser/document-write-basic.html
1973
1974         * html/parser/HTMLDocumentParser.cpp:
1975         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
1976         (WebCore::HTMLDocumentParser::insert):
1977         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
1978
1979 2013-02-07  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1980
1981         Fix build when compiling with css3-text and css3-conditional-rules feature flags enabled.
1982         https://bugs.webkit.org/show_bug.cgi?id=109217
1983
1984         Reviewed by Benjamin Poulain.
1985
1986         * css/InspectorCSSOMWrappers.cpp:
1987         (WebCore::InspectorCSSOMWrappers::collect):
1988
1989 2013-02-07  Keishi Hattori  <keishi@webkit.org>
1990
1991         REGRESSION (r140778): Calendar Picker doesn't open when the element has the required attribute
1992         https://bugs.webkit.org/show_bug.cgi?id=109136
1993
1994         Reviewed by Kent Tamura.
1995
1996         Calendar picker was using the "Clear" button to calculate the window width.
1997         Since it doesn't exist when the input element has a required attribute,
1998         it was throwing an error. This patch fixes the width calculating logic.
1999
2000         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html
2001                platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required.html
2002
2003         * Resources/pagepopups/calendarPicker.css:
2004         (.today-clear-area):
2005         * Resources/pagepopups/calendarPicker.js:
2006         (CalendarPicker.prototype.fixWindowSize): Fixing the logic to calculate
2007         the width. We don't want to use clear button because it doesn't exist
2008         when a value is required.
2009
2010 2013-02-07  Terry Anderson  <tdanderson@chromium.org>
2011
2012         Non-scrollable divs and non-scrollable iframes can scroll with touch
2013         https://bugs.webkit.org/show_bug.cgi?id=109087
2014
2015         Reviewed by Eric Seidel.
2016
2017         Tests: fast/events/touch/gesture/touch-gesture-noscroll-div.html
2018                fast/events/touch/gesture/touch-gesture-noscroll-iframe.html
2019
2020         When finding a candidate for a scrollable node in
2021         EventHandler::handleGestureScrollUpdate(), select the document node
2022         if it is reached before any scrollable element when walking up the DOM
2023         tree. Also ensure that calling RenderLayer::scrollBy() for a document
2024         node does not result in scrolling if the element is not scrollable.
2025
2026         * page/EventHandler.cpp:
2027         (WebCore::closestScrollableNodeCandidate):
2028         (WebCore::EventHandler::handleGestureScrollUpdate):
2029         * rendering/RenderLayer.cpp:
2030         (WebCore::RenderLayer::scrollBy):
2031
2032 2013-02-07  Mark Lam  <mark.lam@apple.com>
2033
2034         Introduce SQLTransactionBackend and SQLTransactionBackendSync [Part 2].
2035         https://bugs.webkit.org/show_bug.cgi?id=109109.
2036
2037         Reviewed by Anders Carlsson.
2038
2039         Adding back the new SQLTransaction and SQLTransactionSync files.
2040
2041         No new tests.
2042
2043         * Modules/webdatabase/SQLTransaction.cpp: Added.
2044         (WebCore::SQLTransaction::create):
2045         (WebCore::SQLTransaction::SQLTransaction):
2046         (WebCore::SQLTransaction::from):
2047         * Modules/webdatabase/SQLTransaction.h: Added.
2048         (SQLTransaction):
2049         * Modules/webdatabase/SQLTransactionSync.cpp: Added.
2050         (WebCore::SQLTransactionSync::create):
2051         (WebCore::SQLTransactionSync::SQLTransactionSync):
2052         (WebCore::SQLTransactionSync::from):
2053         * Modules/webdatabase/SQLTransactionSync.h: Added.
2054         (SQLTransactionSync):
2055
2056 2013-02-07  Mark Lam  <mark.lam@apple.com>
2057
2058         Introduce SQLTransactionBackend and SQLTransactionBackendSync.
2059         https://bugs.webkit.org/show_bug.cgi?id=109109.
2060
2061         Reviewed by Anders Carlsson.
2062
2063         - Renamed SQLTransaction and SQLTransactionSync to SQLTransactionBackend
2064           and SQLTransactionBackendSync respectively.
2065         - Added back SQLTransaction and SQLTransactionSync as new files, and have
2066           their classes extends their respective backends. This is a stop gap
2067           measure to keep things working until the front-end and back-end can be
2068           properly split.
2069           Note: these files will be committed in a subsequent commit to ensure
2070           that the patching goes smoothly.
2071         - Where needed, I made use of new SQLTransaction::from() and
2072           SQLTransactionSync::from() static methods that "get" the front-end
2073           transactions from the back-ends. This is also a stop gap measure to
2074           keep things working until the proper refactoring is complete.
2075         - Fixed up pre-existing style checker violations that are now detected
2076           on code that were touched during my renaming.
2077         - Added the back-end files to all the build files.
2078
2079         No new tests.
2080
2081         * CMakeLists.txt:
2082         * GNUmakefile.list.am:
2083         * Modules/webdatabase/Database.cpp:
2084         (WebCore::Database::scheduleTransactionStep):
2085         * Modules/webdatabase/Database.h:
2086         (Database):
2087         * Modules/webdatabase/DatabaseBackend.h:
2088         (DatabaseBackend):
2089         * Modules/webdatabase/DatabaseTask.cpp:
2090         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
2091         * Modules/webdatabase/DatabaseTask.h:
2092         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::create):
2093         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::transaction):
2094         (DatabaseBackendAsync::DatabaseTransactionTask):
2095         * Modules/webdatabase/SQLTransaction.cpp: Removed.
2096         * Modules/webdatabase/SQLTransaction.h: Removed.
2097         * Modules/webdatabase/SQLTransactionBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.cpp.
2098         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
2099         (WebCore::SQLTransactionBackend::~SQLTransactionBackend):
2100         (WebCore::SQLTransactionBackend::executeSQL):
2101         (WebCore::SQLTransactionBackend::enqueueStatement):
2102         (WebCore::SQLTransactionBackend::debugStepName):
2103         (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
2104         (WebCore::SQLTransactionBackend::performNextStep):
2105         (WebCore::SQLTransactionBackend::performPendingCallback):
2106         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
2107         (WebCore::SQLTransactionBackend::acquireLock):
2108         (WebCore::SQLTransactionBackend::lockAcquired):
2109         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2110         (WebCore::SQLTransactionBackend::deliverTransactionCallback):
2111         (WebCore::SQLTransactionBackend::scheduleToRunStatements):
2112         (WebCore::SQLTransactionBackend::runStatements):
2113         (WebCore::SQLTransactionBackend::getNextStatement):
2114         (WebCore::SQLTransactionBackend::runCurrentStatement):
2115         (WebCore::SQLTransactionBackend::handleCurrentStatementError):
2116         (WebCore::SQLTransactionBackend::deliverStatementCallback):
2117         (WebCore::SQLTransactionBackend::deliverQuotaIncreaseCallback):
2118         (WebCore::SQLTransactionBackend::postflightAndCommit):
2119         (WebCore::SQLTransactionBackend::deliverSuccessCallback):
2120         (WebCore::SQLTransactionBackend::cleanupAfterSuccessCallback):
2121         (WebCore::SQLTransactionBackend::handleTransactionError):
2122         (WebCore::SQLTransactionBackend::deliverTransactionErrorCallback):
2123         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
2124         * Modules/webdatabase/SQLTransactionBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransaction.h.
2125         (SQLTransactionBackend):
2126         * Modules/webdatabase/SQLTransactionBackendSync.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.cpp.
2127         (WebCore::SQLTransactionBackendSync::SQLTransactionBackendSync):
2128         (WebCore::SQLTransactionBackendSync::~SQLTransactionBackendSync):
2129         (WebCore::SQLTransactionBackendSync::executeSQL):
2130         (WebCore::SQLTransactionBackendSync::begin):
2131         (WebCore::SQLTransactionBackendSync::execute):
2132         (WebCore::SQLTransactionBackendSync::commit):
2133         (WebCore::SQLTransactionBackendSync::rollback):
2134         * Modules/webdatabase/SQLTransactionBackendSync.h: Copied from Source/WebCore/Modules/webdatabase/SQLTransactionSync.h.
2135         (SQLTransactionBackendSync):
2136         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2137         (WebCore::getDatabaseIdentifier):
2138         (WebCore::SQLTransactionCoordinator::processPendingTransactions):
2139         (WebCore::SQLTransactionCoordinator::acquireLock):
2140         (WebCore::SQLTransactionCoordinator::releaseLock):
2141         (WebCore::SQLTransactionCoordinator::shutdown):
2142         * Modules/webdatabase/SQLTransactionCoordinator.h:
2143         (SQLTransactionCoordinator):
2144         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
2145         (CoordinationInfo):
2146         * Modules/webdatabase/SQLTransactionSync.cpp: Removed.
2147         * Modules/webdatabase/SQLTransactionSync.h: Removed.
2148         * Target.pri:
2149         * WebCore.gypi:
2150         * WebCore.vcproj/WebCore.vcproj:
2151         * WebCore.vcxproj/WebCore.vcxproj:
2152         * WebCore.vcxproj/WebCore.vcxproj.filters:
2153         * WebCore.xcodeproj/project.pbxproj:
2154
2155 2013-02-07  Dean Jackson  <dino@apple.com>
2156
2157         Use new speech bubble artwork for captions menu button
2158         https://bugs.webkit.org/show_bug.cgi?id=109215
2159
2160         Reviewed by Eric Carlson.
2161
2162         Rather than call into RenderTheme to display this button, embed artwork
2163         into the CSS. This means we can remove some uncalled methods in
2164         RenderTheme.
2165
2166         * css/mediaControlsQuickTime.css:
2167         (video::-webkit-media-controls-toggle-closed-captions-button): New background image using SVG.
2168         * rendering/RenderTheme.cpp:
2169         (WebCore::RenderTheme::paint): Don't call the specific painter for the CC button.
2170         * rendering/RenderTheme.h: Remove unused function.
2171         * rendering/RenderThemeMac.h: Ditto.
2172         * rendering/RenderThemeMac.mm: Ditto.
2173
2174 2013-02-07  Michelangelo De Simone  <michelangelo@webkit.org>
2175
2176         [CSS Shaders] Add the last blending step
2177         https://bugs.webkit.org/show_bug.cgi?id=104012
2178
2179         The resulting blended color in mix() is now weighted according to
2180         the original element's backdrop alpha value.
2181
2182         Reviewed by Dean Jackson.
2183
2184         Test: css3/filters/custom/custom-filter-blend-fractional-destination-alpha.html
2185
2186         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2187         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
2188
2189 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
2190
2191         Fix two exports of WebCore symbols on iOS
2192         https://bugs.webkit.org/show_bug.cgi?id=109238
2193
2194         Reviewed by David Kilzer.
2195
2196         * WebCore.exp.in: Export wkCTFontTransformGlyphs but not
2197         wkCGContextDrawsWithCorrectShadowOffsets on iOS.
2198
2199 2013-02-07  Hans Muller  <hmuller@adobe.com>
2200
2201         [CSS Exclusions] Ignore ExclusionPolygon edges above minLogicalIntervalTop
2202         https://bugs.webkit.org/show_bug.cgi?id=107566
2203
2204         Reviewed by David Hyatt.
2205
2206         Improve ExclusionPolygon::firstIncludedIntervalLogicalTop() performance by only
2207         creating offset edges for polygon edges that are below the horizontal minLogicalIntervalTop
2208         line. In other words, don't bother creating offset edges that can't define the polygon's
2209         first fit location.
2210
2211         Test: fast/exclusions/shape-inside/shape-inside-first-fit-004.html
2212
2213         * rendering/ExclusionPolygon.cpp:
2214         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Don't create offset edges for polygon edges above minLogicalIntervalTop.
2215
2216 2013-02-07  Jer Noble  <jer.noble@apple.com>
2217
2218         Improve logging of MediaPlayerPrivateAVFoundation Notifications.
2219         https://bugs.webkit.org/show_bug.cgi?id=109223
2220
2221         Reviewed by Eric Carlson.
2222
2223         Convert the existing Notification enum to an expandable macro. Then add a
2224         Logging-only function which stringifies the enums.
2225
2226         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2227         (WebCore):
2228         (WebCore::notificationName):
2229         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
2230         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2231         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2232
2233 2013-02-07  Martin Robinson  <mrobinson@igalia.com>
2234
2235         [GTK] Cleanup command-line defines
2236         https://bugs.webkit.org/show_bug.cgi?id=109213
2237
2238         Reviewed by Xan Lopez.
2239
2240         * GNUmakefile.am: Remove references to flags that are now handled
2241         via autotoolsconfig.h.
2242
2243 2013-02-07  Tom Sepez  <tsepez@chromium.org>
2244
2245         [V8] Binding Integrity crash in V8MediaStream::createWrapper
2246         https://bugs.webkit.org/show_bug.cgi?id=109211
2247
2248         Reviewed by Adam Barth.
2249
2250         Patch suppresses a chrome crasher.
2251
2252         * Modules/mediastream/MediaStream.idl:
2253
2254 2013-02-07  Eric Carlson  <eric.carlson@apple.com>
2255
2256         [Mac] decrease in-band caption advance notice interval
2257         https://bugs.webkit.org/show_bug.cgi?id=109190
2258
2259         Reviewed by Simon Fraser.
2260
2261         No new tests, no observable change in behavior.
2262
2263         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2264         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Request cues 2 seconds in advance.
2265
2266 2013-02-07  ChangSeok Oh  <shivamidow@gmail.com>
2267
2268         [GTK][AC] Clutter required version up to 1.12
2269         https://bugs.webkit.org/show_bug.cgi?id=109037
2270
2271         Reviewed by Martin Robinson.
2272
2273         Replace deprecated clutter apis with new ones.
2274
2275         No new tests, since this patch is minor refactoring.
2276
2277         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2278         (graphicsLayerActorSetAnchorPoint):
2279         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2280         (WebCore::idleDestroy):
2281         (WebCore::GraphicsLayerClutter::updateSublayerList):
2282
2283 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
2284
2285         Move pauseAnimation/pauseTransition from TestRunner to Internals
2286         https://bugs.webkit.org/show_bug.cgi?id=109107
2287
2288         Reviewed by Anders Carlsson.
2289
2290         Tests: animations/animation-internals-api-multiple-keyframes.html
2291                animations/animation-internals-api.html
2292
2293         * testing/Internals.cpp:
2294         (WebCore::Internals::pauseAnimationAtTimeOnElement):
2295         (WebCore):
2296         (WebCore::Internals::pauseTransitionAtTimeOnElement):
2297         * testing/Internals.h:
2298         (Internals):
2299         * testing/Internals.idl:
2300
2301 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2302
2303         Unreviewed, rolling out r142155.
2304         http://trac.webkit.org/changeset/142155
2305         https://bugs.webkit.org/show_bug.cgi?id=82888
2306
2307         cr/win build broke.
2308
2309         * bindings/js/JSClipboardCustom.cpp:
2310         (WebCore::JSClipboard::types):
2311         * bindings/v8/custom/V8ClipboardCustom.cpp:
2312         (WebCore::V8Clipboard::typesAccessorGetter):
2313         * dom/Clipboard.h:
2314         (Clipboard):
2315         * platform/blackberry/ClipboardBlackBerry.cpp:
2316         (WebCore::ClipboardBlackBerry::types):
2317         * platform/blackberry/ClipboardBlackBerry.h:
2318         (ClipboardBlackBerry):
2319         * platform/chromium/ChromiumDataObject.cpp:
2320         (WebCore::ChromiumDataObject::types):
2321         * platform/chromium/ChromiumDataObject.h:
2322         (ChromiumDataObject):
2323         * platform/chromium/ClipboardChromium.cpp:
2324         (WebCore::ClipboardChromium::types):
2325         * platform/chromium/ClipboardChromium.h:
2326         (ClipboardChromium):
2327         * platform/efl/ClipboardEfl.cpp:
2328         (WebCore::ClipboardEfl::types):
2329         * platform/efl/ClipboardEfl.h:
2330         (ClipboardEfl):
2331         * platform/gtk/ClipboardGtk.cpp:
2332         (WebCore::ClipboardGtk::types):
2333         * platform/gtk/ClipboardGtk.h:
2334         (ClipboardGtk):
2335         * platform/mac/ClipboardMac.h:
2336         (ClipboardMac):
2337         * platform/mac/ClipboardMac.mm:
2338         (WebCore::addHTMLClipboardTypesForCocoaType):
2339         (WebCore::ClipboardMac::types):
2340         * platform/qt/ClipboardQt.cpp:
2341         (WebCore::ClipboardQt::types):
2342         * platform/qt/ClipboardQt.h:
2343         (ClipboardQt):
2344         * platform/win/ClipboardWin.cpp:
2345         (WebCore::addMimeTypesForFormat):
2346         (WebCore::ClipboardWin::types):
2347         * platform/win/ClipboardWin.h:
2348         (ClipboardWin):
2349
2350 2013-02-07  Rik Cabanier  <cabanier@adobe.com>
2351
2352         Add support for parsing of -webkit-background-blend-mode
2353         https://bugs.webkit.org/show_bug.cgi?id=108547
2354
2355         Reviewed by David Hyatt.
2356
2357         Added parsing and general CSS handling of -webkit-background-blend-mode per 
2358         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode
2359
2360         Tests: css3/compositing/background-blend-mode-property-parsing.html
2361                css3/compositing/background-blend-mode-property.html
2362
2363         * css/CSSComputedStyleDeclaration.cpp: Built value for getComputedStyle.
2364         (WebCore):
2365         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2366         * css/CSSParser.cpp: Parsed and stored value of -webkit-background-blend-mode.
2367         (WebCore::CSSParser::parseValue):
2368         (WebCore::CSSParser::parseFillProperty):
2369         * css/CSSProperty.cpp: Listed -webkit-background-blend-mode as a non-inherited property.
2370         (WebCore::CSSProperty::isInheritedProperty):
2371         * css/CSSPropertyNames.in: Added -webkit-background-blend-mode as a CSS property.
2372         * css/CSSToStyleMap.cpp: Mapped background blend mode from CSS value to enum.
2373         (WebCore::CSSToStyleMap::mapFillBlendMode):
2374         (WebCore):
2375         * css/CSSToStyleMap.h: Added function declaration 'mapFillBlendMode'.
2376         (CSSToStyleMap):
2377         * css/StyleBuilder.cpp: Set up propery handler for -webkit-background-blend-mode.
2378         (WebCore::StyleBuilder::StyleBuilder):
2379         * rendering/style/FillLayer.cpp: Added code to store and retrieve the blend mode from a layer.
2380         (WebCore::FillLayer::FillLayer):
2381         (WebCore::FillLayer::operator=):
2382         (WebCore::FillLayer::operator==):
2383         (WebCore::FillLayer::fillUnsetProperties):
2384         * rendering/style/FillLayer.h: Added function definitions to manage blend mode in a layer.
2385         (WebCore::FillLayer::blendMode):
2386         (WebCore::FillLayer::isBlendModeSet):
2387         (WebCore::FillLayer::setBlendMode):
2388         (WebCore::FillLayer::clearBlendMode):
2389         (WebCore::FillLayer::initialFillBlendMode):
2390         (FillLayer):
2391
2392 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2393
2394         Unreviewed, rolling out r142142.
2395         http://trac.webkit.org/changeset/142142
2396         https://bugs.webkit.org/show_bug.cgi?id=109154
2397
2398         Mac expectations were not right. See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .
2399
2400
2401         * inspector/front-end/DefaultTextEditor.js:
2402         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
2403
2404 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2405
2406         Unreviewed, rolling out r142081.
2407         http://trac.webkit.org/changeset/142081
2408         https://bugs.webkit.org/show_bug.cgi?id=109146
2409
2410         The patch caused a crash in inspector-protocol/nmi-webaudio*.html .
2411
2412         See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio-leak-test.html and http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=inspector-protocol%2Fnmi-webaudio.html .
2413
2414         * dom/WebCoreMemoryInstrumentation.cpp:
2415         (WebCore):
2416         * inspector/front-end/NativeMemorySnapshotView.js:
2417         (WebInspector.MemoryBlockViewProperties._initialize):
2418         * platform/PlatformMemoryInstrumentation.cpp:
2419         (WebCore):
2420
2421 2013-02-07  Bear Travis  <betravis@adobe.com>
2422
2423         [CSS Exclusions] shape-inside does not properly handle padding or border
2424         https://bugs.webkit.org/show_bug.cgi?id=102715
2425
2426         Reviewed by David Hyatt.
2427
2428         This patch positions the exclusion shape based on the value of the css box sizing
2429         property. Geometry calculations happen in the shape coordinate space. For layout,
2430         these coordinates are translated to the border-box coordinate system by adding
2431         the appropriate offsets.
2432
2433         Test: fast/exclusions/shape-inside/shape-inside-box-sizing.html
2434
2435         * rendering/ExclusionShapeInfo.cpp:
2436         (WebCore::::computedShape): Pass m_shapeLogicalWidth to the exclusion shape
2437         geometry code.
2438         * rendering/ExclusionShapeInfo.h:
2439         (WebCore::ExclusionShapeInfo::setShapeSize): Adjust block layout dimensions to
2440         shape dimensions when checking to see if the shape geometry must be recalculated.
2441         (WebCore::ExclusionShapeInfo::shapeLogicalTop): Account for layout offsets.
2442         (WebCore::ExclusionShapeInfo::shapeLogicalBottom): Ditto.
2443         (WebCore::ExclusionShapeInfo::shapeLogicalLeft): Ditto.
2444         (WebCore::ExclusionShapeInfo::shapeLogicalRight): Ditto.
2445         (WebCore::ExclusionShapeInfo::logicalTopOffset): Return the offset from the logical
2446         top of the border box to the logical top of the shape.
2447         (WebCore::ExclusionShapeInfo::logicalLeftOffset): Return the offset from the logical
2448         left of the border box to the logical left of the shape.
2449         (ExclusionShapeInfo):
2450         * rendering/ExclusionShapeInsideInfo.cpp:
2451         (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): Adjust line top to
2452         be in shape coordinates.
2453         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): Ditto.
2454         * rendering/ExclusionShapeInsideInfo.h:
2455         (WebCore::ExclusionShapeInsideInfo::lineOverlapsShapeBounds): Use consistent
2456         coordinate system (border box) to test for whether a line overlaps a shape.
2457         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): Include the logical offset
2458         from the border box.
2459         (WebCore::ExclusionShapeInsideInfo::logicalLineBottom): Ditto.
2460
2461 2013-02-07  Benjamin Poulain  <bpoulain@apple.com>
2462
2463         Upstream iOS isWebThread() and isUIThread()
2464         https://bugs.webkit.org/show_bug.cgi?id=109130
2465
2466         Reviewed by Sam Weinig.
2467
2468         * bindings/objc/WebScriptObject.mm:
2469         (+[WebScriptObject initialize]):
2470         * platform/mac/SharedBufferMac.mm:
2471         (+[WebCoreSharedBufferData initialize]):
2472         #ifdef out the legacy initialization as it is not correct when
2473         using a WebThread.
2474
2475 2013-02-07  Vivek Galatage  <vivek.vg@samsung.com>
2476
2477         Web Inspector: CPU pegged when inspecting LocalStorage that mutates.
2478         https://bugs.webkit.org/show_bug.cgi?id=107937
2479
2480         Reviewed by Yury Semikhatsky.
2481
2482         The DOM storage agent will fire an event to the frontend based on the action
2483         performed on the storage. Based on this action, the front-end will just add/update/remove
2484         the entry in the view. This enhances the front-end responsiveness as the round trip
2485         for fetching the storage entries has been eliminated.
2486
2487         Existing test: LayoutTests/inspector/storage-panel-dom-storage-update.html should verify the change
2488
2489         * inspector/Inspector.json:
2490         * inspector/InspectorDOMStorageAgent.cpp:
2491         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2492         * inspector/front-end/DOMStorage.js:
2493         (WebInspector.DOMStorageModel.prototype._domStorageItemsCleared):
2494         (WebInspector.DOMStorageModel.prototype._domStorageItemRemoved):
2495         (WebInspector.DOMStorageModel.prototype._domStorageItemAdded):
2496         (WebInspector.DOMStorageModel.prototype._domStorageItemUpdated):
2497         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemsCleared):
2498         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemRemoved):
2499         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemAdded):
2500         (WebInspector.DOMStorageDispatcher.prototype.domStorageItemUpdated):
2501         * inspector/front-end/DOMStorageItemsView.js:
2502         (WebInspector.DOMStorageItemsView):
2503         (WebInspector.DOMStorageItemsView.prototype.wasShown):
2504         (WebInspector.DOMStorageItemsView.prototype._domStorageItemsCleared):
2505         (WebInspector.DOMStorageItemsView.prototype._domStorageItemRemoved):
2506         (WebInspector.DOMStorageItemsView.prototype._domStorageItemAdded):
2507         (WebInspector.DOMStorageItemsView.prototype._domStorageItemUpdated):
2508         (WebInspector.DOMStorageItemsView.prototype._update):
2509         (WebInspector.DOMStorageItemsView.prototype._showDOMStorageEntries):
2510         (WebInspector.DOMStorageItemsView.prototype._refreshButtonClicked):
2511         (WebInspector.DOMStorageItemsView.prototype._editingCallback):
2512         (WebInspector.DOMStorageItemsView.prototype._deleteCallback):
2513         * inspector/front-end/ResourcesPanel.js:
2514         (WebInspector.ResourcesPanel):
2515         (WebInspector.ResourcesPanel.prototype._showDOMStorage.get if):
2516         (WebInspector.ResourcesPanel.prototype._showDOMStorage):
2517
2518 2013-02-07  Dan Carney  <dcarney@google.com>
2519
2520         [v8] move persistent::new and ::dispose into same class
2521         https://bugs.webkit.org/show_bug.cgi?id=109065
2522
2523         Reviewed by Adam Barth.
2524
2525         No new tests. No change in functionality.
2526
2527         * bindings/scripts/CodeGeneratorV8.pm:
2528         (GenerateSingleConstructorCallback):
2529         (GenerateEventConstructorCallback):
2530         (GenerateNamedConstructorCallback):
2531         (GenerateToV8Converters):
2532         * bindings/scripts/test/V8/V8Float64Array.cpp:
2533         (WebCore::V8Float64Array::createWrapper):
2534         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2535         (WebCore::V8TestActiveDOMObject::createWrapper):
2536         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2537         (WebCore::V8TestCustomNamedGetter::createWrapper):
2538         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2539         (WebCore::V8TestEventConstructor::constructorCallback):
2540         (WebCore::V8TestEventConstructor::createWrapper):
2541         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2542         (WebCore::V8TestEventTarget::createWrapper):
2543         * bindings/scripts/test/V8/V8TestException.cpp:
2544         (WebCore::V8TestException::createWrapper):
2545         * bindings/scripts/test/V8/V8TestInterface.cpp:
2546         (WebCore::V8TestInterface::constructorCallback):
2547         (WebCore::V8TestInterface::createWrapper):
2548         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2549         (WebCore::V8TestMediaQueryListListener::createWrapper):
2550         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2551         (WebCore::V8TestNamedConstructorConstructorCallback):
2552         (WebCore::V8TestNamedConstructor::createWrapper):
2553         * bindings/scripts/test/V8/V8TestNode.cpp:
2554         (WebCore::V8TestNode::constructorCallback):
2555         (WebCore::V8TestNode::createWrapper):
2556         * bindings/scripts/test/V8/V8TestObj.cpp:
2557         (WebCore::V8TestObj::constructorCallback):
2558         (WebCore::V8TestObj::createWrapper):
2559         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2560         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
2561         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
2562         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
2563         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
2564         (WebCore::V8TestOverloadedConstructors::createWrapper):
2565         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2566         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2567         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
2568         * bindings/v8/DOMDataStore.cpp:
2569         * bindings/v8/DOMDataStore.h:
2570         (WebCore::DOMDataStore::setWrapper):
2571         (DOMDataStore):
2572         (WebCore::DOMDataStore::set):
2573         (WebCore::DOMDataStore::setWrapperInObject):
2574         * bindings/v8/DOMWrapperMap.h:
2575         (WebCore::DOMWrapperMap::get):
2576         (WebCore::DOMWrapperMap::set):
2577         (WebCore::DOMWrapperMap::removeAndDispose):
2578         (WebCore::DOMWrapperMap::defaultWeakCallback):
2579         * bindings/v8/ScriptWrappable.h:
2580         (WebCore::ScriptWrappable::wrapper):
2581         (WebCore::ScriptWrappable::setWrapper):
2582         (WebCore::ScriptWrappable::reportMemoryUsage):
2583         (ScriptWrappable):
2584         (WebCore::ScriptWrappable::disposeWrapper):
2585         (WebCore::ScriptWrappable::weakCallback):
2586         * bindings/v8/V8DOMWindowShell.cpp:
2587         (WebCore::V8DOMWindowShell::installDOMWindow):
2588         * bindings/v8/V8DOMWrapper.h:
2589         (V8DOMWrapper):
2590         (WebCore::V8DOMWrapper::associateObjectWithWrapper):
2591         * bindings/v8/V8NPObject.cpp:
2592         (WebCore::weakNPObjectCallback):
2593         (WebCore::createV8ObjectForNPObject):
2594         (WebCore::forgetV8ObjectForNPObject):
2595         * bindings/v8/WorkerScriptController.cpp:
2596         (WebCore::WorkerScriptController::initializeContextIfNeeded):
2597         * bindings/v8/WrapperTypeInfo.h:
2598         (WebCore):
2599         (WrapperConfiguration):
2600         (WebCore::WrapperConfiguration::configureWrapper):
2601         (WebCore::buildWrapperConfiguration):
2602         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
2603         (WebCore::V8ArrayBuffer::constructorCallbackCustom):
2604         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
2605         (WebCore::wrapArrayBufferView):
2606         (WebCore::constructWebGLArray):
2607         * bindings/v8/custom/V8AudioContextCustom.cpp:
2608         (WebCore::V8AudioContext::constructorCallbackCustom):
2609         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
2610         (WebCore::V8DOMFormData::constructorCallbackCustom):
2611         * bindings/v8/custom/V8DataViewCustom.cpp:
2612         (WebCore::V8DataView::constructorCallbackCustom):
2613         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2614         (WebCore::v8HTMLImageElementConstructorCallback):
2615         * bindings/v8/custom/V8IntentCustom.cpp:
2616         (WebCore::V8Intent::constructorCallbackCustom):
2617         * bindings/v8/custom/V8MessageChannelCustom.cpp:
2618         (WebCore::V8MessageChannel::constructorCallbackCustom):
2619         * bindings/v8/custom/V8MutationObserverCustom.cpp:
2620         (WebCore::V8MutationObserver::constructorCallbackCustom):
2621         * bindings/v8/custom/V8WebKitPointCustom.cpp:
2622         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2623         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2624         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2625
2626 2013-02-07  Zan Dobersek  <zdobersek@igalia.com>
2627
2628         [Autotools] Remove uses of Automake FARSTREAM_(CFLAGS|LIBS) variables, USE_FARSTREAM conditional
2629         https://bugs.webkit.org/show_bug.cgi?id=109198
2630
2631         Reviewed by Martin Robinson.
2632
2633         * GNUmakefile.am: Remove FARSTREAM_CFLAGS variable, it's not set to anything.
2634
2635 2013-02-07   Vineet Chaudhary  <rgf748@motorola.com>
2636
2637         Consider replacing return type of Clipboard::types() from ListHashSet<String> to Vector<String>
2638         https://bugs.webkit.org/show_bug.cgi?id=82888
2639
2640         Reviewed by Kentaro Hara.
2641
2642         As part of removing custom bindings of types Array Clipboard::types() needs to return
2643         Vector<String> than ListHashSet<String>
2644
2645         No new tests. Existing test should pass with this change as no behavoural changes.
2646
2647         * bindings/js/JSClipboardCustom.cpp: Replace data type from ListHashSet<> to Vector<>.
2648         (WebCore::JSClipboard::types):
2649         * bindings/v8/custom/V8ClipboardCustom.cpp: Ditto.
2650         (WebCore::V8Clipboard::typesAccessorGetter): Ditto.
2651         * dom/Clipboard.h: Ditto.
2652         * platform/blackberry/ClipboardBlackBerry.cpp: Ditto.
2653         (WebCore::ClipboardBlackBerry::types):
2654         * platform/blackberry/ClipboardBlackBerry.h: Ditto.
2655         * platform/chromium/ChromiumDataObject.cpp: Ditto.
2656         (WebCore::ChromiumDataObject::types):
2657         * platform/chromium/ChromiumDataObject.h: Ditto.
2658         * platform/chromium/ClipboardChromium.cpp: Ditto.
2659         (WebCore::ClipboardChromium::types):
2660         * platform/chromium/ClipboardChromium.h: Ditto.
2661         * platform/efl/ClipboardEfl.cpp: Ditto.
2662         (WebCore::ClipboardEfl::types):
2663         * platform/efl/ClipboardEfl.h: Ditto.
2664         * platform/gtk/ClipboardGtk.cpp: Ditto.
2665         (WebCore::ClipboardGtk::types):
2666         * platform/gtk/ClipboardGtk.h: Ditto.
2667         * platform/mac/ClipboardMac.h: Ditto.
2668         * platform/mac/ClipboardMac.mm: Ditto.
2669         (WebCore::addHTMLClipboardTypesForCocoaType):
2670         (WebCore::ClipboardMac::types):
2671         * platform/qt/ClipboardQt.cpp: Ditto.
2672         (WebCore::ClipboardQt::types):
2673         * platform/qt/ClipboardQt.h: Ditto.
2674         * platform/win/ClipboardWin.cpp: Ditto.
2675         (WebCore::addMimeTypesForFormat):
2676         (WebCore::ClipboardWin::types):
2677         * platform/win/ClipboardWin.h: Ditto.
2678
2679 2013-02-07  Kentaro Hara  <haraken@chromium.org>
2680
2681         [V8] StringCache::m_stringCache should be HashMap<StringImpl*, Persistent<String>>
2682         https://bugs.webkit.org/show_bug.cgi?id=109123
2683
2684         Reviewed by Adam Barth.
2685
2686         Currently StringCache::m_stringCache is implemented as
2687         HashMap<StringImpl*, v8::String*>. Given that v8::String*
2688         can change when a GC is triggered, it is dangerous to store a raw pointer.
2689         We should use HashMap<StringImpl*, v8::Persistent<v8::String>> instead.
2690
2691         This is a possible fix for an IndexedDB crash (https://bugs.webkit.org/show_bug.cgi?id=105363),
2692         although I'm not sure if this patch fixes the crash. (I couldn't reproduce the crash.)
2693
2694         No tests. This change highly depends on GC behavior and thus it is
2695         difficult to make a reliable test case.
2696
2697         * bindings/v8/V8ValueCache.cpp:
2698         (WebCore::makeExternalString):
2699         * bindings/v8/V8ValueCache.h:
2700         (StringCache):
2701
2702 2013-01-27  Robert Hogan  <robert@webkit.org>
2703
2704         CSS 2.1 failure: floats-149 fails
2705         https://bugs.webkit.org/show_bug.cgi?id=95772
2706
2707         Reviewed by David Hyatt.
2708
2709         Treat inlines that contain nothing but empty inlines as empty too so that they get a linebox.
2710
2711         Tests: fast/inline/inline-with-empty-inline-children.html
2712                css2.1/20110323/floats-149.htm
2713
2714         * rendering/InlineIterator.h:
2715         (WebCore::isEmptyInline):
2716         * rendering/RenderBlockLineLayout.cpp:
2717         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Now that empty inlines get a linebox any out-of-flow
2718         objects inside an empty inline (on a line that is otherwise empty) won't get positioned while skipping 
2719         through leading whitespace. 
2720
2721 2013-02-07  peavo@outlook.com  <peavo@outlook.com>
2722
2723         [WinCairo] Compile fix after r141981
2724         https://bugs.webkit.org/show_bug.cgi?id=109184
2725
2726         Reviewed by Brent Fulgham.
2727
2728         * platform/network/curl/ResourceHandleCurl.cpp:
2729         (WebCore::ResourceHandle::loadResourceSynchronously):
2730
2731 2013-02-07  Otto Derek Cheung  <otcheung@rim.com>
2732
2733         [BlackBerry] Cookie database isn't loaded into memory in some rare cases
2734         https://bugs.webkit.org/show_bug.cgi?id=109202
2735         PR 286189
2736
2737         Reviewed by Yong Li.
2738         Internally Reviewed by Konrad Piascik.
2739
2740         If a get/setCookie call is made before the database is loaded, or if there's some
2741         kind of error that causes the loading of the database to fail in the constructor
2742         of CookieManager, the browser will get into a state where it seems like cookie is
2743         permanenty disabled.
2744
2745         Instead of logging the errors and redispatching the setCookie, we should do a force sync
2746         to load the cookie database before continuing.
2747
2748         Since the bug is so difficult to reproduce (I never did so myself), I did the follow test
2749         to make sure the code path is correct:
2750         1) Make sure original implementation is retained - open and loading done in the constructor
2751         2) Removed opening and loading in constructor, the new calls in get/setcookies loaded the db just fine (although with
2752         an initial lag because we are blocking WKT while performing SQLite options).
2753         3) Removed loading in constructor, the new calls loaded the db just fine.
2754
2755         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2756         (WebCore::CookieDatabaseBackingStore::openAndLoadDatabaseSynchronously):
2757         (WebCore):
2758         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
2759         (CookieDatabaseBackingStore):
2760         * platform/blackberry/CookieManager.cpp:
2761         (WebCore::CookieManager::setCookies):
2762         (WebCore::CookieManager::getCookie):
2763         (WebCore::CookieManager::generateHtmlFragmentForCookies):
2764         (WebCore::CookieManager::getRawCookies):
2765
2766 2013-02-07  Max Vujovic  <mvujovic@adobe.com>
2767
2768         [CSS Shaders] Add WebKitCSSFilterRule to DOMWindow.idl
2769         https://bugs.webkit.org/show_bug.cgi?id=109082
2770
2771         Reviewed by Dean Jackson.
2772
2773         Add an entry for WebKitCSSFilterRuleConstructor in DOMWindow.idl.
2774
2775         Tests: css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html
2776                css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html
2777
2778         * page/DOMWindow.idl:
2779
2780 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
2781
2782         Web Inspector: Remove unused workspace field from NetworkUISourceCodeProvider
2783         https://bugs.webkit.org/show_bug.cgi?id=109201
2784
2785         Reviewed by Pavel Feldman.
2786
2787         * inspector/front-end/NetworkUISourceCodeProvider.js:
2788         (WebInspector.NetworkUISourceCodeProvider):
2789         * inspector/front-end/inspector.js:
2790
2791 2013-02-07  Jessie Berlin  <jberlin@apple.com>
2792
2793         REGRESSION(r142003): Duplicate "Unknown" strings in LocalizedStrings.cpp not distinguished
2794         by key
2795         https://bugs.webkit.org/show_bug.cgi?id=109196
2796
2797         Reviewed by Eric Carlson.
2798
2799         * English.lproj/Localizable.strings:
2800         Updated for the changes.
2801         * platform/LocalizedStrings.cpp:
2802         (WebCore::unknownFileSizeText):
2803         Add a key.
2804         (WebCore::textTrackNoLabelText):
2805         Ditto.
2806
2807 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
2808
2809         Web Inspector: linkifyResourceAsNode produced anchor should not prefer resources to scripts panel.
2810         https://bugs.webkit.org/show_bug.cgi?id=109197
2811
2812         Reviewed by Pavel Feldman.
2813
2814         Javascript syntax errors in console are now linkified so that they show sources panel by default.
2815
2816         * inspector/front-end/ResourceUtils.js:
2817         (WebInspector.linkifyResourceAsNode):
2818
2819 2013-02-07  Eberhard Graether  <egraether@google.com>
2820
2821         Web Inspector: Add settings checkbox for composited layer borders
2822         https://bugs.webkit.org/show_bug.cgi?id=109096
2823
2824         Reviewed by Pavel Feldman.
2825
2826         This change adds a checkbox to show composited layer borders to the WebInspector's
2827         rendering settings and plumbs the setting to Chromium's WebLayerTreeView. The setting
2828         is visible if InspectorClient::canShowDebugBorders() returns true.
2829
2830         No new tests.
2831
2832         * English.lproj/localizedStrings.js:
2833         * inspector/Inspector.json:
2834         * inspector/InspectorClient.h:
2835         (WebCore::InspectorClient::canShowDebugBorders):
2836         (WebCore::InspectorClient::setShowDebugBorders):
2837         (InspectorClient):
2838         * inspector/InspectorPageAgent.cpp:
2839         (PageAgentState):
2840         (WebCore::InspectorPageAgent::restore):
2841         (WebCore::InspectorPageAgent::disable):
2842         (WebCore::InspectorPageAgent::canShowDebugBorders):
2843         (WebCore):
2844         (WebCore::InspectorPageAgent::setShowDebugBorders):
2845         * inspector/InspectorPageAgent.h:
2846         * inspector/front-end/Settings.js:
2847         * inspector/front-end/SettingsScreen.js:
2848         (WebInspector.GenericSettingsTab):
2849         (WebInspector.GenericSettingsTab.prototype.get _showDebugBordersChanged):
2850         * inspector/front-end/inspector.js:
2851         (WebInspector.doLoadedDone):
2852
2853 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2854
2855         Unreviewed, rolling out r142141.
2856         http://trac.webkit.org/changeset/142141
2857         https://bugs.webkit.org/show_bug.cgi?id=108990
2858
2859         Reland r142112, will update Chromium expectations and create a
2860         Chromium bug instead for the crash.
2861
2862         * CMakeLists.txt:
2863         * Target.pri:
2864         * WebCore.pri:
2865         * page/scrolling/ScrollingCoordinator.cpp:
2866         (WebCore::ScrollingCoordinator::create):
2867         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
2868         (WebCore):
2869         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
2870         (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
2871         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
2872         (WebCore):
2873         (ScrollingCoordinatorCoordinatedGraphics):
2874         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2875         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
2876         (WebCore):
2877         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2878         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2879         (CoordinatedGraphicsLayerClient):
2880         (CoordinatedGraphicsLayer):
2881
2882 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
2883
2884         Web Inspector: home button behaviour is wrong in DTE
2885         https://bugs.webkit.org/show_bug.cgi?id=109154
2886
2887         Reviewed by Vsevolod Vlasov.
2888
2889         Handle home key shortcut explicitly in TextEditorMainPanel.
2890
2891         New test: inspector/editor/text-editor-home-button.html
2892
2893         * inspector/front-end/DefaultTextEditor.js:
2894         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
2895         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
2896
2897 2013-02-07  Gavin Peters  <gavinp@chromium.org>
2898
2899         Unreviewed, rolling out r142112.
2900         http://trac.webkit.org/changeset/142112
2901         https://bugs.webkit.org/show_bug.cgi?id=108990
2902
2903         The new test scrollingcoordinator/non-fast-scrollable-region-transformed- iframe.html crashes on Lion.
2904
2905         See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=scrollingcoordinator%2Fnon-fast-scrollable-region-transformed-iframe.html
2906
2907         * CMakeLists.txt:
2908         * Target.pri:
2909         * WebCore.pri:
2910         * page/scrolling/ScrollingCoordinator.cpp:
2911         (WebCore::ScrollingCoordinator::create):
2912         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Removed.
2913         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Removed.
2914         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2915         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
2916         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2917         (CoordinatedGraphicsLayerClient):
2918         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
2919
2920 2013-02-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2921
2922         Scrollbars misplaced with accelerated compositing for overflow scroll
2923         https://bugs.webkit.org/show_bug.cgi?id=108625
2924
2925         Reviewed by Simon Fraser.
2926
2927         Scrollbars require their own layer if overflow scroll is composited,
2928         otherwise the scrollbars would be rendered on the content layer and
2929         not fixed to the viewport.
2930
2931         * rendering/RenderLayerBacking.cpp:
2932         (WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer):
2933         (WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer):
2934         (WebCore::RenderLayerBacking::requiresScrollCornerLayer):
2935
2936 2013-02-07  Mike West  <mkwst@chromium.org>
2937
2938         Don't ASSERT things about uninitialized variables.
2939         https://bugs.webkit.org/show_bug.cgi?id=109187
2940
2941         Reviewed by Jochen Eisinger.
2942
2943         Rather than ASSERTing that an uninitialized ExceptionCode is non-zero
2944         after some method executes, we should use the ASSERT_NO_EXCEPTION macro.
2945
2946         * editing/markup.cpp:
2947         (WebCore::removeElementPreservingChildren):
2948
2949 2013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
2950
2951         Web Inspector: [Regression] breakpoint condition not editable
2952         https://bugs.webkit.org/show_bug.cgi?id=109183
2953
2954         Reviewed by Vsevolod Vlasov.
2955
2956         Improve TextEditorMainPanel.selection() method to return null if the
2957         selection is set inside of decoration element.
2958
2959         No new tests.
2960
2961         * inspector/front-end/DOMExtension.js:
2962         (Node.prototype.enclosingNodeOrSelfWithClass): Improve to add iteration boundary.
2963         * inspector/front-end/DefaultTextEditor.js:
2964         (WebInspector.TextEditorMainPanel.prototype.selection):
2965
2966 2013-02-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2967
2968         [WK2][EFL][QT]REGRESSION(r142045): Scrolling is broken
2969         https://bugs.webkit.org/show_bug.cgi?id=109185
2970
2971         Reviewed by Kenneth Rohde Christiansen.
2972
2973         This patch is disabling paints clipping logic added at r142045 for the case 
2974         when the view should render the entire contents (case of using tiled backing store).
2975
2976         No new tests, covered by plenty of existing manual tests that allow scrolling
2977         (for example fixed-position.html).
2978
2979         * platform/ScrollView.cpp:
2980         (WebCore::ScrollView::paint):
2981
2982 2013-02-07  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2983
2984         Web Inspector: Show elements and sources sidebar panes in a tabbed pane when they are below the main pane
2985         https://bugs.webkit.org/show_bug.cgi?id=107552
2986
2987         Reviewed by Pavel Feldman.
2988
2989         Removed the aspect ratio detection logic and implemented explicit user action "Split Horizontally" available
2990         in Elements and Sources panels. When split horizontally the sidebar panes are organized into a tabbed pane.
2991         This user action is behind an experimental flag.
2992
2993         No new tests.
2994
2995         * inspector/front-end/ContextMenu.js:
2996         (WebInspector.ContextMenu.prototype.show):
2997         * inspector/front-end/DOMBreakpointsSidebarPane.js:
2998         (WebInspector.DOMBreakpointsSidebarPane.prototype.createProxy):
2999         (WebInspector.DOMBreakpointsSidebarPane.prototype.onContentReady):
3000         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
3001         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.expanded):
3002         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.expand):
3003         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.collapse):
3004         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.onContentReady):
3005         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype.wasShown):
3006         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype._reattachBody):
3007         * inspector/front-end/ElementsPanel.js:
3008         (WebInspector.ElementsPanel):
3009         (WebInspector.ElementsPanel.prototype._populateContextMenu):
3010         * inspector/front-end/ScriptsPanel.js:
3011         (WebInspector.ScriptsPanel.prototype._clearInterface):
3012         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
3013         (WebInspector.ScriptsPanel.prototype._contextMenuEventFired):
3014         * inspector/front-end/Settings.js:
3015         (WebInspector.ExperimentsSettings):
3016         * inspector/front-end/SidebarPane.js:
3017         (WebInspector.SidebarPane):
3018         (WebInspector.SidebarPane.prototype.prepareContent):
3019         (WebInspector.SidebarPane.prototype.expanded):
3020         (WebInspector.SidebarPane.prototype.expand):
3021         (WebInspector.SidebarPane.prototype.collapse):
3022         (WebInspector.SidebarPane.prototype.onContentReady):
3023         (WebInspector.SidebarPane.prototype._setExpandCallback):
3024         (WebInspector.SidebarPaneStack.prototype.addPane):
3025         (WebInspector.SidebarPaneStack.prototype.activePaneId):
3026         (WebInspector.SidebarPaneStack.prototype.setActivePaneId):
3027         (WebInspector.SidebarPaneStack.prototype._setExpanded):
3028         (WebInspector.SidebarPaneStack.prototype._onPaneExpanded):
3029         (WebInspector.SidebarPaneStack.prototype._collapsePane):
3030         (WebInspector.SidebarTabbedPane):
3031         (WebInspector.SidebarTabbedPane.prototype.addPane):
3032         (WebInspector.SidebarTabbedPane.prototype.activePaneId):
3033         (WebInspector.SidebarTabbedPane.prototype.setActivePaneId):
3034         (WebInspector.SidebarPaneGroup):
3035         (WebInspector.SidebarPaneGroup.prototype.setStacked):
3036         (WebInspector.SidebarPaneGroup.prototype.addPane):
3037         (WebInspector.SidebarPaneGroup.prototype.attachToPanel):
3038         (WebInspector.SidebarPaneGroup.prototype.populateContextMenu.toggleSplitDirection):
3039         (WebInspector.SidebarPaneGroup.prototype.get _contextMenuEventFired):
3040         (WebInspector.SidebarPaneGroup.prototype._onSplitDirectionSettingChanged):
3041         * inspector/front-end/SidebarView.js:
3042         (WebInspector.SidebarView):
3043         (WebInspector.SidebarView.prototype._updateSidebarElementStyle):
3044         (WebInspector.SidebarView.prototype.setVertical):
3045         (WebInspector.SidebarView.prototype.onResize):
3046         * inspector/front-end/StylesSidebarPane.js:
3047         (WebInspector.ComputedStyleSidebarPane.prototype.wasShown):
3048         (WebInspector.ComputedStyleSidebarPane.prototype.prepareContent):
3049         * inspector/front-end/inspector.css:
3050         (.sidebar-pane .section .properties, .event-bar .event-properties):
3051         (.pane-title):
3052         (.sidebar-pane-toolbar):
3053         (.sidebar-pane-toolbar > *):
3054         (.sidebar-pane-toolbar > select):
3055         (.sidebar-pane-toolbar > select:hover):
3056         (.sidebar-pane-toolbar > select:active):
3057         (.sidebar-pane-toolbar > select.select-settings):
3058         (.sidebar-pane-toolbar > select.select-filter):
3059         (.sidebar-pane-toolbar > select > option, .sidebar-pane-toolbar > select > hr):
3060         (.sidebar-pane-toolbar > .pane-title-button):
3061         (.sidebar-pane-toolbar > .pane-title-button:hover):
3062         (.sidebar-pane-toolbar > .pane-title-button:active, .sidebar-pane-toolbar > .pane-title-button.toggled):
3063         (.sidebar-pane-toolbar > .pane-title-button.add):
3064         (.sidebar-pane-toolbar > .pane-title-button.element-state):
3065         (.sidebar-pane-toolbar > .pane-title-button.refresh):
3066         (.sidebar-pane):
3067         (.sidebar-pane > .body):
3068         (.sidebar-pane > .body .info):
3069         (.sidebar-pane > .body .placard + .info):
3070         (.sidebar-pane.visible > .body):
3071         (.sidebar-pane > .body .breakpoint-condition):
3072         (.sidebar-pane.visible:nth-last-of-type(1)):
3073         (.sidebar-pane-subtitle):
3074         (.sidebar-pane-subtitle input, .section .header input[type=checkbox]):
3075         (.sidebar-pane .breakpoint-hit):
3076
3077 2013-02-07  Gavin Peters  <gavinp@chromium.org>
3078
3079         Unreviewed, rolling out r142111.
3080         http://trac.webkit.org/changeset/142111
3081         https://bugs.webkit.org/show_bug.cgi?id=108055
3082
3083         win7 bot didn't display Arabic, see http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=platform%2Fchromium%2Ffast%2Fforms%2Fcalendar-picker%2Fcalendar-picker-appearance-required-ar.html
3084
3085         * Resources/pagepopups/calendarPicker.css:
3086         (.today-clear-area .today-button):
3087         * Resources/pagepopups/calendarPicker.js:
3088         (CalendarPicker.prototype.fixWindowSize):
3089
3090 2013-02-07  Vsevolod Vlasov  <vsevik@chromium.org>
3091
3092         Web Inspector: [Regression] Map.size() returns negative values.
3093         https://bugs.webkit.org/show_bug.cgi?id=109174
3094
3095         Reviewed by Yury Semikhatsky.
3096
3097         * inspector/front-end/utilities.js:
3098
3099 2013-02-07  Pavel Feldman  <pfeldman@chromium.org>
3100
3101         Web Inspector: break details are only rendered upon first debugger pause.
3102         https://bugs.webkit.org/show_bug.cgi?id=109193
3103
3104         Reviewed by Vsevolod Vlasov.
3105
3106         * inspector/front-end/CallStackSidebarPane.js:
3107         (WebInspector.CallStackSidebarPane.prototype.update):
3108
3109 2013-02-07  Gavin Peters  <gavinp@chromium.org>
3110
3111         Unreviewed, rolling out r142118.
3112         http://trac.webkit.org/changeset/142118
3113         https://bugs.webkit.org/show_bug.cgi?id=109044
3114
3115         Broke SVG! Oh noes!
3116
3117         * Modules/indexeddb/IDBCursor.cpp:
3118         (WebCore::IDBCursor::direction):
3119         * Modules/indexeddb/IDBObjectStore.cpp:
3120         (WebCore):
3121         * Modules/indexeddb/IDBTransaction.cpp:
3122         (WebCore::IDBTransaction::mode):
3123         * dom/ContainerNode.cpp:
3124         (WebCore::ContainerNode::takeAllChildrenFrom):
3125         * dom/Document.cpp:
3126         (WebCore::Document::setTitle):
3127         * dom/MessagePort.cpp:
3128         (WebCore::MessagePort::dispatchMessages):
3129         (WebCore::MessagePort::disentanglePorts):
3130         * editing/DeleteButtonController.cpp:
3131         (WebCore::enclosingDeletableElement):
3132         (WebCore::DeleteButtonController::createDeletionUI):
3133         (WebCore::DeleteButtonController::show):
3134         * editing/EditorCommand.cpp:
3135         (WebCore::unionDOMRanges):
3136         * editing/ReplaceNodeWithSpanCommand.cpp:
3137         (WebCore::swapInNodePreservingAttributesAndChildren):
3138         * editing/ReplaceSelectionCommand.cpp:
3139         (WebCore::ReplacementFragment::ReplacementFragment):
3140         (WebCore::ReplacementFragment::removeNode):
3141         (WebCore::ReplacementFragment::insertNodeBefore):
3142         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
3143         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
3144         (WebCore::ReplaceSelectionCommand::insertAsListItems):
3145         * editing/SplitTextNodeCommand.cpp:
3146         (WebCore::SplitTextNodeCommand::doUnapply):
3147         * editing/TextIterator.cpp:
3148         (WebCore::CharacterIterator::range):
3149         (WebCore::BackwardsCharacterIterator::range):
3150         (WebCore::TextIterator::rangeFromLocationAndLength):
3151         (WebCore::collapsedToBoundary):
3152         * editing/htmlediting.cpp:
3153         (WebCore::createTabSpanElement):
3154         * editing/mac/EditorMac.mm:
3155         (WebCore::Editor::fontForSelection):
3156         (WebCore::Editor::fontAttributesForSelectionStart):
3157         * editing/markup.cpp:
3158         (WebCore::createMarkup):
3159         (WebCore::trimFragment):
3160         (WebCore::createFragmentFromMarkupWithContext):
3161         (WebCore::fillContainerFromString):
3162         (WebCore::createFragmentFromText):
3163         (WebCore::createFragmentFromNodes):
3164         * html/ColorInputType.cpp:
3165         (WebCore::ColorInputType::createShadowSubtree):
3166         * html/HTMLOptionsCollection.cpp:
3167         (WebCore::HTMLOptionsCollection::add):
3168         * html/HTMLTextAreaElement.cpp:
3169         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
3170         * html/HTMLTextFormControlElement.cpp:
3171         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
3172         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3173         * html/TextFieldInputType.cpp:
3174         (WebCore::TextFieldInputType::updatePlaceholderText):
3175         * html/ValidationMessage.cpp:
3176         (WebCore::ValidationMessage::buildBubbleTree):
3177         * html/shadow/MediaControlElementTypes.cpp:
3178         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
3179         * inspector/InspectorPageAgent.cpp:
3180         (WebCore::InspectorPageAgent::getCookies):
3181         * inspector/InspectorStyleSheet.cpp:
3182         (WebCore::InspectorStyleSheet::addRule):
3183         * loader/appcache/ApplicationCacheHost.cpp:
3184         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
3185         * page/DOMSelection.cpp:
3186         (WebCore::DOMSelection::deleteFromDocument):
3187         * page/DragController.cpp:
3188         (WebCore::prepareClipboardForImageDrag):
3189         * rendering/RenderTextControl.cpp:
3190         (WebCore::RenderTextControl::visiblePositionForIndex):
3191         * rendering/style/SVGRenderStyle.h:
3192         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
3193         (WebCore::SVGRenderStyle::initialKerning):
3194         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
3195         (WebCore::SVGRenderStyle::initialStrokeWidth):
3196         * svg/SVGAnimatedLength.cpp:
3197         (WebCore::sharedSVGLength):
3198         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
3199         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
3200         * svg/SVGAnimatedLengthList.cpp:
3201         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
3202         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
3203         * svg/SVGLength.cpp:
3204         (WebCore::SVGLength::SVGLength):
3205         * svg/SVGTextContentElement.cpp:
3206         (WebCore::SVGTextContentElement::textLengthAnimated):
3207         * svg/animation/SVGSMILElement.cpp:
3208         (WebCore::constructQualifiedName):
3209
3210 2013-02-07  Kentaro Hara  <haraken@chromium.org>
3211
3212         Remove #if USE(V8) from IDBRequest.h
3213         https://bugs.webkit.org/show_bug.cgi?id=109163
3214
3215         Reviewed by Andreas Kling.
3216
3217         The header included inside the #if USE(V8) macro is not used.
3218         We can simply remove it.
3219
3220         No tests. No change in behavior.
3221
3222         * Modules/indexeddb/IDBRequest.h:
3223
3224 2013-02-07  Stephen Chenney  <schenney@chromium.org>
3225
3226         GraphicsContext::drawImageBuffer is inefficient
3227         https://bugs.webkit.org/show_bug.cgi?id=104367
3228
3229         Reviewed by Dirk Schulze.
3230
3231         This patch converts all of the drawImage and drawImageBuffer
3232         convenience methods (those that take parameters of various types) to
3233         invoke the implementing method (that takes FloatRect src and dest)
3234         directly, rather than through the next-most-convenient method as was
3235         done previously. This will knock some layers off the stack compared
3236         to the existing code, and may remove one or two constructor invocations.
3237         This may be slightly more efficient, and also makes debugging simpler.
3238
3239         Also removes the unused drawImage method that takes and IntRect source
3240         area and IntRect destination. It is not invoked anywhere in a standard
3241         WebKit checkout.
3242
3243         No new tests. No change in functionality, just refactoring.
3244
3245         * platform/graphics/GraphicsContext.cpp:
3246         (WebCore::GraphicsContext::drawImage): Modify all the convenience versions to call
3247         the implementing version directly.
3248         (WebCore::GraphicsContext::drawImageBuffer): Modify all the convenience versions
3249         to call the implementing version directly.
3250         * platform/graphics/GraphicsContext.h:
3251         (GraphicsContext): Remove IntRect, IntRect version of drawImage.
3252
3253 2013-02-07  Kent Tamura  <tkent@chromium.org>
3254
3255         Conversion from localized numbers to HTML numbers should accept not only localized numbers but also HTML numbers
3256         https://bugs.webkit.org/show_bug.cgi?id=109160
3257
3258         Reviewed by Kentaro Hara.
3259
3260         For example, A French user needs to specify a number to a number input
3261         field. He might use a local decimal point, like 3,141592, or he might
3262         use the standard decimal point like 3.141592. We had better accept both
3263         of them.
3264
3265         We accepted both last year, but we changed the behavior so that we
3266         accept only localized numbers because we had some cases where an input
3267         string can be recognized as both of a localized number and the standard
3268         number. e.g. 3.141 is 3141 in French locale and 3.141 in the
3269         standard. Now we introduce a simple rule that we don't accept group
3270         separator at all. So users won't confuse even if we accept both of
3271         decimal points.
3272
3273         Test: fast/forms/number/number-l10n-input.html
3274
3275         * platform/text/PlatformLocale.cpp:
3276         (WebCore::Locale::convertFromLocalizedNumber):
3277         If the specified string contains invalid characters including group
3278         separators, just return the specified string.
3279
3280 2013-02-07  Xiaobo Wang  <xbwang@torchmobile.com.cn>
3281
3282         [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
3283         https://bugs.webkit.org/show_bug.cgi?id=109126
3284         PR 292540
3285
3286         Reviewed by Yong Li.
3287
3288         Change char code to 4 bytes.
3289         Need to convert UTF32 key char to UTF16 before constructing a WTF::String.
3290
3291         * platform/PlatformKeyboardEvent.h:
3292         (WebCore::PlatformKeyboardEvent::unmodifiedCharacter):
3293         (PlatformKeyboardEvent):
3294         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
3295         (WebCore::keyIdentifierForBlackBerryCharacter):
3296         (WebCore::windowsKeyCodeForBlackBerryCharacter):
3297         (WebCore::adjustCharacterFromOS):
3298         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3299
3300 2013-02-07  Mike West  <mkwst@chromium.org>
3301
3302         Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro.
3303         https://bugs.webkit.org/show_bug.cgi?id=109044
3304
3305         Reviewed by Darin Adler.
3306
3307         The pattern:
3308
3309             ExceptionCode ec = 0;
3310             methodThatGeneratesException(ec);
3311             ASSERT(!ec);
3312
3313         is more clearly and succinctly written as:
3314
3315             methodThatGeneratesException(ASSERT_NO_EXCEPTION);
3316
3317         This patch replaces the occurances of the former that never touch 'ec'
3318         again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
3319         a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
3320         where it does indeed matter that 'ec' get set properly.
3321
3322         No change in behavior should result from this refactoring.
3323
3324         * Modules/indexeddb/IDBCursor.cpp:
3325         (WebCore::IDBCursor::direction):
3326         * Modules/indexeddb/IDBObjectStore.cpp:
3327         (WebCore):
3328         * Modules/indexeddb/IDBTransaction.cpp:
3329         (WebCore::IDBTransaction::mode):
3330         * dom/ContainerNode.cpp:
3331         (WebCore::ContainerNode::takeAllChildrenFrom):
3332         * dom/Document.cpp:
3333         (WebCore::Document::setTitle):
3334         * dom/MessagePort.cpp:
3335         (WebCore::MessagePort::dispatchMessages):
3336         (WebCore::MessagePort::disentanglePorts):
3337         * editing/DeleteButtonController.cpp:
3338         (WebCore::enclosingDeletableElement):
3339         (WebCore::DeleteButtonController::createDeletionUI):
3340             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
3341         (WebCore::DeleteButtonController::show):
3342             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
3343         * editing/EditorCommand.cpp:
3344         (WebCore::unionDOMRanges):
3345         * editing/ReplaceNodeWithSpanCommand.cpp:
3346         (WebCore::swapInNodePreservingAttributesAndChildren):
3347         * editing/ReplaceSelectionCommand.cpp:
3348         (WebCore::ReplacementFragment::ReplacementFragment):
3349         (WebCore::ReplacementFragment::removeNode):
3350         (WebCore::ReplacementFragment::insertNodeBefore):
3351         (WebCore::ReplacementFragment::insertFragmentForTestRendering):
3352         (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
3353         (WebCore::ReplaceSelectionCommand::insertAsListItems):
3354         * editing/SplitTextNodeCommand.cpp:
3355         (WebCore::SplitTextNodeCommand::doUnapply):
3356         * editing/TextIterator.cpp:
3357         (WebCore::CharacterIterator::range):
3358         (WebCore::BackwardsCharacterIterator::range):
3359         (WebCore::TextIterator::rangeFromLocationAndLength):
3360         (WebCore::collapsedToBoundary):
3361         * editing/htmlediting.cpp:
3362         (WebCore::createTabSpanElement):
3363         * editing/mac/EditorMac.mm:
3364         (WebCore::Editor::fontForSelection):
3365         (WebCore::Editor::fontAttributesForSelectionStart):
3366         * editing/markup.cpp:
3367         (WebCore::createMarkup):
3368         (WebCore::trimFragment):
3369         (WebCore::createFragmentFromMarkupWithContext):
3370         (WebCore::fillContainerFromString):
3371         (WebCore::createFragmentFromText):
3372         (WebCore::createFragmentFromNodes):
3373         * html/ColorInputType.cpp:
3374         (WebCore::ColorInputType::createShadowSubtree):
3375             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
3376         * html/HTMLOptionsCollection.cpp:
3377         (WebCore::HTMLOptionsCollection::add):
3378             Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
3379         * html/HTMLTextAreaElement.cpp:
3380         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
3381         * html/HTMLTextFormControlElement.cpp:
3382         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
3383         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3384         * html/TextFieldInputType.cpp:
3385         (WebCore::TextFieldInputType::updatePlaceholderText):
3386         * html/ValidationMessage.cpp:
3387         (WebCore::ValidationMessage::buildBubbleTree):
3388         * html/shadow/MediaControlElementTypes.cpp:
3389         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
3390         * inspector/InspectorPageAgent.cpp:
3391         (WebCore::InspectorPageAgent::getCookies):
3392         * inspector/InspectorStyleSheet.cpp:
3393         (WebCore::InspectorStyleSheet::addRule):
3394         * loader/appcache/ApplicationCacheHost.cpp:
3395         (WebCore::ApplicationCacheHost::dispatchDOMEvent):
3396         * page/DOMSelection.cpp:
3397         (WebCore::DOMSelection::deleteFromDocument):
3398         * page/DragController.cpp:
3399         (WebCore::prepareClipboardForImageDrag):
3400         * rendering/RenderTextControl.cpp:
3401         (WebCore::RenderTextControl::visiblePositionForIndex):
3402         * rendering/style/SVGRenderStyle.h:
3403         (WebCore::SVGRenderStyle::initialBaselineShiftValue):
3404         (WebCore::SVGRenderStyle::initialKerning):
3405         (WebCore::SVGRenderStyle::initialStrokeDashOffset):
3406         (WebCore::SVGRenderStyle::initialStrokeWidth):
3407         * svg/SVGAnimatedLength.cpp:
3408         (WebCore::sharedSVGLength):
3409         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
3410         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
3411         * svg/SVGAnimatedLengthList.cpp:
3412         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
3413         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
3414         * svg/SVGLength.cpp:
3415         (WebCore::SVGLength::SVGLength):
3416         * svg/SVGTextContentElement.cpp:
3417         (WebCore::SVGTextContentElement::textLengthAnimated):
3418         * svg/animation/SVGSMILElement.cpp:
3419         (WebCore::constructQualifiedName):
3420             Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
3421
3422 2013-02-07  Mary Wu  <mary.wu@torchmobile.com.cn>
3423
3424         [BlackBerry] Export mimeType in NetworkJob
3425         https://bugs.webkit.org/show_bug.cgi?id=109002
3426
3427         Reviewed by Yong Li.
3428
3429         NetworkJob will analysize resource mimetype and set it to resourceResponse,
3430         we will pass it on to be used by other Streams like download stream.
3431
3432         RIM bug# 284408, internally reviewed by Liam Quinn.
3433
3434         * platform/network/blackberry/NetworkJob.cpp:
3435     &