Fix the GTK+ build after a collision of two patches.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
2
3         Fix the GTK+ build after a collision of two patches.
4
5         Unreviewed build fix.
6
7         * bindings/gobject/GNUmakefile.am: The GObject DOM bindings library needs to
8         include the harfbuzz cflags when compiling.
9
10 2012-12-10  Parth Patel  <parpatel@rim.com>
11
12         Make hiddenPageDomTimerInterval a setting
13         https://bugs.webkit.org/show_bug.cgi?id=104555
14
15         Reviewed by Yong Li.
16
17         Make hiddenPageDomTimerInterval a setting so client can customize it.
18
19         No new tests are needed.
20
21         * page/Page.cpp:
22         (WebCore):
23         (WebCore::Page::setVisibilityState):
24         * page/Settings.cpp:
25         (WebCore):
26         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval):
27         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval):
28         * page/Settings.h:
29         (Settings):
30
31 2012-12-10  peavo@outlook.com  <peavo@outlook.com>
32
33         [WinCairo] Compile fix in ImageCairoWin.cpp
34         https://bugs.webkit.org/show_bug.cgi?id=104554
35
36         Reviewed by Brent Fulgham.
37
38         * platform/graphics/win/ImageCairoWin.cpp:
39         (WebCore::BitmapImage::getHBITMAPOfSize): Added parameter.
40         (WebCore::BitmapImage::drawFrameMatchingSourceSize): Added parameter.
41
42 2012-12-10  Mike West  <mkwst@chromium.org>
43
44         Log to console when script is blocked by sandbox attributes.
45         https://bugs.webkit.org/show_bug.cgi?id=104365
46
47         Reviewed by Ojan Vafai.
48
49         Adds a console message to cover script execution blocked within the
50         context of a sandboxed frame which lacks the 'allow-scripts' permission.
51
52         * bindings/ScriptControllerBase.cpp:
53         (WebCore::ScriptController::canExecuteScripts):
54             Log a warning when sandboxing flags block script execution.
55
56 2012-12-10  Chris Fleizach  <cfleizach@apple.com>
57
58         AX: Crash in NSAccessibilityUnignoredDescendant
59         https://bugs.webkit.org/show_bug.cgi?id=104468
60
61         Reviewed by Anders Carlsson.
62
63         This crash occurred because AccessibilityScrollView stopped retaining it's ScrollView pointer.
64
65         Unfortunately, there was still a case that didn't correctly clear that variable. 
66
67         That case was when a Frame had a new FrameView associated with it. The old FrameView didn't inform the 
68         accessibility object cache that it should be removed. As a result, when the FrameView deallocated and 
69         did try to remove, it used the wrong AXObjectCache because it was no longer correctly hooked into the 
70         document tree.
71
72         No new tests. Existing tests will stop crashing.
73  
74         * page/Frame.cpp:
75         (WebCore::Frame::setView): change the name of the method that tells the FrameView to detach
76         * page/FrameView.cpp:
77         (WebCore::FrameView::~FrameView):
78         (WebCore::FrameView::removeFromAXObjectCache): add a method that can be called in multiple places
79         (WebCore::FrameView::isFrameView):
80         (WebCore::FrameView::prepareForDetach): detaches scrollbars and accessibility
81         * page/FrameView.h:
82         (FrameView):
83
84 2012-12-10  Mark Pilgrim  <pilgrim@chromium.org>
85
86         [Chromium] Move getPluginsList out of PlatformSupport
87         https://bugs.webkit.org/show_bug.cgi?id=96507
88
89         Reviewed by Darin Fisher.
90
91         Part of a refactoring series. See tracking bug 82948.
92
93         * WebCore.gypi:
94         * platform/chromium/PlatformSupport.h:
95         (PlatformSupport):
96         * plugins/chromium/PluginDataChromium.cpp:
97         (WebCore::PluginCache::plugins):
98         * plugins/chromium/PluginListBuilder.cpp: Added.
99         (WebKit):
100         (WebKit::PluginListBuilder::addPlugin):
101         (WebKit::PluginListBuilder::addMediaTypeToLastPlugin):
102         (WebKit::PluginListBuilder::addFileExtensionToLastMediaType):
103         * plugins/chromium/PluginListBuilder.h: Added.
104         (WebKit):
105         (PluginListBuilder):
106         (WebKit::PluginListBuilder::PluginListBuilder):
107
108 2012-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
109
110         [GTK] Build GObject DOM bindings as a separate library
111         https://bugs.webkit.org/show_bug.cgi?id=104527
112
113         Reviewed by Xan Lopez.
114
115         * bindings/gobject/GNUmakefile.am: Add libWebCoreDOM library.
116         * bindings/gobject/WebKitDOMBinding.h: Define private macros.
117         * bindings/gobject/WebKitDOMCustom.h: Don't include webkit/webkitdefines.h.
118         * bindings/gobject/WebKitDOMEventTarget.h: Ditto.
119         * bindings/gobject/WebKitDOMObject.h: Ditto.
120         * bindings/scripts/CodeGeneratorGObject.pm:
121         (Generate): Don't include webkitglobalsprivate.h.
122         (WriteData): Don't include webkit/webkitdefines.h.
123         * bindings/scripts/gobject-generate-headers.pl: Define WEBKIT_API
124         macro in webkitdomdefines.h.
125         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
126         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
127         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
128         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
129         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
130         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
131         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
132         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
133         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
134         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
135         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
136         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
137         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
138         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
139         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
140         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
141         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
142         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
143         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
144         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
145         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
146         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
147         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
148         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
149         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
150         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
151         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
152         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
153
154 2012-12-10  Adam Klein  <adamk@chromium.org>
155
156         In InbandTextTrackPrivate, return emptyAtoms instead of emptyString() by default.
157
158         Unreviewed build fix.
159
160         * platform/graphics/InbandTextTrackPrivate.h:
161         (WebCore::InbandTextTrackPrivate::label):
162         (WebCore::InbandTextTrackPrivate::language):
163
164 2012-12-10  Ilya Tikhonovsky  <loislo@chromium.org>
165
166         Web Inspector: Native Memory Instrumentation: instrument RenderBox descendants.
167         https://bugs.webkit.org/show_bug.cgi?id=104026
168
169         Reviewed by Eric Seidel.
170
171         Plain vanilla instrumentation for RenderBox descendants.
172
173         * rendering/RenderFrameSet.cpp:
174         (WebCore::RenderFrameSet::reportMemoryUsage):
175         (WebCore):
176         (WebCore::RenderFrameSet::GridAxis::reportMemoryUsage):
177         * rendering/RenderFrameSet.h:
178         (RenderFrameSet):
179         (GridAxis):
180         * rendering/RenderListMarker.cpp:
181         (WebCore::RenderListMarker::reportMemoryUsage):
182         (WebCore):
183         * rendering/RenderListMarker.h:
184         (RenderListMarker):
185         * rendering/RenderReplaced.cpp:
186         (WebCore::RenderReplaced::reportMemoryUsage):
187         (WebCore):
188         * rendering/RenderReplaced.h:
189         (RenderReplaced):
190         * rendering/RenderTableCol.cpp:
191         (WebCore::RenderTableCol::reportMemoryUsage):
192         (WebCore):
193         * rendering/RenderTableCol.h:
194         (RenderTableCol):
195         * rendering/RenderTableRow.cpp:
196         (WebCore::RenderTableRow::reportMemoryUsage):
197         (WebCore):
198         * rendering/RenderTableRow.h:
199         (RenderTableRow):
200         * rendering/RenderTableSection.cpp:
201         (WebCore::RenderTableSection::reportMemoryUsage):
202         (WebCore):
203         (WebCore::RenderTableSection::RowStruct::reportMemoryUsage):
204         (WebCore::RenderTableSection::CellStruct::reportMemoryUsage):
205         * rendering/RenderTableSection.h:
206         (CellStruct):
207         (RowStruct):
208
209 2012-12-10  Alejandro Piñeiro  <apinheiro@igalia.com>
210
211         AX: wrong Enabled states on a ListBox
212         https://bugs.webkit.org/show_bug.cgi?id=104483
213
214         Reviewed by Chris Fleizach.
215
216         Test: accessibility/listbox-enabled-states.html
217
218         * accessibility/AccessibilityListBoxOption.cpp:
219         (WebCore::AccessibilityListBoxOption::isEnabled): taking into
220         account the DISABLED attribute and the aria-disabled attribute to
221         decide if the item is enabled or not.
222
223 2012-12-10  Adam Klein  <adamk@chromium.org>
224
225         cr-win build fix after r137161.
226
227         Unreviewed.
228
229         * platform/graphics/MediaPlayer.h: Replace forward-decl of
230         InbandTextTrackPrivate with #include as the definition is required.
231
232 2012-12-10  Alexis Menard  <alexis@webkit.org>
233
234         [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag.
235         https://bugs.webkit.org/show_bug.cgi?id=104539
236
237         Reviewed by Antonio Gomes.
238
239         As discussed on webkit-dev it is not needed to keep this feature flag 
240         as support for <position> type is a small feature that is already 
241         implemented by three other UAs. It was useful while landing this 
242         feature as partial bits were landed one after one.
243
244         No new tests : the feature is covered by various tests and it is already enabled in many ports.
245
246         * Configurations/FeatureDefines.xcconfig:
247         * GNUmakefile.am:
248         * GNUmakefile.features.am:
249         * css/CSSParser.cpp:
250         (WebCore::CSSParser::parseFillPosition):
251         (WebCore::CSSParser::parseFillProperty):
252         * css/CSSParser.h:
253         * css/CSSToStyleMap.cpp:
254         (WebCore::CSSToStyleMap::mapFillXPosition):
255         (WebCore::CSSToStyleMap::mapFillYPosition):
256         * rendering/style/FillLayer.cpp:
257         (SameSizeAsFillLayer):
258         (WebCore::FillLayer::FillLayer):
259         (WebCore::FillLayer::operator=):
260         (WebCore::FillLayer::operator==):
261         (WebCore::FillLayer::fillUnsetProperties):
262         * rendering/style/FillLayer.h:
263         (WebCore::FillLayer::backgroundXOrigin):
264         (WebCore::FillLayer::backgroundYOrigin):
265         (WebCore::FillLayer::isBackgroundOriginSet):
266         (WebCore::FillLayer::clearXPosition):
267         (WebCore::FillLayer::clearYPosition):
268         (FillLayer):
269
270 2012-12-10  Eric Carlson  <eric.carlson@apple.com>
271
272         Add support for in-band text tracks to Mac port
273         https://bugs.webkit.org/show_bug.cgi?id=103663
274
275         Reviewed by Sam Weinig.
276
277         Test: media/track/track-in-band.html
278
279         * GNUmakefile.list.am: Move InbandTextTrackPrivate.h to platform/graphics. Add InbandTextTrackPrivateClient.h.
280         * Target.pri: Ditto.
281         * WebCore.gypi: Ditto.
282
283         * WebCore.xcodeproj/project.pbxproj: Add new files.
284
285         * html/HTMLMediaElement.cpp:
286         (WebCore::HTMLMediaElement::setReadyState): No need to call processInbandTextTracks, in-band tracks
287             are now registered by the media engine as they are discovered.
288         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): New, called by the media player when a new
289             in-band track is found.
290         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTrack): New, called by the media player when an
291             in-band track goes away.
292         * html/HTMLMediaElement.h:
293
294         * html/track/InbandTextTrack.cpp:
295         (WebCore::InbandTextTrack::InbandTextTrack): Use m_private instead of tracksPrivate because
296             it is zeroed during assignment.
297
298         * platform/graphics/MediaPlayer.cpp:
299         (WebCore::MediaPlayer::addTextTrack): New MediaPlayerClient method to allow MediaPlayerPrivate subclasses
300             to add a new in-band track.
301         (WebCore::MediaPlayer::removeTextTrack): New MediaPlayerClient method to allow MediaPlayerPrivate subclasses
302             to remove a new in-band track.
303         * platform/graphics/MediaPlayer.h:
304         * platform/graphics/MediaPlayerPrivate.h:
305
306         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Added.
307         (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF):
308         (WebCore::InbandTextTrackPrivateAVF::~InbandTextTrackPrivateAVF):
309         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Convert an attribute string into WebVTT 
310             cue setting and content strings.
311         (WebCore::InbandTextTrackPrivateAVF::processCue): Process a new cue.
312         (WebCore::InbandTextTrackPrivateAVF::disconnect): Clear member variables.
313         (WebCore::InbandTextTrackPrivateAVF::resetCueValues): Reset cue values to defaults.
314         (WebCore::InbandTextTrackPrivateAVF::setMode): Set track mode and call player's trackModeChanged.
315         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Added.
316
317         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: Initialize 
318             m_inbandTrackConfigurationPending.
319         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
320         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Flush the currently accumulating
321             cue so it doesn't get the wrong duration.
322         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Handle InbandTracksNeedConfiguration.
323         (WebCore::MediaPlayerPrivateAVFoundation::flushCurrentCue): New, pass the current cue up to the client.
324         (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Configure in-band tracks.
325         (WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged): Schedule a call to configureInbandTracks.
326         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
327
328         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Added.
329         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: Added.
330         (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC):
331         (WebCore::InbandTextTrackPrivateAVFObjC::disconnect):
332         (WebCore::InbandTextTrackPrivateAVFObjC::kind): Return track kind.
333         (WebCore::InbandTextTrackPrivateAVFObjC::label): Return track label.
334         (WebCore::InbandTextTrackPrivateAVFObjC::language): Return track language.
335         (WebCore::InbandTextTrackPrivateAVFObjC::isDefault): 
336         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
337         (MediaPlayerPrivateAVFoundationObjC):
338         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItem):
339         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
340         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize m_currentTrack.
341         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear m_legibleOutput.
342         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create and initialize m_legibleOutput.
343         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Called when the player item's
344             "tracks" changes, add and remove in-band text tracks as necessary.
345         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass an attributed string to the current 
346             track to be processed.
347         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Tell AVFoundation to select an in-band track.
348         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTrack): Return the current track.
349         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]): Legible
350             output delegate.
351
352 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
353
354         Web Inspector: fix front-end compilation warnings
355         https://bugs.webkit.org/show_bug.cgi?id=104557
356
357         Reviewed by Alexander Pavlov.
358
359         Corresponding annotations added.
360
361         * inspector/Inspector.json:
362         * inspector/InspectorDOMAgent.cpp:
363         (WebCore::InspectorDOMAgent::highlightNode):
364         * inspector/InspectorDOMAgent.h:
365         (InspectorDOMAgent):
366         * inspector/front-end/CSSStyleModel.js:
367         (WebInspector.CSSStyleDeclaration.prototype.):
368         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
369         * inspector/front-end/ConsoleMessage.js:
370         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
371         * inspector/front-end/DOMAgent.js:
372         (WebInspector.DOMAgent.prototype.highlightDOMNode):
373         * inspector/front-end/DOMPresentationUtils.js:
374         (WebInspector.DOMPresentationUtils.linkifyNodeReference):
375         * inspector/front-end/ObjectPropertiesSection.js:
376         (WebInspector.ObjectPropertyTreeElement.prototype.update):
377         * inspector/front-end/Toolbar.js:
378
379 2012-12-10  Zeno Albisser  <zeno@webkit.org>
380
381         [Qt] MediaPlayerQTKit broken after switching QPainter to raster engine.
382         https://bugs.webkit.org/show_bug.cgi?id=104550
383
384         With Qt5 QPainter changed to using the raster engine.
385         Therefore we no longer have an NSGraphicsContext that we can
386         use for drawing video frames.
387         With this patch we are rendering the video frame into an image buffer
388         and then paint it manually using QPainter.
389
390         Reviewed by Simon Hausmann.
391
392         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
393         (WebCore):
394         (WebCore::swapBgrToRgb):
395             Swap the color format from BGR to RGB,
396             since BGR is not supported by QImage.
397         (WebCore::MediaPlayerPrivateQTKit::paint):
398
399 2012-12-10  peavo@outlook.com  <peavo@outlook.com>
400
401         [WinCairo] Link fix in InspectorController.cpp
402         https://bugs.webkit.org/show_bug.cgi?id=104556
403
404         Reviewed by Pavel Feldman.
405
406         * inspector/InspectorController.cpp:
407         (WebCore::InspectorController::InspectorController): Added missing #if check.
408
409 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
410
411         Web Inspector: remove the Overrides / Settings context menu from gear icon
412         https://bugs.webkit.org/show_bug.cgi?id=104546
413
414         Reviewed by Alexander Pavlov.
415
416         It sounds like too many people don't like the way it works. Bringing things back: overrides will be a tab in settings for now.
417         Moving present behavior to under experiment.
418
419         * inspector/front-end/OverridesView.js:
420         (WebInspector.OverridesView):
421         * inspector/front-end/Settings.js:
422         (WebInspector.ExperimentsSettings):
423         * inspector/front-end/SettingsScreen.js:
424         (WebInspector.OverridesSettingsTab):
425         (WebInspector.SettingsController):
426         (WebInspector.SettingsController.prototype.get statusBarItem):
427         (WebInspector.SettingsController.prototype._mouseDown.showSettings):
428         (WebInspector.SettingsController.prototype._mouseDown):
429         (WebInspector.SettingsController.prototype._mouseUp):
430         * inspector/front-end/helpScreen.css:
431         (#settings-screen .tabbed-pane-header):
432         (#settings-screen .tabbed-pane-header-tabs):
433         (#settings-screen .tabbed-pane-header-tab):
434
435 2012-12-10  Kent Tamura  <tkent@chromium.org>
436
437         Visual order of empty value placeholder in INPUT_MULTIPLE_FIELDS_UI is wrong in RTL
438         https://bugs.webkit.org/show_bug.cgi?id=104438
439
440         Reviewed by Hajime Morita.
441
442         No new tests. This updates datetimelocal-appearance-l10n.html for he-il
443         and ar-eg locales.
444
445         * html/shadow/DateTimeNumericFieldElement.cpp:
446         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
447         We should not append Right-to-left-mark to each of placeholder
448         strings. It makes numeric field separators such as ':' and '/' RTL, and
449         makes a wrong visual order. We use unicode-bidi:bidi-override and
450         direction:ltr instead. It means we force LTR only to this element
451         * html/shadow/DateTimeNumericFieldElement.h:
452         Makes m_placeholder const again.
453         * html/shadow/DateTimeEditElement.cpp:
454         (WebCore::DateTimeEditBuilder::visitLiteral):
455         Explicitly set right-to-left-mark before S, WS, ON types according to
456         Unicod Bidirectional Algorithm Table 4 [1]. This is needed because we
457         don't have context like "This literal follows European/Arabic numbers"
458         in a case of showing placeholders.
459         [1] http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types
460
461 2012-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
462
463         [Soup] utilize multipart/x-mixed-replace support recently added to libsoup
464         https://bugs.webkit.org/show_bug.cgi?id=94515
465
466         Reviewed by Martin Robinson.
467
468         The multipart/x-mixed-replace content type is often used for providing
469         "push" server support, with each part in the multipart response
470         replacing the previous one in the rendering. Soup recently acquired
471         support for multipart/x-mixed replace, which this change utilizes.
472
473         Covered by existing multipart/x-mixed-replace tests.
474
475         * platform/network/ResourceHandleInternal.h:
476         (ResourceHandleInternal): add new member to this class, the multipart input stream
477         * platform/network/soup/ResourceHandleSoup.cpp:
478         (WebCore::cleanupSoupRequestOperation): also clear the multipart input stream on
479         cleanup
480         (WebCore::nextPartCallback): callback that handles reporting the new response delivered
481         with the new part, if any; uses the factored out updateFromSoupMessageHeaders method
482         (WebCore::sendRequestCallback): handle multipart/x-mixed-replace responses by
483         requesting the next part
484         (WebCore::readCallback): when reading has finished, request the next part when
485         handling a multipart/x-mixed-replace response
486         * platform/network/soup/ResourceResponse.h:
487         (ResourceResponse): add declaration for new method
488         * platform/network/soup/ResourceResponseSoup.cpp:
489         (WebCore::ResourceResponse::updateFromSoupMessage): call new updateFromSoupMessageHeaders
490         method, instead of dealing with the message headers directly
491         (WebCore::ResourceResponse::updateFromSoupMessageHeaders): new method, factored out from
492         updateFromSoupMessage, so this same code can be reused for updating responses for
493         multipart/x-mixed-replace responses parts
494
495 2012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
496
497         Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
498         https://bugs.webkit.org/show_bug.cgi?id=103886
499
500         Reviewed by Kenneth Rohde Christiansen.
501
502         Export symbol for WebCore::Page::setViewMode on Mac.
503
504         No new tests, no behavior change for layout tests.
505
506         * WebCore.exp.in:
507
508 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
509
510         [GTK] Bring Harfbuzz-ng support to Gtk
511         https://bugs.webkit.org/show_bug.cgi?id=92098
512
513         Reviewed by Gustavo Noronha Silva.
514
515         Enable HarfBuzz support by default. With the Freetype backend we no longer
516         fall back to Pango for rendering complex text.
517
518         No new tests. This is covered by existing tests.
519
520         * GNUmakefile.am: Add HarfBuzz include directories and define.
521         * GNUmakefile.list.am: Add HarfBuzz files to source list and remove
522         Pango ones.
523         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
524         (WebCore::FontPlatformData::operator==): To properly render fallback
525         fonts via HarfBuzz , it's important that we actually ask Fontconfig
526         whether or not two patterns are the same. This ensures that when patterns
527         are just copies of one another they only take up one slot in the font cache
528         and appear to be the same font to HarfBuzzShaper.
529
530 2012-12-10  Alexander Pavlov  <apavlov@chromium.org>
531
532         Web Inspector: [Overrides] Unable to change values in Device Metrics override setting
533         https://bugs.webkit.org/show_bug.cgi?id=104542
534
535         Reviewed by Vsevolod Vlasov.
536
537         Remove inadvertent object property assignment.
538
539         * inspector/front-end/OverridesView.js:
540
541 2012-12-10  Michael Brüning  <michael.bruning@digia.com>
542
543         [Qt] Builds for Mac are tied to the OS system instead of the SDK version.
544         https://bugs.webkit.org/show_bug.cgi?id=104529
545
546         Reviewed by Simon Hausmann.
547
548         Using work by Eike Ziller <eike.ziller@digia.com>.
549
550         The build system now first tries to assign the correct system libraries
551         for the SDK being used for Mac builds. If this does not yield any
552         result, it falls back to using the Mac OS version to determine the
553         correct library.
554
555         No new tests (not applicable).
556
557         * WebCore.pri:
558
559 2012-12-10  Ilya Tikhonovsky  <loislo@chromium.org>
560
561         Unreviewed: touch RenderingAllInOne.cpp to fix Apple Windows builder.
562
563         * rendering/RenderingAllInOne.cpp:
564
565 2012-12-10  Eugene Klyuchnikov  <eustas@chromium.org>
566
567         Web Inspector: Network: newly added items are not filtered.
568         https://bugs.webkit.org/show_bug.cgi?id=104021
569
570         Reviewed by Vsevolod Vlasov.
571
572         Extracted method to higlight/hide record according to filter.
573         Used this method to process newly created records.
574
575         * inspector/front-end/NetworkPanel.js:
576         (WebInspector.NetworkLogView.prototype._applyFilter): Extracted.
577         (WebInspector.NetworkLogView.prototype.performFilter): Refactored.
578
579 2012-12-09  Ilya Tikhonovsky  <loislo@chromium.org>
580
581         Web Inspector: Unreviewed: move reportMemoryUsage to public section.
582
583         * rendering/RenderBlock.h:
584         (RenderBlock):
585         * rendering/RenderBox.h:
586         (RenderBox):
587
588 2012-12-08  Pavel Feldman  <pfeldman@chromium.org>
589
590         Web Inspector: adds an option to remove toolbar icons.
591         https://bugs.webkit.org/show_bug.cgi?id=95654
592
593         Reviewed by Vsevolod Vlasov.
594
595         - removes compact mode in favor or dock-to-bottom
596         - introduces setting for hiding toolbar icons
597
598         * inspector/front-end/DockController.js:
599         (WebInspector.DockController.prototype._toggleDockState):
600         * inspector/front-end/Settings.js:
601         (WebInspector.ExperimentsSettings):
602         * inspector/front-end/Toolbar.js:
603         (WebInspector.Toolbar.prototype.setDockedToBottom):
604         (WebInspector.Toolbar.prototype._toolbarDragStart):
605         (WebInspector.Toolbar.prototype._toolbarDrag):
606         * inspector/front-end/helpScreen.css:
607         (body.dock-to-bottom .help-content):
608         * inspector/front-end/inspector.css:
609         (body.dock-to-bottom #toolbar):
610         (body.no-toolbar-icons #toolbar):
611         (body.dock-to-bottom.port-qt #toolbar):
612         (body.dock-to-bottom.inactive #toolbar):
613         (body.no-toolbar-icons .toolbar-item.toggleable):
614         (body.dock-to-bottom .toolbar-item.toggleable):
615         (body.dock-to-bottom .toolbar-icon):
616         (body.no-toolbar-icons .toolbar-icon):
617         (body.no-toolbar-icons #main):
618         (body.dock-to-bottom .toolbar-icon.custom-toolbar-icon):
619         (body.dock-to-bottom .toolbar-item:active .toolbar-icon):
620         (body.dock-to-bottom .toolbar-label):
621         (body.dock-to-bottom #search-toolbar-label):
622         (body.no-toolbar-icons .toolbar-label):
623         (body.no-toolbar-icons #toolbar-dropdown):
624         (#toolbar-dropdown .scrollable-content):
625         (#toolbar-dropdown .toolbar-item.toggleable:hover):
626         (body.no-toolbar-icons #toolbar-dropdown .toolbar-label):
627         (body.no-toolbar-icons #toolbar-dropdown .toolbar-item):
628         (body.dock-to-bottom .toolbar-item.resources .toolbar-icon):
629         (body.dock-to-bottom .toolbar-item.network .toolbar-icon):
630         (body.dock-to-bottom .toolbar-item.scripts .toolbar-icon):
631         (body.dock-to-bottom .toolbar-item.timeline .toolbar-icon):
632         (body.dock-to-bottom .toolbar-item.profiles .toolbar-icon):
633         (body.dock-to-bottom .toolbar-item.audits .toolbar-icon):
634         (body.dock-to-bottom .toolbar-item.console .toolbar-icon):
635         (body.dock-to-bottom.port-qt .toolbar-item.close-left, body.dock-to-bottom.port-qt .toolbar-item.close-right):
636         (body.dock-to-bottom #main):
637
638 2012-12-10  Kent Tamura  <tkent@chromium.org>
639
640         Refactoring: Remove HTMLFormControlElement::autofocus
641         https://bugs.webkit.org/show_bug.cgi?id=104524
642
643         Reviewed by Kentaro Hara.
644
645         autofocus function is used only by HTMLFormControlElement itself, no
646         sub-classes override it, and it is not exposed via an IDL attribute,
647
648         No new tests. This doesn't make any behavior changes.
649
650         * html/HTMLFormControlElement.cpp:
651         (WebCore::shouldAutofocus): Use fastHasAttribute instead of autofocus().
652         * html/HTMLFormControlElement.h: Remove autofocus().
653
654 2012-12-10  Jonathan Liu  <net147@gmail.com>
655
656         Fix GC3Dintptr and GC3Dsizeiptr typedefs for Win64
657         https://bugs.webkit.org/show_bug.cgi?id=104426
658
659         Reviewed by Simon Hausmann.
660
661         The GC3Dintptr and GC3Dsizeiptr typedefs are incorrect for Win64 as
662         LLP64 is used there. This would result in compile error due to
663         narrowing conversion of 64-bit pointer to signed long int which is
664         32-bit.
665
666         * platform/graphics/GraphicsTypes3D.h:
667
668 2012-12-10  Kent Tamura  <tkent@chromium.org>
669
670         Refactoring: Introduce HTMLFormControlElement::isDisabledOrReadOnly
671         https://bugs.webkit.org/show_bug.cgi?id=104508
672
673         Reviewed by Kentaro Hara.
674
675         We have a lot of code like element->disabled || element->readOnly().
676         isDisabledOrReadOnly makes them simpler.
677
678         No new tests. This make no behaivor change.
679
680         * html/HTMLFormControlElement.h:
681         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
682         Added. Note that the implmentation of disabled() is not just "return m_disabled;".
683
684         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
685         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
686         Use isDisabledOrReadOnly.
687         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
688         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToMouseEvents): Ditto.
689         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrReadOnly): Ditto.
690         * html/ColorInputType.cpp:
691         (WebCore::ColorInputType::handleDOMActivateEvent): Ditto.
692         (WebCore::ColorInputType::didChooseColor): Ditto.
693         * html/HTMLFormControlElement.cpp:
694         (WebCore::HTMLFormControlElement::recalcWillValidate): Ditto.
695         * html/HTMLTextAreaElement.h:
696         (WebCore::HTMLTextAreaElement::valueMissing): Ditto.
697         * html/RangeInputType.cpp:
698         (WebCore::RangeInputType::handleMouseDownEvent): Ditto.
699         (WebCore::RangeInputType::handleTouchEvent): Ditto.
700         (WebCore::RangeInputType::handleKeydownEvent): Ditto.
701         * html/SearchInputType.cpp:
702         (WebCore::SearchInputType::handleKeydownEvent): Ditto.
703         * html/TextFieldInputType.cpp:
704         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): Ditto.
705         (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents): Ditto.
706         * html/shadow/TextControlInnerElements.cpp:
707         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Ditto.
708         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Ditto.
709         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Ditto.
710         * html/shadow/TextFieldDecorationElement.cpp:
711         (WebCore::TextFieldDecorationElement::defaultEventHandler): Ditto.
712         (WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Ditto.
713         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents): Ditto.
714
715 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
716
717         Web Inspector: console broken? - console.dirxml behaves like console.log
718         https://bugs.webkit.org/show_bug.cgi?id=104245
719
720         Reviewed by Vsevolod Vlasov.
721
722         Do not generate preview for dirxml.
723
724         * inspector/front-end/ConsoleMessage.js:
725         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
726
727 2012-12-10  Kent Tamura  <tkent@chromium.org>
728
729         Refactoring: Remove HTMLFormControlElement::setDisabled
730         https://bugs.webkit.org/show_bug.cgi?id=104510
731
732         Reviewed by Kentaro Hara.
733
734         Remove it because the number of call sites is only one, and the
735         setDisabled implementation is equivalent to setBooleanAttribute.
736
737         No new tests. This should not make behavior changes.
738
739         * html/HTMLFormControlElement.cpp: Remove setDisabled.
740         * html/HTMLFormControlElement.h: Ditto.
741         * html/FileInputType.cpp:
742         (WebCore::FileInputType::disabledAttributeChanged):
743         Replace setDisabled with setBooleanAttribute.
744
745 2012-12-10  Hajime Morrita  <morrita@google.com>
746
747         [Shadow DOM][Refacdtoring] nextTo() and previousTo() can be part of ContentDistribution
748         https://bugs.webkit.org/show_bug.cgi?id=104514
749
750         Reviewed by Kentaro Hara.
751
752         InsertionPoint::nextTo() and InsertionPoint::previousTo() are an
753         query to distributed nodes, which is what ContentDistribution
754         represents. We can move them to better home.
755
756         No new tests. No behavior change.
757
758         * html/shadow/ContentDistributor.cpp:
759         (WebCore::ContentDistribution::nextTo): Moved from InsertionPoint
760         (WebCore):
761         (WebCore::ContentDistribution::previousTo): Moved from InsertionPoint
762         * html/shadow/ContentDistributor.h:
763         (ContentDistribution):
764         * html/shadow/InsertionPoint.cpp:
765         * html/shadow/InsertionPoint.h:
766         (WebCore::InsertionPoint::nextTo): Delegated to ContentDistribution
767         (WebCore::InsertionPoint::previousTo): Delegated to ContentDistribution
768
769 2012-12-10  Joanmarie Diggs  <jdiggs@igalia.com>
770
771         [GTK] accessibility/language-attribute.html is failing
772         https://bugs.webkit.org/show_bug.cgi?id=98369
773
774         Reviewed by Chris Fleizach.
775
776         The test is failing for two reasons: Not exposing the language
777         for accessible objects and AccessibilityUIElement::language() not
778         being implemented.
779
780         No new tests; instead, unskipped the previously-failing test.
781
782         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
783         (getAttributeSetForAccessibilityObject): Expose the language via AtkText attribute
784
785 2012-12-09  Takashi Sakamoto  <tasak@google.com>
786
787         [Shadow DOM]: reset-style-inheritance doesn't work for insertion point
788         https://bugs.webkit.org/show_bug.cgi?id=103711
789
790         Reviewed by Hajime Morita.
791
792         reset-style-inheritance can be specified by using insertion points'
793         attribute, e.g. <content reset-style-inheritance>.
794         c.f. shadow dom spec:
795         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles
796
797         No new tests. Updated an existing test,
798         fast/dom/shadow/insertion-point-resetStyleInheritance.html to cover
799         this feature.
800
801         * html/HTMLAttributeNames.in:
802         Added HTMLNames::reset_style_inheritanceAttr.
803         * html/shadow/InsertionPoint.cpp:
804         (WebCore::InsertionPoint::InsertionPoint):
805         (WebCore::InsertionPoint::parseAttribute):
806         Since both shadow and content elements have to support
807         reset-style-inheritance, added InsertionPoint::parseAttribute.
808         (WebCore::InsertionPoint::resetStyleInheritance):
809         (WebCore::InsertionPoint::setResetStyleInheritance):
810         Modified to update reset-style-inheritance attribute value.
811         * html/shadow/InsertionPoint.h:
812         (InsertionPoint):
813         Removed m_shouldResetStyleInheritance. Instead, use
814         reset-style-inheritance attribute value.
815
816 2012-12-09  Ilya Tikhonovsky  <loislo@chromium.org>
817
818         Native Memory Instrumentation: instrument a part of RenderObject class tree.
819         https://bugs.webkit.org/show_bug.cgi?id=103564
820
821         Reviewed by Eric Seidel.
822
823         Many RenderObject descendants have OwnPtrs and RefPtrs members.
824         Looks like we have to instrument all the RenderObject classes and visit
825         all the render objects instead of counting entire render arena memory.
826
827         * WebCore.exp.in:
828         * dom/Node.cpp:
829         (WebCore::Node::reportMemoryUsage):
830         * dom/WebCoreMemoryInstrumentation.cpp:
831         (WebCore):
832         * inspector/InspectorMemoryAgent.cpp:
833         (WebCore::reportRenderTreeInfo):
834         (WebCore):
835         * platform/PlatformMemoryInstrumentation.cpp:
836         (WebCore):
837         * platform/PlatformMemoryInstrumentation.h:
838         (PlatformMemoryTypes):
839         * platform/graphics/GraphicsLayer.cpp:
840         (WebCore::GraphicsLayer::reportMemoryUsage):
841         (WebCore):
842         * platform/graphics/GraphicsLayer.h:
843         (GraphicsLayer):
844         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
845         (WebCore::GraphicsLayerChromium::reportMemoryUsage):
846         (WebCore):
847         * platform/graphics/chromium/GraphicsLayerChromium.h:
848         (GraphicsLayerChromium):
849         * rendering/RenderBlock.cpp:
850         (WebCore::RenderBlock::reportMemoryUsage):
851         (WebCore):
852         * rendering/RenderBlock.h:
853         (RenderBlock):
854         * rendering/RenderBox.cpp:
855         (WebCore::RenderBox::reportMemoryUsage):
856         (WebCore):
857         * rendering/RenderBox.h:
858         (RenderBox):
859         * rendering/RenderInline.cpp:
860         (WebCore::RenderInline::reportMemoryUsage):
861         (WebCore):
862         * rendering/RenderInline.h:
863         (RenderInline):
864         * rendering/RenderLayer.cpp:
865         (WebCore::RenderLayer::reportMemoryUsage):
866         (WebCore):
867         * rendering/RenderLayer.h:
868         (RenderLayer):
869         * rendering/RenderLayerBacking.cpp:
870         (WebCore::RenderLayerBacking::reportMemoryUsage):
871         (WebCore):
872         * rendering/RenderLayerBacking.h:
873         (RenderLayerBacking):
874         * rendering/RenderLayerCompositor.cpp:
875         (WebCore::RenderLayerCompositor::reportMemoryUsage):
876         (WebCore):
877         * rendering/RenderLayerCompositor.h:
878         (RenderLayerCompositor):
879         * rendering/RenderLayerModelObject.cpp:
880         (WebCore::RenderLayerModelObject::reportMemoryUsage):
881         (WebCore):
882         * rendering/RenderLayerModelObject.h:
883         (RenderLayerModelObject):
884         * rendering/RenderObject.cpp:
885         (WebCore::RenderObject::reportMemoryUsage):
886         (WebCore):
887         * rendering/RenderObject.h:
888         (RenderObject):
889         * rendering/RenderText.cpp:
890         (WebCore::RenderText::reportMemoryUsage):
891         (WebCore):
892         * rendering/RenderText.h:
893         (RenderText):
894         * rendering/RenderView.cpp:
895         (WebCore::RenderView::reportMemoryUsage):
896         (WebCore):
897         * rendering/RenderView.h:
898         (RenderView):
899
900 2012-12-09  Ryosuke Niwa  <rniwa@webkit.org>
901
902         REGRESSION (r137003): failures in MicroData tests on EFL, GTK
903         https://bugs.webkit.org/show_bug.cgi?id=104469
904
905         Reviewed by Darin Adler.
906
907         Fix the regression by calling propertyNodeList on HTMLPropertiesCollection
908         in the named getter for HTMLCollection. It's a miracle that the old code prior to r137003
909         worked at all since the return type of namedItem was different.
910
911         Existing tests cover this.
912
913         * bindings/js/JSHTMLCollectionCustom.cpp:
914         (WebCore::JSHTMLCollection::nameGetter):
915         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
916         (WebCore::V8HTMLCollection::namedPropertyGetter):
917
918 2012-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
919
920         [GTK] accessibility/placeholder.html is failing
921         https://bugs.webkit.org/show_bug.cgi?id=98373
922
923         Reviewed by Martin Robinson.
924
925         The test was failing because the placeholder text was not supported and
926         AccessibilityUIElement::stringAttributeValue() was not implemented.
927
928         No new tests; instead the failing test was unskipped.
929
930         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
931         (webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute
932         of the AtkObject, as is done in Gtk+ 3.
933
934 2012-12-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
935
936         [EFL] [WebGL] Path is not resized correctly.
937         https://bugs.webkit.org/show_bug.cgi?id=104458.
938
939         Reviewed by Kenneth Rohde Christiansen.
940
941         In GraphicsContext3D::paintToCanvas, we flip the contents and draw on the surface.
942         The operations done to flip the image (translation and scale) are done before rectangle with correct size
943         is added to current path. This resulted in updating pixels at wrong positions.
944
945         Covered by existing tests.
946
947         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
948         (WebCore::GraphicsContext3D::paintToCanvas):
949
950 2012-12-09  Joone Hur  <joone.hur@intel.com>
951
952         [GTK][AC] build fix after r130525 and r133332
953         https://bugs.webkit.org/show_bug.cgi?id=104491
954
955         Reviewed by Martin Robinson.
956
957         Build fix for Accelerated Compositing Clutter backend after r130525 and r133332.
958
959         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
960         * platform/gtk/RedirectedXCompositeWindow.cpp:
961         * platform/gtk/RedirectedXCompositeWindow.h:
962
963 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
964
965         [GTK] Use GObject casts instead of C++ cast for GObjects in DOM bindings
966         https://bugs.webkit.org/show_bug.cgi?id=104492
967
968         Reviewed by Martin Robinson.
969
970         * bindings/scripts/CodeGeneratorGObject.pm:
971         (GenerateCFile):
972         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
973         (WebKit::kit):
974         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
975         (WebKit::kit):
976         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
977         (WebKit::kit):
978         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
979         (WebKit::kit):
980         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
981         (WebKit::kit):
982         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
983         (WebKit::kit):
984         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
985         (WebKit::kit):
986         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
987         (WebKit::kit):
988         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
989         (WebKit::kit):
990         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
991         (WebKit::kit):
992         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
993         (WebKit::kit):
994         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
995         (WebKit::kit):
996         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
997         (WebKit::kit):
998         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
999         (WebKit::kit):
1000
1001 2012-12-09  Pavel Feldman  <pfeldman@chromium.org>
1002
1003         Web Inspector: do not treat object as equal to itself when logging to console
1004         https://bugs.webkit.org/show_bug.cgi?id=104487
1005
1006         Reviewed by Alexander Pavlov.
1007
1008         Otherwise, mutating object in a loop results in the repeat count update instead of generation of the new preview.
1009
1010         Test: inspector/console/console-object-preview.html
1011
1012         * inspector/ConsoleMessage.cpp:
1013         (WebCore::ConsoleMessage::isEqual):
1014
1015 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1016
1017         Remove unused code in GObject DOM bindings generator
1018         https://bugs.webkit.org/show_bug.cgi?id=104490
1019
1020         Reviewed by Martin Robinson.
1021
1022         * bindings/scripts/CodeGeneratorGObject.pm:
1023         (GenerateProperties): Remove code to install event listeners and
1024         signals.
1025
1026 2012-12-09  Zan Dobersek  <zandobersek@gmail.com>
1027
1028         Unreviewed update for the GObject bindings after r137074 and r137078.
1029
1030         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1031         (webkit_dom_test_event_target_dispatch_event):
1032         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1033         (webkit_dom_test_interface_supplemental_method2):
1034         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1035         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
1036         (webkit_dom_test_obj_method_with_exception):
1037         (webkit_dom_test_obj_with_script_state_void_exception):
1038         (webkit_dom_test_obj_with_script_state_obj_exception):
1039         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
1040         (webkit_dom_test_obj_strict_function):
1041         (webkit_dom_test_obj_get_attr_with_getter_exception):
1042         (webkit_dom_test_obj_set_attr_with_setter_exception):
1043         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
1044         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
1045         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
1046         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
1047         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
1048
1049 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1050
1051         Fix the GError check in GObject DOM bindings.
1052
1053         Reviewed by Xan Lopez.
1054
1055         Previous commit introduced a check to make sure the passed GError
1056         is valid in all DOM methods receiving an error.
1057
1058         * bindings/scripts/CodeGeneratorGObject.pm:
1059         (GetGReturnMacro): Check that the passed GError either is NULL or
1060         the pointer has been initialized to NULL.
1061
1062 2012-12-09  Leo Yang  <leoyang@rim.com>
1063
1064         [BlackBerry] Adapt to name change of createNetworkBufferByCopyingData()
1065         https://bugs.webkit.org/show_bug.cgi?id=104449
1066
1067         Reviewed by Rob Buis.
1068
1069         Name change no new tests.
1070
1071         * platform/network/blackberry/rss/RSSFilterStream.cpp:
1072         (WebCore::RSSFilterStream::handleRSSContent):
1073
1074 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1075
1076         [GTK] Clean up g_return macros usage in GObject DOM bindings
1077         https://bugs.webkit.org/show_bug.cgi?id=101079
1078
1079         Reviewed by Xan Lopez.
1080
1081         Several improvements:
1082
1083           - Move g_return macros at the beginning of the methods.
1084           - Use them only to check parameters of public API.
1085           - Use GObject macros to check GObjects.
1086           - Check also GError parameters.
1087           - Use early returns in kit and core methods, since they should
1088             work even if g_return macros are disabled handling NULL
1089             gracefully.
1090
1091         * bindings/scripts/CodeGeneratorGObject.pm:
1092         (GetGReturnMacro):
1093         (GenerateFunction):
1094         (GenerateCFile):
1095         (Generate):
1096         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1097         (WebKit::kit):
1098         (WebKit::core):
1099         (WebKit::wrapFloat64Array):
1100         (webkit_dom_float64array_foo):
1101         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1102         (WebKit::kit):
1103         (WebKit::core):
1104         (WebKit::wrapTestActiveDOMObject):
1105         (webkit_dom_test_active_dom_object_exciting_function):
1106         (webkit_dom_test_active_dom_object_post_message):
1107         (webkit_dom_test_active_dom_object_get_exciting_attr):
1108         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1109         (WebKit::kit):
1110         (WebKit::core):
1111         (WebKit::wrapTestCallback):
1112         (webkit_dom_test_callback_callback_with_no_param):
1113         (webkit_dom_test_callback_callback_with_class1param):
1114         (webkit_dom_test_callback_callback_with_class2param):
1115         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1116         (webkit_dom_test_callback_callback_with_string_list):
1117         (webkit_dom_test_callback_callback_with_boolean):
1118         (webkit_dom_test_callback_callback_requires_this_to_pass):
1119         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1120         (WebKit::kit):
1121         (WebKit::core):
1122         (WebKit::wrapTestCustomNamedGetter):
1123         (webkit_dom_test_custom_named_getter_another_function):
1124         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1125         (WebKit::kit):
1126         (WebKit::core):
1127         (WebKit::wrapTestEventConstructor):
1128         (webkit_dom_test_event_constructor_get_attr1):
1129         (webkit_dom_test_event_constructor_get_attr2):
1130         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1131         (WebKit::kit):
1132         (WebKit::core):
1133         (WebKit::wrapTestEventTarget):
1134         (webkit_dom_test_event_target_item):
1135         (webkit_dom_test_event_target_dispatch_event):
1136         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1137         (WebKit::kit):
1138         (WebKit::core):
1139         (WebKit::wrapTestException):
1140         (webkit_dom_test_exception_get_name):
1141         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1142         (WebKit::kit):
1143         (WebKit::core):
1144         (WebKit::wrapTestInterface):
1145         (webkit_dom_test_interface_supplemental_method1):
1146         (webkit_dom_test_interface_supplemental_method2):
1147         (webkit_dom_test_interface_supplemental_method4):
1148         (webkit_dom_test_interface_get_supplemental_str1):
1149         (webkit_dom_test_interface_get_supplemental_str2):
1150         (webkit_dom_test_interface_set_supplemental_str2):
1151         (webkit_dom_test_interface_get_supplemental_node):
1152         (webkit_dom_test_interface_set_supplemental_node):
1153         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1154         (WebKit::kit):
1155         (WebKit::core):
1156         (WebKit::wrapTestMediaQueryListListener):
1157         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1158         (WebKit::kit):
1159         (WebKit::core):
1160         (WebKit::wrapTestNamedConstructor):
1161         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1162         (WebKit::kit):
1163         (WebKit::core):
1164         (WebKit::wrapTestNode):
1165         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1166         (WebKit::kit):
1167         (WebKit::core):
1168         (WebKit::wrapTestObj):
1169         (webkit_dom_test_obj_void_method):
1170         (webkit_dom_test_obj_void_method_with_args):
1171         (webkit_dom_test_obj_long_method):
1172         (webkit_dom_test_obj_long_method_with_args):
1173         (webkit_dom_test_obj_obj_method):
1174         (webkit_dom_test_obj_obj_method_with_args):
1175         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
1176         (webkit_dom_test_obj_serialized_value):
1177         (webkit_dom_test_obj_idb_key):
1178         (webkit_dom_test_obj_options_object):
1179         (webkit_dom_test_obj_method_with_exception):
1180         (webkit_dom_test_obj_with_script_state_void):
1181         (webkit_dom_test_obj_with_script_state_obj):
1182         (webkit_dom_test_obj_with_script_state_void_exception):
1183         (webkit_dom_test_obj_with_script_state_obj_exception):
1184         (webkit_dom_test_obj_with_script_execution_context):
1185         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
1186         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
1187         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
1188         (webkit_dom_test_obj_method_with_optional_arg):
1189         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
1190         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
1191         (webkit_dom_test_obj_method_with_optional_string):
1192         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
1193         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
1194         (webkit_dom_test_obj_conditional_method1):
1195         (webkit_dom_test_obj_conditional_method2):
1196         (webkit_dom_test_obj_conditional_method3):
1197         (webkit_dom_test_obj_class_method):
1198         (webkit_dom_test_obj_class_method_with_optional):
1199         (webkit_dom_test_obj_overloaded_method1):
1200         (webkit_dom_test_obj_convert1):
1201         (webkit_dom_test_obj_convert2):
1202         (webkit_dom_test_obj_convert4):
1203         (webkit_dom_test_obj_convert5):
1204         (webkit_dom_test_obj_mutable_point_function):
1205         (webkit_dom_test_obj_immutable_point_function):
1206         (webkit_dom_test_obj_orange):
1207         (webkit_dom_test_obj_strict_function):
1208         (webkit_dom_test_obj_variadic_string_method):
1209         (webkit_dom_test_obj_variadic_double_method):
1210         (webkit_dom_test_obj_variadic_node_method):
1211         (webkit_dom_test_obj_get_read_only_long_attr):
1212         (webkit_dom_test_obj_get_read_only_string_attr):
1213         (webkit_dom_test_obj_get_read_only_test_obj_attr):
1214         (webkit_dom_test_obj_get_short_attr):
1215         (webkit_dom_test_obj_set_short_attr):
1216         (webkit_dom_test_obj_get_unsigned_short_attr):
1217         (webkit_dom_test_obj_set_unsigned_short_attr):
1218         (webkit_dom_test_obj_get_long_attr):
1219         (webkit_dom_test_obj_set_long_attr):
1220         (webkit_dom_test_obj_get_long_long_attr):
1221         (webkit_dom_test_obj_set_long_long_attr):
1222         (webkit_dom_test_obj_get_unsigned_long_long_attr):
1223         (webkit_dom_test_obj_set_unsigned_long_long_attr):
1224         (webkit_dom_test_obj_get_string_attr):
1225         (webkit_dom_test_obj_set_string_attr):
1226         (webkit_dom_test_obj_get_test_obj_attr):
1227         (webkit_dom_test_obj_set_test_obj_attr):
1228         (webkit_dom_test_obj_get_xml_obj_attr):
1229         (webkit_dom_test_obj_set_xml_obj_attr):
1230         (webkit_dom_test_obj_get_create):
1231         (webkit_dom_test_obj_set_create):
1232         (webkit_dom_test_obj_get_reflected_string_attr):
1233         (webkit_dom_test_obj_set_reflected_string_attr):
1234         (webkit_dom_test_obj_get_reflected_integral_attr):
1235         (webkit_dom_test_obj_set_reflected_integral_attr):
1236         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
1237         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
1238         (webkit_dom_test_obj_get_reflected_boolean_attr):
1239         (webkit_dom_test_obj_set_reflected_boolean_attr):
1240         (webkit_dom_test_obj_get_reflected_url_attr):
1241         (webkit_dom_test_obj_set_reflected_url_attr):
1242         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
1243         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
1244         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
1245         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
1246         (webkit_dom_test_obj_get_reflected_custom_url_attr):
1247         (webkit_dom_test_obj_set_reflected_custom_url_attr):
1248         (webkit_dom_test_obj_get_attr_with_getter_exception):
1249         (webkit_dom_test_obj_set_attr_with_getter_exception):
1250         (webkit_dom_test_obj_get_attr_with_setter_exception):
1251         (webkit_dom_test_obj_set_attr_with_setter_exception):
1252         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
1253         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
1254         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
1255         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
1256         (webkit_dom_test_obj_get_with_script_state_attribute):
1257         (webkit_dom_test_obj_set_with_script_state_attribute):
1258         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
1259         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
1260         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
1261         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
1262         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
1263         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
1264         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
1265         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
1266         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
1267         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
1268         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
1269         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
1270         (webkit_dom_test_obj_get_conditional_attr1):
1271         (webkit_dom_test_obj_set_conditional_attr1):
1272         (webkit_dom_test_obj_get_conditional_attr2):
1273         (webkit_dom_test_obj_set_conditional_attr2):
1274         (webkit_dom_test_obj_get_conditional_attr3):
1275         (webkit_dom_test_obj_set_conditional_attr3):
1276         (webkit_dom_test_obj_get_any_attribute):
1277         (webkit_dom_test_obj_set_any_attribute):
1278         (webkit_dom_test_obj_get_content_document):
1279         (webkit_dom_test_obj_get_mutable_point):
1280         (webkit_dom_test_obj_set_mutable_point):
1281         (webkit_dom_test_obj_get_immutable_point):
1282         (webkit_dom_test_obj_set_immutable_point):
1283         (webkit_dom_test_obj_get_strawberry):
1284         (webkit_dom_test_obj_set_strawberry):
1285         (webkit_dom_test_obj_get_strict_float):
1286         (webkit_dom_test_obj_set_strict_float):
1287         (webkit_dom_test_obj_get_description):
1288         (webkit_dom_test_obj_get_id):
1289         (webkit_dom_test_obj_set_id):
1290         (webkit_dom_test_obj_get_hash):
1291         (webkit_dom_test_obj_get_replaceable_attribute):
1292         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1293         (WebKit::kit):
1294         (WebKit::core):
1295         (WebKit::wrapTestSerializedScriptValueInterface):
1296         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
1297         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
1298         (webkit_dom_test_serialized_script_value_interface_get_value):
1299         (webkit_dom_test_serialized_script_value_interface_set_value):
1300         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
1301         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
1302         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
1303         (webkit_dom_test_serialized_script_value_interface_get_ports):
1304         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
1305
1306 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1307
1308         [GTK] Use a private struct and placement new syntax in GObject DOM bindings
1309         https://bugs.webkit.org/show_bug.cgi?id=101074
1310
1311         Reviewed by Xan Lopez.
1312
1313         It allows to use RefPtr for the wrapped object and it simplifies
1314         the code. Only the classes deriving from WebKitDOMObject keep a
1315         reference of the wrapped object in a private struct. The wrapped
1316         object is added to the cache in GObjectClass::constructor() and
1317         removed in GObjectClass::finalize().
1318
1319         * bindings/gobject/WebKitDOMBinding.cpp:
1320         (WebKit::createWrapper):
1321         (WebKit::kit):
1322         (WebKit::wrapEventTarget):
1323         * bindings/scripts/CodeGeneratorGObject.pm:
1324         (GetParentImplClassName):
1325         (GenerateProperties):
1326         (GenerateCFile):
1327         (Generate):
1328         (WriteData):
1329         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1330         (WebKit::kit):
1331         (WebKit::core):
1332         (WebKit::wrapFloat64Array):
1333         (webkit_dom_float64array_class_init):
1334         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1335         (_WebKitDOMTestActiveDOMObjectPrivate):
1336         (WebKit::kit):
1337         (WebKit::core):
1338         (WebKit::wrapTestActiveDOMObject):
1339         (webkit_dom_test_active_dom_object_finalize):
1340         (webkit_dom_test_active_dom_object_constructor):
1341         (webkit_dom_test_active_dom_object_class_init):
1342         (webkit_dom_test_active_dom_object_init):
1343         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1344         (_WebKitDOMTestCallbackPrivate):
1345         (WebKit::kit):
1346         (WebKit::core):
1347         (WebKit::wrapTestCallback):
1348         (webkit_dom_test_callback_finalize):
1349         (webkit_dom_test_callback_constructor):
1350         (webkit_dom_test_callback_class_init):
1351         (webkit_dom_test_callback_init):
1352         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1353         (_WebKitDOMTestCustomNamedGetterPrivate):
1354         (WebKit::kit):
1355         (WebKit::core):
1356         (WebKit::wrapTestCustomNamedGetter):
1357         (webkit_dom_test_custom_named_getter_finalize):
1358         (webkit_dom_test_custom_named_getter_constructor):
1359         (webkit_dom_test_custom_named_getter_class_init):
1360         (webkit_dom_test_custom_named_getter_init):
1361         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1362         (_WebKitDOMTestEventConstructorPrivate):
1363         (WebKit::kit):
1364         (WebKit::core):
1365         (WebKit::wrapTestEventConstructor):
1366         (webkit_dom_test_event_constructor_finalize):
1367         (webkit_dom_test_event_constructor_constructor):
1368         (webkit_dom_test_event_constructor_class_init):
1369         (webkit_dom_test_event_constructor_init):
1370         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1371         (_WebKitDOMTestEventTargetPrivate):
1372         (WebKit::kit):
1373         (WebKit::core):
1374         (WebKit::wrapTestEventTarget):
1375         (webkit_dom_test_event_target_finalize):
1376         (webkit_dom_test_event_target_constructor):
1377         (webkit_dom_test_event_target_class_init):
1378         (webkit_dom_test_event_target_init):
1379         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1380         (_WebKitDOMTestExceptionPrivate):
1381         (WebKit::kit):
1382         (WebKit::core):
1383         (WebKit::wrapTestException):
1384         (webkit_dom_test_exception_finalize):
1385         (webkit_dom_test_exception_constructor):
1386         (webkit_dom_test_exception_class_init):
1387         (webkit_dom_test_exception_init):
1388         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1389         (_WebKitDOMTestInterfacePrivate):
1390         (WebKit::kit):
1391         (WebKit::core):
1392         (WebKit::wrapTestInterface):
1393         (webkit_dom_test_interface_finalize):
1394         (webkit_dom_test_interface_constructor):
1395         (webkit_dom_test_interface_class_init):
1396         (webkit_dom_test_interface_init):
1397         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1398         (_WebKitDOMTestMediaQueryListListenerPrivate):
1399         (WebKit::kit):
1400         (WebKit::core):
1401         (WebKit::wrapTestMediaQueryListListener):
1402         (webkit_dom_test_media_query_list_listener_finalize):
1403         (webkit_dom_test_media_query_list_listener_constructor):
1404         (webkit_dom_test_media_query_list_listener_class_init):
1405         (webkit_dom_test_media_query_list_listener_init):
1406         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1407         (_WebKitDOMTestNamedConstructorPrivate):
1408         (WebKit::kit):
1409         (WebKit::core):
1410         (WebKit::wrapTestNamedConstructor):
1411         (webkit_dom_test_named_constructor_finalize):
1412         (webkit_dom_test_named_constructor_constructor):
1413         (webkit_dom_test_named_constructor_class_init):
1414         (webkit_dom_test_named_constructor_init):
1415         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1416         (WebKit::kit):
1417         (WebKit::core):
1418         (WebKit::wrapTestNode):
1419         (webkit_dom_test_node_class_init):
1420         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1421         (_WebKitDOMTestObjPrivate):
1422         (WebKit::kit):
1423         (WebKit::core):
1424         (WebKit::wrapTestObj):
1425         (webkit_dom_test_obj_finalize):
1426         (webkit_dom_test_obj_constructor):
1427         (webkit_dom_test_obj_class_init):
1428         (webkit_dom_test_obj_init):
1429         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
1430         (_WebKitDOMTestOverloadedConstructorsPrivate):
1431         (WebKit::kit):
1432         (WebKit::core):
1433         (WebKit::wrapTestOverloadedConstructors):
1434         (webkit_dom_test_overloaded_constructors_finalize):
1435         (webkit_dom_test_overloaded_constructors_constructor):
1436         (webkit_dom_test_overloaded_constructors_class_init):
1437         (webkit_dom_test_overloaded_constructors_init):
1438         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1439         (_WebKitDOMTestSerializedScriptValueInterfacePrivate):
1440         (WebKit::kit):
1441         (WebKit::core):
1442         (WebKit::wrapTestSerializedScriptValueInterface):
1443         (webkit_dom_test_serialized_script_value_interface_finalize):
1444         (webkit_dom_test_serialized_script_value_interface_constructor):
1445         (webkit_dom_test_serialized_script_value_interface_class_init):
1446         (webkit_dom_test_serialized_script_value_interface_init):
1447
1448 2012-12-09  Jon Lee  <jonlee@apple.com>
1449
1450         [WK2] Move button image to injected bundle
1451         https://bugs.webkit.org/show_bug.cgi?id=104107
1452         <rdar://problem/12813842>
1453
1454         Reviewed by Simon Fraser.
1455
1456         Update RenderSnapshottedPlugIn to retrieve the start button image from the ChromeClient. Expand the
1457         kinds of images available for use as the button. Try to find the best sized button to use for the plug-in,
1458         otherwise use no image at all.
1459
1460         * rendering/RenderSnapshottedPlugIn.h: Add an enum representing the size to use. Remove the label rect
1461         variable since it is unneeded.
1462         * rendering/RenderSnapshottedPlugIn.cpp:
1463         (WebCore::RenderSnapshottedPlugIn::startLabelImage): Maintain a cache of the images for reuse. Index into the
1464         array using the enum. If the image has been loaded, or an attempt was made, then return the result. Otherwise
1465         ask the chrome client for the image.
1466         (WebCore::RenderSnapshottedPlugIn::paintLabel): Determine the proper label to use, and paint if the image is
1467         available.
1468         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): Compare the label size with the provided content
1469         box. Return a LayoutRect representing the label's placement. If it doesn't fit, return an empty rect.
1470         (WebCore::RenderSnapshottedPlugIn::layout): The rect is not needed because it is all determined at paint time.
1471
1472         * page/ChromeClient.h:
1473         (WebCore::ChromeClient::plugInStartLabelImage): Added.
1474
1475         * WebCore.exp.in: Expose GraphicsContext::drawNativeImage() for WKImageCG.cpp.
1476         * WebCore.xcodeproj/project.pbxproj: Remove start button assets.
1477         * Resources/startButton.png: Removed.
1478         * Resources/startButton@2x.png: Removed.
1479
1480 2012-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1481
1482         Unreviewed, rolling out r137053.
1483         http://trac.webkit.org/changeset/137053
1484         https://bugs.webkit.org/show_bug.cgi?id=104471
1485
1486         Broke PerformanceTests/Parser/html-parser.html (Requested by
1487         mkwst_ on #webkit).
1488
1489         * bindings/ScriptControllerBase.cpp:
1490         (WebCore::ScriptController::canExecuteScripts):
1491
1492 2012-12-09  Kangil Han  <kangil.han@samsung.com>
1493
1494         Fix unused parameter compile warnings
1495         https://bugs.webkit.org/show_bug.cgi?id=104463
1496
1497         Reviewed by Kentaro Hara.
1498
1499         Remove compile warning messages by omitting parameter name.
1500
1501         * platform/graphics/surfaces/GraphicsSurface.cpp:
1502         (WebCore::GraphicsSurface::GraphicsSurface):
1503
1504 2012-12-08  Rakesh KN  <rakeshchaitan@gmail.com>
1505
1506         Build break if SVG is disabled
1507         https://bugs.webkit.org/show_bug.cgi?id=104452
1508
1509         Reviewed by Darin Adler.
1510
1511         Build breaking after r136975 if SVG is disabled.
1512         No new tests required.
1513
1514         * rendering/FilterEffectRenderer.cpp:
1515         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1516         As document is not an argument anymore, removing UNUSED_PARAM against it.
1517         * rendering/FilterEffectRenderer.h:
1518         Added forward declaration for RenderObject.
1519
1520 2012-12-08  Mike West  <mkwst@chromium.org>
1521
1522         Log to console when script is blocked by sandbox attributes.
1523         https://bugs.webkit.org/show_bug.cgi?id=104365
1524
1525         Reviewed by Ojan Vafai.
1526
1527         Adds a console message to cover script execution blocked within the
1528         context of a sandboxed frame which lacks the 'allow-scripts' permission.
1529
1530         * bindings/ScriptControllerBase.cpp:
1531         (WebCore::ScriptController::canExecuteScripts):
1532             Log a warning when sandboxing flags block script execution.
1533
1534 2012-12-08  No'am Rosenthal  <noam@webkit.org>
1535
1536         Use background color for GraphicsLayers when applicable
1537         https://bugs.webkit.org/show_bug.cgi?id=103786
1538
1539         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
1540         1. The layer doesn't paint its own content, other than background/decoration.
1541         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
1542         3. The image has only a background color, and no background image.
1543         4. background-composite is set to source-over, and background-clip is anything apart from text.
1544         5. The port supports setContentsToBackgroundColor.
1545
1546         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
1547         for that layer, but instead draw that solid color directly.
1548         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
1549         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
1550         background-clip property.
1551
1552         Reviewed by Simon Fraser.
1553
1554         Tests: compositing/background-color/background-color-alpha.html
1555                compositing/background-color/background-color-change-to-text.html
1556                compositing/background-color/background-color-composite.html
1557                compositing/background-color/background-color-container.html
1558                compositing/background-color/background-color-content-clip.html
1559                compositing/background-color/background-color-padding-change.html
1560                compositing/background-color/background-color-padding-clip.html
1561                compositing/background-color/background-color-simple.html
1562                compositing/background-color/background-color-text-change.html
1563                compositing/background-color/background-color-text-clip.html
1564
1565         * platform/graphics/GraphicsLayer.h:
1566         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
1567             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
1568             Currently only the MAC implementation and TextureMapper falls under that category.
1569
1570         * rendering/RenderBox.h:
1571         (WebCore::RenderBox::paddingBoxRect):
1572             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
1573             background-clip: padding.
1574
1575         * rendering/RenderLayerBacking.cpp:
1576         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1577             Update the background color if needed, for every configuration change.
1578             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
1579
1580         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1581             Move the contentsRect logic to updateContentsRect.
1582
1583         (WebCore::RenderLayerBacking::updateContentsRect):
1584             Use the background box when directly compositing backgrounds.
1585
1586         (WebCore::RenderLayerBacking::updateBackgroundColor):
1587             Set the background color if applicable, otherwise set to trasnparent and clear.
1588             This was not needed in the past because background colors were only used for the special case of full-screen.
1589
1590         (WebCore::supportsDirectBoxDecorationsComposition):
1591             Helper function to determine whether a particular background can be directly composited. Right now only 
1592             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
1593             Also we don't yet support background-clip: text and any background-composite other than source-over.
1594
1595         (WebCore::RenderLayerBacking::paintsBoxDecorations):
1596             Apply the new supportsDirectBoxDecorationsComposition logic.
1597
1598         (WebCore::RenderLayerBacking::contentsBox):
1599             Remove unnecessary local variable.
1600
1601         (WebCore::backgroundRectForBox):
1602         (WebCore::RenderLayerBacking::backgroundBox):
1603             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
1604             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
1605             GraphicsLayer::contentsRect expects snapped pixels.
1606
1607
1608 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
1609
1610         Build fix for WinCE after r137011.
1611
1612         * platform/graphics/GraphicsContext.h:
1613         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1614         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1615         (WebCore::GraphicsContext::drawBitmap):
1616         * platform/graphics/wince/ImageBufferWinCE.cpp:
1617         (WebCore::BufferedImage::draw):
1618         (WebCore::ImageBuffer::draw):
1619         * platform/graphics/wince/ImageWinCE.cpp:
1620         (WebCore::BitmapImage::getHBITMAPOfSize):
1621         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1622         (WebCore::BitmapImage::draw):
1623         * platform/graphics/wince/SharedBitmap.cpp:
1624         (WebCore::SharedBitmap::draw):
1625         * platform/graphics/wince/SharedBitmap.h:
1626
1627 2012-12-08  Gavin Peters  <gavinp@chromium.org>
1628
1629         Add status events on <link rel=prerender> elements.
1630         https://bugs.webkit.org/show_bug.cgi?id=96474
1631
1632         Reviewed by Adam Barth.
1633
1634         The new PrerenderStatusEvent is sent to link elements when
1635         prerenders are started by the embedder, and also sent when they
1636         are stopped. Pages using this feature can now serialize launching
1637         prerenders, and track timing performance.
1638
1639         Tested in a new WebKitUnitTest for the chromium port.
1640
1641         * GNUmakefile.list.am:
1642         * Target.pri:
1643         * WebCore.gypi:
1644         * WebCore.vcproj/WebCore.vcproj:
1645         * WebCore.xcodeproj/project.pbxproj:
1646         * dom/EventNames.h:
1647         (WebCore):
1648         * html/HTMLLinkElement.cpp:
1649         (WebCore):
1650         (WebCore::HTMLLinkElement::didStartLinkPrerender):
1651         (WebCore::HTMLLinkElement::didStopLinkPrerender):
1652         (WebCore::HTMLLinkElement::didSendLoadForLinkPrerender):
1653         (WebCore::HTMLLinkElement::didSendDOMContentLoadedForLinkPrerender):
1654         * html/HTMLLinkElement.h:
1655         (HTMLLinkElement):
1656         * loader/LinkLoader.cpp:
1657         (WebCore::LinkLoader::didStartPrerender):
1658         (WebCore):
1659         (WebCore::LinkLoader::didStopPrerender):
1660         (WebCore::LinkLoader::didSendLoadForPrerender):
1661         (WebCore::LinkLoader::didSendDOMContentLoadedForPrerender):
1662         (WebCore::LinkLoader::loadLink):
1663         * loader/LinkLoader.h:
1664         (LinkLoader):
1665         * loader/LinkLoaderClient.h:
1666         (LinkLoaderClient):
1667         * loader/Prerenderer.cpp:
1668         (WebCore::Prerenderer::render):
1669         * loader/Prerenderer.h:
1670         (WebCore):
1671         (Prerenderer):
1672         * platform/PrerenderClient.h: Copied from Source/WebCore/loader/LinkLoaderClient.h.
1673         (WebCore):
1674         (PrerenderClient):
1675         (WebCore::PrerenderClient::~PrerenderClient):
1676         * platform/PrerenderHandle.h:
1677         (WebCore):
1678         (PrerenderHandle):
1679         * platform/chromium/Prerender.cpp:
1680         (WebCore::Prerender::Prerender):
1681         (WebCore::Prerender::removeClient):
1682         (WebCore):
1683         (WebCore::Prerender::add):
1684         (WebCore::Prerender::cancel):
1685         (WebCore::Prerender::abandon):
1686         (WebCore::Prerender::didStartPrerender):
1687         (WebCore::Prerender::didStopPrerender):
1688         (WebCore::Prerender::didSendLoadForPrerender):
1689         (WebCore::Prerender::didSendDOMContentLoadedForPrerender):
1690         * platform/chromium/Prerender.h:
1691         (WebKit):
1692         (WebCore):
1693         (Prerender):
1694         * platform/chromium/PrerenderHandle.cpp:
1695         (WebCore::PrerenderHandle::create):
1696         (WebCore::PrerenderHandle::PrerenderHandle):
1697         (WebCore::PrerenderHandle::~PrerenderHandle):
1698         (WebCore::PrerenderHandle::removeClient):
1699         (WebCore):
1700         * platform/chromium/support/WebPrerender.cpp:
1701         (WebKit::WebPrerender::toPrerender):
1702         (WebKit):
1703         (WebKit::WebPrerender::assign):
1704         (WebKit::WebPrerender::isNull):
1705         (WebKit::WebPrerender::didStartPrerender):
1706         (WebKit::WebPrerender::didStopPrerender):
1707         (WebKit::WebPrerender::didSendLoadForPrerender):
1708         (WebKit::WebPrerender::didSendDOMContentLoadedForPrerender):
1709
1710 2012-12-08  Gustavo Noronha Silva  <gns@gnome.org>
1711
1712         Reviewed by Martin Robinson.
1713
1714         Update the Chromium/Chrome version we advertise in our User-Agent
1715         string to version 25, to better match our current reality.
1716
1717         * platform/gtk/UserAgentGtk.cpp:
1718         (WebCore::standardUserAgent):
1719
1720 2012-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1721
1722         Unreviewed, rolling out r137006.
1723         http://trac.webkit.org/changeset/137006
1724         https://bugs.webkit.org/show_bug.cgi?id=104446
1725
1726         Broke plugin painting on Mac (youtube, etc.) (Requested by
1727         thorton_ on #webkit).
1728
1729         * platform/graphics/GraphicsLayer.h:
1730         (GraphicsLayer):
1731         * rendering/RenderBox.h:
1732         * rendering/RenderLayerBacking.cpp:
1733         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1734         (WebCore::clipBox):
1735         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1736         (WebCore::RenderLayerBacking::updateDrawsContent):
1737         (WebCore::RenderLayerBacking::updateBackgroundColor):
1738         (WebCore::RenderLayerBacking::paintsBoxDecorations):
1739         (WebCore::RenderLayerBacking::contentChanged):
1740         (WebCore::RenderLayerBacking::updateImageContents):
1741         (WebCore::RenderLayerBacking::contentsBox):
1742         * rendering/RenderLayerBacking.h:
1743         (RenderLayerBacking):
1744
1745 2012-12-08  Wei James  <james.wei@intel.com>
1746
1747         Remove incorrect ASSERT for m_error in CachedResource
1748         https://bugs.webkit.org/show_bug.cgi?id=104333
1749
1750         Reviewed by Nate Chapin.
1751
1752         This assertion was brought in https://bugs.webkit.org/show_bug.cgi?id=100901 
1753         When the request is canceled, m_error.isNull() should be true.
1754
1755         run webkit_unit_tests Debug build.
1756
1757         * loader/cache/CachedResource.cpp:
1758         (WebCore::CachedResource::stopLoading):
1759
1760 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
1761
1762         Qt Linux Minimal build fix after r136975.
1763
1764         * dom/ElementRareData.h:
1765         (ElementRareData):
1766
1767 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
1768
1769         Qt Linux Minimal build fix attempt after r136959.
1770
1771         * inspector/InspectorInstrumentation.h:
1772         (WebCore::InspectorInstrumentation::layerTreeDidChange):
1773         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
1774
1775 2012-12-08  Xan Lopez  <xlopez@igalia.com>
1776
1777         Build fix after r137003. Wrap Microdata only sections with ENABLE(MICRODATA).
1778
1779         * dom/NodeRareData.h:
1780         (NodeRareData):
1781
1782 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
1783
1784         Build fix after r137003. Wrap NodeMutationObserverData with ENABLE(MUTATION_OBSERVERS).
1785
1786         * dom/NodeRareData.h:
1787         (NodeRareData):
1788
1789 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
1790
1791         Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r136975.
1792
1793         * rendering/svg/SVGResources.cpp:
1794         (WebCore::SVGResources::buildCachedResources):
1795
1796 2012-12-08  Adam Klein  <adamk@chromium.org>
1797
1798         HTMLTemplateElement.innerHTML should be parsed into the template contents owner document
1799         https://bugs.webkit.org/show_bug.cgi?id=104407
1800
1801         Reviewed by Eric Seidel.
1802
1803         When parsing via innerHTML, ensure that all operations (including the
1804         initial fragment creation) occur in the proper document to avoid,
1805         e.g., images loading while being parsed into the template contents.
1806         This matches the parsing behavior during page load.
1807
1808         Test: fast/dom/HTMLTemplateElement/innerHTML-inert.html
1809
1810         * editing/markup.cpp:
1811         (WebCore::createFragmentForInnerOuterHTML):
1812
1813 2012-12-08  ChangSeok Oh  <shivamidow@gmail.com>
1814
1815         Assertion failed at WebCore::RedirectedXCompositeWindow::context()
1816         https://bugs.webkit.org/show_bug.cgi?id=104349
1817
1818         Reviewed by Martin Robinson.
1819
1820         We should return GLContext if m_needsContext is CreateGLContext. By the way
1821         CreateGLContext is a enum value and its default value is 0. So checking
1822         ASSERT(m_needsContext) causes a crash on debug build.
1823         ASSERT(m_needsContext == CreateGLContext) is better here.
1824
1825         No new tests since we can verify this with already existing AC tests.
1826
1827         * platform/gtk/RedirectedXCompositeWindow.cpp:
1828         (WebCore::RedirectedXCompositeWindow::context):
1829
1830 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
1831
1832         Extend platform layer so it can pass blend modes to the compositing calls
1833         https://bugs.webkit.org/show_bug.cgi?id=104176
1834
1835         Reviewed by Dirk Schulze.
1836
1837         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
1838
1839         No new tests, no new functionality.
1840
1841         * html/HTMLCanvasElement.cpp:
1842         (WebCore::HTMLCanvasElement::paint):
1843         * platform/graphics/BitmapImage.h:
1844         * platform/graphics/CrossfadeGeneratedImage.cpp:
1845         (WebCore::CrossfadeGeneratedImage::draw):
1846         * platform/graphics/CrossfadeGeneratedImage.h:
1847         (CrossfadeGeneratedImage):
1848         * platform/graphics/GeneratedImage.h:
1849         (GeneratedImage):
1850         * platform/graphics/GeneratorGeneratedImage.cpp:
1851         (WebCore::GeneratorGeneratedImage::draw):
1852         * platform/graphics/GeneratorGeneratedImage.h:
1853         (GeneratorGeneratedImage):
1854         * platform/graphics/GraphicsContext.cpp:
1855         (WebCore::GraphicsContext::drawImage):
1856         (WebCore):
1857         (WebCore::GraphicsContext::drawImageBuffer):
1858         (WebCore::GraphicsContext::setCompositeOperation):
1859         * platform/graphics/GraphicsContext.h:
1860         (WebCore::GraphicsContextState::GraphicsContextState):
1861         (GraphicsContextState):
1862         (GraphicsContext):
1863         * platform/graphics/Image.cpp:
1864         (WebCore::Image::draw):
1865         (WebCore::Image::drawTiled):
1866         * platform/graphics/Image.h:
1867         (Image):
1868         * platform/graphics/ImageBuffer.h:
1869         (ImageBuffer):
1870         * platform/graphics/cairo/BitmapImageCairo.cpp:
1871         (WebCore::BitmapImage::draw):
1872         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1873         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1874         * platform/graphics/cairo/ImageBufferCairo.cpp:
1875         (WebCore::ImageBuffer::draw):
1876         * platform/graphics/cg/BitmapImageCG.cpp:
1877         (WebCore::BitmapImage::draw):
1878         * platform/graphics/cg/GraphicsContextCG.cpp:
1879         (WebCore::GraphicsContext::drawNativeImage):
1880         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1881         * platform/graphics/cg/ImageBufferCG.cpp:
1882         (WebCore::ImageBuffer::draw):
1883         * platform/graphics/cg/PDFDocumentImage.cpp:
1884         (WebCore::PDFDocumentImage::draw):
1885         * platform/graphics/cg/PDFDocumentImage.h:
1886         (PDFDocumentImage):
1887         * platform/graphics/qt/GraphicsContextQt.cpp:
1888         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1889         * platform/graphics/qt/ImageBufferQt.cpp:
1890         (WebCore::ImageBuffer::draw):
1891         * platform/graphics/qt/ImageQt.cpp:
1892         (WebCore::BitmapImage::draw):
1893         * platform/graphics/qt/StillImageQt.cpp:
1894         (WebCore::StillImage::draw):
1895         * platform/graphics/qt/StillImageQt.h:
1896         (StillImage):
1897         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
1898         (BitmapImageSingleFrameSkia):
1899         * platform/graphics/skia/GraphicsContextSkia.cpp:
1900         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1901         * platform/graphics/skia/ImageBufferSkia.cpp:
1902         (WebCore::ImageBuffer::draw):
1903         * platform/graphics/skia/ImageSkia.cpp:
1904         (WebCore::BitmapImage::draw):
1905         (WebCore::BitmapImageSingleFrameSkia::draw):
1906         * platform/graphics/win/ImageCGWin.cpp:
1907         (WebCore::BitmapImage::getHBITMAPOfSize):
1908         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1909         * svg/graphics/SVGImage.cpp:
1910         (WebCore::SVGImage::drawSVGToImageBuffer):
1911         (WebCore::SVGImage::draw):
1912         (WebCore::SVGImage::nativeImageForCurrentFrame):
1913         * svg/graphics/SVGImage.h:
1914         (SVGImage):
1915
1916 2012-12-07  Alpha Lam  <hclam@chromium.org>
1917
1918         [chromium] ImageDecodingStore should cache partially decoded images
1919         https://bugs.webkit.org/show_bug.cgi?id=103796
1920
1921         Reviewed by Stephen White.
1922
1923         Implement caching for incomplete images, meaning the image is partially
1924         decoded. The image is cached together with partially decoded ImageDecoder.
1925         This allows decoding to resume in a later time.
1926
1927         Caching logic for incomplete images is implemented in ImageDecodingStore.
1928
1929         Logic for resuming image decoding is implemented in ImageFrameGenerator.
1930
1931         ImageDecodingStore allows storing incomplete image with the decoder.
1932         The cache entry can be used in a later time to read and write (i.e. resume
1933         decoding.) To avoid the same entry being written and read at the same time,
1934         an incomplete entry can be used by one user only. Concurrent access to
1935         an incomplete entry should never happen and is checked by an assert.
1936         An entry can becomes complete when decoding is finished. In this case
1937         the associated decoder is deleted. Once an entry becomes complete concurrent
1938         read is allowed.
1939
1940         ImageFrameGenerator performs the logic to resume image decoding. It
1941         performs the following operations in sequence:
1942         - Try to lookup a complete image
1943         - Try to perform scaling on a complete image
1944         - Try to lookup an incomplete image and resume decoding & scaling
1945         - Everything fails, start decoding from scratch
1946         The entire sequence of operations in under a mutex, hence there will be
1947         no more than 1 user of an incomplete cache entry at the same time.
1948
1949         New unit tests in ImageDecodingStoreTest and ImageFrameGeneratorTest.
1950
1951         * platform/graphics/chromium/ImageDecodingStore.cpp:
1952         (WebCore::ImageDecodingStore::lockCache):
1953         Change of method definition to return an image and ImageDecoder.
1954         (WebCore::ImageDecodingStore::unlockCache):
1955         (WebCore::ImageDecodingStore::insertAndLockCache):
1956         (WebCore::ImageDecodingStore::overwriteAndLockCache):
1957         New method to allow an incomplete cache entry be overwritten.
1958         (WebCore):
1959         * platform/graphics/chromium/ImageDecodingStore.h:
1960         (ImageDecodingStore):
1961         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
1962         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
1963         (WebCore::ImageDecodingStore::CacheEntry::cachedImage):
1964         (WebCore::ImageDecodingStore::CacheEntry::cachedDecoder):
1965         (WebCore::ImageDecodingStore::CacheEntry::releaseCachedDecoder):
1966         (WebCore::ImageDecodingStore::CacheEntry::overwriteCachedImage):
1967         New method to allow an incomplete image be overwitten.
1968         (CacheEntry):
1969         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1970         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
1971         (WebCore::ImageFrameGenerator::decodeAndScale):
1972         (WebCore::ImageFrameGenerator::tryToLockCompleteCache):
1973         (WebCore::ImageFrameGenerator::tryToScale):
1974         (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
1975         New method to lookup an incomplete cache entry and resume decoding.
1976         (WebCore):
1977         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
1978         (WebCore::ImageFrameGenerator::decoder):
1979         New helper method to do decoding for a full sized image.
1980         (WebCore::ImageFrameGenerator::prepareData):
1981         New helper method to prepare data safely.
1982         * platform/graphics/chromium/ImageFrameGenerator.h:
1983         (ImageFrameGenerator):
1984         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1985         (WebCore::LazyDecodingPixelRef::onLockPixels):
1986         * platform/graphics/chromium/ScaledImageFragment.h:
1987         (WebCore::ScaledImageFragment::setIsComplete):
1988
1989 2012-12-07  Alexis Menard  <alexis@webkit.org>
1990
1991         Enable CSS3 position offset for CSS Masking.
1992         https://bugs.webkit.org/show_bug.cgi?id=104252
1993
1994         Reviewed by Dirk Schulze.
1995
1996         To follow CSS3 background-position, mask-position should also support
1997         the new <position> type (http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property).
1998         Now the code is shared between background and mask I renamed the
1999         functions used to be more generic. Note that the feature flag is not
2000         meant to stay and will be removed in a following commit.
2001
2002         No new tests : I modified LayoutTests/fast/masking/parsing-mask.html to
2003         cover the new feature.
2004
2005         * css/CSSComputedStyleDeclaration.cpp:
2006         (WebCore::createPositionListForLayer):
2007         * css/CSSParser.cpp:
2008         (WebCore::isFillPositionKeyword):
2009         (WebCore::CSSParser::parse4ValuesFillPosition):
2010         (WebCore::CSSParser::parse3ValuesFillPosition):
2011         (WebCore::CSSParser::isPotentialPositionValue):
2012         (WebCore::CSSParser::parseFillPosition):
2013         (WebCore::CSSParser::parse2ValuesFillPosition):
2014         (WebCore::CSSParser::parseFillProperty):
2015         (WebCore::CSSParser::parseTransformOriginShorthand):
2016         (WebCore::CSSParser::parseRadialGradient):
2017         (WebCore::CSSParser::parsePerspectiveOrigin):
2018         * css/CSSParser.h:
2019         * css/CSSToStyleMap.cpp:
2020         (WebCore::CSSToStyleMap::mapFillXPosition):
2021         (WebCore::CSSToStyleMap::mapFillYPosition):
2022
2023 2012-12-07  No'am Rosenthal  <noam@webkit.org>
2024
2025         Use background color for GraphicsLayers when applicable
2026         https://bugs.webkit.org/show_bug.cgi?id=103786
2027
2028         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
2029         1. The layer doesn't paint its own content, other than background/decoration.
2030         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
2031         3. The image has only a background color, and no background image.
2032         4. background-composite is set to source-over, and background-clip is anything apart from text.
2033         5. The port supports setContentsToBackgroundColor.
2034
2035         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
2036         for that layer, but instead draw that solid color directly.
2037         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
2038         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
2039         background-clip property.
2040
2041         Reviewed by Simon Fraser.
2042
2043         Tests: compositing/background-color/background-color-alpha.html
2044                compositing/background-color/background-color-change-to-text.html
2045                compositing/background-color/background-color-composite.html
2046                compositing/background-color/background-color-container.html
2047                compositing/background-color/background-color-content-clip.html
2048                compositing/background-color/background-color-padding-change.html
2049                compositing/background-color/background-color-padding-clip.html
2050                compositing/background-color/background-color-simple.html
2051                compositing/background-color/background-color-text-change.html
2052                compositing/background-color/background-color-text-clip.html
2053
2054         * platform/graphics/GraphicsLayer.h:
2055         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
2056             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
2057             Currently only the MAC implementation and TextureMapper falls under that category.
2058
2059         * rendering/RenderBox.h:
2060         (WebCore::RenderBox::paddingBoxRect):
2061             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
2062             background-clip: padding.
2063
2064         * rendering/RenderLayerBacking.cpp:
2065         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2066             Update the background color if needed, for every configuration change.
2067             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
2068
2069         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2070             Move the contentsRect logic to updateContentsRect.
2071
2072         (WebCore::RenderLayerBacking::updateContentsRect):
2073             Use the background box when directly compositing backgrounds.
2074
2075         (WebCore::RenderLayerBacking::updateBackgroundColor):
2076             Set the background color if applicable, otherwise set to trasnparent and clear.
2077             This was not needed in the past because background colors were only used for the special case of full-screen.
2078
2079         (WebCore::supportsDirectBoxDecorationsComposition):
2080             Helper function to determine whether a particular background can be directly composited. Right now only 
2081             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
2082             Also we don't yet support background-clip: text and any background-composite other than source-over.
2083
2084         (WebCore::RenderLayerBacking::paintsBoxDecorations):
2085             Apply the new supportsDirectBoxDecorationsComposition logic.
2086
2087         (WebCore::RenderLayerBacking::contentsBox):
2088             Remove unnecessary local variable.
2089
2090         (WebCore::backgroundRectForBox):
2091         (WebCore::RenderLayerBacking::backgroundBox):
2092             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
2093             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
2094             GraphicsLayer::contentsRect expects snapped pixels.
2095
2096
2097 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
2098
2099         Shrink the size of NodeRareData by moving pointers into separate objects
2100         https://bugs.webkit.org/show_bug.cgi?id=104312
2101
2102         Reviewed by Andreas Kling.
2103
2104         This patch does three things:
2105         1. Move ChildNodeList back into NodeListsNodeData.
2106         2. Move m_mutationObserverRegistry & m_transientMutationObserverRegistry into a separate object owned by NodeRareData.
2107         3. Move m_itemProp, m_itemRef, m_itemType & into a separate object owned by NodeRareData.
2108
2109         Moving m_childNodeList from NodeRareData to NodeListsNodeData also has a nice side-effect of making ChildNodeList
2110         behave more like other LiveNodeLists.
2111
2112         This patch also fixes Mac build when microdata is enabled.
2113
2114         There should be no user-visible behavior change.
2115
2116         * dom/ChildNodeList.cpp:
2117         (WebCore::ChildNodeList::~ChildNodeList):
2118         * dom/Node.cpp:
2119         (WebCore::Node::childNodes): Moved the code to create ChildNodeList into NodeListsNodeData to match other node lists.
2120         (WebCore::Node::invalidateNodeListCachesInAncestors):
2121         (WebCore): Removed removeCachedChildNodeList.
2122         * dom/Node.h:
2123         (Node):
2124         * dom/NodeRareData.cpp:
2125         (WebCore): Assert the size of NodeRareData at compilation time.
2126         (WebCore::NodeListsNodeData::reportMemoryUsage):
2127         (WebCore::NodeRareData::reportMemoryUsage):
2128         * dom/NodeRareData.h:
2129         (WebCore::NodeListsNodeData::clearChildNodeListCache): Moved from NodeRareData.
2130         (WebCore::NodeListsNodeData::ensureChildNodeList): Extracted from Node::childNodes.
2131         (WebCore::NodeListsNodeData::removeChildNodeList): Added.
2132         (WebCore::NodeListsNodeData::NodeListsNodeData): Initialize m_childNodeList.
2133         (WebCore::NodeRareData::NodeMutationObserverData): Extracted from NodeRareData.
2134         (WebCore::NodeRareData::NodeMutationObserverData::create):
2135         (WebCore::NodeRareData::NodeMicroDataTokenLists): Ditto.
2136         (WebCore::NodeRareData::NodeMicroDataTokenLists::create):
2137         (WebCore::NodeRareData::NodeRareData):
2138         (WebCore::NodeRareData::ensureNodeLists): Merged setNodeLists since it's not called elsewhere.
2139         (WebCore::NodeRareData::mutationObserverRegistry):
2140         (WebCore::NodeRareData::ensureMutationObserverRegistry): Added.
2141         (WebCore::NodeRareData::transientMutationObserverRegistry):
2142         (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
2143         (WebCore::NodeRareData::ensureMicroDataTokenLists):
2144         (NodeRareData):
2145         (WebCore::NodeRareData::itemProp):
2146         (WebCore::NodeRareData::setItemProp):
2147         (WebCore::NodeRareData::itemRef):
2148         (WebCore::NodeRareData::setItemRef):
2149         (WebCore::NodeRareData::itemType):
2150         (WebCore::NodeRareData::setItemType):
2151         * html/HTMLPropertiesCollection.cpp:
2152         (WebCore::HTMLPropertiesCollection::propertyNodeList): Renamed from namedItem since its return type, PropertyNodeList,
2153         is different from that, Node, of LiveNodeList::namedItem. It was shadowing the function name instead of overriding.
2154         * html/HTMLPropertiesCollection.h:
2155         (HTMLPropertiesCollection):
2156         * html/HTMLPropertiesCollection.idl:
2157
2158 2012-12-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2159
2160         Unreviewed, rolling out r136993.
2161         http://trac.webkit.org/changeset/136993
2162         https://bugs.webkit.org/show_bug.cgi?id=104415
2163
2164         This patch breaks the mac build (Requested by cabanier on
2165         #webkit).
2166
2167         * html/HTMLCanvasElement.cpp:
2168         (WebCore::HTMLCanvasElement::paint):
2169         * platform/graphics/BitmapImage.h:
2170         * platform/graphics/CrossfadeGeneratedImage.cpp:
2171         (WebCore::CrossfadeGeneratedImage::draw):
2172         * platform/graphics/CrossfadeGeneratedImage.h:
2173         (CrossfadeGeneratedImage):
2174         * platform/graphics/GeneratedImage.h:
2175         (GeneratedImage):
2176         * platform/graphics/GeneratorGeneratedImage.cpp:
2177         (WebCore::GeneratorGeneratedImage::draw):
2178         * platform/graphics/GeneratorGeneratedImage.h:
2179         (GeneratorGeneratedImage):
2180         * platform/graphics/GraphicsContext.cpp:
2181         (WebCore::GraphicsContext::drawImage):
2182         (WebCore::GraphicsContext::drawImageBuffer):
2183         (WebCore::GraphicsContext::setCompositeOperation):
2184         * platform/graphics/GraphicsContext.h:
2185         (WebCore::GraphicsContextState::GraphicsContextState):
2186         (GraphicsContextState):
2187         (GraphicsContext):
2188         * platform/graphics/Image.cpp:
2189         (WebCore::Image::draw):
2190         (WebCore::Image::drawTiled):
2191         * platform/graphics/Image.h:
2192         (Image):
2193         * platform/graphics/ImageBuffer.h:
2194         (ImageBuffer):
2195         * platform/graphics/cairo/BitmapImageCairo.cpp:
2196         (WebCore::BitmapImage::draw):
2197         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2198         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2199         * platform/graphics/cairo/ImageBufferCairo.cpp:
2200         (WebCore::ImageBuffer::draw):
2201         * platform/graphics/cg/BitmapImageCG.cpp:
2202         (WebCore::BitmapImage::draw):
2203         * platform/graphics/cg/GraphicsContextCG.cpp:
2204         (WebCore::GraphicsContext::drawNativeImage):
2205         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2206         * platform/graphics/cg/ImageBufferCG.cpp:
2207         (WebCore::ImageBuffer::draw):
2208         * platform/graphics/cg/PDFDocumentImage.cpp:
2209         (WebCore::PDFDocumentImage::draw):
2210         * platform/graphics/cg/PDFDocumentImage.h:
2211         (PDFDocumentImage):
2212         * platform/graphics/qt/GraphicsContextQt.cpp:
2213         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2214         * platform/graphics/qt/ImageBufferQt.cpp:
2215         (WebCore::ImageBuffer::draw):
2216         * platform/graphics/qt/ImageQt.cpp:
2217         (WebCore::BitmapImage::draw):
2218         * platform/graphics/qt/StillImageQt.cpp:
2219         (WebCore::StillImage::draw):
2220         * platform/graphics/qt/StillImageQt.h:
2221         (StillImage):
2222         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
2223         (BitmapImageSingleFrameSkia):
2224         * platform/graphics/skia/GraphicsContextSkia.cpp:
2225         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2226         * platform/graphics/skia/ImageBufferSkia.cpp:
2227         (WebCore::ImageBuffer::draw):
2228         * platform/graphics/skia/ImageSkia.cpp:
2229         (WebCore::BitmapImage::draw):
2230         (WebCore::BitmapImageSingleFrameSkia::draw):
2231         * platform/graphics/win/ImageCGWin.cpp:
2232         (WebCore::BitmapImage::getHBITMAPOfSize):
2233         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2234         * svg/graphics/SVGImage.cpp:
2235         (WebCore::SVGImage::drawSVGToImageBuffer):
2236         (WebCore::SVGImage::draw):
2237         (WebCore::SVGImage::nativeImageForCurrentFrame):
2238         * svg/graphics/SVGImage.h:
2239         (SVGImage):
2240
2241 2012-12-07  Alexey Proskuryakov  <ap@apple.com>
2242
2243         There is no need to change cached resource storage policy through ResourceHandleClient
2244         https://bugs.webkit.org/show_bug.cgi?id=104413
2245
2246         Reviewed by Brady Eidson.
2247
2248         This code was only needed to prevent storing responses to disk in private browsing
2249         mode, but we now have a storage session to take care of that in a cleaner and more
2250         reliable way.
2251
2252         * loader/ResourceLoader.cpp:
2253         * loader/ResourceLoader.h: (WebCore::ResourceLoader::receivedCancellation):
2254         * platform/network/ResourceHandleClient.h:
2255         * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse):
2256         * platform/network/mac/ResourceHandleMac.mm:
2257         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
2258
2259 2012-12-07  Adam Klein  <adamk@chromium.org>
2260
2261         MutationRecord addedNodes/removedNodes should never be null
2262         https://bugs.webkit.org/show_bug.cgi?id=98921
2263
2264         Reviewed by Ryosuke Niwa.
2265
2266         Per an update to the DOM4 spec that matches Gecko's behavior,
2267         addedNodes/removedNodes should be empty NodeLists on 'attributes'
2268         and 'characterData' records, rather than null.
2269
2270         This is accomplished with lazy initialization of addedNodes/removedNodes
2271         attributes on 'attributes'/'characterData' records and the
2272         addition of a new StaticNodeList::createEmpty() factory method.
2273
2274         * dom/MutationRecord.cpp:
2275         * dom/MutationRecord.h:
2276         (MutationRecord):
2277         * dom/StaticNodeList.h:
2278         (WebCore::StaticNodeList::adopt):
2279         (StaticNodeList):
2280         (WebCore::StaticNodeList::createEmpty):
2281         (WebCore::StaticNodeList::StaticNodeList):
2282
2283 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
2284
2285         Unreviewed build correction after 136959.
2286
2287         The initialization list should follow the same compiler macro
2288         exclusions as the class members.
2289
2290         * inspector/InstrumentingAgents.h: Add USE(ACCELERATED_COMPOSITING)
2291           guards around m_inspectorLayerTreeAgent as this does not exist
2292           when the guard is false.
2293
2294 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
2295
2296         Extend platform layer so it can pass blend modes to the compositing calls
2297         https://bugs.webkit.org/show_bug.cgi?id=104176
2298
2299         Reviewed by Dirk Schulze.
2300
2301         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
2302
2303         No new tests, no new functionality.
2304
2305         * html/HTMLCanvasElement.cpp:
2306         (WebCore::HTMLCanvasElement::paint):
2307         * platform/graphics/BitmapImage.h:
2308         * platform/graphics/CrossfadeGeneratedImage.cpp:
2309         (WebCore::CrossfadeGeneratedImage::draw):
2310         * platform/graphics/CrossfadeGeneratedImage.h:
2311         (CrossfadeGeneratedImage):
2312         * platform/graphics/GeneratedImage.h:
2313         (GeneratedImage):
2314         * platform/graphics/GeneratorGeneratedImage.cpp:
2315         (WebCore::GeneratorGeneratedImage::draw):
2316         * platform/graphics/GeneratorGeneratedImage.h:
2317         (GeneratorGeneratedImage):
2318         * platform/graphics/GraphicsContext.cpp:
2319         (WebCore::GraphicsContext::drawImage):
2320         (WebCore):
2321         (WebCore::GraphicsContext::drawImageBuffer):
2322         (WebCore::GraphicsContext::setCompositeOperation):
2323         * platform/graphics/GraphicsContext.h:
2324         (WebCore::GraphicsContextState::GraphicsContextState):
2325         (GraphicsContextState):
2326         (GraphicsContext):
2327         * platform/graphics/Image.cpp:
2328         (WebCore::Image::draw):
2329         (WebCore::Image::drawTiled):
2330         * platform/graphics/Image.h:
2331         (Image):
2332         * platform/graphics/ImageBuffer.h:
2333         (ImageBuffer):
2334         * platform/graphics/cairo/BitmapImageCairo.cpp:
2335         (WebCore::BitmapImage::draw):
2336         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2337         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2338         * platform/graphics/cairo/ImageBufferCairo.cpp:
2339         (WebCore::ImageBuffer::draw):
2340         * platform/graphics/cg/BitmapImageCG.cpp:
2341         (WebCore::BitmapImage::draw):
2342         * platform/graphics/cg/GraphicsContextCG.cpp:
2343         (WebCore::GraphicsContext::drawNativeImage):
2344         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2345         * platform/graphics/cg/ImageBufferCG.cpp:
2346         (WebCore::ImageBuffer::draw):
2347         * platform/graphics/cg/PDFDocumentImage.cpp:
2348         (WebCore::PDFDocumentImage::draw):
2349         * platform/graphics/cg/PDFDocumentImage.h:
2350         (PDFDocumentImage):
2351         * platform/graphics/qt/GraphicsContextQt.cpp:
2352         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2353         * platform/graphics/qt/ImageBufferQt.cpp:
2354         (WebCore::ImageBuffer::draw):
2355         * platform/graphics/qt/ImageQt.cpp:
2356         (WebCore::BitmapImage::draw):
2357         * platform/graphics/qt/StillImageQt.cpp:
2358         (WebCore::StillImage::draw):
2359         * platform/graphics/qt/StillImageQt.h:
2360         (StillImage):
2361         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
2362         (BitmapImageSingleFrameSkia):
2363         * platform/graphics/skia/GraphicsContextSkia.cpp:
2364         (WebCore::GraphicsContext::setPlatformCompositeOperation):
2365         * platform/graphics/skia/ImageBufferSkia.cpp:
2366         (WebCore::ImageBuffer::draw):
2367         * platform/graphics/skia/ImageSkia.cpp:
2368         (WebCore::BitmapImage::draw):
2369         (WebCore::BitmapImageSingleFrameSkia::draw):
2370         * platform/graphics/win/ImageCGWin.cpp:
2371         (WebCore::BitmapImage::getHBITMAPOfSize):
2372         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2373         * svg/graphics/SVGImage.cpp:
2374         (WebCore::SVGImage::drawSVGToImageBuffer):
2375         (WebCore::SVGImage::draw):
2376         (WebCore::SVGImage::nativeImageForCurrentFrame):
2377         * svg/graphics/SVGImage.h:
2378         (SVGImage):
2379
2380 2012-12-07  Alec Flett  <alecflett@chromium.org>
2381
2382         IndexedDB: propagate transaction_ids through open/upgradeneeded
2383         https://bugs.webkit.org/show_bug.cgi?id=103922
2384
2385         Reviewed by Tony Chang.
2386
2387         Make sure front-end is always generating the transaction id,
2388         so that it can be relied upon as an alternative to the
2389         to-be-deprecated IDBTransactionBackendInterface pointer.
2390
2391         No new tests, this is one stage in a larger refactor.
2392
2393         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2394         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
2395         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
2396         (IDBDatabaseBackendImpl::VersionChangeOperation):
2397         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
2398         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::transactionId):
2399         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
2400         (IDBDatabaseBackendImpl::PendingOpenCall):
2401         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
2402         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::transactionId):
2403         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
2404         (IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
2405         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2406         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2407         (WebCore::IDBDatabaseBackendImpl::createTransaction):
2408         (WebCore::IDBDatabaseBackendImpl::openConnection):
2409         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
2410         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
2411         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2412         (IDBDatabaseBackendImpl):
2413         * Modules/indexeddb/IDBFactory.cpp:
2414         (WebCore::IDBFactory::openInternal):
2415         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2416         (WebCore::IDBFactoryBackendImpl::open):
2417
2418 2012-12-07  Dima Gorbik  <dgorbik@apple.com>
2419
2420         Implement general ::cue pseudo element for the <video>
2421         https://bugs.webkit.org/show_bug.cgi?id=104043
2422
2423         Reviewed by Eric Carlson.
2424
2425         Implemented the ::cue pseudo element to be able to style all WebVTT cues.
2426         Added the subcontainer with a '::cue' pseudoId in between the TextTrackContainerElement and WebVTT nodes to separate
2427         user agent default styles from user defined styles for the cue elements.
2428
2429         Test: media/track/track-css-all-cues.html
2430
2431         * css/CSSSelector.cpp: ::cue pseudo selector doesn't have a valid prefix but should be allowed in the user-agent stylesheet.
2432         (WebCore::CSSSelector::parsePseudoType):
2433         * html/shadow/MediaControlElements.cpp:
2434         (WebCore):
2435         (WebCore::MediaControlTextTrackContainerElement::createSubtrees): create a subcontainer and set its pseudoId to '::cue'.
2436         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): append WebVTT nodes to the newly created subcontainer.
2437         * html/shadow/MediaControlElements.h:
2438         (MediaControlTextTrackContainerElement):
2439         * html/shadow/MediaControls.cpp:
2440         (WebCore::MediaControls::createTextTrackDisplay): initiate creating subtrees for the MediaControlTextTrackContainerElement.
2441         * html/shadow/MediaControlsChromium.cpp:
2442         (WebCore::MediaControlsChromium::createTextTrackDisplay):
2443
2444 2012-12-06  Geoffrey Garen  <ggaren@apple.com>
2445
2446         Crash in JSC::Bindings::RootObject::globalObject() sync'ing notes in Evernote
2447         https://bugs.webkit.org/show_bug.cgi?id=104321
2448         <rdar://problem/12770497>
2449
2450         Reviewed by Sam Weinig.
2451
2452         Missed a null check.
2453
2454         * bindings/objc/WebScriptObject.mm:
2455         (-[WebScriptObject JSObject]): If our root object has been cleared, don't
2456         try to dereference it. This happens in Evernote during tear-down.
2457
2458         This matches the behavior of other methods in the same class.
2459
2460         (_isSafeScript returns false if the root object has been cleared.)
2461
2462         If we believe _isSafeScript is a good idea, it's probably the right test
2463         to use here (as opposed to just null-checking _rootObject) because this API
2464         gives the client unlimited access to the underlying JavaScript object.
2465
2466 2012-12-07  Stephen Chenney  <schenney@chromium.org>
2467
2468         XMLSerializer is too aggressive in adding prefixes
2469         https://bugs.webkit.org/show_bug.cgi?id=104387
2470
2471         Reviewed by Ryosuke Niwa.
2472
2473         We have been adding "xlink:" and "xmlns:" and "xml:" prefixes to any
2474         attribute that is in one of those namespaces but which did not already
2475         have the matching prefix. This appears to be in error, at least
2476         compared to other browsers.
2477
2478         The correct behavior appears to be to add the prefix only if there is
2479         no existing prefix. If there is an existing prefix, we now leave it alone.
2480
2481         No new tests. Existing test expanded.
2482
2483         * editing/MarkupAccumulator.cpp:
2484         (WebCore::MarkupAccumulator::appendAttribute): Only replace the prefix
2485         attribute name prefix if it is empty, and in one of the recognised
2486         namespaces.
2487
2488 2012-12-07  Jon Lee  <jonlee@apple.com>
2489
2490         Display the auto-start label image after a delay
2491         https://bugs.webkit.org/show_bug.cgi?id=104173
2492         <rdar://problem/12820071>
2493
2494         Reviewed by Dan Bernstein.
2495
2496         Treat the button now as a label. Once the user has hovered over the plug-in, wait a little while before showing the label.
2497
2498         * rendering/RenderSnapshottedPlugIn.h:
2499         (RenderSnapshottedPlugIn): Add a one-shot timer, and a variable representing whether the label should
2500         be drawn. Remove the variable that determines whether the label is active.
2501
2502         * rendering/RenderSnapshottedPlugIn.cpp:
2503         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Set the time to a delay of 1 second.
2504         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Paint the label only when we should.
2505         (WebCore::RenderSnapshottedPlugIn::paintLabel): The label should only paint in its hovered state.
2506         (WebCore::startLabelImage): Renamed.
2507         (WebCore::RenderSnapshottedPlugIn::repaintLabel): Renamed.
2508         (WebCore::RenderSnapshottedPlugIn::hoverDelayTimerFired): Now that the timer has fired, we should paint
2509         the label. Repaint.
2510         (WebCore::RenderSnapshottedPlugIn::handleEvent): Update event handling. Click event handler is the
2511         same, except we move the label check inside so that if the click is not the left label we don't
2512         fall through to the other irrevelant if clauses.
2513             For the mouse down handler, make sure to check for the left label. If the hover timer is still running,
2514         stop it, so that we don't draw a label while the user is in the middle of a mouse gesture.
2515             Redo mouse over and out. On mouse over we start the delay timer. On mouse out we stop the delay timer
2516         if it is still running, reset state, and paint the label out.
2517         (WebCore::RenderSnapshottedPlugIn::layout): Refactor.
2518
2519         * Resources/startButtonPressed.png: Removed.
2520         * Resources/startButtonPressed@2x.png: Removed.
2521         * WebCore.xcodeproj/project.pbxproj:
2522
2523 2012-12-07  Scott Violet  <sky@chromium.org>
2524
2525         [chromium] Remove linux theme related files and switch to default
2526         https://bugs.webkit.org/show_bug.cgi?id=103897
2527
2528         Reviewed by Dimitri Glazkov.
2529
2530         Linux related theme files are now named Default.
2531
2532         No new tests, code cleanup.
2533
2534         * WebCore.gyp/WebCore.gyp: Update files
2535         * WebCore.gypi: Update files
2536         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
2537         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
2538         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
2539         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
2540         * rendering/RenderThemeChromiumAndroid.cpp:
2541         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
2542         * rendering/RenderThemeChromiumAndroid.h: Change superclass
2543         * rendering/RenderThemeChromiumLinux.cpp: Removed.
2544         * rendering/RenderThemeChromiumLinux.h: Removed.
2545
2546 2012-12-07  Eric Carlson  <eric.carlson@apple.com>
2547
2548         Captions menu doesn't update to track changes
2549         https://bugs.webkit.org/show_bug.cgi?id=104393
2550
2551         Reviewed by Dean Jackson.
2552
2553         Flag the captions menu as needing an update when tracks are added or removed. Don't actually
2554         change the menu until it needs to be displayed.
2555
2556         No new tests, media/video-controls-captions-trackmenu.html was updated to test this.
2557
2558         * html/HTMLMediaElement.cpp:
2559         (WebCore::HTMLMediaElement::addTextTrack): Call closedCaptionTracksChanged().
2560         (WebCore::HTMLMediaElement::didRemoveTrack): Ditto.
2561         (WebCore::HTMLMediaElement::configureTextTracks): Ditto.
2562
2563         * html/shadow/MediaControlElements.cpp:
2564         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
2565             Intialize m_trackListHasChanged.
2566         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Call rebuildTrackListMenu if
2567             the track list has changed.
2568         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Renamed from resetTrackListMenu.
2569         * html/shadow/MediaControlElements.h:
2570         (WebCore::MediaControlClosedCaptionsTrackListElement::resetTrackListMenu): Just set m_trackListHasChanged.
2571
2572         * html/shadow/MediaControls.h:
2573         (WebCore::MediaControls::closedCaptionTracksChanged): New, do nothing for base class.
2574
2575         * html/shadow/MediaControlsApple.cpp:
2576         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList): Update the track list before 
2577             showing it.
2578         (WebCore::MediaControlsApple::closedCaptionTracksChanged):
2579         * html/shadow/MediaControlsApple.h:
2580
2581 2012-12-07  Stephen White  <senorblanco@chromium.org>
2582
2583         CSS url() filters with forward references don't work
2584         https://bugs.webkit.org/show_bug.cgi?id=90405
2585
2586         Based on a patch by Keyar Hood.
2587
2588         Reviewed by Dirk Schulze.
2589
2590         In order for CSS to reference SVG filters that will occur later in
2591         the document, or will be added at a future time, we need a way to
2592         notify the target element (the one the filter style is applied to)
2593         when the correct SVG filter is added to the DOM.
2594         There is already code for SVG elements that handles this problem, in
2595         SVGResourcesCache. This patch allows any element to have a reference to
2596         an SVG element in SVGResourceCache.
2597
2598         Tests: css3/filters/effect-reference-after.html
2599                css3/filters/effect-reference-delete-crash.html
2600                css3/filters/effect-reference-delete.html
2601                css3/filters/effect-reference-rename.html
2602                css3/filters/effect-reference-reset-style-delete-crash.html
2603                svg/filters/filter-cycle.html
2604
2605         * dom/Element.cpp:
2606         (WebCore::Element::hasPendingResources): Added
2607         (WebCore::Element::setHasPendingResources): Added
2608         (WebCore::Element::clearHasPendingResources): Added
2609         * dom/Element.h:
2610         Accessors for ElementRareData's new bit flag.
2611         (WebCore::Element::buildPendingResource):
2612         Virtual function to override for referenced elements (moved from SVGElement).
2613         * dom/ElementRareData.h:
2614         (WebCore::ElementRareData::ElementRareData):
2615         Add a new bit flag to indicate whether the element depends on pending resources or not.
2616         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2617         (WebCore::BitmapTextureImageBuffer::applyFilters):
2618         Changed to the new function signature for FilterEffectRenderer::build().
2619         * rendering/FilterEffectRenderer.cpp:
2620         (WebCore::FilterEffectRenderer::buildReferenceFilter):
2621         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.  If the referenced filter cannot be found, add its id as a pending reference.
2622         (WebCore::FilterEffectRenderer::build):
2623         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.
2624         * rendering/FilterEffectRenderer.h:
2625         Change to signatures of build() and buildReferenceFilter() to pass
2626         a RenderObject instead of a Document.
2627         * rendering/RenderLayer.cpp:
2628         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
2629         Use the new semantics for FilterEffectRenderer::build().
2630         * rendering/RenderObject.cpp:
2631         (WebCore::RenderObject::willBeDestroyed):
2632         Notify the cache if a RenderObject is destroyed.
2633         * rendering/svg/RenderSVGResourceContainer.cpp:
2634         (WebCore::RenderSVGResourceContainer::registerResource):
2635         Call clearHasPendingResourceIfPossible on the SVGDocumentExtensions, not
2636         on the element, since we want to support generic Elements.
2637         * rendering/svg/SVGResources.cpp:
2638         (WebCore::SVGResources::buildCachedResources):
2639         Add support for building filters on non-SVG elements.
2640         * rendering/svg/SVGResourcesCache.cpp:
2641         (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
2642         Do cycle detection only on SVG elements.
2643         (WebCore::SVGResourcesCache::clientStyleChanged):
2644         For non-SVG elements, set a synthetic style change when parent resources
2645         are invalidated.
2646         (WebCore::SVGResourcesCache::resourceDestroyed):
2647         Add support for non-SVG Elements.
2648         * svg/SVGDocumentExtensions.cpp:
2649         (WebCore::SVGDocumentExtensions::addPendingResource):
2650         (WebCore::SVGDocumentExtensions::isElementPendingResources):
2651         (WebCore::SVGDocumentExtensions::isElementPendingResource):
2652         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
2653         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
2654         Changed to allow use of Element instead of SVGElement.
2655         (WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible):
2656         Moved from SVGElement, and made to work on any Element.  This way,
2657         we avoid adding this function to Element itself.
2658         * svg/SVGDocumentExtensions.h:
2659         SVGElement -> Element.
2660         * svg/SVGElement.cpp:
2661         * svg/SVGElement.h:
2662         All functions moved to Element, except for clearHasPendingResourcesIfPossible() moved to SVGDocumentExtensions.
2663         * svg/SVGElementRareData.h:
2664         (WebCore::SVGElementRareData::SVGElementRareData):
2665         m_hasPendingResources add accessors moved to ElementRareData.
2666         * svg/SVGStyledElement.cpp:
2667         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
2668         SVGElement -> Element, and call SVGDocumentExtensions for
2669         clearHasPendingResourcesIfPossible().
2670
2671 2012-12-07  Eberhard Graether  <egraether@google.com>
2672
2673         Web Inspector: Add shortcut to set visibility:hidden on elements in the ElementsPanel
2674         https://bugs.webkit.org/show_bug.cgi?id=104146
2675
2676         Reviewed by Pavel Feldman.
2677
2678         This change adds the shortcut H to set and unset visibility:hidden on the inline style
2679         of elements in the Elementspanel. This feature makes it easier to look for elements that
2680         cause bad rendering performance, because visibility:hidden does not paint the element,
2681         but preserves the layout.
2682
2683         No new tests.
2684
2685         * English.lproj/localizedStrings.js:
2686         * inspector/front-end/CSSStyleModel.js:
2687         (WebInspector.CSSStyleModel.prototype.toggleInlineVisibility):
2688         * inspector/front-end/ElementsPanelDescriptor.js:
2689         (WebInspector.ElementsPanelDescriptor.prototype.registerShortcuts):
2690         * inspector/front-end/ElementsTreeOutline.js:
2691         (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
2692         * inspector/front-end/KeyboardShortcut.js:
2693
2694 2012-12-07  Andreas Kling  <akling@apple.com>
2695
2696         Improve our decoded data size estimation for style sheets.
2697         <http://webkit.org/b/104388>
2698
2699         Reviewed by Antti Koivisto.
2700
2701         Tweak how we estimate the total decoded size of a given style sheet. (We were guessing at about 30% of actual size.)
2702         This is just used as a hint to the WebCore cache.
2703
2704         * css/StylePropertySet.cpp:
2705         (WebCore::StylePropertySet::averageSizeInBytes):
2706         * css/StyleRule.cpp:
2707         (WebCore::StyleRule::averageSizeInBytes):
2708
2709 2012-12-07  Robert Hogan  <robert@webkit.org>
2710
2711         REGRESSION(r127163): Content is offset to the right at rea.ru
2712         https://bugs.webkit.org/show_bug.cgi?id=103116
2713
2714         Reviewed by David Hyatt.
2715
2716         The top margin edge of a self-collapsing block that clears a float intrudes up into it by the height of the margin,
2717         so to ensure any child floats of the self-collapsing block only go as far as the top content edge 
2718         add the margin back in to the block's current height before placing them.
2719
2720         Tests: fast/block/margin-collapse/self-collapsing-block-with-float-child-collapsed-margins.html
2721                fast/block/margin-collapse/self-collapsing-block-with-float-child.html
2722
2723         * rendering/RenderBlockLineLayout.cpp:
2724         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2725
2726 2012-12-07  Alexis Menard  <alexis@webkit.org>
2727
2728         Improve r136754 by hardening checks of expected values for background-position.
2729         https://bugs.webkit.org/show_bug.cgi?id=104380
2730
2731         Reviewed by Antti Koivisto.
2732
2733         r136754 was landed to fix the problem of checking successively two calc
2734         values with validUnit. It was asserting as validUnit expect you to use
2735         the parsed value of the calc after the call. In this case we pre-check the
2736         background-position longhand to count how many values it has to then
2737         call the right parsing functions accordingly. While r136754 is not
2738         wrong it is better to harden isPotentialPositionValue with the real
2739         expected units and keywords. For this matter we can reuse the
2740         ReleaseParsedCalcValueCondition enum which was created with the same
2741         idea as this patch. If you are not interested of the calc parsed
2742         value when calling validUnit() you can now specify it, I believe it is
2743         good to have it explicit to avoid mistake in the future.
2744
2745         No new tests : this is covered by css3/*, fast/backgrounds/*.
2746
2747         * css/CSSParser.cpp:
2748         (WebCore::CSSParser::validCalculationUnit):
2749         (WebCore::CSSParser::validUnit):
2750         (WebCore::CSSParser::isPotentialPositionValue):
2751         * css/CSSParser.h:
2752         (WebCore::CSSParser::validUnit):
2753         (CSSParser):
2754
2755 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
2756
2757         Remove unnecessary casts in transformations.
2758         https://bugs.webkit.org/show_bug.cgi?id=104376
2759
2760         Reviewed by Simon Fraser.
2761
2762         Several casts from float-to-double are performed prior to
2763         storing the result in a double type. These casts are unnecessary
2764         overhead and reduce the clarity of the source code.
2765
2766         No new tests. Covered by existing CSS test cases.
2767
2768         * platform/graphics/transforms/RotateTransformOperation.cpp:
2769         * platform/graphics/transforms/TransformationMatrix.cpp:
2770
2771 2012-12-07  Antoine Quint  <graouts@apple.com>
2772
2773         Provide the backend for exposing the layer tree to the Web Inspector
2774         https://bugs.webkit.org/show_bug.cgi?id=103513
2775
2776         Reviewed by Pavel Feldman.
2777
2778         The purpose of this patch is to provide a new agent enabling the Web Inspector to interface
2779         with WebCore to access information about the render layer tree and, more specifically, expose
2780         useful information about layers backed by textures composited on the GPU such as metrics and
2781         backing store. Thus we now provide a LayerTreeAgent which will inform the front-end of 
2782         changes to the render layer tree via a new layerTreeDidChange event, providing an object
2783         containing the entire hierarchy of RenderLayers for the inspected document. This hierarchy 
2784         can be queried at any time using the .getLayerTree() method on the LayerTreeAgent. Finally, 
2785         the LayerTreeAgent also exposes a .nodeIdForLayerId() method allowing to get the id of the 
2786         node associated with the RenderLayer with the provided layer id.
2787         
2788         In terms of implementation, RenderLayerCompositor has been changed such that in its 
2789         updateCompositingLayers() method we call the layerTreeDidChange method on the 
2790         InspectorLayerTreeAgent instance via the InspectorInstrumentation.
2791
2792         Test: inspector-protocol/layer-tree.html
2793
2794         * CMakeLists.txt:
2795         * GNUmakefile.list.am:
2796         * Target.pri:
2797         * WebCore.gypi:
2798         * WebCore.vcproj/WebCore.vcproj:
2799         * WebCore.xcodeproj/project.pbxproj:
2800         * inspector/Inspector.json: Define new types IntRect (x, y, width, height) and Layer, which 
2801         holds the information for a RenderLayer (layerId, bounds, isComposited, memory, 
2802         compositedBounds) and its children (childLayers). We also define the methods of the 
2803         LayerTreeAgent object (enable, disable, getLayerTree, nodeIdForLayerId) and the 
2804         layerTreeDidChange event it  
2805         fires.
2806         * inspector/InspectorAllInOne.cpp:
2807         * inspector/InspectorController.cpp:
2808         (WebCore::InspectorController::InspectorController):
2809         * inspector/InspectorDOMAgent.cpp:
2810         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend): New method facilitating 
2811         pushing the node associated with a given RenderLayer to the front-end.
2812         (WebCore):
2813         * inspector/InspectorDOMAgent.h:
2814         (InspectorDOMAgent):
2815         * inspector/InspectorInstrumentation.cpp:
2816         (WebCore):
2817         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2818         (WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
2819         (WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
2820         * inspector/InspectorInstrumentation.h:
2821         (WebCore):
2822         (InspectorInstrumentation):
2823         (WebCore::InspectorInstrumentation::layerTreeDidChange):
2824         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
2825         * inspector/InspectorLayerTreeAgent.cpp: Added.
2826         (WebCore):
2827         (LayerTreeAgentState):
2828         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
2829         (WebCore::InspectorLayerTreeAgent::~InspectorLayerTreeAgent):
2830         (WebCore::InspectorLayerTreeAgent::setFrontend):
2831         (WebCore::InspectorLayerTreeAgent::clearFrontend):
2832         (WebCore::InspectorLayerTreeAgent::restore):
2833         (WebCore::InspectorLayerTreeAgent::reset):
2834         (WebCore::InspectorLayerTreeAgent::enable):
2835         (WebCore::InspectorLayerTreeAgent::disable):
2836         (WebCore::InspectorLayerTreeAgent::layerTreeDidChange):
2837         (WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
2838         (WebCore::InspectorLayerTreeAgent::getLayerTree):
2839         (WebCore::InspectorLayerTreeAgent::buildObjectForRootLayer):
2840         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Build the entire hierarchy of 
2841         RenderLayers from the provided RenderLayer.
2842         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
2843         (WebCore::InspectorLayerTreeAgent::bind):
2844         (WebCore::InspectorLayerTreeAgent::unbind):
2845         (WebCore::InspectorLayerTreeAgent::nodeIdForLayerId):
2846         * inspector/InspectorLayerTreeAgent.h: Added.
2847         (WebCore):
2848         (InspectorLayerTreeAgent):
2849         (WebCore::InspectorLayerTreeAgent::create):
2850         * inspector/InstrumentingAgents.h:
2851         (WebCore):
2852         (WebCore::InstrumentingAgents::InstrumentingAgents):
2853         (InstrumentingAgents):
2854         (WebCore::InstrumentingAgents::inspectorLayerTreeAgent):
2855         (WebCore::InstrumentingAgents::setInspectorLayerTreeAgent):
2856         * rendering/RenderLayerCompositor.cpp:
2857         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call the layerTreeDidChange method 
2858         on the LayerTreeAgent via the InspectorInstrumentation to inform the front-end that the 
2859         RenderLayer hierarchy has changed.
2860         (WebCore):
2861         (WebCore::RenderLayerCompositor::layerBecameNonComposited): Call the renderLayerDestroyed 
2862         method on the LayerTreeAgent via the InspectorInstrumentation to unbind the layer that is 
2863         being destroyed.
2864         * rendering/RenderLayerCompositor.h:
2865         (RenderLayerCompositor):
2866
2867 2012-12-07  Joshua Bell  <jsbell@chromium.org>
2868
2869         IndexedDB: Check SSV version when opening database
2870         https://bugs.webkit.org/show_bug.cgi?id=102243
2871
2872         Reviewed by Tony Chang.
2873
2874         Ensure that the data format (SerializedScriptValue) isn't "from the future" when opening
2875         a backing store. Treat an unknown version the same as an unknown schema version.
2876
2877         Chromium-side test at https://codereview.chromium.org/11470013/ (same as other schema version tests)
2878
2879         * Modules/indexeddb/IDBBackingStore.cpp:
2880         (WebCore):
2881         (WebCore::isSchemaKnown): Check data version as well.
2882         (WebCore::setUpMetadata): Ensure data version is recorded; bump schema version.
2883         * Modules/indexeddb/IDBLevelDBCoding.cpp: Encoding for "DataVersion" global metadata entry.
2884         (IDBLevelDBCoding):
2885         (WebCore::IDBLevelDBCoding::compare):
2886         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
2887         * Modules/indexeddb/IDBLevelDBCoding.h:
2888         (DataVersionKey):
2889         (IDBLevelDBCoding):
2890         * bindings/js/SerializedScriptValue.cpp:
2891         (SerializedScriptValue::wireFormatVersion): New method (JSC side).
2892         * bindings/js/SerializedScriptValue.h:
2893         * bindings/v8/SerializedScriptValue.cpp:
2894         (WebCore::SerializedScriptValue::wireFormatVersion): New method (V8 side).
2895         (WebCore):
2896         * bindings/v8/SerializedScriptValue.h:
2897         (SerializedScriptValue):
2898
2899 2012-12-07  Andreas Kling  <akling@apple.com>
2900
2901         Throw away StyleResolvers that haven't been used for a long time.
2902         <http://webkit.org/b/104314>
2903
2904         Reviewed by Antti Koivisto.
2905
2906         A lot of memory gets tied up in StyleResolver and the structures and caches that hang from it.
2907         Add a mechanism to throw it away after it's been unused for a while (1 minute.)
2908         This frees up large amounts of memory on inactive pages (background tabs) and static content.
2909
2910         We already have a number of scenarios where the document style is invalidated by throwing away
2911         the StyleResolver so the major code paths are prepared for having a null StyleResolver* on occasion.
2912
2913         ~20MB progression on Membuster3.
2914
2915         * css/StyleResolver.cpp:
2916         (WebCore::StyleResolver::styleForElement):
2917         (WebCore::StyleResolver::styleForKeyframe):
2918         (WebCore::StyleResolver::pseudoStyleForElement):
2919         (WebCore::StyleResolver::styleForPage):
2920
2921             Call document()->didAccessStyleResolver() from the relevant parts of StyleResolver's public API.
2922             This prevents Document from throwing the StyleResolver away for 1 minute after it's used.
2923
2924         * dom/Document.h:
2925         * dom/Document.cpp:
2926         (WebCore::Document::Document):
2927         (WebCore::Document::createStyleResolver):
2928         (WebCore::Document::didAccessStyleResolver):
2929         (WebCore::Document::styleResolverThrowawayTimerFired):
2930
2931             Add a mechanism to call clearStyleResolver() on a refreshing timer.
2932
2933         * dom/Element.cpp:
2934         (WebCore::Element::attributeChanged):
2935
2936             If an attribute change occurs while the document doesn't have a StyleResolver, dirty the element style
2937             since we can't be sure that the attribute change didn't affect any rules.
2938
2939 2012-12-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2940
2941         REGRESSION(r136947): Made two tests fail on all platforms (Requested by tonikitoo-ll on #webkit).
2942         https://bugs.webkit.org/show_bug.cgi?id=104368
2943
2944         Unreviewed partial rollout.
2945
2946         r136947 was too aggressive in the sense of fixing RenderBox::canBeScrolledAndHasScrollableArea
2947         as part of itself. Revert the related changes in order to fix both
2948         fast/events/autoscroll-should-not-stop-on-keypress.html and
2949         fast/events/autoscroll-in-textfield.html
2950
2951         * rendering/RenderBox.cpp:
2952         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
2953         * rendering/RenderBox.h:
2954
2955 2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2956
2957         [TexMap] Can not do multiple accelerated animations
2958         https://bugs.webkit.org/show_bug.cgi?id=104364
2959
2960         Reviewed by Kenneth Rohde Christiansen.
2961
2962         By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
2963         Instead only remove any animations with both same name and property.
2964
2965         Covered by animations/opacity-transform-animation.html.
2966
2967         * platform/graphics/GraphicsLayerAnimation.cpp:
2968         (WebCore::GraphicsLayerAnimations::add):
2969         (WebCore::GraphicsLayerAnimations::remove):
2970         * platform/graphics/GraphicsLayerAnimation.h:
2971         (GraphicsLayerAnimations):
2972
2973 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
2974
2975         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
2976         https://bugs.webkit.org/show_bug.cgi?id=104262
2977
2978         Reviewed by Alexis Menard.
2979
2980         EFL port treats build warning as compile error and there are
2981         maybe-uninitialized when building with gcc 4.7.2.
2982         This patch adds default case to resolve a build break.
2983
2984         * css/StyleResolver.cpp:
2985         (WebCore::getFontAndGlyphOrientation):
2986
2987 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
2988
2989         Web Inspector: [Chromium] Ctrl + ']' "Goto right panel" keyboard shortcut doesn't work
2990         https://bugs.webkit.org/show_bug.cgi?id=104250
2991
2992         Reviewed by Pavel Feldman.
2993
2994         Ignore "keypress" event resulting from a WM_CHAR message emitted by Win7 upon Ctrl + ']' keypress.
2995
2996         * inspector/front-end/InspectorView.js:
2997         (WebInspector.InspectorView.prototype._keyPress): Ignore all events with charCode < 32.
2998
2999 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
3000
3001         Web Inspector: provide a way to reload page with given script preprocessor.
3002         https://bugs.webkit.org/show_bug.cgi?id=80992
3003
3004         Reviewed by Yury Semikhatsky.
3005
3006         This change introduces a way to inject 'preprocessor' script that would process
3007         each JavaScript file before it gets into the VM for compilation. That way inspector
3008         can expose capabilities such as assessing code coverage or tracing all the calls.
3009
3010         Preprocessor script is stored in the page agent where it waits for reload to happen.
3011         Upon reload, ScriptDebugServer is using it to patch the script sources.
3012
3013         
3014         Test: inspector/debugger/debugger-script-preprocessor.html
3015
3016         * bindings/js/ScriptDebugServer.h:
3017         (WebCore::ScriptDebugServer::setScriptPreprocessor):
3018         (ScriptDebugServer):
3019         * bindings/v8/DebuggerScript.js:
3020         * bindings/v8/ScriptDebugServer.cpp:
3021         (ScriptDebugServer::ScriptPreprocessor):
3022         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
3023         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
3024         (WebCore::ScriptDebugServer::ScriptPreprocessor::~ScriptPreprocessor):
3025         (WebCore):
3026         (WebCore::ScriptDebugServer::~ScriptDebugServer):
3027         (WebCore::ScriptDebugServer::setScriptSource):
3028         (WebCore::ScriptDebugServer::setScriptPreprocessor):
3029         (WebCore::ScriptDebugServer::handleV8DebugEvent):
3030         * bindings/v8/ScriptDebugServer.h:
3031         (ScriptDebugServer):
3032         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3033         (WebCore::InjectedScriptManager::createInjectedScript):
3034         * inspector/Inspector.json:
3035         * inspector/InspectorController.cpp:
3036         (WebCore::InspectorController::InspectorController):
3037         * inspector/InspectorDebuggerAgent.h:
3038         (InspectorDebuggerAgent):
3039         * inspector/InspectorPageAgent.cpp:
3040         (WebCore::InspectorPageAgent::reload):
3041         (WebCore::InspectorPageAgent::frameNavigated):
3042         * inspector/InspectorPageAgent.h:
3043         (WebCore::InspectorPageAgent::page):
3044         (WebCore::InspectorPageAgent::scriptPreprocessor):
3045         (InspectorPageAgent):
3046         * inspector/PageDebuggerAgent.cpp:
3047         (WebCore::PageDebuggerAgent::create):
3048         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
3049         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
3050         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
3051         (WebCore::PageDebuggerAgent::injectedScriptForEval):
3052         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
3053         (WebCore):
3054         * inspector/PageDebuggerAgent.h:
3055         (WebCore):
3056         (PageDebuggerAgent):
3057
3058 2012-12-07  Alexander Pavlov  <apavlov@chromium.org>
3059
3060         Web Inspector: the "Sources" column is always empty in CSS selector profiles
3061         https://bugs.webkit.org/show_bug.cgi?id=104225
3062
3063         Reviewed by Pavel Feldman.
3064
3065         r112923 and preceding changesets modified the CSSOM wrapper creation for StyleRules in a way
3066         that would not specify the parent CSSStyleSheet for the CSSStyleRules created. Instead,
3067         styleResolver->ensureFullCSSOMWrapperForInspector(rule) is now used to make sure the CSSStyleRule
3068         has a valid parent CSSStyleSheet.
3069
3070         Test: inspector/profiler/selector-profiler-url.html
3071
3072         * css/StyleResolver.cpp:
3073         (WebCore::StyleResolver::collectMatchingRulesForList):
3074         (WebCore::StyleResolver::applyProperties):
3075         * inspector/InspectorInstrumentation.cpp:
3076         (WebCore):
3077         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3078         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
3079         * inspector/InspectorInstrumentation.h:
3080         (WebCore):
3081         (InspectorInstrumentation):
3082         (WebCore::InspectorInstrumentation::willMatchRule):
3083         (WebCore::InspectorInstrumentation::willProcessRule):
3084
3085 2012-12-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
3086
3087         Rework bug 97927 to not depend on RenderLayer::allowsScrolling
3088         https://bugs.webkit.org/show_bug.cgi?id=103999
3089
3090         Reviewed by James Robinson.
3091
3092         Patch makes it possible for methods like
3093         RenderLayer::{updateScrollbarsAfterLayout,updateScrollbarsAfterStyleChange}
3094         to not depend on RenderLayer::allowsScrolling to determine if a layer should
3095         be added or removed from its FrameView's ScrollableArea set.
3096
3097         Following the same logic, the patch also fixes RenderBox::canBeScrolledAndHasScrollableArea
3098         method to take into account the box' scroll allowance in a given direction only
3099         when it overflows. This allows simplifying custom methods like InRegionScrollerPrivate::canScrollRenderBox
3100         (@WebKit/blackberry/Api/InRegionScroller.cpp).
3101
3102         The naming pattern for the newly added methods were chosen to keep the consistency
3103         with the existing ones, in the same class.
3104
3105         No new test: it is already covered by ScrollingCoordinatorChromiumTest.clippedBodyTest.
3106
3107         * rendering/RenderBox.cpp:
3108         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
3109         * rendering/RenderBox.h:
3110         (RenderBox):
3111         (WebCore::RenderBox::hasScrollableOverflowX):
3112         (WebCore::RenderBox::hasScrollableOverflowY):
3113         * rendering/RenderLayer.cpp:
3114         (WebCore::RenderLayer::hasScrollableHorizontalOverflow):
3115         (WebCore):
3116         (WebCore::RenderLayer::hasScrollableVerticalOverflow):
3117         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
3118         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
3119         * rendering/RenderLayer.h:
3120         (RenderLayer):
3121
3122 2012-12-07  Max Feil  <mfeil@rim.com>
3123
3124         [BlackBerry] make "isVideo" information available to platform media player
3125         https://bugs.webkit.org/show_bug.cgi?id=104334
3126
3127         Reviewed by Rob Buis.
3128
3129         The platform player needs to know whether the element is <video>
3130         or <audio>, so it can make certain decisions before metadata
3131         is ready. This is part of a performance optimization refactor
3132         which does not change functionality so no new tests are required.
3133
3134         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3135         (WebCore::MediaPlayerPrivate::load):
3136
3137 2012-12-07  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3138
3139         [EFL] [AC] Implement ImageExtractor::extractImage in GraphicsContext3DEfl.
3140         https://bugs.webkit.org/show_bug.cgi?id=104271.
3141
3142         Reviewed by Kenneth Rohde Christiansen.
3143
3144         This patch implements ImageExtractor::extractImage in GraphicsContext3DEfl.
3145
3146         Covered by existing tests.
3147
3148         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3149         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3150         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3151
3152 2012-12-06  Carlos Garcia Campos  <cgarcia@igalia.com>
3153
3154         Use always the order iterator from data member in RenderFlexibleBox
3155         https://bugs.webkit.org/show_bug.cgi?id=104112
3156
3157         Reviewed by Tony Chang.
3158
3159         Some methods receive it as parameter and others use the data
3160         member.
3161
3162         * rendering/RenderFlexibleBox.cpp:
3163         (WebCore::RenderFlexibleBox::layoutBlock):
3164         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
3165         (WebCore::RenderFlexibleBox::layoutFlexItems):
3166         (WebCore::RenderFlexibleBox::computeNextFlexLine):
3167         (WebCore::RenderFlexibleBox::alignFlexLines):
3168         (WebCore::RenderFlexibleBox::alignChildren):
3169         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
3170         (WebCore::RenderFlexibleBox::flipForWrapReverse):
3171         * rendering/RenderFlexibleBox.h:
3172
3173 2012-12-07  Kent Tamura  <tkent@chromium.org>
3174
3175         Improve confusing code in BaseMultipleFieldsDateAndTimeInputType
3176         https://bugs.webkit.org/show_bug.cgi?id=104353
3177
3178         Reviewed by Kentaro Hara.
3179
3180         This doesn't change any behavior because call sites of
3181         isEditControlOwnerDisabled and isEditControlOwnerReadOnly treat them
3182         similarly.
3183
3184         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3185         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
3186         Checks element()->disabled, not readOnly.
3187         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
3188         Checks element()->readOnly, not disabled.
3189
3190 2012-12-07  Jon Lee  <jonlee@apple.com>
3191
3192         Build fix.
3193
3194         * plugins/PlugInOriginHash.cpp:
3195         (WebCore::PlugInOriginHash::hash):
3196
3197 2012-12-04  Jon Lee  <jonlee@apple.com>
3198
3199         Add PlugInOriginHash
3200         https://bugs.webkit.org/show_bug.cgi?id=103655
3201         <rdar://problem/12778949>
3202
3203         Reviewed by Alexey Proskuryakov.
3204
3205         Add the concept of plug-in origin hashes, which are based on a combination of the base domains of the
3206         page's main frame and the plug-in, and the plug-in MIME type.
3207
3208         * plugins/PlugInOriginHash.cpp: Added.
3209         (WebCore::addCaseFoldedCharacters): Add the case-folded string to the hash.
3210         (WebCore::PlugInOriginHash::hash): The hash is based on the concatenation of the page's host, the plug-in
3211         URL's host, and the MIME type. We use StringHasher to get all 32-bits of the hash, since using StringImpl's hash
3212         masks out 8 of the hash bits to make room for bit flags.
3213         * plugins/PlugInOriginHash.h: Added.
3214
3215         * CMakeLists.txt:
3216         * GNUmakefile.list.am:
3217         * Target.pri:
3218         * WebCore.gypi:
3219         * WebCore.vcproj/WebCore.vcproj:
3220         * WebCore.xcodeproj/project.pbxproj:
3221
3222 2012-12-06  Kent Tamura  <tkent@chromium.org>
3223
3224         Refactoring: Clean up placeholder attribute usage
3225         https://bugs.webkit.org/show_bug.cgi?id=104337
3226
3227         Reviewed by Kentaro Hara.
3228
3229         No new tests. This doesn't change any behavior.
3230
3231         * html/HTMLInputElement.cpp: Remove placeholder and setPlacehodler.
3232         * html/HTMLInputElement.h: Ditto.
3233         * html/HTMLTextFormControlElement.cpp:
3234         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
3235         We can use fastGetAttribute for placeholder.
3236         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
3237         Ditto.
3238
3239 2012-12-06  Kent Tamura  <tkent@chromium.org>
3240
3241         Refactoring: Rename HTMLFormControlElement::required to isRequired
3242         https://bugs.webkit.org/show_bug.cgi?id=104336
3243
3244         Reviewed by Kentaro Hara.
3245
3246         m_required should be m_isRequired, and required() should be
3247         isRequired. It's safe to rename them because HTML*Element::required IDL
3248         attributes are [Reflected].
3249         http://www.webkit.org/coding/coding-style.html#names-bool
3250
3251         * accessibility/AccessibilityNodeObject.cpp:
3252         (WebCore::AccessibilityNodeObject::isRequired):
3253         * css/StyleResolver.cpp:
3254         (WebCore::StyleResolver::canShareStyleWithControl):
3255         * dom/CheckedRadioButtons.cpp:
3256         (WebCore::RadioButtonGroup::add):
3257         (WebCore::RadioButtonGroup::requiredAttributeChanged):
3258         (WebCore::RadioButtonGroup::remove):
3259         * html/CheckboxInputType.cpp:
3260         (WebCore::CheckboxInputType::valueMissing):
3261         * html/FileInputType.cpp:
3262         (WebCore::FileInputType::valueMissing):
3263         * html/HTMLFormControlElement.cpp:
3264         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
3265         (WebCore::HTMLFormControlElement::parseAttribute):
3266         (WebCore::HTMLFormControlElement::isRequired):
3267         * html/HTMLFormControlElement.h:
3268         (HTMLFormControlElement):
3269         * html/HTMLInputElement.cpp:
3270         (WebCore::HTMLInputElement::isRequiredFormControl):
3271         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
3272         * html/HTMLSelectElement.cpp:
3273         (WebCore::HTMLSelectElement::valueMissing):
3274         (WebCore::HTMLSelectElement::isRequiredFormControl):
3275         * html/HTMLTextAreaElement.h:
3276         (WebCore::HTMLTextAreaElement::isRequiredFormControl):
3277         * html/TextFieldInputType.cpp:
3278         (WebCore::TextFieldInputType::valueMissing):
3279
3280 2012-12-06  Hajime Morrita  <morrita@google.com>
3281
3282         [Shadow DOM] Implement Element::shadowRoot with prefix
3283         https://bugs.webkit.org/show_bug.cgi?id=102912
3284
3285         Reviewed by Dimitri Glazkov.
3286
3287         - Added Element::shadowRoot() which return the youngest author shadow root.
3288         - Renamed existing Node::shadowRoot() to containingShadowRoot() to avoid name shadowing.
3289           The name shadowRoot() is confusing anyway so this is good opportunity to rename it.
3290
3291         Test: fast/dom/shadow/shadow-aware-shadow-root.html
3292
3293         * css/SelectorChecker.cpp:
3294         (WebCore::SelectorChecker::checkSelector):
3295         * css/StyleScopeResolver.cpp:
3296         (WebCore::StyleScopeResolver::scopeFor):
3297         (WebCore::StyleScopeResolver::addHostRule):
3298         * dom/Element.cpp:
3299         (WebCore::Element::shadowRoot):
3300         (WebCore):
3301         * dom/Element.h:
3302         (Element):
3303         * dom/Element.idl:
3304         * dom/ElementShadow.cpp:
3305         (WebCore::ElementShadow::setShouldCollectSelectFeatureSet):
3306         * dom/Node.cpp:
3307         (WebCore::Node::rendererIsEditable):
3308         (WebCore::Node::shadowHost):
3309         (WebCore::Node::shadowAncestorNode):
3310         (WebCore::Node::containingShadowRoot):
3311         * dom/Node.h:
3312         (Node):
3313         * dom/Range.cpp:
3314         (WebCore::Range::shadowRoot):
3315         * dom/ShadowRoot.cpp:
3316         (WebCore::ShadowRoot::insertedInto):
3317         (WebCore::ShadowRoot::removedFrom):
3318         * dom/ShadowRoot.h:
3319         (WebCore::ShadowRoot::isAccessible):
3320         * editing/TextIterator.cpp:
3321         (WebCore::TextIterator::handleReplacedElement):
3322         * editing/htmlediting.cpp:
3323         (WebCore::indexForVisiblePosition):
3324         * html/HTMLStyleElement.cpp:
3325         (WebCore::HTMLStyleElement::scopedAttributeChanged):
3326         (WebCore::HTMLStyleElement::registerWithScopingNode):
3327         (WebCore::HTMLStyleElement::removedFrom):
3328         * html/shadow/ContentDistributor.cpp:
3329         (WebCore::ContentDistributor::distribute):
3330         * html/shadow/HTMLContentElement.cpp:
3331         (WebCore::HTMLContentElement::parseAttribute):
3332         (WebCore::HTMLContentElement::insertedInto):
3333         (WebCore::HTMLContentElement::removedFrom):
3334         * html/shadow/HTMLShadowElement.cpp:
3335         (WebCore::HTMLShadowElement::insertedInto):
3336         (WebCore::HTMLShadowElement::removedFrom):
3337         * html/shadow/InsertionPoint.cpp:
3338         (WebCore::InsertionPoint::attach):
3339         (WebCore::InsertionPoint::detach):
3340         (WebCore::InsertionPoint::isActive):
3341         (WebCore::InsertionPoint::childrenChanged):
3342         (WebCore::InsertionPoint::insertedInto):
3343         (WebCore::InsertionPoint::removedFrom):
3344         (WebCore::InsertionPoint::setResetStyleInheritance):
3345         * page/EventHandler.cpp:
3346         (WebCore::instanceAssociatedWithShadowTreeElement):
3347         * svg/SVGElement.cpp:
3348         (WebCore::SVGElement::correspondingElement):
3349         (WebCore::collectInstancesForSVGElement):
3350
3351 2012-12-06  Michael Pruett  <michael@68k.org>
3352
3353         IndexedDB: Replace int64 with int64_t
3354         https://bugs.webkit.org/show_bug.cgi?id=104338
3355
3356         Reviewed by Kentaro Hara.
3357
3358         Cleaning up coding inconsistencies, no change in behavior.
3359
3360         Tests: storage/indexeddb/*
3361
3362         * Modules/indexeddb/IDBFactory.cpp:
3363         (WebCore::IDBFactory::openInternal):
3364
3365 2012-12-06  James Simonsen  <simonjam@chromium.org>
3366
3367         [Resource Timing] Allow detailed timing on same origin sites
3368         https://bugs.webkit.org/show_bug.cgi?id=104328
3369
3370         Reviewed by Tony Gentilcore.
3371
3372         This block was lost when I moved it to PerformanceResourceTiming.cpp.
3373
3374         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html
3375
3376         * page/PerformanceResourceTiming.cpp:
3377         (WebCore::passesTimingAllowCheck):
3378
3379 2012-12-06  Rick Byers  <rbyers@chromium.org>
3380
3381         CSS cursor property should support webkit-image-set
3382         https://bugs.webkit.org/show_bug.cgi?id=99493
3383
3384         Reviewed by Beth Dakin.
3385
3386         Add support for image scale factors attached to custom mouse cursor images
3387         behind ENABLE(MOUSE_CURSOR_SCALE).
3388
3389         This required refactoring CSSCursorImageValue to derive directly from
3390         CSSValue since it can contain either a CSSImageValue or a CSSImageSetValue.
3391         If it contains an image-set, then we can plumb directly through to the
3392         CSSImageSetValue.  If it contains an image, then either we can plumb directly
3393         through to the CSSImageValue, or if the URL represents an SVG cursor we have
3394         to intercept the image loading in order to substitute the actual SVG image URL
3395         and do the appropriate lifetime management.
3396
3397         Tests: fast/css/cursor-parsing-image-set.html
3398                fast/events/mouse-cursor-image-set.html
3399
3400         * Configurations/FeatureDefines.xcconfig: Add ENABLE_MOUSE_CURSOR_SCALE - disabled
3401         * GNUmakefile.features.am: ditto
3402         * css/CSSCursorImageValue.cpp: Refactor to inherit directly from CSSValue and support image sets
3403         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
3404         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
3405         (WebCore::CSSCursorImageValue::customCssText):
3406         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
3407         (WebCore::CSSCursorImageValue::cachedImage):
3408         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
3409         (WebCore::CSSCursorImageValue::isSVGCursor):
3410         (WebCore::CSSCursorImageValue::cachedImageURL):
3411         (WebCore::CSSCursorImageValue::clearCachedImage):
3412         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
3413         * css/CSSCursorImageValue.h: Remove cursor-specific hacks
3414         (WebCore::CSSCursorImageValue::create):
3415         (CSSCursorImageValue):
3416         * css/CSSImageValue.cpp:
3417         (WebCore::CSSImageValue::cachedImage):
3418         * css/CSSImageValue.h:
3419         (CSSImageValue):
3420         * css/CSSParser.cpp:
3421         (WebCore::CSSParser::parseValue): Parse cursor(-webkit-image-set(...)) rules
3422         * css/CSSValue.h:
3423         (WebCore::CSSValue::isImageValue):
3424         * css/StyleBuilder.cpp:
3425         (WebCore::ApplyPropertyCursor::applyValue):
3426         * css/StyleResolver.cpp: Hook up new CSSCursorImageValue support since it can't be handled like other images any more.
3427         (WebCore::StyleResolver::styleImage):
3428         (WebCore::StyleResolver::cursorOrPendingFromValue):
3429         (WebCore::StyleResolver::loadPendingImage):
3430         * css/StyleResolver.h: