2010-12-07 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / WebCore / ChangeLog
1 2010-12-07  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Kent Tamura.
4
5         Implement HTML5 hidden attribute
6         https://bugs.webkit.org/show_bug.cgi?id=40511
7
8         Test: fast/html/hidden-attr.html
9
10         * html/HTMLElement.cpp:
11         (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute.
12         (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none.
13
14 2010-12-07  Kenneth Russell  <kbr@google.com>
15
16         Reviewed by David Levin.
17
18         Fix compilation of core web audio files on Windows
19         https://bugs.webkit.org/show_bug.cgi?id=50603
20
21         Changed a few constructs using C99 features of math.h to use
22         wtf/MathExtras.h instead. Changed inline definitions of a couple of
23         const static doubles in classes to out-of-line. Built Chrome with
24         web audio enabled on Windows and Mac OS X to test these changes.
25
26         No new tests since audio API is not yet implemented.
27
28         * WebCore.gypi:
29         * platform/audio/AudioResampler.cpp:
30         * platform/audio/Biquad.cpp:
31         (WebCore::Biquad::setLowpassParams):
32         (WebCore::Biquad::setHighpassParams):
33         (WebCore::Biquad::setLowShelfParams):
34         * platform/audio/Cone.cpp:
35         (WebCore::ConeEffect::gain):
36         * platform/audio/EqualPowerPanner.cpp:
37         (WebCore::EqualPowerPanner::pan):
38         * platform/audio/FFTFrame.cpp:
39         (WebCore::FFTFrame::interpolateFrequencyComponents):
40         (WebCore::FFTFrame::extractAverageGroupDelay):
41         (WebCore::FFTFrame::addConstantGroupDelay):
42         * platform/audio/HRTFKernel.cpp:
43         * platform/audio/HRTFPanner.cpp:
44         * webaudio/AudioBufferSourceNode.cpp:
45         (WebCore::AudioBufferSourceNode::readFromBufferWithGrainEnvelope):
46         * webaudio/AudioPannerNode.cpp:
47         (WebCore::AudioPannerNode::getAzimuthElevation):
48         * webaudio/AudioParam.cpp: Added.
49         (AudioParam::setValue):
50         (AudioParam::smooth):
51         * webaudio/AudioParam.h:
52         * webaudio/RealtimeAnalyser.cpp:
53
54 2010-11-25  Philippe Normand  <pnormand@igalia.com>
55
56         Reviewed by Martin Robinson.
57
58         [GStreamer] faster elements linking
59         https://bugs.webkit.org/show_bug.cgi?id=50067
60
61         Perform less checks during GStreamer elements linking if building
62         against GStreamer >= 0.10.30.
63
64         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
65         (WebCore::GStreamerGWorld::enterFullscreen):
66         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
67         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
68
69 2010-12-07  Philippe Normand  <pnormand@igalia.com>
70
71         Reviewed by Gustavo Noronha Silva.
72
73         [GStreamer] ::buffered() should return multiple ranges in some cases
74         https://bugs.webkit.org/show_bug.cgi?id=45101
75
76         Improved the ::buffered() method thanks to the new buffering query
77         support that landed in GStreamer 0.10.31. The method now
78         queries the media buffered-ranges on the pipeline and queue2
79         handles it if it's buffering the media to disk.
80
81         The webkitwebsrc element also gained BYTES duration query
82         support. This is needed in the rare cases where uridecodebin
83         configures its queue before the HTTP server returns the media
84         Content-Length.
85
86         Test: http/tests/media/video-buffered.html
87
88         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
89         (WebCore::MediaPlayerPrivateGStreamer::buffered):
90         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
91         (webkit_web_src_init):
92         (webKitWebSrcQuery): Make webkitwebsrc handle the duration queries
93         if it's aware of the media content-length.
94         * platform/gtk/RenderThemeGtk.cpp:
95         (WebCore::RenderThemeGtk::paintMediaSliderTrack): Fix position of
96         the second and next buffered ranges.
97
98 2010-12-07  Yael Aharon  <yael.aharon@nokia.com>
99
100         Reviewed by Antonio Gomes.
101
102         Spatial navigation not Working for Map and Area Tags
103         https://bugs.webkit.org/show_bug.cgi?id=47142
104
105         Give area elements special treatment in spatial navigation algorithm by getting the
106         rect of the area from the associated image. Since area elements are likely to overlap
107         if they are not rects, or if authors are not careful, we flatten the rect of area elements.
108
109         Tests: fast/spatial-navigation/snav-imagemap-area-not-focusable.html
110                fast/spatial-navigation/snav-imagemap-area-without-image.html
111                fast/spatial-navigation/snav-imagemap-overlapped-areas.html
112                fast/spatial-navigation/snav-imagemap-simple.html
113
114         * page/FocusController.cpp:
115         (WebCore::FocusController::findFocusCandidateInContainer):
116         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
117         (WebCore::FocusController::advanceFocusDirectionally):
118         * page/SpatialNavigation.cpp:
119         (WebCore::FocusCandidate::FocusCandidate):
120         (WebCore::virtualRectForDirection):
121         (WebCore::virtualRectForAreaElementAndDirection):
122         * page/SpatialNavigation.h:
123         (WebCore::FocusCandidate::FocusCandidate):
124
125 2010-12-07  Darin Adler  <darin@apple.com>
126
127         Try to fix V8 build.
128
129         * bindings/generic/BindingDOMWindow.h:
130         (WebCore::BindingDOMWindow::createWindow): Pass security origin.
131
132 2010-12-07  Darin Adler  <darin@apple.com>
133
134         Another build fix.
135
136         * loader/CrossOriginAccessControl.cpp: Added a missing include.
137
138 2010-12-07  Darin Adler  <darin@apple.com>
139
140         Try to fix build.
141
142         * plugins/PluginView.cpp:
143         (WebCore::PluginView::start): Pass security origin.
144         (WebCore::PluginView::getURLNotify): Ditto.
145         (WebCore::PluginView::getURL): Ditto.
146         (WebCore::PluginView::handlePost): Ditto.
147
148 2010-12-06  Darin Adler  <darin@apple.com>
149
150         Reviewed by Sam Weinig.
151
152         Pass security origin to make local file decision correctly
153         https://bugs.webkit.org/show_bug.cgi?id=48603
154
155         * bindings/generic/BindingDOMWindow.h:
156         (WebCore::BindingDOMWindow::createWindow): Pass security origin.
157         (WebCore::BindingDOMWindow::open): Ditto.
158         * bindings/generic/BindingFrame.h:
159         (WebCore::BindingFrame::navigateIfAllowed): Ditto.
160
161         * bindings/js/JSDOMWindowCustom.cpp:
162         (WebCore::JSDOMWindow::setLocation): Pass security origin.
163         (WebCore::createWindow): Ditto.
164         (WebCore::JSDOMWindow::open): Ditto.
165
166         * bindings/js/JSDocumentCustom.cpp:
167         (WebCore::JSDocument::setLocation): Pass security origin.
168
169         * dom/Document.cpp:
170         (WebCore::Document::processHttpEquiv): Pass security origin.
171
172         * inspector/InspectorController.cpp:
173         (WebCore::InspectorController::openInInspectedWindow):
174         Pass security origin.
175
176         * loader/FrameLoader.cpp:
177         (WebCore::FrameLoader::changeLocation): Added a security origin
178         argument, passed through to urlSelected.
179         (WebCore::FrameLoader::urlSelected): Replaced the resource request
180         and frame name arguments with a frame load request arguments in one
181         overload, and changed the other overload to pass in the current
182         frame's document for the security origin.
183         (WebCore::FrameLoader::loadFrameRequest): Moved the canDisplay
184         check before the referrer computation because it no longer needs
185         to look at the referrer. Replaced the call to canDisplay that
186         used the target frame's security origin and the call to
187         deprecatedCanDisplay with a single call to canDisplay that uses
188         the requester security origin.
189
190         * loader/FrameLoader.h: Updated for argument changes above.
191
192         * loader/NavigationScheduler.cpp:
193         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Added
194         a security origin.
195         (WebCore::ScheduledURLNavigation::fire): Pass the security origin
196         in to FrameLoader::changeLocation.
197         (WebCore::ScheduledURLNavigation::securityOrigin): Added.
198         (WebCore::ScheduledRedirect::ScheduledRedirect): Added a security
199         origin argument.
200         (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
201         (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
202         (WebCore::ScheduledRefresh::fire): Pass the security origin in to
203         FrameLoader::changeLocation.
204         (WebCore::ScheduledFormSubmission::fire): Include the security
205         origin when constructing form submission.
206         (WebCore::NavigationScheduler::scheduleRedirect): Include the security
207         origin when creating the scheduled navigation object.
208         (WebCore::NavigationScheduler::scheduleLocationChange): Ditto.
209         (WebCore::NavigationScheduler::scheduleRefresh): Ditto.
210
211         * loader/NavigationScheduler.h: Added the security origin argument
212         to scheduleLocationChange.
213
214         * loader/SubframeLoader.cpp:
215         (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass in the security
216         origin when calling scheduleLocationChange.
217         * loader/appcache/ApplicationCacheGroup.cpp:
218         (WebCore::ApplicationCacheGroup::selectCache): Ditto.
219
220         * page/ContextMenuController.cpp:
221         (WebCore::openNewWindow): Pass in the security origin.
222         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
223
224         * page/FrameLoadRequest.h: Added a security origin called the requester
225         to all FrameLoadRequest objects.
226
227         * page/XSSAuditor.cpp:
228         (WebCore::XSSAuditor::findInRequest): Added the security origin.
229
230 2010-12-07  Yury Semikhatsky  <yurys@chromium.org>
231
232         Reviewed by Pavel Feldman.
233
234         Web Inspector: avoid initializing Context on when creating attaching listener to ScriptDebugServer
235         https://bugs.webkit.org/show_bug.cgi?id=50627
236
237         * bindings/v8/ScriptDebugServer.cpp:
238         (WebCore::ScriptDebugServer::addListener): don't try to collect already parsed scripts if context has
239         not been initialized yet.
240
241 2010-12-07  Csaba Osztrogon√°c  <ossy@webkit.org>
242
243         Unreviewed. Rolling out r73421, because it made transitions/color-transition-all.html flakey.
244
245         * page/animation/AnimationBase.cpp:
246         (WebCore::addShorthandProperties):
247
248 2010-12-07  Martin Robinson  <mrobinson@igalia.com>
249
250         Unreviewed, rolling out r73392.
251         http://trac.webkit.org/changeset/73392
252         https://bugs.webkit.org/show_bug.cgi?id=50489
253
254         This commit caused crashes on the GTK+ bots
255
256         * bindings/ScriptControllerBase.cpp:
257         (WebCore::ScriptController::executeIfJavaScriptURL):
258         * dom/Document.cpp:
259         (WebCore::Document::Document):
260         (WebCore::Document::close):
261         (WebCore::Document::lastModified):
262         (WebCore::Document::finishedParsing):
263         (WebCore::Document::initSecurityContext):
264         (WebCore::Document::updateURLForPushOrReplaceState):
265         * dom/Document.h:
266         * dom/ProcessingInstruction.cpp:
267         (WebCore::ProcessingInstruction::checkStyleSheet):
268         * dom/ScriptElement.cpp:
269         (WebCore::ScriptElement::scriptCharset):
270         * html/HTMLLinkElement.cpp:
271         (WebCore::HTMLLinkElement::process):
272         * html/MediaDocument.cpp:
273         (WebCore::MediaDocument::replaceMediaElementTimerFired):
274         * html/PluginDocument.cpp:
275         (WebCore::PluginDocumentParser::createDocumentStructure):
276         * loader/DocumentLoader.cpp:
277         (WebCore::DocumentLoader::DocumentLoader):
278         (WebCore::DocumentLoader::finishedLoading):
279         (WebCore::DocumentLoader::commitData):
280         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
281         (WebCore::DocumentLoader::setFrame):
282         * loader/DocumentLoader.h:
283         * loader/DocumentWriter.cpp:
284         (WebCore::DocumentWriter::begin):
285         * loader/DocumentWriter.h:
286         * loader/FrameLoader.cpp:
287         (WebCore::FrameLoader::FrameLoader):
288         (WebCore::FrameLoader::init):
289         (WebCore::FrameLoader::clear):
290         (WebCore::FrameLoader::receivedFirstData):
291         (WebCore::FrameLoader::transitionToCommitted):
292         (WebCore::FrameLoader::open):
293         (WebCore::FrameLoader::finishedLoadingDocument):
294         (WebCore::FrameLoader::addExtraFieldsToRequest):
295         * loader/FrameLoader.h:
296         (WebCore::FrameLoader::writer):
297         * loader/cache/CachedResourceLoader.cpp:
298         (WebCore::CachedResourceLoader::requestPreload):
299         * platform/network/FormDataBuilder.cpp:
300         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
301         * svg/graphics/SVGImage.cpp:
302         (WebCore::SVGImage::dataChanged):
303
304 2010-12-07  Patrick Gansterer  <paroga@webkit.org>
305
306         Reviewed by Andreas Kling.
307
308         [CMake] Remove WebKitGenerators
309         https://bugs.webkit.org/show_bug.cgi?id=50445
310
311         Move remaining logic into main CMakeLists.txt.
312
313         * CMakeLists.txt:
314
315 2010-12-07  Justin Schuh  <jschuh@chromium.org>
316
317         Reviewed by Nikolas Zimmermann.
318
319         Clear old SVG cursor entry before adding a new one
320         https://bugs.webkit.org/show_bug.cgi?id=50549
321
322         Test: svg/css/cursor-replace.svg
323
324         * css/CSSCursorImageValue.cpp:
325         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
326         * svg/SVGCursorElement.cpp:
327         (WebCore::SVGCursorElement::~SVGCursorElement):
328         (WebCore::SVGCursorElement::removeClient):
329         (WebCore::SVGCursorElement::removeReferencedElement):
330         * svg/SVGCursorElement.h:
331         * svg/SVGElement.cpp:
332         (WebCore::SVGElement::setCursorElement):
333         (WebCore::SVGElement::cursorElementRemoved):
334         (WebCore::SVGElement::setCursorImageValue):
335         (WebCore::SVGElement::cursorImageElementRemoved):
336         * svg/SVGElement.h:
337
338 2010-12-07  Kenichi Ishibashi  <bashi@google.com>
339
340         Reviewed by Kent Tamura.
341
342         Let HTMLObjectElement be a form associated element
343         https://bugs.webkit.org/show_bug.cgi?id=48821
344
345         Introduces FormAssociatedElement class which would be a super class
346         of form assocated elements. Some of member functions and variables of
347         HTMLFormControlElement are migrated into this class.
348         Following the HTML5 spec, HTMLFormControlElement class and
349         HTMLObjectElement class are subclasses of it for now.
350
351         Test: fast/forms/form-collection-elements-order.html
352
353         * Android.mk: Added FormAssociatedElement.cpp
354         * CMakeLists.txt: Ditto.
355         * GNUmakefile.am: Added FormAssociatedElement.{cpp,h}
356         * WebCore.exp.in: Added the symbol for toHTMLElement(FormAssociatedElement*)
357         * WebCore.gypi: Added FormAssociatedElement.{cpp,h}
358         * WebCore.pro: Ditto.
359         * WebCore.vcproj/WebCore.vcproj: Ditto.
360         * WebCore.xcodeproj/project.pbxproj: Ditto.
361         * dom/CheckedRadioButtons.h: Fixed class forward declaration order.
362         * dom/Document.cpp:
363         (WebCore::Document::registerFormElementWithFormAttribute): Modified to
364         use FormAssociatedElement instead of HTMLFormControlElement
365         (WebCore::Document::unregisterFormElementWithFormAttribute): Ditto.
366         (WebCore::Document::resetFormElementsOwner):
367         * dom/Document.h: Ditto.
368         * html/DOMFormData.cpp: Ditto.
369         (WebCore::DOMFormData::DOMFormData):
370         * html/FormAssociatedElement.cpp: Copied and renamed from WebCore/html/HTMLFormControlElement.cpp.
371         (WebCore::FormAssociatedElement::FormAssociatedElement):
372         (WebCore::FormAssociatedElement::~FormAssociatedElement):
373         (WebCore::FormAssociatedElement::validity):
374         (WebCore::FormAssociatedElement::insertedIntoTree):
375         (WebCore::FormAssociatedElement::removedFromTree):
376         (WebCore::FormAssociatedElement::removeFromForm):
377         (WebCore::FormAssociatedElement::resetFormOwner):
378         (WebCore::FormAssociatedElement::formAttributeChanged):
379         (WebCore::toHTMLElement):
380         * html/FormAssociatedElement.h: Ditto.
381         (WebCore::FormAssociatedElement::ref):
382         (WebCore::FormAssociatedElement::deref):
383         (WebCore::FormAssociatedElement::formDestroyed):
384         (WebCore::FormAssociatedElement::setForm):
385         * html/HTMLElement.h: Changed the access level of findFormAncestor().
386         * html/HTMLFormCollection.cpp:
387         (WebCore::HTMLFormCollection::item): Modified to use FormAssociatedElement
388         instead of HTMLFormControlElement.
389         (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
390         (WebCore::HTMLFormCollection::updateNameCache): Ditto.
391         * html/HTMLFormControlElement.cpp: Modified regarding with the change of class
392         hierarchy.
393         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
394         (WebCore::HTMLFormControlElement::~HTMLFormControlElement):
395         (WebCore::HTMLFormControlElement::insertedIntoTree):
396         (WebCore::HTMLFormControlElement::removedFromTree):
397         (WebCore::HTMLFormControlElement::supportsFocus):
398         (WebCore::HTMLFormControlElement::checkValidity):
399         (WebCore::HTMLFormControlElement::virtualForm):
400         (WebCore::HTMLFormControlElement::isDefaultButtonForForm):
401         (WebCore::HTMLFormControlElement::attributeChanged):
402         * html/HTMLFormControlElement.h: Ditto.
403         (WebCore::HTMLFormControlElement::form):
404         (WebCore::HTMLFormControlElement::disabled):
405         (WebCore::HTMLFormControlElement::type):
406         (WebCore::HTMLFormControlElement::refFormAssociatedElement):
407         (WebCore::HTMLFormControlElement::derefFormAssociatedElement):
408         * html/HTMLFormElement.cpp: Modified to use FormAssociatedElement
409         instead of HTMLFormControlElement.
410         (WebCore::HTMLFormElement::submitImplicitly):
411         (WebCore::HTMLFormElement::validateInteractively):
412         (WebCore::HTMLFormElement::submit):
413         (WebCore::HTMLFormElement::reset):
414         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute):
415         (WebCore::HTMLFormElement::formElementIndex):
416         (WebCore::HTMLFormElement::registerFormElement):
417         (WebCore::HTMLFormElement::removeFormElement):
418         (WebCore::HTMLFormElement::defaultButton):
419         (WebCore::HTMLFormElement::checkValidity):
420         (WebCore::HTMLFormElement::collectUnhandledInvalidControls):
421         (WebCore::HTMLFormElement::documentDidBecomeActive):
422         * html/HTMLFormElement.h: Ditto.
423         (WebCore::HTMLFormElement::associatedElements):
424         * html/HTMLInputElement.cpp: Ditto.
425         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
426         * html/HTMLObjectElement.cpp: Modified regarding with the change of class
427         hierarchy.
428         (WebCore::HTMLObjectElement::HTMLObjectElement):
429         (WebCore::HTMLObjectElement::~HTMLObjectElement):
430         (WebCore::HTMLObjectElement::create):
431         (WebCore::HTMLObjectElement::attributeChanged):
432         (WebCore::HTMLObjectElement::insertedIntoTree):
433         (WebCore::HTMLObjectElement::removedFromTree):
434         (WebCore::HTMLObjectElement::appendFormData):
435         (WebCore::HTMLObjectElement::formControlName):
436         * html/HTMLObjectElement.h: Ditto.
437         (WebCore::HTMLObjectElement::form):
438         (WebCore::HTMLObjectElement::isFormControlElement):
439         (WebCore::HTMLObjectElement::isEnumeratable):
440         (WebCore::HTMLObjectElement::refFormAssociatedElement):
441         (WebCore::HTMLObjectElement::derefFormAssociatedElement):
442         * html/HTMLTagNames.in: Added constructorNeedsFormElement to object tag.
443         * html/ValidationMessage.cpp: Modified to use FormAssociatedElement
444         instead of HTMLFormControlElement.
445         (WebCore::ValidationMessage::ValidationMessage):
446         (WebCore::ValidationMessage::create):
447         * html/ValidationMessage.h: Ditto.
448         * html/ValidityState.cpp: Ditto.
449         (WebCore::ValidityState::validationMessage):
450         (WebCore::ValidityState::setCustomErrorMessage):
451         (WebCore::ValidityState::valueMissing):
452         (WebCore::ValidityState::typeMismatch):
453         (WebCore::ValidityState::patternMismatch):
454         (WebCore::ValidityState::tooLong):
455         (WebCore::ValidityState::rangeUnderflow):
456         (WebCore::ValidityState::rangeOverflow):
457         (WebCore::ValidityState::stepMismatch):
458         * html/ValidityState.h: Ditto.
459         (WebCore::ValidityState::create):
460         (WebCore::ValidityState::ValidityState):
461         * loader/FormSubmission.cpp: Ditto.
462         (WebCore::FormSubmission::create):
463
464 2010-12-06  Pavel Feldman  <pfeldman@chromium.org>
465
466         Not reviewed. Rolling out r72988 for breaking iframes.
467
468         * css/CSSImportRule.cpp:
469         (WebCore::CSSImportRule::insertedIntoParent):
470
471 2010-12-06  Hironori Bono  <hbono@chromium.org>
472
473         Reviewed by David Levin.
474
475         [Chromium] Refactor FontCacheChromiumWin.cpp
476         https://bugs.webkit.org/show_bug.cgi?id=50611
477         
478         This change just moved the helper functions for the WebCore::FontCache class to the beginning of ths file.
479
480         No new tests are added since this is a refactoring.
481
482         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
483         (WebCore::fontDataFromDescriptionAndLogFont): Moved to the beginning of the file.
484         (WebCore::toGDIFontWeight): Moved to the beginning of the file.
485         (WebCore::FillLogFont): Moved to the beginning of the file.
486         (WebCore::TraitsInFamilyProcData::TraitsInFamilyProcData): Moved to the beginning of the file.
487         (WebCore::traitsInFamilyEnumProc): Moved to the beginning of the file.
488         (WebCore::FontCache::platformInit): Moved after the static functions.
489
490 2010-12-06  Alexey Marinichev  <amarinichev@chromium.org>
491
492         Reviewed by Kenneth Russell.
493
494         Throw webglcontextlost and webglcontextrestored events when a WebGL context is lost and restored.
495         https://bugs.webkit.org/show_bug.cgi?id=50364
496
497         No new tests since there is currently no way to force a context lost event.
498
499         * html/canvas/WebGLRenderingContext.cpp:
500         (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired):
501         (WebCore::WebGLRenderingContext::create):
502         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
503         (WebCore::WebGLRenderingContext::isContextLost):
504         (WebCore::WebGLRenderingContext::loseContext):
505         (WebCore::WebGLRenderingContext::restoreContext):
506         * html/canvas/WebGLRenderingContext.h:
507         (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::WebGLRenderingContextRestoreTimer):
508
509 2010-12-06  David Hyatt  <hyatt@apple.com>
510
511         Reviewed by Simon Fraser.
512
513         https://bugs.webkit.org/show_bug.cgi?id=50593
514         
515         Fix background canvas painting for documents with left/top overflow.  The math from the original RTL patch was incorrect.
516         
517         Just use the RenderView's document dimensions always.
518
519         * rendering/RenderBox.cpp:
520         (WebCore::RenderBox::paintRootBoxDecorations):
521
522 2010-12-06  Simon Fraser  <simon.fraser@apple.com>
523
524         Reviewed by Beth Dakin.
525
526         CSS animation doesn't work for border-radius
527         https://bugs.webkit.org/show_bug.cgi?id=48340
528         
529         Include CSSPropertyBorderRadius in the list of shorthand
530         properties, so that the individual border-radius properties
531         get animated.
532
533         Test: transitions/border-radius-transition.html
534
535         * page/animation/AnimationBase.cpp:
536         (WebCore::addShorthandProperties):
537
538 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
539
540         Reviewed by Tony Chang.
541
542         ApplyStyleCommand should take EditingStyle instead of CSSStyleDeclaration
543         https://bugs.webkit.org/show_bug.cgi?id=49938
544
545         Modified ApplyStyleCommand::ApplyStyleCommand and ApplyStyleCommand::create to take EditingStyle*
546         instead of CSSStyleDeclaration*. Also replaced much of code in Editor::computeAndSetTypingStyle
547         by calls to EditingStyle's member functions and extracted EditingStyle::overrideWith and
548         EditingStyle::extractAndRemoveBlockProperties.
549
550         No new tests are added since this is a refactoring.
551
552         * WebCore.exp.in: Added SelectionController::copyTypingStyle and EditingStyle::~EditingStyle.
553         * css/CSSMutableStyleDeclaration.cpp: Made CSSMutableStyleDeclaration* in the argument list const.
554         (WebCore::CSSMutableStyleDeclaration::merge):
555         * css/CSSMutableStyleDeclaration.h:
556         * editing/ApplyStyleCommand.cpp:
557         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Takes EditingStyle* instead of CSSStyleDeclaration*.
558         (WebCore::ApplyStyleCommand::doApply): Uses EditingStyle.
559         * editing/ApplyStyleCommand.h: m_style is now a ref-pointer to EditingStyle instead of CSSMutableStyleDeclaration.
560         (WebCore::ApplyStyleCommand::create): Takes EditingStyle* instead of CSSStyleDeclaration*.
561         * editing/CompositeEditCommand.cpp:
562         (WebCore::CompositeEditCommand::applyStyle): Ditto.
563         (WebCore::CompositeEditCommand::moveParagraphs): Calls applyStyle.
564         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
565         * editing/CompositeEditCommand.h:
566         * editing/DeleteSelectionCommand.cpp:
567         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
568         * editing/EditCommand.cpp:
569         * editing/EditCommand.h:
570         * editing/EditingStyle.cpp:
571         (WebCore::EditingStyle::~EditingStyle): Added.
572         (WebCore::EditingStyle::overrideWithStyle): Extracted from Editor::calculateTypingStyleAfterDelete.
573         (WebCore::EditingStyle::copy): Added.
574         (WebCore::EditingStyle::extractAndRemoveBlockProperties): Extracted from Editor::calculateTypingStyleAfterDelete.
575         * editing/EditingStyle.h:
576         * editing/Editor.cpp:
577         (WebCore::Editor::applyStyle): Calls ApplyStyleCommand::create.
578         (WebCore::Editor::applyParagraphStyle): Ditto.
579         (WebCore::Editor::computeAndSetTypingStyle): Ditto.
580         * editing/InsertLineBreakCommand.cpp:
581         (WebCore::InsertLineBreakCommand::doApply): Calls applyStyle.
582         * editing/InsertParagraphSeparatorCommand.cpp:
583         (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
584         * editing/InsertTextCommand.cpp:
585         (WebCore::InsertTextCommand::input): Ditto.
586         * editing/RemoveFormatCommand.cpp:
587         (WebCore::RemoveFormatCommand::doApply): Calls ApplyStyleCommand::create.
588         * editing/ReplaceSelectionCommand.cpp:
589         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Calls applyStyle.
590         * editing/SelectionController.cpp:
591         (WebCore::SelectionController::copyTypingStyle): Moved from SelectionController.h
592         * editing/SelectionController.h:
593
594 2010-12-05  Ryosuke Niwa  <rniwa@webkit.org>
595
596         Reviewed by Tony Chang.
597
598         Executing FormatBlock on multiple paragraphs inside pre does not remove the outer pre
599         https://bugs.webkit.org/show_bug.cgi?id=47300
600
601         The bug was caused by FormatBlockCommand::formatRange's not removing refNode when the refNode
602         contains more than one paragraphs even when the refNode is fully selected.
603
604         Fixed the bug by modifying FormatBlockCommand::formatRange to correctly remove the node in
605         such a situation.
606
607         Also fixed a bug in ApplyBlockElementCommand::formatSelection that the end of selection
608         is not properly updated when the end of selection resides in the node split by
609         rangeForParagraphSplittingTextNodesIfNeeded or endOfNextParagrahSplittingTextNodesIfNeeded.
610
611         Test: editing/execCommand/format-block-multiple-paragraphs-in-pre.html
612
613         * editing/ApplyBlockElementCommand.cpp:
614         (WebCore::ApplyBlockElementCommand::formatSelection): Calls formatRange with m_endOfLastParagraph.
615         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): Updates
616         m_endOfLastParagraph when the position points to the node split by this function.
617         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Ditto.
618         * editing/ApplyBlockElementCommand.h: Added m_endOfLastParagraph as a member variable.
619         * editing/FormatBlockCommand.cpp:
620         (WebCore::FormatBlockCommand::formatRange): See above.
621         * editing/FormatBlockCommand.h:
622         * editing/IndentOutdentCommand.cpp:
623         (WebCore::IndentOutdentCommand::formatRange): Ignores the end of selection.
624         * editing/IndentOutdentCommand.h:
625
626 2010-12-03  Zhenyao Mo  <zmo@google.com>
627
628         Reviewed by Kenneth Russell.
629
630         Postpone gl delete* calls until shaders/programs are no longer attached
631         https://bugs.webkit.org/show_bug.cgi?id=50501
632
633         * html/canvas/WebGLBuffer.cpp:
634         (WebCore::WebGLBuffer::deleteObjectImpl): Simply delete GL resource.
635         * html/canvas/WebGLFramebuffer.cpp:
636         (WebCore::WebGLFramebuffer::deleteObjectImpl): Ditto.
637         * html/canvas/WebGLObject.cpp:
638         (WebCore::WebGLObject::deleteObject): Tracking whether deleteObjectImpl should be called or not.
639         * html/canvas/WebGLObject.h:
640         (WebCore::WebGLObject::detachContext): Set attachmentCount to 0 to ensure OpenGL resource deletion.
641         (WebCore::WebGLObject::onDetached): No need to track attachmentCount here as we track it in deleteObject.
642         (WebCore::WebGLObject::isDeleted): Make this public.
643         * html/canvas/WebGLProgram.cpp:
644         (WebCore::WebGLProgram::deleteObjectImpl): Simply delete GL resource.
645         * html/canvas/WebGLRenderbuffer.cpp:
646         (WebCore::WebGLRenderbuffer::deleteObjectImpl): Ditto.
647         * html/canvas/WebGLRenderingContext.cpp:
648         (WebCore::WebGLRenderingContext::getProgramParameter): intercept DELETE_STATUS.
649         (WebCore::WebGLRenderingContext::getShaderParameter): Ditto.
650         * html/canvas/WebGLShader.cpp:
651         (WebCore::WebGLShader::deleteObjectImpl): Simply delete GL resource.
652         * html/canvas/WebGLTexture.cpp:
653         (WebCore::WebGLTexture::deleteObjectImpl): Simply delete GL resource.
654
655 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
656
657         Yet unreviewed another Leopard build fix for r73380.
658
659         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
660         (PlatformCAAnimation::setKeyTimes):
661         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
662         (PlatformCALayer::platformCALayer):
663
664 2010-12-06  Andy Estes  <aestes@apple.com>
665
666         Reviewed by Darin Adler.
667
668         Marquee elements do not stop animating when scrollAmount is set to 0.
669         https://bugs.webkit.org/show_bug.cgi?id=50434
670
671         Test: fast/html/marquee-scrollamount.html
672
673         * rendering/RenderMarquee.cpp:
674         (WebCore::RenderMarquee::timerFired): Allow increment to be 0.
675
676 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
677
678         Unreviewed Leopard buildfix for r73380.
679
680         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
681         (PlatformCAAnimation::setTimingFunctions):
682         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
683         (PlatformCALayer::PlatformCALayer):
684
685 2010-12-06  Philippe Normand  <pnormand@igalia.com>
686
687         Reviewed by Martin Robinson.
688
689         [GStreamer] use ResourceHandle::setDefersLoading in WebKitWebSourceGStreamer
690         https://bugs.webkit.org/show_bug.cgi?id=44157
691
692         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
693         (webKitWebSrcNeedDataMainCb):
694         (webKitWebSrcEnoughDataMainCb): Replaced platform-specific code
695         with cross-platform ResourceHandle::setDefersLoading calls.
696
697 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
698
699         Unreviewed Leopard build fix for r73388.
700
701         * accessibility/AccessibilitySlider.cpp:
702         (WebCore::AccessibilitySlider::maxValueForRange):
703         (WebCore::AccessibilitySlider::minValueForRange):
704
705 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
706
707         Unreviewed build fix for Leopard after r73379.
708
709         * platform/graphics/cg/GraphicsContextCG.cpp:
710         (WebCore::GraphicsContext::setAllowsFontSmoothing):
711
712 2010-12-06  Nate Chapin  <japhet@chromium.org>
713
714         Reviewed by Adam Barth.
715
716         Make DocumentWriter a member of DocumentLoader
717         instead of FrameLoader.
718         https://bugs.webkit.org/show_bug.cgi?id=50489
719
720         Refactor, no new tests.
721
722         * bindings/ScriptControllerBase.cpp:
723         (WebCore::ScriptController::executeIfJavaScriptURL):
724         * dom/Document.cpp:
725         (WebCore::Document::Document):
726         (WebCore::Document::close):
727         (WebCore::Document::lastModified):
728         (WebCore::Document::finishedParsing):
729         (WebCore::Document::initSecurityContext):
730         (WebCore::Document::updateURLForPushOrReplaceState):
731         * dom/Document.h:
732         (WebCore::Document::setDocumentLoader):
733         (WebCore::Document::loader):
734         * dom/ProcessingInstruction.cpp:
735         (WebCore::ProcessingInstruction::checkStyleSheet):
736         * dom/ScriptElement.cpp:
737         (WebCore::ScriptElement::scriptCharset):
738         * html/HTMLLinkElement.cpp:
739         (WebCore::HTMLLinkElement::process):
740         * html/MediaDocument.cpp:
741         (WebCore::MediaDocument::replaceMediaElementTimerFired):
742         * html/PluginDocument.cpp:
743         (WebCore::PluginDocumentParser::createDocumentStructure):
744         * loader/DocumentLoader.cpp:
745         (WebCore::DocumentLoader::DocumentLoader):
746         (WebCore::DocumentLoader::finishedLoading):
747         (WebCore::DocumentLoader::commitData):
748         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
749         (WebCore::DocumentLoader::setFrame):
750         * loader/DocumentLoader.h:
751         (WebCore::DocumentLoader::writer):
752         * loader/DocumentWriter.h:
753         (WebCore::DocumentWriter::setFrame):
754         * loader/FrameLoader.cpp:
755         (WebCore::FrameLoader::FrameLoader):
756         (WebCore::FrameLoader::init):
757         (WebCore::FrameLoader::clear):
758         (WebCore::FrameLoader::receivedFirstData):
759         (WebCore::FrameLoader::transitionToCommitted):
760         (WebCore::FrameLoader::open):
761         (WebCore::FrameLoader::finishedLoadingDocument):
762         (WebCore::FrameLoader::addExtraFieldsToRequest):
763         * loader/FrameLoader.h:
764         (WebCore::FrameLoader::notifier):
765         * loader/cache/CachedResourceLoader.cpp:
766         (WebCore::CachedResourceLoader::requestPreload):
767         * platform/network/FormDataBuilder.cpp:
768         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
769         * svg/graphics/SVGImage.cpp:
770         (WebCore::SVGImage::dataChanged):
771
772 2010-12-06  Mark Rowe  <mrowe@apple.com>
773
774         Build fix.
775
776         * WebCore.xcodeproj/project.pbxproj: Don't force WebCore to build against the 10.5 SDK.
777         That's just plain wrong.
778
779 2010-12-06  Chris Fleizach  <cfleizach@apple.com>
780
781         Reviewed by Darin Adler.
782
783         HTML5 Slider does not work correctly with VoiceOver
784         https://bugs.webkit.org/show_bug.cgi?id=50505
785
786         Address a few problems with the Mac implementation for the accessibility slider.
787             1) The value indicator is not hit testable.
788             2) The value indicator does not return an AXValue.
789             3) In the slider, the min/max values are not correct when min/max attributes are not present.
790             4) When you change the value with the keyboard, it doesn't send out the right notification.
791             5) Sliders were returning AXValue and AXTopLevelUIElement attributes twice in their list of attributes.
792  
793         Test: platform/mac/accessibility/html-slider-indicator.html
794
795         * accessibility/AccessibilityObject.cpp:
796         (WebCore::AccessibilityObject::getAttribute):
797             Use fastGetAttribute on Element, instead of getAttribute.
798         * accessibility/AccessibilityObject.h:
799         (WebCore::AccessibilityObject::isInputSlider):
800         * accessibility/AccessibilityRenderObject.cpp:
801         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
802         * accessibility/AccessibilitySlider.cpp:
803         (WebCore::AccessibilitySlider::doAccessibilityHitTest):
804         (WebCore::AccessibilitySlider::maxValueForRange):
805         (WebCore::AccessibilitySlider::minValueForRange):
806         * accessibility/AccessibilitySlider.h:
807         (WebCore::AccessibilitySlider::isInputSlider):
808         * accessibility/mac/AccessibilityObjectWrapper.mm:
809         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
810         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
811         * html/HTMLInputElement.cpp:
812         (WebCore::HTMLInputElement::applyStep):
813
814 2010-12-06  David Hyatt  <hyatt@apple.com>
815
816         Reviewed by Simon Fraser.
817
818         Fix for https://bugs.webkit.org/show_bug.cgi?id=49220 <<rdar://problem/8644849>, REGRESSION: transforms now
819         O(n^3) from pathological behavior in lowestPosition, rightmostPosition, leftmostPosition and topmostPosition.
820
821         This patch throws out the lowest/rightmost/leftmost/topmostPosition functions and re-architects layout overflow
822         in the engine to cache all the information required to properly handle scrolling.
823
824         In the old code, there were two types of overflow: layout overflow and visual overflow.  The former could
825         affect scrolling and the latter could not.  The distinction was largely meaningless, since layout overflow
826         wasn't actually used to determine scroll width or scroll height.  It didn't propagate across self-painting layer
827         boundaries either.  In the old code, the term visible overflow meant the union of the layout overflow and
828         visual overflow rects.
829
830         In the new code, the two types of overflow remain, but the distinction between the two is now clear.  Visual overflow
831         is used purely for painting and hit testing checks and layout overflow is used specifically for scrolling.  It has
832         been expanded to propagate across self-painting layers, to factor in relative positioning and transforms, and to
833         work with writing modes.
834
835         In order to minimize layout test changes, layers no longer incorporate right/bottom overflow into their width/height members.
836         Doing so uncovered two bugs where left/top overflow was ignored (proof that even having layer dimensions is harmful).
837         A render tree dump hack has been put into the code to keep this overflow dumping for the RenderView's layer, since otherwise
838         a huge number of tests would change.
839
840         Added fast/overflow/overflow-rtl-vertical.html to test vertical writing-mode overflow.  Existing tests cover the rest.
841
842         * page/FrameView.cpp:
843         (WebCore::FrameView::adjustViewSize):
844         (WebCore::FrameView::forceLayoutForPagination):
845         Changed to use RenderView's docTop/Left/Width/Height accessors, which simply grab the overflow and properly flip it
846         to account for writing modes.
847
848         * platform/graphics/IntRect.h:
849         (WebCore::IntRect::shiftLeftEdgeTo):
850         (WebCore::IntRect::shiftRightEdgeTo):
851         (WebCore::IntRect::shiftTopEdgeTo):
852         (WebCore::IntRect::shiftBottomEdgeTo):
853         New helper functions for sliding the edge of a rectangle without moving any of the other three edges.
854
855         * rendering/InlineBox.h:
856         (WebCore::InlineBox::frameRect):
857         frameRect is a helper for obtaining the x, y, width, height of an InlineBox as an IntRect.
858
859         * rendering/InlineFlowBox.cpp:
860         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
861         All of the overflow setting in the inline direction has been removed from this function.  All line overflow is computed
862         at once now in a single function: computeOverflow.
863
864         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
865         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
866         (WebCore::InlineFlowBox::addReplacedChildOverflow):
867         Helper for propagating overflow from specific types of children that occur on a line into the InlineFlowBox's overflow.
868
869         (WebCore::InlineFlowBox::computeOverflow):
870         The new function that computes both horizontal and vertical overflow for a line box.
871
872         (WebCore::InlineFlowBox::setLayoutOverflow):
873         (WebCore::InlineFlowBox::setVisualOverflow):
874         (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
875         New functions that set the overflow computed by computeOverflow.  These replace setBlockDirectionOverflowPositions
876         and setInlineDirectionOverflowPositions.  They essentially do the same thing, but they operate on rectangles.
877
878         (WebCore::InlineFlowBox::nodeAtPoint):
879         (WebCore::InlineFlowBox::paint):
880         Changed to use visual overflow instead of visible overflow.  (Visible overflow as a union of layout and visual
881         overflow is no longer necessary, since visual overflow is now equivalent to the old visible overflow concept.)
882
883         * rendering/InlineFlowBox.h:
884         (WebCore::InlineFlowBox::logicalLayoutOverflowRect):
885         (WebCore::InlineFlowBox::logicalVisualOverflowRect):
886         Helpers for obtaining logical overflow rectangles, since lines compute their overflow in logical terms before
887         converting to block coordinates at the end.
888
889         * rendering/RenderBlock.cpp:
890         (WebCore::RenderBlock::layoutBlock):
891         (WebCore::RenderBlock::addOverflowFromChildren):
892         (WebCore::RenderBlock::computeOverflow):
893         (WebCore::RenderBlock::addOverflowFromFloats):
894         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
895         Blocks now have a computeOverflow function called at the end of layout that adds in all the types of overflow.  The addOverflowFromChildren
896         method is virtual so that RenderListItem and RenderTable can subclass it.  RenderListItem has to position its list marker and
897         propagate marker overflow up, and RenderTable adds in overflow from its sections.
898
899         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
900         (WebCore::RenderBlock::layoutPositionedObjects):
901         When only positioned objects lay out, overflow must still be recomputed.  The refactoring of overflow computation into a single
902         callable method: computeOverflow, makes it possible for this to be done easily.
903
904         (WebCore::RenderBlock::paint):
905         visible -> visual.
906
907         (WebCore::RenderBlock::addOverhangingFloats):
908         The propagation of float overflow has changed substantially.  The basic rules are:
909             (1) The float must be in our floating objects list to contribute to overflow.
910             (2) The float must be a descendant to contribute to overflow.
911             (3) The block must have the outermost list that contains the float, or it has a self-painting layer and
912                 so the float needs to be included in its overflow.
913
914         (WebCore::RenderBlock::nodeAtPoint):
915         visible -> visual.
916
917         (WebCore::RenderBlock::layoutColumns):
918         Remove column overflow computation from layoutColumns and move it to computeOverflow.
919
920         (WebCore::RenderBlock::adjustLinePositionForPagination):
921         visible -> visual.
922
923         * rendering/RenderBlock.h:
924         (WebCore::RenderBlock::scrollbarsChanged):
925         Added a new virtual method used by table cells when scrollbars in an overflow:auto/scroll table cell come and go.
926
927         * rendering/RenderBlockLineLayout.cpp:
928         (WebCore::RenderBlock::layoutInlineChildren):
929         (WebCore::RenderBlock::determineStartPosition):
930         (WebCore::RenderBlock::matchedEndLine):
931         (WebCore::RenderBlock::addOverflowFromInlineChildren):
932         (WebCore::RenderBlock::beforeSideVisualOverflowForLine):
933         (WebCore::RenderBlock::afterSideVisualOverflowForLine):
934         visible -> visual.
935
936         * rendering/RenderBox.cpp:
937         (WebCore::RenderBox::scrollWidth):
938         (WebCore::RenderBox::scrollHeight):
939         Patched to use layoutOverflow functions instead of the old rightmost/leftmostPosition functions.
940
941         (WebCore::RenderBox::paintRootBoxDecorations):
942         Use docLeft and docTop here, so that writing modes are handled.
943
944         (WebCore::RenderBox::clippedOverflowRectForRepaint):
945         visible -> visual.
946
947         (WebCore::RenderBox::addOverflowFromChild):
948         (WebCore::RenderBox::addLayoutOverflow):
949         (WebCore::RenderBox::addVisualOverflow):
950         (WebCore::RenderBox::logicalVisualOverflowRectForPropagation):
951         (WebCore::RenderBox::visualOverflowRectForPropagation):
952         (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation):
953         (WebCore::RenderBox::layoutOverflowRectForPropagation):
954         * rendering/RenderBox.h:
955         The new overflow system for boxes.  Layout overflow now crosses self-painting layer boundaries and adjusts child boxes
956         for transforms, relative positioning and writing mode differences.
957
958         (WebCore::RenderBox::layoutOverflowRect):
959         (WebCore::RenderBox::topLayoutOverflow):
960         (WebCore::RenderBox::bottomLayoutOverflow):
961         (WebCore::RenderBox::leftLayoutOverflow):
962         (WebCore::RenderBox::rightLayoutOverflow):
963         Changed the default rectangle for layout overflow to be the client box to match the scrollable areas of overflow regions.
964
965         (WebCore::RenderBox::clientLogicalBottom):
966         New helper for obtaining the logical bottom of the client box.
967
968         (WebCore::RenderBox::clientBoxRect):
969         New helper for obtaining the clientLeft/Top/Width/Height box.
970
971         * rendering/RenderBoxModelObject.h:
972         (WebCore::RenderBoxModelObject::relativePositionLogicalOffset):
973         Helper for obtaining the relative position offset transposed for vertical writing modes.  Used by line overflow.
974
975         * rendering/RenderFlexibleBox.cpp:
976         (WebCore::RenderFlexibleBox::layoutBlock):
977         Changed flexible boxes to just call the base class computeOverflow method.
978
979         * rendering/RenderInline.cpp:
980         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
981         (WebCore::RenderInline::clippedOverflowRectForRepaint):
982         visible -> visual.
983
984         * rendering/RenderInline.h:
985         * rendering/RenderLayer.cpp:
986         (WebCore::RenderLayer::updateLayerPosition):
987         Changed layers to no longer incorporate right/bottom overflow into width/height.  This is the reason many layout
988         tests change.  (Not doing this makes the layout test changes far worse, since overflow propagates across self-painting
989         layers now.)
990
991         (WebCore::RenderLayer::overflowTop):
992         (WebCore::RenderLayer::overflowBottom):
993         (WebCore::RenderLayer::overflowLeft):
994         (WebCore::RenderLayer::overflowRight):
995         overflowTop/Bottom/Left/Right return overflow that accounts for writing modes, i.e., purely physical overflow that can be used
996         to set up the scroll area.
997
998         (WebCore::RenderLayer::computeScrollDimensions):
999         Drastically simplified this method now that overflowTop/Bottom/Left/Right just do the right thing regarding unreachable overflow.
1000
1001         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1002         Make sure to explicitly set the vertical scrollbar's position just as we did with horizontal scrollbars, so that clamping to the
1003         bottom works.
1004
1005         (WebCore::performOverlapTests):
1006         (WebCore::RenderLayer::paintLayer):
1007         Fix a bug in performOverlapTests.  It incorrectly used the layer's bounds, and so it didn't account for left/top overflow out
1008         of the layer (see why I hate layers even having dimensions?).  Changed it to use the bounding box of the layer instead.
1009
1010         (WebCore::RenderLayer::hitTest):
1011         Fix a bug in hit testing.  It incorrectly used the root layer's bounds as the limit of the hit test, and so it didn't account
1012         for left/top overflow in a ScrollView (hate hate hate layers having dimensions).  I changed it to use the hit test rect instead,
1013         so that the damage rect never stops the point from being tested (unless the hit test request says not to ignore clipping).
1014
1015         (WebCore::RenderLayer::localBoundingBox):
1016         visible -> visual.
1017
1018         * rendering/RenderLayer.h:
1019         Added the new overflowTop/Left/Right/Bottom accessors.
1020
1021         * rendering/RenderLineBoxList.cpp:
1022         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
1023         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
1024         (WebCore::RenderLineBoxList::paint):
1025         (WebCore::RenderLineBoxList::hitTest):
1026         visible -> visual.
1027
1028         * rendering/RenderListItem.cpp:
1029         (WebCore::RenderListItem::addOverflowFromChildren):
1030         (WebCore::RenderListItem::positionListMarker):
1031         * rendering/RenderListItem.h:
1032         RenderListItem now positions the list marker when computing its overflow, since the marker propagates overflow back up to the list item.
1033
1034         * rendering/RenderListMarker.cpp:
1035         (WebCore::RenderListMarker::paint):
1036         visible -> visual.
1037
1038         * rendering/RenderMarquee.cpp:
1039         (WebCore::RenderMarquee::computePosition):
1040         Changed to use overflow functions instead of rightmost/lowestPosition.
1041
1042         * rendering/RenderMedia.cpp:
1043         * rendering/RenderMedia.h:
1044         Removed the lowest/topmost/rightmost/leftmostPosition functions, since control overflow is handled properly already.
1045
1046         * rendering/RenderOverflow.h:
1047         (WebCore::RenderOverflow::RenderOverflow):
1048         (WebCore::RenderOverflow::setLayoutOverflow):
1049         (WebCore::RenderOverflow::setVisualOverflow):
1050         Add new setters for layout and visual overflow as rects.
1051
1052         * rendering/RenderReplaced.cpp:
1053         (WebCore::RenderReplaced::shouldPaint):
1054         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
1055         visible -> visual.
1056
1057         * rendering/RenderRubyRun.cpp:
1058         (WebCore::RenderRubyRun::layout):
1059         Call computeOverflow to recompute our overflow information after we adjust the ruby.
1060
1061         * rendering/RenderTable.cpp:
1062         (WebCore::RenderTable::layout):
1063         (WebCore::RenderTable::addOverflowFromChildren):
1064         (WebCore::RenderTable::paint):
1065         * rendering/RenderTable.h:
1066         Move section overflow propagation into addOverflowFromChildren, and change RenderTable to just call computeOverflow.
1067
1068         * rendering/RenderTableCell.cpp:
1069         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1070         visible -> visual.
1071
1072         (WebCore::RenderTableCell::scrollbarsChanged):
1073         Adding unreachable overflow support (something that in the old code only existed for positioned objects in the root view) exposed
1074         a bug in table layout.  If scrollbars are added during the layout that occurs after intrinsic padding was incorporated into the
1075         cell, then the cell won't lay out properly the second time (after the scrollbars have been added).  We have to adjust the intrinsic
1076         padding accounting for the presence of the new scrollbar so the second layout will get the right dimensions.
1077
1078         * rendering/RenderTableCell.h:
1079         (WebCore::RenderTableCell::hasVisualOverflow):
1080         visible -> visual.
1081
1082         * rendering/RenderTableSection.cpp:
1083         (WebCore::RenderTableSection::layoutRows):
1084         * rendering/RenderTableSection.h:
1085         visible -> visual.  Removed the leftmost/rightmost/topmost/bottommostPosition functions.
1086
1087         * rendering/RenderTreeAsText.cpp:
1088         (WebCore::writeLayers):
1089         Added a hack to render tree dumping to include right/bottom overflow for the root layer only.  This keeps a zillion layout tests
1090         from failing.
1091
1092         * rendering/RenderView.cpp:
1093         (WebCore::RenderView::layout):
1094         (WebCore::RenderView::docTop):
1095         (WebCore::RenderView::docBottom):
1096         (WebCore::RenderView::docLeft):
1097         (WebCore::RenderView::docRight):
1098         * rendering/RenderView.h:
1099         (WebCore::RenderView::docHeight):
1100         (WebCore::RenderView::docWidth):
1101         RenderView now uses docLeft/Top/Height/Width functions, which are just overflow queries that account for writing modes.  These methods
1102         are now the preferred way to query for the physical dimensions of a document.
1103
1104         * rendering/RootInlineBox.cpp:
1105         (WebCore::RootInlineBox::addHighlightOverflow):
1106         Changed to call setOverflowFromLogicalRects instead of the block/inline position functions.
1107
1108         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1109         Remove the computation of block direction overflow, since it now all happens at once after the line is built.
1110
1111         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
1112         * rendering/RootInlineBox.h:
1113         Added a new helper function for incorporating the end padding into a line.  This end padding also includes the single pixel for a caret
1114         in LTR if needed.
1115
1116 2010-12-06  Chris Marrin  <cmarrin@apple.com>
1117
1118         Reviewed by Simon Fraser.
1119
1120         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
1121         https://bugs.webkit.org/show_bug.cgi?id=49388
1122
1123         Replaced GraphicsLayerMac with GraphicsLayerCA. GraphicsLayerCA is essentially 
1124         identical to GraphicsLayerMac, but replaces all the CoreAnimation specific calls 
1125         with calls to PlatformCALayer and PlatformCAAnimation. This makes GraphicsLayerCA 
1126         platform neutral as long as implementations of those two classes are available. 
1127         Added implementations in PlatformCALayerMac and PlatformCAAnimationMac. Also got 
1128         rid of GraphicsLayer::nativeLayer() and replaced it with GraphicsLayer::platformLayer() 
1129         to avoid confusion since both names were used to refer to the same thing. 
1130
1131         This patch is only for Mac. Windows implementation has not changed.
1132
1133         * WebCore.xcodeproj/project.pbxproj:
1134         * platform/graphics/GraphicsLayer.h:
1135         * platform/graphics/ca/GraphicsLayerCA.cpp: Copied from WebCore/platform/graphics/ca/GraphicsLayerCA.cpp.
1136         * platform/graphics/ca/GraphicsLayerCA.h: Copied from WebCore/platform/graphics/ca/GraphicsLayerCA.h.
1137         * platform/graphics/ca/PlatformCAAnimation.h: Copied from WebCore/platform/graphics/ca/PlatformCAAnimation.h.
1138         * platform/graphics/ca/PlatformCALayer.h: Copied from WebCore/platform/graphics/ca/PlatformCALayer.h.
1139         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: Copied from WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
1140         (toCAMediaTimingFunction):
1141         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Copied from WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
1142         (PlatformCALayer::PlatformCALayer):
1143         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1144         * platform/graphics/chromium/GraphicsLayerChromium.h:
1145         * platform/graphics/mac/GraphicsLayerMac.h: Removed.
1146         * platform/graphics/mac/GraphicsLayerMac.mm: Removed.
1147         * platform/graphics/mac/WebLayer.h:
1148         * platform/graphics/mac/WebLayer.mm:
1149         (-[WebLayer setNeedsDisplay]):
1150         (-[WebLayer setNeedsDisplayInRect:]):
1151         (-[WebLayer display]):
1152         (-[WebLayer drawInContext:]):
1153         * platform/graphics/mac/WebTiledLayer.h:
1154         * platform/graphics/mac/WebTiledLayer.mm:
1155         (-[WebTiledLayer setNeedsDisplay]):
1156         (-[WebTiledLayer setNeedsDisplayInRect:]):
1157         (-[WebTiledLayer display]):
1158         (-[WebTiledLayer drawInContext:]):
1159         * platform/graphics/qt/GraphicsLayerQt.cpp:
1160         (WebCore::GraphicsLayerQtImpl::flushChanges):
1161         * platform/graphics/qt/GraphicsLayerQt.h:
1162         * platform/graphics/win/GraphicsLayerCACF.cpp:
1163         * platform/graphics/win/GraphicsLayerCACF.h:
1164
1165 2010-12-06  Simon Fraser  <simon.fraser@apple.com>
1166
1167         Reviewed by Dan Bernstein.
1168
1169         Font antialiasing (smoothing) changes when elements are rendered into compositing layers
1170         https://bugs.webkit.org/show_bug.cgi?id=23364
1171
1172         Text rendered by Core Graphics over a transparent background looks bad because of 
1173         font smoothing, so turn off smoothing when rendering text into compositing layers.
1174
1175         * platform/graphics/GraphicsContext.h:
1176         * platform/graphics/cg/GraphicsContextCG.cpp:
1177         (WebCore::GraphicsContext::setAllowsFontSmoothing):
1178         * platform/graphics/mac/WebLayer.mm:
1179         (drawLayerContents):
1180
1181 2010-12-06  Patrick Gansterer  <paroga@webkit.org>
1182
1183         Reviewed by Andreas Kling.
1184
1185         [WINCE] Add build system
1186         https://bugs.webkit.org/show_bug.cgi?id=50522
1187
1188         * CMakeListsWinCE.txt: Added.
1189
1190 2010-12-06  Chris Fleizach  <cfleizach@apple.com>
1191
1192         Reviewed by Oliver Hunt.
1193
1194         AX does not support HTML5 "required"
1195         https://bugs.webkit.org/show_bug.cgi?id=50507
1196
1197         Test: platform/mac/accessibility/html5-required-attribute.html
1198
1199         * accessibility/AccessibilityRenderObject.cpp:
1200         (WebCore::AccessibilityRenderObject::isRequired):
1201
1202 2010-12-06  Alejandro G. Castro  <alex@igalia.com>
1203
1204         Reviewed by Martin Robinson.
1205
1206         [GTK] using shadows leaks memory
1207         https://bugs.webkit.org/show_bug.cgi?id=50541
1208
1209         Fixed leaks in the shadow code.
1210         * platform/graphics/cairo/CairoUtilities.cpp:
1211         (WebCore::drawPatternToCairoContext): adoptRef instead of just
1212         getting a new reference.
1213         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1214         (WebCore::drawPathShadow): handle cairo_path_t with smart
1215         pointers.
1216
1217 2010-12-06  Yury Semikhatsky  <yurys@chromium.org>
1218
1219         Reviewed by Pavel Feldman.
1220
1221         [v8] Web Inspector: remove duplicate code for capturing stack trace
1222         https://bugs.webkit.org/show_bug.cgi?id=50461
1223
1224         No new tests. Covered with existing inspector tests.
1225
1226         * bindings/js/ScriptCallStackFactory.cpp:
1227         (WebCore::createScriptCallStack):
1228         * bindings/js/ScriptCallStackFactory.h:
1229         * bindings/v8/ScriptCallStackFactory.cpp:
1230         (WebCore::toScriptCallFrame):
1231         (WebCore::toScriptCallFramesVector):
1232         (WebCore::createScriptCallStack):
1233         * bindings/v8/ScriptCallStackFactory.h:
1234         * bindings/v8/V8ConsoleMessage.cpp:
1235         (WebCore::V8ConsoleMessage::handler):
1236         * inspector/ScriptCallFrame.cpp:
1237         (WebCore::ScriptCallFrame::ScriptCallFrame):
1238         (WebCore::ScriptCallFrame::isEqual):
1239         (WebCore::ScriptCallFrame::buildInspectorObject):
1240         * inspector/ScriptCallFrame.h:
1241         (WebCore::ScriptCallFrame::sourceURL):
1242         * inspector/ScriptCallStack.h:
1243         * inspector/TimelineRecordFactory.cpp:
1244         (WebCore::TimelineRecordFactory::createGenericRecord):
1245         * inspector/front-end/ConsoleView.js:
1246         (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement):
1247
1248 == Rolled over to ChangeLog-2010-12-06 ==