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