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