1 2010-12-12 Jon Honeycutt <jhoneycutt@apple.com>
5 * WebCore.vcproj/WebCore.vcproj:
6 Remove accidentally-committed conflict marker.
8 2010-10-28 MORITA Hajime <morrita@google.com>
10 Reviewed by Ojan Vafai.
12 spellcheck does not check pasted text
13 https://bugs.webkit.org/show_bug.cgi?id=40092
15 - Introduced SpellChecker class to encapsulate asynchronous spell
16 checker state: sequence id, requesting text and target node.
17 This is also the first step to decompose spell-check related
18 code to a separate class.
19 - Added EditorClient::isAsynchronousSpellCheckingEnabled()
20 to use async spellcheck API on the platform.
21 These APIs are touched by SpellChecker.
22 - Used SpellChecker to check a pasted test. Text to check is
23 collected from the subtree under the editingRoot.
24 - Added Setting::m_asynchronousSpellCheckingEnabled to control
27 Test: editing/spelling/spellcheck-paste.html
34 * WebCore.vcproj/WebCore.vcproj:
35 * WebCore.xcodeproj/project.pbxproj:
36 * dom/DocumentMarkerController.cpp:
37 (WebCore::DocumentMarkerController::showMarkers):
38 (showDocumentMarkers):
39 * dom/DocumentMarkerController.h:
40 * dom/PositionIterator.cpp:
41 (WebCore::PositionIterator::setOffsetInLeafNode):
42 * dom/PositionIterator.h:
44 (WebCore::Editor::replaceSelectionWithFragment):
45 (WebCore::Editor::Editor):
46 (WebCore::findFirstMarkable):
47 (WebCore::Editor::selectionStartHasSpellingMarkerFor):
49 (WebCore::Editor::spellChecker):
50 * editing/SpellChecker.cpp: Added.
51 (WebCore::SpellChecker::SpellChecker):
52 (WebCore::SpellChecker::~SpellChecker):
53 (WebCore::SpellChecker::initRequest):
54 (WebCore::SpellChecker::clearRequest):
55 (WebCore::SpellChecker::isAsynchronousEnabled):
56 (WebCore::SpellChecker::canCheckAsynchronously):
57 (WebCore::SpellChecker::isBusy):
58 (WebCore::SpellChecker::isValid):
59 (WebCore::SpellChecker::isCheckable):
60 (WebCore::SpellChecker::requestCheckingFor):
61 (WebCore::forwardIterator):
62 (WebCore::SpellChecker::didCheck):
63 * editing/SpellChecker.h: Added.
64 (WebCore::SpellCheckingResult::SpellCheckingResult):
65 (WebCore::SpellCheckingResult::type):
66 (WebCore::SpellCheckingResult::location):
67 (WebCore::SpellCheckingResult::length):
68 * loader/EmptyClients.h:
69 (WebCore::EmptyEditorClient::requestCheckingOfString):
70 * page/EditorClient.h:
72 (WebCore::Settings::Settings):
74 (WebCore::Settings::setAsynchronousSpellCheckingEnabled):
75 (WebCore::Settings::asynchronousSpellCheckingEnabled):
77 2010-12-09 Antonio Gomes <agomes@rim.com>
79 Reviewed by Daniel Bates.
81 Spatial Navigation: code clean up (part II)
82 https://bugs.webkit.org/show_bug.cgi?id=50666
86 * page/FocusController.cpp: Removed static declaration of updateFocusCandidateIfNeeded() from
87 the top of FocusController.cpp, and added the 'static' keyword where the function is implemented;
88 * page/SpatialNavigation.cpp: In FocusCandidate constructor, renamed 'n' to 'node', and added an assert to it;
89 (WebCore::FocusCandidate::FocusCandidate):
90 (WebCore::virtualRectForAreaElementAndDirection): Added an assert to 'node';
91 * page/SpatialNavigation.h:I reordered the declaration of some methods in order to group related ones;
92 Removed isScrollableContainerNode() function declaration since it is not used outside SpatialNavigation.cpp;
93 And removed the declaration of isNodeDeepDescendantOfDocument() since it does not exist anymore.
95 2010-12-12 Philippe Normand <pnormand@igalia.com>
97 Reviewed by Xan Lopez.
99 build-webkit --gtk --minimal fails
100 https://bugs.webkit.org/show_bug.cgi?id=46267
102 No new tests, build fix only.
104 * GNUmakefile.am: Include some JS bindings generated headers in
105 the build even if their corresponding feature is disabled. They
106 are needed to make the DOM bindings build.
108 2010-12-12 Sam Magnuson <smagnuso@gmail.com>
110 Reviewed by Eric Seidel.
112 [Qt] Compile with QT_NO_QUUID_STRING.
113 https://bugs.webkit.org/show_bug.cgi?id=49745
116 (WebCore::createCanonicalUUIDString):
118 2010-12-12 Ragner Magalhaes <ragner.magalhaes@openbossa.org>
120 Reviewed by Eric Seidel.
122 [Qt] Missing style for date pickers on Qt Mobile theme
123 https://bugs.webkit.org/show_bug.cgi?id=50628
125 * css/themeQtMobile.css:
127 2010-12-11 Alice Liu <alice.liu@apple.com>
131 * platform/network/mac/ResourceResponseMac.mm:
132 (WebCore::ResourceResponse::platformLazyInit):
133 Resolve string[0] ambiguity by passing 0U.
135 2010-12-11 Adam Barth <abarth@webkit.org>
137 Reviewed by Sam Weinig.
139 [V8] Move to DOMWindow::setLocation
140 https://bugs.webkit.org/show_bug.cgi?id=50876
142 Recently, JavaScriptCore moved to implementing setLocation in WebCore.
143 This patch change V8 to use that common code path. I haven't removed
144 the old code path because it's still used for other things (like
145 assigning window.location.href), but I'll move the rest over in a
148 * bindings/v8/custom/V8DOMWindowCustom.cpp:
149 (WebCore::V8DOMWindow::locationAccessorSetter):
150 * bindings/v8/specialization/V8BindingState.cpp:
151 (WebCore::::getFirstWindow):
152 * bindings/v8/specialization/V8BindingState.h:
154 2010-10-11 Diego Gonzalez <diegohcg@webkit.org>
156 Reviewed by Kenneth Rohde Christiansen.
158 [Qt] Mock DeviceOrientation client for DRT
159 https://bugs.webkit.org/show_bug.cgi?id=47490
163 2010-12-11 Joone Hur <joone@kldp.org>
165 Reviewed by Alexey Proskuryakov.
167 enumeration value ‘ResponseTypeArrayBuffer’ not handled in switch
168 https://bugs.webkit.org/show_bug.cgi?id=50871
170 Fix the warning which occurs when enumeration value is not handled in switch.
172 No new tests, no change in behavior.
174 * bindings/js/JSXMLHttpRequestCustom.cpp:
175 (WebCore::JSXMLHttpRequest::response):
177 2010-12-11 Patrick Gansterer <paroga@webkit.org>
179 Reviewed by Darin Adler.
181 Add an overload to makeString for Vector<char>
182 https://bugs.webkit.org/show_bug.cgi?id=50123
184 This also contains a segfault fix for ImageBuffer::toDataURL of the Haiku port.
186 * platform/graphics/cg/ImageBufferCG.cpp:
187 (WebCore::ImageBuffer::toDataURL):
188 * platform/graphics/gtk/ImageBufferGtk.cpp:
189 (WebCore::ImageBuffer::toDataURL):
190 * platform/graphics/haiku/ImageBufferHaiku.cpp:
191 (WebCore::ImageBuffer::toDataURL):
192 * platform/graphics/skia/ImageBufferSkia.cpp:
193 (WebCore::ImageBuffer::toDataURL):
195 2010-12-10 Alexey Proskuryakov <ap@apple.com>
199 * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
200 Resolve string[0] ambiguity by passing 0U.
202 2010-12-10 Steve Falkenburg <sfalken@apple.com>
204 Windows production build fix.
206 Only the vsprops are indirected through WebKitVSPropsRedirectionDir, not the scripts in WebKitLibraries/win/tools/scripts.
208 * WebCore.vcproj/WebCoreGeneratedCommon.vsprops:
209 * WebCore.vcproj/build-generated-files.sh:
211 2010-12-10 John Knottenbelt <jknotten@chromium.org>
213 Reviewed by Eric Seidel.
215 Remove WebCore/platform/mac/GeolocationService.{h,mm}
216 https://bugs.webkit.org/show_bug.cgi?id=50074
218 Remove unused non-client-based geolocation code.
220 * platform/mac/GeolocationServiceMac.h: Removed.
221 * platform/mac/GeolocationServiceMac.mm: Removed.
223 2010-12-10 Alexey Proskuryakov <ap@apple.com>
225 Reviewed by Darin Adler.
227 https://bugs.webkit.org/show_bug.cgi?id=46573
228 <rdar://problem/8479389> REGRESSION: charset="utf-8" (with quotes) doesn't work
230 Test: http/tests/mime/quoted-charset.php
232 * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
233 * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
234 Work around a CFNetwork issue, strip quotes if they are present.
236 2010-12-10 Vincent Scheib <scheib@chromium.org>
238 Reviewed by James Robinson.
240 Shader::loadShader() must initialize variable passed to getShaderiv
241 https://bugs.webkit.org/show_bug.cgi?id=50842
243 Test: fast/canvas/canvas-largedraws.html
245 * platform/graphics/gpu/Shader.cpp:
246 (WebCore::Shader::loadShader):
248 2010-12-10 Vincent Scheib <scheib@chromium.org>
250 Reviewed by James Robinson.
252 Texture::updateSubRect should pass IntRect by reference
253 https://bugs.webkit.org/show_bug.cgi?id=50845
255 No test, changing to pass by ref.
257 * platform/graphics/gpu/Texture.cpp:
258 (WebCore::Texture::updateSubRect):
259 * platform/graphics/gpu/Texture.h:
261 2010-12-10 Darin Adler <darin@apple.com>
263 Reviewed by Sam Weinig.
265 Move open and showModalDialog implementations from bindings into DOM class DOMWindow
266 https://bugs.webkit.org/show_bug.cgi?id=50836
268 * bindings/js/JSDOMWindowCustom.cpp:
269 (WebCore::JSDOMWindow::open): Removed most of the code and changed to call
271 (WebCore::DialogHandler::DialogHandler): Added. Object is used to handle the
272 arguments and return value in showModalDialog.
273 (WebCore::DialogHandler::dialogCreated): Ditto.
274 (WebCore::DialogHandler::returnValue): Ditto.
275 (WebCore::setUpDialog): Added. Function passed to showModalDialog that just
276 casts pointer to DialogHandler can calls dialogCreated.
277 (WebCore::JSDOMWindow::showModalDialog): Removed most of the code and changed
278 to call DOMWindow::showModalDialog.
279 (WebCore::JSDOMWindow::postMessage): Made style match the rest of the file by
280 renaming local variables and getting rid of a needless ones.
282 * page/DOMWindow.cpp:
283 (WebCore::DOMWindow::parseModalDialogFeatures): Moved body of this function
284 to the WindowFeatures class.
285 (WebCore::DOMWindow::allowPopUp): Renamed argument from activeFrame to firstFrame,
286 because that's the frame we pass in here. Also added an overload so this can be
287 called on a window rather than a frame.
288 (WebCore::DOMWindow::setLocation): Renamed a couple variables so the names are
289 the same as in open and showModalDialog. Factored the JavaScript security check
290 into a new function named isInsecureScriptAccess.
291 (WebCore::DOMWindow::isInsecureScriptAccess): Here is the new function.
292 (WebCore::DOMWindow::createWindow): Added. Contains logic shared by open and
293 showModalDialog just as the function named createWindow in JSDOMWindowCustom.cpp
295 (WebCore::DOMWindow::open): Added. Code from JSDOMWindowCustom without the
296 JavaScript language binding part, and with a bit of refactoring to share code
297 with the rest of the DOMWindow class.
298 (WebCore::DOMWindow::showModalDialog): Ditto.
300 * page/DOMWindow.h: Moved conditional parts of the file into separate paragraphs
301 in alphabetical order so they are not scattered thorugh the file. Removed redundant
302 includes. Added some blank lines for clarity. Added an open function and a
303 showModalDialog function. Added private createWindow and isInsecureScriptAccess
306 * page/WindowFeatures.cpp:
307 (WebCore::isWindowFeaturesSeparator): Renamed from isSeparator for clarity.
308 (WebCore::WindowFeatures::WindowFeatures): Updated for name change. Used isEmpty
309 instead of checking length. Added a new constructor for use when making dialogs,
310 with code from the showModalDialog function.
311 (WebCore::WindowFeatures::boolFeature): Use DialogFeaturesMap typedef.
312 (WebCore::WindowFeatures::floatFeature): Use DialogFeaturesMap typedef.
313 Renamed a local variable and tweaked the comments a bit.
314 (WebCore::WindowFeatures::parseDialogFeatures): Added. Code moved here from
315 DOMWindow::parseDialogFeatures and refactored a bit.
317 * page/WindowFeatures.h: Added new constructor, new parseDialogFeatures
318 function, DialogFeaturesMap typedef, and made setWindowFeature function private.
320 2010-12-10 Chris Fleizach <cfleizach@apple.com>
322 Reviewed by Darin Adler.
324 AX: refactor AccessibilityRenderObject::doAccessibilityHitTest
325 https://bugs.webkit.org/show_bug.cgi?id=50574
327 Refactors accessibility hit testing to allow for a more flexible model when handling elements
328 with fake sub-elements (like sliders or list boxes).
330 Renamed doAccessibilityHitTest -> accessibilityHitTest, which is called on the root
331 accessibility render object. Then subclassers are able to override
332 elementAccessibilityHitTest to return their own specific elements.
334 * accessibility/AccessibilityListBox.cpp:
335 (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
336 * accessibility/AccessibilityListBox.h:
337 * accessibility/AccessibilityObject.h:
338 (WebCore::AccessibilityObject::accessibilityHitTest):
339 (WebCore::AccessibilityObject::elementAccessibilityHitTest):
340 * accessibility/AccessibilityRenderObject.cpp:
341 (WebCore::AccessibilityRenderObject::accessibilityHitTest):
342 * accessibility/AccessibilityRenderObject.h:
343 * accessibility/AccessibilitySlider.cpp:
344 (WebCore::AccessibilitySlider::elementAccessibilityHitTest):
345 * accessibility/AccessibilitySlider.h:
346 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
347 (webkit_accessible_component_ref_accessible_at_point):
348 * accessibility/mac/AccessibilityObjectWrapper.mm:
349 (-[AccessibilityObjectWrapper accessibilityHitTest:]):
351 2010-12-10 Kenneth Russell <kbr@google.com>
353 Reviewed by Darin Adler.
355 Clean up assertion in Extensions3DOpenGL.cpp
356 https://bugs.webkit.org/show_bug.cgi?id=50852
358 Built Release mode to test. No functionality change.
360 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
361 (WebCore::Extensions3DOpenGL::ensureEnabled):
363 2010-12-10 Cosmin Truta <ctruta@chromium.org>
365 Reviewed by Eric Seidel.
367 Crash while processing ill-formed <textPath> ouside of <text>
368 https://bugs.webkit.org/show_bug.cgi?id=47759
370 Renderers within a <text> subtree are created only when their corresponding elements
371 satisfy the content model.
373 Test: svg/custom/invalid-text-content.svg
375 * svg/SVGTRefElement.cpp:
376 (WebCore::SVGTRefElement::childShouldCreateRenderer): Fixed to comply with the content model.
377 (WebCore::SVGTRefElement::rendererIsNeeded): Added.
378 * svg/SVGTRefElement.h:
379 * svg/SVGTSpanElement.cpp:
380 (WebCore::SVGTSpanElement::childShouldCreateRenderer): Fixed to comply with the content model.
381 (WebCore::SVGTSpanElement::rendererIsNeeded): Added.
382 * svg/SVGTSpanElement.h: Changed indentation.
383 * svg/SVGTextElement.cpp:
384 (WebCore::SVGTextElement::childShouldCreateRenderer): Reformatted.
385 * svg/SVGTextPathElement.cpp:
386 (WebCore::SVGTextPathElement::childShouldCreateRenderer): Fixed to comply with the content model.
387 (WebCore::SVGTextPathElement::rendererIsNeeded): Added.
388 * svg/SVGTextPathElement.h:
390 2010-12-10 Zhenyao Mo <zmo@google.com>
392 Reviewed by Adam Barth.
394 Use enums instead of booleans in ImageSource/ImageDecoder constructors
395 https://bugs.webkit.org/show_bug.cgi?id=50818
397 This patch basically defines two enum type in ImageSource: AlphaOption
398 and GammaAndColorProfileOption and use them as ImageSource and ImageDecoder
399 constructor parameters instead of boolean typs.
401 * platform/graphics/ImageSource.cpp:
402 (WebCore::ImageSource::ImageSource):
403 (WebCore::ImageSource::setData):
404 * platform/graphics/ImageSource.h: Define the two enum types.
405 * platform/graphics/cg/GraphicsContext3DCG.cpp:
406 (WebCore::GraphicsContext3D::getImageData):
407 * platform/graphics/cg/ImageSourceCG.cpp:
408 (WebCore::ImageSource::ImageSource):
409 * platform/graphics/qt/ImageDecoderQt.cpp:
410 (WebCore::ImageDecoder::create):
411 (WebCore::ImageDecoderQt::ImageDecoderQt):
412 * platform/graphics/qt/ImageDecoderQt.h:
413 * platform/graphics/skia/GraphicsContext3DSkia.cpp:
414 (WebCore::GraphicsContext3D::getImageData):
415 * platform/image-decoders/ImageDecoder.cpp:
416 (WebCore::ImageDecoder::create):
417 * platform/image-decoders/ImageDecoder.h:
418 (WebCore::ImageDecoder::ImageDecoder):
419 * platform/image-decoders/bmp/BMPImageDecoder.cpp:
420 (WebCore::BMPImageDecoder::BMPImageDecoder):
421 * platform/image-decoders/bmp/BMPImageDecoder.h:
422 * platform/image-decoders/gif/GIFImageDecoder.cpp:
423 (WebCore::GIFImageDecoder::GIFImageDecoder):
424 * platform/image-decoders/gif/GIFImageDecoder.h:
425 * platform/image-decoders/ico/ICOImageDecoder.cpp:
426 (WebCore::ICOImageDecoder::ICOImageDecoder):
427 (WebCore::ICOImageDecoder::decodeAtIndex):
428 * platform/image-decoders/ico/ICOImageDecoder.h:
429 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
430 (WebCore::JPEGImageDecoder::JPEGImageDecoder):
431 * platform/image-decoders/jpeg/JPEGImageDecoder.h:
432 * platform/image-decoders/png/PNGImageDecoder.cpp:
433 (WebCore::PNGImageDecoder::PNGImageDecoder):
434 * platform/image-decoders/png/PNGImageDecoder.h:
435 * platform/image-decoders/webp/WEBPImageDecoder.cpp:
436 (WebCore::WEBPImageDecoder::WEBPImageDecoder):
437 * platform/image-decoders/webp/WEBPImageDecoder.h:
439 2010-12-10 Ryosuke Niwa <rniwa@webkit.org>
441 Reviewed by Darin Adler.
443 REGRESSION(r73799): editing/execCommand/4920488.html fails
444 https://bugs.webkit.org/show_bug.cgi?id=50854
446 The regression was caused by Range::processContents's not extracting
447 m_end.container()->firstChild(). Fixed the bug by always adding the first child.
450 (WebCore::Range::processContents):
452 2010-12-10 Adam Barth <abarth@webkit.org>
454 Reviewed by Eric Seidel.
456 REGRESSION: Infinite redirect on developer.apple.com
457 https://bugs.webkit.org/show_bug.cgi?id=45627
459 Tests: fast/loader/form-submit-aborts-parsing.html
460 fast/loader/location-change-aborts-parsing.html
462 This patch is not pretty, but it fixes the bug. I stole this approach
463 from the old HTML parser (as suggested by Eric Seidel). The other
464 approaches that folks tried for this bug are better, but it's inclear
465 how to get them to work correctly. I've added a large FIXME comment.
467 * html/parser/HTMLDocumentParser.cpp:
468 (WebCore::HTMLDocumentParser::pumpTokenizer):
469 * html/parser/HTMLTreeBuilder.h:
470 (WebCore::HTMLTreeBuilder::isParsingFragment):
472 2010-12-10 Brian Weinstein <bweinstein@apple.com>
474 Reviewed by Ada Chan.
476 When we are creating a ContextMenuItem, only call setSubMenu if we have
479 * platform/ContextMenuItem.cpp:
480 (WebCore::ContextMenuItem::ContextMenuItem):
482 2010-12-10 Kenneth Russell <kbr@google.com>
484 Unreviewed, another build fix. #include <wtf/UnusedParam.h> needed
487 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
489 2010-12-10 Kenneth Russell <kbr@google.com>
491 Unreviewed, build fix. Change #ifndef NDEBUG to #ifdef NDEBUG.
493 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
494 (WebCore::Extensions3DOpenGL::ensureEnabled):
496 2010-12-10 Kenneth Russell <kbr@google.com>
498 Reviewed by James Robinson.
500 Implement extension entry points and remove EXTENSIONS enum
501 https://bugs.webkit.org/show_bug.cgi?id=40316
503 Implemented WebGLRenderingContext's getSupportedExtensions and
504 getExtensions entry points, and, to verify them, added support for
505 the first specified WebGL extension, OES_texture_float. This
506 extension is now advertised in the Chromium and WebKit ports when
507 the underlying hardware supports it.
509 The new OES_texture_float test in the WebGL conformance suite
510 verifies the allocation and population of floating point textures,
511 and their use as render targets. However, because this extension
512 is optional, it is not easily testable with a layout test; there
513 is only one set of expectations for a given test, and two would be
514 needed, one when the extension is available and one when it is not.
516 Tested with the oes-texture-float.html WebGL conformance test in
517 Chromium and WebKit on Mac OS X on hardware that supports the
518 extension. Also verified with a configuration that does not
519 advertise the extension that this same test passes.
522 * DerivedSources.make:
527 * WebCore.xcodeproj/project.pbxproj:
528 * bindings/js/JSWebGLRenderingContextCustom.cpp:
530 (WebCore::JSWebGLRenderingContext::markChildren):
531 (WebCore::JSWebGLRenderingContext::getExtension):
532 (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
533 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
534 (WebCore::toV8Object):
535 (WebCore::V8WebGLRenderingContext::getExtensionCallback):
536 (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
537 * html/canvas/OESTextureFloat.cpp: Added.
538 (WebCore::OESTextureFloat::OESTextureFloat):
539 (WebCore::OESTextureFloat::~OESTextureFloat):
540 (WebCore::OESTextureFloat::getName):
541 (WebCore::OESTextureFloat::create):
542 * html/canvas/OESTextureFloat.h: Added.
543 * html/canvas/OESTextureFloat.idl: Added.
544 * html/canvas/WebGLExtension.cpp: Added.
545 (WebCore::WebGLExtension::WebGLExtension):
546 (WebCore::WebGLExtension::~WebGLExtension):
547 * html/canvas/WebGLExtension.h: Added.
548 * html/canvas/WebGLRenderingContext.cpp:
549 (WebCore::WebGLRenderingContext::getExtension):
550 (WebCore::WebGLRenderingContext::getSupportedExtensions):
551 (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
552 (WebCore::WebGLRenderingContext::validateTexFuncData):
553 (WebCore::WebGLRenderingContext::getNumberOfExtensions):
554 (WebCore::WebGLRenderingContext::getExtensionNumber):
555 * html/canvas/WebGLRenderingContext.h:
556 * html/canvas/WebGLRenderingContext.idl:
557 * platform/graphics/Extensions3D.h:
558 * platform/graphics/GraphicsContext3D.cpp:
559 (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
560 (WebCore::GraphicsContext3D::extractTextureData):
561 (WebCore::doUnpackingAndPacking):
562 (WebCore::doPacking):
563 (WebCore::doFloatingPointPacking):
564 (WebCore::GraphicsContext3D::packPixels):
565 * platform/graphics/GraphicsContext3D.h:
566 * platform/graphics/chromium/Extensions3DChromium.h:
567 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
568 (WebCore::Extensions3DOpenGL::supports):
569 (WebCore::Extensions3DOpenGL::ensureEnabled):
570 * platform/graphics/opengl/Extensions3DOpenGL.h:
571 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
572 (WebCore::GraphicsContext3D::texImage2D):
573 * platform/graphics/qt/Extensions3DQt.cpp:
574 (WebCore::Extensions3DQt::ensureEnabled):
575 * platform/graphics/qt/Extensions3DQt.h:
577 2010-12-10 Darin Adler <darin@apple.com>
579 Try to fix Windows build.
582 (WebCore::Range::processContents): Put typedef of NodeVector inside the function
583 instead of at the top of the file, since the use is restricted to this function.
584 There's another NodeVector in ContainerNode.cpp.
586 2010-12-09 Brian Weinstein <bweinstein@apple.com>
588 Reviewed by Adam Roben.
590 Prep for WebKit2: Context menu support on Windows
591 https://bugs.webkit.org/show_bug.cgi?id=50514
593 Before this patch ContextMenu on Windows were backed by HMENUs, and ContextMenuItems
594 were backed by MENUITEMINFOs. This meant they couldn't be copied, and they needed to
595 be to work in WebKit2.
597 This patch adds a new USE flag - CROSS_PLATFORM_CONTEXT_MENUS that are for a cross-platform
598 representation of context menus. This patch also has Windows adopt them.
600 Cross-platform context menus change the API of context menus and the ContextMenuClient. There
601 is no more idea of a PlatformMenuDescription or a PlatformMenuItemDescription. Menus are backed
602 by a Vector of ContextMenuItems, and menu items are backed by the variables they need (enabled, checked
603 title, action, type, and submenu).
605 This patch also refactors the ContextMenuClient interface to use a variation on the getCustomMenuFromDefaultItems
606 function to allow for customization of the context menu.
608 For other ports to use CROSS_PLATFORM_CONTEXT_MENUS, all they need to do is write conversion functions from
609 a ContextMenu <-> native menu type, and ContextMenuItem <-> native menu item type. For Windows, this is done
610 in ContextMenuWin.cpp and ContextMenuItemWin.cpp.
612 No new tests, no change in behavior.
614 * WebCore.vcproj/WebCore.vcproj: Add new files (only needed on Windows for now).
615 * loader/EmptyClients.h:
616 (WebCore::EmptyContextMenuClient::customizeMenu): Define this function if CROSS_PLATFORM_CONTEXT_MENUS
618 * page/ContextMenuClient.h: Ditto.
619 * page/ContextMenuController.cpp:
620 (WebCore::ContextMenuController::showContextMenu): Call customizeMenu instead of
621 getCustomMenuFromDefaultItems if CROSS_PLATFORM_CONTEXT_MENUS is on.
622 * platform/ContextMenu.cpp: Added.
623 (WebCore::ContextMenu::ContextMenu): Empty constructor.
624 (WebCore::ContextMenu::setItems): Sets the items in the menu.
625 (WebCore::ContextMenu::items): Returns the items in the menu.
626 (WebCore::ContextMenu::itemAtIndex):
627 (WebCore::itemWithActionInMenu): Returns the item with the correct action, recursively descending
629 (WebCore::ContextMenu::itemWithAction): Calls through to itemWithActionInMenu.
630 * platform/ContextMenu.h: Added a new set of functions and member variables that are defined for
631 CROSS_PLATFORM_CONTEXT_MENUS.
632 (WebCore::ContextMenu::appendItem): Appends an item to the menu.
633 * platform/ContextMenuItem.cpp: Added.
634 (WebCore::ContextMenuItem::ContextMenuItem):
635 (WebCore::ContextMenuItem::~ContextMenuItem):
636 (WebCore::ContextMenuItem::setSubMenu):
637 * platform/ContextMenuItem.h:
638 (WebCore::ContextMenuItem::type): Returns the type.
639 (WebCore::ContextMenuItem::setType): Sets the type.
640 (WebCore::ContextMenuItem::action): Returns the action.
641 (WebCore::ContextMenuItem::setAction): Sets the action.
642 (WebCore::ContextMenuItem::title): Returns the title.
643 (WebCore::ContextMenuItem::setTitle): Sets the title.
644 (WebCore::ContextMenuItem::checked): Returns whether or not the menu item is checked.
645 (WebCore::ContextMenuItem::setChecked): Sets whether ot not the menu item is checked.
646 (WebCore::ContextMenuItem::enabled): Returns whether or not the menu item is enabled.
647 (WebCore::ContextMenuItem::setEnabled): Sets whether or not the menu item is enabled.
648 (WebCore::ContextMenuItem::submenu): Returns the submenu.
649 * platform/PlatformMenuDescription.h: Remove the idea if a PlatformMenuDescription if
650 CROSS_PLATFORM_CONTEXT_MENUS is on.
651 * platform/win/ContextMenuItemWin.cpp:
652 (WebCore::ContextMenuItem::ContextMenuItem): Creates a ContextMenuItem from a MENUITEMINFO.
653 (WebCore::ContextMenuItem::nativeMenuItem): Creates and returns a MENUITEMINFO.
654 * platform/win/ContextMenuWin.cpp:
655 (WebCore::ContextMenu::ContextMenu): Creates a ContextMenu from an HMENU.
656 (WebCore::ContextMenu::nativeMenu): Creates and returns an HMENU.
658 2010-12-10 Emil Eklund <eae@chromium.org>
660 Reviewed by Adam Barth.
662 Fix crash in ReplaceSelectionCommand::doApply when selection is modified
664 https://bugs.webkit.org/show_bug.cgi?id=50840
666 Test: editing/execCommand/insertHTML-mutation-crash.html
668 * editing/ReplaceSelectionCommand.cpp:
669 (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
670 Replaced raw node pointer with RefPtr.
672 (WebCore::ReplaceSelectionCommand::doApply):
673 Replaced raw node pointer with RefPtr and added null check.
675 2010-12-10 Emil Eklund <eae@chromium.org>
677 Reviewed by Adam Barth.
679 Fix crash in Range::processContents when modified during mutation event.
680 https://bugs.webkit.org/show_bug.cgi?id=50710
682 Test: fast/dom/Range/range-extractContents.html
685 (WebCore::Range::processContents):
686 Replace raw pointers with RefPtrs and add checks.
688 2010-12-09 Enrica Casucci <enrica@apple.com>
690 Reviewed by Alexey Proskuryakov.
692 Implement IME support for Mac.
693 <rdar://problem/7660589> WebKit2: Implement IME support for Mac.
694 https://bugs.webkit.org/show_bug.cgi?id=50788
696 * dom/KeyboardEvent.h:
697 (WebCore::KeypressCommand::KeypressCommand): Removed ASSERT in constructor,
698 since it is now used for more than one command.
700 2010-12-10 Jessie Berlin <jberlin@apple.com>
702 Windows build fix. Unreviewed.
704 * WebCore.vcproj/WebCore.vcproj:
705 Remove duplicate </File> tag.
707 2010-12-09 Jenn Braithwaite <jennb@chromium.org>
709 Reviewed by Adam Barth.
711 TextResourceDecoder::checkForHeadCharset can look way past the limit.
712 https://bugs.webkit.org/show_bug.cgi?id=47397
714 Replaced charset detection algorithm with real parser.
715 Added tests for parser bugs mentioned in the thread for this bug report.
716 Converted hixie's encoding parsing tests to a layout test.
718 Tests: fast/encoding/bracket-in-script.html
719 fast/encoding/bracket-in-tag.html
720 fast/encoding/escaped-bracket.html
721 fast/encoding/meta-in-body.html
722 fast/encoding/meta-in-script.html
723 fast/encoding/meta-in-title.html
724 fast/encoding/mismatched-end-tag.html
725 fast/encoding/namespace-meta.html
726 fast/encoding/not-http-equiv-content.html
727 fast/encoding/parser-tests.html
728 fast/encoding/quotes-in-title.html
729 fast/encoding/tag-name-digit.html
730 http/tests/misc/charset-sniffer-end-sniffing.html
737 * WebCore.vcproj/WebCore.vcproj:
738 * WebCore.xcodeproj/project.pbxproj:
739 * html/parser/HTMLMetaCharsetParser.cpp: Added.
740 (WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
741 (WebCore::HTMLMetaCharsetParser::~HTMLMetaCharsetParser):
742 (WebCore::HTMLMetaCharsetParser::extractCharset):
743 (WebCore::HTMLMetaCharsetParser::processMeta):
744 (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
745 * html/parser/HTMLMetaCharsetParser.h: Added.
746 (WebCore::HTMLMetaCharsetParser::create):
747 (WebCore::HTMLMetaCharsetParser::encoding):
748 * loader/TextResourceDecoder.cpp:
749 (WebCore::TextResourceDecoder::checkForHeadCharset):
750 (WebCore::TextResourceDecoder::checkForMetaCharset):
751 * loader/TextResourceDecoder.h:
753 2010-12-10 Nate Chapin <japhet@chromium.org>
755 Reviewed by Antti Koivisto.
757 Merge Loader and Request. Currently, Loader is a singleton attached
758 to MemoryCache. Our goal is to remove knowledge of the loading process
759 from MemoryCache, so we should attach Loader to CachedResourceLoader instead.
760 Once Loader is moved off of MemoryCache, there's no reason it needs to be a singleton,
761 which removes the main reason for Request existing as a separate class (to store per-request
762 state that Loader couldn't).
764 Loader will be given a more descriptive name in a later patch.
766 https://bugs.webkit.org/show_bug.cgi?id=49837
768 Refactor only, no new tests.
775 * loader/FrameLoader.cpp:
776 * loader/Request.cpp:
778 * loader/cache/CachedFont.cpp:
779 * loader/cache/CachedImage.cpp:
780 * loader/cache/CachedResource.cpp:
781 * loader/cache/CachedResource.h:
782 * loader/cache/CachedResourceLoader.cpp:
783 (WebCore::CachedResourceLoader::CachedResourceLoader):
784 (WebCore::CachedResourceLoader::~CachedResourceLoader):
785 (WebCore::CachedResourceLoader::requestImage):
786 (WebCore::CachedResourceLoader::setAutoLoadImages):
787 (WebCore::CachedResourceLoader::load):
788 (WebCore::CachedResourceLoader::loadDone): Was setLoadInProgress(false),
789 plus other CachedResourceLoader cleanup that had been handled in Loader.
790 (WebCore::CachedResourceLoader::cancelRequests): Moved from Loader.
791 (WebCore::CachedResourceLoader::requestCount):
792 * loader/cache/CachedResourceLoader.h:
793 (WebCore::CachedResourceLoader::loadFinishing): Was setLoadInProgress(true)
794 * loader/cache/MemoryCache.h:
796 (WebCore::Loader::Loader):
797 (WebCore::Loader::~Loader):
798 (WebCore::Loader::load):
799 (WebCore::Loader::willSendRequest):
800 (WebCore::Loader::didFinishLoading):
801 (WebCore::Loader::didFail):
802 (WebCore::Loader::didReceiveResponse):
803 (WebCore::Loader::didReceiveData):
804 (WebCore::Loader::didReceiveCachedMetadata):
806 (WebCore::Loader::cachedResourceLoader):
808 2010-12-10 Martin Robinson <mrobinson@igalia.com>
810 Unreviewed, rolling out r73703.
811 http://trac.webkit.org/changeset/73703
812 https://bugs.webkit.org/show_bug.cgi?id=49658
814 This patch is causing crashes on the GTK+ bots.
816 * platform/ContextMenuItem.h:
817 (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
818 * platform/gtk/ContextMenuGtk.cpp:
819 (WebCore::ContextMenu::appendItem):
820 * platform/gtk/ContextMenuItemGtk.cpp:
821 (WebCore::ContextMenuItem::ContextMenuItem):
822 (WebCore::ContextMenuItem::~ContextMenuItem):
823 (WebCore::ContextMenuItem::createNativeMenuItem):
824 (WebCore::ContextMenuItem::releasePlatformDescription):
825 (WebCore::ContextMenuItem::type):
826 (WebCore::ContextMenuItem::setType):
827 (WebCore::ContextMenuItem::action):
828 (WebCore::ContextMenuItem::setAction):
829 (WebCore::ContextMenuItem::title):
830 (WebCore::ContextMenuItem::setTitle):
831 (WebCore::ContextMenuItem::platformSubMenu):
832 (WebCore::ContextMenuItem::setSubMenu):
833 (WebCore::ContextMenuItem::setChecked):
834 (WebCore::ContextMenuItem::setEnabled):
836 2010-12-08 Mihai Parparita <mihaip@chromium.org>
838 Reviewed by Darin Adler.
840 fast/canvas/canvas-getImageData-negative-source.html fails on Mac
841 https://bugs.webkit.org/show_bug.cgi?id=47901
843 Test: fast/canvas/canvas-getImageData-rounding.html
845 static_cast<unsigned> is generally not what we want in
846 convertLogicalToDevice. It produces inconsistent results when compiling
847 for 32-bit vs. 64-bit, and in any case we weren't getting correct
848 rounding behavior for source rectangles (e.g. we should get a source rect
849 of width 2 if the source X is 0.9 and the source width is 0.2, but we
850 were getting only one of width 1).
852 * html/HTMLCanvasElement.cpp:
853 (WebCore::HTMLCanvasElement::convertLogicalToDevice):
854 (WebCore::HTMLCanvasElement::convertToValidDeviceSize):
855 * html/HTMLCanvasElement.h:
857 2010-12-10 Hironori Bono <hbono@chromium.org>
859 Reviewed by Ojan Vafai.
861 [Chromium] Use libjpeg-turbo instead of libjpeg
862 https://bugs.webkit.org/show_bug.cgi?id=50054
864 This change replaces the hard-coded path to the GYP files of the JPEG
865 library with a 'libjpeg_gyp_path' variable, which is added by Chromium
866 r68453. (When building WebKit Chromium, this change sets its value to
867 '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp' to avoid changing
868 the current behavior.)
870 No new tests since this does not change the code at all.
872 * WebCore.gyp/WebCore.gyp:
874 2010-12-10 Chris Marrin <cmarrin@apple.com>
876 Reviewed by Simon Fraser.
878 Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
879 https://bugs.webkit.org/show_bug.cgi?id=49388
881 Got rid of the NonZeroBeginTimeFlag. Functionality is now hidden inside
884 * platform/graphics/ca/GraphicsLayerCA.cpp:
885 (WebCore::GraphicsLayerCA::setAnimationOnLayer):
886 * platform/graphics/ca/PlatformCAAnimation.h:
887 * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
888 (hasNonZeroBeginTimeFlag):
889 (setNonZeroBeginTimeFlag):
890 (PlatformCAAnimation::PlatformCAAnimation):
891 (PlatformCAAnimation::setBeginTime):
893 2010-12-10 Pavel Podivilov <podivilov@chromium.org>
895 Reviewed by Pavel Feldman.
897 Web Inspector: eliminate SourceFrameDelegate by passing scripts to SourceFrame constructor.
898 https://bugs.webkit.org/show_bug.cgi?id=50679
900 * inspector/front-end/Script.js:
901 * inspector/front-end/ScriptView.js:
902 (WebInspector.ScriptView):
903 * inspector/front-end/ScriptsPanel.js:
904 (WebInspector.ScriptsPanel.prototype.reset):
905 * inspector/front-end/SourceFrame.js:
906 (WebInspector.SourceFrame):
907 (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
908 (WebInspector.SourceFrame.prototype._breakpointAdded):
909 (WebInspector.SourceFrame.prototype._doEditLine):
910 (WebInspector.SourceFrame.prototype._commitEditLine):
911 (WebInspector.SourceFrame.prototype._breakpoints):
912 (WebInspector.SourceFrame.prototype._sourceIDForLine):
913 * inspector/front-end/SourceView.js:
914 (WebInspector.SourceView):
916 2010-12-10 Andreas Kling <kling@webkit.org>
918 Reviewed by Eric Seidel.
920 Don't do GraphicsContext save/restore just to preserve the CompositeOperator
921 https://bugs.webkit.org/show_bug.cgi?id=50070
923 Add GraphicsContext::compositeOperation() so we don't have to do a full
924 save/restore if the only context-tainting call is setCompositeOperation().
926 GraphicsContext::setCompositeOperation() now stores the op in its state
927 and calls a port-specific setPlatformCompositeOperation().
929 No new tests, this is an optimization.
931 * platform/graphics/GraphicsContext.cpp:
932 (WebCore::GraphicsContext::setCompositeOperation):
933 (WebCore::GraphicsContext::compositeOperation):
934 * platform/graphics/GraphicsContext.h:
935 * platform/graphics/GraphicsContextPrivate.h:
936 (WebCore::GraphicsContextState::GraphicsContextState):
937 * platform/graphics/Image.cpp:
938 (WebCore::Image::fillWithSolidColor):
939 * platform/graphics/cairo/GraphicsContextCairo.cpp:
940 (WebCore::GraphicsContext::setPlatformCompositeOperation):
941 * platform/graphics/cg/GraphicsContextCG.cpp:
942 (WebCore::GraphicsContext::setPlatformCompositeOperation):
943 * platform/graphics/haiku/GraphicsContextHaiku.cpp:
944 (WebCore::GraphicsContext::setPlatformCompositeOperation):
945 * platform/graphics/mac/GraphicsContextMac.mm:
946 (WebCore::GraphicsContext::setPlatformCompositeOperation):
947 * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
948 (WebCore::GraphicsContext::setPlatformCompositeOperation):
949 * platform/graphics/qt/GraphicsContextQt.cpp:
950 (WebCore::GraphicsContext::setPlatformCompositeOperation):
951 * platform/graphics/skia/GraphicsContextSkia.cpp:
952 (WebCore::GraphicsContext::setPlatformCompositeOperation):
953 * platform/graphics/skia/SkiaUtils.cpp:
954 (WebCore::WebCoreCompositeToSkiaComposite):
955 * platform/graphics/wince/GraphicsContextWinCE.cpp:
956 (WebCore::GraphicsContext::setPlatformCompositeOperation):
957 * platform/graphics/wx/GraphicsContextWx.cpp:
958 (WebCore::GraphicsContext::setPlatformCompositeOperation):
959 * rendering/RenderBoxModelObject.cpp:
960 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
961 * rendering/RenderView.cpp:
962 (WebCore::RenderView::paintBoxDecorations):
964 2010-12-10 Renata Hodovan <reni@webkit.org>
966 Reviewed by Andreas Kling.
968 GraphicsContext: Merge m_common and m_data
969 https://bugs.webkit.org/show_bug.cgi?id=49914
971 Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
972 and m_common became unnecessary. They are removed.
973 Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
974 make the constructor of GraphicsContext clearer.
975 Besides add a getter to the private GraphicsContext::m_state member, because some inline
976 functions in cairo need it.
978 No new test is needed, because this is a refactoring.
980 * WebCore.xcodeproj/project.pbxproj:
981 * platform/graphics/GraphicsContext.cpp:
982 (WebCore::GraphicsContext::GraphicsContext):
983 (WebCore::GraphicsContext::~GraphicsContext):
984 (WebCore::GraphicsContext::save):
985 (WebCore::GraphicsContext::restore):
986 (WebCore::GraphicsContext::setStrokeThickness):
987 (WebCore::GraphicsContext::setStrokeStyle):
988 (WebCore::GraphicsContext::setStrokeColor):
989 (WebCore::GraphicsContext::setShadow):
990 (WebCore::GraphicsContext::clearShadow):
991 (WebCore::GraphicsContext::getShadow):
992 (WebCore::GraphicsContext::strokeThickness):
993 (WebCore::GraphicsContext::strokeStyle):
994 (WebCore::GraphicsContext::strokeColor):
995 (WebCore::GraphicsContext::strokeColorSpace):
996 (WebCore::GraphicsContext::fillRule):
997 (WebCore::GraphicsContext::setFillRule):
998 (WebCore::GraphicsContext::setFillColor):
999 (WebCore::GraphicsContext::fillColor):
1000 (WebCore::GraphicsContext::fillColorSpace):
1001 (WebCore::GraphicsContext::setShouldAntialias):
1002 (WebCore::GraphicsContext::shouldAntialias):
1003 (WebCore::GraphicsContext::state):
1004 (WebCore::GraphicsContext::setStrokePattern):
1005 (WebCore::GraphicsContext::setFillPattern):
1006 (WebCore::GraphicsContext::setStrokeGradient):
1007 (WebCore::GraphicsContext::setFillGradient):
1008 (WebCore::GraphicsContext::fillGradient):
1009 (WebCore::GraphicsContext::strokeGradient):
1010 (WebCore::GraphicsContext::fillPattern):
1011 (WebCore::GraphicsContext::strokePattern):
1012 (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
1013 (WebCore::GraphicsContext::updatingControlTints):
1014 (WebCore::GraphicsContext::setUpdatingControlTints):
1015 (WebCore::GraphicsContext::setPaintingDisabled):
1016 (WebCore::GraphicsContext::paintingDisabled):
1017 (WebCore::GraphicsContext::textDrawingMode):
1018 (WebCore::GraphicsContext::setTextDrawingMode):
1019 * platform/graphics/GraphicsContext.h:
1020 (WebCore::GraphicsContextState::GraphicsContextState):
1021 * platform/graphics/GraphicsContextPrivate.h: Removed.
1022 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1023 (WebCore::setPlatformFill):
1024 (WebCore::setPlatformStroke):
1025 (WebCore::drawPathShadow):
1026 (WebCore::fillCurrentCairoPath):
1027 (WebCore::strokeCurrentCairoPath):
1028 (WebCore::GraphicsContext::platformInit):
1029 (WebCore::GraphicsContext::platformDestroy):
1030 (WebCore::GraphicsContext::fillPath):
1031 (WebCore::GraphicsContext::strokePath):
1032 (WebCore::GraphicsContext::fillRect):
1033 (WebCore::GraphicsContext::setPlatformShadow):
1034 (WebCore::GraphicsContext::strokeRect):
1035 (WebCore::GraphicsContext::setAlpha):
1036 (WebCore::GraphicsContext::getAlpha):
1037 * platform/graphics/cg/GraphicsContextCG.cpp:
1038 (WebCore::GraphicsContext::platformInit):
1039 (WebCore::GraphicsContext::platformDestroy):
1040 (WebCore::GraphicsContext::applyStrokePattern):
1041 (WebCore::GraphicsContext::applyFillPattern):
1042 (WebCore::GraphicsContext::drawPath):
1043 (WebCore::GraphicsContext::fillPath):
1044 (WebCore::GraphicsContext::strokePath):
1045 (WebCore::GraphicsContext::fillRect):
1046 (WebCore::GraphicsContext::setPlatformShadow):
1047 (WebCore::GraphicsContext::strokeRect):
1048 * platform/graphics/haiku/GraphicsContextHaiku.cpp:
1049 (WebCore::GraphicsContext::platformInit):
1050 (WebCore::GraphicsContext::platformDestroy):
1051 * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
1052 (WebCore::GraphicsContext::platformInit):
1053 (WebCore::GraphicsContext::platformDestroy):
1054 (WebCore::GraphicsContext::fillPath):
1055 (WebCore::GraphicsContext::strokePath):
1056 (WebCore::GraphicsContext::clip):
1057 (WebCore::GraphicsContext::clipOut):
1058 (WebCore::GraphicsContext::addInnerRoundedRectClip):
1059 * platform/graphics/qt/GraphicsContextQt.cpp:
1060 (WebCore::GraphicsContext::platformInit):
1061 (WebCore::GraphicsContext::platformDestroy):
1062 (WebCore::GraphicsContext::fillPath):
1063 (WebCore::GraphicsContext::strokePath):
1064 (WebCore::GraphicsContext::fillRect):
1065 (WebCore::GraphicsContext::setPlatformShadow):
1066 * platform/graphics/skia/GraphicsContextSkia.cpp:
1067 (WebCore::GraphicsContext::platformInit):
1068 (WebCore::GraphicsContext::platformDestroy):
1069 (WebCore::GraphicsContext::fillPath):
1070 (WebCore::GraphicsContext::setPlatformShadow):
1071 * platform/graphics/win/GraphicsContextCGWin.cpp:
1072 (WebCore::GraphicsContext::GraphicsContext):
1073 (WebCore::GraphicsContext::platformInit):
1074 * platform/graphics/win/GraphicsContextCairoWin.cpp:
1075 (WebCore::GraphicsContext::GraphicsContext):
1076 (WebCore::GraphicsContext::platformInit):
1077 * platform/graphics/wince/GraphicsContextWinCE.cpp:
1078 (WebCore::GraphicsContext::platformInit):
1079 (WebCore::GraphicsContext::platformDestroy):
1080 (WebCore::GraphicsContext::fillPath):
1081 (WebCore::GraphicsContext::fillRect):
1082 * platform/graphics/wx/GraphicsContextWx.cpp:
1083 (WebCore::GraphicsContext::platformInit):
1084 (WebCore::GraphicsContext::platformDestroy):
1086 2010-12-10 Pavel Podivilov <podivilov@chromium.org>
1088 Reviewed by Yury Semikhatsky.
1090 Web Inspector: introduce a pair of set/remove methods for each breakpoint type.
1091 https://bugs.webkit.org/show_bug.cgi?id=50809
1093 * inspector/Inspector.idl:
1094 * inspector/InspectorController.cpp:
1095 (WebCore::InspectorController::InspectorController):
1096 (WebCore::InspectorController::setEventListenerBreakpoint):
1097 (WebCore::InspectorController::removeEventListenerBreakpoint):
1098 (WebCore::InspectorController::hasEventListenerBreakpoint):
1099 (WebCore::InspectorController::setXHRBreakpoint):
1100 (WebCore::InspectorController::removeXHRBreakpoint):
1101 (WebCore::InspectorController::hasXHRBreakpoint):
1102 (WebCore::InspectorController::clearNativeBreakpoints):
1103 * inspector/InspectorController.h:
1104 * inspector/InspectorDOMAgent.cpp:
1105 (WebCore::InspectorDOMAgent::setDOMBreakpoint):
1106 (WebCore::InspectorDOMAgent::removeDOMBreakpoint):
1107 (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion):
1108 (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval):
1109 (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification):
1110 (WebCore::InspectorDOMAgent::descriptionForDOMEvent):
1111 (WebCore::InspectorDOMAgent::didRemoveDOMNode):
1112 * inspector/InspectorDOMAgent.h:
1113 * inspector/InspectorInstrumentation.cpp:
1114 (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
1115 (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
1116 (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
1117 (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
1118 (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1119 * inspector/front-end/BreakpointManager.js:
1120 (WebInspector.BreakpointManager):
1121 (WebInspector.NativeBreakpoint):
1122 (WebInspector.DOMBreakpoint):
1123 (WebInspector.EventListenerBreakpoint):
1124 (WebInspector.XHRBreakpoint):
1125 * inspector/front-end/CallStackSidebarPane.js:
1126 (WebInspector.CallStackSidebarPane):
1127 (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
1128 * inspector/front-end/DebuggerModel.js:
1129 (WebInspector.DebuggerModel.prototype.debuggerPaused):
1131 2010-12-10 Adam Roben <aroben@apple.com>
1133 Windows production build fix after r72555
1135 * WebCore.vcproj/WebCoreGeneratedCommon.vsprops: Use
1136 "$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win" to find the
1137 .vsprops files, rather than $(WebKitLibrariesDir).
1139 2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1141 Reviewed by nobody, build fix.
1143 [Qt] Second attempt to fix the build with Qt 4.6 broken in 73710.
1145 * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1146 (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
1147 (WebCore::QtNetworkReplyThreadSafeProxy::localCustomRequest):
1148 * platform/network/qt/QtNAMThreadSafeProxy.h:
1150 2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1152 Reviewed by nobody, build fix.
1154 [Qt] Fix the build with Qt 4.6 broken in 73710.
1156 * platform/network/qt/QtNAMThreadSafeProxy.cpp:
1157 (WebCore::QtNetworkReplyThreadSafeProxy::QtNetworkReplyThreadSafeProxy):
1158 * platform/network/qt/QtNAMThreadSafeProxy.h:
1160 2010-12-10 Emil Eklund <eae@chromium.org>
1162 Reviewed by Eric Seidel.
1164 Change EventHandler::dispatchMouseEvent code to use DOM traversal instead of render tree traversal
1165 https://bugs.webkit.org/show_bug.cgi?id=49982
1167 * page/EventHandler.cpp:
1168 (WebCore::EventHandler::dispatchMouseEvent):
1169 Walk up DOM/hosted tree rather than render tree.
1171 2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1173 Reviewed by Kenneth Rohde Christiansen.
1175 [Qt] Support a QNetworkAccessManager affined to a different thread.
1176 https://bugs.webkit.org/show_bug.cgi?id=50080
1178 This patch introduce thread safe proxy classes for QNetworkAccessManager
1180 If run in the same thread, these objects will forward the calls with
1181 Qt::DirectConnection bindings, while in the other case they will use
1182 Qt::QueuedConnection to carry requests accross threads.
1184 This patch basically:
1185 - Makes sure that all access goes through these objects
1186 - Reorders signal connections to make sure we are connected when the
1188 - Makes sure that no QObject in the WebCore thread is a child of the
1189 reply which might be in a different thread.
1190 - Forward the data directly in QByteArrays in signals instead of collecting
1191 the data when the signal is handled.
1193 New test: tst_QWebPage::networkAccessManagerOnDifferentThread
1196 * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
1197 (WebCore::MediaPlayerPrivateQt::commitLoad):
1198 * platform/network/qt/QNetworkReplyHandler.cpp:
1199 (WebCore::FormDataIODevice::FormDataIODevice):
1200 (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1201 (WebCore::QNetworkReplyHandler::~QNetworkReplyHandler):
1202 (WebCore::QNetworkReplyHandler::setLoadMode):
1203 (WebCore::QNetworkReplyHandler::abort):
1204 (WebCore::QNetworkReplyHandler::release):
1205 (WebCore::ignoreHttpError):
1206 (WebCore::QNetworkReplyHandler::finish):
1207 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1208 (WebCore::QNetworkReplyHandler::forwardData):
1209 (WebCore::QNetworkReplyHandler::start):
1210 (WebCore::QNetworkReplyHandler::sendQueuedItems):
1211 * platform/network/qt/QNetworkReplyHandler.h:
1212 * platform/network/qt/QtNAMThreadSafeProxy.cpp: Added.
1213 * platform/network/qt/QtNAMThreadSafeProxy.h: Added.
1214 * platform/network/qt/ResourceHandleQt.cpp:
1215 (WebCore::ResourceHandle::willLoadFromCache):
1216 * platform/qt/CookieJarQt.cpp:
1217 (WebCore::networkAccessManager):
1218 (WebCore::setCookies):
1220 (WebCore::cookieRequestHeaderFieldValue):
1221 (WebCore::cookiesEnabled):
1223 2010-12-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1225 Reviewed by Kenneth Rohde Christiansen.
1227 [Qt] Refactor QNetworkReplyHandler::finish() to prevent crashes.
1228 https://bugs.webkit.org/show_bug.cgi?id=50761
1230 This patch change the order to check if m_reply is null instead,
1231 explicitly deleting the reply before calling start() for a redirect,
1232 or after calling didFinishLoading()/didFail() in other cases.
1234 * platform/network/qt/QNetworkReplyHandler.cpp:
1235 (WebCore::QNetworkReplyHandler::finish):
1237 2010-12-09 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1239 Reviewed by Kenneth Rohde Christiansen.
1241 [Qt] Make sure we send the response before any data.
1242 https://bugs.webkit.org/show_bug.cgi?id=50760
1244 This patch make sure the data available flag is set before
1245 we call sendResponseIfNeeded.
1247 * platform/network/qt/QNetworkReplyHandler.cpp:
1248 (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1249 (WebCore::QNetworkReplyHandler::finish):
1250 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1251 (WebCore::QNetworkReplyHandler::forwardData):
1252 (WebCore::QNetworkReplyHandler::resetState):
1253 * platform/network/qt/QNetworkReplyHandler.h:
1255 2010-12-10 Koan-Sin Tan <koansin.tan@gmail.com>
1257 Reviewed by Dan Bernstein.
1259 Bopomofo should be part of CJK Ideographs in WebCore/platform/graphics/Font.cpp
1260 https://bugs.webkit.org/show_bug.cgi?id=50668
1262 No new tests. Note that, as said in the bug report discussion,
1263 I did have a test case for the bug. However, to show the test
1264 case you need some "broken" Microsoft copyrighted fonts, such
1267 * platform/graphics/Font.cpp:
1268 (WebCore::Font::isCJKIdeograph):
1270 2010-12-10 Carlos Garcia Campos <cgarcia@igalia.com>
1272 Reviewed by Martin Robinson.
1274 [GTK] Simplify context-menu handling code
1275 https://bugs.webkit.org/show_bug.cgi?id=49658
1277 * platform/ContextMenuItem.h:
1278 * platform/gtk/ContextMenuGtk.cpp:
1279 (WebCore::ContextMenu::appendItem):
1280 * platform/gtk/ContextMenuItemGtk.cpp:
1281 (WebCore::ContextMenuItem::ContextMenuItem):
1282 (WebCore::ContextMenuItem::~ContextMenuItem):
1283 (WebCore::ContextMenuItem::releasePlatformDescription):
1284 (WebCore::ContextMenuItem::type):
1285 (WebCore::ContextMenuItem::setType):
1286 (WebCore::ContextMenuItem::action):
1287 (WebCore::ContextMenuItem::setAction):
1288 (WebCore::ContextMenuItem::title):
1289 (WebCore::ContextMenuItem::setTitle):
1290 (WebCore::ContextMenuItem::platformSubMenu):
1291 (WebCore::ContextMenuItem::setSubMenu):
1292 (WebCore::ContextMenuItem::setChecked):
1293 (WebCore::ContextMenuItem::setEnabled):
1295 2010-12-10 Philippe Normand <pnormand@igalia.com>
1297 Reviewed by Gustavo Noronha Silva.
1299 [GStreamer] un-needed methods
1300 https://bugs.webkit.org/show_bug.cgi?id=50805
1302 No new tests, code cleanup only.
1304 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1305 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1307 2010-12-10 Philippe Normand <pnormand@igalia.com>
1309 Reviewed by Gustavo Noronha Silva.
1311 [GStreamer] data: source could also support non-base64 encoded URIs
1312 https://bugs.webkit.org/show_bug.cgi?id=30007
1314 Removed our ancient implementation of dataurisrc. We should now
1315 use the one in gst-plugins-bad which is more mature.
1318 * platform/graphics/gstreamer/DataSourceGStreamer.cpp: Removed.
1319 * platform/graphics/gstreamer/DataSourceGStreamer.h: Removed.
1320 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1321 (WebCore::doGstInit):
1323 2010-12-10 Zoltan Herczeg <zherczeg@webkit.org>
1325 Reviewed by Eric Seidel.
1327 [Qt] Fix crashes in debug mode
1328 https://bugs.webkit.org/show_bug.cgi?id=49976
1330 The m_methods hashmap of QtInstance contains InternalFunctions
1331 whose depend on the current RuntimeObject. When we recreate the
1332 RuntimeObject, we should also reset this hashmap.
1334 * bridge/qt/qt_instance.cpp:
1335 (JSC::Bindings::QtInstance::newRuntimeObject):
1337 2010-12-10 François Sausset <sausset@gmail.com>
1339 Reviewed by Eric Seidel.
1341 MathML: update baselinePosition() call in RenderMathMLBlock.cpp
1342 https://bugs.webkit.org/show_bug.cgi?id=50540
1344 The call of baselinePosition() is outdated: new arguments added.
1346 * mathml/RenderMathMLBlock.cpp:
1347 (WebCore::RenderMathMLBlock::paint):
1349 2010-12-10 Hans Wennborg <hans@chromium.org>
1351 Reviewed by Jeremy Orlow.
1353 IndexedDB: Numeric keys are floats.
1354 https://bugs.webkit.org/show_bug.cgi?id=50674
1356 Use floating point to represent numeric keys,
1357 add version meta data to the SQLite db,
1358 and migrate object stores that use integers.
1360 * bindings/v8/IDBBindingUtilities.cpp:
1361 (WebCore::createIDBKeyFromValue):
1362 * bindings/v8/custom/V8IDBKeyCustom.cpp:
1364 * storage/IDBFactoryBackendImpl.cpp:
1365 (WebCore::createTables):
1366 (WebCore::migrateDatabase):
1367 (WebCore::IDBFactoryBackendImpl::open):
1368 * storage/IDBKey.cpp:
1369 (WebCore::IDBKey::IDBKey):
1370 (WebCore::IDBKey::fromQuery):
1371 (WebCore::IDBKey::bind):
1372 (WebCore::IDBKey::bindWithNulls):
1374 (WebCore::IDBKey::create):
1375 (WebCore::IDBKey::number):
1377 2010-12-10 Martin Robinson <mrobinson@igalia.com>
1379 Reviewed by Xan Lopez.
1381 [Gtk] style="font-family: courier" makes text disappear
1382 https://bugs.webkit.org/show_bug.cgi?id=47452
1384 Don't ever use fonts that do not have any of the three charmaps that
1385 Fontconfig supports (Unicode, Apple Roman and Symbol). If we select
1386 a font that doesn't have one of these charmaps, use the next font in
1389 Test: platform/gtk/fonts/font-with-no-valid-encoding.html
1391 * platform/graphics/freetype/FontCacheFreeType.cpp:
1392 (WebCore::FontCache::createFontPlatformData): Check whether the
1393 font we selected has a valid Fontconfig charmap.
1394 * platform/graphics/freetype/FontPlatformData.h: Added new method definition.
1395 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1396 (WebCore::FontPlatformData::hasCompatibleCharmap): Added this method which
1397 verifies that a font has a valid Fontconfig charmap.
1399 2010-12-09 Ryosuke Niwa <rniwa@webkit.org>
1401 Reviewed by Ojan Vafai.
1403 Make DOM Mutation Events Asynchronous
1404 https://bugs.webkit.org/show_bug.cgi?id=46936
1406 Implemented DOM mutations events as scoped events. A scoped event is an event whose
1407 dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
1408 EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
1409 on its constructor and destructor respectively.
1411 When the scoping level is 0 (initial level), scoped events are dispatched as soon as
1412 they are enqueued and act like synchronous events. When the scoping level is greater than 0,
1413 however, events are queued in ScopedEventQueue and their dispatches are delayed until
1414 the scoping level goes back to 0 (by the destruction of EventQueueScope).
1416 DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
1417 DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
1418 scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
1419 of the events until the completion of each call of EditCommand::doApply.
1421 Test: fast/events/mutation/execCommands.html
1423 * Android.mk: Added ScopedEventQueue.cpp.
1424 * CMakeLists.txt: Ditto.
1425 * WebCore.pro: Ditto.
1426 * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
1427 * WebCore.gypi: Ditto.
1428 * WebCore.vcproj/project.vcproj: Ditto.
1429 * WebCore.xcodeproj/project.pbxproj: Ditto.
1430 * dom/ContainerNode.cpp:
1431 (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
1432 (WebCore::dispatchChildRemovalEvents): Ditto.
1433 * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
1435 (WebCore::Element::dispatchAttrRemovalEvent): Ditto.
1436 (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
1438 (WebCore::Node::dispatchScopedEvent): Added.
1439 (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
1441 * dom/ScopedEventQueue.cpp: Added.
1442 (WebCore::ScopedEventQueue::initialize): Added.
1443 (WebCore::ScopedEventQueue::enqueueEvent): Added.
1444 (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
1445 (WebCore::ScopedEventQueue::dispatchEvent): Added.
1446 (WebCore::ScopedEventQueue::instance): Added.
1447 (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
1448 (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
1449 * dom/ScopedEventQueue.h: Added.
1450 (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
1451 (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
1452 (WebCore::EventQueueScope::EventQueueScope): Added.
1453 (WebCore::EventQueueScope::~EventQueueScope): Added.
1454 * editing/EditCommand.cpp:
1455 (WebCore::EditCommand::apply): Instantiates EventQueueScope.
1457 2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com>
1459 Unreviewed, rolling out r73684.
1460 http://trac.webkit.org/changeset/73684
1461 https://bugs.webkit.org/show_bug.cgi?id=50801
1463 "missing bug number" (Requested by rniwa on #webkit).
1470 * WebCore.vcproj/WebCore.vcproj:
1471 * WebCore.xcodeproj/project.pbxproj:
1472 * dom/ContainerNode.cpp:
1473 (WebCore::dispatchChildInsertionEvents):
1474 (WebCore::dispatchChildRemovalEvents):
1475 * dom/DOMAllInOne.cpp:
1477 (WebCore::Element::dispatchAttrRemovalEvent):
1478 (WebCore::Element::dispatchAttrAdditionEvent):
1480 (WebCore::Node::dispatchSubtreeModifiedEvent):
1481 (WebCore::Node::dispatchUIEvent):
1483 * dom/ScopedEventQueue.cpp: Removed.
1484 * dom/ScopedEventQueue.h: Removed.
1485 * editing/EditCommand.cpp:
1486 (WebCore::EditCommand::apply):
1488 2010-12-09 Qi Zhang <qi.2.zhang@nokia.com>
1490 Reviewed by Kenneth Rohde Christiansen.
1492 [Qt] enable orientation flag when QtMobility available
1493 https://bugs.webkit.org/show_bug.cgi?id=50781
1495 When QtMobility available, enable orientation flag by default.
1499 2010-12-09 Kenichi Ishibashi <bashi@google.com>
1501 Reviewed by Kent Tamura.
1503 Improve validation API support of <object> and <keygen>
1504 https://bugs.webkit.org/show_bug.cgi?id=50663
1506 Adds validation API to HTMLObjectElement class.
1507 Makes HTMLKeygenElement::willValidate() return false.
1509 Test: fast/forms/setCustomValidity-existence.html
1511 * html/HTMLKeygenElement.h:
1512 (WebCore::HTMLKeygenElement::willValidate): Added.
1513 * html/HTMLObjectElement.h:
1514 (WebCore::HTMLObjectElement::validationMessage): Added.
1515 (WebCore::HTMLObjectElement::checkValidity): Added.
1516 (WebCore::HTMLObjectElement::setCustomValidity): Added.
1517 * html/HTMLObjectElement.idl: Added validation API properties.
1519 2010-12-09 Sadrul Habib Chowdhury <sadrul@chromium.org>
1521 Reviewed by Kent Tamura.
1523 Make sure a non-zero value is used for tile-width to avoid a crash
1524 https://bugs.webkit.org/show_bug.cgi?id=50341
1526 The scaled tile width can be very small at times (e.g. with 'style: font 1
1527 required'). So use a minimum width of 1 instead of using 0 (which leads to a
1530 Tests: fast/dom/HTMLProgressElement/progress-element-with-style-crash.html
1532 * rendering/RenderThemeChromiumSkia.cpp:
1533 (WebCore::RenderThemeChromiumSkia::paintProgressBar):
1535 2010-12-09 Ryosuke Niwa <rniwa@webkit.org>
1537 Reviewed by Ojan Vafai.
1539 Implemented DOM mutations events as scoped events. A scoped event is an event whose
1540 dispatch is done via ScopedEventQueue. The behavior of the queue is controlled by
1541 EventQueueScope objects (RAII idiom), which increments and decrements the scoping level
1542 on its constructor and destructor respectively.
1544 When the scoping level is 0 (initial level), scoped events are dispatched as soon as
1545 they are enqueued and act like synchronous events. When the scoping level is greater than 0,
1546 however, events are queued in ScopedEventQueue and their dispatches are delayed until
1547 the scoping level goes back to 0 (by the destruction of EventQueueScope).
1549 DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument,
1550 DOMNodeInsertedIntoDocument, DOMFocusIn, DOMFocusOut, focusin, and focusout are treated as
1551 scoped events, and a scope object is instantiated in EditCommand::apply to delay dispatches
1552 of the events until the completion of each call of EditCommand::doApply.
1554 Test: fast/events/mutation/execCommands.html
1556 * Android.mk: Added ScopedEventQueue.cpp.
1557 * CMakeLists.txt: Ditto.
1558 * WebCore.pro: Ditto.
1559 * GNUmakefile.am: Added ScopedEventQueue.cpp and ScopedEventQueue.h.
1560 * WebCore.gypi: Ditto.
1561 * WebCore.vcproj/project.vcproj: Ditto.
1562 * WebCore.xcodeproj/project.pbxproj: Ditto.
1563 * dom/ContainerNode.cpp:
1564 (WebCore::dispatchChildInsertionEvents): Calls dispatchScopedEvent.
1565 (WebCore::dispatchChildRemovalEvents): Ditto.
1566 * dom/DOMAllInOne.cpp: Added ScopedEventQueue.cpp.
1568 (WebCore::Element::dispatchAttrRemovalEvent): Ditto.
1569 (WebCore::Element::dispatchAttrAdditionEvent): Ditto.
1571 (WebCore::Node::dispatchScopedEvent): Added.
1572 (WebCore::Node::dispatchSubtreeModifiedEvent): Calls dispatchScopedEvent.
1574 * dom/ScopedEventQueue.cpp: Added.
1575 (WebCore::ScopedEventQueue::initialize): Added.
1576 (WebCore::ScopedEventQueue::enqueueEvent): Added.
1577 (WebCore::ScopedEventQueue::dispatchAllEvents): Added.
1578 (WebCore::ScopedEventQueue::dispatchEvent): Added.
1579 (WebCore::ScopedEventQueue::instance): Added.
1580 (WebCore::ScopedEventQueue::incrementScopingLevel): Added.
1581 (WebCore::ScopedEventQueue::decrementScopingLevel): Added.
1582 * dom/ScopedEventQueue.h: Added.
1583 (WebCore::ScopedEventQueue::~ScopedEventQueue): Added.
1584 (WebCore::ScopedEventQueue::ScopedEventQueue): Added.
1585 (WebCore::EventQueueScope::EventQueueScope): Added.
1586 (WebCore::EventQueueScope::~EventQueueScope): Added.
1587 * editing/EditCommand.cpp:
1588 (WebCore::EditCommand::apply): Instantiates EventQueueScope.
1590 2010-12-09 Sam Weinig <sam@webkit.org>
1592 Reviewed by Gavin Barraclough.
1594 Fix scrolling with mouse wheel in WebKit2 views. Once
1595 we coalesce wheel events, we can re-enable this.
1597 * platform/mac/ScrollAnimatorMac.mm:
1598 (WebCore::ScrollAnimatorMac::scroll):
1600 2010-12-09 Abhishek Arya <inferno@chromium.org>
1602 Reviewed by James Robinson.
1604 For details element, ensure that if we ended up being inline that we set out replaced
1605 flag so that we are treated like an inline block.
1606 https://bugs.webkit.org/show_bug.cgi?id=50671
1608 Test: fast/html/details-element-render-inline-crash.html
1610 * rendering/RenderDetails.cpp:
1611 (WebCore::RenderDetails::styleDidChange): setReplaced to true if we are set as inline.
1612 * rendering/RenderDetails.h: function definition.
1614 2010-12-09 Jasmin Lapalme <jlapalme@druide.com>
1616 Reviewed by Alexey Proskuryakov.
1618 Fix a faulty conversion from UTF-8 to UTF-16 in WebCore during an XSLT transformation.
1619 https://bugs.webkit.org/show_bug.cgi?id=50708
1621 Test: fast/xsl/utf8-chunks.xml
1623 * xml/XSLTProcessorLibxslt.cpp:
1624 (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.
1626 2010-12-09 Vincent Scheib <scheib@chromium.org>
1628 Reviewed by James Robinson.
1630 Clip update rectangle for Texture::updateSubRect to texture size
1631 https://bugs.webkit.org/show_bug.cgi?id=49929
1633 Test: fast/canvas/canvas-largedraws.html
1635 * platform/graphics/gpu/Texture.cpp:
1636 (WebCore::Texture::updateSubRect):
1638 2010-12-09 Kenneth Russell <kbr@google.com>
1640 Unreviewed. Another speculative Gtk build fix after r73669. Add
1641 needed derived sources to GNUmakefile.am.
1645 2010-12-09 Kenneth Russell <kbr@google.com>
1647 Unreviewed. Speculative Gtk build fix after
1648 https://bugs.webkit.org/show_bug.cgi?id=36512 / r73669. Process
1649 all of the WebGL classes' IDL files.
1653 2010-12-09 Zhenyao Mo <zmo@google.com>
1655 Reviewed by Kenneth Russell.
1657 Expose constructor functions for instanceof checks of WebGL objects
1658 https://bugs.webkit.org/show_bug.cgi?id=36512
1660 Test: fast/canvas/webgl/instanceof-test.html
1662 * bindings/generic/RuntimeEnabledFeatures.h:
1663 (WebCore::RuntimeEnabledFeatures::webGLActiveInfoEnabled):
1664 (WebCore::RuntimeEnabledFeatures::webGLBufferEnabled):
1665 (WebCore::RuntimeEnabledFeatures::webGLFramebufferEnabled):
1666 (WebCore::RuntimeEnabledFeatures::webGLProgramEnabled):
1667 (WebCore::RuntimeEnabledFeatures::webGLRenderbufferEnabled):
1668 (WebCore::RuntimeEnabledFeatures::webGLShaderEnabled):
1669 (WebCore::RuntimeEnabledFeatures::webGLTextureEnabled):
1670 (WebCore::RuntimeEnabledFeatures::webGLUniformLocationEnabled):
1671 * html/canvas/WebGLActiveInfo.idl: Remove OmitConstructor.
1672 * html/canvas/WebGLBuffer.idl: Ditto.
1673 * html/canvas/WebGLFramebuffer.idl: Ditto.
1674 * html/canvas/WebGLProgram.idl: Ditto.
1675 * html/canvas/WebGLRenderbuffer.idl: Ditto.
1676 * html/canvas/WebGLShader.idl: Ditto.
1677 * html/canvas/WebGLTexture.idl: Ditto.
1678 * html/canvas/WebGLUniformLocation.idl: Ditto.
1679 * page/DOMWindow.idl: Expose constructors for WebGL objects in DOMWindow.
1681 2010-12-09 Timothy Hatcher <timothy@apple.com>
1683 Export Color::white and Color::transparent.
1685 Reviewed by Anders Carlsson.
1689 2010-12-09 Sam Weinig <sam@webkit.org>
1691 Fix failing Mac tests.
1693 * platform/mac/ScrollAnimatorMac.mm:
1694 (WebCore::ScrollAnimatorMac::scroll): Don't smooth scroll if the default
1695 AppleScrollAnimationEnabled is false.
1697 2010-12-09 James Robinson <jamesr@chromium.org>
1699 Reviewed by Kenneth Russell.
1701 [chromium] Compositor needs to manage its VRAM use
1702 https://bugs.webkit.org/show_bug.cgi?id=49629
1704 This adds a basic texture manager to the Chromium compositor to limit the amount of VRAM
1705 used by compositor textures and switches ContentLayerChromium, ImageLayerChromium, and
1706 RenderSurfaceChromium to use managed LayerTexture. The other *LayerChromium classes (Canvas,
1707 Video, and WebGL) and the root layer are still unmanaged.
1709 The TextureManager works by providing tokens to callers that want to use a managed texture.
1710 The token can be used to request a texture, see if the previously requested texture is still
1711 available, and to protect/unprotect textures when they cannot be collected. Whenever a
1712 texture is created the manager attempts to free up the least recently used textures until the
1713 total memory use is below the provided threshhold. If the manager cannot satisfy the memory
1714 limit it will not return any new textures until some old textures are released.
1716 A LayerTexture wraps a TextureManager token, size, and format. A LayerChromium can check if a
1717 previously requested texture is still available for use and reserve the LayerTexture's underlying
1718 storage between the updateContentsIfDirty() and the draw() call.
1720 Also changes LayerChromium from having separate contentsDirty()/updateContents() calls to a single
1721 updateContentsIfDirty().
1723 Tests: platform/chromium/compositing/lots-of-img-layers-with-opacity.html
1724 platform/chromium/compositing/lots-of-img-layers.html
1727 * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1728 (WebCore::Canvas2DLayerChromium::updateContentsIfDirty):
1729 * platform/graphics/chromium/Canvas2DLayerChromium.h:
1730 * platform/graphics/chromium/ContentLayerChromium.cpp:
1731 (WebCore::ContentLayerChromium::cleanupResources):
1732 (WebCore::ContentLayerChromium::updateContentsIfDirty):
1733 (WebCore::ContentLayerChromium::updateTextureRect):
1734 (WebCore::ContentLayerChromium::draw):
1735 * platform/graphics/chromium/ContentLayerChromium.h:
1736 * platform/graphics/chromium/ImageLayerChromium.cpp:
1737 (WebCore::ImageLayerChromium::updateContentsIfDirty):
1738 * platform/graphics/chromium/ImageLayerChromium.h:
1739 * platform/graphics/chromium/LayerChromium.h:
1740 (WebCore::LayerChromium::updateContentsIfDirty):
1741 (WebCore::LayerChromium::draw):
1742 * platform/graphics/chromium/LayerRendererChromium.cpp:
1743 (WebCore::LayerRendererChromium::LayerRendererChromium):
1744 (WebCore::LayerRendererChromium::useShader):
1745 (WebCore::LayerRendererChromium::prepareToDrawLayers):
1746 (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
1747 (WebCore::LayerRendererChromium::drawLayers):
1748 (WebCore::LayerRendererChromium::getFramebufferPixels):
1749 (WebCore::LayerRendererChromium::createLayerTexture):
1750 (WebCore::LayerRendererChromium::deleteLayerTexture):
1751 (WebCore::LayerRendererChromium::updateLayersRecursive):
1752 (WebCore::LayerRendererChromium::useRenderSurface):
1753 (WebCore::LayerRendererChromium::drawLayer):
1754 (WebCore::LayerRendererChromium::setScissorToRect):
1755 (WebCore::LayerRendererChromium::setDrawViewportRect):
1756 (WebCore::LayerRendererChromium::initializeSharedObjects):
1757 (WebCore::LayerRendererChromium::cleanupSharedObjects):
1758 * platform/graphics/chromium/LayerRendererChromium.h:
1759 (WebCore::LayerRendererChromium::renderSurfaceSharedValues):
1760 (WebCore::LayerRendererChromium::textureManager):
1761 * platform/graphics/chromium/LayerTexture.cpp: Added.
1762 (WebCore::LayerTexture::LayerTexture):
1763 (WebCore::LayerTexture::~LayerTexture):
1764 (WebCore::LayerTexture::isValid):
1765 (WebCore::LayerTexture::reserve):
1766 (WebCore::LayerTexture::unreserve):
1767 (WebCore::LayerTexture::bindTexture):
1768 (WebCore::LayerTexture::framebufferTexture2D):
1769 * platform/graphics/chromium/LayerTexture.h: Added.
1770 (WebCore::LayerTexture::create):
1771 * platform/graphics/chromium/PluginLayerChromium.cpp:
1772 (WebCore::PluginLayerChromium::updateContentsIfDirty):
1773 * platform/graphics/chromium/PluginLayerChromium.h:
1774 * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1775 (WebCore::RenderSurfaceChromium::SharedValues::SharedValues):
1776 (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues):
1777 (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
1778 (WebCore::RenderSurfaceChromium::cleanupResources):
1779 (WebCore::RenderSurfaceChromium::prepareContentsTexture):
1780 (WebCore::RenderSurfaceChromium::draw):
1781 * platform/graphics/chromium/RenderSurfaceChromium.h:
1782 (WebCore::RenderSurfaceChromium::SharedValues::shaderProgram):
1783 (WebCore::RenderSurfaceChromium::SharedValues::shaderSamplerLocation):
1784 (WebCore::RenderSurfaceChromium::SharedValues::shaderMatrixLocation):
1785 (WebCore::RenderSurfaceChromium::SharedValues::shaderAlphaLocation):
1786 (WebCore::RenderSurfaceChromium::SharedValues::initialized):
1787 * platform/graphics/chromium/TextureManager.cpp: Added.
1788 (WebCore::memoryUseBytes):
1789 (WebCore::TextureManager::TextureManager):
1790 (WebCore::TextureManager::getToken):
1791 (WebCore::TextureManager::releaseToken):
1792 (WebCore::TextureManager::hasTexture):
1793 (WebCore::TextureManager::protectTexture):
1794 (WebCore::TextureManager::unprotectTexture):
1795 (WebCore::TextureManager::reduceMemoryToLimit):
1796 (WebCore::TextureManager::addTexture):
1797 (WebCore::TextureManager::removeTexture):
1798 (WebCore::TextureManager::requestTexture):
1799 * platform/graphics/chromium/TextureManager.h: Added.
1800 (WebCore::TextureManager::create):
1801 * platform/graphics/chromium/VideoLayerChromium.cpp:
1802 (WebCore::VideoLayerChromium::updateContentsIfDirty):
1803 * platform/graphics/chromium/VideoLayerChromium.h:
1804 * platform/graphics/chromium/WebGLLayerChromium.cpp:
1805 (WebCore::WebGLLayerChromium::updateContentsIfDirty):
1806 * platform/graphics/chromium/WebGLLayerChromium.h:
1808 2010-12-09 Darin Adler <darin@apple.com>
1810 Reviewed by Sam Weinig.
1812 Rework my recent setLocation refactoring to use DOMWindow instead of Frame.
1813 It's difficult to make correct security decisions based on Frame since a
1814 Frame can navigate to a new document.
1816 Fixes some test failures that I somehow missed before the last check-in.
1818 * bindings/js/JSDOMWindowBase.cpp:
1819 (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Call to the
1820 shell DOMWindow; not sure this one matters, but it's closer to the old
1821 code before my last patch. Also pass the DOMWindow rather than the
1822 frame to crossDomainAccessErrorMessage.
1824 * bindings/js/JSDOMWindowCustom.cpp:
1825 (WebCore::JSDOMWindow::setLocation): Pass DOMWindow rather than Frame
1826 to the DOMWindow::setLocation function.
1828 * page/DOMWindow.cpp:
1829 (WebCore::DOMWindow::setLocation): Take DOMWindow rather than Frame.
1830 (WebCore::DOMWindow::crossDomainAccessErrorMessage): Ditto.
1832 * page/DOMWindow.h: Update new functions to take DOMWindow rather
1835 2010-12-09 Sam Weinig <sam@webkit.org>
1837 Try and fix the mac build.
1841 2010-12-09 Dan Bernstein <mitz@apple.com>
1843 Reviewed by Dave Hyatt.
1845 Removed an unused variable.
1847 * rendering/InlineFlowBox.cpp:
1848 (WebCore::InlineFlowBox::computeLogicalBoxHeights): Removed parentLineHeight.
1850 2010-12-09 Darin Adler <darin@apple.com>
1852 Reviewed by Geoffrey Garen.
1854 Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
1855 https://bugs.webkit.org/show_bug.cgi?id=50640
1857 * bindings/js/JSDOMBinding.cpp:
1858 (WebCore::printErrorMessageForFrame): Removed body; just call through to
1859 DOMWindow::printErrorMessage.
1861 * bindings/js/JSDOMWindowBase.cpp:
1862 (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
1863 just call through to DOMWindow::crossDomainAccessErrorMessage.
1865 * bindings/js/JSDOMWindowCustom.cpp:
1866 (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
1867 firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
1868 of the body and moved it into DOMWindow::setLocation.
1870 * page/DOMWindow.cpp:
1871 (WebCore::DOMWindow::setLocation): Added. Does all the same work that
1872 JSDOMWindow::setLocation used to do, but in a way that's not specific
1874 (WebCore::DOMWindow::printErrorMessage): Added.
1875 (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
1877 * page/DOMWindow.h: Added setLocation, printErrorMessage, and
1878 crossDomainAccessErrorMessage.
1880 2010-12-09 Sam Weinig <sam@webkit.org>
1882 Reviewed by Dan Bernstein.
1884 WebKit2 needs smooth scrolling support on the mac
1885 <rdar://problem/8219402>
1887 * WebCore.xcodeproj/project.pbxproj: Change ScrollAnimatorMac.cpp to ScrollAnimatorMac.mm.
1888 * platform/mac/ScrollAnimatorMac.cpp: Removed.
1889 * platform/mac/ScrollAnimatorMac.h:
1890 * platform/mac/ScrollAnimatorMac.mm: Copied from platform/mac/ScrollAnimatorMac.cpp.
1891 (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
1892 (-[ScrollAnimationHelperDelegate bounds]):
1893 (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
1894 (-[ScrollAnimationHelperDelegate convertSizeToBase:]):
1895 (-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
1896 (-[ScrollAnimationHelperDelegate superview]):
1897 (-[ScrollAnimationHelperDelegate documentView]):
1898 (-[ScrollAnimationHelperDelegate window]):
1899 (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
1900 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1901 (WebCore::ScrollAnimatorMac::scroll):
1902 (WebCore::ScrollAnimatorMac::setScrollPositionAndStopAnimation):
1903 (WebCore::ScrollAnimatorMac::currentPosition):
1904 (WebCore::ScrollAnimatorMac::immediateScrollToPoint):
1905 Add implementation of ScrollAnimator for the Mac.
1907 2010-12-09 Brady Eidson <beidson@apple.com>
1909 Reviewed by Anders Carlsson.
1911 <rdar://problem/8613779> and https://bugs.webkit.org/show_bug.cgi?id=50777
1912 WebKit2 ContextMenuClient support
1914 Export some symbols and headers needed by WebKit2 Mac:
1916 * WebCore.xcodeproj/project.pbxproj:
1918 2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com>
1920 Unreviewed, rolling out r73635.
1921 http://trac.webkit.org/changeset/73635
1922 https://bugs.webkit.org/show_bug.cgi?id=50778
1924 'Side-effects on 3 css tests needs closer review' (Requested
1925 by mwenge on #webkit).
1927 * platform/graphics/qt/ImageQt.cpp:
1928 (loadResourcePixmap):
1929 * platform/qt/RenderThemeQt.cpp:
1930 (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1931 (WebCore::RenderThemeQt::paintSearchField):
1932 (WebCore::RenderThemeQt::adjustSearchFieldStyle):
1933 (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
1934 (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1935 * platform/qt/RenderThemeQt.h:
1937 2010-12-09 Robert Hogan <robert@webkit.org>
1939 Reviewed by Andreas Kling.
1941 [Qt] Search input field doesn't have cancel button
1943 Add a cancel button to the search field and make it customizable
1944 by the client. For now, use the close dialog button associated
1945 with the application's style as the default.
1947 https://bugs.webkit.org/show_bug.cgi?id=42887
1949 * platform/graphics/qt/ImageQt.cpp:
1950 (loadResourcePixmap):
1951 * platform/qt/RenderThemeQt.cpp:
1952 (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
1953 (WebCore::RenderThemeQt::paintSearchField):
1954 (WebCore::RenderThemeQt::adjustSearchFieldStyle):
1955 (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
1956 (WebCore::RenderThemeQt::convertToPaintingRect):
1957 (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
1958 * platform/qt/RenderThemeQt.h:
1960 2010-12-09 Yael Aharon <yael.aharon@nokia.com>
1962 Reviewed by Antonio Gomes.
1964 Spatial Navigation: Crash when handling iframe of size 0.
1965 https://bugs.webkit.org/show_bug.cgi?id=50730
1967 if we have a frame of size 0, we would get into infinite loop and eventually crash. The reason is
1968 that when the algorithm sees a starting rect of size 0, it assumes that there is no focused node,
1969 thus restarts itself. The solution is to avoid considering iframes with size 0 for the spatial
1970 navigation algorithm.
1972 Test: fast/spatial-navigation/snav-hidden-iframe-zero-size.html
1974 * page/FocusController.cpp:
1975 (WebCore::updateFocusCandidateIfNeeded):
1977 2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com>
1979 Unreviewed, rolling out r73616.
1980 http://trac.webkit.org/changeset/73616
1981 https://bugs.webkit.org/show_bug.cgi?id=50772
1983 Breaks chromium win build (Requested by hwennborg on #webkit).
1985 * bindings/v8/IDBBindingUtilities.cpp:
1986 (WebCore::createIDBKeyFromValue):
1987 * bindings/v8/custom/V8IDBKeyCustom.cpp:
1989 * storage/IDBFactoryBackendImpl.cpp:
1990 (WebCore::createTables):
1991 (WebCore::IDBFactoryBackendImpl::open):
1992 * storage/IDBKey.cpp:
1993 (WebCore::IDBKey::IDBKey):
1994 (WebCore::IDBKey::fromQuery):
1995 (WebCore::IDBKey::bind):
1996 (WebCore::IDBKey::bindWithNulls):
1998 (WebCore::IDBKey::create):
1999 (WebCore::IDBKey::number):
2001 2010-12-09 Antonio Gomes <agomes@rim.com>
2003 Rubber stamped by by Gustavo Noronha Silva.
2005 Buildfix for GTK+ with building with -no-video.
2007 paintStockIcon static function was implemented under the ENABLE(VIDEO) guard
2008 but used from outside the guard. See RenderThemeGtk::paintSearchFieldResultsDecoration()
2009 and RenderThemeGtk::paintSearchFieldCancelButton() methods.
2011 * platform/gtk/RenderThemeGtk.cpp:
2012 (WebCore::getMediaElementFromRenderObject):
2014 2010-12-07 Antonio Gomes <agomes@rim.com>
2016 Reviewed by Daniel Bates.
2018 Spatial Navigation: code clean up
2019 https://bugs.webkit.org/show_bug.cgi?id=50666
2021 Patch unifies two FocusCandidate constructors, making caller sites
2022 simpler. Now the special handling HTMLAreaElement gets is done within
2023 the non default constructor (i.e. FocusCanditate(Node*, FocusDirection)).
2025 No new tests needed.
2027 * page/FocusController.cpp:
2028 (WebCore::FocusController::findFocusCandidateInContainer):
2029 * page/SpatialNavigation.cpp:
2030 (WebCore::FocusCandidate::FocusCandidate):
2032 2010-12-09 Philippe Normand <pnormand@igalia.com>
2034 Reviewed by Eric Carlson.
2036 [GStreamer] disable fullscreen on MacOS Tiger and Leopard
2037 https://bugs.webkit.org/show_bug.cgi?id=50748
2039 Don't support fullscreen video on Tiger and Leopard, just like the
2042 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2043 (WebCore::MediaPlayerPrivateGStreamer::supportsFullscreen):
2045 2010-12-06 Philippe Normand <pnormand@igalia.com>
2047 Reviewed by Martin Robinson.
2049 [GTK] Support the Mozilla-style Fullscreen Javascript API
2050 https://bugs.webkit.org/show_bug.cgi?id=50572
2052 * GNUmakefile.am: enable the Javascript Fullscreen API feature if
2053 it's been requested at configure time.
2055 2010-12-09 Yong Li <yoli@rim.com>
2057 Reviewed by Darin Adler.
2059 Check the return value of ImageBuffer::create()
2060 to avoid crash when ImageBuffer::create() fails.
2061 https://bugs.webkit.org/show_bug.cgi?id=50631
2063 No new test because it relies on the platform implementation
2064 of ImageBuffer. It is hard to make ImageBuffer::create() fail
2067 * platform/graphics/GeneratedImage.cpp:
2068 (WebCore::GeneratedImage::drawPattern):
2070 2010-12-09 Maciej Stachowiak <mjs@apple.com>
2072 Reviewed by Dan Bernstein.
2074 Implement "Use Selection for Find" in WebKit2
2075 https://bugs.webkit.org/show_bug.cgi?id=50737
2076 <rdar://problem/8564881>
2078 Implement a TakeFindStringFromSelection editor command. This is
2079 used solely to implement the "Use Selection for Find" menu command
2080 on Mac, and is not made available to script. On WebKit2, it is
2081 very convenient to reuse the editing machinery since this command
2082 is very similar to Copy.
2085 * editing/EditorCommand.cpp:
2086 (WebCore::executeTakeFindStringFromSelection): Call to a mac-only Editor function.
2087 (WebCore::enabledTakeFindStringFromSelection): Check using Editor::canCopyExcludingStandaloneImage
2088 (WebCore::createCommandMap): Add "TakeFindStringFromSelection" command.
2089 * editing/mac/EditorMac.mm:
2090 (WebCore::Editor::canCopyExcludingStandaloneImages): Helper function; we can't use Editor::canCopy
2091 since it would make no sense to enable "Use Selection for Find" when viewing a standalone image
2093 (WebCore::Editor::takeFindStringFromSelection): Implement by copying the selected text
2094 to the special Find pasteboard.
2096 2010-12-09 Abhishek Arya <inferno@chromium.org>
2098 Reviewed by Dimitri Glazkov.
2100 As part of r73559, I added the referenceNode check to validate whether the root
2101 node of the iterator matches the node which is getting moved to other document.
2102 referenceNode is initialized to root, however can get moved using previousNode
2103 and nextNode methods, so it is required to use root directly.
2104 https://bugs.webkit.org/show_bug.cgi?id=50764
2106 Test: fast/dom/node-iterator-reference-node-moved-crash.html
2109 (WebCore::Document::moveNodeIteratorsToNewDocument): change referenceNode to root.
2111 2010-12-08 Dimitri Glazkov <dglazkov@chromium.org>
2113 Reviewed by Darin Adler.
2115 Provide a generic way to store shadowParent on a Node.
2116 https://bugs.webkit.org/show_bug.cgi?id=50184
2118 This patch makes TreeShared::m_parent act as either parentNode() or
2119 shadowHost() for Node. The distinction is controlled by IsShadowRootFlag.
2121 Refactoring, so no new tests. See performance result testing in bug.
2124 (WebCore::Element::recalcStyle): Changed to use parentOrHostNode().
2126 (WebCore::Node::shadowHost): Added.
2127 (WebCore::Node::setShadowHost): Added.
2128 (WebCore::Node::isContentEditable): Changed to use parentOrHostNode().
2129 (WebCore::Node::isContentRichlyEditable): Ditto.
2130 (WebCore::Node::nextRenderer): Ditto.
2131 (WebCore::Node::virtualComputedStyle): Ditto.
2132 (WebCore::Node::canStartSelection): Ditto.
2133 (WebCore::Node::shadowTreeRootNode): Changed to use parentNodeGuaranteedHostFree().
2134 (WebCore::Node::getEventAncestors): Ditto.
2135 (WebCore::Node::defaultEventHandler): Changed to use parentOrHostNode().
2136 * dom/Node.h: Added an extra flag and adjusted bit counts.
2137 (WebCore::Node::isShadowNode): Made non-virtual, switched to use flag.
2138 (WebCore::Node::parentNode): Made to recognize flag.
2139 (WebCore::Node::parentOrHostNode): Changed to use straight parent() and made const.
2140 (WebCore::Node::parentNodeGuaranteedHostFree): Added.
2141 (WebCore::Node::shadowParentNode): Made non-virtual and const.
2142 * editing/TextIterator.cpp:
2143 (WebCore::depthCrossingShadowBoundaries): Changed to use parentOrHostNode();
2144 (WebCore::nextInPreOrderCrossingShadowBoundaries): Ditto.
2145 (WebCore::previousInPostOrderCrossingShadowBoundaries): Ditto.
2146 (WebCore::setUpFullyClippedStack): Ditto.
2147 (WebCore::TextIterator::advance): Ditto.
2148 (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto.
2149 * page/DOMSelection.cpp:
2150 (WebCore::DOMSelection::anchorNode): Changed to use parentNodeGuaranteedHostFree().
2151 (WebCore::DOMSelection::focusNode): Ditto.
2152 (WebCore::DOMSelection::baseNode): Ditto.
2153 (WebCore::DOMSelection::extentNode): Ditto.
2154 (WebCore::DOMSelection::getRangeAt): Ditto.
2155 * rendering/MediaControlElements.cpp:
2156 (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
2157 Changed to setShadowHost().
2158 (WebCore::MediaControlShadowRootElement::updateStyle): Changed to use shadowHost().
2159 (WebCore::MediaControlShadowRootElement::detach): Added an override to
2160 explicitly set shadowHost to 0. Otherwise, the element will leak.
2161 * rendering/MediaControlElements.h: Added detach def, removed members that are
2163 * rendering/RenderSVGShadowTreeRootContainer.cpp:
2164 (WebCore::RenderSVGShadowTreeRootContainer::~RenderSVGShadowTreeRootContainer):
2165 Added explicit clearing of shadowHost to avoid leaking and crashes,
2166 because SVG shadow DOM can be dynamically attached/detached, producing
2167 stale nodes in over/out event handling.
2168 * rendering/RenderSlider.cpp:
2169 (WebCore::SliderThumbElement::defaultEventHandler): Changed to use shadowHost().
2170 * rendering/RenderTextControlSingleLine.cpp:
2171 (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
2172 Added explicit clearing of shadowHost and explicit destruction to
2173 avoid out-of-order removal of children.
2174 * rendering/RenderTreeAsText.cpp:
2175 (WebCore::nodePosition): Simplified code.
2176 * rendering/SVGShadowTreeElements.cpp:
2177 (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): Added
2178 setting of shadowHost.
2179 (WebCore::SVGShadowTreeRootElement::attachElement): Changed to use shadowHost().
2180 (WebCore::SVGShadowTreeRootElement::clearShadowHost): Added.
2181 * rendering/SVGShadowTreeElements.h: Added def, removed members that are
2183 * rendering/ShadowElement.cpp:
2184 (WebCore::ShadowBlockElement::initAsPart): Changed to use shadowHost().
2185 * rendering/ShadowElement.h: Removed members that are no longer needed.
2186 (WebCore::ShadowElement::ShadowElement): Added setting of shadowHost.
2187 (WebCore::ShadowElement::detach): Added.
2188 * rendering/TextControlInnerElements.cpp:
2189 (WebCore::TextControlInnerElement::TextControlInnerElement): Added setting
2191 (WebCore::TextControlInnerElement::attachInnerElement): Changed to use
2193 (WebCore::TextControlInnerElement::detach): Added.
2194 * rendering/TextControlInnerElements.h: Removed members that are no
2196 * svg/SVGElement.cpp:
2197 (WebCore::SVGElement::ownerSVGElement): Simplified code.
2198 (WebCore::SVGElement::viewportElement): Ditto.
2199 * svg/SVGLocatable.cpp:
2200 (WebCore::SVGLocatable::computeCTM): Ditto.
2201 * svg/SVGStyledElement.cpp:
2202 (WebCore::SVGStyledElement::title): Ditto.
2203 * svg/SVGUseElement.cpp:
2204 (WebCore::ShadowTreeUpdateBlocker::while): Ditto.
2206 2010-12-09 Brady Eidson <beidson@apple.com>
2208 Reviewed by Maciej Stachowiak.
2210 <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
2211 WebKit2 Authentication Support
2215 2010-12-09 Peter Beverloo <peter@lvp-media.com>
2217 Reviewed by Maciej Stachowiak.
2219 Default CSS definitions for the figure and figcaption elements.
2221 Tests: fast/html/figcaption-element.html
2222 fast/html/figure-element.html
2225 (figure): The default figure-style equals a blockquote
2226 (figcaption): A non-sectioning block-level element
2228 2010-12-09 Yury Semikhatsky <yurys@chromium.org>
2230 Reviewed by Pavel Feldman.
2232 Web Inspector: Console records for failed XHRs should contain call stack and request method
2233 https://bugs.webkit.org/show_bug.cgi?id=50390
2235 When inspector front-end is open we capture call stack at the place where request is sent and
2236 pass the stack along with other request data. There is a new type of console messages which
2237 is NetworkErrorMessageType, all messages of that type will have requestId field initialized
2238 with the corresponding network request identifier so that later on when we need to display
2239 that message in the front-end we could pull request data from the Network panel using
2240 this identifier. If there are no data for given requestId message formatting falls back to
2241 the old implementation which lacks such things as call stack, request method and exact
2244 * inspector/ConsoleMessage.cpp:
2245 (WebCore::ConsoleMessage::ConsoleMessage):
2246 (WebCore::ConsoleMessage::addToFrontend):
2247 (WebCore::ConsoleMessage::isEqual):
2248 * inspector/ConsoleMessage.h:
2249 * inspector/Inspector.idl:
2250 * inspector/InspectorController.cpp:
2251 (WebCore::InspectorController::didReceiveResponse):
2252 (WebCore::InspectorController::didFailLoading):
2253 * inspector/InspectorResourceAgent.cpp:
2254 (WebCore::InspectorResourceAgent::identifierForInitialRequest):
2255 * inspector/front-end/ConsoleView.js:
2256 (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
2257 (WebInspector.ConsoleMessage):
2258 (WebInspector.ConsoleMessage.prototype._formatMessage):
2259 (WebInspector.ConsoleMessage.prototype.toMessageElement):
2260 (WebInspector.ConsoleMessage.prototype.toString):
2261 (WebInspector.ConsoleMessage.prototype.isEqual):
2262 * inspector/front-end/ResourceManager.js:
2263 (WebInspector.ResourceManager.prototype.identifierForInitialRequest):
2264 * inspector/front-end/inspector.js:
2265 (WebInspector.addConsoleMessage):
2268 2010-12-09 Dai Mikurube <dmikurube@google.com>
2270 Reviewed by Kent Tamura.
2272 Implement "required" attribute for select tags
2273 https://bugs.webkit.org/show_bug.cgi?id=50380
2275 Test: fast/forms/select-live-pseudo-selectors.html
2276 platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
2278 * dom/SelectElement.cpp:
2279 (WebCore::SelectElement::updateValidity): Added. It's a pure virtual function which is prepared so that HTMLSelectElement::updateValidity() calls HTMLSelectElement::setNeedsValidityCheck().
2280 (WebCore::SelectElement::parseMultipleAttribute): Added calling updateValidity().
2281 * html/HTMLSelectElement.cpp:
2282 (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.
2283 (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
2284 (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
2285 (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
2286 (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.
2287 (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
2288 (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
2289 (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
2290 (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
2291 (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
2292 (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
2293 (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
2294 (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
2295 (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
2296 (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
2297 (WebCore::HTMLSelectElement::updateValidity): Added. It calls setNeedsValidityCheck().
2298 * html/HTMLSelectElement.h:
2299 (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
2300 * html/HTMLSelectElement.idl: Added a required attribute to select elements..
2301 * html/ValidityState.cpp:
2302 (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
2303 * wml/WMLSelectElement.h:
2304 (WebCore::WMLSelectElement::updateValidity): Added. It does nothing.
2306 2010-12-07 Jeremy Orlow <jorlow@chromium.org>
2308 Reviewed by Steve Block.
2310 IndexedDB returns the wrong exceptions
2311 https://bugs.webkit.org/show_bug.cgi?id=50632
2313 IndexedDB exceptions need to have an offset so they can
2314 be distinguished from DOM exceptions. We also need to
2315 add strings for the various exceptions. Lastly, make
2316 IDBDatabaseException use the common exception base class.
2318 * bindings/js/JSDOMBinding.cpp:
2319 (WebCore::setDOMException):
2320 * bindings/v8/V8Proxy.cpp:
2321 (WebCore::V8Proxy::setDOMException):
2322 * dom/ExceptionCode.cpp:
2323 (WebCore::getExceptionCodeDescription):
2324 * dom/ExceptionCode.h:
2325 * storage/IDBDatabaseError.h:
2326 (WebCore::IDBDatabaseError::code):
2327 * storage/IDBDatabaseException.h:
2328 (WebCore::IDBDatabaseException::create):
2329 (WebCore::IDBDatabaseException::ErrorCodeToExceptionCode):
2330 (WebCore::IDBDatabaseException::IDBDatabaseException):
2331 * storage/IDBDatabaseException.idl:
2333 2010-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2335 Build fix for GTK+3. Use functions added for GTK+ 2.24 to get the
2338 * plugins/gtk/gtk2xtbin.c:
2339 (gtk_xtbin_realize):
2341 2010-12-09 Siddharth Mathur <siddharth.mathur@nokia.com>
2343 Reviewed by Laszlo Gombos.
2345 Use BUILDING_WEBKIT like other ports
2346 https://bugs.webkit.org/show_bug.cgi?id=50713
2348 * WebCore.pro: Change BUILD_WEBKIT to BUILDING_WEBKIT
2350 2010-12-08 Erik Arvidsson <arv@chromium.org>
2352 Reviewed by Darin Adler.
2354 Replace getAttribute().isNull() with fastHasAttribute()
2355 https://bugs.webkit.org/show_bug.cgi?id=50719
2357 Covered by existing tests.
2359 * dom/SelectElement.cpp:
2360 (WebCore::SelectElement::reset):
2361 * html/HTMLAppletElement.cpp:
2362 (WebCore::HTMLAppletElement::rendererIsNeeded):
2363 * html/HTMLCollection.cpp:
2364 (WebCore::HTMLCollection::itemAfter):
2365 * html/HTMLFormControlElement.cpp:
2366 (WebCore::HTMLFormControlElement::formNoValidate):
2367 * html/HTMLFormElement.cpp:
2368 (WebCore::HTMLFormElement::noValidate):
2369 * html/HTMLInputElement.cpp:
2370 (WebCore::HTMLInputElement::defaultChecked):
2371 (WebCore::HTMLInputElement::multiple):
2372 (WebCore::HTMLInputElement::webkitdirectory):
2373 * html/HTMLOptionElement.cpp:
2374 (WebCore::HTMLOptionElement::defaultSelected):
2375 * html/HTMLScriptElement.cpp:
2376 (WebCore::HTMLScriptElement::asyncAttributeValue):
2377 (WebCore::HTMLScriptElement::deferAttributeValue):
2378 * rendering/RenderFileUploadControl.cpp:
2379 (WebCore::RenderFileUploadControl::allowsMultipleFiles):
2380 (WebCore::RenderFileUploadControl::allowsDirectoryUpload):
2382 2010-12-08 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk>
2384 Reviewed by Martin Robinson.
2386 Full page size flash plugins do not show in all situations
2387 https://bugs.webkit.org/show_bug.cgi?id=47742
2389 This patch moves the plugin widget size allocation after the
2390 NPP_SetWindow is called with the effect that the resize of Flash
2391 content no longer result in grey flash. This seems logical since the
2392 widget tree cannot be fully constructed before the plugin receives
2393 the new container window.
2395 Test: manual-tests/plugins/gtk-windowed-grey-glitch.html
2397 * plugins/gtk/PluginViewGtk.cpp:
2398 (WebCore::PluginView::setNPWindowIfNeeded):
2400 2010-12-08 David Hyatt <hyatt@apple.com>
2402 Reviewed by Simon Fraser.
2404 Fix regression from xji's wheel scroll patch. The vertical case is looking at the horizontal
2405 maximum position and not the vertical position.
2407 * platform/ScrollView.cpp:
2408 (WebCore::ScrollView::wheelEvent):
2410 2010-12-08 Sam Weinig <sam@webkit.org>
2412 Reviewed by Darin Adler.
2414 Need a way to get a WKBundleFrameRef from JS HTMLIFrameElement
2415 https://bugs.webkit.org/show_bug.cgi?id=50726
2417 * WebCore.xcodeproj/project.pbxproj: Expose HTMLIFrameElement.h.
2419 2010-12-08 Matthew Delaney <mdelaney@apple.com>
2421 Reviewed by Simon Fraser.
2423 Add getter and setters for acceleratesRendering flag on layers
2424 https://bugs.webkit.org/show_bug.cgi?id=50717
2426 * platform/graphics/GraphicsLayer.cpp:
2427 * platform/graphics/ca/GraphicsLayerCA.cpp:
2428 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2429 Plumbed through acceleratedRendering flag.
2431 2010-12-07 Zhenyao Mo <zmo@google.com>
2433 Reviewed by Kenneth Russell.
2435 WebGLUniformLocation objects must be invalidated during linkProgram
2436 https://bugs.webkit.org/show_bug.cgi?id=37118
2438 * html/canvas/WebGLProgram.cpp:
2439 (WebCore::WebGLProgram::WebGLProgram): Initialize link count to 0.
2440 (WebCore::WebGLProgram::cacheActiveAttribLocations): Don't check link status through gl call; use the cached status instead.
2441 * html/canvas/WebGLProgram.h:
2442 (WebCore::WebGLProgram::getLinkCount): Get link count.
2443 (WebCore::WebGLProgram::increaseLinkCount): Increase link count by 1.
2444 * html/canvas/WebGLRenderingContext.cpp:
2445 (WebCore::WebGLRenderingContext::getUniform): Fix a bug where wrong error is generated.
2446 (WebCore::WebGLRenderingContext::linkProgram): call increaseLinkCount after linkProgram.
2447 * html/canvas/WebGLUniformLocation.cpp:
2448 (WebCore::WebGLUniformLocation::WebGLUniformLocation): Set program's link count upon creation.
2449 (WebCore::WebGLUniformLocation::program): Return null if count doesn't match the program's.
2450 (WebCore::WebGLUniformLocation::location): Return -1 if count doesn't match the program's.
2451 * html/canvas/WebGLUniformLocation.h:
2453 2010-12-08 Adele Peterson <adele@apple.com>
2455 Reviewed by Darin Adler.
2457 Fix for https://bugs.webkit.org/show_bug.cgi?id=50725
2458 <rdar://problem/8694972> REGRESSION (r72052): "Search" placeholder in MobileMe mail is positioned too high
2460 Test: fast/forms/placeholder-position.html
2462 Since we center the inner text element for single line text controls,
2463 we should ask the subclass to give us the y offset instead of trying to calculate it in the RenderTextControl class.
2465 * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder):
2466 * rendering/RenderTextControl.h:
2467 * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::textBlockInsetTop):
2468 * rendering/RenderTextControlMultiLine.h:
2469 * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
2470 * rendering/RenderTextControlSingleLine.h:
2472 2010-12-08 Chris Rogers <crogers@google.com>
2474 Reviewed by Kenneth Russell.
2476 Add web audio files to mac port Xcode projects
2477 https://bugs.webkit.org/show_bug.cgi?id=50721
2479 No new tests since audio API is not yet implemented.
2481 * WebCore.xcodeproj/project.pbxproj:
2482 * bindings/js/JSDOMWindowCustom.cpp:
2483 (WebCore::JSDOMWindow::webkitAudioContext):
2485 2010-12-08 Kent Tamura <tkent@chromium.org>
2487 Reviewed by Alexey Proskuryakov.
2489 Yensign hack should work with Shift_JIS and ISO-2022-JP encodings.
2490 https://bugs.webkit.org/show_bug.cgi?id=49714
2492 IE chooses a font which shows a yensign for 0x5c code point for a page
2493 encoded in x-mac-japanese, ISO-2022-JP, EUC-JP, Shift_JIS, Shift_JIS_X0213-2000,
2494 x-sjis, and Windows-31J.
2495 We have emulated this behavior by replacing 0x5c with 0xa5 for EUC-JP and
2496 Shift_JIS_X0213-2000. This change adds other encodings above.
2498 Also, we move the HashSet initialization for isJapanese() and
2499 backslashAsCurrencySymbol() to TextEncodingRegistry.cpp because of
2500 ease of making them multi-thread safe.
2502 * platform/text/TextEncoding.cpp:
2503 (WebCore::TextEncoding::isJapanese): Just calls isJapaneseEncoding().
2504 (WebCore::TextEncoding::backslashAsCurrencySymbol): Uses shouldShowBackslashAsCurrencySymbolIn().
2505 * platform/text/TextEncodingRegistry.cpp:
2506 (WebCore::addEncodingName): Moved from TextEncoding.cpp, and stop using atomicCanonicalTextEncodingName().
2507 (WebCore::buildQuirksSets): Added. Initializes HashSets for isJapaneseEncoding() and shouldShowBackslashAsCurrencySymbolIn().
2508 (WebCore::isJapaneseEncoding):
2509 (WebCore::shouldShowBackslashAsCurrencySymbolIn):
2510 (WebCore::extendTextCodecMaps): Add a call to buildQuirksSets().
2511 * platform/text/TextEncodingRegistry.h:
2513 2010-12-08 Andy Estes <aestes@apple.com>
2515 Reviewed by Darin Adler.
2517 Reflected unsigned attributes should be in the range [0, 2^31).
2518 https://bugs.webkit.org/show_bug.cgi?id=50472
2520 HTML5 says that unsigned reflected attributes should be in the range
2521 [0, 2^31). When a value isn't in this range, a default value (or 0)
2522 should be returned instead. Update the JS bindings code generator to
2523 ensure 0 is returned when a content attribute value falls outside of
2526 Tests: bindings/scripts/test/TestObj.idl
2527 fast/html/marquee-element.html
2529 * bindings/scripts/CodeGeneratorJS.pm: Return the maximum of 0 and the
2530 content attribute as a 32-bit signed int when converting a native value
2531 to an unsigned JS value.
2532 * bindings/scripts/test/TestObj.idl: Add a reflected unsigned attribute
2533 to test code generation.
2534 * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Update test results.
2535 * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
2536 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
2537 * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
2538 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
2539 * bindings/scripts/test/JS/JSTestObj.h: Ditto.
2540 * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2541 * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2542 * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2544 2010-12-08 Carlos Garcia Campos <cgarcia@igalia.com>
2546 Reviewed by Martin Robinson.
2548 [GTK] Use gtk_icon_set_render_icon() to render icons in RenderThemeGtk
2549 https://bugs.webkit.org/show_bug.cgi?id=50623
2551 We don't need to cache the icons since the will be cached by GTK+,
2552 and they will be rendered using the state and text direction.
2554 * platform/gtk/RenderThemeGtk.cpp:
2555 (WebCore::paintStockIcon):
2556 (WebCore::getMediaButtonIconSize):
2557 (WebCore::RenderThemeGtk::initMediaColors):
2558 (WebCore::RenderThemeGtk::initMediaButtons):
2559 (WebCore::RenderThemeGtk::RenderThemeGtk):
2560 (WebCore::RenderThemeGtk::~RenderThemeGtk):
2561 (WebCore::RenderThemeGtk::gtkIconState):
2562 (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
2563 (WebCore::centerRectVerticallyInParentInputElement):
2564 (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
2565 (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
2566 (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2567 (WebCore::RenderThemeGtk::platformColorsDidChange):
2568 (WebCore::RenderThemeGtk::paintMediaButton):
2569 (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
2570 (WebCore::RenderThemeGtk::paintMediaMuteButton):
2571 (WebCore::RenderThemeGtk::paintMediaPlayButton):
2572 (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
2573 (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
2574 * platform/gtk/RenderThemeGtk.h:
2576 2010-12-08 Abhishek Arya <inferno@chromium.org>
2578 Reviewed by Dimitri Glazkov.
2580 Detach node iterator and move to new document when node gets moved.
2581 https://bugs.webkit.org/show_bug.cgi?id=50697
2583 Test: fast/dom/node-iterator-document-moved-crash.html
2585 * dom/Document.cpp: Method that takes a node and new document as argument.
2586 It detaches the node iterators belonging to the current document and attaches
2587 them to the new document.
2588 (WebCore::Document::moveNodeIteratorsToNewDocument):
2589 * dom/Document.h: Function definition.
2590 * dom/Node.cpp: When node is moved to another document, call the function to move
2591 the iterators appropriately.
2592 (WebCore::Node::setDocument):
2594 2010-12-08 James Robinson <jamesr@chromium.org>
2596 Reviewed by Kenneth Russell.
2598 [chromium] Text is blurry on a large composited layer with an odd center x/y coordinate
2599 https://bugs.webkit.org/show_bug.cgi?id=50702
2601 Compute the center of a large layer using floats instead of ints to avoid roundoff errors.
2603 Test: compositing/text-on-large-layer.html
2605 * platform/graphics/chromium/ContentLayerChromium.cpp:
2606 (WebCore::ContentLayerChromium::draw):
2608 2010-12-08 Ryosuke Niwa <rniwa@webkit.org>
2610 Reviewed by Dan Bernstein.
2612 REGRESSION: LayoutTests/editing/selection/caret-rtl-2.html fails
2613 https://bugs.webkit.org/show_bug.cgi?id=33503
2615 The bug was caused by Font::offsetForPosition's not taking into account the containing block's text direction.
2616 When RTL text appears in a LTR block, the offset at the beginning of RTL text is on the left of RTL text,
2617 and the offset at the end of RTL text is on the right of RTL text. For example, if we had RTL text CBA,
2618 then the correspondance between letters and offsets in logical order are: A -> 0, B -> 1, and C -> 2.
2620 Case 1. CBA appears in a RTL block:
2621 In this case, clicking on the visual left of CBA puts the caret naturally at Position("CBA", 2).
2622 Clicking on the visual right of CBA puts the caret at Position("CBA", 0) as expected.
2623 Case 2. CBA appears in a LTR block:
2624 Because the containing block flows from left to right, by convention, Position("CBA", 2") corresponds
2625 to the visual right of CBA, and Position("CBA", 0) corresponds to the visual left of CBA.
2626 Therefore, clicking on the visual left of CBA should put the caret at Position("CBA", 0),
2627 and clicking on the visual right should put it at Position("CBA", 2).
2629 The bug was caused by WebKit's not considering case 2. The same bug also exist for LTR text in a RTL block.
2630 Fixed the bug by taking care of the case 2 in InlineTextBox::offsetForPosition.
2632 Tests: editing/selection/caret-ltr-2-left.html
2633 editing/selection/caret-ltr-2.html
2634 editing/selection/caret-ltr-right.html
2635 editing/selection/caret-ltr.html
2636 editing/selection/caret-rtl-2-left.html
2637 editing/selection/caret-rtl-right.html
2639 * rendering/InlineTextBox.cpp:
2640 (WebCore::InlineTextBox::offsetForPosition):
2642 2010-12-08 Anders Carlsson <andersca@apple.com>
2644 Reviewed by Darin Adler.
2646 Fix some clang++ warnings (one of which was an actual bug)
2647 https://bugs.webkit.org/show_bug.cgi?id=50700
2649 * page/mac/DragControllerMac.mm:
2650 (WebCore::DragController::dragOperation):
2651 Add parentheses to silent a clang warning.
2653 * page/mac/EventHandlerMac.mm:
2654 (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
2655 Fix || vs && precedence bug uncovered by clang.
2657 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2658 (WebCore::GraphicsContext3D::reshape):
2659 Use an early return to avoid a warning.
2661 2010-12-08 Chris Marrin <cmarrin@apple.com>
2663 Reviewed by Simon Fraser.
2665 Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
2666 https://bugs.webkit.org/show_bug.cgi?id=49388
2668 Added copy constructors and casting operators to go between
2669 TransformationMatrix and CATransform3D. Also added a copy
2670 constructor to go from CGAffineTransform to TransformationMatrix.
2671 Used these new methods to clean up platform CA code. This will
2672 make it easier to port to Windows.
2674 I also fixed a couple of build issues found when trying out a
2677 This is a resubmission of changesets r73477 and r73483 with a
2678 fix for the SL build. The failure was because TransformationMatrix
2679 included QuartzCore/CATransform3D.h which brought in some system
2680 libraries, including Quickdraw, which has a definition for
2681 'Cursor' which clashed with WebCore's 'Cursor' class. So I had
2682 to qualify its use in WebChromeClient.cpp in WebKit2.
2684 * WebCore.xcodeproj/project.pbxproj:
2685 * platform/graphics/ca/GraphicsLayerCA.cpp:
2686 (WebCore::GraphicsLayerCA::updateContentsTransform):
2687 (WebCore::GraphicsLayerCA::ensureCloneLayers):
2688 (WebCore::GraphicsLayerCA::fetchCloneLayers):
2689 * platform/graphics/ca/TransformationMatrixCA.cpp: Copied from WebCore/platform/graphics/ca/TransformationMatrixCA.cpp.
2690 * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2691 (PlatformCAAnimation::setFromValue):
2692 (PlatformCAAnimation::setToValue):
2693 (PlatformCAAnimation::setValues):
2694 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2695 (PlatformCALayer::transform):
2696 (PlatformCALayer::setTransform):
2697 (PlatformCALayer::sublayerTransform):
2698 (PlatformCALayer::setSublayerTransform):
2699 (PlatformCALayer::contentsTransform):
2700 (PlatformCALayer::setContentsTransform):
2701 * platform/graphics/cg/TransformationMatrixCG.cpp:
2702 (WebCore::TransformationMatrix::TransformationMatrix):
2703 * platform/graphics/transforms/TransformationMatrix.h:
2705 2010-12-07 Brian Weinstein <bweinstein@apple.com>
2707 Reviewed by John Sullivan.
2709 Layering Violation in ContextMenu - member variable of type HitTestResult
2710 https://bugs.webkit.org/show_bug.cgi?id=50586
2712 ContextMenu had a layering violation by having a member variable of type HitTestResult, because
2713 classes in WebCore/platform can't know about classes in WebCore.
2715 This patch moves the HitTestResult and all functions that use it out of ContextMenu into ContextMenuController.
2716 All of the functions that dealt with populating the ContextMenu are now in ContextMenuController, and this
2717 allowed us to delete the ContextMenu file, putting all of the cross-platform code that used to be it
2718 in ContextMenuController, and the rest of the code is in the platform-specific files.
2720 No change in behavior, no new tests.
2722 * Android.mk: Removed ContextMenu.cpp.
2723 * CMakeLists.txt: Ditto.
2724 * GNUmakefile.am: Ditto.
2725 * WebCore.gypi: Ditto.
2726 * WebCore.pro: Ditto.
2727 * WebCore.vcproj/WebCore.vcproj: Ditto.
2728 * WebCore.xcodeproj/project.pbxproj: Ditto.
2730 * page/ContextMenuController.cpp:
2731 (WebCore::ContextMenuController::ContextMenuController): Initialized m_hitTestResult to an empty HitTestResult.
2732 (WebCore::ContextMenuController::handleContextMenuEvent): Call populate on the ContextMenuController instead
2734 (WebCore::ContextMenuController::createContextMenu): Fix some indination, and store the HitTestResult in a member
2736 (WebCore::ContextMenuController::showContextMenu): Call addInspectElementItem on the ContextMenuController.
2737 (WebCore::ContextMenuController::contextMenuItemSelected): Use m_hitTestResult whenever we need a HitTestResult.
2738 (WebCore::ContextMenuController::appendItem): Validates the item for its state, and then appends it to the parent menu.
2739 This allowed us to move checkOrEnableIfNeeded from ContextMenu.
2741 These functions were all moved from ContextMenu, and changed slightly to fit in ContextMenuController.
2742 All calls to ContextMenu::appendItem were changed to ContextMenuController::appendItem, which takes care
2743 of validating the menu.
2744 (WebCore::separatorItem): Moved from ContextMenu.
2745 (WebCore::ContextMenuController::createAndAppendFontSubMenu): Ditto.
2746 (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): Ditto.
2747 (WebCore::ContextMenuController::createAndAppendSpeechSubMenu): Ditto.
2748 (WebCore::ContextMenuController::createAndAppendWritingDirectionSubMenu): Ditto.
2749 (WebCore::ContextMenuController::createAndAppendTextDirectionSubMenu): Ditto.
2750 (WebCore::ContextMenuController::createAndAppendSubstitutionsSubMenu): Ditto.
2751 (WebCore::ContextMenuController::createAndAppendTransformationsSubMenu): Ditto.
2752 (WebCore::selectionContainsPossibleWord): Ditto.
2753 (WebCore::ContextMenuController::populate): Ditto.
2754 (WebCore::ContextMenuController::addInspectElementItem): Ditto.
2755 (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto.
2757 * page/ContextMenuController.h:
2758 (WebCore::ContextMenuController::hitTestResult): Returns the HitTestResult of the current ContextMenu.
2760 * platform/ContextMenu.cpp: Removed.
2761 * platform/ContextMenu.h:
2762 * platform/efl/ContextMenuEfl.cpp:
2763 (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2764 (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
2765 * platform/gtk/ContextMenuGtk.cpp:
2766 (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2767 (WebCore::ContextMenu::appendItem): Ditto.
2768 * platform/haiku/ContextMenuHaiku.cpp:
2769 (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2770 (WebCore::ContextMenu::appendItem): Ditto.
2771 (WebCore::ContextMenu::insertItem): Ditto.
2772 * platform/mac/ContextMenuMac.mm:
2773 (-[WebCoreMenuTarget validateMenuItem:]): Calls checkOrEnableIfNeeded on the controller instead of
2775 (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2776 (WebCore::ContextMenu::appendItem): Removed the call to checkOrEnableIfNeeded.
2777 (WebCore::ContextMenu::insertItem): Ditto.
2778 * platform/win/ContextMenuWin.cpp:
2779 (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2780 (WebCore::ContextMenu::insertItem): Removed the call to checkOrEnableIfNeeded.
2781 * platform/wx/ContextMenuWx.cpp:
2782 (WebCore::ContextMenu::ContextMenu): Removed m_hitTestResult from the constructor.
2783 (ContextMenu::appendItem): Ditto.
2785 2010-12-08 Martin Robinson <mrobinson@igalia.com>
2787 Reviewed by John Sullivan.
2789 [GTK] Layering violation in ContextMenuGtk.cpp
2790 https://bugs.webkit.org/show_bug.cgi?id=50676
2792 ContextMenuGtk accesses the page's ContextMenuController, which is a layering
2793 violation. This was fixed for Mac with change r73469. We make a similar fix here
2794 by moving the "activated" signal connection to the WebKit layer.
2796 * platform/gtk/ContextMenuGtk.cpp:
2797 (WebCore::ContextMenu::appendItem): Remove access of ContextMenuController. This
2798 is a layering violation.
2800 2010-12-08 Jessie Berlin <jberlin@apple.com>
2802 Reviewed by Adam Roben.
2804 WebKit2: Implement WebChromeClient::exceededDatabaseQuota
2805 https://bugs.webkit.org/show_bug.cgi?id=50656
2808 Export the symbol for SecurityOrigin::databaseIdentifier.
2810 2010-12-08 Csaba Osztrogonác <ossy@webkit.org>
2812 Unreviewed, rolling out r73521.
2813 http://trac.webkit.org/changeset/73521
2814 https://bugs.webkit.org/show_bug.cgi?id=50640
2816 It broke 90 layout tests
2818 * bindings/js/JSDOMBinding.cpp:
2819 (WebCore::printErrorMessageForFrame):
2820 * bindings/js/JSDOMWindowBase.cpp:
2821 (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
2822 * bindings/js/JSDOMWindowCustom.cpp:
2823 (WebCore::JSDOMWindow::setLocation):
2824 * page/DOMWindow.cpp:
2827 2010-12-08 David Hyatt <hyatt@apple.com>
2829 Reviewed by Anders Carlsson.
2831 https://bugs.webkit.org/show_bug.cgi?id=50576
2833 REGRESSION in position of autocomplete popup on RTL page.
2835 RTL static position computation did not subtract out the width of the enclosing box if the
2836 immediate parent was a RenderInline. This bug was exposed by properly changing the RenderView
2837 to be RTL when the document was RTL.
2839 Added three new tests in fast/block/positioning.
2841 * rendering/RenderBox.cpp:
2842 (WebCore::RenderBox::computePositionedLogicalWidth):
2844 2010-12-08 Xiaomei Ji <xji@chromium.org>
2846 Reviewed by David Hyatt.
2848 Fix backward mouse wheeling not working when scroll position is below 0.
2849 https://bugs.webkit.org/show_bug.cgi?id=50370
2851 Tests: fast/events/wheelevent-in-horizontal-scrollbar-in-rtl.html
2852 fast/events/wheelevent-in-vertical-scrollbar-in-rtl.html
2854 * platform/ScrollView.cpp:
2855 (WebCore::ScrollView::wheelEvent):
2857 2010-12-08 Simon Fraser <simon.fraser@apple.com>
2859 Reviewed by Dan Bernstein.
2861 Fix pauseAnimation API to work with shorthand properties
2862 https://bugs.webkit.org/show_bug.cgi?id=50639
2864 The pause API is always called with a long-hand property, but that
2865 property may be animating via a shorthand. Detect this, and pause
2866 such shorthand animations.
2868 * page/animation/AnimationBase.cpp:
2869 (WebCore::ShorthandPropertyWrapper::propertyWrappers): Expose the vector
2870 of wrappers used by a shorthand wrapper.
2872 (WebCore::gatherEnclosingShorthandProperties): Utility function that walks
2873 through the shorthand wrappers, keeping track of which can affect the given
2875 (WebCore::AnimationBase::animatableShorthandsAffectingProperty): Return a set
2876 of shorthand properties that can affect the given property.
2878 * page/animation/AnimationBase.h: New method.
2879 * page/animation/CompositeAnimation.cpp:
2880 (WebCore::CompositeAnimation::pauseTransitionAtTime): If we don't find the
2881 property itself, check whether it's being animated via shorthands.
2883 2010-12-08 David Hyatt <hyatt@apple.com>
2885 Reviewed by Beth Dakin.
2887 <rdar://problem/8740920> Gestures: Frame::scalePage() broken by r73885
2889 Make sure the transform applied to the RenderView for page scaling is incorporated into the
2890 docTop/Bottom/Left/Right accessors.
2892 * rendering/RenderView.cpp:
2893 (WebCore::RenderView::docTop):
2894 (WebCore::RenderView::docBottom):
2895 (WebCore::RenderView::docLeft):
2896 (WebCore::RenderView::docRight):
2898 2010-12-08 Ilya Tikhonovsky <loislo@chromium.org>
2900 Reviewed by Yury Semikhatsky.
2902 Web Inspector: Protocol cleanup task. Remove WebInspector wrappers
2903 for TimelineAgent functions.
2905 https://bugs.webkit.org/show_bug.cgi?id=50690
2907 * inspector/Inspector.idl:
2908 * inspector/front-end/TimelineAgent.js:
2909 * inspector/front-end/TimelinePanel.js:
2910 (WebInspector.TimelinePanel):
2911 (WebInspector.TimelinePanel.prototype.timelineProfilerWasStarted):
2912 (WebInspector.TimelinePanel.prototype.timelineProfilerWasStopped):
2914 2010-12-08 Philippe Normand <pnormand@igalia.com>
2916 Reviewed by Gustavo Noronha Silva.
2918 [GTK] media/fullscreen* failing on 64-bits Debug
2919 https://bugs.webkit.org/show_bug.cgi?id=50394
2921 Avoid emiting durationchanged in the case where the previous
2922 duration was 0 because that case is already handled by the
2925 Test: media/media-fullscreen*.html
2927 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2928 (WebCore::MediaPlayerPrivateGStreamer::durationChanged):
2930 2010-12-07 Darin Adler <darin@apple.com>
2932 Reviewed by Geoffrey Garen.
2934 Move DOMWindow::setLocation logic into DOMWindow class and out of JavaScript binding
2935 https://bugs.webkit.org/show_bug.cgi?id=50640
2937 * bindings/js/JSDOMBinding.cpp:
2938 (WebCore::printErrorMessageForFrame): Removed body; just call through to
2939 DOMWindow::printErrorMessage.
2941 * bindings/js/JSDOMWindowBase.cpp:
2942 (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): Removed body;
2943 just call through to DOMWindow::crossDomainAccessErrorMessage.
2945 * bindings/js/JSDOMWindowCustom.cpp:
2946 (WebCore::JSDOMWindow::setLocation): Changed terminology to use activeFrame and
2947 firstFrame, rather than the older lexicalFrame and dynamicFrame. Removed most
2948 of the body and moved it into DOMWindow::setLocation.
2950 * page/DOMWindow.cpp:
2951 (WebCore::DOMWindow::setLocation): Added. Does all the same work that
2952 JSDOMWindow::setLocation used to do, but in a way that's not specific
2954 (WebCore::DOMWindow::printErrorMessage): Added.
2955 (WebCore::DOMWindow::crossDomainAccessErrorMessage): Added.
2957 * page/DOMWindow.h: Added setLocation, printErrorMessage, and
2958 crossDomainAccessErrorMessage.
2960 2010-12-08 Alejandro G. Castro <alex@igalia.com>
2962 Unreviewed, rolling out r73494.
2963 http://trac.webkit.org/changeset/73494
2964 https://bugs.webkit.org/show_bug.cgi?id=50380
2966 The tests added are crashing in the debug bots (macn and gtk)
2968 * html/HTMLSelectElement.cpp:
2969 (WebCore::HTMLSelectElement::deselectItems):
2970 (WebCore::HTMLSelectElement::setSelectedIndex):
2971 (WebCore::HTMLSelectElement::setSelectedIndexByUser):
2972 (WebCore::HTMLSelectElement::listBoxSelectItem):
2973 (WebCore::HTMLSelectElement::add):
2974 (WebCore::HTMLSelectElement::remove):
2975 (WebCore::HTMLSelectElement::restoreFormControlState):
2976 (WebCore::HTMLSelectElement::parseMappedAttribute):
2977 (WebCore::HTMLSelectElement::selectAll):
2978 (WebCore::HTMLSelectElement::reset):
2979 (WebCore::HTMLSelectElement::updateListBoxSelection):
2980 (WebCore::HTMLSelectElement::setLength):
2981 * html/HTMLSelectElement.h:
2982 (WebCore::HTMLSelectElement::isOptionalFormControl):
2983 * html/HTMLSelectElement.idl:
2984 * html/ValidityState.cpp:
2985 (WebCore::ValidityState::valueMissing):
2987 2010-12-07 Ilya Tikhonovsky <loislo@chromium.org>
2989 Reviewed by Pavel Feldman.
2991 Web Inspector: Inspector protocol cleanup task. Remove
2992 WebInspector wrappers for DOMAgent functions.
2994 There were a lot of wrappers in WebInspector namespace
2995 for different WebInspector agents functions. As far as we have a
2996 generic mechanic for such functions we can remove these
2997 wrappers and register domAgent instance as a handler for
2998 DOM domain notifications.
3000 https://bugs.webkit.org/show_bug.cgi?id=50626
3002 * inspector/Inspector.idl:
3003 * inspector/front-end/DOMAgent.js:
3004 (WebInspector.DOMNode):
3005 (WebInspector.DOMAgent):
3006 (WebInspector.DOMAgent.prototype.attributesUpdated):
3007 (WebInspector.DOMAgent.prototype.characterDataModified):
3008 (WebInspector.DOMAgent.prototype.setDocument):
3009 (WebInspector.DOMAgent.prototype.setDetachedRoot):
3010 (WebInspector.DOMAgent.prototype.setChildNodes):
3011 (WebInspector.DOMAgent.prototype.childNodeCountUpdated):
3012 (WebInspector.DOMAgent.prototype.childNodeInserted):
3013 (WebInspector.DOMAgent.prototype.childNodeRemoved):
3014 (WebInspector.EventListeners.getEventListenersForNodeAsync):
3015 * inspector/front-end/inspector.js:
3016 (WebInspector.didCommitLoad):
3018 2010-12-08 Yury Semikhatsky <yurys@chromium.org>
3020 Reviewed by Pavel Feldman.
3022 Web Inspector: remove groupLevel counter from console messages
3023 https://bugs.webkit.org/show_bug.cgi?id=50672
3025 * inspector/ConsoleMessage.cpp:
3026 (WebCore::ConsoleMessage::ConsoleMessage):
3027 (WebCore::ConsoleMessage::addToFrontend):
3028 (WebCore::ConsoleMessage::isEqual):
3029 * inspector/ConsoleMessage.h:
3030 * inspector/InspectorController.cpp:
3031 (WebCore::InspectorController::InspectorController):
3032 (WebCore::InspectorController::addMessageToConsole):
3033 (WebCore::InspectorController::clearConsoleMessages):
3034 (WebCore::InspectorController::startGroup):
3035 (WebCore::InspectorController::endGroup):
3036 * inspector/InspectorController.h:
3037 * inspector/front-end/ConsoleView.js:
3038 (WebInspector.ConsoleView.createFilterElement):
3039 (WebInspector.ConsoleView):
3040 (WebInspector.ConsoleView.prototype.filter):
3041 (WebInspector.ConsoleView.prototype.afterShow):
3042 (WebInspector.ConsoleView.prototype.addMessage):
3043 (WebInspector.ConsoleView.prototype.updateMessageRepeatCount):
3044 (WebInspector.ConsoleView.prototype.clearMessages):
3045 (WebInspector.ConsoleMessage):
3046 (WebInspector.ConsoleMessage.createTextMessage):
3047 (WebInspector.ConsoleMessage.prototype.toMessageElement):
3048 (WebInspector.ConsoleMessage.prototype._addMessageHeader):
3049 (WebInspector.ConsoleMessage.prototype._updateRepeatCount):
3050 (WebInspector.ConsoleMessage.prototype.toString):
3051 (WebInspector.ConsoleMessage.prototype.isEqual):
3052 (WebInspector.ConsoleGroup):
3053 * inspector/front-end/Resource.js:
3054 (WebInspector.Resource.prototype._checkWarning):
3055 * inspector/front-end/SourceFrame.js:
3056 (WebInspector.SourceFrame.prototype._addMessageToSource):
3057 * inspector/front-end/inspector.js:
3058 (WebInspector.addConsoleMessage):
3059 (WebInspector.log.logMessage):
3062 2010-12-07 Pavel Podivilov <podivilov@chromium.org>
3064 Reviewed by Pavel Feldman.
3066 Web Inspector: introduce DebuggerModel class representing InspectorDebuggerAgent state.
3067 https://bugs.webkit.org/show_bug.cgi?id=50567
3069 Moved debugging-related code from BreakpointManager to DebuggerModel. Moved Breakpoint class to a separate file.
3071 * English.lproj/localizedStrings.js:
3073 * WebCore.vcproj/WebCore.vcproj:
3074 * inspector/front-end/Breakpoint.js: Added.
3075 (WebInspector.Breakpoint): Moved from BreakpointManager.js.
3076 * inspector/front-end/BreakpointManager.js:
3077 (WebInspector.BreakpointManager): Remove debugger-related methods.
3078 * inspector/front-end/CallStackSidebarPane.js:
3079 (WebInspector.CallStackSidebarPane):
3080 (WebInspector.CallStackSidebarPane.prototype._nativeBreakpointHit):
3081 (WebInspector.CallStackSidebarPane.prototype._scriptBreakpointHit):
3082 * inspector/front-end/DebuggerModel.js: Added.
3083 (WebInspector.DebuggerModel): Moved debugger-related methods from BreakpointManager.
3084 * inspector/front-end/ScriptsPanel.js:
3085 (WebInspector.ScriptsPanel):
3086 (WebInspector.ScriptsPanel.prototype.continueToLine):
3087 (WebInspector.ScriptsPanel.prototype.editScriptSource.mycallback):
3088 (WebInspector.ScriptsPanel.prototype.editScriptSource):
3089 (WebInspector.ScriptsPanel.prototype._debuggerPaused):
3090 (WebInspector.ScriptsPanel.prototype._debuggerResumed):
3091 (WebInspector.ScriptsPanel.prototype.reset):
3092 * inspector/front-end/SourceFrame.js:
3093 (WebInspector.SourceFrame.prototype._createViewerIfNeeded):
3094 (WebInspector.SourceFrameDelegate.prototype.addBreakpoint):
3095 (WebInspector.SourceFrameDelegate.prototype.breakpoints):
3096 (WebInspector.SourceFrameDelegate.prototype.findBreakpoint):
3097 * inspector/front-end/WebKit.qrc:
3098 * inspector/front-end/inspector.html:
3099 * inspector/front-end/inspector.js:
3100 (WebInspector.createJSBreakpointsSidebarPane):
3101 (WebInspector.restoredBreakpoint):
3102 (WebInspector.pausedScript):
3103 (WebInspector.resumedScript):
3104 (WebInspector.reset):
3106 2010-12-08 Pavel Podivilov <podivilov@chromium.org>
3108 Reviewed by Pavel Feldman.
3110 Web Inspector: SourceFrame refactoring.
3111 https://bugs.webkit.org/show_bug.cgi?id=50223
3113 SourceFrame should ask BreakpointManager about existing breakpoints instead of maintaining
3114 it's own storages. Move common code from ScriptView and SourceView to SourceFrame.
3116 * inspector/front-end/BreakpointManager.js:
3117 (WebInspector.BreakpointManager.prototype.findBreakpoints):
3118 (WebInspector.BreakpointManager.prototype.findBreakpoint):
3119 * inspector/front-end/Script.js:
3120 (WebInspector.Script):
3121 (WebInspector.Script.prototype.get linesCount):
3122 (WebInspector.Script.prototype.get source):
3123 (WebInspector.Script.prototype.set source):
3124 * inspector/front-end/ScriptView.js:
3125 (WebInspector.ScriptView):
3126 (WebInspector.ScriptView.prototype._scriptSourceChanged):
3127 (WebInspector.ScriptFrameDelegateImpl):
3128 (WebInspector.ScriptFrameDelegateImpl.prototype.canEditScripts):
3129 (WebInspector.ScriptFrameDelegateImpl.prototype.editLineComplete):
3130 (WebInspector.ScriptFrameDelegateImpl.prototype.scripts):
3131 * inspector/front-end/ScriptsPanel.js:
3132 (WebInspector.ScriptsPanel):
3133 * inspector/front-end/SourceFrame.js:
3134 (WebInspector.SourceFrame): Add common methods of ScriptView and SourceView.
3135 (WebInspector.SourceFrameDelegate):
3136 (WebInspector.SourceFrameDelegate.prototype.canEditScripts):
3137 (WebInspector.SourceFrameDelegate.prototype.editLineComplete):
3138 (WebInspector.SourceFrameDelegate.prototype.scripts):
3139 * inspector/front-end/SourceView.js:
3140 (WebInspector.SourceView):
3141 (WebInspector.SourceView.prototype._contentLoaded):
3142 (WebInspector.ResourceFrameDelegateImpl):
3143 (WebInspector.ResourceFrameDelegateImpl.prototype.canEditScripts):
3144 (WebInspector.ResourceFrameDelegateImpl.prototype.editLineComplete):
3145 (WebInspector.ResourceFrameDelegateImpl.prototype.scripts):
3147 2010-12-08 Yuta Kitamura <yutak@chromium.org>
3149 Unreviewed, rolling out r73492.
3150 http://trac.webkit.org/changeset/73492
3151 https://bugs.webkit.org/show_bug.cgi?id=49914
3153 Caused a lot of pixel test failures and broke Windows build.
3155 * WebCore.xcodeproj/project.pbxproj:
3156 * platform/graphics/GraphicsContext.cpp:
3157 (WebCore::GraphicsContext::createGraphicsContextPrivate):
3158 (WebCore::GraphicsContext::destroyGraphicsContextPrivate):
3159 (WebCore::GraphicsContext::save):
3160 (WebCore::GraphicsContext::restore):
3161 (WebCore::GraphicsContext::setStrokeThickness):
3162 (WebCore::GraphicsContext::setStrokeStyle):
3163 (WebCore::GraphicsContext::setStrokeColor):
3164 (WebCore::GraphicsContext::setShadow):
3165 (WebCore::GraphicsContext::clearShadow):
3166 (WebCore::GraphicsContext::getShadow):
3167 (WebCore::GraphicsContext::strokeThickness):
3168 (WebCore::GraphicsContext::strokeStyle):
3169 (WebCore::GraphicsContext::strokeColor):
3170 (WebCore::GraphicsContext::strokeColorSpace):
3171 (WebCore::GraphicsContext::fillRule):
3172 (WebCore::GraphicsContext::setFillRule):
3173 (WebCore::GraphicsContext::setFillColor):
3174 (WebCore::GraphicsContext::fillColor):
3175 (WebCore::GraphicsContext::fillColorSpace):
3176 (WebCore::GraphicsContext::setShouldAntialias):
3177 (WebCore::GraphicsContext::shouldAntialias):
3178 (WebCore::GraphicsContext::setStrokePattern):
3179 (WebCore::GraphicsContext::setFillPattern):
3180 (WebCore::GraphicsContext::setStrokeGradient):
3181 (WebCore::GraphicsContext::setFillGradient):
3182 (WebCore::GraphicsContext::fillGradient):
3183 (WebCore::GraphicsContext::strokeGradient):
3184 (WebCore::GraphicsContext::fillPattern):
3185 (WebCore::GraphicsContext::strokePattern):
3186 (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3187 (WebCore::GraphicsContext::updatingControlTints):
3188 (WebCore::GraphicsContext::setUpdatingControlTints):
3189 (WebCore::GraphicsContext::setPaintingDisabled):
3190 (WebCore::GraphicsContext::paintingDisabled):
3191 (WebCore::GraphicsContext::textDrawingMode):
3192 (WebCore::GraphicsContext::setTextDrawingMode):
3193 * platform/graphics/GraphicsContext.h:
3194 * platform/graphics/GraphicsContextPrivate.h: Added.
3195 (WebCore::GraphicsContextState::GraphicsContextState):
3196 (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
3197 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3198 (WebCore::setPlatformFill):
3199 (WebCore::setPlatformStroke):
3200 (WebCore::drawPathShadow):
3201 (WebCore::fillCurrentCairoPath):
3202 (WebCore::strokeCurrentCairoPath):
3203 (WebCore::GraphicsContext::GraphicsContext):
3204 (WebCore::GraphicsContext::~GraphicsContext):
3205 (WebCore::GraphicsContext::fillPath):
3206 (WebCore::GraphicsContext::strokePath):
3207 (WebCore::GraphicsContext::fillRect):
3208 (WebCore::GraphicsContext::setPlatformShadow):
3209 (WebCore::GraphicsContext::strokeRect):
3210 (WebCore::GraphicsContext::setAlpha):
3211 (WebCore::GraphicsContext::getAlpha):
3212 * platform/graphics/cg/GraphicsContextCG.cpp:
3213 (WebCore::GraphicsContext::GraphicsContext):
3214 (WebCore::GraphicsContext::~GraphicsContext):
3215 (WebCore::GraphicsContext::applyStrokePattern):
3216 (WebCore::GraphicsContext::applyFillPattern):
3217 (WebCore::GraphicsContext::drawPath):
3218 (WebCore::GraphicsContext::fillPath):
3219 (WebCore::GraphicsContext::strokePath):
3220 (WebCore::GraphicsContext::fillRect):
3221 (WebCore::GraphicsContext::setPlatformShadow):
3222 (WebCore::GraphicsContext::strokeRect):
3223 * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3224 (WebCore::GraphicsContext::GraphicsContext):
3225 (WebCore::GraphicsContext::~GraphicsContext):
3226 * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3227 (WebCore::GraphicsContext::GraphicsContext):
3228 (WebCore::GraphicsContext::~GraphicsContext):
3229 (WebCore::GraphicsContext::fillPath):
3230 (WebCore::GraphicsContext::strokePath):
3231 (WebCore::GraphicsContext::clip):
3232 (WebCore::GraphicsContext::clipOut):
3233 (WebCore::GraphicsContext::addInnerRoundedRectClip):
3234 * platform/graphics/qt/GraphicsContextQt.cpp:
3235 (WebCore::GraphicsContext::GraphicsContext):
3236 (WebCore::GraphicsContext::~GraphicsContext):
3237 (WebCore::GraphicsContext::fillPath):
3238 (WebCore::GraphicsContext::strokePath):
3239 (WebCore::GraphicsContext::fillRect):
3240 (WebCore::GraphicsContext::setPlatformShadow):
3241 * platform/graphics/skia/GraphicsContextSkia.cpp:
3242 (WebCore::GraphicsContext::GraphicsContext):
3243 (WebCore::GraphicsContext::~GraphicsContext):
3244 (WebCore::GraphicsContext::fillPath):
3245 (WebCore::GraphicsContext::setPlatformShadow):
3246 * platform/graphics/win/GraphicsContextCGWin.cpp:
3247 (WebCore::GraphicsContext::GraphicsContext):
3248 * platform/graphics/win/GraphicsContextCairoWin.cpp:
3249 (WebCore::GraphicsContext::GraphicsContext):
3250 * platform/graphics/wince/GraphicsContextWinCE.cpp:
3251 (WebCore::GraphicsContext::GraphicsContext):
3252 (WebCore::GraphicsContext::~GraphicsContext):
3253 (WebCore::GraphicsContext::fillPath):
3254 (WebCore::GraphicsContext::fillRect):
3255 * platform/graphics/wx/GraphicsContextWx.cpp:
3256 (WebCore::GraphicsContext::GraphicsContext):
3257 (WebCore::GraphicsContext::~GraphicsContext):
3259 2010-12-08 Dai Mikurube <dmikurube@google.com>
3261 Reviewed by Kent Tamura.
3263 Implement "required" attribute for select tags
3264 https://bugs.webkit.org/show_bug.cgi?id=50380
3266 Test: fast/forms/select-live-pseudo-selectors.html
3267 platform/mac/fast/objc/dom-html-select-live-pseudo-selectors.html
3269 * html/HTMLSelectElement.cpp:
3270 (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.
3271 (WebCore::HTMLSelectElement::setSelectedIndex): Added calling setNeedsValidityCheck().
3272 (WebCore::HTMLSelectElement::setSelectedIndexByUser): Added calling setNeedsValidityCheck().
3273 (WebCore::HTMLSelectElement::valueMissing): Added valueMissing() to check if selecting an invalid or placeholder label option when a valid required attribute is specified.
3274 (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.
3275 (WebCore::HTMLSelectElement::add): Added calling setNeedsValidityCheck().
3276 (WebCore::HTMLSelectElement::remove): Added calling setNeedsValidityCheck().
3277 (WebCore::HTMLSelectElement::restoreFormControlState): Added calling setNeedsValidityCheck().
3278 (WebCore::HTMLSelectElement::parseMappedAttribute): Added calling setNeedsValidityCheck().
3279 (WebCore::HTMLSelectElement::selectAll): Added calling setNeedsValidityCheck().
3280 (WebCore::HTMLSelectElement::reset): Added calling setNeedsValidityCheck().
3281 (WebCore::HTMLSelectElement::updateListBoxSelection): Added calling setNeedsValidityCheck(). Skipped adding tests for this change as too complicated..
3282 (WebCore::HTMLSelectElement::setLength): Added calling setNeedsValidityCheck().
3283 (WebCore::HTMLSelectElement::isRequiredFormControl): Check if required or not.
3284 (WebCore::HTMLSelectElement::hasPlaceholderLabelOption): Added.
3285 * html/HTMLSelectElement.h:
3286 (WebCore::HTMLSelectElement::isOptionalFormControl): Check if not required.
3287 * html/HTMLSelectElement.idl: Added a required attribute to select elements..
3288 * html/ValidityState.cpp:
3289 (WebCore::ValidityState::valueMissing): Added valueMissing check for select elements into the global checker, ValidityState::valueMissing().
3291 2010-12-08 Renata Hodovan <reni@webkit.org>
3293 Reviewed by Andreas Kling.
3295 GraphicsContext: Merge m_common and m_data
3296 https://bugs.webkit.org/show_bug.cgi?id=49914
3298 Move data members from GraphicsContextPrivate into GraphicsContext. So GraphicsContextPlatform.h
3299 and m_common became unnecessary. They are removed.
3300 Add two methods to GraphicsContext: platformInit() and platformDestroy(), which
3301 make the constructor of GraphicsContext clearer.
3302 Besides add a getter to the private GraphicsContext::m_state member, because some inline
3303 functions in cairo need it.
3305 No new test is needed, because this is a refactoring.
3307 * WebCore.xcodeproj/project.pbxproj:
3308 * platform/graphics/GraphicsContext.cpp:
3309 (WebCore::GraphicsContext::GraphicsContext):
3310 (WebCore::GraphicsContext::~GraphicsContext):
3311 (WebCore::GraphicsContext::save):
3312 (WebCore::GraphicsContext::restore):
3313 (WebCore::GraphicsContext::setStrokeThickness):
3314 (WebCore::GraphicsContext::setStrokeStyle):
3315 (WebCore::GraphicsContext::setStrokeColor):
3316 (WebCore::GraphicsContext::setShadow):
3317 (WebCore::GraphicsContext::clearShadow):
3318 (WebCore::GraphicsContext::getShadow):
3319 (WebCore::GraphicsContext::strokeThickness):
3320 (WebCore::GraphicsContext::strokeStyle):
3321 (WebCore::GraphicsContext::strokeColor):
3322 (WebCore::GraphicsContext::strokeColorSpace):
3323 (WebCore::GraphicsContext::fillRule):
3324 (WebCore::GraphicsContext::setFillRule):
3325 (WebCore::GraphicsContext::setFillColor):
3326 (WebCore::GraphicsContext::fillColor):
3327 (WebCore::GraphicsContext::fillColorSpace):
3328 (WebCore::GraphicsContext::setShouldAntialias):
3329 (WebCore::GraphicsContext::shouldAntialias):
3330 (WebCore::GraphicsContext::state):
3331 (WebCore::GraphicsContext::setStrokePattern):
3332 (WebCore::GraphicsContext::setFillPattern):
3333 (WebCore::GraphicsContext::setStrokeGradient):
3334 (WebCore::GraphicsContext::setFillGradient):
3335 (WebCore::GraphicsContext::fillGradient):
3336 (WebCore::GraphicsContext::strokeGradient):
3337 (WebCore::GraphicsContext::fillPattern):
3338 (WebCore::GraphicsContext::strokePattern):
3339 (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
3340 (WebCore::GraphicsContext::updatingControlTints):
3341 (WebCore::GraphicsContext::setUpdatingControlTints):
3342 (WebCore::GraphicsContext::setPaintingDisabled):
3343 (WebCore::GraphicsContext::paintingDisabled):
3344 (WebCore::GraphicsContext::textDrawingMode):
3345 (WebCore::GraphicsContext::setTextDrawingMode):
3346 * platform/graphics/GraphicsContext.h:
3347 (WebCore::GraphicsContextState::GraphicsContextState):
3348 * platform/graphics/GraphicsContextPrivate.h: Removed.
3349 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3350 (WebCore::setPlatformFill):
3351 (WebCore::setPlatformStroke):
3352 (WebCore::drawPathShadow):
3353 (WebCore::fillCurrentCairoPath):
3354 (WebCore::strokeCurrentCairoPath):
3355 (WebCore::GraphicsContext::platformInit):
3356 (WebCore::GraphicsContext::platformDestroy):
3357 (WebCore::GraphicsContext::fillPath):
3358 (WebCore::GraphicsContext::strokePath):
3359 (WebCore::GraphicsContext::fillRect):
3360 (WebCore::GraphicsContext::setPlatformShadow):
3361 (WebCore::GraphicsContext::strokeRect):
3362 (WebCore::GraphicsContext::setAlpha):
3363 (WebCore::GraphicsContext::getAlpha):
3364 * platform/graphics/cg/GraphicsContextCG.cpp:
3365 (WebCore::GraphicsContext::platformInit):
3366 (WebCore::GraphicsContext::platformDestroy):
3367 (WebCore::GraphicsContext::applyStrokePattern):
3368 (WebCore::GraphicsContext::applyFillPattern):
3369 (WebCore::GraphicsContext::drawPath):
3370 (WebCore::GraphicsContext::fillPath):
3371 (WebCore::GraphicsContext::strokePath):
3372 (WebCore::GraphicsContext::fillRect):
3373 (WebCore::GraphicsContext::setPlatformShadow):
3374 (WebCore::GraphicsContext::strokeRect):
3375 * platform/graphics/haiku/GraphicsContextHaiku.cpp:
3376 (WebCore::GraphicsContext::platformInit):
3377 (WebCore::GraphicsContext::platformDestroy):
3378 * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
3379 (WebCore::GraphicsContext::platformInit):
3380 (WebCore::GraphicsContext::platformDestroy):
3381 (WebCore::GraphicsContext::fillPath):
3382 (WebCore::GraphicsContext::strokePath):
3383 (WebCore::GraphicsContext::clip):
3384 (WebCore::GraphicsContext::clipOut):
3385 (WebCore::GraphicsContext::addInnerRoundedRectClip):
3386 * platform/graphics/qt/GraphicsContextQt.cpp:
3387 (WebCore::GraphicsContext::platformInit):
3388 (WebCore::GraphicsContext::platformDestroy):
3389 (WebCore::GraphicsContext::fillPath):
3390 (WebCore::GraphicsContext::strokePath):
3391 (WebCore::GraphicsContext::fillRect):
3392 (WebCore::GraphicsContext::setPlatformShadow):
3393 * platform/graphics/skia/GraphicsContextSkia.cpp:
3394 (WebCore::GraphicsContext::platformInit):
3395 (WebCore::GraphicsContext::platformDestroy):
3396 (WebCore::GraphicsContext::fillPath):
3397 (WebCore::GraphicsContext::setPlatformShadow):
3398 * platform/graphics/win/GraphicsContextCGWin.cpp:
3399 (WebCore::GraphicsContext::platformInit):
3400 * platform/graphics/win/GraphicsContextCairoWin.cpp:
3401 (WebCore::GraphicsContext::platformInit):
3402 * platform/graphics/wince/GraphicsContextWinCE.cpp:
3403 (WebCore::GraphicsContext::platformInit):
3404 (WebCore::GraphicsContext::platformDestroy):
3405 (WebCore::GraphicsContext::fillPath):
3406 (WebCore::GraphicsContext::fillRect):
3407 * platform/graphics/wx/GraphicsContextWx.cpp:
3408 (WebCore::GraphicsContext::platformInit):
3409 (WebCore::GraphicsContext::platformDestroy):
3411 2010-12-07 Anton Muhin <antonm@chromium.org>
3413 Reviewed by Nate Chapin.
3415 Port http://trac.webkit.org/changeset/72819/ to v8-backed ports.
3416 https://bugs.webkit.org/show_bug.cgi?id=50246
3418 * bindings/v8/V8DOMMap.h:
3419 (WebCore::AbstractWeakReferenceMap::Visitor::startMap):
3420 (WebCore::AbstractWeakReferenceMap::Visitor::endMap):
3421 (WebCore::WeakReferenceMap::visit):
3422 * bindings/v8/V8GCController.cpp:
3423 (WebCore::GrouperItem::GrouperItem):
3424 (WebCore::GrouperItem::groupId):
3425 (WebCore::makeV8ObjectGroups):
3426 (WebCore::NodeGrouperVisitor::NodeGrouperVisitor):
3427 (WebCore::NodeGrouperVisitor::visitDOMWrapper):
3428 (WebCore::NodeGrouperVisitor::applyGrouping):
3429 (WebCore::DOMObjectGrouperVisitor::ObjectGrouperVisitor):
3430 (WebCore::DOMObjectGrouperVisitor::startMap):
3431 (WebCore::DOMObjectGrouperVisitor::endMap):
3432 (WebCore::DOMObjectGrouperVisitor::visitDOMWrapper):
3433 (WebCore::V8GCController::gcPrologue):
3435 2010-12-07 Daniel Bates <dbates@rim.com>
3437 Reviewed by Martin Robinson.
3439 Implement focus ring support for image maps
3440 https://bugs.webkit.org/show_bug.cgi?id=50371
3442 Implement GraphicsContext::drawFocusRing(const Path&, ...) so as to support
3443 drawing a focus ring for image maps.
3445 Tests: fast/images/imagemap-circle-focus-ring.html
3446 fast/images/imagemap-polygon-focus-ring.html
3448 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3449 (WebCore::adjustFocusRingColor): Added.
3450 (WebCore::adjustFocusRingLineWidth): Added.
3451 (WebCore::focusRingStrokeStyle): Added.
3452 (WebCore::GraphicsContext::drawFocusRing): Moved code for determining focus ring- color,
3453 line width and stroke style into functions adjustFocusRingColor(), adjustFocusRingLineWidth(),
3454 and focusRingStrokeStyle(), respectively. Implemented GraphicsContext::drawFocusRing(const Path&, ...).
3456 2010-12-07 Sergio Villar Senin <svillar@igalia.com>
3458 Reviewed by Xan Lopez.
3460 [GTK] WebKitSoupCache fails to load resources when cache contents are externally removed
3461 https://bugs.webkit.org/show_bug.cgi?id=50577
3463 Try to download cached resources again if they are no longer
3464 accesible by the cache.
3466 * platform/network/soup/cache/soup-request-http.c:
3468 (webkit_soup_request_http_send_async):
3470 2010-12-06 MORITA Hajime <morrita@google.com>
3472 Reviewed by Dimitri Glazkov.
3474 RenderIndicator subclasses should not change the render tree during layout.
3475 https://bugs.webkit.org/show_bug.cgi?id=50026
3477 The old code created shadow elements during a layout computation,
3478 that makes the layout state inconsisntent and cause an assertion failure.
3479 This change created shadow elements before the layout to avoid
3480 state inconsistencies.
3482 Instead of creating shadows on demand, RenderMeter and
3483 RenderProgress now create all necessary shadows before layouts,
3484 and change its visibilities during the layout: Changing
3485 visibilities doesn't trigger relayout and keep the state
3488 RenderMeter uses new HidablePartElement for shadow elements,
3489 which can toggle visibiliby between hidden and original value.
3491 Test: fast/dom/HTMLMeterElement/meter-element-crash.html
3493 * html/HTMLMeterElement.cpp:
3494 (WebCore::HTMLMeterElement::attach): Calling updateFromElement()
3495 * html/HTMLMeterElement.h:
3496 * html/HTMLProgressElement.cpp:
3497 (WebCore::HTMLProgressElement::attach): Calling updateFromElement()
3498 * html/HTMLProgressElement.h:
3499 * rendering/RenderIndicator.cpp:
3500 * rendering/RenderIndicator.h:
3501 * rendering/RenderMeter.cpp:
3502 (WebCore::MeterPartElement::MeterPartElement): Added to hold a restorable visibility.
3503 (WebCore::MeterPartElement::createForPart):
3504 (WebCore::MeterPartElement::hide):
3505 (WebCore::MeterPartElement::restoreVisibility):
3506 (WebCore::MeterPartElement::updateStyleForPart):
3507 (WebCore::MeterPartElement::saveVisibility):
3508 (WebCore::RenderMeter::~RenderMeter):
3509 (WebCore::RenderMeter::createPart): Extracted
3510 (WebCore::RenderMeter::updateFromElement): Had a shadow generation.
3511 (WebCore::RenderMeter::layoutParts): Removed shadow generation code.
3512 (WebCore::RenderMeter::shouldHaveParts):
3513 (WebCore::RenderMeter::valuePartRect): Adopted orientation.
3514 (WebCore::RenderMeter::orientation): Morphed from isHorizontal()
3515 (WebCore::RenderMeter::valuePseudoId): Adoptedn orientation
3516 (WebCore::RenderMeter::barPseudoId): Adopted orientation.
3517 * rendering/RenderMeter.h:
3518 (WebCore::RenderMeter::shadowAttached):
3519 * rendering/RenderProgress.cpp:
3520 (WebCore::RenderProgress::updateFromElement): Had a shadow generation.
3521 (WebCore::RenderProgress::layoutParts):
3522 * rendering/RenderProgress.h: