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