Move more rubberbanding code into ScrollAnimatorMac::smoothScrollWithEvent
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-06  Anders Carlsson  <andersca@apple.com>
2
3         Move more rubberbanding code into ScrollAnimatorMac::smoothScrollWithEvent
4         https://bugs.webkit.org/show_bug.cgi?id=75750
5
6         Reviewed by Sam Weinig.
7
8         * platform/mac/ScrollAnimatorMac.h:
9         * platform/mac/ScrollAnimatorMac.mm:
10         (WebCore::ScrollAnimatorMac::handleWheelEvent):
11         Move rubberbanding related code into smoothScrollWithEvent.
12
13         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
14         Move code here from handleWheelEvent and made the function return a boolean.
15
16         (WebCore::ScrollAnimatorMac::snapRubberBand):
17         Call the client.
18
19         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
20         Ditto.
21
22 2012-01-06  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
23
24         Use HashMap<OwnPtr> in SVGAttributeToPropertyMap
25         https://bugs.webkit.org/show_bug.cgi?id=75734
26
27         Reviewed by Daniel Bates.
28
29         * svg/properties/SVGAttributeToPropertyMap.cpp:
30         (WebCore::SVGAttributeToPropertyMap::addProperties):
31         (WebCore::SVGAttributeToPropertyMap::addProperty): use HashMap::add() to avoid an
32         extra hash lookup to set a new PropertiesVector.
33         (WebCore::SVGAttributeToPropertyMap::synchronizeProperties):
34         * svg/properties/SVGAttributeToPropertyMap.h:
35
36 2012-01-06  Greg Billock  <gbillock@google.com>
37
38         WebCore implementation of the Intent object
39         See http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
40         for draft spec.
41
42         https://bugs.webkit.org/show_bug.cgi?id=73051
43
44         Reviewed by Adam Barth.
45
46         Test: web-intents/web-intents-api.html
47
48         * WebCore.gypi:
49         * page/DOMWindow.idl:
50         * Modules/intents/Intent.cpp: Added.
51         (WebCore::Intent::Intent):
52         (WebCore::Intent::action):
53         (WebCore::Intent::setAction):
54         (WebCore::Intent::type):
55         (WebCore::Intent::setType):
56         (WebCore::Intent::data):
57         (WebCore::Intent::setData):
58         (WebCore::Intent::create):
59         * Modules/intents/Intent.h: Added.
60         * Modules/intents/Intent.idl: Added.
61
62 2012-01-06  Tim Horton  <timothy_horton@apple.com>
63
64         [cg] userSpaceOnUse SVG Patterns have the wrong origin
65         https://bugs.webkit.org/show_bug.cgi?id=75741
66         <rdar://problem/9383222>
67
68         Reviewed by Simon Fraser.
69
70         The transformation from pattern space to user space should use the userToBase CTM,
71         not the current CTM.
72
73         Test: svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml
74
75         * platform/graphics/cg/GraphicsContextCG.cpp:
76         (WebCore::GraphicsContext::applyStrokePattern):
77         (WebCore::GraphicsContext::applyFillPattern):
78         (WebCore::GraphicsContext::getCTM):
79         * platform/graphics/cg/TransformationMatrixCG.cpp:
80         (WebCore::AffineTransform::AffineTransform): Add a AffineTransform(CGAffineTransform) constructor
81         * platform/graphics/transforms/AffineTransform.h:
82
83 2012-01-05  Simon Fraser  <simon.fraser@apple.com>
84
85         Avoid falling into tiled layers more often when the device scale factor is > 1
86         <rdar://problem/10588725>
87
88         Reviewed by John Sullivan.
89         
90         Stop taking the device scale factor into account when deciding to make
91         tiled layers.
92
93         Test: compositing/tiled-layers-hidpi.html
94
95         * platform/graphics/ca/GraphicsLayerCA.cpp:
96         (WebCore::GraphicsLayerCA::requiresTiledLayer):
97
98 2012-01-06  Ryosuke Niwa  <rniwa@webkit.org>
99
100         Touch a bunch of files in an attempt to fix Mac release builds.
101
102         * accessibility/AXObjectCache.cpp:
103         (WebCore::AXObjectCache::get):
104         * accessibility/AccessibilityAllInOne.cpp:
105         * editing/visible_units.cpp:
106         (WebCore::previousBoundary):
107
108 2012-01-06  No'am Rosenthal  <noam.rosenthal@nokia.com>
109
110         Enable a compositing trigger for filters
111         https://bugs.webkit.org/show_bug.cgi?id=75658
112
113         This will enable forcing the compositing code path when filters exist for a RenderObject.
114
115         Reviewed by Simon Fraser.
116
117         No new functionality so no new tests.
118
119         * page/ChromeClient.h:
120         * rendering/RenderLayerCompositor.cpp:
121         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
122         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
123         * rendering/RenderLayerCompositor.h:
124
125 2012-01-06  Anders Carlsson  <andersca@apple.com>
126
127         Add and use ScrollElasticityControllerClient::absoluteScrollPosition
128         https://bugs.webkit.org/show_bug.cgi?id=75744
129
130         Reviewed by Dan Bernstein.
131
132         * platform/mac/ScrollAnimatorMac.h:
133         * platform/mac/ScrollAnimatorMac.mm:
134         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
135         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
136         * platform/mac/ScrollElasticityController.h:
137
138 2012-01-06  Adam Barth  <abarth@webkit.org>
139
140         Move FrameDestructionObserver to its own file
141         https://bugs.webkit.org/show_bug.cgi?id=75693
142
143         Reviewed by Eric Seidel.
144
145         We should have one class per file, on general principles.  Also, this
146         make it possible to use this class in DOMWindow without introducing a
147         circular include dependency.
148
149         * CMakeLists.txt:
150         * GNUmakefile.list.am:
151         * Target.pri:
152         * WebCore.gypi:
153         * WebCore.vcproj/WebCore.vcproj:
154         * page/Frame.cpp:
155         * page/Frame.h:
156         * page/FrameDestructionObserver.cpp: Added.
157         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
158         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
159         (WebCore::FrameDestructionObserver::frameDestroyed):
160         * page/FrameDestructionObserver.h: Added.
161         (WebCore::FrameDestructionObserver::frame):
162         * plugins/DOMMimeType.h:
163         * plugins/DOMPlugin.h:
164
165 2012-01-06  Anders Carlsson  <andersca@apple.com>
166
167         Fix Snow Leopard build.
168
169         * platform/mac/ScrollAnimatorMac.mm:
170         (WebCore::ScrollAnimatorMac::immediateScrollBy):
171         Move the function definition inside #if ENABLE(RUBBER_BANDING).
172
173 2012-01-04  Jon Lee  <jonlee@apple.com>
174
175         Clicking on the cancel button on readonly and disabled search fields darkens as if the search field was editable
176         https://bugs.webkit.org/show_bug.cgi?id=69886
177         <rdar://problem/10070187>
178
179         Reviewed by Adele Peterson.
180
181         Tests: ManualTests/search-cancel-button.html
182
183         * rendering/RenderThemeMac.mm:
184         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): If the input is readonly and/or disabled, force the cell to
185         render without highlight.
186
187 2012-01-06  Simon Fraser  <simon.fraser@apple.com>
188
189         Mitigate scrollbar differences when running pixel tests
190         https://bugs.webkit.org/show_bug.cgi?id=67217
191
192         Reviewed by Dan Bernstein.
193
194         Export WebCore::Settings::mockScrollbarsEnabled() for DRT.
195
196         * WebCore.exp.in:
197
198 2012-01-06  Tom Sepez  <tsepez@chromium.org>
199
200         Pass Content-Security-Policy directives to worker threads.
201         https://bugs.webkit.org/show_bug.cgi?id=73242
202
203         Reviewed by David Levin.
204
205         Tests: http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
206                http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html
207                http/tests/security/contentSecurityPolicy/worker-connect-src-allowed.html
208                http/tests/security/contentSecurityPolicy/worker-connect-src-blocked.html
209
210         * page/ContentSecurityPolicy.h:
211         (WebCore::ContentSecurityPolicy::policy):
212         (WebCore::ContentSecurityPolicy::headerType):
213         * workers/DedicatedWorkerContext.cpp:
214         (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
215         * workers/DedicatedWorkerContext.h:
216         (WebCore::DedicatedWorkerContext::create):
217         * workers/DedicatedWorkerThread.cpp:
218         (WebCore::DedicatedWorkerThread::create):
219         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
220         (WebCore::DedicatedWorkerThread::createWorkerContext):
221         * workers/DedicatedWorkerThread.h:
222         * workers/DefaultSharedWorkerRepository.cpp:
223         (WebCore::SharedWorkerScriptLoader::notifyFinished):
224         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
225         * workers/DefaultSharedWorkerRepository.h:
226         * workers/SharedWorkerContext.cpp:
227         (WebCore::SharedWorkerContext::SharedWorkerContext):
228         * workers/SharedWorkerContext.h:
229         (WebCore::SharedWorkerContext::create):
230         * workers/SharedWorkerThread.cpp:
231         (WebCore::SharedWorkerThread::create):
232         (WebCore::SharedWorkerThread::SharedWorkerThread):
233         (WebCore::SharedWorkerThread::createWorkerContext):
234         * workers/SharedWorkerThread.h:
235         * workers/WorkerContext.cpp:
236         (WebCore::WorkerContext::WorkerContext):
237         * workers/WorkerContext.h:
238         * workers/WorkerMessagingProxy.cpp:
239         (WebCore::WorkerMessagingProxy::startWorkerContext):
240         * workers/WorkerThread.cpp:
241         (WebCore::WorkerThreadStartupData::create):
242         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
243         (WebCore::WorkerThread::WorkerThread):
244         (WebCore::WorkerThread::workerThread):
245         * workers/WorkerThread.h:
246
247 2012-01-06  Mihnea Ovidenie  <mihnea@adobe.com>
248
249         [CSSRegions]Crash while collecting svg elements in render flow thread.
250         https://bugs.webkit.org/show_bug.cgi?id=73735
251
252         Reviewed by David Hyatt.
253
254         Tests: fast/regions/svg-doc-fragment-not-collected-expected.html
255                fast/regions/svg-doc-fragment-not-collected.html
256                fast/regions/svg-element-not-collected-expected.html
257                fast/regions/svg-element-not-collected.html
258                fast/regions/svg-root-element-collected.html
259
260         By allowing only svg root elements to be collected in a render flow thread,
261         the svg render tree is properly constructed, thus prevented a possible further crash.
262
263         * dom/NodeRenderingContext.cpp:
264         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
265
266 2012-01-06  Eric Carlson  <eric.carlson@apple.com>
267
268         Make TextTrackCue more mutable
269         https://bugs.webkit.org/show_bug.cgi?id=72555
270
271         Reviewed by Anders Carlsson.
272
273         Test: media/track/track-cue-mutable.html
274
275         * html/HTMLMediaElement.cpp:
276         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Do nothing if the "ignore cue updates"
277             flag is set
278         (WebCore::HTMLMediaElement::textTrackAddCues): Block cue updates until all of the new cues have
279             been added, then call updateActiveTextTrackCues so update the display if necessary.
280         (WebCore::HTMLMediaElement::textTrackRemoveCues): Block cue updates until all of the new cues have
281             been removed, then call updateActiveTextTrackCues so update the display if necessary.
282         (WebCore::HTMLMediaElement::textTrackAddCue): Call updateActiveTextTrackCues so update the display if necessary.
283         (WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.
284         * html/HTMLMediaElement.h:
285         (WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests):
286         (WebCore::HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests):
287         (WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests):
288
289         * html/TextTrack.cpp:
290         (WebCore::TextTrack::cueWillChange): New, remove the cue from the media element because its
291             position in the interval tree is based on start and end times.
292         (WebCore::TextTrack::cueDidChange): Add the cue to the media element.
293         * html/TextTrack.h:
294
295         * html/TextTrackCue.cpp:
296         (WebCore::startKeyword): New, use a static String for the constant.
297         (WebCore::middleKeyword): Ditto.
298         (WebCore::endKeyword): Ditto.
299         (WebCore::horizontalKeyword): Ditto.
300         (WebCore::verticalKeyword): Ditto.
301         (WebCore::verticallrKeyword): Ditto.
302         (WebCore::TextTrackCue::cueWillChange): New, tell the track the cue is about to change.
303         (WebCore::TextTrackCue::cueDidChange): New, tell the track the cue has changed.
304         (WebCore::TextTrackCue::setId): New, attribute is mutable.
305         (WebCore::TextTrackCue::setStartTime): Ditto.
306         (WebCore::TextTrackCue::setEndTime): Ditto.
307         (WebCore::TextTrackCue::setPauseOnExit): Ditto.
308         (WebCore::TextTrackCue::direction): Ditto.
309         (WebCore::TextTrackCue::setDirection): Ditto.
310         (WebCore::TextTrackCue::setSnapToLines): Ditto.
311         (WebCore::TextTrackCue::setLinePosition): Ditto.
312         (WebCore::TextTrackCue::setTextPosition): Ditto.
313         (WebCore::TextTrackCue::setSize): Ditto.
314         (WebCore::TextTrackCue::alignment): Ditto.
315         (WebCore::TextTrackCue::setAlignment): Ditto.
316         (WebCore::TextTrackCue::parseSettings): Use the static strings.
317         * html/TextTrackCue.h:
318         (WebCore::TextTrackCue::id):
319         (WebCore::TextTrackCue::startTime):
320         (WebCore::TextTrackCue::endTime):
321         (WebCore::TextTrackCue::pauseOnExit):
322         * html/TextTrackCue.idl:
323
324 2012-01-06  Oliver Hunt  <oliver@apple.com>
325
326         DFG no longer optimises CanvasPixelArray
327         https://bugs.webkit.org/show_bug.cgi?id=75729
328
329         Reviewed by Gavin Barraclough.
330
331         Remove the custom ClassInfo for CanvasPixelArray as that is
332         defeating ByteArray optimisation, and is no longer needed
333         anyway as it was only there to change the visible name.
334
335         * bindings/js/JSImageDataCustom.cpp:
336         (WebCore::toJS):
337
338 2012-01-06  Ken Buchanan  <kenrb@chromium.org>
339
340         ASSERT failure due to combine-text with preceding spaces
341         https://bugs.webkit.org/show_bug.cgi?id=65147
342
343         Reviewed by David Hyatt.
344
345         A couple of ASSERTs were failing due to a parsing problem when
346         advancing an inline iterator to the next linebreak in a
347         RenderCombineText. skipLeadingWhitespace advances the iterator
348         over leading whitespace but when searching for the line break
349         nextLineBreak would call RenderCombineText::combineText(),
350         collapsing the text so that the iterator is pointing past the
351         end of it.
352
353         This patch causes combineText() to be called during
354         skipLeadingWhiteSpace before iteration over the RenderCombineText
355         begins.
356
357         * rendering/RenderBlockLineLayout.cpp:
358         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
359         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
360
361 2012-01-06  Anders Carlsson  <andersca@apple.com>
362
363         Make ScrollAnimatorMac::snapRubberBandTimerFired use m_scrollElasticityController in more places
364         https://bugs.webkit.org/show_bug.cgi?id=75726
365
366         Reviewed by Sam Weinig.
367
368         * platform/mac/ScrollAnimatorMac.h:
369         * platform/mac/ScrollAnimatorMac.mm:
370         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
371         (WebCore::ScrollAnimatorMac::canScrollVertically):
372         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
373         * platform/mac/ScrollElasticityController.h:
374
375 2012-01-06  Pratik Solanki  <psolanki@apple.com>
376
377         WebKit1 fails to compile with USE(CFNETWORK) and HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
378         https://bugs.webkit.org/show_bug.cgi?id=75675
379
380         Reviewed by Oliver Hunt.
381
382         * platform/network/cf/ResourceHandleCFNet.cpp:
383         (WebCore::willCacheResponse):
384
385 2012-01-06  Abhishek Arya  <inferno@chromium.org>
386
387         Crash with range selection across different documents.
388         https://bugs.webkit.org/show_bug.cgi?id=74285
389
390         Reviewed by Ryosuke Niwa.
391
392         Test: fast/dom/Range/range-selection-across-documents-crash.html
393
394         * page/DOMSelection.cpp:
395         (WebCore::DOMSelection::addRange):
396
397 2012-01-06  Sam Weinig  <sam@webkit.org>
398
399         Remove unused OwnFastMallocPtr class.
400         https://bugs.webkit.org/show_bug.cgi?id=75722
401
402         Reviewed by Geoffrey Garen.
403
404         * ForwardingHeaders/wtf/OwnFastMallocPtr.h: Removed.
405         * bindings/js/JSWebGLRenderingContextCustom.cpp:
406
407 2012-01-06  Tony Chang  <tony@chromium.org>
408
409         Need to relayout when stretching the height of a flex item
410         https://bugs.webkit.org/show_bug.cgi?id=75661
411
412         Reviewed by Ojan Vafai.
413
414         Test: css3/flexbox/flex-align-stretch.html
415
416         * rendering/RenderFlexibleBox.cpp:
417         (WebCore::RenderFlexibleBox::computePreferredMainAxisExtent): Always clear the override size since
418         it may be set when aligning.
419         (WebCore::RenderFlexibleBox::alignChildren): Only relayout if the height changed.
420
421 2012-01-06  Anders Carlsson  <andersca@apple.com>
422
423         Add ScrollElasticityControllerClient::immediateScrollBy
424         https://bugs.webkit.org/show_bug.cgi?id=75720
425
426         Reviewed by Andreas Kling.
427
428         Add a new ScrollElasticityControllerClient::immediateScrollBy client member function.
429         Also, make ScrollAnimatorMac::smoothScrollWithEvent calls go through the ScrollElasticityController
430         in preparation for moving that function to ScrollElasticityController.
431
432         * platform/mac/ScrollAnimatorMac.h:
433         * platform/mac/ScrollAnimatorMac.mm:
434         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
435         * platform/mac/ScrollElasticityController.h:
436
437 2012-01-06  Wei James  <james.wei@intel.com>
438
439         Use VectorMath lib when possible to optimize the processing in WebAudio AudioBus
440         https://bugs.webkit.org/show_bug.cgi?id=75334
441
442         Reviewed by Kenneth Russell.
443
444         * platform/audio/AudioBus.cpp:
445         (WebCore::AudioBus::processWithGainFromMonoStereo):
446
447 2012-01-06  Jer Noble  <jer.noble@apple.com>
448
449         Fullscreen video controller can't be dragged the first time I enter fullscreen
450         https://bugs.webkit.org/show_bug.cgi?id=75709
451
452         Reviewed by Eric Carlson.
453
454         No new tests; updated video-controls-drag.html.
455
456         When the media controls are created, check to see if we are full screen, and pass
457         that information to the newly created controls.
458
459         * html/HTMLMediaElement.cpp:
460         (WebCore::HTMLMediaElement::createMediaControls):
461
462 2012-01-05  Jer Noble  <jer.noble@apple.com>
463
464         Media Element: scrubbing in full-screen mode breaks playback.
465         https://bugs.webkit.org/show_bug.cgi?id=75650
466
467         Reviewed by John Sullivan.
468
469         Test: fullscreen/video-controls-timeline.html
470
471         Only begin scrubbing if the panel itself is the mousedown event target.
472
473         * html/shadow/MediaControlElements.cpp:
474         (WebCore::MediaControlPanelElement::defaultEventHandler):
475
476 2012-01-05  Jer Noble  <jer.noble@apple.com>
477
478         REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
479         https://bugs.webkit.org/show_bug.cgi?id=75200
480
481         Reviewed by Eric Carlson.
482
483         Test: fullscreen/video-controls-drag.html
484
485         The !important rules in fullscreenQuickTime.css are overriding the styles added by the 
486         drag operation in MediaControlElements.cpp.  Give the panel a "dragged" class in setPosition
487         (clearing it in resetPosition) that allows the !important rules to apply only when the 
488         panel is not dragged.
489
490         * css/fullscreenQuickTime.css:
491         (video:-webkit-full-screen::-webkit-media-controls-panel):
492         (video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged)):
493         * html/shadow/MediaControlElements.cpp:
494         (WebCore::MediaControlPanelElement::setPosition):
495         (WebCore::MediaControlPanelElement::resetPosition):
496
497 2012-01-05  Antti Koivisto  <antti@apple.com>
498
499         REGRESSION (r104060): fast/forms/textarea-metrics.html is failing
500         https://bugs.webkit.org/show_bug.cgi?id=75644
501
502         Reviewed by Alexey Proskuryakov.
503
504         We need to clear the style selector on doc type change as the doc type
505         may affect interpretation of the stylesheets. r104060 extended the life
506         of the style selector in some cases, exposing this problem.
507
508         * dom/Document.cpp:
509         (WebCore::Document::setDocType):
510
511 2012-01-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
512
513         [Qt] Move listing of include paths and libs to pri files in sources
514
515         Includepaths are sometimes modified by non-Qt contributors so keeping
516         them in files inside Sources makes it more likely that they are updated
517         along with project files for the other ports.
518
519         Using pri files instead of prf files for this also has the benefit that
520         the include() from the main target file can be parsed and followed by
521         Qt Creator -- something that does not work with load().
522
523         Dependency from a target to a library through the WEBKIT variable are
524         handled through forwarding-files in Tools/qmake/mkspecs/modules, which
525         set the source root of the module and include the right pri file.
526
527         Ideally we'd use the variant of include() that takes an optional
528         namespace to read the variables into, or the fromfile() function,
529         but both of these add an overhead of about 40% on the total qmake
530         runtime, due to making a deep copy of all the variables in the
531         project or re-reading all the prf files from scratch.
532
533         Reviewed by Simon Hausmann.
534         Reviewed by Ossy.
535
536         * Target.pri:
537         * WebCore.pri: Renamed from Tools/qmake/mkspecs/features/webcore.prf.
538
539 2012-01-06  Adam Barth  <abarth@webkit.org>
540
541         FrameDestructionObserver should be more full-service
542         https://bugs.webkit.org/show_bug.cgi?id=75690
543
544         Reviewed by Eric Seidel.
545
546         This patch moves code common to both subclasses of
547         FrameDestructionObserver into FrameDestructionObserver itself.  As we
548         add more subclasses, we don't want to keep copy/pasting this code.
549
550         * page/Frame.cpp:
551         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
552         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
553         (WebCore::FrameDestructionObserver::frameDestroyed):
554         * page/Frame.h:
555         (WebCore::FrameDestructionObserver::frame):
556         * plugins/DOMMimeType.cpp:
557         (WebCore::DOMMimeType::DOMMimeType):
558         (WebCore::DOMMimeType::~DOMMimeType):
559         * plugins/DOMMimeType.h:
560         * plugins/DOMPlugin.cpp:
561         (WebCore::DOMPlugin::DOMPlugin):
562         (WebCore::DOMPlugin::~DOMPlugin):
563         * plugins/DOMPlugin.h:
564
565 2012-01-06  Dale Curtis  <dalecurtis@chromium.org>
566
567         Move MediaDocument styles into CSS. Set black background for chromium.
568         https://bugs.webkit.org/show_bug.cgi?id=74123
569
570         Reviewed by Eric Seidel.
571
572         Test: platform/chromium/media/video-black-bg-in-media-document.html
573
574         * css/mediaControls.css:
575         (body:-webkit-full-page-media):
576         (video:-webkit-full-page-media):
577         * css/mediaControlsChromium.css:
578         (body:-webkit-full-page-media):
579         * html/MediaDocument.cpp:
580         (WebCore::MediaDocumentParser::createDocumentStructure):
581
582 2012-01-06  Alice Boxhall  <aboxhall@chromium.org>
583
584         Report correct line number for non-native editable text elements.
585         https://bugs.webkit.org/show_bug.cgi?id=71263
586
587         Reviewed by Ryosuke Niwa.
588
589         A non-native editable text element is an element with an ARIA role of "textbox", which is
590         set on an element which behaves like an editable text element (such as a textarea, text
591         input field or contenteditable text), but whose behaviour is controlled by the author rather
592         than the browser.
593
594         This change makes certain methods on Node, and related methods in htmlediting and
595         visible_units, aware of the notion that an element may be editable only from the point of
596         view of assistive technology (via the ARIA textbox role), via the EditableType enum added to
597         EditingBoundary.h.
598
599         This is so that AccessibilityObject::lineForPosition() can use previousLinePosition(), and
600         AccessibilityRenderObject::indexForVisiblePosition() can use highestEditableRoot(), in a way
601         that respects non-native editability.
602
603         Test: accessibility/textbox-role-reports-line-number.html
604
605         * accessibility/AXObjectCache.cpp:
606         (WebCore::AXObjectCache::rootAXEditableElement): Returns the root element which is
607         editable from the point of view of assistive technology, whether natively or otherwise.
608         (WebCore::AXObjectCache::nodeIsTextControl): Whether the given node is considered an
609         editable text element by assistive technology, natively or otherwise.
610         * accessibility/AccessibilityObject.cpp:
611         (WebCore::AccessibilityObject::lineForPosition): Modified to request the previous line
612         position in an element which is editable to Accessibility.
613         * accessibility/AccessibilityRenderObject.cpp:
614         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Modified to request the
615         highest root element which is editable to Accessibility.
616         * dom/Node.cpp:
617         (WebCore::Node::rendererIsEditableToAccessibility): Whether this node is editable to
618         Accessibility for the given EditableLevel.
619         (WebCore::Node::rootEditableElement): Overloaded version of this method which takes an
620         EditableType enum value indicating whether non-native editability is to be respected.
621         * dom/Node.h:
622         (WebCore::Node::rendererIsEditable): Overloaded version of this method which takes an
623         EditableType enum value indicating whether non-native editability is to be respected.
624         (WebCore::Node::rendererIsRichlyEditable):  Overloaded version of this method which takes
625         an EditableType enum value indicating whether non-native editability is to be respected.
626         * editing/EditingBoundary.h:
627         * editing/htmlediting.cpp:
628         (WebCore::highestEditableRoot): Added optional EditableType parameter.
629         (WebCore::isEditablePosition): Added optional EditableType parameter.
630         (WebCore::isRichlyEditablePosition): Added optional EditableType parameter.
631         (WebCore::editableRootForPosition): Added optional EditableType parameter.
632         * editing/htmlediting.h:
633         * editing/visible_units.cpp:
634         (WebCore::previousLeafWithSameEditability): Added optional EditableType parameter.
635         (WebCore::previousLinePosition): Added optional EditableType parameter.
636         (WebCore::nextLeafWithSameEditability): Added optional EditableType parameter.
637         (WebCore::nextLinePosition): Added optional EditableType parameter.
638         * editing/visible_units.h:
639
640 2012-01-05  Kent Tamura  <tkent@chromium.org>
641
642         Fix a crash by importing an element of which local name ends with ":input".
643         https://bugs.webkit.org/show_bug.cgi?id=75103
644
645         Reviewed by Ryosuke Niwa.
646
647         Test: fast/dom/importNode-confusing-localName.html
648
649         * dom/Document.cpp:
650         (WebCore::Document::importNode): Pass QualifiedName of the source elemnt
651         to createElement() in order to avoid unnecessary serialization and
652         parsing of the qualified name
653
654 2012-01-06  Alexis Menard  <alexis.menard@openbossa.org>
655
656         Move HTMLFormControlElementWithState class in its own header file.
657         https://bugs.webkit.org/show_bug.cgi?id=75482
658
659         Reviewed by Kent Tamura.
660
661         Move HTMLFormControlElementWithState class which was mixed in HTMLFormControlElement
662         files into its own header file and its own implementation file.
663
664         No new tests : the existing ones should cover the refactoring.
665
666         * CMakeLists.txt:
667         * GNUmakefile.list.am:
668         * Target.pri:
669         * WebCore.gypi:
670         * WebCore.vcproj/WebCore.vcproj:
671         * WebCore.xcodeproj/project.pbxproj:
672         * html/HTMLElementsAllInOne.cpp:
673         * html/HTMLFormControlElement.cpp:
674         * html/HTMLFormControlElement.h:
675         * html/HTMLKeygenElement.h:
676         * html/HTMLSelectElement.h:
677         * html/HTMLTextFormControlElement.h:
678
679 2012-01-06  Sheriff Bot  <webkit.review.bot@gmail.com>
680
681         Unreviewed, rolling out r104268.
682         http://trac.webkit.org/changeset/104268
683         https://bugs.webkit.org/show_bug.cgi?id=75689
684
685         It broke the mac build (Requested by Ossy on #webkit).
686
687         * CMakeLists.txt:
688         * GNUmakefile.list.am:
689         * Target.pri:
690         * WebCore.gypi:
691         * WebCore.vcproj/WebCore.vcproj:
692         * WebCore.xcodeproj/project.pbxproj:
693         * html/HTMLElementsAllInOne.cpp:
694         * html/HTMLFormControlElement.cpp:
695         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
696         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
697         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
698         (WebCore::HTMLFormControlElementWithState::shouldAutocomplete):
699         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
700         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
701         * html/HTMLFormControlElement.h:
702         (WebCore::HTMLFormControlElementWithState::canContainRangeEndPoint):
703         (WebCore::HTMLFormControlElementWithState::saveFormControlState):
704         (WebCore::HTMLFormControlElementWithState::restoreFormControlState):
705         * html/HTMLFormControlElementWithState.cpp: Removed.
706         * html/HTMLFormControlElementWithState.h: Removed.
707         * html/HTMLKeygenElement.h:
708         * html/HTMLSelectElement.h:
709         * html/HTMLTextFormControlElement.h:
710
711 2012-01-06  Sheriff Bot  <webkit.review.bot@gmail.com>
712
713         Unreviewed, rolling out r104259 and r104261.
714         http://trac.webkit.org/changeset/104259
715         http://trac.webkit.org/changeset/104261
716         https://bugs.webkit.org/show_bug.cgi?id=75688
717
718         Caused assertion failures (Requested by rniwa on #webkit).
719
720         * CMakeLists.txt:
721         * GNUmakefile.list.am:
722         * Target.pri:
723         * WebCore.gypi:
724         * WebCore.vcproj/WebCore.vcproj:
725         * WebCore.xcodeproj/project.pbxproj:
726         * dom/ContainerNode.cpp:
727         (WebCore::ContainerNode::takeAllChildrenFrom):
728         (WebCore::ContainerNode::insertBefore):
729         (WebCore::ContainerNode::replaceChild):
730         (WebCore::ContainerNode::removeBetween):
731         (WebCore::ContainerNode::removeChildren):
732         (WebCore::ContainerNode::appendChild):
733         (WebCore::ContainerNode::parserAddChild):
734         * dom/DOMAllInOne.cpp:
735         * dom/Document.cpp:
736         (WebCore::Document::setDocType):
737         (WebCore::Document::adoptNode):
738         * dom/Element.cpp:
739         (WebCore::Element::removeShadowRoot):
740         * dom/Node.cpp:
741         (WebCore::Node::setDocument):
742         (WebCore::Node::setTreeScopeRecursively):
743         (WebCore::Node::setDocumentRecursively):
744         (WebCore::Node::didMoveToNewDocument):
745         * dom/Node.h:
746         * dom/TreeScope.cpp:
747         * dom/TreeScope.h:
748         * dom/TreeScopeAdopter.cpp: Removed.
749         * dom/TreeScopeAdopter.h: Removed.
750
751 2012-01-05  Dan Bernstein  <mitz@apple.com>
752
753         <rdar://problem/10633760> Update copyright strings
754
755         Reviewed by Mark Rowe.
756
757         * Info.plist:
758
759 2012-01-05  Alexis Menard  <alexis.menard@openbossa.org>
760
761         Move HTMLFormControlElementWithState class in its own header file.
762         https://bugs.webkit.org/show_bug.cgi?id=75482
763
764         Reviewed by Kent Tamura.
765
766         Move HTMLFormControlElementWithState class which was mixed in HTMLFormControlElement
767         files into its own header file and its own implementation file.
768
769         No new tests : the existing ones should cover the refactoring.
770
771         * CMakeLists.txt:
772         * GNUmakefile.list.am:
773         * Target.pri:
774         * WebCore.gypi:
775         * WebCore.vcproj/WebCore.vcproj:
776         * WebCore.xcodeproj/project.pbxproj:
777         * html/HTMLElementsAllInOne.cpp:
778         * html/HTMLFormControlElement.cpp:
779         * html/HTMLFormControlElement.h:
780         * html/HTMLKeygenElement.h:
781         * html/HTMLSelectElement.h:
782         * html/HTMLTextFormControlElement.h:
783
784 2012-01-05  Wei James  <james.wei@intel.com>
785
786         Optimize with memcpy instead of copying frame by frame in Realtimeanalyser::doFFTAnalysis
787         https://bugs.webkit.org/show_bug.cgi?id=74693
788
789         Reviewed by Kenneth Russell.
790
791         * webaudio/RealtimeAnalyser.cpp:
792         (WebCore::RealtimeAnalyser::doFFTAnalysis):
793
794 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
795
796         REGRESSION(r104210): Dromaeo DOM test score is lower
797         https://bugs.webkit.org/show_bug.cgi?id=75679
798
799         Reviewed by Andreas Kling.
800
801         The regression was caused by isDomVersionConsistent not being able to obtain the tree version
802         inside isLengthCacheValid when m_cachedItem is null. Fix the regression by always setting
803         m_cachedItem to some node when caching the length so that we can obtain the tree version later.
804
805         Also address Antti's review comment to fit m_cachedLength, m_isLengthCacheValid, and
806         m_isItemCacheValid all in 32-bit.
807
808         * dom/DynamicNodeList.cpp:
809         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
810
811 2012-01-05  Hajime Morrita  <morrita@chromium.org>
812
813         Unreviewed bad merge fix for r104259 which dropped a line from r104210.
814
815         * dom/TreeScopeAdopter.cpp:
816         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
817
818 2012-01-05  Yongjun Zhang  <yongjun_zhang@apple.com>
819
820         https://bugs.webkit.org/show_bug.cgi?id=75593
821         Reviewed by Alexey Proskuryakov.
822
823         Null-check 'page' variable before use, to follow the common usage pattern of m_frame->page()
824         throughout the rest of FrameView.cpp.
825
826         * page/FrameView.cpp:
827         (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
828
829 2012-01-04  Hajime Morrita  <morrita@chromium.org>
830
831         [Refactoring] Moving between TreeScopes should be done by its own class.
832         https://bugs.webkit.org/show_bug.cgi?id=75290
833
834         Reviewed by Ryosuke Niwa.
835
836         This change extracted Node::setTreeScopeRecursively(),
837         setDocumentRecursively() and a part of setDocument() into a new
838         class called TreeScopeAdopter. By doing this, the idea of
839         moving a node from scope to scope, that was originally hidden
840         behind the forest of Node APIs, has become clearer.
841
842         Note that this change is a preparation for Bug 59816.
843
844         No new tests. No behavioral change.
845
846         * CMakeLists.txt:
847         * GNUmakefile.list.am:
848         * Target.pri:
849         * WebCore.gypi:
850         * WebCore.vcproj/WebCore.vcproj:
851         * WebCore.xcodeproj/project.pbxproj:
852         * dom/ContainerNode.cpp: Followed the renaming.
853         (WebCore::ContainerNode::takeAllChildrenFrom):
854         (WebCore::ContainerNode::insertBefore):
855         (WebCore::ContainerNode::replaceChild):
856         (WebCore::ContainerNode::removeBetween):
857         (WebCore::ContainerNode::removeChildren):
858         (WebCore::ContainerNode::appendChild):
859         (WebCore::ContainerNode::parserAddChild):
860         * dom/DOMAllInOne.cpp:
861         * dom/Document.cpp: Followed te renaming.
862         (WebCore::Document::setDocType):
863         (WebCore::Document::adoptNode):
864         * dom/Element.cpp: Followed te renaming.
865         (WebCore::Element::removeShadowRoot):
866         * dom/Node.cpp:
867         (WebCore::Node::setDocument):
868         (WebCore::Node::setTreeScope):
869         (WebCore::Node::didMoveToNewDocument):
870         * dom/Node.h:
871         * dom/TreeScope.h:
872         * dom/TreeScope.cpp:
873         (WebCore::TreeScope::adoptIfNeeded): moved from setTreeScopeRecursively()
874         * dom/TreeScopeAdopter.cpp: Added.
875         (WebCore::TreeScopeAdopter::TreeScopeAdopter):
876         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
877         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
878         (WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
879         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
880         * dom/TreeScopeAdopter.h: Added.
881         (WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
882         (WebCore::TreeScopeAdopter::execute):
883         (WebCore::TreeScopeAdopter::needsScopeChange()):
884         (WebCore::TreeScopeAdopter::shadowRootFor):
885
886 2012-01-05  Jochen Eisinger  <jochen@chromium.org>
887
888         Disallow access to DOM storage from detached frames.
889         https://bugs.webkit.org/show_bug.cgi?id=61326
890
891         Reviewed by Adam Barth.
892
893         * storage/StorageAreaImpl.cpp:
894         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
895
896 2012-01-05  No'am Rosenthal  <noam.rosenthal@nokia.com>
897
898         [Qt][Texmap] Convert shaders in TextureMapperGL to use a macro
899         https://bugs.webkit.org/show_bug.cgi?id=75598
900
901         Use VERTEX_SHADER() and FRAGMENT_SHADER() macros, instead of quoted string literals when
902         declaring shaders in TextureMapperGL.
903
904         We need two macros to account for the differences between OpenGL and OpenGL ES2.
905
906         Reviewed by Martin Robinson.
907
908 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
909
910         sizeof(CSSRule) is 20 instead of 12 on Windows
911         https://bugs.webkit.org/show_bug.cgi?id=75665
912
913         Reviewed by Darin Fisher.
914
915         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
916         in bitfields. e.g. if you have:
917
918         sturct AB {
919         unsigned m_1 : 31;
920         bool m_2 : 1;
921         }
922
923         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
924         only allocate sizeof(unsigned) * 1 for AB.
925
926         Fix the bloat by turning all bitfields in CSSRule either signed or unsigned integers.
927
928         * css/CSSRule.cpp:
929         * css/CSSRule.h:
930         (WebCore::CSSRule::sourceLine):
931         (WebCore::CSSRule::setSourceLine):
932         (WebCore::CSSRule::hasCachedSelectorText):
933         (WebCore::CSSRule::setHasCachedSelectorText):
934         * css/CSSStyleRule.cpp:
935         (WebCore::CSSStyleRule::CSSStyleRule):
936         (WebCore::CSSStyleRule::cleanup):
937         (WebCore::CSSStyleRule::selectorText):
938         (WebCore::CSSStyleRule::setSelectorText):
939         * css/CSSStyleRule.h:
940
941 2012-01-05  David Grogan  <dgrogan@chromium.org>
942
943         IndexedDB: fix cursor prefetch crash
944         http://crbug.com/108071
945         https://bugs.webkit.org/show_bug.cgi?id=75596
946
947         Reviewed by Tony Chang.
948
949         Test: storage/indexeddb/prefetch-bugfix-108071.html
950         Note: DumpRenderTree doesn't exercise the bug, it only occurs in
951         multi-process chromium.  The layout test will soon be run as a
952         chromium ui test: http://codereview.chromium.org/9108004
953
954         * storage/IDBCursorBackendImpl.cpp:
955         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
956         (WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl): Destroy
957         cursors before their objectstores.
958         (WebCore::IDBCursorBackendImpl::prefetchReset): Don't run continue if
959         the cursor is closed.
960         (WebCore::IDBCursorBackendImpl::close): Set a closed flag.
961         * storage/IDBCursorBackendImpl.h:
962
963 2012-01-04  James Robinson  <jamesr@chromium.org>
964
965         [chromium] Route all animate calls through CCLayerTreeHost in composited mode to simplify rate limiting logic
966         https://bugs.webkit.org/show_bug.cgi?id=75577
967
968         Reviewed by Darin Fisher.
969
970         This internalizes the animation rate limiting logic to CCLayerTreeHost and removes the setters/getters for the
971         m_animating flag. This requires that all animation updates have to go through CCLayerTreeHost to get the right
972         rate limiting behavior, regardless of which proxy is being used.
973
974         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
975         (WebCore::CCLayerTreeHost::updateAnimations):
976         (WebCore::CCLayerTreeHost::layout):
977         (WebCore::CCLayerTreeHost::startRateLimiter):
978         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
979         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
980         (WebCore::CCThreadProxy::beginFrameAndCommit):
981
982 2012-01-05  Justin Novosad  <junov@chromium.org>
983
984         [Chromium] NativeImageSkia should mark SkBitmaps as immutable
985         https://bugs.webkit.org/show_bug.cgi?id=74962
986
987         Removed m_isDataComplete from class NativeImageSkia. Instead, data
988         completeness will be tracked through SkBitmap::setImmutable/
989         isImmutable.  The immutable state signifies that the pixel data
990         will no longer change for the lifetime of the bitmap, which corresponds
991         to the semantic of the old m_isDataComplete member. setImmutable is
992         also called on the cached resized bitmap, since it too is invariant for
993         its life time. Temporary resized bitmaps are also marked as immutable
994         since they technically are.
995
996         Reviewed by Stephen White.
997
998         * platform/graphics/skia/NativeImageSkia.cpp:
999         (WebCore::NativeImageSkia::NativeImageSkia):
1000         (WebCore::NativeImageSkia::resizedBitmap):
1001         (WebCore::NativeImageSkia::shouldCacheResampling):
1002         * platform/graphics/skia/NativeImageSkia.h:
1003         (WebCore::NativeImageSkia::setDataComplete):
1004         (WebCore::NativeImageSkia::isDataComplete):
1005
1006 2012-01-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1007
1008         Unreviewed, rolling out r104231.
1009         http://trac.webkit.org/changeset/104231
1010         https://bugs.webkit.org/show_bug.cgi?id=75668
1011
1012         Breaks the Qt build (Requested by abarth on #webkit).
1013
1014         * platform/SchemeRegistry.cpp:
1015         * platform/SchemeRegistry.h:
1016
1017 2012-01-05  Beth Dakin  <bdakin@apple.com>
1018
1019         https://bugs.webkit.org/show_bug.cgi?id=75654
1020         Text fields should draw using NSTextFieldCell instead of WebKitSystemInterface
1021
1022         Reviewed by John Sullivan.
1023
1024         This change should not have any affect on tests or real web sites. It just changed 
1025         the implementation under the hood to the more modern NSCell approach.
1026         * rendering/RenderThemeMac.h:
1027         * rendering/RenderThemeMac.mm:
1028         (WebCore::RenderThemeMac::paintTextField):
1029         (WebCore::RenderThemeMac::textField):
1030
1031 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
1032
1033         Add a compile-time assertion for the size of CSSValue
1034         https://bugs.webkit.org/show_bug.cgi?id=75635
1035
1036         Reviewed by Tony Chang.
1037
1038         Tightened the compile-time assertion.
1039
1040         * css/CSSValue.cpp:
1041
1042 2012-01-05  Adam Barth  <abarth@webkit.org>
1043
1044         [V8] CodeGeneration for SerializedScriptValue doesn't play nice with [Constructor]
1045         https://bugs.webkit.org/show_bug.cgi?id=75641
1046
1047         Reviewed by David Levin.
1048
1049         Rather than generate getters for SerializedScriptValues, we eagerly
1050         deserialize them into JavaScript objects.  However, previously, we were
1051         only doing that for DOM wrappers created by taking an existing C++
1052         object and wrapping it.  For objects created with Constructors (e.g.,
1053         those with the [Constructor] attribute), we need to do this eager
1054         deserialization during the constructor as well.
1055
1056         This bug isn't observable yet, but it is causing the WebIntent test
1057         being added in Bug 73051 to fail.
1058
1059         Test: TestSerializedScriptValueInterface.idl
1060               webintents/web-intents-api.html (after Bug 73051 lands)
1061
1062         * bindings/scripts/CodeGeneratorV8.pm:
1063         (GenerateEagerDeserialization):
1064         (GenerateConstructorCallback):
1065         (GenerateNamedConstructorCallback):
1066         (GenerateImplementation):
1067         (GenerateToV8Converters):
1068         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1069         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
1070         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getConstructData):
1071         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1072         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
1073         * bindings/scripts/test/V8/V8TestInterface.cpp:
1074         (WebCore::V8TestInterface::constructorCallback):
1075         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1076         (WebCore::V8TestNamedConstructorConstructorCallback):
1077         * bindings/scripts/test/V8/V8TestObj.cpp:
1078         (WebCore::V8TestObj::constructorCallback):
1079         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1080         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1081         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
1082         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1083
1084 2012-01-05  Adam Barth  <abarth@webkit.org>
1085
1086         Introduce Platform namespace for WebCore/platform
1087         https://bugs.webkit.org/show_bug.cgi?id=75653
1088
1089         Reviewed by Eric Seidel.
1090
1091         This patch introduces the Platform namespace for WebCore/platform.
1092         Introducing this namespace will help us find and fix layering
1093         violations in preparation for moving WebCore/platform to Platform.
1094
1095         * platform/SchemeRegistry.cpp:
1096         * platform/SchemeRegistry.h:
1097
1098 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
1099
1100         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
1101         https://bugs.webkit.org/show_bug.cgi?id=73853
1102
1103         Reviewed by Antti Koivisto.
1104
1105         Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
1106         the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
1107         frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
1108         the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
1109         etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
1110         DOM tree versions.
1111
1112         In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
1113         by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
1114         invalidates values as needed. Also this change allows m_caches to be allocated as a part of
1115         DynamicSubtreeNodeList instead of a separate ref-counted object.
1116
1117         * dom/Attr.cpp:
1118         (WebCore::Attr::setValue):
1119         (WebCore::Attr::childrenChanged):
1120         * dom/DynamicNodeList.cpp:
1121         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
1122         (WebCore::DynamicSubtreeNodeList::length):
1123         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
1124         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
1125         (WebCore::DynamicSubtreeNodeList::item):
1126         (WebCore::DynamicSubtreeNodeList::invalidateCache):
1127         (WebCore::DynamicNodeList::Caches::create):
1128         (WebCore::DynamicNodeList::Caches::reset):
1129         * dom/DynamicNodeList.h:
1130         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
1131         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
1132         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
1133         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
1134         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
1135         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
1136         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
1137         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
1138         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
1139         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
1140         * dom/Element.cpp:
1141         (WebCore::Element::updateAfterAttributeChanged):
1142         * dom/Node.cpp:
1143         (WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
1144         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
1145         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
1146         (WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
1147         * dom/Node.h:
1148         * dom/NodeRareData.h:
1149         * html/HTMLElement.cpp:
1150         (WebCore::HTMLElement::parseMappedAttribute):
1151         * html/HTMLLabelElement.cpp:
1152         * html/HTMLLabelElement.h:
1153
1154 2012-01-05  Ojan Vafai  <ojan@chromium.org>
1155
1156         IE quirk for percentage size on a table element doesn't work with orthogonal writing modes
1157         https://bugs.webkit.org/show_bug.cgi?id=70195
1158
1159         Reviewed by Eric Seidel.
1160
1161         Remove this quirk entirely. Mozilla and Opera don't implement it and IE
1162         doesn't restrict the quirk to standards mode. As it's unlikely for
1163         webkit-only content to hit this quirk (e.g. use tables for layout),
1164         it should be relatively safe to match Mozilla/Opera here.
1165
1166         Test: fast/writing-mode/table-percent-width-quirk.html
1167
1168         * rendering/RenderBlock.cpp:
1169         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1170
1171 2012-01-05  Tien Ren Chen  <trchen@chromium.org>
1172
1173         [chromium] Add CCTimer class for the compositor
1174         https://bugs.webkit.org/show_bug.cgi?id=74769
1175
1176         Reviewed by James Robinson.
1177
1178         Add a simple timer class for CCThread that the timered task can be
1179         manually cancelled.
1180
1181         * WebCore.gypi:
1182         * platform/graphics/chromium/cc/CCTimer.cpp: Added.
1183         (WebCore::CCTimerTask::CCTimerTask):
1184         (WebCore::CCTimerTask::~CCTimerTask):
1185         (WebCore::CCTimerTask::performTask):
1186         (WebCore::CCTimer::CCTimer):
1187         (WebCore::CCTimer::~CCTimer):
1188         (WebCore::CCTimer::startOneShot):
1189         (WebCore::CCTimer::stop):
1190         * platform/graphics/chromium/cc/CCTimer.h: Added.
1191         (WebCore::CCTimerClient::~CCTimerClient):
1192         (WebCore::CCTimer::isActive):
1193
1194 2012-01-05  Eric Carlson  <eric.carlson@apple.com>
1195
1196         Implement temporal dimension portion of Media Fragments URI specification for video/audio
1197         https://bugs.webkit.org/show_bug.cgi?id=65838
1198
1199         Reviewed by Sam Weinig.
1200
1201         Tests: media/media-fragments/TC0001-TC0009.html
1202                media/media-fragments/TC0010-TC0019.html
1203                media/media-fragments/TC0020-TC0029.html
1204                media/media-fragments/TC0030-TC0039.html
1205                media/media-fragments/TC0040-TC0049.html
1206                media/media-fragments/TC0050-TC0059.html
1207                media/media-fragments/TC0060-TC0069.html
1208                media/media-fragments/TC0070-TC0079.html
1209                media/media-fragments/TC0080-TC0089.html
1210                media/media-fragments/TC0090-TC0099.html
1211
1212         * CMakeLists.txt: Add fragment parser files.
1213         * GNUmakefile.list.am: Ditto.
1214         * Target.pri: Ditto.
1215         * WebCore.gypi: Ditto.
1216         * WebCore.vcproj/WebCore.vcproj: Ditto.
1217         * WebCore.xcodeproj/project.pbxproj: Ditto.
1218
1219         * html/HTMLMediaElement.cpp:
1220         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_fragmentStartTime and m_fragmentEndTime.
1221         (WebCore::HTMLMediaElement::setReadyState): Check for and parse a media fragment once readyState
1222             reaches HAVE_METADATA, apply it once it reaches HAVE_CURRENT_DATA.
1223         (WebCore::HTMLMediaElement::initialTime): Return the fragment start time if possible.
1224         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Pause if the time is >= the fragment
1225             end time.
1226         (WebCore::HTMLMediaElement::prepareMediaFragmentURI): Look for a temporal fragment.
1227         (WebCore::HTMLMediaElement::applyMediaFragmentURI): Apply the fragment, if any.
1228         * html/HTMLMediaElement.h:
1229
1230         * html/MediaFragmentURIParser.cpp: Added.
1231         (WebCore::skipWhiteSpace):
1232         (WebCore::collectDigits):
1233         (WebCore::collectFraction):
1234         (WebCore::MediaFragmentURIParser::invalidTimeValue):
1235         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
1236         (WebCore::MediaFragmentURIParser::startTime):
1237         (WebCore::MediaFragmentURIParser::endTime):
1238         (WebCore::MediaFragmentURIParser::parseFragments):
1239         (WebCore::MediaFragmentURIParser::parseTimeFragment):
1240         (WebCore::MediaFragmentURIParser::parseNPTFragment):
1241         (WebCore::MediaFragmentURIParser::parseNPTTime):
1242         * html/MediaFragmentURIParser.h: Added.
1243         (WebCore::MediaFragmentURIParser::~MediaFragmentURIParser):
1244         (WebCore::MediaFragmentURIParser::create):
1245
1246 2012-01-05  ChangSeok Oh  <shivamidow@gmail.com>
1247
1248         Remove style warning in GraphicsContext3DOpenGL.cpp
1249         https://bugs.webkit.org/show_bug.cgi?id=75466
1250
1251         Reviewed by Kenneth Russell.
1252
1253         Relocated some headers according to alphabetical order & modified indentation.
1254         And used OwnArrayPtr to deal with character array.
1255
1256         No new tests required. 
1257
1258         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1259         (WebCore::GraphicsContext3D::getString):
1260         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1261         (WebCore::GraphicsContext3D::getProgramInfoLog):
1262         (WebCore::GraphicsContext3D::getShaderiv):
1263         (WebCore::GraphicsContext3D::getShaderInfoLog):
1264         (WebCore::GraphicsContext3D::getShaderSource):
1265
1266 2012-01-05  Ken Buchanan <kenrb@chromium.org>
1267
1268         Crash due to reparenting of relpositioned object under anonymous block
1269         https://bugs.webkit.org/show_bug.cgi?id=70848
1270
1271         The associated test case creates a condition where a relative
1272         positioned renderer is a descendant of an anonymous block for a
1273         table column. The anonymous block is the containingBlock() for the
1274         relpositioned renderer. Removal of a div causes the anonymous blocks to
1275         be merged, and the renderer becomes a descendant of a different block.
1276         Since the new containingBlock() has an empty positionedObject list,
1277         the relpositioned renderer does not get layout after being dirtied.
1278
1279         This patch changes containingBlock() so that it returns the container
1280         of an anonymous block for positioned objects, not the anonymous
1281         block itself. It also adds an ASSERT to insertPositionedObject()
1282         to flag any other cases where something is trying to create a
1283         positioned object list on an anonymous block.
1284
1285         Reviewed by David Hyatt.
1286
1287         * rendering/RenderBlock.cpp:
1288         (WebCore::RenderBlock::insertPositionedObject):
1289         * rendering/RenderObject.cpp:
1290         (WebCore::RenderObject::containingBlock):
1291
1292 2012-01-05  Jian Li  <jianli@chromium.org>
1293
1294         FileReader needs addEventListener
1295         https://bugs.webkit.org/show_bug.cgi?id=42723
1296
1297         Reviewed by Adam Barth.
1298
1299         Test: fast/files/file-reader-event-listener.html
1300
1301         * fileapi/FileReader.idl:
1302
1303 2012-01-04  Pratik Solanki  <psolanki@apple.com>
1304
1305         Remove deprecated calls from CookieJarCFNet.cpp
1306         https://bugs.webkit.org/show_bug.cgi?id=68958
1307
1308         Reviewed by Sam Weinig.
1309
1310         * platform/network/cf/CookieJarCFNet.cpp:
1311         (WebCore::cookieDomain):
1312         (WebCore::cookieExpirationTime):
1313         (WebCore::cookieName):
1314         (WebCore::cookiePath):
1315         (WebCore::cookieValue):
1316
1317 2012-01-05  Fady Samuel  <fsamuel@chromium.org>
1318
1319         Move scalePageBy from eventSender to window.internals
1320         https://bugs.webkit.org/show_bug.cgi?id=64512
1321
1322         Reviewed by Simon Fraser.
1323
1324         Added setPageScaleFactor to window.internals.
1325         Renamed window.internals.getPageScaleFactor to window.internals.pageScaleFactor
1326         to match the webkit style.
1327
1328         * testing/Internals.cpp:
1329         (WebCore::Internals::pageScaleFactor):
1330         (WebCore::Internals::setPageScaleFactor):
1331         * testing/Internals.h:
1332         * testing/Internals.idl:
1333
1334 2012-01-05  Cary Clark  <caryclark@google.com>
1335
1336         [Skia Mac] Rounded bezel style button needs one more local graphics context to scale
1337         https://bugs.webkit.org/show_bug.cgi?id=75623
1338         http://code.google.com/p/chromium/issues/detail?id=108749
1339
1340         In paintButton(), the local context is set up first, and later the context is
1341         scaled if there's a zoomFactor. Skia creates the CoreGraphics context to draw the
1342         button into without that scale factor. To fix this, another local context is added
1343         after the parameter context scale, before the button draw. The first local context
1344         is still required to restore the parameter context state.
1345
1346         Reviewed by Stephen White.
1347
1348         * platform/chromium/ThemeChromiumMac.mm:
1349         (WebCore::paintButton):
1350
1351 2012-01-05  Alexis Menard  <alexis.menard@openbossa.org>
1352
1353         getComputedStyle for background is not implemented.
1354         https://bugs.webkit.org/show_bug.cgi?id=75539
1355
1356         Reviewed by Tony Chang.
1357
1358         Implement getComputedStyle for background.
1359
1360         Test: fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
1361
1362         * css/CSSComputedStyleDeclaration.cpp:
1363         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1364
1365 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
1366
1367         DOM Attribute tests on Dromaeo spends 2.7% of time in hasSelectorForAttribute
1368         https://bugs.webkit.org/show_bug.cgi?id=75569
1369
1370         Reviewed by Andreas Kling.
1371
1372         Check needsStyleRecalc() first to avoid unnecessary hash lookups.
1373
1374         * dom/Element.cpp:
1375         (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
1376
1377 2012-01-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1378
1379         [EFL] Replace alloca to C++ new placement.
1380         https://bugs.webkit.org/show_bug.cgi?id=72017
1381
1382         Reviewed by Andreas Kling.
1383
1384         Replaces alloca to C++ new placement as it is not very portable.
1385         It allows to skip checking of memory allocation as new never returns NULL.
1386         According to Edje's documentation type of val (member of Edje_Message_Float_Set)
1387         is double so I changed it to avoid undefined behaviour.
1388
1389         * platform/efl/ScrollbarEfl.cpp:
1390         (ScrollbarEfl::updateThumbPositionAndProportion):
1391
1392 2012-01-05  Benjamin Poulain  <bpoulain@apple.com>
1393
1394         Remove duplicate file references from WebCore.xcodeproj
1395         https://bugs.webkit.org/show_bug.cgi?id=75581
1396
1397         Reviewed by Andreas Kling.
1398
1399         Many generated DOMSVG files had two references.
1400
1401         In platform/graphics, there was two arm directory
1402         with the same files related to ARM Neon.
1403
1404         * WebCore.xcodeproj/project.pbxproj:
1405
1406 2012-01-05  Antti Koivisto  <antti@apple.com>
1407
1408         Improve SelectorChecker::determineSelectorScopes
1409         https://bugs.webkit.org/show_bug.cgi?id=75619
1410
1411         Reviewed by Andreas Kling.
1412
1413         SelectorChecker::determineSelectorScopes currently searches to the end of the selector chain and
1414         then sees if the last one is suitable to be a scope. A better algorithm will find a scope from
1415         anywhere in the chain.
1416         
1417         With this patch we search the whole chain for potential scopes. We now prefer id scopes
1418         over class scopes. Scopes can be found for rules using sibling selectors too.
1419         
1420         On both engadget.com and nytimes.com, we can now skip one more full style recalc due to 
1421         the improved stylesheet analysis. 
1422
1423         * css/SelectorChecker.cpp:
1424         (WebCore::SelectorChecker::determineSelectorScopes):
1425
1426 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1427
1428         [GTK] Use the default screen in PlatformScreenGtk methods when they are called with a NULL widget
1429         https://bugs.webkit.org/show_bug.cgi?id=75620
1430
1431         Reviewed by Philippe Normand.
1432
1433         We are currently retuning an empty rectangle for
1434         screenRect/screenAvailableRect and 0 for getVisual.
1435
1436         * platform/gtk/PlatformScreenGtk.cpp:
1437         (WebCore::getVisual):
1438         (WebCore::screenRect):
1439         (WebCore::screenAvailableRect):
1440
1441 2012-01-05  Alpha Lam  <hclam@chromium.org>
1442
1443         Unreviewed. Build fix.
1444
1445         Adding missing const_cast<> to fix compilation failures due to r104143.
1446
1447         * platform/audio/VectorMath.cpp:
1448         (WebCore::VectorMath::zvmul):
1449
1450 2012-01-05  Adam Barth  <abarth@webkit.org>
1451
1452         Move Gamepad declarations from Navigator.idl into Modules/gamepad
1453         https://bugs.webkit.org/show_bug.cgi?id=75559
1454
1455         Reviewed by Eric Seidel.
1456
1457         This patch moves the gamepad-related declarations in Navigator.idl into
1458         Modules/gamepad.  The next step is to move the state into
1459         Modules/gamepad as well.
1460
1461         * Modules/gamepad/NavigatorGamepad.cpp: Added.
1462         (WebCore::NavigatorGamepad::NavigatorGamepad):
1463         (WebCore::NavigatorGamepad::~NavigatorGamepad):
1464         (WebCore::NavigatorGamepad::webkitGamepads):
1465         * Modules/gamepad/NavigatorGamepad.h: Added.
1466         * Modules/gamepad/NavigatorGamepad.idl: Added.
1467         * WebCore.gypi:
1468         * page/Navigator.cpp:
1469         (WebCore::Navigator::gamepads):
1470         * page/Navigator.h:
1471         * page/Navigator.idl:
1472
1473 2012-01-05  Alexis Menard  <alexis.menard@openbossa.org>
1474
1475         getComputedStyle for border-image is not implemented.
1476         https://bugs.webkit.org/show_bug.cgi?id=75347
1477
1478         Reviewed by Tony Chang.
1479
1480         Implement getComputedStyle for border-color.
1481
1482         fast/css/getComputedStyle/computed-style-border-image.html was extended to cover the
1483         new feature.
1484
1485         * css/CSSComputedStyleDeclaration.cpp:
1486         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1487
1488 2012-01-05  Xingnan Wang  <xingnan.wang@intel.com>
1489
1490         Add a SSE2 optimized function zvmul in VectorMatch
1491         https://bugs.webkit.org/show_bug.cgi?id=74842
1492
1493         Reviewed by Kenneth Russell.
1494
1495         Use zvmul in FFTFrameFFMPEG.cpp::multiply() and FFTFrameMac.cpp::multiply().
1496
1497         * platform/audio/VectorMath.cpp:
1498         (WebCore::VectorMath::zvmul):
1499         * platform/audio/VectorMath.h:
1500         * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
1501         (WebCore::FFTFrame::multiply):
1502         * platform/audio/mac/FFTFrameMac.cpp:
1503         (WebCore::FFTFrame::multiply):
1504
1505 2012-01-05  Alpha Lam  <hclam@chromium.org>
1506
1507         Unreviewed. Build fix for Chromium Mac Clang build.
1508
1509         Push using namespace WTF to .cpp file from .h file.
1510
1511         * platform/text/TextCodecASCIIFastPath.h:
1512         * platform/text/TextCodecLatin1.cpp:
1513         * platform/text/TextCodecUTF8.cpp:
1514
1515 2012-01-05  Max Vujovic  <mvujovic@adobe.com>
1516
1517         WebKit adds vertical paddings and borders to the fixed width of CSS tables
1518         https://bugs.webkit.org/show_bug.cgi?id=74955
1519
1520         Reviewed by Julien Chaffraix.
1521
1522         Test: fast/table/css-table-width.html
1523
1524         * rendering/RenderTable.cpp:
1525         (WebCore::RenderTable::computeLogicalWidth):
1526
1527             Changed the width calculation for CSS tables to take into account horizontal
1528             paddings and borders instead of vertical paddings and borders.
1529
1530 2012-01-05  Peter Beverloo  <peter@chromium.org>
1531
1532         [Chromium] Upstream the RenderTheme and ScrollbarTheme for Android
1533         https://bugs.webkit.org/show_bug.cgi?id=74614
1534
1535         Reviewed by Adam Barth.
1536
1537         Upstream the RenderTheme and ScrollbarTheme for Android. These are
1538         mostly derived from their Linux variants.
1539
1540         RenderThemeChromiumAndroid inherits from RenderThemeChromiumLinux and
1541         only overrides the three methods which have different behavior.
1542         Scrollbars will be drawn in the threaded compositor for Android (which
1543         will be upstreamed later), but for increased layout test parity we'll
1544         match Chromium-Linux.
1545
1546         No new tests. This code will be exercised by existing layout tests, and
1547         by manually verifying that theme parts render as expected.
1548
1549         * WebCore.gyp/WebCore.gyp:
1550         * WebCore.gypi:
1551         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: Added.
1552         (WebCore::ScrollbarTheme::nativeTheme):
1553         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
1554         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
1555         (WebCore::ScrollbarThemeChromiumAndroid::shouldCenterOnThumb):
1556         (WebCore::ScrollbarThemeChromiumAndroid::buttonSize):
1557         (WebCore::ScrollbarThemeChromiumAndroid::minimumThumbLength):
1558         * platform/chromium/ScrollbarThemeChromiumAndroid.h: Added.
1559         * rendering/RenderThemeChromiumAndroid.cpp: Added.
1560         (WebCore::RenderThemeChromiumAndroid::create):
1561         (WebCore::RenderTheme::themeForPage):
1562         (WebCore::RenderThemeChromiumAndroid::~RenderThemeChromiumAndroid):
1563         (WebCore::RenderThemeChromiumAndroid::systemColor):
1564         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
1565         * rendering/RenderThemeChromiumAndroid.h: Added.
1566         * rendering/RenderThemeChromiumLinux.cpp:
1567         * rendering/RenderThemeChromiumLinux.h:
1568
1569 2012-01-05  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1570
1571         Fix potential superlinear runtime of multiple indirect adjenceny combinators.
1572         https://bugs.webkit.org/show_bug.cgi?id=75083
1573
1574         Reviewed by Antti Koivisto.
1575
1576         A sequence of indirect adjencency combinator such as "li ~ li ~ la" could with the
1577         former algorithm potentially do an quadratic number of element matches.
1578         The recursive matching algorithm now detects cases where all siblings have
1579         failed one indirect sibling match and fails the entire selector.
1580
1581         Test: perf/nested-combined-selectors.html
1582
1583         * css/SelectorChecker.cpp:
1584         (WebCore::SelectorChecker::checkSelector): Return SelectorFailsAllSiblings when
1585         all siblings have failed a selector component.
1586         * css/SelectorChecker.h: Add SelectorFailsAllSiblings enum value
1587
1588 2012-01-05  Andreas Kling  <awesomekling@apple.com>
1589
1590         InspectorStyleSheet: Avoid cloning CSSRuleLists.
1591         <http://webkit.org/b/75603>
1592
1593         Reviewed by Ryosuke Niwa.
1594
1595         Don't filter out @charset rules from CSSRuleLists. This was forcing us to clone
1596         the stylesheet rule list, and is unnecessary since InspectorStyleSheet disregards
1597         any rule that isn't either a style rule or a rule with an internal rule list.
1598
1599         * inspector/InspectorStyleSheet.cpp:
1600         (WebCore::asCSSRuleList):
1601         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1602
1603             Don't pass omitCharsetRules=true to the CSSRuleList constructor.
1604
1605 2012-01-05  Andreas Kling  <awesomekling@apple.com>
1606
1607         Make elements with attributes smaller by eliminating the ref count in NamedNodeMap.
1608         <http://webkit.org/b/75068>
1609
1610         Reviewed by Antti Koivisto.
1611
1612         Remove NamedNodeMap's inheritance from RefCounted and forward the ref()/deref()
1613         calls to its owner Element, effectively reducing the size of an element that has
1614         attributes by 4 bytes.
1615
1616         This reduces memory consumption by 311 kB when viewing the full HTML5 spec.
1617
1618         * dom/NamedNodeMap.cpp:
1619         (WebCore::NamedNodeMap::ref):
1620         (WebCore::NamedNodeMap::deref):
1621
1622             Added. Forwards the operation to m_element. Only ever used by the DOM wrappers.
1623
1624         * dom/NamedNodeMap.h:
1625         (WebCore::NamedNodeMap::create):
1626         * dom/DocumentType.h:
1627         * dom/Element.cpp:
1628         (WebCore::Element::parserSetAttributeMap):
1629         * dom/Element.h:
1630         * html/parser/HTMLConstructionSite.cpp:
1631         * html/parser/HTMLToken.h:
1632         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1633         * html/parser/HTMLTreeBuilder.cpp:
1634         (WebCore::HTMLTreeBuilder::processFakeStartTag):
1635         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
1636         * html/parser/HTMLTreeBuilder.h:
1637         * html/parser/TextDocumentParser.cpp:
1638         (WebCore::TextDocumentParser::insertFakePreElement):
1639         * xml/parser/MarkupTokenBase.h:
1640         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
1641         (WebCore::AtomicMarkupTokenBase::takeAttributes):
1642         * xml/parser/XMLToken.h:
1643         (WebCore::AtomicXMLToken::AtomicXMLToken):
1644
1645             Store NamedNodeMap in OwnPtr/PassOwnPtr, rather than RefPtr/PassRefPtr.
1646
1647 2012-01-05  Benjamin Poulain  <benjamin@webkit.org>
1648
1649         Improve charactersAreAllASCII() to compare multiple characters at a time
1650         https://bugs.webkit.org/show_bug.cgi?id=74063
1651
1652         Reviewed by Darin Adler.
1653
1654         Move some part of TextCodecASCIIFastPath.h to WTF in ASCIIFastPath.h.
1655         The function isAllASCII() is changed to the template version which now works
1656         with both LChar and UChar.
1657
1658         * ForwardingHeaders/wtf/text/ASCIIFastPath.h: Added.
1659         * platform/text/TextCodecASCIIFastPath.h:
1660         (WebCore::copyASCIIMachineWord):
1661         * platform/text/TextCodecLatin1.cpp:
1662         (WebCore::TextCodecLatin1::decode):
1663         * platform/text/TextCodecUTF8.cpp:
1664         (WebCore::TextCodecUTF8::decode):
1665
1666 2012-01-05  Eric Uhrhane  <ericu@chromium.org>
1667
1668        [fileapi] WebKitFlags should not be constructable per Directories & System spec
1669        https://bugs.webkit.org/show_bug.cgi?id=68916
1670
1671        Reviewed by Eric Seidel.
1672
1673        Remove IDL for the object and all DOM references to it.
1674        * fileapi/WebKitFlags.idl: Removed.
1675        * page/DOMWindow.idl:
1676        * workers/WorkerContext.idl:
1677        Remove references to the JSC/V8 objects compiled from the IDL.
1678        * bindings/js/JSDirectoryEntryCustom.cpp:
1679        (WebCore::JSDirectoryEntry::getFile):
1680        (WebCore::JSDirectoryEntry::getDirectory):
1681        * bindings/js/JSDirectoryEntrySyncCustom.cpp:
1682        (WebCore::getFlags):
1683        * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
1684        (WebCore::V8DirectoryEntry::getDirectoryCallback):
1685        (WebCore::V8DirectoryEntry::getFileCallback):
1686        * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
1687        (WebCore::getFlags):
1688        Fix up build files.
1689        * WebCore.gypi:
1690        * WebCore.vcproj/WebCore.vcproj:
1691        * WebCore.xcodeproj/project.pbxproj:
1692        * WebCore/CMakeLists.txt:
1693        * WebCore/CodeGenerators.pri:
1694        * WebCore/DerivedSources.cpp:
1695        * WebCore/DerivedSources.make:
1696        * WebCore/GNUmakefile.list.am:
1697
1698 2012-01-05  Ken Buchanan  <kenrb@chromium.org>
1699
1700         Crash due to first-letter block processing
1701         https://bugs.webkit.org/show_bug.cgi?id=74009
1702
1703         Fixing the way updateFirstLetter() finds the remaining text fragment
1704         for a given first-letter. Previously this was unreliable in some
1705         circumstances.
1706
1707         This patch provides a reliable mechanism to identify the remaining
1708         text by storing first-letter to remaining text associations in a
1709         hash map, managed by methods in RenderBoxModelObject.
1710
1711         Reviewed by David Hyatt.
1712
1713         * rendering/RenderBlock.cpp:
1714         (WebCore::RenderBlock::updateFirstLetter)
1715         * rendering/RenderBoxModelObject.cpp:
1716         (WebCore::RenderBoxModelObject::willBeDestroyed):
1717         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText): Added
1718         (WebCore::RenderBoxModelObject::firstLetterRemainingText): Added
1719         * rendering/RenderBoxModelObject.h:
1720         (WebCore::RenderBoxModelObject::setFirstLetterRemainingText): Added
1721         (WebCore::RenderBoxModelObject::firstLetterRemainingText): Added
1722
1723 2012-01-05  Mihnea Ovidenie  <mihnea@adobe.com>
1724
1725         Crash in RenderRegion::getRegionRangeForBox.
1726         https://bugs.webkit.org/show_bug.cgi?id=74781
1727
1728         Reviewed by David Hyatt.
1729
1730         Test: fast/regions/region-range-for-box-crash.html
1731
1732         This patch fixes 2 issues:
1733         1. When removing a region from a flow thread, we clear the region range information for boxes since
1734         this information is accurate only after the regions are laid out.
1735         2. While the regions are invalidated (content of flow thread is not yet laid out in regions), the
1736         functions that ask for properties of content in regions should bail out early.
1737
1738         * rendering/RenderBlock.cpp:
1739         (WebCore::RenderBlock::regionAtBlockOffset):
1740         (WebCore::RenderBlock::logicalWidthChangedInRegions):
1741         * rendering/RenderBox.cpp:
1742         (WebCore::RenderBox::clearRenderBoxRegionInfo):
1743         * rendering/RenderFlowThread.cpp:
1744         (WebCore::RenderFlowThread::removeRegionFromThread):
1745         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1746         (WebCore::RenderFlowThread::mapFromFlowToRegion):
1747         (WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion):
1748         (WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion):
1749         (WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion):
1750         (WebCore::RenderFlowThread::firstRegion):
1751         (WebCore::RenderFlowThread::lastRegion):
1752         (WebCore::RenderFlowThread::getRegionRangeForBox):
1753         * rendering/RenderFlowThread.h:
1754
1755 2012-01-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1756
1757         Unreviewed, rolling out r104084.
1758         http://trac.webkit.org/changeset/104084
1759         https://bugs.webkit.org/show_bug.cgi?id=75600
1760
1761         Likely kills dom-perf benchmark in chromium
1762         http://build.chromium.org/f/chromium/perf/linux-
1763         release/dom_perf/report.html?history=150&rev=116444 (Requested
1764         by dslomov on #webkit).
1765
1766         * dom/Attr.cpp:
1767         (WebCore::Attr::setValue):
1768         (WebCore::Attr::childrenChanged):
1769         * dom/DynamicNodeList.cpp:
1770         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
1771         (WebCore::DynamicSubtreeNodeList::length):
1772         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
1773         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
1774         (WebCore::DynamicSubtreeNodeList::item):
1775         (WebCore::DynamicSubtreeNodeList::invalidateCache):
1776         (WebCore::DynamicSubtreeNodeList::Caches::create):
1777         (WebCore::DynamicSubtreeNodeList::Caches::reset):
1778         * dom/DynamicNodeList.h:
1779         * dom/Element.cpp:
1780         (WebCore::Element::updateAfterAttributeChanged):
1781         * dom/Node.cpp:
1782         (WebCore::Node::setTreeScopeRecursively):
1783         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
1784         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
1785         (WebCore::Node::notifyLocalNodeListsLabelChanged):
1786         (WebCore::Node::itemTypeAttributeChanged):
1787         (WebCore::NodeListsNodeData::invalidateCaches):
1788         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
1789         * dom/Node.h:
1790         * dom/NodeRareData.h:
1791         * html/HTMLElement.cpp:
1792         (WebCore::HTMLElement::parseMappedAttribute):
1793         * html/HTMLLabelElement.cpp:
1794         (WebCore::HTMLLabelElement::parseMappedAttribute):
1795         * html/HTMLLabelElement.h:
1796
1797 2012-01-04  James Robinson  <jamesr@chromium.org>
1798
1799         [chromium] Remove chromium compositor support for unused zoomAnimatorTransform
1800         https://bugs.webkit.org/show_bug.cgi?id=75585
1801
1802         Reviewed by Kenneth Russell.
1803
1804         Removes compositor support for zoomAnimatorTransform property. This code is unused and never was used.
1805         Zoom animations are handled by adjusting the page scale factor and scroll offsets.
1806
1807         * platform/graphics/chromium/LayerChromium.h:
1808         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1809         * platform/graphics/chromium/cc/CCLayerImpl.h:
1810         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1811         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1812         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1813         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1814         (WebCore::calculateDrawTransformsAndVisibilityInternal):
1815         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1816         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1817
1818 2012-01-04  Kenneth Russell  <kbr@google.com>
1819
1820         Fix semantics of WEBKIT_WEBGL_lose_context
1821         https://bugs.webkit.org/show_bug.cgi?id=75053
1822
1823         Reviewed by James Robinson.
1824
1825         Updated WEBGL_lose_context extension to match WebGL spec's
1826         behavior:
1827
1828           - loseContext() causes the context to be lost immediately, but
1829             the webglcontextlost event isn't dispatched until JavaScript
1830             returns.
1831           - restoreContext() may only be called once dispatch of the
1832             webglcontextlost event has completed, *and* if that event handler
1833             prevented the default behavior of the event.
1834           - restoreContext() performs its work asynchronously. The context
1835             is not restored until just before the webglcontextrestored event
1836             is dispatched.
1837
1838         * html/canvas/WebGLRenderingContext.cpp:
1839         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
1840         (WebCore::WebGLRenderingContext::forceLostContext):
1841         (WebCore::WebGLRenderingContext::forceRestoreContext):
1842         (WebCore::WebGLRenderingContext::dispatchContextLostEvent):
1843         (WebCore::WebGLRenderingContext::maybeRestoreContext):
1844         * html/canvas/WebGLRenderingContext.h:
1845
1846 2011-12-30  Ryosuke Niwa  <rniwa@webkit.org>
1847
1848         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
1849         https://bugs.webkit.org/show_bug.cgi?id=73853
1850
1851         Reviewed by Antti Koivisto.
1852
1853         Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
1854         the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
1855         frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
1856         the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
1857         etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
1858         DOM tree versions.
1859
1860         In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
1861         by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
1862         invalidates values as needed. Also this change allows m_caches to be allocated as a part of
1863         DynamicSubtreeNodeList instead of a separate ref-counted object.
1864
1865         * dom/Attr.cpp:
1866         (WebCore::Attr::setValue):
1867         (WebCore::Attr::childrenChanged):
1868         * dom/DynamicNodeList.cpp:
1869         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
1870         (WebCore::DynamicSubtreeNodeList::length):
1871         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
1872         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
1873         (WebCore::DynamicSubtreeNodeList::item):
1874         (WebCore::DynamicSubtreeNodeList::invalidateCache):
1875         (WebCore::DynamicNodeList::Caches::create):
1876         (WebCore::DynamicNodeList::Caches::reset):
1877         * dom/DynamicNodeList.h:
1878         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
1879         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
1880         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
1881         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
1882         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
1883         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
1884         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
1885         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
1886         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
1887         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
1888         * dom/Element.cpp:
1889         (WebCore::Element::updateAfterAttributeChanged):
1890         * dom/Node.cpp:
1891         (WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
1892         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
1893         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
1894         (WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
1895         * dom/Node.h:
1896         * dom/NodeRareData.h:
1897         * html/HTMLElement.cpp:
1898         (WebCore::HTMLElement::parseMappedAttribute):
1899         * html/HTMLLabelElement.cpp:
1900         * html/HTMLLabelElement.h:
1901
1902 2012-01-04  Ryosuke Niwa  <rniwa@webkit.org>
1903
1904         Revert unintentional changes to Element.cpp in r104068.
1905
1906         * dom/Element.cpp:
1907         (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
1908
1909 2012-01-03  Ryosuke Niwa  <rniwa@webkit.org>
1910
1911         REGRESSION (r92823): Background color not preserved when copying and pasting a table row
1912         https://bugs.webkit.org/show_bug.cgi?id=75330
1913
1914         Reviewed by Tony Chang.
1915
1916         The bug was caused by the background color of the wrapping style overriding the background color
1917         in a matched rule of a highest element to be serialized. Fixed the bug by removing the conflicting
1918         background color prior to the merge.
1919
1920         Tests: editing/pasteboard/copy-element-with-conflicting-background-color-from-rule-expected.html
1921                editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html
1922
1923         * editing/EditingStyle.cpp:
1924         (WebCore::editingStyleFromComputedStyle):
1925         (WebCore::EditingStyle::removeStyleAddedByNode):
1926         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1927
1928 2012-01-03  Antti Koivisto  <antti@apple.com>
1929
1930         Reviewed by Dave Hyatt.
1931
1932         Analyze stylesheet scope to minimize style recalcs
1933         https://bugs.webkit.org/show_bug.cgi?id=75508
1934         
1935         It is a relatively common pattern to use inline stylesheets in document body where all rules are scoped using descendant selector
1936
1937         <style>
1938         #foo {...}
1939         #foo div {...}
1940         #foo .bar {...}
1941         </style>
1942
1943         When this pattern is used it is also common that the rules only apply to elements that come after the style element. 
1944
1945         When the set of active stylesheets changes we invalidate and recompute the entire document style. This is very expensive. We can 
1946         detect the case above and avoid the style recalc.
1947         
1948         On engadget.com, this patch cuts the time spent in style recalcs to roughly half. There are further savings from reduced 
1949         relayouts. In total the engine CPU time used over the page load is reduced by ~10%.
1950
1951         * css/CSSStyleSelector.cpp:
1952         (WebCore::CSSStyleSelector::CSSStyleSelector):
1953         (WebCore::CSSStyleSelector::collectFeatures):
1954         
1955             Refactor feature collection from constructor to a separate function.
1956         
1957         (WebCore::CSSStyleSelector::appendAuthorStylesheets):
1958         
1959             New function for non-destructively updating the style selector.
1960         
1961         (WebCore::CSSStyleSelector::Features::clear):
1962         
1963             Clear the features for another collection.
1964             
1965         (WebCore::CSSStyleSelector::determineStylesheetSelectorScopes):
1966         
1967             Find if all rules on a stylesheetare scoped to some set of ids and classes.
1968         
1969         (WebCore::CSSStyleSelector::styleForDocument):
1970         
1971             Add optional font selector argument. We updated the correct base style font on style selector construction but that is no longer sufficient
1972             as font selector may be updated without reconstructing the style selector.
1973         
1974         (WebCore::RuleSet::addRulesFromSheet):
1975         
1976             Invalidate the matched declaration cache in case of new font-face rules.
1977         
1978         * css/CSSStyleSelector.h:
1979         * css/SelectorChecker.cpp:
1980         (WebCore::SelectorChecker::determineSelectorScopes):
1981         
1982             Find if all rules on a selector list are scoped to some set of ids and classes.
1983         
1984         * css/SelectorChecker.h:
1985         * dom/Document.cpp:
1986         (WebCore::Document::Document):
1987         (WebCore::Document::recalcStyle):
1988         
1989             Pass the font selector, if exists, to styleForDocument so we always have the base font up to date.
1990         
1991         (WebCore::Document::combineCSSFeatureFlags):
1992         (WebCore::Document::resetCSSFeatureFlags):
1993         (WebCore::Document::createStyleSelector):
1994
1995             Refactor css feature flag resetting to functions.
1996         
1997         (WebCore::Document::removePendingSheet):
1998         
1999             Use new PendingStylesheetCompleted flag when new stylesheets arrive.
2000
2001         (WebCore::Document::styleSelectorChanged):
2002
2003             Skip style recalc if it is not needed.
2004
2005         (WebCore::Document::collectActiveStylesheets):
2006         
2007             Refactor collecting stylesheets to a separate function.
2008         
2009         (WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
2010         
2011             Determine the scopes and use hasElementWithId/getElementsByClassName to figure out if any scoped elements currently exist in the tree.
2012         
2013         (WebCore::Document::analyzeStylesheetChange):
2014         
2015             Figure out if we can update the style selector incrementally and if we can skip the style recalc.
2016         
2017         (WebCore::Document::updateActiveStylesheets):
2018         
2019             Renamed from recalcStyleSelector.
2020             Invoke the new analysis functions.
2021         
2022         * dom/Document.h:
2023
2024 2012-01-04  Igor Oliveira  <igor.oliveira@openbossa.org>
2025
2026         Share fractional time code between AnimationBase and KeyframeAnimation
2027         https://bugs.webkit.org/show_bug.cgi?id=75549
2028
2029         Remove left over from changeset 104045.
2030
2031         Unreviewed trivial fix.
2032
2033         * page/animation/AnimationBase.cpp:
2034         (WebCore::AnimationBase::fractionalTime):
2035
2036 2012-01-04  Igor Oliveira  <igor.oliveira@openbossa.org>
2037
2038         Share fractional time code between AnimationBase and KeyframeAnimation
2039         https://bugs.webkit.org/show_bug.cgi?id=75549
2040
2041         Share fractional time calculation between AnimationBase and KeyframeAnimation.
2042
2043         Reviewed by Simon Fraser.
2044
2045         * page/animation/AnimationBase.cpp:
2046         (WebCore::AnimationBase::fractionalTime):
2047         (WebCore::AnimationBase::progress):
2048         * page/animation/AnimationBase.h:
2049         * page/animation/KeyframeAnimation.cpp:
2050         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
2051
2052 2012-01-03  Vangelis Kokkevis  <vangelis@chromium.org>
2053
2054         [chromium] Bypass the shadow texture copy for accelerated
2055         canvas when running the compositor in single threaded mode.
2056         https://bugs.webkit.org/show_bug.cgi?id=75146
2057
2058         The texture copy fails on Windows as glCopyTexImage2D() doesn't
2059         support BGRA source textures.
2060         This change also modifies Canvas2DLayerChromium::updateCompositorResources
2061         to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that
2062         the copy can work with texture allocated via the glTexStorage2D
2063         extension.
2064
2065         Reviewed by James Robinson.
2066
2067         Tests: Canvas2DLayerChromiumTest.cpp
2068
2069         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2070         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
2071         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
2072         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
2073         (WebCore::Canvas2DLayerChromium::setTextureManager):
2074         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2075         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
2076         (WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
2077         (WebCore::Canvas2DLayerChromium::cleanupResources):
2078         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2079
2080 2012-01-04  Adam Roben  <aroben@apple.com>
2081
2082         Use one big printf command instead of many chained echo commands to generate idl_files.tmp
2083
2084         This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of
2085         &&-chained commands.
2086
2087         Fixes <http://webkit.org/b/75546> <rdar://problem/10622193> REGRESSION (r103519): WebCore's
2088         DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough
2089
2090         Reviewed by Antti Koivisto.
2091
2092         * DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) >
2093         ./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the
2094         patsubst function to append "\n" to each IDL filename, then use the subst function to remove
2095         the spaces between the filenames.
2096
2097 2012-01-04  Mihnea Ovidenie  <mihnea@adobe.com>
2098
2099         [CSSRegions]Rollout support for background-color region styling
2100         https://bugs.webkit.org/show_bug.cgi?id=75007
2101
2102         Reviewed by Tony Chang.
2103
2104         Removed functionality, therefore no new tests. Since this is a temporary rollout,
2105         the tests for region-style with background-color are not removed in this patch, just skipped.
2106
2107         * WebCore.exp.in:
2108         * css/CSSStyleSelector.cpp:
2109         (WebCore::CSSStyleSelector::CSSStyleSelector):
2110         (WebCore::CSSStyleSelector::addMatchedDeclaration):
2111         (WebCore::CSSStyleSelector::matchRules):
2112         (WebCore::CSSStyleSelector::matchAllRules):
2113         (WebCore::CSSStyleSelector::styleForElement):
2114         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2115         (WebCore::RuleData::RuleData):
2116         (WebCore::RuleSet::RuleSet):
2117         (WebCore::RuleSet::addToRuleSet):
2118         (WebCore::CSSStyleSelector::applyDeclarations):
2119         (WebCore::CSSStyleSelector::applyProperty):
2120         * css/CSSStyleSelector.h:
2121         * rendering/RenderFlowThread.cpp:
2122         (WebCore::RenderFlowThread::setRegionRangeForBox):
2123         * rendering/RenderFlowThread.h:
2124         * rendering/RenderLayer.cpp:
2125         (WebCore::RenderLayer::paint):
2126         (WebCore::RenderLayer::hitTest):
2127         * rendering/RenderObject.cpp:
2128         * rendering/RenderObject.h:
2129         * rendering/RenderObjectChildList.cpp:
2130         (WebCore::RenderObjectChildList::removeChildNode):
2131         * rendering/RenderRegion.cpp:
2132         * rendering/RenderRegion.h:
2133         * rendering/RenderView.cpp:
2134         (WebCore::RenderView::RenderView):
2135         * rendering/RenderView.h:
2136
2137 2012-01-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2138
2139         [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
2140
2141         The custom qmake variable 'WEBKIT' is used for signaling that a
2142         target depends in some way on other subproject of the WebKit
2143         project. For now this is limited to the set of intermediate
2144         libraries: wtf, javascriptcore, webcore, and webkit2.
2145
2146         This replaces the previous convension of using load(foo) for
2147         just include paths, and CONFIG += foo to also link against foo.
2148
2149         Adding a dependency results in additional include paths being
2150         available, and potentially linking to the library. This is
2151         decided by the build system based on conditions such as what
2152         kind of target is being built and the general build config.
2153
2154         An advantage to his approach is that it simplifies the individual
2155         foo.prf files, for example by allowing us to use INCLUDEPATH +=
2156         and LIBS += as normal instead of prepending.
2157
2158         Reviewed by Simon Hausmann.
2159
2160         * Target.pri:
2161
2162 2012-01-03  Adam Barth  <abarth@webkit.org>
2163
2164         HTMLConstructionSite::attach shouldn't return a value
2165         https://bugs.webkit.org/show_bug.cgi?id=75520
2166
2167         Reviewed by Eric Seidel.
2168
2169         We used to return a value to avoid some refchurn, but now that we're
2170         using tasks, we always need to take that reference.  Removing the
2171         return value lets us remove the template parameter, which is a boon.
2172         This patch has no impact on the html-parser.html benchmark.
2173
2174         * html/parser/HTMLConstructionSite.cpp:
2175         (WebCore::HTMLConstructionSite::attachLater):
2176         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
2177         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
2178         (WebCore::HTMLConstructionSite::insertDoctype):
2179         (WebCore::HTMLConstructionSite::insertComment):
2180         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
2181         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
2182         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
2183         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
2184         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
2185         (WebCore::HTMLConstructionSite::insertHTMLElement):
2186         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
2187         (WebCore::HTMLConstructionSite::insertScriptElement):
2188         (WebCore::HTMLConstructionSite::insertForeignElement):
2189         (WebCore::HTMLConstructionSite::insertTextNode):
2190         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
2191         (WebCore::HTMLConstructionSite::fosterParent):
2192         * html/parser/HTMLConstructionSite.h:
2193
2194 2012-01-03  Adam Barth  <abarth@webkit.org>
2195
2196         Fix assert when foster parenting self-closing elements
2197         https://bugs.webkit.org/show_bug.cgi?id=75527
2198
2199         Unreviewed.
2200
2201         * html/parser/HTMLConstructionSite.cpp:
2202         (WebCore::HTMLConstructionSite::fosterParent):
2203             - We can't execute this task immediately because the code for
2204               self-closing elements wants to set the self-closing flag.
2205               Instead, we queue the task.
2206
2207 2012-01-03  Charles Wei  <charles.wei@torchmobile.com.cn>
2208
2209         [BlackBerry] Need to support credentials in the URL
2210         https://bugs.webkit.org/show_bug.cgi?id=75341
2211
2212         Reviewed by George Staikos.
2213
2214         No new tests required.
2215
2216         * platform/network/blackberry/NetworkJob.cpp:
2217         (WebCore::NetworkJob::sendRequestWithCredentials):
2218
2219 2012-01-03  Noel Gordon  <noel.gordon@gmail.com>
2220
2221         [chromium] Use data decoding swizzle for turbo JPEG grayscale images
2222         https://bugs.webkit.org/show_bug.cgi?id=75189
2223
2224         Reviewed by Adam Barth.
2225
2226         No new tests.  Covered by exiting tests, in particular for grayscale
2227         images that were corrupted by earlier versions on libjpeg-turbo:
2228
2229         tables/mozilla/bugs/bug29314.html
2230         tables/mozilla/bugs/bug13169.html
2231         tables/mozilla/bugs/bug10565.html
2232         tables/mozilla/bugs/bug11026.html
2233         fast/repaint/backgroundSizeRepaint.html
2234         fast/repaint/block-layout-inline-children-replaced.html
2235         fast/repaint/clipped-relative.html
2236         fast/repaint/selected-replaced.html
2237         tables/mozilla/bugs/bug12908-1.html
2238
2239         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2240         (WebCore::JPEGImageReader::decode):  Use a data decoding swizzle for
2241         JCS_GRAYSCALE images.
2242
2243 2012-01-03  Adam Barth  <abarth@webkit.org>
2244
2245         Minor speed improvement in HTML parser
2246         https://bugs.webkit.org/show_bug.cgi?id=75517
2247
2248         Reviewed by Eric Seidel.
2249
2250         This improves the html-parser.html benchmark by 0.3%.  I don't think
2251         that's actually anything to write home about, but this patch makes me
2252         feel better about my life.
2253
2254         * html/parser/HTMLFormattingElementList.cpp:
2255         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2256
2257 2012-01-03  Kentaro Hara  <haraken@chromium.org>
2258
2259         Remove temporary code that we've inserted to implement the [Supplemental] IDL incrementally
2260         https://bugs.webkit.org/show_bug.cgi?id=75510
2261
2262         Reviewed by Adam Barth.
2263
2264         Now all build systems support the [Supplemental] IDL. This patch removes all
2265         temporary code that we've inserted to implement the [Supplemental] IDL.
2266
2267         No tests. No change in behavior. Confirm that all builds pass.
2268
2269         * bindings/js/JSDOMWindowCustom.cpp:
2270         * bindings/scripts/CodeGeneratorJS.pm:
2271         (GenerateHeader):
2272         * bindings/scripts/generate-bindings.pl:
2273         * page/DOMWindow.idl: Removed all attributes with a temporal [Supplemented] IDL.
2274
2275 2012-01-03  Karl Koscher  <supersat@chromium.org>
2276
2277         Give embedders a chance to handle postMessage calls
2278         https://bugs.webkit.org/show_bug.cgi?id=73883
2279
2280         To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept 
2281         postMessage calls to proxy windows. Originally we were just going to add a native event
2282         listener on the Chromium side, but that required more changes to WebKit and was a bit of
2283         a hack. See bug 73359 for a discuss about moving to this approach.
2284
2285         Reviewed by Adam Barth.
2286
2287         Test: platform/chromium/fast/events/intercept-postmessage.html
2288
2289         * loader/FrameLoaderClient.h:
2290         (WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the
2291             embedder to intercept postMessage calls
2292         * page/DOMWindow.cpp:
2293         (WebCore::DOMWindow::postMessageTimerFired): add a call to
2294             FrameLoaderClient::willCheckAndDispatchPostMessage
2295
2296 2012-01-03  Eric Penner  <epenner@google.com>
2297
2298         [chromium] Prevent crashing due to NULL texture updater.
2299         https://bugs.webkit.org/show_bug.cgi?id=75288
2300
2301         Reviewed by James Robinson.
2302
2303         * platform/graphics/chromium/ContentLayerChromium.cpp:
2304         * platform/graphics/chromium/ContentLayerChromium.h:
2305         * platform/graphics/chromium/ImageLayerChromium.cpp:
2306         * platform/graphics/chromium/ImageLayerChromium.h:
2307
2308 2012-01-03  Shawn Singh  <shawnsingh@chromium.org>
2309
2310         [chromium] CCLayerSorter accidentally reverses order of some layers.
2311         https://bugs.webkit.org/show_bug.cgi?id=75046
2312
2313         Reviewed by James Robinson.
2314
2315         Unit test added to CCLayerSorterTest.cpp
2316
2317         Fixes two related bugs that were causing z-ordering problems in
2318         layers when preserves3D triggers the need for layer sorting.
2319
2320         The first problem was that CCLayerSorter accidentally reversed the
2321         order of layers when there was no sorting dependency between them.
2322
2323         The second problem was that zDiff had numerical precision problems
2324         that forced sorting dependencies that were sometimes incorrect,
2325         when the dependencies should not have existed.
2326
2327         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
2328         (WebCore::CCLayerSorter::checkOverlap):
2329         (WebCore::CCLayerSorter::sort):
2330
2331 2012-01-03  Leo Yang  <leo.yang@torchmobile.com.cn>
2332
2333         [BlackBerry] Add support of blob form data to the BlackBerry port
2334         https://bugs.webkit.org/show_bug.cgi?id=75218
2335
2336         Pass FormDataElement::encodedBlob type of form data to the BlackBerry
2337         platform request to support blob data and blob file range.
2338
2339         Reviewed by George Staikos.
2340
2341         The port can't be built now, no new tests so far.
2342
2343         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2344         (WebCore::ResourceRequest::initializePlatformRequest):
2345
2346 2012-01-03  Adam Barth  <abarth@webkit.org>
2347
2348         Two null crashes in Treebuilder
2349         https://bugs.webkit.org/show_bug.cgi?id=66101
2350
2351         Reviewed by Eric Seidel.
2352
2353         The underly issue with causing the crash is that we're re-entering the
2354         tree builder.  We've done a bunch of point fixes around tree builder
2355         re-entrancy, but neither the implementation nor the specification are
2356         really designed to handle re-entrancy.
2357
2358         Firefox avoids this problem by putting the parser on its own thread.  I
2359         don't think we're quite ready to do that yet (although we will
2360         eventually, presumably, as computers become ever more parallel).  The
2361         approach in this patch is to queue up the DOM mutations and actually
2362         perform them on a shallower stack.  That's essentially the approach
2363         we've used for executing <scripts>.
2364
2365         This patch queues up DOM modifications and executes them from a clean
2366         call stack, stopping us from re-entering the tree builder.  We might
2367         need to experiment with exactly where to kick off the queue, but this
2368         location seems reasonable and fixes the crash.
2369
2370         Test: fast/parser/re-enter-and-crash.html
2371
2372         * html/parser/HTMLConstructionSite.cpp:
2373         (WebCore::executeTask):
2374             - Add a helper function for actually executing a queue DOM
2375               mutation.
2376         (WebCore::HTMLConstructionSite::attach):
2377             - Instead of actually attaching the element to the DOM, this
2378               function now queues the element for attachment.  In a follow-up
2379               patch, I plan to change this function to return void (and I'll
2380               probably rename it to something that makes it clear that it only
2381               queues the attachment).
2382         (WebCore::HTMLConstructionSite::executeQueuedTasks):
2383         (WebCore::HTMLConstructionSite::insertDoctype):
2384             - Setting the compatmode from the Doctype requires the doctype to
2385               actually be in the DOM, so we need to execute our queued tasks
2386               synchronously.  We can likely improve this function by passing
2387               the Doctype element explicitly in a follow-up patch.
2388         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
2389         (WebCore::HTMLConstructionSite::insertTextNode):
2390         (WebCore::HTMLConstructionSite::findFosterSite):
2391         (WebCore::HTMLConstructionSite::fosterParent):
2392         * html/parser/HTMLConstructionSite.h:
2393         (WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask):
2394             - Add a task object that holds on to the relevant elements.  We
2395               define some vector traits for this object to match the traits on
2396               RefPtr (which make Vector operations faster by explaining that
2397               this type is moveable without having to churn reference counts).
2398         * html/parser/HTMLElementStack.cpp:
2399         (WebCore::HTMLElementStack::pushCommon):
2400             - We delay the "begin parsing" call until we actually attach the
2401               element to the DOM.  That splits the responsibility for calling
2402               begin/finished, which is less than ideal, but I didn't see
2403               another solution.
2404         * html/parser/HTMLTreeBuilder.cpp:
2405         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
2406             - Kick off the queued mutations.
2407
2408 2012-01-03  Adam Barth  <abarth@webkit.org>
2409
2410         view-source doesn't colorize </script> correctly
2411         https://bugs.webkit.org/show_bug.cgi?id=62971
2412
2413         Reviewed by Eric Seidel.
2414
2415         The reason these tags weren't colorized correctly was because the
2416         characters for the end tags where consumed by the tokenizer at the same
2417         time as it consumed the text of the script tag.  These characters are
2418         buffered internally by the tokenizer because the tokenizer is searching
2419         for "an appropriate end tag", which is "</script>" in this case.
2420
2421         I tried a number of different approaches to fixing this bug.  The
2422         approach in this patch adds an accessor to the tokenizer to read out
2423         the buffered characters.  This approach makes it easier for the
2424         HTMLSourceTracker to get exactly the right value for these buffered
2425         characters without having to do a complicated simulation of the
2426         buffering itself.
2427
2428         Tests: fast/frames/viewsource-plain-text-tags.html:
2429
2430         * html/parser/HTMLViewSourceParser.cpp:
2431         (WebCore::HTMLViewSourceParser::pumpTokenizer):
2432         * html/parser/HTMLDocumentParser.cpp:
2433         (WebCore::HTMLDocumentParser::pumpTokenizer):
2434           - Give the HTMLSourceTracker a pointer to the tokenizer so it can ask
2435             for the buffered characters.
2436         * html/parser/HTMLSourceTracker.cpp:
2437         (WebCore::HTMLSourceTracker::start):
2438           - The idea here is to treat characters buffered internally by the
2439             tokenizer the same way we treat characters that were contained in a
2440             previous segment of source.  We copy them into our accumulation
2441             buffer and adjust the token base offset to account for the extra
2442             characters.
2443         (WebCore::HTMLSourceTracker::end):
2444           - Don't consier the character buffered by the tokenizer to be part of
2445             the token we've just finished.
2446         (WebCore::HTMLSourceTracker::sourceForToken):
2447           - Remove the assumption that all of the m_previousSource is contained
2448             in the source for the current token.  Because we now understand
2449             that the tokenizer can buffer some characters internally, we might
2450             not exhaust the m_previousSource.
2451         * html/parser/HTMLSourceTracker.h:
2452           - Rename m_sourceFromPreviousSegments to m_previousSource and changed
2453             to a SegementedString to avoid extra mallocs we keep appending tiny
2454             segments.
2455           - Rename m_source to m_currentSource to contrast nicely with
2456             m_previousSource.
2457         * html/parser/HTMLTokenizer.cpp:
2458         (WebCore::HTMLTokenizer::flushBufferedEndTag):
2459         (WebCore::HTMLTokenizer::nextToken):
2460           - Previously, we cleared the temporary buffer lazily when we needed
2461             to add new characters to it.  Now we clear it eagerly so that it's
2462             length tells us whether we're currently using it to store
2463             characters.
2464           - Previously, we weren't storing the character that we used to
2465             terminate the appropriate end tag (e.g., the > in </script>)
2466             because we didn't need to "unbuffer" that character into the
2467             HTMLToken::appendToCharacter.  Now, we do store that character in
2468             the temporary buffer so that the HTMLSourceTracker can see that
2469             character.
2470         (WebCore::HTMLTokenizer::bufferedCharacters):
2471         * html/parser/HTMLTokenizer.h:
2472         (WebCore::HTMLTokenizer::numberOfBufferedCharacters):
2473           - Add accessor methods to copy out the buffered characters.
2474           - Also, unrelated to the rest of this patch, I made the constructor
2475             for HTMLTokenizer explicit because it takes only a single
2476             paramater, per the style guide.
2477         * platform/text/SegmentedString.cpp:
2478         (WebCore::SegmentedString::clear):
2479           - SegmentedString::clear wasn't clearing all of its state.  I don't
2480             think this issue was actually observable, but I noticed it when
2481             working on this patch, so I fixed it.
2482
2483 2012-01-03  Benjamin Poulain  <bpoulain@apple.com>
2484
2485         Exclude Mac's PlatformEventFactory from iOS
2486         https://bugs.webkit.org/show_bug.cgi?id=75493
2487
2488         Reviewed by Sam Weinig.
2489
2490         Move PlatformEventFactory.(h|cpp) to PlatformEventFactoryMac(h|cpp) and exclude the file
2491         from iOS build.
2492
2493         * Configurations/WebCore.xcconfig: Also exclude EventHandlerMac for consistency.
2494         * WebCore.xcodeproj/project.pbxproj:
2495         * page/mac/EventHandlerMac.mm:
2496         * platform/mac/PlatformEventFactoryMac.h: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.h.
2497         * platform/mac/PlatformEventFactoryMac.mm: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.mm.
2498         (WebCore::globalPoint):
2499         (WebCore::globalPointForEvent):
2500         (WebCore::pointForEvent):
2501         (WebCore::mouseButtonForEvent):
2502         (WebCore::mouseEventTypeForEvent):
2503         (WebCore::clickCountForEvent):
2504         (WebCore::momentumPhaseForEvent):
2505         (WebCore::phaseForEvent):
2506         (WebCore::gestureEventTypeForEvent):
2507         (WebCore::textFromEvent):
2508         (WebCore::unmodifiedTextFromEvent):
2509         (WebCore::keyIdentifierForKeyEvent):
2510         (WebCore::isKeypadEvent):
2511         (WebCore::windowsKeyCodeForKeyEvent):
2512         (WebCore::isKeyUpEvent):
2513         (WebCore::modifiersForEvent):
2514         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
2515         (WebCore::PlatformEventFactory::createPlatformMouseEvent):
2516         (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
2517         (WebCore::PlatformEventFactory::createPlatformWheelEvent):
2518         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
2519         (WebCore::PlatformEventFactory::createPlatformKeyboardEvent):
2520         (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
2521         (WebCore::PlatformEventFactory::createPlatformGestureEvent):
2522
2523 2012-01-03  Wei James  <james.wei@intel.com>
2524
2525         Optimize AudioBufferSourceNode process by avoiding interpolation when pitchRate==1
2526         https://bugs.webkit.org/show_bug.cgi?id=74592
2527
2528         Reviewed by Kenneth Russell.
2529
2530         Covered by existing webaudio layout tests, especially webaudio/audiobuffersource-playbackrate.html
2531
2532         * webaudio/AudioBufferSourceNode.cpp:
2533         (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping):
2534         (WebCore::AudioBufferSourceNode::renderFromBuffer):
2535         * webaudio/AudioBufferSourceNode.h:
2536
2537 2012-01-03  Joseph Pecoraro  <pecoraro@apple.com>
2538
2539         Web Inspector: Access to Node Highlighting info without drawing
2540         https://bugs.webkit.org/show_bug.cgi?id=75504
2541
2542         Provide a "getHighlight" method alongside "drawHighlight" that
2543         gets most of the important node highlighting information. This
2544         can be used by a port to do its own node highlighting or provide
2545         extra content without interfering with the highlight rects.
2546
2547         Reviewed by Timothy Hatcher.
2548
2549         * WebCore.xcodeproj/project.pbxproj:
2550         Privately expose the Highlight struct in DOMNodeHighlighter.h.
2551
2552         * inspector/DOMNodeHighlighter.cpp:
2553         (WebCore::DOMNodeHighlighter::drawHighlight):
2554         (WebCore::DOMNodeHighlighter::getHighlight):
2555         * inspector/DOMNodeHighlighter.h:
2556         Reuse the existing draw code to instead populate
2557         the Highlight struct with the information it is
2558         about to draw, and only draw if there is a context.
2559
2560         * inspector/InspectorController.cpp:
2561         (WebCore::InspectorController::getHighlight):
2562         * inspector/InspectorController.h:
2563         * inspector/InspectorDOMAgent.cpp:
2564         (WebCore::InspectorDOMAgent::getHighlight):
2565         * inspector/InspectorDOMAgent.h:
2566         Get highlight information by going through getHighlight
2567         in InspectorController. This is alongside drawHighlight.
2568
2569 2012-01-03  Shawn Singh  <shawnsingh@chromium.org>
2570
2571         [chromium] Push drawsContent and contentsVisible into accelerated compositor
2572         https://bugs.webkit.org/show_bug.cgi?id=71209
2573
2574         Reviewed by James Robinson.
2575
2576         Tests: compositing/visibility/visibility-simple-canvas2d-layer.html
2577                compositing/visibility/visibility-simple-video-layer.html
2578                compositing/visibility/visibility-simple-webgl-layer.html
2579
2580         Rebaselined compositing/visibility/visibility-image-layers.html
2581
2582         The CSS visibility property was not being properly obeyed by many
2583         specialized layer types in the accelerated compositor. The root of
2584         the problem was that drawsContent and contentsVisible flags were
2585         not properly propagated into the compositor. This patch removes
2586         the drawsContent() callback, and instead makes sure that
2587         drawsContent and contentsVisible are "pushed" through the
2588         accelerated compositor.
2589
2590         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2591         (WebCore::Canvas2DLayerChromium::drawsContent):
2592         * platform/graphics/chromium/ContentLayerChromium.cpp:
2593         * platform/graphics/chromium/ContentLayerChromium.h:
2594         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2595         (WebCore::GraphicsLayerChromium::setDrawsContent):
2596         (WebCore::GraphicsLayerChromium::setContentsVisible):
2597         (WebCore::GraphicsLayerChromium::setContentsToImage):
2598         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
2599         (WebCore::GraphicsLayerChromium::setContentsToMedia):
2600         (WebCore::GraphicsLayerChromium::updateLayerIsDrawable):
2601         (WebCore::GraphicsLayerChromium::setupContentsLayer):
2602         * platform/graphics/chromium/GraphicsLayerChromium.h:
2603         * platform/graphics/chromium/LayerChromium.cpp:
2604         (WebCore::LayerChromium::LayerChromium):
2605         (WebCore::LayerChromium::setIsDrawable):
2606         * platform/graphics/chromium/LayerChromium.h:
2607         (WebCore::LayerChromium::drawsContent):
2608         * platform/graphics/chromium/PluginLayerChromium.h:
2609         * platform/graphics/chromium/TiledLayerChromium.cpp:
2610         (WebCore::TiledLayerChromium::drawsContent):
2611         * platform/graphics/chromium/VideoLayerChromium.h:
2612         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2613         (WebCore::WebGLLayerChromium::drawsContent):
2614         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2615         (WebCore::CCLayerImpl::dumpLayerProperties):
2616
2617 2012-01-03  Shawn Singh  <shawnsingh@chromium.org>
2618
2619         [chromium] Make sure root damage rect gets passed to renderer
2620         https://bugs.webkit.org/show_bug.cgi?id=74893
2621
2622         Reviewed by James Robinson.
2623
2624         Unit test added to CCLayerTreeHostImplTest.cpp
2625
2626         * platform/graphics/chromium/LayerRendererChromium.cpp:
2627         (WebCore::LayerRendererChromium::swapBuffers):
2628         * platform/graphics/chromium/LayerRendererChromium.h:
2629         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2630         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2631         (WebCore::CCLayerTreeHostImpl::swapBuffers):
2632         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2633
2634 2012-01-03  Yuzhu Shen  <yzshen@chromium.org>
2635
2636         v8 binding: npCreateV8ScriptObject() should not returned an existing V8NPObject if the rootObject doesn't match
2637         https://bugs.webkit.org/show_bug.cgi?id=74515
2638
2639         Reviewed by Nate Chapin.
2640
2641         Test: http/tests/plugins/create-v8-script-objects.html
2642
2643         * bindings/v8/NPV8Object.cpp:
2644         (WebCore::freeV8NPObject):
2645         (WebCore::npCreateV8ScriptObject):
2646
2647 2012-01-03  Jon Lee  <jonlee@apple.com>
2648
2649         Leak of WebNotificationClient when page is destroyed
2650         https://bugs.webkit.org/show_bug.cgi?id=74980
2651         <rdar://problem/10611231>
2652
2653         Reviewed by Mark Rowe.
2654
2655         * notifications/NotificationController.cpp:
2656         (WebCore::NotificationController::~NotificationController): Notify the client
2657         that the controller has been destroyed.
2658         * notifications/NotificationPresenter.h: Add notificationControllerDestroyed()
2659         callback to the client interface.
2660
2661 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
2662
2663         getComputedStyle for list-style is not implemented.
2664         https://bugs.webkit.org/show_bug.cgi?id=75443
2665
2666         Reviewed by Tony Chang.
2667
2668         Implement getComputedStyle for list-style.
2669
2670         Test: fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html
2671
2672         * css/CSSComputedStyleDeclaration.cpp:
2673         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2674
2675 2012-01-03  Adrienne Walker  <enne@google.com>
2676
2677         [chromium] Remove unneeded content vs. layer space distinction in tiled layers
2678         https://bugs.webkit.org/show_bug.cgi?id=75498
2679
2680         Reviewed by James Robinson.
2681
2682         Long ago, before scrollbars became their own layers, tiled layers had
2683         a distinction between content space (what's mostly called layer space
2684         elsewhere) and layer space (the transformed content space). It seemed
2685         like this transform could get reused for supporting RTL pages, but as
2686         that's not the case, it should be eradicated.
2687
2688         Tiled layers now deal with everything in "layer space", which is a 2d
2689         rectangle starting at (0, 0) in the top left of the layer and
2690         extending to contentBounds() in the bottom right.
2691
2692         As no code actually set the tiler position, this change should be a
2693         no-op.
2694
2695         Test: LayoutTests/compositing/
2696
2697         * platform/graphics/chromium/TiledLayerChromium.cpp:
2698         (WebCore::UpdatableTile::isDirty):
2699         (WebCore::UpdatableTile::clearDirty):
2700         (WebCore::TiledLayerChromium::updateCompositorResources):
2701         (WebCore::TiledLayerChromium::createTile):
2702         (WebCore::TiledLayerChromium::invalidateRect):
2703         (WebCore::TiledLayerChromium::protectTileTextures):
2704         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2705         (WebCore::TiledLayerChromium::prepareToUpdate):
2706         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2707         (WebCore::TiledLayerChromium::needsIdlePaint):
2708         (WebCore::TiledLayerChromium::idlePaintRect):
2709         * platform/graphics/chromium/TiledLayerChromium.h:
2710         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2711         (WebCore::CCLayerTilingData::operator=):
2712         (WebCore::CCLayerTilingData::layerRectToTileIndices):
2713         (WebCore::CCLayerTilingData::tileRect):
2714         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2715         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2716         (WebCore::CCTiledLayerImpl::appendQuads):
2717
2718 2011-12-22  Joseph Pecoraro  <pecoraro@apple.com>
2719
2720         Implement Date and Time Input Value Sanitization
2721         https://bugs.webkit.org/show_bug.cgi?id=59951
2722
2723         Sanitize non-parsable incoming strings to the empty string.
2724
2725         Reviewed by Kent Tamura.
2726
2727         Covered by existing tests.
2728
2729         * html/BaseDateAndTimeInputType.h:
2730         * html/BaseDateAndTimeInputType.cpp:
2731         (WebCore::BaseDateAndTimeInputType::sanitizeValue): check if the
2732         incoming string is valid. If not just return the empty string.
2733
2734 2012-01-03  Julien Chaffraix  <jchaffraix@webkit.org>
2735
2736         RenderLayer::backgroundClipRect should not check parent()
2737         https://bugs.webkit.org/show_bug.cgi?id=73731
2738
2739         Reviewed by Simon Fraser.
2740
2741         Clean-up only, no expected change in behavior.
2742
2743         * rendering/RenderLayer.cpp:
2744         (WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to
2745         a check for AbsolutePosition for consistency but also as this is equivalent due to:
2746         - the previous check for FixedPosition.
2747         - RenderView, which is positioned, will never goes to this code as it has no parent().
2748
2749         (WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at
2750         it, also moved the inline initialization of |backgroundClipRect| to its own function
2751         and removed a |view| check as the associated ASSERT seems to never have been reached.
2752
2753 2012-01-03  Alexey Proskuryakov  <ap@apple.com>
2754
2755         <rdar://problem/10637779> REGRESSION (r102247): Focus ring is not drawn around a button
2756
2757         Rubber-stamped by Dan Bernstein.
2758
2759         * platform/mac/ThemeMac.mm: (WebCore::updateStates): Flip an incorrect conditional, this code
2760         should run on Snow Leopard and Lion.
2761
2762 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
2763
2764         getComputedStyle should return shorthands property with the minimum number of sides possible.
2765         https://bugs.webkit.org/show_bug.cgi?id=75434
2766
2767         Reviewed by Tony Chang.
2768
2769         As stated in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties we should
2770         return shorthands properties with the minimum number of sides possible.
2771
2772         Existing tests have been updated accordingly.
2773
2774         * css/CSSComputedStyleDeclaration.cpp:
2775         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2776         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
2777         * css/CSSComputedStyleDeclaration.h:
2778
2779 2012-01-03  Martin Robinson  <mrobinson@igalia.com>
2780
2781         [GTK] GTK+ 3 theming code does not use the GtkOrientable style class
2782         https://bugs.webkit.org/show_bug.cgi?id=72789
2783
2784         Reviewed by Philippe Normand.
2785
2786         No new tests. Testing GTK+ theming is quite difficult
2787         because no two distributions have the same set of themes.
2788         Current tests prevent regressions.
2789
2790         * platform/gtk/RenderThemeGtk3.cpp:
2791         (WebCore::applySliderStyleContextClasses): Added this helper that
2792         properly handles the orientable style class.
2793         (WebCore::RenderThemeGtk::paintSliderTrack): Use the new helper.
2794         (WebCore::RenderThemeGtk::paintSliderThumb): Ditto.
2795         * platform/gtk/ScrollbarThemeGtk3.cpp:
2796         (WebCore::applyScrollbarStyleContextClasses): Added this helper that
2797         properly handles the orientable style class.
2798         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Use the new helper.
2799         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
2800         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
2801         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
2802
2803 2012-01-03  Florin Malita  <fmalita@google.com>
2804
2805         NULL ptr in WebCore::SVGStyledTransformableElement::animatedLocalTransform
2806         https://bugs.webkit.org/show_bug.cgi?id=75227
2807
2808         Reviewed by Dirk Schulze.
2809
2810         Test: svg/custom/webkit-transform-crash.html
2811
2812         * svg/SVGStyledTransformableElement.cpp:
2813         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
2814         Add a null-renderer check.
2815
2816 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
2817
2818         getComputedStyle for border is not implemented.
2819         https://bugs.webkit.org/show_bug.cgi?id=75319
2820
2821         Reviewed by Tony Chang.
2822
2823         Implement getComputedStyle for border.
2824
2825         fast/css/getComputedStyle/getComputedStyle-border-shorthand.html was extented.
2826
2827         * css/CSSComputedStyleDeclaration.cpp:
2828         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2829
2830 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
2831
2832         Sort the WebCore Xcode project file
2833
2834         Reviewed by Dimitri Glazkov.
2835
2836         * WebCore.xcodeproj/project.pbxproj:
2837
2838 2012-01-03  Adrienne Walker  <enne@google.com>
2839
2840         [chromium] Set tiler bounds explicitly rather than growing them
2841         https://bugs.webkit.org/show_bug.cgi?id=75331
2842
2843         Reviewed by James Robinson.
2844
2845         Rather than only growing bounds, make the bounds on the tiler be set
2846         explicitly by TiledLayerChromium. This patch now properly invalidates
2847         regions when the bounds change.
2848
2849         * platform/graphics/chromium/TiledLayerChromium.cpp:
2850         (WebCore::TiledLayerChromium::updateBounds):
2851         (WebCore::TiledLayerChromium::prepareToUpdate):
2852         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2853         * platform/graphics/chromium/TiledLayerChromium.h:
2854         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2855         (WebCore::CCLayerTilingData::setBounds):
2856         (WebCore::CCLayerTilingData::bounds):
2857         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2858
2859 2012-01-03  Martin Robinson  <mrobinson@igalia.com>
2860
2861         [GTK] Slider thumb is not centered on the track with the unico theme
2862         https://bugs.webkit.org/show_bug.cgi?id=72802
2863
2864         Reviewed by Philippe Normand.
2865
2866         No new tests. This only applies to certain GTK+ themes.
2867         Existing tests cover the default GTK+ theme.
2868
2869         * platform/gtk/RenderThemeGtk3.cpp:
2870         (WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the
2871         slider thumb by the trough border.
2872
2873 2012-01-03  Adrienne Walker  <enne@google.com>
2874
2875         [chromium] Make tiled layer's tiler always exist
2876         https://bugs.webkit.org/show_bug.cgi?id=75329
2877
2878         Reviewed by James Robinson.
2879
2880         TiledLayerChromium has some awkward code to handle lazily creating the
2881         tiler, including lots of null checks and shadowing the tile size.
2882         Instead, always create the tiler up front. As values change that
2883         invalidate all tiles, reset it rather than clear the pointer.
2884
2885         * platform/graphics/chromium/LayerChromium.cpp:
2886         (WebCore::LayerChromium::setIsNonCompositedContent):
2887         * platform/graphics/chromium/LayerChromium.h:
2888         * platform/graphics/chromium/TiledLayerChromium.cpp:
2889         (WebCore::TiledLayerChromium::TiledLayerChromium):
2890         (WebCore::TiledLayerChromium::cleanupResources):
2891         (WebCore::TiledLayerChromium::setTileSize):
2892         (WebCore::TiledLayerChromium::setBorderTexelOption):
2893         (WebCore::TiledLayerChromium::drawsContent):
2894         (WebCore::TiledLayerChromium::updateCompositorResources):
2895         (WebCore::TiledLayerChromium::setTilingOption):
2896         (WebCore::TiledLayerChromium::pushPropertiesTo):
2897         (WebCore::TiledLayerChromium::setIsNonCompositedContent):
2898         (WebCore::TiledLayerChromium::invalidateRect):
2899         (WebCore::TiledLayerChromium::protectTileTextures):
2900         (WebCore::TiledLayerChromium::prepareToUpdate):
2901         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2902         (WebCore::TiledLayerChromium::needsIdlePaint):
2903         (WebCore::TiledLayerChromium::idlePaintRect):
2904         * platform/graphics/chromium/TiledLayerChromium.h:
2905         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2906         (WebCore::CCLayerTilingData::setBorderTexelOption):
2907         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2908         * platform/graphics/gpu/TilingData.cpp:
2909         (WebCore::TilingData::setHasBorderTexels):
2910         * platform/graphics/gpu/TilingData.h:
2911
2912 2012-01-03  Kentaro Hara  <haraken@chromium.org>
2913
2914         Unreviewed. Rebaselined run-bindings-tests results.
2915
2916         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2917         (WebCore::JSTestEventConstructor::destroy):
2918         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2919         (WebCore::JSTestEventConstructor::releaseImplIfNotNull):
2920         * bindings/scripts/test/JS/JSTestInterface.cpp:
2921         (WebCore::JSTestInterface::destroy):
2922         * bindings/scripts/test/JS/JSTestInterface.h:
2923         (WebCore::JSTestInterface::releaseImplIfNotNull):
2924         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2925         (WebCore::JSTestMediaQueryListListener::destroy):
2926         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2927         (WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
2928         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2929         (WebCore::JSTestNamedConstructor::destroy):
2930         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2931         (WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
2932         * bindings/scripts/test/JS/JSTestObj.cpp:
2933         (WebCore::JSTestObj::destroy):
2934         * bindings/scripts/test/JS/JSTestObj.h:
2935         (WebCore::JSTestObj::releaseImplIfNotNull):
2936         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2937         (WebCore::JSTestSerializedScriptValueInterface::destroy):
2938         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2939         (WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
2940
2941 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2942
2943         [GTK] Fix scrollbars size with GTK+ 3.x
2944         https://bugs.webkit.org/show_bug.cgi?id=75467
2945
2946         Reviewed by Xan Lopez.
2947
2948         * platform/gtk/RenderThemeGtk3.cpp:
2949         (WebCore::getStyleContext): Add the style class for the given
2950         widget type to the GtkWidgetPath when creating GtkStyleContext
2951         objects.
2952
2953 2012-01-03  Alexis Menard  <alexis.menard@openbossa.org>
2954
2955         getComputedStyle for outline is not implemented.
2956         https://bugs.webkit.org/show_bug.cgi?id=75441
2957
2958         Reviewed by Antonio Gomes.
2959
2960         Implement getComputedStyle for outline.
2961
2962         Test: fast/css/getComputedStyle/getComputedStyle-outline-shorthand.html
2963
2964         * css/CSSComputedStyleDeclaration.cpp:
2965         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2966
2967 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2968
2969         [GTK] Use gdk_screen_get_monitor_workarea() when available for screenAvailableRect()
2970         https://bugs.webkit.org/show_bug.cgi?id=75435
2971
2972         Reviewed by Martin Robinson.
2973
2974         * platform/gtk/GtkVersioning.c:
2975         (getScreenCurrentDesktop):
2976         (getScreenWorkArea):
2977         (gdk_screen_get_monitor_workarea): Implement it when GTK+ < 3.3.6.
2978         * platform/gtk/GtkVersioning.h:
2979         * platform/gtk/PlatformScreenGtk.cpp:
2980         (WebCore::screenAvailableRect): Use
2981         gdk_screen_get_monitor_workarea() instead of our own
2982         implementation.
2983
2984 2012-01-02  Kentaro Hara  <haraken@chromium.org>
2985
2986         REGRESSION(r103919): Remove resolve-supplemental.pl from the WebCore target in Xcode
2987         https://bugs.webkit.org/show_bug.cgi?id=75458
2988
2989         Reviewed by Adam Barth.
2990
2991         At r103919, we added resolve-supplemental.pl to WebCore.framework/Resources,
2992         but we should have added it to the project without adding it to any target.
2993         This patch fixes it.
2994
2995         No tests. No change in behavior.
2996
2997         * WebCore.xcodeproj/project.pbxproj:
2998
2999 2012-01-02  Kentaro Hara  <haraken@chromium.org>
3000
3001         Enable the [Supplemental] IDL on GTK/GObject
3002         https://bugs.webkit.org/show_bug.cgi?id=75411
3003
3004         Reviewed by Adam Barth.
3005
3006         This patch enables the [Supplemental] IDL on GObject bindings of GTK
3007         by changing the build flow of bindings/gobject/GNUmakefile.am as follows.
3008
3009         - Previous build flow:
3010             foreach $idl (all IDL files) {
3011                 generate-bindings.pl depends on $idl;
3012                 generate-bindings.pl reads $idl;
3013                 generate-bindings.pl generates .h and .cpp files for $idl;
3014             }
3015
3016         - New build flow (See the discussions in bug 72138 for more details):
3017             resolve-supplemental.pl depends on all IDL files;
3018             resolve-supplemental.pl reads all IDL files;
3019             resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
3020             resolve-supplemental.pl outputs supplemental_dependency.tmp;
3021             foreach $idl (all IDL files) {
3022                 generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
3023                 generate-bindings.pl reads $idl;
3024                 generate-bindings.pl reads supplemental_dependency.tmp;
3025                 generate-bindings.pl generates .h and .cpp files for $idl,
3026                     including all attributes in the IDL files that are implementing $idl;
3027             }
3028
3029         Tests: Confirm that build succeeds.
3030                http/tests/websocket/tests/*
3031
3032         * GNUmakefile.am:
3033         * bindings/gobject/GNUmakefile.am:
3034
3035 2012-01-02  Kentaro Hara  <haraken@chromium.org>
3036
3037         Add resolve-supplemental.pl to project.pbxproj
3038         https://bugs.webkit.org/show_bug.cgi?id=75426
3039
3040         Reviewed by Adam Barth.
3041
3042         We should have added "resolve-supplemental.pl" to build scripts of AppleWebKit
3043         when we enabled the [Supplemental] IDL on AppleWebKit at r103519.
3044         This is a follow-up patch for it.
3045
3046         No tests. Just confirm that the AppleWebKit build passes.
3047
3048         * WebCore.xcodeproj/project.pbxproj:
3049
3050 2012-01-02  Kentaro Hara  <haraken@chromium.org>
3051
3052         Add resolve-supplemental.pl to build scripts of AppleWin
3053         https://bugs.webkit.org/show_bug.cgi?id=75412
3054
3055         Reviewed by Adam Barth.
3056
3057         We should have added "resolve-supplemental.pl" to build scripts of AppleWin
3058         when we enabled the [Supplemental] IDL on AppleWin at r103519.
3059         This is a follow-up patch for it.
3060
3061         No tests. Just confirm that the AppleWin build passes.
3062
3063         * WebCore.vcproj/MigrateScripts:
3064         * WebCore.vcproj/WebCore.vcproj:
3065
3066 2012-01-02  Sam Weinig  <sam@webkit.org>
3067
3068         Fix the build.
3069
3070         * bindings/scripts/CodeGeneratorJS.pm:
3071
3072 2012-01-02  Andy Estes  <aestes@apple.com>
3073
3074         Fix the Windows build after r103888.
3075
3076         * WebCore.vcproj/WebCore.vcproj: Remove CollectionCache.{cpp, h} from
3077         the WebCore vcproj.
3078
3079 2012-01-02  Sam Weinig  <sam@webkit.org>
3080
3081         REGRESSION(r100517): We're leaking many, many DOM objects!
3082         https://bugs.webkit.org/show_bug.cgi?id=75451
3083
3084         Reviewed by Mark Rowe.
3085
3086         * bindings/scripts/CodeGeneratorJS.pm:
3087         Add a temporary workaround to the problem of handle finalizers
3088         not getting called by adding back the destructors (or rather
3089         their replacement, destroy() functions).
3090
3091 2012-01-02  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3092
3093         Fix chromium mac build after r103905
3094         https://bugs.webkit.org/show_bug.cgi?id=75436
3095
3096         Reviewed by Csaba Osztrogonác.
3097
3098         Adding parenthesis to disambiguate because clang gives error
3099         "expression is not assignable".
3100
3101         * rendering/svg/RenderSVGResourceGradient.cpp:
3102         (WebCore::RenderSVGResourceGradient::applyResource):
3103
3104 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3105
3106         Use HashMap<OwnPtr> in RenderSVGResourceGradient
3107         https://bugs.webkit.org/show_bug.cgi?id=75364
3108
3109         Reviewed by Daniel Bates.
3110
3111         * rendering/svg/RenderSVGResourceGradient.cpp:
3112         (WebCore::RenderSVGResourceGradient::removeAllClientsFromCache):
3113         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
3114         (WebCore::RenderSVGResourceGradient::applyResource): avoid looking
3115         up the hash twice by using HashMap::add().
3116         * rendering/svg/RenderSVGResourceGradient.h: rename m_gradient to m_gradientMap.
3117
3118 2012-01-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3119
3120         [Qt] Fix qmake warning about unescaped backslashes
3121
3122         Reviewed by Ossy.
3123
3124         * DerivedSources.pri:
3125
3126 2012-01-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3127
3128         Unreviewed. Fix make distcheck issue.
3129
3130         * GNUmakefile.am: Add resolve-supplemental.pl script to
3131         EXTRA_DIST.
3132
3133 2012-01-01  Andreas Kling  <awesomekling@apple.com>
3134
3135         Clear HTMLCollection's internal cache on construction.
3136         <http://webkit.org/b/75423>
3137
3138         Reviewed by Antti Koivisto.
3139
3140         * html/HTMLCollection.h:
3141         * html/HTMLCollection.cpp:
3142         (WebCore::HTMLCollection::HTMLCollection):
3143         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
3144
3145 2012-01-01  Eunmi Lee  <eunmi15.lee@samsung.com>
3146
3147         [EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp.
3148         https://bugs.webkit.org/show_bug.cgi?id=75292
3149
3150         Reviewed by Andreas Kling.
3151
3152         Move ewk_util_dpi_get() function in the ewk_util.cpp to the
3153         WebCore/platform/efl/EflScreenUtilities.cpp in order to use it in the WebKit2.
3154         The function's name is changed to getDPI().
3155
3156         * PlatformEfl.cmake:
3157         * platform/efl/EflScreenUtilities.cpp: Added.
3158         (WebCore::getDPI):
3159         * platform/efl/EflScreenUtilities.h: Added.
3160
3161 2012-01-01  Andreas Kling  <awesomekling@apple.com>
3162
3163         Merge CollectionCache into HTMLCollection.
3164         <http://webkit.org/b/75423>
3165
3166         Reviewed by Anders Carlsson.
3167
3168         - Move the members of CollectionCache into HTMLCollection.
3169         - Renamed resetCollectionInfo() to invalidateCacheIfNeeded().
3170         - Removed a bunch of overkill HashMap::checkConsistency() calls.
3171
3172         * CMakeLists.txt:
3173         * GNUmakefile.list.am:
3174         * Target.pri:
3175         * WebCore.gypi:
3176         * WebCore.xcodeproj/project.pbxproj:
3177         * html/CollectionCache.cpp: Removed.
3178         * html/CollectionCache.h: Removed.
3179
3180             Remove CollectionCache.
3181
3182         * html/HTMLAllCollection.cpp:
3183         (WebCore::HTMLAllCollection::namedItemWithIndex):
3184         * html/HTMLCollection.cpp:
3185         (WebCore::HTMLCollection::HTMLCollection):
3186         (WebCore::HTMLCollection::~HTMLCollection):
3187         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
3188         (WebCore::HTMLCollection::length):
3189         (WebCore::HTMLCollection::item):
3190         (WebCore::HTMLCollection::nextItem):
3191         (WebCore::HTMLCollection::namedItem):
3192         (WebCore::HTMLCollection::updateNameCache):
3193         (WebCore::HTMLCollection::hasNamedItem):
3194         (WebCore::HTMLCollection::namedItems):
3195         (WebCore::HTMLCollection::append):
3196         * html/HTMLCollection.h:
3197         * html/HTMLFormCollection.cpp:
3198         (WebCore::HTMLFormCollection::item):
3199         (WebCore::HTMLFormCollection::getNamedItem):
3200         (WebCore::HTMLFormCollection::nextItem):
3201         (WebCore::HTMLFormCollection::namedItem):
3202         (WebCore::HTMLFormCollection::updateNameCache):
3203
3204             HTMLCollection's m_info and info() become "struct m_cache" (protected.)
3205
3206         * html/HTMLOptionsCollection.cpp:
3207         * html/HTMLOptionsCollection.h:
3208         * html/HTMLSelectElement.cpp:
3209         (WebCore::HTMLSelectElement::setRecalcListItems):
3210
3211             Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from
3212             HTMLSelectElement::setRecalcListItems().
3213
3214         * html/HTMLFormCollection.h:
3215
3216             Remove stale declaration of formCollectionInfo() which no longer exists.
3217
3218 2012-01-01  Andreas Kling  <awesomekling@apple.com>
3219
3220         Move the remaining collections to caching on their respective base nodes.
3221         <http://webkit.org/b/75416>
3222
3223         Reviewed by Anders Carlsson.
3224
3225         Add a (lazily-allocated) array of HTMLCollections to ElementRareData and cache
3226         the various collections on their base node rather than recreating them every time.
3227
3228         Test: fast/dom/collection-idempotence.html
3229               fast/dom/gc-9.html
3230
3231         * html/CollectionType.h:
3232         * dom/ElementRareData.h:
3233         (WebCore::ElementRareData::hasCachedHTMLCollections):
3234         (WebCore::ElementRareData::cachedHTMLCollection):
3235         (WebCore::ElementRareData::ensureCachedHTMLCollection):
3236         * dom/Element.h:
3237         * dom/Element.cpp:
3238         (WebCore::Element::ensureCachedHTMLCollection):
3239
3240             Plumbing to cache HTMLCollections on ElementRareData.
3241
3242         (WebCore::Element::~Element):
3243
3244             Detach any cached collections from an element when it's destroyed.
3245
3246         * html/HTMLCollection.h:
3247         * html/HTMLCollection.cpp:
3248         (WebCore::HTMLCollection::HTMLCollection):
3249         (WebCore::HTMLCollection::create):
3250         (WebCore::HTMLCollection::~HTMLCollection):
3251         (WebCore::HTMLCollection::detachFromNode):
3252         * html/HTMLTableRowsCollection.cpp:
3253         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
3254         * html/HTMLOptionsCollection.cpp:
3255         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
3256         * html/HTMLFormCollection.cpp:
3257         (WebCore::HTMLFormCollection::HTMLFormCollection):
3258         * dom/Document.cpp:
3259         (WebCore::Document::cachedCollection):
3260
3261             Consolidate the HTMLCollection constructors and get rid of the hacks to
3262             optionally retain the base node.
3263
3264         * html/HTMLDataListElement.cpp:
3265         (WebCore::HTMLDataListElement::options):
3266         * html/HTMLElement.cpp:
3267         (WebCore::HTMLElement::children):
3268         * html/HTMLMapElement.cpp:
3269         (WebCore::HTMLMapElement::areas):
3270         * html/HTMLTableElement.cpp:
3271         (WebCore::HTMLTableElement::tBodies):
3272         * html/HTMLTableRowElement.cpp:
3273         (WebCore::HTMLTableRowElement::cells):
3274         * html/HTMLTableSectionElement.cpp:
3275         (WebCore::HTMLTableSectionElement::rows):
3276
3277             Cached collections!
3278
3279 2012-01-01  Raymond Liu  <raymond.liu@intel.com>
3280
3281         Use overload methods to implement [Optional] parameters in AudioNode.idl
3282         https://bugs.webkit.org/show_bug.cgi?id=75402
3283
3284         Reviewed by Adam Barth.
3285
3286         No new tests required.
3287
3288         * GNUmakefile.list.am:
3289         * UseV8.cmake:
3290         * WebCore.gypi:
3291         * WebCore.xcodeproj/project.pbxproj:
3292         * bindings/js/JSAudioNodeCustom.cpp: Removed.
3293         * bindings/v8/custom/V8AudioNodeCustom.cpp: Removed.
3294         * webaudio/AudioNode.cpp:
3295         (WebCore::AudioNode::connect):
3296         (WebCore::AudioNode::disconnect):
3297         * webaudio/AudioNode.h:
3298         * webaudio/AudioNode.idl:
3299
3300 2011-12-20  Robert Hogan  <robert@webkit.org>
3301
3302         CSS 2.1 failure: border-collapse-offset-002.htm fails
3303         https://bugs.webkit.org/show_bug.cgi?id=71705
3304
3305         Reviewed by Julien Chaffraix.
3306
3307         Tests: css2.1/20110323/border-collapse-offset-002-expected.html
3308                fast/css/caption-width-absolute-position-offset-top.htm
3309                fast/css/caption-width-absolute-position.htm
3310                fast/css/caption-width-fixed-position-offset-top.htm
3311                fast/css/caption-width-fixed-position.htm
3312                fast/css/caption-width-relative-position-offset-top.htm
3313                fast/css/caption-width-relative-position.htm
3314
3315         Table captions are implemented as children of the table but have a special
3316         requirement to expand to the full width of the table rather than just the 'available'
3317         width, i.e. the full width minus padding and borders.
3318
3319         To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent()
3320         to return the full width of the containing block (i.e. the table) rather than the available width.
3321
3322
3323         * CMakeLists.txt: Add RenderTableCaption.[cpp|h]
3324         * GNUmakefile.list.am: Add RenderTableCaption.[cpp|h]
3325         * Target.pri: Add RenderTableCaption.[cpp|h]
3326         * WebCore.gypi: Add RenderTableCaption.[cpp|h]
3327         * WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h]
3328         * WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h]
3329         * rendering/RenderBlock.cpp:
3330         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption
3331         * rendering/RenderObject.cpp:
3332         (WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h]
3333         (WebCore::RenderObject::addChild): ditto
3334         * rendering/RenderObject.h:
3335         (WebCore::RenderObject::isTableCaption):
3336         * rendering/RenderTable.cpp:
3337         (WebCore::RenderTable::addChild):
3338         * rendering/RenderTable.h:
3339         * rendering/RenderTableCaption.cpp: Added.
3340         (WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption
3341         (WebCore::RenderTableCaption::~RenderTableCaption):
3342         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width.
3343         * rendering/RenderTableCaption.h: Added.
3344         (WebCore::RenderTableCaption::isTableCaption):
3345         (WebCore::toRenderTableCaption):
3346         * rendering/RenderingAllInOne.cpp:
3347
3348 2012-01-01  Kentaro Hara  <haraken@chromium.org>
3349
3350         Unreviewed. Rebaselined run-bindings-tests results.
3351
3352         * bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Added.
3353         * bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Added.
3354         * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.cpp: Added.
3355         * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.h: Added.
3356         * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Added.
3357         * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Added.
3358
3359 2012-01-01  Andreas Kling  <awesomekling@apple.com>
3360
3361         Make HTMLCollections play nice after their base node is gone.
3362         <http://webkit.org/b/75410>
3363
3364         Reviewed by Anders Carlsson.
3365
3366         Added HTMLCollection::detachFromNode() and call that from destructors of nodes
3367         with cached collections.
3368
3369         Sprinkled checks/assertions where applicable to make sure HTMLCollections are
3370         empty after their associated node has been destroyed.
3371
3372         This is a slight change in behavior, as collections would previously keep
3373         their nodes alive indefinitely. Added a test to document this.
3374
3375         Test: fast/dom/htmlcollection-zombies.html
3376
3377         * dom/Document.cpp:
3378         (WebCore::Document::~Document):
3379         * html/HTMLAllCollection.cpp:
3380         (WebCore::HTMLAllCollection::namedItemWithIndex):
3381         * html/HTMLCollection.cpp:
3382         (WebCore::HTMLCollection::detachFromNode):
3383         (WebCore::HTMLCollection::resetCollectionInfo):
3384         (WebCore::HTMLCollection::itemAfter):
3385         (WebCore::HTMLCollection::calcLength):
3386         (WebCore::HTMLCollection::length):
3387         (WebCore::HTMLCollection::item):
3388         (WebCore::HTMLCollection::nextItem):
3389         (WebCore::HTMLCollection::namedItem):
3390         (WebCore::HTMLCollection::updateNameCache):
3391         (WebCore::HTMLCollection::hasNamedItem):
3392         (WebCore::HTMLCollection::namedItems):
3393         (WebCore::HTMLCollection::tags):
3394         * html/HTMLCollection.h:
3395         * html/HTMLFormCollection.cpp:
3396         (WebCore::HTMLFormCollection::calcLength):
3397         (WebCore::HTMLFormCollection::item):
3398         (WebCore::HTMLFormCollection::getNamedItem):
3399         (WebCore::HTMLFormCollection::getNamedFormItem):
3400         (WebCore::HTMLFormCollection::namedItem):
3401         (WebCore::HTMLFormCollection::updateNameCache):
3402         * html/HTMLFormElement.cpp:
3403         (WebCore::HTMLFormElement::~HTMLFormElement):
3404         * html/HTMLNameCollection.cpp:
3405         (WebCore::HTMLNameCollection::itemAfter):
3406         * html/HTMLOptionsCollection.cpp:
3407         (WebCore::HTMLOptionsCollection::add):
3408         (WebCore::HTMLOptionsCollection::remove):
3409         (WebCore::HTMLOptionsCollection::selectedIndex):
3410         (WebCore::HTMLOptionsCollection::setSelectedIndex):
3411         (WebCore::HTMLOptionsCollection::setLength):
3412         * html/HTMLPropertiesCollection.cpp:
3413         (WebCore::HTMLPropertiesCollection::length):
3414         (WebCore::HTMLPropertiesCollection::item):
3415         (WebCore::HTMLPropertiesCollection::names):
3416         * html/HTMLSelectElement.cpp:
3417         (WebCore::HTMLSelectElement::~HTMLSelectElement):
3418         * html/HTMLSelectElement.h:
3419         * html/HTMLTableElement.cpp:
3420         (WebCore::HTMLTableElement::~HTMLTableElement):
3421         * html/HTMLTableElement.h:
3422         * html/HTMLTableRowsCollection.cpp:
3423         (WebCore::HTMLTableRowsCollection::itemAfter):
3424
3425 2012-01-01  Andreas Kling  <awesomekling@apple.com>
3426
3427         HTMLCollection: Remove the constructor's custom CollectionCache* argument.
3428         <http://webkit.org/b/75414>
3429
3430         Reviewed by Anders Carlsson.
3431
3432         We no longer need to initialize HTMLCollections with a custom CollectionCache,
3433         so remove the argument from the constructor.
3434
3435         * html/HTMLCollection.cpp:
3436         (WebCore::HTMLCollection::HTMLCollection):
3437         * html/HTMLCollection.h:
3438         * html/HTMLFormCollection.cpp:
3439         (WebCore::HTMLFormCollection::HTMLFormCollection):
3440         * html/HTMLNameCollection.cpp:
3441         (WebCore::HTMLNameCollection::HTMLNameCollection):
3442         * html/HTMLOptionsCollection.cpp:
3443         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
3444         * html/HTMLTableRowsCollection.cpp:
3445         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
3446
3447 2011-12-31  Dan Bernstein  <mitz@apple.com>
3448
3449         WebCore changes for: REGRESSION (WebKit2): Cursor, hover states not updated when page scrolls under stationary mouse pointer
3450         https://bugs.webkit.org/show_bug.cgi?id=75405
3451
3452         Reviewed by Anders Carlsson.
3453
3454         Test: fast/events/frame-scroll-fake-mouse-move.html
3455
3456         * page/FrameView.cpp:
3457         (WebCore::FrameView::scrollPositionChanged): Added a call to
3458         EventHandler::dispatchFakeMouseMoveEventSoon().
3459
3460 2012-01-01  Andreas Kling  <awesomekling@apple.com>
3461
3462         Cache named item collections on Document, not just their caches.
3463         <http://webkit.org/b/75403>
3464
3465         Reviewed by Anders Carlsson.
3466
3467         Keep two maps of name -> RefPtr<HTMLNameCollection> on Document. We already
3468         had maps for the CollectionCaches and were creating the HTMLNameCollections
3469         every time they were accessed. We now let the collections create and manage
3470         the CollectionCaches instead of Document.
3471
3472         No new tests since these collections are not exposed to the web.
3473
3474         * dom/Document.h:
3475         * dom/Document.cpp:
3476         (WebCore::Document::windowNamedItems):
3477         (WebCore::Document::documentNamedItems):
3478
3479             Replace the name/CollectionCache maps by name/HTMLNameCollection maps.
3480