Support !ENABLE(VIDEO) builds with horizontally layed out video controls.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-12  Silvia Pfeiffer  <silviapf@chromium.org>
2
3         Support !ENABLE(VIDEO) builds with horizontally layed out video controls.
4         https://bugs.webkit.org/show_bug.cgi?id=88881
5
6         Reviewed by Csaba Osztrogonác.
7
8         No new tests as this is a regression from WK87835.
9
10         * html/shadow/SliderThumbElement.cpp:
11         (WebCore::hasVerticalAppearance):
12         Ifdef out video related functionality, since usesVerticalVolumeSlider
13         does not exist in that case.
14
15 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
16
17         Web Inspector: allow clearing revision history.
18         https://bugs.webkit.org/show_bug.cgi?id=88847
19
20         Reviewed by Vsevolod Vlasov.
21
22         This change also renames "Revision history" to "Local modifications".
23         I intend to list modifications to all files in that view in the subsequent change.
24
25         * English.lproj/localizedStrings.js:
26         * inspector/front-end/Resource.js:
27         (WebInspector.Resource._clearResourceHistory):
28         * inspector/front-end/RevisionHistoryView.js:
29         (WebInspector.RevisionHistoryView.else.clearHistory):
30         (WebInspector.RevisionHistoryView):
31         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
32         (WebInspector.RevisionHistoryTreeElement):
33         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
34         (WebInspector.RevisionHistoryTreeElement.prototype.allowRevert):
35         * inspector/front-end/ScriptsPanel.js:
36         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
37
38 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
39
40         Web Inspector: use jsdifflib for revision diff calculation.
41         https://bugs.webkit.org/show_bug.cgi?id=88791
42
43         Reviewed by Vsevolod Vlasov.
44
45         Present diff calculation is incomplete, it does not properly handle the following case:
46             [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
47         We should not be implementing diff by ourselves. I imported jsdifflib from
48         https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
49
50         * WebCore.gypi:
51         * WebCore.vcproj/WebCore.vcproj:
52         * inspector/front-end/RevisionHistoryView.js:
53         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
54         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
55         (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
56         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
57         * inspector/front-end/WebKit.qrc:
58         * inspector/front-end/externs.js:
59         (difflib.stringAsLines):
60         (difflib.SequenceMatcher):
61         (difflib.SequenceMatcher.prototype.get_opcodes):
62         * inspector/front-end/inspector.html:
63         * inspector/front-end/jsdifflib.js: Added.
64         (difflib.defaultJunkFunction):
65         (difflib.stripLinebreaks):
66         (difflib.stringAsLines):
67         (difflib.__reduce):
68         (difflib.__ntuplecomp):
69         (difflib.__calculate_ratio):
70         (difflib.__dictget):
71         (difflib.SequenceMatcher.this.set_seqs):
72         (difflib.SequenceMatcher.this.set_seq1):
73         (difflib.SequenceMatcher.this.set_seq2):
74         (difflib.SequenceMatcher.this.__chain_b):
75         (difflib.SequenceMatcher.this.find_longest_match):
76         (difflib.SequenceMatcher.this.get_matching_blocks):
77         (difflib.SequenceMatcher.this.get_opcodes):
78         (difflib.SequenceMatcher.this.get_grouped_opcodes):
79         (difflib.SequenceMatcher.this.quick_ratio):
80         (difflib.SequenceMatcher.this.real_quick_ratio):
81         * inspector/front-end/revisionHistory.css:
82         (.revision-history-line-separator .webkit-line-number):
83
84 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
85
86         Web Inspector: use jsdifflib for revision diff calculation.
87         https://bugs.webkit.org/show_bug.cgi?id=88791
88
89         Reviewed by Vsevolod Vlasov.
90
91         Present diff calculation is incomplete, it does not properly handle the following case:
92             [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
93         We should not be implementing diff by ourselves. I imported jsdifflib from
94         https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
95
96         * WebCore.gypi:
97         * WebCore.vcproj/WebCore.vcproj:
98         * inspector/front-end/RevisionHistoryView.js:
99         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
100         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
101         (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
102         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
103         * inspector/front-end/WebKit.qrc:
104         * inspector/front-end/externs.js:
105         (difflib.stringAsLines):
106         (difflib.SequenceMatcher):
107         (difflib.SequenceMatcher.prototype.get_opcodes):
108         * inspector/front-end/inspector.html:
109         * inspector/front-end/jsdifflib.js: Added.
110         (difflib.defaultJunkFunction):
111         (difflib.stripLinebreaks):
112         (difflib.stringAsLines):
113         (difflib.__reduce):
114         (difflib.__ntuplecomp):
115         (difflib.__calculate_ratio):
116         (difflib.__dictget):
117         (difflib.SequenceMatcher.this.set_seqs):
118         (difflib.SequenceMatcher.this.set_seq1):
119         (difflib.SequenceMatcher.this.set_seq2):
120         (difflib.SequenceMatcher.this.__chain_b):
121         (difflib.SequenceMatcher.this.find_longest_match):
122         (difflib.SequenceMatcher.this.get_matching_blocks):
123         (difflib.SequenceMatcher.this.get_opcodes):
124         (difflib.SequenceMatcher.this.get_grouped_opcodes):
125         (difflib.SequenceMatcher.this.quick_ratio):
126         (difflib.SequenceMatcher.this.real_quick_ratio):
127         * inspector/front-end/revisionHistory.css:
128         (.revision-history-line-separator .webkit-line-number):
129
130 2012-06-12  Christophe Dumez  <christophe.dumez@intel.com>
131
132         [GStreamer] http/tests/media/video-buffered-range-contains-currentTime.html is failing
133         https://bugs.webkit.org/show_bug.cgi?id=87575
134
135         Reviewed by Philippe Normand.
136
137         When EOS is reached in forward playback, the position does not necessarily
138         match the duration. This confuses HTMLMediaElement and causes the "ended"
139         event not to be fired. To avoid this, we synchronize position and duration
140         values in this case.
141
142         Test: http/tests/media/video-buffered-range-contains-currentTime.html
143
144         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
145
146 2012-06-12  Kinuko Yasuda  <kinuko@chromium.org>
147
148         Refactor InputType::receiveDroppedFiles to take DragData
149         https://bugs.webkit.org/show_bug.cgi?id=88860
150
151         Reviewed by Kent Tamura.
152
153         So that we can centralize the file paths related code into FileInputType
154         and makes it easier to extract more data from DragData for
155         <input type=file> (like bug 88293 for directory drag-and-drop).
156
157         No new tests as this has no behavioral changes.
158
159         * html/FileInputType.cpp:
160         (WebCore::FileInputType::receiveDroppedFiles):
161         * html/FileInputType.h:
162         * html/HTMLInputElement.cpp:
163         (WebCore::HTMLInputElement::receiveDroppedFiles):
164         * html/HTMLInputElement.h:
165         * html/InputType.cpp:
166         (WebCore::InputType::receiveDroppedFiles):
167         * html/InputType.h:
168         * page/DragController.cpp:
169         (WebCore::DragController::concludeEditDrag):
170
171 2012-06-12  Thiago Marcos P. Santos  <thiago.santos@intel.com>
172
173         Generate -webkit-box-decoration-break property only when the feature is enabled
174         https://bugs.webkit.org/show_bug.cgi?id=88861
175
176         Reviewed by Alexis Menard.
177
178         Otherwise it will hit an assertion if the property is present on the
179         style but the feature disabled. Also fixes a compilation warning when
180         the feature is disabled.
181
182         * css/CSSPropertyNames.in:
183         * css/StyleResolver.cpp:
184         (WebCore::StyleResolver::collectMatchingRulesForList):
185
186 2012-06-12  Darin Adler  <darin@apple.com>
187
188         Tweaked the Mac export file a bit more, adding more-correct iOS cases.
189
190         Reviewed by David Kilzer.
191
192         * WebCore.exp.in: Rearrangement.
193
194 2012-06-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
195
196         Using extrernal ICU library on case unsensitive drives will not work
197         https://bugs.webkit.org/show_bug.cgi?id=70913
198
199         Reviewed by Csaba Osztrogonác.
200
201         * platform/graphics/surfaces/GraphicsSurface.h:
202
203 2012-06-11  Dana Jansens  <danakj@chromium.org>
204
205         [chromium] Use TextureDrawQuad for video layer output when it produces a single GL texture
206         https://bugs.webkit.org/show_bug.cgi?id=88814
207
208         Reviewed by Adrienne Walker.
209
210         When a CCVideLayerImpl produces quads for a frame that is contained
211         in a single GL texture, then use the TextureDrawQuad instead of the
212         VideoDrawQuad. Moves the computation for the RGBA(software) and
213         NativeTexture (hardware) cases from LayerRendererChromium into
214         CCVideoLayerImpl, so it can embed these values in the TextureDrawQuad.
215
216         No new tests, behaviour should be the same.
217
218         * platform/graphics/chromium/LayerRendererChromium.cpp:
219         (WebCore::LayerRendererChromium::drawStreamTexture):
220         (WebCore::LayerRendererChromium::drawVideoQuad):
221         * platform/graphics/chromium/LayerRendererChromium.h:
222         (LayerRendererChromium):
223         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
224         (WebCore::CCVideoLayerImpl::appendQuads):
225
226 2012-06-12  Silvia Pfeiffer  <silviapf@chromium.org>
227
228         Change the volume slider to horizontal rendering for Chrome video controls.
229         https://bugs.webkit.org/show_bug.cgi?id=87835
230
231         Reviewed by Eric Carlson.
232
233         No new tests - final patch in the Chrome controls update series will contain rebaselined tests.
234
235         The Chrome video controls are receiving a visual update. The volume slider is moved into
236         the controls with horizontal rendering, the volume slider container is removed. The visual
237         update itself is in a separate patch.
238
239         * css/mediaControlsChromium.css:
240         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
241         Removed relative positioning to render all controls elements equally in DOM order.
242         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
243         Removed absolute positioning to render all controls elements equally in DOM order.
244         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
245         Removed absolute positioning to render all controls elements equally in DOM order.
246         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
247         Removed volume slider container - it's not necessary any more.
248         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
249         Remove flexbox and introduce inline display to always display this field.
250         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
251         Removed absolute positioning to render all controls elements equally in DOM order.
252         * html/shadow/MediaControlRootElementChromium.cpp:
253         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
254         Removed volume slider container - it's not necessary any more.
255         (WebCore::MediaControlRootElementChromium::create):
256         Appended the volume slider and the mute button directly to the panel, removed volume slider container.
257         (WebCore::MediaControlRootElementChromium::setMediaController):
258         Removed volume slider container.
259         (WebCore::MediaControlRootElementChromium::reportedError):
260         Removed volume slider container.
261         (WebCore::MediaControlRootElementChromium::showVolumeSlider):
262         Removed volume slider container.
263         * html/shadow/MediaControlRootElementChromium.h:
264         (WebCore):
265         (MediaControlRootElementChromium):
266         Removed volume slider container.
267         * html/shadow/SliderThumbElement.cpp:
268         (WebCore::hasVerticalAppearance):
269         Allow use of horizontal media volume slider.
270         (WebCore::RenderSliderThumb::layout):
271         Reuse hasVerticalAppearance function.
272         * rendering/RenderMediaControlsChromium.cpp:
273         (WebCore::RenderMediaControlsChromium::paintMediaVolumeSlider):
274         Change line drawing from vertical to horizontal.
275         * rendering/RenderTheme.h:
276         (WebCore::RenderTheme::usesVerticalVolumeSlider):
277         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
278         * rendering/RenderThemeChromiumMac.h:
279         (WebCore::RenderThemeChromiumMac::usesVerticalVolumeSlider):
280         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
281         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
282         * rendering/RenderThemeChromiumSkia.h:
283         (WebCore::RenderThemeChromiumSkia::usesVerticalVolumeSlider):
284         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
285
286 2012-06-12  Andrei Bucur  <abucur@adobe.com>
287
288         [CSSRegions]NamedFlow::overset should return true when there's no region chain attached
289         https://bugs.webkit.org/show_bug.cgi?id=88515
290
291         The CSS Regions specifies that the "overset" attribute needs to return true if the content overflows, there's no region attached to the flow
292         or if the NamedFlow is in the NULL state:
293         http://www.w3.org/TR/css3-regions/#dom-named-flow-overset
294
295         This patch updates WebKit's behavior in the last two situations to match the one in the spec.
296
297         Reviewed by Andreas Kling.
298
299         Test: fast/regions/webkit-named-flow-overset.html was updated
300
301         * rendering/RenderFlowThread.cpp:
302         (WebCore::RenderFlowThread::RenderFlowThread):
303         (WebCore::RenderFlowThread::computeOverflowStateForRegions): If the last valid region is null, the flow has not region chain attached or it's in the NULL state.
304
305 2012-06-12  Rahul Tiwari  <rahultiwari.cse.iitr@gmail.com>
306
307         Web Inspector: Provide context menu for deleting recorded profile on Profiles Panel
308         https://bugs.webkit.org/show_bug.cgi?id=88286
309
310         Added the context menu to delete the selected profile.
311
312         Reviewed by Pavel Feldman.
313
314         No new tests required as UI related change
315
316         * English.lproj/localizedStrings.js: Removed property svn:mime-type.
317         * inspector/front-end/ProfilesPanel.js:
318         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
319
320 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
321
322         Not reviewed: removed svn:mime-type property from English.lproj/localizedStrings.js
323
324         * English.lproj/localizedStrings.js
325
326 2012-06-12  Dan Bernstein  <mitz@apple.com>
327
328         Tried to fix the notification-enabled build after r120044.
329
330         * notifications/NotificationController.cpp:
331         (WebCore::NotificationController::NotificationController):
332         (WebCore::NotificationController::create):
333         (WebCore::provideNotification):
334         * notifications/NotificationController.h:
335         (NotificationController):
336
337 2012-06-12  Huang Dongsung  <luxtella@company100.net>
338
339         [Qt][Texmap] Falling leaves demo missing clipping.
340         https://bugs.webkit.org/show_bug.cgi?id=88704
341
342         The bug originated from begining native painting mode of QPainter after enabling
343         scissor test, because begining native painting mode disables scissor test.
344
345         Covered by existing compositing tests.
346
347         Reviewed by Noam Rosenthal.
348
349         * platform/graphics/texmap/TextureMapperGL.cpp:
350         (WebCore::TextureMapperGL::beginPainting):
351
352 2012-06-12  Csaba Osztrogonác  <ossy@webkit.org>
353
354         [Qt][Win] Buildfix related to fromWinHBITMAP
355         https://bugs.webkit.org/show_bug.cgi?id=88863
356
357         Reviewed by Jocelyn Turcotte.
358
359         * platform/graphics/qt/GraphicsContextQt.cpp: Add qt_pixmapFromWinHBITMAP and HBitmapFormat enum.
360         (WebCore):
361         (WebCore::GraphicsContext::releaseWindowsContext):
362         * platform/graphics/qt/ImageQt.cpp:
363         (WebCore): Move qt_pixmapFromWinHBITMAP to outside of WebCore namespace. (Fix after r119924.)
364
365 2012-06-12  Takashi Sakamoto  <tasak@google.com>
366
367         [Shadow DOM] <style> inside Shadow subtree should be scoped inside the subtree.
368         https://bugs.webkit.org/show_bug.cgi?id=87805
369
370         Modified HTMLStyleElement to be treated as a scoped style independent
371         of its "scoped" attribute's value if HTMLStyleElement is in shadow
372         subtree. HTMLStyleElement has the following four cases talking about
373         "scoped" attribute and whether is in shadow subtree or not:
374         1, HTMLStyleElement is "scoped" and is in document tree,
375         2, HTMLStyleElement is "scoped" and is in shadow subtree,
376         3, HTMLStyleElement is not "scoped" and is in document tree, and
377         4, HTMLStyleElement is not "scoped" and is in shadow subtree.
378         The case 1 and 2 are not changed. This patch affected the case 4.
379         At the case 4, the HTMLStyleElement's scoping node is the shadow root.
380         This change is the first step for fixing style scope bug,
381         i.e. HTMLStyleElements in shadow subtree are applied to any element
382         in document tree.
383
384         Reviewed by Dimitri Glazkov.
385
386         Test: fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html
387
388         * css/StyleResolver.cpp:
389         (WebCore::StyleResolver::determineScope):
390         Modified to return a shadow root if a targeted stylesheet owner node is
391         not scoped but in some shadow DOM subtree.
392         * html/HTMLStyleElement.cpp:
393         (WebCore::HTMLStyleElement::HTMLStyleElement):
394         (WebCore::HTMLStyleElement::parseAttribute):
395         Modified to use the below scopedAttributeChanged when a changed
396         attribute's name is "scoped".
397         (WebCore::HTMLStyleElement::scopedAttributeChanged):
398         Newly added. According to new scoped value and isInShadowTree,
399         add or remove style rules to/from scopedAuthorRules via
400         registerWithScopingNode or unregisterWithScopingNode.
401         (WebCore::HTMLStyleElement::registerWithScopingNode):
402         Added one boolean argument to determine whether HTMLStyleElement is
403         scoped or not. The reason why not using scoped() is the comment:
404         "We cannot rely on the scoped element already being present when this
405         method is invoked. Therefore we cannot rely on scoped()"
406         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
407         Changed the code for updating m_isRegisteredWithScopingNode. Now
408         set m_scopedStyleRegistrationState to be NotRegistered.
409         (WebCore::HTMLStyleElement::insertedInto):
410         Modified to invoke registerWithScopingNode when an element is not
411         scoped but in some shadow subtree.
412         (WebCore::HTMLStyleElement::removedFrom):
413         Modified to invoke unregisterWithScopingNode when an element is not
414         scoped but in some shadow subtree.
415         * html/HTMLStyleElement.h:
416         (HTMLStyleElement):
417         Modified the type of m_isRegisteredWithScopingNode from bool to
418         enum and renamed to m_scopedStyleRegistrationState. Now the member
419         variable keeps what HTMLStyleElement's scoping node is, i.e.
420         none (this means, not in shadow subtree and not scoped), shadow root or
421         parent node.
422         Added one new method scopedAttributeChanged's declaration and
423         modified the declaration of registerWithScopingNode.
424
425 2012-06-12  Amy Ousterhout  <aousterh@chromium.org>
426
427         Removing unused parameter Page
428         https://bugs.webkit.org/show_bug.cgi?id=88848
429
430         Reviewed by Kentaro Hara.
431
432         Removed the unused parameter Page* supplied to the create function
433         and constructor in DeviceOrientationController.
434
435         The parameter Page* was previously stored in an instance variable
436         m_page, but this was removed (see https://bugs.webkit.org/show_bug.cgi?id=88812).
437
438         No new tests because the removed parameter was unused and untested.
439
440         * dom/DeviceOrientationController.cpp:
441         (WebCore::DeviceOrientationController::DeviceOrientationController):
442         (WebCore::DeviceOrientationController::create):
443         (WebCore::provideDeviceOrientationTo):
444         * dom/DeviceOrientationController.h:
445         (DeviceOrientationController):
446
447 2012-06-12  Sheriff Bot  <webkit.review.bot@gmail.com>
448
449         Unreviewed, rolling out r120051.
450         http://trac.webkit.org/changeset/120051
451         https://bugs.webkit.org/show_bug.cgi?id=88852
452
453         some tests are crashing (Requested by morrita on #webkit).
454
455         * CMakeLists.txt:
456         * GNUmakefile.list.am:
457         * Target.pri:
458         * WebCore.gypi:
459         * WebCore.vcproj/WebCore.vcproj:
460         * WebCore.xcodeproj/project.pbxproj:
461         * bindings/generic/ContextEnabledFeatures.cpp: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp.
462         (WebCore):
463         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
464         (WebCore::ContextEnabledFeatures::styleScopedEnabled):
465         (WebCore::ContextEnabledFeatures::pagePopupEnabled):
466         * bindings/generic/ContextEnabledFeatures.h: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.h.
467         (WebCore):
468         (ContextEnabledFeatures):
469         * bindings/scripts/CodeGeneratorV8.pm:
470         (GenerateImplementation):
471         * css/StyleResolver.cpp:
472         (WebCore::StyleResolver::determineScope):
473         * dom/ContextFeatures.cpp: Removed.
474         * dom/ContextFeatures.h: Removed.
475         * dom/DOMAllInOne.cpp:
476         * dom/DOMImplementation.cpp:
477         (WebCore::DOMImplementation::createDocument):
478         (WebCore::DOMImplementation::createHTMLDocument):
479         * dom/Document.cpp:
480         (WebCore::Document::Document):
481         * dom/Document.h:
482         (WebCore):
483         (Document):
484         * dom/Position.cpp:
485         (WebCore::Position::Position):
486         (WebCore::Position::findParent):
487         * dom/TreeScope.cpp:
488         (WebCore::TreeScope::getSelection):
489         * dom/make_names.pl:
490         (printConstructorInterior):
491         (printFactoryCppFile):
492         (printWrapperFunctions):
493         (printWrapperFactoryCppFile):
494         * editing/markup.cpp:
495         (WebCore::createFragmentFromMarkupWithContext):
496         * html/HTMLStyleElement.cpp:
497         (WebCore::HTMLStyleElement::registerWithScopingNode):
498         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
499         * html/shadow/HTMLContentElement.cpp:
500         (WebCore::contentTagName):
501         * inspector/DOMPatchSupport.cpp:
502         (WebCore::DOMPatchSupport::patchDocument):
503         * loader/FrameLoaderClient.h:
504         (WebCore::FrameLoaderClient::allowShadowDOM):
505         (WebCore::FrameLoaderClient::allowStyleScoped):
506         (FrameLoaderClient):
507         (WebCore::FrameLoaderClient::allowPagePopup):
508         * platform/RefCountedSupplement.h: Removed.
509         * platform/Supplementable.h:
510         * xml/XMLHttpRequest.cpp:
511         (WebCore::XMLHttpRequest::responseXML):
512
513 2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
514
515         [DRT] LTC:: counterValueForElementById() could be moved to Internals.
516         https://bugs.webkit.org/show_bug.cgi?id=84406
517
518         Reviewed by Hajime Morita.
519
520         Move the counterValueForElementById from LayoutTestCotroller to Internals and
521         remove the old platform specific implementations as it exclusively tests WebCore functionality.
522
523         Covered by existing test cases.
524
525         * testing/Internals.cpp:
526         (WebCore::Internals::counterValue):
527         (WebCore):
528         * testing/Internals.h:
529         (Internals):
530         * testing/Internals.idl:
531
532 2012-06-11  Hans Wennborg  <hans@chromium.org>
533
534         Speech JavaScript API: Make SpeechRecognitionError an Event
535         https://bugs.webkit.org/show_bug.cgi?id=88784
536
537         Reviewed by Adam Barth.
538
539         Make SpeechRecognitionError an Event. The spec was updated to make it
540         an event in its own right, rather than an attribute of
541         SpeechRecognitionEvent.
542
543         Test: fast/speech/scripted/speechrecognition-errors.html
544
545         * Modules/speech/SpeechRecognition.cpp:
546         (WebCore::SpeechRecognition::didReceiveError):
547         * Modules/speech/SpeechRecognitionError.cpp:
548         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
549         (WebCore::SpeechRecognitionError::interfaceName):
550         (WebCore):
551         * Modules/speech/SpeechRecognitionError.h:
552         (WebCore::SpeechRecognitionError::create):
553         (SpeechRecognitionError):
554         * Modules/speech/SpeechRecognitionError.idl:
555         * Modules/speech/SpeechRecognitionEvent.cpp:
556         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
557         * Modules/speech/SpeechRecognitionEvent.h:
558         (SpeechRecognitionEventInit):
559         (SpeechRecognitionEvent):
560         * Modules/speech/SpeechRecognitionEvent.idl:
561         * dom/EventNames.in:
562
563 2012-06-12  MORITA Hajime  <morrita@google.com>
564
565         REGRESSION(r118098): <content> element does not render distributed children when cloned from another document
566         https://bugs.webkit.org/show_bug.cgi?id=88148
567
568         Reviewed by Dimitri Glazkov.
569
570         The shadow DOM availability was decided through FrameLoaderClient.
571         But there are documents which don't have any associated frames, in
572         which any shadow DOM related elements cannot be constructed.  That
573         resulsted the regression.
574
575         This change introduces a Page-based client called
576         ContextFeaturesClient which takes the role from FrameLoaderClient
577         to decide the feature availability, and ContextFeatures which is a
578         proxy of ContextFeaturesClient.  ContextEnabledFeatures is is
579         replaced with ContextFeatures.
580
581         Each ContextFeatures object is owned by a Page, and is attached to
582         each Document in the page even if the page itself has no referenct
583         to Frames or Pages. With ContextFeatures, each Document can decide
584         the feature availability even if it cannot reach Page or Frame.
585
586         On RefCountedSupplement: Document instance can live longer than a
587         Page where it is shwon. This means that ContextFeatures instance
588         needs to survive after owner Page destruction because it's
589         referenced from possibly surviving Documents. RefCountedSupplement
590         is introduced to cover this scenario: It allows supplement classes
591         to live after Page's destruction.
592
593         RefCountedSupplement::hostDestroyed() is notified when the hosting
594         page is gone. ContextFeatures clears its reference to the client
595         using this notification.
596
597         Test: fast/dom/shadow/elements-in-frameless-document.html
598
599         * CMakeLists.txt:
600         * GNUmakefile.list.am:
601         * Target.pri:
602         * WebCore.gypi:
603         * WebCore.vcproj/WebCore.vcproj:
604         * WebCore.xcodeproj/project.pbxproj:
605         * bindings/scripts/CodeGeneratorV8.pm:
606         (GenerateImplementation):
607         * css/StyleResolver.cpp:
608         (WebCore::StyleResolver::determineScope):
609         * dom/ContextFeatures.cpp: Added.
610         (WebCore):
611         (WebCore::ContextFeaturesClient::empty):
612         (WebCore::ContextFeatures::supplementName):
613         (WebCore::ContextFeatures::defaultSwitch):
614         (WebCore::ContextFeatures::shadowDOMEnabled):
615         (WebCore::ContextFeatures::styleScopedEnabled):
616         (WebCore::ContextFeatures::pagePopupEnabled):
617         (WebCore::provideContextFeaturesTo):
618         (WebCore::provideContextFeaturesToDocumentFrom):
619         * dom/ContextFeatures.h: Added.
620         (WebCore):
621         (ContextFeatures):
622         (WebCore::ContextFeatures::ContextFeatures):
623         (WebCore::ContextFeatures::hostDestroyed):
624         (ContextFeaturesClient):
625         (WebCore::ContextFeaturesClient::~ContextFeaturesClient):
626         (WebCore::ContextFeaturesClient::isEnabled):
627         (WebCore::ContextFeatures::create):
628         (WebCore::ContextFeatures::isEnabled):
629         * dom/DOMAllInOne.cpp:
630         * dom/DOMImplementation.cpp:
631         (WebCore::DOMImplementation::createDocument):
632         (WebCore::DOMImplementation::createHTMLDocument):
633         * dom/Document.h:
634         (WebCore::Document::contextFeatures):
635         * dom/Document.cpp:
636         (WebCore::Document::Document):
637         (WebCore::Document::setContextFeatures):
638         * dom/Position.cpp:
639         (WebCore::Position::Position):
640         (WebCore::Position::findParent):
641         * dom/TreeScope.cpp:
642         (WebCore::TreeScope::getSelection):
643         * dom/make_names.pl:
644         (printConstructorInterior):
645         (printFactoryCppFile):
646         (printWrapperFunctions):
647         (printWrapperFactoryCppFile):
648         * editing/markup.cpp:
649         (WebCore::createFragmentFromMarkupWithContext):
650         * html/HTMLStyleElement.cpp:
651         (WebCore::HTMLStyleElement::registerWithScopingNode):
652         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
653         * html/shadow/HTMLContentElement.cpp:
654         (WebCore::contentTagName):
655         * inspector/DOMPatchSupport.cpp:
656         (WebCore::DOMPatchSupport::patchDocument):
657         * loader/FrameLoaderClient.h:
658         * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h.
659         (WebCore):
660         (RefCountedSupplement):
661         (WebCore::RefCountedSupplement::hostDestroyed):
662         (Wrapper):
663         (WebCore::RefCountedSupplement::Wrapper::Wrapper):
664         (WebCore::RefCountedSupplement::Wrapper::~Wrapper):
665         (WebCore::RefCountedSupplement::Wrapper::wrapped):
666         (WebCore::RefCountedSupplement::provideTo):
667         (WebCore::RefCountedSupplement::from):
668         * platform/Supplementable.h:
669         (WebCore::Supplement::isRefCountedWrapper):
670         * xml/XMLHttpRequest.cpp:
671         (WebCore::XMLHttpRequest::responseXML):
672
673 2012-06-12  Kent Tamura  <tkent@chromium.org>
674
675         Remove unnecessary functions: setName() and formControlName()
676         https://bugs.webkit.org/show_bug.cgi?id=88392
677
678         Reviewed by Kentaro Hara.
679
680         'name' IDL attributes of form-related elements should be [Reflected],
681         and we don't need to have setName(). We used formControlName() for
682         name() implementation, and formControlName() is not needed because it
683         just converts a null attribute to an empty string. Our binding code does it.
684
685         We don't remove FormAssociatedElement::name() because many C++ code use it.
686
687         FormAssociatedElement::name() is virtual, and HTMLInputElement overrides
688         it so that it returns a cache of the name attribtue value because
689         CheckedRadioButtons class needs to know an old name attribute value when
690         the name attribtue is changed.
691
692         References:
693         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-object-name
694         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-name
695         http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-fe-name
696
697         Test: fast/forms/name-attribute.html
698
699         * dom/Element.h: Remove formControlName().
700         * html/FormAssociatedElement.cpp:
701         (WebCore::FormAssociatedElement::name):
702         Copied from formControlName() implementation of HTMLFormControlElement.
703         * html/FormAssociatedElement.h:
704         (FormAssociatedElement): Make name() virtual, remove formControlName().
705         * html/FormController.cpp:
706         (WebCore::FormController::formElementsState):
707         Use name() instead of formControlName().
708         * html/HTMLFormControlElement.cpp:
709         Remove formControlName() and setName().
710         * html/HTMLFormControlElement.h: ditto.
711         * html/HTMLInputElement.cpp:
712         (WebCore::HTMLInputElement::name): Renamed from formControlName().
713         * html/HTMLInputElement.h:
714         (HTMLInputElement): Renamed formControlName() to name(), and make it public.
715         * html/HTMLKeygenElement.idl: Make 'name' [Reflected].
716         * html/HTMLObjectElement.cpp: Remove formControlName().
717         * html/HTMLObjectElement.h: ditto.
718         * html/HTMLSelectElement.cpp:
719         (WebCore::HTMLSelectElement::appendFormData):
720         Use name() instead of formControlName().
721         * html/HTMLSelectElement.idl: Make 'name' [Reflected].
722         * html/HTMLTextAreaElement.idl: Make 'name' [Reflected].
723
724 2012-06-11  Nico Weber  <thakis@chromium.org>
725
726         Remove unused member variables found by clang's -Wunused-private-field
727         https://bugs.webkit.org/show_bug.cgi?id=88812
728
729         Reviewed by Anders Carlsson.
730
731         Change a few |class|s that were used only to pin down the size of
732         existing classes to |struct|, so that clang doesn't warn about these
733         memvars.
734
735         No intended behavior change.
736
737         * Modules/geolocation/GeolocationController.cpp:
738         (WebCore::GeolocationController::GeolocationController):
739         * Modules/geolocation/GeolocationController.h:
740         (GeolocationController):
741         * Modules/webaudio/AudioContext.h:
742         (AudioContext):
743         * Modules/webaudio/AudioParamTimeline.h:
744         (AudioParamTimeline):
745         * accessibility/AccessibilityScrollbar.h:
746         (AccessibilityScrollbar):
747         * bindings/v8/ScriptScope.cpp:
748         (WebCore::ScriptScope::ScriptScope):
749         * bindings/v8/ScriptScope.h:
750         (ScriptScope):
751         * css/CSSValue.cpp:
752         * css/StylePropertySet.cpp:
753         * dom/DeviceOrientationController.cpp:
754         (WebCore::DeviceOrientationController::DeviceOrientationController):
755         * dom/DeviceOrientationController.h:
756         (DeviceOrientationController):
757         * editing/ReplaceSelectionCommand.cpp:
758         (ReplacementFragment):
759         (WebCore::ReplacementFragment::ReplacementFragment):
760         * editing/TextIterator.cpp:
761         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
762         * editing/TextIterator.h:
763         (SimplifiedBackwardsTextIterator):
764         (BackwardsCharacterIterator):
765         * html/HTMLFormCollection.cpp:
766         (WebCore::HTMLFormCollection::HTMLFormCollection):
767         * html/HTMLFormCollection.h:
768         (HTMLFormCollection):
769         * html/shadow/MediaControlElements.cpp:
770         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
771         * html/shadow/MediaControlElements.h:
772         (MediaControlFullscreenButtonElement):
773         * html/shadow/MediaControlRootElementChromium.cpp:
774         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
775         * html/shadow/MediaControlRootElementChromium.h:
776         (MediaControlRootElementChromium):
777         * html/track/LoadableTextTrack.cpp:
778         (WebCore::LoadableTextTrack::LoadableTextTrack):
779         * html/track/LoadableTextTrack.h:
780         (LoadableTextTrack):
781         * inspector/CodeGeneratorInspector.py:
782         (Generator.go):
783         * inspector/InspectorCSSAgent.cpp:
784         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
785         * inspector/InspectorCSSAgent.h:
786         (InspectorCSSAgent):
787         * inspector/InspectorDOMDebuggerAgent.cpp:
788         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
789         * inspector/InspectorDOMDebuggerAgent.h:
790         (InspectorDOMDebuggerAgent):
791         * inspector/InspectorMemoryAgent.cpp:
792         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
793         * inspector/InspectorMemoryAgent.h:
794         (InspectorMemoryAgent):
795         * notifications/NotificationController.cpp:
796         (WebCore::NotificationController::NotificationController):
797         * notifications/NotificationController.h:
798         (NotificationController):
799         * page/animation/CompositeAnimation.h:
800         (WebCore::CompositeAnimation::CompositeAnimation):
801         (CompositeAnimation):
802         * platform/Length.cpp:
803         * platform/audio/ReverbConvolver.cpp:
804         (WebCore::ReverbConvolver::ReverbConvolver):
805         * platform/audio/ReverbConvolver.h:
806         (ReverbConvolver):
807         * platform/audio/ReverbConvolverStage.cpp:
808         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
809         * platform/audio/ReverbConvolverStage.h:
810         (ReverbConvolverStage):
811         * platform/graphics/TextRun.cpp:
812         (ExpectedTextRunSize):
813         * platform/graphics/chromium/cc/CCThreadProxy.h:
814         (CCThreadProxy):
815         * platform/graphics/filters/FECustomFilter.cpp:
816         (WebCore::FECustomFilter::FECustomFilter):
817         * platform/graphics/filters/FECustomFilter.h:
818         (FECustomFilter):
819         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
820         (JPEGImageReader):
821         * platform/leveldb/LevelDBTransaction.cpp:
822         (WebCore::LevelDBTransaction::TreeIterator::next):
823         * platform/text/TextCodecICU.cpp:
824         (WebCore::TextCodecICU::TextCodecICU):
825         * platform/text/TextCodecICU.h:
826         (TextCodecICU):
827         * rendering/InlineBox.cpp:
828         * rendering/InlineFlowBox.cpp:
829         * rendering/RenderText.cpp:
830         * rendering/style/KeyframeList.h:
831         (WebCore::KeyframeList::KeyframeList):
832         (KeyframeList):
833         * rendering/svg/RenderSVGTextPath.cpp:
834         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
835         * rendering/svg/RenderSVGTextPath.h:
836         * rendering/svg/SVGInlineTextBox.cpp:
837         * svg/SVGPathByteStreamSource.cpp:
838         * svg/SVGPathByteStreamSource.h:
839         * svg/SVGPathTraversalStateBuilder.cpp:
840         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
841         * svg/SVGPathTraversalStateBuilder.h:
842         (SVGPathTraversalStateBuilder):
843         * xml/XSLStyleSheet.h:
844
845 2012-06-11  Kinuko Yasuda  <kinuko@chromium.org>
846
847         XHR returns size==0 Blob
848         https://bugs.webkit.org/show_bug.cgi?id=88750
849
850         Reviewed by Alexey Proskuryakov.
851
852         Response Blob's .size field must have the correct response size.
853
854         Test: http/tests/xmlhttprequest/response-blob-size.html
855
856         * xml/XMLHttpRequest.cpp:
857         (WebCore::XMLHttpRequest::responseBlob):
858
859 2012-06-11  Silvia Pfeiffer  <silviapf@chromium.org>
860
861         Introduce an Enclosure Element for Chromium video controls.
862         https://bugs.webkit.org/show_bug.cgi?id=87683
863
864         Reviewed by Eric Carlson.
865
866         Updated tests.
867
868         The Chrome video controls are receiving a visual update. A new enclosure div is required
869         to provide for a offset space from the video's boundaries. The visual update itself is in
870         a separate patch.
871
872         * css/mediaControlsChromium.css:
873         (video::-webkit-media-controls-enclosure):
874         Introduce CSS for enclosure div so it doesn't show yet.
875         * html/shadow/MediaControlRootElementChromium.cpp:
876         (WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement):
877         Definition of the new enclosure element.
878         (WebCore::MediaControlChromiumEnclosureElement::create):
879         Definition of a create operator for the new enclosure element.
880         (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
881         Definition of the shadowPseudoId of -webkit-media-controls-enclosure for the enclosure div.
882         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
883         Initialize member element for enclosure div.
884         (WebCore::MediaControlRootElementChromium::create):
885         Instantiate enclosure div and add into DOM between controls and panel elements.
886         (WebCore::MediaControlRootElementChromium::setMediaController):
887         Set media controller for enclosure div.
888         (WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
889         Insert text track display container to enclosure rather than panel.
890         * html/shadow/MediaControlRootElementChromium.h:
891         (WebCore):
892         (MediaControlChromiumEnclosureElement):
893         (WebCore::MediaControlChromiumEnclosureElement::setMediaController):
894         (WebCore::MediaControlChromiumEnclosureElement::mediaController):
895         (WebCore::MediaControlChromiumEnclosureElement::isMediaControlElement):
896         Add declaration of the new enclosure element and its member functions.
897         (MediaControlRootElementChromium):
898         Add member variable to controls root element to hold the enclosure element.
899
900 2012-06-11  Elliott Sprehn  <esprehn@gmail.com>
901
902         WebKit doesn't allow replacing the document element with a DocumentFragment containing one element
903         https://bugs.webkit.org/show_bug.cgi?id=88681
904
905         Reviewed by Ojan Vafai.
906
907         Fix bug where replacing an immediate child of a Document with a DocumentFragment
908         would throw a HIERARCHY_REQUEST_ERR instead of replacing the node as required by DOM4.
909         http://www.w3.org/TR/domcore/#mutation-algorithms
910
911         * dom/Document.cpp:
912         (WebCore::Document::canReplaceChild):
913             When the newChild was a DocumentFragment we incorrectly
914             iterated over the document's children twice instead of the
915             fragment when counting the total number of elements and
916             doctypes to enfoce that there's only one of each.
917
918 2012-06-11  Mary Wu  <mary.wu@torchmobile.com.cn>
919
920         [BlackBerry] Add handling of notifyDataReceived in NetworkJob even there's no data inside
921         https://bugs.webkit.org/show_bug.cgi?id=88773
922
923         Reviewed by Rob Buis.
924
925         Handling notifyDataReceived event even if there is no data inside.
926         This event was critical because it gives downloadFilterStream a chance
927         to follow up NetworkStream close event, and it also make pluginView in
928         FrameLoaderBlackBerry return normal logic.
929
930         RIM PR# 164563
931
932         Reviewed internally by Leo Yang.
933
934         * platform/network/blackberry/NetworkJob.cpp:
935         (WebCore::NetworkJob::handleNotifyDataReceived):
936
937 2012-06-11  Mary Wu  <mary.wu@torchmobile.com.cn>
938
939         [BlackBerry] Wrong mimetype for empty file link
940         https://bugs.webkit.org/show_bug.cgi?id=88642
941
942         Reviewed by Rob Buis.
943
944         RIM PR# 164164
945
946         For empty file link, we shouldn't give "application/octet-stream"
947         which will lead to download.
948
949         Reviewed internally by Charles Wei.
950
951         * platform/network/blackberry/NetworkJob.cpp:
952         (WebCore::NetworkJob::sendResponseIfNeeded):
953
954 2012-06-11  Jin Yang  <jin.a.yang@intel.com>
955
956         GeneratorGeneratedImage should cache images for the non-tiled case
957         https://bugs.webkit.org/show_bug.cgi?id=87094
958
959         Reviewed by Simon Fraser.
960
961         We cache the generated image if generator is not changed. By compared
962         with generating image on the fly, it will lose a little pixel precision
963         and several layout tests should be rebaselined. With this patch, the IE test
964         drive benchmark "Bayou" can gain about 50%.
965
966         No new tests. Performance optimization.
967
968         * platform/graphics/GeneratorGeneratedImage.cpp:
969         (WebCore::GeneratorGeneratedImage::draw):
970
971 2012-06-11  Vincent Scheib  <scheib@chromium.org>
972
973         Add new Pointer Lock spec attribute webkitPointerLockElement.
974         https://bugs.webkit.org/show_bug.cgi?id=88799
975
976         Reviewed by Dimitri Glazkov.
977
978         Part of a series of refactoring changes to update pointer lock API to
979         the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402
980
981         New attribute webkitPointerLockElement added. Follow up patches
982         will remove the previous isLocked attribute. Tests updated to use
983         the new attribute.
984
985         * bindings/generic/RuntimeEnabledFeatures.h:
986         (WebCore::RuntimeEnabledFeatures::webkitPointerLockElementEnabled):
987         * dom/Document.cpp:
988         (WebCore):
989         (WebCore::Document::webkitPointerLockElement):
990         * dom/Document.h:
991         (Document):
992         * dom/Document.idl:
993         * page/PointerLockController.h:
994         (WebCore::PointerLockController::element):
995
996 2012-06-11  Vincent Scheib  <scheib@chromium.org>
997
998         Consolidate Pointer Lock runtime enabled flags to just one.
999         https://bugs.webkit.org/show_bug.cgi?id=88810
1000
1001         Reviewed by Dimitri Glazkov.
1002
1003         No new tests.
1004
1005         * bindings/generic/RuntimeEnabledFeatures.h:
1006         (WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
1007         (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
1008         * dom/MouseEvent.idl:
1009         * page/Navigator.idl:
1010
1011 2012-06-11  Alexis Menard  <alexis.menard@openbossa.org>
1012
1013         [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
1014         https://bugs.webkit.org/show_bug.cgi?id=88804
1015
1016         Reviewed by Tony Chang.
1017
1018         Protect box-decoration-break behind a feature flag enabled by default.
1019
1020         No new tests : no behavior change here.
1021
1022         * Configurations/FeatureDefines.xcconfig:
1023         * GNUmakefile.am:
1024         * css/CSSComputedStyleDeclaration.cpp:
1025         (WebCore):
1026         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1027         * css/CSSParser.cpp:
1028         (WebCore::isValidKeywordPropertyAndValue):
1029         (WebCore::isKeywordPropertyID):
1030         (WebCore::CSSParser::parseValue):
1031         * css/CSSPrimitiveValueMappings.h:
1032         (WebCore):
1033         * css/CSSProperty.cpp:
1034         (WebCore::CSSProperty::isInheritedProperty):
1035         * css/CSSValueKeywords.in:
1036         * css/StyleBuilder.cpp:
1037         (WebCore::StyleBuilder::StyleBuilder):
1038         * rendering/style/RenderStyle.h:
1039         * rendering/style/StyleBoxData.cpp:
1040         (WebCore::StyleBoxData::StyleBoxData):
1041         (WebCore::StyleBoxData::operator==):
1042         * rendering/style/StyleBoxData.h:
1043         (StyleBoxData):
1044
1045 2012-06-11  James Robinson  <jamesr@chromium.org>
1046
1047         [chromium] Port DrawingBufferChromium from TextureLayerChromium over to WebExternalTextureLayer
1048         https://bugs.webkit.org/show_bug.cgi?id=86273
1049
1050         Reviewed by Adrienne Walker.
1051
1052         This converts more WebCore code over to using public APIs instead of internal compositor layer types.
1053
1054         Refactor only, no change in behavior thus no new tests.
1055
1056         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1057         (WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
1058         (WebCore::DrawingBufferPrivate::~DrawingBufferPrivate):
1059         (WebCore::DrawingBufferPrivate::layer):
1060         (DrawingBufferPrivate):
1061         * platform/graphics/chromium/TextureLayerChromium.cpp:
1062         (WebCore::TextureLayerChromium::~TextureLayerChromium):
1063         (WebCore::TextureLayerChromium::setRateLimitContext):
1064         (WebCore::TextureLayerChromium::setNeedsDisplayRect):
1065         (WebCore::TextureLayerChromium::update):
1066         * platform/graphics/chromium/TextureLayerChromium.h:
1067         (WebKit):
1068         (TextureLayerChromiumClient):
1069
1070 2012-06-11  Max Feil  <mfeil@rim.com>
1071
1072         [BlackBerry] Seek calls are being unnecessarily delayed
1073         https://bugs.webkit.org/show_bug.cgi?id=88732
1074
1075         Reviewed by Antonio Gomes.
1076
1077         There is a problem with the way the m_userDrivenSeekTimer is
1078         implemented. When MediaPlayerPrivate::seek() is called, there
1079         is always a 100ms delay even if the timer is not running. The
1080         timer is supposed to space out (i.e. throttle) repeated seeks
1081         that come in too soon after a previous seek, but currently it
1082         is slowing down even single seeks and seeks that come in with
1083         adequate delay after a previous seek. I fixed this in my patch
1084         by improving the way the timer fired function is called.
1085         
1086         A note on the new m_lastSeekTimePending flag: This flag is
1087         needed so that userDrivenSeekTimerFired() knows whether or not
1088         to perform the seek. The only case where this flag will not be
1089         set is if no MediaPlayerPrivate::seek() call came in while the
1090         timer was active, in which case it's important to do nothing.
1091         I could encode this flag's information into the m_lastSeekTime
1092         float, for example by initializing it and resetting it to NAN
1093         and using isnan(). But I feel that using a separate bool is a
1094         more portable approach.
1095
1096         No new tests. I would like to propose not including a layout test
1097         with this fix. Doing timing tests for 100ms delays is tricky
1098         from Javascript, and I don't think the benefit of such a test
1099         outweighs the extra time it would take to develop one. The test
1100         would also be a problem to maintain as it may give different
1101         results over different runs and across different target hardware.
1102
1103         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1104         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1105         (WebCore::MediaPlayerPrivate::seek):
1106         (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
1107         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1108         (MediaPlayerPrivate):
1109
1110 2012-06-11  Max Feil  <mfeil@rim.com>
1111
1112         [BlackBerry] Unexpected repeats of short media
1113         https://bugs.webkit.org/show_bug.cgi?id=88733
1114
1115         Reviewed by Antonio Gomes.
1116
1117         The m_userDrivenSeekTimer is causing unwanted repeats of short
1118         media such as sound effects because it is causing the current
1119         time to not reflect that the media has finished playing.
1120         This problem only affects media whose duration is close to
1121         or less than the SeekSubmissionDelay, which is currently
1122         set to 100ms. My fix is to ignore the userDrivenSeekTimer in
1123         MediaPlayerPrivate::currentTime() if the duration of the media
1124         is within twice the SeekSubmissionDelay. Seek drag smoothness
1125         is a non-issue for such short media.
1126
1127         Test: platform/blackberry/media/short-media-repeats-correctly.html
1128
1129         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1130         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1131         (WebCore):
1132         (WebCore::MediaPlayerPrivate::currentTime):
1133         (WebCore::MediaPlayerPrivate::seek):
1134         (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
1135         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1136         (MediaPlayerPrivate):
1137
1138 2012-06-11  Julien Chaffraix  <jchaffraix@webkit.org>
1139
1140         Account for margin after when laying out <legend> element
1141         https://bugs.webkit.org/show_bug.cgi?id=35981
1142
1143         Reviewed by Abhishek Arya.
1144
1145         Tests: fast/forms/legend-after-margin-horizontal-writing-mode.html
1146                fast/forms/legend-after-margin-vertical-writing-mode.html
1147                fast/forms/legend-after-margin-with-before-border-horizontal-mode.html
1148                fast/forms/legend-small-after-margin-before-border-horizontal-mode.html
1149
1150         The existing code would ignore margin after when layouting out the <legend>. This
1151         change only adds the code to handle the margin after, the margin before is still
1152         ignored as it's not obvious how it should be working.
1153
1154         * rendering/RenderFieldset.cpp:
1155         (WebCore::RenderFieldset::layoutSpecialExcludedChild):
1156         Split the code in 2 code paths to reflect how we position and size. Those are covered by the
1157         tests above.
1158
1159 2012-06-11  James Robinson  <jamesr@chromium.org>
1160
1161         [chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
1162         https://bugs.webkit.org/show_bug.cgi?id=86259
1163
1164         Reviewed by Adrienne Walker.
1165
1166         This refactors the compositor's rate limiting implementation to use the Platform API's WebGraphicsContext3D
1167         directly instead of WebCore::GraphicsContext3D to cut down on the number of spurious WebCore dependencies in the
1168         compositor.  The one change in contract is that the caller to CCLayerTreeHost::startRateLimit() now has to call
1169         CCLayerTreeHost::stopRateLimit() before allowing the referenced context to go away since CCLayerTreeHost no
1170         longer retains a reference, but this was always happening already.
1171
1172         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1173         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
1174         (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
1175         * platform/graphics/chromium/RateLimiter.cpp:
1176         (WebCore::RateLimiter::create):
1177         (WebCore::RateLimiter::RateLimiter):
1178         (WebCore::RateLimiter::start):
1179         (WebCore::RateLimiter::rateLimitContext):
1180         * platform/graphics/chromium/RateLimiter.h:
1181         (WebKit):
1182         (RateLimiter):
1183         * platform/graphics/chromium/TextureLayerChromium.cpp:
1184         (WebCore::TextureLayerChromium::~TextureLayerChromium):
1185         (WebCore::TextureLayerChromium::setRateLimitContext):
1186         (WebCore::TextureLayerChromium::setNeedsDisplayRect):
1187         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1188         (WebCore::CCLayerTreeHost::startRateLimiter):
1189         (WebCore::CCLayerTreeHost::stopRateLimiter):
1190         (WebCore::CCLayerTreeHost::rateLimit):
1191         (WebCore):
1192         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1193         (CCLayerTreeHost):
1194
1195 2012-06-11  Dana Jansens  <danakj@chromium.org>
1196
1197         [chromium] Separate CCVideoDrawQuad and from the layer tree and video provider by removing ManagedTexture and WebVideoFrame pointers from the quad
1198         https://bugs.webkit.org/show_bug.cgi?id=88363
1199
1200         Reviewed by Adrienne Walker.
1201
1202         CCVideoDrawQuad should not contain any pointers to data in the layer
1203         tree so we are able to serialize it across process boundaries. This
1204         patch removes the ManagedTexture pointers from the quad class,
1205         replacing them with texture ids. It removes the WebVideoFrame* from
1206         the quad, replacing it with the frame provider's texture id included
1207         in the WebVideoFrame structure. And it uses a WebTransformationMatrix
1208         instead of a pointer to an array of floats.
1209
1210         Texture allocation is done in CCVideoLayerImpl via the
1211         contentsTextureAllocator, so that the memory usage can be tracked.
1212
1213         We move the copyPlaneToTextures() method back from LayerRendererChromium
1214         to CCVideoLayerImpl, as this method uses the texture data pointer in the
1215         WebVideoFrame, and we do not want to give this pointer to the quad
1216         class. Instead, this method makes use of the LayerTextureSubImage class
1217         to copy the pixel data into the texture.
1218
1219         LayerTextureSubImage is updated to allow non-4byte texture formats.
1220
1221         * platform/graphics/chromium/LayerRendererChromium.cpp:
1222         (WebCore::LayerRendererChromium::drawYUV):
1223         (WebCore::LayerRendererChromium::drawRGBA):
1224         (WebCore::LayerRendererChromium::drawNativeTexture2D):
1225         (WebCore::LayerRendererChromium::drawStreamTexture):
1226         (WebCore::LayerRendererChromium::drawVideoQuad):
1227         * platform/graphics/chromium/LayerTextureSubImage.cpp:
1228         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
1229         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
1230         * platform/graphics/chromium/TextureCopier.cpp:
1231         * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp:
1232         (WebCore::CCVideoDrawQuad::create):
1233         (WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
1234         * platform/graphics/chromium/cc/CCVideoDrawQuad.h:
1235         (CCVideoDrawQuad):
1236         (WebCore::CCVideoDrawQuad::planes):
1237         (WebCore::CCVideoDrawQuad::frameProviderTextureId):
1238         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1239         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
1240         (WebCore::CCVideoLayerImpl::willDraw):
1241         (WebCore::CCVideoLayerImpl::willDrawInternal):
1242         (WebCore::CCVideoLayerImpl::appendQuads):
1243         (WebCore::CCVideoLayerImpl::didDraw):
1244         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
1245         (WebCore):
1246         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
1247         (WebCore::CCVideoLayerImpl::allocatePlaneData):
1248         (WebCore::CCVideoLayerImpl::copyPlaneData):
1249         (WebCore::CCVideoLayerImpl::freePlaneData):
1250         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
1251         (WebCore::CCVideoLayerImpl::didLoseContext):
1252         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1253         (FramePlane):
1254         (WebCore::CCVideoLayerImpl::FramePlane::FramePlane):
1255
1256 2012-06-11  Joshua Bell  <jsbell@chromium.org>
1257
1258         IndexedDB: Object stores are not successfully deleted
1259         https://bugs.webkit.org/show_bug.cgi?id=88788
1260
1261         Reviewed by Tony Chang.
1262
1263         Discovered while working on http://webkit.org/b/83074 - object stores are not
1264         being deleted from the backing store. Deletion would succeed in the in-memory
1265         data structures, but after closing/re-opening the backing store the object store
1266         (but not its indexes/data) would reappear. Due to 83074, this isn't detectable
1267         by DRT without a full restart.
1268
1269         Test: [chromium] webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest'
1270
1271         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1272         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
1273
1274 2012-06-05  Eric Uhrhane <ericu@chromium.org>
1275
1276         Crash in fast/files/read tests during Garbage Collection
1277         https://bugs.webkit.org/show_bug.cgi?id=87165
1278
1279         Reviewed by Michael Saboff
1280
1281         Fix previous fix for hasPendingActivity, and fix a bug in a complex
1282         abort case as well--abort during the final progress event of a write
1283         would hang the writer.
1284
1285         * Modules/filesystem/FileWriter.cpp:
1286         (WebCore::FileWriter::stop):
1287         (WebCore::FileWriter::write):
1288         (WebCore::FileWriter::truncate):
1289         (WebCore::FileWriter::didWrite):
1290         (WebCore::FileWriter::didTruncate):
1291         (WebCore::FileWriter::didFail):
1292         (WebCore::FileWriter::completeAbort):
1293         (WebCore::FileWriter::doOperation):
1294         (WebCore::FileWriter::signalCompletion):
1295
1296 2012-06-11  Shawn Singh  <shawnsingh@chromium.org>
1297
1298         [chromium] Implement position:fixed in compositor thread
1299         https://bugs.webkit.org/show_bug.cgi?id=70103
1300
1301         Reviewed by Adrienne Walker.
1302
1303         Significant contributions to this patch by Alpha Lam and Sami Kyostila.
1304
1305         This patch is the compositor-side change that adds support for
1306         fixed-position layers to be composited layers. Before this patch,
1307         fixed-position elements were positioned only by WebCore (i.e. main
1308         thread when painting), and the compositor did not have enough
1309         knowledge on its own to position it properly. This patch adds the
1310         necessary math and plumbs the necessary layer information so that
1311         the impl thread can properly position fixed-position elements on
1312         its own. This support is necessary for correctness of composited
1313         fixed-position elements, which can greatly help to avoid
1314         repainting container layers when scrolling with a fixed-position
1315         layer.
1316
1317         There also needs to be WebCore-side support for this, which is
1318         addressed in https://bugs.webkit.org/show_bug.cgi?id=78864
1319
1320         Unit tests added to CCLayerTreeHostCommonTest:
1321           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDirectContainer
1322           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithTransformedDirectContainer
1323           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainer
1324           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainerAndTransforms
1325           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleScrollDeltas
1326           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithIntermediateSurfaceAndTransforms
1327           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleIntermediateSurfaces
1328           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithContainerLayerThatHasSurface
1329           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatIsAlsoFixedPositionContainer
1330           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatHasNoContainer
1331
1332         * platform/graphics/chromium/LayerChromium.cpp:
1333         (WebCore::LayerChromium::LayerChromium):
1334         (WebCore::LayerChromium::pushPropertiesTo):
1335         * platform/graphics/chromium/LayerChromium.h:
1336         (WebCore::LayerChromium::setIsContainerForFixedPositionLayers):
1337         (WebCore::LayerChromium::isContainerForFixedPositionLayers):
1338         (LayerChromium):
1339         (WebCore::LayerChromium::setFixedToContainerLayerVisibleRect):
1340         (WebCore::LayerChromium::fixedToContainerLayerVisibleRect):
1341         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1342         (WebCore::CCLayerImpl::CCLayerImpl):
1343         * platform/graphics/chromium/cc/CCLayerImpl.h:
1344         (WebCore::CCLayerImpl::setIsContainerForFixedPositionLayers):
1345         (WebCore::CCLayerImpl::isContainerForFixedPositionLayers):
1346         (CCLayerImpl):
1347         (WebCore::CCLayerImpl::setFixedToContainerLayerVisibleRect):
1348         (WebCore::CCLayerImpl::fixedToContainerLayerVisibleRect):
1349         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1350         (WebCore::computeScrollCompensationForThisLayer):
1351         (WebCore):
1352         (WebCore::computeScrollCompensationMatrixForChildren):
1353         (WebCore::calculateDrawTransformsInternal):
1354         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
1355
1356 2012-06-11  Sam Weinig  <sam@webkit.org>
1357
1358         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
1359         https://bugs.webkit.org/show_bug.cgi?id=88723
1360
1361         Reviewed by Dan Bernstein.
1362
1363         * WebCore.exp.in:
1364         Update export.
1365         * editing/Editor.cpp:
1366         (WebCore::Editor::rangeOfString):
1367         (WebCore::Editor::countMatchesForText):
1368         * editing/Editor.h:
1369         (Editor):
1370         * loader/FrameLoader.cpp:
1371         (WebCore::FrameLoader::findFrameForNavigation):
1372         * page/DOMWindow.cpp:
1373         (WebCore::DOMWindow::parent):
1374         (WebCore::DOMWindow::top):
1375         * page/EventHandler.cpp:
1376         (WebCore::EventHandler::hitTestResultAtPoint):
1377         * page/Frame.cpp:
1378         (WebCore::Frame::Frame):
1379         * page/Frame.h:
1380         (Frame):
1381         * page/FrameTree.cpp:
1382         (WebCore::FrameTree::parent):
1383         (WebCore::FrameTree::top):
1384         * page/FrameTree.h:
1385         (FrameTree):
1386         * page/Location.cpp:
1387         (WebCore::Location::ancestorOrigins):
1388         * xml/XMLTreeViewer.cpp:
1389         (WebCore::XMLTreeViewer::hasNoStyleInformation):
1390         Update for the removal of disconnected frames and text search exclusions concepts.
1391
1392 2012-06-11  Xianzhu Wang  <wangxianzhu@chromium.org>
1393
1394         SVGImageCache leaks image data
1395         https://bugs.webkit.org/show_bug.cgi?id=87792
1396
1397         There are two functions to remove a client from a CachedImage:
1398         - CachedResource::removeClient()
1399         - CachedImage::removeClientForRenderer().
1400         It's easy to make error to call the former which will leak the cached
1401         image buffers in SVGImageCache.
1402
1403         This change combined the two by adding the virtual 
1404         CachedResource::didRemoveClient(). CachedImage will do SVGImageCache
1405         cleanup in the function.
1406
1407         Reviewed by Nikolas Zimmermann.
1408
1409         Test: svg/as-image/svg-image-leak-cached-data.html
1410
1411         * loader/cache/CachedFont.h:
1412         (WebCore::CachedFontClient::resourceClientType): Added 'const'.
1413         * loader/cache/CachedImage.cpp:
1414         (WebCore):
1415         (WebCore::CachedImage::didRemoveClient): Removes the client from SVGImageCache.
1416         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
1417         * loader/cache/CachedImage.h:
1418         (CachedImage):
1419         (WebCore::CachedImageClient::resourceClientType): Added 'const'.
1420         * loader/cache/CachedRawResource.h:
1421         (WebCore::CachedRawResourceClient::resourceClientType): Added 'const'.
1422         * loader/cache/CachedResource.cpp:
1423         (WebCore::CachedResource::removeClient): Added invocation of didRemoveClient().
1424         * loader/cache/CachedResource.h:
1425         (WebCore::CachedResource::didRemoveClient): Added for subclasses to do additional works.
1426         * loader/cache/CachedResourceClient.h:
1427         (WebCore::CachedResourceClient::resourceClientType): Added 'const'.
1428         * loader/cache/CachedSVGDocument.h:
1429         (WebCore::CachedSVGDocumentClient::resourceClientType): Added 'const'.
1430         * loader/cache/CachedStyleSheetClient.h:
1431         (WebCore::CachedStyleSheetClient::resourceClientType): Added 'const'.
1432         * rendering/style/StyleCachedImage.cpp:
1433         (WebCore::StyleCachedImage::removeClient):
1434         * rendering/style/StyleCachedImageSet.cpp:
1435         (WebCore::StyleCachedImageSet::removeClient):
1436         * svg/graphics/SVGImageCache.cpp:
1437         (WebCore::SVGImageCache::~SVGImageCache): Added checking for leaks.
1438         (WebCore::SVGImageCache::removeClientFromCache):
1439         (WebCore::SVGImageCache::setRequestedSizeAndScales): 
1440         (WebCore::SVGImageCache::requestedSizeAndScales):
1441         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForClient):
1442         * svg/graphics/SVGImageCache.h:
1443         (WebCore):
1444         (SVGImageCache):
1445
1446 2012-06-11  Mark Pilgrim  <pilgrim@chromium.org>
1447
1448         [Chromium] Call shared timer functions directly
1449         https://bugs.webkit.org/show_bug.cgi?id=88781
1450
1451         Reviewed by Adam Barth.
1452
1453         Part of a refactoring series. See tracking bug 82948.
1454
1455         * platform/chromium/PlatformSupport.h:
1456         (PlatformSupport):
1457         * platform/chromium/SharedTimerChromium.cpp:
1458         (WebCore::setSharedTimerFiredFunction):
1459         (WebCore::setSharedTimerFireInterval):
1460
1461 2012-06-11  Pravin D  <pravind.2k4@gmail.com>
1462
1463         Relative pos. input fields in columns vanish when you start typing in them
1464         https://bugs.webkit.org/show_bug.cgi?id=76834
1465
1466         Reviewed by Julien Chaffraix.
1467
1468         Test: fast/multicol/multicol-with-child-renderLayer-for-input.html
1469
1470         * page/FrameView.cpp:
1471         (WebCore::updateLayerPositionFlags):
1472         Helper function to prepare the UpdateLayerPositionsFlags based on the input parameters.
1473         If didFullRepaint flag is set, then CheckForRepaints flag is removed from the default flags.
1474         Also during a relayout of a subtree, if the RenderLayer of the subtree root is paginated then updatePagination flag is
1475         included in the flags. 
1476
1477         (WebCore):
1478         (WebCore::FrameView::layout):
1479         Now uses the helper function updateLayerPositionFlags() to get the final set of UpdateLayerPositionsFlags.
1480
1481         * rendering/RenderLayer.h:
1482         (WebCore::RenderLayer::isPaginated):
1483         (RenderLayer):
1484         isPaginated function is made public so that FrameView class can use it prepare UpdateLayerPositionsFlags.
1485
1486 2012-06-11  Mark Pilgrim  <pilgrim@chromium.org>
1487
1488         [Chromium] Remove some dead code in PasteboardChromium
1489         https://bugs.webkit.org/show_bug.cgi?id=88782
1490
1491         Reviewed by Adam Barth.
1492
1493         Part of a refactoring series. See tracking bug 82948.
1494         Leftover detritus from bug 88038.
1495
1496         * platform/chromium/PasteboardChromium.cpp:
1497         (WebCore::Pasteboard::documentFragment):
1498
1499 2012-06-11  Peter Beverloo  <peter@chromium.org>
1500
1501         [Chromium] Theme updates for Android in menu list rendering and selection backgrounds
1502         https://bugs.webkit.org/show_bug.cgi?id=88775
1503
1504         Reviewed by Adam Barth.
1505
1506         For Chrome on Android, use the width of the scrollbar down arrow instead
1507         of the scrollbar's width for determining the arrow padding to apply for
1508         menu list rendering, as WebKit isn't drawing a scrollbar (thus width=0).
1509
1510         Furthermore, change the default active selection background color to be
1511         equal to the tap highlighting color.
1512
1513         These changes should be covered by existing layout tests.
1514
1515         * rendering/RenderThemeChromiumAndroid.cpp:
1516         (WebCore::RenderThemeChromiumAndroid::menuListArrowPadding):
1517         (WebCore): Retrieve the scrollbar down arrow's size via PlatformSupport.
1518         * rendering/RenderThemeChromiumAndroid.h: Override the menuListArrowPadding
1519             and platformActiveSelectionBackgroundColor methods, and add a static
1520             static RGBA32 color for the default active selection bg color.
1521         * rendering/RenderThemeChromiumSkia.cpp:
1522         (WebCore::RenderThemeChromiumSkia::menuListArrowPadding): Default to
1523             the scrollbar thickness, not changing behavior for non-Android.
1524         (WebCore::RenderThemeChromiumSkia::menuListInternalPadding): Instead
1525             of polling the scrollbar thickness, call menuListArrowPadding().
1526         * rendering/RenderThemeChromiumSkia.h: 
1527         (RenderThemeChromiumSkia): Add the menuListArrowPadding() as a protected method.
1528
1529 2012-06-11  David Barr  <davidbarr@chromium.org>
1530
1531         Add css3-images image-resolution (dppx only)
1532         https://bugs.webkit.org/show_bug.cgi?id=85332
1533
1534         Reviewed by Tony Chang.
1535
1536         The css3-images module is at candidate recommendation.
1537         http://www.w3.org/TR/2012/CR-css3-images-20120417/#image-resolution
1538
1539         Test: fast/css/image-resolution.html
1540
1541         * css/CSSComputedStyleDeclaration.cpp:
1542         (WebCore):
1543         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1544         * css/CSSGrammar.y:
1545         * css/CSSParser.cpp:
1546         (WebCore::CSSParser::validUnit):
1547         (WebCore::CSSParser::createPrimitiveNumericValue):
1548         (WebCore::unitFromString):
1549         (WebCore::CSSParser::parseValidPrimitive):
1550         (WebCore::CSSParser::parseValue):
1551         (WebCore):
1552         (WebCore::CSSParser::parseImageResolution):
1553         (WebCore::CSSParser::detectNumberToken):
1554         * css/CSSParser.h:
1555         * css/CSSPrimitiveValue.cpp:
1556         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1557         (WebCore::unitCategory):
1558         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
1559         (WebCore::CSSPrimitiveValue::customCssText):
1560         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1561         * css/CSSPrimitiveValue.h:
1562         * css/CSSProperty.cpp:
1563         (WebCore::CSSProperty::isInheritedProperty):
1564         * css/CSSPropertyNames.in:
1565         * css/StyleBuilder.cpp:
1566         (WebCore):
1567         (ApplyPropertyImageResolution):
1568         (WebCore::ApplyPropertyImageResolution::applyInheritValue):
1569         (WebCore::ApplyPropertyImageResolution::applyInitialValue):
1570         (WebCore::ApplyPropertyImageResolution::applyValue):
1571         (WebCore::ApplyPropertyImageResolution::createHandler):
1572         (WebCore::StyleBuilder::StyleBuilder):
1573         * css/StyleResolver.cpp:
1574         (WebCore::StyleResolver::collectMatchingRulesForList):
1575         * rendering/RenderImage.cpp:
1576         (WebCore::RenderImage::styleDidChange):
1577         (WebCore::RenderImage::imageDimensionsChanged):
1578         * rendering/style/RenderStyle.cpp:
1579         (WebCore::RenderStyle::diff):
1580         * rendering/style/RenderStyle.h:
1581         * rendering/style/StyleRareInheritedData.cpp:
1582         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1583         (WebCore::StyleRareInheritedData::operator==):
1584         * rendering/style/StyleRareInheritedData.h:
1585         (StyleRareInheritedData):
1586
1587 2012-06-05  Dana Jansens  <danakj@chromium.org>
1588
1589         [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
1590         https://bugs.webkit.org/show_bug.cgi?id=88371
1591
1592         Reviewed by James Robinson.
1593
1594         Unit test: CCLayerTreeHostImplTest.layersFreeTextures
1595
1596         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
1597         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
1598         (WebCore::CCIOSurfaceLayerImpl::willDraw):
1599
1600 2012-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1601
1602         Unreviewed. Fix make distcheck issues.
1603
1604         * GNUmakefile.am: Add idl files in editing dir to EXTRA_DIST.
1605         * GNUmakefile.list.am: Add missing header file.
1606
1607 2012-06-11  Dan Bernstein  <mitz@apple.com>
1608
1609         Reverted r119940 because it caused multiple media tests to fail on Lion.
1610
1611         * html/HTMLMediaElement.cpp:
1612         (WebCore::HTMLMediaElement::prepareForLoad):
1613         (WebCore):
1614         (WebCore::HTMLMediaElement::userCancelledLoad):
1615         * html/HTMLMediaElement.h:
1616         (HTMLMediaElement):
1617         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1618         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
1619
1620 2012-06-11  Zoltan Horvath  <zoltan@webkit.org>
1621
1622         [Qt] Add config tests for WEBP imagedecoder library, modify HAVE(decoderlibrary) to USE(...)$
1623         https://bugs.webkit.org/show_bug.cgi?id=87841
1624
1625         Reviewed by Simon Hausmann.
1626
1627         No new tests were needed.
1628
1629         * Target.pri:
1630         * WebCore.pri:
1631         * platform/image-decoders/ImageDecoder.cpp:
1632         (WebCore::ImageDecoder::create):
1633
1634 2012-06-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1635
1636         Add QML api for setting device width and height
1637         https://bugs.webkit.org/show_bug.cgi?id=88777
1638
1639         Reviewed by Simon Hausmann.
1640
1641         Change the default values for deviceWidth/Height to be 0 (unset). The
1642         original values were introduced by Qt and 0 makes it possible to
1643         detect if a value has never been set and therefore fall back.
1644
1645         Only Qt depended on the former values.
1646
1647         * page/Settings.cpp:
1648         (WebCore::Settings::Settings):
1649
1650 2012-06-11  Csaba Osztrogonác  <ossy@webkit.org>
1651
1652         [Qt][Win] Fix UString related build problem in Source/WebCore/bridge/qt/qt_instance.cpp
1653         https://bugs.webkit.org/show_bug.cgi?id=88310
1654
1655         Reviewed by Simon Hausmann.
1656
1657         * bridge/qt/qt_instance.cpp:
1658         (JSC::Bindings::QtInstance::getPropertyNames):
1659
1660 2012-06-11  Michael Brüning  <michael.bruning@nokia.com>
1661
1662         [Qt][WK2] Compute and set cache capacities using the current CacheModel
1663         https://bugs.webkit.org/show_bug.cgi?id=73918
1664
1665         Unreviewed build fix.
1666
1667         No new tests added as this is a build fix.
1668
1669         * platform/qt/FileSystemQt.cpp:
1670
1671 2012-06-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1672
1673         Rect-based hittesting doesn't work in tables.
1674         https://bugs.webkit.org/show_bug.cgi?id=86605
1675
1676         Reviewed by Julien Chaffraix.
1677
1678         The existing code only performed a single binary lookup for the central
1679         hit-test point. This meant area-based hit-testing did not work across
1680         table-cell borders. All cells spanned by a hit-test area must be hit
1681         tested.
1682
1683         This patch introduces three auxilary functions to help calculate rows
1684         and columns spanned by an rect. These are intended to also be used by
1685         repaint logic in a later patch.
1686
1687         For point-based hit-testing we maintain unchanged behavior and still
1688         only hit test a single column in a single row.
1689
1690         Test: fast/dom/nodesFromRect-table.html
1691
1692         * rendering/RenderTableSection.cpp:
1693         (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
1694         (WebCore::RenderTableSection::spannedRows):
1695         (WebCore::RenderTableSection::spannedColumns):
1696         (WebCore::RenderTableSection::nodeAtPoint):
1697         * rendering/RenderTableSection.h:
1698         (RenderTableSection):
1699
1700 2012-06-11  Min Qin  <qinmin@google.com>
1701
1702         Adding a flag to show fullscreen media controls in chromium
1703         https://bugs.webkit.org/show_bug.cgi?id=88266
1704
1705         Reviewed by Adam Barth.
1706
1707         The default chromium shadow DOM for media element does not contain fullscreen button.
1708         This change adds a flag to display the fullscreen button.
1709         It will be used by the android port.
1710
1711         No new tests needed. We will use the same layout tests as desktop chromium.
1712         However, new test result expections will be added later.
1713
1714         * html/shadow/MediaControlRootElementChromium.cpp:
1715         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
1716         (WebCore::MediaControlRootElementChromium::create):
1717         (WebCore::MediaControlRootElementChromium::setMediaController):
1718         (WebCore::MediaControlRootElementChromium::reset):
1719         (WebCore::MediaControlRootElementChromium::reportedError):
1720         * html/shadow/MediaControlRootElementChromium.h:
1721         (MediaControlRootElementChromium):
1722
1723 2012-06-11  Michael Brüning  <michael.bruning@nokia.com>
1724
1725         [Qt][WK2] Compute and set cache capacities using the current CacheModel
1726         https://bugs.webkit.org/show_bug.cgi?id=73918
1727
1728         Reviewed by Kenneth Rohde Christiansen.
1729
1730         No new tests needed / applicable (using operating system functionality).
1731
1732         Added method to read free file system space for a path to support cache model
1733         implementation in Qt WK 2.
1734
1735         * platform/FileSystem.h:
1736         (WebCore):
1737         * platform/qt/FileSystemQt.cpp:
1738         (WebCore::getVolumeFreeSizeForPath): Added for Qt ports.
1739         (WebCore):
1740
1741 2012-06-11  Peter Wang  <peter.wang@torchmobile.com.cn>
1742
1743         [JSC] Web Inspector: implement breaking from native callback
1744         https://bugs.webkit.org/show_bug.cgi?id=43332
1745
1746         Reviewed by Pavel Feldman.
1747
1748         These test cases were enabled:
1749         LayoutTests/inspector/debugger/dom-breakpoints.html
1750         LayoutTests/inspector/debugger/event-listener-breakpoints.html
1751         LayoutTests/inspector/debugger/step-through-event-listeners.html
1752         LayoutTests/inspector/debugger/xhr-breakpoints.html
1753
1754         * bindings/js/ScriptDebugServer.cpp:
1755         (WebCore::ScriptDebugServer::breakProgram):
1756         * bindings/js/ScriptDebugServer.h:
1757         (WebCore::supportsNativeBreakpoints):
1758
1759 2012-06-11  MORITA Hajime  <morrita@google.com>
1760
1761         Spellchecker crash in async scenario.
1762         https://bugs.webkit.org/show_bug.cgi?id=88617
1763
1764         Reviewed by Tony Chang.
1765
1766         SpellCheckRequest::invokeRequest() can be reached after the frame is detached.
1767         SpellCheckRequest should ignore such a request since TextCheckerClient is not available
1768         for detached Frames.
1769
1770         No new tests. It's hard to reproduce this.
1771
1772         * editing/SpellChecker.cpp:
1773         (WebCore::SpellChecker::invokeRequest):
1774
1775 2012-06-11  Ryuan Choi  <ryuan.choi@samsung.com>
1776
1777         [EFL] Extract CursorMap from WidgetEfl.cpp.
1778         https://bugs.webkit.org/show_bug.cgi?id=88633
1779
1780         Reviewed by Ryosuke Niwa.
1781
1782         In order to share CursorMap in WebKit/efl and UIProcess of WebKit2/Efl,
1783         extract it and expose getEcoreCursor.
1784
1785         No new tests, refactoring only.
1786
1787         * platform/efl/EflScreenUtilities.cpp:
1788         (WebCore):
1789         (CursorMap):
1790         (WebCore::CursorMap::cursor):
1791         (WebCore::CursorMap::CursorMap):
1792         (WebCore::getEcoreCursor):
1793         * platform/efl/EflScreenUtilities.h:
1794         (WebCore):
1795         * platform/efl/WidgetEfl.cpp:
1796         (WebCore::Widget::applyFallbackCursor):
1797
1798 2012-06-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1799
1800         Unreviewed, rolling out r119955.
1801         http://trac.webkit.org/changeset/119955
1802         https://bugs.webkit.org/show_bug.cgi?id=88758
1803
1804         Breaks Chromium compile - Chromium depends on removed API
1805         (Requested by dominicc on #webkit).
1806
1807         * WebCore.exp.in:
1808         * editing/Editor.cpp:
1809         (WebCore::Editor::insideVisibleArea):
1810         (WebCore):
1811         (WebCore::Editor::firstVisibleRange):
1812         (WebCore::Editor::lastVisibleRange):
1813         (WebCore::Editor::nextVisibleRange):
1814         (WebCore::Editor::rangeOfString):
1815         (WebCore::Editor::countMatchesForText):
1816         * editing/Editor.h:
1817         (Editor):
1818         * loader/FrameLoader.cpp:
1819         (WebCore::FrameLoader::findFrameForNavigation):
1820         * page/DOMWindow.cpp:
1821         (WebCore::DOMWindow::parent):
1822         (WebCore::DOMWindow::top):
1823         * page/EventHandler.cpp:
1824         (WebCore::EventHandler::hitTestResultAtPoint):
1825         * page/Frame.cpp:
1826         (WebCore::Frame::Frame):
1827         * page/Frame.h:
1828         (Frame):
1829         (WebCore::Frame::isDisconnected):
1830         (WebCore):
1831         (WebCore::Frame::setIsDisconnected):
1832         (WebCore::Frame::excludeFromTextSearch):
1833         (WebCore::Frame::setExcludeFromTextSearch):
1834         * page/FrameTree.cpp:
1835         (WebCore::FrameTree::parent):
1836         (WebCore::FrameTree::top):
1837         * page/FrameTree.h:
1838         (FrameTree):
1839         * page/Location.cpp:
1840         (WebCore::Location::ancestorOrigins):
1841         * xml/XMLTreeViewer.cpp:
1842         (WebCore::XMLTreeViewer::hasNoStyleInformation):
1843
1844 2012-06-08  Kinuko Yasuda  <kinuko@chromium.org>
1845
1846         Using BlobBuilder should show a deprecation warning message (if it is enabled)
1847         https://bugs.webkit.org/show_bug.cgi?id=88644
1848
1849         Reviewed by Jian Li.
1850
1851         Mac has already disabled BlobBuilder, but Chromium still has it.
1852         We should start showing a warning to let people migrate to using Blob constructor.
1853
1854         Tests: fast/files/blob-builder-crash.html
1855
1856         * fileapi/WebKitBlobBuilder.cpp:
1857         (WebCore):
1858         (WebCore::WebKitBlobBuilder::create):
1859         * fileapi/WebKitBlobBuilder.h:
1860         (WebCore):
1861         (WebKitBlobBuilder):
1862         * fileapi/WebKitBlobBuilder.idl:
1863
1864 2012-06-10  Sam Weinig  <sam@webkit.org>
1865
1866         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
1867         https://bugs.webkit.org/show_bug.cgi?id=88723
1868
1869         Reviewed by Dan Bernstein.
1870
1871         * WebCore.exp.in:
1872         Update export.
1873         * editing/Editor.cpp:
1874         (WebCore::Editor::rangeOfString):
1875         (WebCore::Editor::countMatchesForText):
1876         * editing/Editor.h:
1877         (Editor):
1878         * loader/FrameLoader.cpp:
1879         (WebCore::FrameLoader::findFrameForNavigation):
1880         * page/DOMWindow.cpp:
1881         (WebCore::DOMWindow::parent):
1882         (WebCore::DOMWindow::top):
1883         * page/EventHandler.cpp:
1884         (WebCore::EventHandler::hitTestResultAtPoint):
1885         * page/Frame.cpp:
1886         (WebCore::Frame::Frame):
1887         * page/Frame.h:
1888         (Frame):
1889         * page/FrameTree.cpp:
1890         (WebCore::FrameTree::parent):
1891         (WebCore::FrameTree::top):
1892         * page/FrameTree.h:
1893         (FrameTree):
1894         * page/Location.cpp:
1895         (WebCore::Location::ancestorOrigins):
1896         * xml/XMLTreeViewer.cpp:
1897         (WebCore::XMLTreeViewer::hasNoStyleInformation):
1898         Update for the removal of disconnected frames and text search exclusions concepts.
1899
1900 2012-06-07  Kinuko Yasuda  <kinuko@google.com>
1901
1902         Move Quota related code out of DOMWindow and into the quota/ folder
1903         https://bugs.webkit.org/show_bug.cgi?id=88512
1904
1905         Reviewed by Adam Barth.
1906
1907         No new tests: no visible changes.
1908
1909         * CMakeLists.txt:
1910         * DerivedSources.cpp:
1911         * DerivedSources.make:
1912         * DerivedSources.pri:
1913         * Modules/quota/DOMWindowQuota.cpp: Added.
1914         * Modules/quota/DOMWindowQuota.h: Added.
1915         * Modules/quota/DOMWindowQuota.idl: Added.
1916         * Modules/quota/StorageInfo.cpp: Renamed from Source/WebCore/storage/StorageInfo.cpp.
1917         * Modules/quota/StorageInfo.h: Renamed from Source/WebCore/storage/StorageInfo.h.
1918         * Modules/quota/StorageInfo.idl: Renamed from Source/WebCore/storage/StorageInfo.idl.
1919         * Modules/quota/StorageInfoErrorCallback.h: Renamed from Source/WebCore/storage/StorageInfoErrorCallback.h.
1920         * Modules/quota/StorageInfoErrorCallback.idl: Renamed from Source/WebCore/storage/StorageInfoErrorCallback.idl.
1921         * Modules/quota/StorageInfoQuotaCallback.h: Renamed from Source/WebCore/storage/StorageInfoQuotaCallback.h.
1922         * Modules/quota/StorageInfoQuotaCallback.idl: Renamed from Source/WebCore/storage/StorageInfoQuotaCallback.idl.
1923         * Modules/quota/StorageInfoUsageCallback.h: Renamed from Source/WebCore/storage/StorageInfoUsageCallback.h.
1924         * Modules/quota/StorageInfoUsageCallback.idl: Renamed from Source/WebCore/storage/StorageInfoUsageCallback.idl.
1925         * Target.pri:
1926         * WebCore.gyp/WebCore.gyp:
1927         * WebCore.gypi:
1928         * WebCore.pri:
1929         * WebCore.vcproj/WebCore.vcproj:
1930         * WebCore.vcproj/WebCoreCommon.vsprops:
1931         * WebCore.vcproj/copyForwardingHeaders.cmd:
1932         * WebCore.xcodeproj/project.pbxproj:
1933         * page/DOMWindow.cpp:
1934         * page/DOMWindow.h:
1935         * page/DOMWindow.idl:
1936
1937 2012-06-10  Hayato Ito  <hayato@chromium.org>
1938
1939         An inheritance of '-webkit-user-modify' does not stop at shadow boundary.
1940         https://bugs.webkit.org/show_bug.cgi?id=88514
1941
1942         Reviewed by Ryosuke Niwa.
1943
1944         In StyleResolver::styleForElement(), we reset '-webkit-user-modify'
1945         CSS property after inheriting a parent style, but that is not
1946         enough.  We also have to reset '-webkit-user-modify' when we use a
1947         cached result in applying matched properties.
1948
1949         Test: fast/dom/shadow/user-modify-inheritance.html
1950
1951         * css/StyleResolver.cpp:
1952         (WebCore::StyleResolver::applyMatchedProperties):
1953         (WebCore::StyleResolver::styleForElement):
1954         * css/StyleResolver.h:
1955         (StyleResolver):
1956         * rendering/style/RenderStyle.cpp:
1957         (WebCore::RenderStyle::inheritFrom):
1958         * rendering/style/RenderStyle.h:
1959
1960 2012-06-10  Yoshifumi Inoue  <yosin@chromium.org>
1961
1962         [Forms] Introduce Decimal behind the InputNumber type
1963         https://bugs.webkit.org/show_bug.cgi?id=88383
1964
1965         Reviewed by Kent Tamura.
1966
1967         This patch introduces decimal arithmetic for steppable input types,
1968         e.g. date, datetime, number, range, and so on, to avoid rounding error
1969         caused by base 2 floating point representation, e.g. C/C++ double type.
1970
1971         Most of decimal arithmetic calculations are implemented in StepRange
1972         class, replacing "double" with "Decimal", InputType::applyStep, and
1973         InputType::stepFromRenderer.
1974
1975         Changes introduced by this patch are still intermediate state.
1976         Following patch will replace InputNumber type to Decimal type for
1977         completion of introducing decimal arithmetic.
1978
1979         Test: fast/forms/range/range-value-rounding.html
1980
1981         * html/BaseDateAndTimeInputType.cpp:
1982         (WebCore::BaseDateAndTimeInputType::serialize): Changed for Decimal type.
1983         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): ditto.
1984         * html/DateInputType.cpp:
1985         (WebCore::DateInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber.
1986         * html/DateTimeInputType.cpp:
1987         (WebCore::DateTimeInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber.
1988         * html/DateTimeLocalInputType.cpp:
1989         (WebCore::DateTimeLocalInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber.
1990         * html/InputType.cpp:
1991         (WebCore::InputType::rangeUnderflow): Changed for Decimal type.
1992         (WebCore::InputType::rangeOverflow): Changed for Decimal type.
1993         (WebCore::InputType::minimum): Changed for Decimal type.
1994         (WebCore::InputType::maximum): ditto.
1995         (WebCore::InputType::isInRange): ditto.
1996         (WebCore::InputType::isOutOfRange): ditto.
1997         (WebCore::InputType::stepMismatch): ditto.
1998         (WebCore::InputType::validationMessage): ditto.
1999         (WebCore::InputType::parseToNumberOrNaN): ditto.
2000         (WebCore::InputType::applyStep): ditto.
2001         (WebCore::InputType::stepUpFromRenderer): ditto.
2002         * html/InputType.h:
2003         (InputType): Removed parseToNumberWIthDecimaplPlaces.
2004         * html/MonthInputType.cpp:
2005         (WebCore::MonthInputType::createStepRange): Changed for Decimal type.
2006         * html/NumberInputType.cpp:
2007         (WebCore::RealNumberRenderSize): Added for calculateRenderSize.
2008         (WebCore::calculateRenderSize): Added. This function replacess lengthBeforeDecimalPoint.
2009         (WebCore::NumberInputType::createStepRange): Changed for Decimal type.
2010         (WebCore::NumberInputType::sizeShouldIncludeDecoration): Changed to use calculateRenderSize.
2011         (WebCore::NumberInputType::parseToNumber): Changed for Decimal type.
2012         (WebCore::NumberInputType::serialize): ditto.
2013         * html/NumberInputType.h:
2014         (NumberInputType): Removed parseToNumberWIthDecimaplPlaces.
2015         * html/RangeInputType.cpp:
2016         (WebCore::RangeInputType::createStepRange): Changed for Decimal type.
2017         (WebCore::RangeInputType::handleKeydownEvent): ditto.
2018         (WebCore::RangeInputType::parseToNumber): ditto.
2019         (WebCore::RangeInputType::serialize): ditto.
2020         * html/StepRange.cpp:
2021         (WebCore::StepRange::StepRange): Removed decimal places and changed for Decimal type.
2022         (WebCore::StepRange::acceptableError): Changed for Decimal type.
2023         (WebCore::StepRange::alignValueForStep): ditto.
2024         (WebCore::StepRange::clampValue): Changed for Decimal type and std::min/max.
2025         (WebCore::StepRange::parseStep): Changed for Decimal type and removed NumberWithDecimalPlaces.
2026         (WebCore::StepRange::stepMismatch): Changed for Decimal type.
2027         (WebCore::convertDoubleToInputNumber): Changed to real implementation.
2028         (WebCore::convertInputNumberToDouble):  Changed to real implementation.
2029         * html/StepRange.h:
2030         (InputNumber): Replacement of NumberWithDecimalPlaces.
2031         (WebCore::StepRange::InputNumber::InputNumber):
2032         * html/TimeInputType.cpp:
2033         (WebCore::TimeInputType::createStepRange): Changed for Decimal type.
2034         * html/WeekInputType.cpp:
2035         (WebCore::WeekInputType::createStepRange): Changed for Decimal type.
2036         * html/parser/HTMLParserIdioms.cpp:
2037         (WebCore::serializeForNumberType): Added Decimal version.
2038         (WebCore::parseToDecimalForNumberType): Added.
2039         * html/parser/HTMLParserIdioms.h: Updated comments for parseToDoubleForNumberType.
2040         * html/shadow/SliderThumbElement.cpp:
2041         (WebCore::sliderPosition): Changed for Decimal type.
2042
2043 2012-06-10  Jason Liu  <jason.liu@torchmobile.com.cn>
2044
2045         [BlackBerry] Possible to clobber httponly cookie.
2046         https://bugs.webkit.org/show_bug.cgi?id=86067
2047
2048         Reviewed by Rob Buis.
2049
2050         If a cookie is set by javaScript and there is already a same httpOnly cookie in cookieManager,
2051         we should reject it. If it has a httpOnly property, we reject it, too.
2052
2053         Test: http/tests/cookies/js-get-and-set-http-only-cookie.html
2054
2055         * platform/blackberry/CookieJarBlackBerry.cpp:
2056         (WebCore::setCookies):
2057         * platform/blackberry/CookieManager.cpp:
2058         (WebCore::CookieManager::setCookies):
2059         (WebCore::CookieManager::checkAndTreatCookie):
2060         (WebCore::CookieManager::addCookieToMap):
2061         (WebCore::CookieManager::setPrivateMode):
2062         * platform/blackberry/CookieManager.h:
2063         * platform/blackberry/CookieMap.cpp:
2064         (WebCore::CookieMap::addOrReplaceCookie):
2065         (WebCore::CookieMap::removeCookie):
2066         * platform/blackberry/CookieMap.h:
2067         (CookieMap):
2068
2069 2012-06-10  Pablo Flouret  <pablof@motorola.com>
2070
2071         Access control allow lists starting with a comma are parsed incorrectly (CORS)
2072         https://bugs.webkit.org/show_bug.cgi?id=88461
2073
2074         Reviewed by Adam Barth.
2075
2076         The parsing algorithm would stop parsing at the first comma (being an
2077         empty entry, of sorts) and bail out, effectively ignoring the whole
2078         header.
2079
2080         Test: http/tests/xmlhttprequest/access-control-allow-lists-starting-with-comma.html
2081
2082         * loader/CrossOriginPreflightResultCache.cpp:
2083         (WebCore::parseAccessControlAllowList):
2084
2085 2012-06-10  Darin Adler  <darin@apple.com>
2086
2087         Some additional tweaks to keep TreeShared code simple/clean
2088         https://bugs.webkit.org/show_bug.cgi?id=88738
2089
2090         Reviewed by Adam Barth.
2091
2092         * platform/TreeShared.h: Make constructor and destructor both protected.
2093         It's slightly dangerous to have a public non-virtual destructor, and there
2094         is no reason it needs to be public.
2095         (WebCore::TreeShared::~TreeShared): Make debug-only destructor non-virtual;
2096         we were getting no value from it being virtual. Now that it's non-virtual,
2097         there is no need to use an #if on it since it's an empty inline destructor
2098         in non-debug builds.
2099
2100 2012-06-06  Jer Noble  <jer.noble@apple.com>
2101
2102         REGRESSION: Setting invalid media "src" does not cause "error" event
2103         https://bugs.webkit.org/show_bug.cgi?id=88423
2104
2105         Reviewed by Eric Carlson.
2106
2107         Test: http/tests/media/video-src-invalid-error.html
2108
2109         Two problems here.  When the loadTimer is scheduled, the m_pendingLoadFlags
2110         variable is set to specify what type of load is scheduled.  It is cleared
2111         when the loadTimer fires. But, when prepareForLoad() stops the loadTimer,
2112         it does not clear the m_pendingLoadFlags variable, so the next time
2113         scheduleLoad() is called (when the src is changed to an invalid URL)
2114         prepareForLoad() is not called again.
2115
2116         Second problem: Due to a bug in QTKit (<rdar://problem/11606415>), the
2117         QTMovieLoadStateChangedNotification is never fired for an invalid http
2118         URL if QTMovieOpenAsyncRequiredAttribute:YES is not passed when creating
2119         the QTMovie.
2120
2121         Add a new utility method which both stops the m_loadTimer and clears the 
2122         m_pendingLoadFlags, and use it in all the places where m_loadTimer was 
2123         stopped explicitly:
2124
2125         * html/HTMLMediaElement.cpp:
2126         (WebCore::HTMLMediaElement::prepareForLoad):
2127         (WebCore::HTMLMediaElement::stopLoadTimer): Added
2128         (WebCore::HTMLMediaElement::userCancelledLoad):
2129         * html/HTMLMediaElement.h:
2130
2131         And pass QTMovieOpenAsyncRequiredAttribute:YES when creating the QTMovie:
2132
2133         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2134         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
2135
2136 2012-06-06  Jer Noble  <jer.noble@apple.com>
2137
2138         Add logging functions to MediaPlayerPrivateQTKit.
2139         https://bugs.webkit.org/show_bug.cgi?id=88425
2140
2141         Reviewed by Eric Carlson.
2142
2143         No new tests; adds logging functions to aide debugging.
2144
2145         MediaPlayerPrivateQTKit should emit the same kind of logging messages as 
2146         other MediaPlayerPrivate engines to aide in debugging.
2147
2148         Distinguish between loadedRangesChanged() and loadStateChanged() for logging
2149         purposes:
2150         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2151         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2152         (WebCore::MediaPlayerPrivateQTKit::loadedRangesChanged):
2153         (-[WebCoreMovieObserver loadedRangesChanged:]):
2154
2155         Add LOG messages for each of the following functions:
2156         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2157         (WebCore::MediaPlayerPrivateQTKit::~MediaPlayerPrivateQTKit):
2158         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
2159         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
2160         (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView):
2161         (WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
2162         (WebCore::MediaPlayerPrivateQTKit::destroyQTVideoRenderer):
2163         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
2164         (WebCore::MediaPlayerPrivateQTKit::destroyQTMovieLayer):
2165         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
2166         (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
2167         (WebCore::MediaPlayerPrivateQTKit::load):
2168         (WebCore::MediaPlayerPrivateQTKit::prepareToPlay):
2169         (WebCore::MediaPlayerPrivateQTKit::play):
2170         (WebCore::MediaPlayerPrivateQTKit::pause):
2171         (WebCore::MediaPlayerPrivateQTKit::seek):
2172         (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
2173         (WebCore::MediaPlayerPrivateQTKit::setVolume):
2174         (WebCore::MediaPlayerPrivateQTKit::setRate):
2175         (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
2176         (WebCore::MediaPlayerPrivateQTKit::cancelLoad):
2177         (WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
2178         (WebCore::MediaPlayerPrivateQTKit::updateStates):
2179         (WebCore::MediaPlayerPrivateQTKit::loadStateChanged):
2180         (WebCore::MediaPlayerPrivateQTKit::rateChanged):
2181         (WebCore::MediaPlayerPrivateQTKit::sizeChanged):
2182         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2183         (WebCore::MediaPlayerPrivateQTKit::didEnd):
2184         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache):
2185         (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite):
2186         (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks):
2187
2188 2012-06-07  Jer Noble  <jer.noble@apple.com>
2189
2190         WebCore should use a single definition of an invalid media time.
2191         https://bugs.webkit.org/show_bug.cgi?id=88572
2192
2193         Reviewed by Eric Carlson.
2194
2195         No new tests; no change in functionality, so covered by existing tests.
2196
2197         Add a new, universal definition for an invalid media time:
2198         * platform/graphics/MediaPlayer.h:
2199         (WebCore::MediaPlayer::invalidTime):
2200
2201         Use this new definition instead of the hodge podge of (identical) local
2202         definitions for an invalid media time:
2203         * html/HTMLMediaElement.cpp:
2204         (WebCore::HTMLMediaElement::HTMLMediaElement):
2205         (WebCore::HTMLMediaElement::invalidateCachedTime):
2206         (WebCore::HTMLMediaElement::currentTime):
2207         (WebCore::HTMLMediaElement::initialTime):
2208         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
2209         (WebCore::HTMLMediaElement::prepareMediaFragmentURI):
2210         (WebCore::HTMLMediaElement::applyMediaFragmentURI):
2211         * html/MediaFragmentURIParser.cpp:
2212         (WebCore::MediaFragmentURIParser::invalidTimeValue):
2213         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
2214         (WebCore::MediaFragmentURIParser::startTime):
2215         (WebCore::MediaFragmentURIParser::endTime):
2216         (WebCore::MediaFragmentURIParser::parseTimeFragment):
2217         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2218         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2219         (WebCore::MediaPlayerPrivateAVFoundation::duration):
2220         (WebCore::MediaPlayerPrivateAVFoundation::seeking):
2221         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
2222         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
2223         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2224         (MediaPlayerPrivateAVFoundation):
2225         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2226         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2227         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2228         (WebCore::MediaPlayerPrivateQTKit::duration):
2229         (WebCore::MediaPlayerPrivateQTKit::updateStates):
2230         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2231
2232 2012-06-10  Darin Adler  <darin@apple.com>
2233
2234         Remove unneeded callRemovedLastRef function from TreeShared refactoring
2235         https://bugs.webkit.org/show_bug.cgi?id=88653
2236
2237         Reviewed by Sam Weinig.
2238
2239         * WebCore.exp.in: Updated to remove callRemovedLastRef and add removedLastRef.
2240
2241         * dom/ContainerNode.cpp: Removed callRemovedLastRef, which is no longer
2242         needed and also had a bad cast in it.
2243
2244         * dom/Document.h: Made removedLastRef private and non-virtual and made Node
2245         a friend so it can call the private function.
2246
2247         * dom/Node.cpp:
2248         (WebCore::Node::removedLastRef): Moved here. This should not be an inline
2249         function. Added comments explaining why it should not be inlined. Also added
2250         explicit code to call to Document::removedLastRef, and added a comment why
2251         that's the right thing to do here.
2252         * dom/Node.h: Inherit from TreeShared<Node, ContainerNode>. Made the
2253         removedLastRef function non-virtual and removed it from the header file.
2254         Updated TreeShared using statements. Made the TreeShared template class a
2255         friend so it can call the private removedLastRef.
2256
2257         * html/HTMLFormControlElement.h: Updated TreeShared using statements to specify
2258         Node instead, which accomplishes the same thing.
2259         * html/HTMLObjectElement.h: Ditto.
2260
2261         * platform/TreeShared.h: Made TreeShared take two template arguments for the
2262         node type and the parent node type. Removed the callRemovedLastRef functions and
2263         the extra forward declarations it required. Removed the private unused
2264         removedLastRef function; not sure why it was left in here at all.
2265         (WebCore::TreeShared::deref): Call removedLastRef instead of callRemovedLastRef.
2266         (WebCore::TreeShared::setParent): Use ParentNodeType.
2267         (WebCore::TreeShared::parent): Ditto.
2268         (WebCore::adopted): Updated to have both template arguments.
2269
2270         * svg/SVGElementInstance.cpp:
2271         (WebCore::SVGElementInstance::removedLastRef): Replaced callRemovedLastRef with
2272         this. Moved the body out of the header and added a comment explaining why the
2273         function should not be inlined.
2274         * svg/SVGElementInstance.h: Made removedLastRef non-virtual, non-inline, and
2275         private. Made TreeShared a friend so it can call the private removedLastRef.
2276         Updated TreeShared using statements.
2277
2278 2012-06-10  Darin Adler  <darin@apple.com>
2279
2280         * WebCore.exp.in: Re-sorted and alphabetized the file.
2281
2282 2012-06-10  Balazs Kelemen  <kbalazs@webkit.org>
2283
2284         [Qt][Win] Fix building Source/WebCore/plugins/win/PluginViewWin.cpp
2285         https://bugs.webkit.org/show_bug.cgi?id=88308
2286
2287         Reviewed by Simon Hausmann.
2288
2289         No new tests, just a build fix.
2290
2291         Use ownerWindow() from page client. It has been
2292         introduced for x11 plugins to solve exactly the
2293         same problem.
2294
2295         * plugins/win/PluginViewWin.cpp:
2296         (windowHandleForPageClient):
2297
2298 2012-06-10  Balazs Kelemen  <kbalazs@webkit.org>
2299
2300         [Qt][Win] Fix building ImageQt.cpp
2301         https://bugs.webkit.org/show_bug.cgi?id=88306
2302
2303         Reviewed by Simon Hausmann.
2304
2305         No new tests, this is just a build fix.
2306
2307         * platform/graphics/qt/ImageQt.cpp:
2308         (WebCore):
2309         (WebCore::BitmapImage::create):
2310         Adapt to the "API" changes in Qt.
2311
2312 2012-06-09  Gregg Tavares  <gman@google.com>
2313
2314         Make WebGL mark draws for compositing even if the draw count is zero
2315         https://bugs.webkit.org/show_bug.cgi?id=88718
2316
2317         Reviewed by Kenneth Russell.
2318
2319         No new tests as no new functionality.
2320
2321         * html/canvas/WebGLRenderingContext.cpp:
2322         (WebCore):
2323         (WebCore::WebGLRenderingContext::drawArrays):
2324         (WebCore::WebGLRenderingContext::drawElements):
2325
2326 2012-06-09  Dominic Cooney  <dominicc@chromium.org>
2327
2328         [Chromium] Remove JavaScriptCore dependencies from gyp
2329         https://bugs.webkit.org/show_bug.cgi?id=88510
2330
2331         Reviewed by Adam Barth.
2332
2333         Chromium doesn't support JSC any more and there doesn't seem to be
2334         a strong interest in using GYP as the common build system in other
2335         ports.
2336
2337         No new functionality => No new tests.
2338
2339         * gyp/WebCore.gyp: Removed.
2340         * gyp/copy-forwarding-and-icu-headers.sh: Removed.
2341         * gyp/copy-inspector-resources.sh: Removed.
2342         * gyp/generate-derived-sources.sh: Removed.
2343         * gyp/generate-webcore-export-file-generator.sh: Removed.
2344         * gyp/gtk.gyp: Removed.
2345         * gyp/run-if-exists.sh: Removed.
2346         * gyp/streamline-inspector-source.sh: Removed.
2347         * gyp/update-info-plist.sh: Removed.
2348
2349 2012-06-07  Darin Adler  <darin@apple.com>
2350
2351         Refactor and improve code style in TextResourceDecoder to prepare for buffering improvement
2352         https://bugs.webkit.org/show_bug.cgi?id=88566
2353
2354         Reviewed by Alexey Proskuryakov.
2355
2356         * loader/TextResourceDecoder.cpp:
2357         (WebCore::bytesEqual): Added helper function to make comparing against sequences of bytes
2358         easier to read at the call site.
2359         (WebCore::KanjiCode::judge): Changed to use bytesEqual in a few places, merged multiple if
2360         statements, got rid of else after goto.
2361         (WebCore::TextResourceDecoder::checkForCSSCharset): Changed to use early return instead of
2362         nesting the whole function. Changed to use bytesEqual.
2363         (WebCore::skipComment): Changed to use early return for more cases. Changed to use bytesEqual.
2364         (WebCore::TextResourceDecoder::checkForHeadCharset): Changed to use bytesEqual.
2365         (WebCore::TextResourceDecoder::decode): Changed to use emptyString() instead of "", since
2366         the former is more efficient.
2367
2368 2012-06-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2369
2370         Unreviewed, rolling out r118618 and r119353.
2371         http://trac.webkit.org/changeset/118618
2372         http://trac.webkit.org/changeset/119353
2373         https://bugs.webkit.org/show_bug.cgi?id=88720
2374
2375         Caused at least 30 different crashes on ClusterFuzz (Requested
2376         by inferno-sec on #webkit).
2377
2378         * loader/SubresourceLoader.cpp:
2379         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
2380         * loader/cache/CachedCSSStyleSheet.cpp:
2381         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
2382         * loader/cache/CachedFont.cpp:
2383         (WebCore::CachedFont::allClientsRemoved):
2384         * loader/cache/CachedFont.h:
2385         (WebCore::CachedFontClient::resourceClientType):
2386         * loader/cache/CachedImage.cpp:
2387         (WebCore::CachedImage::removeClientForRenderer):
2388         (WebCore):
2389         (WebCore::CachedImage::allClientsRemoved):
2390         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2391         * loader/cache/CachedImage.h:
2392         (CachedImage):
2393         (WebCore::CachedImageClient::resourceClientType):
2394         * loader/cache/CachedRawResource.cpp:
2395         (WebCore::CachedRawResource::allClientsRemoved):
2396         (WebCore):
2397         * loader/cache/CachedRawResource.h:
2398         (CachedRawResource):
2399         (WebCore::CachedRawResourceClient::resourceClientType):
2400         * loader/cache/CachedResource.cpp:
2401         (WebCore::CachedResource::removeClient):
2402         * loader/cache/CachedResource.h:
2403         (WebCore::CachedResource::allClientsRemoved):
2404         * loader/cache/CachedResourceClient.h:
2405         (WebCore::CachedResourceClient::resourceClientType):
2406         * loader/cache/CachedSVGDocument.h:
2407         (WebCore::CachedSVGDocumentClient::resourceClientType):
2408         * loader/cache/CachedScript.cpp:
2409         (WebCore::CachedScript::allClientsRemoved):
2410         * loader/cache/CachedStyleSheetClient.h:
2411         (WebCore::CachedStyleSheetClient::resourceClientType):
2412         * rendering/style/StyleCachedImage.cpp:
2413         (WebCore::StyleCachedImage::removeClient):
2414         * rendering/style/StyleCachedImageSet.cpp:
2415         (WebCore::StyleCachedImageSet::removeClient):
2416         * svg/graphics/SVGImageCache.cpp:
2417         (WebCore::SVGImageCache::~SVGImageCache):
2418         (WebCore::SVGImageCache::removeRendererFromCache):
2419         (WebCore::SVGImageCache::setRequestedSizeAndScales):
2420         (WebCore::SVGImageCache::requestedSizeAndScales):
2421         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
2422         * svg/graphics/SVGImageCache.h:
2423         (WebCore):
2424         (SVGImageCache):
2425
2426 2012-06-09  Florin Malita  <fmalita@chromium.org>
2427
2428         Fixed-position foreignObject descendants should be relative to the foreignObject viewport
2429         https://bugs.webkit.org/show_bug.cgi?id=88547
2430
2431         Reviewed by Abhishek Arya.
2432
2433         Tests: svg/foreignObject/fO-fixed-position-crash.html
2434                svg/foreignObject/fixed-position-expected.svg
2435                svg/foreignObject/fixed-position.svg
2436
2437         Fixed position elements are currently registered with the top level
2438         RenderView even when embedded within an SVG foreignOject. This patch
2439         changes containingBlock() & container() to return the containing
2440         foreignObject renderer instead.
2441
2442         The new foreignObject fixed position behavior matches that of current
2443         FireFox and Opera versions and is consistent with the spec:
2444         http://www.w3.org/TR/CSS2/visuren.html#fixed-positioning
2445         http://www.w3.org/TR/SVG/coords.html#EstablishingANewViewport
2446
2447         * rendering/RenderObject.cpp:
2448         (WebCore::RenderObject::containingBlock):
2449         (WebCore::RenderObject::container):
2450
2451 2012-06-09  Adam Barth  <abarth@webkit.org>
2452
2453         Can't use eval in iframes sanbdoxed via CSP header
2454         https://bugs.webkit.org/show_bug.cgi?id=88450
2455
2456         Reviewed by Mihai Parparita.
2457
2458         The initial empty document in a frame inherits the security context of
2459         its parent (including the CSP policy).  When we load the real document,
2460         in some cases we'll do a "secure transition" to the new document.  That
2461         means that we leave the global object in place in case the parent
2462         document has created any properties that it expects will be visible to
2463         the new document.
2464
2465         If the parent document has a CSP policy that blocks eval, the "no eval"
2466         bit will be set on the global object of the initial document.  When we
2467         perform a "secure transition" to the new document, we'll keep the bit,
2468         which is wrong.  In this patch, we reset the bit by always enabling
2469         eval when clearing the context, regardless of whether we're performing
2470         a "secure transition".
2471
2472         Test: http/tests/security/contentSecurityPolicy/iframe-inside-csp.html
2473
2474         * bindings/js/ScriptController.cpp:
2475         (WebCore::ScriptController::enableEval):
2476         (WebCore):
2477         * bindings/js/ScriptController.h:
2478         (ScriptController):
2479         * bindings/v8/ScriptController.cpp:
2480         (WebCore::ScriptController::enableEval):
2481         (WebCore):
2482         (WebCore::ScriptController::disableEval):
2483         * bindings/v8/ScriptController.h:
2484         (ScriptController):
2485         * loader/FrameLoader.cpp:
2486         (WebCore::FrameLoader::clear):
2487
2488 2012-06-09  Pablo Flouret  <pablof@motorola.com>
2489
2490         The value in Access-Control-Allow-Origin is not being matched correctly for CORS-enabled requests
2491         https://bugs.webkit.org/show_bug.cgi?id=88139
2492
2493         Reviewed by Adam Barth.
2494
2495         Compare a request's origin with the value given in any
2496         Access-Control-Allow-Origin headers in an exact, case-sensitive manner,
2497         instead of using SecurityOrigin::isSameSchemeHostPort(). Per step 3 of
2498         the resource sharing check algorithm in
2499         http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#resource-sharing-check
2500
2501         Test: http/tests/xmlhttprequest/origin-exact-matching.html
2502
2503         * loader/CrossOriginAccessControl.cpp:
2504         (WebCore::passesAccessControlCheck):
2505
2506 2012-06-09  Huang Dongsung  <luxtella@company100.net>
2507
2508         [Qt][Texmap] All layers with backingStore are opaque when using TextureMapperGL.
2509         https://bugs.webkit.org/show_bug.cgi?id=88703
2510
2511         The bug originated from StillImage that is not override
2512         Image::currentFrameHasAlpha(), so it always returns false.
2513         StillImage is used by ImageBuffer, and if Texmap draws contents on ImageBuffer,
2514         TextureMapperBackingStore thinks contents does not have alpha.
2515
2516         Covered by existing compositing tests.
2517
2518         Reviewed by Noam Rosenthal.
2519
2520         * platform/graphics/qt/StillImageQt.cpp:
2521         (WebCore::StillImage::currentFrameHasAlpha):
2522         (WebCore):
2523         * platform/graphics/qt/StillImageQt.h:
2524         (StillImage):
2525
2526 2012-06-09  Victor Carbune  <victor@rosedu.org>
2527
2528         Basic support for timestamps within a TextTrackCue
2529         https://bugs.webkit.org/show_bug.cgi?id=88187
2530
2531         Implemented support for timestamps within a TextTrackCue.
2532         This enables rendering functionality for Karaoke and Paint-on captions.
2533
2534         Reviewed by Eric Carlson.
2535
2536         Test: media/track/track-cue-rendering-inner-timestamps.html
2537
2538         * css/mediaControls.css: Remove the background shadow pseudo-id and
2539         added two others, which can be further used for styling past / future
2540         contents of the cue.
2541         (video::-webkit-media-text-track-past-nodes): Used to style elements
2542         within the cue that are before the current movie time.
2543         (video::-webkit-media-text-track-future-nodes): Used to style elements
2544         within the cue that are after the current movie time.
2545         * html/HTMLMediaElement.cpp:
2546         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Regardless of whether
2547         the active set changed or not, the current cues need to be informed of the current
2548         movie time.
2549         * html/track/TextTrackCue.cpp:
2550         (WebCore::TextTrackCue::TextTrackCue): Initiliazed past and future containers.
2551         (WebCore::TextTrackCue::getCueAsHTML): Checked whether the current cue text has
2552         inner timestamps or not, in order to render faster if no timestamps are there.
2553         (WebCore::TextTrackCue::updateDisplayTree): Added method that keeps the past and future
2554         containers up to date, given a current movie time.
2555         (WebCore):
2556         (WebCore::TextTrackCue::getDisplayTree): Replaced the cue background container with the
2557         past cues container. The *internal* display tree of the cue now has two containers,
2558         representing past and future elements.
2559         * html/track/TextTrackCue.h: Added several variables to support the new functionality.
2560         (TextTrackCue):
2561         * html/track/WebVTTParser.cpp:
2562         (WebCore::WebVTTParser::constructTreeFromToken): Updated representation for this patch.
2563         * html/track/WebVTTParser.h:
2564         (WebVTTParser): Made public the collectTimeStamp method, as this is required for
2565         parsing timestamps within a cue as well.
2566
2567 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
2568
2569         Web Inspector: Open links in Sources panel by default and fallback to Resources and Network panel otherwise.
2570         https://bugs.webkit.org/show_bug.cgi?id=88710
2571
2572         Reviewed by Pavel Feldman.
2573
2574         * inspector/front-end/inspector.js:
2575         (WebInspector.documentClick.followLink):
2576         (WebInspector.documentClick):
2577         (WebInspector._showAnchorLocation):
2578
2579 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
2580
2581         Web Inspector: Only expand root domain in Sources/Scripts panel
2582         https://bugs.webkit.org/show_bug.cgi?id=88135
2583
2584         Reviewed by Pavel Feldman.
2585
2586         * inspector/front-end/NavigatorView.js:
2587         (WebInspector.NavigatorTreeOutline._treeElementsCompare.compare.typeWeight):
2588         (WebInspector.NavigatorTreeOutline._treeElementsCompare):
2589         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
2590
2591 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
2592
2593         Web Inspector: Pretty print should respect text editor indent setting.
2594         https://bugs.webkit.org/show_bug.cgi?id=88713
2595
2596         Reviewed by Pavel Feldman.
2597
2598         * inspector/front-end/ScriptFormatter.js:
2599
2600 2012-06-09  Dan Bernstein  <mitz@apple.com>
2601
2602         Fixed the build after r119895.
2603
2604         * WebCore.xcodeproj/project.pbxproj:
2605
2606 2012-06-09  Andrey Kosyakov  <caseq@chromium.org>
2607
2608         Web Inspector: [refactoring] rename TimelineVerticalOverview into TimelineFrameOverview
2609         https://bugs.webkit.org/show_bug.cgi?id=88708
2610
2611         Reviewed by Vsevolod Vlasov.
2612
2613         - rename TimelineVerticalOverview to TimelineFrameOverview;
2614         - rename associated fields, parameters, CSS classes etc;
2615         - rename overview mode designators to match the UI;
2616         - drop unused CSS rules for old-style mode selector;
2617
2618         * inspector/front-end/TimelineOverviewPane.js:
2619         (WebInspector.TimelineOverviewPane):
2620         (WebInspector.TimelineOverviewPane.prototype._showEvents):
2621         (WebInspector.TimelineOverviewPane.prototype._showFrames):
2622         (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
2623         (WebInspector.TimelineOverviewPane.prototype._setFrameMode):
2624         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
2625         (WebInspector.TimelineOverviewPane.prototype._update):
2626         (WebInspector.TimelineOverviewPane.prototype.addFrame):
2627         (WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
2628         (WebInspector.TimelineOverviewPane.prototype._reset):
2629         (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
2630         (WebInspector.TimelineFrameOverview):
2631         * inspector/front-end/TimelinePanel.js:
2632         (WebInspector.TimelinePanel):
2633         (WebInspector.TimelinePanel.prototype._shouldShowFrames):
2634         (WebInspector.TimelinePanel.prototype.revealRecordAt):
2635         * inspector/front-end/timelinePanel.css:
2636         (.timeline-frame-overview #timeline-overview-grid):
2637         (.timeline-frame-overview .timeline-overview-window):
2638         (.timeline-frame-overview .timeline-overview-dividers-background):
2639         (.timeline-frame-overview #timeline-overview-memory):
2640         (.timeline-frame-overview-status-bar-item.toggled-on .glyph):
2641         (.timeline-frame-overview-bars):
2642         (.timeline.timeline-frame-overview .resources-divider):
2643         (.sidebar-tree-item .timeline-frame-overview-status-bar-item):
2644
2645 2012-06-08  Vsevolod Vlasov  <vsevik@chromium.org>
2646
2647         IndexedDB: Inspector should handle null, string, and array keyPaths
2648         https://bugs.webkit.org/show_bug.cgi?id=84303
2649
2650         Reviewed by Pavel Feldman.
2651
2652         Supported different key path types and updated tests to cover each case.
2653         Key path strings are now highlighted in the DataGrid column headers.
2654
2655         * inspector/Inspector.json:
2656         * inspector/InspectorIndexedDBAgent.cpp:
2657         (WebCore):
2658         * inspector/front-end/IndexedDBModel.js:
2659         (WebInspector.IndexedDBModel.idbKeyPathFromKeyPath):
2660         (WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath):
2661         (WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
2662         (WebInspector.IndexedDBModel.prototype._loadDatabase):
2663         (WebInspector.IndexedDBModel.ObjectStore.prototype.get keyPathString):
2664         (WebInspector.IndexedDBModel.Index.prototype.get keyPathString):
2665         * inspector/front-end/IndexedDBViews.js:
2666         (WebInspector.IDBDataView.prototype._createDataGrid):
2667         (WebInspector.IDBDataView.prototype._keyColumnHeaderFragment):
2668         (WebInspector.IDBDataView.prototype._keyPathStringFragment):
2669         (WebInspector.IDBDataGridNode.prototype.createCell):
2670         * inspector/front-end/ResourcesPanel.js:
2671         (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
2672         (WebInspector.IDBIndexTreeElement.prototype._updateTooltip):
2673
2674 2012-06-08  Vsevolod Vlasov  <vsevik@chromium.org>
2675
2676         Web Inspector: Increase size limits for resource content cached in InspectorResourceAgent.
2677         https://bugs.webkit.org/show_bug.cgi?id=88674
2678
2679         Reviewed by Pavel Feldman.
2680
2681         * inspector/NetworkResourcesData.cpp:
2682
2683 2012-05-25  Vsevolod Vlasov  <vsevik@chromium.org>
2684
2685         Web Inspector: Limit DebuggerAgent.Location use to DebuggerModel only, introduce WebInspector.RawLocation to be used elsewhere.
2686         https://bugs.webkit.org/show_bug.cgi?id=87270
2687
2688         Reviewed by Pavel Feldman.
2689
2690         Introduced WebInspector.RawLocation interface, a generic raw location independent from concrete domain (Styles, Debugger).
2691         Made WebInspector.DebuggerModel.Location implement it and switched all debugger related methods to it.
2692
2693         * inspector/front-end/BreakpointManager.js:
2694         (WebInspector.BreakpointManager.prototype._breakpointResolved):
2695         * inspector/front-end/CompilerScriptMapping.js:
2696         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2697         * inspector/front-end/DebuggerModel.js:
2698         (WebInspector.DebuggerModel.Location):
2699         (WebInspector.DebuggerModel.prototype.continueToLocation):
2700         (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):
2701         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
2702         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2703         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2704         (WebInspector.DebuggerModel.prototype._breakpointResolved):
2705         (WebInspector.DebuggerModel.prototype.createRawLocation):
2706         (WebInspector.DebuggerModel.prototype.createRawLocationByURL):
2707         (WebInspector.DebuggerModel.prototype.setSelectedCallFrame):
2708         (WebInspector.DebuggerModel.prototype.createLiveLocation):
2709         (WebInspector.DebuggerModel.CallFrame.prototype.get location):
2710         (WebInspector.DebuggerModel.CallFrame.prototype.createLiveLocation):
2711         * inspector/front-end/DebuggerResourceBinding.js:
2712         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
2713         (WebInspector.DebuggerResourceBinding.setScriptSource):
2714         (WebInspector.DebuggerResourceBinding.prototype.setContent.get if):
2715         (WebInspector.DebuggerResourceBinding.prototype.setContent):
2716         (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent):
2717         * inspector/front-end/JavaScriptSource.js:
2718         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
2719         * inspector/front-end/Linkifier.js:
2720         * inspector/front-end/ObjectPopoverHelper.js:
2721         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
2722         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2723         * inspector/front-end/PresentationConsoleMessageHelper.js:
2724         * inspector/front-end/RawSourceCode.js:
2725         * inspector/front-end/ResourceScriptMapping.js:
2726         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
2727         * inspector/front-end/Script.js:
2728         (WebInspector.Script.prototype.rawLocationToUILocation):
2729         * inspector/front-end/ScriptSnippetModel.js:
2730         (WebInspector.SnippetScriptMapping.prototype.rawLocationToUILocation):
2731         * inspector/front-end/SourceMapping.js:
2732         * inspector/front-end/UISourceCode.js:
2733         (WebInspector.RawLocation):
2734
2735 2012-06-09  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2736
2737         Web Inspector: Add message loop instrumentation to public API and timeline agent
2738         https://bugs.webkit.org/show_bug.cgi?id=88639
2739
2740         Reviewed by Vsevolod Vlasov.
2741
2742         Message loop instrumentation will show when the render thread is busy.
2743         That way developer can discover if a render thread business causes low fps, or not.
2744
2745         * inspector/InspectorClient.h:
2746         (WebCore::InspectorClient::startMessageLoopMonitoring): Starts observer.
2747         (WebCore::InspectorClient::stopMessageLoopMonitoring): Stops observer.
2748         * inspector/InspectorController.cpp:
2749         (WebCore::InspectorController::InspectorController):
2750         Changed timeline agent constructor parameters.
2751         * inspector/InspectorInstrumentation.cpp:
2752         (WebCore::InspectorInstrumentation::willProcessTaskImpl):
2753         Forwards observer notification.
2754         (WebCore):
2755         (WebCore::InspectorInstrumentation::didProcessTaskImpl):
2756         Ditto.
2757         * inspector/InspectorInstrumentation.h:
2758         (InspectorInstrumentation):
2759         (WebCore::InspectorInstrumentation::willProcessTask):
2760         Ditto.
2761         (WebCore):
2762         (WebCore::InspectorInstrumentation::didProcessTask):
2763         Ditto.
2764         * inspector/InspectorTimelineAgent.cpp:
2765         (WebCore::InspectorTimelineAgent::start):
2766         Starts observer.
2767         (WebCore::InspectorTimelineAgent::stop):
2768         Stops observer.
2769         (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation):
2770         Changed result origin.
2771         (WebCore::InspectorTimelineAgent::willProcessTask):
2772         Noop implementqation.
2773         (WebCore):
2774         (WebCore::InspectorTimelineAgent::didProcessTask):
2775         Noop implementqation.
2776         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2777         Changed constructor parameters.
2778         * inspector/InspectorTimelineAgent.h:
2779         (WebCore::InspectorTimelineAgent::create):
2780         Ditto.
2781         (InspectorTimelineAgent):
2782         * inspector/WorkerInspectorController.cpp:
2783         (WebCore::WorkerInspectorController::WorkerInspectorController):
2784         Changed timeline agent constructor parameters.
2785
2786 2012-06-08  Andrey Kosyakov  <caseq@chromium.org>
2787
2788         Web Inspector: optimize timeline's frame mode overview appearance for 30fps
2789         https://bugs.webkit.org/show_bug.cgi?id=88556
2790
2791         Reviewed by Vsevolod Vlasov.
2792
2793         - adjust frame overview scale to 30fps == full height by default;
2794         - provide a fall-back auto-scale mode when median frame is longer than 1/30s;
2795         - add horizontal lines for 30 and 60fps;
2796         - drive-by fix: always use same order of categories in frame bars.
2797
2798         * inspector/front-end/TimelineOverviewPane.js:
2799         (WebInspector.TimelineVerticalOverview.prototype.update):
2800         (WebInspector.TimelineVerticalOverview.prototype._aggregateFrames):
2801         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
2802         (WebInspector.TimelineVerticalOverview.prototype._drawFPSMarks):
2803         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
2804
2805
2806 2012-06-09  Sukolsak Sakshuwong  <sukolsak@google.com>
2807
2808         Add UNDO_MANAGER flag
2809         https://bugs.webkit.org/show_bug.cgi?id=87908
2810
2811         Reviewed by Tony Chang.
2812
2813         Add undoManager property to document behind the UNDO_MANAGER flag and
2814         add placeholders for some methods of undoManager.
2815
2816         Test: editing/undomanager/document-has-undomanager.html
2817
2818         * CMakeLists.txt:
2819         * Configurations/FeatureDefines.xcconfig:
2820         * DerivedSources.cpp:
2821         * DerivedSources.make:
2822         * DerivedSources.pri:
2823         * GNUmakefile.am:
2824         * GNUmakefile.list.am:
2825         * WebCore.gypi:
2826         * WebCore.xcodeproj/project.pbxproj:
2827         * dom/Document.cpp:
2828         (WebCore::Document::Document):
2829         (WebCore):
2830         (WebCore::Document::undoManager):
2831         * dom/Document.h:
2832         (WebCore):
2833         (Document):
2834         * dom/Document.idl:
2835         * editing/UndoManager.cpp: Added.
2836         (WebCore):
2837         (WebCore::UndoManager::create):
2838         (WebCore::UndoManager::UndoManager):
2839         (WebCore::UndoManager::undo):
2840         (WebCore::UndoManager::redo):
2841         (WebCore::UndoManager::clearUndo):
2842         (WebCore::UndoManager::clearRedo):
2843         * editing/UndoManager.h: Added.
2844         (WebCore):
2845         (UndoManager):
2846         * editing/UndoManager.idl: Added.
2847
2848 2012-06-08  Levi Weintraub  <leviw@chromium.org>
2849
2850         RenderLayer::paintChildLayerIntoColumns doesn't properly pixel snap
2851         https://bugs.webkit.org/show_bug.cgi?id=88554
2852
2853         Reviewed by Darin Adler.
2854
2855         Column handling code in RenderLayer and RenderBlock was improperly clipping and translating
2856         using floats derived from FractionalLayoutUnits without pixel snapping. RenderLayer also
2857         improperly stored render tree offsets in ints instead of LayoutUnits. This corrects this
2858         issue.
2859
2860         Test: fast/sub-pixel/column-clipping.html
2861
2862         * rendering/RenderBlock.cpp:
2863         (WebCore::RenderBlock::paintColumnContents):
2864         * rendering/RenderLayer.cpp:
2865         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2866
2867 2012-06-08  Rakesh KN  <rakesh.kn@motorola.com>
2868
2869         REGRESSION(r116487?): HTMLFormElement::elements['name'] is empty if the form is detached from the document tree
2870         https://bugs.webkit.org/show_bug.cgi?id=88632
2871
2872         Reviewed by Ryosuke Niwa.
2873
2874         Update root node of RadioNodeList when the form element is detached from dom tree.
2875
2876         Test: fast/forms/radionodelist-whose-form-element-detached-from-domtree.html
2877
2878         * dom/Node.cpp:
2879         (WebCore::Node::resetCachedRadioNodeListRootNode):
2880         New function to update the root node of RadioNodeLists to form element from document.
2881         * dom/Node.h: Ditto.
2882         * html/HTMLFormElement.cpp:
2883         (WebCore::HTMLFormElement::removedFrom):
2884         On detach, we update the root node of all RadioNodeLists of this form element.
2885         * html/RadioNodeList.cpp:
2886         (WebCore::RadioNodeList::setRootElement):
2887         Setter for updating root node.
2888         * html/RadioNodeList.h:
2889         (RadioNodeList): Ditto.
2890
2891 2012-06-08  David Reveman  <reveman@chromium.org>
2892
2893         [Chromium] Compositor doesn't support translucent root layers.
2894         https://bugs.webkit.org/show_bug.cgi?id=87821
2895
2896         Reviewed by James Robinson.
2897
2898         Forward the isTransparent WebView setting to WebLayerTreeView,
2899         CCLayerTreeHost and CCLayerTreeHostImpl as hasTransparentBackground.
2900         Use hasTransparentBackground setting to determine how to clear the
2901         root render pass and draw the background. Set opaque flag correctly
2902         on the NonCompositedContentHost's graphics layer to make sure
2903         sub-pixel rendering is not used with a transparent WebView.
2904
2905         Unit tests: CCLayerTreeHostImplTest.hasTransparentBackground
2906                     LayerRendererChromiumTest2.opaqueRenderPass
2907                     LayerRendererChromiumTest2.transparentRenderPass
2908
2909         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2910         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
2911         * platform/graphics/chromium/LayerRendererChromium.cpp:
2912         (WebCore::LayerRendererChromium::clearRenderPass):
2913         (WebCore::LayerRendererChromium::drawRenderPass):
2914         (WebCore::LayerRendererChromium::drawBackgroundFilters):
2915         * platform/graphics/chromium/LayerRendererChromium.h:
2916         (LayerRendererChromium):
2917         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
2918         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2919         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2920         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2921         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
2922         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2923         (WebCore::CCLayerTreeHost::setHasTransparentBackground):
2924         (CCLayerTreeHost):
2925         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2926         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2927         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2928         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2929         (WebCore::CCLayerTreeHostImpl::hasTransparentBackground):
2930         (WebCore::CCLayerTreeHostImpl::setHasTransparentBackground):
2931         (CCLayerTreeHostImpl):
2932         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2933         (WebCore::CCRenderPass::CCRenderPass):
2934         * platform/graphics/chromium/cc/CCRenderPass.h:
2935         (WebCore::CCRenderPass::hasTransparentBackground):
2936         (WebCore::CCRenderPass::setHasTransparentBackground):
2937         (CCRenderPass):
2938
2939 2012-06-08  Ian Vollick  <vollick@chromium.org>
2940
2941         [chromium] Single thread proxy's animation timer should short circuit if the layer renderer has not been initialized
2942         https://bugs.webkit.org/show_bug.cgi?id=88668
2943
2944         Reviewed by James Robinson.
2945
2946         Unit test: CCSingleThreadProxyTestDidAddAnimationBeforeInitializingLayerRenderer.runSingleThreaded
2947
2948         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2949         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2950
2951 2012-06-08  Shezan Baig  <shezbaig.wk@gmail.com>
2952
2953         Caret is not rendered in empty inline contenteditable elements
2954         https://bugs.webkit.org/show_bug.cgi?id=85793
2955
2956         Reviewed by Ryosuke Niwa.
2957
2958         Override localCaretRect in RenderInline. The implementation was almost
2959         identical to localCaretRect in RenderBlock for empty block elements, so
2960         I refactored RenderBlock::localCaretRect and moved the logic to a new
2961         method 'localCaretRectForEmptyElement' in RenderBoxModelObject. The
2962         implementation of 'localCaretRect' in RenderBlock and RenderInline both
2963         use this helper method in RenderBoxModelObject.
2964
2965         Tests: editing/selection/caret-in-empty-inline-1.html
2966                editing/selection/caret-in-empty-inline-2.html
2967
2968         * rendering/RenderBlock.cpp:
2969         (WebCore::RenderBlock::localCaretRect):
2970         Modified to use RenderBoxModelObject::localCaretRectForEmptyElement.
2971         * rendering/RenderBoxModelObject.cpp:
2972         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
2973         (WebCore):
2974         * rendering/RenderBoxModelObject.h:
2975         (RenderBoxModelObject):
2976         Add localCaretRectForEmptyElement helper method.
2977         * rendering/RenderInline.cpp:
2978         (WebCore::RenderInline::localCaretRect):
2979         (WebCore):
2980         * rendering/RenderInline.h:
2981         (RenderInline):
2982         Override localCaretRect using localCaretRectForEmptyElement.
2983
2984 2012-06-08  Mike West  <mkwst@chromium.org>
2985
2986         Treat blob: and filesystem: URLs generated via secure origins as secure.
2987         https://bugs.webkit.org/show_bug.cgi?id=84054
2988
2989         Loading a blob: or filesystem: URL into an iframe or image that's
2990         contained on an HTTPS page shouldn't generate a mixed content warning.
2991         This change adds a SecurityOrigin::isSecure to check both against a
2992         URLs protocol, and the protocol of it's so-called "inner URL" if it's
2993         the type of URL that has such a thing. These sorts of URLs which are
2994         generated from secure sources will themselves be treated as secure.
2995
2996         Reviewed by Adam Barth.
2997
2998         Tests: http/tests/security/mixedContent/blob-url-in-iframe.html
2999                http/tests/security/mixedContent/filesystem-url-in-iframe.html
3000
3001         * loader/FrameLoader.cpp:
3002         (WebCore::FrameLoader::isMixedContent):
3003         * page/SecurityOrigin.cpp:
3004         (WebCore):
3005         (WebCore::SecurityOrigin::isSecure):
3006         * page/SecurityOrigin.h:
3007         (SecurityOrigin):
3008
3009 2012-06-08  Martin Robinson  <mrobinson@igalia.com>
3010
3011         [Cairo] [TextureMapperGL] Nvidia card does not update WebGL texture when interacting with canvas
3012         https://bugs.webkit.org/show_bug.cgi?id=87797
3013
3014         Reviewed by Philippe Normand.
3015
3016         No new tests. WebGL is already covered by WebGL tests and this
3017         bug is only present on certain hardware.
3018
3019         After resolving multisampling before drawing the texture via the
3020         TextureMapper, first rebind the multisampling framebuffer. This ensures
3021         that the texture isn't active in two framebuffers at a time.
3022
3023         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
3024         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): Rebind the multisampling
3025         framebuffer.
3026
3027 2012-06-08  Alexey Proskuryakov  <ap@apple.com>
3028
3029         <rdar://problem/11412294> Add appropriate iOS default font settings
3030
3031         Reviewed by Dan Bernstein.
3032
3033         * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies):
3034
3035 2012-06-08  Charles Wei  <charles.wei@torchmobile.com.cn>
3036
3037         IndexedDB: Transactions without any request scheduled should abort itself.
3038         https://bugs.webkit.org/show_bug.cgi?id=88052
3039
3040         Reviewed by Kentaro Hara.
3041
3042         This is needed for indexedDB to make it work for JSC. We need to clean up all the
3043         pending transactions(transactions without any request scheduled) when leaving Javascript context.
3044
3045         Manually tested using the existing test LayoutTests/storage/indexeddb/tutorial.html
3046
3047         * bindings/js/JSMainThreadExecState.cpp:
3048         (WebCore):
3049         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
3050         * bindings/js/JSMainThreadExecState.h:
3051         (WebCore::JSMainThreadExecState::~JSMainThreadExecState):
3052         (JSMainThreadExecState):
3053
3054 2012-06-08  Ryosuke Niwa  <rniwa@webkit.org>
3055
3056         Crash in WebCore::CompositeEditCommand::breakOutOfEmptyListItem
3057         https://bugs.webkit.org/show_bug.cgi?id=88361
3058
3059         Reviewed by Levi Weintraub.
3060
3061         Use RefPtr instead of raw pointers across DOM mutations.
3062
3063         No tests are added for the lack of a reliable reduction.
3064
3065         * editing/CompositeEditCommand.cpp:
3066         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
3067
3068 2012-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3069
3070         Unreviewed, rolling out r119514.
3071         http://trac.webkit.org/changeset/119514
3072         https://bugs.webkit.org/show_bug.cgi?id=88664
3073
3074         Broke JSFiddle.net (Requested by arv on #webkit).
3075
3076         * bindings/v8/V8DOMWindowShell.cpp:
3077         (WebCore::V8DOMWindowShell::initContextIfNeeded):
3078         * bindings/v8/WorkerContextExecutionProxy.cpp:
3079         (WebCore::WorkerContextExecutionProxy::initIsolate):
3080
3081 2012-06-08  Ryosuke Niwa  <rniwa@webkit.org>
3082
3083         Crash in WebCore::InsertParagraphSeparatorCommand::doApply
3084         https://bugs.webkit.org/show_bug.cgi?id=88108
3085
3086         Reviewed by Levi Weintraub.
3087
3088         Use NodeVector instead of walking through siblings as we mutate the DOM.
3089
3090         No new tests are added since there is no reliable reduction.
3091
3092         * editing/BreakBlockquoteCommand.cpp:
3093         (WebCore::BreakBlockquoteCommand::doApply):
3094         * editing/CompositeEditCommand.cpp:
3095         (WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
3096         (WebCore):
3097         * editing/CompositeEditCommand.h:
3098         (CompositeEditCommand):
3099         * editing/InsertParagraphSeparatorCommand.cpp:
3100         (WebCore::InsertParagraphSeparatorCommand::doApply):
3101
3102 2012-06-08  David Grogan  <dgrogan@chromium.org>
3103
3104         IndexedDB: rename some instances of open to registerFrontendCallbacks
3105         https://bugs.webkit.org/show_bug.cgi?id=88611
3106
3107         We should still make the change in the WebKit API.
3108
3109         Reviewed by Tony Chang.
3110
3111         No new tests, just a method rename.
3112
3113         * Modules/indexeddb/IDBDatabase.cpp:
3114         (WebCore::IDBDatabase::registerFrontendCallbacks):
3115         * Modules/indexeddb/IDBDatabase.h:
3116         (IDBDatabase):
3117         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3118         (WebCore::IDBDatabaseBackendImpl::registerFrontendCallbacks):
3119         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3120         (IDBDatabaseBackendImpl):
3121         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3122         (IDBDatabaseBackendInterface):
3123         * Modules/indexeddb/IDBRequest.cpp:
3124         (WebCore::IDBRequest::onSuccess):
3125
3126 2012-06-08  Dana Jansens  <danakj@chromium.org>
3127
3128         [chromium] Skip willDraw() and didDraw() on fully occluded layers
3129         https://bugs.webkit.org/show_bug.cgi?id=88435
3130
3131         Reviewed by Adrienne Walker.
3132
3133         Current willDraw() is called on all layers with non-empty
3134         visibleLayerRect and non-empty scissorRect. This excludes
3135         layers outside the viewport, but does not exclude occluded
3136         layers. We add a check for occlusion to calculateRenderPasses
3137         in order to avoid willDraw() when it will be culled anyway.
3138
3139         We prevent didDraw() from being called for occluded layers, for
3140         which we did not call didDraw() by holding a vector of layers
3141         for which we did call willDraw(). This lets us avoid storing a
3142         flag on the layers, or computing occlusion again in
3143         didDrawAllLayers.
3144
3145         Unit test: CCLayerTreeHostImplTest.willDrawNotCalledOnOccludedLayer
3146
3147         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3148         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3149         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3150         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
3151         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3152         (FrameData):
3153         (CCLayerTreeHostImpl):
3154
3155 2012-06-08  Antonio Gomes  <agomes@rim.com>
3156
3157         EventHandler shouldn't schedule the fake mousemove event timer when scrolling on devices that don't have a mouse
3158         https://bugs.webkit.org/show_bug.cgi?id=88379
3159
3160         Reviewed by James Robinson.
3161
3162         Paraphrasing Andy Estes:
3163         "In <http://trac.webkit.org/changeset/119465> we stopped dispatching fake
3164         mousemove events when scrolling on devices that don't support mice. This event
3165         is dispatched on a timer, so one better would be to not even schedule the
3166         timer (rather than scheduling the timer but making it a no-op).
3167
3168         No new tests, as no functionality has changed. We basically do not
3169         start a timer under a given circumstance instead of fire it, it times out,
3170         and we make the callback no-op when under the given circumstance.
3171
3172         It is still possible though that we have the following scenario:
3173         - Setting::deviceSupportsMouse set as true;
3174         - we fire the timer;
3175         - before its callback gets executed (timed out) the setting gets toggled.
3176         So for sakeness, lets keep the check in both places.
3177
3178         * page/EventHandler.cpp:
3179         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
3180         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
3181
3182 2012-06-08  James Robinson  <jamesr@chromium.org>
3183
3184         [chromium] Clean up some unnecessary LayerChromium.h includes
3185         https://bugs.webkit.org/show_bug.cgi?id=88599
3186
3187         Reviewed by Adam Barth.
3188
3189         Reworks test code slightly to use WebCore interfaces.
3190
3191         * testing/Internals.cpp:
3192         (WebCore::Internals::setBackgroundBlurOnNode):
3193
3194 2012-06-08  Erik Arvidsson  <arv@chromium.org>
3195
3196         [V8] Keep TextTrackList alive as long as its owner is alive
3197         https://bugs.webkit.org/show_bug.cgi?id=88541
3198
3199         Reviewed by Adam Barth.
3200
3201         Add a hidden reference from the owner to the text track list.
3202
3203         Covered by existing tests.
3204
3205         * Target.pri: Add V8TextTrackListCustom.cpp.
3206         * UseV8.cmake: Ditto.
3207         * WebCore.gypi: Ditto.
3208         * bindings/v8/V8HiddenPropertyName.h:
3209         (WebCore):
3210         * bindings/v8/custom/V8TextTrackListCustom.cpp: Copied from Source/WebCore/bindings/v8/V8HiddenPropertyName.h.
3211         (WebCore):
3212         (WebCore::toV8): When the wrapper is created add a reference to the owner of the TextTrackList to the TextTrackList.
3213         * html/track/TextTrackList.idl:
3214
3215 2012-06-08  Ian Vollick  <vollick@chromium.org>
3216
3217         [chromium] Accelerated animations should use WebTransformOperations
3218         https://bugs.webkit.org/show_bug.cgi?id=87686
3219
3220         Reviewed by James Robinson.
3221
3222         CCTransformKeyframe new owns a WebTransformOperations rather than a
3223         TransformOperations. LayerChromium's API has been changed so that
3224         LayerChromium::addAnimation should take only a CCActiveAnimation.
3225         GraphicsLayerChromium is new responsible for translating to
3226         WebTransformOperations and creating CCActiveAnimations. Tests that use
3227         the public API (that is, they call addAnimation with KeyframeValueList
3228         and Animation arguments) have been moved to GraphicsLayerChromiumTest.
3229
3230          Unit tests:
3231             GraphicsLayerChromiumTest.createOpacityAnimation
3232             GraphicsLayerChromiumTest.createTransformAnimation
3233             GraphicsLayerChromiumTest.createTransformAnimationWithBigRotation
3234             GraphicsLayerChromiumTest.createTransformAnimationWithSingularMatrix
3235             GraphicsLayerChromiumTest.createReversedAnimation
3236             GraphicsLayerChromiumTest.createAlternatingAnimation
3237             GraphicsLayerChromiumTest.createReversedAlternatingAnimation
3238
3239         * WebCore.gypi:
3240         * platform/graphics/chromium/AnimationTranslationUtil.cpp: Added.
3241         (WebCore):
3242         (WebCore::toWebTransformOperations):
3243         (WebCore::appendKeyframe):
3244         (WebCore::CCKeyframedTransformAnimationCurve):
3245         (WebCore::createActiveAnimation):
3246         * platform/graphics/chromium/AnimationTranslationUtil.h: Added.
3247         (WebCore):
3248         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3249         (WebCore::GraphicsLayerChromium::addAnimation):
3250         * platform/graphics/chromium/LayerChromium.cpp:
3251         (WebCore::LayerChromium::addAnimation):
3252         * platform/graphics/chromium/LayerChromium.h:
3253         (WebCore):
3254         (WebCore::LayerChromium::bounds):
3255         (LayerChromium):
3256         * platform/graphics/chromium/LinkHighlight.cpp:
3257         (WebCore::LinkHighlight::LinkHighlight):
3258         * platform/graphics/chromium/cc/CCAnimationCurve.h:
3259         (CCTransformAnimationCurve):
3260         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp:
3261         (WebCore::CCTransformKeyframe::create):
3262         (WebCore::CCTransformKeyframe::CCTransformKeyframe):
3263         (WebCore::CCTransformKeyframe::value):
3264         (WebCore::CCTransformKeyframe::clone):
3265         (WebCore::CCKeyframedTransformAnimationCurve::getValue):
3266         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h:
3267         (CCTransformKeyframe):
3268         (CCKeyframedTransformAnimationCurve):
3269         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3270         (WebCore::CCLayerAnimationController::removeAnimation):
3271         (WebCore):
3272         (WebCore::CCLayerAnimationController::addAnimation):
3273         (WebCore::CCLayerAnimationController::getActiveAnimation):
3274         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
3275         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
3276         (WebCore::CCLayerAnimationController::tickAnimations):
3277         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
3278         (CCLayerAnimationControllerClient):
3279         (CCLayerAnimationController):
3280         * platform/graphics/chromium/cc/CCLayerImpl.h:
3281         (WebCore::CCLayerImpl::bounds):
3282
3283 2012-06-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
3284
3285         [Texmap] Accelerated versions of drop-shadow and blur filters
3286         https://bugs.webkit.org/show_bug.cgi?id=87695
3287
3288         Reviewed by Kenneth Rohde Christiansen.
3289
3290         Added shaders for blur and drop-shadow effects.
3291         The shaders use sampling of multiple coordinates and averaging them with normal-
3292         distribution to create a fast gaussian blur effect.
3293
3294         Covered by existing tests in css3/filters.
3295
3296         * platform/graphics/texmap/TextureMapperGL.cpp:
3297         (WebCore::TextureMapperGL::drawFiltered):
3298             Call the prepare function explicitly, with a size argument that's used to calculate
3299             some of the uniform values.
3300
3301         * platform/graphics/texmap/TextureMapperLayer.cpp:
3302         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
3303             The outsets of the effect have to be considered when calculating the intermediate rect.
3304             Otherwise the resulting image is scaled instead of outsetted.
3305
3306         (WebCore::applyFilters):
3307         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
3308         (WebCore::StandardFilterProgram::StandardFilterProgram):
3309             Added the new shaders.
3310
3311         (WebCore::StandardFilterProgram::prepare):
3312         (WebCore::TextureMapperShaderManager::getShaderForFilter):
3313         * platform/graphics/texmap/TextureMapperShaderManager.h:
3314         (StandardFilterProgram):
3315
3316 2012-06-08  Dan Bernstein  <mitz@apple.com>
3317
3318         Tried to fix the build after r119844.
3319
3320         * bindings/js/GCController.cpp:
3321         (WebCore::GCController::discardAllCompiledCode):
3322
3323 2012-06-08  Mike West  <mkwst@chromium.org>
3324
3325         Add COMPILE_ASSERT to StyledElement to ensure it doesn't accidentally grow larger.
3326         https://bugs.webkit.org/show_bug.cgi?id=88627
3327
3328         Reviewed by Adam Barth.
3329
3330         No change in user-facing behavior.
3331
3332         * dom/StyledElement.cpp:
3333         (WebCore):
3334
3335 2012-06-08  Vsevolod Vlasov  <vsevik@chromium.org>
3336
3337         Web Inspector: Fix several compiler warnings and errors.
3338         https://bugs.webkit.org/show_bug.cgi?id=88660
3339
3340         Reviewed by Pavel Feldman.
3341
3342         Fixed several compiler warnings and errors.
3343         Removed isEmpty method from Object.prototype and made it static method on Object.
3344
3345         * inspector/InjectedScriptExterns.js:
3346         * inspector/front-end/FileSystemModel.js:
3347         (WebInspector.FileSystemModel.prototype._detachFrame):
3348         * inspector/front-end/HeapSnapshot.js:
3349         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
3350         * inspector/front-end/utilities.js:
3351         (Object.isEmpty):
3352
3353 2012-06-08  Max Feil  <mfeil@rim.com>
3354
3355         [BlackBerry] Fix assertion failure introduced by bug 87551
3356         https://bugs.webkit.org/show_bug.cgi?id=88659
3357
3358         Reviewed by Antonio Gomes.
3359
3360         The determineRenderSlider() convenience function added in bug
3361         87551 made an assumption that wasn't always true. This didn't
3362         cause a functional error but it caused an assertion failure,
3363         which indicates a problem with the code. PR164142.
3364
3365         No new tests because this case is already covered by ASSERT's.
3366
3367         * platform/blackberry/RenderThemeBlackBerry.cpp:
3368         (WebCore::determineRenderSlider):
3369
3370 2012-06-08  Ion Rosca  <rosca@adobe.com>
3371
3372         Some overlay scrollbar API calls in ScrollAnimatorMac can lead to an assertion in RenderBox::mapAbsoluteToLocalPoint
3373         https://bugs.webkit.org/show_bug.cgi?id=74111
3374
3375         Reviewed by Simon Fraser.
3376
3377         Added zero-delay timer for AppKit scroll notification that can be called during layout.
3378         Manual test: ManualTests/scrollbar-crash-on-hide-scrolled-area.html
3379         This assertion does not fire when running layout tests. It can be easly reproduced using a debug build by loading the manual test page.
3380
3381         * platform/mac/ScrollAnimatorMac.h:
3382         (ScrollAnimatorMac):
3383         * platform/mac/ScrollAnimatorMac.mm:
3384         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3385         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
3386         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon):
3387         (WebCore):
3388         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
3389
3390 2012-06-08  Renata Hodovan  <reni@webkit.org>
3391
3392         Adding few already supported features to the FeatureSet in DOMImplementation
3393         https://bugs.webkit.org/show_bug.cgi?id=86482
3394
3395         Text, Filter and View features are already implemented but they
3396         are not added to the SVG11 feature set. This is corrected in this patch.
3397
3398         Reviewed by Nikolas Zimmermann.
3399
3400         No new testcase is needed because we already have one what checks the svg features via
3401         DOMImplementation (svg/custom/svg-features.html).
3402
3403         * dom/DOMImplementation.cpp:
3404         (WebCore::isSVG11Feature):
3405
3406 2012-06-08  Stephen Chenney  <schenney@chromium.org>
3407
3408         WebCore::ImageBuffer.cpp has broken color table code
3409         https://bugs.webkit.org/show_bug.cgi?id=80321
3410
3411         Reviewed by Dirk Schulze.
3412
3413         The code in ImageBuffer::transformColorSpace had two problems that are
3414         fixed by this patch.
3415
3416         First, it was using member variables for data
3417         that is static constant. This is incredibly wasteful, as every
3418         ImageBuffer that is created (and we make a lot of them) gets its own
3419         copy of the LUT and the table is initialized again and again. The
3420         patch replaces this with a static local, with lazy evaluation, in
3421         the method that uses the tables.
3422
3423         Second, the code for filling the table was mapping 255 to 254, thus
3424         reducing the intensity and alpha of every image it pushed through a
3425         color transform.
3426
3427         Test: svg/filters/color-space-conversion.svg
3428
3429         * platform/graphics/ImageBuffer.cpp:
3430         (WebCore::ImageBuffer::transformColorSpace):
3431         * platform/graphics/ImageBuffer.h:
3432         (ImageBuffer):
3433
3434 2012-06-08  Alexei Filippov  <alexeif@chromium.org>
3435
3436         Web Inspector: Better labels positioning on the memory pie chart
3437         https://bugs.webkit.org/show_bug.cgi?id=88652
3438
3439         Reviewed by Vsevolod Vlasov.
3440
3441         * inspector/front-end/NativeMemorySnapshotView.js:
3442         (WebInspector.NativeMemoryPieChart.prototype._paint.paintPercentAndLabel):
3443         (WebInspector.NativeMemoryPieChart.prototype._paint):
3444
3445 2012-06-08  Bryan McQuade  <bmcquade@google.com>
3446
3447         Web Inspector: Annotate timeline records with a frame identifier
3448         https://bugs.webkit.org/show_bug.cgi?id=86406
3449
3450         Reviewed by Vsevolod Vlasov.
3451
3452         Tests: Updated existing layout tests.
3453
3454         * inspector/InspectorController.cpp:
3455         (WebCore::InspectorController::InspectorController):
3456         * inspector/InspectorInstrumentation.cpp:
3457         (WebCore::frameForScriptExecutionContext):