17902616c50a83d265d46168b926c31904ff2c70
[WebKit-https.git] / WebCore / ChangeLog
1 2010-12-08  Abhishek Arya  <inferno@chromium.org>
2
3         Reviewed by Dimitri Glazkov.
4
5         Detach node iterator and move to new document when node gets moved.
6         https://bugs.webkit.org/show_bug.cgi?id=50697
7
8         Test: fast/dom/node-iterator-document-moved-crash.html
9
10         * dom/Document.cpp: Method that takes a node and new document as argument.
11         It detaches the node iterators belonging to the current document and attaches
12         them to the new document.
13         (WebCore::Document::moveNodeIteratorsToNewDocument):
14         * dom/Document.h: Function definition.
15         * dom/Node.cpp: When node is moved to another document, call the function to move
16         the iterators appropriately.
17         (WebCore::Node::setDocument):
18
19 2010-12-08  James Robinson  <jamesr@chromium.org>
20
21         Reviewed by Kenneth Russell.
22
23         [chromium] Text is blurry on a large composited layer with an odd center x/y coordinate
24         https://bugs.webkit.org/show_bug.cgi?id=50702
25
26         Compute the center of a large layer using floats instead of ints to avoid roundoff errors.
27
28         Test: compositing/text-on-large-layer.html
29
30         * platform/graphics/chromium/ContentLayerChromium.cpp:
31         (WebCore::ContentLayerChromium::draw):
32
33 2010-12-08  Ryosuke Niwa  <rniwa@webkit.org>
34
35         Reviewed by Dan Bernstein.
36
37         REGRESSION: LayoutTests/editing/selection/caret-rtl-2.html fails
38         https://bugs.webkit.org/show_bug.cgi?id=33503
39
40         The bug was caused by Font::offsetForPosition's not taking into account the containing block's text direction.
41         When RTL text appears in a LTR block, the offset at the beginning of RTL text is on the left of RTL text,
42         and the offset at the end of RTL text is on the right of RTL text. For example, if we had RTL text CBA,
43         then the correspondance between letters and offsets in logical order are: A -> 0, B -> 1, and C -> 2.
44
45         Case 1. CBA appears in a RTL block:
46           In this case, clicking on the visual left of CBA puts the caret naturally at Position("CBA", 2).
47           Clicking on the visual right of CBA puts the caret at Position("CBA", 0) as expected.
48         Case 2. CBA appears in a LTR block:
49           Because the containing block flows from left to right, by convention, Position("CBA", 2") corresponds
50           to the visual right of CBA, and Position("CBA", 0) corresponds to the visual left of CBA.
51           Therefore, clicking on the visual left of CBA should put the caret at Position("CBA", 0),
52           and clicking on the visual right should put it at Position("CBA", 2).
53
54         The bug was caused by WebKit's not considering case 2. The same bug also exist for LTR text in a RTL block.
55         Fixed the bug by taking care of the case 2 in InlineTextBox::offsetForPosition.
56
57         Tests: editing/selection/caret-ltr-2-left.html
58                editing/selection/caret-ltr-2.html
59                editing/selection/caret-ltr-right.html
60                editing/selection/caret-ltr.html
61                editing/selection/caret-rtl-2-left.html
62                editing/selection/caret-rtl-right.html
63
64         * rendering/InlineTextBox.cpp:
65         (WebCore::InlineTextBox::offsetForPosition):
66
67 2010-12-08  Anders Carlsson  <andersca@apple.com>
68
69         Reviewed by Darin Adler.
70
71         Fix some clang++ warnings (one of which was an actual bug)
72         https://bugs.webkit.org/show_bug.cgi?id=50700
73
74         * page/mac/DragControllerMac.mm:
75         (WebCore::DragController::dragOperation):
76         Add parentheses to silent a clang warning.
77
78         * page/mac/EventHandlerMac.mm:
79         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
80         Fix || vs && precedence bug uncovered by clang.
81
82         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
83         (WebCore::GraphicsContext3D::reshape):
84         Use an early return to avoid a warning.
85
86 2010-12-08  Chris Marrin  <cmarrin@apple.com>
87
88         Reviewed by Simon Fraser.
89
90         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
91         https://bugs.webkit.org/show_bug.cgi?id=49388
92
93         Added copy constructors and casting operators to go between 
94         TransformationMatrix and CATransform3D. Also added a copy
95         constructor to go from CGAffineTransform to TransformationMatrix.
96         Used these new methods to clean up platform CA code. This will
97         make it easier to port to Windows.
98
99         I also fixed a couple of build issues found when trying out a 
100         Windows build.
101
102         This is a resubmission of changesets r73477 and r73483 with a 
103         fix for the SL build. The failure was because TransformationMatrix
104         included QuartzCore/CATransform3D.h which brought in some system
105         libraries, including Quickdraw, which has a definition for
106         'Cursor' which clashed with WebCore's 'Cursor' class. So I had
107         to qualify its use in WebChromeClient.cpp in WebKit2.
108
109         * WebCore.xcodeproj/project.pbxproj:
110         * platform/graphics/ca/GraphicsLayerCA.cpp:
111         (WebCore::GraphicsLayerCA::updateContentsTransform):
112         (WebCore::GraphicsLayerCA::ensureCloneLayers):
113         (WebCore::GraphicsLayerCA::fetchCloneLayers):
114         * platform/graphics/ca/TransformationMatrixCA.cpp: Copied from WebCore/platform/graphics/ca/TransformationMatrixCA.cpp.
115         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
116         (PlatformCAAnimation::setFromValue):
117         (PlatformCAAnimation::setToValue):
118         (PlatformCAAnimation::setValues):
119         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
120         (PlatformCALayer::transform):
121         (PlatformCALayer::setTransform):
122         (PlatformCALayer::sublayerTransform):
123         (PlatformCALayer::setSublayerTransform):
124         (PlatformCALayer::contentsTransform):
125         (PlatformCALayer::setContentsTransform):
126         * platform/graphics/cg/TransformationMatrixCG.cpp:
127         (WebCore::TransformationMatrix::TransformationMatrix):
128         * platform/graphics/transforms/TransformationMatrix.h:
129
130 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
131
132         Reviewed by John Sullivan.
133
134         Layering Violation in ContextMenu - member variable of type HitTestResult
135         https://bugs.webkit.org/show_bug.cgi?id=50586
136         
137         ContextMenu had a layering violation by having a member variable of type HitTestResult, because
138         classes in WebCore/platform can't know about classes in WebCore.
139         
140         This patch moves the HitTestResult and all functions that use it out of ContextMenu into ContextMenuController.
141         All of the functions that dealt with populating the ContextMenu are now in ContextMenuController, and this
142         allowed us to delete the ContextMenu file, putting all of the cross-platform code that used to be it
143         in ContextMenuController, and the rest of the code is in the platform-specific files.
144
145         No change in behavior, no new tests.
146
147         * Android.mk: Removed ContextMenu.cpp.
148         * CMakeLists.txt: Ditto.
149         * GNUmakefile.am: Ditto.
150         * WebCore.gypi: Ditto.
151         * WebCore.pro: Ditto.
152         * WebCore.vcproj/WebCore.vcproj: Ditto.
153         * WebCore.xcodeproj/project.pbxproj: Ditto.
154
155         * page/ContextMenuController.cpp:
156         (WebCore::ContextMenuController::ContextMenuController): Initialized m_hitTestResult to an empty HitTestResult.
157         (WebCore::ContextMenuController::handleContextMenuEvent): Call populate on the ContextMenuController instead
158             of the ContextMenu.
159         (WebCore::ContextMenuController::createContextMenu): Fix some indination, and store the HitTestResult in a member
160             variable.
161         (WebCore::ContextMenuController::showContextMenu): Call addInspectElementItem on the ContextMenuController.
162         (WebCore::ContextMenuController::contextMenuItemSelected): Use m_hitTestResult whenever we need a HitTestResult.
163         (WebCore::ContextMenuController::appendItem): Validates the item for its state, and then appends it to the parent menu.
164             This allowed us to move checkOrEnableIfNeeded from ContextMenu.
165
166         These functions were all moved from ContextMenu, and changed slightly to fit in ContextMenuController.
167         All calls to ContextMenu::appendItem were changed to ContextMenuController::appendItem, which takes care
168         of validating the menu.
169         (WebCore::separatorItem): Moved from ContextMenu.
170         (WebCore::ContextMenuController::createAndAppendFontSubMenu): Ditto.
171         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): Ditto.
172         (WebCore::ContextMenuController::createAndAppendSpeechSubMenu): Ditto.
173         (WebCore::ContextMenuController::createAndAppendWritingDirectionSubMenu): Ditto.
174         (WebCore::ContextMenuController::createAndAppendTextDirectionSubMenu): Ditto.
175         (WebCore::ContextMenuController::createAndAppendSubstitutionsSubMenu): Ditto.
176         (WebCore::ContextMenuController::createAndAppendTransformationsSubMenu): Ditto.
177         (WebCore::selectionContainsPossibleWord): Ditto.
178         (WebCore::ContextMenuController::populate): Ditto.
179         (WebCore::ContextMenuController::addInspectElementItem): Ditto.
180         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto.
181         
182         * page/ContextMenuController.h:
183         (WebCore::ContextMenuController::hitTestResult): Returns the HitTestResult of the current ContextMenu.
184
185         * platform/ContextMenu.cpp: Removed.
186         * platform/ContextMenu.h:
187         * platform/efl/ContextMenuEfl.cpp:
188         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
189         (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
190         * platform/gtk/ContextMenuGtk.cpp:
191         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
192         (WebCore::ContextMenu::appendItem): Ditto.
193         * platform/haiku/ContextMenuHaiku.cpp:
194         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
195         (WebCore::ContextMenu::appendItem): Ditto.
196         (WebCore::ContextMenu::insertItem): Ditto.
197         * platform/mac/ContextMenuMac.mm:
198         (-[WebCoreMenuTarget validateMenuItem:]): Calls checkOrEnableIfNeeded on the controller instead of
199             the context menu.
200         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
201         (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
202         (WebCore::ContextMenu::insertItem): Ditto.
203         * platform/win/ContextMenuWin.cpp:
204         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
205         (WebCore::ContextMenu::insertItem): Removed the call to checkOrEnableIfNeeded.
206         * platform/wx/ContextMenuWx.cpp:
207         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
208         (ContextMenu::appendItem): Ditto.
209
210 2010-12-08  Martin Robinson  <mrobinson@igalia.com>
211
212         Reviewed by John Sullivan.
213
214         [GTK] Layering violation in ContextMenuGtk.cpp
215         https://bugs.webkit.org/show_bug.cgi?id=50676
216
217         ContextMenuGtk accesses the page's ContextMenuController, which is a layering
218         violation. This was fixed for Mac with change r73469. We make a similar fix here
219         by moving the "activated" signal connection to the WebKit layer.
220
221         * platform/gtk/ContextMenuGtk.cpp:
222         (WebCore::ContextMenu::appendItem): Remove access of ContextMenuController. This
223         is a layering violation.
224
225 2010-12-08  Jessie Berlin  <jberlin@apple.com>
226
227         Reviewed by Adam Roben.
228
229         WebKit2: Implement WebChromeClient::exceededDatabaseQuota
230         https://bugs.webkit.org/show_bug.cgi?id=50656
231
232         * WebCore.exp.in:
233         Export the symbol for SecurityOrigin::databaseIdentifier.
234
235 2010-12-08  Csaba Osztrogon√°c  <ossy@webkit.org>
236
237         Unreviewed, rolling out r73521.
238         http://trac.webkit.org/changeset/73521
239         https://bugs.webkit.org/show_bug.cgi?id=50640
240
241         It broke 90 layout tests
242
243         * bindings/js/JSDOMBinding.cpp:
244         (WebCore::printErrorMessageForFrame):
245         * bindings/js/JSDOMWindowBase.cpp:
246         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
247         * bindings/js/JSDOMWindowCustom.cpp:
248         (WebCore::JSDOMWindow::setLocation):
249         * page/DOMWindow.cpp:
250         * page/DOMWindow.h:
251
252 2010-12-08  David Hyatt  <hyatt@apple.com>
253
254         Reviewed by Anders Carlsson.
255
256         https://bugs.webkit.org/show_bug.cgi?id=50576
257
258         REGRESSION in position of autocomplete popup on RTL page.
259
260         RTL static position computation did not subtract out the width of the enclosing box if the
261         immediate parent was a RenderInline.  This bug was exposed by properly changing the RenderView
262         to be RTL when the document was RTL.
263
264         Added three new tests in fast/block/positioning.
265
266         * rendering/RenderBox.cpp:
267         (WebCore::RenderBox::computePositionedLogicalWidth):
268
269 2010-12-08  Xiaomei Ji  <xji@chromium.org>
270
271         Reviewed by David Hyatt.
272
273         Fix backward mouse wheeling not working when scroll position is below 0.
274         https://bugs.webkit.org/show_bug.cgi?id=50370
275
276         Tests: fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
277                fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
278
279         * platform/ScrollView.cpp:
280         (WebCore::ScrollView::wheelEvent):
281
282 2010-12-08  Simon Fraser  <simon.fraser@apple.com>
283
284         Reviewed by Dan Bernstein.
285
286         Fix pauseAnimation API to work with shorthand properties
287         https://bugs.webkit.org/show_bug.cgi?id=50639
288         
289         The pause API is always called with a long-hand property, but that
290         property may be animating via a shorthand. Detect this, and pause
291         such shorthand animations.
292
293         * page/animation/AnimationBase.cpp:
294         (WebCore::ShorthandPropertyWrapper::propertyWrappers): Expose the vector
295         of wrappers used by a shorthand wrapper.
296
297         (WebCore::gatherEnclosingShorthandProperties): Utility function that walks
298         through the shorthand wrappers, keeping track of which can affect the given
299         property.
300         (WebCore::AnimationBase::animatableShorthandsAffectingProperty): Return a set
301         of shorthand properties that can affect the given property.
302
303         * page/animation/AnimationBase.h: New method.
304         * page/animation/CompositeAnimation.cpp:
305         (WebCore::CompositeAnimation::pauseTransitionAtTime): If we don't find the
306         property itself, check whether it's being animated via shorthands.
307
308 2010-12-08  David Hyatt  <hyatt@apple.com>
309
310         Reviewed by Beth Dakin.
311
312         <rdar://problem/8740920> Gestures: Frame::scalePage() broken by r73885
313
314         Make sure the transform applied to the RenderView for page scaling is incorporated into the
315         docTop/Bottom/Left/Right accessors.
316
317         * rendering/RenderView.cpp:
318         (WebCore::RenderView::docTop):
319         (WebCore::RenderView::docBottom):
320         (WebCore::RenderView::docLeft):
321         (WebCore::RenderView::docRight):
322
323 2010-12-08  Ilya Tikhonovsky  <loislo@chromium.org>
324
325         Reviewed by Yury Semikhatsky.
326
327         Web Inspector: Protocol cleanup task. Remove WebInspector wrappers
328         for TimelineAgent functions.
329
330         https://bugs.webkit.org/show_bug.cgi?id=50690
331
332         * inspector/Inspector.idl:
333         * inspector/front-end/TimelineAgent.js:
334         * inspector/front-end/TimelinePanel.js:
335         (WebInspector.TimelinePanel):
336         (WebInspector.TimelinePanel.prototype.timelineProfilerWasStarted):
337         (WebInspector.TimelinePanel.prototype.timelineProfilerWasStopped):
338
339 2010-12-08  Philippe Normand  <pnormand@igalia.com>
340
341         Reviewed by Gustavo Noronha Silva.
342
343         [GTK] media/fullscreen* failing on 64-bits Debug
344         https://bugs.webkit.org/show_bug.cgi?id=50394
345
346         Avoid emiting durationchanged in the case where the previous
347         duration was 0 because that case is already handled by the
348         HTMLMediaElement.
349
350         Test: media/media-fullscreen*.html
351
352         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
353         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
354
355 2010-12-07  Darin Adler  <darin@apple.com>
356
357         Reviewed by Geoffrey Garen.
358
359         Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
360         https://bugs.webkit.org/show_bug.cgi?id=50640
361
362         * bindings/js/JSDOMBinding.cpp:
363         (WebCore::printErrorMessageForFrame): Removed body; just call through to
364         DOMWindow::printErrorMessage.
365
366         * bindings/js/JSDOMWindowBase.cpp:
367         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
368         just call through to DOMWindow::crossDomainAccessErrorMessage.
369
370         * bindings/js/JSDOMWindowCustom.cpp:
371         (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
372         firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
373         of the body and moved it into DOMWindow::setLocation.
374
375         * page/DOMWindow.cpp:
376         (WebCore::DOMWindow::setLocation): Added. Does all the same work that
377         JSDOMWindow::setLocation used to do, but in a way that's not specific
378         to JavaScript.
379         (WebCore::DOMWindow::printErrorMessage): Added.
380         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
381
382         * page/DOMWindow.h: Added setLocation, printErrorMessage, and
383         crossDomainAccessErrorMessage.
384
385 2010-12-08  Alejandro G. Castro  <alex@igalia.com>
386
387         Unreviewed, rolling out r73494.
388         http://trac.webkit.org/changeset/73494
389         https://bugs.webkit.org/show_bug.cgi?id=50380
390
391         The tests added are crashing in the debug bots (macn and gtk)
392
393         * html/HTMLSelectElement.cpp:
394         (WebCore::HTMLSelectElement::deselectItems):
395         (WebCore::HTMLSelectElement::setSelectedIndex):
396         (WebCore::HTMLSelectElement::setSelectedIndexByUser):
397         (WebCore::HTMLSelectElement::listBoxSelectItem):
398         (WebCore::HTMLSelectElement::add):
399         (WebCore::HTMLSelectElement::remove):
400         (WebCore::HTMLSelectElement::restoreFormControlState):
401         (WebCore::HTMLSelectElement::parseMappedAttribute):
402         (WebCore::HTMLSelectElement::selectAll):
403         (WebCore::HTMLSelectElement::reset):
404         (WebCore::HTMLSelectElement::updateListBoxSelection):
405         (WebCore::HTMLSelectElement::setLength):
406         * html/HTMLSelectElement.h:
407         (WebCore::HTMLSelectElement::isOptionalFormControl):
408         * html/HTMLSelectElement.idl:
409         * html/ValidityState.cpp:
410         (WebCore::ValidityState::valueMissing):
411
412 2010-12-07  Ilya Tikhonovsky  <loislo@chromium.org>
413
414         Reviewed by Pavel Feldman.
415
416         Web Inspector: Inspector protocol cleanup task. Remove
417         WebInspector wrappers for DOMAgent functions.
418
419         There were a lot of wrappers in WebInspector namespace
420         for different WebInspector agents functions. As far as we have a
421         generic mechanic for such functions we can remove these
422         wrappers and register domAgent instance as a handler for
423         DOM domain notifications.
424
425         https://bugs.webkit.org/show_bug.cgi?id=50626
426
427         * inspector/Inspector.idl:
428         * inspector/front-end/DOMAgent.js:
429         (WebInspector.DOMNode):
430         (WebInspector.DOMAgent):
431         (WebInspector.DOMAgent.prototype.attributesUpdated):
432         (WebInspector.DOMAgent.prototype.characterDataModified):
433         (WebInspector.DOMAgent.prototype.setDocument):
434         (WebInspector.DOMAgent.prototype.setDetachedRoot):
435         (WebInspector.DOMAgent.prototype.setChildNodes):
436         (WebInspector.DOMAgent.prototype.childNodeCountUpdated):
437         (WebInspector.DOMAgent.prototype.childNodeInserted):
438         (WebInspector.DOMAgent.prototype.childNodeRemoved):
439         (WebInspector.EventListeners.getEventListenersForNodeAsync):
440         * inspector/front-end/inspector.js:
441         (WebInspector.didCommitLoad):
442
443 2010-12-08  Yury Semikhatsky  <yurys@chromium.org>
444
445         Reviewed by Pavel Feldman.
446
447         Web Inspector: remove groupLevel counter from console messages
448         https://bugs.webkit.org/show_bug.cgi?id=50672
449
450         * inspector/ConsoleMessage.cpp:
451         (WebCore::ConsoleMessage::ConsoleMessage):
452         (WebCore::ConsoleMessage::addToFrontend):
453         (WebCore::ConsoleMessage::isEqual):
454         * inspector/ConsoleMessage.h:
455         * inspector/InspectorController.cpp:
456         (WebCore::InspectorController::InspectorController):
457         (WebCore::InspectorController::addMessageToConsole):
458         (WebCore::InspectorController::clearConsoleMessages):
459         (WebCore::InspectorController::startGroup):
460         (WebCore::InspectorController::endGroup):
461         * inspector/InspectorController.h:
462         * inspector/front-end/ConsoleView.js:
463         (WebInspector.ConsoleView.createFilterElement):
464         (WebInspector.ConsoleView):
465         (WebInspector.ConsoleView.prototype.filter):
466         (WebInspector.ConsoleView.prototype.afterShow):
467         (WebInspector.ConsoleView.prototype.addMessage):
468         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
469         (WebInspector.ConsoleView.prototype.clearMessages):
470         (WebInspector.ConsoleMessage):
471         (WebInspector.ConsoleMessage.createTextMessage):
472         (WebInspector.ConsoleMessage.prototype.toMessageElement):
473         (WebInspector.ConsoleMessage.prototype._addMessageHeader):
474         (WebInspector.ConsoleMessage.prototype._updateRepeatCount):
475         (WebInspector.ConsoleMessage.prototype.toString):
476         (WebInspector.ConsoleMessage.prototype.isEqual):
477         (WebInspector.ConsoleGroup):
478         * inspector/front-end/Resource.js:
479         (WebInspector.Resource.prototype._checkWarning):
480         * inspector/front-end/SourceFrame.js:
481         (WebInspector.SourceFrame.prototype._addMessageToSource):
482         * inspector/front-end/inspector.js:
483         (WebInspector.addConsoleMessage):
484         (WebInspector.log.logMessage):
485         (WebInspector.log):
486
487 2010-12-07  Pavel Podivilov  <podivilov@chromium.org>
488
489         Reviewed by Pavel Feldman.
490
491         Web Inspector: introduce DebuggerModel class representing InspectorDebuggerAgent state.
492         https://bugs.webkit.org/show_bug.cgi?id=50567
493
494         Moved debugging-related code from BreakpointManager to DebuggerModel. Moved Breakpoint class to a separate file.
495
496         * English.lproj/localizedStrings.js:
497         * WebCore.gypi:
498         * WebCore.vcproj/WebCore.vcproj:
499         * inspector/front-end/Breakpoint.js: Added.
500         (WebInspector.Breakpoint): Moved from BreakpointManager.js.
501         * inspector/front-end/BreakpointManager.js:
502         (WebInspector.BreakpointManager): Remove debugger-related methods.
503         * inspector/front-end/CallStackSidebarPane.js:
504         (WebInspector.CallStackSidebarPane):
505         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
506         (WebInspector.CallStackSidebarPane.prototype._scriptBreakpointHit):
507         * inspector/front-end/DebuggerModel.js: Added.
508         (WebInspector.DebuggerModel): Moved debugger-related methods from BreakpointManager.
509         * inspector/front-end/ScriptsPanel.js:
510         (WebInspector.ScriptsPanel):
511         (WebInspector.ScriptsPanel.prototype.continueToLine):
512         (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback):
513         (WebInspector.ScriptsPanel.prototype.editScriptSource):
514         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
515         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
516         (WebInspector.ScriptsPanel.prototype.reset):
517         * inspector/front-end/SourceFrame.js:
518         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
519         (WebInspector.SourceFrameDelegate.prototype.addBreakpoint):
520         (WebInspector.SourceFrameDelegate.prototype.breakpoints):
521         (WebInspector.SourceFrameDelegate.prototype.findBreakpoint):
522         * inspector/front-end/WebKit.qrc:
523         * inspector/front-end/inspector.html:
524         * inspector/front-end/inspector.js:
525         (WebInspector.createJSBreakpointsSidebarPane):
526         (WebInspector.restoredBreakpoint):
527         (WebInspector.pausedScript):
528         (WebInspector.resumedScript):
529         (WebInspector.reset):
530
531 2010-12-08  Pavel Podivilov  <podivilov@chromium.org>
532
533         Reviewed by Pavel Feldman.
534
535         Web Inspector: SourceFrame refactoring.
536         https://bugs.webkit.org/show_bug.cgi?id=50223
537
538         SourceFrame should ask BreakpointManager about existing breakpoints instead of maintaining
539         it's own storages. Move common code from ScriptView and SourceView to SourceFrame.
540
541         * inspector/front-end/BreakpointManager.js:
542         (WebInspector.BreakpointManager.prototype.findBreakpoints):
543         (WebInspector.BreakpointManager.prototype.findBreakpoint):
544         * inspector/front-end/Script.js:
545         (WebInspector.Script):
546         (WebInspector.Script.prototype.get linesCount):
547         (WebInspector.Script.prototype.get source):
548         (WebInspector.Script.prototype.set source):
549         * inspector/front-end/ScriptView.js:
550         (WebInspector.ScriptView):
551         (WebInspector.ScriptView.prototype._scriptSourceChanged):
552         (WebInspector.ScriptFrameDelegateImpl):
553         (WebInspector.ScriptFrameDelegateImpl.prototype.canEditScripts):
554         (WebInspector.ScriptFrameDelegateImpl.prototype.editLineComplete):
555         (WebInspector.ScriptFrameDelegateImpl.prototype.scripts):
556         * inspector/front-end/ScriptsPanel.js:
557         (WebInspector.ScriptsPanel):
558         * inspector/front-end/SourceFrame.js:
559         (WebInspector.SourceFrame): Add common methods of ScriptView and SourceView.
560         (WebInspector.SourceFrameDelegate):
561         (WebInspector.SourceFrameDelegate.prototype.canEditScripts):
562         (WebInspector.SourceFrameDelegate.prototype.editLineComplete):
563         (WebInspector.SourceFrameDelegate.prototype.scripts):
564         * inspector/front-end/SourceView.js:
565         (WebInspector.SourceView):
566         (WebInspector.SourceView.prototype._contentLoaded):
567         (WebInspector.ResourceFrameDelegateImpl):
568         (WebInspector.ResourceFrameDelegateImpl.prototype.canEditScripts):
569         (WebInspector.ResourceFrameDelegateImpl.prototype.editLineComplete):
570         (WebInspector.ResourceFrameDelegateImpl.prototype.scripts):
571
572 2010-12-08  Yuta Kitamura  <yutak@chromium.org>
573
574         Unreviewed, rolling out r73492.
575         http://trac.webkit.org/changeset/73492
576         https://bugs.webkit.org/show_bug.cgi?id=49914
577
578         Caused a lot of pixel test failures and broke Windows build.
579
580         * WebCore.xcodeproj/project.pbxproj:
581         * platform/graphics/GraphicsContext.cpp:
582         (WebCore::GraphicsContext::createGraphicsContextPrivate):
583         (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
584         (WebCore::GraphicsContext::save):
585         (WebCore::GraphicsContext::restore):
586         (WebCore::GraphicsContext::setStrokeThickness):
587         (WebCore::GraphicsContext::setStrokeStyle):
588         (WebCore::GraphicsContext::setStrokeColor):
589         (WebCore::GraphicsContext::setShadow):
590         (WebCore::GraphicsContext::clearShadow):
591         (WebCore::GraphicsContext::getShadow):
592         (WebCore::GraphicsContext::strokeThickness):
593         (WebCore::GraphicsContext::strokeStyle):
594         (WebCore::GraphicsContext::strokeColor):
595         (WebCore::GraphicsContext::strokeColorSpace):
596         (WebCore::GraphicsContext::fillRule):
597         (WebCore::GraphicsContext::setFillRule):
598         (WebCore::GraphicsContext::setFillColor):
599         (WebCore::GraphicsContext::fillColor):
600         (WebCore::GraphicsContext::fillColorSpace):
601         (WebCore::GraphicsContext::setShouldAntialias):
602         (WebCore::GraphicsContext::shouldAntialias):
603         (WebCore::GraphicsContext::setStrokePattern):
604         (WebCore::GraphicsContext::setFillPattern):
605         (WebCore::GraphicsContext::setStrokeGradient):
606         (WebCore::GraphicsContext::setFillGradient):
607         (WebCore::GraphicsContext::fillGradient):
608         (WebCore::GraphicsContext::strokeGradient):
609         (WebCore::GraphicsContext::fillPattern):
610         (WebCore::GraphicsContext::strokePattern):
611         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
612         (WebCore::GraphicsContext::updatingControlTints):
613         (WebCore::GraphicsContext::setUpdatingControlTints):
614         (WebCore::GraphicsContext::setPaintingDisabled):
615         (WebCore::GraphicsContext::paintingDisabled):
616         (WebCore::GraphicsContext::textDrawingMode):
617         (WebCore::GraphicsContext::setTextDrawingMode):
618         * platform/graphics/GraphicsContext.h:
619         * platform/graphics/GraphicsContextPrivate.h: Added.
620         (WebCore::GraphicsContextState::GraphicsContextState):
621         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
622         * platform/graphics/cairo/GraphicsContextCairo.cpp:
623         (WebCore::setPlatformFill):
624         (WebCore::setPlatformStroke):
625         (WebCore::drawPathShadow):
626         (WebCore::fillCurrentCairoPath):
627         (WebCore::strokeCurrentCairoPath):
628         (WebCore::GraphicsContext::GraphicsContext):
629         (WebCore::GraphicsContext::~GraphicsContext):
630         (WebCore::GraphicsContext::fillPath):
631         (WebCore::GraphicsContext::strokePath):
632         (WebCore::GraphicsContext::fillRect):
633         (WebCore::GraphicsContext::setPlatformShadow):
634         (WebCore::GraphicsContext::strokeRect):
635         (WebCore::GraphicsContext::setAlpha):
636         (WebCore::GraphicsContext::getAlpha):
637         * platform/graphics/cg/GraphicsContextCG.cpp:
638         (WebCore::GraphicsContext::GraphicsContext):
639         (WebCore::GraphicsContext::~GraphicsContext):
640         (WebCore::GraphicsContext::applyStrokePattern):
641         (WebCore::GraphicsContext::applyFillPattern):
642         (WebCore::GraphicsContext::drawPath):
643         (WebCore::GraphicsContext::fillPath):
644         (WebCore::GraphicsContext::strokePath):
645         (WebCore::GraphicsContext::fillRect):
646         (WebCore::GraphicsContext::setPlatformShadow):
647         (WebCore::GraphicsContext::strokeRect):
648         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
649         (WebCore::GraphicsContext::GraphicsContext):
650         (WebCore::GraphicsContext::~GraphicsContext):
651         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
652         (WebCore::GraphicsContext::GraphicsContext):
653         (WebCore::GraphicsContext::~GraphicsContext):
654         (WebCore::GraphicsContext::fillPath):
655         (WebCore::GraphicsContext::strokePath):
656         (WebCore::GraphicsContext::clip):
657         (WebCore::GraphicsContext::clipOut):
658         (WebCore::GraphicsContext::addInnerRoundedRectClip):
659         * platform/graphics/qt/GraphicsContextQt.cpp:
660         (WebCore::GraphicsContext::GraphicsContext):
661         (WebCore::GraphicsContext::~GraphicsContext):
662         (WebCore::GraphicsContext::fillPath):
663         (WebCore::GraphicsContext::strokePath):
664         (WebCore::GraphicsContext::fillRect):
665         (WebCore::GraphicsContext::setPlatformShadow):
666         * platform/graphics/skia/GraphicsContextSkia.cpp:
667         (WebCore::GraphicsContext::GraphicsContext):
668         (WebCore::GraphicsContext::~GraphicsContext):
669         (WebCore::GraphicsContext::fillPath):
670         (WebCore::GraphicsContext::setPlatformShadow):
671         * platform/graphics/win/GraphicsContextCGWin.cpp:
672         (WebCore::GraphicsContext::GraphicsContext):
673         * platform/graphics/win/GraphicsContextCairoWin.cpp:
674         (WebCore::GraphicsContext::GraphicsContext):
675         * platform/graphics/wince/GraphicsContextWinCE.cpp:
676         (WebCore::GraphicsContext::GraphicsContext):
677         (WebCore::GraphicsContext::~GraphicsContext):
678         (WebCore::GraphicsContext::fillPath):
679         (WebCore::GraphicsContext::fillRect):
680         * platform/graphics/wx/GraphicsContextWx.cpp:
681         (WebCore::GraphicsContext::GraphicsContext):
682         (WebCore::GraphicsContext::~GraphicsContext):
683
684 2010-12-08  Dai Mikurube  <dmikurube@google.com>
685
686         Reviewed by Kent Tamura.
687
688         Implement "required" attribute for select tags
689         https://bugs.webkit.org/show_bug.cgi?id=50380
690
691         Test: fast/forms/select-live-pseudo-selectors.html
692               platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
693
694         * html/HTMLSelectElement.cpp:
695         (WebCore::HTMLSelectElement::deselectItems): Added calling setNeedsValidityCheck() to enable validity check after changing. No tests for this change since this function is not exposed to JavaScript or any web interface.
696         (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
697         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
698         (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
699         (WebCore::HTMLSelectElement::listBoxSelectItem): Added calling setNeedsValidityCheck(). No tests for this change since it is not called yet. Look at the bug 36177 and the changeset 56180.
700         (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
701         (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
702         (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
703         (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
704         (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
705         (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
706         (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
707         (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
708         (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
709         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
710         * html/HTMLSelectElement.h:
711         (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
712         * html/HTMLSelectElement.idl: Added a required attribute to select elements..
713         * html/ValidityState.cpp:
714         (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
715
716 2010-12-08  Renata Hodovan  <reni@webkit.org>
717
718         Reviewed by Andreas Kling.
719
720         GraphicsContext: Merge m_common and m_data
721         https://bugs.webkit.org/show_bug.cgi?id=49914
722
723         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
724         and m_common became unnecessary. They are removed.
725         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
726         make the constructor of GraphicsContext clearer.
727         Besides add a getter to the private GraphicsContext::m_state member, because some inline
728         functions in cairo need it.
729
730         No new test is needed, because this is a refactoring.
731
732         * WebCore.xcodeproj/project.pbxproj:
733         * platform/graphics/GraphicsContext.cpp:
734         (WebCore::GraphicsContext::GraphicsContext):
735         (WebCore::GraphicsContext::~GraphicsContext):
736         (WebCore::GraphicsContext::save):
737         (WebCore::GraphicsContext::restore):
738         (WebCore::GraphicsContext::setStrokeThickness):
739         (WebCore::GraphicsContext::setStrokeStyle):
740         (WebCore::GraphicsContext::setStrokeColor):
741         (WebCore::GraphicsContext::setShadow):
742         (WebCore::GraphicsContext::clearShadow):
743         (WebCore::GraphicsContext::getShadow):
744         (WebCore::GraphicsContext::strokeThickness):
745         (WebCore::GraphicsContext::strokeStyle):
746         (WebCore::GraphicsContext::strokeColor):
747         (WebCore::GraphicsContext::strokeColorSpace):
748         (WebCore::GraphicsContext::fillRule):
749         (WebCore::GraphicsContext::setFillRule):
750         (WebCore::GraphicsContext::setFillColor):
751         (WebCore::GraphicsContext::fillColor):
752         (WebCore::GraphicsContext::fillColorSpace):
753         (WebCore::GraphicsContext::setShouldAntialias):
754         (WebCore::GraphicsContext::shouldAntialias):
755         (WebCore::GraphicsContext::state):
756         (WebCore::GraphicsContext::setStrokePattern):
757         (WebCore::GraphicsContext::setFillPattern):
758         (WebCore::GraphicsContext::setStrokeGradient):
759         (WebCore::GraphicsContext::setFillGradient):
760         (WebCore::GraphicsContext::fillGradient):
761         (WebCore::GraphicsContext::strokeGradient):
762         (WebCore::GraphicsContext::fillPattern):
763         (WebCore::GraphicsContext::strokePattern):
764         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
765         (WebCore::GraphicsContext::updatingControlTints):
766         (WebCore::GraphicsContext::setUpdatingControlTints):
767         (WebCore::GraphicsContext::setPaintingDisabled):
768         (WebCore::GraphicsContext::paintingDisabled):
769         (WebCore::GraphicsContext::textDrawingMode):
770         (WebCore::GraphicsContext::setTextDrawingMode):
771         * platform/graphics/GraphicsContext.h:
772         (WebCore::GraphicsContextState::GraphicsContextState):
773         * platform/graphics/GraphicsContextPrivate.h: Removed.
774         * platform/graphics/cairo/GraphicsContextCairo.cpp:
775         (WebCore::setPlatformFill):
776         (WebCore::setPlatformStroke):
777         (WebCore::drawPathShadow):
778         (WebCore::fillCurrentCairoPath):
779         (WebCore::strokeCurrentCairoPath):
780         (WebCore::GraphicsContext::platformInit):
781         (WebCore::GraphicsContext::platformDestroy):
782         (WebCore::GraphicsContext::fillPath):
783         (WebCore::GraphicsContext::strokePath):
784         (WebCore::GraphicsContext::fillRect):
785         (WebCore::GraphicsContext::setPlatformShadow):
786         (WebCore::GraphicsContext::strokeRect):
787         (WebCore::GraphicsContext::setAlpha):
788         (WebCore::GraphicsContext::getAlpha):
789         * platform/graphics/cg/GraphicsContextCG.cpp:
790         (WebCore::GraphicsContext::platformInit):
791         (WebCore::GraphicsContext::platformDestroy):
792         (WebCore::GraphicsContext::applyStrokePattern):
793         (WebCore::GraphicsContext::applyFillPattern):
794         (WebCore::GraphicsContext::drawPath):
795         (WebCore::GraphicsContext::fillPath):
796         (WebCore::GraphicsContext::strokePath):
797         (WebCore::GraphicsContext::fillRect):
798         (WebCore::GraphicsContext::setPlatformShadow):
799         (WebCore::GraphicsContext::strokeRect):
800         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
801         (WebCore::GraphicsContext::platformInit):
802         (WebCore::GraphicsContext::platformDestroy):
803         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
804         (WebCore::GraphicsContext::platformInit):
805         (WebCore::GraphicsContext::platformDestroy):
806         (WebCore::GraphicsContext::fillPath):
807         (WebCore::GraphicsContext::strokePath):
808         (WebCore::GraphicsContext::clip):
809         (WebCore::GraphicsContext::clipOut):
810         (WebCore::GraphicsContext::addInnerRoundedRectClip):
811         * platform/graphics/qt/GraphicsContextQt.cpp:
812         (WebCore::GraphicsContext::platformInit):
813         (WebCore::GraphicsContext::platformDestroy):
814         (WebCore::GraphicsContext::fillPath):
815         (WebCore::GraphicsContext::strokePath):
816         (WebCore::GraphicsContext::fillRect):
817         (WebCore::GraphicsContext::setPlatformShadow):
818         * platform/graphics/skia/GraphicsContextSkia.cpp:
819         (WebCore::GraphicsContext::platformInit):
820         (WebCore::GraphicsContext::platformDestroy):
821         (WebCore::GraphicsContext::fillPath):
822         (WebCore::GraphicsContext::setPlatformShadow):
823         * platform/graphics/win/GraphicsContextCGWin.cpp:
824         (WebCore::GraphicsContext::platformInit):
825         * platform/graphics/win/GraphicsContextCairoWin.cpp:
826         (WebCore::GraphicsContext::platformInit):
827         * platform/graphics/wince/GraphicsContextWinCE.cpp:
828         (WebCore::GraphicsContext::platformInit):
829         (WebCore::GraphicsContext::platformDestroy):
830         (WebCore::GraphicsContext::fillPath):
831         (WebCore::GraphicsContext::fillRect):
832         * platform/graphics/wx/GraphicsContextWx.cpp:
833         (WebCore::GraphicsContext::platformInit):
834         (WebCore::GraphicsContext::platformDestroy):
835
836 2010-12-07  Anton Muhin  <antonm@chromium.org>
837
838         Reviewed by Nate Chapin.
839
840         Port http://trac.webkit.org/changeset/72819/ to v8-backed ports.
841         https://bugs.webkit.org/show_bug.cgi?id=50246
842
843         * bindings/v8/V8DOMMap.h:
844         (WebCore::AbstractWeakReferenceMap::Visitor::startMap):
845         (WebCore::AbstractWeakReferenceMap::Visitor::endMap):
846         (WebCore::WeakReferenceMap::visit):
847         * bindings/v8/V8GCController.cpp:
848         (WebCore::GrouperItem::GrouperItem):
849         (WebCore::GrouperItem::groupId):
850         (WebCore::makeV8ObjectGroups):
851         (WebCore::NodeGrouperVisitor::NodeGrouperVisitor):
852         (WebCore::NodeGrouperVisitor::visitDOMWrapper):
853         (WebCore::NodeGrouperVisitor::applyGrouping):
854         (WebCore::DOMObjectGrouperVisitor::ObjectGrouperVisitor):
855         (WebCore::DOMObjectGrouperVisitor::startMap):
856         (WebCore::DOMObjectGrouperVisitor::endMap):
857         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
858         (WebCore::V8GCController::gcPrologue):
859
860 2010-12-07  Daniel Bates  <dbates@rim.com>
861
862         Reviewed by Martin Robinson.
863
864         Implement focus ring support for image maps
865         https://bugs.webkit.org/show_bug.cgi?id=50371
866
867         Implement GraphicsContext::drawFocusRing(const Path&, ...) so as to support
868         drawing a focus ring for image maps.
869
870         Tests: fast/images/imagemap-circle-focus-ring.html
871                fast/images/imagemap-polygon-focus-ring.html
872
873         * platform/graphics/cairo/GraphicsContextCairo.cpp:
874         (WebCore::adjustFocusRingColor): Added.
875         (WebCore::adjustFocusRingLineWidth): Added.
876         (WebCore::focusRingStrokeStyle): Added.
877         (WebCore::GraphicsContext::drawFocusRing): Moved code for determining focus ring- color,
878         line width and stroke style into functions adjustFocusRingColor(), adjustFocusRingLineWidth(),
879         and focusRingStrokeStyle(), respectively. Implemented GraphicsContext::drawFocusRing(const Path&, ...).
880
881 2010-12-07  Sergio Villar Senin  <svillar@igalia.com>
882
883         Reviewed by Xan Lopez.
884
885         [GTK] WebKitSoupCache fails to load resources when cache contents are externally removed
886         https://bugs.webkit.org/show_bug.cgi?id=50577
887
888         Try to download cached resources again if they are no longer
889         accesible by the cache.
890
891         * platform/network/soup/cache/soup-request-http.c:
892         (send_async_cb):
893         (webkit_soup_request_http_send_async):
894
895 2010-12-06  MORITA Hajime  <morrita@google.com>
896
897         Reviewed by Dimitri Glazkov.
898
899         RenderIndicator subclasses should not change the render tree during layout.
900         https://bugs.webkit.org/show_bug.cgi?id=50026
901
902         The old code created shadow elements during a layout computation,
903         that makes the layout state inconsisntent and cause an assertion failure. 
904         This change created shadow elements before the layout to avoid  
905         state inconsistencies.
906         
907         Instead of creating shadows on demand, RenderMeter and
908         RenderProgress now create all necessary shadows before layouts,
909         and change its visibilities during the layout: Changing
910         visibilities doesn't trigger relayout and keep the state
911         consistent.
912         
913         RenderMeter uses new HidablePartElement for shadow elements,
914         which can toggle visibiliby between hidden and original value.
915
916         Test: fast/dom/HTMLMeterElement/meter-element-crash.html
917
918         * html/HTMLMeterElement.cpp:
919         (WebCore::HTMLMeterElement::attach): Calling updateFromElement()
920         * html/HTMLMeterElement.h:
921         * html/HTMLProgressElement.cpp:
922         (WebCore::HTMLProgressElement::attach): Calling updateFromElement()
923         * html/HTMLProgressElement.h:
924         * rendering/RenderIndicator.cpp:
925         * rendering/RenderIndicator.h:
926         * rendering/RenderMeter.cpp:
927         (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility.
928         (WebCore::MeterPartElement::createForPart):
929         (WebCore::MeterPartElement::hide):
930         (WebCore::MeterPartElement::restoreVisibility):
931         (WebCore::MeterPartElement::updateStyleForPart):
932         (WebCore::MeterPartElement::saveVisibility):
933         (WebCore::RenderMeter::~RenderMeter):
934         (WebCore::RenderMeter::createPart): Extracted
935         (WebCore::RenderMeter::updateFromElement): Had a shadow generation.
936         (WebCore::RenderMeter::layoutParts): Removed shadow generation code.
937         (WebCore::RenderMeter::shouldHaveParts):
938         (WebCore::RenderMeter::valuePartRect): Adopted orientation.
939         (WebCore::RenderMeter::orientation): Morphed from isHorizontal()
940         (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation
941         (WebCore::RenderMeter::barPseudoId): Adopted orientation.
942         * rendering/RenderMeter.h:
943         (WebCore::RenderMeter::shadowAttached):
944         * rendering/RenderProgress.cpp:
945         (WebCore::RenderProgress::updateFromElement): Had a shadow generation.
946         (WebCore::RenderProgress::layoutParts):
947         * rendering/RenderProgress.h:
948         * rendering/ShadowElement.cpp:
949         (WebCore::ShadowBlockElement::createForPart): Extracted initAsPart().
950         (WebCore::ShadowBlockElement::initAsPart): Extracted from createForPart().
951         * rendering/ShadowElement.h:
952
953 2010-11-29  Mihai Parparita  <mihaip@chromium.org>
954
955         Reviewed by Adam Barth.
956
957         returning to a POST result within a frame does a GET instead of a POST
958         https://bugs.webkit.org/show_bug.cgi?id=10199
959         
960         FrameLoader::loadURLIntoChildFrame had a check for whether a frame
961         had a HistoryItem, and if so used that item's URL. However, that did
962         not handle the case where the HistoryItem had FormData and thus was the
963         result of a POST request. FrameLoader::navigateToDifferentDocument (now
964         renamed to loadDifferentDocumentItem) does all that, so just switch to
965         using it instead.
966         
967         Besides the bug fix, the only difference in behavior is that we use the
968         HistoryItem's URL instead of original URL when restoring it in a child
969         frame. This seems desirable too (for consistency with other browsers, and
970         so that we can avoid form double-submits for forms that that do
971         POST-then-redirect), and is tested by
972         fast/history/history-back-initial-vs-final-url.html.
973         
974         Tests: fast/history/history-back-initial-vs-final-url.html
975                http/tests/navigation/post-frames-goback1.html
976                http/tests/navigation/postredirect-frames-goback1.html
977
978         * loader/FrameLoader.cpp:
979         (WebCore::FrameLoader::loadURLIntoChildFrame): Switch to using
980             loadDifferentDocumentItem. Also cleaned up ordering slightly (if
981             on the archive path, there's no need to do any of the other checks).
982         (WebCore::FrameLoader::loadDifferentDocumentItem): Renamed from
983             navigateToDifferentDocument so that calling it from loadItem and
984             loadURLIntoChildFrame flows more easily.
985         (WebCore::FrameLoader::loadSameDocumentItem): Similarly, renamed from
986             navigateWithinDocument.
987         (WebCore::FrameLoader::loadItem): Update callsites to the above methods.
988         * loader/FrameLoader.h:
989
990 2010-12-07  Dan Bernstein  <mitz@apple.com>
991
992         Reviewed by Darin Adler.
993
994         Made tables repaint correctly in all writing modes
995         Part of: Make tables work with vertical text
996         https://bugs.webkit.org/show_bug.cgi?id=46417
997
998         Tests: fast/repaint/table-writing-modes-h.html
999                fast/repaint/table-writing-modes-v.html
1000
1001         * rendering/RenderTableSection.cpp:
1002         (WebCore::RenderTableSection::paintObject): Compute the ranges of rows and
1003         columns to repaint based on the logical extent of the repaint rect.
1004
1005 2010-12-07  Alexey Marinichev  <amarinichev@chromium.org>
1006
1007         Reviewed by James Robinson.
1008
1009         [chromium] compositor lost context recovery fix
1010         https://bugs.webkit.org/show_bug.cgi?id=50614
1011
1012         To test, load a page that triggers the compositor, kill the GPU
1013         process and hover over a link to redraw and thus restart the GPU
1014         process.  Without this patch it will assert in
1015         ContentLayerChromium::updateTextureRect; with this patch it will not.
1016
1017         * platform/graphics/chromium/LayerChromium.cpp:
1018         (WebCore::LayerChromium::setNeedsDisplay):
1019
1020 2010-12-07  Anders Carlsson  <andersca@apple.com>
1021
1022         Fix the last clang++ build error.
1023
1024         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1025         (PlatformCALayer::animationForKey):
1026         Cast the returned animation to the correct type.
1027
1028 2010-12-07  Anders Carlsson  <andersca@apple.com>
1029
1030         Fix some clang++ build errors.
1031
1032         * platform/graphics/ca/GraphicsLayerCA.cpp:
1033         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1034         Remove unused variable.
1035
1036         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1037         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1038         Fix constness of pointers.
1039
1040 2010-12-07  Simon Fraser  <simon.fraser@apple.com>
1041
1042         Reviewed by Chris Marrin.
1043
1044         Fix the Color -> CGColorRef conversions for the debug colors
1045         used for compositing layers.
1046
1047         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1048         (PlatformCALayer::setBackgroundColor):
1049         (PlatformCALayer::setBorderColor):
1050
1051 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
1052
1053         Reviewed by John Sullivan.
1054
1055         Part of Layering Violation in ContextMenu
1056         https://bugs.webkit.org/show_bug.cgi?id=50586
1057         
1058         ContextMenuMac.mm had a WebCoreMenuTarget class, which was responsible for wrapping
1059         a ContextMenuItem, and calling through to the ContextMenuController to validate it
1060         and call a function when it was selected.
1061         
1062         It was a layering violation to have this class here, because ContextMenu can't know
1063         about ContextMenuController.
1064         
1065         This patch moves the class that wraps the ContextMenuItems to WebKit/mac/WebHTMLView.mm,
1066         and sets up the menu targets there.
1067
1068         No change in behavior, no new tests.
1069
1070         * WebCore.exp.in: Added function that needs to be exported.
1071         * platform/mac/ContextMenuMac.mm:
1072         (WebCore::ContextMenu::ContextMenu): Don't set the sharedMenuTarget anymore.
1073         (WebCore::ContextMenu::appendItem): Don't call setMenuItemTarget (this is done in WebKit now).
1074         (WebCore::ContextMenu::insertItem): Ditto.
1075
1076 2010-12-07  Simon Fraser  <simon.fraser@apple.com>
1077
1078         Reviewed by Dan Bernstein.
1079
1080         -webkit-transition Fails on Multiple text-shadow Shadows
1081         https://bugs.webkit.org/show_bug.cgi?id=42281
1082         
1083         When transitioning multiple shadows, the blend function for
1084         ShadowData dropped all but the first and last shadow because
1085         of a failure to append to the end of the list. Fixed.
1086
1087         Test: transitions/multiple-text-shadow-transition.html
1088
1089         * page/animation/AnimationBase.cpp:
1090         (WebCore::PropertyWrapperShadow::blend):
1091
1092 2010-12-07  Simon Fraser  <simon.fraser@apple.com>
1093
1094         Reviewed by Beth Dakin.
1095
1096         CSS animation doesn't work for border-radius
1097         https://bugs.webkit.org/show_bug.cgi?id=48340
1098         
1099         Include CSSPropertyBorderRadius in the list of shorthand
1100         properties, so that the individual border-radius properties
1101         get animated.
1102
1103         Test: transitions/border-radius-transition.html
1104
1105         * page/animation/AnimationBase.cpp:
1106         (WebCore::addShorthandProperties):
1107
1108 2010-12-07  Maciej Stachowiak  <mjs@apple.com>
1109
1110         Reviewed by Kent Tamura.
1111
1112         Implement HTML5 hidden attribute
1113         https://bugs.webkit.org/show_bug.cgi?id=40511
1114
1115         Test: fast/html/hidden-attr.html
1116
1117         * html/HTMLElement.cpp:
1118         (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute.
1119         (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none.
1120
1121 2010-12-07  Kenneth Russell  <kbr@google.com>
1122
1123         Reviewed by David Levin.
1124
1125         Fix compilation of core web audio files on Windows
1126         https://bugs.webkit.org/show_bug.cgi?id=50603
1127
1128         Changed a few constructs using C99 features of math.h to use
1129         wtf/MathExtras.h instead. Changed inline definitions of a couple of
1130         const static doubles in classes to out-of-line. Built Chrome with
1131         web audio enabled on Windows and Mac OS X to test these changes.
1132
1133         No new tests since audio API is not yet implemented.
1134
1135         * WebCore.gypi:
1136         * platform/audio/AudioResampler.cpp:
1137         * platform/audio/Biquad.cpp:
1138         (WebCore::Biquad::setLowpassParams):
1139         (WebCore::Biquad::setHighpassParams):
1140         (WebCore::Biquad::setLowShelfParams):
1141         * platform/audio/Cone.cpp:
1142         (WebCore::ConeEffect::gain):
1143         * platform/audio/EqualPowerPanner.cpp:
1144         (WebCore::EqualPowerPanner::pan):
1145         * platform/audio/FFTFrame.cpp:
1146         (WebCore::FFTFrame::interpolateFrequencyComponents):
1147         (WebCore::FFTFrame::extractAverageGroupDelay):
1148         (WebCore::FFTFrame::addConstantGroupDelay):
1149         * platform/audio/HRTFKernel.cpp:
1150         * platform/audio/HRTFPanner.cpp:
1151         * webaudio/AudioBufferSourceNode.cpp:
1152         (WebCore::AudioBufferSourceNode::readFromBufferWithGrainEnvelope):
1153         * webaudio/AudioPannerNode.cpp:
1154         (WebCore::AudioPannerNode::getAzimuthElevation):
1155         * webaudio/AudioParam.cpp: Added.
1156         (AudioParam::setValue):
1157         (AudioParam::smooth):
1158         * webaudio/AudioParam.h:
1159         * webaudio/RealtimeAnalyser.cpp:
1160
1161 2010-11-25  Philippe Normand  <pnormand@igalia.com>
1162
1163         Reviewed by Martin Robinson.
1164
1165         [GStreamer] faster elements linking
1166         https://bugs.webkit.org/show_bug.cgi?id=50067
1167
1168         Perform less checks during GStreamer elements linking if building
1169         against GStreamer >= 0.10.30.
1170
1171         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
1172         (WebCore::GStreamerGWorld::enterFullscreen):
1173         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1174         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1175
1176 2010-12-07  Philippe Normand  <pnormand@igalia.com>
1177
1178         Reviewed by Gustavo Noronha Silva.
1179
1180         [GStreamer] ::buffered() should return multiple ranges in some cases
1181         https://bugs.webkit.org/show_bug.cgi?id=45101
1182
1183         Improved the ::buffered() method thanks to the new buffering query
1184         support that landed in GStreamer 0.10.31. The method now
1185         queries the media buffered-ranges on the pipeline and queue2
1186         handles it if it's buffering the media to disk.
1187
1188         The webkitwebsrc element also gained BYTES duration query
1189         support. This is needed in the rare cases where uridecodebin
1190         configures its queue before the HTTP server returns the media
1191         Content-Length.
1192
1193         Test: http/tests/media/video-buffered.html
1194
1195         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1196         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1197         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1198         (webkit_web_src_init):
1199         (webKitWebSrcQuery): Make webkitwebsrc handle the duration queries
1200         if it's aware of the media content-length.
1201         * platform/gtk/RenderThemeGtk.cpp:
1202         (WebCore::RenderThemeGtk::paintMediaSliderTrack): Fix position of
1203         the second and next buffered ranges.
1204
1205 2010-12-07  Yael Aharon  <yael.aharon@nokia.com>
1206
1207         Reviewed by Antonio Gomes.
1208
1209         Spatial navigation not Working for Map and Area Tags
1210         https://bugs.webkit.org/show_bug.cgi?id=47142
1211
1212         Give area elements special treatment in spatial navigation algorithm by getting the
1213         rect of the area from the associated image. Since area elements are likely to overlap
1214         if they are not rects, or if authors are not careful, we flatten the rect of area elements.
1215
1216         Tests: fast/spatial-navigation/snav-imagemap-area-not-focusable.html
1217                fast/spatial-navigation/snav-imagemap-area-without-image.html
1218                fast/spatial-navigation/snav-imagemap-overlapped-areas.html
1219                fast/spatial-navigation/snav-imagemap-simple.html
1220
1221         * page/FocusController.cpp:
1222         (WebCore::FocusController::findFocusCandidateInContainer):
1223         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
1224         (WebCore::FocusController::advanceFocusDirectionally):
1225         * page/SpatialNavigation.cpp:
1226         (WebCore::FocusCandidate::FocusCandidate):
1227         (WebCore::virtualRectForDirection):
1228         (WebCore::virtualRectForAreaElementAndDirection):
1229         * page/SpatialNavigation.h:
1230         (WebCore::FocusCandidate::FocusCandidate):
1231
1232 2010-12-07  Darin Adler  <darin@apple.com>
1233
1234         Try to fix V8 build.
1235
1236         * bindings/generic/BindingDOMWindow.h:
1237         (WebCore::BindingDOMWindow::createWindow): Pass security origin.
1238
1239 2010-12-07  Darin Adler  <darin@apple.com>
1240
1241         Another build fix.
1242
1243         * loader/CrossOriginAccessControl.cpp: Added a missing include.
1244
1245 2010-12-07  Darin Adler  <darin@apple.com>
1246
1247         Try to fix build.
1248
1249         * plugins/PluginView.cpp:
1250         (WebCore::PluginView::start): Pass security origin.
1251         (WebCore::PluginView::getURLNotify): Ditto.
1252         (WebCore::PluginView::getURL): Ditto.
1253         (WebCore::PluginView::handlePost): Ditto.
1254
1255 2010-12-06  Darin Adler  <darin@apple.com>
1256
1257         Reviewed by Sam Weinig.
1258
1259         Pass security origin to make local file decision correctly
1260         https://bugs.webkit.org/show_bug.cgi?id=48603
1261
1262         * bindings/generic/BindingDOMWindow.h:
1263         (WebCore::BindingDOMWindow::createWindow): Pass security origin.
1264         (WebCore::BindingDOMWindow::open): Ditto.
1265         * bindings/generic/BindingFrame.h:
1266         (WebCore::BindingFrame::navigateIfAllowed): Ditto.
1267
1268         * bindings/js/JSDOMWindowCustom.cpp:
1269         (WebCore::JSDOMWindow::setLocation): Pass security origin.
1270         (WebCore::createWindow): Ditto.
1271         (WebCore::JSDOMWindow::open): Ditto.
1272
1273         * bindings/js/JSDocumentCustom.cpp:
1274         (WebCore::JSDocument::setLocation): Pass security origin.
1275
1276         * dom/Document.cpp:
1277         (WebCore::Document::processHttpEquiv): Pass security origin.
1278
1279         * inspector/InspectorController.cpp:
1280         (WebCore::InspectorController::openInInspectedWindow):
1281         Pass security origin.
1282
1283         * loader/FrameLoader.cpp:
1284         (WebCore::FrameLoader::changeLocation): Added a security origin
1285         argument, passed through to urlSelected.
1286         (WebCore::FrameLoader::urlSelected): Replaced the resource request
1287         and frame name arguments with a frame load request arguments in one
1288         overload, and changed the other overload to pass in the current
1289         frame's document for the security origin.
1290         (WebCore::FrameLoader::loadFrameRequest): Moved the canDisplay
1291         check before the referrer computation because it no longer needs
1292         to look at the referrer. Replaced the call to canDisplay that
1293         used the target frame's security origin and the call to
1294         deprecatedCanDisplay with a single call to canDisplay that uses
1295         the requester security origin.
1296
1297         * loader/FrameLoader.h: Updated for argument changes above.
1298
1299         * loader/NavigationScheduler.cpp:
1300         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Added
1301         a security origin.
1302         (WebCore::ScheduledURLNavigation::fire): Pass the security origin
1303         in to FrameLoader::changeLocation.
1304         (WebCore::ScheduledURLNavigation::securityOrigin): Added.
1305         (WebCore::ScheduledRedirect::ScheduledRedirect): Added a security
1306         origin argument.
1307         (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
1308         (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
1309         (WebCore::ScheduledRefresh::fire): Pass the security origin in to
1310         FrameLoader::changeLocation.
1311         (WebCore::ScheduledFormSubmission::fire): Include the security
1312         origin when constructing form submission.
1313         (WebCore::NavigationScheduler::scheduleRedirect): Include the security
1314         origin when creating the scheduled navigation object.
1315         (WebCore::NavigationScheduler::scheduleLocationChange): Ditto.
1316         (WebCore::NavigationScheduler::scheduleRefresh): Ditto.
1317
1318         * loader/NavigationScheduler.h: Added the security origin argument
1319         to scheduleLocationChange.
1320
1321         * loader/SubframeLoader.cpp:
1322         (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass in the security
1323         origin when calling scheduleLocationChange.
1324         * loader/appcache/ApplicationCacheGroup.cpp:
1325         (WebCore::ApplicationCacheGroup::selectCache): Ditto.
1326
1327         * page/ContextMenuController.cpp:
1328         (WebCore::openNewWindow): Pass in the security origin.
1329         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
1330
1331         * page/FrameLoadRequest.h: Added a security origin called the requester
1332         to all FrameLoadRequest objects.
1333
1334         * page/XSSAuditor.cpp:
1335         (WebCore::XSSAuditor::findInRequest): Added the security origin.
1336
1337 2010-12-07  Yury Semikhatsky  <yurys@chromium.org>
1338
1339         Reviewed by Pavel Feldman.
1340
1341         Web Inspector: avoid initializing Context on when creating attaching listener to ScriptDebugServer
1342         https://bugs.webkit.org/show_bug.cgi?id=50627
1343
1344         * bindings/v8/ScriptDebugServer.cpp:
1345         (WebCore::ScriptDebugServer::addListener): don't try to collect already parsed scripts if context has
1346         not been initialized yet.
1347
1348 2010-12-07  Csaba Osztrogon√°c  <ossy@webkit.org>
1349
1350         Unreviewed. Rolling out r73421, because it made transitions/color-transition-all.html flakey.
1351
1352         * page/animation/AnimationBase.cpp:
1353         (WebCore::addShorthandProperties):
1354
1355 2010-12-07  Martin Robinson  <mrobinson@igalia.com>
1356
1357         Unreviewed, rolling out r73392.
1358         http://trac.webkit.org/changeset/73392
1359         https://bugs.webkit.org/show_bug.cgi?id=50489
1360
1361         This commit caused crashes on the GTK+ bots
1362
1363         * bindings/ScriptControllerBase.cpp:
1364         (WebCore::ScriptController::executeIfJavaScriptURL):
1365         * dom/Document.cpp:
1366         (WebCore::Document::Document):
1367         (WebCore::Document::close):
1368         (WebCore::Document::lastModified):
1369         (WebCore::Document::finishedParsing):
1370         (WebCore::Document::initSecurityContext):
1371         (WebCore::Document::updateURLForPushOrReplaceState):
1372         * dom/Document.h:
1373         * dom/ProcessingInstruction.cpp:
1374         (WebCore::ProcessingInstruction::checkStyleSheet):
1375         * dom/ScriptElement.cpp:
1376         (WebCore::ScriptElement::scriptCharset):
1377         * html/HTMLLinkElement.cpp:
1378         (WebCore::HTMLLinkElement::process):
1379         * html/MediaDocument.cpp:
1380         (WebCore::MediaDocument::replaceMediaElementTimerFired):
1381         * html/PluginDocument.cpp:
1382         (WebCore::PluginDocumentParser::createDocumentStructure):
1383         * loader/DocumentLoader.cpp:
1384         (WebCore::DocumentLoader::DocumentLoader):
1385         (WebCore::DocumentLoader::finishedLoading):
1386         (WebCore::DocumentLoader::commitData):
1387         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1388         (WebCore::DocumentLoader::setFrame):
1389         * loader/DocumentLoader.h:
1390         * loader/DocumentWriter.cpp:
1391         (WebCore::DocumentWriter::begin):
1392         * loader/DocumentWriter.h:
1393         * loader/FrameLoader.cpp:
1394         (WebCore::FrameLoader::FrameLoader):
1395         (WebCore::FrameLoader::init):
1396         (WebCore::FrameLoader::clear):
1397         (WebCore::FrameLoader::receivedFirstData):
1398         (WebCore::FrameLoader::transitionToCommitted):
1399         (WebCore::FrameLoader::open):
1400         (WebCore::FrameLoader::finishedLoadingDocument):
1401         (WebCore::FrameLoader::addExtraFieldsToRequest):
1402         * loader/FrameLoader.h:
1403         (WebCore::FrameLoader::writer):
1404         * loader/cache/CachedResourceLoader.cpp:
1405         (WebCore::CachedResourceLoader::requestPreload):
1406         * platform/network/FormDataBuilder.cpp:
1407         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
1408         * svg/graphics/SVGImage.cpp:
1409         (WebCore::SVGImage::dataChanged):
1410
1411 2010-12-07  Patrick Gansterer  <paroga@webkit.org>
1412
1413         Reviewed by Andreas Kling.
1414
1415         [CMake] Remove WebKitGenerators
1416         https://bugs.webkit.org/show_bug.cgi?id=50445
1417
1418         Move remaining logic into main CMakeLists.txt.
1419
1420         * CMakeLists.txt:
1421
1422 2010-12-07  Justin Schuh  <jschuh@chromium.org>
1423
1424         Reviewed by Nikolas Zimmermann.
1425
1426         Clear old SVG cursor entry before adding a new one
1427         https://bugs.webkit.org/show_bug.cgi?id=50549
1428
1429         Test: svg/css/cursor-replace.svg
1430
1431         * css/CSSCursorImageValue.cpp:
1432         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1433         * svg/SVGCursorElement.cpp:
1434         (WebCore::SVGCursorElement::~SVGCursorElement):
1435         (WebCore::SVGCursorElement::removeClient):
1436         (WebCore::SVGCursorElement::removeReferencedElement):
1437         * svg/SVGCursorElement.h:
1438         * svg/SVGElement.cpp:
1439         (WebCore::SVGElement::setCursorElement):
1440         (WebCore::SVGElement::cursorElementRemoved):
1441         (WebCore::SVGElement::setCursorImageValue):
1442         (WebCore::SVGElement::cursorImageElementRemoved):
1443         * svg/SVGElement.h:
1444
1445 2010-12-07  Kenichi Ishibashi  <bashi@google.com>
1446
1447         Reviewed by Kent Tamura.
1448
1449         Let HTMLObjectElement be a form associated element
1450         https://bugs.webkit.org/show_bug.cgi?id=48821
1451
1452         Introduces FormAssociatedElement class which would be a super class
1453         of form assocated elements. Some of member functions and variables of
1454         HTMLFormControlElement are migrated into this class.
1455         Following the HTML5 spec, HTMLFormControlElement class and
1456         HTMLObjectElement class are subclasses of it for now.
1457
1458         Test: fast/forms/form-collection-elements-order.html
1459
1460         * Android.mk: Added FormAssociatedElement.cpp
1461         * CMakeLists.txt: Ditto.
1462         * GNUmakefile.am: Added FormAssociatedElement.{cpp,h}
1463         * WebCore.exp.in: Added the symbol for toHTMLElement(FormAssociatedElement*)
1464         * WebCore.gypi: Added FormAssociatedElement.{cpp,h}
1465         * WebCore.pro: Ditto.
1466         * WebCore.vcproj/WebCore.vcproj: Ditto.
1467         * WebCore.xcodeproj/project.pbxproj: Ditto.
1468         * dom/CheckedRadioButtons.h: Fixed class forward declaration order.
1469         * dom/Document.cpp:
1470         (WebCore::Document::registerFormElementWithFormAttribute): Modified to
1471         use FormAssociatedElement instead of HTMLFormControlElement
1472         (WebCore::Document::unregisterFormElementWithFormAttribute): Ditto.
1473         (WebCore::Document::resetFormElementsOwner):
1474         * dom/Document.h: Ditto.
1475         * html/DOMFormData.cpp: Ditto.
1476         (WebCore::DOMFormData::DOMFormData):
1477         * html/FormAssociatedElement.cpp: Copied and renamed from WebCore/html/HTMLFormControlElement.cpp.
1478         (WebCore::FormAssociatedElement::FormAssociatedElement):
1479         (WebCore::FormAssociatedElement::~FormAssociatedElement):
1480         (WebCore::FormAssociatedElement::validity):
1481         (WebCore::FormAssociatedElement::insertedIntoTree):
1482         (WebCore::FormAssociatedElement::removedFromTree):
1483         (WebCore::FormAssociatedElement::removeFromForm):
1484         (WebCore::FormAssociatedElement::resetFormOwner):
1485         (WebCore::FormAssociatedElement::formAttributeChanged):
1486         (WebCore::toHTMLElement):
1487         * html/FormAssociatedElement.h: Ditto.
1488         (WebCore::FormAssociatedElement::ref):
1489         (WebCore::FormAssociatedElement::deref):
1490         (WebCore::FormAssociatedElement::formDestroyed):
1491         (WebCore::FormAssociatedElement::setForm):
1492         * html/HTMLElement.h: Changed the access level of findFormAncestor().
1493         * html/HTMLFormCollection.cpp:
1494         (WebCore::HTMLFormCollection::item): Modified to use FormAssociatedElement
1495         instead of HTMLFormControlElement.
1496         (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
1497         (WebCore::HTMLFormCollection::updateNameCache): Ditto.
1498         * html/HTMLFormControlElement.cpp: Modified regarding with the change of class
1499         hierarchy.
1500         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1501         (WebCore::HTMLFormControlElement::~HTMLFormControlElement):
1502         (WebCore::HTMLFormControlElement::insertedIntoTree):
1503         (WebCore::HTMLFormControlElement::removedFromTree):
1504         (WebCore::HTMLFormControlElement::supportsFocus):
1505         (WebCore::HTMLFormControlElement::checkValidity):
1506         (WebCore::HTMLFormControlElement::virtualForm):
1507         (WebCore::HTMLFormControlElement::isDefaultButtonForForm):
1508         (WebCore::HTMLFormControlElement::attributeChanged):
1509         * html/HTMLFormControlElement.h: Ditto.
1510         (WebCore::HTMLFormControlElement::form):
1511         (WebCore::HTMLFormControlElement::disabled):
1512         (WebCore::HTMLFormControlElement::type):
1513         (WebCore::HTMLFormControlElement::refFormAssociatedElement):
1514         (WebCore::HTMLFormControlElement::derefFormAssociatedElement):
1515         * html/HTMLFormElement.cpp: Modified to use FormAssociatedElement
1516         instead of HTMLFormControlElement.
1517         (WebCore::HTMLFormElement::submitImplicitly):
1518         (WebCore::HTMLFormElement::validateInteractively):
1519         (WebCore::HTMLFormElement::submit):
1520         (WebCore::HTMLFormElement::reset):
1521         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute):
1522         (WebCore::HTMLFormElement::formElementIndex):
1523         (WebCore::HTMLFormElement::registerFormElement):
1524         (WebCore::HTMLFormElement::removeFormElement):
1525         (WebCore::HTMLFormElement::defaultButton):
1526         (WebCore::HTMLFormElement::checkValidity):
1527         (WebCore::HTMLFormElement::collectUnhandledInvalidControls):
1528         (WebCore::HTMLFormElement::documentDidBecomeActive):
1529         * html/HTMLFormElement.h: Ditto.
1530         (WebCore::HTMLFormElement::associatedElements):
1531         * html/HTMLInputElement.cpp: Ditto.
1532         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
1533         * html/HTMLObjectElement.cpp: Modified regarding with the change of class
1534         hierarchy.
1535         (WebCore::HTMLObjectElement::HTMLObjectElement):
1536         (WebCore::HTMLObjectElement::~HTMLObjectElement):
1537         (WebCore::HTMLObjectElement::create):
1538         (WebCore::HTMLObjectElement::attributeChanged):
1539         (WebCore::HTMLObjectElement::insertedIntoTree):
1540         (WebCore::HTMLObjectElement::removedFromTree):
1541         (WebCore::HTMLObjectElement::appendFormData):
1542         (WebCore::HTMLObjectElement::formControlName):
1543         * html/HTMLObjectElement.h: Ditto.
1544         (WebCore::HTMLObjectElement::form):
1545         (WebCore::HTMLObjectElement::isFormControlElement):
1546         (WebCore::HTMLObjectElement::isEnumeratable):
1547         (WebCore::HTMLObjectElement::refFormAssociatedElement):
1548         (WebCore::HTMLObjectElement::derefFormAssociatedElement):
1549         * html/HTMLTagNames.in: Added constructorNeedsFormElement to object tag.
1550         * html/ValidationMessage.cpp: Modified to use FormAssociatedElement
1551         instead of HTMLFormControlElement.
1552         (WebCore::ValidationMessage::ValidationMessage):
1553         (WebCore::ValidationMessage::create):
1554         * html/ValidationMessage.h: Ditto.
1555         * html/ValidityState.cpp: Ditto.
1556         (WebCore::ValidityState::validationMessage):
1557         (WebCore::ValidityState::setCustomErrorMessage):
1558         (WebCore::ValidityState::valueMissing):
1559         (WebCore::ValidityState::typeMismatch):
1560         (WebCore::ValidityState::patternMismatch):
1561         (WebCore::ValidityState::tooLong):
1562         (WebCore::ValidityState::rangeUnderflow):
1563         (WebCore::ValidityState::rangeOverflow):
1564         (WebCore::ValidityState::stepMismatch):
1565         * html/ValidityState.h: Ditto.
1566         (WebCore::ValidityState::create):
1567         (WebCore::ValidityState::ValidityState):
1568         * loader/FormSubmission.cpp: Ditto.
1569         (WebCore::FormSubmission::create):
1570
1571 2010-12-06  Pavel Feldman  <pfeldman@chromium.org>
1572
1573         Not reviewed. Rolling out r72988 for breaking iframes.
1574
1575         * css/CSSImportRule.cpp:
1576         (WebCore::CSSImportRule::insertedIntoParent):
1577
1578 2010-12-06  Hironori Bono  <hbono@chromium.org>
1579
1580         Reviewed by David Levin.
1581
1582         [Chromium] Refactor FontCacheChromiumWin.cpp
1583         https://bugs.webkit.org/show_bug.cgi?id=50611
1584         
1585         This change just moved the helper functions for the WebCore::FontCache class to the beginning of ths file.
1586
1587         No new tests are added since this is a refactoring.
1588
1589         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1590         (WebCore::fontDataFromDescriptionAndLogFont): Moved to the beginning of the file.
1591         (WebCore::toGDIFontWeight): Moved to the beginning of the file.
1592         (WebCore::FillLogFont): Moved to the beginning of the file.
1593         (WebCore::TraitsInFamilyProcData::TraitsInFamilyProcData): Moved to the beginning of the file.
1594         (WebCore::traitsInFamilyEnumProc): Moved to the beginning of the file.
1595         (WebCore::FontCache::platformInit): Moved after the static functions.
1596
1597 2010-12-06  Alexey Marinichev  <amarinichev@chromium.org>
1598
1599         Reviewed by Kenneth Russell.
1600
1601         Throw webglcontextlost and webglcontextrestored events when a WebGL context is lost and restored.
1602         https://bugs.webkit.org/show_bug.cgi?id=50364
1603
1604         No new tests since there is currently no way to force a context lost event.
1605
1606         * html/canvas/WebGLRenderingContext.cpp:
1607         (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired):
1608         (WebCore::WebGLRenderingContext::create):
1609         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
1610         (WebCore::WebGLRenderingContext::isContextLost):
1611         (WebCore::WebGLRenderingContext::loseContext):
1612         (WebCore::WebGLRenderingContext::restoreContext):
1613         * html/canvas/WebGLRenderingContext.h:
1614         (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::WebGLRenderingContextRestoreTimer):
1615
1616 2010-12-06  David Hyatt  <hyatt@apple.com>
1617
1618         Reviewed by Simon Fraser.
1619
1620         https://bugs.webkit.org/show_bug.cgi?id=50593
1621         
1622         Fix background canvas painting for documents with left/top overflow.  The math from the original RTL patch was incorrect.
1623         
1624         Just use the RenderView's document dimensions always.
1625
1626         * rendering/RenderBox.cpp:
1627         (WebCore::RenderBox::paintRootBoxDecorations):
1628
1629 2010-12-06  Simon Fraser  <simon.fraser@apple.com>
1630
1631         Reviewed by Beth Dakin.
1632
1633         CSS animation doesn't work for border-radius
1634         https://bugs.webkit.org/show_bug.cgi?id=48340
1635         
1636         Include CSSPropertyBorderRadius in the list of shorthand
1637         properties, so that the individual border-radius properties
1638         get animated.
1639
1640         Test: transitions/border-radius-transition.html
1641
1642         * page/animation/AnimationBase.cpp:
1643         (WebCore::addShorthandProperties):
1644
1645 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1646
1647         Reviewed by Tony Chang.
1648
1649         ApplyStyleCommand should take EditingStyle instead of CSSStyleDeclaration
1650         https://bugs.webkit.org/show_bug.cgi?id=49938
1651
1652         Modified ApplyStyleCommand::ApplyStyleCommand and ApplyStyleCommand::create to take EditingStyle*
1653         instead of CSSStyleDeclaration*. Also replaced much of code in Editor::computeAndSetTypingStyle
1654         by calls to EditingStyle's member functions and extracted EditingStyle::overrideWith and
1655         EditingStyle::extractAndRemoveBlockProperties.
1656
1657         No new tests are added since this is a refactoring.
1658
1659         * WebCore.exp.in: Added SelectionController::copyTypingStyle and EditingStyle::~EditingStyle.
1660         * css/CSSMutableStyleDeclaration.cpp: Made CSSMutableStyleDeclaration* in the argument list const.
1661         (WebCore::CSSMutableStyleDeclaration::merge):
1662         * css/CSSMutableStyleDeclaration.h:
1663         * editing/ApplyStyleCommand.cpp:
1664         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Takes EditingStyle* instead of CSSStyleDeclaration*.
1665         (WebCore::ApplyStyleCommand::doApply): Uses EditingStyle.
1666         * editing/ApplyStyleCommand.h: m_style is now a ref-pointer to EditingStyle instead of CSSMutableStyleDeclaration.
1667         (WebCore::ApplyStyleCommand::create): Takes EditingStyle* instead of CSSStyleDeclaration*.
1668         * editing/CompositeEditCommand.cpp:
1669         (WebCore::CompositeEditCommand::applyStyle): Ditto.
1670         (WebCore::CompositeEditCommand::moveParagraphs): Calls applyStyle.
1671         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
1672         * editing/CompositeEditCommand.h:
1673         * editing/DeleteSelectionCommand.cpp:
1674         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
1675         * editing/EditCommand.cpp:
1676         * editing/EditCommand.h:
1677         * editing/EditingStyle.cpp:
1678         (WebCore::EditingStyle::~EditingStyle): Added.
1679         (WebCore::EditingStyle::overrideWithStyle): Extracted from Editor::calculateTypingStyleAfterDelete.
1680         (WebCore::EditingStyle::copy): Added.
1681         (WebCore::EditingStyle::extractAndRemoveBlockProperties): Extracted from Editor::calculateTypingStyleAfterDelete.
1682         * editing/EditingStyle.h:
1683         * editing/Editor.cpp:
1684         (WebCore::Editor::applyStyle): Calls ApplyStyleCommand::create.
1685         (WebCore::Editor::applyParagraphStyle): Ditto.
1686         (WebCore::Editor::computeAndSetTypingStyle): Ditto.
1687         * editing/InsertLineBreakCommand.cpp:
1688         (WebCore::InsertLineBreakCommand::doApply): Calls applyStyle.
1689         * editing/InsertParagraphSeparatorCommand.cpp:
1690         (WebCore::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
1691         * editing/InsertTextCommand.cpp:
1692         (WebCore::InsertTextCommand::input): Ditto.
1693         * editing/RemoveFormatCommand.cpp:
1694         (WebCore::RemoveFormatCommand::doApply): Calls ApplyStyleCommand::create.
1695         * editing/ReplaceSelectionCommand.cpp:
1696         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): Calls applyStyle.
1697         * editing/SelectionController.cpp:
1698         (WebCore::SelectionController::copyTypingStyle): Moved from SelectionController.h
1699         * editing/SelectionController.h:
1700
1701 2010-12-05  Ryosuke Niwa  <rniwa@webkit.org>
1702
1703         Reviewed by Tony Chang.
1704
1705         Executing FormatBlock on multiple paragraphs inside pre does not remove the outer pre
1706         https://bugs.webkit.org/show_bug.cgi?id=47300
1707
1708         The bug was caused by FormatBlockCommand::formatRange's not removing refNode when the refNode
1709         contains more than one paragraphs even when the refNode is fully selected.
1710
1711         Fixed the bug by modifying FormatBlockCommand::formatRange to correctly remove the node in
1712         such a situation.
1713
1714         Also fixed a bug in ApplyBlockElementCommand::formatSelection that the end of selection
1715         is not properly updated when the end of selection resides in the node split by
1716         rangeForParagraphSplittingTextNodesIfNeeded or endOfNextParagrahSplittingTextNodesIfNeeded.
1717
1718         Test: editing/execCommand/format-block-multiple-paragraphs-in-pre.html
1719
1720         * editing/ApplyBlockElementCommand.cpp:
1721         (WebCore::ApplyBlockElementCommand::formatSelection): Calls formatRange with m_endOfLastParagraph.
1722         (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): Updates
1723         m_endOfLastParagraph when the position points to the node split by this function.
1724         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Ditto.
1725         * editing/ApplyBlockElementCommand.h: Added m_endOfLastParagraph as a member variable.
1726         * editing/FormatBlockCommand.cpp:
1727         (WebCore::FormatBlockCommand::formatRange): See above.
1728         * editing/FormatBlockCommand.h:
1729         * editing/IndentOutdentCommand.cpp:
1730         (WebCore::IndentOutdentCommand::formatRange): Ignores the end of selection.
1731         * editing/IndentOutdentCommand.h:
1732
1733 2010-12-03  Zhenyao Mo  <zmo@google.com>
1734
1735         Reviewed by Kenneth Russell.
1736
1737         Postpone gl delete* calls until shaders/programs are no longer attached
1738         https://bugs.webkit.org/show_bug.cgi?id=50501
1739
1740         * html/canvas/WebGLBuffer.cpp:
1741         (WebCore::WebGLBuffer::deleteObjectImpl): Simply delete GL resource.
1742         * html/canvas/WebGLFramebuffer.cpp:
1743         (WebCore::WebGLFramebuffer::deleteObjectImpl): Ditto.
1744         * html/canvas/WebGLObject.cpp:
1745         (WebCore::WebGLObject::deleteObject): Tracking whether deleteObjectImpl should be called or not.
1746         * html/canvas/WebGLObject.h:
1747         (WebCore::WebGLObject::detachContext): Set attachmentCount to 0 to ensure OpenGL resource deletion.
1748         (WebCore::WebGLObject::onDetached): No need to track attachmentCount here as we track it in deleteObject.
1749         (WebCore::WebGLObject::isDeleted): Make this public.
1750         * html/canvas/WebGLProgram.cpp:
1751         (WebCore::WebGLProgram::deleteObjectImpl): Simply delete GL resource.
1752         * html/canvas/WebGLRenderbuffer.cpp:
1753         (WebCore::WebGLRenderbuffer::deleteObjectImpl): Ditto.
1754         * html/canvas/WebGLRenderingContext.cpp:
1755         (WebCore::WebGLRenderingContext::getProgramParameter): intercept DELETE_STATUS.
1756         (WebCore::WebGLRenderingContext::getShaderParameter): Ditto.
1757         * html/canvas/WebGLShader.cpp:
1758         (WebCore::WebGLShader::deleteObjectImpl): Simply delete GL resource.
1759         * html/canvas/WebGLTexture.cpp:
1760         (WebCore::WebGLTexture::deleteObjectImpl): Simply delete GL resource.
1761
1762 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1763
1764         Yet unreviewed another Leopard build fix for r73380.
1765
1766         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1767         (PlatformCAAnimation::setKeyTimes):
1768         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1769         (PlatformCALayer::platformCALayer):
1770
1771 2010-12-06  Andy Estes  <aestes@apple.com>
1772
1773         Reviewed by Darin Adler.
1774
1775         Marquee elements do not stop animating when scrollAmount is set to 0.
1776         https://bugs.webkit.org/show_bug.cgi?id=50434
1777
1778         Test: fast/html/marquee-scrollamount.html
1779
1780         * rendering/RenderMarquee.cpp:
1781         (WebCore::RenderMarquee::timerFired): Allow increment to be 0.
1782
1783 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1784
1785         Unreviewed Leopard buildfix for r73380.
1786
1787         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1788         (PlatformCAAnimation::setTimingFunctions):
1789         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1790         (PlatformCALayer::PlatformCALayer):
1791
1792 2010-12-06  Philippe Normand  <pnormand@igalia.com>
1793
1794         Reviewed by Martin Robinson.
1795
1796         [GStreamer] use ResourceHandle::setDefersLoading in WebKitWebSourceGStreamer
1797         https://bugs.webkit.org/show_bug.cgi?id=44157
1798
1799         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1800         (webKitWebSrcNeedDataMainCb):
1801         (webKitWebSrcEnoughDataMainCb): Replaced platform-specific code
1802         with cross-platform ResourceHandle::setDefersLoading calls.
1803
1804 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1805
1806         Unreviewed Leopard build fix for r73388.
1807
1808         * accessibility/AccessibilitySlider.cpp:
1809         (WebCore::AccessibilitySlider::maxValueForRange):
1810         (WebCore::AccessibilitySlider::minValueForRange):
1811
1812 2010-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1813
1814         Unreviewed build fix for Leopard after r73379.
1815
1816         * platform/graphics/cg/GraphicsContextCG.cpp:
1817         (WebCore::GraphicsContext::setAllowsFontSmoothing):
1818
1819 2010-12-06  Nate Chapin  <japhet@chromium.org>
1820
1821         Reviewed by Adam Barth.
1822
1823         Make DocumentWriter a member of DocumentLoader
1824         instead of FrameLoader.
1825         https://bugs.webkit.org/show_bug.cgi?id=50489
1826
1827         Refactor, no new tests.
1828
1829         * bindings/ScriptControllerBase.cpp:
1830         (WebCore::ScriptController::executeIfJavaScriptURL):
1831         * dom/Document.cpp:
1832         (WebCore::Document::Document):
1833         (WebCore::Document::close):
1834         (WebCore::Document::lastModified):
1835         (WebCore::Document::finishedParsing):
1836         (WebCore::Document::initSecurityContext):
1837         (WebCore::Document::updateURLForPushOrReplaceState):
1838         * dom/Document.h:
1839         (WebCore::Document::setDocumentLoader):
1840         (WebCore::Document::loader):
1841         * dom/ProcessingInstruction.cpp:
1842         (WebCore::ProcessingInstruction::checkStyleSheet):
1843         * dom/ScriptElement.cpp:
1844         (WebCore::ScriptElement::scriptCharset):
1845         * html/HTMLLinkElement.cpp:
1846         (WebCore::HTMLLinkElement::process):
1847         * html/MediaDocument.cpp:
1848         (WebCore::MediaDocument::replaceMediaElementTimerFired):
1849         * html/PluginDocument.cpp:
1850         (WebCore::PluginDocumentParser::createDocumentStructure):
1851         * loader/DocumentLoader.cpp:
1852         (WebCore::DocumentLoader::DocumentLoader):
1853         (WebCore::DocumentLoader::finishedLoading):
1854         (WebCore::DocumentLoader::commitData):
1855         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1856         (WebCore::DocumentLoader::setFrame):
1857         * loader/DocumentLoader.h:
1858         (WebCore::DocumentLoader::writer):
1859         * loader/DocumentWriter.h:
1860         (WebCore::DocumentWriter::setFrame):
1861         * loader/FrameLoader.cpp:
1862         (WebCore::FrameLoader::FrameLoader):
1863         (WebCore::FrameLoader::init):
1864         (WebCore::FrameLoader::clear):
1865         (WebCore::FrameLoader::receivedFirstData):
1866         (WebCore::FrameLoader::transitionToCommitted):
1867         (WebCore::FrameLoader::open):
1868         (WebCore::FrameLoader::finishedLoadingDocument):
1869         (WebCore::FrameLoader::addExtraFieldsToRequest):
1870         * loader/FrameLoader.h:
1871         (WebCore::FrameLoader::notifier):
1872         * loader/cache/CachedResourceLoader.cpp:
1873         (WebCore::CachedResourceLoader::requestPreload):
1874         * platform/network/FormDataBuilder.cpp:
1875         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
1876         * svg/graphics/SVGImage.cpp:
1877         (WebCore::SVGImage::dataChanged):
1878
1879 2010-12-06  Mark Rowe  <mrowe@apple.com>
1880
1881         Build fix.
1882
1883         * WebCore.xcodeproj/project.pbxproj: Don't force WebCore to build against the 10.5 SDK.
1884         That's just plain wrong.
1885
1886 2010-12-06  Chris Fleizach  <cfleizach@apple.com>
1887
1888         Reviewed by Darin Adler.
1889
1890         HTML5 Slider does not work correctly with VoiceOver
1891         https://bugs.webkit.org/show_bug.cgi?id=50505
1892
1893         Address a few problems with the Mac implementation for the accessibility slider.
1894             1) The value indicator is not hit testable.
1895             2) The value indicator does not return an AXValue.
1896             3) In the slider, the min/max values are not correct when min/max attributes are not present.
1897             4) When you change the value with the keyboard, it doesn't send out the right notification.
1898             5) Sliders were returning AXValue and AXTopLevelUIElement attributes twice in their list of attributes.
1899  
1900         Test: platform/mac/accessibility/html-slider-indicator.html
1901
1902         * accessibility/AccessibilityObject.cpp:
1903         (WebCore::AccessibilityObject::getAttribute):
1904             Use fastGetAttribute on Element, instead of getAttribute.
1905         * accessibility/AccessibilityObject.h:
1906         (WebCore::AccessibilityObject::isInputSlider):
1907         * accessibility/AccessibilityRenderObject.cpp:
1908         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
1909         * accessibility/AccessibilitySlider.cpp:
1910         (WebCore::AccessibilitySlider::doAccessibilityHitTest):
1911         (WebCore::AccessibilitySlider::maxValueForRange):
1912         (WebCore::AccessibilitySlider::minValueForRange):
1913         * accessibility/AccessibilitySlider.h:
1914         (WebCore::AccessibilitySlider::isInputSlider):
1915         * accessibility/mac/AccessibilityObjectWrapper.mm:
1916         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1917         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1918         * html/HTMLInputElement.cpp:
1919         (WebCore::HTMLInputElement::applyStep):
1920
1921 2010-12-06  David Hyatt  <hyatt@apple.com>
1922
1923         Reviewed by Simon Fraser.
1924
1925         Fix for https://bugs.webkit.org/show_bug.cgi?id=49220 <<rdar://problem/8644849>, REGRESSION: transforms now
1926         O(n^3) from pathological behavior in lowestPosition, rightmostPosition, leftmostPosition and topmostPosition.
1927
1928         This patch throws out the lowest/rightmost/leftmost/topmostPosition functions and re-architects layout overflow
1929         in the engine to cache all the information required to properly handle scrolling.
1930
1931         In the old code, there were two types of overflow: layout overflow and visual overflow.  The former could
1932         affect scrolling and the latter could not.  The distinction was largely meaningless, since layout overflow
1933         wasn't actually used to determine scroll width or scroll height.  It didn't propagate across self-painting layer
1934         boundaries either.  In the old code, the term visible overflow meant the union of the layout overflow and
1935         visual overflow rects.
1936
1937         In the new code, the two types of overflow remain, but the distinction between the two is now clear.  Visual overflow
1938         is used purely for painting and hit testing checks and layout overflow is used specifically for scrolling.  It has
1939         been expanded to propagate across self-painting layers, to factor in relative positioning and transforms, and to
1940         work with writing modes.
1941
1942         In order to minimize layout test changes, layers no longer incorporate right/bottom overflow into their width/height members.
1943         Doing so uncovered two bugs where left/top overflow was ignored (proof that even having layer dimensions is harmful).
1944         A render tree dump hack has been put into the code to keep this overflow dumping for the RenderView's layer, since otherwise
1945         a huge number of tests would change.
1946
1947         Added fast/overflow/overflow-rtl-vertical.html to test vertical writing-mode overflow.  Existing tests cover the rest.
1948
1949         * page/FrameView.cpp:
1950         (WebCore::FrameView::adjustViewSize):
1951         (WebCore::FrameView::forceLayoutForPagination):
1952         Changed to use RenderView's docTop/Left/Width/Height accessors, which simply grab the overflow and properly flip it
1953         to account for writing modes.
1954
1955         * platform/graphics/IntRect.h:
1956         (WebCore::IntRect::shiftLeftEdgeTo):
1957         (WebCore::IntRect::shiftRightEdgeTo):
1958         (WebCore::IntRect::shiftTopEdgeTo):
1959         (WebCore::IntRect::shiftBottomEdgeTo):
1960         New helper functions for sliding the edge of a rectangle without moving any of the other three edges.
1961
1962         * rendering/InlineBox.h:
1963         (WebCore::InlineBox::frameRect):
1964         frameRect is a helper for obtaining the x, y, width, height of an InlineBox as an IntRect.
1965
1966         * rendering/InlineFlowBox.cpp:
1967         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
1968         All of the overflow setting in the inline direction has been removed from this function.  All line overflow is computed
1969         at once now in a single function: computeOverflow.
1970
1971         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
1972         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1973         (WebCore::InlineFlowBox::addReplacedChildOverflow):
1974         Helper for propagating overflow from specific types of children that occur on a line into the InlineFlowBox's overflow.
1975
1976         (WebCore::InlineFlowBox::computeOverflow):
1977         The new function that computes both horizontal and vertical overflow for a line box.
1978
1979         (WebCore::InlineFlowBox::setLayoutOverflow):
1980         (WebCore::InlineFlowBox::setVisualOverflow):
1981         (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
1982         New functions that set the overflow computed by computeOverflow.  These replace setBlockDirectionOverflowPositions
1983         and setInlineDirectionOverflowPositions.  They essentially do the same thing, but they operate on rectangles.
1984
1985         (WebCore::InlineFlowBox::nodeAtPoint):
1986         (WebCore::InlineFlowBox::paint):
1987         Changed to use visual overflow instead of visible overflow.  (Visible overflow as a union of layout and visual
1988         overflow is no longer necessary, since visual overflow is now equivalent to the old visible overflow concept.)
1989
1990         * rendering/InlineFlowBox.h:
1991         (WebCore::InlineFlowBox::logicalLayoutOverflowRect):
1992         (WebCore::InlineFlowBox::logicalVisualOverflowRect):
1993         Helpers for obtaining logical overflow rectangles, since lines compute their overflow in logical terms before
1994         converting to block coordinates at the end.
1995
1996         * rendering/RenderBlock.cpp:
1997         (WebCore::RenderBlock::layoutBlock):
1998         (WebCore::RenderBlock::addOverflowFromChildren):
1999         (WebCore::RenderBlock::computeOverflow):
2000         (WebCore::RenderBlock::addOverflowFromFloats):
2001         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
2002         Blocks now have a computeOverflow function called at the end of layout that adds in all the types of overflow.  The addOverflowFromChildren
2003         method is virtual so that RenderListItem and RenderTable can subclass it.  RenderListItem has to position its list marker and
2004         propagate marker overflow up, and RenderTable adds in overflow from its sections.
2005
2006         (WebCore::RenderBlock::layoutOnlyPositionedObjects):
2007         (WebCore::RenderBlock::layoutPositionedObjects):
2008         When only positioned objects lay out, overflow must still be recomputed.  The refactoring of overflow computation into a single
2009         callable method: computeOverflow, makes it possible for this to be done easily.
2010
2011         (WebCore::RenderBlock::paint):
2012         visible -> visual.
2013
2014         (WebCore::RenderBlock::addOverhangingFloats):
2015         The propagation of float overflow has changed substantially.  The basic rules are:
2016             (1) The float must be in our floating objects list to contribute to overflow.
2017             (2) The float must be a descendant to contribute to overflow.
2018             (3) The block must have the outermost list that contains the float, or it has a self-painting layer and
2019                 so the float needs to be included in its overflow.
2020
2021         (WebCore::RenderBlock::nodeAtPoint):
2022         visible -> visual.
2023
2024         (WebCore::RenderBlock::layoutColumns):
2025         Remove column overflow computation from layoutColumns and move it to computeOverflow.
2026
2027         (WebCore::RenderBlock::adjustLinePositionForPagination):
2028         visible -> visual.
2029
2030         * rendering/RenderBlock.h:
2031         (WebCore::RenderBlock::scrollbarsChanged):
2032         Added a new virtual method used by table cells when scrollbars in an overflow:auto/scroll table cell come and go.
2033
2034         * rendering/RenderBlockLineLayout.cpp:
2035         (WebCore::RenderBlock::layoutInlineChildren):
2036         (WebCore::RenderBlock::determineStartPosition):
2037         (WebCore::RenderBlock::matchedEndLine):
2038         (WebCore::RenderBlock::addOverflowFromInlineChildren):
2039         (WebCore::RenderBlock::beforeSideVisualOverflowForLine):
2040         (WebCore::RenderBlock::afterSideVisualOverflowForLine):
2041         visible -> visual.
2042
2043         * rendering/RenderBox.cpp:
2044         (WebCore::RenderBox::scrollWidth):
2045         (WebCore::RenderBox::scrollHeight):
2046         Patched to use layoutOverflow functions instead of the old rightmost/leftmostPosition functions.
2047
2048         (WebCore::RenderBox::paintRootBoxDecorations):
2049         Use docLeft and docTop here, so that writing modes are handled.
2050
2051         (WebCore::RenderBox::clippedOverflowRectForRepaint):
2052         visible -> visual.
2053
2054         (WebCore::RenderBox::addOverflowFromChild):
2055         (WebCore::RenderBox::addLayoutOverflow):
2056         (WebCore::RenderBox::addVisualOverflow):
2057         (WebCore::RenderBox::logicalVisualOverflowRectForPropagation):
2058         (WebCore::RenderBox::visualOverflowRectForPropagation):
2059         (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation):
2060         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2061         * rendering/RenderBox.h:
2062         The new overflow system for boxes.  Layout overflow now crosses self-painting layer boundaries and adjusts child boxes
2063         for transforms, relative positioning and writing mode differences.
2064
2065         (WebCore::RenderBox::layoutOverflowRect):
2066         (WebCore::RenderBox::topLayoutOverflow):
2067         (WebCore::RenderBox::bottomLayoutOverflow):
2068         (WebCore::RenderBox::leftLayoutOverflow):
2069         (WebCore::RenderBox::rightLayoutOverflow):
2070         Changed the default rectangle for layout overflow to be the client box to match the scrollable areas of overflow regions.
2071
2072         (WebCore::RenderBox::clientLogicalBottom):
2073         New helper for obtaining the logical bottom of the client box.
2074
2075         (WebCore::RenderBox::clientBoxRect):
2076         New helper for obtaining the clientLeft/Top/Width/Height box.
2077
2078         * rendering/RenderBoxModelObject.h:
2079         (WebCore::RenderBoxModelObject::relativePositionLogicalOffset):
2080         Helper for obtaining the relative position offset transposed for vertical writing modes.  Used by line overflow.
2081
2082         * rendering/RenderFlexibleBox.cpp:
2083         (WebCore::RenderFlexibleBox::layoutBlock):
2084         Changed flexible boxes to just call the base class computeOverflow method.
2085
2086         * rendering/RenderInline.cpp:
2087         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
2088         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2089         visible -> visual.
2090
2091         * rendering/RenderInline.h:
2092         * rendering/RenderLayer.cpp:
2093         (WebCore::RenderLayer::updateLayerPosition):
2094         Changed layers to no longer incorporate right/bottom overflow into width/height.  This is the reason many layout
2095         tests change.  (Not doing this makes the layout test changes far worse, since overflow propagates across self-painting
2096         layers now.)
2097
2098         (WebCore::RenderLayer::overflowTop):
2099         (WebCore::RenderLayer::overflowBottom):
2100         (WebCore::RenderLayer::overflowLeft):
2101         (WebCore::RenderLayer::overflowRight):
2102         overflowTop/Bottom/Left/Right return overflow that accounts for writing modes, i.e., purely physical overflow that can be used
2103         to set up the scroll area.
2104
2105         (WebCore::RenderLayer::computeScrollDimensions):
2106         Drastically simplified this method now that overflowTop/Bottom/Left/Right just do the right thing regarding unreachable overflow.
2107
2108         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2109         Make sure to explicitly set the vertical scrollbar's position just as we did with horizontal scrollbars, so that clamping to the
2110         bottom works.
2111
2112         (WebCore::performOverlapTests):
2113         (WebCore::RenderLayer::paintLayer):
2114         Fix a bug in performOverlapTests.  It incorrectly used the layer's bounds, and so it didn't account for left/top overflow out
2115         of the layer (see why I hate layers even having dimensions?).  Changed it to use the bounding box of the layer instead.
2116
2117         (WebCore::RenderLayer::hitTest):
2118         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
2119         for left/top overflow in a ScrollView (hate hate hate layers having dimensions).  I changed it to use the hit test rect instead,
2120         so that the damage rect never stops the point from being tested (unless the hit test request says not to ignore clipping).
2121
2122         (WebCore::RenderLayer::localBoundingBox):
2123         visible -> visual.
2124
2125         * rendering/RenderLayer.h:
2126         Added the new overflowTop/Left/Right/Bottom accessors.
2127
2128         * rendering/RenderLineBoxList.cpp:
2129         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
2130         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2131         (WebCore::RenderLineBoxList::paint):
2132         (WebCore::RenderLineBoxList::hitTest):
2133         visible -> visual.
2134
2135         * rendering/RenderListItem.cpp:
2136         (WebCore::RenderListItem::addOverflowFromChildren):
2137         (WebCore::RenderListItem::positionListMarker):
2138         * rendering/RenderListItem.h:
2139         RenderListItem now positions the list marker when computing its overflow, since the marker propagates overflow back up to the list item.
2140
2141         * rendering/RenderListMarker.cpp:
2142         (WebCore::RenderListMarker::paint):
2143         visible -> visual.
2144
2145         * rendering/RenderMarquee.cpp:
2146         (WebCore::RenderMarquee::computePosition):
2147         Changed to use overflow functions instead of rightmost/lowestPosition.
2148
2149         * rendering/RenderMedia.cpp:
2150         * rendering/RenderMedia.h:
2151         Removed the lowest/topmost/rightmost/leftmostPosition functions, since control overflow is handled properly already.
2152
2153         * rendering/RenderOverflow.h:
2154         (WebCore::RenderOverflow::RenderOverflow):
2155         (WebCore::RenderOverflow::setLayoutOverflow):
2156         (WebCore::RenderOverflow::setVisualOverflow):
2157         Add new setters for layout and visual overflow as rects.
2158
2159         * rendering/RenderReplaced.cpp:
2160         (WebCore::RenderReplaced::shouldPaint):
2161         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
2162         visible -> visual.
2163
2164         * rendering/RenderRubyRun.cpp:
2165         (WebCore::RenderRubyRun::layout):
2166         Call computeOverflow to recompute our overflow information after we adjust the ruby.
2167
2168         * rendering/RenderTable.cpp:
2169         (WebCore::RenderTable::layout):
2170         (WebCore::RenderTable::addOverflowFromChildren):
2171         (WebCore::RenderTable::paint):
2172         * rendering/RenderTable.h:
2173         Move section overflow propagation into addOverflowFromChildren, and change RenderTable to just call computeOverflow.
2174
2175         * rendering/RenderTableCell.cpp:
2176         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2177         visible -> visual.
2178
2179         (WebCore::RenderTableCell::scrollbarsChanged):
2180         Adding unreachable overflow support (something that in the old code only existed for positioned objects in the root view) exposed
2181         a bug in table layout.  If scrollbars are added during the layout that occurs after intrinsic padding was incorporated into the
2182         cell, then the cell won't lay out properly the second time (after the scrollbars have been added).  We have to adjust the intrinsic
2183         padding accounting for the presence of the new scrollbar so the second layout will get the right dimensions.
2184
2185         * rendering/RenderTableCell.h:
2186         (WebCore::RenderTableCell::hasVisualOverflow):
2187         visible -> visual.
2188
2189         * rendering/RenderTableSection.cpp:
2190         (WebCore::RenderTableSection::layoutRows):
2191         * rendering/RenderTableSection.h:
2192         visible -> visual.  Removed the leftmost/rightmost/topmost/bottommostPosition functions.
2193
2194         * rendering/RenderTreeAsText.cpp:
2195         (WebCore::writeLayers):
2196         Added a hack to render tree dumping to include right/bottom overflow for the root layer only.  This keeps a zillion layout tests
2197         from failing.
2198
2199         * rendering/RenderView.cpp:
2200         (WebCore::RenderView::layout):
2201         (WebCore::RenderView::docTop):
2202         (WebCore::RenderView::docBottom):
2203         (WebCore::RenderView::docLeft):
2204         (WebCore::RenderView::docRight):
2205         * rendering/RenderView.h:
2206         (WebCore::RenderView::docHeight):
2207         (WebCore::RenderView::docWidth):
2208         RenderView now uses docLeft/Top/Height/Width functions, which are just overflow queries that account for writing modes.  These methods
2209         are now the preferred way to query for the physical dimensions of a document.
2210
2211         * rendering/RootInlineBox.cpp:
2212         (WebCore::RootInlineBox::addHighlightOverflow):
2213         Changed to call setOverflowFromLogicalRects instead of the block/inline position functions.
2214
2215         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2216         Remove the computation of block direction overflow, since it now all happens at once after the line is built.
2217
2218         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
2219         * rendering/RootInlineBox.h:
2220         Added a new helper function for incorporating the end padding into a line.  This end padding also includes the single pixel for a caret
2221         in LTR if needed.
2222
2223 2010-12-06  Chris Marrin  <cmarrin@apple.com>
2224
2225         Reviewed by Simon Fraser.
2226
2227         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
2228         https://bugs.webkit.org/show_bug.cgi?id=49388
2229
2230         Replaced GraphicsLayerMac with GraphicsLayerCA. GraphicsLayerCA is essentially 
2231         identical to GraphicsLayerMac, but replaces all the CoreAnimation specific calls 
2232         with calls to PlatformCALayer and PlatformCAAnimation. This makes GraphicsLayerCA 
2233         platform neutral as long as implementations of those two classes are available. 
2234         Added implementations in PlatformCALayerMac and PlatformCAAnimationMac. Also got 
2235         rid of GraphicsLayer::nativeLayer() and replaced it with GraphicsLayer::platformLayer() 
2236         to avoid confusion since both names were used to refer to the same thing. 
2237
2238         This patch is only for Mac. Windows implementation has not changed.
2239
2240         * WebCore.xcodeproj/project.pbxproj:
2241         * platform/graphics/GraphicsLayer.h:
2242         * platform/graphics/ca/GraphicsLayerCA.cpp: Copied from WebCore/platform/graphics/ca/GraphicsLayerCA.cpp.
2243         * platform/graphics/ca/GraphicsLayerCA.h: Copied from WebCore/platform/graphics/ca/GraphicsLayerCA.h.
2244         * platform/graphics/ca/PlatformCAAnimation.h: Copied from WebCore/platform/graphics/ca/PlatformCAAnimation.h.
2245         * platform/graphics/ca/PlatformCALayer.h: Copied from WebCore/platform/graphics/ca/PlatformCALayer.h.
2246         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: Copied from WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
2247         (toCAMediaTimingFunction):
2248         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Copied from WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
2249         (PlatformCALayer::PlatformCALayer):
2250         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2251         * platform/graphics/chromium/GraphicsLayerChromium.h:
2252         * platform/graphics/mac/GraphicsLayerMac.h: Removed.
2253         * platform/graphics/mac/GraphicsLayerMac.mm: Removed.
2254         * platform/graphics/mac/WebLayer.h:
2255         * platform/graphics/mac/WebLayer.mm:
2256         (-[WebLayer setNeedsDisplay]):
2257         (-[WebLayer setNeedsDisplayInRect:]):
2258         (-[WebLayer display]):
2259         (-[WebLayer drawInContext:]):
2260         * platform/graphics/mac/WebTiledLayer.h:
2261         * platform/graphics/mac/WebTiledLayer.mm:
2262         (-[WebTiledLayer setNeedsDisplay]):
2263         (-[WebTiledLayer setNeedsDisplayInRect:]):
2264         (-[WebTiledLayer display]):
2265         (-[WebTiledLayer drawInContext:]):
2266         * platform/graphics/qt/GraphicsLayerQt.cpp:
2267         (WebCore::GraphicsLayerQtImpl::flushChanges):
2268         * platform/graphics/qt/GraphicsLayerQt.h:
2269         * platform/graphics/win/GraphicsLayerCACF.cpp:
2270         * platform/graphics/win/GraphicsLayerCACF.h:
2271
2272 2010-12-06  Simon Fraser  <simon.fraser@apple.com>
2273
2274         Reviewed by Dan Bernstein.
2275
2276         Font antialiasing (smoothing) changes when elements are rendered into compositing layers
2277         https://bugs.webkit.org/show_bug.cgi?id=23364
2278
2279         Text rendered by Core Graphics over a transparent background looks bad because of 
2280         font smoothing, so turn off smoothing when rendering text into compositing layers.
2281
2282         * platform/graphics/GraphicsContext.h:
2283         * platform/graphics/cg/GraphicsContextCG.cpp:
2284         (WebCore::GraphicsContext::setAllowsFontSmoothing):
2285         * platform/graphics/mac/WebLayer.mm:
2286         (drawLayerContents):
2287
2288 2010-12-06  Patrick Gansterer  <paroga@webkit.org>
2289
2290         Reviewed by Andreas Kling.
2291
2292         [WINCE] Add build system
2293         https://bugs.webkit.org/show_bug.cgi?id=50522
2294
2295         * CMakeListsWinCE.txt: Added.
2296
2297 2010-12-06  Chris Fleizach  <cfleizach@apple.com>
2298
2299         Reviewed by Oliver Hunt.
2300
2301         AX does not support HTML5 "required"
2302         https://bugs.webkit.org/show_bug.cgi?id=50507
2303
2304         Test: platform/mac/accessibility/html5-required-attribute.html
2305
2306         * accessibility/AccessibilityRenderObject.cpp:
2307         (WebCore::AccessibilityRenderObject::isRequired):
2308
2309 2010-12-06  Alejandro G. Castro  <alex@igalia.com>
2310
2311         Reviewed by Martin Robinson.
2312
2313         [GTK] using shadows leaks memory
2314         https://bugs.webkit.org/show_bug.cgi?id=50541
2315
2316         Fixed leaks in the shadow code.
2317         * platform/graphics/cairo/CairoUtilities.cpp:
2318         (WebCore::drawPatternToCairoContext): adoptRef instead of just
2319         getting a new reference.
2320         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2321         (WebCore::drawPathShadow): handle cairo_path_t with smart
2322         pointers.
2323
2324 2010-12-06  Yury Semikhatsky  <yurys@chromium.org>
2325
2326         Reviewed by Pavel Feldman.
2327
2328         [v8] Web Inspector: remove duplicate code for capturing stack trace
2329         https://bugs.webkit.org/show_bug.cgi?id=50461
2330
2331         No new tests. Covered with existing inspector tests.
2332
2333         * bindings/js/ScriptCallStackFactory.cpp:
2334         (WebCore::createScriptCallStack):
2335         * bindings/js/ScriptCallStackFactory.h:
2336         * bindings/v8/ScriptCallStackFactory.cpp:
2337         (WebCore::toScriptCallFrame):
2338         (WebCore::toScriptCallFramesVector):
2339         (WebCore::createScriptCallStack):
2340         * bindings/v8/ScriptCallStackFactory.h:
2341         * bindings/v8/V8ConsoleMessage.cpp:
2342         (WebCore::V8ConsoleMessage::handler):
2343         * inspector/ScriptCallFrame.cpp:
2344         (WebCore::ScriptCallFrame::ScriptCallFrame):
2345         (WebCore::ScriptCallFrame::isEqual):
2346         (WebCore::ScriptCallFrame::buildInspectorObject):
2347         * inspector/ScriptCallFrame.h:
2348         (WebCore::ScriptCallFrame::sourceURL):
2349         * inspector/ScriptCallStack.h:
2350         * inspector/TimelineRecordFactory.cpp:
2351         (WebCore::TimelineRecordFactory::createGenericRecord):
2352         * inspector/front-end/ConsoleView.js:
2353         (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement):
2354
2355 == Rolled over to ChangeLog-2010-12-06 ==