1 2010-09-13 Adam Barth <abarth@webkit.org>
3 Reviewed by Eric Seidel.
5 Apply spec changes to InForeignContentMode
6 https://bugs.webkit.org/show_bug.cgi?id=45636
8 Now breaking out of foreign content doesn't always bring you back to
9 HTML. If you have a foreign content element that can contain HTML, you
10 just get brought back to that element.
12 * html/parser/HTMLElementStack.cpp:
13 (WebCore::HTMLNames::isForeignContentScopeMarker):
14 (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
15 * html/parser/HTMLElementStack.h:
16 * html/parser/HTMLTreeBuilder.cpp:
17 (WebCore::HTMLTreeBuilder::processStartTag):
18 (WebCore::HTMLTreeBuilder::processEndOfFile):
20 2010-09-13 Adam Barth <abarth@webkit.org>
22 Reviewed by Eric Seidel.
24 Convert notImplemented() to ASSERT_NOT_REACHED
25 https://bugs.webkit.org/show_bug.cgi?id=45639
27 The reason we never implemented this state is because it's not actually
30 * html/parser/HTMLTreeBuilder.cpp:
31 (WebCore::HTMLTreeBuilder::processStartTag):
33 2010-09-13 Patrick Gansterer <paroga@paroga.com>
35 Reviewed by Kenneth Rohde Christiansen.
37 [WINCE] Buildfix for ScrollAnimatorWin
38 https://bugs.webkit.org/show_bug.cgi?id=45595
40 Use fabs() instead of abs().
42 * platform/ScrollAnimatorWin.cpp:
43 (WebCore::ScrollAnimatorWin::scroll):
44 (WebCore::ScrollAnimatorWin::animateScroll):
46 2010-09-13 Adam Barth <abarth@webkit.org>
48 Reviewed by Eric Seidel.
51 https://bugs.webkit.org/show_bug.cgi?id=45637
53 The spec made assertions that were false. Hixie fixed the spec by
54 removing the assertions. There's no need to keep these FIXMEs in the
57 * html/parser/HTMLTreeBuilder.cpp:
58 (WebCore::HTMLTreeBuilder::processEndTagForInCell):
60 2010-09-12 Adam Barth <abarth@webkit.org>
62 Reviewed by Eric Seidel.
64 Remove FIXME now that the HTML5 spec has been updated
65 https://bugs.webkit.org/show_bug.cgi?id=45634
67 The spec changed to say what we do here so this FIXME isn't needed
70 Tests: fast/parser/form-pointer-1.html
71 fast/parser/form-pointer-2.html
72 fast/parser/form-pointer-3.html
73 fast/parser/form-pointer-4.html
75 * html/parser/HTMLTreeBuilder.cpp:
76 (WebCore::HTMLTreeBuilder::processStartTagForInTable):
78 2010-09-12 Robin Qiu <robin.qiu@torchmobile.com.cn>
80 Reviewed by Antonio Gomes.
82 https://bugs.webkit.org/show_bug.cgi?id=18768
83 Fixed a bug in scroll flow. When we don't have scrollbars, we need to
84 repaintFixedElementsAfterScrolling(), sendScrollEvent() ... as well as
87 Tests: scrollbars/scrollevent-iframe-no-scrolling-wheel.html
88 scrollbars/scrollevent-iframe-no-scrolling.html
91 (WebCore::FrameView::valueChanged): Added.
92 * page/FrameView.h: Added a new method.
93 * platform/ScrollView.cpp:
94 (WebCore::ScrollView::valueChanged): Added.
95 (WebCore::ScrollView::updateScrollbars):
96 * platform/ScrollView.h: Added a new method.
98 2010-09-10 MORITA Hajime <morrita@google.com>
100 Reviewed by Tony Chang.
102 [Chromium] Implement textInputController.hasSpellingMarker() for Chromium
103 https://bugs.webkit.org/show_bug.cgi?id=45441
105 Added an API for testing marker state.
106 We locate this here instead of DRT for sharing the logic between
110 * editing/Editor.cpp:
111 (WebCore::Editor::selectionStartHasSpellingMarkerFor):
114 2010-09-12 Adam Barth <abarth@webkit.org>
116 Reviewed by Eric Seidel.
118 Adoption agency should use takeAllChildrenFrom
119 https://bugs.webkit.org/show_bug.cgi?id=45570
121 Before this patch, we were using an unsafe pattern of walking the
122 sibling list without grabbing references. Instead, we should use the
123 shiny new takeAllChildrenFrom method that shoves the children into a
124 vector first. Also, update takeAllChildrenFrom to handle the case
125 where the old parent is attached.
127 * dom/ContainerNode.cpp:
128 (WebCore::ContainerNode::takeAllChildrenFrom):
129 * html/parser/HTMLTreeBuilder.cpp:
130 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
131 * html/parser/HTMLTreeBuilder.h:
133 2010-09-12 Adam Barth <abarth@webkit.org>
135 Reviewed by Eric Seidel.
137 isParsingFragment assert hit in new treebuilder
138 https://bugs.webkit.org/show_bug.cgi?id=45621
140 Update our list of special tags to match the spec.
142 * html/parser/HTMLTreeBuilder.cpp:
144 2010-09-12 Robert Hogan <robert@webkit.org>
146 Reviewed by Andreas Kling.
148 [Qt] Fix http/tests/navigation/reload-subframe-object.html
150 We need to bring our use of getMimeTypeForPath() and
151 getMimeTypeForExtension() into line with WebCore expectations.
153 We should use MIMETypeRegistry::getMIMETypeForExtension() for cases
154 where an empty mimetype should be returned if no match is found, and
155 MIMETypeRegistry::getMIMETypeForPath() for cases where
156 'application/octet-stream' should be returned if no match is found.
158 Fixes http/tests/navigation/reload-subframe-object.html
160 Based on findings in webkit.org/b/31398 and webkit.org/b/15554.
162 https://bugs.webkit.org/show_bug.cgi?id=45613
164 * platform/network/qt/QNetworkReplyHandler.cpp:
165 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
166 * platform/qt/MIMETypeRegistryQt.cpp:
167 (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
169 2010-09-12 Dan Bernstein <mitz@apple.com>
171 Reviewed by Adele Peterson.
173 Neglect unlikely hyphenation opportunities
174 https://bugs.webkit.org/show_bug.cgi?id=45606
176 Avoid looking for hyphenation points in about 40% of the cases at the cost of missing about
177 3% of the hyphenation opportunities.
179 * rendering/RenderBlockLineLayout.cpp:
180 (WebCore::tryHyphenating): Bail out if the widest the prefix before the hyphen can be is no more
181 than 5/4 the font size.
183 2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
185 Reviewed by Simon Hausmann.
187 [Qt] fix qt_webkit_version.pri install for in-Qt builds
189 Always add the target, even if building inside Qt - as opposed to the
190 headers and libraries, there are no rules for that coming from
193 Task-number: QTBUG-13306
197 2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
199 Reviewed by Simon Hausmann.
201 [Qt] Let QtWebKit inject itself into the qt configuration
203 i.e., don't explicitly deal with qt_webkit_version.pri outside of the
204 webkit source directory.
206 Task-number: QTBUG-12379
210 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
214 * WebCore.pro: Re-add erroneously removed sources.
216 2010-09-12 Andreas Kling <andreas.kling@nokia.com>
218 Reviewed by Kenneth Rohde Christiansen.
220 [Qt] Remove Path::closeSubpath() workaround for broken miter joins
221 https://bugs.webkit.org/show_bug.cgi?id=45618
223 Removed Path::closeCanvasSubpath() and share the logic between Canvas and SVG
224 paths. The problem was actually in Qt's path stroker and has been fixed for Qt 4.7.1.
226 * html/canvas/CanvasRenderingContext2D.cpp:
227 (WebCore::CanvasRenderingContext2D::closePath):
228 * platform/graphics/Path.h:
229 * platform/graphics/qt/PathQt.cpp:
231 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
233 Fix the Gtk and minimal builds.
235 * plugins/PluginView.cpp:
236 (WebCore::PluginView::npObject): Correct the #ifdefs.
237 (WebCore::PluginView::bindingInstance): Moved npErr variable
238 into npObject() function where it is used.
240 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
242 [Qt] Prospective build fix for minimal build.
244 * plugins/PluginView.cpp: Guard newly added function
245 by ENABLE_NETSCAPE_PLUGIN feature.
246 (WebCore::PluginView::npObject):
247 * plugins/PluginView.h:
249 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
251 Reviewed by Andreas Kling.
253 [Qt] Add support for binding QtWebKit to a QScriptEngine.
255 The ScriptController owns the V8 context, and this patch
256 for the Qt build also gives it a QScriptEngine, that has
257 been instructed to adopt the V8 context.
259 This is the enabler for the QObject bindings, used in
263 * bindings/v8/ScriptController.cpp: Include QScriptEngine
264 for the Qt build, to let the ~ScriptController destructor
265 find the QScriptEngine destructor (via OwnPtr).
266 * bindings/v8/ScriptController.h: Declare getters.
267 * bindings/v8/ScriptControllerQt.cpp: Added.
268 (WebCore::ScriptController::qtScriptEngine): Implement
271 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
273 Reviewed by Andreas Kling.
275 [Qt] Last bits and pieces for a V8 build.
277 When building with V8, get it from QtScript.
279 * WebCore.pro: Use QtScript, removed non-existant
280 bridge files from the build.
282 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
284 Reviewed by Andreas Kling.
286 [Qt] Add PlatformBridge for V8 build.
288 Add the minimalisting platform bridge with the two
289 methods needed by NPV8Object.cpp.
292 * platform/qt/PlatformBridge.h: Added.
293 * platform/qt/PlatformBridgeQt.cpp: Added.
294 (WebCore::PlatformBridge::popupsAllowed):
295 (WebCore::PlatformBridge::pluginScriptableObject):
296 * plugins/PluginView.cpp: Refactor the plugin object
297 retrieval code into a separate function, called by
298 bindingInstance() and PlatformBridge.
299 (WebCore::PluginView::npObject):
300 (WebCore::PluginView::bindingInstance):
301 * plugins/PluginView.h:
303 2010-09-11 Jer Noble <jer.noble@apple.com>
305 Reviewed by Eric Carlson.
307 http/tests/media/text-served-as-text.html failing on Windows (Debug+Release)
308 https://bugs.webkit.org/show_bug.cgi?id=45603
310 Disable the eat/text components under Windows the same way as we do on the Mac.
312 * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
313 * platform/graphics/win/QTMovie.cpp:
314 * platform/graphics/win/QTMovie.h:
316 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
318 Reviewed by Andreas Kling.
320 Fix compilation of the V8 bindings on X11 with Qt.
322 This changes brings the file in sync with its copy in bridge/,
323 adding additional conflicting X11 keywords to undef. This is
324 a temporary fix until the file is removed altogether, which is
325 tracked in https://bugs.webkit.org/show_bug.cgi?id=45617
327 * bindings/v8/npruntime_internal.h:
329 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
331 Reviewed by Andreas Kling.
333 Fix compilation of the V8 bindings on X11 with Qt.
335 These headers include npruntime, which drag on X11Resources.h, which
336 among other things #define's None and Boolean. Later on v8.h is included,
337 which declares these in enums and therefore conflicts. npruntime_internal.h
338 was introduced exactly to address this problem by including npruntime.h
339 and undeff'ing the offending constants.
341 * bindings/v8/V8Helpers.h:
342 * bindings/v8/V8NPObject.h:
343 * bindings/v8/V8NPUtils.h:
345 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
349 Use false instead of False after
350 http://trac.webkit.org/changeset/67323
352 * plugins/gtk/PluginViewGtk.cpp:
353 (WebCore::PluginView::updatePluginWidget):
354 (WebCore::PluginView::paint):
356 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
358 Reviewed by Andreas Kling.
360 [Qt] Fix the compilation of V8Binding.cpp when compiling with Qt.
362 * bindings/v8/V8Binding.cpp:
363 (WebCore::WebCoreStringResource::WebCoreStringResource): In this
364 line an AtomicString should be converted to a WTF::String. The former
365 has a conversion operator to the latter, to be able to call the
366 WTF::String copy constructor. When compiling with Qt, then AtomicString
367 also has a conversion operator to QString _and_ WTF::String has an
368 implicit constructor that takes a QString. Therefore the compiler is
369 confused and not sure which conversion to prefer, the one that isn't
370 actually a conversion - going to WTF::String - or the conversion from
371 AtomicString to QString and then constructing the WTF::String from
372 a QString. To resolve this ambiguity we explicitly call the string()
373 helper function on the AtomicString, which is equivalent to the
374 operator WTF::String().
376 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
378 Reviewed by Andreas Kling.
380 Fix the build without JSC.
382 Complement http://trac.webkit.org/changeset/59826 and
383 add missing JSC guards.
385 * plugins/PluginView.cpp:
386 (WebCore::PluginView::bindingInstance):
387 (WebCore::PluginView::privateBrowsingStateChanged):
388 * plugins/qt/PluginViewQt.cpp:
389 (WebCore::PluginView::dispatchNPEvent):
390 (WebCore::PluginView::setNPWindowIfNeeded):
391 (WebCore::PluginView::platformStart):
393 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
395 Reviewed by Andreas Kling.
397 Fix compilation with V8 and XPath enabled.
399 V8XPathNSResolver.cpp includes V8XPathNSResolver.h,
400 which includes V8DOMWrapper.h as its first header.
401 V8DOMWrapper.h then uses V8XPathNSResolver in an inline
402 function, and gcc doesn't seem to like this, because
403 at this point the type isn't known ("V8XPathNSResolver
404 has not been declared"). Forward declaring the type
405 doesn't help unfortunately: "incomplete type
406 'WebCore::V8XPathNSResolver' used in nested name
409 To resolve this circular dependency, this patch moves
410 the inline function into the .cpp file.
412 * bindings/v8/V8DOMWrapper.cpp:
413 (WebCore::V8DOMWrapper::getXPathNSResolver):
414 * bindings/v8/V8DOMWrapper.h:
416 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
418 Reviewed by Andreas Kling.
420 [Qt][X11] Fix build with V8 against X11 headers.
422 Added "True" and "False" to the list of words
423 we free from the X11 macro jail.
425 * bridge/npruntime_internal.h:
426 * config.h: The V8 bindings end up indirectly pulling
427 in X11 headers and they use True/False. There's no
428 central header apart from this one, so include the
429 x11 fixing header here for Qt/X11/V8.
430 * plugins/qt/PluginViewQt.cpp:
431 (WebCore::PluginView::paint): Use false instead of False
432 since False isn't available anymore.
434 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
436 Reviewed by Andreas Kling.
438 [Qt] Fix compilation with V8 and Qt.
440 Use WebKit's page cache for ScriptCachedFrameData.
442 * bindings/v8/ScriptCachedFrameData.h:
444 2010-09-12 Simon Hausmann <simon.hausmann@nokia.com>
446 Reviewed by Andreas Kling.
448 Fix compiler warning.
450 NPClass has 13 members, the last one (NPConstructFunctionPtr construct) wasn't
451 initialized explicitly.
453 * bindings/v8/NPV8Object.cpp:
455 2010-09-12 Mario Sanchez Prada <msanchez@igalia.com>
457 Reviewed by Martin Robinson.
459 [Gtk] get_n_selections and get_selection fail when selecting text across object boundaries
460 https://bugs.webkit.org/show_bug.cgi?id=26991
462 Fix AtkText getNSelections() and getSelection() to work properly
464 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
465 (selectionBelongsToObject): Check that both the selection intersects
466 the node AND that the selection is not just "touching" one of the
467 boundaries for the selected node. We want to check whether the
468 node is actually inside the region, at least partially
469 (getSelectionOffsetsForObject): New function to get the start and
470 end offsets of a selection for a given accessible object.
471 (webkit_accessible_text_get_selection): Return zero when both
472 start and end offsets are equal, following the lead of GAIL.
474 2010-09-11 Adam Barth <abarth@webkit.org>
476 Reviewed by Sam Weinig.
478 Make SecurityOrigin::canDisplay an instance function
479 https://bugs.webkit.org/show_bug.cgi?id=45219
481 This function was secretly an instance function because callers needed
482 to pass in a document (which owns a SecurityOrigin). Only the
483 FrameLoader actually needs the method to be static.
486 * html/HTMLMediaElement.cpp:
487 (WebCore::HTMLMediaElement::isSafeToLoadURL):
489 (WebCore::Cache::requestResource):
490 - Notice that DocLoader::doc() can never be 0.
491 * loader/FrameLoader.cpp:
492 (WebCore::FrameLoader::loadFrameRequest):
493 * loader/PingLoader.cpp:
494 (WebCore::PingLoader::loadImage):
495 * loader/SubframeLoader.cpp:
496 (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
497 (WebCore::SubframeLoader::createJavaAppletWidget):
498 (WebCore::SubframeLoader::loadSubframe):
499 (WebCore::SubframeLoader::loadPlugin):
500 * loader/SubresourceLoader.cpp:
501 (WebCore::SubresourceLoader::create):
502 * page/SecurityOrigin.cpp:
503 (WebCore::SecurityOrigin::canDisplay):
504 (WebCore::SecurityOrigin::deprecatedCanDisplay):
505 * page/SecurityOrigin.h:
506 * plugins/PluginView.cpp:
507 (WebCore::PluginView::load):
509 2010-09-11 Adam Barth <abarth@webkit.org>
511 Reviewed by Sam Weinig.
513 Make SecurityOrigin::canDisplay an instance function
514 https://bugs.webkit.org/show_bug.cgi?id=45219
516 This function was secretly an instance function because callers needed
517 to pass in a document (which owns a SecurityOrigin). Only the
518 FrameLoader actually needs the method to be static.
521 * html/HTMLMediaElement.cpp:
522 (WebCore::HTMLMediaElement::isSafeToLoadURL):
524 (WebCore::Cache::requestResource):
525 - Notice that DocLoader::doc() can never be 0.
526 * loader/FrameLoader.cpp:
527 (WebCore::FrameLoader::loadFrameRequest):
528 * loader/PingLoader.cpp:
529 (WebCore::PingLoader::loadImage):
530 * loader/SubframeLoader.cpp:
531 (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
532 (WebCore::SubframeLoader::createJavaAppletWidget):
533 (WebCore::SubframeLoader::loadSubframe):
534 (WebCore::SubframeLoader::loadPlugin):
535 * loader/SubresourceLoader.cpp:
536 (WebCore::SubresourceLoader::create):
537 * page/SecurityOrigin.cpp:
538 (WebCore::SecurityOrigin::canDisplay):
539 (WebCore::SecurityOrigin::deprecatedCanDisplay):
540 * page/SecurityOrigin.h:
541 * plugins/PluginView.cpp:
542 (WebCore::PluginView::load):
544 2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
548 [Qt] Trivial V8 build fix.
550 * WebCore.pri: Add storage, workers and css to the include paths for the
553 2010-09-11 Andreas Kling <andreas.kling@nokia.com>
555 Reviewed by Simon Hausmann.
557 [Qt] V8 port: Fix "WTF::String::utf8" returns incomplete type WTF::CString
558 https://bugs.webkit.org/show_bug.cgi?id=45157
560 Include CString.h where necessary. Chromium builds would get it from
561 KURLGooglePrivate.h so this is only an issue for Qt + V8.
563 * bindings/v8/V8Proxy.cpp:
564 * inspector/InspectorDebuggerAgent.cpp:
565 * inspector/InspectorProfilerAgent.cpp:
566 * plugins/PluginDatabase.cpp:
568 2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
570 Reviewed by Andreas Kling.
572 [Qt] V8 port: webkit project files changes
573 https://bugs.webkit.org/show_bug.cgi?id=45140
575 * WebCore.pro: Removed unecessary common.pri inclusion from earlier patch.
577 2010-09-03 Vlad Burlik <volodimir.burlik@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
579 Reviewed by Andreas Kling.
581 [Qt] V8 port: webcore project files changes
582 https://bugs.webkit.org/show_bug.cgi?id=45141
584 Modify webcore project files to include V8 javascript engine. By default disabled.
590 2010-09-11 Andreas Kling <andreas.kling@nokia.com>
592 Reviewed by Simon Hausmann.
594 Web Inspector: Include CString.h in generated files
596 This is necessary for generated code that uses the CString
597 returned by String::utf8() (from generateBackendDispatcher)
599 Chromium builds already get CString.h from KURLGooglePrivate.h
600 so this issue only occurs when building Qt against V8.
602 * inspector/CodeGeneratorInspector.pm:
604 2010-09-11 Adele Peterson <adele@apple.com>
606 Reviewed by Sam Weinig.
608 Fix for https://bugs.webkit.org/show_bug.cgi?id=45587
609 Move line clamp code to its own function.
611 * rendering/RenderFlexibleBox.cpp:
612 (WebCore::RenderFlexibleBox::layoutVerticalBox):
613 (WebCore::RenderFlexibleBox::applyLineClamp):
614 * rendering/RenderFlexibleBox.h:
616 2010-09-11 Mihai Parparita <mihaip@chromium.org>
618 Reviewed by Adam Barth.
620 URIs in styles created via innerHTML are not resolved against the document's base URI
621 https://bugs.webkit.org/show_bug.cgi?id=45565
623 The dummy document used for fragment parsing created by
624 FragmentParsingContext should use the base URI of the fragment's
625 document. Since (HTML)Document doesn't expose a setter for the base URI
626 (and shouldn't), we allow it to be set by the constructor/create
629 Also remove some obsolete code that references the legacy tree builder
630 from HTMLElement that I happened to notice.
632 Test: fast/innerHTML/innerHTML-uri-resolution.html
635 (WebCore::Document::Document):
637 * html/HTMLDocument.cpp:
638 (WebCore::HTMLDocument::HTMLDocument):
639 * html/HTMLDocument.h:
640 (WebCore::HTMLDocument::create):
641 * html/HTMLElement.cpp:
642 (WebCore::createFragmentFromSource):
643 (WebCore::HTMLElement::setInnerHTML):
644 * html/parser/HTMLTreeBuilder.cpp:
645 (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
647 2010-09-10 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
649 Reviewed by Darin Adler.
651 Add NetworkingContext to avoid layer violations
652 https://bugs.webkit.org/show_bug.cgi?id=42292
654 Activate NetworkingContext:
656 Since the ResourceHandle::create, ResourceHandle::start and
657 ResourceHandle::loadResourceSynchronously API's were modified,
658 having their Frame* parameter substituted by a NetworkingContext*,
659 all implementations of them were also modified.
660 This patch also modifies all functions that were calling the above
663 * loader/FrameLoader.cpp:
664 (WebCore::FrameLoader::loadResourceSynchronously):
665 * loader/FrameLoader.h:
666 * loader/MainResourceLoader.cpp:
667 (WebCore::MainResourceLoader::loadNow):
668 * loader/PingLoader.cpp:
669 (WebCore::PingLoader::PingLoader):
670 * loader/ResourceLoader.cpp:
671 (WebCore::ResourceLoader::load):
672 * loader/appcache/ApplicationCacheGroup.cpp:
673 (WebCore::ApplicationCacheGroup::createResourceHandle):
674 * loader/icon/IconFetcher.cpp:
675 (WebCore::IconFetcher::loadEntry):
676 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
678 * platform/network/ResourceHandle.cpp:
679 (WebCore::ResourceHandle::create):
680 * platform/network/ResourceHandle.h:
681 * platform/network/ResourceHandleInternal.h:
682 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
683 * platform/network/cf/ResourceHandleCFNet.cpp:
684 (WebCore::ResourceHandle::start):
685 (WebCore::ResourceHandle::loadResourceSynchronously):
686 * platform/network/curl/ResourceHandleCurl.cpp:
687 (WebCore::ResourceHandle::start):
688 (WebCore::ResourceHandle::loadResourceSynchronously):
689 * platform/network/mac/ResourceHandleMac.mm:
690 (WebCore::ResourceHandle::start):
691 (WebCore::ResourceHandle::loadResourceSynchronously):
692 * platform/network/qt/QNetworkReplyHandler.cpp:
693 (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
694 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
695 (WebCore::QNetworkReplyHandler::start):
696 * platform/network/qt/ResourceHandleQt.cpp:
697 (WebCore::ResourceHandle::start):
698 (WebCore::ResourceHandle::willLoadFromCache):
699 (WebCore::ResourceHandle::loadResourceSynchronously):
700 * platform/network/soup/ResourceHandleSoup.cpp:
701 * platform/network/win/ResourceHandleWin.cpp:
702 (WebCore::ResourceHandle::start):
704 2010-09-10 Jer Noble <jer.noble@apple.com>
706 No review; build fix only.
708 <CoreGraphics/CGAffineTransform.h> isn't on the build bots either. Wrap
709 all references to m_movieTransform in #if USE(ACCELERATED_COMPOSITING) guards.
711 * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
712 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
713 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::naturalSize):
714 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveAndResetMovieTransform):
715 * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
717 2010-09-10 Jer Noble <jer.noble@apple.com>
719 No review; build fix only.
721 <CoreGraphics/CGFloat.h> does not exist on the build bots. Replace
722 instances of CGFAbs() with abs().
724 * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
725 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::naturalSize):
727 2010-09-10 Dan Bernstein <mitz@apple.com>
729 Reviewed by Darin Adler.
731 <rdar://problem/8414282> Can’t dynamically change first-letter to/from floating
733 Test: fast/dynamic/first-letter-display-change.html
735 * rendering/RenderBlock.cpp:
736 (WebCore::styleForFirstLetter): Factored this helper function out.
737 (WebCore::RenderBlock::updateFirstLetter): Renamed variables so that the
738 “update style” and “create new” branches use the same terminology. In the
739 update case, if the style change requires a new renderer, handle it.
740 * rendering/RenderTextFragment.h:
741 (WebCore::toRenderTextFragment): Added.
743 2010-09-10 Sam Weinig <sam@webkit.org>
745 Reviewed by Darin Adler.
747 Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom.
748 Precursor to <rdar://problem/7660657>
749 https://bugs.webkit.org/show_bug.cgi?id=45522
755 * WebCore.vcproj/WebCore.vcproj:
756 * WebCore.xcodeproj/project.pbxproj:
759 * css/CSSStyleSelector.cpp:
760 (WebCore::CSSStyleSelector::applyProperty):
761 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
762 Remove uses of shouldApplyTextZoom(), it had turned into just a compare to 1.0f.
764 * html/HTMLBodyElement.cpp:
765 (WebCore::adjustForZoom):
766 (WebCore::HTMLBodyElement::setScrollLeft):
767 (WebCore::HTMLBodyElement::setScrollTop):
768 Convert these to use the explicit pageZoomFactor() function, it made no sense for text zoom
772 Remove include of ZoomMode.h
774 * page/FrameView.cpp:
775 (WebCore::parentPageZoomFactor):
776 (WebCore::parentTextZoomFactor):
777 (WebCore::FrameView::FrameView):
778 (WebCore::FrameView::setPageZoomFactor):
779 (WebCore::FrameView::setTextZoomFactor):
780 (WebCore::FrameView::setPageAndTextZoomFactors):
782 (WebCore::FrameView::pageZoomFactor):
783 (WebCore::FrameView::textZoomFactor):
784 Change FrameView to store two values for zoom, one for page zoom and one for text zoom.
787 (WebCore::Settings::Settings):
791 * page/ZoomMode.h: Removed.
793 * rendering/RenderView.cpp:
794 (WebCore::RenderView::zoomFactor):
795 Remove now unnecessary call to shouldApplyPageZoom since it will be 1 if it should
798 * svg/SVGSVGElement.cpp:
799 (WebCore::SVGSVGElement::setCurrentScale):
800 Use explicit setPageZoomFactor function.
802 2010-09-10 Ryuan Choi <ryuan.choi@samsung.com>
804 Unreviewed build fix for EFL.
806 [EFL] REGRESSION(67167) build break because of newly added JSBindingState.cpp
807 https://bugs.webkit.org/show_bug.cgi?id=45537
811 2010-09-10 Darin Adler <darin@apple.com>
813 Reviewed by Sam Weinig.
815 Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
816 https://bugs.webkit.org/show_bug.cgi?id=45582
818 * WebCore.exp.in: Updated.
820 * WebCore.xcodeproj/project.pbxproj: Removed WebDashboardRegion.h/m.
821 * page/mac/WebDashboardRegion.h: Removed.
822 * page/mac/WebDashboardRegion.m: Removed.
824 * page/Frame.h: Removed unneeded #if. Removed dashboardRegionsDictionary function, now
825 handled in WebKit. Removed searchForNSLabelsAboveCell function, which had become dead code.
826 * page/mac/FrameMac.mm: Ditto. Also tweaked a place that said "int unsigned".
828 2010-09-10 Peter Kasting <pkasting@google.com>
830 Reviewed by Darin Adler.
832 Make middle clicks not fire DOM onclick events.
833 https://bugs.webkit.org/show_bug.cgi?id=22382
835 * html/HTMLAnchorElement.cpp: Explicitly include middle-clicks in the
836 computation of what constitutes a link click, since they're no longer
838 (WebCore::isLinkClick):
839 * html/HTMLInputElement.cpp: Removed unneeded checks that click events
840 are coming from the left mouse button, since they all are now.
841 (WebCore::HTMLInputElement::preDispatchEventHandler):
842 (WebCore::HTMLInputElement::postDispatchEventHandler):
843 (WebCore::HTMLInputElement::defaultEventHandler):
844 * page/EventHandler.cpp: Changed logic to send a click event only for
846 (WebCore::EventHandler::handleMouseDoubleClickEvent):
847 (WebCore::EventHandler::handleMouseReleaseEvent):
849 2010-09-10 Adam Barth <abarth@webkit.org>
851 Attempted build fix for Qt Minimal.
854 (WebCore::Element::getBoundingClientRect):
856 2010-09-10 Dan Bernstein <mitz@apple.com>
858 Reviewed by Anders Carlsson.
860 Pseudostyle resolution corrupts cached child index values
861 https://bugs.webkit.org/show_bug.cgi?id=45574
863 Covered by fast/dom/firstline-fixed-crash.html and fast/dom/firstletter-tablecell-crash.html.
865 RenderBlock::updateFirstLetter() calls getCachedPseudoStyle() passing as the parent style the
866 style of the parent of the first letter, which is not always the parent of the element for
867 which we are getting :first-letter style. As a result, style resolution caches childIndex values
868 in the wrong element’s style.
870 * css/CSSStyleSelector.cpp:
871 (WebCore::CSSStyleSelector::pseudoStyleForElement): Create the new style and inherit from
872 the parent style before matching rules, to avoid corrupting the parent style itself.
873 (WebCore::CSSStyleSelector::checkSelector): Always pass the element’s parent style as
874 the parent style here.
875 * rendering/RenderBlock.cpp:
876 (WebCore::RenderBlock::updateFirstLetter): Removed the null check that was added
878 * rendering/RenderBlockLineLayout.cpp:
879 (WebCore::RenderBlock::findNextLineBreak): Removed the null check that was added
882 2010-09-10 Jer Noble <jer.noble@apple.com>
884 Reviewed by Simon Fraser.
886 Movies with track or movie matrices don't display in <video> elements (Safari 5/Windows)
887 https://bugs.webkit.org/show_bug.cgi?id=45333
888 rdar://problem/81333126
890 QuickTime will refuse to decode video frames for movies whose movie and track matrices
891 are non-identity. To work around this problem, extract the movie and track matrices
892 from the movie, and set that matrix on the video layer instead.
894 * WebCore.vcproj/QTMovieWin.vcproj:
895 * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
896 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayoutClient::LayoutClient): Added.
897 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayoutClient::layoutSublayersOfLayer):
898 Layout the video layer according to its superlayer's size.
899 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
900 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::platformLayer):
901 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::naturalSize):
902 Apply the m_movieTransform to the size reported by QTMovie.
903 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveAndResetMovieTransform):
904 Calculate m_movieTransform and reset the movie and track matrices in the movie.
905 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie):
906 Create two nested layers instead of one.
907 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::destroyLayerForMovie):
908 Make sure to remove m_qtVideoLayer from any superlayer before dereferencing it.
909 * platform/graphics/win/QTMovie.cpp:
910 (QTMovie::videoTracks): Added.
911 (QTMovie::getTransform): Added.
912 (QTMovie::setTransform): Added.
913 (QTMovie::resetTransform): Added.
914 * platform/graphics/win/QTMovie.h:
915 * platform/graphics/win/QTTrack.cpp: Added.
916 * platform/graphics/win/QTTrack.h: Added.
917 * platform/graphics/win/WKCACFLayer.cpp:
918 (WebCore::WKCACFLayer::setBounds): Call setNeedsLayout() if a layoutClient is present.
919 (WebCore::WKCACFLayer::setFrame): Call setNeedsLayout() if a layoutClient is present.
921 2010-09-10 Jer Noble <jer.noble@apple.com>
923 No review; build fix only.
925 Touch mediaControlsQuickTime in order to trigger the UserAgentStyleSheet.h to be rebuilt.
927 * css/mediaControlsQuickTime.css:
928 (audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button):
930 2010-09-10 Adam Barth <abarth@webkit.org>
932 Reviewed by Darin Fisher.
934 Move code from WebKit-layer to DocumentLoader
935 https://bugs.webkit.org/show_bug.cgi?id=45569
937 There's a bunch of code that's copy/pasted (poorly) across all the
938 ports that really belongs in WebCore. This patch moves that logic into
939 DocumentLoader. This patch is a step on the path to having
940 DocumentLoader own DocumentWriter.
943 * loader/DocumentLoader.cpp:
944 (WebCore::DocumentLoader::commitData):
945 * loader/DocumentLoader.h:
946 * loader/FrameLoader.cpp:
947 (WebCore::FrameLoader::finishedLoadingDocument):
949 2010-09-10 Cosmin Truta <ctruta@chromium.org>
951 Reviewed by Nikolas Zimmermann.
953 getBoundingClientRect Broken for SVG Elements
954 https://bugs.webkit.org/show_bug.cgi?id=42815
956 Use getBBox to retrieve the bounding rectangle for SVG elements.
958 Test: svg/dom/getBoundingClientRect.xhtml
961 (Element::getBoundingClientRect):
963 2010-09-09 Jer Noble <jer.noble@apple.com>
965 Reviewed by Eric Carlson.
967 Adopt shared control drawing for <video> controls on Windows
968 https://bugs.webkit.org/show_bug.cgi?id=45490
970 * DerivedSources.make: Remove the OS check around mediaControlsQuickTime.css.
971 * rendering/RenderMediaControls.cpp:
972 (WebCore::determineState): Use WKMediaControllerThemeState flags instead of SafariTheme ones.
973 (WebCore::getUnzoomedRectAndAdjustCurrentContext): Added. Copied verbatim from RenderMediaMac.mm.
974 (WebCore::RenderMediaControls::adjustMediaSliderThumbSize): Use wkMeasureMediaUIPart to adjust the thumb size.
975 (WebCore::RenderMediaControls::paintMediaControlsPart): Use wkDrawMediaUIPart instead of paintThemePart.
976 (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Added. Copied verbatim from RenderMediaMac.mm.
977 * rendering/RenderMediaControls.h:
978 * rendering/RenderThemeWin.cpp:
979 (WebCore::RenderThemeWin::adjustSliderThumbSize): Adjust both sliders and volume sliders.
980 (WebCore::RenderThemeWin::extraMediaControlsStyleSheet): Added. Returns the mediaControlsQuickTime sheet.
981 (WebCore::RenderThemeWin::paintMediaRewindButton): Added. Pass through to RenderMediaControls.
982 (WebCore::RenderThemeWin::paintMediaControlsBackground): Added. Pass through to RenderMediaControls.
983 (WebCore::RenderThemeWin::paintMediaVolumeSliderContainer): Added. Pass through to RenderMediaControls.
984 (WebCore::RenderThemeWin::paintMediaVolumeSliderTrack): Added. Pass through to RenderMediaControls.
985 (WebCore::RenderThemeWin::paintMediaVolumeSliderThumb): Added. Pass through to RenderMediaControls.
986 (WebCore::RenderThemeWin::volumeSliderOffsetFromMuteButton): Added. Pass through to RenderMediaControls.
987 * rendering/RenderThemeWin.h:
989 2010-09-10 Peter Kasting <pkasting@google.com>
991 Reviewed by Darin Adler.
993 Cleanup and simplification in advance of making middle clicks not send a
995 https://bugs.webkit.org/show_bug.cgi?id=22382
997 * editing/DeleteButton.cpp:
998 (WebCore::DeleteButton::defaultEventHandler): Removed unneeded code to
999 check if the event is a MouseEvent. Any click event will do.
1000 * html/HTMLAnchorElement.cpp:
1001 (WebCore::appendServerMapMousePosition): Added. Factors out the
1002 modifications to the URL to add the mouse position to make the default
1003 event handler function easier to read.
1004 (WebCore::HTMLAnchorElement::defaultEventHandler): Reorganized to make
1005 the enter key logic separate from the link clicking logic and simplify
1006 the function. This makes minor functional changes like not calling
1007 FrameLoader::urlSelected() for fake "keydown" events constructed from
1009 (WebCore::HTMLAnchorElement::isLiveLink): Refactored to use new shared
1010 implementation in treatLinkAsLiveForEventType().
1011 (WebCore::eventType): Factors out event type calculation (for
1012 treatLinkAsLiveForEventType()) from the default event handler to make it
1014 (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
1015 Implementation of the portions of isLiveLink() that are common with the
1016 checks defaultEventHandler() wants to do.
1017 (WebCore::isEnterKeyKeydownEvent): Added. Shared by the default
1018 event handlers for all three anchor elements.
1019 (WebCore::isMiddleMouseButtonEvent): Added. Shared by the isLinkClick
1020 function below and some code in SVG. Later we can make this private to
1021 this source file once we remove the unneeded SVG code.
1022 (WebCore::isLinkClick): Added. Shared by the default event handlers for
1023 all three anchor elements.
1024 (WebCore::handleLinkClick): Ditto.
1025 * html/HTMLAnchorElement.h: Added the new functions.
1026 * svg/SVGAElement.cpp:
1027 (WebCore::SVGAElement::defaultEventHandler): Removed lots of unneeded
1028 logic and streamlined the code to more closely match the
1029 HTMLAnchorElement code and share functions with it.
1030 * wml/WMLAElement.cpp:
1031 (WebCore::WMLAElement::defaultEventHandler): Ditto.
1033 2010-09-10 Tony Gentilcore <tonyg@chromium.org>
1035 Reviewed by Eric Seidel.
1037 Implement HTML5 definition of script for-event neutering
1038 https://bugs.webkit.org/show_bug.cgi?id=45493
1040 * dom/ScriptElement.cpp:
1041 (WebCore::ScriptElementData::shouldExecuteAsJavaScript): Same behavior, but reads more like the spec. Removed obsolete comments about supporting for-event.
1042 * html/parser/HTMLScriptRunner.cpp:
1043 (WebCore::HTMLScriptRunner::executeScript): Moved to runScript.
1044 (WebCore::HTMLScriptRunner::runScript): Checking shouldExecuteAsJavaScript() here means that external scripts which fail the check will never be requested.
1046 2010-09-10 Nat Duca <nduca@chromium.org>
1048 Reviewed by Darin Fisher.
1050 [chromium] Accelerated Compositing: screen garbage when scrolling
1051 https://bugs.webkit.org/show_bug.cgi?id=45092
1053 Split LayerRenderChromium::drawLayers into several different
1054 functions, responsible for preparing the backbuffer, updating the
1055 root texture, compositing and performing the final
1056 swapbuffers. This are then used by the new
1057 WebViewImpl::composite rendering path.
1059 * platform/graphics/chromium/LayerChromium.cpp:
1060 (WebCore::LayerChromium::setBounds):
1061 (WebCore::LayerChromium::setFrame):
1062 (WebCore::LayerChromium::setNeedsDisplay):
1063 (WebCore::LayerChromium::resetNeedsDisplay):
1064 * platform/graphics/chromium/LayerChromium.h:
1065 (WebCore::LayerChromium::dirtyRect):
1066 * platform/graphics/chromium/LayerRendererChromium.cpp:
1067 (WebCore::LayerRendererChromium::prepareToDrawLayers):
1068 (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
1069 (WebCore::LayerRendererChromium::drawLayers):
1070 (WebCore::LayerRendererChromium::present):
1071 * platform/graphics/chromium/LayerRendererChromium.h:
1073 2010-09-10 David Holloway <dhollowa@chromium.org>
1075 Reviewed by Adam Barth.
1077 Replace WebCore::HTMLFormElement::submissionTrigger with WebCore::HTMLFormElement::submittedByUserGesture.
1078 Chromium AutoFill feature semantics changed with respect to what we mean by "user submitted" form. A
1079 more accurate measure of the user manually submitting a form is via user gesture.
1080 https://bugs.webkit.org/show_bug.cgi?id=45128
1082 No new tests as this is only used by the Chromium WebKit API.
1084 * html/HTMLFormElement.cpp:
1085 (WebCore::HTMLFormElement::HTMLFormElement):
1086 (WebCore::HTMLFormElement::prepareSubmit):
1087 (WebCore::HTMLFormElement::submit):
1088 (WebCore::HTMLFormElement::submittedByUserGesture):
1089 * html/HTMLFormElement.h:
1091 2010-09-10 Adam Barth <abarth@webkit.org>
1093 Reviewed by Eric Seidel.
1095 Remove mention of "part" from Document.cpp
1096 https://bugs.webkit.org/show_bug.cgi?id=45566
1098 This is an old KHTML name that's lingering around.
1101 (WebCore::Document::parentDocument):
1103 2010-09-09 Darin Adler <darin@apple.com>
1105 Reviewed by Adam Barth.
1107 Move functions from Frame to SelectionController as planned
1108 https://bugs.webkit.org/show_bug.cgi?id=45508
1110 Also removed Frame::dragCaretController since it just called Page::dragCaretController.
1112 * editing/SelectionController.cpp:
1113 (WebCore::SelectionController::setSelection):
1114 (WebCore::SelectionController::modify):
1115 (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
1116 (WebCore::SelectionController::selectAll):
1117 (WebCore::SelectionController::focusedOrActiveStateChanged):
1118 (WebCore::SelectionController::notifyRendererOfSelectionChange):
1119 (WebCore::isFrameElement):
1120 (WebCore::SelectionController::setFocusedNodeIfNeeded):
1121 (WebCore::SelectionController::paintDragCaret):
1122 (WebCore::SelectionController::shouldDeleteSelection):
1123 (WebCore::SelectionController::selectionBounds):
1124 (WebCore::SelectionController::selectionTextRects):
1125 (WebCore::scanForForm):
1126 (WebCore::SelectionController::currentForm):
1127 (WebCore::SelectionController::revealSelection):
1128 (WebCore::SelectionController::setSelectionFromNone):
1129 (WebCore::SelectionController::shouldChangeSelection):
1130 * editing/SelectionController.h:
1131 Moved functions here from Frame.
1135 Moved functions to SelectionController.
1136 Reorganized header to be easier to read and a bit more logical.
1138 * WebCore.exp.in: Updated.
1141 (WebCore::Document::nodeChildrenWillBeRemoved):
1142 (WebCore::Document::nodeWillBeRemoved):
1143 Call Page::dragCaretController directly.
1146 (WebCore::Element::updateFocusAppearance):
1147 * dom/InputElement.cpp:
1148 (WebCore::InputElement::updateFocusAppearance):
1149 * editing/ApplyStyleCommand.cpp:
1150 (WebCore::ApplyStyleCommand::editingStyleAtPosition):
1151 * editing/DeleteSelectionCommand.cpp:
1152 (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1153 * editing/Editor.cpp:
1154 (WebCore::Editor::canSmartCopyOrDelete):
1155 (WebCore::Editor::textDirectionForSelection):
1156 (WebCore::Editor::appliedEditing):
1157 (WebCore::Editor::insertTextWithoutSendingTextEvent):
1158 (WebCore::Editor::advanceToNextMisspelling):
1159 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1160 (WebCore::Editor::revealSelectionAfterEditingOperation):
1161 (WebCore::Editor::transpose):
1162 (WebCore::Editor::changeSelectionAfterCommand):
1163 (WebCore::Editor::computeAndSetTypingStyle):
1164 (WebCore::Editor::selectionComputedStyle):
1165 (WebCore::Editor::styleForSelectionStart):
1166 (WebCore::Editor::findString):
1167 * editing/EditorCommand.cpp:
1168 (WebCore::executeDelete):
1169 * editing/InsertLineBreakCommand.cpp:
1170 (WebCore::InsertLineBreakCommand::doApply):
1171 * editing/InsertTextCommand.cpp:
1172 (WebCore::InsertTextCommand::input):
1173 * editing/RemoveFormatCommand.cpp:
1174 (WebCore::RemoveFormatCommand::doApply):
1175 * editing/ReplaceSelectionCommand.cpp:
1176 (WebCore::ReplaceSelectionCommand::doApply):
1177 * editing/TypingCommand.cpp:
1178 (WebCore::TypingCommand::insertTextRunWithoutNewlines):
1179 (WebCore::TypingCommand::deleteKeyPressed):
1180 (WebCore::TypingCommand::forwardDeleteKeyPressed):
1181 * html/HTMLTextAreaElement.cpp:
1182 (WebCore::HTMLTextAreaElement::updateFocusAppearance):
1183 * page/ContextMenuController.cpp:
1184 (WebCore::ContextMenuController::contextMenuItemSelected):
1185 * page/DragController.cpp:
1186 (WebCore::DragController::concludeEditDrag):
1187 (WebCore::dragLocForSelectionDrag):
1188 * page/EventHandler.cpp:
1189 (WebCore::EventHandler::selectClosestWordFromMouseEvent):
1190 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1191 (WebCore::EventHandler::handleMousePressEventTripleClick):
1192 (WebCore::EventHandler::handleMousePressEventSingleClick):
1193 (WebCore::EventHandler::updateSelectionForMouseDrag):
1194 (WebCore::EventHandler::handleMouseReleaseEvent):
1195 * page/FocusController.cpp:
1196 (WebCore::FocusController::advanceFocusInDocumentOrder):
1197 * page/chromium/EventHandlerChromium.cpp:
1198 (WebCore::EventHandler::passMousePressEventToSubframe):
1199 * page/chromium/FrameChromium.cpp:
1200 (WebCore::Frame::dragImageForSelection):
1201 * page/mac/FrameMac.mm:
1202 (WebCore::Frame::selectionImage):
1203 * platform/mac/ClipboardMac.mm:
1204 (WebCore::ClipboardMac::writeRange):
1205 * rendering/RenderBlock.cpp:
1206 (WebCore::RenderBlock::paintCaret):
1207 Call functions on selection().
1209 2010-09-10 Justin Schuh <jschuh@chromium.org>
1211 Reviewed by Darin Adler.
1213 SVGGElement::rendererIsNeeded should return false when parent isn't SVG
1214 https://bugs.webkit.org/show_bug.cgi?id=45562
1216 Test: svg/custom/g-outside-svg.html
1218 * svg/SVGGElement.cpp:
1219 (WebCore::SVGGElement::rendererIsNeeded):
1220 * svg/SVGGElement.h:
1222 2010-09-10 Adam Barth <abarth@webkit.org>
1224 Reviewed by Darin Adler.
1226 REGRESSION (HTML Parser): CNN's Money site is not formatted correctly with AdBlock installed
1227 https://bugs.webkit.org/show_bug.cgi?id=41371
1229 Drop support for closing comments with "-- >". This was an attempt to
1230 be more IE-like in comment parsing, but it turns out to cause problems
1231 for some high-profile sites. Firefox 4 is dropping support as well.
1232 We expect the spec to change soon too.
1234 * html/parser/HTMLTokenizer.cpp:
1235 (WebCore::HTMLTokenizer::nextToken):
1236 * html/parser/HTMLTokenizer.h:
1238 2010-09-10 Chris Marrin <cmarrin@apple.com>
1242 Adding file that should have been in http://trac.webkit.org/changeset/67226 but
1243 I forgot to svn add.
1245 * platform/graphics/opengl: Added.
1246 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Copied from platform/graphics/mac/GraphicsContext3DMac.mm.
1248 2010-09-10 Paul Sawaya <psawaya@apple.com>
1250 Reviewed by Chris Marrin.
1252 Refactored non-Mac specific code into GraphicsContext3DOpenGL.
1254 Moving this file into platform/graphics/opengl and only building on Mac for now.
1256 https://bugs.webkit.org/show_bug.cgi?id=30625
1258 * WebCore.xcodeproj/project.pbxproj:
1259 * platform/graphics/mac/GraphicsContext3DMac.mm:
1260 (WebCore::GraphicsContext3D::makeContextCurrent):
1261 (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses):
1262 * platform/graphics/opengl: Added.
1263 * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Copied from platform/graphics/mac/GraphicsContext3DMac.mm.
1264 (WebCore::GraphicsContext3D::prepareTexture):
1265 (WebCore::GraphicsContext3D::activeTexture):
1266 (WebCore::GraphicsContext3D::attachShader):
1267 (WebCore::GraphicsContext3D::bindAttribLocation):
1268 (WebCore::GraphicsContext3D::bindBuffer):
1269 (WebCore::GraphicsContext3D::bindFramebuffer):
1270 (WebCore::GraphicsContext3D::bindRenderbuffer):
1271 (WebCore::GraphicsContext3D::bindTexture):
1272 (WebCore::GraphicsContext3D::blendColor):
1273 (WebCore::GraphicsContext3D::blendEquation):
1274 (WebCore::GraphicsContext3D::blendEquationSeparate):
1275 (WebCore::GraphicsContext3D::blendFunc):
1276 (WebCore::GraphicsContext3D::blendFuncSeparate):
1277 (WebCore::GraphicsContext3D::bufferData):
1278 (WebCore::GraphicsContext3D::bufferSubData):
1279 (WebCore::GraphicsContext3D::checkFramebufferStatus):
1280 (WebCore::GraphicsContext3D::clearColor):
1281 (WebCore::GraphicsContext3D::clear):
1282 (WebCore::GraphicsContext3D::clearDepth):
1283 (WebCore::GraphicsContext3D::clearStencil):
1284 (WebCore::GraphicsContext3D::colorMask):
1285 (WebCore::GraphicsContext3D::compileShader):
1286 (WebCore::GraphicsContext3D::copyTexImage2D):
1287 (WebCore::GraphicsContext3D::copyTexSubImage2D):
1288 (WebCore::GraphicsContext3D::cullFace):
1289 (WebCore::GraphicsContext3D::depthFunc):
1290 (WebCore::GraphicsContext3D::depthMask):
1291 (WebCore::GraphicsContext3D::depthRange):
1292 (WebCore::GraphicsContext3D::detachShader):
1293 (WebCore::GraphicsContext3D::disable):
1294 (WebCore::GraphicsContext3D::disableVertexAttribArray):
1295 (WebCore::GraphicsContext3D::drawArrays):
1296 (WebCore::GraphicsContext3D::drawElements):
1297 (WebCore::GraphicsContext3D::enable):
1298 (WebCore::GraphicsContext3D::enableVertexAttribArray):
1299 (WebCore::GraphicsContext3D::finish):
1300 (WebCore::GraphicsContext3D::flush):
1301 (WebCore::GraphicsContext3D::framebufferRenderbuffer):
1302 (WebCore::GraphicsContext3D::framebufferTexture2D):
1303 (WebCore::GraphicsContext3D::frontFace):
1304 (WebCore::GraphicsContext3D::generateMipmap):
1305 (WebCore::GraphicsContext3D::getActiveAttrib):
1306 (WebCore::GraphicsContext3D::getActiveUniform):
1307 (WebCore::GraphicsContext3D::getAttachedShaders):
1308 (WebCore::GraphicsContext3D::getAttribLocation):
1309 (WebCore::GraphicsContext3D::getError):
1310 (WebCore::GraphicsContext3D::getString):
1311 (WebCore::GraphicsContext3D::hint):
1312 (WebCore::GraphicsContext3D::isBuffer):
1313 (WebCore::GraphicsContext3D::isEnabled):
1314 (WebCore::GraphicsContext3D::isFramebuffer):
1315 (WebCore::GraphicsContext3D::isProgram):
1316 (WebCore::GraphicsContext3D::isRenderbuffer):
1317 (WebCore::GraphicsContext3D::isShader):
1318 (WebCore::GraphicsContext3D::isTexture):
1319 (WebCore::GraphicsContext3D::lineWidth):
1320 (WebCore::GraphicsContext3D::linkProgram):
1321 (WebCore::GraphicsContext3D::pixelStorei):
1322 (WebCore::GraphicsContext3D::polygonOffset):
1323 (WebCore::GraphicsContext3D::readPixels):
1324 (WebCore::GraphicsContext3D::releaseShaderCompiler):
1325 (WebCore::GraphicsContext3D::renderbufferStorage):
1326 (WebCore::GraphicsContext3D::sampleCoverage):
1327 (WebCore::GraphicsContext3D::scissor):
1328 (WebCore::GraphicsContext3D::shaderSource):
1329 (WebCore::GraphicsContext3D::stencilFunc):
1330 (WebCore::GraphicsContext3D::stencilFuncSeparate):
1331 (WebCore::GraphicsContext3D::stencilMask):
1332 (WebCore::GraphicsContext3D::stencilMaskSeparate):
1333 (WebCore::GraphicsContext3D::stencilOp):
1334 (WebCore::GraphicsContext3D::stencilOpSeparate):
1335 (WebCore::GraphicsContext3D::texParameterf):
1336 (WebCore::GraphicsContext3D::texParameteri):
1337 (WebCore::GraphicsContext3D::uniform1f):
1338 (WebCore::GraphicsContext3D::uniform1fv):
1339 (WebCore::GraphicsContext3D::uniform2f):
1340 (WebCore::GraphicsContext3D::uniform2fv):
1341 (WebCore::GraphicsContext3D::uniform3f):
1342 (WebCore::GraphicsContext3D::uniform3fv):
1343 (WebCore::GraphicsContext3D::uniform4f):
1344 (WebCore::GraphicsContext3D::uniform4fv):
1345 (WebCore::GraphicsContext3D::uniform1i):
1346 (WebCore::GraphicsContext3D::uniform1iv):
1347 (WebCore::GraphicsContext3D::uniform2i):
1348 (WebCore::GraphicsContext3D::uniform2iv):
1349 (WebCore::GraphicsContext3D::uniform3i):
1350 (WebCore::GraphicsContext3D::uniform3iv):
1351 (WebCore::GraphicsContext3D::uniform4i):
1352 (WebCore::GraphicsContext3D::uniform4iv):
1353 (WebCore::GraphicsContext3D::uniformMatrix2fv):
1354 (WebCore::GraphicsContext3D::uniformMatrix3fv):
1355 (WebCore::GraphicsContext3D::uniformMatrix4fv):
1356 (WebCore::GraphicsContext3D::useProgram):
1357 (WebCore::GraphicsContext3D::validateProgram):
1358 (WebCore::GraphicsContext3D::vertexAttrib1f):
1359 (WebCore::GraphicsContext3D::vertexAttrib1fv):
1360 (WebCore::GraphicsContext3D::vertexAttrib2f):
1361 (WebCore::GraphicsContext3D::vertexAttrib2fv):
1362 (WebCore::GraphicsContext3D::vertexAttrib3f):
1363 (WebCore::GraphicsContext3D::vertexAttrib3fv):
1364 (WebCore::GraphicsContext3D::vertexAttrib4f):
1365 (WebCore::GraphicsContext3D::vertexAttrib4fv):
1366 (WebCore::GraphicsContext3D::vertexAttribPointer):
1367 (WebCore::GraphicsContext3D::viewport):
1368 (WebCore::GraphicsContext3D::getBooleanv):
1369 (WebCore::GraphicsContext3D::getBufferParameteriv):
1370 (WebCore::GraphicsContext3D::getFloatv):
1371 (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
1372 (WebCore::GraphicsContext3D::getIntegerv):
1373 (WebCore::GraphicsContext3D::getProgramiv):
1374 (WebCore::GraphicsContext3D::getProgramInfoLog):
1375 (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
1376 (WebCore::GraphicsContext3D::getShaderiv):
1377 (WebCore::GraphicsContext3D::getShaderInfoLog):
1378 (WebCore::GraphicsContext3D::getShaderSource):
1379 (WebCore::GraphicsContext3D::getTexParameterfv):
1380 (WebCore::GraphicsContext3D::getTexParameteriv):
1381 (WebCore::GraphicsContext3D::getUniformfv):
1382 (WebCore::GraphicsContext3D::getUniformiv):
1383 (WebCore::GraphicsContext3D::getUniformLocation):
1384 (WebCore::GraphicsContext3D::getVertexAttribfv):
1385 (WebCore::GraphicsContext3D::getVertexAttribiv):
1386 (WebCore::GraphicsContext3D::getVertexAttribOffset):
1387 (WebCore::GraphicsContext3D::texImage2D):
1388 (WebCore::GraphicsContext3D::texSubImage2D):
1389 (WebCore::GraphicsContext3D::createBuffer):
1390 (WebCore::GraphicsContext3D::createFramebuffer):
1391 (WebCore::GraphicsContext3D::createProgram):
1392 (WebCore::GraphicsContext3D::createRenderbuffer):
1393 (WebCore::GraphicsContext3D::createShader):
1394 (WebCore::GraphicsContext3D::createTexture):
1395 (WebCore::GraphicsContext3D::deleteBuffer):
1396 (WebCore::GraphicsContext3D::deleteFramebuffer):
1397 (WebCore::GraphicsContext3D::deleteProgram):
1398 (WebCore::GraphicsContext3D::deleteRenderbuffer):
1399 (WebCore::GraphicsContext3D::deleteShader):
1400 (WebCore::GraphicsContext3D::deleteTexture):
1402 2010-09-10 Oliver Hunt <oliver@apple.com>
1406 * bindings/js/SerializedScriptValue.cpp:
1407 (WebCore::CloneDeserializer::deserialize):
1409 2010-09-10 Adam Barth <abarth@webkit.org>
1411 Reviewed by Darin Adler.
1413 Remove useless FrameLoader method
1414 https://bugs.webkit.org/show_bug.cgi?id=45492
1416 This method has one caller, and that caller already has a more direct
1417 way of accessing the correct DocumentLoader.
1419 * loader/FrameLoader.cpp:
1420 * loader/FrameLoader.h:
1421 * loader/MainResourceLoader.cpp:
1422 (WebCore::MainResourceLoader::addData):
1424 2010-09-10 Adam Barth <abarth@webkit.org>
1426 Reviewed by Eric Seidel.
1428 Main resource bytes shouldn't bounce through FrameLoader
1429 https://bugs.webkit.org/show_bug.cgi?id=45496
1431 After the MainResourceLoader hands the bytes for the main resource to
1432 the DocumentLoader, the DocumentLoader hands the bytes to the
1433 FrameLoaderClient. The FrameLoaderClient, in turn, returns the bytes
1434 to WebCore. Prior to this patch, the FrameLoaderClient returned the
1435 bytes to the FrameLoader. However, the FrameLoader was actually adding
1438 In this patch, we change the FrameLoaderClient to return the bytes to
1439 the DocumentLoader directly. In a future patch, we'll cut out the
1440 FrameLoaderClient middleman and handle the bytes internally in the
1444 * loader/DocumentLoader.cpp:
1445 (WebCore::DocumentLoader::addData):
1446 * loader/DocumentLoader.h:
1447 * loader/FrameLoader.cpp:
1448 (WebCore::FrameLoader::finishedLoadingDocument):
1449 * loader/FrameLoader.h:
1451 2010-09-10 Oliver Hunt <oliver@apple.com>
1453 Reviewed by Darin Adler.
1455 Speed up deserialisation of strings
1456 https://bugs.webkit.org/show_bug.cgi?id=45555
1458 Rather than building a list of Identifiers for the string pool
1459 we now build a list of a tuple of UString and JSString*. This
1460 doesn't hurt the property name case as ustring->identifier conversion
1461 is essentially free if the ustring has already been converted to
1462 an Identifier, but saves an unnecessary Identifier creation for
1463 strings we only ever use to create JSStrings. We also reduce
1464 GC pressure for duplicate strings by caching the JSStrings.
1466 * bindings/js/SerializedScriptValue.cpp:
1467 (WebCore::CloneDeserializer::CachedString::CachedString):
1468 (WebCore::CloneDeserializer::CachedString::jsString):
1469 (WebCore::CloneDeserializer::CachedString::ustring):
1470 (WebCore::CloneDeserializer::readStringData):
1471 (WebCore::CloneDeserializer::putProperty):
1472 (WebCore::CloneDeserializer::readFile):
1473 (WebCore::CloneDeserializer::readTerminal):
1474 (WebCore::CloneDeserializer::deserialize):
1476 2010-09-10 Ryosuke Niwa <rniwa@webkit.org>
1478 Reviewed by Antonio Gomes.
1480 REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
1481 https://bugs.webkit.org/show_bug.cgi?id=45525
1483 The crash was caused by ancestorToRetainStructureAndAppearance not taking into consideration
1484 the case where there is no common block ancestor. Fixed this by adding a null check.
1486 Test: editing/pasteboard/copy-without-common-block-crash.html
1488 * editing/markup.cpp:
1489 (WebCore::ancestorToRetainStructureAndAppearance): Added a null check.
1491 2010-09-09 Kinuko Yasuda <kinuko@chromium.org>
1493 Reviewed by Dumitru Daniliuc.
1495 [FileSystem] Do not call EntriesCallback more than once if there're no entries.
1496 https://bugs.webkit.org/show_bug.cgi?id=45498
1498 No new tests, layout-tests that confirm the behavior will be added in later patches.
1500 * fileapi/FileSystemCallbacks.cpp:
1501 (WebCore::EntriesCallbacks::EntriesCallbacks):
1502 (WebCore::EntriesCallbacks::didReadDirectoryEntry):
1503 (WebCore::EntriesCallbacks::didReadDirectoryEntries):
1505 2010-09-10 Patrick Gansterer <paroga@paroga.com>
1507 Reviewed by Darin Adler.
1509 Use String::fromUTF8 instead of UTF8Encoding().decode
1510 in the libxml XMLDocumentParser
1511 https://bugs.webkit.org/show_bug.cgi?id=45488
1513 * dom/XMLDocumentParserLibxml2.cpp:
1514 (WebCore::toString):
1516 2010-09-10 Chris Fleizach <cfleizach@apple.com>
1518 Reviewed by David Kilzer.
1520 AX: accessibility not returning strings when visibility is hidden
1521 https://bugs.webkit.org/show_bug.cgi?id=45116
1523 AX code uses plainText() in TextIterator to get the text for a node.
1524 However, when that node is not visible, no text is returned because TextIterator ignores
1525 clipped nodes and other hidden elements.
1527 Solution is to add a new text iterator behavior for ignoring style visiblity. This allows
1528 for text to allows be returned for accessibility purposes.
1530 Test: platform/mac/accessibility/clipped-text-under-element.html
1533 * accessibility/AccessibilityRenderObject.cpp:
1534 (WebCore::AccessibilityRenderObject::textUnderElement):
1535 (WebCore::AccessibilityRenderObject::stringValue):
1536 Use the new flag for plainText
1537 * editing/TextIterator.cpp:
1538 (WebCore::TextIterator::TextIterator):
1539 (WebCore::TextIterator::handleTextNode):
1540 (WebCore::TextIterator::handleTextBox):
1541 (WebCore::TextIterator::handleTextNodeFirstLetter):
1542 (WebCore::TextIterator::handleReplacedElement):
1543 Use the new flag to NOT skip hidden elements.
1544 (WebCore::plainTextToMallocAllocatedBuffer):
1545 (WebCore::plainText):
1546 * editing/TextIterator.h:
1547 Add the new text iterator behavior.
1549 2010-09-10 Chris Fleizach <cfleizach@apple.com>
1551 Reviewed by David Kilzer.
1553 Mail crashes with searching for next misspelled word with VoiceOver
1554 https://bugs.webkit.org/show_bug.cgi?id=45501
1556 Test: platform/mac/accessibility/crash-in-element-for-text-marker.html
1558 * accessibility/mac/AccessibilityObjectWrapper.mm:
1559 (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1560 Check that the AX object is not nil before asking for the wrapper().
1562 2010-09-10 Michael Nordman <michaeln@google.com>
1564 Reviewed by Dumitru Daniliuc.
1566 Decouple Blob from ScriptExecutionContext.
1567 https://bugs.webkit.org/show_bug.cgi?id=45410
1569 - Removed ScriptExecutionContext pointers from Blob and File constructors.
1570 - Removed ScriptExecutionContext's collection of Blobs instance in that context.
1571 - Refactored BlobURL to make a distinction between 'public' blob urls and 'internal'
1572 urls that are used solely as identifiers. The former requires a SecurityOrigin to
1573 to manufacture, the latter does not.
1574 - Added a constant and accessor for the blob protocol scheme on the BlobURL class.
1576 No new tests are added since this is a cleanup.
1578 * bindings/js/SerializedScriptValue.cpp:
1579 (WebCore::CloneDeserializer::readFile):
1580 (WebCore::CloneDeserializer::readTerminal):
1581 * bindings/v8/SerializedScriptValue.cpp:
1582 (WebCore::ZigZag::Reader::readBlob):
1583 (WebCore::ZigZag::Reader::readFile):
1584 (WebCore::ZigZag::Reader::readFileList):
1585 * dom/ScriptExecutionContext.cpp:
1586 (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
1587 (WebCore::ScriptExecutionContext::createPublicBlobURL):
1588 (WebCore::ScriptExecutionContext::revokePublicBlobURL):
1589 * dom/ScriptExecutionContext.h:
1591 (WebCore::Blob::Blob):
1592 (WebCore::Blob::~Blob):
1593 (WebCore::Blob::slice):
1595 (WebCore::Blob::create):
1596 (WebCore::Blob::url):
1598 * fileapi/BlobBuilder.cpp:
1599 (WebCore::BlobBuilder::getBlob):
1600 * fileapi/BlobBuilder.h:
1601 * fileapi/BlobBuilder.idl:
1602 * fileapi/BlobURL.cpp:
1603 (WebCore::BlobURL::createPublicURL):
1604 (WebCore::BlobURL::createInternalURL):
1605 (WebCore::BlobURL::getOrigin):
1606 (WebCore::BlobURL::getIdentifier):
1607 (WebCore::BlobURL::createBlobURL):
1608 * fileapi/BlobURL.h:
1609 (WebCore::BlobURL::blobProtocol):
1610 (WebCore::BlobURL::BlobURL):
1612 (WebCore::File::File):
1614 (WebCore::File::create):
1615 * fileapi/FileReader.cpp: Register a public url to perform the read.
1616 (WebCore::FileReader::cleanup):
1617 (WebCore::FileReader::start):
1618 (WebCore::FileReader::didFinishLoading):
1619 (WebCore::FileReader::failed):
1620 * fileapi/FileReader.h: Added m_urlForReading data member.
1621 * fileapi/FileReaderSync.cpp:
1622 (WebCore::FileReaderSync::read): Register a public url to perform the read.
1623 * fileapi/ThreadableBlobRegistry.cpp:
1624 (WebCore::ThreadableBlobRegistry::registerBlobURL):
1625 (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
1626 * fileapi/ThreadableBlobRegistry.h:
1627 * html/HTMLInputElement.cpp:
1628 (WebCore::HTMLInputElement::appendFormData):
1629 (WebCore::HTMLInputElement::setFileListFromRenderer):
1630 * page/SecurityOrigin.cpp: Use BlobURL.blobProtocol().
1631 (WebCore::SecurityOrigin::create):
1632 (WebCore::SecurityOrigin::canRequest):
1633 (WebCore::SecurityOrigin::canDisplay):
1634 * platform/chromium/ClipboardChromium.cpp:
1635 (WebCore::ClipboardChromium::files):
1636 * platform/gtk/ClipboardGtk.cpp:
1637 (WebCore::ClipboardGtk::files):
1638 * platform/mac/ClipboardMac.mm:
1639 (WebCore::ClipboardMac::files):
1640 * platform/win/ClipboardWin.cpp:
1641 (WebCore::ClipboardWin::files):
1643 2010-09-10 Xan Lopez <xlopez@igalia.com>
1645 Reviewed by Martin Robinson.
1647 GDK_DISPLAY was removed in GTK+ 3.x, re-declare it when built
1650 * platform/gtk/GtkVersioning.h:
1652 2010-09-10 Xan Lopez <xlopez@igalia.com>
1654 Reviewed by Martin Robinson.
1656 Fix compilation with GTK+ 3.x.
1658 GDK key macros were renamed from GDK_FOO to GDK_KEY_FOO, we need
1659 to include the compat header provided if we want to keep using the
1662 * platform/gtk/GtkVersioning.h: add the compatibility header.
1663 * platform/gtk/KeyEventGtk.cpp: include GtkVersioning.h
1665 2010-09-09 Tony Gentilcore <tonyg@chromium.org>
1667 Reviewed by Eric Seidel.
1669 Factor out the NestingLevelIncrementer
1670 https://bugs.webkit.org/show_bug.cgi?id=45471
1672 No new tests because no new functionality.
1676 * WebCore.vcproj/WebCore.vcproj:
1677 * WebCore.xcodeproj/project.pbxproj:
1678 * html/parser/HTMLDocumentParser.cpp:
1679 * html/parser/HTMLDocumentParser.h:
1680 * html/parser/HTMLScriptRunner.cpp:
1681 * html/parser/NestingLevelIncrementer.h: Added.
1682 (WebCore::NestingLevelIncrementer::NestingLevelIncrementer):
1683 (WebCore::NestingLevelIncrementer::~NestingLevelIncrementer):
1685 2010-09-10 Nikolas Zimmermann <nzimmermann@rim.com>
1687 Reviewed by Dirk Schulze.
1689 SVG text chunk concept needs to be integrated in the InlineBox structure
1690 https://bugs.webkit.org/show_bug.cgi?id=45533
1692 Begin rewriting the SVG text layout code. As first step move the text chunk concept right into the inline box structure.
1693 This obsoletes the whole text chunk part concept (see SVGTextChunkLayoutInfo.h for details), and will soon simplify the
1694 whole layout code a lot. Previously we hacked around the fact that a single InlineTextBox could contain multiple text chunks
1695 For example: <text x="20 30 40">ABC</text> only led to the creation of one InlineTextBox containing three chunks. When
1696 painting such an InlineTextBox, we had to do nasty hacks (same for text selection etc.)
1698 This is finally fixed by incorporating the knownledge about text chunks into the line layout algorithm.
1699 Note, this has no impact on HTML at all, no worries.
1701 It's even required to do it this way as BiDi reordering shouldn't happen across text chunks.
1702 These are only the first bits, and currently slows down text layouting. Follow-up patches will remove the old layout
1703 algorithm, and will rely on the stored SVGTextLayoutAttributes in the RenerSVGInlineText renderers (instead of computing again).
1705 * Android.mk: Add rendering/svg/SVGTextLayoutAttributes.* & rendering/svg/SVGTextLayoutBuilder.* to build.
1706 * CMakeLists.txt: Ditto.
1707 * GNUmakefile.am: Ditto.
1708 * WebCore.gyp/WebCore.gyp: Ditto.
1709 * WebCore.gypi: Ditto.
1710 * WebCore.pro: Ditto.
1711 * WebCore.vcproj/WebCore.vcproj: Ditto.
1712 * WebCore.vcproj/WebCoreCommon.vsprops: Ditto. (Recognize new rendering/svg directory.)
1713 * WebCore.vcproj/copyForwardingHeaders.cmd: Ditto. (Copy forwarding headers from rendering/svg directory.)
1714 * WebCore.xcodeproj/project.pbxproj: Ditto.
1715 * rendering/RenderBlockLineLayout.cpp: This is the key of the new concept, take text chunks into account when building the InlineBox structure.
1716 (WebCore::RenderBlock::findNextLineBreak): Split midpointState, if we encounter the beginning of a new text chunk.
1717 * rendering/RenderObject.h:
1718 (WebCore::RenderObject::isSVGInline): New method, which will be used to identify RenderSVGInline objects.
1719 * rendering/RenderSVGInline.h:
1720 (WebCore::RenderSVGInline::isSVGInline): Return true.
1721 * rendering/RenderSVGInlineText.cpp:
1722 (WebCore::RenderSVGInlineText::linesBoundingBox): Overriden, to simplify the calculations for SVG.
1723 (WebCore::RenderSVGInlineText::characterStartsNewTextChunk): Determines wheter the given position starts a new text chunk.
1724 * rendering/RenderSVGInlineText.h:
1725 (WebCore::RenderSVGInlineText::storeLayoutAttributes): Stores the layout attributes calculated in the text layout process (will be used everywhere in follow-up patches).
1726 * rendering/RenderSVGText.cpp:
1727 (WebCore::RenderSVGText::layout): Invoke SVGTextLayoutBuilder before creating the inline box tree, so we can decide which characters start new text chunks.
1728 * rendering/RenderText.h: Made linesBoundingBox() virtual so RenderSVGInlineText can override it.
1729 * rendering/svg: Added.
1730 * rendering/svg/SVGTextLayoutAttributes.cpp: Added. Holds x/y/dx/dy/rotate values and all kerning/ligature information used during layout.
1731 * rendering/svg/SVGTextLayoutAttributes.h: Added.
1732 * rendering/svg/SVGTextLayoutBuilder.cpp: Added.
1733 * rendering/svg/SVGTextLayoutBuilder.h: Added.
1735 2010-09-10 Csaba Osztrogonác <ossy@webkit.org>
1737 Unreviewed fix after r67085.
1739 * WebCore.pro: Fix previously moved filenames.
1741 2010-09-10 Adam Barth <abarth@webkit.org>
1743 Reviewed by Eric Seidel.
1745 Inline FrameLoader::committedLoad into its one caller
1746 https://bugs.webkit.org/show_bug.cgi?id=45481
1748 This saves one round-trip through the FrameLoader when loading
1751 * loader/DocumentLoader.cpp:
1752 (WebCore::DocumentLoader::commitLoad):
1753 * loader/FrameLoader.cpp:
1754 * loader/FrameLoader.h:
1756 2010-09-10 Patrick Gansterer <paroga@paroga.com>
1758 Reviewed by Adam Roben.
1760 [WINCE] Remove ImageBuffer::toDataURL implementation
1761 https://bugs.webkit.org/show_bug.cgi?id=45478
1763 At the moment ImageBuffer::toDataURL uses JPEGEncoder.h and PNGEncoder.h.
1764 Both files are not in the repository. So remove the implementation for now.
1766 * platform/graphics/wince/ImageBufferWince.cpp:
1767 (WebCore::ImageBuffer::toDataURL):
1769 2010-09-10 Andreas Kling <andreas.kling@nokia.com>
1771 Reviewed by Antonio Gomes.
1773 WebGL: Fix GCC warnings about suggested parentheses around && within ||
1774 https://bugs.webkit.org/show_bug.cgi?id=45534
1776 * html/canvas/WebGLRenderingContext.cpp:
1777 (WebCore::WebGLRenderingContext::getVertexAttrib):
1778 (WebCore::WebGLRenderingContext::readPixels):
1779 (WebCore::WebGLRenderingContext::texParameter):
1780 (WebCore::WebGLRenderingContext::handleNPOTTextures):
1782 2010-09-09 Alexander Pavlov <apavlov@chromium.org>
1784 Reviewed by Yury Semikhatsky.
1786 Web Inspector: Add navigation items into the Elements panel context menu.
1788 For all anchors that have the class of "webkit-html-resource-link" or "webkit-html-external-link",
1789 a custom context menu with the items "Open Link in New Window" (invokes InspectorBackend.openInInspectedWindow() with
1790 the related URL) and "Open Link in Resources Panel" (opens the related resource in the Resources panel) is shown
1791 (the latter item is displayed only if the corresponding resource is known to the Web Inspector).
1792 https://bugs.webkit.org/show_bug.cgi?id=34250
1794 * English.lproj/localizedStrings.js:
1795 * inspector/front-end/ElementsPanel.js:
1796 (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
1797 * inspector/front-end/ElementsTreeOutline.js:
1798 (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
1799 (WebInspector.ElementsTreeElement.prototype._attributeHTML):
1800 * inspector/front-end/StylesSidebarPane.js:
1801 (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
1802 * inspector/front-end/inspector.js:
1803 (WebInspector.openResource):
1804 (WebInspector.resourceURLForRelatedNode):
1806 2010-09-10 Kwang Yul Seo <skyul@company100.net>
1808 Reviewed by James Robinson.
1810 Make sure skia is not Chromium specific
1811 https://bugs.webkit.org/show_bug.cgi?id=39672
1813 Move Image::loadPlatformResource to platform/graphics/chromium/ImageChromium.cpp.
1814 Other ports can use ImageSkia.cpp.
1816 No new tests because this is pure refacotring.
1818 * WebCore.gyp/WebCore.gyp:
1820 * platform/graphics/chromium/ImageChromium.cpp: Added.
1821 (WebCore::Image::loadPlatformResource):
1822 * platform/graphics/skia/ImageSkia.cpp:
1824 2010-09-09 Ilya Tikhonovsky <loislo@chromium.org>
1826 Reviewed by Joseph Pecoraro.
1828 WebInspector: Selecting 'inspect element' always shows body in inspector instead of clicked element.
1831 2. Right-click on any element, select "Inspect Element"
1832 3. Web Inspector is opened but the <body> element (for HTML) is focused rather than the selected element
1833 4. Inspect the Web Inspector. An error message is logged in the console.
1835 The regression was introduced in http://trac.webkit.org/changeset/66012 - focusNode() is invoked in
1836 InspectorController::populateScriptObjects() before the main document is set for the InspectorDOMAgent
1837 instance (which makes focusNode() bail out prematurely).
1839 https://bugs.webkit.org/show_bug.cgi?id=45374
1841 * inspector/InspectorController.cpp:
1842 (WebCore::InspectorController::populateScriptObjects):
1844 2010-09-10 Cris Neckar <cdn@chromium.org>
1846 Reviewed by Chris Fleizach.
1848 Null deref in RenderBlock::updateFirstLetter(). Check for null psuedo style.
1849 https://bugs.webkit.org/show_bug.cgi?id=45404
1851 Test: fast/dom/firstletter-tablecell-crash.html
1853 * rendering/RenderBlock.cpp:
1854 (WebCore::RenderBlock::updateFirstLetter):
1856 2010-09-10 Cris Neckar <cdn@chromium.org>
1858 Reviewed by Chris Fleizach.
1860 Null deref in RenderBlock::findNextLineBreak(). Check for null style with
1861 first-line style and fixed position.
1862 https://bugs.webkit.org/show_bug.cgi?id=45350
1864 Test: fast/dom/firstline-fixed-crash.html
1866 * rendering/RenderBlockLineLayout.cpp:
1867 (WebCore::RenderBlock::findNextLineBreak):
1869 2010-09-10 Eric Seidel <eric@webkit.org>
1871 Reviewed by Dimitri Glazkov.
1873 Remove support for non-lazy attach and fix frames to load from insertedIntoDocument instead of attach
1874 https://bugs.webkit.org/show_bug.cgi?id=45365
1876 This change is the last piece of the puzzle which was preventing us from
1877 removing all eager-attach logic and moving WebCore to using an entirely
1878 recalcStyle-driven, on-demand renderer creation system, instead of every
1879 element being synchronously attached during parsing, regardless of whether
1880 it was ever going to be displayed or not.
1882 This does not change the places we call lazyAttach vs. attach. This only
1883 changes the behavior of frame/plugin elements when lazyAttach is called.
1884 Previously lazyAttach would eager-attach those elements (and their ancestors)
1885 because they were marked as canLazyAttach() { return false; }.
1887 This is a very tricky change, please review carefully.
1889 Mostly I'm moving logic which used to be in attach() into
1890 insertedIntoDocument. Once it was there, there was no longer any reason
1891 why frame elements couldn't lazyAttach, thus removing the need
1892 for the non-lazy attach code path entirely.
1893 We've not yet converted all callsites over to using lazyAttach() instead
1894 of attach() however.
1896 In order to move frame loading logic into insertedIntoDocument
1897 instead of attach, I needed to make sure that any javascript calls
1898 during the load would see an attached element. Thus I needed to mark
1899 the element as needing style resolve so that it would attach itself
1902 I was not able to just call lazyAttach() from insertedIntoDocument directly
1903 due to two conflicting assumptions in the rendering tree:
1904 1. ContainerNode::attach() assumes its "safe" to call attach on all children
1905 without checking first if the child is already attached. This seems sane
1906 since its strange to think of a subtree as being attached w/o ancestors
1907 already being attached. Although it is a hard rule that subtrees may not
1908 have renderers w/o ancestors also having renderers, I do not believe it's
1909 a hard rule that subtrees may not be attached. Remember, attached() does
1910 not imply renderer()! It's possible ContainerNode::attach()'s assumption is wrong here.
1911 2. Node::attach() asserts !attached(). This makes sense and I would not
1912 want to remove this assert, however it means that if insertedIntoDocument
1913 were to call lazyAttach() (thus marking the element as attached()) then
1914 all callers would need to check if the element was already attached after
1915 insertedIntoDocument (called by appendChild, parserAppendChild, etc.)
1916 before calling attach or lazyAttach(). The following example:
1917 element.innerHTML = "<span><iframe></span>" is one case where this
1918 ASSERT would be hit if insertedIntoDocument called lazyAttach, since
1919 ContainerNode::attach() (called on the span by in appendChild(DocumentFragment) code)
1920 does not check if iframe is already attached.
1922 Note: One subtle change here is that synchronous javascript which results
1923 from javascript: or beforeload is now run as part of insertedIntoDocument
1924 (thus any insert/append call *even* parserAddChild) instead of being
1925 run during attach (technically in the post-attach callbacks).
1927 This is covered by numerous layout tests.
1929 * dom/ContainerNode.cpp:
1930 (WebCore::willRemoveChild):
1931 (WebCore::willRemoveChildren):
1932 - Since insertedIntoDocument starts a load and yet does not mark the
1933 element as attached, we need to always call willRemove().
1934 See note above as to why we don't just mark attached() in insertedIntoDocument.
1936 (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
1937 - Share some code between lazyAttach and setNeedsStyleRecalc.
1938 (WebCore::Node::setNeedsStyleRecalc):
1939 - Use the new markAncestorsWithChildNeedsStyleRecalc
1940 (WebCore::Node::lazyAttach):
1941 - Remove the non-lazy code path, and use markAncestorsWithChildNeedsStyleRecalc.
1942 - Add an option to lazyAttach without marking attached(), used by HTMLFrameElementBase::insertedIntoDocument.
1944 * html/HTMLFrameElementBase.cpp:
1945 - m_shouldOpenURLAfterAttach is no longer needed, yay!
1946 - m_checkAttachedTimer no longer has anything to do with attached(), so renamed it.
1947 I also documented that the newly named m_checkInDocumentTimer is all about the
1948 "magic iframe" performance quirk. (Which is actually speced in HTML5).
1949 I was initially baffled by this code, so I documented it.
1950 (WebCore::HTMLFrameElementBase::HTMLFrameElementBase)
1951 (WebCore::HTMLFrameElementBase::insertedIntoDocument):
1952 - This is the meat of this change, see discussion above.
1953 (WebCore::HTMLFrameElementBase::attach):
1954 - Code deleted or moved to insertedIntoDocument.
1955 (WebCore::HTMLFrameElementBase::width):
1956 - Fixed a bug in height()/width() which was probably causing crashes
1957 and was causing incorrect behavior after this change.
1958 renderBox() is not necessarily valid unless layout is up to date.
1959 Updating layout, can cause renderBox() to go invalid, thus this
1960 could have been a null-pointer crash.
1961 (WebCore::HTMLFrameElementBase::height): see width()
1962 (WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree): Timer rename.
1963 (WebCore::HTMLFrameElementBase::checkInDocumentTimerFired): Timer rename.
1964 * html/HTMLFrameElementBase.h:
1965 * html/HTMLFrameOwnerElement.cpp:
1966 (WebCore::HTMLFrameOwnerElement::willRemove):
1967 - Disconnecting the owner element removes the frame from the frame tree.
1968 frameDetached() calls Page::frameCount which expects that the frame is
1969 already gone at this point and asserts when it's not. It's unclear how
1970 this worked before, except that the frame removal was likely done in the
1971 post-attach callback, so the frameCount was wrong (too high) during
1972 frameDetached(), but was fixed up in the post-detach callback.
1973 * html/parser/HTMLConstructionSite.cpp:
1974 (WebCore::HTMLConstructionSite::attachAtSite):
1975 - Simplified this code, and added a check for the case when the node was already removed.
1976 Since the load logic is now run during insertedIntoDocument instead of attach(),
1977 synchronous javascript is now running during insertedIntoDocument and we need to
1978 make sure that the child is still in the tree.
1980 2010-09-10 Dirk Pranke <dpranke@chromium.org>
1982 Unreviewed, rolling out r67178.
1983 http://trac.webkit.org/changeset/67178
1984 https://bugs.webkit.org/show_bug.cgi?id=45524
1986 re-roll-out patch to put original changes back in
1988 * html/HTMLObjectElement.cpp:
1989 (WebCore::HTMLObjectElement::parametersForPlugin):
1990 (WebCore::HTMLObjectElement::updateWidget):
1991 * loader/SubframeLoader.cpp:
1992 (WebCore::SubframeLoader::resourceWillUsePlugin):
1993 * loader/SubframeLoader.h:
1995 2010-09-10 Dirk Pranke <dpranke@chromium.org>
1997 Reviewed by Kent Tamura.
1999 roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
2000 https://bugs.webkit.org/show_bug.cgi?id=45524
2002 * html/HTMLObjectElement.cpp:
2003 (WebCore::HTMLObjectElement::parametersForPlugin):
2004 (WebCore::HTMLObjectElement::updateWidget):
2005 * loader/SubframeLoader.cpp:
2006 (WebCore::SubframeLoader::requestFrame):
2007 * loader/SubframeLoader.h:
2009 2010-09-10 Ryosuke Niwa <rniwa@webkit.org>
2011 Reviewed by Tony Chang.
2013 Extract the code to find special ancestors in createMarkup into a function
2014 https://bugs.webkit.org/show_bug.cgi?id=45449
2016 Extracted the code to find special common ancestors in createMarkup as highestAncestorToWrapMarkup.
2017 Also isolated the code to find ancestors required to retain structure and appearance into
2018 ancestorToRetainStructureAndAppearance.
2020 No new tests are added since this is a cleanup.
2022 * editing/markup.cpp:
2023 (WebCore::ancestorToRetainStructureAndAppearance): Added.
2024 (WebCore::propertyMissingOrEqualToNone): Moved.
2025 (WebCore::isElementPresentational): Moved.
2026 (WebCore::shouldIncludeWrapperForFullySelectedRoot): Added. isSpecialAncestorBlock is merged into this function.
2027 (WebCore::highestAncestorToWrapMarkup): Extracted from createMarkup.
2028 (WebCore::createMarkup): Calls highestAncestorToWrapMarkup.
2030 2010-09-09 Adam Barth <abarth@webkit.org>
2032 Reviewed by Dimitri Glazkov.
2034 Spurious null check in MediaDocumentParser
2035 https://bugs.webkit.org/show_bug.cgi?id=45461
2037 Trivial change. FrameLoader can never be null.
2039 * html/MediaDocument.cpp:
2040 (WebCore::MediaDocumentParser::createDocumentStructure):
2042 2010-09-09 Ryosuke Niwa <rniwa@webkit.org>
2044 Reviewed by Eric Seidel.
2046 REGRESSION: applying new font size causes font-size outside selection to change
2047 https://bugs.webkit.org/show_bug.cgi?id=45026
2049 The regression was caused by removeImplicitlyStyledElement not converting font size to CSS value properly.
2050 Namely, it was treating font size as a pixel value for font-size property. Fixed this by adding fontSizeToCSSValue
2051 which uses HTMLFontElement::cssValueFromFontSizeNumber and deployed it in removeImplicitlyStyledElement
2053 Also fixed a bug in StyleChange::extractTextStyles that it ignores font-size property when the values were
2054 relative terms such as x-small and -webkit-xxx-large. And replaced the logic to convert from pixel font size
2055 to legacy font size by CSSStyleSelector::legacyFontSize.
2057 Test: editing/style/push-down-font-styles.html
2059 * editing/ApplyStyleCommand.cpp:
2060 (WebCore::StyleChange::extractTextStyles): Fixed a bug. See above.
2061 (WebCore::stringToCSSValue): Converts string to CSSValue.
2062 (WebCore::fontSizeToCSSValue): Converts font size number (String) to CSSPrimitiveValue.
2063 (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Calls stringToCSSValue and fontSizeToCSSValue.
2064 * css/CSSStyleSelector.h: Made fontSizeForKeyword public.
2066 2010-09-09 Kent Tamura <tkent@chromium.org>
2068 Unreviewed, build fix for Qt.
2070 * css/CSSStyleSelector.cpp:
2071 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2073 2010-09-09 Dominic Cooney <dominicc@google.com>
2075 Reviewed by Kent Tamura.
2077 Moves location.replace bindings logic into bindings/generic and
2078 instantiates it for JSC and V8.
2080 https://bugs.webkit.org/show_bug.cgi?id=44891
2082 Covered by existing location.replace tests.
2087 * WebCore.vcproj/WebCore.vcproj:
2088 * WebCore.vcproj/WebCoreCommon.vsprops:
2089 * WebCore.xcodeproj/project.pbxproj:
2090 * bindings/generic/BindingDOMWindow.h:
2091 * bindings/generic/BindingFrame.h: Added.
2092 (WebCore::::navigateIfAllowed):
2093 * bindings/generic/BindingLocation.h: Added.
2094 (WebCore::::replace):
2095 * bindings/generic/GenericBinding.h:
2096 (WebCore::completeURL):
2097 * bindings/js/JSBinding.h: Added.
2098 * bindings/js/JSBindingsAllInOne.cpp:
2099 * bindings/js/JSDOMBinding.cpp:
2100 (WebCore::shouldAllowNavigation):
2101 (WebCore::toLexicalFrame):
2102 (WebCore::toDynamicFrame):
2103 (WebCore::processingUserGesture):
2104 (WebCore::completeURL):
2105 * bindings/js/JSLocationCustom.cpp:
2106 (WebCore::navigateIfAllowed):
2107 (WebCore::JSLocation::replace):
2108 * bindings/js/specialization/JSBindingState.cpp: Added.
2109 (WebCore::::getActiveFrame):
2110 (WebCore::::getFirstFrame):
2111 (WebCore::::processingUserGesture):
2112 (WebCore::::allowsAccessFromFrame):
2113 * bindings/js/specialization/JSBindingState.h: Added.
2114 * bindings/v8/V8Binding.h:
2115 * bindings/v8/V8Utilities.cpp:
2116 (WebCore::completeURL):
2117 (WebCore::navigateIfAllowed):
2118 * bindings/v8/custom/V8LocationCustom.cpp:
2119 (WebCore::V8Location::replaceCallback):
2120 * bindings/v8/specialization/V8BindingState.cpp:
2121 (WebCore::::allowsAccessFromFrame):
2122 * bindings/v8/specialization/V8BindingState.h:
2124 2010-09-09 Kent Tamura <tkent@chromium.org>
2126 Reviewed by Dimitri Glazkov.
2128 Apply :invalid CSS class to <input type=number> with an unacceptable value
2129 https://bugs.webkit.org/show_bug.cgi?id=45376
2131 Apply :invalid CSS class to <input type=number> elements with an
2132 unacceptable value in order to tell users that a value is not
2135 Introducing Element::hasUnaccceptableValue(), and CSSStyleSelector
2136 applies :invalid to not only elements with !isValidFormControlElement()
2137 but also elements with hasUnaccceptableValue().
2139 HTMLInputElement and RenderTextControlSingleLine need some changes
2140 to update style and to avoid updating renderer value during style
2143 Test: fast/forms/input-number-unacceptable-style.html
2145 * css/CSSStyleSelector.cpp:
2146 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2148 (WebCore::Element::hasUnacceptableValue):
2149 * html/HTMLInputElement.cpp:
2150 (WebCore::HTMLInputElement::handleBlurEvent):
2151 (WebCore::HTMLInputElement::hasUnacceptableValue):
2152 * html/HTMLInputElement.h:
2153 * rendering/RenderTextControlSingleLine.cpp:
2154 (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
2155 (WebCore::RenderTextControlSingleLine::updateFromElement):
2157 2010-09-09 Kent Tamura <tkent@chromium.org>
2159 Reviewed by Dimitri Glazkov.
2161 <input type=number> should not have an invalid number as its value
2162 https://bugs.webkit.org/show_bug.cgi?id=43973
2164 This change implements the value sanitization algorithm for
2165 type=number, and remove validity.typeMismatch support for
2166 type=number in order to improve HTML5 conformance.
2168 HTMLInputElement::value for type=number always has a valid number
2169 string or an empty string. However, the input field for it, a
2170 RenderTextControlSingleLine, can have a non-number string. For
2171 example, '-' is a non-number string, but a user needs to type
2172 '-'. So, the string in the input field has never been committed to
2173 HTMLInputElement until the string becomes a valid number string.
2175 This change is also a preparation of supporting localized
2176 numbers. A localized string in the input field would not be
2177 matched with HTMLInputElement::value.
2179 Test: fast/forms/input-number-commit-valid-only.html
2181 * dom/InputElement.h: Add isAcceptableValue()
2182 * html/HTMLInputElement.cpp:
2183 (WebCore::HTMLInputElement::handleBlurEvent):
2184 Set formControlValueMatchesRenderer false to clean an invalid value in the renderer.
2185 (WebCore::HTMLInputElement::isAcceptableValue):
2186 (WebCore::HTMLInputElement::sanitizeValue):
2187 * html/HTMLInputElement.h:
2188 * html/ValidityState.cpp:
2189 (WebCore::ValidityState::typeMismatch): Always returns false for type=number.
2190 * rendering/RenderTextControlSingleLine.cpp:
2191 (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
2192 * wml/WMLInputElement.h:
2193 (WebCore::WMLInputElement::isAcceptableValue):
2195 2010-09-09 Tony Gentilcore <tonyg@chromium.org>
2197 Reviewed by Adam Barth.
2199 Support <script async> as specified by HTML5
2200 https://bugs.webkit.org/show_bug.cgi?id=45310
2202 Tests: fast/dom/HTMLScriptElement/async-inline-script.html
2203 fast/dom/HTMLScriptElement/async-onbeforeload.html
2204 fast/dom/HTMLScriptElement/async-write.html
2205 http/tests/misc/async-and-defer-script.html
2206 http/tests/misc/script-async.html
2208 * dom/AsyncScriptRunner.cpp:
2209 (WebCore::AsyncScriptRunner::AsyncScriptRunner):
2210 (WebCore::AsyncScriptRunner::~AsyncScriptRunner):
2211 (WebCore::AsyncScriptRunner::executeScriptSoon): Increment the delay count when a task to execute scripts is queued up.
2212 (WebCore::AsyncScriptRunner::timerFired): decrementLoadEventDelayCount handles calling checkCompleted().
2213 * dom/AsyncScriptRunner.h:
2214 (WebCore::AsyncScriptRunner::create):
2216 (WebCore::Document::Document):
2217 * dom/ScriptElement.cpp:
2218 (WebCore::ScriptElement::insertedIntoDocument): Treats async scripts just like a dynamically inserted script element rather than a parser inserted one.
2219 * html/parser/HTMLScriptRunner.cpp:
2220 (WebCore::HTMLScriptRunner::runScript):
2222 2010-09-09 Alexey Marinichev <amarinichev@chromium.org>
2224 Reviewed by James Robinson.
2226 [chromium] Disable subpixel rendering in Linux when GPU compositor is active
2227 https://bugs.webkit.org/show_bug.cgi?id=45087
2229 This extends windows-only logic to chromium linux as well.
2231 * platform/graphics/chromium/ContentLayerChromium.cpp:
2232 (WebCore::ContentLayerChromium::updateContents):
2233 * platform/graphics/chromium/FontLinux.cpp:
2234 (WebCore::adjustTextRenderMode): Added a check to see if the compositor is active.
2235 (WebCore::Font::drawGlyphs):
2236 (WebCore::Font::drawComplexText):
2237 * platform/graphics/chromium/LayerRendererChromium.cpp:
2238 (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
2239 * platform/graphics/chromium/VideoLayerChromium.cpp:
2240 (WebCore::VideoLayerChromium::updateContents):
2241 * platform/graphics/skia/ImageBufferSkia.cpp:
2242 (WebCore::ImageBuffer::ImageBuffer):
2243 (WebCore::ImageBuffer::clip):
2244 * platform/graphics/skia/PlatformContextSkia.cpp:
2245 Made setDrawingToImageBuffer and isDrawingToImageBuffer available to
2246 Linux; removed all #if OS(WINDOWS) || OS(LINUX).
2247 (WebCore::PlatformContextSkia::State::State):
2248 (WebCore::PlatformContextSkia::PlatformContextSkia):
2249 (WebCore::PlatformContextSkia::isDrawingToImageBuffer):
2250 (WebCore::PlatformContextSkia::save):
2251 (WebCore::PlatformContextSkia::beginLayerClippedToImage):
2252 (WebCore::PlatformContextSkia::restore):
2253 (WebCore::PlatformContextSkia::applyClipFromImage):
2254 * platform/graphics/skia/PlatformContextSkia.h:
2256 2010-09-09 Kinuko Yasuda <kinuko@chromium.org>
2258 Unreviewed, Windows build fix.
2260 * WebCore.vcproj/WebCore.vcproj:
2262 2010-09-09 Kinuko Yasuda <kinuko@chromium.org>
2264 Reviewed by Jian Li.
2266 [FileSystem] Add File and FileWriter accessor methods in FileEntry
2267 https://bugs.webkit.org/show_bug.cgi?id=45440
2269 Adding file() and createWrite() methods in FileEntry.
2270 http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-fileentry-interface
2272 No new tests; this patch doesn't have implementation yet.
2275 * DerivedSources.cpp:
2276 * DerivedSources.make:
2281 * WebCore.vcproj/WebCore.vcproj:
2282 * WebCore.xcodeproj/project.pbxproj:
2283 * fileapi/FileEntry.cpp:
2284 (WebCore::FileEntry::createWriter): Added.
2285 (WebCore::FileEntry::file): Added.
2286 * fileapi/FileEntry.h:
2287 * fileapi/FileEntry.idl:
2288 * fileapi/FileCallback.h: Added.
2289 * fileapi/FileCallback.idl: Added.
2290 * fileapi/FileWriterCallback.h: Added.
2291 * fileapi/FileWriterCallback.idl: Added.
2293 2010-09-09 Yuzo Fujishima <yuzo@google.com>
2295 Reviewed by Darin Adler.
2297 Fix for Bug 24742 - CSS tokenizer allows color in 6 hex digit notation to be followed by the next token without separation
2298 Stop checking in the flex definition the number of hexadecimal digits for a hex color.
2299 Instead, rely on the checking in Color::parseHexColor().
2300 The resultant grammar is actually more close to the one in http://www.w3.org/TR/CSS21/grammar.html .
2302 https://bugs.webkit.org/show_bug.cgi?id=24742
2304 Test: fast/css/invalid-hex-color.html
2306 * css/tokenizer.flex:
2308 2010-09-09 Chris Rogers <crogers@google.com>
2310 Reviewed by Kenneth Russell.
2312 Add AudioSourceNode files
2313 https://bugs.webkit.org/show_bug.cgi?id=45010
2315 No new tests since audio API is not yet implemented.
2317 * webaudio/AudioSourceNode.h: Added.
2318 (WebCore::AudioSourceNode::AudioSourceNode):
2319 * webaudio/AudioSourceNode.idl: Added.
2321 2010-09-09 James Robinson <jamesr@chromium.org>
2323 Reviewed by Kenneth Russell.
2325 [chromium] Don't call deleteTexture on a texture attached to an FBO that is not currently bound
2326 https://bugs.webkit.org/show_bug.cgi?id=45504
2328 The OpenGL semantics for glDeleteTextures() are that if one of the specified texture is attached
2329 to the currently bound FBO, that FBO's color attachment is removed. However, if the specified
2330 texture is attached to a non-current FBO then OpenGL states explicitly that that FBO's color
2331 attachment is not cleared and that the texture stays alive even though its ID is no longer
2332 valid to use. This is not the behavior we want in DrawingBuffer - we actually want the
2333 texture to be immediately deleted. This patch makes sure the DrawingBuffer's FBO is bound
2334 before deleting its color attachment texture.
2336 * platform/graphics/chromium/DrawingBufferChromium.cpp:
2337 (WebCore::DrawingBuffer::~DrawingBuffer):
2338 (WebCore::DrawingBuffer::reset):
2340 2010-09-09 James Robinson <jamesr@chromium.org>
2342 Reviewed by Kenneth Russell.
2344 [chromium] Chromium mac build should exclude all Skia files in platform/graphics/skia/, not just some
2345 https://bugs.webkit.org/show_bug.cgi?id=45516
2347 This excludes platform/graphics/skia/*Skia.(h|cpp) by pattern instead of individual files.
2348 None of these files should be compiled into the Chromium mac build and the old file list had
2349 both omissions and stale entries.
2351 * WebCore.gyp/WebCore.gyp:
2353 2010-09-09 Dirk Pranke <dpranke@chromium.org>
2355 Unreviewed, rolling out r67145.
2356 http://trac.webkit.org/changeset/67145
2357 https://bugs.webkit.org/show_bug.cgi?id=45431
2359 broke editing/inserting/5994480-2.html on Chromium Linux
2361 * css/CSSStyleSelector.h:
2362 * editing/ApplyStyleCommand.cpp:
2363 (WebCore::StyleChange::init):
2364 (WebCore::StyleChange::extractTextStyles):
2365 (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
2367 2010-09-09 Dumitru Daniliuc <dumi@chromium.org>
2369 Reviewed by Alexey Proskuryakov.
2371 Removing an obsolete comment.
2372 https://bugs.webkit.org/show_bug.cgi?id=40112
2374 * bindings/generic/ActiveDOMCallback.cpp:
2376 2010-09-09 James Robinson <jamesr@chromium.org>
2378 Reviewed by Kenneth Russell.
2380 [chromium] Clear only the uploaded portion of the software backing store when in mixed mode
2381 https://bugs.webkit.org/show_bug.cgi?id=45503
2383 This clears out only the dirty region of the software backing store when uploading results
2384 to hardware rather than clearing out the entire software backing store. This is a significant
2385 performance improvement when the dirty rects are small relative to the whole canvas.
2387 This also implements the non-swizzle path of copySubRect() using memcpy() to copy the rows, which
2388 is another respectable performance increase.
2390 * html/canvas/CanvasRenderingContext2D.cpp:
2391 * platform/graphics/gpu/Texture.cpp:
2392 (WebCore::copySubRect):
2393 * platform/graphics/skia/PlatformContextSkia.cpp:
2394 (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
2395 (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
2396 (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
2398 2010-09-09 Kenneth Russell <kbr@google.com>
2400 Reviewed by James Robinson.
2402 Add math utilities for cubic curve processing
2403 https://bugs.webkit.org/show_bug.cgi?id=45251
2405 Adding mathematic utilities needed for the GPU accelerated path
2406 rendering algorithm from GPU Gems 3. No tests yet; will be tested
2407 in conjunction with later code.
2409 * platform/graphics/gpu/LoopBlinnMathUtils.cpp: Added.
2410 (WebCore::LoopBlinnMathUtils::roundToZero):
2411 (WebCore::LoopBlinnMathUtils::approxEqual):
2412 (WebCore::LoopBlinnMathUtils::linesIntersect):
2413 (WebCore::LoopBlinnMathUtils::pointInTriangle):
2414 (WebCore::LoopBlinnMathUtils::trianglesOverlap):
2415 (WebCore::LoopBlinnMathUtils::chopCubicAt):
2416 (WebCore::LoopBlinnMathUtils::xRayCrossesLine):
2417 (WebCore::LoopBlinnMathUtils::numXRayCrossingsForCubic):
2418 * platform/graphics/gpu/LoopBlinnMathUtils.h: Added.
2420 2010-09-09 Kinuko Yasuda <kinuko@chromium.org>
2422 Reviewed by Dumitru Daniliuc.
2424 Add Entry.getMetadata for FileSystem API
2425 https://bugs.webkit.org/show_bug.cgi?id=45403
2427 Add getMetadata to Entry.idl (I had missed to include this
2428 in my previous Entry.idl patch.)
2430 Also make some minor cleanups and nits fixes.
2432 No new tests; layout test is going be added later.
2434 * fileapi/DOMFileSystem.cpp: Bug fix.
2435 * fileapi/MetadataCallback.h: Nits fix.
2436 * fileapi/Entry.idl: Added getMetadata.
2437 * fileapi/ErrorCallback.h: Nits fix.
2439 2010-09-09 Ryosuke Niwa <rniwa@webkit.org>
2441 Reviewed by Eric Seidel.
2443 REGRESSION: applying new font size causes font-size outside selection to change
2444 https://bugs.webkit.org/show_bug.cgi?id=45026
2446 The regression was caused by removeImplicitlyStyledElement not converting font size to CSS value properly.
2447 Namely, it was treating font size as a pixel value for font-size property. Fixed this by adding fontSizeToCSSValue
2448 which uses HTMLFontElement::cssValueFromFontSizeNumber and deployed it in removeImplicitlyStyledElement
2450 Also fixed a bug in StyleChange::extractTextStyles that it ignores font-size property when the values were
2451 relative terms such as x-small and -webkit-xxx-large. And replaced the logic to convert from pixel font size
2452 to legacy font size by CSSStyleSelector::legacyFontSize.
2454 Test: editing/style/push-down-font-styles.html
2456 * editing/ApplyStyleCommand.cpp:
2457 (WebCore::StyleChange::extractTextStyles): Fixed a bug. See above.
2458 (WebCore::stringToCSSValue): Converts string to CSSValue.
2459 (WebCore::fontSizeToCSSValue): Converts font size number (String) to CSSPrimitiveValue.
2460 (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Calls stringToCSSValue and fontSizeToCSSValue.
2461 * css/CSSStyleSelector.h: Made fontSizeForKeyword public.
2463 2010-09-09 Sheriff Bot <webkit.review.bot@gmail.com>
2465 Unreviewed, rolling out r67126.
2466 http://trac.webkit.org/changeset/67126
2467 https://bugs.webkit.org/show_bug.cgi?id=45510
2469 broke chromium mac compile, it also uses PlatformContextSkia
2470 (Requested by jamesr on #webkit).
2472 * platform/graphics/chromium/ContentLayerChromium.cpp:
2473 (WebCore::ContentLayerChromium::updateContents):
2474 * platform/graphics/chromium/FontLinux.cpp:
2475 (WebCore::adjustTextRenderMode):
2476 (WebCore::Font::drawGlyphs):
2477 (WebCore::Font::drawComplexText):
2478 * platform/graphics/chromium/LayerRendererChromium.cpp:
2479 (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
2480 * platform/graphics/chromium/VideoLayerChromium.cpp:
2481 (WebCore::VideoLayerChromium::updateContents):
2482 * platform/graphics/skia/ImageBufferSkia.cpp:
2483 (WebCore::ImageBuffer::ImageBuffer):
2484 (WebCore::ImageBuffer::clip):
2485 * platform/graphics/skia/PlatformContextSkia.cpp:
2486 (WebCore::PlatformContextSkia::State::State):
2487 (WebCore::PlatformContextSkia::PlatformContextSkia):
2488 (WebCore::PlatformContextSkia::save):
2489 (WebCore::PlatformContextSkia::restore):
2490 * platform/graphics/skia/PlatformContextSkia.h:
2492 2010-09-09 Simon Fraser <simon.fraser@apple.com>
2494 Attempt to fix Qt build.
2498 2010-09-09 Simon Fraser <simon.fraser@apple.com>
2500 Reviewed by Darin Adler.
2502 https://bugs.webkit.org/show_bug.cgi?id=45509
2503 <rdar://problem/8142166> REGRESSION: WebView setDrawsBackground:NO no
2504 longer works without setBackgroundColor:clearColor
2506 r61215 caused RenderView to paint the viewport background when the
2507 document element's renderer is known to not fill opaquely paint
2508 the entire viewport, i.e. more often than it did before.
2510 This exposed a latent, long-standing bug which was introduced
2511 in r14638 (the RenderCanvas -> RenderView rename), where a call
2512 to view()->isTransparent() was not converted to frameView()->isTransparent(),
2513 yet happened to still compile because of RenderObject::isTransparent().
2515 This resulted in us painting the viewport background, even when
2516 WebView clients explicitly said that they wanted a transparent
2519 Fixed by calling frameView()->isTransparent(), as intended.
2521 * rendering/RenderView.cpp:
2522 (WebCore::RenderView::paintBoxDecorations):
2524 2010-09-09 Chris Rogers <crogers@google.com>
2526 Reviewed by Kenneth Russell.
2528 audio engine: add Biquad files
2529 https://bugs.webkit.org/show_bug.cgi?id=44795
2531 No new tests since audio API is not yet implemented.
2533 * platform/audio/Biquad.cpp: Added.
2534 (WebCore::Biquad::Biquad):
2535 (WebCore::Biquad::process):
2536 (WebCore::Biquad::processFast):
2537 (WebCore::Biquad::processSliceFast):
2538 (WebCore::Biquad::reset):
2539 (WebCore::Biquad::setLowpassParams):
2540 (WebCore::Biquad::setHighpassParams):
2541 (WebCore::Biquad::setLowShelfParams):
2542 (WebCore::Biquad::setZeroPolePairs):
2543 (WebCore::Biquad::setAllpassPole):
2544 * platform/audio/Biquad.h: Added.
2545 (WebCore::Biquad::~Biquad):
2547 2010-09-09 Chris Rogers <crogers@google.com>
2549 Reviewed by Kenneth Russell.
2551 Add AudioBuffer files
2552 https://bugs.webkit.org/show_bug.cgi?id=45003
2554 No new tests since audio API is not yet implemented.
2556 * webaudio/AudioBuffer.cpp: Added.
2557 (WebCore::AudioBuffer::create):
2558 (WebCore::AudioBuffer::createFromAudioFileData):
2559 (WebCore::AudioBuffer::AudioBuffer):
2560 (WebCore::AudioBuffer::releaseMemory):
2561 (WebCore::AudioBuffer::getChannelData):
2562 (WebCore::AudioBuffer::zero):
2563 * webaudio/AudioBuffer.h: Added.
2564 (WebCore::AudioBuffer::length):
2565 (WebCore::AudioBuffer::duration):
2566 (WebCore::AudioBuffer::sampleRate):
2567 (WebCore::AudioBuffer::numberOfChannels):
2568 (WebCore::AudioBuffer::gain):
2569 (WebCore::AudioBuffer::setGain):
2570 * webaudio/AudioBuffer.idl: Added.
2572 2010-09-09 Alexey Marinichev <amarinichev@chromium.org>
2574 Reviewed by James Robinson.
2576 [chromium] Disable subpixel rendering in Linux when GPU compositor is active
2577 https://bugs.webkit.org/show_bug.cgi?id=45087
2579 Covered by all tests that activate the compositor and contain text.
2581 * platform/graphics/chromium/ContentLayerChromium.cpp:
2582 (WebCore::ContentLayerChromium::updateContents):
2583 * platform/graphics/chromium/FontLinux.cpp:
2584 (WebCore::adjustTextRenderMode): Added a check to see if the compositor is active.
2585 (WebCore::Font::drawGlyphs):
2586 (WebCore::Font::drawComplexText):
2587 * platform/graphics/chromium/LayerRendererChromium.cpp:
2588 (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
2589 * platform/graphics/chromium/VideoLayerChromium.cpp:
2590 (WebCore::VideoLayerChromium::updateContents):
2591 * platform/graphics/skia/ImageBufferSkia.cpp:
2592 (WebCore::ImageBuffer::ImageBuffer):
2593 (WebCore::ImageBuffer::clip):
2594 * platform/graphics/skia/PlatformContextSkia.cpp:
2595 Made setDrawingToImageBuffer and isDrawingToImageBuffer available to
2596 Linux; removed all #if OS(WINDOWS) || OS(LINUX).
2597 (WebCore::PlatformContextSkia::State::State):
2598 (WebCore::PlatformContextSkia::PlatformContextSkia):
2599 (WebCore::PlatformContextSkia::isDrawingToImageBuffer):
2600 (WebCore::PlatformContextSkia::save):
2601 (WebCore::PlatformContextSkia::beginLayerClippedToImage):
2602 (WebCore::PlatformContextSkia::restore):
2603 (WebCore::PlatformContextSkia::applyClipFromImage):
2604 * platform/graphics/skia/PlatformContextSkia.h:
2606 2010-09-09 Simon Fraser <simon.fraser@apple.com>
2608 Fix windows build by adding missing file.
2610 * platform/graphics/win/LocalWindowsContext.h: Added.
2611 (WebCore::LocalWindowsContext::LocalWindowsContext):
2612 (WebCore::LocalWindowsContext::~LocalWindowsContext):
2613 (WebCore::LocalWindowsContext::hdc):
2615 2010-09-09 Simon Fraser <simon.fraser@apple.com>
2617 Reviewed by Adam Roben.
2619 Scrollbars fail to render in composited iframes.
2620 https://bugs.webkit.org/show_bug.cgi?id=45335
2622 Add a stack-based class, LocalWindowsContext, which does a getWindowsContext/
2623 releaseWindowsContext automatically.
2625 Also fix getWindowsContext to create a bitmap context if mayCreateBitmap
2626 is true, and if the context's HDC is null. This fixes scrollbar rendering
2627 in compositing layers.
2629 Use LocalWindowsContext in places where we had bare getWindowsContext() calls.
2631 * platform/graphics/win/LocalWindowsContext.h
2632 (WebCore::LocalWindowsContext::LocalWindowsContext):
2633 (WebCore::LocalWindowsContext::~LocalWindowsContext):
2634 (WebCore::LocalWindowsContext::hdc):
2635 * platform/graphics/win/GraphicsContextCGWin.cpp:
2636 (WebCore::GraphicsContext::releaseWindowsContext):
2637 * platform/graphics/win/GraphicsContextWin.cpp:
2638 (WebCore::GraphicsContext::getWindowsContext):
2639 * platform/graphics/win/IconWin.cpp:
2640 (WebCore::Icon::paint):
2641 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2642 (WebCore::MediaPlayerPrivate::paint):
2643 * platform/win/ScrollbarThemeWin.cpp:
2644 (WebCore::ScrollbarThemeWin::paintTrackPiece):
2645 (WebCore::ScrollbarThemeWin::paintButton):
2646 * plugins/win/PluginViewWin.cpp:
2647 (WebCore::PluginView::paintWindowedPluginIntoContext):
2648 (WebCore::PluginView::paint):
2649 * rendering/RenderThemeWin.cpp:
2650 (WebCore::drawControl):
2652 2010-09-09 Vincent Scheib <scheib@chromium.org>
2654 Reviewed by James Robinson.
2656 [Chromium] Minimize uploads in canvas 2d mixed mode rendering
2657 https://bugs.webkit.org/show_bug.cgi?id=45476
2659 No new tests - change is for performance, logic fixes only apparent when running hardware acceleration.
2661 - Enumeration values fixed, "CavasWillDraw" -> "CanvasDidDraw".
2662 - markDirtyRect() plumbed through GraphicsContext to PlatformContextSkia.
2663 - Texture::updateSubRect() added to allow uploading only a dirty rect.
2664 - Logic fix in ImageBuffer::draw(), caused canvas to canvas copies to be incorrect.
2666 * html/canvas/CanvasRenderingContext2D.cpp:
2667 (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
2668 (WebCore::CanvasRenderingContext2D::strokeRect):
2669 (WebCore::CanvasRenderingContext2D::drawImage):
2670 (WebCore::CanvasRenderingContext2D::didDraw):
2671 - Logic fix for drawingContext()->markDirtyRect() call.
2672 (WebCore::CanvasRenderingContext2D::putImageData):
2673 (WebCore::CanvasRenderingContext2D::drawTextInternal):
2674 - Logic fix for calls to "didDraw()", use peer method first.
2675 * html/canvas/CanvasRenderingContext2D.h:
2676 * platform/graphics/GraphicsContext.cpp:
2677 (WebCore::GraphicsContext::drawImageBuffer):
2678 (WebCore::GraphicsContext::markDirtyRect):
2679 * platform/graphics/GraphicsContext.h:
2680 * platform/graphics/gpu/Texture.cpp:
2681 (WebCore::Texture::create):
2682 (WebCore::Texture::load):
2683 (WebCore::Texture::updateSubRect):
2684 * platform/graphics/gpu/Texture.h:
2685 * platform/graphics/gpu/TilingData.h:
2686 (WebCore::TilingData::borderTexels):
2687 * platform/graphics/skia/GraphicsContextSkia.cpp:
2688 (WebCore::GraphicsContext::clipConvexPolygon):
2689 (WebCore::GraphicsContext::markDirtyRect):
2690 * platform/graphics/skia/ImageBufferSkia.cpp:
2691 (WebCore::ImageBuffer::draw):
2692 * platform/graphics/skia/PlatformContextSkia.cpp:
2693 (WebCore::PlatformContextSkia::State::cloneInheritedProperties):
2694 (WebCore::PlatformContextSkia::drawRect):
2695 (WebCore::PlatformContextSkia::setFillColor):
2696 (WebCore::PlatformContextSkia::setStrokeColor):
2697 (WebCore::PlatformContextSkia::markDirtyRect):
2698 (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
2699 * platform/graphics/skia/PlatformContextSkia.h:
2701 2010-09-08 Darin Adler <darin@apple.com>
2703 Reviewed by Adam Barth.
2705 Move functions from Frame to Editor as planned
2706 https://bugs.webkit.org/show_bug.cgi?id=45218
2708 Just executing the plan that has long been described in Frame.h
2709 to move a bunch of functions to Editor.
2711 * WebCore.exp.in: Updated.
2713 * editing/Editor.cpp:
2714 (WebCore::Editor::fontForSelection):
2715 (WebCore::Editor::textDirectionForSelection):
2716 (WebCore::Editor::applyStyle):
2717 (WebCore::Editor::selectionStartHasStyle):
2718 (WebCore::Editor::selectionHasStyle):
2719 (WebCore::Editor::selectionStartCSSPropertyValue):
2720 (WebCore::Editor::Editor):
2721 (WebCore::Editor::cut):
2722 (WebCore::Editor::copy):
2723 (WebCore::Editor::ignoreSpelling):
2724 (WebCore::Editor::learnSpelling):
2725 (WebCore::Editor::isSelectionMisspelled):
2726 (WebCore::Editor::guessesForMisspelledSelection):
2727 (WebCore::Editor::selectedText):
2728 (WebCore::Editor::firstRectForRange):
2729 (WebCore::Editor::shouldChangeSelection):
2730 (WebCore::Editor::computeAndSetTypingStyle):
2731 (WebCore::Editor::selectionComputedStyle):
2732 (WebCore::Editor::textFieldDidBeginEditing):
2733 (WebCore::Editor::textFieldDidEndEditing):
2734 (WebCore::Editor::textDidChangeInTextField):
2735 (WebCore::Editor::doTextFieldCommandFromEvent):
2736 (WebCore::Editor::textWillBeDeletedInTextField):
2737 (WebCore::Editor::textDidChangeInTextArea):
2738 (WebCore::Editor::applyEditingStyleToBodyElement):
2739 (WebCore::Editor::applyEditingStyleToElement):
2740 (WebCore::Editor::styleForSelectionStart):
2741 (WebCore::Editor::findString):
2742 (WebCore::Editor::countMatchesForText):
2743 (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
2744 (WebCore::Editor::respondToChangedSelection):
2746 * editing/mac/EditorMac.mm:
2747 (WebCore::Editor::fontAttributesForSelectionStart):
2748 (WebCore::Editor::baseWritingDirectionForSelectionStart):
2749 Moved functions here.
2752 (WebCore::Frame::Frame):
2753 (WebCore::Frame::shouldChangeSelection):
2755 * page/mac/FrameMac.mm:
2756 Moved functions out of here.
2758 * dom/InputElement.cpp:
2759 (WebCore::InputElement::dispatchBlurEvent):
2760 (WebCore::InputElement::aboutToUnload):
2761 * editing/DeleteSelectionCommand.cpp:
2762 (WebCore::DeleteSelectionCommand::doApply):
2763 * editing/EditorCommand.cpp:
2764 (WebCore::executeToggleStyleInList):
2765 (WebCore::executeDeleteToMark):
2766 (WebCore::executeFindString):
2767 (WebCore::executeSelectToMark):
2768 (WebCore::executeSetMark):
2769 (WebCore::executeSwapWithMark):
2770 (WebCore::enabledVisibleSelectionAndMark):
2771 * editing/SelectionController.cpp:
2772 (WebCore::SelectionController::setSelection):
2773 * html/HTMLInputElement.cpp:
2774 (WebCore::HTMLInputElement::defaultEventHandler):
2775 * page/ContextMenuController.cpp:
2776 (WebCore::ContextMenuController::contextMenuItemSelected):
2777 * page/DOMWindow.cpp:
2778 (WebCore::DOMWindow::find):
2779 * page/DragController.cpp:
2780 (WebCore::DragController::startDrag):
2781 * page/EventHandler.cpp:
2782 (WebCore::EventHandler::sendContextMenuEventForKey):
2784 (WebCore::Page::findString):
2785 (WebCore::Page::markAllMatchesForText):
2786 * rendering/InlineTextBox.cpp:
2787 (WebCore::InlineTextBox::paintTextMatchMarker):
2788 * rendering/RenderTextControlMultiLine.cpp:
2789 (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
2790 * rendering/RenderTextControlSingleLine.cpp:
2791 (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
2792 Changed call sites to use editor().
2794 2010-09-09 Chris Rogers <crogers@google.com>
2796 Reviewed by Kenneth Russell.
2798 Add AudioDSPKernelProcessor files
2799 https://bugs.webkit.org/show_bug.cgi?id=45211
2801 No new tests since audio API is not yet implemented.
2803 * platform/audio/AudioDSPKernelProcessor.cpp: Added.
2804 (WebCore::AudioDSPKernelProcessor::AudioDSPKernelProcessor):
2805 (WebCore::AudioDSPKernelProcessor::initialize):
2806 (WebCore::AudioDSPKernelProcessor::uninitialize):
2807 (WebCore::AudioDSPKernelProcessor::process):
2808 (WebCore::AudioDSPKernelProcessor::reset):
2809 (WebCore::AudioDSPKernelProcessor::setNumberOfChannels):
2810 * platform/audio/AudioDSPKernelProcessor.h: Added.
2811 (WebCore::AudioDSPKernelProcessor::numberOfChannels):
2813 2010-09-09 Chris Rogers <crogers@google.com>
2815 Reviewed by Kenneth Russell.
2817 Add setRange() and zeroRange() methods to TypedArrayBase
2818 https://bugs.webkit.org/show_bug.cgi?id=45419
2820 No new tests since adding new methods which are not yet called anywhere.
2822 * html/canvas/ArrayBufferView.cpp:
2823 (WebCore::ArrayBufferView::setRangeImpl):
2824 (WebCore::ArrayBufferView::zeroRangeImpl):
2825 * html/canvas/ArrayBufferView.h:
2826 * html/canvas/TypedArrayBase.h:
2827 (WebCore::TypedArrayBase::setRange):
2828 (WebCore::TypedArrayBase::zeroRange):
2830 2010-09-09 Robert Hogan <robert@webkit.org>
2832 Reviewed by Andreas Kling.
2834 [Qt] always send an Accept header
2836 Ensure QtWebKit always sends an Accept header. This is required
2837 for compatibility with sites that expect the header in requests
2840 See https://bugs.webkit.org/show_bug.cgi?id=33242 for more.
2842 https://bugs.webkit.org/show_bug.cgi?id=45458
2844 * platform/network/qt/ResourceRequestQt.cpp:
2845 (WebCore::ResourceRequest::toNetworkRequest):
2847 2010-09-09 Eric Carlson <eric.carlson@apple.com>
2849 Reviewed by Chris Marrin.
2851 Add media element logging
2852 https://bugs.webkit.org/show_bug.cgi?id=45469
2854 Add logging at interesting points in a media element's lifecycle.
2856 * html/HTMLMediaElement.cpp:
2857 (WebCore::urlForLogging):
2858 (WebCore::boolString):
2859 (WebCore::HTMLMediaElement::scheduleEvent):
2860 (WebCore::HTMLMediaElement::asyncEventTimerFired):
2861 (WebCore::HTMLMediaElement::canPlayType):
2862 (WebCore::HTMLMediaElement::load):
2863 (WebCore::HTMLMediaElement::prepareForLoad):
2864 (WebCore::HTMLMediaElement::selectMediaResource):
2865 (WebCore::HTMLMediaElement::loadResource):
2866 (WebCore::HTMLMediaElement::isSafeToLoadURL):
2867 (WebCore::HTMLMediaElement::waitForSourceChange):
2868 (WebCore::HTMLMediaElement::noneSupported):
2869 (WebCore::HTMLMediaElement::mediaEngineError):
2870 (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
2871 (WebCore::HTMLMediaElement::setNetworkState):
2872 (WebCore::HTMLMediaElement::setReadyState):
2873 (WebCore::HTMLMediaElement::rewind):
2874 (WebCore::HTMLMediaElement::returnToRealtime):
2875 (WebCore::HTMLMediaElement::addPlayedRange):
2876 (WebCore::HTMLMediaElement::seek):
2877 (WebCore::HTMLMediaElement::finishSeek):
2878 (WebCore::HTMLMediaElement::setPlaybackRate):
2879 (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
2880 (WebCore::HTMLMediaElement::setAutoplay):
2881 (WebCore::HTMLMediaElement::setPreload):
2882 (WebCore::HTMLMediaElement::play):
2883 (WebCore::HTMLMediaElement::playInternal):
2884 (WebCore::HTMLMediaElement::pause):
2885 (WebCore::HTMLMediaElement::pauseInternal):
2886 (WebCore::HTMLMediaElement::setLoop):
2887 (WebCore::HTMLMediaElement::setControls):
2888 (WebCore::HTMLMediaElement::setVolume):
2889 (WebCore::HTMLMediaElement::setMuted):
2890 (WebCore::HTMLMediaElement::togglePlayState):
2891 (WebCore::HTMLMediaElement::beginScrubbing):
2892 (WebCore::HTMLMediaElement::endScrubbing):
2893 (WebCore::HTMLMediaElement::selectNextSourceChild):
2894 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2895 (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
2896 (WebCore::HTMLMediaElement::mediaPlayerMuteChanged):
2897 (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
2898 (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
2899 (WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
2900 (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
2901 (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
2902 (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
2903 (WebCore::HTMLMediaElement::updatePlayState):
2904 (WebCore::HTMLMediaElement::userCancelledLoad):
2905 (WebCore::HTMLMediaElement::stop):
2906 (WebCore::HTMLMediaElement::suspend):
2907 (WebCore::HTMLMediaElement::resume):
2908 (WebCore::HTMLMediaElement::hasPendingActivity):
2909 (WebCore::HTMLMediaElement::mediaVolumeDidChange):
2910 (WebCore::HTMLMediaElement::createMediaPlayerProxy):
2911 (WebCore::HTMLMediaElement::enterFullscreen):
2912 (WebCore::HTMLMediaElement::exitFullscreen):
2913 (WebCore::HTMLMediaElement::setClosedCaptionsVisible):
2914 (WebCore::HTMLMediaElement::mediaCanStart):
2915 (WebCore::HTMLMediaElement::setShouldDelayLoadEvent):
2917 2010-09-09 Anton Muhin <antonm@chromium.org>
2919 Reviewed by Adam Barth.
2921 [v8] bypass caches when query memory usage from post GC and in crash handler.
2922 https://bugs.webkit.org/show_bug.cgi?id=45036
2924 Second part of the whole change: now use API introduced in
2925 http://trac.webkit.org/changeset/66818 and now backed by Chromium.
2927 * bindings/v8/V8DOMWindowShell.cpp:
2928 (WebCore::reportFatalErrorInV8):
2929 * bindings/v8/V8GCController.cpp:
2930 (WebCore::V8GCController::gcEpilogue):
2932 2010-09-09 Kwang Yul Seo <skyul@company100.net>
2934 Reviewed by James Robinson.
2936 Make sure skia is not Chromium specific
2937 https://bugs.webkit.org/show_bug.cgi?id=39672
2939 FontCustomPlatformData is not Chromium-specific. Move it to platform/skia.
2941 No new tests because this is pure refactoring.
2943 * WebCore.gyp/WebCore.gyp:
2945 * platform/graphics/chromium/FontCustomPlatformData.cpp: Removed.
2946 * platform/graphics/chromium/FontCustomPlatformData.h: Removed.
2947 * platform/graphics/skia/FontCustomPlatformData.cpp: Copied from WebCore/platform/graphics/chromium/FontCustomPlatformData.cpp.
2948 * platform/graphics/skia/FontCustomPlatformData.h: Copied from WebCore/platform/graphics/chromium/FontCustomPlatformData.h.
2950 2010-09-09 Chris Rogers <crogers@google.com>
2952 Reviewed by Chris Fleizach.
2954 Add AudioDSPKernel files
2955 https://bugs.webkit.org/show_bug.cgi?id=45319
2957 No new tests since audio API is not yet implemented.
2959 * platform/audio/AudioDSPKernel.h: Added.
2960 (WebCore::AudioDSPKernel::AudioDSPKernel):
2961 (WebCore::AudioDSPKernel::~AudioDSPKernel):
2962 (WebCore::AudioDSPKernel::sampleRate):
2963 (WebCore::AudioDSPKernel::nyquist):
2964 (WebCore::AudioDSPKernel::processor):
2966 2010-09-09 Chris Rogers <crogers@google.com>
2968 Reviewed by Chris Fleizach.
2970 Add AudioProcessor.h
2971 https://bugs.webkit.org/show_bug.cgi?id=45206
2973 No new tests since audio API is not yet implemented.
2975 * platform/audio/AudioProcessor.h: Added.
2976 (WebCore::AudioProcessor::AudioProcessor):
2977 (WebCore::AudioProcessor::~AudioProcessor):
2978 (WebCore::AudioProcessor::isInitialized):
2979 (WebCore::AudioProcessor::sampleRate):
2981 2010-09-09 Kenneth Russell <kbr@google.com>
2983 Reviewed by James Robinson.
2985 Add cubic texture coordinate computation
2986 https://bugs.webkit.org/show_bug.cgi?id=45250
2988 Adding the texture coordinate computation for cubic curves per the
2989 GPU Gems 3 chapter. No tests yet; will be tested in conjunction
2992 * platform/graphics/gpu/LoopBlinnConstants.h: Added.
2993 * platform/graphics/gpu/LoopBlinnTextureCoords.cpp: Added.
2994 (WebCore::LoopBlinnTextureCoords::compute):
2995 * platform/graphics/gpu/LoopBlinnTextureCoords.h: Added.
2996 (WebCore::LoopBlinnTextureCoords::Result::Result):
2997 (WebCore::LoopBlinnTextureCoords::LoopBlinnTextureCoords):
2999 2010-09-09 Kenneth Russell <kbr@google.com>
3001 Reviewed by James Robinson.
3003 Add cubic curve classifier
3004 https://bugs.webkit.org/show_bug.cgi?id=45249
3006 Adding the cubic curve classification algorithm per the GPU Gems 3
3007 chapter. No tests yet; will be tested in conjunction with later code.
3009 * platform/graphics/gpu/LoopBlinnClassifier.cpp: Added.
3010 (WebCore::LoopBlinnClassifier::classify):
3011 * platform/graphics/gpu/LoopBlinnClassifier.h: Added.
3012 (WebCore::LoopBlinnClassifier::Result::Result):
3013 (WebCore::LoopBlinnClassifier::LoopBlinnClassifier):
3015 2010-09-09 Ryosuke Niwa <rniwa@webkit.org>
3017 Reviewed by Darin Adler.
3019 QueryCommandValue('FontSize') returns pixel values instead of IE font numbers
3020 https://bugs.webkit.org/show_bug.cgi?id=21033
3022 Modified selectionStartCSSPropertyValue to return legacy font size instead of pixel size.
3023 To implement the conversion between pixel font size and legacy font size,
3024 added legacyFontSize to CSSStyleSelector with a helper static function findNearestLegacyFontSize.
3026 Fixed a bug in selectionComputedStyle where it obtains the style of the previous editing position
3027 even when the selection is a range. This change revealed a crash in executeToggleStyleInList,
3028 which was also fixed.
3030 Test: editing/execCommand/query-font-size.html
3032 * css/CSSComputedStyleDeclaration.cpp:
3033 (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword): Corrected style.
3034 (WebCore::CSSComputedStyleDeclaration::useFixedFontDefaultSize): Added.
3035 * css/CSSComputedStyleDeclaration.h:
3036 * css/CSSStyleSelector.cpp:
3037 (WebCore::CSSStyleSelector::fontSizeForKeyword): Renamed fixed/monospace to shouldUseFixedDefaultSize.
3038 (WebCore::findNearestLegacyFontSize): Added, a helper for legacyFontSize.
3039 (WebCore::CSSStyleSelector::legacyFontSize): Added.
3040 * css/CSSStyleSelector.h:
3041 * editing/Editor.cpp:
3042 (WebCore::Editor::selectionStartCSSPropertyValue): Added a conversion from pixel to legacy font size.
3043 * editing/EditorCommand.cpp:
3044 (WebCore::executeToggleStyleInList): Crash fix.
3046 (WebCore::Frame::selectionComputedStyle): See above.
3048 2010-09-09 Robert Hogan <robert@webkit.org>
3050 Reviewed by Adam Barth.
3052 Give WebKit clients a way to replace window.screen
3053 to foil attempts to track users with it.
3055 This allows clients to overload the values returned by the
3056 Screen object through the JSC manipulation API (such as
3057 QWebFrame::addToJavaScriptWindowObject() in Qt). Clients will
3058 want to do this when they do not want to reveal too much
3059 explicit information about the user's desktop configuration.
3061 https://bugs.webkit.org/show_bug.cgi?id=41802
3063 * page/DOMWindow.idl:
3065 2010-09-09 Kenneth Russell <kbr@google.com>
3067 Reviewed by James Robinson.
3069 Memory leak in red/black tree
3070 https://bugs.webkit.org/show_bug.cgi?id=45472
3072 Fixed memory leak in red/black tree where it was using operator
3073 new directly to allocate its internal nodes rather than the arena
3074 with which it was configured. Added allocateObject variant to
3075 arena supporting single-argument constructors. Added test to
3076 red/black tree unit tests to cover this functionality, and
3077 refactored TrackedAllocator into helper file to share between
3078 arena and red/black tree tests.
3080 * platform/graphics/gpu/PODArena.h:
3081 (WebCore::PODArena::allocateObject):
3082 (WebCore::PODArena::allocateBase):
3083 * platform/graphics/gpu/PODIntervalTree.h:
3084 (WebCore::PODIntervalTree::PODIntervalTree):
3085 * platform/graphics/gpu/PODRedBlackTree.h:
3086 (WebCore::PODRedBlackTree::add):
3088 2010-09-09 Dean Jackson <dino@apple.com>
3090 Reviewed by Simon Fraser.
3092 Fill mode is broken with multiple keyframes
3093 https://bugs.webkit.org/show_bug.cgi?id=41209
3095 With a forward fill mode the animation would tick after
3096 the end of the animation, causing the fractional
3097 duration of the animation to wrap. This meant the last
3098 style update would happen using the incorrect keyframes.
3099 The solution was to put clamps in for the elapsed time
3100 and current iteration count.
3102 Tests: animations/fill-mode-missing-from-to-keyframes.html
3103 animations/fill-mode-multiple-keyframes.html
3105 * page/animation/KeyframeAnimation.cpp:
3106 (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
3108 2010-09-09 Chris Fleizach <cfleizach@apple.com>
3110 Reviewed by David Kilzer.
3112 AX: Support AccessibilityTextMarkers in DRT
3113 https://bugs.webkit.org/show_bug.cgi?id=44778
3115 Provide support in DRT for accessing and manipulating the text marker system that AX exposes.
3116 This will allow future bug fixes in the text marker system to be adequately tested.
3118 Tests: platform/mac/accessibility/element-for-text-marker.html
3119 platform/mac/accessibility/text-marker-length.html
3121 * accessibility/mac/AccessibilityObjectWrapper.mm:
3122 (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3124 2010-09-09 Simon Fraser <simon.fraser@apple.com>
3126 Reviewed by Dan Bernstein.
3128 REGRESSION(r58875-r59046): Scrollable content drawn in wrong layer with Flash 10.1
3129 https://bugs.webkit.org/show_bug.cgi?id=40743
3131 We can't do partial compositing layer updates on scrolling if we have to look
3132 for overlap, because the overlap map needs to be populated by traversing the
3133 compositing layer hierarchy from the root.
3135 Test: compositing/layer-creation/scroll-partial-update.html
3137 * rendering/RenderLayerCompositor.cpp:
3138 (WebCore::RenderLayerCompositor::updateCompositingLayers):
3140 2010-09-09 Philippe Normand <pnormand@igalia.com>
3142 Reviewed by Martin Robinson.
3144 [GTK] testmimehandling falsely succeeds testing Ogg mime type
3145 https://bugs.webkit.org/show_bug.cgi?id=45349
3147 Advertize audio/x-vorbis+ogg so MediaDocuments loading local ogg
3150 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3151 (WebCore::mimeTypeCache):
3153 2010-09-09 Adam Barth <abarth@webkit.org>
3155 Move FTPDirectoryDocument, ImageDocument, MediaDocument, and
3156 PluginDocument from WebCore/loader to WebCore/html. These classes are
3157 subclasses of HTMLDocument. They don't belong in the loader. Further
3158 cleanup patches to follow.
3165 * WebCore.vcproj/WebCore.vcproj:
3166 * WebCore.xcodeproj/project.pbxproj:
3167 * html/FTPDirectoryDocument.cpp: Copied from WebCore/loader/FTPDirectoryDocument.cpp.
3168 * html/FTPDirectoryDocument.h: Copied from WebCore/loader/FTPDirectoryDocument.h.
3169 * html/ImageDocument.cpp: Copied from WebCore/loader/ImageDocument.cpp.
3170 * html/ImageDocument.h: Copied from WebCore/loader/ImageDocument.h.
3171 * html/MediaDocument.cpp: Copied from WebCore/loader/MediaDocument.cpp.
3172 * html/MediaDocument.h: Copied from WebCore/loader/MediaDocument.h.
3173 * html/PluginDocument.cpp: Copied from WebCore/loader/PluginDocument.cpp.
3174 * html/PluginDocument.h: Copied from WebCore/loader/PluginDocument.h.
3175 * loader/FTPDirectoryDocument.cpp: Removed.
3176 * loader/FTPDirectoryDocument.h: Removed.
3177 * loader/ImageDocument.cpp: Removed.
3178 * loader/ImageDocument.h: Removed.
3179 * loader/MediaDocument.cpp: Removed.
3180 * loader/MediaDocument.h: Removed.
3181 * loader/PluginDocument.cpp: Removed.
3182 * loader/PluginDocument.h: Removed.
3184 2010-09-09 Andrey Kosyakov <caseq@chromium.org>
3186 Reviewed by Yury Semikhatsky.
3188 Web Inspector: use string representation of resource type in extension API
3189 Fixed Resoruce.Type.toString() to handle Resource.Type.Media.
3190 https://bugs.webkit.org/show_bug.cgi?id=45286
3192 Test: inspector/extensions-resources.html
3194 * English.lproj/localizedStrings.js: Added "media".
3195 * inspector/front-end/ExtensionServer.js: Added webInspector.resources.Types. Return resource types as strings.
3196 (WebInspector.ExtensionServer.prototype._convertResource):
3197 (WebInspector.ExtensionServer.prototype._buildExtensionAPIInjectedScript):
3198 * inspector/front-end/Resource.js: Added toUIString(), changed toString() to return locale-independent representation.
3199 (WebInspector.Resource.Type.toUIString):
3200 (WebInspector.Resource.Type.toString):
3202 2010-09-09 Kristian Amlie <kristian.amlie@nokia.com>
3204 Reviewed by Andreas Kling.
3206 [Qt] Fixed incorrect Symbian scoping.
3208 The missing install functionality is only true for mmp based systems.
3210 https://bugs.webkit.org/show_bug.cgi?id=45268
3214 2010-09-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3216 Reviewed by Dirk Schulze.
3218 [WML] Add a parameter to fix build break.
3219 https://bugs.webkit.org/show_bug.cgi?id=45437
3221 In WMLSelectElement.h, the setSelectedIndexByUser() needs to have one more parameter.
3222 Because, parent class's setSelectedIndexByUser() has one more param.
3224 * wml/WMLSelectElement.h:
3226 2010-09-09 Ryuan Choi <ryuan.choi@samsung.com>
3228 Unreviewed attempt to fix EFL build after r67001.
3230 [EFL] Regression (67001) Build break
3231 https://bugs.webkit.org/show_bug.cgi?id=45422
3233 * platform/efl/ScrollbarEfl.cpp:
3234 (scrollbarEflEdjeMessage):
3236 2010-09-08 Ryosuke Niwa <rniwa@webkit.org>
3238 Reviewed by Tony Chang.
3240 MarkupAccumulator should be broken down into two classes
3241 https://bugs.webkit.org/show_bug.cgi?id=44854
3243 Extracted wrapWithNode, wrapWithStyleNode, stringValueForRange, renderedText, removeExteriorStyles,
3244 shouldAnnotate, m_shouldAnnotate, and m_reversedPrecedingMarkup from MarkupAccumulator to create
3245 StyledMarkupAccumulator in order to isolate annotation related code and prepending of text.
3247 Isolating MarkupAccumulator as a separate class has two advantages:
3248 1. Isolated serialization code is easier to understand and easier to security-review.
3249 2. Embedder can use MarkupAccumulator to implement "Save as" feature.
3251 Also made takeResults, appendText, and appendElement in MarkupAccumulator virtual to override in
3252 StyledMarkupAccumulator because prepending text requires overriding takeResults, appendText needs
3253 to append only rendered text when shouldAnnotate() is true, and appendElement requires a different
3254 behavior when shouldAnnotate() is true or when called inside wrapWithNode with convertBlocksToInlines = true.
3256 No new tests are added since this is a cleanup.
3258 * editing/markup.cpp:
3259 (WebCore::MarkupAccumulator::MarkupAccumulator): Removed shouldAnnotate from argument.
3260 (WebCore::MarkupAccumulator::~MarkupAccumulator): Added.
3261 (WebCore::StyledMarkupAccumulator::): Added.
3262 (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Added.
3263 (WebCore::StyledMarkupAccumulator::appendElement): Added to support annotation.
3264 (WebCore::StyledMarkupAccumulator::shouldAnnotate): Moved from MarkupAccumulator.
3265 (WebCore::MarkupAccumulator::appendStartTag): No longer takes convertBlocksToInlines and RangeFullySelectsNode.
3266 (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Moved from MarkupAccumulator.
3267 (WebCore::MarkupAccumulator::takeResults): No longer accumulates prepended text, and made virtual.
3268 (WebCore::StyledMarkupAccumulator::takeResults): Added to support prepended text.
3269 (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): Takes a reference to Attribute instead of a pointer.
3270 (WebCore::MarkupAccumulator::entityMaskForText): Extracted from appendText.
3271 (WebCore::MarkupAccumulator::appendText): No longer deals with annotation.
3272 (WebCore::StyledMarkupAccumulator::appendText): Added to support annotation.
3273 (WebCore::StyledMarkupAccumulator::stringValueForRange): Moved from MarkupAccumulator.
3274 (WebCore::StyledMarkupAccumulator::renderedText): Moved from MarkupAccumulator.
3275 (WebCore::MarkupAccumulator::appendElement): No longer deals with annotation.
3276 (WebCore::StyledMarkupAccumulator::wrapWithNode): Moved from MarkupAccumulator.
3277 (WebCore::StyledMarkupAccumulator::removeExteriorStyles): Moved from MarkupAccumulator.
3278 (WebCore::MarkupAccumulator::appendOpenTag): Added.
3279 (WebCore::MarkupAccumulator::appendCloseTag): Added.
3280 (WebCore::MarkupAccumulator::appendAttribute): Added.
3281 (WebCore::MarkupAccumulator::appendStartMarkup): No longer takes convertBlocksToInlines and RangeFullySelectsNode.
3282 (WebCore::serializeNodes): Takes StyledMarkupAccumulator.
3283 (WebCore::createMarkup): Range version uses StyledMarkupAccumulator and node version uses MarkupAccumulator.
3285 2010-09-08 Peter Kasting <pkasting@google.com>
3287 Not reviewed, layout test fix.
3289 Fix flaky layout test results caused by not initializing members correctly.
3290 https://bugs.webkit.org/show_bug.cgi?id=45411
3292 * platform/ScrollAnimator.cpp:
3293 (WebCore::ScrollAnimator::ScrollAnimator):
3294 (WebCore::ScrollAnimator::~ScrollAnimator):
3295 * platform/ScrollAnimator.h:
3297 2010-09-08 MORITA Hajime <morrita@google.com>
3299 Reviewed by Tony Chang.
3301 spelling underline gets lost on backspace
3302 https://bugs.webkit.org/show_bug.cgi?id=41423
3304 moveParagraphs() did make a DOM range by serializing source range
3305 and deserializing it back, and markers are gone during the process.
3306 This change marks that DOM range again.
3308 Test: editing/spelling/spelling-backspace-between-lines.html
3310 * editing/CompositeEditCommand.cpp:
3311 (WebCore::CompositeEditCommand::moveParagraphs):
3312 * editing/Editor.cpp:
3313 (WebCore::Editor::clearMisspellingsAndBadGrammar): Added.
3314 (WebCore::Editor::markMisspellingsAndBadGrammar): Added.
3317 2010-09-08 Adam Barth <abarth@webkit.org>
3319 Reviewed by Eric Seidel.
3321 text/plain documents that start with \n trigger ASSERT
3322 https://bugs.webkit.org/show_bug.cgi?id=45409
3324 Because the TextDocumentParser uses a <pre> element to show the text,
3325 it ran into a requirement from HTML5 to skip any initial \n character
3326 tokens inside a <pre> element. We don't want the behavior for
3327 TextDocuments, so I've loosened our ASSERTs and added a comment and a
3328 test to document the correct behavior.
3330 Test: fast/tokenizer/text-plain.html
3332 * html/parser/HTMLTokenizer.cpp:
3333 (WebCore::HTMLTokenizer::nextToken):
3335 2010-09-08 James Robinson <jamesr@chromium.org>
3337 Reviewed by Kenneth Russell.
3339 [chromium] Always do 2d canvas clearRect() in hardware
3340 https://bugs.webkit.org/show_bug.cgi?id=45415
3342 r67003 forced Canvas 2d's clearRect() to happen in software if a gradient/shadow/etc was
3343 active. This is subtly wrong for mixed mode rendering since it results in only the
3344 software backing store being cleared and not the hardware. This forces clearRect() to
3345 happen in hardware. Since we upload mixed mode results before doing any hardware draw
3346 this means we always clear everything.
3348 * platform/graphics/skia/GraphicsContextSkia.cpp:
3349 (WebCore::GraphicsContext::clearRect):
3351 2010-09-08 Dean Jackson <dino@apple.com>
3353 Unreviewed attempt to fix the Mac builds.
3355 * css/CSSParser.cpp:
3356 (WebCore::CSSParser::parseAnimationTimingFunction):
3358 2010-09-08 Dean Jackson <dino@apple.com>
3360 Unreviewed attempt to fix QT build.
3362 * platform/graphics/qt/GraphicsLayerQt.cpp:
3363 (WebCore::solveStepsFunction):
3364 (WebCore::applyTimingFunction):
3366 2010-09-08 Dean Jackson <dino@apple.com>
3368 Reviewed by Simon Fraser.
3370 Implement steps() timing function for animations
3371 https://bugs.webkit.org/show_bug.cgi?id=44541
3373 Tests: animations/timing-functions.html
3374 transitions/steps-timing-function.html
3376 * css/CSSComputedStyleDeclaration.cpp:
3377 (WebCore::getTimingFunctionValue):
3378 - when creating computed style we now test what
3379 type of timing function it being used
3380 * css/CSSParser.cpp:
3381 (WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
3382 - rename this method from parseTimingFunctionValue
3383 (WebCore::CSSParser::parseAnimationTimingFunction):
3384 - support parsing the steps() function
3387 * css/CSSStyleSelector.cpp:
3388 (WebCore::CSSStyleSelector::mapAnimationTimingFunction):
3389 - handle 'step-start' and 'step-end' identifiers. Also
3390 now use ::create when constructing objects
3391 * css/CSSTimingFunctionValue.cpp:
3392 (WebCore::CSSLinearTimingFunctionValue::cssText):
3393 (WebCore::CSSCubicBezierTimingFunctionValue::cssText):
3394 (WebCore::CSSStepsTimingFunctionValue::cssText):
3395 - new text output for computed style. We now produce
3396 the text 'linear' when appropriate.
3397 * css/CSSTimingFunctionValue.h:
3398 (WebCore::CSSTimingFunctionValue::isLinearTimingFunctionValue):
3399 (WebCore::CSSTimingFunctionValue::isCubicBezierTimingFunctionValue):
3400 (WebCore::CSSTimingFunctionValue::isStepsTimingFunctionValue):
3401 (WebCore::CSSTimingFunctionValue::CSSTimingFunctionValue):
3402 (WebCore::CSSTimingFunctionValue::isTimingFunctionValue):
3403 (WebCore::CSSLinearTimingFunctionValue::create):
3404 (WebCore::CSSLinearTimingFunctionValue::isLinearTimingFunctionValue):
3405 (WebCore::CSSLinearTimingFunctionValue::CSSLinearTimingFunctionValue):
3406 (WebCore::CSSCubicBezierTimingFunctionValue::create):
3407 (WebCore::CSSCubicBezierTimingFunctionValue::isCubicBezierTimingFunctionValue):
3408 (WebCore::CSSCubicBezierTimingFunctionValue::CSSCubicBezierTimingFunctionValue):
3409 (WebCore::CSSStepsTimingFunctionValue::create):
3410 (WebCore::CSSStepsTimingFunctionValue::numberOfSteps):
3411 (WebCore::CSSStepsTimingFunctionValue::stepAtStart):
3412 (WebCore::CSSStepsTimingFunctionValue::isStepsTimingFunctionValue):
3413 (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue):
3414 - CSSTimingFunction is now a pure virtual ref-counted base class, with
3415 subclasses for each of the three supported timing functions.
3416 * css/CSSValueKeywords.in:
3417 - new keywords step-start and step-end
3418 * page/animation/AnimationBase.cpp:
3419 (WebCore::solveStepsFunction):
3420 - produces the output value from a stepping function
3421 (WebCore::AnimationBase::progress):
3422 - now has to switch based on timing function type
3423 * page/animation/KeyframeAnimation.cpp:
3424 (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
3425 - use ref-counted access
3426 * platform/animation/Animation.cpp:
3427 (WebCore::Animation::animationsMatch):
3428 - change timing function comparison for operator==
3429 * platform/animation/Animation.h:
3430 (WebCore::Animation::timingFunction):
3431 (WebCore::Animation::setTimingFunction):
3432 (WebCore::Animation::initialAnimationTimingFunction):
3433 - move to ref-counted timing function class
3434 * platform/animation/TimingFunction.h:
3435 (WebCore::TimingFunction::~TimingFunction):
3436 (WebCore::TimingFunction::isLinearTimingFunction):
3437 (WebCore::TimingFunction::isCubicBezierTimingFunction):
3438 (WebCore::TimingFunction::isStepsTimingFunction):
3439 (WebCore::TimingFunction::TimingFunction):
3440 (WebCore::LinearTimingFunction::create):
3441 (WebCore::LinearTimingFunction::~LinearTimingFunction):
3442 (WebCore::LinearTimingFunction::operator==):
3443 (WebCore::LinearTimingFunction::LinearTimingFunction):
3444 (WebCore::CubicBezierTimingFunction::create):
3445 (WebCore::CubicBezierTimingFunction::~CubicBezierTimingFunction):
3446 (WebCore::CubicBezierTimingFunction::operator==):
3447 (WebCore::CubicBezierTimingFunction::CubicBezierTimingFunction):
3448 (WebCore::StepsTimingFunction::create):
3449 (WebCore::StepsTimingFunction::~StepsTimingFunction):
3450 (WebCore::StepsTimingFunction::operator==):
3451 (WebCore::StepsTimingFunction::numberOfSteps):
3452 (WebCore::StepsTimingFunction::stepAtStart):
3453 (WebCore::StepsTimingFunction::StepsTimingFunction):
3454 - TimingFunction is now a ref-counted pure virtual base class,
3455 with three subclasses representing the types of timing functions
3457 * platform/graphics/GraphicsLayer.h:
3458 (WebCore::AnimationValue::AnimationValue):
3459 (WebCore::FloatAnimationValue::FloatAnimationValue):
3460 (WebCore::TransformAnimationValue::TransformAnimationValue):
3461 - use PassRefPtr in function parameters
3462 * platform/graphics/qt/GraphicsLayerQt.cpp:
3463 (WebCore::solveStepsFunction):
3464 (WebCore::applyTimingFunction):
3465 (WebCore::AnimationQt::AnimationQt):
3466 (WebCore::AnimationQt::updateCurrentTime):
3467 - implement the timing function switch for QT
3468 * platform/graphics/mac/GraphicsLayerCA.mm:
3469 (WebCore::getCAMediaTimingFunction):
3470 - update for new timing function interface
3471 (WebCore::animationHasStepsTimingFunction):
3472 - new method to make sure animations with steps() functions
3473 never try to execute in Core Animation
3474 (WebCore::GraphicsLayerCA::addAnimation):
3475 - test for steps() timing function
3476 (WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
3477 * rendering/style/RenderStyleConstants.h:
3478 - remove old RenderStyle enum for timing function types
3480 2010-09-08 Csaba Osztrogonác <ossy@webkit.org>
3482 Unreviewed trivial fix after r66960.
3484 * WebCore.pro: loader/TextDocument.h renamed to html/TextDocument.h
3486 2010-09-08 Adam Barth <abarth@webkit.org>
3488 Reviewed by Eric Seidel.
3490 move-during-parse-parent.html crashes
3491 https://bugs.webkit.org/show_bug.cgi?id=45210
3493 When inserting elements into the tree, they need to be associated with
3494 their parent's document, not the document for which the parser is
3495 running. These two are different when the parent has been moved to a
3496 different document during parsing.
3498 Test: fast/parser/move-during-parsing.html
3500 * html/parser/HTMLConstructionSite.cpp:
3501 (WebCore::HTMLConstructionSite::insertComment):
3502 (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
3503 (WebCore::HTMLConstructionSite::insertScriptElement):
3504 (WebCore::HTMLConstructionSite::insertTextNode):
3505 (WebCore::HTMLConstructionSite::createElement):
3506 (WebCore::HTMLConstructionSite::createHTMLElement):
3508 2010-09-08 Gabor Loki <loki@webkit.org>
3510 Reviewed by Andreas Kling.
3512 Fix increases required alignment of target type warning on ARM
3513 https://bugs.webkit.org/show_bug.cgi?id=45301
3515 No new tests needed.
3517 * bindings/js/SerializedScriptValue.cpp:
3518 (WebCore::CloneDeserializer::readLittleEndian):
3519 (WebCore::CloneDeserializer::readString):
3520 * plugins/PluginDatabase.cpp:
3521 (WebCore::readTime):
3523 2010-09-08 Antonio Gomes <agomes@rim.com>
3525 Reviewed by Daniel Bates.
3527 Make FocusController::focusedOrMainFrame method const
3528 https://bugs.webkit.org/show_bug.cgi?id=45406
3532 * page/FocusController.cpp:
3533 (WebCore::FocusController::focusedOrMainFrame):
3534 * page/FocusController.h:
3536 2010-09-08 Jian Li <jianli@chromium.org>
3538 Reviewed by Darin Adler.
3540 Fix a problem in createCanonicalUUIDString that causes the last digit
3542 https://bugs.webkit.org/show_bug.cgi?id=45412
3544 This is caused by not including the final null character into the count
3545 that is provided to fgets.
3547 This is covered by the existing test: send-form-data-with-sliced-file.html.
3549 * platform/UUID.cpp:
3550 (WebCore::createCanonicalUUIDString):
3552 2010-09-08 Nico Weber <thakis@chromium.org>
3554 Reviewed by Dimitri Glazkov.