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