c115eadff91ad59cd68c5635171aa58397341cc7
[WebKit-https.git] / WebCore / ChangeLog
1 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
2
3         Unreviewed build fix.
4
5         * editing/EditingAllInOne.cpp:
6         Add new file to the all-in-one.
7
8 2010-12-12  Jon Honeycutt  <jhoneycutt@apple.com>
9
10         Unreviewed build fix.
11
12         * WebCore.vcproj/WebCore.vcproj:
13         Remove accidentally-committed conflict marker.
14
15 2010-10-28  MORITA Hajime  <morrita@google.com>
16
17         Reviewed by Ojan Vafai.
18
19         spellcheck does not check pasted text
20         https://bugs.webkit.org/show_bug.cgi?id=40092
21
22         - Introduced SpellChecker class to encapsulate asynchronous spell
23           checker state: sequence id, requesting text and target node.
24           This is also the first step to decompose spell-check related
25           code to a separate class.
26         - Added EditorClient::isAsynchronousSpellCheckingEnabled() 
27           to use async spellcheck API on the platform.
28           These APIs are touched by SpellChecker.
29         - Used SpellChecker to check a pasted test. Text to check is
30           collected from the subtree under the editingRoot.
31         - Added Setting::m_asynchronousSpellCheckingEnabled to control
32           async spell checking.
33
34         Test: editing/spelling/spellcheck-paste.html
35
36         * CMakeLists.txt:
37         * GNUmakefile.am:
38         * WebCore.exp.in:
39         * WebCore.gypi:
40         * WebCore.pro:
41         * WebCore.vcproj/WebCore.vcproj:
42         * WebCore.xcodeproj/project.pbxproj:
43         * dom/DocumentMarkerController.cpp:
44         (WebCore::DocumentMarkerController::showMarkers):
45         (showDocumentMarkers):
46         * dom/DocumentMarkerController.h:
47         * dom/PositionIterator.cpp:
48         (WebCore::PositionIterator::setOffsetInLeafNode):
49         * dom/PositionIterator.h:
50         * editing/Editor.cpp:
51         (WebCore::Editor::replaceSelectionWithFragment):
52         (WebCore::Editor::Editor):
53         (WebCore::findFirstMarkable):
54         (WebCore::Editor::selectionStartHasSpellingMarkerFor):
55         * editing/Editor.h:
56         (WebCore::Editor::spellChecker):
57         * editing/SpellChecker.cpp: Added.
58         (WebCore::SpellChecker::SpellChecker):
59         (WebCore::SpellChecker::~SpellChecker):
60         (WebCore::SpellChecker::initRequest):
61         (WebCore::SpellChecker::clearRequest):
62         (WebCore::SpellChecker::isAsynchronousEnabled):
63         (WebCore::SpellChecker::canCheckAsynchronously):
64         (WebCore::SpellChecker::isBusy):
65         (WebCore::SpellChecker::isValid):
66         (WebCore::SpellChecker::isCheckable):
67         (WebCore::SpellChecker::requestCheckingFor):
68         (WebCore::forwardIterator):
69         (WebCore::SpellChecker::didCheck):
70         * editing/SpellChecker.h: Added.
71         (WebCore::SpellCheckingResult::SpellCheckingResult):
72         (WebCore::SpellCheckingResult::type):
73         (WebCore::SpellCheckingResult::location):
74         (WebCore::SpellCheckingResult::length):
75         * loader/EmptyClients.h:
76         (WebCore::EmptyEditorClient::requestCheckingOfString):
77         * page/EditorClient.h:
78         * page/Settings.cpp:
79         (WebCore::Settings::Settings):
80         * page/Settings.h:
81         (WebCore::Settings::setAsynchronousSpellCheckingEnabled):
82         (WebCore::Settings::asynchronousSpellCheckingEnabled):
83
84 2010-12-09  Antonio Gomes  <agomes@rim.com>
85
86         Reviewed by Daniel Bates.
87
88         Spatial Navigation: code clean up (part II)
89         https://bugs.webkit.org/show_bug.cgi?id=50666
90
91         No new tests needed.
92
93         * page/FocusController.cpp: Removed static declaration of updateFocusCandidateIfNeeded() from
94         the top of FocusController.cpp, and added the 'static' keyword where the function is implemented;
95         * page/SpatialNavigation.cpp: In FocusCandidate constructor, renamed 'n' to 'node', and added an assert to it;
96         (WebCore::FocusCandidate::FocusCandidate):
97         (WebCore::virtualRectForAreaElementAndDirection): Added an assert to 'node';
98         * page/SpatialNavigation.h:I reordered the declaration of some methods in order to group related ones;
99         Removed isScrollableContainerNode() function declaration since it is not used outside SpatialNavigation.cpp;
100         And removed the declaration of isNodeDeepDescendantOfDocument() since it does not exist anymore.
101
102 2010-12-12  Philippe Normand  <pnormand@igalia.com>
103
104         Reviewed by Xan Lopez.
105
106         build-webkit --gtk --minimal fails
107         https://bugs.webkit.org/show_bug.cgi?id=46267
108
109         No new tests, build fix only.
110
111         * GNUmakefile.am: Include some JS bindings generated headers in
112         the build even if their corresponding feature is disabled. They
113         are needed to make the DOM bindings build.
114
115 2010-12-12  Sam Magnuson  <smagnuso@gmail.com>
116
117         Reviewed by Eric Seidel.
118
119         [Qt] Compile with QT_NO_QUUID_STRING.
120         https://bugs.webkit.org/show_bug.cgi?id=49745
121
122         * platform/UUID.cpp:
123         (WebCore::createCanonicalUUIDString):
124
125 2010-12-12  Ragner Magalhaes  <ragner.magalhaes@openbossa.org>
126
127         Reviewed by Eric Seidel.
128
129         [Qt] Missing style for date pickers on Qt Mobile theme
130         https://bugs.webkit.org/show_bug.cgi?id=50628
131
132         * css/themeQtMobile.css:
133
134 2010-12-11  Alice Liu  <alice.liu@apple.com>
135
136         Mac build fix.
137
138         * platform/network/mac/ResourceResponseMac.mm:
139         (WebCore::ResourceResponse::platformLazyInit):
140         Resolve string[0] ambiguity by passing 0U.
141
142 2010-12-11  Adam Barth  <abarth@webkit.org>
143
144         Reviewed by Sam Weinig.
145
146         [V8] Move to DOMWindow::setLocation
147         https://bugs.webkit.org/show_bug.cgi?id=50876
148
149         Recently, JavaScriptCore moved to implementing setLocation in WebCore.
150         This patch change V8 to use that common code path.  I haven't removed
151         the old code path because it's still used for other things (like
152         assigning window.location.href), but I'll move the rest over in a
153         future patch.
154
155         * bindings/v8/custom/V8DOMWindowCustom.cpp:
156         (WebCore::V8DOMWindow::locationAccessorSetter):
157         * bindings/v8/specialization/V8BindingState.cpp:
158         (WebCore::::getFirstWindow):
159         * bindings/v8/specialization/V8BindingState.h:
160
161 2010-10-11  Diego Gonzalez  <diegohcg@webkit.org>
162
163         Reviewed by Kenneth Rohde Christiansen.
164
165         [Qt] Mock DeviceOrientation client for DRT
166         https://bugs.webkit.org/show_bug.cgi?id=47490
167
168         * WebCore.pro:
169
170 2010-12-11  Joone Hur  <joone@kldp.org>
171
172         Reviewed by Alexey Proskuryakov.
173
174         enumeration value ‘ResponseTypeArrayBuffer’ not handled in switch
175         https://bugs.webkit.org/show_bug.cgi?id=50871
176
177         Fix the warning which occurs when enumeration value is not handled in switch.
178
179         No new tests, no change in behavior.
180
181         * bindings/js/JSXMLHttpRequestCustom.cpp:
182         (WebCore::JSXMLHttpRequest::response):
183
184 2010-12-11  Patrick Gansterer  <paroga@webkit.org>
185
186         Reviewed by Darin Adler.
187
188         Add an overload to makeString for Vector<char>
189         https://bugs.webkit.org/show_bug.cgi?id=50123
190
191         This also contains a segfault fix for ImageBuffer::toDataURL of the Haiku port.
192
193         * platform/graphics/cg/ImageBufferCG.cpp:
194         (WebCore::ImageBuffer::toDataURL):
195         * platform/graphics/gtk/ImageBufferGtk.cpp:
196         (WebCore::ImageBuffer::toDataURL):
197         * platform/graphics/haiku/ImageBufferHaiku.cpp:
198         (WebCore::ImageBuffer::toDataURL):
199         * platform/graphics/skia/ImageBufferSkia.cpp:
200         (WebCore::ImageBuffer::toDataURL):
201
202 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
203
204         Mac build fix.
205
206         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
207         Resolve string[0] ambiguity by passing 0U.
208
209 2010-12-10  Steve Falkenburg  <sfalken@apple.com>
210
211         Windows production build fix.
212         
213         Only the vsprops are indirected through WebKitVSPropsRedirectionDir, not the scripts in WebKitLibraries/win/tools/scripts.
214
215         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops:
216         * WebCore.vcproj/build-generated-files.sh:
217
218 2010-12-10  John Knottenbelt  <jknotten@chromium.org>
219
220         Reviewed by Eric Seidel.
221
222         Remove WebCore/platform/mac/GeolocationService.{h,mm}
223         https://bugs.webkit.org/show_bug.cgi?id=50074
224
225         Remove unused non-client-based geolocation code.
226
227         * platform/mac/GeolocationServiceMac.h: Removed.
228         * platform/mac/GeolocationServiceMac.mm: Removed.
229
230 2010-12-10  Alexey Proskuryakov  <ap@apple.com>
231
232         Reviewed by Darin Adler.
233
234         https://bugs.webkit.org/show_bug.cgi?id=46573
235         <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
236
237         Test: http/tests/mime/quoted-charset.php
238
239         * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
240         * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
241         Work around a CFNetwork issue, strip quotes if they are present.
242
243 2010-12-10  Vincent Scheib  <scheib@chromium.org>
244
245         Reviewed by James Robinson.
246
247         Shader::loadShader() must initialize variable passed to getShaderiv
248         https://bugs.webkit.org/show_bug.cgi?id=50842
249
250         Test: fast/canvas/canvas-largedraws.html
251
252         * platform/graphics/gpu/Shader.cpp:
253         (WebCore::Shader::loadShader):
254
255 2010-12-10  Vincent Scheib  <scheib@chromium.org>
256
257         Reviewed by James Robinson.
258
259         Texture::updateSubRect should pass IntRect by reference
260         https://bugs.webkit.org/show_bug.cgi?id=50845
261
262         No test, changing to pass by ref.
263
264         * platform/graphics/gpu/Texture.cpp:
265         (WebCore::Texture::updateSubRect):
266         * platform/graphics/gpu/Texture.h:
267
268 2010-12-10  Darin Adler  <darin@apple.com>
269
270         Reviewed by Sam Weinig.
271
272         Move open and showModalDialog implementations from bindings into DOM class DOMWindow
273         https://bugs.webkit.org/show_bug.cgi?id=50836
274
275         * bindings/js/JSDOMWindowCustom.cpp:
276         (WebCore::JSDOMWindow::open): Removed most of the code and changed to call
277         DOMWindow::open.
278         (WebCore::DialogHandler::DialogHandler): Added. Object is used to handle the
279         arguments and return value in showModalDialog.
280         (WebCore::DialogHandler::dialogCreated): Ditto.
281         (WebCore::DialogHandler::returnValue): Ditto.
282         (WebCore::setUpDialog): Added. Function passed to showModalDialog that just
283         casts pointer to DialogHandler can calls dialogCreated.
284         (WebCore::JSDOMWindow::showModalDialog): Removed most of the code and changed
285         to call DOMWindow::showModalDialog.
286         (WebCore::JSDOMWindow::postMessage): Made style match the rest of the file by
287         renaming local variables and getting rid of a needless ones.
288
289         * page/DOMWindow.cpp:
290         (WebCore::DOMWindow::parseModalDialogFeatures): Moved body of this function
291         to the WindowFeatures class.
292         (WebCore::DOMWindow::allowPopUp): Renamed argument from activeFrame to firstFrame,
293         because that's the frame we pass in here. Also added an overload so this can be
294         called on a window rather than a frame.
295         (WebCore::DOMWindow::setLocation): Renamed a couple variables so the names are
296         the same as in open and showModalDialog. Factored the JavaScript security check
297         into a new function named isInsecureScriptAccess.
298         (WebCore::DOMWindow::isInsecureScriptAccess): Here is the new function.
299         (WebCore::DOMWindow::createWindow): Added. Contains logic shared by open and
300         showModalDialog just as the function named createWindow in JSDOMWindowCustom.cpp
301         used to.
302         (WebCore::DOMWindow::open): Added. Code from JSDOMWindowCustom without the
303         JavaScript language binding part, and with a bit of refactoring to share code
304         with the rest of the DOMWindow class.
305         (WebCore::DOMWindow::showModalDialog): Ditto.
306
307         * page/DOMWindow.h: Moved conditional parts of the file into separate paragraphs
308         in alphabetical order so they are not scattered thorugh the file. Removed redundant
309         includes. Added some blank lines for clarity. Added an open function and a
310         showModalDialog function. Added private createWindow and isInsecureScriptAccess
311         functions.
312
313         * page/WindowFeatures.cpp:
314         (WebCore::isWindowFeaturesSeparator): Renamed from isSeparator for clarity.
315         (WebCore::WindowFeatures::WindowFeatures): Updated for name change. Used isEmpty
316         instead of checking length. Added a new constructor for use when making dialogs,
317         with code from the showModalDialog function.
318         (WebCore::WindowFeatures::boolFeature): Use DialogFeaturesMap typedef.
319         (WebCore::WindowFeatures::floatFeature): Use DialogFeaturesMap typedef.
320         Renamed a local variable and tweaked the comments a bit.
321         (WebCore::WindowFeatures::parseDialogFeatures): Added. Code moved here from
322         DOMWindow::parseDialogFeatures and refactored a bit.
323
324         * page/WindowFeatures.h: Added new constructor, new parseDialogFeatures
325         function, DialogFeaturesMap typedef, and made setWindowFeature function private.
326
327 2010-12-10  Chris Fleizach  <cfleizach@apple.com>
328
329         Reviewed by Darin Adler.
330
331         AX: refactor AccessibilityRenderObject::doAccessibilityHitTest
332         https://bugs.webkit.org/show_bug.cgi?id=50574
333
334         Refactors accessibility hit testing to allow for a more flexible model when handling elements
335         with fake sub-elements (like sliders or list boxes).
336
337         Renamed doAccessibilityHitTest -> accessibilityHitTest, which is called on the root
338         accessibility render object. Then subclassers are able to override 
339         elementAccessibilityHitTest to return their own specific elements.
340
341         * accessibility/AccessibilityListBox.cpp:
342         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
343         * accessibility/AccessibilityListBox.h:
344         * accessibility/AccessibilityObject.h:
345         (WebCore::AccessibilityObject::accessibilityHitTest):
346         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
347         * accessibility/AccessibilityRenderObject.cpp:
348         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
349         * accessibility/AccessibilityRenderObject.h:
350         * accessibility/AccessibilitySlider.cpp:
351         (WebCore::AccessibilitySlider::elementAccessibilityHitTest):
352         * accessibility/AccessibilitySlider.h:
353         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
354         (webkit_accessible_component_ref_accessible_at_point):
355         * accessibility/mac/AccessibilityObjectWrapper.mm:
356         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
357
358 2010-12-10  Kenneth Russell  <kbr@google.com>
359
360         Reviewed by Darin Adler.
361
362         Clean up assertion in Extensions3DOpenGL.cpp
363         https://bugs.webkit.org/show_bug.cgi?id=50852
364
365         Built Release mode to test. No functionality change.
366
367         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
368         (WebCore::Extensions3DOpenGL::ensureEnabled):
369
370 2010-12-10  Cosmin Truta  <ctruta@chromium.org>
371
372         Reviewed by Eric Seidel.
373
374         Crash while processing ill-formed <textPath> ouside of <text>
375         https://bugs.webkit.org/show_bug.cgi?id=47759
376
377         Renderers within a <text> subtree are created only when their corresponding elements
378         satisfy the content model.
379
380         Test: svg/custom/invalid-text-content.svg
381
382         * svg/SVGTRefElement.cpp:
383         (WebCore::SVGTRefElement::childShouldCreateRenderer): Fixed to comply with the content model.
384         (WebCore::SVGTRefElement::rendererIsNeeded): Added.
385         * svg/SVGTRefElement.h:
386         * svg/SVGTSpanElement.cpp:
387         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Fixed to comply with the content model.
388         (WebCore::SVGTSpanElement::rendererIsNeeded): Added.
389         * svg/SVGTSpanElement.h: Changed indentation.
390         * svg/SVGTextElement.cpp:
391         (WebCore::SVGTextElement::childShouldCreateRenderer): Reformatted.
392         * svg/SVGTextPathElement.cpp:
393         (WebCore::SVGTextPathElement::childShouldCreateRenderer): Fixed to comply with the content model.
394         (WebCore::SVGTextPathElement::rendererIsNeeded): Added.
395         * svg/SVGTextPathElement.h:
396
397 2010-12-10  Zhenyao Mo  <zmo@google.com>
398
399         Reviewed by Adam Barth.
400
401         Use enums instead of booleans in ImageSource/ImageDecoder constructors
402         https://bugs.webkit.org/show_bug.cgi?id=50818
403
404         This patch basically defines two enum type in ImageSource: AlphaOption
405         and GammaAndColorProfileOption and use them as ImageSource and ImageDecoder
406         constructor parameters instead of boolean typs.
407
408         * platform/graphics/ImageSource.cpp:
409         (WebCore::ImageSource::ImageSource):
410         (WebCore::ImageSource::setData):
411         * platform/graphics/ImageSource.h: Define the two enum types.
412         * platform/graphics/cg/GraphicsContext3DCG.cpp:
413         (WebCore::GraphicsContext3D::getImageData):
414         * platform/graphics/cg/ImageSourceCG.cpp:
415         (WebCore::ImageSource::ImageSource):
416         * platform/graphics/qt/ImageDecoderQt.cpp:
417         (WebCore::ImageDecoder::create):
418         (WebCore::ImageDecoderQt::ImageDecoderQt):
419         * platform/graphics/qt/ImageDecoderQt.h:
420         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
421         (WebCore::GraphicsContext3D::getImageData):
422         * platform/image-decoders/ImageDecoder.cpp:
423         (WebCore::ImageDecoder::create):
424         * platform/image-decoders/ImageDecoder.h:
425         (WebCore::ImageDecoder::ImageDecoder):
426         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
427         (WebCore::BMPImageDecoder::BMPImageDecoder):
428         * platform/image-decoders/bmp/BMPImageDecoder.h:
429         * platform/image-decoders/gif/GIFImageDecoder.cpp:
430         (WebCore::GIFImageDecoder::GIFImageDecoder):
431         * platform/image-decoders/gif/GIFImageDecoder.h:
432         * platform/image-decoders/ico/ICOImageDecoder.cpp:
433         (WebCore::ICOImageDecoder::ICOImageDecoder):
434         (WebCore::ICOImageDecoder::decodeAtIndex):
435         * platform/image-decoders/ico/ICOImageDecoder.h:
436         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
437         (WebCore::JPEGImageDecoder::JPEGImageDecoder):
438         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
439         * platform/image-decoders/png/PNGImageDecoder.cpp:
440         (WebCore::PNGImageDecoder::PNGImageDecoder):
441         * platform/image-decoders/png/PNGImageDecoder.h:
442         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
443         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
444         * platform/image-decoders/webp/WEBPImageDecoder.h:
445
446 2010-12-10  Ryosuke Niwa  <rniwa@webkit.org>
447
448         Reviewed by Darin Adler.
449
450         REGRESSION(r73799): editing/execCommand/4920488.html fails
451         https://bugs.webkit.org/show_bug.cgi?id=50854
452
453         The regression was caused by Range::processContents's not extracting
454         m_end.container()->firstChild(). Fixed the bug by always adding the first child.
455
456         * dom/Range.cpp:
457         (WebCore::Range::processContents):
458
459 2010-12-10  Adam Barth  <abarth@webkit.org>
460
461         Reviewed by Eric Seidel.
462
463         REGRESSION: Infinite redirect on developer.apple.com
464         https://bugs.webkit.org/show_bug.cgi?id=45627
465
466         Tests: fast/loader/form-submit-aborts-parsing.html
467                fast/loader/location-change-aborts-parsing.html
468
469         This patch is not pretty, but it fixes the bug.  I stole this approach
470         from the old HTML parser (as suggested by Eric Seidel).  The other
471         approaches that folks tried for this bug are better, but it's inclear
472         how to get them to work correctly.  I've added a large FIXME comment.
473
474         * html/parser/HTMLDocumentParser.cpp:
475         (WebCore::HTMLDocumentParser::pumpTokenizer):
476         * html/parser/HTMLTreeBuilder.h:
477         (WebCore::HTMLTreeBuilder::isParsingFragment):
478
479 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
480
481         Reviewed by Ada Chan.
482
483         When we are creating a ContextMenuItem, only call setSubMenu if we have
484         a subMenu to set.
485
486         * platform/ContextMenuItem.cpp:
487         (WebCore::ContextMenuItem::ContextMenuItem):
488
489 2010-12-10  Kenneth Russell  <kbr@google.com>
490
491         Unreviewed, another build fix. #include <wtf/UnusedParam.h> needed
492         for Release builds.
493
494         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
495
496 2010-12-10  Kenneth Russell  <kbr@google.com>
497
498         Unreviewed, build fix. Change #ifndef NDEBUG to #ifdef NDEBUG.
499
500         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
501         (WebCore::Extensions3DOpenGL::ensureEnabled):
502
503 2010-12-10  Kenneth Russell  <kbr@google.com>
504
505         Reviewed by James Robinson.
506
507         Implement extension entry points and remove EXTENSIONS enum
508         https://bugs.webkit.org/show_bug.cgi?id=40316
509
510         Implemented WebGLRenderingContext's getSupportedExtensions and
511         getExtensions entry points, and, to verify them, added support for
512         the first specified WebGL extension, OES_texture_float. This
513         extension is now advertised in the Chromium and WebKit ports when
514         the underlying hardware supports it.
515
516         The new OES_texture_float test in the WebGL conformance suite
517         verifies the allocation and population of floating point textures,
518         and their use as render targets. However, because this extension
519         is optional, it is not easily testable with a layout test; there
520         is only one set of expectations for a given test, and two would be
521         needed, one when the extension is available and one when it is not.
522
523         Tested with the oes-texture-float.html WebGL conformance test in
524         Chromium and WebKit on Mac OS X on hardware that supports the
525         extension. Also verified with a configuration that does not
526         advertise the extension that this same test passes.
527
528         * CMakeLists.txt:
529         * DerivedSources.make:
530         * GNUmakefile.am:
531         * WebCore.gypi:
532         * WebCore.pri:
533         * WebCore.pro:
534         * WebCore.xcodeproj/project.pbxproj:
535         * bindings/js/JSWebGLRenderingContextCustom.cpp:
536         (WebCore::toJS):
537         (WebCore::JSWebGLRenderingContext::markChildren):
538         (WebCore::JSWebGLRenderingContext::getExtension):
539         (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
540         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
541         (WebCore::toV8Object):
542         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
543         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
544         * html/canvas/OESTextureFloat.cpp: Added.
545         (WebCore::OESTextureFloat::OESTextureFloat):
546         (WebCore::OESTextureFloat::~OESTextureFloat):
547         (WebCore::OESTextureFloat::getName):
548         (WebCore::OESTextureFloat::create):
549         * html/canvas/OESTextureFloat.h: Added.
550         * html/canvas/OESTextureFloat.idl: Added.
551         * html/canvas/WebGLExtension.cpp: Added.
552         (WebCore::WebGLExtension::WebGLExtension):
553         (WebCore::WebGLExtension::~WebGLExtension):
554         * html/canvas/WebGLExtension.h: Added.
555         * html/canvas/WebGLRenderingContext.cpp:
556         (WebCore::WebGLRenderingContext::getExtension):
557         (WebCore::WebGLRenderingContext::getSupportedExtensions):
558         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
559         (WebCore::WebGLRenderingContext::validateTexFuncData):
560         (WebCore::WebGLRenderingContext::getNumberOfExtensions):
561         (WebCore::WebGLRenderingContext::getExtensionNumber):
562         * html/canvas/WebGLRenderingContext.h:
563         * html/canvas/WebGLRenderingContext.idl:
564         * platform/graphics/Extensions3D.h:
565         * platform/graphics/GraphicsContext3D.cpp:
566         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
567         (WebCore::GraphicsContext3D::extractTextureData):
568         (WebCore::doUnpackingAndPacking):
569         (WebCore::doPacking):
570         (WebCore::doFloatingPointPacking):
571         (WebCore::GraphicsContext3D::packPixels):
572         * platform/graphics/GraphicsContext3D.h:
573         * platform/graphics/chromium/Extensions3DChromium.h:
574         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
575         (WebCore::Extensions3DOpenGL::supports):
576         (WebCore::Extensions3DOpenGL::ensureEnabled):
577         * platform/graphics/opengl/Extensions3DOpenGL.h:
578         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
579         (WebCore::GraphicsContext3D::texImage2D):
580         * platform/graphics/qt/Extensions3DQt.cpp:
581         (WebCore::Extensions3DQt::ensureEnabled):
582         * platform/graphics/qt/Extensions3DQt.h:
583
584 2010-12-10  Darin Adler  <darin@apple.com>
585
586         Try to fix Windows build.
587
588         * dom/Range.cpp:
589         (WebCore::Range::processContents): Put typedef of NodeVector inside the function
590         instead of at the top of the file, since the use is restricted to this function.
591         There's another NodeVector in ContainerNode.cpp.
592
593 2010-12-09  Brian Weinstein  <bweinstein@apple.com>
594
595         Reviewed by Adam Roben.
596
597         Prep for WebKit2: Context menu support on Windows
598         https://bugs.webkit.org/show_bug.cgi?id=50514
599         
600         Before this patch ContextMenu on Windows were backed by HMENUs, and ContextMenuItems
601         were backed by MENUITEMINFOs. This meant they couldn't be copied, and they needed to
602         be to work in WebKit2.
603         
604         This patch adds a new USE flag - CROSS_PLATFORM_CONTEXT_MENUS that are for a cross-platform
605         representation of context menus. This patch also has Windows adopt them.
606         
607         Cross-platform context menus change the API of context menus and the ContextMenuClient. There
608         is no more idea of a PlatformMenuDescription or a PlatformMenuItemDescription. Menus are backed
609         by a Vector of ContextMenuItems, and menu items are backed by the variables they need (enabled, checked
610         title, action, type, and submenu).
611         
612         This patch also refactors the ContextMenuClient interface to use a variation on the getCustomMenuFromDefaultItems
613         function to allow for customization of the context menu.
614         
615         For other ports to use CROSS_PLATFORM_CONTEXT_MENUS, all they need to do is write conversion functions from
616         a ContextMenu <-> native menu type, and ContextMenuItem <-> native menu item type. For Windows, this is done
617         in ContextMenuWin.cpp and ContextMenuItemWin.cpp.
618
619         No new tests, no change in behavior.
620
621         * WebCore.vcproj/WebCore.vcproj: Add new files (only needed on Windows for now).
622         * loader/EmptyClients.h:
623         (WebCore::EmptyContextMenuClient::customizeMenu): Define this function if CROSS_PLATFORM_CONTEXT_MENUS
624             is on.
625         * page/ContextMenuClient.h: Ditto. 
626         * page/ContextMenuController.cpp:
627         (WebCore::ContextMenuController::showContextMenu): Call customizeMenu instead of 
628             getCustomMenuFromDefaultItems if CROSS_PLATFORM_CONTEXT_MENUS is on.
629         * platform/ContextMenu.cpp: Added.
630         (WebCore::ContextMenu::ContextMenu): Empty constructor.
631         (WebCore::ContextMenu::setItems): Sets the items in the menu.
632         (WebCore::ContextMenu::items): Returns the items in the menu.
633         (WebCore::ContextMenu::itemAtIndex):
634         (WebCore::itemWithActionInMenu): Returns the item with the correct action, recursively descending
635             into submenus.
636         (WebCore::ContextMenu::itemWithAction): Calls through to itemWithActionInMenu.
637         * platform/ContextMenu.h: Added a new set of functions and member variables that are defined for
638             CROSS_PLATFORM_CONTEXT_MENUS.
639         (WebCore::ContextMenu::appendItem): Appends an item to the menu.
640         * platform/ContextMenuItem.cpp: Added.
641         (WebCore::ContextMenuItem::ContextMenuItem):
642         (WebCore::ContextMenuItem::~ContextMenuItem):
643         (WebCore::ContextMenuItem::setSubMenu):
644         * platform/ContextMenuItem.h:
645         (WebCore::ContextMenuItem::type): Returns the type.
646         (WebCore::ContextMenuItem::setType): Sets the type.
647         (WebCore::ContextMenuItem::action): Returns the action.
648         (WebCore::ContextMenuItem::setAction): Sets the action.
649         (WebCore::ContextMenuItem::title): Returns the title.
650         (WebCore::ContextMenuItem::setTitle): Sets the title.
651         (WebCore::ContextMenuItem::checked): Returns whether or not the menu item is checked.
652         (WebCore::ContextMenuItem::setChecked): Sets whether ot not the menu item is checked.
653         (WebCore::ContextMenuItem::enabled): Returns whether or not the menu item is enabled.
654         (WebCore::ContextMenuItem::setEnabled): Sets whether or not the menu item is enabled.
655         (WebCore::ContextMenuItem::submenu): Returns the submenu.
656         * platform/PlatformMenuDescription.h: Remove the idea if a PlatformMenuDescription if 
657             CROSS_PLATFORM_CONTEXT_MENUS is on.
658         * platform/win/ContextMenuItemWin.cpp:
659         (WebCore::ContextMenuItem::ContextMenuItem): Creates a ContextMenuItem from a MENUITEMINFO.
660         (WebCore::ContextMenuItem::nativeMenuItem): Creates and returns a MENUITEMINFO.
661         * platform/win/ContextMenuWin.cpp:
662         (WebCore::ContextMenu::ContextMenu): Creates a ContextMenu from an HMENU.
663         (WebCore::ContextMenu::nativeMenu): Creates and returns an HMENU.
664
665 2010-12-10  Emil Eklund  <eae@chromium.org>
666
667         Reviewed by Adam Barth.
668
669         Fix crash in ReplaceSelectionCommand::doApply when selection is modified
670         during execution.
671         https://bugs.webkit.org/show_bug.cgi?id=50840
672
673         Test: editing/execCommand/insertHTML-mutation-crash.html
674
675         * editing/ReplaceSelectionCommand.cpp:
676         (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
677         Replaced raw node pointer with RefPtr.
678         
679         (WebCore::ReplaceSelectionCommand::doApply):
680         Replaced raw node pointer with RefPtr and added null check.
681
682 2010-12-10  Emil Eklund  <eae@chromium.org>
683
684         Reviewed by Adam Barth.
685
686         Fix crash in Range::processContents when modified during mutation event.
687         https://bugs.webkit.org/show_bug.cgi?id=50710
688
689         Test: fast/dom/Range/range-extractContents.html
690
691         * dom/Range.cpp:
692         (WebCore::Range::processContents):
693         Replace raw pointers with RefPtrs and add checks.
694
695 2010-12-09  Enrica Casucci  <enrica@apple.com>
696
697         Reviewed by Alexey Proskuryakov.
698
699         Implement IME support for Mac.
700         <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
701         https://bugs.webkit.org/show_bug.cgi?id=50788
702
703         * dom/KeyboardEvent.h:
704         (WebCore::KeypressCommand::KeypressCommand): Removed ASSERT in constructor,
705         since it is now used for more than one command.
706
707 2010-12-10  Jessie Berlin  <jberlin@apple.com>
708
709         Windows build fix. Unreviewed.
710
711         * WebCore.vcproj/WebCore.vcproj:
712         Remove duplicate </File> tag.
713
714 2010-12-09  Jenn Braithwaite  <jennb@chromium.org>
715
716         Reviewed by Adam Barth.
717
718         TextResourceDecoder::checkForHeadCharset can look way past the limit.
719         https://bugs.webkit.org/show_bug.cgi?id=47397
720
721         Replaced charset detection algorithm with real parser.
722         Added tests for parser bugs mentioned in the thread for this bug report.
723         Converted hixie's encoding parsing tests to a layout test.
724
725         Tests: fast/encoding/bracket-in-script.html
726                fast/encoding/bracket-in-tag.html
727                fast/encoding/escaped-bracket.html
728                fast/encoding/meta-in-body.html
729                fast/encoding/meta-in-script.html
730                fast/encoding/meta-in-title.html
731                fast/encoding/mismatched-end-tag.html
732                fast/encoding/namespace-meta.html
733                fast/encoding/not-http-equiv-content.html
734                fast/encoding/parser-tests.html
735                fast/encoding/quotes-in-title.html
736                fast/encoding/tag-name-digit.html
737                http/tests/misc/charset-sniffer-end-sniffing.html
738
739         * Android.mk:
740         * CMakeLists.txt:
741         * GNUmakefile.am:
742         * WebCore.gypi:
743         * WebCore.pro:
744         * WebCore.vcproj/WebCore.vcproj:
745         * WebCore.xcodeproj/project.pbxproj:
746         * html/parser/HTMLMetaCharsetParser.cpp: Added.
747         (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
748         (WebCore::HTMLMetaCharsetParser::~HTMLMetaCharsetParser):
749         (WebCore::HTMLMetaCharsetParser::extractCharset):
750         (WebCore::HTMLMetaCharsetParser::processMeta):
751         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
752         * html/parser/HTMLMetaCharsetParser.h: Added.
753         (WebCore::HTMLMetaCharsetParser::create):
754         (WebCore::HTMLMetaCharsetParser::encoding):
755         * loader/TextResourceDecoder.cpp:
756         (WebCore::TextResourceDecoder::checkForHeadCharset):
757         (WebCore::TextResourceDecoder::checkForMetaCharset):
758         * loader/TextResourceDecoder.h:
759
760 2010-12-10 Nate Chapin  <japhet@chromium.org>
761
762         Reviewed by Antti Koivisto.
763
764         Merge Loader and Request. Currently, Loader is a singleton attached
765         to MemoryCache. Our goal is to remove knowledge of the loading process
766         from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
767         Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
768         which removes the main reason for Request existing as a separate class (to store per-request
769         state that Loader couldn't).
770
771         Loader will be given a more descriptive name in a later patch.
772
773         https://bugs.webkit.org/show_bug.cgi?id=49837
774
775         Refactor only, no new tests.
776
777         * Android.mk:
778         * CMakeLists.txt:
779         * GNUmakefile.am:
780         * WebCore.gypi:
781         * WebCore.pro:
782         * loader/FrameLoader.cpp:
783         * loader/Request.cpp:
784         * loader/Request.h:
785         * loader/cache/CachedFont.cpp:
786         * loader/cache/CachedImage.cpp:
787         * loader/cache/CachedResource.cpp:
788         * loader/cache/CachedResource.h:
789         * loader/cache/CachedResourceLoader.cpp:
790         (WebCore::CachedResourceLoader::CachedResourceLoader):
791         (WebCore::CachedResourceLoader::~CachedResourceLoader):
792         (WebCore::CachedResourceLoader::requestImage):
793         (WebCore::CachedResourceLoader::setAutoLoadImages):
794         (WebCore::CachedResourceLoader::load):
795         (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
796             plus other CachedResourceLoader cleanup that had been handled in Loader.
797         (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
798         (WebCore::CachedResourceLoader::requestCount):
799         * loader/cache/CachedResourceLoader.h:
800         (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
801         * loader/cache/MemoryCache.h:
802         * loader/loader.cpp:
803         (WebCore::Loader::Loader):
804         (WebCore::Loader::~Loader):
805         (WebCore::Loader::load):
806         (WebCore::Loader::willSendRequest):
807         (WebCore::Loader::didFinishLoading):
808         (WebCore::Loader::didFail):
809         (WebCore::Loader::didReceiveResponse):
810         (WebCore::Loader::didReceiveData):
811         (WebCore::Loader::didReceiveCachedMetadata):
812         * loader/loader.h:
813         (WebCore::Loader::cachedResourceLoader):
814
815 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
816
817         Unreviewed, rolling out r73703.
818         http://trac.webkit.org/changeset/73703
819         https://bugs.webkit.org/show_bug.cgi?id=49658
820
821         This patch is causing crashes on the GTK+ bots.
822
823         * platform/ContextMenuItem.h:
824         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
825         * platform/gtk/ContextMenuGtk.cpp:
826         (WebCore::ContextMenu::appendItem):
827         * platform/gtk/ContextMenuItemGtk.cpp:
828         (WebCore::ContextMenuItem::ContextMenuItem):
829         (WebCore::ContextMenuItem::~ContextMenuItem):
830         (WebCore::ContextMenuItem::createNativeMenuItem):
831         (WebCore::ContextMenuItem::releasePlatformDescription):
832         (WebCore::ContextMenuItem::type):
833         (WebCore::ContextMenuItem::setType):
834         (WebCore::ContextMenuItem::action):
835         (WebCore::ContextMenuItem::setAction):
836         (WebCore::ContextMenuItem::title):
837         (WebCore::ContextMenuItem::setTitle):
838         (WebCore::ContextMenuItem::platformSubMenu):
839         (WebCore::ContextMenuItem::setSubMenu):
840         (WebCore::ContextMenuItem::setChecked):
841         (WebCore::ContextMenuItem::setEnabled):
842
843 2010-12-08  Mihai Parparita  <mihaip@chromium.org>
844
845         Reviewed by Darin Adler.
846
847         fast/canvas/canvas-getImageData-negative-source.html fails on Mac
848         https://bugs.webkit.org/show_bug.cgi?id=47901
849
850         Test: fast/canvas/canvas-getImageData-rounding.html
851         
852         static_cast<unsigned> is generally not what we want in
853         convertLogicalToDevice. It produces inconsistent results when compiling
854         for 32-bit vs. 64-bit, and in any case we weren't getting correct
855         rounding behavior for source rectangles (e.g. we should get a source rect
856         of width 2 if the source X is 0.9 and the source width is 0.2, but we
857         were getting only one of width 1).
858
859         * html/HTMLCanvasElement.cpp:
860         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
861         (WebCore::HTMLCanvasElement::convertToValidDeviceSize):
862         * html/HTMLCanvasElement.h:
863
864 2010-12-10  Hironori Bono  <hbono@chromium.org>
865
866         Reviewed by Ojan Vafai.
867
868         [Chromium] Use libjpeg-turbo instead of libjpeg
869         https://bugs.webkit.org/show_bug.cgi?id=50054
870
871         This change replaces the hard-coded path to the GYP files of the JPEG
872         library with a 'libjpeg_gyp_path' variable, which is added by Chromium
873         r68453. (When building WebKit Chromium, this change sets its value to
874         '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp' to avoid changing
875         the current behavior.)
876
877         No new tests since this does not change the code at all.
878
879         * WebCore.gyp/WebCore.gyp:
880
881 2010-12-10  Chris Marrin  <cmarrin@apple.com>
882
883         Reviewed by Simon Fraser.
884
885         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
886         https://bugs.webkit.org/show_bug.cgi?id=49388
887
888         Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
889         the implementation.
890
891         * platform/graphics/ca/GraphicsLayerCA.cpp:
892         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
893         * platform/graphics/ca/PlatformCAAnimation.h:
894         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
895         (hasNonZeroBeginTimeFlag):
896         (setNonZeroBeginTimeFlag):
897         (PlatformCAAnimation::PlatformCAAnimation):
898         (PlatformCAAnimation::setBeginTime):
899
900 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
901
902         Reviewed by Pavel Feldman.
903
904         Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor.
905         https://bugs.webkit.org/show_bug.cgi?id=50679
906
907         * inspector/front-end/Script.js:
908         * inspector/front-end/ScriptView.js:
909         (WebInspector.ScriptView):
910         * inspector/front-end/ScriptsPanel.js:
911         (WebInspector.ScriptsPanel.prototype.reset):
912         * inspector/front-end/SourceFrame.js:
913         (WebInspector.SourceFrame):
914         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
915         (WebInspector.SourceFrame.prototype._breakpointAdded):
916         (WebInspector.SourceFrame.prototype._doEditLine):
917         (WebInspector.SourceFrame.prototype._commitEditLine):
918         (WebInspector.SourceFrame.prototype._breakpoints):
919         (WebInspector.SourceFrame.prototype._sourceIDForLine):
920         * inspector/front-end/SourceView.js:
921         (WebInspector.SourceView):
922
923 2010-12-10  Andreas Kling  <kling@webkit.org>
924
925         Reviewed by Eric Seidel.
926
927         Don't do GraphicsContext save/restore just to preserve the CompositeOperator
928         https://bugs.webkit.org/show_bug.cgi?id=50070
929
930         Add GraphicsContext::compositeOperation() so we don't have to do a full
931         save/restore if the only context-tainting call is setCompositeOperation().
932
933         GraphicsContext::setCompositeOperation() now stores the op in its state
934         and calls a port-specific setPlatformCompositeOperation().
935
936         No new tests, this is an optimization.
937
938         * platform/graphics/GraphicsContext.cpp:
939         (WebCore::GraphicsContext::setCompositeOperation):
940         (WebCore::GraphicsContext::compositeOperation):
941         * platform/graphics/GraphicsContext.h:
942         * platform/graphics/GraphicsContextPrivate.h:
943         (WebCore::GraphicsContextState::GraphicsContextState):
944         * platform/graphics/Image.cpp:
945         (WebCore::Image::fillWithSolidColor):
946         * platform/graphics/cairo/GraphicsContextCairo.cpp:
947         (WebCore::GraphicsContext::setPlatformCompositeOperation):
948         * platform/graphics/cg/GraphicsContextCG.cpp:
949         (WebCore::GraphicsContext::setPlatformCompositeOperation):
950         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
951         (WebCore::GraphicsContext::setPlatformCompositeOperation):
952         * platform/graphics/mac/GraphicsContextMac.mm:
953         (WebCore::GraphicsContext::setPlatformCompositeOperation):
954         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
955         (WebCore::GraphicsContext::setPlatformCompositeOperation):
956         * platform/graphics/qt/GraphicsContextQt.cpp:
957         (WebCore::GraphicsContext::setPlatformCompositeOperation):
958         * platform/graphics/skia/GraphicsContextSkia.cpp:
959         (WebCore::GraphicsContext::setPlatformCompositeOperation):
960         * platform/graphics/skia/SkiaUtils.cpp:
961         (WebCore::WebCoreCompositeToSkiaComposite):
962         * platform/graphics/wince/GraphicsContextWinCE.cpp:
963         (WebCore::GraphicsContext::setPlatformCompositeOperation):
964         * platform/graphics/wx/GraphicsContextWx.cpp:
965         (WebCore::GraphicsContext::setPlatformCompositeOperation):
966         * rendering/RenderBoxModelObject.cpp:
967         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
968         * rendering/RenderView.cpp:
969         (WebCore::RenderView::paintBoxDecorations):
970
971 2010-12-10  Renata Hodovan  <reni@webkit.org>
972
973         Reviewed by Andreas Kling.
974
975         GraphicsContext: Merge m_common and m_data
976         https://bugs.webkit.org/show_bug.cgi?id=49914
977
978         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
979         and m_common became unnecessary. They are removed.
980         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
981         make the constructor of GraphicsContext clearer.
982         Besides add a getter to the private GraphicsContext::m_state member, because some inline
983         functions in cairo need it.
984
985         No new test is needed, because this is a refactoring.
986
987         * WebCore.xcodeproj/project.pbxproj:
988         * platform/graphics/GraphicsContext.cpp:
989         (WebCore::GraphicsContext::GraphicsContext):
990         (WebCore::GraphicsContext::~GraphicsContext):
991         (WebCore::GraphicsContext::save):
992         (WebCore::GraphicsContext::restore):
993         (WebCore::GraphicsContext::setStrokeThickness):
994         (WebCore::GraphicsContext::setStrokeStyle):
995         (WebCore::GraphicsContext::setStrokeColor):
996         (WebCore::GraphicsContext::setShadow):
997         (WebCore::GraphicsContext::clearShadow):
998         (WebCore::GraphicsContext::getShadow):
999         (WebCore::GraphicsContext::strokeThickness):
1000         (WebCore::GraphicsContext::strokeStyle):
1001         (WebCore::GraphicsContext::strokeColor):
1002         (WebCore::GraphicsContext::strokeColorSpace):
1003         (WebCore::GraphicsContext::fillRule):
1004         (WebCore::GraphicsContext::setFillRule):
1005         (WebCore::GraphicsContext::setFillColor):
1006         (WebCore::GraphicsContext::fillColor):
1007         (WebCore::GraphicsContext::fillColorSpace):
1008         (WebCore::GraphicsContext::setShouldAntialias):
1009         (WebCore::GraphicsContext::shouldAntialias):
1010         (WebCore::GraphicsContext::state):
1011         (WebCore::GraphicsContext::setStrokePattern):
1012         (WebCore::GraphicsContext::setFillPattern):
1013         (WebCore::GraphicsContext::setStrokeGradient):
1014         (WebCore::GraphicsContext::setFillGradient):
1015         (WebCore::GraphicsContext::fillGradient):
1016         (WebCore::GraphicsContext::strokeGradient):
1017         (WebCore::GraphicsContext::fillPattern):
1018         (WebCore::GraphicsContext::strokePattern):
1019         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
1020         (WebCore::GraphicsContext::updatingControlTints):
1021         (WebCore::GraphicsContext::setUpdatingControlTints):
1022         (WebCore::GraphicsContext::setPaintingDisabled):
1023         (WebCore::GraphicsContext::paintingDisabled):
1024         (WebCore::GraphicsContext::textDrawingMode):
1025         (WebCore::GraphicsContext::setTextDrawingMode):
1026         * platform/graphics/GraphicsContext.h:
1027         (WebCore::GraphicsContextState::GraphicsContextState):
1028         * platform/graphics/GraphicsContextPrivate.h: Removed.
1029         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1030         (WebCore::setPlatformFill):
1031         (WebCore::setPlatformStroke):
1032         (WebCore::drawPathShadow):
1033         (WebCore::fillCurrentCairoPath):
1034         (WebCore::strokeCurrentCairoPath):
1035         (WebCore::GraphicsContext::platformInit):
1036         (WebCore::GraphicsContext::platformDestroy):
1037         (WebCore::GraphicsContext::fillPath):
1038         (WebCore::GraphicsContext::strokePath):
1039         (WebCore::GraphicsContext::fillRect):
1040         (WebCore::GraphicsContext::setPlatformShadow):
1041         (WebCore::GraphicsContext::strokeRect):
1042         (WebCore::GraphicsContext::setAlpha):
1043         (WebCore::GraphicsContext::getAlpha):
1044         * platform/graphics/cg/GraphicsContextCG.cpp:
1045         (WebCore::GraphicsContext::platformInit):
1046         (WebCore::GraphicsContext::platformDestroy):
1047         (WebCore::GraphicsContext::applyStrokePattern):
1048         (WebCore::GraphicsContext::applyFillPattern):
1049         (WebCore::GraphicsContext::drawPath):
1050         (WebCore::GraphicsContext::fillPath):
1051         (WebCore::GraphicsContext::strokePath):
1052         (WebCore::GraphicsContext::fillRect):
1053         (WebCore::GraphicsContext::setPlatformShadow):
1054         (WebCore::GraphicsContext::strokeRect):
1055         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1056         (WebCore::GraphicsContext::platformInit):
1057         (WebCore::GraphicsContext::platformDestroy):
1058         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1059         (WebCore::GraphicsContext::platformInit):
1060         (WebCore::GraphicsContext::platformDestroy):
1061         (WebCore::GraphicsContext::fillPath):
1062         (WebCore::GraphicsContext::strokePath):
1063         (WebCore::GraphicsContext::clip):
1064         (WebCore::GraphicsContext::clipOut):
1065         (WebCore::GraphicsContext::addInnerRoundedRectClip):
1066         * platform/graphics/qt/GraphicsContextQt.cpp:
1067         (WebCore::GraphicsContext::platformInit):
1068         (WebCore::GraphicsContext::platformDestroy):
1069         (WebCore::GraphicsContext::fillPath):
1070         (WebCore::GraphicsContext::strokePath):
1071         (WebCore::GraphicsContext::fillRect):
1072         (WebCore::GraphicsContext::setPlatformShadow):
1073         * platform/graphics/skia/GraphicsContextSkia.cpp:
1074         (WebCore::GraphicsContext::platformInit):
1075         (WebCore::GraphicsContext::platformDestroy):
1076         (WebCore::GraphicsContext::fillPath):
1077         (WebCore::GraphicsContext::setPlatformShadow):
1078         * platform/graphics/win/GraphicsContextCGWin.cpp:
1079         (WebCore::GraphicsContext::GraphicsContext):
1080         (WebCore::GraphicsContext::platformInit):
1081         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1082         (WebCore::GraphicsContext::GraphicsContext):
1083         (WebCore::GraphicsContext::platformInit):
1084         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1085         (WebCore::GraphicsContext::platformInit):
1086         (WebCore::GraphicsContext::platformDestroy):
1087         (WebCore::GraphicsContext::fillPath):
1088         (WebCore::GraphicsContext::fillRect):
1089         * platform/graphics/wx/GraphicsContextWx.cpp:
1090         (WebCore::GraphicsContext::platformInit):
1091         (WebCore::GraphicsContext::platformDestroy):
1092
1093 2010-12-10  Pavel Podivilov  <podivilov@chromium.org>
1094
1095         Reviewed by Yury Semikhatsky.
1096
1097         Web Inspector: introduce a pair of set/remove methods for each breakpoint type.
1098         https://bugs.webkit.org/show_bug.cgi?id=50809
1099
1100         * inspector/Inspector.idl:
1101         * inspector/InspectorController.cpp:
1102         (WebCore::InspectorController::InspectorController):
1103         (WebCore::InspectorController::setEventListenerBreakpoint):
1104         (WebCore::InspectorController::removeEventListenerBreakpoint):
1105         (WebCore::InspectorController::hasEventListenerBreakpoint):
1106         (WebCore::InspectorController::setXHRBreakpoint):
1107         (WebCore::InspectorController::removeXHRBreakpoint):
1108         (WebCore::InspectorController::hasXHRBreakpoint):
1109         (WebCore::InspectorController::clearNativeBreakpoints):
1110         * inspector/InspectorController.h:
1111         * inspector/InspectorDOMAgent.cpp:
1112         (WebCore::InspectorDOMAgent::setDOMBreakpoint):
1113         (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
1114         (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
1115         (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
1116         (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
1117         (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
1118         (WebCore::InspectorDOMAgent::didRemoveDOMNode):
1119         * inspector/InspectorDOMAgent.h:
1120         * inspector/InspectorInstrumentation.cpp:
1121         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1122         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1123         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1124         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1125         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1126         * inspector/front-end/BreakpointManager.js:
1127         (WebInspector.BreakpointManager):
1128         (WebInspector.NativeBreakpoint):
1129         (WebInspector.DOMBreakpoint):
1130         (WebInspector.EventListenerBreakpoint):
1131         (WebInspector.XHRBreakpoint):
1132         * inspector/front-end/CallStackSidebarPane.js:
1133         (WebInspector.CallStackSidebarPane):
1134         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
1135         * inspector/front-end/DebuggerModel.js:
1136         (WebInspector.DebuggerModel.prototype.debuggerPaused):
1137
1138 2010-12-10  Adam Roben  <aroben@apple.com>
1139
1140         Windows production build fix after r72555
1141
1142         * WebCore.vcproj/WebCoreGeneratedCommon.vsprops: Use
1143         "$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win" to find the
1144         .vsprops files, rather than $(WebKitLibrariesDir).
1145
1146 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1147
1148         Reviewed by nobody, build fix.
1149
1150         [Qt] Second attempt to fix the build with Qt 4.6 broken in 73710.
1151
1152         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1153         (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
1154         (WebCore::QtNetworkReplyThreadSafeProxy::localCustomRequest):
1155         * platform/network/qt/QtNAMThreadSafeProxy.h:
1156
1157 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1158
1159         Reviewed by nobody, build fix.
1160
1161         [Qt] Fix the build with Qt 4.6 broken in 73710.
1162
1163         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1164         (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
1165         * platform/network/qt/QtNAMThreadSafeProxy.h:
1166
1167 2010-12-10  Emil Eklund  <eae@chromium.org>
1168
1169         Reviewed by Eric Seidel.
1170
1171         Change EventHandler::dispatchMouseEvent code to use DOM traversal instead of render tree traversal
1172         https://bugs.webkit.org/show_bug.cgi?id=49982
1173
1174         * page/EventHandler.cpp:
1175         (WebCore::EventHandler::dispatchMouseEvent):
1176         Walk up DOM/hosted tree rather than render tree.
1177
1178 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1179
1180         Reviewed by Kenneth Rohde Christiansen.
1181
1182         [Qt] Support a QNetworkAccessManager affined to a different thread.
1183         https://bugs.webkit.org/show_bug.cgi?id=50080
1184
1185         This patch introduce thread safe proxy classes for QNetworkAccessManager
1186         and QNetworkReply.
1187         If run in the same thread, these objects will forward the calls with
1188         Qt::DirectConnection bindings, while in the other case they will use
1189         Qt::QueuedConnection to carry requests accross threads.
1190
1191         This patch basically:
1192         - Makes sure that all access goes through these objects
1193         - Reorders signal connections to make sure we are connected when the
1194           signal comes
1195         - Makes sure that no QObject in the WebCore thread is a child of the
1196           reply which might be in a different thread.
1197         - Forward the data directly in QByteArrays in signals instead of collecting
1198           the data when the signal is handled.
1199
1200         New test: tst_QWebPage::networkAccessManagerOnDifferentThread
1201
1202         * WebCore.pro:
1203         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1204         (WebCore::MediaPlayerPrivateQt::commitLoad):
1205         * platform/network/qt/QNetworkReplyHandler.cpp:
1206         (WebCore::FormDataIODevice::FormDataIODevice):
1207         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1208         (WebCore::QNetworkReplyHandler::~QNetworkReplyHandler):
1209         (WebCore::QNetworkReplyHandler::setLoadMode):
1210         (WebCore::QNetworkReplyHandler::abort):
1211         (WebCore::QNetworkReplyHandler::release):
1212         (WebCore::ignoreHttpError):
1213         (WebCore::QNetworkReplyHandler::finish):
1214         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1215         (WebCore::QNetworkReplyHandler::forwardData):
1216         (WebCore::QNetworkReplyHandler::start):
1217         (WebCore::QNetworkReplyHandler::sendQueuedItems):
1218         * platform/network/qt/QNetworkReplyHandler.h:
1219         * platform/network/qt/QtNAMThreadSafeProxy.cpp: Added.
1220         * platform/network/qt/QtNAMThreadSafeProxy.h: Added.
1221         * platform/network/qt/ResourceHandleQt.cpp:
1222         (WebCore::ResourceHandle::willLoadFromCache):
1223         * platform/qt/CookieJarQt.cpp:
1224         (WebCore::networkAccessManager):
1225         (WebCore::setCookies):
1226         (WebCore::cookies):
1227         (WebCore::cookieRequestHeaderFieldValue):
1228         (WebCore::cookiesEnabled):
1229
1230 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1231
1232         Reviewed by Kenneth Rohde Christiansen.
1233
1234         [Qt] Refactor QNetworkReplyHandler::finish() to prevent crashes.
1235         https://bugs.webkit.org/show_bug.cgi?id=50761
1236
1237         This patch change the order to check if m_reply is null instead,
1238         explicitly deleting the reply before calling start() for a redirect,
1239         or after calling didFinishLoading()/didFail() in other cases.
1240
1241         * platform/network/qt/QNetworkReplyHandler.cpp:
1242         (WebCore::QNetworkReplyHandler::finish):
1243
1244 2010-12-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1245
1246         Reviewed by Kenneth Rohde Christiansen.
1247
1248         [Qt] Make sure we send the response before any data.
1249         https://bugs.webkit.org/show_bug.cgi?id=50760
1250
1251         This patch make sure the data available flag is set before
1252         we call sendResponseIfNeeded.
1253
1254         * platform/network/qt/QNetworkReplyHandler.cpp:
1255         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1256         (WebCore::QNetworkReplyHandler::finish):
1257         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1258         (WebCore::QNetworkReplyHandler::forwardData):
1259         (WebCore::QNetworkReplyHandler::resetState):
1260         * platform/network/qt/QNetworkReplyHandler.h:
1261
1262 2010-12-10  Koan-Sin Tan  <koansin.tan@gmail.com>
1263
1264         Reviewed by Dan Bernstein.
1265
1266         Bopomofo should be part of CJK Ideographs in WebCore/platform/graphics/Font.cpp
1267         https://bugs.webkit.org/show_bug.cgi?id=50668
1268
1269         No new tests. Note that, as said in the bug report discussion,
1270         I did have a test case for the bug. However, to show the test 
1271         case you need some "broken" Microsoft copyrighted fonts, such
1272         as DFKai-SB.
1273
1274         * platform/graphics/Font.cpp:
1275         (WebCore::Font::isCJKIdeograph):
1276
1277 2010-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1278
1279         Reviewed by Martin Robinson.
1280
1281         [GTK] Simplify context-menu handling code
1282         https://bugs.webkit.org/show_bug.cgi?id=49658
1283
1284         * platform/ContextMenuItem.h:
1285         * platform/gtk/ContextMenuGtk.cpp:
1286         (WebCore::ContextMenu::appendItem):
1287         * platform/gtk/ContextMenuItemGtk.cpp:
1288         (WebCore::ContextMenuItem::ContextMenuItem):
1289         (WebCore::ContextMenuItem::~ContextMenuItem):
1290         (WebCore::ContextMenuItem::releasePlatformDescription):
1291         (WebCore::ContextMenuItem::type):
1292         (WebCore::ContextMenuItem::setType):
1293         (WebCore::ContextMenuItem::action):
1294         (WebCore::ContextMenuItem::setAction):
1295         (WebCore::ContextMenuItem::title):
1296         (WebCore::ContextMenuItem::setTitle):
1297         (WebCore::ContextMenuItem::platformSubMenu):
1298         (WebCore::ContextMenuItem::setSubMenu):
1299         (WebCore::ContextMenuItem::setChecked):
1300         (WebCore::ContextMenuItem::setEnabled):
1301
1302 2010-12-10  Philippe Normand  <pnormand@igalia.com>
1303
1304         Reviewed by Gustavo Noronha Silva.
1305
1306         [GStreamer] un-needed methods
1307         https://bugs.webkit.org/show_bug.cgi?id=50805
1308
1309         No new tests, code cleanup only.
1310
1311         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1312         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1313
1314 2010-12-10  Philippe Normand  <pnormand@igalia.com>
1315
1316         Reviewed by Gustavo Noronha Silva.
1317
1318         [GStreamer] data: source could also support non-base64 encoded URIs
1319         https://bugs.webkit.org/show_bug.cgi?id=30007
1320
1321         Removed our ancient implementation of dataurisrc. We should now
1322         use the one in gst-plugins-bad which is more mature.
1323
1324         * GNUmakefile.am:
1325         * platform/graphics/gstreamer/DataSourceGStreamer.cpp: Removed.
1326         * platform/graphics/gstreamer/DataSourceGStreamer.h: Removed.
1327         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1328         (WebCore::doGstInit):
1329
1330 2010-12-10  Zoltan Herczeg  <zherczeg@webkit.org>
1331
1332         Reviewed by Eric Seidel.
1333
1334         [Qt] Fix crashes in debug mode
1335         https://bugs.webkit.org/show_bug.cgi?id=49976
1336
1337         The m_methods hashmap of QtInstance contains InternalFunctions
1338         whose depend on the current RuntimeObject. When we recreate the
1339         RuntimeObject, we should also reset this hashmap.
1340
1341         * bridge/qt/qt_instance.cpp:
1342         (JSC::Bindings::QtInstance::newRuntimeObject):
1343
1344 2010-12-10  François Sausset  <sausset@gmail.com>
1345
1346         Reviewed by Eric Seidel.
1347
1348         MathML: update baselinePosition() call in RenderMathMLBlock.cpp 
1349         https://bugs.webkit.org/show_bug.cgi?id=50540
1350
1351         The call of baselinePosition() is outdated: new arguments added.
1352
1353         * mathml/RenderMathMLBlock.cpp:
1354         (WebCore::RenderMathMLBlock::paint):
1355
1356 2010-12-10  Hans Wennborg  <hans@chromium.org>
1357
1358         Reviewed by Jeremy Orlow.
1359
1360         IndexedDB: Numeric keys are floats.
1361         https://bugs.webkit.org/show_bug.cgi?id=50674
1362
1363         Use floating point to represent numeric keys,
1364         add version meta data to the SQLite db,
1365         and migrate object stores that use integers.
1366
1367         * bindings/v8/IDBBindingUtilities.cpp:
1368         (WebCore::createIDBKeyFromValue):
1369         * bindings/v8/custom/V8IDBKeyCustom.cpp:
1370         (WebCore::toV8):
1371         * storage/IDBFactoryBackendImpl.cpp:
1372         (WebCore::createTables):
1373         (WebCore::migrateDatabase):
1374         (WebCore::IDBFactoryBackendImpl::open):
1375         * storage/IDBKey.cpp:
1376         (WebCore::IDBKey::IDBKey):
1377         (WebCore::IDBKey::fromQuery):
1378         (WebCore::IDBKey::bind):
1379         (WebCore::IDBKey::bindWithNulls):
1380         * storage/IDBKey.h:
1381         (WebCore::IDBKey::create):
1382         (WebCore::IDBKey::number):
1383
1384 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
1385
1386         Reviewed by Xan Lopez.
1387
1388         [Gtk] style="font-family: courier" makes text disappear
1389         https://bugs.webkit.org/show_bug.cgi?id=47452
1390
1391         Don't ever use fonts that do not have any of the three charmaps that
1392         Fontconfig supports (Unicode, Apple Roman and Symbol). If we select
1393         a font that doesn't have one of these charmaps, use the next font in
1394         the list.
1395
1396         Test: platform/gtk/fonts/font-with-no-valid-encoding.html
1397
1398         * platform/graphics/freetype/FontCacheFreeType.cpp:
1399         (WebCore::FontCache::createFontPlatformData): Check whether the
1400         font we selected has a valid Fontconfig charmap.
1401         * platform/graphics/freetype/FontPlatformData.h: Added new method definition.
1402         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1403         (WebCore::FontPlatformData::hasCompatibleCharmap): Added this method which
1404         verifies that a font has a valid Fontconfig charmap.
1405
1406 2010-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1407
1408         Reviewed by Ojan Vafai.
1409
1410         Make DOM Mutation Events Asynchronous
1411         https://bugs.webkit.org/show_bug.cgi?id=46936
1412
1413         Implemented DOM mutations events as scoped events. A scoped event is an event whose
1414         dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
1415         EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
1416         on its constructor and destructor respectively.
1417
1418         When the scoping level is 0 (initial level), scoped events are dispatched as soon as
1419         they are enqueued and act like synchronous events. When the scoping level is greater than 0,
1420         however, events are queued in ScopedEventQueue and their dispatches are delayed until
1421         the scoping level goes back to 0 (by the destruction of EventQueueScope).
1422
1423         DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
1424         DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
1425         scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
1426         of the events until the completion of each call of EditCommand::doApply.
1427
1428         Test: fast/events/mutation/execCommands.html
1429
1430         * Android.mk: Added ScopedEventQueue.cpp.
1431         * CMakeLists.txt: Ditto.
1432         * WebCore.pro: Ditto.
1433         * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
1434         * WebCore.gypi:  Ditto.
1435         * WebCore.vcproj/project.vcproj: Ditto.
1436         * WebCore.xcodeproj/project.pbxproj: Ditto.
1437         * dom/ContainerNode.cpp:
1438         (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
1439         (WebCore::dispatchChildRemovalEvents): Ditto.
1440         * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
1441         * dom/Element.cpp:
1442         (WebCore::Element::dispatchAttrRemovalEvent): Ditto. 
1443         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
1444         * dom/Node.cpp:
1445         (WebCore::Node::dispatchScopedEvent): Added.
1446         (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
1447         * dom/Node.h:
1448         * dom/ScopedEventQueue.cpp: Added.
1449         (WebCore::ScopedEventQueue::initialize): Added.
1450         (WebCore::ScopedEventQueue::enqueueEvent): Added.
1451         (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
1452         (WebCore::ScopedEventQueue::dispatchEvent): Added.
1453         (WebCore::ScopedEventQueue::instance): Added.
1454         (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
1455         (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
1456         * dom/ScopedEventQueue.h: Added.
1457         (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
1458         (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
1459         (WebCore::EventQueueScope::EventQueueScope): Added.
1460         (WebCore::EventQueueScope::~EventQueueScope): Added.
1461         * editing/EditCommand.cpp:
1462         (WebCore::EditCommand::apply): Instantiates EventQueueScope.
1463
1464 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1465
1466         Unreviewed, rolling out r73684.
1467         http://trac.webkit.org/changeset/73684
1468         https://bugs.webkit.org/show_bug.cgi?id=50801
1469
1470         "missing bug number" (Requested by rniwa on #webkit).
1471
1472         * Android.mk:
1473         * CMakeLists.txt:
1474         * GNUmakefile.am:
1475         * WebCore.gypi:
1476         * WebCore.pro:
1477         * WebCore.vcproj/WebCore.vcproj:
1478         * WebCore.xcodeproj/project.pbxproj:
1479         * dom/ContainerNode.cpp:
1480         (WebCore::dispatchChildInsertionEvents):
1481         (WebCore::dispatchChildRemovalEvents):
1482         * dom/DOMAllInOne.cpp:
1483         * dom/Element.cpp:
1484         (WebCore::Element::dispatchAttrRemovalEvent):
1485         (WebCore::Element::dispatchAttrAdditionEvent):
1486         * dom/Node.cpp:
1487         (WebCore::Node::dispatchSubtreeModifiedEvent):
1488         (WebCore::Node::dispatchUIEvent):
1489         * dom/Node.h:
1490         * dom/ScopedEventQueue.cpp: Removed.
1491         * dom/ScopedEventQueue.h: Removed.
1492         * editing/EditCommand.cpp:
1493         (WebCore::EditCommand::apply):
1494
1495 2010-12-09  Qi Zhang  <qi.2.zhang@nokia.com>
1496
1497         Reviewed by Kenneth Rohde Christiansen.
1498
1499         [Qt] enable orientation flag when QtMobility available
1500         https://bugs.webkit.org/show_bug.cgi?id=50781
1501
1502         When QtMobility available, enable orientation flag by default.
1503
1504         * features.pri:
1505
1506 2010-12-09  Kenichi Ishibashi  <bashi@google.com>
1507
1508         Reviewed by Kent Tamura.
1509
1510         Improve validation API support of <object> and <keygen>
1511         https://bugs.webkit.org/show_bug.cgi?id=50663
1512
1513         Adds validation API to HTMLObjectElement class.
1514         Makes HTMLKeygenElement::willValidate() return false.
1515
1516         Test: fast/forms/setCustomValidity-existence.html
1517
1518         * html/HTMLKeygenElement.h:
1519         (WebCore::HTMLKeygenElement::willValidate): Added.
1520         * html/HTMLObjectElement.h:
1521         (WebCore::HTMLObjectElement::validationMessage): Added.
1522         (WebCore::HTMLObjectElement::checkValidity): Added.
1523         (WebCore::HTMLObjectElement::setCustomValidity): Added.
1524         * html/HTMLObjectElement.idl: Added validation API properties.
1525
1526 2010-12-09  Sadrul Habib Chowdhury  <sadrul@chromium.org>
1527
1528         Reviewed by Kent Tamura.
1529
1530         Make sure a non-zero value is used for tile-width to avoid a crash
1531         https://bugs.webkit.org/show_bug.cgi?id=50341
1532
1533         The scaled tile width can be very small at times (e.g. with 'style: font 1
1534         required'). So use a minimum width of 1 instead of using 0 (which leads to a
1535         crash).
1536
1537         Tests: fast/dom/HTMLProgressElement/progress-element-with-style-crash.html
1538
1539         * rendering/RenderThemeChromiumSkia.cpp:
1540         (WebCore::RenderThemeChromiumSkia::paintProgressBar):
1541
1542 2010-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1543
1544         Reviewed by Ojan Vafai.
1545
1546         Implemented DOM mutations events as scoped events. A scoped event is an event whose
1547         dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
1548         EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
1549         on its constructor and destructor respectively.
1550
1551         When the scoping level is 0 (initial level), scoped events are dispatched as soon as
1552         they are enqueued and act like synchronous events. When the scoping level is greater than 0,
1553         however, events are queued in ScopedEventQueue and their dispatches are delayed until
1554         the scoping level goes back to 0 (by the destruction of EventQueueScope).
1555
1556         DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
1557         DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
1558         scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
1559         of the events until the completion of each call of EditCommand::doApply.
1560
1561         Test: fast/events/mutation/execCommands.html
1562
1563         * Android.mk: Added ScopedEventQueue.cpp.
1564         * CMakeLists.txt: Ditto.
1565         * WebCore.pro: Ditto.
1566         * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
1567         * WebCore.gypi:  Ditto.
1568         * WebCore.vcproj/project.vcproj: Ditto.
1569         * WebCore.xcodeproj/project.pbxproj: Ditto.
1570         * dom/ContainerNode.cpp:
1571         (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
1572         (WebCore::dispatchChildRemovalEvents): Ditto.
1573         * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
1574         * dom/Element.cpp:
1575         (WebCore::Element::dispatchAttrRemovalEvent): Ditto. 
1576         (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
1577         * dom/Node.cpp:
1578         (WebCore::Node::dispatchScopedEvent): Added.
1579         (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
1580         * dom/Node.h:
1581         * dom/ScopedEventQueue.cpp: Added.
1582         (WebCore::ScopedEventQueue::initialize): Added.
1583         (WebCore::ScopedEventQueue::enqueueEvent): Added.
1584         (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
1585         (WebCore::ScopedEventQueue::dispatchEvent): Added.
1586         (WebCore::ScopedEventQueue::instance): Added.
1587         (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
1588         (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
1589         * dom/ScopedEventQueue.h: Added.
1590         (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
1591         (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
1592         (WebCore::EventQueueScope::EventQueueScope): Added.
1593         (WebCore::EventQueueScope::~EventQueueScope): Added.
1594         * editing/EditCommand.cpp:
1595         (WebCore::EditCommand::apply): Instantiates EventQueueScope.
1596
1597 2010-12-09  Sam Weinig  <sam@webkit.org>
1598
1599         Reviewed by Gavin Barraclough.
1600
1601         Fix scrolling with mouse wheel in WebKit2 views.  Once
1602         we coalesce wheel events, we can re-enable this.
1603
1604         * platform/mac/ScrollAnimatorMac.mm:
1605         (WebCore::ScrollAnimatorMac::scroll):
1606
1607 2010-12-09  Abhishek Arya  <inferno@chromium.org>
1608
1609         Reviewed by James Robinson.
1610
1611         For details element, ensure that if we ended up being inline that we set out replaced
1612         flag so that we are treated like an inline block.
1613         https://bugs.webkit.org/show_bug.cgi?id=50671
1614
1615         Test: fast/html/details-element-render-inline-crash.html
1616
1617         * rendering/RenderDetails.cpp:
1618         (WebCore::RenderDetails::styleDidChange): setReplaced to true if we are set as inline.
1619         * rendering/RenderDetails.h: function definition.
1620
1621 2010-12-09  Jasmin Lapalme  <jlapalme@druide.com>
1622
1623         Reviewed by Alexey Proskuryakov.
1624
1625         Fix a faulty conversion from UTF-8 to UTF-16 in WebCore during an XSLT transformation.
1626         https://bugs.webkit.org/show_bug.cgi?id=50708
1627
1628         Test: fast/xsl/utf8-chunks.xml
1629
1630         * xml/XSLTProcessorLibxslt.cpp:
1631         (WebCore::writeToVector): now converts and returns the correct byte count when the end of the chunk is in the middle of a multibyte UTF-8 character.
1632
1633 2010-12-09  Vincent Scheib  <scheib@chromium.org>
1634
1635         Reviewed by James Robinson.
1636
1637         Clip update rectangle for Texture::updateSubRect to texture size
1638         https://bugs.webkit.org/show_bug.cgi?id=49929
1639
1640         Test: fast/canvas/canvas-largedraws.html
1641
1642         * platform/graphics/gpu/Texture.cpp:
1643         (WebCore::Texture::updateSubRect):
1644
1645 2010-12-09  Kenneth Russell  <kbr@google.com>
1646
1647         Unreviewed. Another speculative Gtk build fix after r73669. Add
1648         needed derived sources to GNUmakefile.am.
1649
1650         * GNUmakefile.am:
1651
1652 2010-12-09  Kenneth Russell  <kbr@google.com>
1653
1654         Unreviewed. Speculative Gtk build fix after
1655         https://bugs.webkit.org/show_bug.cgi?id=36512 / r73669. Process
1656         all of the WebGL classes' IDL files.
1657
1658         * CMakeLists.txt:
1659
1660 2010-12-09  Zhenyao Mo  <zmo@google.com>
1661
1662         Reviewed by Kenneth Russell.
1663
1664         Expose constructor functions for instanceof checks of WebGL objects
1665         https://bugs.webkit.org/show_bug.cgi?id=36512
1666
1667         Test: fast/canvas/webgl/instanceof-test.html
1668
1669         * bindings/generic/RuntimeEnabledFeatures.h:
1670         (WebCore::RuntimeEnabledFeatures::webGLActiveInfoEnabled):
1671         (WebCore::RuntimeEnabledFeatures::webGLBufferEnabled):
1672         (WebCore::RuntimeEnabledFeatures::webGLFramebufferEnabled):
1673         (WebCore::RuntimeEnabledFeatures::webGLProgramEnabled):
1674         (WebCore::RuntimeEnabledFeatures::webGLRenderbufferEnabled):
1675         (WebCore::RuntimeEnabledFeatures::webGLShaderEnabled):
1676         (WebCore::RuntimeEnabledFeatures::webGLTextureEnabled):
1677         (WebCore::RuntimeEnabledFeatures::webGLUniformLocationEnabled):
1678         * html/canvas/WebGLActiveInfo.idl: Remove OmitConstructor.
1679         * html/canvas/WebGLBuffer.idl: Ditto.
1680         * html/canvas/WebGLFramebuffer.idl: Ditto.
1681         * html/canvas/WebGLProgram.idl: Ditto.
1682         * html/canvas/WebGLRenderbuffer.idl: Ditto.
1683         * html/canvas/WebGLShader.idl: Ditto.
1684         * html/canvas/WebGLTexture.idl: Ditto.
1685         * html/canvas/WebGLUniformLocation.idl: Ditto.
1686         * page/DOMWindow.idl: Expose constructors for WebGL objects in DOMWindow.
1687
1688 2010-12-09  Timothy Hatcher  <timothy@apple.com>
1689
1690         Export Color::white and Color::transparent.
1691
1692         Reviewed by Anders Carlsson.
1693
1694         * WebCore.exp.in:
1695
1696 2010-12-09  Sam Weinig  <sam@webkit.org>
1697
1698         Fix failing Mac tests.
1699
1700         * platform/mac/ScrollAnimatorMac.mm:
1701         (WebCore::ScrollAnimatorMac::scroll): Don't smooth scroll if the default
1702         AppleScrollAnimationEnabled is false.
1703
1704 2010-12-09  James Robinson  <jamesr@chromium.org>
1705
1706         Reviewed by Kenneth Russell.
1707
1708         [chromium] Compositor needs to manage its VRAM use
1709         https://bugs.webkit.org/show_bug.cgi?id=49629
1710
1711         This adds a basic texture manager to the Chromium compositor to limit the amount of VRAM
1712         used by compositor textures and switches ContentLayerChromium, ImageLayerChromium, and
1713         RenderSurfaceChromium to use managed LayerTexture.  The other *LayerChromium classes (Canvas,
1714         Video, and WebGL) and the root layer are still unmanaged.
1715
1716         The TextureManager works by providing tokens to callers that want to use a managed texture.
1717         The token can be used to request a texture, see if the previously requested texture is still
1718         available, and to protect/unprotect textures when they cannot be collected.  Whenever a
1719         texture is created the manager attempts to free up the least recently used textures until the
1720         total memory use is below the provided threshhold.  If the manager cannot satisfy the memory
1721         limit it will not return any new textures until some old textures are released.
1722
1723         A LayerTexture wraps a TextureManager token, size, and format.  A LayerChromium can check if a
1724         previously requested texture is still available for use and reserve the LayerTexture's underlying
1725         storage between the updateContentsIfDirty() and the draw() call.
1726
1727         Also changes LayerChromium from having separate contentsDirty()/updateContents() calls to a single
1728         updateContentsIfDirty().
1729
1730         Tests: platform/chromium/compositing/lots-of-img-layers-with-opacity.html
1731                platform/chromium/compositing/lots-of-img-layers.html
1732
1733         * WebCore.gypi:
1734         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1735         (WebCore::Canvas2DLayerChromium::updateContentsIfDirty):
1736         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1737         * platform/graphics/chromium/ContentLayerChromium.cpp:
1738         (WebCore::ContentLayerChromium::cleanupResources):
1739         (WebCore::ContentLayerChromium::updateContentsIfDirty):
1740         (WebCore::ContentLayerChromium::updateTextureRect):
1741         (WebCore::ContentLayerChromium::draw):
1742         * platform/graphics/chromium/ContentLayerChromium.h:
1743         * platform/graphics/chromium/ImageLayerChromium.cpp:
1744         (WebCore::ImageLayerChromium::updateContentsIfDirty):
1745         * platform/graphics/chromium/ImageLayerChromium.h:
1746         * platform/graphics/chromium/LayerChromium.h:
1747         (WebCore::LayerChromium::updateContentsIfDirty):
1748         (WebCore::LayerChromium::draw):
1749         * platform/graphics/chromium/LayerRendererChromium.cpp:
1750         (WebCore::LayerRendererChromium::LayerRendererChromium):
1751         (WebCore::LayerRendererChromium::useShader):
1752         (WebCore::LayerRendererChromium::prepareToDrawLayers):
1753         (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
1754         (WebCore::LayerRendererChromium::drawLayers):
1755         (WebCore::LayerRendererChromium::getFramebufferPixels):
1756         (WebCore::LayerRendererChromium::createLayerTexture):
1757         (WebCore::LayerRendererChromium::deleteLayerTexture):
1758         (WebCore::LayerRendererChromium::updateLayersRecursive):
1759         (WebCore::LayerRendererChromium::useRenderSurface):
1760         (WebCore::LayerRendererChromium::drawLayer):
1761         (WebCore::LayerRendererChromium::setScissorToRect):
1762         (WebCore::LayerRendererChromium::setDrawViewportRect):
1763         (WebCore::LayerRendererChromium::initializeSharedObjects):
1764         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1765         * platform/graphics/chromium/LayerRendererChromium.h:
1766         (WebCore::LayerRendererChromium::renderSurfaceSharedValues):
1767         (WebCore::LayerRendererChromium::textureManager):
1768         * platform/graphics/chromium/LayerTexture.cpp: Added.
1769         (WebCore::LayerTexture::LayerTexture):
1770         (WebCore::LayerTexture::~LayerTexture):
1771         (WebCore::LayerTexture::isValid):
1772         (WebCore::LayerTexture::reserve):
1773         (WebCore::LayerTexture::unreserve):
1774         (WebCore::LayerTexture::bindTexture):
1775         (WebCore::LayerTexture::framebufferTexture2D):
1776         * platform/graphics/chromium/LayerTexture.h: Added.
1777         (WebCore::LayerTexture::create):
1778         * platform/graphics/chromium/PluginLayerChromium.cpp:
1779         (WebCore::PluginLayerChromium::updateContentsIfDirty):
1780         * platform/graphics/chromium/PluginLayerChromium.h:
1781         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1782         (WebCore::RenderSurfaceChromium::SharedValues::SharedValues):
1783         (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues):
1784         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
1785         (WebCore::RenderSurfaceChromium::cleanupResources):
1786         (WebCore::RenderSurfaceChromium::prepareContentsTexture):
1787         (WebCore::RenderSurfaceChromium::draw):
1788         * platform/graphics/chromium/RenderSurfaceChromium.h:
1789         (WebCore::RenderSurfaceChromium::SharedValues::shaderProgram):
1790         (WebCore::RenderSurfaceChromium::SharedValues::shaderSamplerLocation):
1791         (WebCore::RenderSurfaceChromium::SharedValues::shaderMatrixLocation):
1792         (WebCore::RenderSurfaceChromium::SharedValues::shaderAlphaLocation):
1793         (WebCore::RenderSurfaceChromium::SharedValues::initialized):
1794         * platform/graphics/chromium/TextureManager.cpp: Added.
1795         (WebCore::memoryUseBytes):
1796         (WebCore::TextureManager::TextureManager):
1797         (WebCore::TextureManager::getToken):
1798         (WebCore::TextureManager::releaseToken):
1799         (WebCore::TextureManager::hasTexture):
1800         (WebCore::TextureManager::protectTexture):
1801         (WebCore::TextureManager::unprotectTexture):
1802         (WebCore::TextureManager::reduceMemoryToLimit):
1803         (WebCore::TextureManager::addTexture):
1804         (WebCore::TextureManager::removeTexture):
1805         (WebCore::TextureManager::requestTexture):
1806         * platform/graphics/chromium/TextureManager.h: Added.
1807         (WebCore::TextureManager::create):
1808         * platform/graphics/chromium/VideoLayerChromium.cpp:
1809         (WebCore::VideoLayerChromium::updateContentsIfDirty):
1810         * platform/graphics/chromium/VideoLayerChromium.h:
1811         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1812         (WebCore::WebGLLayerChromium::updateContentsIfDirty):
1813         * platform/graphics/chromium/WebGLLayerChromium.h:
1814
1815 2010-12-09  Darin Adler  <darin@apple.com>
1816
1817         Reviewed by Sam Weinig.
1818
1819         Rework my recent setLocation refactoring to use DOMWindow instead of Frame.
1820         It's difficult to make correct security decisions based on Frame since a
1821         Frame can navigate to a new document.
1822
1823         Fixes some test failures that I somehow missed before the last check-in.
1824
1825         * bindings/js/JSDOMWindowBase.cpp:
1826         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Call to the
1827         shell DOMWindow; not sure this one matters, but it's closer to the old
1828         code before my last patch. Also pass the DOMWindow rather than the
1829         frame to crossDomainAccessErrorMessage.
1830
1831         * bindings/js/JSDOMWindowCustom.cpp:
1832         (WebCore::JSDOMWindow::setLocation): Pass DOMWindow rather than Frame
1833         to the DOMWindow::setLocation function.
1834
1835         * page/DOMWindow.cpp:
1836         (WebCore::DOMWindow::setLocation): Take DOMWindow rather than Frame.
1837         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Ditto.
1838
1839         * page/DOMWindow.h: Update new functions to take DOMWindow rather
1840         than Frame.
1841
1842 2010-12-09  Sam Weinig  <sam@webkit.org>
1843
1844         Try and fix the mac build.
1845
1846         * WebCore.exp.in:
1847
1848 2010-12-09  Dan Bernstein  <mitz@apple.com>
1849
1850         Reviewed by Dave Hyatt.
1851
1852         Removed an unused variable.
1853
1854         * rendering/InlineFlowBox.cpp:
1855         (WebCore::InlineFlowBox::computeLogicalBoxHeights): Removed parentLineHeight.
1856
1857 2010-12-09  Darin Adler  <darin@apple.com>
1858
1859         Reviewed by Geoffrey Garen.
1860
1861         Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
1862         https://bugs.webkit.org/show_bug.cgi?id=50640
1863
1864         * bindings/js/JSDOMBinding.cpp:
1865         (WebCore::printErrorMessageForFrame): Removed body; just call through to
1866         DOMWindow::printErrorMessage.
1867
1868         * bindings/js/JSDOMWindowBase.cpp:
1869         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
1870         just call through to DOMWindow::crossDomainAccessErrorMessage.
1871
1872         * bindings/js/JSDOMWindowCustom.cpp:
1873         (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
1874         firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
1875         of the body and moved it into DOMWindow::setLocation.
1876
1877         * page/DOMWindow.cpp:
1878         (WebCore::DOMWindow::setLocation): Added. Does all the same work that
1879         JSDOMWindow::setLocation used to do, but in a way that's not specific
1880         to JavaScript.
1881         (WebCore::DOMWindow::printErrorMessage): Added.
1882         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
1883
1884         * page/DOMWindow.h: Added setLocation, printErrorMessage, and
1885         crossDomainAccessErrorMessage.
1886
1887 2010-12-09  Sam Weinig  <sam@webkit.org>
1888
1889         Reviewed by Dan Bernstein.
1890
1891         WebKit2 needs smooth scrolling support on the mac
1892         <rdar://problem/8219402>
1893
1894         * WebCore.xcodeproj/project.pbxproj: Change ScrollAnimatorMac.cpp to ScrollAnimatorMac.mm.
1895         * platform/mac/ScrollAnimatorMac.cpp: Removed.
1896         * platform/mac/ScrollAnimatorMac.h:
1897         * platform/mac/ScrollAnimatorMac.mm: Copied from platform/mac/ScrollAnimatorMac.cpp.
1898         (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
1899         (-[ScrollAnimationHelperDelegate bounds]):
1900         (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
1901         (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
1902         (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
1903         (-[ScrollAnimationHelperDelegate superview]):
1904         (-[ScrollAnimationHelperDelegate documentView]):
1905         (-[ScrollAnimationHelperDelegate window]):
1906         (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
1907         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1908         (WebCore::ScrollAnimatorMac::scroll):
1909         (WebCore::ScrollAnimatorMac::setScrollPositionAndStopAnimation):
1910         (WebCore::ScrollAnimatorMac::currentPosition):
1911         (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
1912         Add implementation of ScrollAnimator for the Mac.
1913
1914 2010-12-09  Brady Eidson  <beidson@apple.com>
1915
1916         Reviewed by Anders Carlsson.
1917
1918         <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
1919         WebKit2 ContextMenuClient support
1920
1921         Export some symbols and headers needed by WebKit2 Mac:
1922         * WebCore.exp.in:
1923         * WebCore.xcodeproj/project.pbxproj:
1924
1925 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1926
1927         Unreviewed, rolling out r73635.
1928         http://trac.webkit.org/changeset/73635
1929         https://bugs.webkit.org/show_bug.cgi?id=50778
1930
1931         'Side-effects on 3 css tests needs closer review' (Requested
1932         by mwenge on #webkit).
1933
1934         * platform/graphics/qt/ImageQt.cpp:
1935         (loadResourcePixmap):
1936         * platform/qt/RenderThemeQt.cpp:
1937         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1938         (WebCore::RenderThemeQt::paintSearchField):
1939         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
1940         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
1941         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1942         * platform/qt/RenderThemeQt.h:
1943
1944 2010-12-09  Robert Hogan  <robert@webkit.org>
1945
1946         Reviewed by Andreas Kling.
1947
1948         [Qt] Search input field doesn't have cancel button
1949
1950         Add a cancel button to the search field and make it customizable
1951         by the client. For now, use the close dialog button associated
1952         with the application's style as the default.
1953
1954         https://bugs.webkit.org/show_bug.cgi?id=42887
1955
1956         * platform/graphics/qt/ImageQt.cpp:
1957         (loadResourcePixmap):
1958         * platform/qt/RenderThemeQt.cpp:
1959         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1960         (WebCore::RenderThemeQt::paintSearchField):
1961         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
1962         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
1963         (WebCore::RenderThemeQt::convertToPaintingRect):
1964         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1965         * platform/qt/RenderThemeQt.h:
1966
1967 2010-12-09  Yael Aharon  <yael.aharon@nokia.com>
1968
1969         Reviewed by Antonio Gomes.
1970
1971         Spatial Navigation: Crash when handling iframe of size 0.
1972         https://bugs.webkit.org/show_bug.cgi?id=50730
1973
1974         if we have a frame of size 0, we would get into infinite loop and eventually crash. The reason is
1975         that when the algorithm sees a starting rect of size 0, it assumes that there is no focused node,
1976         thus restarts itself. The solution is to avoid considering iframes with size 0 for the spatial
1977         navigation algorithm.
1978
1979         Test: fast/spatial-navigation/snav-hidden-iframe-zero-size.html
1980
1981         * page/FocusController.cpp:
1982         (WebCore::updateFocusCandidateIfNeeded):
1983
1984 2010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1985
1986         Unreviewed, rolling out r73616.
1987         http://trac.webkit.org/changeset/73616
1988         https://bugs.webkit.org/show_bug.cgi?id=50772
1989
1990         Breaks chromium win build (Requested by hwennborg on #webkit).
1991
1992         * bindings/v8/IDBBindingUtilities.cpp:
1993         (WebCore::createIDBKeyFromValue):
1994         * bindings/v8/custom/V8IDBKeyCustom.cpp:
1995         (WebCore::toV8):
1996         * storage/IDBFactoryBackendImpl.cpp:
1997         (WebCore::createTables):
1998         (WebCore::IDBFactoryBackendImpl::open):
1999         * storage/IDBKey.cpp:
2000         (WebCore::IDBKey::IDBKey):
2001         (WebCore::IDBKey::fromQuery):
2002         (WebCore::IDBKey::bind):
2003         (WebCore::IDBKey::bindWithNulls):
2004         * storage/IDBKey.h:
2005         (WebCore::IDBKey::create):
2006         (WebCore::IDBKey::number):
2007
2008 2010-12-09  Antonio Gomes  <agomes@rim.com>
2009
2010         Rubber stamped by by Gustavo Noronha Silva.
2011
2012         Buildfix for GTK+ with building with -no-video.
2013
2014         paintStockIcon static function was implemented under the ENABLE(VIDEO) guard
2015         but used from outside the guard. See RenderThemeGtk::paintSearchFieldResultsDecoration()
2016         and RenderThemeGtk::paintSearchFieldCancelButton() methods.
2017
2018         * platform/gtk/RenderThemeGtk.cpp:
2019         (WebCore::getMediaElementFromRenderObject):
2020
2021 2010-12-07  Antonio Gomes  <agomes@rim.com>
2022
2023         Reviewed by Daniel Bates.
2024
2025         Spatial Navigation: code clean up
2026         https://bugs.webkit.org/show_bug.cgi?id=50666
2027
2028         Patch unifies two FocusCandidate constructors, making caller sites
2029         simpler. Now the special handling HTMLAreaElement gets is done within
2030         the non default constructor (i.e. FocusCanditate(Node*, FocusDirection)).
2031
2032         No new tests needed.
2033
2034         * page/FocusController.cpp:
2035         (WebCore::FocusController::findFocusCandidateInContainer):
2036         * page/SpatialNavigation.cpp:
2037         (WebCore::FocusCandidate::FocusCandidate):
2038
2039 2010-12-09  Philippe Normand  <pnormand@igalia.com>
2040
2041         Reviewed by Eric Carlson.
2042
2043         [GStreamer] disable fullscreen on MacOS Tiger and Leopard
2044         https://bugs.webkit.org/show_bug.cgi?id=50748
2045
2046         Don't support fullscreen video on Tiger and Leopard, just like the
2047         QTKit player.
2048
2049         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2050         (WebCore::MediaPlayerPrivateGStreamer::supportsFullscreen):
2051
2052 2010-12-06  Philippe Normand  <pnormand@igalia.com>
2053
2054         Reviewed by Martin Robinson.
2055
2056         [GTK] Support the Mozilla-style Fullscreen Javascript API
2057         https://bugs.webkit.org/show_bug.cgi?id=50572
2058
2059         * GNUmakefile.am: enable the Javascript Fullscreen API feature if
2060         it's been requested at configure time.
2061
2062 2010-12-09  Yong Li  <yoli@rim.com>
2063
2064         Reviewed by Darin Adler.
2065
2066         Check the return value of ImageBuffer::create()
2067         to avoid crash when ImageBuffer::create() fails.
2068         https://bugs.webkit.org/show_bug.cgi?id=50631
2069
2070         No new test because it relies on the platform implementation
2071         of ImageBuffer. It is hard to make ImageBuffer::create() fail
2072         in most ports.
2073
2074         * platform/graphics/GeneratedImage.cpp:
2075         (WebCore::GeneratedImage::drawPattern):
2076
2077 2010-12-09  Maciej Stachowiak  <mjs@apple.com>
2078
2079         Reviewed by Dan Bernstein.
2080
2081         Implement "Use Selection for Find" in WebKit2
2082         https://bugs.webkit.org/show_bug.cgi?id=50737
2083         <rdar://problem/8564881>
2084
2085         Implement a TakeFindStringFromSelection editor command. This is
2086         used solely to implement the "Use Selection for Find" menu command
2087         on Mac, and is not made available to script. On WebKit2, it is
2088         very convenient to reuse the editing machinery since this command
2089         is very similar to Copy.
2090
2091         * editing/Editor.h:
2092         * editing/EditorCommand.cpp:
2093         (WebCore::executeTakeFindStringFromSelection): Call to a mac-only Editor function.
2094         (WebCore::enabledTakeFindStringFromSelection): Check using Editor::canCopyExcludingStandaloneImage
2095         (WebCore::createCommandMap): Add "TakeFindStringFromSelection" command.
2096         * editing/mac/EditorMac.mm:
2097         (WebCore::Editor::canCopyExcludingStandaloneImages): Helper function; we can't use Editor::canCopy
2098         since it would make no sense to enable "Use Selection for Find" when viewing a standalone image
2099         document.
2100         (WebCore::Editor::takeFindStringFromSelection): Implement by copying the selected text
2101         to the special Find pasteboard.
2102
2103 2010-12-09  Abhishek Arya  <inferno@chromium.org>
2104
2105         Reviewed by Dimitri Glazkov.
2106
2107         As part of r73559, I added the referenceNode check to validate whether the root
2108         node of the iterator matches the node which is getting moved to other document.
2109         referenceNode is initialized to root, however can get moved using previousNode
2110         and nextNode methods, so it is required to use root directly.
2111         https://bugs.webkit.org/show_bug.cgi?id=50764
2112
2113         Test: fast/dom/node-iterator-reference-node-moved-crash.html
2114
2115         * dom/Document.cpp:
2116         (WebCore::Document::moveNodeIteratorsToNewDocument): change referenceNode to root.
2117
2118 2010-12-08  Dimitri Glazkov  <dglazkov@chromium.org>
2119
2120         Reviewed by Darin Adler.
2121
2122         Provide a generic way to store shadowParent on a Node.
2123         https://bugs.webkit.org/show_bug.cgi?id=50184
2124
2125         This patch makes TreeShared::m_parent act as either parentNode() or
2126         shadowHost() for Node. The distinction is controlled by IsShadowRootFlag.
2127
2128         Refactoring, so no new tests. See performance result testing in bug.
2129
2130         * dom/Element.cpp:
2131         (WebCore::Element::recalcStyle): Changed to use parentOrHostNode().
2132         * dom/Node.cpp:
2133         (WebCore::Node::shadowHost): Added.
2134         (WebCore::Node::setShadowHost): Added.
2135         (WebCore::Node::isContentEditable): Changed to use parentOrHostNode().
2136         (WebCore::Node::isContentRichlyEditable): Ditto.
2137         (WebCore::Node::nextRenderer): Ditto.
2138         (WebCore::Node::virtualComputedStyle): Ditto.
2139         (WebCore::Node::canStartSelection): Ditto.
2140         (WebCore::Node::shadowTreeRootNode): Changed to use parentNodeGuaranteedHostFree().
2141         (WebCore::Node::getEventAncestors): Ditto.
2142         (WebCore::Node::defaultEventHandler): Changed to use parentOrHostNode(). 
2143         * dom/Node.h: Added an extra flag and adjusted bit counts.
2144         (WebCore::Node::isShadowNode): Made non-virtual, switched to use flag.
2145         (WebCore::Node::parentNode): Made to recognize flag.
2146         (WebCore::Node::parentOrHostNode): Changed to use straight parent() and made const.
2147         (WebCore::Node::parentNodeGuaranteedHostFree): Added.
2148         (WebCore::Node::shadowParentNode): Made non-virtual and const.
2149         * editing/TextIterator.cpp:
2150         (WebCore::depthCrossingShadowBoundaries): Changed to use parentOrHostNode();
2151         (WebCore::nextInPreOrderCrossingShadowBoundaries): Ditto.
2152         (WebCore::previousInPostOrderCrossingShadowBoundaries):  Ditto.
2153         (WebCore::setUpFullyClippedStack): Ditto.
2154         (WebCore::TextIterator::advance): Ditto.
2155         (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto.
2156         * page/DOMSelection.cpp:
2157         (WebCore::DOMSelection::anchorNode): Changed to use parentNodeGuaranteedHostFree().
2158         (WebCore::DOMSelection::focusNode): Ditto.
2159         (WebCore::DOMSelection::baseNode): Ditto.
2160         (WebCore::DOMSelection::extentNode): Ditto.
2161         (WebCore::DOMSelection::getRangeAt): Ditto.
2162         * rendering/MediaControlElements.cpp:
2163         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
2164             Changed to setShadowHost().
2165         (WebCore::MediaControlShadowRootElement::updateStyle): Changed to use shadowHost().
2166         (WebCore::MediaControlShadowRootElement::detach): Added an override to
2167             explicitly set shadowHost to 0. Otherwise, the element will leak.
2168         * rendering/MediaControlElements.h: Added detach def, removed members that are
2169             no longer needed.
2170         * rendering/RenderSVGShadowTreeRootContainer.cpp:
2171         (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
2172             Added explicit clearing of shadowHost to avoid leaking and crashes,
2173             because SVG shadow DOM can be dynamically attached/detached, producing
2174             stale nodes in over/out event handling.
2175         * rendering/RenderSlider.cpp:
2176         (WebCore::SliderThumbElement::defaultEventHandler): Changed to use shadowHost().
2177         * rendering/RenderTextControlSingleLine.cpp:
2178         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2179             Added explicit clearing of shadowHost and explicit destruction to
2180             avoid out-of-order removal of children.
2181         * rendering/RenderTreeAsText.cpp:
2182         (WebCore::nodePosition): Simplified code.
2183         * rendering/SVGShadowTreeElements.cpp:
2184         (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): Added
2185             setting of shadowHost.
2186         (WebCore::SVGShadowTreeRootElement::attachElement): Changed to use shadowHost().
2187         (WebCore::SVGShadowTreeRootElement::clearShadowHost): Added.
2188         * rendering/SVGShadowTreeElements.h: Added def, removed members that are
2189              no longer needed.
2190         * rendering/ShadowElement.cpp:
2191         (WebCore::ShadowBlockElement::initAsPart): Changed to use shadowHost().
2192         * rendering/ShadowElement.h: Removed members that are no longer needed.
2193         (WebCore::ShadowElement::ShadowElement): Added setting of shadowHost.
2194         (WebCore::ShadowElement::detach): Added.
2195         * rendering/TextControlInnerElements.cpp:
2196         (WebCore::TextControlInnerElement::TextControlInnerElement): Added setting
2197             of shadowHost.
2198         (WebCore::TextControlInnerElement::attachInnerElement): Changed to use
2199             isShadowNode().
2200         (WebCore::TextControlInnerElement::detach): Added.
2201         * rendering/TextControlInnerElements.h: Removed members that are no
2202             longer needed.
2203         * svg/SVGElement.cpp:
2204         (WebCore::SVGElement::ownerSVGElement): Simplified code.
2205         (WebCore::SVGElement::viewportElement): Ditto.
2206         * svg/SVGLocatable.cpp:
2207         (WebCore::SVGLocatable::computeCTM): Ditto.
2208         * svg/SVGStyledElement.cpp:
2209         (WebCore::SVGStyledElement::title): Ditto.
2210         * svg/SVGUseElement.cpp:
2211         (WebCore::ShadowTreeUpdateBlocker::while): Ditto.
2212
2213 2010-12-09  Brady Eidson  <beidson@apple.com>
2214
2215         Reviewed by Maciej Stachowiak.
2216
2217         <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
2218         WebKit2 Authentication Support
2219
2220         * WebCore.exp.in:
2221
2222 2010-12-09  Peter Beverloo  <peter@lvp-media.com>
2223
2224         Reviewed by Maciej Stachowiak.
2225
2226         Default CSS definitions for the figure and figcaption elements.
2227
2228         Tests: fast/html/figcaption-element.html
2229                fast/html/figure-element.html
2230
2231         * css/html.css:
2232         (figure): The default figure-style equals a blockquote
2233         (figcaption): A non-sectioning block-level element
2234
2235 2010-12-09  Yury Semikhatsky  <yurys@chromium.org>
2236
2237         Reviewed by Pavel Feldman.
2238
2239         Web Inspector: Console records for failed XHRs should contain call stack and request method
2240         https://bugs.webkit.org/show_bug.cgi?id=50390
2241
2242         When inspector front-end is open we capture call stack at the place where request is sent and
2243         pass the stack along with other request data. There is a new type of console messages which
2244         is NetworkErrorMessageType, all messages of that type will have requestId field initialized
2245         with the corresponding network request identifier so that later on when we need to display
2246         that message in the front-end we could pull request data from the Network panel using
2247         this identifier. If there are no data for given requestId message formatting falls back to
2248         the old implementation which lacks such things as call stack, request method and exact
2249         source location.
2250
2251         * inspector/ConsoleMessage.cpp:
2252         (WebCore::ConsoleMessage::ConsoleMessage):
2253         (WebCore::ConsoleMessage::addToFrontend):
2254         (WebCore::ConsoleMessage::isEqual):
2255         * inspector/ConsoleMessage.h:
2256         * inspector/Inspector.idl:
2257         * inspector/InspectorController.cpp:
2258         (WebCore::InspectorController::didReceiveResponse):
2259         (WebCore::InspectorController::didFailLoading):
2260         * inspector/InspectorResourceAgent.cpp:
2261         (WebCore::InspectorResourceAgent::identifierForInitialRequest):
2262         * inspector/front-end/ConsoleView.js:
2263         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
2264         (WebInspector.ConsoleMessage):
2265         (WebInspector.ConsoleMessage.prototype._formatMessage):
2266         (WebInspector.ConsoleMessage.prototype.toMessageElement):
2267         (WebInspector.ConsoleMessage.prototype.toString):
2268         (WebInspector.ConsoleMessage.prototype.isEqual):
2269         * inspector/front-end/ResourceManager.js:
2270         (WebInspector.ResourceManager.prototype.identifierForInitialRequest):
2271         * inspector/front-end/inspector.js:
2272         (WebInspector.addConsoleMessage):
2273         * page/Console.h:
2274
2275 2010-12-09  Dai Mikurube  <dmikurube@google.com>
2276
2277         Reviewed by Kent Tamura.
2278
2279         Implement "required" attribute for select tags
2280         https://bugs.webkit.org/show_bug.cgi?id=50380
2281
2282         Test: fast/forms/select-live-pseudo-selectors.html
2283               platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
2284
2285         * dom/SelectElement.cpp:
2286         (WebCore::SelectElement::updateValidity): Added. It's a pure virtual function which is prepared so that HTMLSelectElement::updateValidity() calls HTMLSelectElement::setNeedsValidityCheck().
2287         (WebCore::SelectElement::parseMultipleAttribute): Added calling updateValidity().
2288         * html/HTMLSelectElement.cpp:
2289         (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.
2290         (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
2291         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
2292         (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
2293         (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.
2294         (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
2295         (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
2296         (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
2297         (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
2298         (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
2299         (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
2300         (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
2301         (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
2302         (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
2303         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
2304         (WebCore::HTMLSelectElement::updateValidity): Added. It calls setNeedsValidityCheck().
2305         * html/HTMLSelectElement.h:
2306         (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
2307         * html/HTMLSelectElement.idl: Added a required attribute to select elements..
2308         * html/ValidityState.cpp:
2309         (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
2310         * wml/WMLSelectElement.h:
2311         (WebCore::WMLSelectElement::updateValidity): Added. It does nothing.
2312
2313 2010-12-07  Jeremy Orlow  <jorlow@chromium.org>
2314
2315         Reviewed by Steve Block.
2316
2317         IndexedDB returns the wrong exceptions
2318         https://bugs.webkit.org/show_bug.cgi?id=50632
2319
2320         IndexedDB exceptions need to have an offset so they can
2321         be distinguished from DOM exceptions.  We also need to
2322         add strings for the various exceptions.  Lastly, make
2323         IDBDatabaseException use the common exception base class.
2324
2325         * bindings/js/JSDOMBinding.cpp:
2326         (WebCore::setDOMException):
2327         * bindings/v8/V8Proxy.cpp:
2328         (WebCore::V8Proxy::setDOMException):
2329         * dom/ExceptionCode.cpp:
2330         (WebCore::getExceptionCodeDescription):
2331         * dom/ExceptionCode.h:
2332         * storage/IDBDatabaseError.h:
2333         (WebCore::IDBDatabaseError::code):
2334         * storage/IDBDatabaseException.h:
2335         (WebCore::IDBDatabaseException::create):
2336         (WebCore::IDBDatabaseException::ErrorCodeToExceptionCode):
2337         (WebCore::IDBDatabaseException::IDBDatabaseException):
2338         * storage/IDBDatabaseException.idl:
2339
2340 2010-12-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2341
2342         Build fix for GTK+3. Use functions added for GTK+ 2.24 to get the
2343         GDK window size.
2344
2345         * plugins/gtk/gtk2xtbin.c:
2346         (gtk_xtbin_realize):
2347
2348 2010-12-09  Siddharth Mathur  <siddharth.mathur@nokia.com>
2349
2350         Reviewed by Laszlo Gombos.
2351
2352         Use BUILDING_WEBKIT like other ports
2353         https://bugs.webkit.org/show_bug.cgi?id=50713
2354
2355         * WebCore.pro: Change BUILD_WEBKIT to BUILDING_WEBKIT
2356
2357 2010-12-08  Erik Arvidsson  <arv@chromium.org>
2358
2359         Reviewed by Darin Adler.
2360
2361         Replace getAttribute().isNull() with fastHasAttribute()
2362         https://bugs.webkit.org/show_bug.cgi?id=50719
2363
2364         Covered by existing tests.
2365
2366         * dom/SelectElement.cpp:
2367         (WebCore::SelectElement::reset):
2368         * html/HTMLAppletElement.cpp:
2369         (WebCore::HTMLAppletElement::rendererIsNeeded):
2370         * html/HTMLCollection.cpp:
2371         (WebCore::HTMLCollection::itemAfter):
2372         * html/HTMLFormControlElement.cpp:
2373         (WebCore::HTMLFormControlElement::formNoValidate):
2374         * html/HTMLFormElement.cpp:
2375         (WebCore::HTMLFormElement::noValidate):
2376         * html/HTMLInputElement.cpp:
2377         (WebCore::HTMLInputElement::defaultChecked):
2378         (WebCore::HTMLInputElement::multiple):
2379         (WebCore::HTMLInputElement::webkitdirectory):
2380         * html/HTMLOptionElement.cpp:
2381         (WebCore::HTMLOptionElement::defaultSelected):
2382         * html/HTMLScriptElement.cpp:
2383         (WebCore::HTMLScriptElement::asyncAttributeValue):
2384         (WebCore::HTMLScriptElement::deferAttributeValue):
2385         * rendering/RenderFileUploadControl.cpp:
2386         (WebCore::RenderFileUploadControl::allowsMultipleFiles):
2387         (WebCore::RenderFileUploadControl::allowsDirectoryUpload):
2388
2389 2010-12-08  Nicolas Dufresne  <nicolas.dufresne@collabora.co.uk>
2390
2391         Reviewed by Martin Robinson.
2392
2393         Full page size flash plugins do not show in all situations
2394         https://bugs.webkit.org/show_bug.cgi?id=47742
2395
2396         This patch moves the plugin widget size allocation after the
2397         NPP_SetWindow is called with the effect that the resize of Flash
2398         content no longer result in grey flash. This seems logical since the
2399         widget tree cannot be fully constructed before the plugin receives
2400         the new container window.
2401
2402         Test: manual-tests/plugins/gtk-windowed-grey-glitch.html
2403
2404         * plugins/gtk/PluginViewGtk.cpp:
2405         (WebCore::PluginView::setNPWindowIfNeeded):
2406
2407 2010-12-08  David Hyatt  <hyatt@apple.com>
2408
2409         Reviewed by Simon Fraser.
2410
2411         Fix regression from xji's wheel scroll patch.  The vertical case is looking at the horizontal
2412         maximum position and not the vertical position.
2413
2414         * platform/ScrollView.cpp:
2415         (WebCore::ScrollView::wheelEvent):
2416
2417 2010-12-08  Sam Weinig  <sam@webkit.org>
2418
2419         Reviewed by Darin Adler.
2420
2421         Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
2422         https://bugs.webkit.org/show_bug.cgi?id=50726
2423
2424         * WebCore.xcodeproj/project.pbxproj: Expose HTMLIFrameElement.h.
2425
2426 2010-12-08  Matthew Delaney  <mdelaney@apple.com>
2427
2428         Reviewed by Simon Fraser.
2429
2430         Add getter and setters for acceleratesRendering flag on layers
2431         https://bugs.webkit.org/show_bug.cgi?id=50717
2432
2433         * platform/graphics/GraphicsLayer.cpp:
2434         * platform/graphics/ca/GraphicsLayerCA.cpp:
2435         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2436         Plumbed through acceleratedRendering flag.
2437
2438 2010-12-07  Zhenyao Mo  <zmo@google.com>
2439
2440         Reviewed by Kenneth Russell.
2441
2442         WebGLUniformLocation objects must be invalidated during linkProgram
2443         https://bugs.webkit.org/show_bug.cgi?id=37118
2444
2445         * html/canvas/WebGLProgram.cpp:
2446         (WebCore::WebGLProgram::WebGLProgram): Initialize link count to 0.
2447         (WebCore::WebGLProgram::cacheActiveAttribLocations): Don't check link status through gl call; use the cached status instead.
2448         * html/canvas/WebGLProgram.h:
2449         (WebCore::WebGLProgram::getLinkCount): Get link count.
2450         (WebCore::WebGLProgram::increaseLinkCount): Increase link count by 1.
2451         * html/canvas/WebGLRenderingContext.cpp:
2452         (WebCore::WebGLRenderingContext::getUniform): Fix a bug where wrong error is generated.
2453         (WebCore::WebGLRenderingContext::linkProgram): call increaseLinkCount after linkProgram.
2454         * html/canvas/WebGLUniformLocation.cpp:
2455         (WebCore::WebGLUniformLocation::WebGLUniformLocation): Set program's link count upon creation.
2456         (WebCore::WebGLUniformLocation::program): Return null if count doesn't match the program's.
2457         (WebCore::WebGLUniformLocation::location): Return -1 if count doesn't match the program's.
2458         * html/canvas/WebGLUniformLocation.h:
2459
2460 2010-12-08  Adele Peterson  <adele@apple.com>
2461
2462         Reviewed by Darin Adler.
2463
2464         Fix for https://bugs.webkit.org/show_bug.cgi?id=50725
2465         <rdar://problem/8694972> REGRESSION (r72052): "Search" placeholder in MobileMe mail is positioned too high
2466
2467         Test: fast/forms/placeholder-position.html
2468
2469         Since we center the inner text element for single line text controls, 
2470         we should ask the subclass to give us the y offset instead of trying to calculate it in the RenderTextControl class.
2471
2472         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder):
2473         * rendering/RenderTextControl.h:
2474         * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::textBlockInsetTop):
2475         * rendering/RenderTextControlMultiLine.h:
2476         * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
2477         * rendering/RenderTextControlSingleLine.h:
2478
2479 2010-12-08  Chris Rogers  <crogers@google.com>
2480
2481         Reviewed by Kenneth Russell.
2482
2483         Add web audio files to mac port Xcode projects
2484         https://bugs.webkit.org/show_bug.cgi?id=50721
2485
2486         No new tests since audio API is not yet implemented.
2487
2488         * WebCore.xcodeproj/project.pbxproj:
2489         * bindings/js/JSDOMWindowCustom.cpp:
2490         (WebCore::JSDOMWindow::webkitAudioContext):
2491
2492 2010-12-08  Kent Tamura  <tkent@chromium.org>
2493
2494         Reviewed by Alexey Proskuryakov.
2495
2496         Yensign hack should work with Shift_JIS and ISO-2022-JP encodings.
2497         https://bugs.webkit.org/show_bug.cgi?id=49714
2498
2499         IE chooses a font which shows a yensign for 0x5c code point for a page
2500         encoded in x-mac-japanese, ISO-2022-JP, EUC-JP, Shift_JIS, Shift_JIS_X0213-2000,
2501         x-sjis, and Windows-31J.
2502         We have emulated this behavior by replacing 0x5c with 0xa5 for EUC-JP and
2503         Shift_JIS_X0213-2000. This change adds other encodings above.
2504
2505         Also, we move the HashSet initialization for isJapanese() and
2506         backslashAsCurrencySymbol() to TextEncodingRegistry.cpp because of
2507         ease of making them multi-thread safe.
2508
2509         * platform/text/TextEncoding.cpp:
2510         (WebCore::TextEncoding::isJapanese): Just calls isJapaneseEncoding().
2511         (WebCore::TextEncoding::backslashAsCurrencySymbol): Uses shouldShowBackslashAsCurrencySymbolIn().
2512         * platform/text/TextEncodingRegistry.cpp:
2513         (WebCore::addEncodingName): Moved from TextEncoding.cpp, and stop using atomicCanonicalTextEncodingName().
2514         (WebCore::buildQuirksSets): Added. Initializes HashSets for isJapaneseEncoding() and shouldShowBackslashAsCurrencySymbolIn().
2515         (WebCore::isJapaneseEncoding):
2516         (WebCore::shouldShowBackslashAsCurrencySymbolIn):
2517         (WebCore::extendTextCodecMaps): Add a call to buildQuirksSets().
2518         * platform/text/TextEncodingRegistry.h:
2519
2520 2010-12-08  Andy Estes  <aestes@apple.com>
2521
2522         Reviewed by Darin Adler.
2523
2524         Reflected unsigned attributes should be in the range [0, 2^31).
2525         https://bugs.webkit.org/show_bug.cgi?id=50472
2526
2527         HTML5 says that unsigned reflected attributes should be in the range
2528         [0, 2^31). When a value isn't in this range, a default value (or 0)
2529         should be returned instead. Update the JS bindings code generator to
2530         ensure 0 is returned when a content attribute value falls outside of
2531         this range.
2532
2533         Tests: bindings/scripts/test/TestObj.idl
2534                fast/html/marquee-element.html
2535
2536         * bindings/scripts/CodeGeneratorJS.pm: Return the maximum of 0 and the
2537         content attribute as a 32-bit signed int when converting a native value
2538         to an unsigned JS value.
2539         * bindings/scripts/test/TestObj.idl: Add a reflected unsigned attribute
2540         to test code generation.
2541         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Update test results.
2542         * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
2543         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
2544         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
2545         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
2546         * bindings/scripts/test/JS/JSTestObj.h: Ditto.
2547         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2548         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2549         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2550
2551 2010-12-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2552
2553         Reviewed by Martin Robinson.
2554
2555         [GTK] Use gtk_icon_set_render_icon() to render icons in RenderThemeGtk
2556         https://bugs.webkit.org/show_bug.cgi?id=50623
2557
2558         We don't need to cache the icons since the will be cached by GTK+,
2559         and they will be rendered using the state and text direction.
2560
2561         * platform/gtk/RenderThemeGtk.cpp:
2562         (WebCore::paintStockIcon):
2563         (WebCore::getMediaButtonIconSize):
2564         (WebCore::RenderThemeGtk::initMediaColors):
2565         (WebCore::RenderThemeGtk::initMediaButtons):
2566         (WebCore::RenderThemeGtk::RenderThemeGtk):
2567         (WebCore::RenderThemeGtk::~RenderThemeGtk):
2568         (WebCore::RenderThemeGtk::gtkIconState):
2569         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
2570         (WebCore::centerRectVerticallyInParentInputElement):
2571         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
2572         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
2573         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2574         (WebCore::RenderThemeGtk::platformColorsDidChange):
2575         (WebCore::RenderThemeGtk::paintMediaButton):
2576         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
2577         (WebCore::RenderThemeGtk::paintMediaMuteButton):
2578         (WebCore::RenderThemeGtk::paintMediaPlayButton):
2579         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
2580         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
2581         * platform/gtk/RenderThemeGtk.h:
2582
2583 2010-12-08  Abhishek Arya  <inferno@chromium.org>
2584
2585         Reviewed by Dimitri Glazkov.
2586
2587         Detach node iterator and move to new document when node gets moved.
2588         https://bugs.webkit.org/show_bug.cgi?id=50697
2589
2590         Test: fast/dom/node-iterator-document-moved-crash.html
2591
2592         * dom/Document.cpp: Method that takes a node and new document as argument.
2593         It detaches the node iterators belonging to the current document and attaches
2594         them to the new document.
2595         (WebCore::Document::moveNodeIteratorsToNewDocument):
2596         * dom/Document.h: Function definition.
2597         * dom/Node.cpp: When node is moved to another document, call the function to move
2598         the iterators appropriately.
2599         (WebCore::Node::setDocument):
2600
2601 2010-12-08  James Robinson  <jamesr@chromium.org>
2602
2603         Reviewed by Kenneth Russell.
2604
2605         [chromium] Text is blurry on a large composited layer with an odd center x/y coordinate
2606         https://bugs.webkit.org/show_bug.cgi?id=50702
2607
2608         Compute the center of a large layer using floats instead of ints to avoid roundoff errors.
2609
2610         Test: compositing/text-on-large-layer.html
2611
2612         * platform/graphics/chromium/ContentLayerChromium.cpp:
2613         (WebCore::ContentLayerChromium::draw):
2614
2615 2010-12-08  Ryosuke Niwa  <rniwa@webkit.org>
2616
2617         Reviewed by Dan Bernstein.
2618
2619         REGRESSION: LayoutTests/editing/selection/caret-rtl-2.html fails
2620         https://bugs.webkit.org/show_bug.cgi?id=33503
2621
2622         The bug was caused by Font::offsetForPosition's not taking into account the containing block's text direction.
2623         When RTL text appears in a LTR block, the offset at the beginning of RTL text is on the left of RTL text,
2624         and the offset at the end of RTL text is on the right of RTL text. For example, if we had RTL text CBA,
2625         then the correspondance between letters and offsets in logical order are: A -> 0, B -> 1, and C -> 2.
2626
2627         Case 1. CBA appears in a RTL block:
2628           In this case, clicking on the visual left of CBA puts the caret naturally at Position("CBA", 2).
2629           Clicking on the visual right of CBA puts the caret at Position("CBA", 0) as expected.
2630         Case 2. CBA appears in a LTR block:
2631           Because the containing block flows from left to right, by convention, Position("CBA", 2") corresponds
2632           to the visual right of CBA, and Position("CBA", 0) corresponds to the visual left of CBA.
2633           Therefore, clicking on the visual left of CBA should put the caret at Position("CBA", 0),
2634           and clicking on the visual right should put it at Position("CBA", 2).
2635
2636         The bug was caused by WebKit's not considering case 2. The same bug also exist for LTR text in a RTL block.
2637         Fixed the bug by taking care of the case 2 in InlineTextBox::offsetForPosition.
2638
2639         Tests: editing/selection/caret-ltr-2-left.html
2640                editing/selection/caret-ltr-2.html
2641                editing/selection/caret-ltr-right.html
2642                editing/selection/caret-ltr.html
2643                editing/selection/caret-rtl-2-left.html
2644                editing/selection/caret-rtl-right.html
2645
2646         * rendering/InlineTextBox.cpp:
2647         (WebCore::InlineTextBox::offsetForPosition):
2648
2649 2010-12-08  Anders Carlsson  <andersca@apple.com>
2650
2651         Reviewed by Darin Adler.
2652
2653         Fix some clang++ warnings (one of which was an actual bug)
2654         https://bugs.webkit.org/show_bug.cgi?id=50700
2655
2656         * page/mac/DragControllerMac.mm:
2657         (WebCore::DragController::dragOperation):
2658         Add parentheses to silent a clang warning.
2659
2660         * page/mac/EventHandlerMac.mm:
2661         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
2662         Fix || vs && precedence bug uncovered by clang.
2663
2664         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2665         (WebCore::GraphicsContext3D::reshape):
2666         Use an early return to avoid a warning.
2667
2668 2010-12-08  Chris Marrin  <cmarrin@apple.com>
2669
2670         Reviewed by Simon Fraser.
2671
2672         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
2673         https://bugs.webkit.org/show_bug.cgi?id=49388
2674
2675         Added copy constructors and casting operators to go between 
2676         TransformationMatrix and CATransform3D. Also added a copy
2677         constructor to go from CGAffineTransform to TransformationMatrix.
2678         Used these new methods to clean up platform CA code. This will
2679         make it easier to port to Windows.
2680
2681         I also fixed a couple of build issues found when trying out a 
2682         Windows build.
2683
2684         This is a resubmission of changesets r73477 and r73483 with a 
2685         fix for the SL build. The failure was because TransformationMatrix
2686         included QuartzCore/CATransform3D.h which brought in some system
2687         libraries, including Quickdraw, which has a definition for
2688         'Cursor' which clashed with WebCore's 'Cursor' class. So I had
2689         to qualify its use in WebChromeClient.cpp in WebKit2.
2690
2691         * WebCore.xcodeproj/project.pbxproj:
2692         * platform/graphics/ca/GraphicsLayerCA.cpp:
2693         (WebCore::GraphicsLayerCA::updateContentsTransform):
2694         (WebCore::GraphicsLayerCA::ensureCloneLayers):
2695         (WebCore::GraphicsLayerCA::fetchCloneLayers):
2696         * platform/graphics/ca/TransformationMatrixCA.cpp: Copied from WebCore/platform/graphics/ca/TransformationMatrixCA.cpp.
2697         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2698         (PlatformCAAnimation::setFromValue):
2699         (PlatformCAAnimation::setToValue):
2700         (PlatformCAAnimation::setValues):
2701         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2702         (PlatformCALayer::transform):
2703         (PlatformCALayer::setTransform):
2704         (PlatformCALayer::sublayerTransform):
2705         (PlatformCALayer::setSublayerTransform):
2706         (PlatformCALayer::contentsTransform):
2707         (PlatformCALayer::setContentsTransform):
2708         * platform/graphics/cg/TransformationMatrixCG.cpp:
2709         (WebCore::TransformationMatrix::TransformationMatrix):
2710         * platform/graphics/transforms/TransformationMatrix.h:
2711
2712 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
2713
2714         Reviewed by John Sullivan.
2715
2716         Layering Violation in ContextMenu - member variable of type HitTestResult
2717         https://bugs.webkit.org/show_bug.cgi?id=50586
2718         
2719         ContextMenu had a layering violation by having a member variable of type HitTestResult, because
2720         classes in WebCore/platform can't know about classes in WebCore.
2721         
2722         This patch moves the HitTestResult and all functions that use it out of ContextMenu into ContextMenuController.
2723         All of the functions that dealt with populating the ContextMenu are now in ContextMenuController, and this
2724         allowed us to delete the ContextMenu file, putting all of the cross-platform code that used to be it
2725         in ContextMenuController, and the rest of the code is in the platform-specific files.
2726
2727         No change in behavior, no new tests.
2728
2729         * Android.mk: Removed ContextMenu.cpp.
2730         * CMakeLists.txt: Ditto.
2731         * GNUmakefile.am: Ditto.
2732         * WebCore.gypi: Ditto.
2733         * WebCore.pro: Ditto.
2734         * WebCore.vcproj/WebCore.vcproj: Ditto.
2735         * WebCore.xcodeproj/project.pbxproj: Ditto.
2736
2737         * page/ContextMenuController.cpp:
2738         (WebCore::ContextMenuController::ContextMenuController): Initialized m_hitTestResult to an empty HitTestResult.
2739         (WebCore::ContextMenuController::handleContextMenuEvent): Call populate on the ContextMenuController instead
2740             of the ContextMenu.
2741         (WebCore::ContextMenuController::createContextMenu): Fix some indination, and store the HitTestResult in a member
2742             variable.
2743         (WebCore::ContextMenuController::showContextMenu): Call addInspectElementItem on the ContextMenuController.
2744         (WebCore::ContextMenuController::contextMenuItemSelected): Use m_hitTestResult whenever we need a HitTestResult.
2745         (WebCore::ContextMenuController::appendItem): Validates the item for its state, and then appends it to the parent menu.
2746             This allowed us to move checkOrEnableIfNeeded from ContextMenu.
2747
2748         These functions were all moved from ContextMenu, and changed slightly to fit in ContextMenuController.
2749         All calls to ContextMenu::appendItem were changed to ContextMenuController::appendItem, which takes care
2750         of validating the menu.
2751         (WebCore::separatorItem): Moved from ContextMenu.
2752         (WebCore::ContextMenuController::createAndAppendFontSubMenu): Ditto.
2753         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): Ditto.
2754         (WebCore::ContextMenuController::createAndAppendSpeechSubMenu): Ditto.
2755         (WebCore::ContextMenuController::createAndAppendWritingDirectionSubMenu): Ditto.
2756         (WebCore::ContextMenuController::createAndAppendTextDirectionSubMenu): Ditto.
2757         (WebCore::ContextMenuController::createAndAppendSubstitutionsSubMenu): Ditto.
2758         (WebCore::ContextMenuController::createAndAppendTransformationsSubMenu): Ditto.
2759         (WebCore::selectionContainsPossibleWord): Ditto.
2760         (WebCore::ContextMenuController::populate): Ditto.
2761         (WebCore::ContextMenuController::addInspectElementItem): Ditto.
2762         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto.
2763         
2764         * page/ContextMenuController.h:
2765         (WebCore::ContextMenuController::hitTestResult): Returns the HitTestResult of the current ContextMenu.
2766
2767         * platform/ContextMenu.cpp: Removed.
2768         * platform/ContextMenu.h:
2769         * platform/efl/ContextMenuEfl.cpp:
2770         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2771         (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
2772         * platform/gtk/ContextMenuGtk.cpp:
2773         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2774         (WebCore::ContextMenu::appendItem): Ditto.
2775         * platform/haiku/ContextMenuHaiku.cpp:
2776         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2777         (WebCore::ContextMenu::appendItem): Ditto.
2778         (WebCore::ContextMenu::insertItem): Ditto.
2779         * platform/mac/ContextMenuMac.mm:
2780         (-[WebCoreMenuTarget validateMenuItem:]): Calls checkOrEnableIfNeeded on the controller instead of
2781             the context menu.
2782         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2783         (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
2784         (WebCore::ContextMenu::insertItem): Ditto.
2785         * platform/win/ContextMenuWin.cpp:
2786         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2787         (WebCore::ContextMenu::insertItem): Removed the call to checkOrEnableIfNeeded.
2788         * platform/wx/ContextMenuWx.cpp:
2789         (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2790         (ContextMenu::appendItem): Ditto.
2791
2792 2010-12-08  Martin Robinson  <mrobinson@igalia.com>
2793
2794         Reviewed by John Sullivan.
2795
2796         [GTK] Layering violation in ContextMenuGtk.cpp
2797         https://bugs.webkit.org/show_bug.cgi?id=50676
2798
2799         ContextMenuGtk accesses the page's ContextMenuController, which is a layering
2800         violation. This was fixed for Mac with change r73469. We make a similar fix here
2801         by moving the "activated" signal connection to the WebKit layer.
2802
2803         * platform/gtk/ContextMenuGtk.cpp:
2804         (WebCore::ContextMenu::appendItem): Remove access of ContextMenuController. This
2805         is a layering violation.
2806
2807 2010-12-08  Jessie Berlin  <jberlin@apple.com>
2808
2809         Reviewed by Adam Roben.
2810
2811         WebKit2: Implement WebChromeClient::exceededDatabaseQuota
2812         https://bugs.webkit.org/show_bug.cgi?id=50656
2813
2814         * WebCore.exp.in:
2815         Export the symbol for SecurityOrigin::databaseIdentifier.
2816
2817 2010-12-08  Csaba Osztrogonác  <ossy@webkit.org>
2818
2819         Unreviewed, rolling out r73521.
2820         http://trac.webkit.org/changeset/73521
2821         https://bugs.webkit.org/show_bug.cgi?id=50640
2822
2823         It broke 90 layout tests
2824
2825         * bindings/js/JSDOMBinding.cpp:
2826         (WebCore::printErrorMessageForFrame):
2827         * bindings/js/JSDOMWindowBase.cpp:
2828         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
2829         * bindings/js/JSDOMWindowCustom.cpp:
2830         (WebCore::JSDOMWindow::setLocation):
2831         * page/DOMWindow.cpp:
2832         * page/DOMWindow.h:
2833
2834 2010-12-08  David Hyatt  <hyatt@apple.com>
2835
2836         Reviewed by Anders Carlsson.
2837
2838         https://bugs.webkit.org/show_bug.cgi?id=50576
2839
2840         REGRESSION in position of autocomplete popup on RTL page.
2841
2842         RTL static position computation did not subtract out the width of the enclosing box if the
2843         immediate parent was a RenderInline.  This bug was exposed by properly changing the RenderView
2844         to be RTL when the document was RTL.
2845
2846         Added three new tests in fast/block/positioning.
2847
2848         * rendering/RenderBox.cpp:
2849         (WebCore::RenderBox::computePositionedLogicalWidth):
2850
2851 2010-12-08  Xiaomei Ji  <xji@chromium.org>
2852
2853         Reviewed by David Hyatt.
2854
2855         Fix backward mouse wheeling not working when scroll position is below 0.
2856         https://bugs.webkit.org/show_bug.cgi?id=50370
2857
2858         Tests: fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
2859                fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
2860
2861         * platform/ScrollView.cpp:
2862         (WebCore::ScrollView::wheelEvent):
2863
2864 2010-12-08  Simon Fraser  <simon.fraser@apple.com>
2865
2866         Reviewed by Dan Bernstein.
2867
2868         Fix pauseAnimation API to work with shorthand properties
2869         https://bugs.webkit.org/show_bug.cgi?id=50639
2870         
2871         The pause API is always called with a long-hand property, but that
2872         property may be animating via a shorthand. Detect this, and pause
2873         such shorthand animations.
2874
2875         * page/animation/AnimationBase.cpp:
2876         (WebCore::ShorthandPropertyWrapper::propertyWrappers): Expose the vector
2877         of wrappers used by a shorthand wrapper.
2878
2879         (WebCore::gatherEnclosingShorthandProperties): Utility function that walks
2880         through the shorthand wrappers, keeping track of which can affect the given
2881         property.
2882         (WebCore::AnimationBase::animatableShorthandsAffectingProperty): Return a set
2883         of shorthand properties that can affect the given property.
2884
2885         * page/animation/AnimationBase.h: New method.
2886         * page/animation/CompositeAnimation.cpp:
2887         (WebCore::CompositeAnimation::pauseTransitionAtTime): If we don't find the
2888         property itself, check whether it's being animated via shorthands.
2889
2890 2010-12-08  David Hyatt  <hyatt@apple.com>
2891
2892         Reviewed by Beth Dakin.
2893
2894         <rdar://problem/8740920> Gestures: Frame::scalePage() broken by r73885
2895
2896         Make sure the transform applied to the RenderView for page scaling is incorporated into the
2897         docTop/Bottom/Left/Right accessors.
2898
2899         * rendering/RenderView.cpp:
2900         (WebCore::RenderView::docTop):
2901         (WebCore::RenderView::docBottom):
2902         (WebCore::RenderView::docLeft):
2903         (WebCore::RenderView::docRight):
2904
2905 2010-12-08  Ilya Tikhonovsky  <loislo@chromium.org>
2906
2907         Reviewed by Yury Semikhatsky.
2908
2909         Web Inspector: Protocol cleanup task. Remove WebInspector wrappers
2910         for TimelineAgent functions.
2911
2912         https://bugs.webkit.org/show_bug.cgi?id=50690
2913
2914         * inspector/Inspector.idl:
2915         * inspector/front-end/TimelineAgent.js:
2916         * inspector/front-end/TimelinePanel.js:
2917         (WebInspector.TimelinePanel):
2918         (WebInspector.TimelinePanel.prototype.timelineProfilerWasStarted):
2919         (WebInspector.TimelinePanel.prototype.timelineProfilerWasStopped):
2920
2921 2010-12-08  Philippe Normand  <pnormand@igalia.com>
2922
2923         Reviewed by Gustavo Noronha Silva.
2924
2925         [GTK] media/fullscreen* failing on 64-bits Debug
2926         https://bugs.webkit.org/show_bug.cgi?id=50394
2927
2928         Avoid emiting durationchanged in the case where the previous
2929         duration was 0 because that case is already handled by the
2930         HTMLMediaElement.
2931
2932         Test: media/media-fullscreen*.html
2933
2934         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2935         (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
2936
2937 2010-12-07  Darin Adler  <darin@apple.com>
2938
2939         Reviewed by Geoffrey Garen.
2940
2941         Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
2942         https://bugs.webkit.org/show_bug.cgi?id=50640
2943
2944         * bindings/js/JSDOMBinding.cpp:
2945         (WebCore::printErrorMessageForFrame): Removed body; just call through to
2946         DOMWindow::printErrorMessage.
2947
2948         * bindings/js/JSDOMWindowBase.cpp:
2949         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
2950         just call through to DOMWindow::crossDomainAccessErrorMessage.
2951
2952         * bindings/js/JSDOMWindowCustom.cpp:
2953         (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
2954         firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
2955         of the body and moved it into DOMWindow::setLocation.
2956
2957         * page/DOMWindow.cpp:
2958         (WebCore::DOMWindow::setLocation): Added. Does all the same work that
2959         JSDOMWindow::setLocation used to do, but in a way that's not specific
2960         to JavaScript.
2961         (WebCore::DOMWindow::printErrorMessage): Added.
2962         (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
2963
2964         * page/DOMWindow.h: Added setLocation, printErrorMessage, and
2965         crossDomainAccessErrorMessage.
2966
2967 2010-12-08  Alejandro G. Castro  <alex@igalia.com>
2968
2969         Unreviewed, rolling out r73494.
2970         http://trac.webkit.org/changeset/73494
2971         https://bugs.webkit.org/show_bug.cgi?id=50380
2972
2973         The tests added are crashing in the debug bots (macn and gtk)
2974
2975         * html/HTMLSelectElement.cpp:
2976         (WebCore::HTMLSelectElement::deselectItems):
2977         (WebCore::HTMLSelectElement::setSelectedIndex):
2978         (WebCore::HTMLSelectElement::setSelectedIndexByUser):
2979         (WebCore::HTMLSelectElement::listBoxSelectItem):
2980         (WebCore::HTMLSelectElement::add):
2981         (WebCore::HTMLSelectElement::remove):
2982         (WebCore::HTMLSelectElement::restoreFormControlState):
2983         (WebCore::HTMLSelectElement::parseMappedAttribute):
2984         (WebCore::HTMLSelectElement::selectAll):
2985         (WebCore::HTMLSelectElement::reset):
2986         (WebCore::HTMLSelectElement::updateListBoxSelection):
2987         (WebCore::HTMLSelectElement::setLength):
2988         * html/HTMLSelectElement.h:
2989         (WebCore::HTMLSelectElement::isOptionalFormControl):
2990         * html/HTMLSelectElement.idl:
2991         * html/ValidityState.cpp:
2992         (WebCore::ValidityState::valueMissing):
2993
2994 2010-12-07  Ilya Tikhonovsky  <loislo@chromium.org>
2995
2996         Reviewed by Pavel Feldman.
2997
2998         Web Inspector: Inspector protocol cleanup task. Remove
2999         WebInspector wrappers for DOMAgent functions.
3000
3001         There were a lot of wrappers in WebInspector namespace
3002         for different WebInspector agents functions. As far as we have a
3003         generic mechanic for such functions we can remove these
3004         wrappers and register domAgent instance as a handler for
3005         DOM domain notifications.
3006
3007         https://bugs.webkit.org/show_bug.cgi?id=50626
3008
3009         * inspector/Inspector.idl:
3010         * inspector/front-end/DOMAgent.js:
3011         (WebInspector.DOMNode):
3012         (WebInspector.DOMAgent):
3013         (WebInspector.DOMAgent.prototype.attributesUpdated):
3014         (WebInspector.DOMAgent.prototype.characterDataModified):
3015         (WebInspector.DOMAgent.prototype.setDocument):
3016         (WebInspector.DOMAgent.prototype.setDetachedRoot):
3017         (WebInspector.DOMAgent.prototype.setChildNodes):
3018         (WebInspector.DOMAgent.prototype.childNodeCountUpdated):
3019         (WebInspector.DOMAgent.prototype.childNodeInserted):
3020         (WebInspector.DOMAgent.prototype.childNodeRemoved):
3021         (WebInspector.EventListeners.getEventListenersForNodeAsync):
3022         * inspector/front-end/inspector.js:
3023         (WebInspector.didCommitLoad):
3024
3025 2010-12-08  Yury Semikhatsky  <yurys@chromium.org>
3026
3027         Reviewed by Pavel Feldman.
3028
3029         Web Inspector: remove groupLevel counter from console messages
3030         https://bugs.webkit.org/show_bug.cgi?id=50672
3031
3032         * inspector/ConsoleMessage.cpp:
3033         (WebCore::ConsoleMessage::ConsoleMessage):
3034         (WebCore::ConsoleMessage::addToFrontend):
3035         (WebCore::ConsoleMessage::isEqual):
3036         * inspector/ConsoleMessage.h:
3037         * inspector/InspectorController.cpp:
3038         (WebCore::InspectorController::InspectorController):
3039         (WebCore::InspectorController::addMessageToConsole):
3040         (WebCore::InspectorController::clearConsoleMessages):
3041         (WebCore::InspectorController::startGroup):
3042         (WebCore::InspectorController::endGroup):
3043         * inspector/InspectorController.h:
3044         * inspector/front-end/ConsoleView.js:
3045         (WebInspector.ConsoleView.createFilterElement):
3046         (WebInspector.ConsoleView):
3047         (WebInspector.ConsoleView.prototype.filter):
3048         (WebInspector.ConsoleView.prototype.afterShow):
3049         (WebInspector.ConsoleView.prototype.addMessage):
3050         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
3051         (WebInspector.ConsoleView.prototype.clearMessages):
3052         (WebInspector.ConsoleMessage):
3053         (WebInspector.ConsoleMessage.createTextMessage):
3054         (WebInspector.ConsoleMessage.prototype.toMessageElement):
3055         (WebInspector.ConsoleMessage.prototype._addMessageHeader):
3056         (WebInspector.ConsoleMessage.prototype._updateRepeatCount):
3057         (WebInspector.ConsoleMessage.prototype.toString):
3058         (WebInspector.ConsoleMessage.prototype.isEqual):
3059         (WebInspector.ConsoleGroup):
3060         * inspector/front-end/Resource.js:
3061         (WebInspector.Resource.prototype._checkWarning):
3062         * inspector/front-end/SourceFrame.js:
3063         (WebInspector.SourceFrame.prototype._addMessageToSource):
3064         * inspector/front-end/inspector.js:
3065         (WebInspector.addConsoleMessage):
3066         (WebInspector.log.logMessage):
3067         (WebInspector.log):
3068
3069 2010-12-07  Pavel Podivilov  <podivilov@chromium.org>
3070
3071         Reviewed by Pavel Feldman.
3072
3073         Web Inspector: introduce DebuggerModel class representing InspectorDebuggerAgent state.
3074         https://bugs.webkit.org/show_bug.cgi?id=50567
3075
3076         Moved debugging-related code from BreakpointManager to DebuggerModel. Moved Breakpoint class to a separate file.
3077
3078         * English.lproj/localizedStrings.js:
3079         * WebCore.gypi:
3080         * WebCore.vcproj/WebCore.vcproj:
3081         * inspector/front-end/Breakpoint.js: Added.
3082         (WebInspector.Breakpoint): Moved from BreakpointManager.js.
3083         * inspector/front-end/BreakpointManager.js:
3084         (WebInspector.BreakpointManager): Remove debugger-related methods.
3085         * inspector/front-end/CallStackSidebarPane.js:
3086         (WebInspector.CallStackSidebarPane):
3087         (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
3088         (WebInspector.CallStackSidebarPane.prototype._scriptBreakpointHit):
3089         * inspector/front-end/DebuggerModel.js: Added.
3090         (WebInspector.DebuggerModel): Moved debugger-related methods from BreakpointManager.
3091         * inspector/front-end/ScriptsPanel.js:
3092         (WebInspector.ScriptsPanel):
3093         (WebInspector.ScriptsPanel.prototype.continueToLine):
3094         (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback):
3095         (WebInspector.ScriptsPanel.prototype.editScriptSource):
3096         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
3097         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
3098         (WebInspector.ScriptsPanel.prototype.reset):
3099         * inspector/front-end/SourceFrame.js:
3100         (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
3101         (WebInspector.SourceFrameDelegate.prototype.addBreakpoint):
3102         (WebInspector.SourceFrameDelegate.prototype.breakpoints):
3103         (WebInspector.SourceFrameDelegate.prototype.findBreakpoint):
3104         * inspector/front-end/WebKit.qrc:
3105         * inspector/front-end/inspector.html:
3106         * inspector/front-end/inspector.js:
3107         (WebInspector.createJSBreakpointsSidebarPane):
3108         (WebInspector.restoredBreakpoint):
3109         (WebInspector.pausedScript):
3110         (WebInspector.resumedScript):
3111         (WebInspector.reset):
3112
3113 2010-12-08  Pavel Podivilov  <podivilov@chromium.org>
3114
3115         Reviewed by Pavel Feldman.
3116
3117         Web Inspector: SourceFrame refactoring.
3118         https://bugs.webkit.org/show_bug.cgi?id=50223
3119
3120         SourceFrame should ask BreakpointManager about existing breakpoints instead of maintaining
3121         it's own storages. Move common code from ScriptView and SourceView to SourceFrame.
3122
3123         * inspector/front-end/BreakpointManager.js:
3124         (WebInspector.BreakpointManager.prototype.findBreakpoints):
3125         (WebInspector.BreakpointManager.prototype.findBreakpoint):
3126         * inspector/front-end/Script.js:
3127         (WebInspector.Script):
3128         (WebInspector.Script.prototype.get linesCount):
3129         (WebInspector.Script.prototype.get source):
3130         (WebInspector.Script.prototype.set source):
3131         * inspector/front-end/ScriptView.js:
3132         (WebInspector.ScriptView):
3133         (WebInspector.ScriptView.prototype._scriptSourceChanged):
3134         (WebInspector.ScriptFrameDelegateImpl):
3135         (WebInspector.ScriptFrameDelegateImpl.prototype.canEditScripts):
3136         (WebInspector.ScriptFrameDelegateImpl.prototype.editLineComplete):
3137         (WebInspector.ScriptFrameDelegateImpl.prototype.scripts):
3138         * inspector/front-end/ScriptsPanel.js:
3139         (WebInspector.ScriptsPanel):
3140         * inspector/front-end/SourceFrame.js:
3141         (WebInspector.SourceFrame): Add common methods of ScriptView and SourceView.
3142         (WebInspector.SourceFrameDelegate):
3143         (WebInspector.SourceFrameDelegate.prototype.canEditScripts):
3144         (WebInspector.SourceFrameDelegate.prototype.editLineComplete):
3145         (WebInspector.SourceFrameDelegate.prototype.scripts):
3146         * inspector/front-end/SourceView.js:
3147         (WebInspector.SourceView):
3148         (WebInspector.SourceView.prototype._contentLoaded):
3149         (WebInspector.ResourceFrameDelegateImpl):
3150         (WebInspector.ResourceFrameDelegateImpl.prototype.canEditScripts):
3151         (WebInspector.ResourceFrameDelegateImpl.prototype.editLineComplete):
3152         (WebInspector.ResourceFrameDelegateImpl.prototype.scripts):
3153
3154 2010-12-08  Yuta Kitamura  <yutak@chromium.org>
3155
3156         Unreviewed, rolling out r73492.
3157         http://trac.webkit.org/changeset/73492
3158         https://bugs.webkit.org/show_bug.cgi?id=49914
3159
3160         Caused a lot of pixel test failures and broke Windows build.
3161
3162         * WebCore.xcodeproj/project.pbxproj:
3163         * platform/graphics/GraphicsContext.cpp:
3164         (WebCore::GraphicsContext::createGraphicsContextPrivate):
3165         (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
3166         (WebCore::GraphicsContext::save):
3167         (WebCore::GraphicsContext::restore):
3168         (WebCore::GraphicsContext::setStrokeThickness):
3169         (WebCore::GraphicsContext::setStrokeStyle):
3170         (WebCore::GraphicsContext::setStrokeColor):
3171         (WebCore::GraphicsContext::setShadow):
3172         (WebCore::GraphicsContext::clearShadow):
3173         (WebCore::GraphicsContext::getShadow):
3174         (WebCore::GraphicsContext::strokeThickness):
3175         (WebCore::GraphicsContext::strokeStyle):
3176         (WebCore::GraphicsContext::strokeColor):
3177         (WebCore::GraphicsContext::strokeColorSpace):
3178         (WebCore::GraphicsContext::fillRule):
3179         (WebCore::GraphicsContext::setFillRule):
3180         (WebCore::GraphicsContext::setFillColor):
3181         (WebCore::GraphicsContext::fillColor):
3182         (WebCore::GraphicsContext::fillColorSpace):
3183         (WebCore::GraphicsContext::setShouldAntialias):
3184         (WebCore::GraphicsContext::shouldAntialias):
3185         (WebCore::GraphicsContext::setStrokePattern):
3186         (WebCore::GraphicsContext::setFillPattern):
3187         (WebCore::GraphicsContext::setStrokeGradient):
3188         (WebCore::GraphicsContext::setFillGradient):
3189         (WebCore::GraphicsContext::fillGradient):
3190         (WebCore::GraphicsContext::strokeGradient):
3191         (WebCore::GraphicsContext::fillPattern):
3192         (WebCore::GraphicsContext::strokePattern):
3193         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3194         (WebCore::GraphicsContext::updatingControlTints):
3195         (WebCore::GraphicsContext::setUpdatingControlTints):
3196         (WebCore::GraphicsContext::setPaintingDisabled):
3197         (WebCore::GraphicsContext::paintingDisabled):
3198         (WebCore::GraphicsContext::textDrawingMode):
3199         (WebCore::GraphicsContext::setTextDrawingMode):
3200         * platform/graphics/GraphicsContext.h:
3201         * platform/graphics/GraphicsContextPrivate.h: Added.
3202         (WebCore::GraphicsContextState::GraphicsContextState):
3203         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
3204         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3205         (WebCore::setPlatformFill):
3206         (WebCore::setPlatformStroke):
3207         (WebCore::drawPathShadow):
3208         (WebCore::fillCurrentCairoPath):
3209         (WebCore::strokeCurrentCairoPath):
3210         (WebCore::GraphicsContext::GraphicsContext):
3211         (WebCore::GraphicsContext::~GraphicsContext):
3212         (WebCore::GraphicsContext::fillPath):
3213         (WebCore::GraphicsContext::strokePath):
3214         (WebCore::GraphicsContext::fillRect):
3215         (WebCore::GraphicsContext::setPlatformShadow):
3216         (WebCore::GraphicsContext::strokeRect):
3217         (WebCore::GraphicsContext::setAlpha):
3218         (WebCore::GraphicsContext::getAlpha):
3219         * platform/graphics/cg/GraphicsContextCG.cpp:
3220         (WebCore::GraphicsContext::GraphicsContext):
3221         (WebCore::GraphicsContext::~GraphicsContext):
3222         (WebCore::GraphicsContext::applyStrokePattern):
3223         (WebCore::GraphicsContext::applyFillPattern):
3224         (WebCore::GraphicsContext::drawPath):
3225         (WebCore::GraphicsContext::fillPath):
3226         (WebCore::GraphicsContext::strokePath):
3227         (WebCore::GraphicsContext::fillRect):
3228         (WebCore::GraphicsContext::setPlatformShadow):
3229         (WebCore::GraphicsContext::strokeRect):
3230         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3231         (WebCore::GraphicsContext::GraphicsContext):
3232         (WebCore::GraphicsContext::~GraphicsContext):
3233         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3234         (WebCore::GraphicsContext::GraphicsContext):
3235         (WebCore::GraphicsContext::~GraphicsContext):
3236         (WebCore::GraphicsContext::fillPath):
3237         (WebCore::GraphicsContext::strokePath):
3238         (WebCore::GraphicsContext::clip):
3239         (WebCore::GraphicsContext::clipOut):
3240         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3241         * platform/graphics/qt/GraphicsContextQt.cpp:
3242         (WebCore::GraphicsContext::GraphicsContext):
3243         (WebCore::GraphicsContext::~GraphicsContext):
3244         (WebCore::GraphicsContext::fillPath):
3245         (WebCore::GraphicsContext::strokePath):
3246         (WebCore::GraphicsContext::fillRect):
3247         (WebCore::GraphicsContext::setPlatformShadow):
3248         * platform/graphics/skia/GraphicsContextSkia.cpp:
3249         (WebCore::GraphicsContext::GraphicsContext):
3250         (WebCore::GraphicsContext::~GraphicsContext):
3251         (WebCore::GraphicsContext::fillPath):
3252         (WebCore::GraphicsContext::setPlatformShadow):
3253         * platform/graphics/win/GraphicsContextCGWin.cpp:
3254         (WebCore::GraphicsContext::GraphicsContext):
3255         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3256         (WebCore::GraphicsContext::GraphicsContext):
3257         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3258         (WebCore::GraphicsContext::GraphicsContext):
3259         (WebCore::GraphicsContext::~GraphicsContext):
3260         (WebCore::GraphicsContext::fillPath):
3261         (WebCore::GraphicsContext::fillRect):
3262         * platform/graphics/wx/GraphicsContextWx.cpp:
3263         (WebCore::GraphicsContext::GraphicsContext):
3264         (WebCore::GraphicsContext::~GraphicsContext):
3265
3266 2010-12-08  Dai Mikurube  <dmikurube@google.com>
3267
3268         Reviewed by Kent Tamura.
3269
3270         Implement "required" attribute for select tags
3271         https://bugs.webkit.org/show_bug.cgi?id=50380
3272
3273         Test: fast/forms/select-live-pseudo-selectors.html
3274               platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
3275
3276         * html/HTMLSelectElement.cpp:
3277         (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.
3278         (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
3279         (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
3280         (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
3281         (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.
3282         (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
3283         (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
3284         (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
3285         (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
3286         (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
3287         (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
3288         (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
3289         (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
3290         (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
3291         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
3292         * html/HTMLSelectElement.h:
3293         (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
3294         * html/HTMLSelectElement.idl: Added a required attribute to select elements..
3295         * html/ValidityState.cpp:
3296         (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
3297
3298 2010-12-08  Renata Hodovan  <reni@webkit.org>
3299
3300         Reviewed by Andreas Kling.
3301
3302         GraphicsContext: Merge m_common and m_data
3303         https://bugs.webkit.org/show_bug.cgi?id=49914
3304
3305         Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
3306         and m_common became unnecessary. They are removed.
3307         Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
3308         make the constructor of GraphicsContext clearer.
3309         Besides add a getter to the private GraphicsContext::m_state member, because some inline
3310         functions in cairo need it.
3311
3312         No new test is needed, because this is a refactoring.
3313
3314         * WebCore.xcodeproj/project.pbxproj:
3315         * platform/graphics/GraphicsContext.cpp:
3316         (WebCore::GraphicsContext::GraphicsContext):
3317         (WebCore::GraphicsContext::~GraphicsContext):
3318         (WebCore::GraphicsContext::save):
3319         (WebCore::GraphicsContext::restore):
3320         (WebCore::GraphicsContext::setStrokeThickness):
3321         (WebCore::GraphicsContext::setStrokeStyle):
3322         (WebCore::GraphicsContext::setStrokeColor):
3323         (WebCore::GraphicsContext::setShadow):
3324         (WebCore::GraphicsContext::clearShadow):
3325         (WebCore::GraphicsContext::getShadow):
3326         (WebCore::GraphicsContext::strokeThickness):
3327         (WebCore::GraphicsContext::strokeStyle):
3328         (WebCore::GraphicsContext::strokeColor):
3329         (WebCore::GraphicsContext::strokeColorSpace):
3330         (WebCore::GraphicsContext::fillRule):
3331         (WebCore::GraphicsContext::setFillRule):
3332         (WebCore::GraphicsContext::setFillColor):
3333         (WebCore::GraphicsContext::fillColor):
3334         (WebCore::GraphicsContext::fillColorSpace):
3335         (WebCore::GraphicsContext::setShouldAntialias):
3336         (WebCore::GraphicsContext::shouldAntialias):
3337         (WebCore::GraphicsContext::state):
3338         (WebCore::GraphicsContext::setStrokePattern):
3339         (WebCore::GraphicsContext::setFillPattern):
3340         (WebCore::GraphicsContext::setStrokeGradient):
3341         (WebCore::GraphicsContext::setFillGradient):
3342         (WebCore::GraphicsContext::fillGradient):
3343         (WebCore::GraphicsContext::strokeGradient):
3344         (WebCore::GraphicsContext::fillPattern):
3345         (WebCore::GraphicsContext::strokePattern):
3346         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3347         (WebCore::GraphicsContext::updatingControlTints):
3348         (WebCore::GraphicsContext::setUpdatingControlTints):
3349         (WebCore::GraphicsContext::setPaintingDisabled):
3350         (WebCore::GraphicsContext::paintingDisabled):
3351         (WebCore::GraphicsContext::textDrawingMode):
3352         (WebCore::GraphicsContext::setTextDrawingMode):
3353         * platform/graphics/GraphicsContext.h:
3354         (WebCore::GraphicsContextState::GraphicsContextState):
3355         * platform/graphics/GraphicsContextPrivate.h: Removed.
3356         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3357         (WebCore::setPlatformFill):
3358         (WebCore::setPlatformStroke):
3359         (WebCore::drawPathShadow):
3360         (WebCore::fillCurrentCairoPath):
3361         (WebCore::strokeCurrentCairoPath):
3362         (WebCore::GraphicsContext::platformInit):
3363         (WebCore::GraphicsContext::platformDestroy):
3364         (WebCore::GraphicsContext::fillPath):
3365         (WebCore::GraphicsContext::strokePath):
3366         (WebCore::GraphicsContext::fillRect):
3367         (WebCore::GraphicsContext::setPlatformShadow):
3368         (WebCore::GraphicsContext::strokeRect):
3369         (WebCore::GraphicsContext::setAlpha):
3370         (WebCore::GraphicsContext::getAlpha):
3371         * platform/graphics/cg/GraphicsContextCG.cpp:
3372         (WebCore::GraphicsContext::platformInit):
3373         (WebCore::GraphicsContext::platformDestroy):
3374         (WebCore::GraphicsContext::applyStrokePattern):
3375         (WebCore::GraphicsContext::applyFillPattern):
3376         (WebCore::GraphicsContext::drawPath):
3377         (WebCore::GraphicsContext::fillPath):
3378         (WebCore::GraphicsContext::strokePath):
3379         (WebCore::GraphicsContext::fillRect):
3380         (WebCore::GraphicsContext::setPlatformShadow):
3381         (WebCore::GraphicsContext::strokeRect):
3382         * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3383         (WebCore::GraphicsContext::platformInit):
3384         (WebCore::GraphicsContext::platformDestroy):
3385         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3386         (WebCore::GraphicsContext::platformInit):
3387         (WebCore::GraphicsContext::platformDestroy):
3388         (WebCore::GraphicsContext::fillPath):
3389         (WebCore::GraphicsContext::strokePath):
3390         (WebCore::GraphicsContext::clip):
3391         (WebCore::GraphicsContext::clipOut):
3392         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3393         * platform/graphics/qt/GraphicsContextQt.cpp:
3394         (WebCore::GraphicsContext::platformInit):
3395         (WebCore::GraphicsContext::platformDestroy):
3396         (WebCore::GraphicsContext::fillPath):
3397         (WebCore::GraphicsContext::strokePath):
3398         (WebCore::GraphicsContext::fillRect):
3399         (WebCore::GraphicsContext::setPlatformShadow):
3400         * platform/graphics/skia/GraphicsContextSkia.cpp:
3401         (WebCore::GraphicsContext::platformInit):
3402         (WebCore::GraphicsContext::platformDestroy):
3403         (WebCore::GraphicsContext::fillPath):
3404         (WebCore::GraphicsContext::setPlatformShadow):
3405         * platform/graphics/win/GraphicsContextCGWin.cpp:
3406         (WebCore::GraphicsContext::platformInit):
3407         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3408         (WebCore::GraphicsContext::platformInit):
3409         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3410         (WebCore::GraphicsContext::platformInit):
3411         (WebCore::GraphicsContext::platformDestroy):
3412         (WebCore::GraphicsContext::fillPath):
3413         (WebCore::GraphicsContext::fillRect):
3414         * platform/graphics/wx/GraphicsContextWx.cpp:
3415         (WebCore::GraphicsContext::platformInit):
3416         (WebCore::GraphicsContext::platformDestroy):
3417
3418 2010-12-07  Anton Muhin  <antonm@chromium.org>
3419
3420         Reviewed by Nate Chapin.
3421
3422         Port http://trac.webkit.org/changeset/72819/ to v8-backed ports.
3423         https://bugs.webkit.org/show_bug.cgi?id=50246
3424
3425         * bindings/v8/V8DOMMap.h:
3426         (WebCore::AbstractWeakReferenceMap::Visitor::startMap):
3427         (WebCore::AbstractWeakReferenceMap::Visitor::endMap):
3428         (WebCore::WeakReferenceMap::visit):
3429         * bindings/v8/V8GCController.cpp:
3430         (WebCore::GrouperItem::GrouperItem):
3431         (WebCore::GrouperItem::groupId):
3432         (WebCore::makeV8ObjectGroups):
3433         (WebCore::NodeGrouperVisitor::NodeGrouperVisitor):
3434         (WebCore::NodeGrouperVisitor::visitDOMWrapper):
3435         (WebCore::NodeGrouperVisitor::applyGrouping):
3436         (WebCore::DOMObjectGrouperVisitor::ObjectGrouperVisitor):
3437         (WebCore::DOMObjectGrouperVisitor::startMap):
3438         (WebCore::DOMObjectGrouperVisitor::endMap):
3439         (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
3440         (WebCore::V8GCController::gcPrologue):
3441
3442 2010-12-07  Daniel Bates  <dbates@rim.com>
3443
3444         Reviewed by Martin Robinson.
3445
3446         Implement focus ring support for image maps
3447         https://bugs.webkit.org/show_bug.cgi?id=50371
3448
3449         Implement GraphicsContext::drawFocusRing(const Path&, ...) so as to support
3450         drawing a focus ring for image maps.
3451
3452         Tests: fast/images/imagemap-circle-focus-ring.html
3453                fast/images/imagemap-polygon-focus-ring.html
3454
3455         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3456         (WebCore::adjustFocusRingColor): Added.
3457         (WebCore::adjustFocusRingLineWidth): Added.
3458         (WebCore::focusRingStrokeStyle): Added.
3459         (WebCore::GraphicsContext::drawFocusRing): Moved code for determining focus ring- color,
3460         line width and stroke style into functions adjustFocusRingColor(), adjustFocusRingLineWidth(),
3461         and focusRingStrokeStyle(), respectively. Implemented GraphicsContext::drawFocusRing(const Path&, ...).
3462
3463 2010-12-07  Sergio Villar Senin  <svillar@igalia.com>
3464
3465         Reviewed by Xan Lopez.
3466
3467         [GTK] WebKitSoupCache fails to load resources when cache contents are externally removed
3468         https://bugs.webkit.org/show_bug.cgi?id=50577
3469
3470         Try to download cached resources again if they are no longer
3471         accesible by the cache.
3472
3473         * platform/network/soup/cache/soup-request-http.c:
3474         (send_async_cb):
3475         (webkit_soup_request_http_send_async):
3476
3477 2010-12-06  MORITA Hajime  <morrita@google.com>
3478
3479         Reviewed by Dimitri Glazkov.
3480
3481         RenderIndicator subclasses should not change the render tree during layout.
3482         https://bugs.webkit.org/show_bug.cgi?id=50026
3483
3484         The old code created shadow elements during a layout computation,
3485         that makes the layout state inconsisntent and cause an assertion failure. 
3486         This change created shadow elements before the layout to avoid  
3487         state inconsistencies.
3488         
3489         Instead of creating shadows on demand, RenderMeter and
3490         RenderProgress now create all necessary shadows before layouts,
3491         and change its visibilities during the layout: Changing
3492         visibilities doesn't trigger relayout and keep the state
3493         consistent.
3494         
3495         RenderMeter uses new HidablePartElement for shadow elements,
3496         which can toggle visibiliby between hidden and original value.
3497
3498         Test: fast/dom/HTMLMeterElement/meter-element-crash.html
3499
3500         * html/HTMLMeterElement.cpp:
3501         (WebCore::HTMLMeterElement::attach): Calling updateFromElement()
3502         * html/HTMLMeterElement.h:
3503         * html/HTMLProgressElement.cpp:
3504         (WebCore::HTMLProgressElement::attach): Calling updateFromElement()
3505         * html/HTMLProgressElement.h:
3506         * rendering/RenderIndicator.cpp:
3507         * rendering/RenderIndicator.h:
3508         * rendering/RenderMeter.cpp:
3509         (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility.
3510         (WebCore::MeterPartElement::createForPart):
3511         (WebCore::MeterPartElement::hide):
3512         (WebCore::MeterPartElement::restoreVisibility):
3513         (WebCore::MeterPartElement::updateStyleForPart):
3514         (WebCore::MeterPartElement::saveVisibility):
3515         (WebCore::RenderMeter::~RenderMeter):
3516         (WebCore::RenderMeter::createPart): Extracted
3517         (WebCore::RenderMeter::updateFromElement): Had a shadow generation.
3518         (WebCore::RenderMeter::layoutParts): Removed shadow generation code.
3519         (WebCore::RenderMeter::shouldHaveParts):
3520         (WebCore::RenderMeter::valuePartRect): Adopted orientation.
3521         (WebCore::RenderMeter::orientation): Morphed from isHorizontal()
3522         (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation
3523         (WebCore::RenderMeter::barPseudoId): Adopted orientation.
3524         * rendering/RenderMeter.h:
3525         (WebCore::RenderMeter::shadowAttached):
3526         * rendering/RenderProgress.cpp:
3527         (WebCore::RenderProgress::updateFromElement): Had a shadow generation.
3528         (WebCore::RenderProgress::layoutParts):
3529         * rendering/RenderProgress.h:
3530         * rendering/ShadowElement.cpp:
3531         (WebCore::ShadowBlockElement::createForPart): Extracted initAsPart().
3532         (WebCore::ShadowBlockElement::initAsPart): Extracted from createForPart().
3533         * rendering/ShadowElement.h:
3534
3535 2010-11-29  Mihai Parparita  <mihaip@chromium.org>
3536
3537         Reviewed by Adam Barth.
3538
3539         returning to a POST result within a frame does a GET instead of a POST
3540         https://bugs.webkit.org/show_bug.cgi?id=10199
3541         
3542         FrameLoader::loadURLIntoChildFrame had a check for whether a frame
3543         had a HistoryItem, and if so used that item's URL. However, that did
3544         not handle the case where the HistoryItem had FormData and thus was the
3545         result of a POST request. FrameLoader::navigateToDifferentDocument (now
3546         renamed to loadDifferentDocumentItem) does all that, so just switch to
3547         using it instead.
3548         
3549         Besides the bug fix, the only difference in behavior is that we use the
3550         HistoryItem's URL instead of original URL when restoring it in a child
3551         frame. This seems desirable too (for consistency with other browsers, and
3552         so that we can avoid form double-submits for forms that that do
3553         POST-then-redirect), and is tested by
3554         fast/history/history-back-initial-vs-final-url.html.
3555         
3556         Tests: fast/history/history-back-initial-vs-final-url.html
3557                http/tests/navigation/post-frames-goback1.html
3558                http/tests/navigation/postredirect-frames-goback1.html
3559
3560         * loader/FrameLoader.cpp:
3561         (WebCore::FrameLoader::loadURLIntoChildFrame): Switch to using
3562             loadDifferentDocumentItem. Also cleaned up ordering slightly (if
3563             on the archive path, there's no need to do any of the other checks).
3564         (WebCore::FrameLoader::loadDifferentDocumentItem): Renamed from
3565             navigateToDifferentDocument so that calling it from loadItem and
3566             loadURLIntoChildFrame flows more easily.
3567         (WebCore::FrameLoader::loadSameDocumentItem): Similarly, renamed from
3568             navigateWithinDocument.
3569         (WebCore::FrameLoader::loadItem): Update callsites to the above methods.
3570         * loader/FrameLoader.h:
3571
3572 2010-12-07  Dan Bernstein  <mitz@apple.com>
3573
3574         Reviewed by Darin Adler.
3575
3576         Made tables repaint correctly in all writing modes
3577         Part of: Make tables work with vertical text
3578         https://bugs.webkit.org/show_bug.cgi?id=46417
3579
3580         Tests: fast/repaint/table-writing-modes-h.html
3581                fast/repaint/table-writing-modes-v.html
3582
3583         * rendering/RenderTableSection.cpp:
3584         (WebCore::RenderTableSection::paintObject): Compute the ranges of rows and
3585         columns to repaint based on the logical extent of the repaint rect.
3586
3587 2010-12-07  Alexey Marinichev  <amarinichev@chromium.org>
3588
3589         Reviewed by James Robinson.
3590
3591         [chromium] compositor lost context recovery fix
3592         https://bugs.webkit.org/show_bug.cgi?id=50614
3593
3594         To test, load a page that triggers the compositor, kill the GPU
3595         process and hover over a link to redraw and thus restart the GPU
3596         process.  Without this patch it will assert in
3597         ContentLayerChromium::updateTextureRect; with this patch it will not.
3598
3599         * platform/graphics/chromium/LayerChromium.cpp:
3600         (WebCore::LayerChromium::setNeedsDisplay):
3601
3602 2010-12-07  Anders Carlsson  <andersca@apple.com>
3603
3604         Fix the last clang++ build error.
3605
3606         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3607         (PlatformCALayer::animationForKey):
3608         Cast the returned animation to the correct type.
3609
3610 2010-12-07  Anders Carlsson  <andersca@apple.com>
3611
3612         Fix some clang++ build errors.
3613
3614         * platform/graphics/ca/GraphicsLayerCA.cpp:
3615         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3616         Remove unused variable.
3617
3618         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3619         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3620         Fix constness of pointers.
3621
3622 2010-12-07  Simon Fraser  <simon.fraser@apple.com>
3623
3624         Reviewed by Chris Marrin.
3625
3626         Fix the Color -> CGColorRef conversions for the debug colors
3627         used for compositing layers.
3628
3629         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3630         (PlatformCALayer::setBackgroundColor):
3631         (PlatformCALayer::setBorderColor):
3632
3633 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
3634
3635         Reviewed by John Sullivan.
3636
3637         Part of Layering Violation in ContextMenu
3638         https://bugs.webkit.org/show_bug.cgi?id=50586
3639         
3640         ContextMenuMac.mm had a WebCoreMenuTarget class, which was responsible for wrapping
3641         a ContextMenuItem, and calling through to the ContextMenuController to validate it
3642         and call a function when it was selected.
3643         
3644         It was a layering violation to have this class here, because ContextMenu can't know
3645         about ContextMenuController.
3646         
3647         This patch moves the class that wraps the ContextMenuItems to WebKit/mac/WebHTMLView.mm,
3648         and sets up the menu targets there.
3649
3650         No change in behavior, no new tests.
3651
3652         * WebCore.exp.in: Added function that needs to be exported.
3653         * platform/mac/ContextMenuMac.mm:
3654         (WebCore::ContextMenu::ContextMenu): Don't set the sharedMenuTarget anymore.
3655         (WebCore::ContextMenu::appendItem): Don't call setMenuItemTarget (this is done in WebKit now).
3656         (WebCore::ContextMenu::insertItem): Ditto.
3657
3658 2010-12-07  Simon Fraser  <simon.fraser@apple.com>
3659
3660         Reviewed by Dan Bernstein.
3661
3662         -webkit-transition Fails on Multiple text-shadow Shadows
3663         https://bugs.webkit.org/show_bug.cgi?id=42281
3664         
3665         When transitioning multiple shadows, the blend function for
3666         ShadowData dropped all but the first and last shadow because
3667         of a failure to append to the end of the list. Fixed.
3668
3669         Test: transitions/multiple-text-shadow-transition.html
3670
3671         * page/animation/AnimationBase.cpp:
3672         (WebCore::PropertyWrapperShadow::blend):
3673
3674 2010-12-07  Simon Fraser  <simon.fraser@apple.com>
3675
3676         Reviewed by Beth Dakin.
3677
3678         CSS animation doesn't work for border-radius
3679         https://bugs.webkit.org/show_bug.cgi?id=48340
3680         
3681         Include CSSPropertyBorderRadius in the list of shorthand
3682         properties, so that the individual border-radius properties
3683         get animated.
3684
3685         Test: transitions/border-radius-transition.html
3686
3687         * page/animation/AnimationBase.cpp:
3688         (WebCore::addShorthandProperties):
3689
3690 2010-12-07  Maciej Stachowiak  <mjs@apple.com>
3691
3692         Reviewed by Kent Tamura.
3693
3694         Implement HTML5 hidden attribute
3695         https://bugs.webkit.org/show_bug.cgi?id=40511
3696
3697         Test: fast/html/hidden-attr.html
3698
3699         * html/HTMLElement.cpp:
3700         (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute.
3701         (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none.
3702
3703 2010-12-07  Kenneth Russell  <kbr@google.com>
3704
3705         Reviewed by David Levin.
3706
3707         Fix compilation of core web audio files on Windows
3708         https://bugs.webkit.org/show_bug.cgi?id=50603
3709
3710         Changed a few constructs using C99 features of math.h to use
3711         wtf/MathExtras.h instead. Changed inline definitions of a couple of
3712         const static doubles in classes to out-of-line. Built Chrome with
3713         web audio enabled on Windows and Mac OS X to test these changes.
3714
3715         No new tests since audio API is not yet implemented.
3716
3717         * WebCore.gypi:
3718         * platform/audio/AudioResampler.cpp:
3719         * platform/audio/Biquad.cpp:
3720         (WebCore::Biquad::setLowpassParams):
3721         (WebCore::Biquad::setHighpassParams):
3722         (WebCore::Biquad::setLowShelfParams):
3723         * platform/audio/Cone.cpp:
3724         (WebCore::ConeEffect::gain):
3725         * platform/audio/EqualPowerPanner.cpp:
3726         (WebCore::EqualPowerPanner::pan):
3727         * platform/audio/FFTFrame.cpp:
3728         (WebCore::FFTFrame::interpolateFrequencyComponents):
3729         (WebCore::FFTFrame::extractAverageGroupDelay):
3730         (WebCore::FFTFrame::addConstantGroupDelay):
3731         * platform/audio/HRTFKernel.cpp:
3732         * platform/audio/HRTFPanner.cpp:
3733         * webaudio/AudioBufferSourceNode.cpp:
3734         (WebCore::AudioBufferSourceNode::readFromBufferWithGrainEnvelope):
3735         * webaudio/AudioPannerNode.cpp:
3736         (WebCore::AudioPannerNode::getAzimuthElevation):
3737         * webaudio/AudioParam.cpp: Added.
3738         (AudioParam::setValue):
3739         (AudioParam::smooth):
3740         * webaudio/AudioParam.h:
3741         * webaudio/RealtimeAnalyser.cpp:
3742
3743 2010-11-25  Philippe Normand  <pnormand@igalia.com>
3744
3745         Reviewed by Martin Robinson.
3746
3747         [GStreamer] faster elements linking
3748         https://bugs.webkit.org/show_bug.cgi?id=50067
3749
3750         Perform less checks during GStreamer elements linking if building
3751         against GStreamer >= 0.10.30.
3752
3753         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
3754         (WebCore::GStreamerGWorld::enterFullscreen):
3755         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3756         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
3757
3758 2010-12-07  Philippe Normand  <pnormand@igalia.com>
3759
3760         Reviewed by Gustavo Noronha Silva.
3761
3762         [GStreamer] ::buffered() should return multiple ranges in some cases
3763         https://bugs.webkit.org/show_bug.cgi?id=45101
3764
3765         Improved the ::buffered() method thanks to the new buffering query
3766         support that landed in GStreamer 0.10.31. The method now
3767         queries the media buffered-ranges on the pipeline and queue2
3768         handles it if it's buffering the media to disk.
3769
3770         The webkitwebsrc element also gained BYTES duration query
3771         support. This is needed in the rare cases where uridecodebin
3772         configures its queue before the HTTP server returns the media
3773         Content-Length.
3774
3775         Test: http/tests/media/video-buffered.html
3776
3777         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3778         (WebCore::MediaPlayerPrivateGStreamer::buffered):
3779         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3780         (webkit_web_src_init):
3781         (webKitWebSrcQuery): Make webkitwebsrc handle the duration queries
3782         if it's aware of the media content-length.
3783         * platform/gtk/RenderThemeGtk.cpp:
3784         (WebCore::RenderThemeGtk::paintMediaSliderTrack): Fix position of
3785         the second and next buffered ranges.
3786
3787 2010-12-07  Yael Aharon  <yael.aharon@nokia.com>
3788
3789         Reviewed by Antonio Gomes.
3790
3791         Spatial navigation not Working for Map and Area Tags
3792         https://bugs.webkit.org/show_bug.cgi?id=47142
3793
3794         Give area elements special treatment in spatial navigation algorithm by getting the
3795         rect of the area from the associated image. Since area elements are likely to overlap
3796         if they are not rects, or if authors are not careful, we flatten the rect of area elements.
3797
3798         Tests: fast/spatial-navigation/snav-imagemap-area-not-focusable.html
3799                fast/spatial-navigation/snav-imagemap-area-without-image.html
3800                fast/spatial-navigation/snav-imagemap-overlapped-areas.html
3801                fast/spatial-navigation/snav-imagemap-simple.html
3802
3803         * page/FocusController.cpp:
3804         (WebCore::FocusController::findFocusCandidateInContainer):
3805         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
3806         (WebCore::FocusController::advanceFocusDirectionally):
3807         * page/SpatialNavigation.cpp:
3808         (WebCore::FocusCandidate::FocusCandidate):
3809         (WebCore::virtualRectForDirection):
3810         (WebCore::virtualRectForAreaElementAndDirection):
3811         * page/SpatialNavigation.h:
3812         (WebCore::FocusCandidate::FocusCandidate):
3813
3814 2010-12-07  Darin Adler  <darin@apple.com>
3815
3816         Try to fix V8 build.
3817
3818         * bindings/generic/BindingDOMWindow.h:
3819         (WebCore::BindingDOMWindow::createWindow): Pass security origin.
3820
3821 2010-12-07  Darin Adler  <darin@apple.com>
3822
3823         Another build fix.
3824
3825         * loader/CrossOriginAccessControl.cpp: Added a missing include.
3826
3827 2010-12-07  Darin Adler  <darin@apple.com>
3828
3829         Try to fix build.
3830
3831         * plugins/PluginView.cpp:
3832         (WebCore::PluginView::start): Pass security origin.
3833         (WebCore::PluginView::getURLNotify): Ditto.
3834         (WebCore::PluginView::getURL): Ditto.
3835         (WebCore::PluginView::handlePost): Ditto.
3836
3837 2010-12-06  Darin Adler  <darin@apple.com>
3838
3839         Reviewed by Sam Weinig.
3840
3841         Pass security origin to make local file decision correctly
3842         https://bugs.webkit.org/show_bug.cgi?id=48603
3843
3844         * bindings/generic/BindingDOMWindow.h:
3845         (WebCore::BindingDOMWindow::createWindow): Pass security origin.
3846         (WebCore::BindingDOMWindow::open): Ditto.
3847         * bindings/generic/BindingFrame.h:
3848         (WebCore::BindingFrame::navigateIfAllowed): Ditto.
3849
3850         * bindings/js/JSDOMWindowCustom.cpp:
3851         (WebCore::JSDOMWindow::setLocation): Pass security origin.
3852         (WebCore::createWindow): Ditto.
3853         (WebCore::JSDOMWindow::open): Ditto.
3854
3855         * bindings/js/JSDocumentCustom.cpp:
3856         (WebCore::JSDocument::setLocation): Pass security origin.
3857
3858         * dom/Document.cpp:
3859         (WebCore::Document::processHttpEquiv): Pass security origin.
3860
3861         * inspector/InspectorController.cpp:
3862         (WebCore::InspectorController::openInInspectedWindow):
3863         Pass security origin.
3864
3865         * loader/FrameLoader.cpp:
3866         (WebCore::FrameLoader::changeLocation): Added a security origin
3867         argument, passed through to urlSelected.
3868         (WebCore::FrameLoader::urlSelected): Replaced the resource request
3869         and frame name arguments with a frame load request arguments in one
3870         overload, and changed the other overload to pass in the current
3871         frame's document for the security origin.
3872         (WebCore::FrameLoader::loadFrameRequest): Moved the canDisplay
3873         check before the referrer computation because it no longer needs
3874         to look at the referrer. Replaced the call to canDisplay that
3875         used the target frame's security origin and the call to
3876         deprecatedCanDisplay with a single call to canDisplay that uses
3877         the requester security origin.
3878
3879         * loader/FrameLoader.h: Updated for argument changes above.
3880
3881         * loader/NavigationScheduler.cpp:
3882         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Added
3883         a security origin.
3884         (WebCore::ScheduledURLNavigation::fire): Pass the security origin
3885         in to FrameLoader::changeLocation.
3886         (WebCore::ScheduledURLNavigation::securityOrigin): Added.
3887         (WebCore::ScheduledRedirect::ScheduledRedirect): Added a security
3888         origin argument.
3889         (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
3890         (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
3891         (WebCore::ScheduledRefresh::fire): Pass the security origin in to
3892         FrameLoader::changeLocation.
3893         (WebCore::ScheduledFormSubmission::fire): Include the security
3894         origin when constructing form submission.
3895         (WebCore::NavigationScheduler::scheduleRedirect): Include the security
3896         origin when creating the scheduled navigation object.
3897         (WebCore::NavigationScheduler::scheduleLocationChange): Ditto.
3898         (WebCore::NavigationScheduler::scheduleRefresh): Ditto.
3899
3900         * loader/NavigationScheduler.h: Added the security origin argument
3901         to scheduleLocationChange.
3902
3903         * loader/SubframeLoader.cpp:
3904         (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass in the security
3905         origin when calling scheduleLocationChange.
3906         * loader/appcache/ApplicationCacheGroup.cpp:
3907         (WebCore::ApplicationCacheGroup::selectCache): Ditto.
3908
3909         * page/ContextMenuController.cpp:
3910         (WebCore::openNewWindow): Pass in the security origin.
3911         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
3912
3913         * page/FrameLoadRequest.h: Added a security origin called the requester
3914         to all FrameLoadRequest objects.
3915
3916         * page/XSSAuditor.cpp:
3917         (WebCore::XSSAuditor::findInRequest): Added the security origin.
3918
3919 2010-12-07  Yury Semikhatsky  <yurys@chromium.org>
3920
3921         Reviewed by Pavel Feldman.
3922
3923         Web Inspector: avoid initializing Context on when creating attaching listener to ScriptDebugServer
3924         https://bugs.webkit.org/show_bug.cgi?id=50627
3925
3926         * bindings/v8/ScriptDebugServer.cpp:
3927         (WebCore::ScriptDebugServer::addListener): don't try to collect already parsed scripts if context has
3928         not been initialized yet.
3929
3930 2010-12-07  Csaba Osztrogonác  <ossy@webkit.org>
3931
3932         Unreviewed. Rolling out r73421, because it made transitions/color-transition-all.html flakey.
3933
3934         * page/animation/AnimationBase.cpp:
3935         (WebCore::addShorthandProperties):
3936
3937 2010-12-07  Martin Robinson  <mrobinson@igalia.com>
3938
3939         Unreviewed, rolling out r73392.
3940         http://trac.webkit.org/changeset/73392
3941         https://bugs.webkit.org/show_bug.cgi?id=50489
3942
3943         This commit caused crashes on the GTK+ bots
3944
3945         * bindings/ScriptControllerBase.cpp:
3946         (WebCore::ScriptController::executeIfJavaScriptURL):
3947         * dom/Document.cpp:
3948         (WebCore::Document::Document):
3949         (WebCore::Document::close):
3950         (WebCore::Document::lastModified):
3951         (WebCore::Document::finishedParsing):
3952         (WebCore::Document::initSecurityContext):
3953         (WebCore::Document::updateURLForPushOrReplaceState):
3954         * dom/Document.h:
3955         * dom/ProcessingInstruction.cpp:
3956         (WebCore::ProcessingInstruction::checkStyleSheet):
3957         * dom/ScriptElement.cpp:
3958         (WebCore::ScriptElement::scriptCharset):
3959         * html/HTMLLinkElement.cpp:
3960         (WebCore::HTMLLinkElement::process):
3961         * html/MediaDocument.cpp:
3962         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3963         * html/PluginDocument.cpp:
3964         (WebCore::PluginDocumentParser::createDocumentStructure):
3965         * loader/DocumentLoader.cpp:
3966         (WebCore::DocumentLoader::DocumentLoader):
3967         (WebCore::DocumentLoader::finishedLoading):
3968         (WebCore::DocumentLoader::commitData):
3969         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
3970         (WebCore::DocumentLoader::setFrame):
3971         * loader/DocumentLoader.h:
3972         * loader/DocumentWriter.cpp:
3973         (WebCore::DocumentWriter::begin):
3974         * loader/DocumentWriter.h:
3975         * loader/FrameLoader.cpp:
3976         (WebCore::FrameLoader::FrameLoader):
3977         (WebCore::FrameLoader::init):
3978         (WebCore::FrameLoader::clear):
3979         (WebCore::FrameLoader::receivedFirstData):
3980         (WebCore::FrameLoader::transitionToCommitted):
3981         (WebCore::FrameLoader::open):
3982         (WebCore::FrameLoader::finishedLoadingDocument):
3983         (WebCore::FrameLoader::addExtraFieldsToRequest):
3984         * loader/FrameLoader.h:
3985         (WebCore::FrameLoader::writer):
3986         * loader/cache/CachedResourceLoader.cpp:
3987         (WebCore::CachedResourceLoader::requestPreload):
3988         * platform/network/FormDataBuilder.cpp:
3989         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
3990         * svg/graphics/SVGImage.cpp:
3991         (WebCore::SVGImage::dataChanged):
3992
3993 2010-12-07  Patrick Gansterer  <paroga@webkit.org>
3994
3995         Reviewed by Andreas Kling.
3996
3997         [CMake] Remove WebKitGenerators
3998         https://bugs.webkit.org/show_bug.cgi?id=50445
3999
4000         Move remaining logic into main CMakeLists.txt.
4001
4002         * CMakeLists.txt:
4003
4004 2010-12-07  Justin Schuh  <jschuh@chromium.org>
4005
4006         Reviewed by Nikolas Zimmermann.
4007
4008         Clear old SVG cursor entry before adding a new one
4009         https://bugs.webkit.org/show_bug.cgi?id=50549
4010
4011         Test: svg/css/cursor-replace.svg
4012
4013         * css/CSSCursorImageValue.cpp:
4014         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
4015         * svg/SVGCursorElement.cpp:
4016         (WebCore::SVGCursorElement::~SVGCursorElement):
4017         (WebCore::SVGCursorElement::removeClient):
4018         (WebCore::SVGCursorElement::removeReferencedElement):
4019         * svg/SVGCursorElement.h:
4020         * svg/SVGElement.cpp:
4021         (WebCore::SVGElement::setCursorElement):
4022         (WebCore::SVGElement::cursorElementRemoved):
4023         (WebCore::SVGElement::setCursorImageValue):
4024         (WebCore::SVGElement::cursorImageElementRemoved):
4025         * svg/SVGElement.h:
4026
4027 2010-12-07  Kenichi Ishibashi  <bashi@google.com>
4028
4029         Reviewed by Kent Tamura.
4030
4031         Let HTMLObjectElement be a form associated element
4032         https://bugs.webkit.org/show_bug.cgi?id=48821
4033
4034         Introduces FormAssociatedElement class which would be a super class
4035         of form assocated elements. Some of member functions and variables of
4036         HTMLFormControlElement are migrated into this class.
4037         Following the HTML5 spec, HTMLFormControlElement class and
4038         HTMLObjectElement class are subclasses of it for now.
4039
4040         Test: fast/forms/form-collection-elements-order.html
4041
4042         * Android.mk: Added FormAssociatedElement.cpp
4043         * CMakeLists.txt: Ditto.
4044         * GNUmakefile.am: Added FormAssociatedElement.{cpp,h}
4045         * WebCore.exp.in: Added the symbol for toHTMLElement(FormAssociatedElement*)
4046         * WebCore.gypi: Added FormAssociatedElement.{cpp,h}
4047         * WebCore.pro: Ditto.
4048         * WebCore.vcproj/WebCore.vcproj: Ditto.
4049         * WebCore.xcodeproj/project.pbxproj: Ditto.
4050         * dom/CheckedRadioButtons.h: Fixed class forward declaration order.
4051         * dom/Document.cpp:
4052         (WebCore::Document::registerFormElementWithFormAttribute): Modified to
4053         use FormAssociatedElement instead of HTMLFormControlElement
4054         (WebCore::Document::unregisterFormElementWithFormAttribute): Ditto.
4055         (WebCore::Document::resetFormElementsOwner):
4056         * dom/Document.h: Ditto.
4057         * html/DOMFormData.cpp: Ditto.
4058         (WebCore::DOMFormData::DOMFormData):
4059         * html/FormAssociatedElement.cpp: Copied and renamed from WebCore/html/HTMLFormControlElement.cpp.
4060         (WebCore::FormAssociatedElement::FormAssociatedElement):
4061         (WebCore::FormAssociatedElement::~FormAssociatedElement):
4062         (WebCore::FormAssociatedElement::validity):
4063         (WebCore::FormAssociatedElement::insertedIntoTree):
4064         (WebCore::FormAssociatedElement::removedFromTree):
4065         (WebCore::FormAssociatedElement::removeFromForm):
4066         (WebCore::FormAssociatedElement::resetFormOwner):
4067         (WebCore::FormAssociatedElement::formAttributeChanged):
4068         (WebCore::toHTMLElement):
4069         * html/FormAssociatedElement.h: Ditto.
4070         (WebCore::FormAssociatedElement::ref):
4071         (WebCore::FormAssociatedElement::deref):
4072         (WebCore::FormAssociatedElement::formDestroyed):
4073         (WebCore::FormAssociatedElement::setForm):
4074         * html/HTMLElement.h: Changed the access level of findFormAncestor().
4075         * html/HTMLFormCollection.cpp:
4076         (WebCore::HTMLFormCollection::item): Modified to use FormAssociatedElement
4077         instead of HTMLFormControlElement.
4078         (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
4079         (WebCore::HTMLFormCollection::updateNameCache): Ditto.
4080         * html/HTMLFormControlElement.cpp: Modified regarding with the change of class
4081         hierarchy.
4082         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
4083         (WebCore::HTMLFormControlElement::~HTMLFormControlElement):
4084         (WebCore::HTMLFormControlElement::insertedIntoTree):
4085         (WebCore::HTMLFormControlElement::removedFromTree):
4086         (WebCore::HTMLFormControlElement::supportsFocus):
4087         (WebCore::HTMLFormControlElement::checkValidity):
4088         (WebCore::HTMLFormControlElement::virtualForm):
4089         (WebCore::HTMLFormControlElement::isDefaultButtonForForm):
4090         (WebCore::HTMLFormControlElement::attributeChanged):
4091         * html/HTMLFormControlElement.h: Ditto.
4092         (WebCore::HTMLFormControlElement::form):
4093         (WebCore::HTMLFormControlElement::disabled):
4094         (WebCore::HTMLFormControlElement::type):
4095         (WebCore::HTMLFormControlElement::refFormAssociatedElement):
4096         (WebCore::HTMLFormControlElement::derefFormAssociatedElement):
4097         * html/HTMLFormElement.cpp: Modified to use FormAssociatedElement
4098         instead of HTMLFormControlElement.
4099         (WebCore::HTMLFormElement::submitImplicitly):
4100         (WebCore::HTMLFormElement::validateInteractively):
4101         (WebCore::HTMLFormElement::submit):
4102         (WebCore::HTMLFormElement::reset):
4103         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute):
4104         (WebCore::HTMLFormElement::formElementIndex):
4105         (WebCore::HTMLFormElement::registerFormElement):
4106         (WebCore::HTMLFormElement::removeFormElement):
4107         (WebCore::HTMLFormElement::defaultButton):
4108         (WebCore::HTMLFormElement::checkValidity):
4109         (WebCore::HTMLFormElement::collectUnhandledInvalidControls):
4110         (WebCore::HTMLFormElement::documentDidBecomeActive):
4111         * html/HTMLFormElement.h: Ditto.
4112         (WebCore::HTMLFormElement::associatedElements):
4113         * html/HTMLInputElement.cpp: Ditto.
4114         (WebCore::HTMLInputElement::updateCheckedRadioButtons):
4115         * html/HTMLObjectElement.cpp: Modified regarding with the change of class
4116         hierarchy.
4117         (WebCore::HTMLObjectElement::HTMLObjectElement):
4118         (WebCore::HTMLObjectElement::~HTMLObjectElement):
4119         (WebCore::HTMLObjectElement::create):
4120         (WebCore::HTMLObjectElement::attributeChanged):
4121         (WebCore::HTMLObjectElement::insertedIntoTree):
4122         (WebCore::HTMLObjectElement::removedFromTree):
4123         (WebCore::HTMLObjectElement::appendFormData):
4124         (WebCore::HTMLObjectElement::formControlName):
4125         * html/HTMLObjectElement.h: Ditto.
4126         (WebCore::HTMLObjectElement::form):
4127         (WebCore::HTMLObjectElement::isFormControlElement):
4128         (WebCore::HTMLObjectElement::isEnumeratable):
4129         (WebCore::HTMLObjectElement::refFormAssociatedElement):
4130         (WebCore::HTMLObjectElement::derefFormAssociatedElement):
4131         * html/HTMLTagNames.in: Added constructorNeedsFormElement to object tag.
4132         * html/ValidationMessage.cpp: Modified to use FormAssociatedElement
4133         instead of HTMLFormControlElement.
4134         (WebCore::ValidationMessage::ValidationMessage):
4135         (WebCore::ValidationMessage::create):
4136         * html/ValidationMessage.h: Ditto.
4137         * html/ValidityState.cpp: Ditto.
4138         (WebCore::ValidityState::validationMessage):
4139         (WebCore::ValidityState::setCustomErrorMessage):
4140         (WebCore::ValidityState::valueMissing):
4141         (WebCore::ValidityState::typeMismatch):
4142         (WebCore::ValidityState::patternMismatch):
4143         (WebCore::ValidityState::tooLong):
4144         (WebCore::ValidityState::rangeUnderflow):
4145         (WebCore::ValidityState::rangeOverflow):
4146         (WebCore::ValidityState::stepMismatch):
4147   &nb